@oursprivacy/platform-sdk 1.19.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.
- package/CHANGELOG.md +31 -0
- package/README.md +8 -12
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +21 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +21 -6
- package/client.d.ts.map +1 -1
- package/client.js +17 -2
- package/client.js.map +1 -1
- package/client.mjs +17 -2
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/allowed-events.d.mts.map +1 -1
- package/resources/allowed-events.d.ts.map +1 -1
- package/resources/allowed-events.mjs.map +1 -1
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/consent-settings.mjs.map +1 -1
- package/resources/default-mappings.d.mts +140 -0
- package/resources/default-mappings.d.mts.map +1 -0
- package/resources/default-mappings.d.ts +140 -0
- package/resources/default-mappings.d.ts.map +1 -0
- package/resources/default-mappings.js +38 -0
- package/resources/default-mappings.js.map +1 -0
- package/resources/default-mappings.mjs +34 -0
- package/resources/default-mappings.mjs.map +1 -0
- package/resources/destination-types.d.mts +21 -13
- package/resources/destination-types.d.mts.map +1 -1
- package/resources/destination-types.d.ts +21 -13
- package/resources/destination-types.d.ts.map +1 -1
- package/resources/destination-types.js.map +1 -1
- package/resources/destination-types.mjs.map +1 -1
- package/resources/destinations.d.mts +61 -98
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +61 -98
- package/resources/destinations.d.ts.map +1 -1
- package/resources/destinations.js +11 -13
- package/resources/destinations.js.map +1 -1
- package/resources/destinations.mjs +11 -13
- package/resources/destinations.mjs.map +1 -1
- package/resources/experiment-settings.d.mts.map +1 -1
- package/resources/experiment-settings.d.ts.map +1 -1
- package/resources/experiment-settings.mjs.map +1 -1
- package/resources/experiment-variants.d.mts.map +1 -1
- package/resources/experiment-variants.d.ts.map +1 -1
- package/resources/experiment-variants.mjs.map +1 -1
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts.map +1 -1
- package/resources/experiments.mjs.map +1 -1
- package/resources/global-dispatch-centers.d.mts.map +1 -1
- package/resources/global-dispatch-centers.d.ts.map +1 -1
- package/resources/global-dispatch-centers.mjs.map +1 -1
- package/resources/heatmap-pages.d.mts.map +1 -1
- package/resources/heatmap-pages.d.ts.map +1 -1
- package/resources/heatmap-pages.mjs.map +1 -1
- package/resources/index.d.mts +7 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/locations.d.mts +270 -0
- package/resources/locations.d.mts.map +1 -0
- package/resources/locations.d.ts +270 -0
- package/resources/locations.d.ts.map +1 -0
- package/resources/locations.js +48 -0
- package/resources/locations.js.map +1 -0
- package/resources/locations.mjs +44 -0
- package/resources/locations.mjs.map +1 -0
- package/resources/mapping-templates.d.mts +101 -0
- package/resources/mapping-templates.d.mts.map +1 -0
- package/resources/mapping-templates.d.ts +101 -0
- package/resources/mapping-templates.d.ts.map +1 -0
- package/resources/mapping-templates.js +22 -0
- package/resources/mapping-templates.js.map +1 -0
- package/resources/mapping-templates.mjs +18 -0
- package/resources/mapping-templates.mjs.map +1 -0
- package/resources/mappings.d.mts +186 -6
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +186 -6
- package/resources/mappings.d.ts.map +1 -1
- package/resources/mappings.js +26 -3
- package/resources/mappings.js.map +1 -1
- package/resources/mappings.mjs +26 -3
- package/resources/mappings.mjs.map +1 -1
- package/resources/replay-settings.d.mts.map +1 -1
- package/resources/replay-settings.d.ts.map +1 -1
- package/resources/replay-settings.mjs.map +1 -1
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts.map +1 -1
- package/resources/sources.mjs.map +1 -1
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.mjs.map +1 -1
- package/resources/web-scanner-rules.d.mts +195 -0
- package/resources/web-scanner-rules.d.mts.map +1 -0
- package/resources/web-scanner-rules.d.ts +195 -0
- package/resources/web-scanner-rules.d.ts.map +1 -0
- package/resources/web-scanner-rules.js +48 -0
- package/resources/web-scanner-rules.js.map +1 -0
- package/resources/web-scanner-rules.mjs +44 -0
- package/resources/web-scanner-rules.mjs.map +1 -0
- package/resources/web-scanners.d.mts +199 -0
- package/resources/web-scanners.d.mts.map +1 -0
- package/resources/web-scanners.d.ts +199 -0
- package/resources/web-scanners.d.ts.map +1 -0
- package/resources/web-scanners.js +67 -0
- package/resources/web-scanners.js.map +1 -0
- package/resources/web-scanners.mjs +63 -0
- package/resources/web-scanners.mjs.map +1 -0
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +116 -5
- package/src/resources/default-mappings.ts +332 -0
- package/src/resources/destination-types.ts +117 -202
- package/src/resources/destinations.ts +227 -212
- package/src/resources/index.ts +48 -0
- package/src/resources/locations.ts +463 -0
- package/src/resources/mapping-templates.ts +203 -0
- package/src/resources/mappings.ts +320 -5
- package/src/resources/web-scanner-rules.ts +304 -0
- package/src/resources/web-scanners.ts +333 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
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 Locations extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List every location for this account. Not paginated — each account has a small
|
|
7
|
+
* map-count limit (single digits in practice) so the response always fits in a
|
|
8
|
+
* single page. Requires scope: maps:list
|
|
9
|
+
*/
|
|
10
|
+
list(options?: RequestOptions): APIPromise<LocationListResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new location (map embed). All address fields are optional and can be
|
|
13
|
+
* filled in later via PATCH. Returns the slim entity with the server-assigned `id`
|
|
14
|
+
* so callers can immediately request `GET /rest/v1/locations/{id}/embed-code`.
|
|
15
|
+
* Requires scope: maps:create
|
|
16
|
+
*/
|
|
17
|
+
create(body: LocationCreateParams, options?: RequestOptions): APIPromise<LocationCreateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Partially update a location. Only the fields you send are changed.
|
|
20
|
+
* `additionalAddresses` is replaced wholesale when sent — partial item updates are
|
|
21
|
+
* not merged. The map's computed center is recalculated on every PATCH from the
|
|
22
|
+
* latest coordinates. Requires scope: maps:update
|
|
23
|
+
*/
|
|
24
|
+
update(id: string, body: LocationUpdateParams, options?: RequestOptions): APIPromise<LocationUpdateResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Generate the paste-ready HTML embed snippet for a location. The response is a
|
|
27
|
+
* single self-contained HTML string (a `<style>` block + `<div>` wrapping an
|
|
28
|
+
* `<iframe>` pointed at the maps CDN for the current stage, plus an optional
|
|
29
|
+
* JSON-LD `<script>`). Customize the render with the optional query params
|
|
30
|
+
* (`color`, `theme`, `colorScheme`, `mapStyle`, `includeAddressBox`, `zoom`,
|
|
31
|
+
* `includeControls`, `includeSEOSchema`); all have sane defaults. Requires scope:
|
|
32
|
+
* maps:find
|
|
33
|
+
*/
|
|
34
|
+
embedCode(id: string, query?: LocationEmbedCodeParams | null | undefined, options?: RequestOptions): APIPromise<LocationEmbedCodeResponse>;
|
|
35
|
+
}
|
|
36
|
+
export interface LocationListResponse {
|
|
37
|
+
entities: Array<LocationListResponse.Entity>;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace LocationListResponse {
|
|
40
|
+
interface Entity {
|
|
41
|
+
id: string;
|
|
42
|
+
accountId: string;
|
|
43
|
+
additionalAddresses?: Array<Entity.AdditionalAddress> | null;
|
|
44
|
+
center?: unknown | null;
|
|
45
|
+
city?: string | null;
|
|
46
|
+
country?: string | null;
|
|
47
|
+
createdAt?: string | null;
|
|
48
|
+
customDomain?: string | null;
|
|
49
|
+
latitude?: number | null;
|
|
50
|
+
line1?: string | null;
|
|
51
|
+
line2?: string | null;
|
|
52
|
+
longitude?: number | null;
|
|
53
|
+
mapName?: string | null;
|
|
54
|
+
name?: string | null;
|
|
55
|
+
phoneNumber?: string | null;
|
|
56
|
+
state?: string | null;
|
|
57
|
+
updatedAt?: string | null;
|
|
58
|
+
websiteLinkText?: string | null;
|
|
59
|
+
websiteUrl?: string | null;
|
|
60
|
+
zip?: string | null;
|
|
61
|
+
}
|
|
62
|
+
namespace Entity {
|
|
63
|
+
interface AdditionalAddress {
|
|
64
|
+
city?: string | null;
|
|
65
|
+
country?: string | null;
|
|
66
|
+
latitude?: number | null;
|
|
67
|
+
line1?: string | null;
|
|
68
|
+
line2?: string | null;
|
|
69
|
+
longitude?: number | null;
|
|
70
|
+
name?: string | null;
|
|
71
|
+
phoneNumber?: string | null;
|
|
72
|
+
state?: string | null;
|
|
73
|
+
websiteLinkText?: string | null;
|
|
74
|
+
websiteUrl?: string | null;
|
|
75
|
+
zip?: string | null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export interface LocationCreateResponse {
|
|
80
|
+
id: string;
|
|
81
|
+
accountId: string;
|
|
82
|
+
additionalAddresses?: Array<LocationCreateResponse.AdditionalAddress> | null;
|
|
83
|
+
center?: unknown | null;
|
|
84
|
+
city?: string | null;
|
|
85
|
+
country?: string | null;
|
|
86
|
+
createdAt?: string | null;
|
|
87
|
+
customDomain?: string | null;
|
|
88
|
+
latitude?: number | null;
|
|
89
|
+
line1?: string | null;
|
|
90
|
+
line2?: string | null;
|
|
91
|
+
longitude?: number | null;
|
|
92
|
+
mapName?: string | null;
|
|
93
|
+
name?: string | null;
|
|
94
|
+
phoneNumber?: string | null;
|
|
95
|
+
state?: string | null;
|
|
96
|
+
updatedAt?: string | null;
|
|
97
|
+
websiteLinkText?: string | null;
|
|
98
|
+
websiteUrl?: string | null;
|
|
99
|
+
zip?: string | null;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace LocationCreateResponse {
|
|
102
|
+
interface AdditionalAddress {
|
|
103
|
+
city?: string | null;
|
|
104
|
+
country?: string | null;
|
|
105
|
+
latitude?: number | null;
|
|
106
|
+
line1?: string | null;
|
|
107
|
+
line2?: string | null;
|
|
108
|
+
longitude?: number | null;
|
|
109
|
+
name?: string | null;
|
|
110
|
+
phoneNumber?: string | null;
|
|
111
|
+
state?: string | null;
|
|
112
|
+
websiteLinkText?: string | null;
|
|
113
|
+
websiteUrl?: string | null;
|
|
114
|
+
zip?: string | null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export interface LocationUpdateResponse {
|
|
118
|
+
id: string;
|
|
119
|
+
accountId: string;
|
|
120
|
+
additionalAddresses?: Array<LocationUpdateResponse.AdditionalAddress> | null;
|
|
121
|
+
center?: unknown | null;
|
|
122
|
+
city?: string | null;
|
|
123
|
+
country?: string | null;
|
|
124
|
+
createdAt?: string | null;
|
|
125
|
+
customDomain?: string | null;
|
|
126
|
+
latitude?: number | null;
|
|
127
|
+
line1?: string | null;
|
|
128
|
+
line2?: string | null;
|
|
129
|
+
longitude?: number | null;
|
|
130
|
+
mapName?: string | null;
|
|
131
|
+
name?: string | null;
|
|
132
|
+
phoneNumber?: string | null;
|
|
133
|
+
state?: string | null;
|
|
134
|
+
updatedAt?: string | null;
|
|
135
|
+
websiteLinkText?: string | null;
|
|
136
|
+
websiteUrl?: string | null;
|
|
137
|
+
zip?: string | null;
|
|
138
|
+
}
|
|
139
|
+
export declare namespace LocationUpdateResponse {
|
|
140
|
+
interface AdditionalAddress {
|
|
141
|
+
city?: string | null;
|
|
142
|
+
country?: string | null;
|
|
143
|
+
latitude?: number | null;
|
|
144
|
+
line1?: string | null;
|
|
145
|
+
line2?: string | null;
|
|
146
|
+
longitude?: number | null;
|
|
147
|
+
name?: string | null;
|
|
148
|
+
phoneNumber?: string | null;
|
|
149
|
+
state?: string | null;
|
|
150
|
+
websiteLinkText?: string | null;
|
|
151
|
+
websiteUrl?: string | null;
|
|
152
|
+
zip?: string | null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
export interface LocationEmbedCodeResponse {
|
|
156
|
+
/**
|
|
157
|
+
* Self-contained HTML snippet (a `<style>` + `<div>` wrapping an `<iframe>`, plus
|
|
158
|
+
* an optional JSON-LD `<script>`) ready to paste into any page. The iframe `src`
|
|
159
|
+
* points to the maps CDN for the current stage.
|
|
160
|
+
*/
|
|
161
|
+
embedCode: string;
|
|
162
|
+
}
|
|
163
|
+
export interface LocationCreateParams {
|
|
164
|
+
additionalAddresses?: Array<LocationCreateParams.AdditionalAddress> | null;
|
|
165
|
+
center?: unknown | null;
|
|
166
|
+
city?: string | null;
|
|
167
|
+
country?: string | null;
|
|
168
|
+
customDomain?: string | null;
|
|
169
|
+
latitude?: number | null;
|
|
170
|
+
line1?: string | null;
|
|
171
|
+
line2?: string | null;
|
|
172
|
+
longitude?: number | null;
|
|
173
|
+
mapName?: string | null;
|
|
174
|
+
name?: string | null;
|
|
175
|
+
phoneNumber?: string | null;
|
|
176
|
+
state?: string | null;
|
|
177
|
+
websiteLinkText?: string | null;
|
|
178
|
+
websiteUrl?: string | null;
|
|
179
|
+
zip?: string | null;
|
|
180
|
+
}
|
|
181
|
+
export declare namespace LocationCreateParams {
|
|
182
|
+
interface AdditionalAddress {
|
|
183
|
+
latitude: number;
|
|
184
|
+
longitude: number;
|
|
185
|
+
city?: string | null;
|
|
186
|
+
country?: string | null;
|
|
187
|
+
line1?: string | null;
|
|
188
|
+
line2?: string | null;
|
|
189
|
+
name?: string | null;
|
|
190
|
+
phoneNumber?: string | null;
|
|
191
|
+
state?: string | null;
|
|
192
|
+
websiteLinkText?: string | null;
|
|
193
|
+
websiteUrl?: string | null;
|
|
194
|
+
zip?: string | null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
export interface LocationUpdateParams {
|
|
198
|
+
additionalAddresses?: Array<LocationUpdateParams.AdditionalAddress> | null;
|
|
199
|
+
center?: unknown | null;
|
|
200
|
+
city?: string | null;
|
|
201
|
+
country?: string | null;
|
|
202
|
+
customDomain?: string | null;
|
|
203
|
+
latitude?: number | null;
|
|
204
|
+
line1?: string | null;
|
|
205
|
+
line2?: string | null;
|
|
206
|
+
longitude?: number | null;
|
|
207
|
+
mapName?: string | null;
|
|
208
|
+
name?: string | null;
|
|
209
|
+
phoneNumber?: string | null;
|
|
210
|
+
state?: string | null;
|
|
211
|
+
websiteLinkText?: string | null;
|
|
212
|
+
websiteUrl?: string | null;
|
|
213
|
+
zip?: string | null;
|
|
214
|
+
}
|
|
215
|
+
export declare namespace LocationUpdateParams {
|
|
216
|
+
interface AdditionalAddress {
|
|
217
|
+
latitude: number;
|
|
218
|
+
longitude: number;
|
|
219
|
+
city?: string | null;
|
|
220
|
+
country?: string | null;
|
|
221
|
+
line1?: string | null;
|
|
222
|
+
line2?: string | null;
|
|
223
|
+
name?: string | null;
|
|
224
|
+
phoneNumber?: string | null;
|
|
225
|
+
state?: string | null;
|
|
226
|
+
websiteLinkText?: string | null;
|
|
227
|
+
websiteUrl?: string | null;
|
|
228
|
+
zip?: string | null;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
export interface LocationEmbedCodeParams {
|
|
232
|
+
/**
|
|
233
|
+
* Brand color used in the embedded map UI. Any CSS color string.
|
|
234
|
+
*/
|
|
235
|
+
color?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Light or dark color scheme.
|
|
238
|
+
*/
|
|
239
|
+
colorScheme?: 'light' | 'dark';
|
|
240
|
+
/**
|
|
241
|
+
* Render the address sidebar overlay next to the map. Send `false` to hide.
|
|
242
|
+
*/
|
|
243
|
+
includeAddressBox?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Whether the embed renders map controls. `accessible` enables keyboard-navigable
|
|
246
|
+
* controls.
|
|
247
|
+
*/
|
|
248
|
+
includeControls?: 'yes' | 'no' | 'accessible';
|
|
249
|
+
/**
|
|
250
|
+
* Emit a `schema.org` Place JSON-LD block alongside the iframe so search engines
|
|
251
|
+
* can index the location.
|
|
252
|
+
*/
|
|
253
|
+
includeSEOSchema?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Base map style.
|
|
256
|
+
*/
|
|
257
|
+
mapStyle?: 'Standard' | 'Monochrome';
|
|
258
|
+
/**
|
|
259
|
+
* Visual theme variant.
|
|
260
|
+
*/
|
|
261
|
+
theme?: 'default' | 'modern';
|
|
262
|
+
/**
|
|
263
|
+
* Initial map zoom level (Google-style 1–20).
|
|
264
|
+
*/
|
|
265
|
+
zoom?: number;
|
|
266
|
+
}
|
|
267
|
+
export declare namespace Locations {
|
|
268
|
+
export { type LocationListResponse as LocationListResponse, type LocationCreateResponse as LocationCreateResponse, type LocationUpdateResponse as LocationUpdateResponse, type LocationEmbedCodeResponse as LocationEmbedCodeResponse, type LocationCreateParams as LocationCreateParams, type LocationUpdateParams as LocationUpdateParams, type LocationEmbedCodeParams as LocationEmbedCodeParams, };
|
|
269
|
+
}
|
|
270
|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M,GAAG,IAAI,CAAC;QAErB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEhC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,YAAY,CAAC;IAE9C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.Locations = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class Locations extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List every location for this account. Not paginated — each account has a small
|
|
10
|
+
* map-count limit (single digits in practice) so the response always fits in a
|
|
11
|
+
* single page. Requires scope: maps:list
|
|
12
|
+
*/
|
|
13
|
+
list(options) {
|
|
14
|
+
return this._client.get('/rest/v1/locations', options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a new location (map embed). All address fields are optional and can be
|
|
18
|
+
* filled in later via PATCH. Returns the slim entity with the server-assigned `id`
|
|
19
|
+
* so callers can immediately request `GET /rest/v1/locations/{id}/embed-code`.
|
|
20
|
+
* Requires scope: maps:create
|
|
21
|
+
*/
|
|
22
|
+
create(body, options) {
|
|
23
|
+
return this._client.post('/rest/v1/locations', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Partially update a location. Only the fields you send are changed.
|
|
27
|
+
* `additionalAddresses` is replaced wholesale when sent — partial item updates are
|
|
28
|
+
* not merged. The map's computed center is recalculated on every PATCH from the
|
|
29
|
+
* latest coordinates. Requires scope: maps:update
|
|
30
|
+
*/
|
|
31
|
+
update(id, body, options) {
|
|
32
|
+
return this._client.patch((0, path_1.path) `/rest/v1/locations/${id}`, { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Generate the paste-ready HTML embed snippet for a location. The response is a
|
|
36
|
+
* single self-contained HTML string (a `<style>` block + `<div>` wrapping an
|
|
37
|
+
* `<iframe>` pointed at the maps CDN for the current stage, plus an optional
|
|
38
|
+
* JSON-LD `<script>`). Customize the render with the optional query params
|
|
39
|
+
* (`color`, `theme`, `colorScheme`, `mapStyle`, `includeAddressBox`, `zoom`,
|
|
40
|
+
* `includeControls`, `includeSEOSchema`); all have sane defaults. Requires scope:
|
|
41
|
+
* maps:find
|
|
42
|
+
*/
|
|
43
|
+
embedCode(id, query = {}, options) {
|
|
44
|
+
return this._client.get((0, path_1.path) `/rest/v1/locations/${id}/embed-code`, { query, ...options });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.Locations = Locations;
|
|
48
|
+
//# sourceMappingURL=locations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../src/resources/locations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;OAIG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,sBAAsB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CACP,EAAU,EACV,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;CACF;AAlDD,8BAkDC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class Locations extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List every location for this account. Not paginated — each account has a small
|
|
7
|
+
* map-count limit (single digits in practice) so the response always fits in a
|
|
8
|
+
* single page. Requires scope: maps:list
|
|
9
|
+
*/
|
|
10
|
+
list(options) {
|
|
11
|
+
return this._client.get('/rest/v1/locations', options);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a new location (map embed). All address fields are optional and can be
|
|
15
|
+
* filled in later via PATCH. Returns the slim entity with the server-assigned `id`
|
|
16
|
+
* so callers can immediately request `GET /rest/v1/locations/{id}/embed-code`.
|
|
17
|
+
* Requires scope: maps:create
|
|
18
|
+
*/
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this._client.post('/rest/v1/locations', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Partially update a location. Only the fields you send are changed.
|
|
24
|
+
* `additionalAddresses` is replaced wholesale when sent — partial item updates are
|
|
25
|
+
* not merged. The map's computed center is recalculated on every PATCH from the
|
|
26
|
+
* latest coordinates. Requires scope: maps:update
|
|
27
|
+
*/
|
|
28
|
+
update(id, body, options) {
|
|
29
|
+
return this._client.patch(path `/rest/v1/locations/${id}`, { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Generate the paste-ready HTML embed snippet for a location. The response is a
|
|
33
|
+
* single self-contained HTML string (a `<style>` block + `<div>` wrapping an
|
|
34
|
+
* `<iframe>` pointed at the maps CDN for the current stage, plus an optional
|
|
35
|
+
* JSON-LD `<script>`). Customize the render with the optional query params
|
|
36
|
+
* (`color`, `theme`, `colorScheme`, `mapStyle`, `includeAddressBox`, `zoom`,
|
|
37
|
+
* `includeControls`, `includeSEOSchema`); all have sane defaults. Requires scope:
|
|
38
|
+
* maps:find
|
|
39
|
+
*/
|
|
40
|
+
embedCode(id, query = {}, options) {
|
|
41
|
+
return this._client.get(path `/rest/v1/locations/${id}/embed-code`, { query, ...options });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=locations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locations.mjs","sourceRoot":"","sources":["../src/resources/locations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;OAIG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,sBAAsB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CACP,EAAU,EACV,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;CACF"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 MappingTemplates extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Discover every mapping template available for a destination or source, with full
|
|
7
|
+
* property descriptors inlined. Use the returned `id` as `templateId` when calling
|
|
8
|
+
* `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
|
|
9
|
+
* `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
|
|
10
|
+
* any enforced `options`. The `isDefault: true` entry is the destination's
|
|
11
|
+
* built-in default template (the one stored at `MAPPER#{destinationId}` when
|
|
12
|
+
* configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
|
|
13
|
+
* mapping:find
|
|
14
|
+
*/
|
|
15
|
+
list(query: MappingTemplateListParams, options?: RequestOptions): APIPromise<MappingTemplateListResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface MappingTemplateListResponse {
|
|
18
|
+
entities: Array<MappingTemplateListResponse.Entity>;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace MappingTemplateListResponse {
|
|
21
|
+
interface Entity {
|
|
22
|
+
/**
|
|
23
|
+
* Template identifier — pass to `POST /rest/v1/mappings` as `templateId`.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* True for the destination's built-in default template (the one stored at
|
|
28
|
+
* `MAPPER#{destinationId}` when configured). Sources only have one template; it is
|
|
29
|
+
* always default.
|
|
30
|
+
*/
|
|
31
|
+
isDefault: boolean;
|
|
32
|
+
mappings: Array<Entity.Mapping>;
|
|
33
|
+
name: string;
|
|
34
|
+
description?: string | null;
|
|
35
|
+
}
|
|
36
|
+
namespace Entity {
|
|
37
|
+
interface Mapping {
|
|
38
|
+
/**
|
|
39
|
+
* Long-form description / tooltip for this property.
|
|
40
|
+
*/
|
|
41
|
+
description: string | null;
|
|
42
|
+
isPII: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Type information for SDK validation (Text, Integer, Email, Url, IP, Object,
|
|
45
|
+
* KnownObject, Date, DateTime, Array, Boolean, JSON).
|
|
46
|
+
*/
|
|
47
|
+
kind: 'Array' | 'Boolean' | 'Date' | 'DateTime' | 'Email' | 'IP' | 'Integer' | 'JSON' | 'KnownObject' | 'Object' | 'Text' | 'Url';
|
|
48
|
+
/**
|
|
49
|
+
* Human-readable label (e.g. "Email", "Event Name").
|
|
50
|
+
*/
|
|
51
|
+
label: string;
|
|
52
|
+
/**
|
|
53
|
+
* The template default source expression, e.g. `{{visitor.email}}`.
|
|
54
|
+
*/
|
|
55
|
+
map: string;
|
|
56
|
+
/**
|
|
57
|
+
* The value to send as `mappings[].property` when creating or patching a mapping.
|
|
58
|
+
*/
|
|
59
|
+
property: string;
|
|
60
|
+
required: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The template default modification (hashing / case / URL truncation).
|
|
63
|
+
*/
|
|
64
|
+
modification?: 'CamelCase' | 'DmaIP' | 'DomainOnly' | 'DomainPathOnly' | 'DomainPathUTMs' | 'DomainUTMs' | 'FakeDomain' | 'FakeDomainRealPath' | 'FakeIP' | 'FullUrl' | 'Hash' | 'HashMD5' | 'HashedCountry' | 'HashedDateOfBirth' | 'HashedGender' | 'HashedNormalized' | 'HashedNormalizedNoSpecialChars' | 'HashedPhone' | 'HashedState' | 'HashedZip' | 'KebabCase' | 'LowerCase' | 'None' | 'Null' | 'Redacted' | 'RegionalIP' | 'SnakeCase' | 'StartCase' | 'UpperCase' | null;
|
|
65
|
+
/**
|
|
66
|
+
* Suggested modification options for this property. Not a whitelist.
|
|
67
|
+
*/
|
|
68
|
+
modificationOptions?: Array<'CamelCase' | 'DmaIP' | 'DomainOnly' | 'DomainPathOnly' | 'DomainPathUTMs' | 'DomainUTMs' | 'FakeDomain' | 'FakeDomainRealPath' | 'FakeIP' | 'FullUrl' | 'Hash' | 'HashMD5' | 'HashedCountry' | 'HashedDateOfBirth' | 'HashedGender' | 'HashedNormalized' | 'HashedNormalizedNoSpecialChars' | 'HashedPhone' | 'HashedState' | 'HashedZip' | 'KebabCase' | 'LowerCase' | 'None' | 'Null' | 'Redacted' | 'RegionalIP' | 'SnakeCase' | 'StartCase' | 'UpperCase'> | null;
|
|
69
|
+
/**
|
|
70
|
+
* When set, the ONLY valid `map` values for this property. Typically used for
|
|
71
|
+
* enum-shaped destinations.
|
|
72
|
+
*/
|
|
73
|
+
options?: Array<Mapping.Option> | null;
|
|
74
|
+
/**
|
|
75
|
+
* Non-binding suggestions for the `map` value (e.g. common event names a customer
|
|
76
|
+
* might want to use).
|
|
77
|
+
*/
|
|
78
|
+
suggestedOptions?: Array<Mapping.SuggestedOption> | null;
|
|
79
|
+
}
|
|
80
|
+
namespace Mapping {
|
|
81
|
+
interface Option {
|
|
82
|
+
label: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}
|
|
85
|
+
interface SuggestedOption {
|
|
86
|
+
label: string;
|
|
87
|
+
value: string;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export interface MappingTemplateListParams {
|
|
93
|
+
/**
|
|
94
|
+
* Destination or source id. Required.
|
|
95
|
+
*/
|
|
96
|
+
entityId: string;
|
|
97
|
+
}
|
|
98
|
+
export declare namespace MappingTemplates {
|
|
99
|
+
export { type MappingTemplateListResponse as MappingTemplateListResponse, type MappingTemplateListParams as MappingTemplateListParams, };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=mapping-templates.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-templates.d.mts","sourceRoot":"","sources":["../src/resources/mapping-templates.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,CAAC,KAAK,EAAE,yBAAyB,EAAE,OAAO,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Z,WAAW,GACX,WAAW,GACX,WAAW,GACX,IAAI,CAAC;YAET;;eAEG;YACH,mBAAmB,CAAC,EAAE,KAAK,CACvB,WAAW,GACX,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,SAAS,GACT,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,gCAAgC,GAChC,aAAa,GACb,aAAa,GACb,WAAW,GACX,WAAW,GACX,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,CACd,GAAG,IAAI,CAAC;YAET;;;eAGG;YACH,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;YAEvC;;;eAGG;YACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;SAC1D;QAED,UAAiB,OAAO,CAAC;YACvB,UAAiB,MAAM;gBACrB,KAAK,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,CAAC;aACf;YAED,UAAiB,eAAe;gBAC9B,KAAK,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,CAAC;aACf;SACF;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 MappingTemplates extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Discover every mapping template available for a destination or source, with full
|
|
7
|
+
* property descriptors inlined. Use the returned `id` as `templateId` when calling
|
|
8
|
+
* `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
|
|
9
|
+
* `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
|
|
10
|
+
* any enforced `options`. The `isDefault: true` entry is the destination's
|
|
11
|
+
* built-in default template (the one stored at `MAPPER#{destinationId}` when
|
|
12
|
+
* configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
|
|
13
|
+
* mapping:find
|
|
14
|
+
*/
|
|
15
|
+
list(query: MappingTemplateListParams, options?: RequestOptions): APIPromise<MappingTemplateListResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface MappingTemplateListResponse {
|
|
18
|
+
entities: Array<MappingTemplateListResponse.Entity>;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace MappingTemplateListResponse {
|
|
21
|
+
interface Entity {
|
|
22
|
+
/**
|
|
23
|
+
* Template identifier — pass to `POST /rest/v1/mappings` as `templateId`.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* True for the destination's built-in default template (the one stored at
|
|
28
|
+
* `MAPPER#{destinationId}` when configured). Sources only have one template; it is
|
|
29
|
+
* always default.
|
|
30
|
+
*/
|
|
31
|
+
isDefault: boolean;
|
|
32
|
+
mappings: Array<Entity.Mapping>;
|
|
33
|
+
name: string;
|
|
34
|
+
description?: string | null;
|
|
35
|
+
}
|
|
36
|
+
namespace Entity {
|
|
37
|
+
interface Mapping {
|
|
38
|
+
/**
|
|
39
|
+
* Long-form description / tooltip for this property.
|
|
40
|
+
*/
|
|
41
|
+
description: string | null;
|
|
42
|
+
isPII: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Type information for SDK validation (Text, Integer, Email, Url, IP, Object,
|
|
45
|
+
* KnownObject, Date, DateTime, Array, Boolean, JSON).
|
|
46
|
+
*/
|
|
47
|
+
kind: 'Array' | 'Boolean' | 'Date' | 'DateTime' | 'Email' | 'IP' | 'Integer' | 'JSON' | 'KnownObject' | 'Object' | 'Text' | 'Url';
|
|
48
|
+
/**
|
|
49
|
+
* Human-readable label (e.g. "Email", "Event Name").
|
|
50
|
+
*/
|
|
51
|
+
label: string;
|
|
52
|
+
/**
|
|
53
|
+
* The template default source expression, e.g. `{{visitor.email}}`.
|
|
54
|
+
*/
|
|
55
|
+
map: string;
|
|
56
|
+
/**
|
|
57
|
+
* The value to send as `mappings[].property` when creating or patching a mapping.
|
|
58
|
+
*/
|
|
59
|
+
property: string;
|
|
60
|
+
required: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The template default modification (hashing / case / URL truncation).
|
|
63
|
+
*/
|
|
64
|
+
modification?: 'CamelCase' | 'DmaIP' | 'DomainOnly' | 'DomainPathOnly' | 'DomainPathUTMs' | 'DomainUTMs' | 'FakeDomain' | 'FakeDomainRealPath' | 'FakeIP' | 'FullUrl' | 'Hash' | 'HashMD5' | 'HashedCountry' | 'HashedDateOfBirth' | 'HashedGender' | 'HashedNormalized' | 'HashedNormalizedNoSpecialChars' | 'HashedPhone' | 'HashedState' | 'HashedZip' | 'KebabCase' | 'LowerCase' | 'None' | 'Null' | 'Redacted' | 'RegionalIP' | 'SnakeCase' | 'StartCase' | 'UpperCase' | null;
|
|
65
|
+
/**
|
|
66
|
+
* Suggested modification options for this property. Not a whitelist.
|
|
67
|
+
*/
|
|
68
|
+
modificationOptions?: Array<'CamelCase' | 'DmaIP' | 'DomainOnly' | 'DomainPathOnly' | 'DomainPathUTMs' | 'DomainUTMs' | 'FakeDomain' | 'FakeDomainRealPath' | 'FakeIP' | 'FullUrl' | 'Hash' | 'HashMD5' | 'HashedCountry' | 'HashedDateOfBirth' | 'HashedGender' | 'HashedNormalized' | 'HashedNormalizedNoSpecialChars' | 'HashedPhone' | 'HashedState' | 'HashedZip' | 'KebabCase' | 'LowerCase' | 'None' | 'Null' | 'Redacted' | 'RegionalIP' | 'SnakeCase' | 'StartCase' | 'UpperCase'> | null;
|
|
69
|
+
/**
|
|
70
|
+
* When set, the ONLY valid `map` values for this property. Typically used for
|
|
71
|
+
* enum-shaped destinations.
|
|
72
|
+
*/
|
|
73
|
+
options?: Array<Mapping.Option> | null;
|
|
74
|
+
/**
|
|
75
|
+
* Non-binding suggestions for the `map` value (e.g. common event names a customer
|
|
76
|
+
* might want to use).
|
|
77
|
+
*/
|
|
78
|
+
suggestedOptions?: Array<Mapping.SuggestedOption> | null;
|
|
79
|
+
}
|
|
80
|
+
namespace Mapping {
|
|
81
|
+
interface Option {
|
|
82
|
+
label: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}
|
|
85
|
+
interface SuggestedOption {
|
|
86
|
+
label: string;
|
|
87
|
+
value: string;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export interface MappingTemplateListParams {
|
|
93
|
+
/**
|
|
94
|
+
* Destination or source id. Required.
|
|
95
|
+
*/
|
|
96
|
+
entityId: string;
|
|
97
|
+
}
|
|
98
|
+
export declare namespace MappingTemplates {
|
|
99
|
+
export { type MappingTemplateListResponse as MappingTemplateListResponse, type MappingTemplateListParams as MappingTemplateListParams, };
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=mapping-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-templates.d.ts","sourceRoot":"","sources":["../src/resources/mapping-templates.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,CAAC,KAAK,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CA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;YAET;;eAEG;YACH,mBAAmB,CAAC,EAAE,KAAK,CACvB,WAAW,GACX,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,oBAAoB,GACpB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,SAAS,GACT,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,gCAAgC,GAChC,aAAa,GACb,aAAa,GACb,WAAW,GACX,WAAW,GACX,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,CACd,GAAG,IAAI,CAAC;YAET;;;eAGG;YACH,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;YAEvC;;;eAGG;YACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;SAC1D;QAED,UAAiB,OAAO,CAAC;YACvB,UAAiB,MAAM;gBACrB,KAAK,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,CAAC;aACf;YAED,UAAiB,eAAe;gBAC9B,KAAK,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,CAAC;aACf;SACF;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,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.MappingTemplates = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class MappingTemplates extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Discover every mapping template available for a destination or source, with full
|
|
9
|
+
* property descriptors inlined. Use the returned `id` as `templateId` when calling
|
|
10
|
+
* `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
|
|
11
|
+
* `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
|
|
12
|
+
* any enforced `options`. The `isDefault: true` entry is the destination's
|
|
13
|
+
* built-in default template (the one stored at `MAPPER#{destinationId}` when
|
|
14
|
+
* configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
|
|
15
|
+
* mapping:find
|
|
16
|
+
*/
|
|
17
|
+
list(query, options) {
|
|
18
|
+
return this._client.get('/rest/v1/mapping-templates', { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MappingTemplates = MappingTemplates;
|
|
22
|
+
//# sourceMappingURL=mapping-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-templates.js","sourceRoot":"","sources":["../src/resources/mapping-templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAgC,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAdD,4CAcC"}
|
|
@@ -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 MappingTemplates extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Discover every mapping template available for a destination or source, with full
|
|
6
|
+
* property descriptors inlined. Use the returned `id` as `templateId` when calling
|
|
7
|
+
* `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
|
|
8
|
+
* `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
|
|
9
|
+
* any enforced `options`. The `isDefault: true` entry is the destination's
|
|
10
|
+
* built-in default template (the one stored at `MAPPER#{destinationId}` when
|
|
11
|
+
* configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
|
|
12
|
+
* mapping:find
|
|
13
|
+
*/
|
|
14
|
+
list(query, options) {
|
|
15
|
+
return this._client.get('/rest/v1/mapping-templates', { query, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=mapping-templates.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-templates.mjs","sourceRoot":"","sources":["../src/resources/mapping-templates.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAgC,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|