@oursprivacy/platform-sdk 1.20.0 → 1.22.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 +28 -0
- 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 +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- 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/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/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 +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/locations.d.mts.map +1 -1
- package/resources/locations.d.ts.map +1 -1
- package/resources/locations.mjs.map +1 -1
- package/resources/mappings.d.mts +373 -6
- package/resources/mappings.d.mts.map +1 -1
- package/resources/mappings.d.ts +373 -6
- package/resources/mappings.d.ts.map +1 -1
- package/resources/mappings.js +67 -3
- package/resources/mappings.js.map +1 -1
- package/resources/mappings.mjs +67 -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.map +1 -1
- package/resources/web-scanner-rules.d.ts.map +1 -1
- package/resources/web-scanner-rules.mjs.map +1 -1
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts.map +1 -1
- package/resources/web-scanners.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +29 -9
- package/src/resources/default-mappings.ts +332 -0
- package/src/resources/destinations.ts +189 -4
- package/src/resources/index.ts +14 -4
- package/src/resources/mappings.ts +663 -5
- 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
- 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/src/resources/destination-types.ts +0 -373
package/resources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,qCAAkC"}
|
package/resources.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
|
package/src/client.ts
CHANGED
|
@@ -39,10 +39,12 @@ import {
|
|
|
39
39
|
ConsentSettings,
|
|
40
40
|
} from './resources/consent-settings';
|
|
41
41
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
DefaultMappingListResponse,
|
|
43
|
+
DefaultMappingReplaceParams,
|
|
44
|
+
DefaultMappingReplaceResponse,
|
|
45
|
+
DefaultMappingRetrieveResponse,
|
|
46
|
+
DefaultMappings,
|
|
47
|
+
} from './resources/default-mappings';
|
|
46
48
|
import {
|
|
47
49
|
DestinationCreateParams,
|
|
48
50
|
DestinationCreateResponse,
|
|
@@ -51,6 +53,7 @@ import {
|
|
|
51
53
|
DestinationListResponse,
|
|
52
54
|
DestinationListResponsesCursor,
|
|
53
55
|
DestinationRetrieveResponse,
|
|
56
|
+
DestinationTypesResponse,
|
|
54
57
|
DestinationUpdateParams,
|
|
55
58
|
DestinationUpdateResponse,
|
|
56
59
|
Destinations,
|
|
@@ -136,11 +139,18 @@ import {
|
|
|
136
139
|
import {
|
|
137
140
|
MappingCreateParams,
|
|
138
141
|
MappingCreateResponse,
|
|
142
|
+
MappingCustomVariablesResponse,
|
|
143
|
+
MappingDefaultVariablesResponse,
|
|
139
144
|
MappingDeleteResponse,
|
|
140
145
|
MappingListParams,
|
|
141
146
|
MappingListResponse,
|
|
142
147
|
MappingListResponsesCursor,
|
|
148
|
+
MappingModificationsResponse,
|
|
149
|
+
MappingReorderParams,
|
|
150
|
+
MappingReorderResponse,
|
|
143
151
|
MappingRetrieveResponse,
|
|
152
|
+
MappingTemplatesParams,
|
|
153
|
+
MappingTemplatesResponse,
|
|
144
154
|
MappingUpdateParams,
|
|
145
155
|
MappingUpdateResponse,
|
|
146
156
|
Mappings,
|
|
@@ -943,7 +953,7 @@ export class OursPrivacyPlatform {
|
|
|
943
953
|
|
|
944
954
|
allowedEvents: API.AllowedEvents = new API.AllowedEvents(this);
|
|
945
955
|
consentSettings: API.ConsentSettings = new API.ConsentSettings(this);
|
|
946
|
-
|
|
956
|
+
defaultMappings: API.DefaultMappings = new API.DefaultMappings(this);
|
|
947
957
|
destinations: API.Destinations = new API.Destinations(this);
|
|
948
958
|
experimentSettings: API.ExperimentSettings = new API.ExperimentSettings(this);
|
|
949
959
|
experimentVariants: API.ExperimentVariants = new API.ExperimentVariants(this);
|
|
@@ -961,7 +971,7 @@ export class OursPrivacyPlatform {
|
|
|
961
971
|
|
|
962
972
|
OursPrivacyPlatform.AllowedEvents = AllowedEvents;
|
|
963
973
|
OursPrivacyPlatform.ConsentSettings = ConsentSettings;
|
|
964
|
-
OursPrivacyPlatform.
|
|
974
|
+
OursPrivacyPlatform.DefaultMappings = DefaultMappings;
|
|
965
975
|
OursPrivacyPlatform.Destinations = Destinations;
|
|
966
976
|
OursPrivacyPlatform.ExperimentSettings = ExperimentSettings;
|
|
967
977
|
OursPrivacyPlatform.ExperimentVariants = ExperimentVariants;
|
|
@@ -1004,9 +1014,11 @@ export declare namespace OursPrivacyPlatform {
|
|
|
1004
1014
|
};
|
|
1005
1015
|
|
|
1006
1016
|
export {
|
|
1007
|
-
|
|
1008
|
-
type
|
|
1009
|
-
type
|
|
1017
|
+
DefaultMappings as DefaultMappings,
|
|
1018
|
+
type DefaultMappingListResponse as DefaultMappingListResponse,
|
|
1019
|
+
type DefaultMappingRetrieveResponse as DefaultMappingRetrieveResponse,
|
|
1020
|
+
type DefaultMappingReplaceResponse as DefaultMappingReplaceResponse,
|
|
1021
|
+
type DefaultMappingReplaceParams as DefaultMappingReplaceParams,
|
|
1010
1022
|
};
|
|
1011
1023
|
|
|
1012
1024
|
export {
|
|
@@ -1016,6 +1028,7 @@ export declare namespace OursPrivacyPlatform {
|
|
|
1016
1028
|
type DestinationRetrieveResponse as DestinationRetrieveResponse,
|
|
1017
1029
|
type DestinationUpdateResponse as DestinationUpdateResponse,
|
|
1018
1030
|
type DestinationDeleteResponse as DestinationDeleteResponse,
|
|
1031
|
+
type DestinationTypesResponse as DestinationTypesResponse,
|
|
1019
1032
|
type DestinationListResponsesCursor as DestinationListResponsesCursor,
|
|
1020
1033
|
type DestinationListParams as DestinationListParams,
|
|
1021
1034
|
type DestinationCreateParams as DestinationCreateParams,
|
|
@@ -1113,10 +1126,17 @@ export declare namespace OursPrivacyPlatform {
|
|
|
1113
1126
|
type MappingRetrieveResponse as MappingRetrieveResponse,
|
|
1114
1127
|
type MappingUpdateResponse as MappingUpdateResponse,
|
|
1115
1128
|
type MappingDeleteResponse as MappingDeleteResponse,
|
|
1129
|
+
type MappingReorderResponse as MappingReorderResponse,
|
|
1130
|
+
type MappingTemplatesResponse as MappingTemplatesResponse,
|
|
1131
|
+
type MappingDefaultVariablesResponse as MappingDefaultVariablesResponse,
|
|
1132
|
+
type MappingCustomVariablesResponse as MappingCustomVariablesResponse,
|
|
1133
|
+
type MappingModificationsResponse as MappingModificationsResponse,
|
|
1116
1134
|
type MappingListResponsesCursor as MappingListResponsesCursor,
|
|
1117
1135
|
type MappingListParams as MappingListParams,
|
|
1118
1136
|
type MappingCreateParams as MappingCreateParams,
|
|
1119
1137
|
type MappingUpdateParams as MappingUpdateParams,
|
|
1138
|
+
type MappingReorderParams as MappingReorderParams,
|
|
1139
|
+
type MappingTemplatesParams as MappingTemplatesParams,
|
|
1120
1140
|
};
|
|
1121
1141
|
|
|
1122
1142
|
export {
|
|
@@ -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
|
+
}
|
|
@@ -54,6 +54,18 @@ export class Destinations extends APIResource {
|
|
|
54
54
|
delete(id: string, options?: RequestOptions): APIPromise<DestinationDeleteResponse> {
|
|
55
55
|
return this._client.delete(path`/rest/v1/destinations/${id}`, options);
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Lists every destination type the platform supports, with its human-readable
|
|
60
|
+
* label, capability flags (oauth, listsAccounts, supportsRenamedEvents), and the
|
|
61
|
+
* settings descriptor used to configure a destination of that type.
|
|
62
|
+
* Account-agnostic — the response is the same for every API key. Filter
|
|
63
|
+
* client-side to find a specific type (e.g. `Klaviyo`, `Facebook`). Requires
|
|
64
|
+
* scope: destination:list
|
|
65
|
+
*/
|
|
66
|
+
types(options?: RequestOptions): APIPromise<DestinationTypesResponse> {
|
|
67
|
+
return this._client.get('/rest/v1/destinations/types', options);
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
|
|
59
71
|
export type DestinationListResponsesCursor = Cursor<DestinationListResponse>;
|
|
@@ -456,6 +468,178 @@ export interface DestinationUpdateResponse {
|
|
|
456
468
|
|
|
457
469
|
export type DestinationDeleteResponse = boolean;
|
|
458
470
|
|
|
471
|
+
export interface DestinationTypesResponse {
|
|
472
|
+
entities: Array<DestinationTypesResponse.Entity>;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export namespace DestinationTypesResponse {
|
|
476
|
+
export interface Entity {
|
|
477
|
+
id:
|
|
478
|
+
| 'Audiohook'
|
|
479
|
+
| 'BasisPostback'
|
|
480
|
+
| 'OursSyntheticData'
|
|
481
|
+
| 'FullContact'
|
|
482
|
+
| 'ZoomInfo'
|
|
483
|
+
| 'TheTradeDesk'
|
|
484
|
+
| 'Braze'
|
|
485
|
+
| 'LiveIntent'
|
|
486
|
+
| 'ConvertABTestingEvent'
|
|
487
|
+
| 'Customerio'
|
|
488
|
+
| 'BingAds'
|
|
489
|
+
| 'BingAdsWeb'
|
|
490
|
+
| 'HTTPDestination'
|
|
491
|
+
| 'Woopra'
|
|
492
|
+
| 'HTTPCustomRequest'
|
|
493
|
+
| 'Google'
|
|
494
|
+
| 'GoogleAdsServerContainer'
|
|
495
|
+
| 'G4Analytics'
|
|
496
|
+
| 'GA4ServerProxy'
|
|
497
|
+
| 'GA4MeasurementProtocol'
|
|
498
|
+
| 'GoogleAds360'
|
|
499
|
+
| 'Facebook'
|
|
500
|
+
| 'Mixpanel'
|
|
501
|
+
| 'Amplitude'
|
|
502
|
+
| 'TikTok'
|
|
503
|
+
| 'Reddit'
|
|
504
|
+
| 'Podscribe'
|
|
505
|
+
| 'Pinterest'
|
|
506
|
+
| 'Mailchimp'
|
|
507
|
+
| 'AWSKinesis'
|
|
508
|
+
| 'AWSLambda'
|
|
509
|
+
| 'GooglePubSub'
|
|
510
|
+
| 'LinkedInAdsCAPI'
|
|
511
|
+
| 'ActiveCampaignApi'
|
|
512
|
+
| 'StackAdaptAPI'
|
|
513
|
+
| 'Hubspot'
|
|
514
|
+
| 'Klaviyo'
|
|
515
|
+
| 'XAds'
|
|
516
|
+
| 'QuoraAds'
|
|
517
|
+
| 'SnapchatAdsCapi'
|
|
518
|
+
| 'Partnerize'
|
|
519
|
+
| 'NextdoorAds'
|
|
520
|
+
| 'Tatari'
|
|
521
|
+
| 'Viant'
|
|
522
|
+
| 'Impact'
|
|
523
|
+
| 'Spotify'
|
|
524
|
+
| 'Taboola'
|
|
525
|
+
| 'AmazonDSP'
|
|
526
|
+
| 'AppLovin'
|
|
527
|
+
| 'IHeartMediaMagellan'
|
|
528
|
+
| 'Vibe'
|
|
529
|
+
| 'GoogleDataManagerEventIngest'
|
|
530
|
+
| 'Zendesk'
|
|
531
|
+
| 'Iterable'
|
|
532
|
+
| 'ArtsAI'
|
|
533
|
+
| 'QuantcastCAPI'
|
|
534
|
+
| 'FloodlightSGTM'
|
|
535
|
+
| 'VWO'
|
|
536
|
+
| 'Attentive'
|
|
537
|
+
| 'Admitad'
|
|
538
|
+
| 'Plausible'
|
|
539
|
+
| 'PostHog'
|
|
540
|
+
| 'RokuCAPI'
|
|
541
|
+
| 'Everflow'
|
|
542
|
+
| 'BeeswaxPostback'
|
|
543
|
+
| 'AdobeAnalytics';
|
|
544
|
+
|
|
545
|
+
capabilities: Entity.Capabilities;
|
|
546
|
+
|
|
547
|
+
label: string;
|
|
548
|
+
|
|
549
|
+
settings: Array<
|
|
550
|
+
| Entity.UnionMember0
|
|
551
|
+
| Entity.UnionMember1
|
|
552
|
+
| Entity.UnionMember2
|
|
553
|
+
| Entity.UnionMember3
|
|
554
|
+
| Entity.UnionMember4
|
|
555
|
+
>;
|
|
556
|
+
|
|
557
|
+
status: 'deprecated' | 'ga';
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export namespace Entity {
|
|
561
|
+
export interface Capabilities {
|
|
562
|
+
listsAccounts: boolean;
|
|
563
|
+
|
|
564
|
+
oauth: boolean;
|
|
565
|
+
|
|
566
|
+
supportsRenamedEvents: boolean;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export interface UnionMember0 {
|
|
570
|
+
key: string;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Informational display message only. Do not send this key in POST or PATCH
|
|
574
|
+
* settings.
|
|
575
|
+
*/
|
|
576
|
+
label: string;
|
|
577
|
+
|
|
578
|
+
type: 'Alert';
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export interface UnionMember1 {
|
|
582
|
+
key: string;
|
|
583
|
+
|
|
584
|
+
label: string;
|
|
585
|
+
|
|
586
|
+
options: Array<UnionMember1.Option>;
|
|
587
|
+
|
|
588
|
+
type: 'Select';
|
|
589
|
+
|
|
590
|
+
required?: boolean | null;
|
|
591
|
+
|
|
592
|
+
sublabel?: string | null;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export namespace UnionMember1 {
|
|
596
|
+
export interface Option {
|
|
597
|
+
label: string;
|
|
598
|
+
|
|
599
|
+
value: string;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export interface UnionMember2 {
|
|
604
|
+
key: string;
|
|
605
|
+
|
|
606
|
+
label: string;
|
|
607
|
+
|
|
608
|
+
type: 'Switch';
|
|
609
|
+
|
|
610
|
+
defaultValue?: boolean | null;
|
|
611
|
+
|
|
612
|
+
required?: boolean | null;
|
|
613
|
+
|
|
614
|
+
sublabel?: string | null;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export interface UnionMember3 {
|
|
618
|
+
key: string;
|
|
619
|
+
|
|
620
|
+
label: string;
|
|
621
|
+
|
|
622
|
+
type: 'GenericOauth';
|
|
623
|
+
|
|
624
|
+
sublabel?: string | null;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export interface UnionMember4 {
|
|
628
|
+
key: string;
|
|
629
|
+
|
|
630
|
+
label: string;
|
|
631
|
+
|
|
632
|
+
placeholder: string;
|
|
633
|
+
|
|
634
|
+
type: 'Text' | 'Secret';
|
|
635
|
+
|
|
636
|
+
required?: boolean | null;
|
|
637
|
+
|
|
638
|
+
sublabel?: string | null;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
459
643
|
export interface DestinationListParams extends CursorParams {
|
|
460
644
|
/**
|
|
461
645
|
* Filter destinations by status.
|
|
@@ -620,8 +804,8 @@ export interface DestinationCreateParams {
|
|
|
620
804
|
name?: string | null;
|
|
621
805
|
|
|
622
806
|
/**
|
|
623
|
-
* Per-type configuration keys and values. Call GET /rest/v1/
|
|
624
|
-
*
|
|
807
|
+
* Per-type configuration keys and values. Call GET /rest/v1/destinations/types to
|
|
808
|
+
* get the valid keys for your destination type.
|
|
625
809
|
*/
|
|
626
810
|
settings?: unknown | null;
|
|
627
811
|
}
|
|
@@ -634,8 +818,8 @@ export interface DestinationUpdateParams {
|
|
|
634
818
|
name?: string | null;
|
|
635
819
|
|
|
636
820
|
/**
|
|
637
|
-
* Per-type configuration keys and values. Call GET /rest/v1/
|
|
638
|
-
*
|
|
821
|
+
* Per-type configuration keys and values. Call GET /rest/v1/destinations/types to
|
|
822
|
+
* get the valid keys for your destination type.
|
|
639
823
|
*/
|
|
640
824
|
settings?: unknown | null;
|
|
641
825
|
|
|
@@ -649,6 +833,7 @@ export declare namespace Destinations {
|
|
|
649
833
|
type DestinationRetrieveResponse as DestinationRetrieveResponse,
|
|
650
834
|
type DestinationUpdateResponse as DestinationUpdateResponse,
|
|
651
835
|
type DestinationDeleteResponse as DestinationDeleteResponse,
|
|
836
|
+
type DestinationTypesResponse as DestinationTypesResponse,
|
|
652
837
|
type DestinationListResponsesCursor as DestinationListResponsesCursor,
|
|
653
838
|
type DestinationListParams as DestinationListParams,
|
|
654
839
|
type DestinationCreateParams as DestinationCreateParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -20,10 +20,12 @@ export {
|
|
|
20
20
|
type ConsentSettingUpdateParams,
|
|
21
21
|
} from './consent-settings';
|
|
22
22
|
export {
|
|
23
|
-
|
|
24
|
-
type
|
|
25
|
-
type
|
|
26
|
-
|
|
23
|
+
DefaultMappings,
|
|
24
|
+
type DefaultMappingListResponse,
|
|
25
|
+
type DefaultMappingRetrieveResponse,
|
|
26
|
+
type DefaultMappingReplaceResponse,
|
|
27
|
+
type DefaultMappingReplaceParams,
|
|
28
|
+
} from './default-mappings';
|
|
27
29
|
export {
|
|
28
30
|
Destinations,
|
|
29
31
|
type DestinationListResponse,
|
|
@@ -31,6 +33,7 @@ export {
|
|
|
31
33
|
type DestinationRetrieveResponse,
|
|
32
34
|
type DestinationUpdateResponse,
|
|
33
35
|
type DestinationDeleteResponse,
|
|
36
|
+
type DestinationTypesResponse,
|
|
34
37
|
type DestinationListParams,
|
|
35
38
|
type DestinationCreateParams,
|
|
36
39
|
type DestinationUpdateParams,
|
|
@@ -121,9 +124,16 @@ export {
|
|
|
121
124
|
type MappingRetrieveResponse,
|
|
122
125
|
type MappingUpdateResponse,
|
|
123
126
|
type MappingDeleteResponse,
|
|
127
|
+
type MappingReorderResponse,
|
|
128
|
+
type MappingTemplatesResponse,
|
|
129
|
+
type MappingDefaultVariablesResponse,
|
|
130
|
+
type MappingCustomVariablesResponse,
|
|
131
|
+
type MappingModificationsResponse,
|
|
124
132
|
type MappingListParams,
|
|
125
133
|
type MappingCreateParams,
|
|
126
134
|
type MappingUpdateParams,
|
|
135
|
+
type MappingReorderParams,
|
|
136
|
+
type MappingTemplatesParams,
|
|
127
137
|
type MappingListResponsesCursor,
|
|
128
138
|
} from './mappings';
|
|
129
139
|
export {
|