@wix/auto_sdk_online-programs_sections 1.0.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/build/cjs/index.d.ts +109 -0
- package/build/cjs/index.js +1478 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1128 -0
- package/build/cjs/index.typings.js +1379 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +514 -0
- package/build/cjs/meta.js +1018 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +109 -0
- package/build/es/index.mjs +1436 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1128 -0
- package/build/es/index.typings.mjs +1337 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +514 -0
- package/build/es/meta.mjs +981 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +109 -0
- package/build/internal/cjs/index.js +1478 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1128 -0
- package/build/internal/cjs/index.typings.js +1379 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +514 -0
- package/build/internal/cjs/meta.js +1018 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +109 -0
- package/build/internal/es/index.mjs +1436 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1128 -0
- package/build/internal/es/index.typings.mjs +1337 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +514 -0
- package/build/internal/es/meta.mjs +981 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,1128 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
interface Section {
|
|
4
|
+
/**
|
|
5
|
+
* Program Section ID.
|
|
6
|
+
* @format GUID
|
|
7
|
+
* @readonly
|
|
8
|
+
*/
|
|
9
|
+
_id?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision
|
|
12
|
+
* @readonly
|
|
13
|
+
*/
|
|
14
|
+
revision?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Represents the time this Section was created
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
_createdDate?: Date | null;
|
|
20
|
+
/**
|
|
21
|
+
* Represents the time this Section was last updated
|
|
22
|
+
* @readonly
|
|
23
|
+
*/
|
|
24
|
+
_updatedDate?: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* Program Id to which this section is assigned to.
|
|
27
|
+
* @format GUID
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
programId?: string;
|
|
31
|
+
/** title, description and media content. */
|
|
32
|
+
description?: Description;
|
|
33
|
+
/** is this section published yet? */
|
|
34
|
+
state?: StateWithLiterals;
|
|
35
|
+
/**
|
|
36
|
+
* number of program steps in this section.
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
oldTotalSteps?: number;
|
|
40
|
+
/**
|
|
41
|
+
* number of program steps in this section.
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
totalSteps?: number | null;
|
|
45
|
+
/** should we open this section as a trial content even though the owning program isn't purchased yet? */
|
|
46
|
+
trialSection?: boolean;
|
|
47
|
+
/** field for manual ordering of sections */
|
|
48
|
+
ordering?: number;
|
|
49
|
+
/**
|
|
50
|
+
* open after defined number of days passed.
|
|
51
|
+
* @max 5000
|
|
52
|
+
*/
|
|
53
|
+
delayInDays?: number;
|
|
54
|
+
/** extensible field */
|
|
55
|
+
extendedFields?: ExtendedFields;
|
|
56
|
+
}
|
|
57
|
+
interface Description extends DescriptionMediaOneOf {
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
* @targetRemovalDate 2025-05-10
|
|
61
|
+
*/
|
|
62
|
+
image?: string;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated
|
|
65
|
+
* @targetRemovalDate 2025-05-10
|
|
66
|
+
*/
|
|
67
|
+
video?: string;
|
|
68
|
+
/** @maxLength 500 */
|
|
69
|
+
title?: string;
|
|
70
|
+
/** @maxLength 10000000 */
|
|
71
|
+
details?: string | null;
|
|
72
|
+
}
|
|
73
|
+
/** @oneof */
|
|
74
|
+
interface DescriptionMediaOneOf {
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated
|
|
77
|
+
* @targetRemovalDate 2025-05-10
|
|
78
|
+
*/
|
|
79
|
+
image?: string;
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated
|
|
82
|
+
* @targetRemovalDate 2025-05-10
|
|
83
|
+
*/
|
|
84
|
+
video?: string;
|
|
85
|
+
}
|
|
86
|
+
interface FocalPoint {
|
|
87
|
+
/** X-coordinate of the focal point. */
|
|
88
|
+
x?: number;
|
|
89
|
+
/** Y-coordinate of the focal point. */
|
|
90
|
+
y?: number;
|
|
91
|
+
/** crop by height */
|
|
92
|
+
height?: number | null;
|
|
93
|
+
/** crop by width */
|
|
94
|
+
width?: number | null;
|
|
95
|
+
}
|
|
96
|
+
interface VideoResolution {
|
|
97
|
+
/** Video URL. */
|
|
98
|
+
url?: string;
|
|
99
|
+
/** Video height. */
|
|
100
|
+
height?: number;
|
|
101
|
+
/** Video width. */
|
|
102
|
+
width?: number;
|
|
103
|
+
/** Video format for example, mp4, hls. */
|
|
104
|
+
format?: string;
|
|
105
|
+
}
|
|
106
|
+
declare enum State {
|
|
107
|
+
/** invalid default state. */
|
|
108
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
109
|
+
/** the section isn't ready to be shown to participants. */
|
|
110
|
+
DRAFT = "DRAFT",
|
|
111
|
+
/** this content is visible to participants. */
|
|
112
|
+
PUBLISHED = "PUBLISHED"
|
|
113
|
+
}
|
|
114
|
+
/** @enumType */
|
|
115
|
+
type StateWithLiterals = State | 'UNKNOWN_STATE' | 'DRAFT' | 'PUBLISHED';
|
|
116
|
+
interface ExtendedFields {
|
|
117
|
+
/**
|
|
118
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
119
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
120
|
+
*
|
|
121
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
122
|
+
*
|
|
123
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
124
|
+
*/
|
|
125
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
126
|
+
}
|
|
127
|
+
interface UpdateDocumentsEvent extends UpdateDocumentsEventOperationOneOf {
|
|
128
|
+
/** insert/update documents */
|
|
129
|
+
update?: DocumentUpdateOperation;
|
|
130
|
+
/** delete by document ids */
|
|
131
|
+
deleteByIds?: DeleteByIdsOperation;
|
|
132
|
+
/** delete documents matching filter */
|
|
133
|
+
deleteByFilter?: DeleteByFilterOperation;
|
|
134
|
+
/** update documents matching filter */
|
|
135
|
+
updateByFilter?: UpdateByFilterOperation;
|
|
136
|
+
/** update only existing documents */
|
|
137
|
+
updateExisting?: UpdateExistingOperation;
|
|
138
|
+
/**
|
|
139
|
+
* application which owns documents
|
|
140
|
+
* @minLength 2
|
|
141
|
+
*/
|
|
142
|
+
appDefId?: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* type of the documents
|
|
145
|
+
* @minLength 2
|
|
146
|
+
*/
|
|
147
|
+
documentType?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* language of the documents
|
|
150
|
+
* @minLength 2
|
|
151
|
+
*/
|
|
152
|
+
language?: string | null;
|
|
153
|
+
/**
|
|
154
|
+
* site documents belong to
|
|
155
|
+
* @minLength 2
|
|
156
|
+
*/
|
|
157
|
+
msId?: string | null;
|
|
158
|
+
}
|
|
159
|
+
/** @oneof */
|
|
160
|
+
interface UpdateDocumentsEventOperationOneOf {
|
|
161
|
+
/** insert/update documents */
|
|
162
|
+
update?: DocumentUpdateOperation;
|
|
163
|
+
/** delete by document ids */
|
|
164
|
+
deleteByIds?: DeleteByIdsOperation;
|
|
165
|
+
/** delete documents matching filter */
|
|
166
|
+
deleteByFilter?: DeleteByFilterOperation;
|
|
167
|
+
/** update documents matching filter */
|
|
168
|
+
updateByFilter?: UpdateByFilterOperation;
|
|
169
|
+
/** update only existing documents */
|
|
170
|
+
updateExisting?: UpdateExistingOperation;
|
|
171
|
+
}
|
|
172
|
+
interface DocumentUpdateOperation {
|
|
173
|
+
/** documents to index or update */
|
|
174
|
+
documents?: IndexDocument[];
|
|
175
|
+
}
|
|
176
|
+
interface IndexDocument {
|
|
177
|
+
/** data bag with non-searchable fields (url, image) */
|
|
178
|
+
payload?: DocumentPayload;
|
|
179
|
+
/** what type of users should documents be visible to */
|
|
180
|
+
exposure?: EnumWithLiterals;
|
|
181
|
+
/** document with mandatory fields (id, title, description) and with fields specific to the type of the document */
|
|
182
|
+
document?: Record<string, any> | null;
|
|
183
|
+
/** what member groups is the document exposed to. Used only with GROUP_PROTECTED exposure */
|
|
184
|
+
permittedMemberGroups?: string[];
|
|
185
|
+
/** if true SEO is disabled for this document */
|
|
186
|
+
seoHidden?: boolean | null;
|
|
187
|
+
/** if true the page is a lightbox popup */
|
|
188
|
+
isPopup?: boolean | null;
|
|
189
|
+
}
|
|
190
|
+
interface DocumentPayload {
|
|
191
|
+
/** url of the page representing the document */
|
|
192
|
+
url?: string | null;
|
|
193
|
+
/** image which represents the document */
|
|
194
|
+
documentImage?: DocumentImage;
|
|
195
|
+
}
|
|
196
|
+
interface DocumentImage {
|
|
197
|
+
/** the name of the image */
|
|
198
|
+
name?: string;
|
|
199
|
+
/** the width of the image */
|
|
200
|
+
width?: number;
|
|
201
|
+
/** the height of the image */
|
|
202
|
+
height?: number;
|
|
203
|
+
}
|
|
204
|
+
declare enum Enum {
|
|
205
|
+
/** Default value. Means that permission not set */
|
|
206
|
+
UNKNOWN = "UNKNOWN",
|
|
207
|
+
/** Protected exposure. Exposed to members and owners */
|
|
208
|
+
PROTECTED = "PROTECTED",
|
|
209
|
+
/** Private exposure. Exposed to owners */
|
|
210
|
+
PRIVATE = "PRIVATE",
|
|
211
|
+
/** Public exposure. Visible to everyone */
|
|
212
|
+
PUBLIC = "PUBLIC",
|
|
213
|
+
/** Used for partial updates, to state that exposure is not changing */
|
|
214
|
+
UNCHANGED = "UNCHANGED",
|
|
215
|
+
/** Protected to members of permitted groups and owners */
|
|
216
|
+
GROUP_PROTECTED = "GROUP_PROTECTED"
|
|
217
|
+
}
|
|
218
|
+
/** @enumType */
|
|
219
|
+
type EnumWithLiterals = Enum | 'UNKNOWN' | 'PROTECTED' | 'PRIVATE' | 'PUBLIC' | 'UNCHANGED' | 'GROUP_PROTECTED';
|
|
220
|
+
interface DeleteByIdsOperation {
|
|
221
|
+
/** ids of the documents to delete */
|
|
222
|
+
documentIds?: string[];
|
|
223
|
+
}
|
|
224
|
+
interface DeleteByFilterOperation {
|
|
225
|
+
/** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */
|
|
226
|
+
filter?: Record<string, any> | null;
|
|
227
|
+
}
|
|
228
|
+
interface UpdateByFilterOperation {
|
|
229
|
+
/** documents matching this filter will be updated */
|
|
230
|
+
filter?: Record<string, any> | null;
|
|
231
|
+
/** partial document to apply */
|
|
232
|
+
document?: IndexDocument;
|
|
233
|
+
}
|
|
234
|
+
interface UpdateExistingOperation {
|
|
235
|
+
/** documents to update */
|
|
236
|
+
documents?: IndexDocument[];
|
|
237
|
+
}
|
|
238
|
+
interface SectionUpdated {
|
|
239
|
+
/** Section before update. */
|
|
240
|
+
previous?: Section;
|
|
241
|
+
/** Section after update. */
|
|
242
|
+
current?: Section;
|
|
243
|
+
}
|
|
244
|
+
interface SectionDeleted {
|
|
245
|
+
/** Full section that was deleted */
|
|
246
|
+
section?: Section;
|
|
247
|
+
}
|
|
248
|
+
interface SectionCloned {
|
|
249
|
+
/** Section which was used as a prototype for cloning. */
|
|
250
|
+
prototype?: Section;
|
|
251
|
+
/** Result of section cloning. */
|
|
252
|
+
cloned?: Section;
|
|
253
|
+
}
|
|
254
|
+
interface SectionMoved {
|
|
255
|
+
/**
|
|
256
|
+
* Moved section id
|
|
257
|
+
* @format GUID
|
|
258
|
+
*/
|
|
259
|
+
sectionId?: string;
|
|
260
|
+
/** section position */
|
|
261
|
+
newSectionPositionRank?: number;
|
|
262
|
+
}
|
|
263
|
+
interface SectionPublished {
|
|
264
|
+
/**
|
|
265
|
+
* Published section id
|
|
266
|
+
* @format GUID
|
|
267
|
+
*/
|
|
268
|
+
sectionId?: string;
|
|
269
|
+
}
|
|
270
|
+
interface CreateSectionRequest {
|
|
271
|
+
/** Section to be created. */
|
|
272
|
+
section: Section;
|
|
273
|
+
/**
|
|
274
|
+
* Predefined sets of fields to return.
|
|
275
|
+
* @maxSize 1
|
|
276
|
+
*/
|
|
277
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
278
|
+
}
|
|
279
|
+
declare enum RequestedFields {
|
|
280
|
+
/** not implemented, invalid default value. */
|
|
281
|
+
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
282
|
+
/** return total number of steps in this section. */
|
|
283
|
+
TOTAL_STEPS = "TOTAL_STEPS"
|
|
284
|
+
}
|
|
285
|
+
/** @enumType */
|
|
286
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'TOTAL_STEPS';
|
|
287
|
+
interface CreateSectionResponse {
|
|
288
|
+
/** The created Section. */
|
|
289
|
+
section?: Section;
|
|
290
|
+
}
|
|
291
|
+
interface BulkCreateSectionRequest {
|
|
292
|
+
/**
|
|
293
|
+
* List of sections you want to create
|
|
294
|
+
* @minSize 1
|
|
295
|
+
* @maxSize 100
|
|
296
|
+
*/
|
|
297
|
+
sections: Section[];
|
|
298
|
+
/**
|
|
299
|
+
* Predefined sets of fields to return.
|
|
300
|
+
* @maxSize 1
|
|
301
|
+
*/
|
|
302
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
303
|
+
}
|
|
304
|
+
interface BulkCreateSectionResponse {
|
|
305
|
+
/** bulk results */
|
|
306
|
+
results?: BulkSectionResult[];
|
|
307
|
+
/** bulk metadata */
|
|
308
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
309
|
+
}
|
|
310
|
+
interface BulkSectionResult {
|
|
311
|
+
/** item metadata */
|
|
312
|
+
itemMetadata?: ItemMetadata;
|
|
313
|
+
/** created section */
|
|
314
|
+
item?: Section;
|
|
315
|
+
/** indicator whether it was create or update */
|
|
316
|
+
action?: BulkActionTypeWithLiterals;
|
|
317
|
+
}
|
|
318
|
+
interface ItemMetadata {
|
|
319
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
320
|
+
_id?: string | null;
|
|
321
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
322
|
+
originalIndex?: number;
|
|
323
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
324
|
+
success?: boolean;
|
|
325
|
+
/** Details about the error in case of failure. */
|
|
326
|
+
error?: ApplicationError;
|
|
327
|
+
}
|
|
328
|
+
interface ApplicationError {
|
|
329
|
+
/** Error code. */
|
|
330
|
+
code?: string;
|
|
331
|
+
/** Description of the error. */
|
|
332
|
+
description?: string;
|
|
333
|
+
/** Data related to the error. */
|
|
334
|
+
data?: Record<string, any> | null;
|
|
335
|
+
}
|
|
336
|
+
declare enum BulkActionType {
|
|
337
|
+
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
338
|
+
INSERT = "INSERT",
|
|
339
|
+
UPDATE = "UPDATE",
|
|
340
|
+
DELETE = "DELETE"
|
|
341
|
+
}
|
|
342
|
+
/** @enumType */
|
|
343
|
+
type BulkActionTypeWithLiterals = BulkActionType | 'UNKNOWN_ACTION_TYPE' | 'INSERT' | 'UPDATE' | 'DELETE';
|
|
344
|
+
interface BulkActionMetadata {
|
|
345
|
+
/** Number of items that were successfully processed. */
|
|
346
|
+
totalSuccesses?: number;
|
|
347
|
+
/** Number of items that couldn't be processed. */
|
|
348
|
+
totalFailures?: number;
|
|
349
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
350
|
+
undetailedFailures?: number;
|
|
351
|
+
}
|
|
352
|
+
interface BulkCreateSectionMigrationRequest {
|
|
353
|
+
/**
|
|
354
|
+
* List of sections you want to create
|
|
355
|
+
* @minSize 1
|
|
356
|
+
* @maxSize 100
|
|
357
|
+
*/
|
|
358
|
+
sections: Section[];
|
|
359
|
+
}
|
|
360
|
+
interface BulkCreateSectionMigrationResponse {
|
|
361
|
+
/** bulk results */
|
|
362
|
+
results?: BulkSectionResult[];
|
|
363
|
+
/** bulk metadata */
|
|
364
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
365
|
+
}
|
|
366
|
+
interface GetSectionRequest {
|
|
367
|
+
/**
|
|
368
|
+
* ID of the Section to retrieve.
|
|
369
|
+
* @format GUID
|
|
370
|
+
*/
|
|
371
|
+
sectionId: string;
|
|
372
|
+
/** Whenever to return description only with title or with details as well */
|
|
373
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
374
|
+
/**
|
|
375
|
+
* Predefined sets of fields to return.
|
|
376
|
+
* @maxSize 1
|
|
377
|
+
*/
|
|
378
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
379
|
+
}
|
|
380
|
+
declare enum DescriptionFieldSet {
|
|
381
|
+
STANDARD = "STANDARD",
|
|
382
|
+
EXTENDED = "EXTENDED"
|
|
383
|
+
}
|
|
384
|
+
/** @enumType */
|
|
385
|
+
type DescriptionFieldSetWithLiterals = DescriptionFieldSet | 'STANDARD' | 'EXTENDED';
|
|
386
|
+
interface GetSectionResponse {
|
|
387
|
+
/** The requested Section. */
|
|
388
|
+
section?: Section;
|
|
389
|
+
}
|
|
390
|
+
interface UpdateSectionRequest {
|
|
391
|
+
/** Section to be updated, may be partial. */
|
|
392
|
+
section?: Section;
|
|
393
|
+
/**
|
|
394
|
+
* Predefined sets of fields to return.
|
|
395
|
+
* @maxSize 1
|
|
396
|
+
*/
|
|
397
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
398
|
+
}
|
|
399
|
+
interface UpdateSectionResponse {
|
|
400
|
+
/** Updated Section. */
|
|
401
|
+
section?: Section;
|
|
402
|
+
}
|
|
403
|
+
interface DeleteSectionRequest {
|
|
404
|
+
/**
|
|
405
|
+
* Id of the Section to delete.
|
|
406
|
+
* @format GUID
|
|
407
|
+
*/
|
|
408
|
+
sectionId: string;
|
|
409
|
+
}
|
|
410
|
+
interface DeleteSectionResponse {
|
|
411
|
+
}
|
|
412
|
+
interface DeleteAllProgramSectionsRequest {
|
|
413
|
+
/**
|
|
414
|
+
* Program id to delete sections from
|
|
415
|
+
* @format GUID
|
|
416
|
+
*/
|
|
417
|
+
programId?: string;
|
|
418
|
+
}
|
|
419
|
+
interface DeleteAllProgramSectionsResponse {
|
|
420
|
+
/** Total count of sections in the program */
|
|
421
|
+
sectionsTotal?: number;
|
|
422
|
+
/** Count of successfully deleted sections */
|
|
423
|
+
successfulCount?: number;
|
|
424
|
+
/** Count of sections that failed to be deleted */
|
|
425
|
+
failedCount?: number;
|
|
426
|
+
}
|
|
427
|
+
interface QuerySectionsRequest {
|
|
428
|
+
/** WQL expression. */
|
|
429
|
+
query?: CursorQuery;
|
|
430
|
+
/** Whenever to return description only with title or with details as well */
|
|
431
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
432
|
+
/**
|
|
433
|
+
* Program id to query sections
|
|
434
|
+
* @maxLength 36
|
|
435
|
+
*/
|
|
436
|
+
programId?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Predefined sets of fields to return.
|
|
439
|
+
* @maxSize 1
|
|
440
|
+
*/
|
|
441
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
442
|
+
}
|
|
443
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
444
|
+
/**
|
|
445
|
+
* Cursor paging options.
|
|
446
|
+
*
|
|
447
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
448
|
+
*/
|
|
449
|
+
cursorPaging?: CursorPaging;
|
|
450
|
+
/**
|
|
451
|
+
* Filter object.
|
|
452
|
+
*
|
|
453
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
454
|
+
*/
|
|
455
|
+
filter?: Record<string, any> | null;
|
|
456
|
+
/**
|
|
457
|
+
* Sort object.
|
|
458
|
+
*
|
|
459
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
460
|
+
* @maxSize 5
|
|
461
|
+
*/
|
|
462
|
+
sort?: Sorting[];
|
|
463
|
+
}
|
|
464
|
+
/** @oneof */
|
|
465
|
+
interface CursorQueryPagingMethodOneOf {
|
|
466
|
+
/**
|
|
467
|
+
* Cursor paging options.
|
|
468
|
+
*
|
|
469
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
470
|
+
*/
|
|
471
|
+
cursorPaging?: CursorPaging;
|
|
472
|
+
}
|
|
473
|
+
interface Sorting {
|
|
474
|
+
/**
|
|
475
|
+
* Name of the field to sort by.
|
|
476
|
+
* @maxLength 512
|
|
477
|
+
*/
|
|
478
|
+
fieldName?: string;
|
|
479
|
+
/** Sort order. */
|
|
480
|
+
order?: SortOrderWithLiterals;
|
|
481
|
+
}
|
|
482
|
+
declare enum SortOrder {
|
|
483
|
+
ASC = "ASC",
|
|
484
|
+
DESC = "DESC"
|
|
485
|
+
}
|
|
486
|
+
/** @enumType */
|
|
487
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
488
|
+
interface CursorPaging {
|
|
489
|
+
/**
|
|
490
|
+
* Maximum number of items to return in the results.
|
|
491
|
+
* @max 100
|
|
492
|
+
*/
|
|
493
|
+
limit?: number | null;
|
|
494
|
+
/**
|
|
495
|
+
* Pointer to the next or previous page in the list of results.
|
|
496
|
+
*
|
|
497
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
498
|
+
* Not relevant for the first request.
|
|
499
|
+
* @maxLength 16000
|
|
500
|
+
*/
|
|
501
|
+
cursor?: string | null;
|
|
502
|
+
}
|
|
503
|
+
interface QuerySectionsResponse {
|
|
504
|
+
/** List of Sections. */
|
|
505
|
+
sections?: Section[];
|
|
506
|
+
/** Paging metadata */
|
|
507
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
508
|
+
}
|
|
509
|
+
interface CursorPagingMetadata {
|
|
510
|
+
/** Number of items returned in current page. */
|
|
511
|
+
count?: number | null;
|
|
512
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
513
|
+
cursors?: Cursors;
|
|
514
|
+
/**
|
|
515
|
+
* Whether there are more pages to retrieve following the current page.
|
|
516
|
+
*
|
|
517
|
+
* + `true`: Another page of results can be retrieved.
|
|
518
|
+
* + `false`: This is the last page.
|
|
519
|
+
*/
|
|
520
|
+
hasNext?: boolean | null;
|
|
521
|
+
}
|
|
522
|
+
interface Cursors {
|
|
523
|
+
/**
|
|
524
|
+
* Cursor string pointing to the next page in the list of results.
|
|
525
|
+
* @maxLength 16000
|
|
526
|
+
*/
|
|
527
|
+
next?: string | null;
|
|
528
|
+
/**
|
|
529
|
+
* Cursor pointing to the previous page in the list of results.
|
|
530
|
+
* @maxLength 16000
|
|
531
|
+
*/
|
|
532
|
+
prev?: string | null;
|
|
533
|
+
}
|
|
534
|
+
interface ListSectionsRequest {
|
|
535
|
+
/**
|
|
536
|
+
* Program id to list sections
|
|
537
|
+
* @format GUID
|
|
538
|
+
*/
|
|
539
|
+
programId: string;
|
|
540
|
+
/** Whenever to return description only with title or with details as well */
|
|
541
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
542
|
+
/**
|
|
543
|
+
* Predefined sets of fields to return.
|
|
544
|
+
* @maxSize 1
|
|
545
|
+
*/
|
|
546
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
547
|
+
}
|
|
548
|
+
interface ListSectionsResponse {
|
|
549
|
+
/**
|
|
550
|
+
* sections
|
|
551
|
+
* @maxSize 1000
|
|
552
|
+
*/
|
|
553
|
+
sections?: Section[];
|
|
554
|
+
}
|
|
555
|
+
interface CloneSectionRequest {
|
|
556
|
+
/**
|
|
557
|
+
* Section to clone
|
|
558
|
+
* @format GUID
|
|
559
|
+
*/
|
|
560
|
+
sectionId: string;
|
|
561
|
+
/**
|
|
562
|
+
* Predefined sets of fields to return.
|
|
563
|
+
* @maxSize 1
|
|
564
|
+
*/
|
|
565
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
566
|
+
}
|
|
567
|
+
interface CloneSectionResponse {
|
|
568
|
+
/** cloned section */
|
|
569
|
+
section?: Section;
|
|
570
|
+
}
|
|
571
|
+
interface MoveSectionRequest {
|
|
572
|
+
/**
|
|
573
|
+
* Section to move
|
|
574
|
+
* @format GUID
|
|
575
|
+
*/
|
|
576
|
+
sectionId?: string;
|
|
577
|
+
/**
|
|
578
|
+
* change section position to be after the specified section. If empty insert in the "0" position.
|
|
579
|
+
* @format GUID
|
|
580
|
+
*/
|
|
581
|
+
afterSectionId?: string | null;
|
|
582
|
+
/** section revision */
|
|
583
|
+
revision?: string;
|
|
584
|
+
/**
|
|
585
|
+
* Predefined sets of fields to return.
|
|
586
|
+
* @maxSize 1
|
|
587
|
+
*/
|
|
588
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
589
|
+
}
|
|
590
|
+
interface MoveSectionResponse {
|
|
591
|
+
/** updated section which was moved */
|
|
592
|
+
section?: Section;
|
|
593
|
+
}
|
|
594
|
+
interface PublishSectionRequest {
|
|
595
|
+
/**
|
|
596
|
+
* Section to publish
|
|
597
|
+
* @format GUID
|
|
598
|
+
*/
|
|
599
|
+
sectionId?: string;
|
|
600
|
+
/** section revision */
|
|
601
|
+
revision?: string;
|
|
602
|
+
/**
|
|
603
|
+
* Predefined sets of fields to return.
|
|
604
|
+
* @maxSize 1
|
|
605
|
+
*/
|
|
606
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
607
|
+
}
|
|
608
|
+
interface PublishSectionResponse {
|
|
609
|
+
/** Published section */
|
|
610
|
+
section?: Section;
|
|
611
|
+
}
|
|
612
|
+
interface BulkCloneSectionRequest {
|
|
613
|
+
/**
|
|
614
|
+
* id of program which was cloned
|
|
615
|
+
* @format GUID
|
|
616
|
+
*/
|
|
617
|
+
prototypeProgramId?: string;
|
|
618
|
+
/**
|
|
619
|
+
* id of program created after clone
|
|
620
|
+
* @format GUID
|
|
621
|
+
*/
|
|
622
|
+
clonedProgramId?: string;
|
|
623
|
+
}
|
|
624
|
+
interface BulkCloneSectionResponse {
|
|
625
|
+
/**
|
|
626
|
+
* id of program which was cloned
|
|
627
|
+
* @format GUID
|
|
628
|
+
*/
|
|
629
|
+
prototypeProgramId?: string;
|
|
630
|
+
/**
|
|
631
|
+
* id of program created after clone
|
|
632
|
+
* @format GUID
|
|
633
|
+
*/
|
|
634
|
+
clonedProgramId?: string;
|
|
635
|
+
/** mapping of original to cloned section ids */
|
|
636
|
+
prototypeIdToClonedId?: Record<string, string>;
|
|
637
|
+
}
|
|
638
|
+
interface RestoreSectionFromTrashRequest {
|
|
639
|
+
/**
|
|
640
|
+
* section id to restore
|
|
641
|
+
* @format GUID
|
|
642
|
+
*/
|
|
643
|
+
sectionId?: string;
|
|
644
|
+
/**
|
|
645
|
+
* Predefined sets of fields to return.
|
|
646
|
+
* @maxSize 1
|
|
647
|
+
*/
|
|
648
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
649
|
+
}
|
|
650
|
+
interface RestoreSectionFromTrashResponse {
|
|
651
|
+
/** restored section */
|
|
652
|
+
section?: Section;
|
|
653
|
+
}
|
|
654
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
655
|
+
createdEvent?: EntityCreatedEvent;
|
|
656
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
657
|
+
deletedEvent?: EntityDeletedEvent;
|
|
658
|
+
actionEvent?: ActionEvent;
|
|
659
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
660
|
+
_id?: string;
|
|
661
|
+
/**
|
|
662
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
663
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
664
|
+
*/
|
|
665
|
+
entityFqdn?: string;
|
|
666
|
+
/**
|
|
667
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
668
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
669
|
+
*/
|
|
670
|
+
slug?: string;
|
|
671
|
+
/** ID of the entity associated with the event. */
|
|
672
|
+
entityId?: string;
|
|
673
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
674
|
+
eventTime?: Date | null;
|
|
675
|
+
/**
|
|
676
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
677
|
+
* (for example, GDPR).
|
|
678
|
+
*/
|
|
679
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
680
|
+
/** If present, indicates the action that triggered the event. */
|
|
681
|
+
originatedFrom?: string | null;
|
|
682
|
+
/**
|
|
683
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
684
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
685
|
+
*/
|
|
686
|
+
entityEventSequence?: string | null;
|
|
687
|
+
}
|
|
688
|
+
/** @oneof */
|
|
689
|
+
interface DomainEventBodyOneOf {
|
|
690
|
+
createdEvent?: EntityCreatedEvent;
|
|
691
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
692
|
+
deletedEvent?: EntityDeletedEvent;
|
|
693
|
+
actionEvent?: ActionEvent;
|
|
694
|
+
}
|
|
695
|
+
interface EntityCreatedEvent {
|
|
696
|
+
entity?: string;
|
|
697
|
+
}
|
|
698
|
+
interface RestoreInfo {
|
|
699
|
+
deletedDate?: Date | null;
|
|
700
|
+
}
|
|
701
|
+
interface EntityUpdatedEvent {
|
|
702
|
+
/**
|
|
703
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
704
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
705
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
706
|
+
*/
|
|
707
|
+
currentEntity?: string;
|
|
708
|
+
}
|
|
709
|
+
interface EntityDeletedEvent {
|
|
710
|
+
/** Entity that was deleted. */
|
|
711
|
+
deletedEntity?: string | null;
|
|
712
|
+
}
|
|
713
|
+
interface ActionEvent {
|
|
714
|
+
body?: string;
|
|
715
|
+
}
|
|
716
|
+
interface Empty {
|
|
717
|
+
}
|
|
718
|
+
interface SearchIndexingNotification {
|
|
719
|
+
/** new state of indexing for the site specified in ms_id */
|
|
720
|
+
indexState?: SearchIndexingNotificationStateWithLiterals;
|
|
721
|
+
/** type of the document the notification is targeted for. Applies to all types if not provided */
|
|
722
|
+
documentType?: string | null;
|
|
723
|
+
/** languaInternalDocumentUpdateByFilterOperationge the notification is targeted for. Applies to all languages if not provided */
|
|
724
|
+
language?: string | null;
|
|
725
|
+
/**
|
|
726
|
+
* site for which notification is targeted
|
|
727
|
+
* @minLength 2
|
|
728
|
+
*/
|
|
729
|
+
msId?: string | null;
|
|
730
|
+
}
|
|
731
|
+
declare enum SearchIndexingNotificationState {
|
|
732
|
+
/** default state */
|
|
733
|
+
Unknown = "Unknown",
|
|
734
|
+
/** metasite does not require site search indexing */
|
|
735
|
+
Off = "Off",
|
|
736
|
+
/** metasite requires site search indexing */
|
|
737
|
+
On = "On"
|
|
738
|
+
}
|
|
739
|
+
/** @enumType */
|
|
740
|
+
type SearchIndexingNotificationStateWithLiterals = SearchIndexingNotificationState | 'Unknown' | 'Off' | 'On';
|
|
741
|
+
interface MessageEnvelope {
|
|
742
|
+
/**
|
|
743
|
+
* App instance ID.
|
|
744
|
+
* @format GUID
|
|
745
|
+
*/
|
|
746
|
+
instanceId?: string | null;
|
|
747
|
+
/**
|
|
748
|
+
* Event type.
|
|
749
|
+
* @maxLength 150
|
|
750
|
+
*/
|
|
751
|
+
eventType?: string;
|
|
752
|
+
/** The identification type and identity data. */
|
|
753
|
+
identity?: IdentificationData;
|
|
754
|
+
/** Stringify payload. */
|
|
755
|
+
data?: string;
|
|
756
|
+
}
|
|
757
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
758
|
+
/**
|
|
759
|
+
* ID of a site visitor that has not logged in to the site.
|
|
760
|
+
* @format GUID
|
|
761
|
+
*/
|
|
762
|
+
anonymousVisitorId?: string;
|
|
763
|
+
/**
|
|
764
|
+
* ID of a site visitor that has logged in to the site.
|
|
765
|
+
* @format GUID
|
|
766
|
+
*/
|
|
767
|
+
memberId?: string;
|
|
768
|
+
/**
|
|
769
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
770
|
+
* @format GUID
|
|
771
|
+
*/
|
|
772
|
+
wixUserId?: string;
|
|
773
|
+
/**
|
|
774
|
+
* ID of an app.
|
|
775
|
+
* @format GUID
|
|
776
|
+
*/
|
|
777
|
+
appId?: string;
|
|
778
|
+
/** @readonly */
|
|
779
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
780
|
+
}
|
|
781
|
+
/** @oneof */
|
|
782
|
+
interface IdentificationDataIdOneOf {
|
|
783
|
+
/**
|
|
784
|
+
* ID of a site visitor that has not logged in to the site.
|
|
785
|
+
* @format GUID
|
|
786
|
+
*/
|
|
787
|
+
anonymousVisitorId?: string;
|
|
788
|
+
/**
|
|
789
|
+
* ID of a site visitor that has logged in to the site.
|
|
790
|
+
* @format GUID
|
|
791
|
+
*/
|
|
792
|
+
memberId?: string;
|
|
793
|
+
/**
|
|
794
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
795
|
+
* @format GUID
|
|
796
|
+
*/
|
|
797
|
+
wixUserId?: string;
|
|
798
|
+
/**
|
|
799
|
+
* ID of an app.
|
|
800
|
+
* @format GUID
|
|
801
|
+
*/
|
|
802
|
+
appId?: string;
|
|
803
|
+
}
|
|
804
|
+
declare enum WebhookIdentityType {
|
|
805
|
+
UNKNOWN = "UNKNOWN",
|
|
806
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
807
|
+
MEMBER = "MEMBER",
|
|
808
|
+
WIX_USER = "WIX_USER",
|
|
809
|
+
APP = "APP"
|
|
810
|
+
}
|
|
811
|
+
/** @enumType */
|
|
812
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
813
|
+
/**
|
|
814
|
+
* Creates a Section.
|
|
815
|
+
* @param section - Section to be created.
|
|
816
|
+
* @public
|
|
817
|
+
* @documentationMaturity preview
|
|
818
|
+
* @requiredField section
|
|
819
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
820
|
+
* @applicableIdentity APP
|
|
821
|
+
* @returns The created Section.
|
|
822
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.CreateSection
|
|
823
|
+
*/
|
|
824
|
+
declare function createSection(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
825
|
+
interface CreateSectionOptions {
|
|
826
|
+
/**
|
|
827
|
+
* Predefined sets of fields to return.
|
|
828
|
+
* @maxSize 1
|
|
829
|
+
*/
|
|
830
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Bulk Section creation.
|
|
834
|
+
* @param sections - List of sections you want to create
|
|
835
|
+
* @public
|
|
836
|
+
* @documentationMaturity preview
|
|
837
|
+
* @requiredField sections
|
|
838
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
839
|
+
* @applicableIdentity APP
|
|
840
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection
|
|
841
|
+
*/
|
|
842
|
+
declare function bulkCreateSection(sections: Section[], options?: BulkCreateSectionOptions): Promise<NonNullablePaths<BulkCreateSectionResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.programId` | `results.${number}.item.description.title` | `results.${number}.item.state` | `results.${number}.item.oldTotalSteps` | `results.${number}.item.trialSection` | `results.${number}.item.ordering` | `results.${number}.item.delayInDays` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
843
|
+
interface BulkCreateSectionOptions {
|
|
844
|
+
/**
|
|
845
|
+
* Predefined sets of fields to return.
|
|
846
|
+
* @maxSize 1
|
|
847
|
+
*/
|
|
848
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Bulk Section creation for migration.
|
|
852
|
+
* @param sections - List of sections you want to create
|
|
853
|
+
* @public
|
|
854
|
+
* @documentationMaturity preview
|
|
855
|
+
* @requiredField sections
|
|
856
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
857
|
+
* @applicableIdentity APP
|
|
858
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration
|
|
859
|
+
*/
|
|
860
|
+
declare function bulkCreateSectionMigration(sections: Section[]): Promise<NonNullablePaths<BulkCreateSectionMigrationResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.programId` | `results.${number}.item.description.title` | `results.${number}.item.state` | `results.${number}.item.oldTotalSteps` | `results.${number}.item.trialSection` | `results.${number}.item.ordering` | `results.${number}.item.delayInDays` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
861
|
+
/**
|
|
862
|
+
* Retrieves a Section.
|
|
863
|
+
* @param sectionId - ID of the Section to retrieve.
|
|
864
|
+
* @public
|
|
865
|
+
* @documentationMaturity preview
|
|
866
|
+
* @requiredField sectionId
|
|
867
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
868
|
+
* @applicableIdentity APP
|
|
869
|
+
* @returns The requested Section.
|
|
870
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.GetSection
|
|
871
|
+
*/
|
|
872
|
+
declare function getSection(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
873
|
+
interface GetSectionOptions {
|
|
874
|
+
/** Whenever to return description only with title or with details as well */
|
|
875
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
876
|
+
/**
|
|
877
|
+
* Predefined sets of fields to return.
|
|
878
|
+
* @maxSize 1
|
|
879
|
+
*/
|
|
880
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Updates a Section.
|
|
884
|
+
* @param _id - Program Section ID.
|
|
885
|
+
* @public
|
|
886
|
+
* @documentationMaturity preview
|
|
887
|
+
* @requiredField _id
|
|
888
|
+
* @requiredField options.section.revision
|
|
889
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
890
|
+
* @applicableIdentity APP
|
|
891
|
+
* @returns Updated Section.
|
|
892
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.UpdateSection
|
|
893
|
+
*/
|
|
894
|
+
declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
895
|
+
interface UpdateSectionOptions {
|
|
896
|
+
section: {
|
|
897
|
+
/**
|
|
898
|
+
* Program Section ID.
|
|
899
|
+
* @format GUID
|
|
900
|
+
* @readonly
|
|
901
|
+
*/
|
|
902
|
+
_id?: string | null;
|
|
903
|
+
/**
|
|
904
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision
|
|
905
|
+
* @readonly
|
|
906
|
+
*/
|
|
907
|
+
revision?: string | null;
|
|
908
|
+
/**
|
|
909
|
+
* Represents the time this Section was created
|
|
910
|
+
* @readonly
|
|
911
|
+
*/
|
|
912
|
+
_createdDate?: Date | null;
|
|
913
|
+
/**
|
|
914
|
+
* Represents the time this Section was last updated
|
|
915
|
+
* @readonly
|
|
916
|
+
*/
|
|
917
|
+
_updatedDate?: Date | null;
|
|
918
|
+
/**
|
|
919
|
+
* Program Id to which this section is assigned to.
|
|
920
|
+
* @format GUID
|
|
921
|
+
* @readonly
|
|
922
|
+
*/
|
|
923
|
+
programId?: string;
|
|
924
|
+
/** title, description and media content. */
|
|
925
|
+
description?: Description;
|
|
926
|
+
/** is this section published yet? */
|
|
927
|
+
state?: StateWithLiterals;
|
|
928
|
+
/**
|
|
929
|
+
* number of program steps in this section.
|
|
930
|
+
* @readonly
|
|
931
|
+
*/
|
|
932
|
+
oldTotalSteps?: number;
|
|
933
|
+
/**
|
|
934
|
+
* number of program steps in this section.
|
|
935
|
+
* @readonly
|
|
936
|
+
*/
|
|
937
|
+
totalSteps?: number | null;
|
|
938
|
+
/** should we open this section as a trial content even though the owning program isn't purchased yet? */
|
|
939
|
+
trialSection?: boolean;
|
|
940
|
+
/** field for manual ordering of sections */
|
|
941
|
+
ordering?: number;
|
|
942
|
+
/**
|
|
943
|
+
* open after defined number of days passed.
|
|
944
|
+
* @max 5000
|
|
945
|
+
*/
|
|
946
|
+
delayInDays?: number;
|
|
947
|
+
/** extensible field */
|
|
948
|
+
extendedFields?: ExtendedFields;
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* Predefined sets of fields to return.
|
|
952
|
+
* @maxSize 1
|
|
953
|
+
*/
|
|
954
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Deletes a Section.
|
|
958
|
+
* Deleting a Section permanently removes them from the Section List.
|
|
959
|
+
* @param sectionId - Id of the Section to delete.
|
|
960
|
+
* @public
|
|
961
|
+
* @documentationMaturity preview
|
|
962
|
+
* @requiredField sectionId
|
|
963
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_DELETE
|
|
964
|
+
* @applicableIdentity APP
|
|
965
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.DeleteSection
|
|
966
|
+
*/
|
|
967
|
+
declare function deleteSection(sectionId: string): Promise<void>;
|
|
968
|
+
/**
|
|
969
|
+
* Retrieves a list of Sections, given the provided [paging, filtering, and sorting][1].
|
|
970
|
+
*
|
|
971
|
+
* Up to 1,000 Sections can be returned per request.
|
|
972
|
+
* @public
|
|
973
|
+
* @documentationMaturity preview
|
|
974
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
975
|
+
* @applicableIdentity APP
|
|
976
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.QuerySections
|
|
977
|
+
*/
|
|
978
|
+
declare function querySections(options?: QuerySectionsOptions): SectionsQueryBuilder;
|
|
979
|
+
interface QuerySectionsOptions {
|
|
980
|
+
/** Whenever to return description only with title or with details as well */
|
|
981
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals | undefined;
|
|
982
|
+
/**
|
|
983
|
+
* Program id to query sections
|
|
984
|
+
* @maxLength 36
|
|
985
|
+
*/
|
|
986
|
+
programId?: string | undefined;
|
|
987
|
+
/**
|
|
988
|
+
* Predefined sets of fields to return.
|
|
989
|
+
* @maxSize 1
|
|
990
|
+
*/
|
|
991
|
+
fields?: RequestedFieldsWithLiterals[] | undefined;
|
|
992
|
+
}
|
|
993
|
+
interface QueryCursorResult {
|
|
994
|
+
cursors: Cursors;
|
|
995
|
+
hasNext: () => boolean;
|
|
996
|
+
hasPrev: () => boolean;
|
|
997
|
+
length: number;
|
|
998
|
+
pageSize: number;
|
|
999
|
+
}
|
|
1000
|
+
interface SectionsQueryResult extends QueryCursorResult {
|
|
1001
|
+
items: Section[];
|
|
1002
|
+
query: SectionsQueryBuilder;
|
|
1003
|
+
next: () => Promise<SectionsQueryResult>;
|
|
1004
|
+
prev: () => Promise<SectionsQueryResult>;
|
|
1005
|
+
}
|
|
1006
|
+
interface SectionsQueryBuilder {
|
|
1007
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1008
|
+
* @param value - Value to compare against.
|
|
1009
|
+
* @documentationMaturity preview
|
|
1010
|
+
*/
|
|
1011
|
+
eq: (propertyName: '_id' | 'programId' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1012
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1013
|
+
* @param value - Value to compare against.
|
|
1014
|
+
* @documentationMaturity preview
|
|
1015
|
+
*/
|
|
1016
|
+
ne: (propertyName: '_id', value: any) => SectionsQueryBuilder;
|
|
1017
|
+
/** @documentationMaturity preview */
|
|
1018
|
+
in: (propertyName: '_id', value: any) => SectionsQueryBuilder;
|
|
1019
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1020
|
+
* @documentationMaturity preview
|
|
1021
|
+
*/
|
|
1022
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1023
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1024
|
+
* @documentationMaturity preview
|
|
1025
|
+
*/
|
|
1026
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1027
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1028
|
+
* @documentationMaturity preview
|
|
1029
|
+
*/
|
|
1030
|
+
limit: (limit: number) => SectionsQueryBuilder;
|
|
1031
|
+
/** @param cursor - A pointer to specific record
|
|
1032
|
+
* @documentationMaturity preview
|
|
1033
|
+
*/
|
|
1034
|
+
skipTo: (cursor: string) => SectionsQueryBuilder;
|
|
1035
|
+
/** @documentationMaturity preview */
|
|
1036
|
+
find: () => Promise<SectionsQueryResult>;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* List sections per program id
|
|
1040
|
+
* @param programId - Program id to list sections
|
|
1041
|
+
* @public
|
|
1042
|
+
* @documentationMaturity preview
|
|
1043
|
+
* @requiredField programId
|
|
1044
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
1045
|
+
* @applicableIdentity APP
|
|
1046
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.ListSections
|
|
1047
|
+
*/
|
|
1048
|
+
declare function listSections(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
|
|
1049
|
+
interface ListSectionsOptions {
|
|
1050
|
+
/** Whenever to return description only with title or with details as well */
|
|
1051
|
+
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
1052
|
+
/**
|
|
1053
|
+
* Predefined sets of fields to return.
|
|
1054
|
+
* @maxSize 1
|
|
1055
|
+
*/
|
|
1056
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Clones section with specified id
|
|
1060
|
+
* @param sectionId - Section to clone
|
|
1061
|
+
* @public
|
|
1062
|
+
* @documentationMaturity preview
|
|
1063
|
+
* @requiredField sectionId
|
|
1064
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
1065
|
+
* @applicableIdentity APP
|
|
1066
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.CloneSection
|
|
1067
|
+
*/
|
|
1068
|
+
declare function cloneSection(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
1069
|
+
interface CloneSectionOptions {
|
|
1070
|
+
/**
|
|
1071
|
+
* Predefined sets of fields to return.
|
|
1072
|
+
* @maxSize 1
|
|
1073
|
+
*/
|
|
1074
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Places section after specified one or inserts it in the beginning
|
|
1078
|
+
* @public
|
|
1079
|
+
* @documentationMaturity preview
|
|
1080
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
1081
|
+
* @applicableIdentity APP
|
|
1082
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.MoveSection
|
|
1083
|
+
*/
|
|
1084
|
+
declare function moveSection(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
1085
|
+
interface MoveSectionOptions {
|
|
1086
|
+
/**
|
|
1087
|
+
* Section to move
|
|
1088
|
+
* @format GUID
|
|
1089
|
+
*/
|
|
1090
|
+
sectionId?: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* change section position to be after the specified section. If empty insert in the "0" position.
|
|
1093
|
+
* @format GUID
|
|
1094
|
+
*/
|
|
1095
|
+
afterSectionId?: string | null;
|
|
1096
|
+
/** section revision */
|
|
1097
|
+
revision?: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Predefined sets of fields to return.
|
|
1100
|
+
* @maxSize 1
|
|
1101
|
+
*/
|
|
1102
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Publishes section
|
|
1106
|
+
* @public
|
|
1107
|
+
* @documentationMaturity preview
|
|
1108
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
1109
|
+
* @applicableIdentity APP
|
|
1110
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.PublishSection
|
|
1111
|
+
*/
|
|
1112
|
+
declare function publishSection(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
1113
|
+
interface PublishSectionOptions {
|
|
1114
|
+
/**
|
|
1115
|
+
* Section to publish
|
|
1116
|
+
* @format GUID
|
|
1117
|
+
*/
|
|
1118
|
+
sectionId?: string;
|
|
1119
|
+
/** section revision */
|
|
1120
|
+
revision?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* Predefined sets of fields to return.
|
|
1123
|
+
* @maxSize 1
|
|
1124
|
+
*/
|
|
1125
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
export { type ActionEvent, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionOptions, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkSectionResult, type CloneSectionOptions, type CloneSectionRequest, type CloneSectionResponse, type CreateSectionOptions, type CreateSectionRequest, type CreateSectionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteAllProgramSectionsRequest, type DeleteAllProgramSectionsResponse, type DeleteByFilterOperation, type DeleteByIdsOperation, type DeleteSectionRequest, type DeleteSectionResponse, type Description, DescriptionFieldSet, type DescriptionFieldSetWithLiterals, type DescriptionMediaOneOf, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, type FocalPoint, type GetSectionOptions, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MessageEnvelope, type MoveSectionOptions, type MoveSectionRequest, type MoveSectionResponse, type PublishSectionOptions, type PublishSectionRequest, type PublishSectionResponse, type QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionDeleted, type SectionMoved, type SectionPublished, type SectionUpdated, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateSectionOptions, type UpdateSectionRequest, type UpdateSectionResponse, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
|