@wix/auto_sdk_online-programs_sections 1.0.12 → 1.0.14
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 +49 -31
- package/build/cjs/index.js +18 -149
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +221 -154
- package/build/cjs/index.typings.js +18 -141
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +89 -77
- package/build/cjs/meta.js +8 -111
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +537 -0
- package/build/cjs/schemas.js +852 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +49 -31
- package/build/es/index.mjs +16 -147
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +221 -154
- package/build/es/index.typings.mjs +16 -139
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +89 -77
- package/build/es/meta.mjs +8 -110
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +537 -0
- package/build/es/schemas.mjs +796 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +49 -31
- package/build/internal/cjs/index.js +18 -149
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +221 -154
- package/build/internal/cjs/index.typings.js +18 -141
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +89 -77
- package/build/internal/cjs/meta.js +8 -111
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +537 -0
- package/build/internal/cjs/schemas.js +852 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +49 -31
- package/build/internal/es/index.mjs +16 -147
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +221 -154
- package/build/internal/es/index.typings.mjs +16 -139
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +89 -77
- package/build/internal/es/meta.mjs +8 -110
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +537 -0
- package/build/internal/es/schemas.mjs +796 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -1,57 +1,64 @@
|
|
|
1
|
+
import * as _wix_sdk_types from '@wix/sdk-types';
|
|
1
2
|
import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A section groups related steps within an online program.
|
|
6
|
+
*
|
|
7
|
+
* Sections can be drafted, published, reordered, and optionally released after a delay from the start of the parent program.
|
|
8
|
+
*/
|
|
3
9
|
interface Section {
|
|
4
10
|
/**
|
|
5
|
-
*
|
|
11
|
+
* Section ID.
|
|
6
12
|
* @format GUID
|
|
7
13
|
* @readonly
|
|
8
14
|
*/
|
|
9
15
|
_id?: string | null;
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
17
|
+
* Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section.
|
|
12
18
|
* @readonly
|
|
13
19
|
*/
|
|
14
20
|
revision?: string | null;
|
|
15
21
|
/**
|
|
16
|
-
*
|
|
22
|
+
* Date and time the section was created.
|
|
17
23
|
* @readonly
|
|
18
24
|
*/
|
|
19
25
|
_createdDate?: Date | null;
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
27
|
+
* Date and time the section was last updated.
|
|
22
28
|
* @readonly
|
|
23
29
|
*/
|
|
24
30
|
_updatedDate?: Date | null;
|
|
25
31
|
/**
|
|
26
|
-
* Program
|
|
32
|
+
* Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed.
|
|
27
33
|
* @format GUID
|
|
28
34
|
* @readonly
|
|
35
|
+
* @immutable
|
|
29
36
|
*/
|
|
30
37
|
programId?: string;
|
|
31
|
-
/** title
|
|
38
|
+
/** Section title and deprecated backward-compatibility content fields. */
|
|
32
39
|
description?: Description;
|
|
33
|
-
/**
|
|
40
|
+
/** Publication state of the section. */
|
|
34
41
|
state?: StateWithLiterals;
|
|
35
42
|
/**
|
|
36
|
-
* number of
|
|
43
|
+
* Legacy total number of steps in the section.
|
|
37
44
|
* @readonly
|
|
38
45
|
*/
|
|
39
46
|
oldTotalSteps?: number;
|
|
40
47
|
/**
|
|
41
|
-
* number of
|
|
48
|
+
* Total number of steps in the section.
|
|
42
49
|
* @readonly
|
|
43
50
|
*/
|
|
44
51
|
totalSteps?: number | null;
|
|
45
|
-
/**
|
|
52
|
+
/** Whether participants can access the section as trial content before purchasing the parent program. */
|
|
46
53
|
trialSection?: boolean;
|
|
47
|
-
/**
|
|
54
|
+
/** Position rank used to order sections within a program. To reorder sections, call Move Section. */
|
|
48
55
|
ordering?: number;
|
|
49
56
|
/**
|
|
50
|
-
*
|
|
57
|
+
* Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately.
|
|
51
58
|
* @max 5000
|
|
52
59
|
*/
|
|
53
60
|
delayInDays?: number;
|
|
54
|
-
/**
|
|
61
|
+
/** Custom field data for the section. */
|
|
55
62
|
extendedFields?: ExtendedFields;
|
|
56
63
|
}
|
|
57
64
|
interface Description extends DescriptionMediaOneOf {
|
|
@@ -67,7 +74,11 @@ interface Description extends DescriptionMediaOneOf {
|
|
|
67
74
|
video?: string;
|
|
68
75
|
/** @maxLength 500 */
|
|
69
76
|
title?: string;
|
|
70
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* @maxLength 10000000
|
|
79
|
+
* @deprecated
|
|
80
|
+
* @targetRemovalDate 2026-06-25
|
|
81
|
+
*/
|
|
71
82
|
details?: string | null;
|
|
72
83
|
}
|
|
73
84
|
/** @oneof */
|
|
@@ -104,15 +115,13 @@ interface VideoResolution {
|
|
|
104
115
|
format?: string;
|
|
105
116
|
}
|
|
106
117
|
declare enum State {
|
|
107
|
-
/** invalid default state. */
|
|
108
|
-
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
109
118
|
/** the section isn't ready to be shown to participants. */
|
|
110
119
|
DRAFT = "DRAFT",
|
|
111
120
|
/** this content is visible to participants. */
|
|
112
121
|
PUBLISHED = "PUBLISHED"
|
|
113
122
|
}
|
|
114
123
|
/** @enumType */
|
|
115
|
-
type StateWithLiterals = State | '
|
|
124
|
+
type StateWithLiterals = State | 'DRAFT' | 'PUBLISHED';
|
|
116
125
|
interface ExtendedFields {
|
|
117
126
|
/**
|
|
118
127
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
@@ -235,40 +244,43 @@ interface UpdateExistingOperation {
|
|
|
235
244
|
/** documents to update */
|
|
236
245
|
documents?: IndexDocument[];
|
|
237
246
|
}
|
|
247
|
+
/** Payload for the Section Updated event. */
|
|
238
248
|
interface SectionUpdated {
|
|
239
|
-
/** Section before update. */
|
|
249
|
+
/** Section before the update. */
|
|
240
250
|
previous?: Section;
|
|
241
|
-
/** Section after update. */
|
|
251
|
+
/** Section after the update. */
|
|
242
252
|
current?: Section;
|
|
243
253
|
}
|
|
254
|
+
/** Payload for the Section Deleted event. */
|
|
244
255
|
interface SectionDeleted {
|
|
245
|
-
/**
|
|
256
|
+
/** Section that was deleted. */
|
|
246
257
|
section?: Section;
|
|
247
258
|
}
|
|
259
|
+
/** Payload for the Section Cloned event. */
|
|
248
260
|
interface SectionCloned {
|
|
249
|
-
/**
|
|
261
|
+
/** Source section used for cloning. */
|
|
250
262
|
prototype?: Section;
|
|
251
|
-
/**
|
|
263
|
+
/** Cloned section. */
|
|
252
264
|
cloned?: Section;
|
|
253
265
|
}
|
|
254
266
|
interface SectionMoved {
|
|
255
267
|
/**
|
|
256
|
-
*
|
|
268
|
+
* ID of the moved section.
|
|
257
269
|
* @format GUID
|
|
258
270
|
*/
|
|
259
271
|
sectionId?: string;
|
|
260
|
-
/** section
|
|
272
|
+
/** New ordering rank assigned to the moved section. */
|
|
261
273
|
newSectionPositionRank?: number;
|
|
262
274
|
}
|
|
263
275
|
interface SectionPublished {
|
|
264
276
|
/**
|
|
265
|
-
*
|
|
277
|
+
* ID of the published section.
|
|
266
278
|
* @format GUID
|
|
267
279
|
*/
|
|
268
280
|
sectionId?: string;
|
|
269
281
|
}
|
|
270
282
|
interface CreateSectionRequest {
|
|
271
|
-
/** Section to
|
|
283
|
+
/** Section to create. Must include `section.program_id`. */
|
|
272
284
|
section: Section;
|
|
273
285
|
/**
|
|
274
286
|
* Predefined sets of fields to return.
|
|
@@ -277,20 +289,18 @@ interface CreateSectionRequest {
|
|
|
277
289
|
fields?: RequestedFieldsWithLiterals[];
|
|
278
290
|
}
|
|
279
291
|
declare enum RequestedFields {
|
|
280
|
-
/** not implemented, invalid default value. */
|
|
281
|
-
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
282
292
|
/** return total number of steps in this section. */
|
|
283
293
|
TOTAL_STEPS = "TOTAL_STEPS"
|
|
284
294
|
}
|
|
285
295
|
/** @enumType */
|
|
286
|
-
type RequestedFieldsWithLiterals = RequestedFields | '
|
|
296
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'TOTAL_STEPS';
|
|
287
297
|
interface CreateSectionResponse {
|
|
288
|
-
/**
|
|
298
|
+
/** Created section. */
|
|
289
299
|
section?: Section;
|
|
290
300
|
}
|
|
291
301
|
interface BulkCreateSectionRequest {
|
|
292
302
|
/**
|
|
293
|
-
* List of sections
|
|
303
|
+
* List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
294
304
|
* @minSize 1
|
|
295
305
|
* @maxSize 100
|
|
296
306
|
*/
|
|
@@ -302,17 +312,17 @@ interface BulkCreateSectionRequest {
|
|
|
302
312
|
fields?: RequestedFieldsWithLiterals[];
|
|
303
313
|
}
|
|
304
314
|
interface BulkCreateSectionResponse {
|
|
305
|
-
/** bulk
|
|
315
|
+
/** Results for the bulk create operation. */
|
|
306
316
|
results?: BulkSectionResult[];
|
|
307
|
-
/** bulk
|
|
317
|
+
/** Summary of the bulk create operation. */
|
|
308
318
|
bulkActionMetadata?: BulkActionMetadata;
|
|
309
319
|
}
|
|
310
320
|
interface BulkSectionResult {
|
|
311
|
-
/**
|
|
321
|
+
/** Metadata for the bulk operation result. */
|
|
312
322
|
itemMetadata?: ItemMetadata;
|
|
313
|
-
/**
|
|
323
|
+
/** Created section. */
|
|
314
324
|
item?: Section;
|
|
315
|
-
/**
|
|
325
|
+
/** Action associated with the bulk result. */
|
|
316
326
|
action?: BulkActionTypeWithLiterals;
|
|
317
327
|
}
|
|
318
328
|
interface ItemMetadata {
|
|
@@ -351,16 +361,16 @@ interface BulkActionMetadata {
|
|
|
351
361
|
}
|
|
352
362
|
interface BulkCreateSectionMigrationRequest {
|
|
353
363
|
/**
|
|
354
|
-
* List of sections
|
|
364
|
+
* List of sections to create.
|
|
355
365
|
* @minSize 1
|
|
356
366
|
* @maxSize 100
|
|
357
367
|
*/
|
|
358
|
-
sections
|
|
368
|
+
sections?: Section[];
|
|
359
369
|
}
|
|
360
370
|
interface BulkCreateSectionMigrationResponse {
|
|
361
|
-
/** bulk
|
|
371
|
+
/** Results for the bulk create operation. */
|
|
362
372
|
results?: BulkSectionResult[];
|
|
363
|
-
/** bulk
|
|
373
|
+
/** Summary of the bulk create operation. */
|
|
364
374
|
bulkActionMetadata?: BulkActionMetadata;
|
|
365
375
|
}
|
|
366
376
|
interface GetSectionRequest {
|
|
@@ -369,7 +379,7 @@ interface GetSectionRequest {
|
|
|
369
379
|
* @format GUID
|
|
370
380
|
*/
|
|
371
381
|
sectionId: string;
|
|
372
|
-
/**
|
|
382
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
373
383
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
374
384
|
/**
|
|
375
385
|
* Predefined sets of fields to return.
|
|
@@ -378,17 +388,19 @@ interface GetSectionRequest {
|
|
|
378
388
|
fields?: RequestedFieldsWithLiterals[];
|
|
379
389
|
}
|
|
380
390
|
declare enum DescriptionFieldSet {
|
|
391
|
+
/** Retained for backward compatibility. Current section responses return the section title. */
|
|
381
392
|
STANDARD = "STANDARD",
|
|
393
|
+
/** Retained for backward compatibility. Current section responses return the section title. */
|
|
382
394
|
EXTENDED = "EXTENDED"
|
|
383
395
|
}
|
|
384
396
|
/** @enumType */
|
|
385
397
|
type DescriptionFieldSetWithLiterals = DescriptionFieldSet | 'STANDARD' | 'EXTENDED';
|
|
386
398
|
interface GetSectionResponse {
|
|
387
|
-
/**
|
|
399
|
+
/** Retrieved section. */
|
|
388
400
|
section?: Section;
|
|
389
401
|
}
|
|
390
402
|
interface UpdateSectionRequest {
|
|
391
|
-
/** Section to
|
|
403
|
+
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
392
404
|
section?: Section;
|
|
393
405
|
/**
|
|
394
406
|
* Predefined sets of fields to return.
|
|
@@ -397,12 +409,12 @@ interface UpdateSectionRequest {
|
|
|
397
409
|
fields?: RequestedFieldsWithLiterals[];
|
|
398
410
|
}
|
|
399
411
|
interface UpdateSectionResponse {
|
|
400
|
-
/** Updated
|
|
412
|
+
/** Updated section. */
|
|
401
413
|
section?: Section;
|
|
402
414
|
}
|
|
403
415
|
interface DeleteSectionRequest {
|
|
404
416
|
/**
|
|
405
|
-
*
|
|
417
|
+
* ID of the section to delete.
|
|
406
418
|
* @format GUID
|
|
407
419
|
*/
|
|
408
420
|
sectionId: string;
|
|
@@ -411,27 +423,29 @@ interface DeleteSectionResponse {
|
|
|
411
423
|
}
|
|
412
424
|
interface DeleteAllProgramSectionsRequest {
|
|
413
425
|
/**
|
|
414
|
-
* Program
|
|
426
|
+
* Program ID to delete sections from.
|
|
415
427
|
* @format GUID
|
|
416
428
|
*/
|
|
417
429
|
programId?: string;
|
|
418
430
|
}
|
|
419
431
|
interface DeleteAllProgramSectionsResponse {
|
|
420
|
-
/** Total
|
|
432
|
+
/** Total number of sections in the program. */
|
|
421
433
|
sectionsTotal?: number;
|
|
422
|
-
/**
|
|
434
|
+
/** Number of sections that were deleted successfully. */
|
|
423
435
|
successfulCount?: number;
|
|
424
|
-
/**
|
|
436
|
+
/** Number of sections that couldn't be deleted. */
|
|
425
437
|
failedCount?: number;
|
|
426
438
|
}
|
|
427
439
|
interface QuerySectionsRequest {
|
|
428
440
|
/** WQL expression. */
|
|
429
441
|
query?: CursorQuery;
|
|
430
|
-
/**
|
|
442
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
431
443
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
432
444
|
/**
|
|
433
|
-
* Program
|
|
434
|
-
* @
|
|
445
|
+
* Deprecated. Program ID used to scope the query. Use `query.filter` instead.
|
|
446
|
+
* @deprecated
|
|
447
|
+
* @replacedBy wix.common.CursorQuery
|
|
448
|
+
* @targetRemovalDate 2026-06-30
|
|
435
449
|
*/
|
|
436
450
|
programId?: string;
|
|
437
451
|
/**
|
|
@@ -501,9 +515,9 @@ interface CursorPaging {
|
|
|
501
515
|
cursor?: string | null;
|
|
502
516
|
}
|
|
503
517
|
interface QuerySectionsResponse {
|
|
504
|
-
/**
|
|
518
|
+
/** Matching sections. */
|
|
505
519
|
sections?: Section[];
|
|
506
|
-
/** Paging metadata */
|
|
520
|
+
/** Paging metadata. */
|
|
507
521
|
pagingMetadata?: CursorPagingMetadata;
|
|
508
522
|
}
|
|
509
523
|
interface CursorPagingMetadata {
|
|
@@ -533,11 +547,11 @@ interface Cursors {
|
|
|
533
547
|
}
|
|
534
548
|
interface ListSectionsRequest {
|
|
535
549
|
/**
|
|
536
|
-
* Program
|
|
550
|
+
* Program ID to list sections for.
|
|
537
551
|
* @format GUID
|
|
538
552
|
*/
|
|
539
553
|
programId: string;
|
|
540
|
-
/**
|
|
554
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
541
555
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
542
556
|
/**
|
|
543
557
|
* Predefined sets of fields to return.
|
|
@@ -547,14 +561,14 @@ interface ListSectionsRequest {
|
|
|
547
561
|
}
|
|
548
562
|
interface ListSectionsResponse {
|
|
549
563
|
/**
|
|
550
|
-
*
|
|
564
|
+
* Sections in the requested program.
|
|
551
565
|
* @maxSize 1000
|
|
552
566
|
*/
|
|
553
567
|
sections?: Section[];
|
|
554
568
|
}
|
|
555
569
|
interface CloneSectionRequest {
|
|
556
570
|
/**
|
|
557
|
-
*
|
|
571
|
+
* ID of the section to clone.
|
|
558
572
|
* @format GUID
|
|
559
573
|
*/
|
|
560
574
|
sectionId: string;
|
|
@@ -565,21 +579,21 @@ interface CloneSectionRequest {
|
|
|
565
579
|
fields?: RequestedFieldsWithLiterals[];
|
|
566
580
|
}
|
|
567
581
|
interface CloneSectionResponse {
|
|
568
|
-
/**
|
|
582
|
+
/** Cloned section. */
|
|
569
583
|
section?: Section;
|
|
570
584
|
}
|
|
571
585
|
interface MoveSectionRequest {
|
|
572
586
|
/**
|
|
573
|
-
*
|
|
587
|
+
* ID of the section to move.
|
|
574
588
|
* @format GUID
|
|
575
589
|
*/
|
|
576
590
|
sectionId?: string;
|
|
577
591
|
/**
|
|
578
|
-
*
|
|
592
|
+
* ID of the section that the moved section should be placed after. Leave empty to move the section to the beginning of the program.
|
|
579
593
|
* @format GUID
|
|
580
594
|
*/
|
|
581
595
|
afterSectionId?: string | null;
|
|
582
|
-
/**
|
|
596
|
+
/** Current revision of the section. */
|
|
583
597
|
revision?: string;
|
|
584
598
|
/**
|
|
585
599
|
* Predefined sets of fields to return.
|
|
@@ -588,16 +602,16 @@ interface MoveSectionRequest {
|
|
|
588
602
|
fields?: RequestedFieldsWithLiterals[];
|
|
589
603
|
}
|
|
590
604
|
interface MoveSectionResponse {
|
|
591
|
-
/**
|
|
605
|
+
/** Moved section. */
|
|
592
606
|
section?: Section;
|
|
593
607
|
}
|
|
594
608
|
interface PublishSectionRequest {
|
|
595
609
|
/**
|
|
596
|
-
*
|
|
610
|
+
* ID of the section to publish.
|
|
597
611
|
* @format GUID
|
|
598
612
|
*/
|
|
599
613
|
sectionId?: string;
|
|
600
|
-
/**
|
|
614
|
+
/** Current revision of the section. */
|
|
601
615
|
revision?: string;
|
|
602
616
|
/**
|
|
603
617
|
* Predefined sets of fields to return.
|
|
@@ -606,38 +620,38 @@ interface PublishSectionRequest {
|
|
|
606
620
|
fields?: RequestedFieldsWithLiterals[];
|
|
607
621
|
}
|
|
608
622
|
interface PublishSectionResponse {
|
|
609
|
-
/** Published section */
|
|
623
|
+
/** Published section. */
|
|
610
624
|
section?: Section;
|
|
611
625
|
}
|
|
612
626
|
interface BulkCloneSectionRequest {
|
|
613
627
|
/**
|
|
614
|
-
*
|
|
628
|
+
* ID of the program that was cloned.
|
|
615
629
|
* @format GUID
|
|
616
630
|
*/
|
|
617
631
|
prototypeProgramId?: string;
|
|
618
632
|
/**
|
|
619
|
-
*
|
|
633
|
+
* ID of the program created by the clone operation.
|
|
620
634
|
* @format GUID
|
|
621
635
|
*/
|
|
622
636
|
clonedProgramId?: string;
|
|
623
637
|
}
|
|
624
638
|
interface BulkCloneSectionResponse {
|
|
625
639
|
/**
|
|
626
|
-
*
|
|
640
|
+
* ID of the program that was cloned.
|
|
627
641
|
* @format GUID
|
|
628
642
|
*/
|
|
629
643
|
prototypeProgramId?: string;
|
|
630
644
|
/**
|
|
631
|
-
*
|
|
645
|
+
* ID of the program created by the clone operation.
|
|
632
646
|
* @format GUID
|
|
633
647
|
*/
|
|
634
648
|
clonedProgramId?: string;
|
|
635
|
-
/**
|
|
649
|
+
/** Mapping from original section IDs to cloned section IDs. */
|
|
636
650
|
prototypeIdToClonedId?: Record<string, string>;
|
|
637
651
|
}
|
|
638
652
|
interface RestoreSectionFromTrashRequest {
|
|
639
653
|
/**
|
|
640
|
-
* section
|
|
654
|
+
* ID of the section to restore.
|
|
641
655
|
* @format GUID
|
|
642
656
|
*/
|
|
643
657
|
sectionId?: string;
|
|
@@ -648,7 +662,7 @@ interface RestoreSectionFromTrashRequest {
|
|
|
648
662
|
fields?: RequestedFieldsWithLiterals[];
|
|
649
663
|
}
|
|
650
664
|
interface RestoreSectionFromTrashResponse {
|
|
651
|
-
/**
|
|
665
|
+
/** Restored section. */
|
|
652
666
|
section?: Section;
|
|
653
667
|
}
|
|
654
668
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -680,7 +694,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
680
694
|
/** If present, indicates the action that triggered the event. */
|
|
681
695
|
originatedFrom?: string | null;
|
|
682
696
|
/**
|
|
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
|
|
697
|
+
* 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
698
|
* 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
699
|
*/
|
|
686
700
|
entityEventSequence?: string | null;
|
|
@@ -830,14 +844,18 @@ interface AccountInfo {
|
|
|
830
844
|
siteId?: string | null;
|
|
831
845
|
}
|
|
832
846
|
/**
|
|
833
|
-
* Creates a
|
|
834
|
-
*
|
|
847
|
+
* Creates a section.
|
|
848
|
+
*
|
|
849
|
+
* The section is added to the program identified by `section.program_id`. Provide that program ID in the request. Set `section.description.title` for the section title. `section.description.details`, `section.description.image`, and `section.description.video` are deprecated backward-compatibility fields. The stored ordering value is assigned automatically.
|
|
850
|
+
*
|
|
851
|
+
* To create multiple sections in a single API call, call [Bulk Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-section).
|
|
852
|
+
* @param section - Section to create. Must include `section.program_id`.
|
|
835
853
|
* @public
|
|
836
854
|
* @documentationMaturity preview
|
|
837
855
|
* @requiredField section
|
|
838
856
|
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
839
857
|
* @applicableIdentity APP
|
|
840
|
-
* @returns
|
|
858
|
+
* @returns Created section.
|
|
841
859
|
* @fqn wix.onlineprograms.sections.v3.SectionsService.CreateSection
|
|
842
860
|
*/
|
|
843
861
|
declare function createSection(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
@@ -849,8 +867,12 @@ interface CreateSectionOptions {
|
|
|
849
867
|
fields?: RequestedFieldsWithLiterals[];
|
|
850
868
|
}
|
|
851
869
|
/**
|
|
852
|
-
*
|
|
853
|
-
*
|
|
870
|
+
* Creates up to 100 sections in a single API call.
|
|
871
|
+
*
|
|
872
|
+
* All sections in the request must include `program_id` and belong to the same program. Set `description.title` for each section title. `description.details`, `description.image`, and `description.video` are deprecated backward-compatibility fields. The stored ordering values are assigned automatically.
|
|
873
|
+
*
|
|
874
|
+
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
875
|
+
* @param sections - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
854
876
|
* @public
|
|
855
877
|
* @documentationMaturity preview
|
|
856
878
|
* @requiredField sections
|
|
@@ -867,30 +889,21 @@ interface BulkCreateSectionOptions {
|
|
|
867
889
|
fields?: RequestedFieldsWithLiterals[];
|
|
868
890
|
}
|
|
869
891
|
/**
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
* @documentationMaturity preview
|
|
874
|
-
* @requiredField sections
|
|
875
|
-
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
876
|
-
* @applicableIdentity APP
|
|
877
|
-
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration
|
|
878
|
-
*/
|
|
879
|
-
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>>;
|
|
880
|
-
/**
|
|
881
|
-
* Retrieves a Section.
|
|
892
|
+
* Retrieves a section.
|
|
893
|
+
*
|
|
894
|
+
* `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
882
895
|
* @param sectionId - ID of the Section to retrieve.
|
|
883
896
|
* @public
|
|
884
897
|
* @documentationMaturity preview
|
|
885
898
|
* @requiredField sectionId
|
|
886
899
|
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
887
900
|
* @applicableIdentity APP
|
|
888
|
-
* @returns
|
|
901
|
+
* @returns Retrieved section.
|
|
889
902
|
* @fqn wix.onlineprograms.sections.v3.SectionsService.GetSection
|
|
890
903
|
*/
|
|
891
904
|
declare function getSection(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
892
905
|
interface GetSectionOptions {
|
|
893
|
-
/**
|
|
906
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
894
907
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
895
908
|
/**
|
|
896
909
|
* Predefined sets of fields to return.
|
|
@@ -899,71 +912,76 @@ interface GetSectionOptions {
|
|
|
899
912
|
fields?: RequestedFieldsWithLiterals[];
|
|
900
913
|
}
|
|
901
914
|
/**
|
|
902
|
-
* Updates a
|
|
903
|
-
*
|
|
915
|
+
* Updates a section.
|
|
916
|
+
*
|
|
917
|
+
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when updating the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
918
|
+
*
|
|
919
|
+
* Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section). To publish a section, call [Publish Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/publish-section).
|
|
920
|
+
* @param _id - Section ID.
|
|
904
921
|
* @public
|
|
905
922
|
* @documentationMaturity preview
|
|
906
923
|
* @requiredField _id
|
|
907
924
|
* @requiredField options.section.revision
|
|
908
925
|
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
909
926
|
* @applicableIdentity APP
|
|
910
|
-
* @returns Updated
|
|
927
|
+
* @returns Updated section.
|
|
911
928
|
* @fqn wix.onlineprograms.sections.v3.SectionsService.UpdateSection
|
|
912
929
|
*/
|
|
913
930
|
declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
914
931
|
interface UpdateSectionOptions {
|
|
915
|
-
section
|
|
932
|
+
section?: {
|
|
916
933
|
/**
|
|
917
|
-
*
|
|
934
|
+
* Section ID.
|
|
918
935
|
* @format GUID
|
|
919
936
|
* @readonly
|
|
920
937
|
*/
|
|
921
938
|
_id?: string | null;
|
|
922
939
|
/**
|
|
923
|
-
*
|
|
940
|
+
* Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section.
|
|
924
941
|
* @readonly
|
|
925
942
|
*/
|
|
926
943
|
revision?: string | null;
|
|
927
944
|
/**
|
|
928
|
-
*
|
|
945
|
+
* Date and time the section was created.
|
|
929
946
|
* @readonly
|
|
930
947
|
*/
|
|
931
948
|
_createdDate?: Date | null;
|
|
932
949
|
/**
|
|
933
|
-
*
|
|
950
|
+
* Date and time the section was last updated.
|
|
934
951
|
* @readonly
|
|
935
952
|
*/
|
|
936
953
|
_updatedDate?: Date | null;
|
|
937
954
|
/**
|
|
938
|
-
* Program
|
|
955
|
+
* Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed.
|
|
939
956
|
* @format GUID
|
|
940
957
|
* @readonly
|
|
958
|
+
* @immutable
|
|
941
959
|
*/
|
|
942
960
|
programId?: string;
|
|
943
|
-
/** title
|
|
961
|
+
/** Section title and deprecated backward-compatibility content fields. */
|
|
944
962
|
description?: Description;
|
|
945
|
-
/**
|
|
963
|
+
/** Publication state of the section. */
|
|
946
964
|
state?: StateWithLiterals;
|
|
947
965
|
/**
|
|
948
|
-
* number of
|
|
966
|
+
* Legacy total number of steps in the section.
|
|
949
967
|
* @readonly
|
|
950
968
|
*/
|
|
951
969
|
oldTotalSteps?: number;
|
|
952
970
|
/**
|
|
953
|
-
* number of
|
|
971
|
+
* Total number of steps in the section.
|
|
954
972
|
* @readonly
|
|
955
973
|
*/
|
|
956
974
|
totalSteps?: number | null;
|
|
957
|
-
/**
|
|
975
|
+
/** Whether participants can access the section as trial content before purchasing the parent program. */
|
|
958
976
|
trialSection?: boolean;
|
|
959
|
-
/**
|
|
977
|
+
/** Position rank used to order sections within a program. To reorder sections, call Move Section. */
|
|
960
978
|
ordering?: number;
|
|
961
979
|
/**
|
|
962
|
-
*
|
|
980
|
+
* Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately.
|
|
963
981
|
* @max 5000
|
|
964
982
|
*/
|
|
965
983
|
delayInDays?: number;
|
|
966
|
-
/**
|
|
984
|
+
/** Custom field data for the section. */
|
|
967
985
|
extendedFields?: ExtendedFields;
|
|
968
986
|
};
|
|
969
987
|
/**
|
|
@@ -973,9 +991,10 @@ interface UpdateSectionOptions {
|
|
|
973
991
|
fields?: RequestedFieldsWithLiterals[];
|
|
974
992
|
}
|
|
975
993
|
/**
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
994
|
+
* Permanently deletes a section from the public API.
|
|
995
|
+
*
|
|
996
|
+
* Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.
|
|
997
|
+
* @param sectionId - ID of the section to delete.
|
|
979
998
|
* @public
|
|
980
999
|
* @documentationMaturity preview
|
|
981
1000
|
* @requiredField sectionId
|
|
@@ -985,9 +1004,19 @@ interface UpdateSectionOptions {
|
|
|
985
1004
|
*/
|
|
986
1005
|
declare function deleteSection(sectionId: string): Promise<void>;
|
|
987
1006
|
/**
|
|
988
|
-
* Retrieves a list of
|
|
1007
|
+
* Retrieves a list of up to 1,000 sections, given the provided paging, filtering, and sorting.
|
|
1008
|
+
*
|
|
1009
|
+
* Query Sections runs with these defaults, which you can override:
|
|
1010
|
+
*
|
|
1011
|
+
* - `createdDate` is sorted in `DESC` order.
|
|
1012
|
+
* - `paging.limit` is `1000`.
|
|
1013
|
+
* - `paging.offset` is `0`.
|
|
1014
|
+
*
|
|
1015
|
+
* Supported filter fields are `programId`, `id`, `delayInDays`, `trialSection`, and `state`.
|
|
1016
|
+
* Supported sorting fields are `id`, `delayInDays`, `trialSection`, `state`, `createdDate`, and `ordering`. When sorting by a field other than `programId`, also filter by `programId`.
|
|
1017
|
+
* `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
989
1018
|
*
|
|
990
|
-
*
|
|
1019
|
+
* To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).
|
|
991
1020
|
* @public
|
|
992
1021
|
* @documentationMaturity preview
|
|
993
1022
|
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
@@ -996,11 +1025,13 @@ declare function deleteSection(sectionId: string): Promise<void>;
|
|
|
996
1025
|
*/
|
|
997
1026
|
declare function querySections(options?: QuerySectionsOptions): SectionsQueryBuilder;
|
|
998
1027
|
interface QuerySectionsOptions {
|
|
999
|
-
/**
|
|
1028
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
1000
1029
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals | undefined;
|
|
1001
1030
|
/**
|
|
1002
|
-
* Program
|
|
1003
|
-
* @
|
|
1031
|
+
* Deprecated. Program ID used to scope the query. Use `query.filter` instead.
|
|
1032
|
+
* @deprecated
|
|
1033
|
+
* @replacedBy wix.common.CursorQuery
|
|
1034
|
+
* @targetRemovalDate 2026-06-30
|
|
1004
1035
|
*/
|
|
1005
1036
|
programId?: string | undefined;
|
|
1006
1037
|
/**
|
|
@@ -1027,22 +1058,54 @@ interface SectionsQueryBuilder {
|
|
|
1027
1058
|
* @param value - Value to compare against.
|
|
1028
1059
|
* @documentationMaturity preview
|
|
1029
1060
|
*/
|
|
1030
|
-
eq: (propertyName: '_id' | 'programId' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1061
|
+
eq: (propertyName: '_id' | 'programId' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1062
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1063
|
+
* @param value - Value to compare against.
|
|
1064
|
+
* @documentationMaturity preview
|
|
1065
|
+
*/
|
|
1066
|
+
ne: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1031
1067
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1032
1068
|
* @param value - Value to compare against.
|
|
1033
1069
|
* @documentationMaturity preview
|
|
1034
1070
|
*/
|
|
1035
|
-
|
|
1071
|
+
ge: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1072
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1073
|
+
* @param value - Value to compare against.
|
|
1074
|
+
* @documentationMaturity preview
|
|
1075
|
+
*/
|
|
1076
|
+
gt: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1077
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1078
|
+
* @param value - Value to compare against.
|
|
1079
|
+
* @documentationMaturity preview
|
|
1080
|
+
*/
|
|
1081
|
+
le: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1082
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1083
|
+
* @param value - Value to compare against.
|
|
1084
|
+
* @documentationMaturity preview
|
|
1085
|
+
*/
|
|
1086
|
+
lt: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1087
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
1088
|
+
* @param string - String to compare against. Case-insensitive.
|
|
1089
|
+
* @documentationMaturity preview
|
|
1090
|
+
*/
|
|
1091
|
+
startsWith: (propertyName: '_id', value: string) => SectionsQueryBuilder;
|
|
1092
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
1093
|
+
* @param values - List of values to compare against.
|
|
1094
|
+
* @documentationMaturity preview
|
|
1095
|
+
*/
|
|
1096
|
+
hasSome: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any[]) => SectionsQueryBuilder;
|
|
1036
1097
|
/** @documentationMaturity preview */
|
|
1037
|
-
in: (propertyName: '_id', value: any) => SectionsQueryBuilder;
|
|
1098
|
+
in: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1099
|
+
/** @documentationMaturity preview */
|
|
1100
|
+
exists: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: boolean) => SectionsQueryBuilder;
|
|
1038
1101
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1039
1102
|
* @documentationMaturity preview
|
|
1040
1103
|
*/
|
|
1041
|
-
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1104
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1042
1105
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1043
1106
|
* @documentationMaturity preview
|
|
1044
1107
|
*/
|
|
1045
|
-
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1108
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
|
|
1046
1109
|
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1047
1110
|
* @documentationMaturity preview
|
|
1048
1111
|
*/
|
|
@@ -1069,27 +1132,12 @@ interface SectionQuerySpec extends QuerySpec {
|
|
|
1069
1132
|
sort: 'NONE';
|
|
1070
1133
|
},
|
|
1071
1134
|
{
|
|
1072
|
-
fields: ['delayInDays'];
|
|
1073
|
-
operators:
|
|
1074
|
-
sort: 'BOTH';
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
fields: ['_createdDate'];
|
|
1078
|
-
operators: [];
|
|
1079
|
-
sort: 'BOTH';
|
|
1080
|
-
},
|
|
1081
|
-
{
|
|
1082
|
-
fields: ['trialSection'];
|
|
1083
|
-
operators: ['$eq'];
|
|
1084
|
-
sort: 'NONE';
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
fields: ['_id'];
|
|
1088
|
-
operators: ['$eq', '$in', '$ne', '$nin'];
|
|
1135
|
+
fields: ['_id', 'delayInDays', 'state', 'trialSection'];
|
|
1136
|
+
operators: '*';
|
|
1089
1137
|
sort: 'BOTH';
|
|
1090
1138
|
},
|
|
1091
1139
|
{
|
|
1092
|
-
fields: ['ordering'];
|
|
1140
|
+
fields: ['_createdDate', 'ordering'];
|
|
1093
1141
|
operators: [];
|
|
1094
1142
|
sort: 'BOTH';
|
|
1095
1143
|
}
|
|
@@ -1141,9 +1189,20 @@ type SectionQuery = {
|
|
|
1141
1189
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1142
1190
|
}[];
|
|
1143
1191
|
};
|
|
1192
|
+
declare const utils: {
|
|
1193
|
+
query: {
|
|
1194
|
+
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Section, SectionQuerySpec, SectionQuery>;
|
|
1195
|
+
Filter: _wix_sdk_types.FilterFactory<Section, SectionQuerySpec>;
|
|
1196
|
+
Sort: _wix_sdk_types.SortFactory<SectionQuerySpec>;
|
|
1197
|
+
};
|
|
1198
|
+
};
|
|
1144
1199
|
/**
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1200
|
+
* Retrieves the sections in a program.
|
|
1201
|
+
*
|
|
1202
|
+
* Results are sorted by `ordering` in ascending order. `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
1203
|
+
*
|
|
1204
|
+
* To filter or sort sections, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
|
|
1205
|
+
* @param programId - Program ID to list sections for.
|
|
1147
1206
|
* @public
|
|
1148
1207
|
* @documentationMaturity preview
|
|
1149
1208
|
* @requiredField programId
|
|
@@ -1153,7 +1212,7 @@ type SectionQuery = {
|
|
|
1153
1212
|
*/
|
|
1154
1213
|
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>>;
|
|
1155
1214
|
interface ListSectionsOptions {
|
|
1156
|
-
/**
|
|
1215
|
+
/** Compatibility option for existing integrations. Current section responses return the section title. */
|
|
1157
1216
|
descriptionFieldSet?: DescriptionFieldSetWithLiterals;
|
|
1158
1217
|
/**
|
|
1159
1218
|
* Predefined sets of fields to return.
|
|
@@ -1162,8 +1221,10 @@ interface ListSectionsOptions {
|
|
|
1162
1221
|
fields?: RequestedFieldsWithLiterals[];
|
|
1163
1222
|
}
|
|
1164
1223
|
/**
|
|
1165
|
-
* Clones section
|
|
1166
|
-
*
|
|
1224
|
+
* Clones a section.
|
|
1225
|
+
*
|
|
1226
|
+
* The cloned section is added to the same program after the current last section. Translation content is copied to the cloned section.
|
|
1227
|
+
* @param sectionId - ID of the section to clone.
|
|
1167
1228
|
* @public
|
|
1168
1229
|
* @documentationMaturity preview
|
|
1169
1230
|
* @requiredField sectionId
|
|
@@ -1180,7 +1241,9 @@ interface CloneSectionOptions {
|
|
|
1180
1241
|
fields?: RequestedFieldsWithLiterals[];
|
|
1181
1242
|
}
|
|
1182
1243
|
/**
|
|
1183
|
-
*
|
|
1244
|
+
* Moves a section within its program.
|
|
1245
|
+
*
|
|
1246
|
+
* If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
|
|
1184
1247
|
* @public
|
|
1185
1248
|
* @documentationMaturity preview
|
|
1186
1249
|
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
@@ -1190,16 +1253,16 @@ interface CloneSectionOptions {
|
|
|
1190
1253
|
declare function moveSection(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
1191
1254
|
interface MoveSectionOptions {
|
|
1192
1255
|
/**
|
|
1193
|
-
*
|
|
1256
|
+
* ID of the section to move.
|
|
1194
1257
|
* @format GUID
|
|
1195
1258
|
*/
|
|
1196
1259
|
sectionId?: string;
|
|
1197
1260
|
/**
|
|
1198
|
-
*
|
|
1261
|
+
* ID of the section that the moved section should be placed after. Leave empty to move the section to the beginning of the program.
|
|
1199
1262
|
* @format GUID
|
|
1200
1263
|
*/
|
|
1201
1264
|
afterSectionId?: string | null;
|
|
1202
|
-
/**
|
|
1265
|
+
/** Current revision of the section. */
|
|
1203
1266
|
revision?: string;
|
|
1204
1267
|
/**
|
|
1205
1268
|
* Predefined sets of fields to return.
|
|
@@ -1208,7 +1271,11 @@ interface MoveSectionOptions {
|
|
|
1208
1271
|
fields?: RequestedFieldsWithLiterals[];
|
|
1209
1272
|
}
|
|
1210
1273
|
/**
|
|
1211
|
-
* Publishes section
|
|
1274
|
+
* Publishes a section.
|
|
1275
|
+
*
|
|
1276
|
+
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when publishing the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
1277
|
+
*
|
|
1278
|
+
* Publishing sets the section's `state` to `PUBLISHED`.
|
|
1212
1279
|
* @public
|
|
1213
1280
|
* @documentationMaturity preview
|
|
1214
1281
|
* @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
|
|
@@ -1218,11 +1285,11 @@ interface MoveSectionOptions {
|
|
|
1218
1285
|
declare function publishSection(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
1219
1286
|
interface PublishSectionOptions {
|
|
1220
1287
|
/**
|
|
1221
|
-
*
|
|
1288
|
+
* ID of the section to publish.
|
|
1222
1289
|
* @format GUID
|
|
1223
1290
|
*/
|
|
1224
1291
|
sectionId?: string;
|
|
1225
|
-
/**
|
|
1292
|
+
/** Current revision of the section. */
|
|
1226
1293
|
revision?: string;
|
|
1227
1294
|
/**
|
|
1228
1295
|
* Predefined sets of fields to return.
|
|
@@ -1231,4 +1298,4 @@ interface PublishSectionOptions {
|
|
|
1231
1298
|
fields?: RequestedFieldsWithLiterals[];
|
|
1232
1299
|
}
|
|
1233
1300
|
|
|
1234
|
-
export { type AccountInfo, 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 CommonQueryWithEntityContext, 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 SectionQuery, type SectionQuerySpec, 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,
|
|
1301
|
+
export { type AccountInfo, 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 CommonQueryWithEntityContext, 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 SectionQuery, type SectionQuerySpec, 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, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
|