@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
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Videos extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List videos for the account, newest first. Supports cursor pagination and an
|
|
8
|
+
* optional case-insensitive title filter. Requires scope: media:list
|
|
9
|
+
*/
|
|
10
|
+
list(query?: VideoListParams | null | undefined, options?: RequestOptions): PagePromise<VideoListResponsesCursor, VideoListResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a video record and return a temporary upload target for the original MP4
|
|
13
|
+
* or WebM file. Upload the file directly using the returned URL and matching
|
|
14
|
+
* content type, then poll the video to observe processing progress. Requires
|
|
15
|
+
* scope: media:create
|
|
16
|
+
*/
|
|
17
|
+
create(body: VideoCreateParams, options?: RequestOptions): APIPromise<VideoCreateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Fetch a video and its current playback asset availability. The processed video,
|
|
20
|
+
* poster, and transcript are prepared asynchronously after upload. Requires scope:
|
|
21
|
+
* media:find
|
|
22
|
+
*/
|
|
23
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VideoRetrieveResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Partially update video metadata. Only fields included in the body change; send
|
|
26
|
+
* `null` to clear a nullable field. Requires scope: media:update
|
|
27
|
+
*/
|
|
28
|
+
update(id: string, body: VideoUpdateParams, options?: RequestOptions): APIPromise<VideoUpdateResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a video and its related assets. Requires scope: media:delete
|
|
31
|
+
*/
|
|
32
|
+
delete(id: string, options?: RequestOptions): APIPromise<VideoDeleteResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Return per-video starts, unique viewers, completion rate, and average watch time
|
|
35
|
+
* for a date window. This derived report uses `limit` and `offset` pagination;
|
|
36
|
+
* `total` is the number of rows returned through the current offset, not a total
|
|
37
|
+
* match count. Requires scope: report:video-analytics
|
|
38
|
+
*/
|
|
39
|
+
analytics(query: VideoAnalyticsParams, options?: RequestOptions): APIPromise<VideoAnalyticsResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Return daily or hourly starts, unique viewers, completions, and completion rate
|
|
42
|
+
* for one video. Daily windows support up to 90 days; hourly windows support up to
|
|
43
|
+
* 14 days. Requires scope: report:video-analytics
|
|
44
|
+
*/
|
|
45
|
+
analyticsTimeseries(id: string, query: VideoAnalyticsTimeseriesParams, options?: RequestOptions): APIPromise<VideoAnalyticsTimeseriesResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Read the current WebVTT transcript. Transcript text is available wherever the
|
|
48
|
+
* video is embedded, so do not include PHI or other confidential information.
|
|
49
|
+
* Requires scope: media:find
|
|
50
|
+
*/
|
|
51
|
+
transcript(id: string, options?: RequestOptions): APIPromise<VideoTranscriptResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Replace the transcript with VTT or SRT text. SRT is normalized to WebVTT.
|
|
54
|
+
* Transcript text is available wherever the video is embedded, so do not include
|
|
55
|
+
* PHI or other confidential information. Requires scope: media:update
|
|
56
|
+
*/
|
|
57
|
+
updateTranscript(id: string, body: VideoUpdateTranscriptParams, options?: RequestOptions): APIPromise<VideoUpdateTranscriptResponse>;
|
|
58
|
+
}
|
|
59
|
+
export type VideoListResponsesCursor = Cursor<VideoListResponse>;
|
|
60
|
+
export interface VideoListResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
accountId: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
type: 'Video';
|
|
65
|
+
captionsUpdatedAt?: string | null;
|
|
66
|
+
captionsUpdatedByName?: string | null;
|
|
67
|
+
description?: string | null;
|
|
68
|
+
duration?: number | null;
|
|
69
|
+
hasVideoUpload?: boolean | null;
|
|
70
|
+
height?: number | null;
|
|
71
|
+
name?: string | null;
|
|
72
|
+
updatedAt?: string | null;
|
|
73
|
+
width?: number | null;
|
|
74
|
+
}
|
|
75
|
+
export interface VideoCreateResponse {
|
|
76
|
+
id: string;
|
|
77
|
+
accountId: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
type: 'Video';
|
|
80
|
+
upload: VideoCreateResponse.Upload;
|
|
81
|
+
captionsUpdatedAt?: string | null;
|
|
82
|
+
captionsUpdatedByName?: string | null;
|
|
83
|
+
description?: string | null;
|
|
84
|
+
duration?: number | null;
|
|
85
|
+
hasVideoUpload?: boolean | null;
|
|
86
|
+
height?: number | null;
|
|
87
|
+
name?: string | null;
|
|
88
|
+
updatedAt?: string | null;
|
|
89
|
+
width?: number | null;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace VideoCreateResponse {
|
|
92
|
+
interface Upload {
|
|
93
|
+
mimeType: 'MP4' | 'WEBM';
|
|
94
|
+
url: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export interface VideoRetrieveResponse {
|
|
98
|
+
id: string;
|
|
99
|
+
accountId: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
type: 'Video';
|
|
102
|
+
captionsUpdatedAt?: string | null;
|
|
103
|
+
captionsUpdatedByName?: string | null;
|
|
104
|
+
description?: string | null;
|
|
105
|
+
duration?: number | null;
|
|
106
|
+
hasVideoUpload?: boolean | null;
|
|
107
|
+
height?: number | null;
|
|
108
|
+
name?: string | null;
|
|
109
|
+
resolvedValues?: unknown | null;
|
|
110
|
+
updatedAt?: string | null;
|
|
111
|
+
width?: number | null;
|
|
112
|
+
}
|
|
113
|
+
export interface VideoUpdateResponse {
|
|
114
|
+
id: string;
|
|
115
|
+
accountId: string;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
type: 'Video';
|
|
118
|
+
captionsUpdatedAt?: string | null;
|
|
119
|
+
captionsUpdatedByName?: string | null;
|
|
120
|
+
description?: string | null;
|
|
121
|
+
duration?: number | null;
|
|
122
|
+
hasVideoUpload?: boolean | null;
|
|
123
|
+
height?: number | null;
|
|
124
|
+
name?: string | null;
|
|
125
|
+
updatedAt?: string | null;
|
|
126
|
+
width?: number | null;
|
|
127
|
+
}
|
|
128
|
+
export interface VideoDeleteResponse {
|
|
129
|
+
id: string;
|
|
130
|
+
deleted: true;
|
|
131
|
+
}
|
|
132
|
+
export interface VideoAnalyticsResponse {
|
|
133
|
+
hasMore: boolean;
|
|
134
|
+
items: Array<VideoAnalyticsResponse.Item>;
|
|
135
|
+
total: number;
|
|
136
|
+
}
|
|
137
|
+
export declare namespace VideoAnalyticsResponse {
|
|
138
|
+
interface Item {
|
|
139
|
+
avgVideoDurationSeconds: number;
|
|
140
|
+
avgWatchTimeSeconds: number;
|
|
141
|
+
completionRate: number;
|
|
142
|
+
uniqueViewers: number;
|
|
143
|
+
videoStarts: number;
|
|
144
|
+
videoTitle: string;
|
|
145
|
+
videoId?: string | null;
|
|
146
|
+
videoUrl?: string | null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export interface VideoAnalyticsTimeseriesResponse {
|
|
150
|
+
items: Array<VideoAnalyticsTimeseriesResponse.Item>;
|
|
151
|
+
}
|
|
152
|
+
export declare namespace VideoAnalyticsTimeseriesResponse {
|
|
153
|
+
interface Item {
|
|
154
|
+
completionRate: number;
|
|
155
|
+
completions: number;
|
|
156
|
+
dateTime: string;
|
|
157
|
+
uniqueViewers: number;
|
|
158
|
+
videoStarts: number;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export interface VideoTranscriptResponse {
|
|
162
|
+
content?: string | null;
|
|
163
|
+
}
|
|
164
|
+
export interface VideoUpdateTranscriptResponse {
|
|
165
|
+
id: string;
|
|
166
|
+
accountId: string;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
type: 'Video';
|
|
169
|
+
captionsUpdatedAt?: string | null;
|
|
170
|
+
captionsUpdatedByName?: string | null;
|
|
171
|
+
description?: string | null;
|
|
172
|
+
duration?: number | null;
|
|
173
|
+
hasVideoUpload?: boolean | null;
|
|
174
|
+
height?: number | null;
|
|
175
|
+
name?: string | null;
|
|
176
|
+
updatedAt?: string | null;
|
|
177
|
+
width?: number | null;
|
|
178
|
+
}
|
|
179
|
+
export interface VideoListParams extends CursorParams {
|
|
180
|
+
/**
|
|
181
|
+
* Case-insensitive substring match on the video title.
|
|
182
|
+
*/
|
|
183
|
+
nameContains?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface VideoCreateParams {
|
|
186
|
+
/**
|
|
187
|
+
* Content type for the original video upload: `MP4` or `WEBM`.
|
|
188
|
+
*/
|
|
189
|
+
mimeType: 'MP4' | 'WEBM';
|
|
190
|
+
description?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Video title. Defaults to `New Video` when omitted.
|
|
193
|
+
*/
|
|
194
|
+
name?: string | null;
|
|
195
|
+
}
|
|
196
|
+
export interface VideoUpdateParams {
|
|
197
|
+
description?: string | null;
|
|
198
|
+
duration?: number | null;
|
|
199
|
+
hasVideoUpload?: boolean | null;
|
|
200
|
+
height?: number | null;
|
|
201
|
+
name?: string | null;
|
|
202
|
+
width?: number | null;
|
|
203
|
+
}
|
|
204
|
+
export interface VideoAnalyticsParams {
|
|
205
|
+
/**
|
|
206
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
207
|
+
*/
|
|
208
|
+
from: string;
|
|
209
|
+
/**
|
|
210
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
211
|
+
*/
|
|
212
|
+
to: string;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum number of video rows to return. Defaults to 50.
|
|
215
|
+
*/
|
|
216
|
+
limit?: number;
|
|
217
|
+
/**
|
|
218
|
+
* Zero-based row offset. This report is an intentional offset-pagination
|
|
219
|
+
* exception.
|
|
220
|
+
*/
|
|
221
|
+
offset?: number | null;
|
|
222
|
+
}
|
|
223
|
+
export interface VideoAnalyticsTimeseriesParams {
|
|
224
|
+
/**
|
|
225
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
226
|
+
*/
|
|
227
|
+
from: string;
|
|
228
|
+
/**
|
|
229
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
230
|
+
*/
|
|
231
|
+
to: string;
|
|
232
|
+
/**
|
|
233
|
+
* Bucket size. Defaults to `DAILY`; `HOURLY` supports windows of up to 14 days.
|
|
234
|
+
*/
|
|
235
|
+
granularity?: 'DAILY' | 'HOURLY';
|
|
236
|
+
}
|
|
237
|
+
export interface VideoUpdateTranscriptParams {
|
|
238
|
+
/**
|
|
239
|
+
* Transcript text, limited to 1 MB.
|
|
240
|
+
*/
|
|
241
|
+
content: string;
|
|
242
|
+
/**
|
|
243
|
+
* Transcript source format. SRT content is normalized to WebVTT before it is
|
|
244
|
+
* saved.
|
|
245
|
+
*/
|
|
246
|
+
format: 'SRT' | 'VTT';
|
|
247
|
+
}
|
|
248
|
+
export declare namespace Videos {
|
|
249
|
+
export { type VideoListResponse as VideoListResponse, type VideoCreateResponse as VideoCreateResponse, type VideoRetrieveResponse as VideoRetrieveResponse, type VideoUpdateResponse as VideoUpdateResponse, type VideoDeleteResponse as VideoDeleteResponse, type VideoAnalyticsResponse as VideoAnalyticsResponse, type VideoAnalyticsTimeseriesResponse as VideoAnalyticsTimeseriesResponse, type VideoTranscriptResponse as VideoTranscriptResponse, type VideoUpdateTranscriptResponse as VideoUpdateTranscriptResponse, type VideoListResponsesCursor as VideoListResponsesCursor, type VideoListParams as VideoListParams, type VideoCreateParams as VideoCreateParams, type VideoUpdateParams as VideoUpdateParams, type VideoAnalyticsParams as VideoAnalyticsParams, type VideoAnalyticsTimeseriesParams as VideoAnalyticsTimeseriesParams, type VideoUpdateTranscriptParams as VideoUpdateTranscriptParams, };
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=videos.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.d.mts","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,+BAA2B;AAC5E,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,iBAAiB,CAAC;IAI3D;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EA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,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class Videos extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List videos for the account, newest first. Supports cursor pagination and an
|
|
8
|
+
* optional case-insensitive title filter. Requires scope: media:list
|
|
9
|
+
*/
|
|
10
|
+
list(query?: VideoListParams | null | undefined, options?: RequestOptions): PagePromise<VideoListResponsesCursor, VideoListResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a video record and return a temporary upload target for the original MP4
|
|
13
|
+
* or WebM file. Upload the file directly using the returned URL and matching
|
|
14
|
+
* content type, then poll the video to observe processing progress. Requires
|
|
15
|
+
* scope: media:create
|
|
16
|
+
*/
|
|
17
|
+
create(body: VideoCreateParams, options?: RequestOptions): APIPromise<VideoCreateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Fetch a video and its current playback asset availability. The processed video,
|
|
20
|
+
* poster, and transcript are prepared asynchronously after upload. Requires scope:
|
|
21
|
+
* media:find
|
|
22
|
+
*/
|
|
23
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VideoRetrieveResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Partially update video metadata. Only fields included in the body change; send
|
|
26
|
+
* `null` to clear a nullable field. Requires scope: media:update
|
|
27
|
+
*/
|
|
28
|
+
update(id: string, body: VideoUpdateParams, options?: RequestOptions): APIPromise<VideoUpdateResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a video and its related assets. Requires scope: media:delete
|
|
31
|
+
*/
|
|
32
|
+
delete(id: string, options?: RequestOptions): APIPromise<VideoDeleteResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Return per-video starts, unique viewers, completion rate, and average watch time
|
|
35
|
+
* for a date window. This derived report uses `limit` and `offset` pagination;
|
|
36
|
+
* `total` is the number of rows returned through the current offset, not a total
|
|
37
|
+
* match count. Requires scope: report:video-analytics
|
|
38
|
+
*/
|
|
39
|
+
analytics(query: VideoAnalyticsParams, options?: RequestOptions): APIPromise<VideoAnalyticsResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Return daily or hourly starts, unique viewers, completions, and completion rate
|
|
42
|
+
* for one video. Daily windows support up to 90 days; hourly windows support up to
|
|
43
|
+
* 14 days. Requires scope: report:video-analytics
|
|
44
|
+
*/
|
|
45
|
+
analyticsTimeseries(id: string, query: VideoAnalyticsTimeseriesParams, options?: RequestOptions): APIPromise<VideoAnalyticsTimeseriesResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Read the current WebVTT transcript. Transcript text is available wherever the
|
|
48
|
+
* video is embedded, so do not include PHI or other confidential information.
|
|
49
|
+
* Requires scope: media:find
|
|
50
|
+
*/
|
|
51
|
+
transcript(id: string, options?: RequestOptions): APIPromise<VideoTranscriptResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Replace the transcript with VTT or SRT text. SRT is normalized to WebVTT.
|
|
54
|
+
* Transcript text is available wherever the video is embedded, so do not include
|
|
55
|
+
* PHI or other confidential information. Requires scope: media:update
|
|
56
|
+
*/
|
|
57
|
+
updateTranscript(id: string, body: VideoUpdateTranscriptParams, options?: RequestOptions): APIPromise<VideoUpdateTranscriptResponse>;
|
|
58
|
+
}
|
|
59
|
+
export type VideoListResponsesCursor = Cursor<VideoListResponse>;
|
|
60
|
+
export interface VideoListResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
accountId: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
type: 'Video';
|
|
65
|
+
captionsUpdatedAt?: string | null;
|
|
66
|
+
captionsUpdatedByName?: string | null;
|
|
67
|
+
description?: string | null;
|
|
68
|
+
duration?: number | null;
|
|
69
|
+
hasVideoUpload?: boolean | null;
|
|
70
|
+
height?: number | null;
|
|
71
|
+
name?: string | null;
|
|
72
|
+
updatedAt?: string | null;
|
|
73
|
+
width?: number | null;
|
|
74
|
+
}
|
|
75
|
+
export interface VideoCreateResponse {
|
|
76
|
+
id: string;
|
|
77
|
+
accountId: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
type: 'Video';
|
|
80
|
+
upload: VideoCreateResponse.Upload;
|
|
81
|
+
captionsUpdatedAt?: string | null;
|
|
82
|
+
captionsUpdatedByName?: string | null;
|
|
83
|
+
description?: string | null;
|
|
84
|
+
duration?: number | null;
|
|
85
|
+
hasVideoUpload?: boolean | null;
|
|
86
|
+
height?: number | null;
|
|
87
|
+
name?: string | null;
|
|
88
|
+
updatedAt?: string | null;
|
|
89
|
+
width?: number | null;
|
|
90
|
+
}
|
|
91
|
+
export declare namespace VideoCreateResponse {
|
|
92
|
+
interface Upload {
|
|
93
|
+
mimeType: 'MP4' | 'WEBM';
|
|
94
|
+
url: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export interface VideoRetrieveResponse {
|
|
98
|
+
id: string;
|
|
99
|
+
accountId: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
type: 'Video';
|
|
102
|
+
captionsUpdatedAt?: string | null;
|
|
103
|
+
captionsUpdatedByName?: string | null;
|
|
104
|
+
description?: string | null;
|
|
105
|
+
duration?: number | null;
|
|
106
|
+
hasVideoUpload?: boolean | null;
|
|
107
|
+
height?: number | null;
|
|
108
|
+
name?: string | null;
|
|
109
|
+
resolvedValues?: unknown | null;
|
|
110
|
+
updatedAt?: string | null;
|
|
111
|
+
width?: number | null;
|
|
112
|
+
}
|
|
113
|
+
export interface VideoUpdateResponse {
|
|
114
|
+
id: string;
|
|
115
|
+
accountId: string;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
type: 'Video';
|
|
118
|
+
captionsUpdatedAt?: string | null;
|
|
119
|
+
captionsUpdatedByName?: string | null;
|
|
120
|
+
description?: string | null;
|
|
121
|
+
duration?: number | null;
|
|
122
|
+
hasVideoUpload?: boolean | null;
|
|
123
|
+
height?: number | null;
|
|
124
|
+
name?: string | null;
|
|
125
|
+
updatedAt?: string | null;
|
|
126
|
+
width?: number | null;
|
|
127
|
+
}
|
|
128
|
+
export interface VideoDeleteResponse {
|
|
129
|
+
id: string;
|
|
130
|
+
deleted: true;
|
|
131
|
+
}
|
|
132
|
+
export interface VideoAnalyticsResponse {
|
|
133
|
+
hasMore: boolean;
|
|
134
|
+
items: Array<VideoAnalyticsResponse.Item>;
|
|
135
|
+
total: number;
|
|
136
|
+
}
|
|
137
|
+
export declare namespace VideoAnalyticsResponse {
|
|
138
|
+
interface Item {
|
|
139
|
+
avgVideoDurationSeconds: number;
|
|
140
|
+
avgWatchTimeSeconds: number;
|
|
141
|
+
completionRate: number;
|
|
142
|
+
uniqueViewers: number;
|
|
143
|
+
videoStarts: number;
|
|
144
|
+
videoTitle: string;
|
|
145
|
+
videoId?: string | null;
|
|
146
|
+
videoUrl?: string | null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export interface VideoAnalyticsTimeseriesResponse {
|
|
150
|
+
items: Array<VideoAnalyticsTimeseriesResponse.Item>;
|
|
151
|
+
}
|
|
152
|
+
export declare namespace VideoAnalyticsTimeseriesResponse {
|
|
153
|
+
interface Item {
|
|
154
|
+
completionRate: number;
|
|
155
|
+
completions: number;
|
|
156
|
+
dateTime: string;
|
|
157
|
+
uniqueViewers: number;
|
|
158
|
+
videoStarts: number;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export interface VideoTranscriptResponse {
|
|
162
|
+
content?: string | null;
|
|
163
|
+
}
|
|
164
|
+
export interface VideoUpdateTranscriptResponse {
|
|
165
|
+
id: string;
|
|
166
|
+
accountId: string;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
type: 'Video';
|
|
169
|
+
captionsUpdatedAt?: string | null;
|
|
170
|
+
captionsUpdatedByName?: string | null;
|
|
171
|
+
description?: string | null;
|
|
172
|
+
duration?: number | null;
|
|
173
|
+
hasVideoUpload?: boolean | null;
|
|
174
|
+
height?: number | null;
|
|
175
|
+
name?: string | null;
|
|
176
|
+
updatedAt?: string | null;
|
|
177
|
+
width?: number | null;
|
|
178
|
+
}
|
|
179
|
+
export interface VideoListParams extends CursorParams {
|
|
180
|
+
/**
|
|
181
|
+
* Case-insensitive substring match on the video title.
|
|
182
|
+
*/
|
|
183
|
+
nameContains?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface VideoCreateParams {
|
|
186
|
+
/**
|
|
187
|
+
* Content type for the original video upload: `MP4` or `WEBM`.
|
|
188
|
+
*/
|
|
189
|
+
mimeType: 'MP4' | 'WEBM';
|
|
190
|
+
description?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Video title. Defaults to `New Video` when omitted.
|
|
193
|
+
*/
|
|
194
|
+
name?: string | null;
|
|
195
|
+
}
|
|
196
|
+
export interface VideoUpdateParams {
|
|
197
|
+
description?: string | null;
|
|
198
|
+
duration?: number | null;
|
|
199
|
+
hasVideoUpload?: boolean | null;
|
|
200
|
+
height?: number | null;
|
|
201
|
+
name?: string | null;
|
|
202
|
+
width?: number | null;
|
|
203
|
+
}
|
|
204
|
+
export interface VideoAnalyticsParams {
|
|
205
|
+
/**
|
|
206
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
207
|
+
*/
|
|
208
|
+
from: string;
|
|
209
|
+
/**
|
|
210
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
211
|
+
*/
|
|
212
|
+
to: string;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum number of video rows to return. Defaults to 50.
|
|
215
|
+
*/
|
|
216
|
+
limit?: number;
|
|
217
|
+
/**
|
|
218
|
+
* Zero-based row offset. This report is an intentional offset-pagination
|
|
219
|
+
* exception.
|
|
220
|
+
*/
|
|
221
|
+
offset?: number | null;
|
|
222
|
+
}
|
|
223
|
+
export interface VideoAnalyticsTimeseriesParams {
|
|
224
|
+
/**
|
|
225
|
+
* Inclusive UTC start day in `YYYY-MM-DD` format.
|
|
226
|
+
*/
|
|
227
|
+
from: string;
|
|
228
|
+
/**
|
|
229
|
+
* Inclusive UTC end day in `YYYY-MM-DD` format.
|
|
230
|
+
*/
|
|
231
|
+
to: string;
|
|
232
|
+
/**
|
|
233
|
+
* Bucket size. Defaults to `DAILY`; `HOURLY` supports windows of up to 14 days.
|
|
234
|
+
*/
|
|
235
|
+
granularity?: 'DAILY' | 'HOURLY';
|
|
236
|
+
}
|
|
237
|
+
export interface VideoUpdateTranscriptParams {
|
|
238
|
+
/**
|
|
239
|
+
* Transcript text, limited to 1 MB.
|
|
240
|
+
*/
|
|
241
|
+
content: string;
|
|
242
|
+
/**
|
|
243
|
+
* Transcript source format. SRT content is normalized to WebVTT before it is
|
|
244
|
+
* saved.
|
|
245
|
+
*/
|
|
246
|
+
format: 'SRT' | 'VTT';
|
|
247
|
+
}
|
|
248
|
+
export declare namespace Videos {
|
|
249
|
+
export { type VideoListResponse as VideoListResponse, type VideoCreateResponse as VideoCreateResponse, type VideoRetrieveResponse as VideoRetrieveResponse, type VideoUpdateResponse as VideoUpdateResponse, type VideoDeleteResponse as VideoDeleteResponse, type VideoAnalyticsResponse as VideoAnalyticsResponse, type VideoAnalyticsTimeseriesResponse as VideoAnalyticsTimeseriesResponse, type VideoTranscriptResponse as VideoTranscriptResponse, type VideoUpdateTranscriptResponse as VideoUpdateTranscriptResponse, type VideoListResponsesCursor as VideoListResponsesCursor, type VideoListParams as VideoListParams, type VideoCreateParams as VideoCreateParams, type VideoUpdateParams as VideoUpdateParams, type VideoAnalyticsParams as VideoAnalyticsParams, type VideoAnalyticsTimeseriesParams as VideoAnalyticsTimeseriesParams, type VideoUpdateTranscriptParams as VideoUpdateTranscriptParams, };
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=videos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.d.ts","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,8BAA2B;AAC5E,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,iBAAiB,CAAC;IAI3D;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAA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EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Videos = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Videos extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List videos for the account, newest first. Supports cursor pagination and an
|
|
11
|
+
* optional case-insensitive title filter. Requires scope: media:list
|
|
12
|
+
*/
|
|
13
|
+
list(query = {}, options) {
|
|
14
|
+
return this._client.getAPIList('/rest/v1/videos', (pagination_1.Cursor), { query, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a video record and return a temporary upload target for the original MP4
|
|
18
|
+
* or WebM file. Upload the file directly using the returned URL and matching
|
|
19
|
+
* content type, then poll the video to observe processing progress. Requires
|
|
20
|
+
* scope: media:create
|
|
21
|
+
*/
|
|
22
|
+
create(body, options) {
|
|
23
|
+
return this._client.post('/rest/v1/videos', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Fetch a video and its current playback asset availability. The processed video,
|
|
27
|
+
* poster, and transcript are prepared asynchronously after upload. Requires scope:
|
|
28
|
+
* media:find
|
|
29
|
+
*/
|
|
30
|
+
retrieve(id, options) {
|
|
31
|
+
return this._client.get((0, path_1.path) `/rest/v1/videos/${id}`, options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Partially update video metadata. Only fields included in the body change; send
|
|
35
|
+
* `null` to clear a nullable field. Requires scope: media:update
|
|
36
|
+
*/
|
|
37
|
+
update(id, body, options) {
|
|
38
|
+
return this._client.patch((0, path_1.path) `/rest/v1/videos/${id}`, { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Delete a video and its related assets. Requires scope: media:delete
|
|
42
|
+
*/
|
|
43
|
+
delete(id, options) {
|
|
44
|
+
return this._client.delete((0, path_1.path) `/rest/v1/videos/${id}`, options);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Return per-video starts, unique viewers, completion rate, and average watch time
|
|
48
|
+
* for a date window. This derived report uses `limit` and `offset` pagination;
|
|
49
|
+
* `total` is the number of rows returned through the current offset, not a total
|
|
50
|
+
* match count. Requires scope: report:video-analytics
|
|
51
|
+
*/
|
|
52
|
+
analytics(query, options) {
|
|
53
|
+
return this._client.get('/rest/v1/videos/analytics', { query, ...options });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Return daily or hourly starts, unique viewers, completions, and completion rate
|
|
57
|
+
* for one video. Daily windows support up to 90 days; hourly windows support up to
|
|
58
|
+
* 14 days. Requires scope: report:video-analytics
|
|
59
|
+
*/
|
|
60
|
+
analyticsTimeseries(id, query, options) {
|
|
61
|
+
return this._client.get((0, path_1.path) `/rest/v1/videos/${id}/analytics`, { query, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Read the current WebVTT transcript. Transcript text is available wherever the
|
|
65
|
+
* video is embedded, so do not include PHI or other confidential information.
|
|
66
|
+
* Requires scope: media:find
|
|
67
|
+
*/
|
|
68
|
+
transcript(id, options) {
|
|
69
|
+
return this._client.get((0, path_1.path) `/rest/v1/videos/${id}/transcript`, options);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Replace the transcript with VTT or SRT text. SRT is normalized to WebVTT.
|
|
73
|
+
* Transcript text is available wherever the video is embedded, so do not include
|
|
74
|
+
* PHI or other confidential information. Requires scope: media:update
|
|
75
|
+
*/
|
|
76
|
+
updateTranscript(id, body, options) {
|
|
77
|
+
return this._client.put((0, path_1.path) `/rest/v1/videos/${id}/transcript`, { body, ...options });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.Videos = Videos;
|
|
81
|
+
//# sourceMappingURL=videos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videos.js","sourceRoot":"","sources":["../src/resources/videos.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,mBAAyB,CAAA,EAAE,EAAE,KAAK,EAAE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