@oursprivacy/platform-sdk 1.21.0 → 1.23.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 +19 -0
- package/README.md +8 -8
- package/client.d.mts +16 -19
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -19
- package/client.d.ts.map +1 -1
- package/client.js +8 -11
- package/client.js.map +1 -1
- package/client.mjs +8 -11
- 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 +78 -5
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +78 -5
- package/resources/destinations.d.ts.map +1 -1
- package/resources/destinations.js +11 -0
- package/resources/destinations.js.map +1 -1
- package/resources/destinations.mjs +11 -0
- package/resources/destinations.mjs.map +1 -1
- package/resources/index.d.mts +6 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/mappings.d.mts +362 -16
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +362 -16
- package/resources/mappings.d.ts.map +1 -1
- package/resources/mappings.js +41 -0
- package/resources/mappings.js.map +1 -1
- package/resources/mappings.mjs +41 -0
- package/resources/mappings.mjs.map +1 -1
- package/src/client.ts +75 -60
- 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 +189 -4
- package/src/resources/index.ts +31 -22
- package/src/resources/mappings.ts +517 -15
- 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/destination-types.d.mts +0 -146
- package/resources/destination-types.d.mts.map +0 -1
- package/resources/destination-types.d.ts +0 -146
- package/resources/destination-types.d.ts.map +0 -1
- package/resources/destination-types.js +0 -28
- package/resources/destination-types.js.map +0 -1
- package/resources/destination-types.mjs +0 -24
- package/resources/destination-types.mjs.map +0 -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/resources/mapping-templates.d.mts +0 -101
- package/resources/mapping-templates.d.mts.map +0 -1
- package/resources/mapping-templates.d.ts +0 -101
- package/resources/mapping-templates.d.ts.map +0 -1
- package/resources/mapping-templates.js +0 -22
- package/resources/mapping-templates.js.map +0 -1
- package/resources/mapping-templates.mjs +0 -18
- package/resources/mapping-templates.mjs.map +0 -1
- package/src/resources/destination-types.ts +0 -373
- package/src/resources/global-dispatch-centers.ts +0 -458
- package/src/resources/mapping-templates.ts +0 -203
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class DataGovernance extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List the data-governance record(s) on this account. Each account has at most one
|
|
8
|
+
* record, so this list returns either an empty array or a single entity. Cursor
|
|
9
|
+
* pagination is exposed for consistency with other list endpoints but is rarely
|
|
10
|
+
* meaningful here. Data governance is the second stage of the dispatch flow
|
|
11
|
+
* (Source → Allowed Events → Data Governance → Mappings → Destination) — it
|
|
12
|
+
* evaluates each event against the configured category logic and stops dispatch to
|
|
13
|
+
* the destinations on any matching category. Requires scope: globalDispatch:list
|
|
14
|
+
*/
|
|
15
|
+
list(query?: DataGovernanceListParams | null | undefined, options?: RequestOptions): PagePromise<DataGovernanceListResponsesCursor, DataGovernanceListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Create the data-governance record for this account. Each account may have at
|
|
18
|
+
* most one — a second POST returns 409. Body is optional; defaults are
|
|
19
|
+
* `isEnabled: false` and no categories. Categories are added later via PATCH.
|
|
20
|
+
* Requires scope: globalDispatch:create
|
|
21
|
+
*/
|
|
22
|
+
create(body: DataGovernanceCreateParams, options?: RequestOptions): APIPromise<DataGovernanceCreateResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Fetch the data-governance record by id, including its categories (logic,
|
|
25
|
+
* destinations, priority). Returns 404 when no record matches. Requires scope:
|
|
26
|
+
* globalDispatch:find
|
|
27
|
+
*/
|
|
28
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DataGovernanceRetrieveResponse | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Partially update the data-governance record. Top-level fields (`name`, `notes`,
|
|
31
|
+
* `isEnabled`) follow the standard PATCH semantic — only the fields you send are
|
|
32
|
+
* changed.
|
|
33
|
+
*
|
|
34
|
+
* `categories` is the documented exception: when sent, it is **replaced
|
|
35
|
+
* wholesale**. There is no partial-merge for individual categories. To change one
|
|
36
|
+
* category, fetch the current record, modify the array, and PATCH it back.
|
|
37
|
+
*
|
|
38
|
+
* On write, categories are sorted ascending by the `priority` field you supplied
|
|
39
|
+
* (a sort key, not a stored value), then re-stamped `1..N` so the persisted
|
|
40
|
+
* `priority` is always sequential with no gaps. Stale `destinationIds` (deleted
|
|
41
|
+
* destinations or destinations on another account) are silently filtered out — the
|
|
42
|
+
* response echoes the filtered list, so a follow-up GET is not required to see
|
|
43
|
+
* what was saved. Requires scope: globalDispatch:update
|
|
44
|
+
*/
|
|
45
|
+
update(id: string, body: DataGovernanceUpdateParams, options?: RequestOptions): APIPromise<DataGovernanceUpdateResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Delete the data-governance record. After deletion, inbound events flow through
|
|
48
|
+
* to destinations without category-level gating. Create a new record with POST to
|
|
49
|
+
* reinstate governance. Requires scope: globalDispatch:delete
|
|
50
|
+
*/
|
|
51
|
+
delete(id: string, options?: RequestOptions): APIPromise<DataGovernanceDeleteResponse>;
|
|
52
|
+
}
|
|
53
|
+
export type DataGovernanceListResponsesCursor = Cursor<DataGovernanceListResponse>;
|
|
54
|
+
export interface DataGovernanceListResponse {
|
|
55
|
+
/**
|
|
56
|
+
* Server-assigned UUID for this data-governance record.
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
/**
|
|
60
|
+
* ISO 8601 timestamp when the record was created.
|
|
61
|
+
*/
|
|
62
|
+
createdAt: string;
|
|
63
|
+
/**
|
|
64
|
+
* When false, data governance is configured but does not gate dispatch — inbound
|
|
65
|
+
* events flow through to destinations regardless of category logic.
|
|
66
|
+
*/
|
|
67
|
+
isEnabled: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Discriminator for the entity type. Always "dataGovernance" on the REST surface.
|
|
70
|
+
* The underlying storage discriminator is "globalDispatchCenter" — REST translates
|
|
71
|
+
* it on the way out.
|
|
72
|
+
*/
|
|
73
|
+
kind: string;
|
|
74
|
+
/**
|
|
75
|
+
* Governance categories in priority order (1..N).
|
|
76
|
+
*/
|
|
77
|
+
categories?: Array<DataGovernanceListResponse.Category> | null;
|
|
78
|
+
/**
|
|
79
|
+
* Human-readable name shown in the dashboard.
|
|
80
|
+
*/
|
|
81
|
+
name?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Free-form notes for this record.
|
|
84
|
+
*/
|
|
85
|
+
notes?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
|
|
88
|
+
* record; advances on every PATCH.
|
|
89
|
+
*/
|
|
90
|
+
updatedAt?: string | null;
|
|
91
|
+
}
|
|
92
|
+
export declare namespace DataGovernanceListResponse {
|
|
93
|
+
interface Category {
|
|
94
|
+
/**
|
|
95
|
+
* Display name for the category.
|
|
96
|
+
*/
|
|
97
|
+
name: string;
|
|
98
|
+
/**
|
|
99
|
+
* 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
|
|
100
|
+
* details.
|
|
101
|
+
*/
|
|
102
|
+
priority: number;
|
|
103
|
+
/**
|
|
104
|
+
* Optional human-readable description.
|
|
105
|
+
*/
|
|
106
|
+
description?: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Destinations gated by this category when its logic evaluates to TRUE.
|
|
109
|
+
*/
|
|
110
|
+
destinationIds?: Array<string> | null;
|
|
111
|
+
/**
|
|
112
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
113
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
114
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
115
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
116
|
+
*
|
|
117
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
118
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
119
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
120
|
+
* caller-defined.
|
|
121
|
+
*
|
|
122
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
123
|
+
* category):
|
|
124
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
125
|
+
*
|
|
126
|
+
* Example combinator:
|
|
127
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
128
|
+
*/
|
|
129
|
+
logic?: Category.Logic | null;
|
|
130
|
+
}
|
|
131
|
+
namespace Category {
|
|
132
|
+
/**
|
|
133
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
134
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
135
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
136
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
137
|
+
*
|
|
138
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
139
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
140
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
141
|
+
* caller-defined.
|
|
142
|
+
*
|
|
143
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
144
|
+
* category):
|
|
145
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
146
|
+
*
|
|
147
|
+
* Example combinator:
|
|
148
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
149
|
+
*/
|
|
150
|
+
interface Logic {
|
|
151
|
+
/**
|
|
152
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
153
|
+
* or combinator).
|
|
154
|
+
*/
|
|
155
|
+
AND?: Array<unknown> | null;
|
|
156
|
+
condition?: Logic.Condition;
|
|
157
|
+
/**
|
|
158
|
+
* Negates a single child logic node.
|
|
159
|
+
*/
|
|
160
|
+
NOT?: unknown;
|
|
161
|
+
/**
|
|
162
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
163
|
+
* or combinator).
|
|
164
|
+
*/
|
|
165
|
+
OR?: Array<unknown> | null;
|
|
166
|
+
}
|
|
167
|
+
namespace Logic {
|
|
168
|
+
interface Condition {
|
|
169
|
+
/**
|
|
170
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
171
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
172
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
173
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
174
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
175
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
176
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
177
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
178
|
+
*/
|
|
179
|
+
operator: 'Is' | 'IsNot' | 'Contains' | 'DoesNotContain' | 'StartsWith' | 'EndsWith' | 'IsFalsy' | 'IsTruthy' | 'IsNull' | 'IsNotNull' | 'IsUndefined' | 'IsNotUndefined' | 'IsGreaterThan' | 'IsGreaterThanOrEqual' | 'IsLessThan' | 'IsLessThanOrEqual' | 'IsIn' | 'IsNotIn' | 'IsFoundIn' | 'IsNotFoundIn' | 'IsTrue' | 'IsFalse' | 'IsBefore' | 'IsAfter' | 'IsBetween' | 'IsOnOrBefore' | 'IsOnOrAfter' | 'MatchesRegex' | 'MatchesRegexIgnoreCase' | 'DoesNotMatchRegex' | 'DoesNotMatchRegexIgnoreCase';
|
|
180
|
+
/**
|
|
181
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
182
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
183
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
184
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
185
|
+
* and would be compared as a literal string.
|
|
186
|
+
*/
|
|
187
|
+
property: string;
|
|
188
|
+
/**
|
|
189
|
+
* String compared against the resolved property. Operators that take no value
|
|
190
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
191
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
192
|
+
*/
|
|
193
|
+
value: string;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
export interface DataGovernanceCreateResponse {
|
|
199
|
+
/**
|
|
200
|
+
* Server-assigned UUID for this data-governance record.
|
|
201
|
+
*/
|
|
202
|
+
id: string;
|
|
203
|
+
/**
|
|
204
|
+
* ISO 8601 timestamp when the record was created.
|
|
205
|
+
*/
|
|
206
|
+
createdAt: string;
|
|
207
|
+
/**
|
|
208
|
+
* When false, data governance is configured but does not gate dispatch — inbound
|
|
209
|
+
* events flow through to destinations regardless of category logic.
|
|
210
|
+
*/
|
|
211
|
+
isEnabled: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Discriminator for the entity type. Always "dataGovernance" on the REST surface.
|
|
214
|
+
* The underlying storage discriminator is "globalDispatchCenter" — REST translates
|
|
215
|
+
* it on the way out.
|
|
216
|
+
*/
|
|
217
|
+
kind: string;
|
|
218
|
+
/**
|
|
219
|
+
* Governance categories in priority order (1..N).
|
|
220
|
+
*/
|
|
221
|
+
categories?: Array<DataGovernanceCreateResponse.Category> | null;
|
|
222
|
+
/**
|
|
223
|
+
* Human-readable name shown in the dashboard.
|
|
224
|
+
*/
|
|
225
|
+
name?: string | null;
|
|
226
|
+
/**
|
|
227
|
+
* Free-form notes for this record.
|
|
228
|
+
*/
|
|
229
|
+
notes?: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
|
|
232
|
+
* record; advances on every PATCH.
|
|
233
|
+
*/
|
|
234
|
+
updatedAt?: string | null;
|
|
235
|
+
}
|
|
236
|
+
export declare namespace DataGovernanceCreateResponse {
|
|
237
|
+
interface Category {
|
|
238
|
+
/**
|
|
239
|
+
* Display name for the category.
|
|
240
|
+
*/
|
|
241
|
+
name: string;
|
|
242
|
+
/**
|
|
243
|
+
* 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
|
|
244
|
+
* details.
|
|
245
|
+
*/
|
|
246
|
+
priority: number;
|
|
247
|
+
/**
|
|
248
|
+
* Optional human-readable description.
|
|
249
|
+
*/
|
|
250
|
+
description?: string | null;
|
|
251
|
+
/**
|
|
252
|
+
* Destinations gated by this category when its logic evaluates to TRUE.
|
|
253
|
+
*/
|
|
254
|
+
destinationIds?: Array<string> | null;
|
|
255
|
+
/**
|
|
256
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
257
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
258
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
259
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
260
|
+
*
|
|
261
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
262
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
263
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
264
|
+
* caller-defined.
|
|
265
|
+
*
|
|
266
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
267
|
+
* category):
|
|
268
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
269
|
+
*
|
|
270
|
+
* Example combinator:
|
|
271
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
272
|
+
*/
|
|
273
|
+
logic?: Category.Logic | null;
|
|
274
|
+
}
|
|
275
|
+
namespace Category {
|
|
276
|
+
/**
|
|
277
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
278
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
279
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
280
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
281
|
+
*
|
|
282
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
283
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
284
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
285
|
+
* caller-defined.
|
|
286
|
+
*
|
|
287
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
288
|
+
* category):
|
|
289
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
290
|
+
*
|
|
291
|
+
* Example combinator:
|
|
292
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
293
|
+
*/
|
|
294
|
+
interface Logic {
|
|
295
|
+
/**
|
|
296
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
297
|
+
* or combinator).
|
|
298
|
+
*/
|
|
299
|
+
AND?: Array<unknown> | null;
|
|
300
|
+
condition?: Logic.Condition;
|
|
301
|
+
/**
|
|
302
|
+
* Negates a single child logic node.
|
|
303
|
+
*/
|
|
304
|
+
NOT?: unknown;
|
|
305
|
+
/**
|
|
306
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
307
|
+
* or combinator).
|
|
308
|
+
*/
|
|
309
|
+
OR?: Array<unknown> | null;
|
|
310
|
+
}
|
|
311
|
+
namespace Logic {
|
|
312
|
+
interface Condition {
|
|
313
|
+
/**
|
|
314
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
315
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
316
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
317
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
318
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
319
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
320
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
321
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
322
|
+
*/
|
|
323
|
+
operator: 'Is' | 'IsNot' | 'Contains' | 'DoesNotContain' | 'StartsWith' | 'EndsWith' | 'IsFalsy' | 'IsTruthy' | 'IsNull' | 'IsNotNull' | 'IsUndefined' | 'IsNotUndefined' | 'IsGreaterThan' | 'IsGreaterThanOrEqual' | 'IsLessThan' | 'IsLessThanOrEqual' | 'IsIn' | 'IsNotIn' | 'IsFoundIn' | 'IsNotFoundIn' | 'IsTrue' | 'IsFalse' | 'IsBefore' | 'IsAfter' | 'IsBetween' | 'IsOnOrBefore' | 'IsOnOrAfter' | 'MatchesRegex' | 'MatchesRegexIgnoreCase' | 'DoesNotMatchRegex' | 'DoesNotMatchRegexIgnoreCase';
|
|
324
|
+
/**
|
|
325
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
326
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
327
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
328
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
329
|
+
* and would be compared as a literal string.
|
|
330
|
+
*/
|
|
331
|
+
property: string;
|
|
332
|
+
/**
|
|
333
|
+
* String compared against the resolved property. Operators that take no value
|
|
334
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
335
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
336
|
+
*/
|
|
337
|
+
value: string;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
export interface DataGovernanceRetrieveResponse {
|
|
343
|
+
/**
|
|
344
|
+
* Server-assigned UUID for this data-governance record.
|
|
345
|
+
*/
|
|
346
|
+
id: string;
|
|
347
|
+
/**
|
|
348
|
+
* ISO 8601 timestamp when the record was created.
|
|
349
|
+
*/
|
|
350
|
+
createdAt: string;
|
|
351
|
+
/**
|
|
352
|
+
* When false, data governance is configured but does not gate dispatch — inbound
|
|
353
|
+
* events flow through to destinations regardless of category logic.
|
|
354
|
+
*/
|
|
355
|
+
isEnabled: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Discriminator for the entity type. Always "dataGovernance" on the REST surface.
|
|
358
|
+
* The underlying storage discriminator is "globalDispatchCenter" — REST translates
|
|
359
|
+
* it on the way out.
|
|
360
|
+
*/
|
|
361
|
+
kind: string;
|
|
362
|
+
/**
|
|
363
|
+
* Governance categories in priority order (1..N).
|
|
364
|
+
*/
|
|
365
|
+
categories?: Array<DataGovernanceRetrieveResponse.Category> | null;
|
|
366
|
+
/**
|
|
367
|
+
* Human-readable name shown in the dashboard.
|
|
368
|
+
*/
|
|
369
|
+
name?: string | null;
|
|
370
|
+
/**
|
|
371
|
+
* Free-form notes for this record.
|
|
372
|
+
*/
|
|
373
|
+
notes?: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
|
|
376
|
+
* record; advances on every PATCH.
|
|
377
|
+
*/
|
|
378
|
+
updatedAt?: string | null;
|
|
379
|
+
}
|
|
380
|
+
export declare namespace DataGovernanceRetrieveResponse {
|
|
381
|
+
interface Category {
|
|
382
|
+
/**
|
|
383
|
+
* Display name for the category.
|
|
384
|
+
*/
|
|
385
|
+
name: string;
|
|
386
|
+
/**
|
|
387
|
+
* 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
|
|
388
|
+
* details.
|
|
389
|
+
*/
|
|
390
|
+
priority: number;
|
|
391
|
+
/**
|
|
392
|
+
* Optional human-readable description.
|
|
393
|
+
*/
|
|
394
|
+
description?: string | null;
|
|
395
|
+
/**
|
|
396
|
+
* Destinations gated by this category when its logic evaluates to TRUE.
|
|
397
|
+
*/
|
|
398
|
+
destinationIds?: Array<string> | null;
|
|
399
|
+
/**
|
|
400
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
401
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
402
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
403
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
404
|
+
*
|
|
405
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
406
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
407
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
408
|
+
* caller-defined.
|
|
409
|
+
*
|
|
410
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
411
|
+
* category):
|
|
412
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
413
|
+
*
|
|
414
|
+
* Example combinator:
|
|
415
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
416
|
+
*/
|
|
417
|
+
logic?: Category.Logic | null;
|
|
418
|
+
}
|
|
419
|
+
namespace Category {
|
|
420
|
+
/**
|
|
421
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
422
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
423
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
424
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
425
|
+
*
|
|
426
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
427
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
428
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
429
|
+
* caller-defined.
|
|
430
|
+
*
|
|
431
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
432
|
+
* category):
|
|
433
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
434
|
+
*
|
|
435
|
+
* Example combinator:
|
|
436
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
437
|
+
*/
|
|
438
|
+
interface Logic {
|
|
439
|
+
/**
|
|
440
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
441
|
+
* or combinator).
|
|
442
|
+
*/
|
|
443
|
+
AND?: Array<unknown> | null;
|
|
444
|
+
condition?: Logic.Condition;
|
|
445
|
+
/**
|
|
446
|
+
* Negates a single child logic node.
|
|
447
|
+
*/
|
|
448
|
+
NOT?: unknown;
|
|
449
|
+
/**
|
|
450
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
451
|
+
* or combinator).
|
|
452
|
+
*/
|
|
453
|
+
OR?: Array<unknown> | null;
|
|
454
|
+
}
|
|
455
|
+
namespace Logic {
|
|
456
|
+
interface Condition {
|
|
457
|
+
/**
|
|
458
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
459
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
460
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
461
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
462
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
463
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
464
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
465
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
466
|
+
*/
|
|
467
|
+
operator: 'Is' | 'IsNot' | 'Contains' | 'DoesNotContain' | 'StartsWith' | 'EndsWith' | 'IsFalsy' | 'IsTruthy' | 'IsNull' | 'IsNotNull' | 'IsUndefined' | 'IsNotUndefined' | 'IsGreaterThan' | 'IsGreaterThanOrEqual' | 'IsLessThan' | 'IsLessThanOrEqual' | 'IsIn' | 'IsNotIn' | 'IsFoundIn' | 'IsNotFoundIn' | 'IsTrue' | 'IsFalse' | 'IsBefore' | 'IsAfter' | 'IsBetween' | 'IsOnOrBefore' | 'IsOnOrAfter' | 'MatchesRegex' | 'MatchesRegexIgnoreCase' | 'DoesNotMatchRegex' | 'DoesNotMatchRegexIgnoreCase';
|
|
468
|
+
/**
|
|
469
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
470
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
471
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
472
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
473
|
+
* and would be compared as a literal string.
|
|
474
|
+
*/
|
|
475
|
+
property: string;
|
|
476
|
+
/**
|
|
477
|
+
* String compared against the resolved property. Operators that take no value
|
|
478
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
479
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
480
|
+
*/
|
|
481
|
+
value: string;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
export interface DataGovernanceUpdateResponse {
|
|
487
|
+
/**
|
|
488
|
+
* Server-assigned UUID for this data-governance record.
|
|
489
|
+
*/
|
|
490
|
+
id: string;
|
|
491
|
+
/**
|
|
492
|
+
* ISO 8601 timestamp when the record was created.
|
|
493
|
+
*/
|
|
494
|
+
createdAt: string;
|
|
495
|
+
/**
|
|
496
|
+
* When false, data governance is configured but does not gate dispatch — inbound
|
|
497
|
+
* events flow through to destinations regardless of category logic.
|
|
498
|
+
*/
|
|
499
|
+
isEnabled: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Discriminator for the entity type. Always "dataGovernance" on the REST surface.
|
|
502
|
+
* The underlying storage discriminator is "globalDispatchCenter" — REST translates
|
|
503
|
+
* it on the way out.
|
|
504
|
+
*/
|
|
505
|
+
kind: string;
|
|
506
|
+
/**
|
|
507
|
+
* Governance categories in priority order (1..N).
|
|
508
|
+
*/
|
|
509
|
+
categories?: Array<DataGovernanceUpdateResponse.Category> | null;
|
|
510
|
+
/**
|
|
511
|
+
* Human-readable name shown in the dashboard.
|
|
512
|
+
*/
|
|
513
|
+
name?: string | null;
|
|
514
|
+
/**
|
|
515
|
+
* Free-form notes for this record.
|
|
516
|
+
*/
|
|
517
|
+
notes?: string | null;
|
|
518
|
+
/**
|
|
519
|
+
* ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
|
|
520
|
+
* record; advances on every PATCH.
|
|
521
|
+
*/
|
|
522
|
+
updatedAt?: string | null;
|
|
523
|
+
}
|
|
524
|
+
export declare namespace DataGovernanceUpdateResponse {
|
|
525
|
+
interface Category {
|
|
526
|
+
/**
|
|
527
|
+
* Display name for the category.
|
|
528
|
+
*/
|
|
529
|
+
name: string;
|
|
530
|
+
/**
|
|
531
|
+
* 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
|
|
532
|
+
* details.
|
|
533
|
+
*/
|
|
534
|
+
priority: number;
|
|
535
|
+
/**
|
|
536
|
+
* Optional human-readable description.
|
|
537
|
+
*/
|
|
538
|
+
description?: string | null;
|
|
539
|
+
/**
|
|
540
|
+
* Destinations gated by this category when its logic evaluates to TRUE.
|
|
541
|
+
*/
|
|
542
|
+
destinationIds?: Array<string> | null;
|
|
543
|
+
/**
|
|
544
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
545
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
546
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
547
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
548
|
+
*
|
|
549
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
550
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
551
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
552
|
+
* caller-defined.
|
|
553
|
+
*
|
|
554
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
555
|
+
* category):
|
|
556
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
557
|
+
*
|
|
558
|
+
* Example combinator:
|
|
559
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
560
|
+
*/
|
|
561
|
+
logic?: Category.Logic | null;
|
|
562
|
+
}
|
|
563
|
+
namespace Category {
|
|
564
|
+
/**
|
|
565
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
566
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
567
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
568
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
569
|
+
*
|
|
570
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
571
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
572
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
573
|
+
* caller-defined.
|
|
574
|
+
*
|
|
575
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
576
|
+
* category):
|
|
577
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
578
|
+
*
|
|
579
|
+
* Example combinator:
|
|
580
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
581
|
+
*/
|
|
582
|
+
interface Logic {
|
|
583
|
+
/**
|
|
584
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
585
|
+
* or combinator).
|
|
586
|
+
*/
|
|
587
|
+
AND?: Array<unknown> | null;
|
|
588
|
+
condition?: Logic.Condition;
|
|
589
|
+
/**
|
|
590
|
+
* Negates a single child logic node.
|
|
591
|
+
*/
|
|
592
|
+
NOT?: unknown;
|
|
593
|
+
/**
|
|
594
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
595
|
+
* or combinator).
|
|
596
|
+
*/
|
|
597
|
+
OR?: Array<unknown> | null;
|
|
598
|
+
}
|
|
599
|
+
namespace Logic {
|
|
600
|
+
interface Condition {
|
|
601
|
+
/**
|
|
602
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
603
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
604
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
605
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
606
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
607
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
608
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
609
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
610
|
+
*/
|
|
611
|
+
operator: 'Is' | 'IsNot' | 'Contains' | 'DoesNotContain' | 'StartsWith' | 'EndsWith' | 'IsFalsy' | 'IsTruthy' | 'IsNull' | 'IsNotNull' | 'IsUndefined' | 'IsNotUndefined' | 'IsGreaterThan' | 'IsGreaterThanOrEqual' | 'IsLessThan' | 'IsLessThanOrEqual' | 'IsIn' | 'IsNotIn' | 'IsFoundIn' | 'IsNotFoundIn' | 'IsTrue' | 'IsFalse' | 'IsBefore' | 'IsAfter' | 'IsBetween' | 'IsOnOrBefore' | 'IsOnOrAfter' | 'MatchesRegex' | 'MatchesRegexIgnoreCase' | 'DoesNotMatchRegex' | 'DoesNotMatchRegexIgnoreCase';
|
|
612
|
+
/**
|
|
613
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
614
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
615
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
616
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
617
|
+
* and would be compared as a literal string.
|
|
618
|
+
*/
|
|
619
|
+
property: string;
|
|
620
|
+
/**
|
|
621
|
+
* String compared against the resolved property. Operators that take no value
|
|
622
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
623
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
624
|
+
*/
|
|
625
|
+
value: string;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
export interface DataGovernanceDeleteResponse {
|
|
631
|
+
/**
|
|
632
|
+
* The id of the data-governance record that was deleted.
|
|
633
|
+
*/
|
|
634
|
+
id: string;
|
|
635
|
+
/**
|
|
636
|
+
* True when the underlying mutation succeeded; the entity is gone.
|
|
637
|
+
*/
|
|
638
|
+
deleted: boolean;
|
|
639
|
+
}
|
|
640
|
+
export interface DataGovernanceListParams extends CursorParams {
|
|
641
|
+
}
|
|
642
|
+
export interface DataGovernanceCreateParams {
|
|
643
|
+
/**
|
|
644
|
+
* Whether the record starts enabled. Defaults to false — opt in by setting true
|
|
645
|
+
* here or via PATCH later. When disabled, every category is bypassed and inbound
|
|
646
|
+
* events flow through to destinations regardless of consent state.
|
|
647
|
+
*/
|
|
648
|
+
isEnabled?: boolean | null;
|
|
649
|
+
/**
|
|
650
|
+
* Display name for the new record. Defaults to "Data Governance".
|
|
651
|
+
*/
|
|
652
|
+
name?: string | null;
|
|
653
|
+
/**
|
|
654
|
+
* Free-form notes shown in the dashboard. Not used for routing.
|
|
655
|
+
*/
|
|
656
|
+
notes?: string | null;
|
|
657
|
+
}
|
|
658
|
+
export interface DataGovernanceUpdateParams {
|
|
659
|
+
/**
|
|
660
|
+
* Full replacement of the categories list. The sent array becomes the new state —
|
|
661
|
+
* there is no partial-merge semantic for categories. Categories are sorted by
|
|
662
|
+
* priority on write and re-stamped 1..N. Omit to leave existing categories
|
|
663
|
+
* untouched.
|
|
664
|
+
*/
|
|
665
|
+
categories?: Array<DataGovernanceUpdateParams.Category> | null;
|
|
666
|
+
/**
|
|
667
|
+
* Toggle data governance on/off without changing any other config.
|
|
668
|
+
*/
|
|
669
|
+
isEnabled?: boolean | null;
|
|
670
|
+
/**
|
|
671
|
+
* New display name for the record.
|
|
672
|
+
*/
|
|
673
|
+
name?: string | null;
|
|
674
|
+
/**
|
|
675
|
+
* Replace the free-form notes.
|
|
676
|
+
*/
|
|
677
|
+
notes?: string | null;
|
|
678
|
+
}
|
|
679
|
+
export declare namespace DataGovernanceUpdateParams {
|
|
680
|
+
interface Category {
|
|
681
|
+
/**
|
|
682
|
+
* Optional human-readable description shown in the dashboard.
|
|
683
|
+
*/
|
|
684
|
+
description?: string | null;
|
|
685
|
+
/**
|
|
686
|
+
* Destinations gated by this category. When the category logic evaluates to TRUE
|
|
687
|
+
* for an inbound event, dispatch to every destination on this list is stopped.
|
|
688
|
+
* Stale IDs (deleted destinations or destinations on another account) are silently
|
|
689
|
+
* filtered out at write time.
|
|
690
|
+
*/
|
|
691
|
+
destinationIds?: Array<string> | null;
|
|
692
|
+
/**
|
|
693
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
694
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
695
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
696
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
697
|
+
*
|
|
698
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
699
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
700
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
701
|
+
* caller-defined.
|
|
702
|
+
*
|
|
703
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
704
|
+
* category):
|
|
705
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
706
|
+
*
|
|
707
|
+
* Example combinator:
|
|
708
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
709
|
+
*/
|
|
710
|
+
logic?: Category.Logic | null;
|
|
711
|
+
/**
|
|
712
|
+
* Display name for the category. Auto-generated if omitted.
|
|
713
|
+
*/
|
|
714
|
+
name?: string | null;
|
|
715
|
+
/**
|
|
716
|
+
* Used as a sort key on write. The server sorts categories by this value
|
|
717
|
+
* (ascending), then re-stamps priority as (sorted index + 1) on persist. Send any
|
|
718
|
+
* positive number — gaps are ironed out, duplicate values keep input order via
|
|
719
|
+
* stable sort. Omit to fall to the end.
|
|
720
|
+
*/
|
|
721
|
+
priority?: number | null;
|
|
722
|
+
}
|
|
723
|
+
namespace Category {
|
|
724
|
+
/**
|
|
725
|
+
* Condition tree evaluated against each inbound event. Write conditions that
|
|
726
|
+
* evaluate **TRUE for events you want to STOP**. A node is either a leaf
|
|
727
|
+
* `condition` or a combinator (`AND`, `OR`, `NOT`); combinator children are
|
|
728
|
+
* themselves logic nodes, so trees nest arbitrarily.
|
|
729
|
+
*
|
|
730
|
+
* Discovery: `GET /rest/v1/mappings/default-variables` lists the canonical
|
|
731
|
+
* platform-provided `property` paths (visitor consent arrays, event fields,
|
|
732
|
+
* request context, identity fields). Custom `event.event_properties.*` paths are
|
|
733
|
+
* caller-defined.
|
|
734
|
+
*
|
|
735
|
+
* Example leaf (stop dispatch when the visitor rejected the `advertising` consent
|
|
736
|
+
* category):
|
|
737
|
+
* `{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }`.
|
|
738
|
+
*
|
|
739
|
+
* Example combinator:
|
|
740
|
+
* `{ "AND": [{ "condition": { "property": "visitor.consent.rejected_categories", "operator": "Contains", "value": "advertising" } }, { "OR": [/* nested logic nodes * /] }] }`.
|
|
741
|
+
*/
|
|
742
|
+
interface Logic {
|
|
743
|
+
/**
|
|
744
|
+
* All child nodes must match. Each child is itself a logic node (leaf `condition`
|
|
745
|
+
* or combinator).
|
|
746
|
+
*/
|
|
747
|
+
AND?: Array<unknown> | null;
|
|
748
|
+
condition?: Logic.Condition;
|
|
749
|
+
/**
|
|
750
|
+
* Negates a single child logic node.
|
|
751
|
+
*/
|
|
752
|
+
NOT?: unknown;
|
|
753
|
+
/**
|
|
754
|
+
* Any child node must match. Each child is itself a logic node (leaf `condition`
|
|
755
|
+
* or combinator).
|
|
756
|
+
*/
|
|
757
|
+
OR?: Array<unknown> | null;
|
|
758
|
+
}
|
|
759
|
+
namespace Logic {
|
|
760
|
+
interface Condition {
|
|
761
|
+
/**
|
|
762
|
+
* Comparison verb in PascalCase. Equality/text: `Is`, `IsNot`, `Contains`,
|
|
763
|
+
* `DoesNotContain`, `StartsWith`, `EndsWith`. Truthiness/nullability: `IsFalsy`,
|
|
764
|
+
* `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`, `IsTrue`,
|
|
765
|
+
* `IsFalse`. Numeric: `IsGreaterThan`, `IsGreaterThanOrEqual`, `IsLessThan`,
|
|
766
|
+
* `IsLessThanOrEqual`. Set membership: `IsIn`, `IsNotIn`, `IsFoundIn`,
|
|
767
|
+
* `IsNotFoundIn`. Date: `IsBefore`, `IsAfter`, `IsBetween`, `IsOnOrBefore`,
|
|
768
|
+
* `IsOnOrAfter`. Regex: `MatchesRegex`, `MatchesRegexIgnoreCase`,
|
|
769
|
+
* `DoesNotMatchRegex`, `DoesNotMatchRegexIgnoreCase`.
|
|
770
|
+
*/
|
|
771
|
+
operator: 'Is' | 'IsNot' | 'Contains' | 'DoesNotContain' | 'StartsWith' | 'EndsWith' | 'IsFalsy' | 'IsTruthy' | 'IsNull' | 'IsNotNull' | 'IsUndefined' | 'IsNotUndefined' | 'IsGreaterThan' | 'IsGreaterThanOrEqual' | 'IsLessThan' | 'IsLessThanOrEqual' | 'IsIn' | 'IsNotIn' | 'IsFoundIn' | 'IsNotFoundIn' | 'IsTrue' | 'IsFalse' | 'IsBefore' | 'IsAfter' | 'IsBetween' | 'IsOnOrBefore' | 'IsOnOrAfter' | 'MatchesRegex' | 'MatchesRegexIgnoreCase' | 'DoesNotMatchRegex' | 'DoesNotMatchRegexIgnoreCase';
|
|
772
|
+
/**
|
|
773
|
+
* Bare dotted path into the event/visitor record. Examples: `$event.event`,
|
|
774
|
+
* `$event.event_properties.value`, `visitor.consent.marketing`. The leading `$` is
|
|
775
|
+
* optional and stripped before lookup. Do **not** use `{{...}}` here — that
|
|
776
|
+
* template syntax is for mapping values (`mappings[].map`), not logic conditions,
|
|
777
|
+
* and would be compared as a literal string.
|
|
778
|
+
*/
|
|
779
|
+
property: string;
|
|
780
|
+
/**
|
|
781
|
+
* String compared against the resolved property. Operators that take no value
|
|
782
|
+
* (`IsFalsy`, `IsTruthy`, `IsNull`, `IsNotNull`, `IsUndefined`, `IsNotUndefined`,
|
|
783
|
+
* `IsTrue`, `IsFalse`) ignore this field — send `""`.
|
|
784
|
+
*/
|
|
785
|
+
value: string;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
export declare namespace DataGovernance {
|
|
791
|
+
export { type DataGovernanceListResponse as DataGovernanceListResponse, type DataGovernanceCreateResponse as DataGovernanceCreateResponse, type DataGovernanceRetrieveResponse as DataGovernanceRetrieveResponse, type DataGovernanceUpdateResponse as DataGovernanceUpdateResponse, type DataGovernanceDeleteResponse as DataGovernanceDeleteResponse, type DataGovernanceListResponsesCursor as DataGovernanceListResponsesCursor, type DataGovernanceListParams as DataGovernanceListParams, type DataGovernanceCreateParams as DataGovernanceCreateParams, type DataGovernanceUpdateParams as DataGovernanceUpdateParams, };
|
|
792
|
+
}
|
|
793
|
+
//# sourceMappingURL=data-governance.d.mts.map
|