@wix/auto_sdk_online-programs_sections 1.0.33 → 1.0.34
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 +30 -8
- package/build/cjs/index.js +118 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +130 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +30 -8
- package/build/es/index.mjs +114 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +130 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -5
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +30 -8
- package/build/internal/cjs/index.typings.d.ts +131 -14
- package/build/internal/cjs/meta.d.ts +6 -8
- package/build/internal/es/index.d.mts +30 -8
- package/build/internal/es/index.typings.d.mts +131 -14
- package/build/internal/es/meta.d.mts +6 -8
- package/package.json +2 -2
|
@@ -54,7 +54,7 @@ interface Section {
|
|
|
54
54
|
*/
|
|
55
55
|
ordering?: number;
|
|
56
56
|
/**
|
|
57
|
-
* Number of days before the section becomes available
|
|
57
|
+
* Number of days before the section becomes available. The count starts from the program's start date for scheduled programs, or from the participant's enrollment date for self-paced ones. Someone joining a scheduled program after it began may find several sections already open. Use `0` for a section available from the start.
|
|
58
58
|
* @max 5000
|
|
59
59
|
*/
|
|
60
60
|
delayInDays?: number;
|
|
@@ -211,7 +211,7 @@ interface SectionDeleted {
|
|
|
211
211
|
interface SectionCloned {
|
|
212
212
|
/** Source section used for cloning. */
|
|
213
213
|
prototype?: Section;
|
|
214
|
-
/** Cloned section. */
|
|
214
|
+
/** Cloned section. Steps are cloned asynchronously after this event is sent, so `totalSteps` may not reflect the eventual number of cloned steps. Retrieve the section later for the current count. */
|
|
215
215
|
cloned?: Section;
|
|
216
216
|
}
|
|
217
217
|
interface SectionMoved {
|
|
@@ -224,7 +224,7 @@ interface SectionMoved {
|
|
|
224
224
|
newSectionPositionRank?: number;
|
|
225
225
|
}
|
|
226
226
|
interface CreateSectionRequest {
|
|
227
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
228
228
|
section: Section;
|
|
229
229
|
/**
|
|
230
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -246,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
246
246
|
}
|
|
247
247
|
interface BulkCreateSectionsRequest {
|
|
248
248
|
/**
|
|
249
|
-
* List of sections to create. Each section must include `
|
|
249
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
250
250
|
* @minSize 1
|
|
251
251
|
* @maxSize 100
|
|
252
252
|
*/
|
|
@@ -312,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
312
312
|
}
|
|
313
313
|
interface BulkCreateSectionRequest {
|
|
314
314
|
/**
|
|
315
|
-
* List of sections to create. Each section must include `
|
|
315
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
316
316
|
* @minSize 1
|
|
317
317
|
* @maxSize 100
|
|
318
318
|
*/
|
|
@@ -367,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
367
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
368
368
|
section?: Section;
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
373
371
|
* @internal
|
|
374
372
|
*/
|
|
375
373
|
fieldMask?: string[];
|
|
@@ -841,15 +839,132 @@ interface AccountInfo {
|
|
|
841
839
|
*/
|
|
842
840
|
siteId?: string | null;
|
|
843
841
|
}
|
|
842
|
+
interface BaseEventMetadata {
|
|
843
|
+
/**
|
|
844
|
+
* App instance ID.
|
|
845
|
+
* @format GUID
|
|
846
|
+
*/
|
|
847
|
+
instanceId?: string | null;
|
|
848
|
+
/**
|
|
849
|
+
* Event type.
|
|
850
|
+
* @maxLength 150
|
|
851
|
+
*/
|
|
852
|
+
eventType?: string;
|
|
853
|
+
/** The identification type and identity data. */
|
|
854
|
+
identity?: IdentificationData;
|
|
855
|
+
/** Details related to the account */
|
|
856
|
+
accountInfo?: AccountInfo;
|
|
857
|
+
}
|
|
858
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
859
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
860
|
+
_id?: string;
|
|
861
|
+
/**
|
|
862
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
863
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
864
|
+
*/
|
|
865
|
+
entityFqdn?: string;
|
|
866
|
+
/**
|
|
867
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
868
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
869
|
+
*/
|
|
870
|
+
slug?: string;
|
|
871
|
+
/** ID of the entity associated with the event. */
|
|
872
|
+
entityId?: string;
|
|
873
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
874
|
+
eventTime?: Date | null;
|
|
875
|
+
/**
|
|
876
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
877
|
+
* (for example, GDPR).
|
|
878
|
+
*/
|
|
879
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
880
|
+
/** If present, indicates the action that triggered the event. */
|
|
881
|
+
originatedFrom?: string | null;
|
|
882
|
+
/**
|
|
883
|
+
* 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.
|
|
884
|
+
* 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.
|
|
885
|
+
*/
|
|
886
|
+
entityEventSequence?: string | null;
|
|
887
|
+
accountInfo?: AccountInfoMetadata;
|
|
888
|
+
}
|
|
889
|
+
interface AccountInfoMetadata {
|
|
890
|
+
/** ID of the Wix account associated with the event */
|
|
891
|
+
accountId: string;
|
|
892
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
893
|
+
siteId?: string;
|
|
894
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
895
|
+
parentAccountId?: string;
|
|
896
|
+
}
|
|
897
|
+
interface SectionClonedEnvelope {
|
|
898
|
+
data: SectionCloned;
|
|
899
|
+
metadata: EventMetadata;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Triggered when a section is cloned.
|
|
903
|
+
* @permissionScope Manage Online Programs
|
|
904
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
905
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
906
|
+
* @webhook
|
|
907
|
+
* @eventType wix.online_programs.v3.section_cloned
|
|
908
|
+
* @slug cloned
|
|
909
|
+
* @documentationMaturity preview
|
|
910
|
+
*/
|
|
911
|
+
declare function onSectionCloned(handler: (event: SectionClonedEnvelope) => void | Promise<void>): void;
|
|
912
|
+
interface SectionCreatedEnvelope {
|
|
913
|
+
entity: Section;
|
|
914
|
+
metadata: EventMetadata;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Triggered when a section is created.
|
|
918
|
+
* @permissionScope Manage Online Programs
|
|
919
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
920
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
921
|
+
* @webhook
|
|
922
|
+
* @eventType wix.online_programs.v3.section_created
|
|
923
|
+
* @slug created
|
|
924
|
+
* @documentationMaturity preview
|
|
925
|
+
*/
|
|
926
|
+
declare function onSectionCreated(handler: (event: SectionCreatedEnvelope) => void | Promise<void>): void;
|
|
927
|
+
interface SectionDeletedEnvelope {
|
|
928
|
+
entity: Section;
|
|
929
|
+
metadata: EventMetadata;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Triggered when a section is deleted.
|
|
933
|
+
* @permissionScope Manage Online Programs
|
|
934
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
935
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
936
|
+
* @webhook
|
|
937
|
+
* @eventType wix.online_programs.v3.section_deleted
|
|
938
|
+
* @slug deleted
|
|
939
|
+
* @documentationMaturity preview
|
|
940
|
+
*/
|
|
941
|
+
declare function onSectionDeleted(handler: (event: SectionDeletedEnvelope) => void | Promise<void>): void;
|
|
942
|
+
interface SectionUpdatedEnvelope {
|
|
943
|
+
entity: Section;
|
|
944
|
+
metadata: EventMetadata;
|
|
945
|
+
/** @hidden */
|
|
946
|
+
modifiedFields: Record<string, any>;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Triggered when a section is updated.
|
|
950
|
+
* @permissionScope Manage Online Programs
|
|
951
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
952
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
953
|
+
* @webhook
|
|
954
|
+
* @eventType wix.online_programs.v3.section_updated
|
|
955
|
+
* @slug updated
|
|
956
|
+
* @documentationMaturity preview
|
|
957
|
+
*/
|
|
958
|
+
declare function onSectionUpdated(handler: (event: SectionUpdatedEnvelope) => void | Promise<void>): void;
|
|
844
959
|
/**
|
|
845
960
|
* Creates a section.
|
|
846
961
|
*
|
|
847
|
-
* The section is added to the program identified by `section.
|
|
962
|
+
* The section is added to the program identified by `section.programId`. Specify that program ID in the request. Set `section.description.title` for the section title. The stored ordering value is assigned automatically.
|
|
848
963
|
*
|
|
849
964
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
850
965
|
*
|
|
851
966
|
* To create multiple sections in a single API call, call [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
|
|
852
|
-
* @param section - Section to create. Must include `section.
|
|
967
|
+
* @param section - Section to create. Must include `section.programId`.
|
|
853
968
|
* @public
|
|
854
969
|
* @documentationMaturity preview
|
|
855
970
|
* @requiredField section
|
|
@@ -872,12 +987,12 @@ interface CreateSectionOptions {
|
|
|
872
987
|
/**
|
|
873
988
|
* Creates up to 100 sections in a single API call.
|
|
874
989
|
*
|
|
875
|
-
* All sections in the request must include `
|
|
990
|
+
* All sections in the request must include `programId` and belong to the same program. Set `description.title` for each section title. The stored ordering values are assigned automatically.
|
|
876
991
|
*
|
|
877
992
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
878
993
|
*
|
|
879
994
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
880
|
-
* @param sections - List of sections to create. Each section must include `
|
|
995
|
+
* @param sections - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
881
996
|
* @public
|
|
882
997
|
* @documentationMaturity preview
|
|
883
998
|
* @requiredField sections
|
|
@@ -989,7 +1104,7 @@ interface UpdateSectionOptions {
|
|
|
989
1104
|
*/
|
|
990
1105
|
ordering?: number;
|
|
991
1106
|
/**
|
|
992
|
-
* Number of days before the section becomes available
|
|
1107
|
+
* Number of days before the section becomes available. The count starts from the program's start date for scheduled programs, or from the participant's enrollment date for self-paced ones. Someone joining a scheduled program after it began may find several sections already open. Use `0` for a section available from the start.
|
|
993
1108
|
* @max 5000
|
|
994
1109
|
*/
|
|
995
1110
|
delayInDays?: number;
|
|
@@ -1259,6 +1374,8 @@ interface ListSectionsOptions {
|
|
|
1259
1374
|
*
|
|
1260
1375
|
* The cloned section is added to the same program after the current last section. Translation content and extended field data are copied to the cloned section.
|
|
1261
1376
|
*
|
|
1377
|
+
* This method triggers both a Section Created lifecycle event for the new section and a Section Cloned action event containing the source and cloned sections.
|
|
1378
|
+
*
|
|
1262
1379
|
* Steps are cloned asynchronously after this call returns. The `section.total_steps` value in the response may not reflect the eventual number of cloned steps. Until cloning finishes, Get, List, and Query calls may return a lower actual step count.
|
|
1263
1380
|
*
|
|
1264
1381
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -1312,4 +1429,4 @@ interface MoveSectionOptions {
|
|
|
1312
1429
|
fields?: RequestedFieldsWithLiterals[];
|
|
1313
1430
|
}
|
|
1314
1431
|
|
|
1315
|
-
export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, 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 DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, 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 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 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, querySections, typedQuerySections, updateSection, utils };
|
|
1432
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, 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 DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type EventMetadata, type ExtendedFields, 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 QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionClonedEnvelope, type SectionCreatedEnvelope, type SectionDeleted, type SectionDeletedEnvelope, type SectionMoved, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionUpdatedEnvelope, 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, onSectionCloned, onSectionCreated, onSectionDeleted, onSectionUpdated, querySections, typedQuerySections, updateSection, utils };
|
|
@@ -54,7 +54,7 @@ interface Section {
|
|
|
54
54
|
*/
|
|
55
55
|
ordering?: number;
|
|
56
56
|
/**
|
|
57
|
-
* Number of days before the section becomes available
|
|
57
|
+
* Number of days before the section becomes available. The count starts from the program's start date for scheduled programs, or from the participant's enrollment date for self-paced ones. Someone joining a scheduled program after it began may find several sections already open. Use `0` for a section available from the start.
|
|
58
58
|
* @max 5000
|
|
59
59
|
*/
|
|
60
60
|
delayInDays?: number;
|
|
@@ -211,7 +211,7 @@ interface SectionDeleted {
|
|
|
211
211
|
interface SectionCloned {
|
|
212
212
|
/** Source section used for cloning. */
|
|
213
213
|
prototype?: Section;
|
|
214
|
-
/** Cloned section. */
|
|
214
|
+
/** Cloned section. Steps are cloned asynchronously after this event is sent, so `totalSteps` may not reflect the eventual number of cloned steps. Retrieve the section later for the current count. */
|
|
215
215
|
cloned?: Section;
|
|
216
216
|
}
|
|
217
217
|
interface SectionMoved {
|
|
@@ -224,7 +224,7 @@ interface SectionMoved {
|
|
|
224
224
|
newSectionPositionRank?: number;
|
|
225
225
|
}
|
|
226
226
|
interface CreateSectionRequest {
|
|
227
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
228
228
|
section: Section;
|
|
229
229
|
/**
|
|
230
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -246,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
246
246
|
}
|
|
247
247
|
interface BulkCreateSectionsRequest {
|
|
248
248
|
/**
|
|
249
|
-
* List of sections to create. Each section must include `
|
|
249
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
250
250
|
* @minSize 1
|
|
251
251
|
* @maxSize 100
|
|
252
252
|
*/
|
|
@@ -312,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
312
312
|
}
|
|
313
313
|
interface BulkCreateSectionRequest {
|
|
314
314
|
/**
|
|
315
|
-
* List of sections to create. Each section must include `
|
|
315
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
316
316
|
* @minSize 1
|
|
317
317
|
* @maxSize 100
|
|
318
318
|
*/
|
|
@@ -367,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
367
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
368
368
|
section?: Section;
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
373
371
|
* @internal
|
|
374
372
|
*/
|
|
375
373
|
fieldMask?: string[];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Section, CreateSectionOptions, BulkCreateSectionsOptions, BulkCreateSectionsResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.mjs';
|
|
3
|
-
export { AccountInfo, ActionEvent, AddressLocation, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteAllProgramSectionsRequest, DeleteAllProgramSectionsResponse, DeleteByFilterOperation, DeleteByIdsOperation, DeleteSectionRequest, DeleteSectionResponse, Description, DescriptionFieldSet, DescriptionFieldSetWithLiterals, DocumentImage, DocumentPayload, DocumentUpdateOperation, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, ExtendedFields, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, IndexDocument, ItemMetadata, ListSectionsRequest, MessageEnvelope, MoveSectionRequest, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { Section, CreateSectionOptions, BulkCreateSectionsOptions, BulkCreateSectionsResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, SectionClonedEnvelope, SectionCreatedEnvelope, SectionDeletedEnvelope, SectionUpdatedEnvelope, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteAllProgramSectionsRequest, DeleteAllProgramSectionsResponse, DeleteByFilterOperation, DeleteByIdsOperation, DeleteSectionRequest, DeleteSectionResponse, Description, DescriptionFieldSet, DescriptionFieldSetWithLiterals, DocumentImage, DocumentPayload, DocumentUpdateOperation, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, EventMetadata, ExtendedFields, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, IndexDocument, ItemMetadata, ListSectionsRequest, MessageEnvelope, MoveSectionRequest, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
|
|
6
6
|
interface CreateSectionSignature {
|
|
7
7
|
/**
|
|
8
8
|
* Creates a section.
|
|
9
9
|
*
|
|
10
|
-
* The section is added to the program identified by `section.
|
|
10
|
+
* The section is added to the program identified by `section.programId`. Specify that program ID in the request. Set `section.description.title` for the section title. The stored ordering value is assigned automatically.
|
|
11
11
|
*
|
|
12
12
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
13
13
|
*
|
|
14
14
|
* To create multiple sections in a single API call, call [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
|
|
15
|
-
* @param - Section to create. Must include `section.
|
|
15
|
+
* @param - Section to create. Must include `section.programId`.
|
|
16
16
|
* @returns Created section.
|
|
17
17
|
*/
|
|
18
18
|
(section: NonNullablePaths<Section, `programId`, 0>, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `ordering` | `delayInDays`, 1>>;
|
|
@@ -22,12 +22,12 @@ interface BulkCreateSectionsSignature {
|
|
|
22
22
|
/**
|
|
23
23
|
* Creates up to 100 sections in a single API call.
|
|
24
24
|
*
|
|
25
|
-
* All sections in the request must include `
|
|
25
|
+
* All sections in the request must include `programId` and belong to the same program. Set `description.title` for each section title. The stored ordering values are assigned automatically.
|
|
26
26
|
*
|
|
27
27
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
28
28
|
*
|
|
29
29
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
30
|
-
* @param - List of sections to create. Each section must include `
|
|
30
|
+
* @param - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
31
31
|
*/
|
|
32
32
|
(sections: NonNullablePaths<Section, `programId`, 0>[], options?: BulkCreateSectionsOptions): Promise<NonNullablePaths<BulkCreateSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
33
33
|
}
|
|
@@ -84,6 +84,8 @@ interface CloneSectionSignature {
|
|
|
84
84
|
*
|
|
85
85
|
* The cloned section is added to the same program after the current last section. Translation content and extended field data are copied to the cloned section.
|
|
86
86
|
*
|
|
87
|
+
* This method triggers both a Section Created lifecycle event for the new section and a Section Cloned action event containing the source and cloned sections.
|
|
88
|
+
*
|
|
87
89
|
* Steps are cloned asynchronously after this call returns. The `section.total_steps` value in the response may not reflect the eventual number of cloned steps. Until cloning finishes, Get, List, and Query calls may return a lower actual step count.
|
|
88
90
|
*
|
|
89
91
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -103,6 +105,10 @@ interface MoveSectionSignature {
|
|
|
103
105
|
*/
|
|
104
106
|
(sectionId: string, options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.ordering` | `section.delayInDays`, 2>>;
|
|
105
107
|
}
|
|
108
|
+
declare const onSectionCloned$1: EventDefinition<SectionClonedEnvelope, "wix.online_programs.v3.section_cloned">;
|
|
109
|
+
declare const onSectionCreated$1: EventDefinition<SectionCreatedEnvelope, "wix.online_programs.v3.section_created">;
|
|
110
|
+
declare const onSectionDeleted$1: EventDefinition<SectionDeletedEnvelope, "wix.online_programs.v3.section_deleted">;
|
|
111
|
+
declare const onSectionUpdated$1: EventDefinition<SectionUpdatedEnvelope, "wix.online_programs.v3.section_updated">;
|
|
106
112
|
|
|
107
113
|
declare function customQuerySections(httpClient: HttpClient): {
|
|
108
114
|
(query: SectionQuery, options?: QuerySectionsOptions): ReturnType<typeof typedQuerySections>;
|
|
@@ -117,5 +123,21 @@ declare const listSections: MaybeContext<BuildRESTFunction<typeof listSections$1
|
|
|
117
123
|
declare const cloneSection: MaybeContext<BuildRESTFunction<typeof cloneSection$1> & typeof cloneSection$1>;
|
|
118
124
|
declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1> & typeof moveSection$1>;
|
|
119
125
|
declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
|
|
126
|
+
/**
|
|
127
|
+
* Triggered when a section is cloned.
|
|
128
|
+
*/
|
|
129
|
+
declare const onSectionCloned: BuildEventDefinition<typeof onSectionCloned$1> & typeof onSectionCloned$1;
|
|
130
|
+
/**
|
|
131
|
+
* Triggered when a section is created.
|
|
132
|
+
*/
|
|
133
|
+
declare const onSectionCreated: BuildEventDefinition<typeof onSectionCreated$1> & typeof onSectionCreated$1;
|
|
134
|
+
/**
|
|
135
|
+
* Triggered when a section is deleted.
|
|
136
|
+
*/
|
|
137
|
+
declare const onSectionDeleted: BuildEventDefinition<typeof onSectionDeleted$1> & typeof onSectionDeleted$1;
|
|
138
|
+
/**
|
|
139
|
+
* Triggered when a section is updated.
|
|
140
|
+
*/
|
|
141
|
+
declare const onSectionUpdated: BuildEventDefinition<typeof onSectionUpdated$1> & typeof onSectionUpdated$1;
|
|
120
142
|
|
|
121
|
-
export { BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, querySections, updateSection };
|
|
143
|
+
export { BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, QuerySectionsOptions, Section, SectionClonedEnvelope, SectionCreatedEnvelope, SectionDeletedEnvelope, SectionQuery, SectionUpdatedEnvelope, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, onSectionCloned, onSectionCreated, onSectionDeleted, onSectionUpdated, querySections, updateSection };
|
|
@@ -54,7 +54,7 @@ interface Section {
|
|
|
54
54
|
*/
|
|
55
55
|
ordering?: number;
|
|
56
56
|
/**
|
|
57
|
-
* Number of days before the section becomes available
|
|
57
|
+
* Number of days before the section becomes available. The count starts from the program's start date for scheduled programs, or from the participant's enrollment date for self-paced ones. Someone joining a scheduled program after it began may find several sections already open. Use `0` for a section available from the start.
|
|
58
58
|
* @max 5000
|
|
59
59
|
*/
|
|
60
60
|
delayInDays?: number;
|
|
@@ -211,7 +211,7 @@ interface SectionDeleted {
|
|
|
211
211
|
interface SectionCloned {
|
|
212
212
|
/** Source section used for cloning. */
|
|
213
213
|
prototype?: Section;
|
|
214
|
-
/** Cloned section. */
|
|
214
|
+
/** Cloned section. Steps are cloned asynchronously after this event is sent, so `totalSteps` may not reflect the eventual number of cloned steps. Retrieve the section later for the current count. */
|
|
215
215
|
cloned?: Section;
|
|
216
216
|
}
|
|
217
217
|
interface SectionMoved {
|
|
@@ -224,7 +224,7 @@ interface SectionMoved {
|
|
|
224
224
|
newSectionPositionRank?: number;
|
|
225
225
|
}
|
|
226
226
|
interface CreateSectionRequest {
|
|
227
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
228
228
|
section: Section;
|
|
229
229
|
/**
|
|
230
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -246,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
246
246
|
}
|
|
247
247
|
interface BulkCreateSectionsRequest {
|
|
248
248
|
/**
|
|
249
|
-
* List of sections to create. Each section must include `
|
|
249
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
250
250
|
* @minSize 1
|
|
251
251
|
* @maxSize 100
|
|
252
252
|
*/
|
|
@@ -312,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
312
312
|
}
|
|
313
313
|
interface BulkCreateSectionRequest {
|
|
314
314
|
/**
|
|
315
|
-
* List of sections to create. Each section must include `
|
|
315
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
316
316
|
* @minSize 1
|
|
317
317
|
* @maxSize 100
|
|
318
318
|
*/
|
|
@@ -367,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
367
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
368
368
|
section?: Section;
|
|
369
369
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
373
371
|
* @internal
|
|
374
372
|
*/
|
|
375
373
|
fieldMask?: string[];
|
|
@@ -841,15 +839,132 @@ interface AccountInfo {
|
|
|
841
839
|
*/
|
|
842
840
|
siteId?: string | null;
|
|
843
841
|
}
|
|
842
|
+
interface BaseEventMetadata {
|
|
843
|
+
/**
|
|
844
|
+
* App instance ID.
|
|
845
|
+
* @format GUID
|
|
846
|
+
*/
|
|
847
|
+
instanceId?: string | null;
|
|
848
|
+
/**
|
|
849
|
+
* Event type.
|
|
850
|
+
* @maxLength 150
|
|
851
|
+
*/
|
|
852
|
+
eventType?: string;
|
|
853
|
+
/** The identification type and identity data. */
|
|
854
|
+
identity?: IdentificationData;
|
|
855
|
+
/** Details related to the account */
|
|
856
|
+
accountInfo?: AccountInfo;
|
|
857
|
+
}
|
|
858
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
859
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
860
|
+
_id?: string;
|
|
861
|
+
/**
|
|
862
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
863
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
864
|
+
*/
|
|
865
|
+
entityFqdn?: string;
|
|
866
|
+
/**
|
|
867
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
868
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
869
|
+
*/
|
|
870
|
+
slug?: string;
|
|
871
|
+
/** ID of the entity associated with the event. */
|
|
872
|
+
entityId?: string;
|
|
873
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
874
|
+
eventTime?: Date | null;
|
|
875
|
+
/**
|
|
876
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
877
|
+
* (for example, GDPR).
|
|
878
|
+
*/
|
|
879
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
880
|
+
/** If present, indicates the action that triggered the event. */
|
|
881
|
+
originatedFrom?: string | null;
|
|
882
|
+
/**
|
|
883
|
+
* 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.
|
|
884
|
+
* 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.
|
|
885
|
+
*/
|
|
886
|
+
entityEventSequence?: string | null;
|
|
887
|
+
accountInfo?: AccountInfoMetadata;
|
|
888
|
+
}
|
|
889
|
+
interface AccountInfoMetadata {
|
|
890
|
+
/** ID of the Wix account associated with the event */
|
|
891
|
+
accountId: string;
|
|
892
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
893
|
+
siteId?: string;
|
|
894
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
895
|
+
parentAccountId?: string;
|
|
896
|
+
}
|
|
897
|
+
interface SectionClonedEnvelope {
|
|
898
|
+
data: SectionCloned;
|
|
899
|
+
metadata: EventMetadata;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Triggered when a section is cloned.
|
|
903
|
+
* @permissionScope Manage Online Programs
|
|
904
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
905
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
906
|
+
* @webhook
|
|
907
|
+
* @eventType wix.online_programs.v3.section_cloned
|
|
908
|
+
* @slug cloned
|
|
909
|
+
* @documentationMaturity preview
|
|
910
|
+
*/
|
|
911
|
+
declare function onSectionCloned(handler: (event: SectionClonedEnvelope) => void | Promise<void>): void;
|
|
912
|
+
interface SectionCreatedEnvelope {
|
|
913
|
+
entity: Section;
|
|
914
|
+
metadata: EventMetadata;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Triggered when a section is created.
|
|
918
|
+
* @permissionScope Manage Online Programs
|
|
919
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
920
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
921
|
+
* @webhook
|
|
922
|
+
* @eventType wix.online_programs.v3.section_created
|
|
923
|
+
* @slug created
|
|
924
|
+
* @documentationMaturity preview
|
|
925
|
+
*/
|
|
926
|
+
declare function onSectionCreated(handler: (event: SectionCreatedEnvelope) => void | Promise<void>): void;
|
|
927
|
+
interface SectionDeletedEnvelope {
|
|
928
|
+
entity: Section;
|
|
929
|
+
metadata: EventMetadata;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Triggered when a section is deleted.
|
|
933
|
+
* @permissionScope Manage Online Programs
|
|
934
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
935
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
936
|
+
* @webhook
|
|
937
|
+
* @eventType wix.online_programs.v3.section_deleted
|
|
938
|
+
* @slug deleted
|
|
939
|
+
* @documentationMaturity preview
|
|
940
|
+
*/
|
|
941
|
+
declare function onSectionDeleted(handler: (event: SectionDeletedEnvelope) => void | Promise<void>): void;
|
|
942
|
+
interface SectionUpdatedEnvelope {
|
|
943
|
+
entity: Section;
|
|
944
|
+
metadata: EventMetadata;
|
|
945
|
+
/** @hidden */
|
|
946
|
+
modifiedFields: Record<string, any>;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Triggered when a section is updated.
|
|
950
|
+
* @permissionScope Manage Online Programs
|
|
951
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
952
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
953
|
+
* @webhook
|
|
954
|
+
* @eventType wix.online_programs.v3.section_updated
|
|
955
|
+
* @slug updated
|
|
956
|
+
* @documentationMaturity preview
|
|
957
|
+
*/
|
|
958
|
+
declare function onSectionUpdated(handler: (event: SectionUpdatedEnvelope) => void | Promise<void>): void;
|
|
844
959
|
/**
|
|
845
960
|
* Creates a section.
|
|
846
961
|
*
|
|
847
|
-
* The section is added to the program identified by `section.
|
|
962
|
+
* The section is added to the program identified by `section.programId`. Specify that program ID in the request. Set `section.description.title` for the section title. The stored ordering value is assigned automatically.
|
|
848
963
|
*
|
|
849
964
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
850
965
|
*
|
|
851
966
|
* To create multiple sections in a single API call, call [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
|
|
852
|
-
* @param section - Section to create. Must include `section.
|
|
967
|
+
* @param section - Section to create. Must include `section.programId`.
|
|
853
968
|
* @public
|
|
854
969
|
* @documentationMaturity preview
|
|
855
970
|
* @requiredField section
|
|
@@ -872,12 +987,12 @@ interface CreateSectionOptions {
|
|
|
872
987
|
/**
|
|
873
988
|
* Creates up to 100 sections in a single API call.
|
|
874
989
|
*
|
|
875
|
-
* All sections in the request must include `
|
|
990
|
+
* All sections in the request must include `programId` and belong to the same program. Set `description.title` for each section title. The stored ordering values are assigned automatically.
|
|
876
991
|
*
|
|
877
992
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
878
993
|
*
|
|
879
994
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
880
|
-
* @param sections - List of sections to create. Each section must include `
|
|
995
|
+
* @param sections - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
881
996
|
* @public
|
|
882
997
|
* @documentationMaturity preview
|
|
883
998
|
* @requiredField sections
|
|
@@ -989,7 +1104,7 @@ interface UpdateSectionOptions {
|
|
|
989
1104
|
*/
|
|
990
1105
|
ordering?: number;
|
|
991
1106
|
/**
|
|
992
|
-
* Number of days before the section becomes available
|
|
1107
|
+
* Number of days before the section becomes available. The count starts from the program's start date for scheduled programs, or from the participant's enrollment date for self-paced ones. Someone joining a scheduled program after it began may find several sections already open. Use `0` for a section available from the start.
|
|
993
1108
|
* @max 5000
|
|
994
1109
|
*/
|
|
995
1110
|
delayInDays?: number;
|
|
@@ -1259,6 +1374,8 @@ interface ListSectionsOptions {
|
|
|
1259
1374
|
*
|
|
1260
1375
|
* The cloned section is added to the same program after the current last section. Translation content and extended field data are copied to the cloned section.
|
|
1261
1376
|
*
|
|
1377
|
+
* This method triggers both a Section Created lifecycle event for the new section and a Section Cloned action event containing the source and cloned sections.
|
|
1378
|
+
*
|
|
1262
1379
|
* Steps are cloned asynchronously after this call returns. The `section.total_steps` value in the response may not reflect the eventual number of cloned steps. Until cloning finishes, Get, List, and Query calls may return a lower actual step count.
|
|
1263
1380
|
*
|
|
1264
1381
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -1312,4 +1429,4 @@ interface MoveSectionOptions {
|
|
|
1312
1429
|
fields?: RequestedFieldsWithLiterals[];
|
|
1313
1430
|
}
|
|
1314
1431
|
|
|
1315
|
-
export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, 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 DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, 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 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 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, querySections, typedQuerySections, updateSection, utils };
|
|
1432
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddressLocation, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, 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 DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type EventMetadata, type ExtendedFields, 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 QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionClonedEnvelope, type SectionCreatedEnvelope, type SectionDeleted, type SectionDeletedEnvelope, type SectionMoved, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionUpdatedEnvelope, 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, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, onSectionCloned, onSectionCreated, onSectionDeleted, onSectionUpdated, querySections, typedQuerySections, updateSection, utils };
|