@oursprivacy/platform-sdk 1.20.0 → 1.21.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.
Files changed (176) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +8 -2
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +8 -2
  11. package/client.d.ts.map +1 -1
  12. package/client.js +6 -0
  13. package/client.js.map +1 -1
  14. package/client.mjs +6 -0
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/pagination.d.mts.map +1 -1
  21. package/core/pagination.d.ts.map +1 -1
  22. package/core/pagination.mjs.map +1 -1
  23. package/core/resource.d.mts.map +1 -1
  24. package/core/resource.d.ts.map +1 -1
  25. package/core/uploads.d.mts.map +1 -1
  26. package/core/uploads.d.ts.map +1 -1
  27. package/core/uploads.mjs.map +1 -1
  28. package/error.d.mts +1 -0
  29. package/error.d.mts.map +1 -1
  30. package/error.d.ts +1 -0
  31. package/error.d.ts.map +1 -1
  32. package/error.mjs +1 -0
  33. package/error.mjs.map +1 -1
  34. package/index.d.mts.map +1 -1
  35. package/index.d.ts.map +1 -1
  36. package/index.mjs.map +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/headers.mjs.map +1 -1
  39. package/internal/parse.d.mts.map +1 -1
  40. package/internal/parse.d.ts.map +1 -1
  41. package/internal/parse.mjs.map +1 -1
  42. package/internal/request-options.d.mts.map +1 -1
  43. package/internal/request-options.d.ts.map +1 -1
  44. package/internal/shims.d.mts +6 -0
  45. package/internal/shims.d.mts.map +1 -1
  46. package/internal/shims.d.ts +6 -0
  47. package/internal/shims.d.ts.map +1 -1
  48. package/internal/to-file.d.mts.map +1 -1
  49. package/internal/to-file.d.ts.map +1 -1
  50. package/internal/to-file.mjs.map +1 -1
  51. package/internal/types.d.mts +4 -4
  52. package/internal/types.d.mts.map +1 -1
  53. package/internal/types.d.ts +4 -4
  54. package/internal/types.d.ts.map +1 -1
  55. package/internal/uploads.d.mts.map +1 -1
  56. package/internal/uploads.d.ts.map +1 -1
  57. package/internal/uploads.mjs.map +1 -1
  58. package/internal/utils/base64.mjs.map +1 -1
  59. package/internal/utils/log.d.mts.map +1 -1
  60. package/internal/utils/log.d.ts.map +1 -1
  61. package/internal/utils/log.mjs.map +1 -1
  62. package/internal/utils/path.mjs.map +1 -1
  63. package/internal/utils/query.mjs.map +1 -1
  64. package/internal/utils/values.mjs.map +1 -1
  65. package/internal/utils.d.mts.map +1 -1
  66. package/internal/utils.d.ts.map +1 -1
  67. package/internal/utils.mjs.map +1 -1
  68. package/package.json +1 -1
  69. package/pagination.d.mts +1 -0
  70. package/pagination.d.mts.map +1 -1
  71. package/pagination.d.ts +1 -0
  72. package/pagination.d.ts.map +1 -1
  73. package/pagination.mjs +1 -0
  74. package/pagination.mjs.map +1 -1
  75. package/resource.d.mts +1 -0
  76. package/resource.d.mts.map +1 -1
  77. package/resource.d.ts +1 -0
  78. package/resource.d.ts.map +1 -1
  79. package/resource.mjs +1 -0
  80. package/resource.mjs.map +1 -1
  81. package/resources/allowed-events.d.mts.map +1 -1
  82. package/resources/allowed-events.d.ts.map +1 -1
  83. package/resources/allowed-events.mjs.map +1 -1
  84. package/resources/consent-settings.d.mts.map +1 -1
  85. package/resources/consent-settings.d.ts.map +1 -1
  86. package/resources/consent-settings.mjs.map +1 -1
  87. package/resources/default-mappings.d.mts +140 -0
  88. package/resources/default-mappings.d.mts.map +1 -0
  89. package/resources/default-mappings.d.ts +140 -0
  90. package/resources/default-mappings.d.ts.map +1 -0
  91. package/resources/default-mappings.js +38 -0
  92. package/resources/default-mappings.js.map +1 -0
  93. package/resources/default-mappings.mjs +34 -0
  94. package/resources/default-mappings.mjs.map +1 -0
  95. package/resources/destination-types.d.mts.map +1 -1
  96. package/resources/destination-types.d.ts.map +1 -1
  97. package/resources/destination-types.mjs.map +1 -1
  98. package/resources/destinations.d.mts.map +1 -1
  99. package/resources/destinations.d.ts.map +1 -1
  100. package/resources/destinations.mjs.map +1 -1
  101. package/resources/experiment-settings.d.mts.map +1 -1
  102. package/resources/experiment-settings.d.ts.map +1 -1
  103. package/resources/experiment-settings.mjs.map +1 -1
  104. package/resources/experiment-variants.d.mts.map +1 -1
  105. package/resources/experiment-variants.d.ts.map +1 -1
  106. package/resources/experiment-variants.mjs.map +1 -1
  107. package/resources/experiments.d.mts.map +1 -1
  108. package/resources/experiments.d.ts.map +1 -1
  109. package/resources/experiments.mjs.map +1 -1
  110. package/resources/global-dispatch-centers.d.mts.map +1 -1
  111. package/resources/global-dispatch-centers.d.ts.map +1 -1
  112. package/resources/global-dispatch-centers.mjs.map +1 -1
  113. package/resources/heatmap-pages.d.mts.map +1 -1
  114. package/resources/heatmap-pages.d.ts.map +1 -1
  115. package/resources/heatmap-pages.mjs.map +1 -1
  116. package/resources/index.d.mts +3 -1
  117. package/resources/index.d.mts.map +1 -1
  118. package/resources/index.d.ts +3 -1
  119. package/resources/index.d.ts.map +1 -1
  120. package/resources/index.js +5 -1
  121. package/resources/index.js.map +1 -1
  122. package/resources/index.mjs +2 -0
  123. package/resources/index.mjs.map +1 -1
  124. package/resources/locations.d.mts.map +1 -1
  125. package/resources/locations.d.ts.map +1 -1
  126. package/resources/locations.mjs.map +1 -1
  127. package/resources/mapping-templates.d.mts +101 -0
  128. package/resources/mapping-templates.d.mts.map +1 -0
  129. package/resources/mapping-templates.d.ts +101 -0
  130. package/resources/mapping-templates.d.ts.map +1 -0
  131. package/resources/mapping-templates.js +22 -0
  132. package/resources/mapping-templates.js.map +1 -0
  133. package/resources/mapping-templates.mjs +18 -0
  134. package/resources/mapping-templates.mjs.map +1 -0
  135. package/resources/mappings.d.mts +186 -6
  136. package/resources/mappings.d.mts.map +1 -1
  137. package/resources/mappings.d.ts +186 -6
  138. package/resources/mappings.d.ts.map +1 -1
  139. package/resources/mappings.js +26 -3
  140. package/resources/mappings.js.map +1 -1
  141. package/resources/mappings.mjs +26 -3
  142. package/resources/mappings.mjs.map +1 -1
  143. package/resources/replay-settings.d.mts.map +1 -1
  144. package/resources/replay-settings.d.ts.map +1 -1
  145. package/resources/replay-settings.mjs.map +1 -1
  146. package/resources/sources.d.mts.map +1 -1
  147. package/resources/sources.d.ts.map +1 -1
  148. package/resources/sources.mjs.map +1 -1
  149. package/resources/versions.d.mts.map +1 -1
  150. package/resources/versions.d.ts.map +1 -1
  151. package/resources/versions.mjs.map +1 -1
  152. package/resources/web-scanner-rules.d.mts.map +1 -1
  153. package/resources/web-scanner-rules.d.ts.map +1 -1
  154. package/resources/web-scanner-rules.mjs.map +1 -1
  155. package/resources/web-scanners.d.mts.map +1 -1
  156. package/resources/web-scanners.d.ts.map +1 -1
  157. package/resources/web-scanners.mjs.map +1 -1
  158. package/resources.d.mts.map +1 -1
  159. package/resources.d.ts.map +1 -1
  160. package/resources.mjs.map +1 -1
  161. package/src/client.ts +34 -0
  162. package/src/resources/default-mappings.ts +332 -0
  163. package/src/resources/index.ts +14 -0
  164. package/src/resources/mapping-templates.ts +203 -0
  165. package/src/resources/mappings.ts +320 -5
  166. package/src/version.ts +1 -1
  167. package/uploads.d.mts +1 -0
  168. package/uploads.d.mts.map +1 -1
  169. package/uploads.d.ts +1 -0
  170. package/uploads.d.ts.map +1 -1
  171. package/uploads.mjs +1 -0
  172. package/uploads.mjs.map +1 -1
  173. package/version.d.mts +1 -1
  174. package/version.d.ts +1 -1
  175. package/version.js +1 -1
  176. package/version.mjs +1 -1
