@oursprivacy/platform-sdk 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +17 -14
- package/client.d.mts +12 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -9
- package/client.d.ts.map +1 -1
- package/client.js +6 -3
- package/client.js.map +1 -1
- package/client.mjs +6 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/allowed-events.d.mts +206 -5
- package/resources/allowed-events.d.mts.map +1 -1
- package/resources/allowed-events.d.ts +206 -5
- package/resources/allowed-events.d.ts.map +1 -1
- package/resources/allowed-events.js +48 -4
- package/resources/allowed-events.js.map +1 -1
- package/resources/allowed-events.mjs +48 -4
- package/resources/allowed-events.mjs.map +1 -1
- package/resources/consent-analytics.d.mts +57 -0
- package/resources/consent-analytics.d.mts.map +1 -0
- package/resources/consent-analytics.d.ts +57 -0
- package/resources/consent-analytics.d.ts.map +1 -0
- package/resources/consent-analytics.js +22 -0
- package/resources/consent-analytics.js.map +1 -0
- package/resources/consent-analytics.mjs +18 -0
- package/resources/consent-analytics.mjs.map +1 -0
- package/resources/consent-settings.d.mts +198 -1
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +198 -1
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/consent-settings.js +40 -0
- package/resources/consent-settings.js.map +1 -1
- package/resources/consent-settings.mjs +40 -0
- package/resources/consent-settings.mjs.map +1 -1
- package/resources/data-governance.d.mts +793 -0
- package/resources/data-governance.d.mts.map +1 -0
- package/resources/data-governance.d.ts +793 -0
- package/resources/data-governance.d.ts.map +1 -0
- package/resources/data-governance.js +70 -0
- package/resources/data-governance.js.map +1 -0
- package/resources/data-governance.mjs +66 -0
- package/resources/data-governance.mjs.map +1 -0
- package/resources/default-mappings.d.mts +60 -3
- package/resources/default-mappings.d.mts.map +1 -1
- package/resources/default-mappings.d.ts +60 -3
- package/resources/default-mappings.d.ts.map +1 -1
- package/resources/destinations.d.mts +7 -7
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +7 -7
- package/resources/destinations.d.ts.map +1 -1
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mappings.d.mts +174 -15
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +174 -15
- package/resources/mappings.d.ts.map +1 -1
- package/resources/sources.d.mts +213 -45
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +213 -45
- package/resources/sources.d.ts.map +1 -1
- package/resources/sources.js +18 -7
- package/resources/sources.js.map +1 -1
- package/resources/sources.mjs +18 -7
- package/resources/sources.mjs.map +1 -1
- package/src/client.ts +60 -27
- package/src/resources/allowed-events.ts +232 -4
- package/src/resources/consent-analytics.ts +76 -0
- package/src/resources/consent-settings.ts +272 -0
- package/src/resources/data-governance.ts +1091 -0
- package/src/resources/default-mappings.ts +60 -3
- package/src/resources/destinations.ts +9 -2
- package/src/resources/index.ts +27 -12
- package/src/resources/mappings.ts +174 -15
- package/src/resources/sources.ts +337 -88
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/global-dispatch-centers.d.mts +0 -349
- package/resources/global-dispatch-centers.d.mts.map +0 -1
- package/resources/global-dispatch-centers.d.ts +0 -349
- package/resources/global-dispatch-centers.d.ts.map +0 -1
- package/resources/global-dispatch-centers.js +0 -43
- package/resources/global-dispatch-centers.js.map +0 -1
- package/resources/global-dispatch-centers.mjs +0 -39
- package/resources/global-dispatch-centers.mjs.map +0 -1
- package/src/resources/global-dispatch-centers.ts +0 -458
|
@@ -3,19 +3,61 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class AllowedEvents extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* List
|
|
6
|
+
* List every allowed event for this account. Allowed events sit between sources
|
|
7
|
+
* and destinations in the dispatch flow — only inbound events whose `event` field
|
|
8
|
+
* matches the `name` of an allowed event (case-insensitive) can be routed to that
|
|
9
|
+
* event's `destinationIds`. Events without a matching allowed event are dropped.
|
|
10
|
+
* The list is not paginated; the per-account count is bounded. System events
|
|
11
|
+
* (names beginning with `$`, e.g. `$heatmap_click`) are hidden from the response —
|
|
12
|
+
* only `$identify` is creatable as an allowed event. Requires scope:
|
|
13
|
+
* allowedEvent:list
|
|
7
14
|
*/
|
|
8
15
|
list(options?: RequestOptions): APIPromise<AllowedEventListResponse>;
|
|
9
16
|
/**
|
|
10
|
-
* Create a new allowed event
|
|
17
|
+
* Create a new allowed event for this account.
|
|
18
|
+
*
|
|
19
|
+
* - `name` is required, trimmed, case-insensitively unique within the account, and
|
|
20
|
+
* rejected if it exceeds the platform event-name length limit.
|
|
21
|
+
* - Names starting with `$` are reserved for system events. Only `$identify` is
|
|
22
|
+
* accepted.
|
|
23
|
+
* - `destinationIds` is optional. Unknown ids and ids belonging to other accounts
|
|
24
|
+
* are silently filtered out at write time (the destination must exist on this
|
|
25
|
+
* account to be saved).
|
|
26
|
+
*
|
|
27
|
+
* Returns the full entity so callers can read the server-assigned `id`,
|
|
28
|
+
* `createdAt`, and the filtered `destinationIds` without a follow-up GET. Known
|
|
29
|
+
* input failures (duplicate name, name length, `$`-prefix reservation, empty name)
|
|
30
|
+
* are returned as HTTP 409 with the reason in the response `error` field. Requires
|
|
31
|
+
* scope: allowedEvent:create
|
|
11
32
|
*/
|
|
12
33
|
create(body: AllowedEventCreateParams, options?: RequestOptions): APIPromise<AllowedEventCreateResponse>;
|
|
13
34
|
/**
|
|
14
|
-
*
|
|
35
|
+
* Fetch a single allowed event by id. Returns 404 when no record matches the
|
|
36
|
+
* supplied id or it belongs to a different account. Requires scope:
|
|
37
|
+
* allowedEvent:find
|
|
15
38
|
*/
|
|
16
39
|
retrieve(id: string, options?: RequestOptions): APIPromise<AllowedEventRetrieveResponse>;
|
|
17
40
|
/**
|
|
18
|
-
*
|
|
41
|
+
* Partially update an allowed event. Only the fields you send are changed; omitted
|
|
42
|
+
* fields keep their current value.
|
|
43
|
+
*
|
|
44
|
+
* - `destinationIds` is replaced wholesale when sent — the canonical way to add or
|
|
45
|
+
* remove a destination is to fetch, modify the array, and PATCH it back. Stale
|
|
46
|
+
* ids (deleted destinations or destinations on another account) are silently
|
|
47
|
+
* filtered out at write time.
|
|
48
|
+
* - `name` is subject to the same rules as create: case-insensitive uniqueness,
|
|
49
|
+
* length cap, `$`-prefix reservation.
|
|
50
|
+
* - `trigger` accepts `null` to clear the existing value.
|
|
51
|
+
*
|
|
52
|
+
* Returns the full entity. Known input failures (duplicate name, length,
|
|
53
|
+
* `$`-prefix, empty name) are returned as HTTP 409 with the reason in the response
|
|
54
|
+
* `error` field. Requires scope: allowedEvent:update
|
|
55
|
+
*/
|
|
56
|
+
update(id: string, body: AllowedEventUpdateParams, options?: RequestOptions): APIPromise<AllowedEventUpdateResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Delete an allowed event. After deletion, inbound events whose `event` field
|
|
59
|
+
* matches the deleted name are no longer routed and are dropped at the allow-list
|
|
60
|
+
* stage of the dispatch flow. Requires scope: allowedEvent:delete
|
|
19
61
|
*/
|
|
20
62
|
delete(id: string, options?: RequestOptions): APIPromise<AllowedEventDeleteResponse>;
|
|
21
63
|
}
|
|
@@ -24,25 +66,164 @@ export interface AllowedEventListResponse {
|
|
|
24
66
|
}
|
|
25
67
|
export declare namespace AllowedEventListResponse {
|
|
26
68
|
interface Entity {
|
|
69
|
+
/**
|
|
70
|
+
* Server-assigned UUID for this allowed event.
|
|
71
|
+
*/
|
|
27
72
|
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* ISO 8601 timestamp when the allowed event was created.
|
|
75
|
+
*/
|
|
28
76
|
createdAt: string;
|
|
77
|
+
/**
|
|
78
|
+
* Destinations that receive this event. Empty array means the event is allowed but
|
|
79
|
+
* routed nowhere (effectively dropped). PATCH replaces this list wholesale.
|
|
80
|
+
*/
|
|
29
81
|
destinationIds: Array<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Case-insensitive event name. Inbound events whose `event` field matches this
|
|
84
|
+
* value are gated through this allowed event. Reserved: names starting with `$`
|
|
85
|
+
* are system events and cannot be created (except `$identify`).
|
|
86
|
+
*/
|
|
30
87
|
name: string;
|
|
88
|
+
/**
|
|
89
|
+
* Optional free-form trigger description. Not used by the dispatch pipeline —
|
|
90
|
+
* surfaced in the dashboard so teams can record where each event fires.
|
|
91
|
+
*/
|
|
92
|
+
trigger?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* ISO 8601 timestamp of the last PATCH. Equal to createdAt on a freshly created
|
|
95
|
+
* event.
|
|
96
|
+
*/
|
|
31
97
|
updatedAt?: string | null;
|
|
32
98
|
}
|
|
33
99
|
}
|
|
34
100
|
export interface AllowedEventCreateResponse {
|
|
101
|
+
/**
|
|
102
|
+
* Server-assigned UUID for this allowed event.
|
|
103
|
+
*/
|
|
35
104
|
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 timestamp when the allowed event was created.
|
|
107
|
+
*/
|
|
36
108
|
createdAt: string;
|
|
109
|
+
/**
|
|
110
|
+
* Destinations that receive this event. Empty array means the event is allowed but
|
|
111
|
+
* routed nowhere (effectively dropped). PATCH replaces this list wholesale.
|
|
112
|
+
*/
|
|
37
113
|
destinationIds: Array<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Case-insensitive event name. Inbound events whose `event` field matches this
|
|
116
|
+
* value are gated through this allowed event. Reserved: names starting with `$`
|
|
117
|
+
* are system events and cannot be created (except `$identify`).
|
|
118
|
+
*/
|
|
38
119
|
name: string;
|
|
120
|
+
/**
|
|
121
|
+
* ISO 8601 timestamp of the most recent successful dispatch to any destination on
|
|
122
|
+
* `destinationIds`. Lags `lastTriggeredAt` when consent or governance rules drop
|
|
123
|
+
* the event before dispatch.
|
|
124
|
+
*/
|
|
125
|
+
lastDispatchedAt?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* ISO 8601 timestamp of the most recent inbound event observed for this name.
|
|
128
|
+
* Useful for spotting events that were configured but never fired. Null when never
|
|
129
|
+
* observed.
|
|
130
|
+
*/
|
|
131
|
+
lastTriggeredAt?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Optional free-form trigger description. Not used by the dispatch pipeline —
|
|
134
|
+
* surfaced in the dashboard so teams can record where each event fires.
|
|
135
|
+
*/
|
|
136
|
+
trigger?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* ISO 8601 timestamp of the last PATCH. Equal to createdAt on a freshly created
|
|
139
|
+
* event.
|
|
140
|
+
*/
|
|
39
141
|
updatedAt?: string | null;
|
|
40
142
|
}
|
|
41
143
|
export interface AllowedEventRetrieveResponse {
|
|
144
|
+
/**
|
|
145
|
+
* Server-assigned UUID for this allowed event.
|
|
146
|
+
*/
|
|
147
|
+
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* ISO 8601 timestamp when the allowed event was created.
|
|
150
|
+
*/
|
|
151
|
+
createdAt: string;
|
|
152
|
+
/**
|
|
153
|
+
* Destinations that receive this event. Empty array means the event is allowed but
|
|
154
|
+
* routed nowhere (effectively dropped). PATCH replaces this list wholesale.
|
|
155
|
+
*/
|
|
156
|
+
destinationIds: Array<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Case-insensitive event name. Inbound events whose `event` field matches this
|
|
159
|
+
* value are gated through this allowed event. Reserved: names starting with `$`
|
|
160
|
+
* are system events and cannot be created (except `$identify`).
|
|
161
|
+
*/
|
|
162
|
+
name: string;
|
|
163
|
+
/**
|
|
164
|
+
* ISO 8601 timestamp of the most recent successful dispatch to any destination on
|
|
165
|
+
* `destinationIds`. Lags `lastTriggeredAt` when consent or governance rules drop
|
|
166
|
+
* the event before dispatch.
|
|
167
|
+
*/
|
|
168
|
+
lastDispatchedAt?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* ISO 8601 timestamp of the most recent inbound event observed for this name.
|
|
171
|
+
* Useful for spotting events that were configured but never fired. Null when never
|
|
172
|
+
* observed.
|
|
173
|
+
*/
|
|
174
|
+
lastTriggeredAt?: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* Optional free-form trigger description. Not used by the dispatch pipeline —
|
|
177
|
+
* surfaced in the dashboard so teams can record where each event fires.
|
|
178
|
+
*/
|
|
179
|
+
trigger?: string | null;
|
|
180
|
+
/**
|
|
181
|
+
* ISO 8601 timestamp of the last PATCH. Equal to createdAt on a freshly created
|
|
182
|
+
* event.
|
|
183
|
+
*/
|
|
184
|
+
updatedAt?: string | null;
|
|
185
|
+
}
|
|
186
|
+
export interface AllowedEventUpdateResponse {
|
|
187
|
+
/**
|
|
188
|
+
* Server-assigned UUID for this allowed event.
|
|
189
|
+
*/
|
|
42
190
|
id: string;
|
|
191
|
+
/**
|
|
192
|
+
* ISO 8601 timestamp when the allowed event was created.
|
|
193
|
+
*/
|
|
43
194
|
createdAt: string;
|
|
195
|
+
/**
|
|
196
|
+
* Destinations that receive this event. Empty array means the event is allowed but
|
|
197
|
+
* routed nowhere (effectively dropped). PATCH replaces this list wholesale.
|
|
198
|
+
*/
|
|
44
199
|
destinationIds: Array<string>;
|
|
200
|
+
/**
|
|
201
|
+
* Case-insensitive event name. Inbound events whose `event` field matches this
|
|
202
|
+
* value are gated through this allowed event. Reserved: names starting with `$`
|
|
203
|
+
* are system events and cannot be created (except `$identify`).
|
|
204
|
+
*/
|
|
45
205
|
name: string;
|
|
206
|
+
/**
|
|
207
|
+
* ISO 8601 timestamp of the most recent successful dispatch to any destination on
|
|
208
|
+
* `destinationIds`. Lags `lastTriggeredAt` when consent or governance rules drop
|
|
209
|
+
* the event before dispatch.
|
|
210
|
+
*/
|
|
211
|
+
lastDispatchedAt?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* ISO 8601 timestamp of the most recent inbound event observed for this name.
|
|
214
|
+
* Useful for spotting events that were configured but never fired. Null when never
|
|
215
|
+
* observed.
|
|
216
|
+
*/
|
|
217
|
+
lastTriggeredAt?: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* Optional free-form trigger description. Not used by the dispatch pipeline —
|
|
220
|
+
* surfaced in the dashboard so teams can record where each event fires.
|
|
221
|
+
*/
|
|
222
|
+
trigger?: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* ISO 8601 timestamp of the last PATCH. Equal to createdAt on a freshly created
|
|
225
|
+
* event.
|
|
226
|
+
*/
|
|
46
227
|
updatedAt?: string | null;
|
|
47
228
|
}
|
|
48
229
|
export type AllowedEventDeleteResponse = boolean;
|
|
@@ -50,7 +231,27 @@ export interface AllowedEventCreateParams {
|
|
|
50
231
|
name: string;
|
|
51
232
|
destinationIds?: Array<string> | null;
|
|
52
233
|
}
|
|
234
|
+
export interface AllowedEventUpdateParams {
|
|
235
|
+
/**
|
|
236
|
+
* Destinations that should receive this event. Wholesale replacement — the sent
|
|
237
|
+
* list becomes the new value. Stale IDs (destinations from another account or
|
|
238
|
+
* deleted destinations) are silently filtered out at write time. Send `[]` to gate
|
|
239
|
+
* the event from every destination.
|
|
240
|
+
*/
|
|
241
|
+
destinationIds?: Array<string> | null;
|
|
242
|
+
/**
|
|
243
|
+
* New event name. Subject to the same rules as create: case-insensitive uniqueness
|
|
244
|
+
* within the account, max length enforced by the platform, and the `$`-prefix
|
|
245
|
+
* reservation (only `$identify` is allowed). Omit to leave the name unchanged.
|
|
246
|
+
*/
|
|
247
|
+
name?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Free-form trigger description shown in the dashboard. Send `null` to clear. Not
|
|
250
|
+
* used by the dispatch pipeline.
|
|
251
|
+
*/
|
|
252
|
+
trigger?: string | null;
|
|
253
|
+
}
|
|
53
254
|
export declare namespace AllowedEvents {
|
|
54
|
-
export { type AllowedEventListResponse as AllowedEventListResponse, type AllowedEventCreateResponse as AllowedEventCreateResponse, type AllowedEventRetrieveResponse as AllowedEventRetrieveResponse, type AllowedEventDeleteResponse as AllowedEventDeleteResponse, type AllowedEventCreateParams as AllowedEventCreateParams, };
|
|
255
|
+
export { type AllowedEventListResponse as AllowedEventListResponse, type AllowedEventCreateResponse as AllowedEventCreateResponse, type AllowedEventRetrieveResponse as AllowedEventRetrieveResponse, type AllowedEventUpdateResponse as AllowedEventUpdateResponse, type AllowedEventDeleteResponse as AllowedEventDeleteResponse, type AllowedEventCreateParams as AllowedEventCreateParams, type AllowedEventUpdateParams as AllowedEventUpdateParams, };
|
|
55
256
|
}
|
|
56
257
|
//# sourceMappingURL=allowed-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-events.d.ts","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"allowed-events.d.ts","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":"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"}
|
|
@@ -6,25 +6,69 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
7
|
class AllowedEvents extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* List
|
|
9
|
+
* List every allowed event for this account. Allowed events sit between sources
|
|
10
|
+
* and destinations in the dispatch flow — only inbound events whose `event` field
|
|
11
|
+
* matches the `name` of an allowed event (case-insensitive) can be routed to that
|
|
12
|
+
* event's `destinationIds`. Events without a matching allowed event are dropped.
|
|
13
|
+
* The list is not paginated; the per-account count is bounded. System events
|
|
14
|
+
* (names beginning with `$`, e.g. `$heatmap_click`) are hidden from the response —
|
|
15
|
+
* only `$identify` is creatable as an allowed event. Requires scope:
|
|
16
|
+
* allowedEvent:list
|
|
10
17
|
*/
|
|
11
18
|
list(options) {
|
|
12
19
|
return this._client.get('/rest/v1/allowed-events', options);
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
|
-
* Create a new allowed event
|
|
22
|
+
* Create a new allowed event for this account.
|
|
23
|
+
*
|
|
24
|
+
* - `name` is required, trimmed, case-insensitively unique within the account, and
|
|
25
|
+
* rejected if it exceeds the platform event-name length limit.
|
|
26
|
+
* - Names starting with `$` are reserved for system events. Only `$identify` is
|
|
27
|
+
* accepted.
|
|
28
|
+
* - `destinationIds` is optional. Unknown ids and ids belonging to other accounts
|
|
29
|
+
* are silently filtered out at write time (the destination must exist on this
|
|
30
|
+
* account to be saved).
|
|
31
|
+
*
|
|
32
|
+
* Returns the full entity so callers can read the server-assigned `id`,
|
|
33
|
+
* `createdAt`, and the filtered `destinationIds` without a follow-up GET. Known
|
|
34
|
+
* input failures (duplicate name, name length, `$`-prefix reservation, empty name)
|
|
35
|
+
* are returned as HTTP 409 with the reason in the response `error` field. Requires
|
|
36
|
+
* scope: allowedEvent:create
|
|
16
37
|
*/
|
|
17
38
|
create(body, options) {
|
|
18
39
|
return this._client.post('/rest/v1/allowed-events', { body, ...options });
|
|
19
40
|
}
|
|
20
41
|
/**
|
|
21
|
-
*
|
|
42
|
+
* Fetch a single allowed event by id. Returns 404 when no record matches the
|
|
43
|
+
* supplied id or it belongs to a different account. Requires scope:
|
|
44
|
+
* allowedEvent:find
|
|
22
45
|
*/
|
|
23
46
|
retrieve(id, options) {
|
|
24
47
|
return this._client.get((0, path_1.path) `/rest/v1/allowed-events/${id}`, options);
|
|
25
48
|
}
|
|
26
49
|
/**
|
|
27
|
-
*
|
|
50
|
+
* Partially update an allowed event. Only the fields you send are changed; omitted
|
|
51
|
+
* fields keep their current value.
|
|
52
|
+
*
|
|
53
|
+
* - `destinationIds` is replaced wholesale when sent — the canonical way to add or
|
|
54
|
+
* remove a destination is to fetch, modify the array, and PATCH it back. Stale
|
|
55
|
+
* ids (deleted destinations or destinations on another account) are silently
|
|
56
|
+
* filtered out at write time.
|
|
57
|
+
* - `name` is subject to the same rules as create: case-insensitive uniqueness,
|
|
58
|
+
* length cap, `$`-prefix reservation.
|
|
59
|
+
* - `trigger` accepts `null` to clear the existing value.
|
|
60
|
+
*
|
|
61
|
+
* Returns the full entity. Known input failures (duplicate name, length,
|
|
62
|
+
* `$`-prefix, empty name) are returned as HTTP 409 with the reason in the response
|
|
63
|
+
* `error` field. Requires scope: allowedEvent:update
|
|
64
|
+
*/
|
|
65
|
+
update(id, body, options) {
|
|
66
|
+
return this._client.patch((0, path_1.path) `/rest/v1/allowed-events/${id}`, { body, ...options });
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Delete an allowed event. After deletion, inbound events whose `event` field
|
|
70
|
+
* matches the deleted name are no longer routed and are dropped at the allow-list
|
|
71
|
+
* stage of the dispatch flow. Requires scope: allowedEvent:delete
|
|
28
72
|
*/
|
|
29
73
|
delete(id, options) {
|
|
30
74
|
return this._client.delete((0, path_1.path) `/rest/v1/allowed-events/${id}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-events.js","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"allowed-events.js","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,EAAU,EACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AA7ED,sCA6EC"}
|
|
@@ -3,25 +3,69 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
4
|
export class AllowedEvents extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* List
|
|
6
|
+
* List every allowed event for this account. Allowed events sit between sources
|
|
7
|
+
* and destinations in the dispatch flow — only inbound events whose `event` field
|
|
8
|
+
* matches the `name` of an allowed event (case-insensitive) can be routed to that
|
|
9
|
+
* event's `destinationIds`. Events without a matching allowed event are dropped.
|
|
10
|
+
* The list is not paginated; the per-account count is bounded. System events
|
|
11
|
+
* (names beginning with `$`, e.g. `$heatmap_click`) are hidden from the response —
|
|
12
|
+
* only `$identify` is creatable as an allowed event. Requires scope:
|
|
13
|
+
* allowedEvent:list
|
|
7
14
|
*/
|
|
8
15
|
list(options) {
|
|
9
16
|
return this._client.get('/rest/v1/allowed-events', options);
|
|
10
17
|
}
|
|
11
18
|
/**
|
|
12
|
-
* Create a new allowed event
|
|
19
|
+
* Create a new allowed event for this account.
|
|
20
|
+
*
|
|
21
|
+
* - `name` is required, trimmed, case-insensitively unique within the account, and
|
|
22
|
+
* rejected if it exceeds the platform event-name length limit.
|
|
23
|
+
* - Names starting with `$` are reserved for system events. Only `$identify` is
|
|
24
|
+
* accepted.
|
|
25
|
+
* - `destinationIds` is optional. Unknown ids and ids belonging to other accounts
|
|
26
|
+
* are silently filtered out at write time (the destination must exist on this
|
|
27
|
+
* account to be saved).
|
|
28
|
+
*
|
|
29
|
+
* Returns the full entity so callers can read the server-assigned `id`,
|
|
30
|
+
* `createdAt`, and the filtered `destinationIds` without a follow-up GET. Known
|
|
31
|
+
* input failures (duplicate name, name length, `$`-prefix reservation, empty name)
|
|
32
|
+
* are returned as HTTP 409 with the reason in the response `error` field. Requires
|
|
33
|
+
* scope: allowedEvent:create
|
|
13
34
|
*/
|
|
14
35
|
create(body, options) {
|
|
15
36
|
return this._client.post('/rest/v1/allowed-events', { body, ...options });
|
|
16
37
|
}
|
|
17
38
|
/**
|
|
18
|
-
*
|
|
39
|
+
* Fetch a single allowed event by id. Returns 404 when no record matches the
|
|
40
|
+
* supplied id or it belongs to a different account. Requires scope:
|
|
41
|
+
* allowedEvent:find
|
|
19
42
|
*/
|
|
20
43
|
retrieve(id, options) {
|
|
21
44
|
return this._client.get(path `/rest/v1/allowed-events/${id}`, options);
|
|
22
45
|
}
|
|
23
46
|
/**
|
|
24
|
-
*
|
|
47
|
+
* Partially update an allowed event. Only the fields you send are changed; omitted
|
|
48
|
+
* fields keep their current value.
|
|
49
|
+
*
|
|
50
|
+
* - `destinationIds` is replaced wholesale when sent — the canonical way to add or
|
|
51
|
+
* remove a destination is to fetch, modify the array, and PATCH it back. Stale
|
|
52
|
+
* ids (deleted destinations or destinations on another account) are silently
|
|
53
|
+
* filtered out at write time.
|
|
54
|
+
* - `name` is subject to the same rules as create: case-insensitive uniqueness,
|
|
55
|
+
* length cap, `$`-prefix reservation.
|
|
56
|
+
* - `trigger` accepts `null` to clear the existing value.
|
|
57
|
+
*
|
|
58
|
+
* Returns the full entity. Known input failures (duplicate name, length,
|
|
59
|
+
* `$`-prefix, empty name) are returned as HTTP 409 with the reason in the response
|
|
60
|
+
* `error` field. Requires scope: allowedEvent:update
|
|
61
|
+
*/
|
|
62
|
+
update(id, body, options) {
|
|
63
|
+
return this._client.patch(path `/rest/v1/allowed-events/${id}`, { body, ...options });
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Delete an allowed event. After deletion, inbound events whose `event` field
|
|
67
|
+
* matches the deleted name are no longer routed and are dropped at the allow-list
|
|
68
|
+
* stage of the dispatch flow. Requires scope: allowedEvent:delete
|
|
25
69
|
*/
|
|
26
70
|
delete(id, options) {
|
|
27
71
|
return this._client.delete(path `/rest/v1/allowed-events/${id}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-events.mjs","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C
|
|
1
|
+
{"version":3,"file":"allowed-events.mjs","sourceRoot":"","sources":["../src/resources/allowed-events.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,EAAU,EACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,2BAA2B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,2BAA2B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class ConsentAnalytics extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Account-wide blocking stats from the Global Consent Center for the window: how
|
|
7
|
+
* many dispatches were attempted, how many were blocked, and a per-category
|
|
8
|
+
* breakdown of the blocks (with `percentageBlocked` = share of `totalDispatches`).
|
|
9
|
+
* Not scoped to a single consent settings record — this aggregates across every
|
|
10
|
+
* destination in the account. The endpoint is identified by query params rather
|
|
11
|
+
* than a path id because the report is account-scoped; this is a documented
|
|
12
|
+
* derived-read exception. Reuses the API-key scope `consentSettings:list` because
|
|
13
|
+
* the report crosses every consent setting. Requires scope: consentSettings:list
|
|
14
|
+
*/
|
|
15
|
+
list(query: ConsentAnalyticsListParams, options?: RequestOptions): APIPromise<ConsentAnalyticsListResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface ConsentAnalyticsListResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Per-category breakdown of blocked dispatches. `categoryName` is `Unknown` when
|
|
20
|
+
* the upstream block message could not be parsed; `percentageBlocked` is the share
|
|
21
|
+
* of `totalDispatches` blocked under that category.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<ConsentAnalyticsListResponse.Item>;
|
|
24
|
+
/**
|
|
25
|
+
* Total dispatches blocked by the Global Consent Center across all categories.
|
|
26
|
+
*/
|
|
27
|
+
totalBlocked: number;
|
|
28
|
+
/**
|
|
29
|
+
* Total dispatches attempted across all destinations for the window.
|
|
30
|
+
*/
|
|
31
|
+
totalDispatches: number;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace ConsentAnalyticsListResponse {
|
|
34
|
+
interface Item {
|
|
35
|
+
blockedCount: number;
|
|
36
|
+
categoryName: string;
|
|
37
|
+
percentageBlocked: number;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export interface ConsentAnalyticsListParams {
|
|
41
|
+
/**
|
|
42
|
+
* Inclusive lower bound of the analytics window, as a UTC calendar day in
|
|
43
|
+
* `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or
|
|
44
|
+
* fewer.
|
|
45
|
+
*/
|
|
46
|
+
from: string;
|
|
47
|
+
/**
|
|
48
|
+
* Inclusive upper bound of the analytics window, as a UTC calendar day in
|
|
49
|
+
* `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or
|
|
50
|
+
* fewer.
|
|
51
|
+
*/
|
|
52
|
+
to: string;
|
|
53
|
+
}
|
|
54
|
+
export declare namespace ConsentAnalytics {
|
|
55
|
+
export { type ConsentAnalyticsListResponse as ConsentAnalyticsListResponse, type ConsentAnalyticsListParams as ConsentAnalyticsListParams, };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=consent-analytics.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-analytics.d.mts","sourceRoot":"","sources":["../src/resources/consent-analytics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CACF,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,KAAK,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAEhD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,IAAI;QACnB,YAAY,EAAE,MAAM,CAAC;QAErB,YAAY,EAAE,MAAM,CAAC;QAErB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class ConsentAnalytics extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Account-wide blocking stats from the Global Consent Center for the window: how
|
|
7
|
+
* many dispatches were attempted, how many were blocked, and a per-category
|
|
8
|
+
* breakdown of the blocks (with `percentageBlocked` = share of `totalDispatches`).
|
|
9
|
+
* Not scoped to a single consent settings record — this aggregates across every
|
|
10
|
+
* destination in the account. The endpoint is identified by query params rather
|
|
11
|
+
* than a path id because the report is account-scoped; this is a documented
|
|
12
|
+
* derived-read exception. Reuses the API-key scope `consentSettings:list` because
|
|
13
|
+
* the report crosses every consent setting. Requires scope: consentSettings:list
|
|
14
|
+
*/
|
|
15
|
+
list(query: ConsentAnalyticsListParams, options?: RequestOptions): APIPromise<ConsentAnalyticsListResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface ConsentAnalyticsListResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Per-category breakdown of blocked dispatches. `categoryName` is `Unknown` when
|
|
20
|
+
* the upstream block message could not be parsed; `percentageBlocked` is the share
|
|
21
|
+
* of `totalDispatches` blocked under that category.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<ConsentAnalyticsListResponse.Item>;
|
|
24
|
+
/**
|
|
25
|
+
* Total dispatches blocked by the Global Consent Center across all categories.
|
|
26
|
+
*/
|
|
27
|
+
totalBlocked: number;
|
|
28
|
+
/**
|
|
29
|
+
* Total dispatches attempted across all destinations for the window.
|
|
30
|
+
*/
|
|
31
|
+
totalDispatches: number;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace ConsentAnalyticsListResponse {
|
|
34
|
+
interface Item {
|
|
35
|
+
blockedCount: number;
|
|
36
|
+
categoryName: string;
|
|
37
|
+
percentageBlocked: number;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export interface ConsentAnalyticsListParams {
|
|
41
|
+
/**
|
|
42
|
+
* Inclusive lower bound of the analytics window, as a UTC calendar day in
|
|
43
|
+
* `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or
|
|
44
|
+
* fewer.
|
|
45
|
+
*/
|
|
46
|
+
from: string;
|
|
47
|
+
/**
|
|
48
|
+
* Inclusive upper bound of the analytics window, as a UTC calendar day in
|
|
49
|
+
* `YYYY-MM-DD` format. The window between `from` and `to` must be 60 days or
|
|
50
|
+
* fewer.
|
|
51
|
+
*/
|
|
52
|
+
to: string;
|
|
53
|
+
}
|
|
54
|
+
export declare namespace ConsentAnalytics {
|
|
55
|
+
export { type ConsentAnalyticsListResponse as ConsentAnalyticsListResponse, type ConsentAnalyticsListParams as ConsentAnalyticsListParams, };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=consent-analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-analytics.d.ts","sourceRoot":"","sources":["../src/resources/consent-analytics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CACF,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,KAAK,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAEhD;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,IAAI;QACnB,YAAY,EAAE,MAAM,CAAC;QAErB,YAAY,EAAE,MAAM,CAAC;QAErB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConsentAnalytics = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class ConsentAnalytics extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Account-wide blocking stats from the Global Consent Center for the window: how
|
|
9
|
+
* many dispatches were attempted, how many were blocked, and a per-category
|
|
10
|
+
* breakdown of the blocks (with `percentageBlocked` = share of `totalDispatches`).
|
|
11
|
+
* Not scoped to a single consent settings record — this aggregates across every
|
|
12
|
+
* destination in the account. The endpoint is identified by query params rather
|
|
13
|
+
* than a path id because the report is account-scoped; this is a documented
|
|
14
|
+
* derived-read exception. Reuses the API-key scope `consentSettings:list` because
|
|
15
|
+
* the report crosses every consent setting. Requires scope: consentSettings:list
|
|
16
|
+
*/
|
|
17
|
+
list(query, options) {
|
|
18
|
+
return this._client.get('/rest/v1/consent-analytics', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ConsentAnalytics = ConsentAnalytics;
|
|
22
|
+
//# sourceMappingURL=consent-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-analytics.js","sourceRoot":"","sources":["../src/resources/consent-analytics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CACF,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAjBD,4CAiBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class ConsentAnalytics extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Account-wide blocking stats from the Global Consent Center for the window: how
|
|
6
|
+
* many dispatches were attempted, how many were blocked, and a per-category
|
|
7
|
+
* breakdown of the blocks (with `percentageBlocked` = share of `totalDispatches`).
|
|
8
|
+
* Not scoped to a single consent settings record — this aggregates across every
|
|
9
|
+
* destination in the account. The endpoint is identified by query params rather
|
|
10
|
+
* than a path id because the report is account-scoped; this is a documented
|
|
11
|
+
* derived-read exception. Reuses the API-key scope `consentSettings:list` because
|
|
12
|
+
* the report crosses every consent setting. Requires scope: consentSettings:list
|
|
13
|
+
*/
|
|
14
|
+
list(query, options) {
|
|
15
|
+
return this._client.get('/rest/v1/consent-analytics', { query, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=consent-analytics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-analytics.mjs","sourceRoot":"","sources":["../src/resources/consent-analytics.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CACF,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|