@wix/auto_sdk_online-programs_sections 1.0.32 → 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 +138 -13
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +9 -6
- 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 +138 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +9 -6
- 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 +139 -16
- package/build/internal/cjs/meta.d.ts +10 -9
- package/build/internal/es/index.d.mts +30 -8
- package/build/internal/es/index.typings.d.mts +139 -16
- package/build/internal/es/meta.d.mts +10 -9
- package/package.json +2 -2
|
@@ -48,10 +48,13 @@ interface Section {
|
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
50
|
totalSteps?: number | null;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
52
55
|
ordering?: number;
|
|
53
56
|
/**
|
|
54
|
-
* 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.
|
|
55
58
|
* @max 5000
|
|
56
59
|
*/
|
|
57
60
|
delayInDays?: number;
|
|
@@ -208,7 +211,7 @@ interface SectionDeleted {
|
|
|
208
211
|
interface SectionCloned {
|
|
209
212
|
/** Source section used for cloning. */
|
|
210
213
|
prototype?: Section;
|
|
211
|
-
/** 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. */
|
|
212
215
|
cloned?: Section;
|
|
213
216
|
}
|
|
214
217
|
interface SectionMoved {
|
|
@@ -221,7 +224,7 @@ interface SectionMoved {
|
|
|
221
224
|
newSectionPositionRank?: number;
|
|
222
225
|
}
|
|
223
226
|
interface CreateSectionRequest {
|
|
224
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
225
228
|
section: Section;
|
|
226
229
|
/**
|
|
227
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -243,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
243
246
|
}
|
|
244
247
|
interface BulkCreateSectionsRequest {
|
|
245
248
|
/**
|
|
246
|
-
* 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.
|
|
247
250
|
* @minSize 1
|
|
248
251
|
* @maxSize 100
|
|
249
252
|
*/
|
|
@@ -309,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
309
312
|
}
|
|
310
313
|
interface BulkCreateSectionRequest {
|
|
311
314
|
/**
|
|
312
|
-
* 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.
|
|
313
316
|
* @minSize 1
|
|
314
317
|
* @maxSize 100
|
|
315
318
|
*/
|
|
@@ -364,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
364
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
365
368
|
section?: Section;
|
|
366
369
|
/**
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
370
371
|
* @internal
|
|
371
372
|
*/
|
|
372
373
|
fieldMask?: string[];
|
|
@@ -838,15 +839,132 @@ interface AccountInfo {
|
|
|
838
839
|
*/
|
|
839
840
|
siteId?: string | null;
|
|
840
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;
|
|
841
959
|
/**
|
|
842
960
|
* Creates a section.
|
|
843
961
|
*
|
|
844
|
-
* 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.
|
|
845
963
|
*
|
|
846
964
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
847
965
|
*
|
|
848
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).
|
|
849
|
-
* @param section - Section to create. Must include `section.
|
|
967
|
+
* @param section - Section to create. Must include `section.programId`.
|
|
850
968
|
* @public
|
|
851
969
|
* @documentationMaturity preview
|
|
852
970
|
* @requiredField section
|
|
@@ -869,12 +987,12 @@ interface CreateSectionOptions {
|
|
|
869
987
|
/**
|
|
870
988
|
* Creates up to 100 sections in a single API call.
|
|
871
989
|
*
|
|
872
|
-
* 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.
|
|
873
991
|
*
|
|
874
992
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
875
993
|
*
|
|
876
994
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
877
|
-
* @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.
|
|
878
996
|
* @public
|
|
879
997
|
* @documentationMaturity preview
|
|
880
998
|
* @requiredField sections
|
|
@@ -980,10 +1098,13 @@ interface UpdateSectionOptions {
|
|
|
980
1098
|
* @readonly
|
|
981
1099
|
*/
|
|
982
1100
|
totalSteps?: number | null;
|
|
983
|
-
/**
|
|
1101
|
+
/**
|
|
1102
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
1103
|
+
* @readonly
|
|
1104
|
+
*/
|
|
984
1105
|
ordering?: number;
|
|
985
1106
|
/**
|
|
986
|
-
* 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.
|
|
987
1108
|
* @max 5000
|
|
988
1109
|
*/
|
|
989
1110
|
delayInDays?: number;
|
|
@@ -1253,6 +1374,8 @@ interface ListSectionsOptions {
|
|
|
1253
1374
|
*
|
|
1254
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.
|
|
1255
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
|
+
*
|
|
1256
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.
|
|
1257
1380
|
*
|
|
1258
1381
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -1306,4 +1429,4 @@ interface MoveSectionOptions {
|
|
|
1306
1429
|
fields?: RequestedFieldsWithLiterals[];
|
|
1307
1430
|
}
|
|
1308
1431
|
|
|
1309
|
-
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 };
|
|
@@ -48,10 +48,13 @@ interface Section {
|
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
50
|
totalSteps?: number | null;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
52
55
|
ordering?: number;
|
|
53
56
|
/**
|
|
54
|
-
* 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.
|
|
55
58
|
* @max 5000
|
|
56
59
|
*/
|
|
57
60
|
delayInDays?: number;
|
|
@@ -208,7 +211,7 @@ interface SectionDeleted {
|
|
|
208
211
|
interface SectionCloned {
|
|
209
212
|
/** Source section used for cloning. */
|
|
210
213
|
prototype?: Section;
|
|
211
|
-
/** 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. */
|
|
212
215
|
cloned?: Section;
|
|
213
216
|
}
|
|
214
217
|
interface SectionMoved {
|
|
@@ -221,7 +224,7 @@ interface SectionMoved {
|
|
|
221
224
|
newSectionPositionRank?: number;
|
|
222
225
|
}
|
|
223
226
|
interface CreateSectionRequest {
|
|
224
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
225
228
|
section: Section;
|
|
226
229
|
/**
|
|
227
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -243,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
243
246
|
}
|
|
244
247
|
interface BulkCreateSectionsRequest {
|
|
245
248
|
/**
|
|
246
|
-
* 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.
|
|
247
250
|
* @minSize 1
|
|
248
251
|
* @maxSize 100
|
|
249
252
|
*/
|
|
@@ -309,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
309
312
|
}
|
|
310
313
|
interface BulkCreateSectionRequest {
|
|
311
314
|
/**
|
|
312
|
-
* 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.
|
|
313
316
|
* @minSize 1
|
|
314
317
|
* @maxSize 100
|
|
315
318
|
*/
|
|
@@ -364,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
364
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
365
368
|
section?: Section;
|
|
366
369
|
/**
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
370
371
|
* @internal
|
|
371
372
|
*/
|
|
372
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 };
|
|
@@ -48,10 +48,13 @@ interface Section {
|
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
50
|
totalSteps?: number | null;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
52
55
|
ordering?: number;
|
|
53
56
|
/**
|
|
54
|
-
* 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.
|
|
55
58
|
* @max 5000
|
|
56
59
|
*/
|
|
57
60
|
delayInDays?: number;
|
|
@@ -208,7 +211,7 @@ interface SectionDeleted {
|
|
|
208
211
|
interface SectionCloned {
|
|
209
212
|
/** Source section used for cloning. */
|
|
210
213
|
prototype?: Section;
|
|
211
|
-
/** 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. */
|
|
212
215
|
cloned?: Section;
|
|
213
216
|
}
|
|
214
217
|
interface SectionMoved {
|
|
@@ -221,7 +224,7 @@ interface SectionMoved {
|
|
|
221
224
|
newSectionPositionRank?: number;
|
|
222
225
|
}
|
|
223
226
|
interface CreateSectionRequest {
|
|
224
|
-
/** Section to create. Must include `section.
|
|
227
|
+
/** Section to create. Must include `section.programId`. */
|
|
225
228
|
section: Section;
|
|
226
229
|
/**
|
|
227
230
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -243,7 +246,7 @@ interface CreateSectionResponse {
|
|
|
243
246
|
}
|
|
244
247
|
interface BulkCreateSectionsRequest {
|
|
245
248
|
/**
|
|
246
|
-
* 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.
|
|
247
250
|
* @minSize 1
|
|
248
251
|
* @maxSize 100
|
|
249
252
|
*/
|
|
@@ -309,7 +312,7 @@ interface BulkActionMetadata {
|
|
|
309
312
|
}
|
|
310
313
|
interface BulkCreateSectionRequest {
|
|
311
314
|
/**
|
|
312
|
-
* 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.
|
|
313
316
|
* @minSize 1
|
|
314
317
|
* @maxSize 100
|
|
315
318
|
*/
|
|
@@ -364,9 +367,7 @@ interface UpdateSectionRequest {
|
|
|
364
367
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
365
368
|
section?: Section;
|
|
366
369
|
/**
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
370
|
+
* Fields to update.
|
|
370
371
|
* @internal
|
|
371
372
|
*/
|
|
372
373
|
fieldMask?: string[];
|
|
@@ -838,15 +839,132 @@ interface AccountInfo {
|
|
|
838
839
|
*/
|
|
839
840
|
siteId?: string | null;
|
|
840
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;
|
|
841
959
|
/**
|
|
842
960
|
* Creates a section.
|
|
843
961
|
*
|
|
844
|
-
* 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.
|
|
845
963
|
*
|
|
846
964
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
847
965
|
*
|
|
848
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).
|
|
849
|
-
* @param section - Section to create. Must include `section.
|
|
967
|
+
* @param section - Section to create. Must include `section.programId`.
|
|
850
968
|
* @public
|
|
851
969
|
* @documentationMaturity preview
|
|
852
970
|
* @requiredField section
|
|
@@ -869,12 +987,12 @@ interface CreateSectionOptions {
|
|
|
869
987
|
/**
|
|
870
988
|
* Creates up to 100 sections in a single API call.
|
|
871
989
|
*
|
|
872
|
-
* 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.
|
|
873
991
|
*
|
|
874
992
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
875
993
|
*
|
|
876
994
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
877
|
-
* @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.
|
|
878
996
|
* @public
|
|
879
997
|
* @documentationMaturity preview
|
|
880
998
|
* @requiredField sections
|
|
@@ -980,10 +1098,13 @@ interface UpdateSectionOptions {
|
|
|
980
1098
|
* @readonly
|
|
981
1099
|
*/
|
|
982
1100
|
totalSteps?: number | null;
|
|
983
|
-
/**
|
|
1101
|
+
/**
|
|
1102
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
1103
|
+
* @readonly
|
|
1104
|
+
*/
|
|
984
1105
|
ordering?: number;
|
|
985
1106
|
/**
|
|
986
|
-
* 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.
|
|
987
1108
|
* @max 5000
|
|
988
1109
|
*/
|
|
989
1110
|
delayInDays?: number;
|
|
@@ -1253,6 +1374,8 @@ interface ListSectionsOptions {
|
|
|
1253
1374
|
*
|
|
1254
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.
|
|
1255
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
|
+
*
|
|
1256
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.
|
|
1257
1380
|
*
|
|
1258
1381
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -1306,4 +1429,4 @@ interface MoveSectionOptions {
|
|
|
1306
1429
|
fields?: RequestedFieldsWithLiterals[];
|
|
1307
1430
|
}
|
|
1308
1431
|
|
|
1309
|
-
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 };
|