@wix/auto_sdk_online-programs_sections 1.0.13 → 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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +49 -31
  2. package/build/cjs/index.js +8 -145
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +164 -122
  5. package/build/cjs/index.typings.js +8 -137
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +84 -70
  8. package/build/cjs/meta.js +8 -109
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -92
  11. package/build/cjs/schemas.js +270 -294
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +49 -31
  14. package/build/es/index.mjs +8 -144
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +164 -122
  17. package/build/es/index.typings.mjs +8 -136
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +84 -70
  20. package/build/es/meta.mjs +8 -108
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -92
  23. package/build/es/schemas.mjs +270 -292
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +49 -31
  26. package/build/internal/cjs/index.js +8 -145
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +164 -122
  29. package/build/internal/cjs/index.typings.js +8 -137
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +84 -70
  32. package/build/internal/cjs/meta.js +8 -109
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -92
  35. package/build/internal/cjs/schemas.js +270 -294
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +49 -31
  38. package/build/internal/es/index.mjs +8 -144
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +164 -122
  41. package/build/internal/es/index.typings.mjs +8 -136
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +84 -70
  44. package/build/internal/es/meta.mjs +8 -108
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -92
  47. package/build/internal/es/schemas.mjs +270 -292
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -1,58 +1,64 @@
1
1
  import * as _wix_sdk_types from '@wix/sdk-types';
2
2
  import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
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
+ */
4
9
  interface Section {
5
10
  /**
6
- * Program Section ID.
11
+ * Section ID.
7
12
  * @format GUID
8
13
  * @readonly
9
14
  */
10
15
  _id?: string | null;
11
16
  /**
12
- * 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
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.
13
18
  * @readonly
14
19
  */
15
20
  revision?: string | null;
16
21
  /**
17
- * Represents the time this Section was created
22
+ * Date and time the section was created.
18
23
  * @readonly
19
24
  */
20
25
  _createdDate?: Date | null;
21
26
  /**
22
- * Represents the time this Section was last updated
27
+ * Date and time the section was last updated.
23
28
  * @readonly
24
29
  */
25
30
  _updatedDate?: Date | null;
26
31
  /**
27
- * Program Id to which this section is assigned to.
32
+ * Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed.
28
33
  * @format GUID
29
34
  * @readonly
35
+ * @immutable
30
36
  */
31
37
  programId?: string;
32
- /** title, description and media content. */
38
+ /** Section title and deprecated backward-compatibility content fields. */
33
39
  description?: Description;
34
- /** is this section published yet? */
40
+ /** Publication state of the section. */
35
41
  state?: StateWithLiterals;
36
42
  /**
37
- * number of program steps in this section.
43
+ * Legacy total number of steps in the section.
38
44
  * @readonly
39
45
  */
40
46
  oldTotalSteps?: number;
41
47
  /**
42
- * number of program steps in this section.
48
+ * Total number of steps in the section.
43
49
  * @readonly
44
50
  */
45
51
  totalSteps?: number | null;
46
- /** should we open this section as a trial content even though the owning program isn't purchased yet? */
52
+ /** Whether participants can access the section as trial content before purchasing the parent program. */
47
53
  trialSection?: boolean;
48
- /** field for manual ordering of sections */
54
+ /** Position rank used to order sections within a program. To reorder sections, call Move Section. */
49
55
  ordering?: number;
50
56
  /**
51
- * open after defined number of days passed.
57
+ * Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately.
52
58
  * @max 5000
53
59
  */
54
60
  delayInDays?: number;
55
- /** extensible field */
61
+ /** Custom field data for the section. */
56
62
  extendedFields?: ExtendedFields;
57
63
  }
