@oursprivacy/platform-sdk 1.45.0 → 1.47.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 (178) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +25 -13
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +25 -13
  5. package/client.d.ts.map +1 -1
  6. package/client.js +14 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +14 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/attribution.d.mts +9 -1
  12. package/resources/attribution.d.mts.map +1 -1
  13. package/resources/attribution.d.ts +9 -1
  14. package/resources/attribution.d.ts.map +1 -1
  15. package/resources/consent-settings.d.mts +48 -0
  16. package/resources/consent-settings.d.mts.map +1 -1
  17. package/resources/consent-settings.d.ts +48 -0
  18. package/resources/consent-settings.d.ts.map +1 -1
  19. package/resources/conversion-journey-summaries.d.mts +38 -0
  20. package/resources/conversion-journey-summaries.d.mts.map +1 -1
  21. package/resources/conversion-journey-summaries.d.ts +38 -0
  22. package/resources/conversion-journey-summaries.d.ts.map +1 -1
  23. package/resources/conversion-journey-summaries.js +38 -0
  24. package/resources/conversion-journey-summaries.js.map +1 -1
  25. package/resources/conversion-journey-summaries.mjs +38 -0
  26. package/resources/conversion-journey-summaries.mjs.map +1 -1
  27. package/resources/data-governance.d.mts +5 -5
  28. package/resources/data-governance.d.mts.map +1 -1
  29. package/resources/data-governance.d.ts +5 -5
  30. package/resources/data-governance.d.ts.map +1 -1
  31. package/resources/destinations.d.mts +7 -27
  32. package/resources/destinations.d.mts.map +1 -1
  33. package/resources/destinations.d.ts +7 -27
  34. package/resources/destinations.d.ts.map +1 -1
  35. package/resources/experiment-variants.d.mts +4 -2
  36. package/resources/experiment-variants.d.mts.map +1 -1
  37. package/resources/experiment-variants.d.ts +4 -2
  38. package/resources/experiment-variants.d.ts.map +1 -1
  39. package/resources/experiments.d.mts +677 -102
  40. package/resources/experiments.d.mts.map +1 -1
  41. package/resources/experiments.d.ts +677 -102
  42. package/resources/experiments.d.ts.map +1 -1
  43. package/resources/experiments.js +32 -2
  44. package/resources/experiments.js.map +1 -1
  45. package/resources/experiments.mjs +32 -2
  46. package/resources/experiments.mjs.map +1 -1
  47. package/resources/funnels.d.mts +172 -22
  48. package/resources/funnels.d.mts.map +1 -1
  49. package/resources/funnels.d.ts +172 -22
  50. package/resources/funnels.d.ts.map +1 -1
  51. package/resources/funnels.js +10 -2
  52. package/resources/funnels.js.map +1 -1
  53. package/resources/funnels.mjs +10 -2
  54. package/resources/funnels.mjs.map +1 -1
  55. package/resources/heatmap-pages.d.mts +42 -14
  56. package/resources/heatmap-pages.d.mts.map +1 -1
  57. package/resources/heatmap-pages.d.ts +42 -14
  58. package/resources/heatmap-pages.d.ts.map +1 -1
  59. package/resources/heatmap-pages.js +11 -7
  60. package/resources/heatmap-pages.js.map +1 -1
  61. package/resources/heatmap-pages.mjs +11 -7
  62. package/resources/heatmap-pages.mjs.map +1 -1
  63. package/resources/index.d.mts +10 -6
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +10 -6
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js +9 -1
  68. package/resources/index.js.map +1 -1
  69. package/resources/index.mjs +4 -0
  70. package/resources/index.mjs.map +1 -1
  71. package/resources/mappings.d.mts +2 -2
  72. package/resources/mappings.d.mts.map +1 -1
  73. package/resources/mappings.d.ts +2 -2
  74. package/resources/mappings.d.ts.map +1 -1
  75. package/resources/personalization-properties.d.mts +547 -0
  76. package/resources/personalization-properties.d.mts.map +1 -0
  77. package/resources/personalization-properties.d.ts +547 -0
  78. package/resources/personalization-properties.d.ts.map +1 -0
  79. package/resources/personalization-properties.js +100 -0
  80. package/resources/personalization-properties.js.map +1 -0
  81. package/resources/personalization-properties.mjs +96 -0
  82. package/resources/personalization-properties.mjs.map +1 -0
  83. package/resources/session-replays.d.mts +91 -0
  84. package/resources/session-replays.d.mts.map +1 -0
  85. package/resources/session-replays.d.ts +91 -0
  86. package/resources/session-replays.d.ts.map +1 -0
  87. package/resources/session-replays.js +24 -0
  88. package/resources/session-replays.js.map +1 -0
  89. package/resources/session-replays.mjs +20 -0
  90. package/resources/session-replays.mjs.map +1 -0
  91. package/resources/short-links.d.mts +138 -37
  92. package/resources/short-links.d.mts.map +1 -1
  93. package/resources/short-links.d.ts +138 -37
  94. package/resources/short-links.d.ts.map +1 -1
  95. package/resources/short-links.js +27 -12
  96. package/resources/short-links.js.map +1 -1
  97. package/resources/short-links.mjs +27 -12
  98. package/resources/short-links.mjs.map +1 -1
  99. package/resources/sources.d.mts +10 -6
  100. package/resources/sources.d.mts.map +1 -1
  101. package/resources/sources.d.ts +10 -6
  102. package/resources/sources.d.ts.map +1 -1
  103. package/resources/tag-manager-tags.d.mts +2 -2
  104. package/resources/tag-manager-tags.d.ts +2 -2
  105. package/resources/tag-manager-tags.js +2 -2
  106. package/resources/tag-manager-tags.mjs +2 -2
  107. package/resources/tag-manager-triggers.d.mts +18 -1
  108. package/resources/tag-manager-triggers.d.mts.map +1 -1
  109. package/resources/tag-manager-triggers.d.ts +18 -1
  110. package/resources/tag-manager-triggers.d.ts.map +1 -1
  111. package/resources/translation-widgets.d.mts +62 -0
  112. package/resources/translation-widgets.d.mts.map +1 -0
  113. package/resources/translation-widgets.d.ts +62 -0
  114. package/resources/translation-widgets.d.ts.map +1 -0
  115. package/resources/translation-widgets.js +18 -0
  116. package/resources/translation-widgets.js.map +1 -0
  117. package/resources/translation-widgets.mjs +14 -0
  118. package/resources/translation-widgets.mjs.map +1 -0
  119. package/resources/versions.d.mts +52 -1
  120. package/resources/versions.d.mts.map +1 -1
  121. package/resources/versions.d.ts +52 -1
  122. package/resources/versions.d.ts.map +1 -1
  123. package/resources/versions.js +20 -0
  124. package/resources/versions.js.map +1 -1
  125. package/resources/versions.mjs +20 -0
  126. package/resources/versions.mjs.map +1 -1
  127. package/resources/video-channels.d.mts +17 -17
  128. package/resources/video-channels.d.mts.map +1 -1
  129. package/resources/video-channels.d.ts +17 -17
  130. package/resources/video-channels.d.ts.map +1 -1
  131. package/resources/video-channels.js +17 -16
  132. package/resources/video-channels.js.map +1 -1
  133. package/resources/video-channels.mjs +17 -16
  134. package/resources/video-channels.mjs.map +1 -1
  135. package/resources/web-analytics.d.mts +345 -0
  136. package/resources/web-analytics.d.mts.map +1 -0
  137. package/resources/web-analytics.d.ts +345 -0
  138. package/resources/web-analytics.d.ts.map +1 -0
  139. package/resources/web-analytics.js +61 -0
  140. package/resources/web-analytics.js.map +1 -0
  141. package/resources/web-analytics.mjs +57 -0
  142. package/resources/web-analytics.mjs.map +1 -0
  143. package/resources/web-scanners.d.mts +314 -14
  144. package/resources/web-scanners.d.mts.map +1 -1
  145. package/resources/web-scanners.d.ts +314 -14
  146. package/resources/web-scanners.d.ts.map +1 -1
  147. package/resources/web-scanners.js +139 -13
  148. package/resources/web-scanners.js.map +1 -1
  149. package/resources/web-scanners.mjs +139 -13
  150. package/resources/web-scanners.mjs.map +1 -1
  151. package/src/client.ts +147 -19
  152. package/src/resources/attribution.ts +11 -1
  153. package/src/resources/consent-settings.ts +56 -0
  154. package/src/resources/conversion-journey-summaries.ts +38 -0
  155. package/src/resources/data-governance.ts +5 -5
  156. package/src/resources/destinations.ts +18 -115
  157. package/src/resources/experiment-variants.ts +4 -2
  158. package/src/resources/experiments.ts +812 -101
  159. package/src/resources/funnels.ts +276 -21
  160. package/src/resources/heatmap-pages.ts +49 -14
  161. package/src/resources/index.ts +61 -3
  162. package/src/resources/mappings.ts +2 -2
  163. package/src/resources/personalization-properties.ts +662 -0
  164. package/src/resources/session-replays.ts +138 -0
  165. package/src/resources/short-links.ts +164 -36
  166. package/src/resources/sources.ts +11 -0
  167. package/src/resources/tag-manager-tags.ts +2 -2
  168. package/src/resources/tag-manager-triggers.ts +18 -1
  169. package/src/resources/translation-widgets.ts +97 -0
  170. package/src/resources/versions.ts +95 -0
  171. package/src/resources/video-channels.ts +19 -18
  172. package/src/resources/web-analytics.ts +494 -0
  173. package/src/resources/web-scanners.ts +443 -13
  174. package/src/version.ts +1 -1
  175. package/version.d.mts +1 -1
  176. package/version.d.ts +1 -1
  177. package/version.js +1 -1
  178. package/version.mjs +1 -1
