Skip to content

Commit

Permalink
removes ordered qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasQuesadilla committed Feb 12, 2024
1 parent dcc661c commit f4f3d4c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
15 changes: 9 additions & 6 deletions AGGREGATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,15 @@ Note: The `filters` field will still apply to aggregatable reports, and each
dict in `aggregatable_trigger_data` can still optionally have filters applied
to it just like for event-level reports.

Note: The `aggregatable_values` field may also be specified as a list of dict,
where each dict contains a dict of key-value pair as outlined above as well as
optional `filters` and `not_filters` fields, allowing trigger registrations to
customize how values are contributed to keys depending on source event data. If
multiple list entries have filters that match the source's filters, only the
first entry and its corresponding values will be used.
Note: The `aggregatable_values` field may also be specified as a list of
dictionaries, where each dictionary contains a dictionary `values` of key-value
pairs as outlined above as well as optional `filters` and `not_filters` fields,
allowing trigger registrations to customize how values are contributed to keys
depending on source filter data. If multiple list entries have filters that
match the source's filters, only the first entry and its corresponding values
will be used.

For example:
```jsonc
{
...,
Expand Down
10 changes: 5 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ An aggregatable values configuration is a [=struct=] with the following items:

<dl dfn-for="aggregatable values configuration">
: <dfn>values</dfn>
:: An [=ordered map=] whose [=map/key|keys=] are [=strings=] and whose [=map/value|values=] are non-negative 32-bit integers.
:: A [=map=] whose [=map/key|keys=] are [=strings=] and whose [=map/value|values=] are non-negative 32-bit integers.
: <dfn>filters</dfn>
:: A [=list=] of [=filter configs=].
: <dfn>negated filters</dfn>
Expand Down Expand Up @@ -2412,7 +2412,7 @@ To <dfn>parse aggregatable trigger data</dfn> given an [=ordered map=] |map|:
1. [=list/Append=] |aggregatableTrigger| to |aggregatableTriggerData|.
1. Return |aggregatableTriggerData|.

To <dfn>parse aggregatable key-values</dfn> given an [=ordered map=] |map|:
To <dfn>parse aggregatable key-values</dfn> given a [=map=] |map|:

1. [=map/iterate|For each=] |key| → |value| of |map|:
1. If |key|'s [=string/length=] is greater than the [=max length per aggregation key identifier=],
Expand All @@ -2428,7 +2428,7 @@ To <dfn>parse aggregatable values</dfn> given an [=ordered map=] |map|:
1. Let |values| be |map|["`aggregatable_values`"].
1. If |values| is not an [=ordered map=] or a [=list=], return null.
1. Let |aggregatableValuesConfigurations| be a [=list=] of [=aggregatable values configurations=], initially empty.
1. If |values| is an [=ordered map=]:
1. If |values| is a [=map=]:
1. Let |aggregatableKeyValues| be the result of running [=parse aggregatable key-values=] with |values|.
1. If |aggregatableKeyValues| is null, return null.
1. Let |aggregatableValuesConfiguration| be a new [=aggregatable values configuration=] with the items:
Expand All @@ -2441,7 +2441,7 @@ To <dfn>parse aggregatable values</dfn> given an [=ordered map=] |map|:
1. [=list/Append=] |aggregatableValuesConfiguration| to |aggregatableValuesConfigurations|.
1. Return |aggregatableValuesConfigurations|.
1. [=list/iterate|For each=] |value| of |values|:
1. If |value| is not an [=ordered map=], return null.
1. If |value| is not a [=map=], return null.
1. If |value|["`values`"] does not [=map/exist=], return null.
1. Let |aggregatableKeyValues| be the result of running [=parse aggregatable key-values=] with |value|["`values`"].
1. If |aggregatableKeyValues| is null, return null.
Expand Down Expand Up @@ -2696,7 +2696,7 @@ Given an [=attribution trigger=] |trigger|, an [=attribution source=]
<h3 algorithm id="creating-aggregatable-contributions">Creating aggregatable contributions</h3>

To <dfn>create [=aggregatable contributions=] from [=attribution source/aggregation keys=] and aggregatable values</dfn>
given an [=ordered map=] |aggregationKeys| and an [=ordered map=] |aggregatableValues|,
given an [=ordered map=] |aggregationKeys| and a [=map=] |aggregatableValues|,
run the following steps:

1. Let |contributions| be an empty [=list=].
Expand Down

0 comments on commit f4f3d4c

Please sign in to comment.