58
64
  interface Description extends DescriptionMediaOneOf {
@@ -68,7 +74,11 @@ interface Description extends DescriptionMediaOneOf {
68
74
  video?: string;
69
75
  /** @maxLength 500 */
70
76
  title?: string;
71
- /** @maxLength 10000000 */
77
+ /**
78
+ * @maxLength 10000000
79
+ * @deprecated
80
+ * @targetRemovalDate 2026-06-25
81
+ */
72
82
  details?: string | null;
73
83
  }
74
84
  /** @oneof */
@@ -234,40 +244,43 @@ interface UpdateExistingOperation {
234
244
  /** documents to update */
235
245
  documents?: IndexDocument[];
236
246
  }
247
+ /** Payload for the Section Updated event. */
237
248
  interface SectionUpdated {
238
- /** Section before update. */
249
+ /** Section before the update. */
239
250
  previous?: Section;
240
- /** Section after update. */
251
+ /** Section after the update. */
241
252
  current?: Section;
242
253
  }
254
+ /** Payload for the Section Deleted event. */
243
255
  interface SectionDeleted {
244
- /** Full section that was deleted */
256
+ /** Section that was deleted. */
245
257
  section?: Section;
246
258
  }
259
+ /** Payload for the Section Cloned event. */
247
260
  interface SectionCloned {
248
- /** Section which was used as a prototype for cloning. */
261
+ /** Source section used for cloning. */
249
262
  prototype?: Section;
250
- /** Result of section cloning. */
263
+ /** Cloned section. */
251
264
  cloned?: Section;
252
265
  }
253
266
  interface SectionMoved {
254
267
  /**
255
- * Moved section id
268
+ * ID of the moved section.
256
269
  * @format GUID
257
270
  */
258
271
  sectionId?: string;
259
- /** section position */
272
+ /** New ordering rank assigned to the moved section. */
260
273
  newSectionPositionRank?: number;
261
274
  }
262
275
  interface SectionPublished {
263
276
  /**
264
- * Published section id
277
+ * ID of the published section.
265
278
  * @format GUID
266
279
  */
267
280
  sectionId?: string;
268
281
  }
269
282
  interface CreateSectionRequest {
270
- /** Section to be created. */
283
+ /** Section to create. Must include `section.program_id`. */
271
284
  section: Section;
272
285
  /**
273
286
  * Predefined sets of fields to return.
@@ -282,12 +295,12 @@ declare enum RequestedFields {
282
295
  /** @enumType */
283
296
  type RequestedFieldsWithLiterals = RequestedFields | 'TOTAL_STEPS';
284
297
  interface CreateSectionResponse {
285
- /** The created Section. */
298
+ /** Created section. */
286
299
  section?: Section;
287
300
  }
288
301
  interface BulkCreateSectionRequest {
289
302
  /**
290
- * List of sections you want to create
303
+ * List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
291
304
  * @minSize 1
292
305
  * @maxSize 100
293
306
  */
@@ -299,17 +312,17 @@ interface BulkCreateSectionRequest {
299
312
  fields?: RequestedFieldsWithLiterals[];
300
313
  }
301
314
  interface BulkCreateSectionResponse {
302
- /** bulk results */
315
+ /** Results for the bulk create operation. */
303
316
  results?: BulkSectionResult[];
304
- /** bulk metadata */
317
+ /** Summary of the bulk create operation. */
305
318
  bulkActionMetadata?: BulkActionMetadata;
306
319
  }
307
320
  interface BulkSectionResult {
308
- /** item metadata */
321
+ /** Metadata for the bulk operation result. */
309
322
  itemMetadata?: ItemMetadata;
310
- /** created section */
323
+ /** Created section. */
311
324
  item?: Section;
312
- /** indicator whether it was create or update */
325
+ /** Action associated with the bulk result. */
313
326
  action?: BulkActionTypeWithLiterals;
314
327
  }
315
328
  interface ItemMetadata {
@@ -348,16 +361,16 @@ interface BulkActionMetadata {
348
361
  }
349
362
  interface BulkCreateSectionMigrationRequest {
350
363
  /**
351
- * List of sections you want to create
364
+ * List of sections to create.
352
365
  * @minSize 1
353
366
  * @maxSize 100
354
367
  */
355
- sections: Section[];
368
+ sections?: Section[];
356
369
  }
357
370
  interface BulkCreateSectionMigrationResponse {
358
- /** bulk results */
371
+ /** Results for the bulk create operation. */
359
372
  results?: BulkSectionResult[];
360
- /** bulk metadata */
373
+ /** Summary of the bulk create operation. */
361
374
  bulkActionMetadata?: BulkActionMetadata;
362
375
  }
363
376
  interface GetSectionRequest {
@@ -366,7 +379,7 @@ interface GetSectionRequest {
366
379
  * @format GUID
367
380
  */
368
381
  sectionId: string;
369
- /** Whenever to return description only with title or with details as well */
382
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
370
383
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
371
384
  /**
372
385
  * Predefined sets of fields to return.
@@ -375,17 +388,19 @@ interface GetSectionRequest {
375
388
  fields?: RequestedFieldsWithLiterals[];
376
389
  }
377
390
  declare enum DescriptionFieldSet {
391
+ /** Retained for backward compatibility. Current section responses return the section title. */
378
392
  STANDARD = "STANDARD",
393
+ /** Retained for backward compatibility. Current section responses return the section title. */
379
394
  EXTENDED = "EXTENDED"
380
395
  }
381
396
  /** @enumType */
382
397
  type DescriptionFieldSetWithLiterals = DescriptionFieldSet | 'STANDARD' | 'EXTENDED';
383
398
  interface GetSectionResponse {
384
- /** The requested Section. */
399
+ /** Retrieved section. */
385
400
  section?: Section;
386
401
  }
387
402
  interface UpdateSectionRequest {
388
- /** Section to be updated, may be partial. */
403
+ /** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
389
404
  section?: Section;
390
405
  /**
391
406
  * Predefined sets of fields to return.
@@ -394,12 +409,12 @@ interface UpdateSectionRequest {
394
409
  fields?: RequestedFieldsWithLiterals[];
395
410
  }
396
411
  interface UpdateSectionResponse {
397
- /** Updated Section. */
412
+ /** Updated section. */
398
413
  section?: Section;
399
414
  }
400
415
  interface DeleteSectionRequest {
401
416
  /**
402
- * Id of the Section to delete.
417
+ * ID of the section to delete.
403
418
  * @format GUID
404
419
  */
405
420
  sectionId: string;
@@ -408,26 +423,26 @@ interface DeleteSectionResponse {
408
423
  }
409
424
  interface DeleteAllProgramSectionsRequest {
410
425
  /**
411
- * Program id to delete sections from
426
+ * Program ID to delete sections from.
412
427
  * @format GUID
413
428
  */
414
429
  programId?: string;
415
430
  }
416
431
  interface DeleteAllProgramSectionsResponse {
417
- /** Total count of sections in the program */
432
+ /** Total number of sections in the program. */
418
433
  sectionsTotal?: number;
419
- /** Count of successfully deleted sections */
434
+ /** Number of sections that were deleted successfully. */
420
435
  successfulCount?: number;
421
- /** Count of sections that failed to be deleted */
436
+ /** Number of sections that couldn't be deleted. */
422
437
  failedCount?: number;
423
438
  }
424
439
  interface QuerySectionsRequest {
425
440
  /** WQL expression. */
426
441
  query?: CursorQuery;
427
- /** Whenever to return description only with title or with details as well */
442
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
428
443
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
429
444
  /**
430
- * Program id to query sections. Not used anymore. Deprecated in favor of query filter param.
445
+ * Deprecated. Program ID used to scope the query. Use `query.filter` instead.
431
446
  * @deprecated
432
447
  * @replacedBy wix.common.CursorQuery
433
448
  * @targetRemovalDate 2026-06-30
@@ -500,9 +515,9 @@ interface CursorPaging {
500
515
  cursor?: string | null;
501
516
  }
502
517
  interface QuerySectionsResponse {
503
- /** List of Sections. */
518
+ /** Matching sections. */
504
519
  sections?: Section[];
505
- /** Paging metadata */
520
+ /** Paging metadata. */
506
521
  pagingMetadata?: CursorPagingMetadata;
507
522
  }
508
523
  interface CursorPagingMetadata {
@@ -532,11 +547,11 @@ interface Cursors {
532
547
  }
533
548
  interface ListSectionsRequest {
534
549
  /**
535
- * Program id to list sections
550
+ * Program ID to list sections for.
536
551
  * @format GUID
537
552
  */
538
553
  programId: string;
539
- /** Whenever to return description only with title or with details as well */
554
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
540
555
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
541
556
  /**
542
557
  * Predefined sets of fields to return.
@@ -546,14 +561,14 @@ interface ListSectionsRequest {
546
561
  }
547
562
  interface ListSectionsResponse {
548
563
  /**
549
- * sections
564
+ * Sections in the requested program.
550
565
  * @maxSize 1000
551
566
  */
552
567
  sections?: Section[];
553
568
  }
554
569
  interface CloneSectionRequest {
555
570
  /**
556
- * Section to clone
571
+ * ID of the section to clone.
557
572
  * @format GUID
558
573
  */
559
574
  sectionId: string;
@@ -564,21 +579,21 @@ interface CloneSectionRequest {
564
579
  fields?: RequestedFieldsWithLiterals[];
565
580
  }
566
581
  interface CloneSectionResponse {
567
- /** cloned section */
582
+ /** Cloned section. */
568
583
  section?: Section;
569
584
  }
570
585
  interface MoveSectionRequest {
571
586
  /**
572
- * Section to move
587
+ * ID of the section to move.
573
588
  * @format GUID
574
589
  */
575
590
  sectionId?: string;
576
591
  /**
577
- * change section position to be after the specified section. If empty insert in the "0" position.
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.
578
593
  * @format GUID
579
594
  */
580
595
  afterSectionId?: string | null;
581
- /** section revision */
596
+ /** Current revision of the section. */
582
597
  revision?: string;
583
598
  /**
584
599
  * Predefined sets of fields to return.
@@ -587,16 +602,16 @@ interface MoveSectionRequest {
587
602
  fields?: RequestedFieldsWithLiterals[];
588
603
  }
589
604
  interface MoveSectionResponse {
590
- /** updated section which was moved */
605
+ /** Moved section. */
591
606
  section?: Section;
592
607
  }
593
608
  interface PublishSectionRequest {
594
609
  /**
595
- * Section to publish
610
+ * ID of the section to publish.
596
611
  * @format GUID
597
612
  */
598
613
  sectionId?: string;
599
- /** section revision */
614
+ /** Current revision of the section. */
600
615
  revision?: string;
601
616
  /**
602
617
  * Predefined sets of fields to return.
@@ -605,38 +620,38 @@ interface PublishSectionRequest {
605
620
  fields?: RequestedFieldsWithLiterals[];
606
621
  }
607
622
  interface PublishSectionResponse {
608
- /** Published section */
623
+ /** Published section. */
609
624
  section?: Section;
610
625
  }
611
626
  interface BulkCloneSectionRequest {
612
627
  /**
613
- * id of program which was cloned
628
+ * ID of the program that was cloned.
614
629
  * @format GUID
615
630
  */
616
631
  prototypeProgramId?: string;
617
632
  /**
618
- * id of program created after clone
633
+ * ID of the program created by the clone operation.
619
634
  * @format GUID
620
635
  */
621
636
  clonedProgramId?: string;
622
637
  }
623
638
  interface BulkCloneSectionResponse {
624
639
  /**
625
- * id of program which was cloned
640
+ * ID of the program that was cloned.
626
641
  * @format GUID
627
642
  */
628
643
  prototypeProgramId?: string;
629
644
  /**
630
- * id of program created after clone
645
+ * ID of the program created by the clone operation.
631
646
  * @format GUID
632
647
  */
633
648
  clonedProgramId?: string;
634
- /** mapping of original to cloned section ids */
649
+ /** Mapping from original section IDs to cloned section IDs. */
635
650
  prototypeIdToClonedId?: Record<string, string>;
636
651
  }
637
652
  interface RestoreSectionFromTrashRequest {
638
653
  /**
639
- * section id to restore
654
+ * ID of the section to restore.
640
655
  * @format GUID
641
656
  */
642
657
  sectionId?: string;
@@ -647,7 +662,7 @@ interface RestoreSectionFromTrashRequest {
647
662
  fields?: RequestedFieldsWithLiterals[];
648
663
  }
649
664
  interface RestoreSectionFromTrashResponse {
650
- /** restored section */
665
+ /** Restored section. */
651
666
  section?: Section;
652
667
  }
653
668
  interface DomainEvent extends DomainEventBodyOneOf {
@@ -679,7 +694,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
679
694
  /** If present, indicates the action that triggered the event. */
680
695
  originatedFrom?: string | null;
681
696
  /**
682
- * 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.
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.
683
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.
684
699
  */
685
700
  entityEventSequence?: string | null;
@@ -829,14 +844,18 @@ interface AccountInfo {
829
844
  siteId?: string | null;
830
845
  }
831
846
  /**
832
- * Creates a Section.
833
- * @param section - Section to be created.
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`.
834
853
  * @public
835
854
  * @documentationMaturity preview
836
855
  * @requiredField section
837
856
  * @permissionId ONLINE_PROGRAMS.SECTION_CREATE
838
857
  * @applicableIdentity APP
839
- * @returns The created Section.
858
+ * @returns Created section.
840
859
  * @fqn wix.onlineprograms.sections.v3.SectionsService.CreateSection
841
860
  */
842
861
  declare function createSection(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
@@ -848,8 +867,12 @@ interface CreateSectionOptions {
848
867
  fields?: RequestedFieldsWithLiterals[];
849
868
  }
850
869
  /**
851
- * Bulk Section creation.
852
- * @param sections - List of sections you want to create
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.
853
876
  * @public
854
877
  * @documentationMaturity preview
855
878
  * @requiredField sections
@@ -866,30 +889,21 @@ interface BulkCreateSectionOptions {
866
889
  fields?: RequestedFieldsWithLiterals[];
867
890
  }
868
891
  /**
869
- * Bulk Section creation for migration.
870
- * @param sections - List of sections you want to create
871
- * @public
872
- * @documentationMaturity preview
873
- * @requiredField sections
874
- * @permissionId ONLINE_PROGRAMS.SECTION_CREATE
875
- * @applicableIdentity APP
876
- * @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration
877
- */
878
- 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>>;
879
- /**
880
- * Retrieves a Section.
892
+ * Retrieves a section.
893
+ *
894
+ * `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
881
895
  * @param sectionId - ID of the Section to retrieve.
882
896
  * @public
883
897
  * @documentationMaturity preview
884
898
  * @requiredField sectionId
885
899
  * @permissionId ONLINE_PROGRAMS.SECTION_READ
886
900
  * @applicableIdentity APP
887
- * @returns The requested Section.
901
+ * @returns Retrieved section.
888
902
  * @fqn wix.onlineprograms.sections.v3.SectionsService.GetSection
889
903
  */
890
904
  declare function getSection(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
891
905
  interface GetSectionOptions {
892
- /** Whenever to return description only with title or with details as well */
906
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
893
907
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
894
908
  /**
895
909
  * Predefined sets of fields to return.
@@ -898,71 +912,76 @@ interface GetSectionOptions {
898
912
  fields?: RequestedFieldsWithLiterals[];
899
913
  }
900
914
  /**
901
- * Updates a Section.
902
- * @param _id - Program Section ID.
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.
903
921
  * @public
904
922
  * @documentationMaturity preview
905
923
  * @requiredField _id
906
924
  * @requiredField options.section.revision
907
925
  * @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
908
926
  * @applicableIdentity APP
909
- * @returns Updated Section.
927
+ * @returns Updated section.
910
928
  * @fqn wix.onlineprograms.sections.v3.SectionsService.UpdateSection
911
929
  */
912
930
  declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
913
931
  interface UpdateSectionOptions {
914
932
  section?: {
915
933
  /**
916
- * Program Section ID.
934
+ * Section ID.
917
935
  * @format GUID
918
936
  * @readonly
919
937
  */
920
938
  _id?: string | null;
921
939
  /**
922
- * 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
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.
923
941
  * @readonly
924
942
  */
925
943
  revision?: string | null;
926
944
  /**
927
- * Represents the time this Section was created
945
+ * Date and time the section was created.
928
946
  * @readonly
929
947
  */
930
948
  _createdDate?: Date | null;
931
949
  /**
932
- * Represents the time this Section was last updated
950
+ * Date and time the section was last updated.
933
951
  * @readonly
934
952
  */
935
953
  _updatedDate?: Date | null;
936
954
  /**
937
- * Program Id to which this section is assigned to.
955
+ * Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed.
938
956
  * @format GUID
939
957
  * @readonly
958
+ * @immutable
940
959
  */
941
960
  programId?: string;
942
- /** title, description and media content. */
961
+ /** Section title and deprecated backward-compatibility content fields. */
943
962
  description?: Description;
944
- /** is this section published yet? */
963
+ /** Publication state of the section. */
945
964
  state?: StateWithLiterals;
946
965
  /**
947
- * number of program steps in this section.
966
+ * Legacy total number of steps in the section.
948
967
  * @readonly
949
968
  */
950
969
  oldTotalSteps?: number;
951
970
  /**
952
- * number of program steps in this section.
971
+ * Total number of steps in the section.
953
972
  * @readonly
954
973
  */
955
974
  totalSteps?: number | null;
956
- /** should we open this section as a trial content even though the owning program isn't purchased yet? */
975
+ /** Whether participants can access the section as trial content before purchasing the parent program. */
957
976
  trialSection?: boolean;
958
- /** field for manual ordering of sections */
977
+ /** Position rank used to order sections within a program. To reorder sections, call Move Section. */
959
978
  ordering?: number;
960
979
  /**
961
- * open after defined number of days passed.
980
+ * Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately.
962
981
  * @max 5000
963
982
  */
964
983
  delayInDays?: number;
965
- /** extensible field */
984
+ /** Custom field data for the section. */
966
985
  extendedFields?: ExtendedFields;
967
986
  };
968
987
  /**
@@ -972,9 +991,10 @@ interface UpdateSectionOptions {
972
991
  fields?: RequestedFieldsWithLiterals[];
973
992
  }
974
993
  /**
975
- * Deletes a Section.
976
- * Deleting a Section permanently removes them from the Section List.
977
- * @param sectionId - Id of the Section to delete.
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.
978
998
  * @public
979
999
  * @documentationMaturity preview
980
1000
  * @requiredField sectionId
@@ -984,9 +1004,19 @@ interface UpdateSectionOptions {
984
1004
  */
985
1005
  declare function deleteSection(sectionId: string): Promise<void>;
986
1006
  /**
987
- * Retrieves a list of Sections, given the provided [paging, filtering, and sorting][1].
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:
988
1010
  *
989
- * Up to 1,000 Sections can be returned per request.
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.
1018
+ *
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).
990
1020
  * @public
991
1021
  * @documentationMaturity preview
992
1022
  * @permissionId ONLINE_PROGRAMS.SECTION_READ
@@ -995,10 +1025,10 @@ declare function deleteSection(sectionId: string): Promise<void>;
995
1025
  */
996
1026
  declare function querySections(options?: QuerySectionsOptions): SectionsQueryBuilder;
997
1027
  interface QuerySectionsOptions {
998
- /** Whenever to return description only with title or with details as well */
1028
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
999
1029
  descriptionFieldSet?: DescriptionFieldSetWithLiterals | undefined;
1000
1030
  /**
1001
- * Program id to query sections. Not used anymore. Deprecated in favor of query filter param.
1031
+ * Deprecated. Program ID used to scope the query. Use `query.filter` instead.
1002
1032
  * @deprecated
1003
1033
  * @replacedBy wix.common.CursorQuery
1004
1034
  * @targetRemovalDate 2026-06-30
@@ -1167,8 +1197,12 @@ declare const utils: {
1167
1197
  };
1168
1198
  };
1169
1199
  /**
1170
- * List sections per program id
1171
- * @param programId - Program id to list sections
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.
1172
1206
  * @public
1173
1207
  * @documentationMaturity preview
1174
1208
  * @requiredField programId
@@ -1178,7 +1212,7 @@ declare const utils: {
1178
1212
  */
1179
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>>;
1180
1214
  interface ListSectionsOptions {
1181
- /** Whenever to return description only with title or with details as well */
1215
+ /** Compatibility option for existing integrations. Current section responses return the section title. */
1182
1216
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
1183
1217
  /**
1184
1218
  * Predefined sets of fields to return.
@@ -1187,8 +1221,10 @@ interface ListSectionsOptions {
1187
1221
  fields?: RequestedFieldsWithLiterals[];
1188
1222
  }
1189
1223
  /**
1190
- * Clones section with specified id
1191
- * @param sectionId - Section to clone
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.
1192
1228
  * @public
1193
1229
  * @documentationMaturity preview
1194
1230
  * @requiredField sectionId
@@ -1205,7 +1241,9 @@ interface CloneSectionOptions {
1205
1241
  fields?: RequestedFieldsWithLiterals[];
1206
1242
  }
1207
1243
  /**
1208
- * Places section after specified one or inserts it in the beginning
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.
1209
1247
  * @public
1210
1248
  * @documentationMaturity preview
1211
1249
  * @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
@@ -1215,16 +1253,16 @@ interface CloneSectionOptions {
1215
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>>;
1216
1254
  interface MoveSectionOptions {
1217
1255
  /**
1218
- * Section to move
1256
+ * ID of the section to move.
1219
1257
  * @format GUID
1220
1258
  */
1221
1259
  sectionId?: string;
1222
1260
  /**
1223
- * change section position to be after the specified section. If empty insert in the "0" position.
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.
1224
1262
  * @format GUID
1225
1263
  */
1226
1264
  afterSectionId?: string | null;
1227
- /** section revision */
1265
+ /** Current revision of the section. */
1228
1266
  revision?: string;
1229
1267
  /**
1230
1268
  * Predefined sets of fields to return.
@@ -1233,7 +1271,11 @@ interface MoveSectionOptions {
1233
1271
  fields?: RequestedFieldsWithLiterals[];
1234
1272
  }
1235
1273
  /**
1236
- * 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`.
1237
1279
  * @public
1238
1280
  * @documentationMaturity preview
1239
1281
  * @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
@@ -1243,11 +1285,11 @@ interface MoveSectionOptions {
1243
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>>;
1244
1286
  interface PublishSectionOptions {
1245
1287
  /**
1246
- * Section to publish
1288
+ * ID of the section to publish.
1247
1289
  * @format GUID
1248
1290
  */
1249
1291
  sectionId?: string;
1250
- /** section revision */
1292
+ /** Current revision of the section. */
1251
1293
  revision?: string;
1252
1294
  /**
1253
1295
  * Predefined sets of fields to return.
@@ -1256,4 +1298,4 @@ interface PublishSectionOptions {
1256
1298
  fields?: RequestedFieldsWithLiterals[];
1257
1299
  }
1258
1300
 
1259
- 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, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
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 };