@@ -0,0 +1,138 @@
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 SessionReplays extends APIResource {
8
+ /**
9
+ * List recorded sessions for a date range. Filter by event, page, visitor, UTM
10
+ * fields, or an explicit JSON-encoded session ID list. Use `pagination.nextCursor`
11
+ * to retrieve the next page. Requires scope: web-analytics:view
12
+ */
13
+ list(query: SessionReplayListParams, options?: RequestOptions): APIPromise<SessionReplayListResponse> {
14
+ return this._client.get('/rest/v1/session-replays', { query, ...options });
15
+ }
16
+
17
+ /**
18
+ * Return the total number of replay-bearing sessions and a daily timeseries for
19
+ * the requested date range. Requires scope: web-analytics:view
20
+ */
21
+ overview(
22
+ query: SessionReplayOverviewParams,
23
+ options?: RequestOptions,
24
+ ): APIPromise<SessionReplayOverviewResponse> {
25
+ return this._client.get('/rest/v1/session-replays/overview', { query, ...options });
26
+ }
27
+ }
28
+
29
+ export interface SessionReplayListResponse {
30
+ items: Array<SessionReplayListResponse.Item>;
31
+
32
+ pagination: SessionReplayListResponse.Pagination;
33
+ }
34
+
35
+ export namespace SessionReplayListResponse {
36
+ export interface Item {
37
+ date: string;
38
+
39
+ duration: number | null;
40
+
41
+ eventCount: number | null;
42
+
43
+ pageCount: number | null;
44
+
45
+ sessionId: string;
46
+
47
+ startTime: string | null;
48
+
49
+ visitorId: string;
50
+ }
51
+
52
+ export interface Pagination {
53
+ hasMore: boolean;
54
+
55
+ nextCursor?: string | null;
56
+ }
57
+ }
58
+
59
+ export interface SessionReplayOverviewResponse {
60
+ timeseries: Array<SessionReplayOverviewResponse.Timesery>;
61
+
62
+ totalReplays: number;
63
+ }
64
+
65
+ export namespace SessionReplayOverviewResponse {
66
+ export interface Timesery {
67
+ date: string;
68
+
69
+ value: number;
70
+ }
71
+ }
72
+
73
+ export interface SessionReplayListParams {
74
+ /**
75
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
76
+ */
77
+ from: string;
78
+
79
+ /**
80
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
81
+ */
82
+ to: string;
83
+
84
+ /**
85
+ * Opaque pagination cursor from pagination.nextCursor in the previous response. Do
86
+ * not decode or modify it. Malformed cursors return 400 Bad Request.
87
+ */
88
+ cursor?: string;
89
+
90
+ eventName?: string;
91
+
92
+ /**
93
+ * Maximum replay sessions to return. Defaults to the report default.
94
+ */
95
+ limit?: number;
96
+
97
+ pathname?: string;
98
+
99
+ /**
100
+ * Optional JSON-encoded session ID array. Maximum 100 session IDs.
101
+ */
102
+ sessionIds?: string;
103
+
104
+ utmCampaign?: string;
105
+
106
+ utmContent?: string;
107
+
108
+ utmMedium?: string;
109
+
110
+ utmName?: string;
111
+
112
+ utmSource?: string;
113
+
114
+ utmTerm?: string;
115
+
116
+ visitorId?: string;
117
+ }
118
+
119
+ export interface SessionReplayOverviewParams {
120
+ /**
121
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
122
+ */
123
+ from: string;
124
+
125
+ /**
126
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
127
+ */
128
+ to: string;
129
+ }
130
+
131
+ export declare namespace SessionReplays {
132
+ export {
133
+ type SessionReplayListResponse as SessionReplayListResponse,
134
+ type SessionReplayOverviewResponse as SessionReplayOverviewResponse,
135
+ type SessionReplayListParams as SessionReplayListParams,
136
+ type SessionReplayOverviewParams as SessionReplayOverviewParams,
137
+ };
138
+ }
@@ -8,10 +8,12 @@ import { path } from '../internal/utils/path';
8
8
 