@@ -0,0 +1,332 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ export class DefaultMappings extends APIResource {
9
+ /**
10
+ * List every stored default mapping for the account, one per destination that has
11
+ * ever written a default. Destinations that have not yet written a default mapping
12
+ * do not appear here. Use `GET /rest/v1/default-mappings/{destinationId}` to fetch
13
+ * the hydrated would-be row for a specific destination. Requires scope:
14
+ * mapping:list
15
+ */
16
+ list(options?: RequestOptions): APIPromise<DefaultMappingListResponse> {
17
+ return this._client.get('/rest/v1/default-mappings', options);
18
+ }
19
+
20
+ /**
21
+ * Fetch the destination's default mapping by destination id. Returns a hydrated
22
+ * row with empty `mappings[]` when no default mapping has been written yet (so
23
+ * callers do not need to handle a 404-vs-200 branch). Each destination has at most
24
+ * one default mapping. Requires scope: mapping:find
25
+ */
26
+ retrieve(id: string, options?: RequestOptions): APIPromise<DefaultMappingRetrieveResponse> {
27
+ return this._client.get(path`/rest/v1/default-mappings/${id}`, options);
28
+ }
29
+
30
+ /**
31
+ * Upsert the destination default mapping. Always replaces `mappings[]` wholesale
32
+ * (default mappings have no merge-partial semantic). Default mappings cannot have
33
+ * custom `logic`; the field is not accepted on this endpoint. Requires scope:
34
+ * mapping:update
35
+ */
36
+ replace(
37
+ id: string,
38
+ body: DefaultMappingReplaceParams,
39
+ options?: RequestOptions,
40
+ ): APIPromise<DefaultMappingReplaceResponse> {
41
+ return this._client.put(path`/rest/v1/default-mappings/${id}`, { body, ...options });
42
+ }
43
+ }
44
+
45
+ export interface DefaultMappingListResponse {
46
+ entities: Array<DefaultMappingListResponse.Entity>;
47
+ }
48
+
49
+ export namespace DefaultMappingListResponse {
50
+ export interface Entity {
51
+ id: string;
52
+
53
+ isEnabled: boolean;
54
+
55
+ mappings: Array<Entity.Mapping>;
56
+
57
+ destinationId?: string | null;
58
+
59
+ isDefaultMapping?: boolean | null;
60
+
61
+ /**
62
+ * Condition tree gating when this mapping fires. A node is either a leaf
63
+ * `condition` or a combinator (`AND`, `OR`, `NOT`). Combinator children are
64
+ * themselves `MappingLogic` nodes, so trees nest arbitrarily. Example leaf:
65
+ * `{ "condition": { "property": "$event.event", "operator": "Is", "value": "page_view" } }`.
66
+ * Example combinator: `{ "AND": [{ "condition": ... }, { "OR": [...] }] }`.
67
+ */
68
+ logic?: unknown;
69
+
70
+ name?: string | null;
71
+
72
+ priority?: number | null;
73
+
74
+ sourceId?: string | null;
75
+
76
+ templateId?: string | null;
77
+
78
+ templateName?: string | null;
79
+
80
+ updatedAt?: string | null;
81
+ }
82
+
83
+ export namespace Entity {
84
+ export interface Mapping {
85
+ map: string;
86
+
87
+ property: string;
88
+
89
+ modification?:
90
+ | 'CamelCase'
91
+ | 'DmaIP'
92
+ | 'DomainOnly'
93
+ | 'DomainPathOnly'
94
+ | 'DomainPathUTMs'
95
+ | 'DomainUTMs'
96
+ | 'FakeDomain'
97
+ | 'FakeDomainRealPath'
98
+ | 'FakeIP'
99
+ | 'FullUrl'
100
+ | 'Hash'
101
+ | 'HashMD5'
102
+ | 'HashedCountry'
103
+ | 'HashedDateOfBirth'
104
+ | 'HashedGender'
105
+ | 'HashedNormalized'
106
+ | 'HashedNormalizedNoSpecialChars'
107
+ | 'HashedPhone'
108
+ | 'HashedState'
109
+ | 'HashedZip'
110
+ | 'KebabCase'
111
+ | 'LowerCase'
112
+ | 'None'
113
+ | 'Null'
114
+ | 'Redacted'
115
+ | 'RegionalIP'
116
+ | 'SnakeCase'
117
+ | 'StartCase'
118
+ | 'UpperCase'
119
+ | null;
120
+ }
121
+ }
122
+ }
123
+
124
+ export interface DefaultMappingRetrieveResponse {
125
+ id: string;
126
+
127
+ isEnabled: boolean;
128
+
129
+ mappings: Array<DefaultMappingRetrieveResponse.Mapping>;
130
+
131
+ destinationId?: string | null;
132
+
133
+ isDefaultMapping?: boolean | null;
134
+
135
+ /**
136
+ * Condition tree gating when this mapping fires. A node is either a leaf
137
+ * `condition` or a combinator (`AND`, `OR`, `NOT`). Combinator children are
138
+ * themselves `MappingLogic` nodes, so trees nest arbitrarily. Example leaf:
139
+ * `{ "condition": { "property": "$event.event", "operator": "Is", "value": "page_view" } }`.
140
+ * Example combinator: `{ "AND": [{ "condition": ... }, { "OR": [...] }] }`.
141
+ */
142
+ logic?: unknown;
143
+
144
+ name?: string | null;
145
+
146
+ priority?: number | null;
147
+
148
+ sourceId?: string | null;
149
+
150
+ templateId?: string | null;
151
+
152
+ templateName?: string | null;
153
+
154
+ updatedAt?: string | null;
155
+ }
156
+
157
+ export namespace DefaultMappingRetrieveResponse {
158
+ export interface Mapping {
159
+ map: string;
160
+
161
+ property: string;
162
+
163
+ modification?:
164
+ | 'CamelCase'
165
+ | 'DmaIP'
166
+ | 'DomainOnly'
167
+ | 'DomainPathOnly'
168
+ | 'DomainPathUTMs'
169
+ | 'DomainUTMs'
170
+ | 'FakeDomain'
171
+ | 'FakeDomainRealPath'
172
+ | 'FakeIP'
173
+ | 'FullUrl'
174
+ | 'Hash'
175
+ | 'HashMD5'
176
+ | 'HashedCountry'
177
+ | 'HashedDateOfBirth'
178
+ | 'HashedGender'
179
+ | 'HashedNormalized'
180
+ | 'HashedNormalizedNoSpecialChars'
181
+ | 'HashedPhone'
182
+ | 'HashedState'
183
+ | 'HashedZip'
184
+ | 'KebabCase'
185
+ | 'LowerCase'
186
+ | 'None'
187
+ | 'Null'
188
+ | 'Redacted'
189
+ | 'RegionalIP'
190
+ | 'SnakeCase'
191
+ | 'StartCase'
192
+ | 'UpperCase'
193
+ | null;
194
+ }
195
+ }
196
+
197
+ export interface DefaultMappingReplaceResponse {
198
+ id: string;
199
+
200
+ isEnabled: boolean;
201
+
202
+ mappings: Array<DefaultMappingReplaceResponse.Mapping>;
203
+
204
+ destinationId?: string | null;
205
+
206
+ isDefaultMapping?: boolean | null;
207
+
208
+ /**
209
+ * Condition tree gating when this mapping fires. A node is either a leaf
210
+ * `condition` or a combinator (`AND`, `OR`, `NOT`). Combinator children are
211
+ * themselves `MappingLogic` nodes, so trees nest arbitrarily. Example leaf:
212
+ * `{ "condition": { "property": "$event.event", "operator": "Is", "value": "page_view" } }`.
213
+ * Example combinator: `{ "AND": [{ "condition": ... }, { "OR": [...] }] }`.
214
+ */
215
+ logic?: unknown;
216
+
217
+ name?: string | null;
218
+
219
+ priority?: number | null;
220
+
221
+ sourceId?: string | null;
222
+
223
+ templateId?: string | null;
224
+
225
+ templateName?: string | null;
226
+
227
+ updatedAt?: string | null;
228
+ }
229
+
230
+ export namespace DefaultMappingReplaceResponse {
231
+ export interface Mapping {
232
+ map: string;
233
+
234
+ property: string;
235
+
236
+ modification?:
237
+ | 'CamelCase'
238
+ | 'DmaIP'
239
+ | 'DomainOnly'
240
+ | 'DomainPathOnly'
241
+ | 'DomainPathUTMs'
242
+ | 'DomainUTMs'
243
+ | 'FakeDomain'
244
+ | 'FakeDomainRealPath'
245
+ | 'FakeIP'
246
+ | 'FullUrl'
247
+ | 'Hash'
248
+ | 'HashMD5'
249
+ | 'HashedCountry'
250
+ | 'HashedDateOfBirth'
251
+ | 'HashedGender'
252
+ | 'HashedNormalized'
253
+ | 'HashedNormalizedNoSpecialChars'
254
+ | 'HashedPhone'
255
+ | 'HashedState'
256
+ | 'HashedZip'
257
+ | 'KebabCase'
258
+ | 'LowerCase'
259
+ | 'None'
260
+ | 'Null'
261
+ | 'Redacted'
262
+ | 'RegionalIP'
263
+ | 'SnakeCase'
264
+ | 'StartCase'
265
+ | 'UpperCase'
266
+ | null;
267
+ }
268
+ }
269
+
270
+ export interface DefaultMappingReplaceParams {
271
+ /**
272
+ * Property mappings to persist as the destination default. Use
273
+ * `GET /rest/v1/mapping-templates?entityId={destinationId}` to discover the valid
274
+ * `property` values.
275
+ */
276
+ mappings: Array<DefaultMappingReplaceParams.Mapping>;
277
+
278
+ /**
279
+ * Toggle the default mapping on/off. Defaults to `true` when omitted. `null` is
280
+ * treated as omitted.
281
+ */
282
+ isEnabled?: boolean | null;
283
+ }
284
+
285
+ export namespace DefaultMappingReplaceParams {
286
+ export interface Mapping {
287
+ map: string;
288
+
289
+ property: string;
290
+
291
+ modification?:
292
+ | 'CamelCase'
293
+ | 'DmaIP'
294
+ | 'DomainOnly'
295
+ | 'DomainPathOnly'
296
+ | 'DomainPathUTMs'
297
+ | 'DomainUTMs'
298
+ | 'FakeDomain'
299
+ | 'FakeDomainRealPath'
300
+ | 'FakeIP'
301
+ | 'FullUrl'
302
+ | 'Hash'
303
+ | 'HashMD5'
304
+ | 'HashedCountry'
305
+ | 'HashedDateOfBirth'
306
+ | 'HashedGender'
307
+ | 'HashedNormalized'
308
+ | 'HashedNormalizedNoSpecialChars'
309
+ | 'HashedPhone'
310
+ | 'HashedState'
311
+ | 'HashedZip'
312
+ | 'KebabCase'
313
+ | 'LowerCase'
314
+ | 'None'
315
+ | 'Null'
316
+ | 'Redacted'
317
+ | 'RegionalIP'
318
+ | 'SnakeCase'
319
+ | 'StartCase'
320
+ | 'UpperCase'
321
+ | null;
322
+ }
323
+ }
324
+
325
+ export declare namespace DefaultMappings {
326
+ export {
327
+ type DefaultMappingListResponse as DefaultMappingListResponse,
328
+ type DefaultMappingRetrieveResponse as DefaultMappingRetrieveResponse,
329
+ type DefaultMappingReplaceResponse as DefaultMappingReplaceResponse,
330
+ type DefaultMappingReplaceParams as DefaultMappingReplaceParams,
331
+ };
332
+ }
@@ -19,6 +19,13 @@ export {
19
19
  type ConsentSettingReplaceParams,
20
20
  type ConsentSettingUpdateParams,
21
21
  } from './consent-settings';
