@oursprivacy/platform-sdk 1.42.1 → 1.43.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 +30 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +7 -1
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/internal/detect-platform.d.mts.map +1 -1
- package/internal/detect-platform.d.ts.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.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.js.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/conversion-journey-summaries.d.mts +169 -0
- package/resources/conversion-journey-summaries.d.mts.map +1 -0
- package/resources/conversion-journey-summaries.d.ts +169 -0
- package/resources/conversion-journey-summaries.d.ts.map +1 -0
- package/resources/conversion-journey-summaries.js +51 -0
- package/resources/conversion-journey-summaries.js.map +1 -0
- package/resources/conversion-journey-summaries.mjs +47 -0
- package/resources/conversion-journey-summaries.mjs.map +1 -0
- package/resources/destinations.d.mts +18 -17
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +18 -17
- package/resources/destinations.d.ts.map +1 -1
- package/resources/funnels.d.mts +33 -16
- package/resources/funnels.d.mts.map +1 -1
- package/resources/funnels.d.ts +33 -16
- package/resources/funnels.d.ts.map +1 -1
- package/resources/funnels.js +8 -6
- package/resources/funnels.js.map +1 -1
- package/resources/funnels.mjs +8 -6
- package/resources/funnels.mjs.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/versions.d.mts +40 -0
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +40 -0
- package/resources/versions.d.ts.map +1 -1
- package/resources/videos.d.mts +251 -0
- package/resources/videos.d.mts.map +1 -0
- package/resources/videos.d.ts +251 -0
- package/resources/videos.d.ts.map +1 -0
- package/resources/videos.js +81 -0
- package/resources/videos.js.map +1 -0
- package/resources/videos.mjs +77 -0
- package/resources/videos.mjs.map +1 -0
- package/resources/web-scanners.d.mts +43 -0
- package/resources/web-scanners.d.mts.map +1 -1
- package/resources/web-scanners.d.ts +43 -0
- package/resources/web-scanners.d.ts.map +1 -1
- package/src/client.ts +69 -1
- package/src/core/pagination.ts +3 -3
- package/src/internal/detect-platform.ts +2 -10
- package/src/internal/to-file.ts +1 -4
- package/src/resources/conversion-journey-summaries.ts +384 -0
- package/src/resources/destinations.ts +45 -12
- package/src/resources/funnels.ts +34 -16
- package/src/resources/index.ts +31 -0
- package/src/resources/versions.ts +50 -0
- package/src/resources/videos.ts +418 -0
- package/src/resources/web-scanners.ts +62 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/funnels.ts
CHANGED
|
@@ -8,9 +8,10 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
export class Funnels extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* List every funnel configured on this account. Each funnel includes its step
|
|
11
|
-
* configuration, funnel type, conversion window
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* configuration, funnel type, and conversion window. Funnel results are computed
|
|
12
|
+
* on demand, so `status` is always `READY` and `reportDateRange` is always `null`;
|
|
13
|
+
* both fields are retained for backward compatibility and should not be used to
|
|
14
|
+
* decide whether results are available. Requires scope: web-analytics:view
|
|
14
15
|
*/
|
|
15
16
|
list(options?: RequestOptions): APIPromise<FunnelListResponse> {
|
|
16
17
|
return this._client.get('/rest/v1/funnels', options);
|
|
@@ -28,9 +29,10 @@ export class Funnels extends APIResource {
|
|
|
28
29
|
/**
|
|
29
30
|
* Compute funnel step analytics for a funnel over a date window. Returns per-step
|
|
30
31
|
* visitor counts, conversion rates, drop-off rates, average time to next step, and
|
|
31
|
-
* sample session IDs for replay.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* sample session IDs for replay. Results are computed on demand from event data at
|
|
33
|
+
* request time, so any date window within the supported range returns current
|
|
34
|
+
* results. `to` must be on or after `from`, and the window may span at most 31 days
|
|
35
|
+
* including both endpoints. Requires scope: web-analytics:view
|
|
34
36
|
*/
|
|
35
37
|
results(
|
|
36
38
|
id: string,
|
|
@@ -197,6 +199,14 @@ export interface FunnelResultsResponse {
|
|
|
197
199
|
* Average time from first step to last step in seconds. Null when no completions.
|
|
198
200
|
*/
|
|
199
201
|
overallAvgTimeToConversion?: number | null;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Present when the results are wider than the funnel as configured. Some step
|
|
205
|
+
* conditions could not be expressed as a query and were ignored, so the counts
|
|
206
|
+
* above include visitors those conditions would have excluded. Absent when the
|
|
207
|
+
* whole definition was applied. The dashboard surfaces the same caveat.
|
|
208
|
+
*/
|
|
209
|
+
warning?: string;
|
|
200
210
|
}
|
|
201
211
|
|
|
202
212
|
export namespace FunnelResultsResponse {
|
|
@@ -224,53 +234,61 @@ export namespace FunnelResultsResponse {
|
|
|
224
234
|
export interface FunnelResultsParams {
|
|
225
235
|
/**
|
|
226
236
|
* Inclusive lower bound of the analysis window, as a UTC calendar day in
|
|
227
|
-
* `YYYY-MM-DD` format.
|
|
237
|
+
* `YYYY-MM-DD` format. The window may span at most 31 days including both
|
|
238
|
+
* endpoints.
|
|
228
239
|
*/
|
|
229
240
|
from: string;
|
|
230
241
|
|
|
231
242
|
/**
|
|
232
243
|
* Inclusive upper bound of the analysis window, as a UTC calendar day in
|
|
233
|
-
* `YYYY-MM-DD` format.
|
|
244
|
+
* `YYYY-MM-DD` format. Must be on or after `from`, and the window may span at most
|
|
245
|
+
* 31 days including both endpoints.
|
|
234
246
|
*/
|
|
235
247
|
to: string;
|
|
236
248
|
|
|
237
249
|
/**
|
|
238
|
-
*
|
|
250
|
+
* Accepted for backward compatibility but NOT applied. Funnel sessions carry a
|
|
251
|
+
* single attribution set, so there is no initial vs. last-touch distinction to
|
|
252
|
+
* select between.
|
|
239
253
|
*/
|
|
240
254
|
attributionType?: 'INITIAL' | 'LAST_TOUCH';
|
|
241
255
|
|
|
242
256
|
/**
|
|
243
|
-
*
|
|
257
|
+
* Restrict the funnel to sessions on a device class. `MOBILE` matches phone
|
|
258
|
+
* sessions; `DESKTOP` matches every session that is not a phone, tablet, TV,
|
|
259
|
+
* console, wearable, XR, or embedded device. `ALL` (the default) applies no device
|
|
260
|
+
* filter.
|
|
244
261
|
*/
|
|
245
262
|
deviceType?: 'DESKTOP' | 'MOBILE' | 'ALL';
|
|
246
263
|
|
|
247
264
|
/**
|
|
248
|
-
*
|
|
265
|
+
* Restrict the funnel to sessions whose `utm_campaign` exactly matches this value.
|
|
249
266
|
*/
|
|
250
267
|
utmCampaign?: string;
|
|
251
268
|
|
|
252
269
|
/**
|
|
253
|
-
*
|
|
270
|
+
* Restrict the funnel to sessions whose `utm_content` exactly matches this value.
|
|
254
271
|
*/
|
|
255
272
|
utmContent?: string;
|
|
256
273
|
|
|
257
274
|
/**
|
|
258
|
-
*
|
|
275
|
+
* Restrict the funnel to sessions whose `utm_medium` exactly matches this value.
|
|
259
276
|
*/
|
|
260
277
|
utmMedium?: string;
|
|
261
278
|
|
|
262
279
|
/**
|
|
263
|
-
*
|
|
280
|
+
* Accepted for backward compatibility but NOT applied — there is no campaign-name
|
|
281
|
+
* dimension on funnel sessions. Use `utmCampaign` instead.
|
|
264
282
|
*/
|
|
265
283
|
utmName?: string;
|
|
266
284
|
|
|
267
285
|
/**
|
|
268
|
-
*
|
|
286
|
+
* Restrict the funnel to sessions whose `utm_source` exactly matches this value.
|
|
269
287
|
*/
|
|
270
288
|
utmSource?: string;
|
|
271
289
|
|
|
272
290
|
/**
|
|
273
|
-
*
|
|
291
|
+
* Restrict the funnel to sessions whose `utm_term` exactly matches this value.
|
|
274
292
|
*/
|
|
275
293
|
utmTerm?: string;
|
|
276
294
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -45,6 +45,18 @@ export {
|
|
|
45
45
|
type ConsentSettingPageAnalysisParams,
|
|
46
46
|
type ConsentSettingAnalyticsByRegionParams,
|
|
47
47
|
} from './consent-settings';
|
|
48
|
+
export {
|
|
49
|
+
ConversionJourneySummaries,
|
|
50
|
+
type ConversionJourneySummaryListResponse,
|
|
51
|
+
type ConversionJourneySummaryCreateResponse,
|
|
52
|
+
type ConversionJourneySummaryRetrieveResponse,
|
|
53
|
+
type ConversionJourneySummaryUpdateResponse,
|
|
54
|
+
type ConversionJourneySummaryDeleteResponse,
|
|
55
|
+
type ConversionJourneySummaryListParams,
|
|
56
|
+
type ConversionJourneySummaryCreateParams,
|
|
57
|
+
type ConversionJourneySummaryUpdateParams,
|
|
58
|
+
type ConversionJourneySummaryListResponsesCursor,
|
|
59
|
+
} from './conversion-journey-summaries';
|
|
48
60
|
export {
|
|
49
61
|
DataGovernance,
|
|
50
62
|
type DataGovernanceListResponse,
|
|
@@ -298,6 +310,25 @@ export {
|
|
|
298
310
|
type VersionRevertParams,
|
|
299
311
|
type VersionListResponsesCursor,
|
|
300
312
|
} from './versions';
|
|
313
|
+
export {
|
|
314
|
+
Videos,
|
|
315
|
+
type VideoListResponse,
|
|
316
|
+
type VideoCreateResponse,
|
|
317
|
+
type VideoRetrieveResponse,
|
|
318
|
+
type VideoUpdateResponse,
|
|
319
|
+
type VideoDeleteResponse,
|
|
320
|
+
type VideoAnalyticsResponse,
|
|
321
|
+
type VideoAnalyticsTimeseriesResponse,
|
|
322
|
+
type VideoTranscriptResponse,
|
|
323
|
+
type VideoUpdateTranscriptResponse,
|
|
324
|
+
type VideoListParams,
|
|
325
|
+
type VideoCreateParams,
|
|
326
|
+
type VideoUpdateParams,
|
|
327
|
+
type VideoAnalyticsParams,
|
|
328
|
+
type VideoAnalyticsTimeseriesParams,
|
|
329
|
+
type VideoUpdateTranscriptParams,
|
|
330
|
+
type VideoListResponsesCursor,
|
|
331
|
+
} from './videos';
|
|
301
332
|
export {
|
|
302
333
|
WebScannerRules,
|
|
303
334
|
type WebScannerRuleListResponse,
|
|
@@ -169,6 +169,16 @@ export interface VersionListResponse {
|
|
|
169
169
|
* determine the current live version.
|
|
170
170
|
*/
|
|
171
171
|
publishedAt?: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Identifier of the user who most recently published this version.
|
|
175
|
+
*/
|
|
176
|
+
publishedByUserId?: string | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Display name of the user who most recently published this version.
|
|
180
|
+
*/
|
|
181
|
+
publishedByUserName?: string | null;
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
export interface VersionCreateResponse {
|
|
@@ -191,6 +201,16 @@ export interface VersionCreateResponse {
|
|
|
191
201
|
* determine the current live version.
|
|
192
202
|
*/
|
|
193
203
|
publishedAt?: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Identifier of the user who most recently published this version.
|
|
207
|
+
*/
|
|
208
|
+
publishedByUserId?: string | null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Display name of the user who most recently published this version.
|
|
212
|
+
*/
|
|
213
|
+
publishedByUserName?: string | null;
|
|
194
214
|
}
|
|
195
215
|
|
|
196
216
|
export interface VersionRetrieveResponse {
|
|
@@ -213,6 +233,16 @@ export interface VersionRetrieveResponse {
|
|
|
213
233
|
* determine the current live version.
|
|
214
234
|
*/
|
|
215
235
|
publishedAt?: string | null;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Identifier of the user who most recently published this version.
|
|
239
|
+
*/
|
|
240
|
+
publishedByUserId?: string | null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Display name of the user who most recently published this version.
|
|
244
|
+
*/
|
|
245
|
+
publishedByUserName?: string | null;
|
|
216
246
|
}
|
|
217
247
|
|
|
218
248
|
export interface VersionUpdateResponse {
|
|
@@ -235,6 +265,16 @@ export interface VersionUpdateResponse {
|
|
|
235
265
|
* determine the current live version.
|
|
236
266
|
*/
|
|
237
267
|
publishedAt?: string | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Identifier of the user who most recently published this version.
|
|
271
|
+
*/
|
|
272
|
+
publishedByUserId?: string | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Display name of the user who most recently published this version.
|
|
276
|
+
*/
|
|
277
|
+
publishedByUserName?: string | null;
|
|
238
278
|
}
|
|
239
279
|
|
|
240
280
|
export interface VersionPublishResponse {
|
|
@@ -257,6 +297,16 @@ export interface VersionPublishResponse {
|
|
|
257
297
|
* determine the current live version.
|
|
258
298
|
*/
|
|
259
299
|
publishedAt?: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Identifier of the user who most recently published this version.
|
|
303
|
+
*/
|
|
304
|
+
publishedByUserId?: string | null;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Display name of the user who most recently published this version.
|
|
308
|
+
*/
|
|
309
|
+
publishedByUserName?: string | null;
|
|
260
310
|
}
|
|
261
311
|
|
|
262
312
|
export interface VersionSnapshotResponse {
|
|
@@ -0,0 +1,418 @@
|
|
|
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 { Cursor, type CursorParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Videos extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* List videos for the account, newest first. Supports cursor pagination and an
|
|
12
|
+
* optional case-insensitive title filter. Requires scope: media:list
|
|
13
|
+
*/
|
|
14
|
+
list(
|
|
15
|
+
query: VideoListParams | null | undefined = {},
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): PagePromise<VideoListResponsesCursor, VideoListResponse> {
|
|
18
|
+
return this._client.getAPIList('/rest/v1/videos', Cursor<VideoListResponse>, { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a video record and return a temporary upload target for the original MP4
|
|
23
|
+
* or WebM file. Upload the file directly using the returned URL and matching
|
|
24
|
+
* content type, then poll the video to observe processing progress. Requires
|
|
25
|
+
* scope: media:create
|
|
26
|
+
*/
|
|
27
|
+
create(body: VideoCreateParams, options?: RequestOptions): APIPromise<VideoCreateResponse> {
|
|
28
|
+
return this._client.post('/rest/v1/videos', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Fetch a video and its current playback asset availability. The processed video,
|
|
33
|
+
* poster, and transcript are prepared asynchronously after upload. Requires scope:
|
|
34
|
+
* media:find
|
|
35
|
+
*/
|
|
36
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VideoRetrieveResponse> {
|
|
37
|
+
return this._client.get(path`/rest/v1/videos/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Partially update video metadata. Only fields included in the body change; send
|
|
42
|
+
* `null` to clear a nullable field. Requires scope: media:update
|
|
43
|
+
*/
|
|
44
|
+
update(id: string, body: VideoUpdateParams, options?: RequestOptions): APIPromise<VideoUpdateResponse> {
|
|
45
|
+
return this._client.patch(path`/rest/v1/videos/${id}`, { body, ...options });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Delete a video and its related assets. Requires scope: media:delete
|
|
50
|
+
*/
|
|
51
|
+
delete(id: string, options?: RequestOptions): APIPromise<VideoDeleteResponse> {
|
|
52
|
+
return this._client.delete(path`/rest/v1/videos/${id}`, options);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Return per-video starts, unique viewers, completion rate, and average watch time
|
|
57
|
+
* for a date window. This derived report uses `limit` and `offset` pagination;
|
|
58
|
+
* `total` is the number of rows returned through the current offset, not a total
|
|
59
|
+
* match count. Requires scope: report:video-analytics
|
|
60
|
+
*/
|
|
61
|
+
analytics(query: VideoAnalyticsParams, options?: RequestOptions): APIPromise<VideoAnalyticsResponse> {
|
|
62
|
+
return this._client.get('/rest/v1/videos/analytics', { query, ...options });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Return daily or hourly starts, unique viewers, completions, and completion rate
|
|
67
|
+
* for one video. Daily windows support up to 90 days; hourly windows support up to
|
|
68
|
+
* 14 days. Requires scope: report:video-analytics
|
|
69
|
+
*/
|
|
70
|
+
analyticsTimeseries(
|
|
71
|
+
id: string,
|
|
72
|
+
query: VideoAnalyticsTimeseriesParams,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): APIPromise<VideoAnalyticsTimeseriesResponse> {
|
|
75
|
+
return this._client.get(path`/rest/v1/videos/${id}/analytics`, { query, ...options });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Read the current WebVTT transcript. Transcript text is available wherever the
|
|
80
|
+
* video is embedded, so do not include PHI or other confidential information.
|
|
81
|
+
* Requires scope: media:find
|
|
82
|
+
*/
|
|
83
|
+
transcript(id: string, options?: RequestOptions): APIPromise<VideoTranscriptResponse> {
|
|
84
|
+
return this._client.get(path`/rest/v1/videos/${id}/transcript`, options);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Replace the transcript with VTT or SRT text. SRT is normalized to WebVTT.
|
|
89
|
+
* Transcript text is available wherever the video is embedded, so do not include
|
|
90
|
+
* PHI or other confidential information. Requires scope: media:update
|
|
91
|
+
*/
|
|
92
|
+
updateTranscript(
|
|
93
|
+
id: string,
|
|
94
|
+
body: VideoUpdateTranscriptParams,
|
|
95
|
+
options?: RequestOptions,
|
|
96
|
+
): APIPromise<VideoUpdateTranscriptResponse> {
|
|
97
|
+
return this._client.put(path`/rest/v1/videos/${id}/transcript`, { body, ...options });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type VideoListResponsesCursor = Cursor<VideoListResponse>;
|
|
102
|
+
|
|
103
|
+
export interface VideoListResponse {
|
|
104
|
+
id: string;
|
|
105
|
+
|
|
106
|
+
accountId: string;
|
|
107
|
+
|
|
108
|
+
createdAt: string;
|
|
109
|
+
|
|
110
|
+
type: 'Video';
|
|
111
|
+
|
|
112
|
+
captionsUpdatedAt?: string | null;
|
|
113
|
+
|
|
114
|
+
captionsUpdatedByName?: string | null;
|
|
115
|
+
|
|
116
|
+
description?: string | null;
|
|
117
|
+
|
|
118
|
+
duration?: number | null;
|
|
119
|
+
|
|
120
|
+
hasVideoUpload?: boolean | null;
|
|
121
|
+
|
|
122
|
+
height?: number | null;
|
|
123
|
+
|
|
124
|
+
name?: string | null;
|
|
125
|
+
|
|
126
|
+
updatedAt?: string | null;
|
|
127
|
+
|
|
128
|
+
width?: number | null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface VideoCreateResponse {
|
|
132
|
+
id: string;
|
|
133
|
+
|
|
134
|
+
accountId: string;
|
|
135
|
+
|
|
136
|
+
createdAt: string;
|
|
137
|
+
|
|
138
|
+
type: 'Video';
|
|
139
|
+
|
|
140
|
+
upload: VideoCreateResponse.Upload;
|
|
141
|
+
|
|
142
|
+
captionsUpdatedAt?: string | null;
|
|
143
|
+
|
|
144
|
+
captionsUpdatedByName?: string | null;
|
|
145
|
+
|
|
146
|
+
description?: string | null;
|
|
147
|
+
|
|
148
|
+
duration?: number | null;
|
|
149
|
+
|
|
150
|
+
hasVideoUpload?: boolean | null;
|
|
151
|
+
|
|
152
|
+
height?: number | null;
|
|
153
|
+
|
|
154
|
+
name?: string | null;
|
|
155
|
+
|
|
156
|
+
updatedAt?: string | null;
|
|
157
|
+
|
|
158
|
+
width?: number | null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export namespace VideoCreateResponse {
|
|
162
|
+
export interface Upload {
|
|
163
|
+
mimeType: 'MP4' | 'WEBM';
|
|
164
|
+
|
|
165
|
+
url: string;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface VideoRetrieveResponse {
|
|
170
|
+
id: string;
|
|
171
|
+
|
|
172
|
+
accountId: string;
|
|
173
|
+
|
|
174
|
+
createdAt: string;
|
|
175
|
+
|
|
176
|
+
type: 'Video';
|
|
177
|
+
|
|
178
|
+
captionsUpdatedAt?: string | null;
|
|
179
|
+
|
|
180
|
+
captionsUpdatedByName?: string | null;
|
|
181
|
+
|
|
182
|
+
description?: string | null;
|
|
183
|
+
|
|
184
|
+
duration?: number | null;
|
|
185
|
+
|
|
186
|
+
hasVideoUpload?: boolean | null;
|
|
187
|
+
|
|
188
|
+
height?: number | null;
|
|
189
|
+
|
|
190
|
+
name?: string | null;
|
|
191
|
+
|
|
192
|
+
resolvedValues?: unknown | null;
|
|
193
|
+
|
|
194
|
+
updatedAt?: string | null;
|
|
195
|
+
|
|
196
|
+
width?: number | null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface VideoUpdateResponse {
|
|
200
|
+
id: string;
|
|
201
|
+
|
|
202
|
+
accountId: string;
|
|
203
|
+
|
|
204
|
+
createdAt: string;
|
|
205
|
+
|
|
206
|
+
type: 'Video';
|
|
207
|
+
|
|
208
|
+
captionsUpdatedAt?: string | null;
|
|
209
|
+
|
|
210
|
+
captionsUpdatedByName?: string | null;
|
|
211
|
+
|
|
212
|
+
description?: string | null;
|
|
213
|
+
|
|
214
|
+
duration?: number | null;
|
|
215
|
+
|
|
216
|
+
hasVideoUpload?: boolean | null;
|
|
217
|
+
|
|
218
|
+
height?: number | null;
|
|
219
|
+
|
|
220
|
+
name?: string | null;
|
|
221
|
+
|
|
222
|
+
updatedAt?: string | null;
|
|
223
|
+
|
|
224
|
+
width?: number | null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface VideoDeleteResponse {
|
|
228
|
+
id: string;
|
|
229
|
+
|
|
230
|
+
deleted: true;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface VideoAnalyticsResponse {
|
|
234
|
+
hasMore: boolean;
|
|
235
|
+
|
|
236
|
+
items: Array<VideoAnalyticsResponse.Item>;
|
|
237
|
+
|
|
238
|
+
total: number;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export namespace VideoAnalyticsResponse {
|
|
242
|
+
export interface Item {
|
|
243
|
+
avgVideoDurationSeconds: number;
|
|
244
|
+
|
|
245
|
+
avgWatchTimeSeconds: number;
|
|
246
|
+
|
|
247
|
+
completionRate: number;
|
|
248
|
+
|
|
249
|
+
uniqueViewers: number;
|
|
250
|
+
|
|
251
|
+
videoStarts: number;
|
|
252
|
+
|
|
253
|
+
videoTitle: string;
|
|
254
|
+
|
|
255
|
+
videoId?: string | null;
|
|
256
|
+
|
|
257
|
+
videoUrl?: string | null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface VideoAnalyticsTimeseriesResponse {
|
|
262
|
+
items: Array<VideoAnalyticsTimeseriesResponse.Item>;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export namespace VideoAnalyticsTimeseriesResponse {
|
|
266
|
+
export interface Item {
|
|
267
|
+
completionRate: number;
|
|
268
|
+
|
|
269
|
+
completions: number;
|
|
270
|
+
|
|
271
|
+
dateTime: string;
|
|
272
|
+
|
|
273
|
+
uniqueViewers: number;
|
|
274
|
+
|
|
275
|
+
videoStarts: number;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface VideoTranscriptResponse {
|
|
280
|
+
content?: string | null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface VideoUpdateTranscriptResponse {
|
|
284
|
+
id: string;
|
|
285
|
+
|
|
286
|
+
accountId: string;
|
|
287
|
+
|
|
288
|
+
createdAt: string;
|
|
289
|
+
|
|
290
|
+
type: 'Video';
|
|
291
|
+
|
|
292
|
+
captionsUpdatedAt?: string | null;
|
|
293
|
+
|
|
294
|
+
captionsUpdatedByName?: string | null;
|
|
295
|
+
|
|
296
|
+
description?: string | null;
|
|
297
|
+
|
|
298
|
+
duration?: number | null;
|
|
299
|
+
|
|
300
|
+
hasVideoUpload?: boolean | null;
|
|
301
|
+
|
|
302
|
+
height?: number | null;
|
|
303
|
+
|
|
304
|
+
name?: string | null;
|
|
305
|
+
|
|
306
|
+
updatedAt?: string | null;
|
|
307
|
+
|
|
308
|
+
width?: number | null;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface VideoListParams extends CursorParams {
|
|
312
|
+
/**
|
|
313
|
+
* Case-insensitive substring match on the video title.
|
|
314
|
+
*/
|
|
315
|
+
nameContains?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface VideoCreateParams {
|
|
319
|
+
/**
|
|
320
|
+
* Content type for the original video upload: `MP4` or `WEBM`.
|
|
321
|
+
*/
|
|
322
|
+
mimeType: 'MP4' | 'WEBM';
|
|
323
|
+
|
|
324
|
+
description?: string | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Video title. Defaults to `New Video` when omitted.
|
|
328
|
+
*/
|
|
329
|
+
name?: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface VideoUpdateParams {
|
|
333
|
+
description?: string | null;
|
|
334
|
+
|
|
335
|
+
duration?: number | null;
|
|
336
|
+
|
|
337
|
+
hasVideoUpload?: boolean | null;
|
|
338
|
+
|
|
339
|
+
height?: number | null;
|
|
340
|
+
|
|
341
|
+
name?: string | null;
|
|
342
|
+
|
|
343
|
+
width?: number | null;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface VideoAnalyticsParams {
|
|
347
|
+
/**
|
|
348
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
349
|
+
*/
|
|
350
|
+
from: string;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
354
|
+
*/
|
|
355
|
+
to: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Maximum number of video rows to return. Defaults to 50.
|
|
359
|
+
*/
|
|
360
|
+
limit?: number;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Zero-based row offset. This report is an intentional offset-pagination
|
|
364
|
+
* exception.
|
|
365
|
+
*/
|
|
366
|
+
offset?: number | null;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface VideoAnalyticsTimeseriesParams {
|
|
370
|
+
/**
|
|
371
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
372
|
+
*/
|
|
373
|
+
from: string;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
377
|
+
*/
|
|
378
|
+
to: string;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Bucket size. Defaults to `DAILY`; `HOURLY` supports windows of up to 14 days.
|
|
382
|
+
*/
|
|
383
|
+
granularity?: 'DAILY' | 'HOURLY';
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export interface VideoUpdateTranscriptParams {
|
|
387
|
+
/**
|
|
388
|
+
* Transcript text, limited to 1 MB.
|
|
389
|
+
*/
|
|
390
|
+
content: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Transcript source format. SRT content is normalized to WebVTT before it is
|
|
394
|
+
* saved.
|
|
395
|
+
*/
|
|
396
|
+
format: 'SRT' | 'VTT';
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare namespace Videos {
|
|
400
|
+
export {
|
|
401
|
+
type VideoListResponse as VideoListResponse,
|
|
402
|
+
type VideoCreateResponse as VideoCreateResponse,
|
|
403
|
+
type VideoRetrieveResponse as VideoRetrieveResponse,
|
|
404
|
+
type VideoUpdateResponse as VideoUpdateResponse,
|
|
405
|
+
type VideoDeleteResponse as VideoDeleteResponse,
|
|
406
|
+
type VideoAnalyticsResponse as VideoAnalyticsResponse,
|
|
407
|
+
type VideoAnalyticsTimeseriesResponse as VideoAnalyticsTimeseriesResponse,
|
|
408
|
+
type VideoTranscriptResponse as VideoTranscriptResponse,
|
|
409
|
+
type VideoUpdateTranscriptResponse as VideoUpdateTranscriptResponse,
|
|
410
|
+
type VideoListResponsesCursor as VideoListResponsesCursor,
|
|
411
|
+
type VideoListParams as VideoListParams,
|
|
412
|
+
type VideoCreateParams as VideoCreateParams,
|
|
413
|
+
type VideoUpdateParams as VideoUpdateParams,
|
|
414
|
+
type VideoAnalyticsParams as VideoAnalyticsParams,
|
|
415
|
+
type VideoAnalyticsTimeseriesParams as VideoAnalyticsTimeseriesParams,
|
|
416
|
+
type VideoUpdateTranscriptParams as VideoUpdateTranscriptParams,
|
|
417
|
+
};
|
|
418
|
+
}
|