@oursprivacy/platform-sdk 1.42.2 → 1.44.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 (98) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +14 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +14 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +12 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +12 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/audience-conversion-reports.d.mts +216 -0
  12. package/resources/audience-conversion-reports.d.mts.map +1 -0
  13. package/resources/audience-conversion-reports.d.ts +216 -0
  14. package/resources/audience-conversion-reports.d.ts.map +1 -0
  15. package/resources/audience-conversion-reports.js +55 -0
  16. package/resources/audience-conversion-reports.js.map +1 -0
  17. package/resources/audience-conversion-reports.mjs +51 -0
  18. package/resources/audience-conversion-reports.mjs.map +1 -0
  19. package/resources/conversion-journey-summaries.d.mts +169 -0
  20. package/resources/conversion-journey-summaries.d.mts.map +1 -0
  21. package/resources/conversion-journey-summaries.d.ts +169 -0
  22. package/resources/conversion-journey-summaries.d.ts.map +1 -0
  23. package/resources/conversion-journey-summaries.js +51 -0
  24. package/resources/conversion-journey-summaries.js.map +1 -0
  25. package/resources/conversion-journey-summaries.mjs +47 -0
  26. package/resources/conversion-journey-summaries.mjs.map +1 -0
  27. package/resources/destinations.d.mts +38 -17
  28. package/resources/destinations.d.mts.map +1 -1
  29. package/resources/destinations.d.ts +38 -17
  30. package/resources/destinations.d.ts.map +1 -1
  31. package/resources/experiments.d.mts +6 -4
  32. package/resources/experiments.d.mts.map +1 -1
  33. package/resources/experiments.d.ts +6 -4
  34. package/resources/experiments.d.ts.map +1 -1
  35. package/resources/experiments.js +4 -3
  36. package/resources/experiments.js.map +1 -1
  37. package/resources/experiments.mjs +4 -3
  38. package/resources/experiments.mjs.map +1 -1
  39. package/resources/funnels.d.mts +844 -21
  40. package/resources/funnels.d.mts.map +1 -1
  41. package/resources/funnels.d.ts +844 -21
  42. package/resources/funnels.d.ts.map +1 -1
  43. package/resources/funnels.js +30 -6
  44. package/resources/funnels.js.map +1 -1
  45. package/resources/funnels.mjs +30 -6
  46. package/resources/funnels.mjs.map +1 -1
  47. package/resources/index.d.mts +5 -1
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +5 -1
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +9 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +4 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/versions.d.mts +40 -0
  56. package/resources/versions.d.mts.map +1 -1
  57. package/resources/versions.d.ts +40 -0
  58. package/resources/versions.d.ts.map +1 -1
  59. package/resources/video-channels.d.mts +237 -0
  60. package/resources/video-channels.d.mts.map +1 -0
  61. package/resources/video-channels.d.ts +237 -0
  62. package/resources/video-channels.d.ts.map +1 -0
  63. package/resources/video-channels.js +95 -0
  64. package/resources/video-channels.js.map +1 -0
  65. package/resources/video-channels.mjs +91 -0
  66. package/resources/video-channels.mjs.map +1 -0
  67. package/resources/videos.d.mts +251 -0
  68. package/resources/videos.d.mts.map +1 -0
  69. package/resources/videos.d.ts +251 -0
  70. package/resources/videos.d.ts.map +1 -0
  71. package/resources/videos.js +81 -0
  72. package/resources/videos.js.map +1 -0
  73. package/resources/videos.mjs +77 -0
  74. package/resources/videos.mjs.map +1 -0
  75. package/resources/web-scanners.d.mts +53 -8
  76. package/resources/web-scanners.d.mts.map +1 -1
  77. package/resources/web-scanners.d.ts +53 -8
  78. package/resources/web-scanners.d.ts.map +1 -1
  79. package/resources/web-scanners.js +9 -8
  80. package/resources/web-scanners.js.map +1 -1
  81. package/resources/web-scanners.mjs +9 -8
  82. package/resources/web-scanners.mjs.map +1 -1
  83. package/src/client.ts +146 -0
  84. package/src/resources/audience-conversion-reports.ts +466 -0
  85. package/src/resources/conversion-journey-summaries.ts +384 -0
  86. package/src/resources/destinations.ts +158 -12
  87. package/src/resources/experiments.ts +6 -4
  88. package/src/resources/funnels.ts +1400 -20
  89. package/src/resources/index.ts +67 -0
  90. package/src/resources/versions.ts +50 -0
  91. package/src/resources/video-channels.ts +405 -0
  92. package/src/resources/videos.ts +418 -0
  93. package/src/resources/web-scanners.ts +73 -8
  94. package/src/version.ts +1 -1
  95. package/version.d.mts +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/version.mjs +1 -1