9
9
  export class ShortLinks extends APIResource {
10
10
  /**
11
- * List all short links (QR codes / redirects) for this account, newest first.
12
- * Supports cursor pagination and optional `status` and `nameContains` filters.
13
- * Each entity bundles the destination URL, the composed public `shortUrl`, and the
14
- * QR/campaign design. Requires scope: source:list
11
+ * List links managed through Short Links for this account, newest first. Ordinary
12
+ * Redirect Tracking sources and legacy links without a saved short-link design are
13
+ * excluded. Supports cursor pagination and optional `status`, `nameContains`, and
14
+ * `search` filters. Search matches names, destinations, and codes. Each entity
15
+ * bundles the destination URL, immutable code, path format, and QR/campaign
16
+ * design. Requires scope: source:list
15
17
  *
16
18
  * @example
17
19
  * ```ts
@@ -33,11 +35,11 @@ export class ShortLinks extends APIResource {
33
35
 
34
36
  /**
35
37
  * Create a short link (QR code / redirect) with its destination, campaign tags,
36
- * and QR styling in a single call. The short code is generated automatically; the
37
- * response `shortUrl` is the public URL the QR encodes. All body fields are
38
- * optional — send `{}` to create an unconfigured link and fill it in later with
39
- * PATCH. A newly created short link only resolves at the edge once a version is
40
- * published. Requires scope: source:create
38
+ * and QR styling in a single call. The server atomically reserves an immutable
39
+ * compact code; `shortUrl` resolves as `/r/{pixel}` without tracking query
40
+ * parameters. All body fields are optional: send `{}` to create an unconfigured
41
+ * link and fill it in later with PATCH. A newly created short link only resolves
42
+ * at the edge once a version is published. Requires scope: source:create
41
43
  *
42
44
  * @example
43
45
  * ```ts
@@ -52,9 +54,9 @@ export class ShortLinks extends APIResource {
52
54
  }
53
55
 
54
56
  /**
55
- * Fetch a single short link by id, including its destination, composed `shortUrl`,
56
- * and QR/campaign design. Returns 404 when no short link matches the id or it
57
- * belongs to a different account. Requires scope: source:view
57
+ * Fetch a single short link by id, including its destination, immutable code,
58
+ * composed `shortUrl`, and QR/campaign design. Returns 404 when no short link
59
+ * matches the id or it belongs to a different account. Requires scope: source:view
58
60
  *
59
61
  * @example
60
62
  * ```ts
@@ -97,6 +99,20 @@ export class ShortLinks extends APIResource {
97
99
  return this._client.delete(path`/rest/v1/short-links/${id}`, options);
98
100
  }
99
101
 
102
+ /**
103
+ * Duplicate a short link with its campaign tags and QR styling. The copy starts
104
+ * disabled with a new code. Requires permission to view the original and create a
105
+ * source. Requires scope: source:create
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const response = await client.shortLinks.clone('id');
110
+ * ```
111
+ */
112
+ clone(id: string, options?: RequestOptions): APIPromise<ShortLinkCloneResponse> {
113
+ return this._client.post(path`/rest/v1/short-links/${id}/clone`, options);
114
+ }
115
+
100
116
  /**
101
117
  * Aggregate click analytics for a short link over a date window: total and unique
102
118
  * clicks, a time series (daily or hourly), and breakdowns by country, city, and
@@ -137,6 +153,11 @@ export interface ShortLinkListResponse {
137
153
 
138
154
  status: 'Disabled' | 'Enabled';
139
155
 
156
+ /**
157
+ * Whether a user selected this code instead of using a generated code.
158
+ */
159
+ hasCustomShortLinkCode?: boolean | null;
160
+
140
161
  /**
141
162
  * Whether this short link exists in the currently published version. An
142
163
  * unpublished short link does not resolve at the edge.
@@ -146,8 +167,8 @@ export interface ShortLinkListResponse {
146
167
  name?: string | null;
147
168
 
148
169
  /**
149
- * The short code embedded in the public URL (`/redirect/{pixel}`).
150
- * Server-assigned.
170
+ * The immutable short code embedded in the public URL (`/r/{pixel}` for new
171
+ * links). Server-assigned.
151
172
  */
152
173
  pixel?: string | null;
153
174
 
@@ -157,14 +178,20 @@ export interface ShortLinkListResponse {
157
178
  redirectUrl?: string | null;
158
179
 
159
180
  /**
160
- * QR styling + campaign tags. Null until the link is styled.
181
+ * The public code embedded in the short-link URL.
182
+ */
183
+ shortLinkCode?: string | null;
184
+
185
+ /**
186
+ * QR styling + campaign tags. New links include an empty design; legacy redirects
187
+ * may return null.
161
188
  */
162
189
  shortLinkDesign?: unknown | null;
163
190
 
164
191
  /**
165
- * The public short-link URL that the QR encodes and callers share. Composed from
166
- * the short code, the link name (sent as the tracked event), and the campaign
167
- * tags. Also resolves on any branded custom domains configured for the account.
192
+ * The public short-link URL that the QR encodes and callers share. New links use
193
+ * `/r/{pixel}`; tracked event and campaign defaults are stored server-side. Also
194
+ * resolves on branded custom domains configured for the account.
168
195
  */
169
196
  shortUrl?: string | null;
170
197
  }
@@ -181,6 +208,11 @@ export interface ShortLinkCreateResponse {
181
208
 
182
209
  status: 'Disabled' | 'Enabled';
183
210
 
211
+ /**
212
+ * Whether a user selected this code instead of using a generated code.
213
+ */
214
+ hasCustomShortLinkCode?: boolean | null;
215
+
184
216
  /**
185
217
  * Whether this short link exists in the currently published version. An
186
218
  * unpublished short link does not resolve at the edge.
@@ -190,8 +222,8 @@ export interface ShortLinkCreateResponse {
190
222
  name?: string | null;
191
223
 
192
224
  /**
193
- * The short code embedded in the public URL (`/redirect/{pixel}`).
194
- * Server-assigned.
225
+ * The immutable short code embedded in the public URL (`/r/{pixel}` for new
226
+ * links). Server-assigned.
195
227
  */
196
228
  pixel?: string | null;
197
229
 
@@ -201,14 +233,20 @@ export interface ShortLinkCreateResponse {
201
233
  redirectUrl?: string | null;
202
234
 
203
235
  /**
204
- * QR styling + campaign tags. Null until the link is styled.
236
+ * The public code embedded in the short-link URL.
237
+ */
238
+ shortLinkCode?: string | null;
239
+
240
+ /**
241
+ * QR styling + campaign tags. New links include an empty design; legacy redirects
242
+ * may return null.
205
243
  */
206
244
  shortLinkDesign?: unknown | null;
207
245
 
208
246
  /**
209
- * The public short-link URL that the QR encodes and callers share. Composed from
210
- * the short code, the link name (sent as the tracked event), and the campaign
211
- * tags. Also resolves on any branded custom domains configured for the account.
247
+ * The public short-link URL that the QR encodes and callers share. New links use
248
+ * `/r/{pixel}`; tracked event and campaign defaults are stored server-side. Also
249
+ * resolves on branded custom domains configured for the account.
212
250
  */
213
251
  shortUrl?: string | null;
214
252
  }
@@ -225,6 +263,11 @@ export interface ShortLinkRetrieveResponse {
225
263
 
226
264
  status: 'Disabled' | 'Enabled';
227
265
 
266
+ /**
267
+ * Whether a user selected this code instead of using a generated code.
268
+ */
269
+ hasCustomShortLinkCode?: boolean | null;
270
+
228
271
  /**
229
272
  * Whether this short link exists in the currently published version. An
230
273
  * unpublished short link does not resolve at the edge.
@@ -234,8 +277,8 @@ export interface ShortLinkRetrieveResponse {
234
277
  name?: string | null;
235
278
 
236
279
  /**
237
- * The short code embedded in the public URL (`/redirect/{pixel}`).
238
- * Server-assigned.
280
+ * The immutable short code embedded in the public URL (`/r/{pixel}` for new
281
+ * links). Server-assigned.
239
282
  */
240
283
  pixel?: string | null;
241
284
 
@@ -245,14 +288,20 @@ export interface ShortLinkRetrieveResponse {
245
288
  redirectUrl?: string | null;
246
289
 
247
290
  /**
248
- * QR styling + campaign tags. Null until the link is styled.
291
+ * The public code embedded in the short-link URL.
292
+ */
293
+ shortLinkCode?: string | null;
294
+
295
+ /**
296
+ * QR styling + campaign tags. New links include an empty design; legacy redirects
297
+ * may return null.
249
298
  */
250
299
  shortLinkDesign?: unknown | null;
251
300
 
252
301
  /**
253
- * The public short-link URL that the QR encodes and callers share. Composed from
254
- * the short code, the link name (sent as the tracked event), and the campaign
255
- * tags. Also resolves on any branded custom domains configured for the account.
302
+ * The public short-link URL that the QR encodes and callers share. New links use
303
+ * `/r/{pixel}`; tracked event and campaign defaults are stored server-side. Also
304
+ * resolves on branded custom domains configured for the account.
256
305
  */
257
306
  shortUrl?: string | null;
258
307
  }
@@ -269,6 +318,11 @@ export interface ShortLinkUpdateResponse {
269
318
 
270
319
  status: 'Disabled' | 'Enabled';
271
320
 
321
+ /**
322
+ * Whether a user selected this code instead of using a generated code.
323
+ */
324
+ hasCustomShortLinkCode?: boolean | null;
325
+
272
326
  /**
273
327
  * Whether this short link exists in the currently published version. An
274
328
  * unpublished short link does not resolve at the edge.
@@ -278,8 +332,8 @@ export interface ShortLinkUpdateResponse {
278
332
  name?: string | null;
279
333
 
280
334
  /**
281
- * The short code embedded in the public URL (`/redirect/{pixel}`).
282
- * Server-assigned.
335
+ * The immutable short code embedded in the public URL (`/r/{pixel}` for new
336
+ * links). Server-assigned.
283
337
  */
284
338
  pixel?: string | null;
285
339
 
@@ -289,14 +343,20 @@ export interface ShortLinkUpdateResponse {
289
343
  redirectUrl?: string | null;
290
344
 
291
345
  /**
292
- * QR styling + campaign tags. Null until the link is styled.
346
+ * The public code embedded in the short-link URL.
347
+ */
348
+ shortLinkCode?: string | null;
349
+
350
+ /**
351
+ * QR styling + campaign tags. New links include an empty design; legacy redirects
352
+ * may return null.
293
353
  */
294
354
  shortLinkDesign?: unknown | null;
295
355
 
296
356
  /**
297
- * The public short-link URL that the QR encodes and callers share. Composed from
298
- * the short code, the link name (sent as the tracked event), and the campaign
299
- * tags. Also resolves on any branded custom domains configured for the account.
357
+ * The public short-link URL that the QR encodes and callers share. New links use
358
+ * `/r/{pixel}`; tracked event and campaign defaults are stored server-side. Also
359
+ * resolves on branded custom domains configured for the account.
300
360
  */
301
361
  shortUrl?: string | null;
302
362
  }
@@ -305,6 +365,61 @@ export interface ShortLinkDeleteResponse {
305
365
  deleted: true;
306
366
  }
307
367
 
368
+ export interface ShortLinkCloneResponse {
369
+ id: string;
370
+
371
+ /**
372
+ * Organization id that owns this short link.
373
+ */
374
+ accountId: string;
375
+
376
+ createdAt: string;
377
+
378
+ status: 'Disabled' | 'Enabled';
379
+
380
+ /**
381
+ * Whether a user selected this code instead of using a generated code.
382
+ */
383
+ hasCustomShortLinkCode?: boolean | null;
384
+
385
+ /**
386
+ * Whether this short link exists in the currently published version. An
387
+ * unpublished short link does not resolve at the edge.
388
+ */
389
+ isPublished?: boolean | null;
390
+
391
+ name?: string | null;
392
+
393
+ /**
394
+ * The immutable short code embedded in the public URL (`/r/{pixel}` for new
395
+ * links). Server-assigned.
396
+ */
397
+ pixel?: string | null;
398
+
399
+ /**
400
+ * The destination URL this short link redirects to.
401
+ */
402
+ redirectUrl?: string | null;
403
+
404
+ /**
405
+ * The public code embedded in the short-link URL.
406
+ */
407
+ shortLinkCode?: string | null;
408
+
409
+ /**
410
+ * QR styling + campaign tags. New links include an empty design; legacy redirects
411
+ * may return null.
412
+ */
413
+ shortLinkDesign?: unknown | null;
414
+
415
+ /**
416
+ * The public short-link URL that the QR encodes and callers share. New links use
417
+ * `/r/{pixel}`; tracked event and campaign defaults are stored server-side. Also
418
+ * resolves on branded custom domains configured for the account.
419
+ */
420
+ shortUrl?: string | null;
421
+ }
422
+
308
423
  export interface ShortLinkResultsResponse {
309
424
  devices: Array<ShortLinkResultsResponse.Device>;
310
425
 
@@ -359,6 +474,11 @@ export interface ShortLinkListParams extends CursorParams {
359
474
  */
360
475
  nameContains?: string;
361
476
 
477
+ /**
478
+ * Case-insensitive search across name, destination URL, and public code.
479
+ */
480
+ search?: string;
481
+
362
482
  /**
363
483
  * Filter by short link status.
364
484
  */
@@ -366,6 +486,11 @@ export interface ShortLinkListParams extends CursorParams {
366
486
  }
367
487
 
368
488
  export interface ShortLinkCreateParams {
489
+ /**
490
+ * Optional custom code in the shared public short-link namespace.
491
+ */
492
+ code?: string | null;
493
+
369
494
  /**
370
495
  * Human-readable name. Also sent as the tracked event name on every click/scan.
371
496
  */
@@ -388,6 +513,8 @@ export interface ShortLinkCreateParams {
388
513
  }
389
514
 
390
515
  export interface ShortLinkUpdateParams {
516
+ code?: string | null;
517
+
391
518
  name?: string | null;
392
519
 
393
520
  qr?: unknown | null;
@@ -436,6 +563,7 @@ export declare namespace ShortLinks {
436
563
  type ShortLinkRetrieveResponse as ShortLinkRetrieveResponse,
437
564
  type ShortLinkUpdateResponse as ShortLinkUpdateResponse,
438
565
  type ShortLinkDeleteResponse as ShortLinkDeleteResponse,
566
+ type ShortLinkCloneResponse as ShortLinkCloneResponse,
439
567
  type ShortLinkResultsResponse as ShortLinkResultsResponse,
440
568
  type ShortLinkListResponsesCursor as ShortLinkListResponsesCursor,
441
569
  type ShortLinkListParams as ShortLinkListParams,
@@ -95,6 +95,7 @@ export interface SourceListResponse {
95
95
  | 'GoLangApi'
96
96
  | 'HTTPApiSource'
97
97
  | 'Healthie'
98
+ | 'Heyflow'
98
99
  | 'HubspotAppActions'
99
100
  | 'HubspotFormWebhook'
100
101
  | 'JotFormWebhooks'
@@ -185,6 +186,7 @@ export interface SourceCreateResponse {
185
186
  | 'GoLangApi'
186
187
  | 'HTTPApiSource'
187
188
  | 'Healthie'
189
+ | 'Heyflow'
188
190
  | 'HubspotAppActions'
189
191
  | 'HubspotFormWebhook'
190
192
  | 'JotFormWebhooks'
@@ -275,6 +277,7 @@ export interface SourceRetrieveResponse {
275
277
  | 'GoLangApi'
276
278
  | 'HTTPApiSource'
277
279
  | 'Healthie'
280
+ | 'Heyflow'
278
281
  | 'HubspotAppActions'
279
282
  | 'HubspotFormWebhook'
280
283
  | 'JotFormWebhooks'
@@ -365,6 +368,7 @@ export interface SourceUpdateResponse {
365
368
  | 'GoLangApi'
366
369
  | 'HTTPApiSource'
367
370
  | 'Healthie'
371
+ | 'Heyflow'
368
372
  | 'HubspotAppActions'
369
373
  | 'HubspotFormWebhook'
370
374
  | 'JotFormWebhooks'
@@ -505,6 +509,11 @@ export namespace SourceTokensResponse {
505
509
  }
506
510
 
507
511
  export interface SourceListParams extends CursorParams {
512
+ /**
513
+ * Exclude redirects with a short-link design. Defaults to false.
514
+ */
515
+ excludeShortLinks?: boolean | 'true' | 'false';
516
+
508
517
  /**
509
518
  * Case-insensitive substring filter on the source name.
510
519
  */
@@ -534,6 +543,7 @@ export interface SourceListParams extends CursorParams {
534
543
  | 'GoLangApi'
535
544
  | 'HTTPApiSource'
536
545
  | 'Healthie'
546
+ | 'Heyflow'
537
547
  | 'HubspotAppActions'
538
548
  | 'HubspotFormWebhook'
539
549
  | 'JotFormWebhooks'
@@ -570,6 +580,7 @@ export interface SourceCreateParams {
570
580
  | 'GoLangApi'
571
581
  | 'HTTPApiSource'
572
582
  | 'Healthie'
583
+ | 'Heyflow'
573
584
  | 'HubspotAppActions'
574
585
  | 'HubspotFormWebhook'
575
586
  | 'JotFormWebhooks'
@@ -26,8 +26,8 @@ export class TagManagerTags extends APIResource {
26
26
 
27
27
  /**
28
28
  * Create a new tag inside a tag manager. `tagManagerId` is required in the body.
29
- * Newly created tags are not assigned to any folder — assign after creation via
30
- * PATCH with `folderId`. Requires scope: tagManagers:update
29
+ * Newly created tags are not assigned to any folder — assign them with
30
+ * `POST /rest/v1/tag-manager-asset-folders`. Requires scope: tagManagers:update
31
31
  */
32
32
  create(body: TagManagerTagCreateParams, options?: RequestOptions): APIPromise<TagManagerTagCreateResponse> {
33
33
  return this._client.post('/rest/v1/tag-manager-tags', { body, ...options });
@@ -108,6 +108,9 @@ export interface TagManagerTriggerListResponse {
108
108
 
109
109
  createdAt?: string | null;
110
110
 
111
+ /**
112
+ * Defaults to `true` on create.
113
+ */
111
114
  enabled?: boolean | null;
112
115
 
113
116
  /**
@@ -150,6 +153,9 @@ export interface TagManagerTriggerCreateResponse {
150
153
 
151
154
  createdAt?: string | null;
152
155
 
156
+ /**
157
+ * Defaults to `true` on create.
158
+ */
153
159
  enabled?: boolean | null;
154
160
 
155
161
  /**
@@ -192,6 +198,9 @@ export interface TagManagerTriggerRetrieveResponse {
192
198
 
193
199
  createdAt?: string | null;
194
200
 
201
+ /**
202
+ * Defaults to `true` on create.
203
+ */
195
204
  enabled?: boolean | null;
196
205
 
197
206
  /**
@@ -234,6 +243,9 @@ export interface TagManagerTriggerUpdateResponse {
234
243
 
235
244
  createdAt?: string | null;
236
245
 
246
+ /**
247
+ * Defaults to `true` on create.
248
+ */
237
249
  enabled?: boolean | null;
238
250
 
239
251
  /**
@@ -351,7 +363,9 @@ export interface TagManagerTriggerListParams extends CursorParams {
351
363
 
352
364
  export interface TagManagerTriggerCreateParams {
353
365
  /**
354
- * Match conditions; use `[]` for an unconditional trigger.
366
+ * Match conditions; use `[]` for an unconditional trigger. Conditions are
367
+ * evaluated by the Tag Manager runtime. For a CSS selector click condition, send
368
+ * `{ "actual": "{{Click Element}}", "expected": ".cta", "comparison": "match_css_selector" }`.
355
369
  */
356
370
  conditions: Array<{ [key: string]: unknown }>;
357
371
 
@@ -373,6 +387,9 @@ export interface TagManagerTriggerCreateParams {
373
387
  */
374
388
  type: string;
375
389
 
390
+ /**
391
+ * Defaults to `true`.
392
+ */
376
393
  enabled?: boolean | null;
377
394
  }
378
395