@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
|
@@ -42,10 +42,13 @@ interface Section {
|
|
|
42
42
|
* @readonly
|
|
43
43
|
*/
|
|
44
44
|
totalSteps?: number | null;
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
47
|
+
* @readonly
|
|
48
|
+
*/
|
|
46
49
|
ordering?: number;
|
|
47
50
|
/**
|
|
48
|
-
* Number of days before the section becomes available
|
|
51
|
+
* 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.
|
|
49
52
|
* @max 5000
|
|
50
53
|
*/
|
|
51
54
|
delayInDays?: number;
|
|
@@ -202,7 +205,7 @@ interface SectionDeleted {
|
|
|
202
205
|
interface SectionCloned {
|
|
203
206
|
/** Source section used for cloning. */
|
|
204
207
|
prototype?: Section;
|
|
205
|
-
/** Cloned section. */
|
|
208
|
+
/** 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. */
|
|
206
209
|
cloned?: Section;
|
|
207
210
|
}
|
|
208
211
|
interface SectionMoved {
|
|
@@ -215,7 +218,7 @@ interface SectionMoved {
|
|
|
215
218
|
newSectionPositionRank?: number;
|
|
216
219
|
}
|
|
217
220
|
interface CreateSectionRequest {
|
|
218
|
-
/** Section to create. Must include `section.
|
|
221
|
+
/** Section to create. Must include `section.programId`. */
|
|
219
222
|
section: Section;
|
|
220
223
|
/**
|
|
221
224
|
* Deprecated: `total_steps` is always returned. This field is ignored.
|
|
@@ -237,7 +240,7 @@ interface CreateSectionResponse {
|
|
|
237
240
|
}
|
|
238
241
|
interface BulkCreateSectionsRequest {
|
|
239
242
|
/**
|
|
240
|
-
* List of sections to create. Each section must include `
|
|
243
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
241
244
|
* @minSize 1
|
|
242
245
|
* @maxSize 100
|
|
243
246
|
*/
|
|
@@ -298,7 +301,7 @@ interface BulkActionMetadata {
|
|
|
298
301
|
}
|
|
299
302
|
interface BulkCreateSectionRequest {
|
|
300
303
|
/**
|
|
301
|
-
* List of sections to create. Each section must include `
|
|
304
|
+
* List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
302
305
|
* @minSize 1
|
|
303
306
|
* @maxSize 100
|
|
304
307
|
*/
|
|
@@ -799,15 +802,132 @@ interface AccountInfo {
|
|
|
799
802
|
*/
|
|
800
803
|
siteId?: string | null;
|
|
801
804
|
}
|
|
805
|
+
interface BaseEventMetadata {
|
|
806
|
+
/**
|
|
807
|
+
* App instance ID.
|
|
808
|
+
* @format GUID
|
|
809
|
+
*/
|
|
810
|
+
instanceId?: string | null;
|
|
811
|
+
/**
|
|
812
|
+
* Event type.
|
|
813
|
+
* @maxLength 150
|
|
814
|
+
*/
|
|
815
|
+
eventType?: string;
|
|
816
|
+
/** The identification type and identity data. */
|
|
817
|
+
identity?: IdentificationData;
|
|
818
|
+
/** Details related to the account */
|
|
819
|
+
accountInfo?: AccountInfo;
|
|
820
|
+
}
|
|
821
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
822
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
823
|
+
_id?: string;
|
|
824
|
+
/**
|
|
825
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
826
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
827
|
+
*/
|
|
828
|
+
entityFqdn?: string;
|
|
829
|
+
/**
|
|
830
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
831
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
832
|
+
*/
|
|
833
|
+
slug?: string;
|
|
834
|
+
/** ID of the entity associated with the event. */
|
|
835
|
+
entityId?: string;
|
|
836
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
837
|
+
eventTime?: Date | null;
|
|
838
|
+
/**
|
|
839
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
840
|
+
* (for example, GDPR).
|
|
841
|
+
*/
|
|
842
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
843
|
+
/** If present, indicates the action that triggered the event. */
|
|
844
|
+
originatedFrom?: string | null;
|
|
845
|
+
/**
|
|
846
|
+
* 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.
|
|
847
|
+
* 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.
|
|
848
|
+
*/
|
|
849
|
+
entityEventSequence?: string | null;
|
|
850
|
+
accountInfo?: AccountInfoMetadata;
|
|
851
|
+
}
|
|
852
|
+
interface AccountInfoMetadata {
|
|
853
|
+
/** ID of the Wix account associated with the event */
|
|
854
|
+
accountId: string;
|
|
855
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
856
|
+
siteId?: string;
|
|
857
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
858
|
+
parentAccountId?: string;
|
|
859
|
+
}
|
|
860
|
+
interface SectionClonedEnvelope {
|
|
861
|
+
data: SectionCloned;
|
|
862
|
+
metadata: EventMetadata;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Triggered when a section is cloned.
|
|
866
|
+
* @permissionScope Manage Online Programs
|
|
867
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
868
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
869
|
+
* @webhook
|
|
870
|
+
* @eventType wix.online_programs.v3.section_cloned
|
|
871
|
+
* @slug cloned
|
|
872
|
+
* @documentationMaturity preview
|
|
873
|
+
*/
|
|
874
|
+
declare function onSectionCloned(handler: (event: SectionClonedEnvelope) => void | Promise<void>): void;
|
|
875
|
+
interface SectionCreatedEnvelope {
|
|
876
|
+
entity: Section;
|
|
877
|
+
metadata: EventMetadata;
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Triggered when a section is created.
|
|
881
|
+
* @permissionScope Manage Online Programs
|
|
882
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
883
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
884
|
+
* @webhook
|
|
885
|
+
* @eventType wix.online_programs.v3.section_created
|
|
886
|
+
* @slug created
|
|
887
|
+
* @documentationMaturity preview
|
|
888
|
+
*/
|
|
889
|
+
declare function onSectionCreated(handler: (event: SectionCreatedEnvelope) => void | Promise<void>): void;
|
|
890
|
+
interface SectionDeletedEnvelope {
|
|
891
|
+
entity: Section;
|
|
892
|
+
metadata: EventMetadata;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Triggered when a section is deleted.
|
|
896
|
+
* @permissionScope Manage Online Programs
|
|
897
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
898
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
899
|
+
* @webhook
|
|
900
|
+
* @eventType wix.online_programs.v3.section_deleted
|
|
901
|
+
* @slug deleted
|
|
902
|
+
* @documentationMaturity preview
|
|
903
|
+
*/
|
|
904
|
+
declare function onSectionDeleted(handler: (event: SectionDeletedEnvelope) => void | Promise<void>): void;
|
|
905
|
+
interface SectionUpdatedEnvelope {
|
|
906
|
+
entity: Section;
|
|
907
|
+
metadata: EventMetadata;
|
|
908
|
+
/** @hidden */
|
|
909
|
+
modifiedFields: Record<string, any>;
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Triggered when a section is updated.
|
|
913
|
+
* @permissionScope Manage Online Programs
|
|
914
|
+
* @permissionScopeId SCOPE.CHALLENGES.MANAGE
|
|
915
|
+
* @permissionId ONLINE_PROGRAMS.SECTION_READ
|
|
916
|
+
* @webhook
|
|
917
|
+
* @eventType wix.online_programs.v3.section_updated
|
|
918
|
+
* @slug updated
|
|
919
|
+
* @documentationMaturity preview
|
|
920
|
+
*/
|
|
921
|
+
declare function onSectionUpdated(handler: (event: SectionUpdatedEnvelope) => void | Promise<void>): void;
|
|
802
922
|
/**
|
|
803
923
|
* Creates a section.
|
|
804
924
|
*
|
|
805
|
-
* The section is added to the program identified by `section.
|
|
925
|
+
* 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.
|
|
806
926
|
*
|
|
807
927
|
* A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
|
|
808
928
|
*
|
|
809
929
|
* 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).
|
|
810
|
-
* @param section - Section to create. Must include `section.
|
|
930
|
+
* @param section - Section to create. Must include `section.programId`.
|
|
811
931
|
* @public
|
|
812
932
|
* @documentationMaturity preview
|
|
813
933
|
* @requiredField section
|
|
@@ -830,12 +950,12 @@ interface CreateSectionOptions {
|
|
|
830
950
|
/**
|
|
831
951
|
* Creates up to 100 sections in a single API call.
|
|
832
952
|
*
|
|
833
|
-
* All sections in the request must include `
|
|
953
|
+
* 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.
|
|
834
954
|
*
|
|
835
955
|
* A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
|
|
836
956
|
*
|
|
837
957
|
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
838
|
-
* @param sections - List of sections to create. Each section must include `
|
|
958
|
+
* @param sections - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
|
|
839
959
|
* @public
|
|
840
960
|
* @documentationMaturity preview
|
|
841
961
|
* @requiredField sections
|
|
@@ -935,10 +1055,13 @@ interface UpdateSectionOptions {
|
|
|
935
1055
|
* @readonly
|
|
936
1056
|
*/
|
|
937
1057
|
totalSteps?: number | null;
|
|
938
|
-
/**
|
|
1058
|
+
/**
|
|
1059
|
+
* Position rank used to order sections within a program. To reorder sections, call Move Section.
|
|
1060
|
+
* @readonly
|
|
1061
|
+
*/
|
|
939
1062
|
ordering?: number;
|
|
940
1063
|
/**
|
|
941
|
-
* Number of days before the section becomes available
|
|
1064
|
+
* 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.
|
|
942
1065
|
* @max 5000
|
|
943
1066
|
*/
|
|
944
1067
|
delayInDays?: number;
|
|
@@ -1194,6 +1317,8 @@ interface ListSectionsOptions {
|
|
|
1194
1317
|
*
|
|
1195
1318
|
* 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.
|
|
1196
1319
|
*
|
|
1320
|
+
* 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.
|
|
1321
|
+
*
|
|
1197
1322
|
* 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.
|
|
1198
1323
|
*
|
|
1199
1324
|
* A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
|
|
@@ -1247,4 +1372,4 @@ interface MoveSectionOptions {
|
|
|
1247
1372
|
fields?: RequestedFieldsWithLiterals[];
|
|
1248
1373
|
}
|
|
1249
1374
|
|
|
1250
|
-
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 };
|
|
1375
|
+
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 };
|