@@ -0,0 +1,237 @@
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 VideoChannels extends APIResource {
6
+ /**
7
+ * List video channels for the account, sorted by name. Supports cursor pagination
8
+ * via `limit` and `cursor`; the limit clamp is 1000 so a single request can return
9
+ * the full set. Entries omit `resolvedValues` — fetch a channel by id for its video
10
+ * count and embed output. Requires scope: videoChannel:list
11
+ */
12
+ list(query?: VideoChannelListParams | null | undefined, options?: RequestOptions): PagePromise<VideoChannelListResponsesCursor, VideoChannelListResponse>;
13
+ /**
14
+ * Create a video channel. Only `name` is accepted here; set branding and publish it
15
+ * with PATCH, and add videos with `POST /rest/v1/video-channels/{id}/media`. New
16
+ * channels start unpublished, so the page is not reachable until you send
17
+ * `isPublished: true`. Requires scope: videoChannel:create
18
+ */
19
+ create(body: VideoChannelCreateParams, options?: RequestOptions): APIPromise<VideoChannelCreateResponse>;
20
+ /**
21
+ * Fetch a channel with its branding, publish state, video count, shareable page
22
+ * URL, and paste-ready embed code. Requires scope: videoChannel:find
23
+ */
24
+ retrieve(id: string, options?: RequestOptions): APIPromise<VideoChannelRetrieveResponse>;
25
+ /**
26
+ * Partially update a channel. Only fields included in the body change; send `null`
27
+ * to clear a nullable field. Sending `isPublished: true` makes the channel page
28
+ * reachable and renders it from the current videos and branding; `false` takes it
29
+ * offline. `logoMediaId` must reference an image in your media library. Requires
30
+ * scope: videoChannel:update
31
+ */
32
+ update(id: string, body: VideoChannelUpdateParams, options?: RequestOptions): APIPromise<VideoChannelUpdateResponse>;
33
+ /**
34
+ * Delete a channel and take its page offline. The videos it listed are not deleted
35
+ * — only their membership in this channel. Requires scope: videoChannel:delete
36
+ */
37
+ delete(id: string, options?: RequestOptions): APIPromise<VideoChannelDeleteResponse>;
38
+ /**
39
+ * List the videos in a channel, ordered by their position on the page. Not
40
+ * paginated: a channel holds a bounded set of videos, so the full ordered list is
41
+ * always returned. Videos whose media no longer resolves are omitted rather than
42
+ * returned as broken entries. Requires scope: videoChannel:find
43
+ */
44
+ media(id: string, options?: RequestOptions): APIPromise<VideoChannelMediaResponse>;
45
+ /**
46
+ * Add a video to a channel. Omit `position` to append it to the end. A video can
47
+ * belong to several channels, so adding it here does not remove it from any other.
48
+ * Calling this again for a video already in the channel updates its position
49
+ * instead of adding a duplicate, and keeps its current slot when `position` is
50
+ * omitted. The returned `id` is a composite membership key, not a UUID. Requires
51
+ * scope: videoChannel:update
52
+ */
53
+ assignMedia(id: string, body: VideoChannelAssignMediaParams, options?: RequestOptions): APIPromise<VideoChannelAssignMediaResponse>;
54
+ /**
55
+ * Remove one video from a channel, identified by the `mediaId` query parameter. The
56
+ * video itself is not deleted and stays in any other channel it belongs to.
57
+ * Idempotent — removing a video that is not in the channel succeeds and returns the
58
+ * channel unchanged. Requires scope: videoChannel:update
59
+ */
60
+ removeMedia(id: string, query: VideoChannelRemoveMediaParams, options?: RequestOptions): APIPromise<VideoChannelRemoveMediaResponse>;
61
+ /**
62
+ * Set the display order of a channel’s videos. Send every video id currently in the
63
+ * channel in the order you want them shown — index 0 appears first. A partial list,
64
+ * or an id that is not in the channel, returns 400 so a caller working from a stale
65
+ * view learns it is out of date instead of getting a partial write. Requires scope:
66
+ * videoChannel:update
67
+ */
68
+ reorder(id: string, body: VideoChannelReorderParams, options?: RequestOptions): APIPromise<VideoChannelReorderResponse>;
69
+ }
70
+ export type VideoChannelListResponsesCursor = Cursor<VideoChannelListResponse>;
71
+ export interface VideoChannelListResponse {
72
+ id: string;
73
+ accountId: string;
74
+ name: string;
75
+ brandColor?: string | null;
76
+ createdAt?: string | null;
77
+ description?: string | null;
78
+ footerText?: string | null;
79
+ isPublished?: boolean | null;
80
+ logoMediaId?: string | null;
81
+ updatedAt?: string | null;
82
+ }
83
+ export interface VideoChannelCreateResponse {
84
+ id: string;
85
+ accountId: string;
86
+ name: string;
87
+ brandColor?: string | null;
88
+ createdAt?: string | null;
89
+ description?: string | null;
90
+ footerText?: string | null;
91
+ isPublished?: boolean | null;
92
+ logoMediaId?: string | null;
93
+ updatedAt?: string | null;
94
+ }
95
+ export interface VideoChannelRetrieveResponse {
96
+ id: string;
97
+ accountId: string;
98
+ name: string;
99
+ brandColor?: string | null;
100
+ createdAt?: string | null;
101
+ description?: string | null;
102
+ footerText?: string | null;
103
+ isPublished?: boolean | null;
104
+ logoMediaId?: string | null;
105
+ resolvedValues?: unknown | null;
106
+ updatedAt?: string | null;
107
+ }
108
+ export interface VideoChannelUpdateResponse {
109
+ id: string;
110
+ accountId: string;
111
+ name: string;
112
+ brandColor?: string | null;
113
+ createdAt?: string | null;
114
+ description?: string | null;
115
+ footerText?: string | null;
116
+ isPublished?: boolean | null;
117
+ logoMediaId?: string | null;
118
+ resolvedValues?: unknown | null;
119
+ updatedAt?: string | null;
120
+ }
121
+ export interface VideoChannelDeleteResponse {
122
+ id: string;
123
+ deleted: true;
124
+ }
125
+ export interface VideoChannelMediaResponse {
126
+ entities: Array<VideoChannelMediaResponse.Entity>;
127
+ }
128
+ export declare namespace VideoChannelMediaResponse {
129
+ interface Entity {
130
+ id: string;
131
+ accountId: string;
132
+ createdAt: string;
133
+ type: 'Video';
134
+ captionsUpdatedAt?: string | null;
135
+ captionsUpdatedByName?: string | null;
136
+ description?: string | null;
137
+ duration?: number | null;
138
+ hasVideoUpload?: boolean | null;
139
+ height?: number | null;
140
+ name?: string | null;
141
+ updatedAt?: string | null;
142
+ width?: number | null;
143
+ }
144
+ }
145
+ export interface VideoChannelAssignMediaResponse {
146
+ id: string;
147
+ accountId: string;
148
+ mediaId: string;
149
+ channelId?: string | null;
150
+ createdAt?: string | null;
151
+ position?: number | null;
152
+ updatedAt?: string | null;
153
+ }
154
+ export interface VideoChannelRemoveMediaResponse {
155
+ id: string;
156
+ accountId: string;
157
+ name: string;
158
+ brandColor?: string | null;
159
+ createdAt?: string | null;
160
+ description?: string | null;
161
+ footerText?: string | null;
162
+ isPublished?: boolean | null;
163
+ logoMediaId?: string | null;
164
+ resolvedValues?: unknown | null;
165
+ updatedAt?: string | null;
166
+ }
167
+ export interface VideoChannelReorderResponse {
168
+ id: string;
169
+ accountId: string;
170
+ name: string;
171
+ brandColor?: string | null;
172
+ createdAt?: string | null;
173
+ description?: string | null;
174
+ footerText?: string | null;
175
+ isPublished?: boolean | null;
176
+ logoMediaId?: string | null;
177
+ resolvedValues?: unknown | null;
178
+ updatedAt?: string | null;
179
+ }
180
+ export interface VideoChannelListParams extends CursorParams {
181
+ }
182
+ export interface VideoChannelCreateParams {
183
+ /**
184
+ * Channel name. Case-insensitively unique within the account.
185
+ */
186
+ name: string;
187
+ }
188
+ export interface VideoChannelUpdateParams {
189
+ /**
190
+ * Accent color used on the channel page. Any CSS color string.
191
+ */
192
+ brandColor?: string | null;
193
+ description?: string | null;
194
+ footerText?: string | null;
195
+ /**
196
+ * Whether the channel page is publicly reachable. Publishing renders the page from
197
+ * the current videos and branding; unpublishing takes it offline.
198
+ */
199
+ isPublished?: boolean | null;
200
+ /**
201
+ * Id of an image in your media library to show as the channel logo. Must be an
202
+ * image; send `null` to clear it.
203
+ */
204
+ logoMediaId?: string | null;
205
+ /**
206
+ * New channel name. Must stay case-insensitively unique within the account.
207
+ */
208
+ name?: string | null;
209
+ }
210
+ export interface VideoChannelAssignMediaParams {
211
+ /**
212
+ * Id of the video to add to the channel. Must be a video, not an image.
213
+ */
214
+ mediaId: string;
215
+ /**
216
+ * Zero-based slot in the channel order. Omit to append to the end; omitting it on a
217
+ * video that is already in the channel keeps its current slot.
218
+ */
219
+ position?: number;
220
+ }
221
+ export interface VideoChannelRemoveMediaParams {
222
+ /**
223
+ * Id of the video to remove from this channel.
224
+ */
225
+ mediaId: string;
226
+ }
227
+ export interface VideoChannelReorderParams {
228
+ /**
229
+ * Every video id currently in the channel, in the order you want them shown.
230
+ * Partial lists and ids that are not in the channel are rejected.
231
+ */
232
+ mediaIds: Array<string>;
233
+ }
234
+ export declare namespace VideoChannels {
235
+ export { type VideoChannelListResponse as VideoChannelListResponse, type VideoChannelCreateResponse as VideoChannelCreateResponse, type VideoChannelRetrieveResponse as VideoChannelRetrieveResponse, type VideoChannelUpdateResponse as VideoChannelUpdateResponse, type VideoChannelDeleteResponse as VideoChannelDeleteResponse, type VideoChannelMediaResponse as VideoChannelMediaResponse, type VideoChannelAssignMediaResponse as VideoChannelAssignMediaResponse, type VideoChannelRemoveMediaResponse as VideoChannelRemoveMediaResponse, type VideoChannelReorderResponse as VideoChannelReorderResponse, type VideoChannelListResponsesCursor as VideoChannelListResponsesCursor, type VideoChannelListParams as VideoChannelListParams, type VideoChannelCreateParams as VideoChannelCreateParams, type VideoChannelUpdateParams as VideoChannelUpdateParams, type VideoChannelAssignMediaParams as VideoChannelAssignMediaParams, type VideoChannelRemoveMediaParams as VideoChannelRemoveMediaParams, type VideoChannelReorderParams as VideoChannelReorderParams, };
236
+ }
237
+ //# sourceMappingURL=video-channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-channels.d.ts","sourceRoot":"","sources":["../src/resources/video-channels.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,aAAc,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AK,CAAC,MAAM,CAAC,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -0,0 +1,95 @@
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.VideoChannels = 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 VideoChannels extends resource_1.APIResource {
9
+ /**
10
+ * List video channels for the account, sorted by name. Supports cursor pagination
11
+ * via `limit` and `cursor`; the limit clamp is 1000 so a single request can return
12
+ * the full set. Entries omit `resolvedValues` — fetch a channel by id for its video
13
+ * count and embed output. Requires scope: videoChannel:list
14
+ */
15
+ list(query = {}, options) {
16
+ return this._client.getAPIList('/rest/v1/video-channels', (pagination_1.Cursor), {
17
+ query,
18
+ ...options,
19
+ });
20
+ }
21
+ /**
22
+ * Create a video channel. Only `name` is accepted here; set branding and publish it
23
+ * with PATCH, and add videos with `POST /rest/v1/video-channels/{id}/media`. New
24
+ * channels start unpublished, so the page is not reachable until you send
25
+ * `isPublished: true`. Requires scope: videoChannel:create
26
+ */
27
+ create(body, options) {
28
+ return this._client.post('/rest/v1/video-channels', { body, ...options });
29
+ }
30
+ /**
31
+ * Fetch a channel with its branding, publish state, video count, shareable page
32
+ * URL, and paste-ready embed code. Requires scope: videoChannel:find
33
+ */
34
+ retrieve(id, options) {
35
+ return this._client.get((0, path_1.path) `/rest/v1/video-channels/${id}`, options);
36
+ }
37
+ /**
38
+ * Partially update a channel. Only fields included in the body change; send `null`
39
+ * to clear a nullable field. Sending `isPublished: true` makes the channel page
40
+ * reachable and renders it from the current videos and branding; `false` takes it
41
+ * offline. `logoMediaId` must reference an image in your media library. Requires
42
+ * scope: videoChannel:update
43
+ */
44
+ update(id, body, options) {
45
+ return this._client.patch((0, path_1.path) `/rest/v1/video-channels/${id}`, { body, ...options });
46
+ }
47
+ /**
48
+ * Delete a channel and take its page offline. The videos it listed are not deleted
49
+ * — only their membership in this channel. Requires scope: videoChannel:delete
50
+ */
51
+ delete(id, options) {
52
+ return this._client.delete((0, path_1.path) `/rest/v1/video-channels/${id}`, options);
53
+ }
54
+ /**
55
+ * List the videos in a channel, ordered by their position on the page. Not
56
+ * paginated: a channel holds a bounded set of videos, so the full ordered list is
57
+ * always returned. Videos whose media no longer resolves are omitted rather than
58
+ * returned as broken entries. Requires scope: videoChannel:find
59
+ */
60
+ media(id, options) {
61
+ return this._client.get((0, path_1.path) `/rest/v1/video-channels/${id}/media`, options);
62
+ }
63
+ /**
64
+ * Add a video to a channel. Omit `position` to append it to the end. A video can
65
+ * belong to several channels, so adding it here does not remove it from any other.
66
+ * Calling this again for a video already in the channel updates its position
67
+ * instead of adding a duplicate, and keeps its current slot when `position` is
68
+ * omitted. The returned `id` is a composite membership key, not a UUID. Requires
69
+ * scope: videoChannel:update
70
+ */
71
+ assignMedia(id, body, options) {
72
+ return this._client.post((0, path_1.path) `/rest/v1/video-channels/${id}/media`, { body, ...options });
73
+ }
74
+ /**
75
+ * Remove one video from a channel, identified by the `mediaId` query parameter. The
76
+ * video itself is not deleted and stays in any other channel it belongs to.
77
+ * Idempotent — removing a video that is not in the channel succeeds and returns the
78
+ * channel unchanged. Requires scope: videoChannel:update
79
+ */
80
+ removeMedia(id, query, options) {
81
+ return this._client.delete((0, path_1.path) `/rest/v1/video-channels/${id}/media`, { query, ...options });
82
+ }
83
+ /**
84
+ * Set the display order of a channel’s videos. Send every video id currently in the
85
+ * channel in the order you want them shown — index 0 appears first. A partial list,
86
+ * or an id that is not in the channel, returns 400 so a caller working from a stale
87
+ * view learns it is out of date instead of getting a partial write. Requires scope:
88
+ * videoChannel:update
89
+ */
90
+ reorder(id, body, options) {
91
+ return this._client.post((0, path_1.path) `/rest/v1/video-channels/${id}/reorder`, { body, ...options });
92
+ }
93
+ }
94
+ exports.VideoChannels = VideoChannels;
95
+ //# sourceMappingURL=video-channels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-channels.js","sourceRoot":"","sources":["../src/resources/video-channels.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;OAKG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAA,mBAAgC,CAAA,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;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IAAI,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9F,CAAC;CACF;AAhHD,sCAgHC"}
@@ -0,0 +1,91 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { Cursor } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class VideoChannels extends APIResource {
6
+ /**
7
+ * List video channels for the account, sorted by name. Supports cursor pagination
8
+ * via `limit` and `cursor`; the limit clamp is 1000 so a single request can return
9
+ * the full set. Entries omit `resolvedValues` — fetch a channel by id for its video
10
+ * count and embed output. Requires scope: videoChannel:list
11
+ */
12
+ list(query = {}, options) {
13
+ return this._client.getAPIList('/rest/v1/video-channels', (Cursor), {
14
+ query,
15
+ ...options,
16
+ });
17
+ }
18
+ /**
19
+ * Create a video channel. Only `name` is accepted here; set branding and publish it
20
+ * with PATCH, and add videos with `POST /rest/v1/video-channels/{id}/media`. New
21
+ * channels start unpublished, so the page is not reachable until you send
22
+ * `isPublished: true`. Requires scope: videoChannel:create
23
+ */
24
+ create(body, options) {
25
+ return this._client.post('/rest/v1/video-channels', { body, ...options });
26
+ }
27
+ /**
28
+ * Fetch a channel with its branding, publish state, video count, shareable page
29
+ * URL, and paste-ready embed code. Requires scope: videoChannel:find
30
+ */
31
+ retrieve(id, options) {
32
+ return this._client.get(path `/rest/v1/video-channels/${id}`, options);
33
+ }
34
+ /**
35
+ * Partially update a channel. Only fields included in the body change; send `null`
36
+ * to clear a nullable field. Sending `isPublished: true` makes the channel page
37
+ * reachable and renders it from the current videos and branding; `false` takes it
38
+ * offline. `logoMediaId` must reference an image in your media library. Requires
39
+ * scope: videoChannel:update
40
+ */
41
+ update(id, body, options) {
42
+ return this._client.patch(path `/rest/v1/video-channels/${id}`, { body, ...options });
43
+ }
44
+ /**
45
+ * Delete a channel and take its page offline. The videos it listed are not deleted
46
+ * — only their membership in this channel. Requires scope: videoChannel:delete
47
+ */
48
+ delete(id, options) {
49
+ return this._client.delete(path `/rest/v1/video-channels/${id}`, options);
50
+ }
51
+ /**
52
+ * List the videos in a channel, ordered by their position on the page. Not
53
+ * paginated: a channel holds a bounded set of videos, so the full ordered list is
54
+ * always returned. Videos whose media no longer resolves are omitted rather than
55
+ * returned as broken entries. Requires scope: videoChannel:find
56
+ */
57
+ media(id, options) {
58
+ return this._client.get(path `/rest/v1/video-channels/${id}/media`, options);
59
+ }
60
+ /**
61
+ * Add a video to a channel. Omit `position` to append it to the end. A video can
62
+ * belong to several channels, so adding it here does not remove it from any other.
63
+ * Calling this again for a video already in the channel updates its position
64
+ * instead of adding a duplicate, and keeps its current slot when `position` is
65
+ * omitted. The returned `id` is a composite membership key, not a UUID. Requires
66
+ * scope: videoChannel:update
67
+ */
68
+ assignMedia(id, body, options) {
69
+ return this._client.post(path `/rest/v1/video-channels/${id}/media`, { body, ...options });
70
+ }
71
+ /**
72
+ * Remove one video from a channel, identified by the `mediaId` query parameter. The
73
+ * video itself is not deleted and stays in any other channel it belongs to.
74
+ * Idempotent — removing a video that is not in the channel succeeds and returns the
75
+ * channel unchanged. Requires scope: videoChannel:update
76
+ */
77
+ removeMedia(id, query, options) {
78
+ return this._client.delete(path `/rest/v1/video-channels/${id}/media`, { query, ...options });
79
+ }
80
+ /**
81
+ * Set the display order of a channel’s videos. Send every video id currently in the
82
+ * channel in the order you want them shown — index 0 appears first. A partial list,
83
+ * or an id that is not in the channel, returns 400 so a caller working from a stale
84
+ * view learns it is out of date instead of getting a partial write. Requires scope:
85
+ * videoChannel:update
86
+ */
87
+ reorder(id, body, options) {
88
+ return this._client.post(path `/rest/v1/video-channels/${id}/reorder`, { body, ...options });
89
+ }
90
+ }
91
+ //# sourceMappingURL=video-channels.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-channels.mjs","sourceRoot":"","sources":["../src/resources/video-channels.ts"],"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