22
+ export {
23
+ DefaultMappings,
24
+ type DefaultMappingListResponse,
25
+ type DefaultMappingRetrieveResponse,
26
+ type DefaultMappingReplaceResponse,
27
+ type DefaultMappingReplaceParams,
28
+ } from './default-mappings';
22
29
  export {
23
30
  DestinationTypes,
24
31
  type DestinationTypeListResponse,
@@ -114,6 +121,11 @@ export {
114
121
  type LocationUpdateParams,
115
122
  type LocationEmbedCodeParams,
116
123
  } from './locations';
124
+ export {
125
+ MappingTemplates,
126
+ type MappingTemplateListResponse,
127
+ type MappingTemplateListParams,
128
+ } from './mapping-templates';
117
129
  export {
118
130
  Mappings,
119
131
  type MappingListResponse,
@@ -121,9 +133,11 @@ export {
121
133
  type MappingRetrieveResponse,
122
134
  type MappingUpdateResponse,
123
135
  type MappingDeleteResponse,
136
+ type MappingReorderResponse,
124
137
  type MappingListParams,
125
138
  type MappingCreateParams,
126
139
  type MappingUpdateParams,
140
+ type MappingReorderParams,
127
141
  type MappingListResponsesCursor,
128
142
  } from './mappings';
129
143
  export {
@@ -0,0 +1,203 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class MappingTemplates extends APIResource {
8
+ /**
9
+ * Discover every mapping template available for a destination or source, with full
10
+ * property descriptors inlined. Use the returned `id` as `templateId` when calling
11
+ * `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
12
+ * `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
13
+ * any enforced `options`. The `isDefault: true` entry is the destination's
14
+ * built-in default template (the one stored at `MAPPER#{destinationId}` when
15
+ * configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
16
+ * mapping:find
17
+ */
18
+ list(query: MappingTemplateListParams, options?: RequestOptions): APIPromise<MappingTemplateListResponse> {
19
+ return this._client.get('/rest/v1/mapping-templates', { query, ...options });
20
+ }
21
+ }
22
+
23
+ export interface MappingTemplateListResponse {
24
+ entities: Array<MappingTemplateListResponse.Entity>;
25
+ }
26
+
27
+ export namespace MappingTemplateListResponse {
28
+ export interface Entity {
29
+ /**
30
+ * Template identifier — pass to `POST /rest/v1/mappings` as `templateId`.
31
+ */
32
+ id: string;
33
+
34
+ /**
35
+ * True for the destination's built-in default template (the one stored at
36
+ * `MAPPER#{destinationId}` when configured). Sources only have one template; it is
37
+ * always default.
38
+ */
39
+ isDefault: boolean;
40
+
41
+ mappings: Array<Entity.Mapping>;
42
+
43
+ name: string;
44
+
45
+ description?: string | null;
46
+ }
47
+
48
+ export namespace Entity {
49
+ export interface Mapping {
50
+ /**
51
+ * Long-form description / tooltip for this property.
52
+ */
53
+ description: string | null;
54
+
55
+ isPII: boolean;
56
+
57
+ /**
58
+ * Type information for SDK validation (Text, Integer, Email, Url, IP, Object,
59
+ * KnownObject, Date, DateTime, Array, Boolean, JSON).
60
+ */
61
+ kind:
62
+ | 'Array'
63
+ | 'Boolean'
64
+ | 'Date'
65
+ | 'DateTime'
66
+ | 'Email'
67
+ | 'IP'
68
+ | 'Integer'
69
+ | 'JSON'
70
+ | 'KnownObject'
71
+ | 'Object'
72
+ | 'Text'
73
+ | 'Url';
74
+
75
+ /**
76
+ * Human-readable label (e.g. "Email", "Event Name").
77
+ */
78
+ label: string;
79
+
80
+ /**
81
+ * The template default source expression, e.g. `{{visitor.email}}`.
82
+ */
83
+ map: string;
84
+
85
+ /**
86
+ * The value to send as `mappings[].property` when creating or patching a mapping.
87
+ */
88
+ property: string;
89
+
90
+ required: boolean;
91
+
92
+ /**
93
+ * The template default modification (hashing / case / URL truncation).
94
+ */
95
+ modification?:
96
+ | 'CamelCase'
97
+ | 'DmaIP'
98
+ | 'DomainOnly'
99
+ | 'DomainPathOnly'
100
+ | 'DomainPathUTMs'
101
+ | 'DomainUTMs'
102
+ | 'FakeDomain'
103
+ | 'FakeDomainRealPath'
104
+ | 'FakeIP'
105
+ | 'FullUrl'
106
+ | 'Hash'
107
+ | 'HashMD5'
108
+ | 'HashedCountry'
109
+ | 'HashedDateOfBirth'
110
+ | 'HashedGender'
111
+ | 'HashedNormalized'
112
+ | 'HashedNormalizedNoSpecialChars'
113
+ | 'HashedPhone'
114
+ | 'HashedState'
115
+ | 'HashedZip'
116
+ | 'KebabCase'
117
+ | 'LowerCase'
118
+ | 'None'
119
+ | 'Null'
120
+ | 'Redacted'
121
+ | 'RegionalIP'
122
+ | 'SnakeCase'
123
+ | 'StartCase'
124
+ | 'UpperCase'
125
+ | null;
126
+
127
+ /**
128
+ * Suggested modification options for this property. Not a whitelist.
129
+ */
130
+ modificationOptions?: Array<
131
+ | 'CamelCase'
132
+ | 'DmaIP'
133
+ | 'DomainOnly'
134
+ | 'DomainPathOnly'
135
+ | 'DomainPathUTMs'
136
+ | 'DomainUTMs'
137
+ | 'FakeDomain'
138
+ | 'FakeDomainRealPath'
139
+ | 'FakeIP'
140
+ | 'FullUrl'
141
+ | 'Hash'
142
+ | 'HashMD5'
143
+ | 'HashedCountry'
144
+ | 'HashedDateOfBirth'
145
+ | 'HashedGender'
146
+ | 'HashedNormalized'
147
+ | 'HashedNormalizedNoSpecialChars'
148
+ | 'HashedPhone'
149
+ | 'HashedState'
150
+ | 'HashedZip'
151
+ | 'KebabCase'
152
+ | 'LowerCase'
153
+ | 'None'
154
+ | 'Null'
155
+ | 'Redacted'
156
+ | 'RegionalIP'
157
+ | 'SnakeCase'
158
+ | 'StartCase'
159
+ | 'UpperCase'
160
+ > | null;
161
+
162
+ /**
163
+ * When set, the ONLY valid `map` values for this property. Typically used for
164
+ * enum-shaped destinations.
165
+ */
166
+ options?: Array<Mapping.Option> | null;
167
+
168
+ /**
169
+ * Non-binding suggestions for the `map` value (e.g. common event names a customer
170
+ * might want to use).
171
+ */
172
+ suggestedOptions?: Array<Mapping.SuggestedOption> | null;
173
+ }
174
+
175
+ export namespace Mapping {
176
+ export interface Option {
177
+ label: string;
178
+
179
+ value: string;
180
+ }
181
+
182
+ export interface SuggestedOption {
183
+ label: string;
184
+
185
+ value: string;
186
+ }
187
+ }
188
+ }
189
+ }
190
+
191
+ export interface MappingTemplateListParams {
192
+ /**
193
+ * Destination or source id. Required.
194
+ */
195
+ entityId: string;
196
+ }
197
+
198
+ export declare namespace MappingTemplates {
199
+ export {
200
+ type MappingTemplateListResponse as MappingTemplateListResponse,
201
+ type MappingTemplateListParams as MappingTemplateListParams,
202
+ };
203
+ }