@wix/auto_sdk_online-programs_sections 1.0.33 → 1.0.35

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.
@@ -48,7 +48,7 @@ interface Section {
48
48
  */
49
49
  ordering?: number;
50
50
  /**
51
- * Number of days before the section becomes available counted 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.
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.
52
52
  * @max 5000
53
53
  */
54
54
  delayInDays?: number;
@@ -205,7 +205,7 @@ interface SectionDeleted {
205
205
  interface SectionCloned {
206
206
  /** Source section used for cloning. */
207
207
  prototype?: Section;
208
- /** 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. */
209
209
  cloned?: Section;
210
210
  }
211
211
  interface SectionMoved {
@@ -218,7 +218,7 @@ interface SectionMoved {
218
218
  newSectionPositionRank?: number;
219
219
  }
220
220
  interface CreateSectionRequest {
221
- /** Section to create. Must include `section.program_id`. */
221
+ /** Section to create. Must include `section.programId`. */
222
222
  section: Section;
223
223
  /**
224
224
  * Deprecated: `total_steps` is always returned. This field is ignored.
@@ -240,7 +240,7 @@ interface CreateSectionResponse {
240
240
  }
241
241
  interface BulkCreateSectionsRequest {
242
242
  /**
243
- * List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
243
+ * List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
244
244
  * @minSize 1
245
245
  * @maxSize 100
246
246
  */
@@ -301,7 +301,7 @@ interface BulkActionMetadata {
301
301
  }
302
302
  interface BulkCreateSectionRequest {
303
303
  /**
304
- * List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
304
+ * List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
305
305
  * @minSize 1
306
306
  * @maxSize 100
307
307
  */
@@ -802,15 +802,132 @@ interface AccountInfo {
802
802
  */
803
803
  siteId?: string | null;
804
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;
805
922
  /**
806
923
  * Creates a section.
807
924
  *
808
- * The section is added to the program identified by `section.program_id`. Provide that program ID in the request. Set `section.description.title` for the section title. The stored ordering value is assigned automatically.
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.
809
926
  *
810
927
  * A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
811
928
  *
812
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).
813
- * @param section - Section to create. Must include `section.program_id`.
930
+ * @param section - Section to create. Must include `section.programId`.
814
931
  * @public
815
932
  * @documentationMaturity preview
816
933
  * @requiredField section
@@ -833,12 +950,12 @@ interface CreateSectionOptions {
833
950
  /**
834
951
  * Creates up to 100 sections in a single API call.
835
952
  *
836
- * All sections in the request must include `program_id` and belong to the same program. Set `description.title` for each section title. The stored ordering values are assigned automatically.
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.
837
954
  *
838
955
  * A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
839
956
  *
840
957
  * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
841
- * @param sections - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
958
+ * @param sections - List of sections to create. Each section must include `programId`, and all sections must belong to the same program.
842
959
  * @public
843
960
  * @documentationMaturity preview
844
961
  * @requiredField sections
@@ -944,7 +1061,7 @@ interface UpdateSectionOptions {
944
1061
  */
945
1062
  ordering?: number;
946
1063
  /**
947
- * Number of days before the section becomes available counted 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.
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.
948
1065
  * @max 5000
949
1066
  */
950
1067
  delayInDays?: number;
@@ -1200,6 +1317,8 @@ interface ListSectionsOptions {
1200
1317
  *
1201
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.
1202
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
+ *
1203
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.
1204
1323
  *
1205
1324
  * A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
@@ -1253,4 +1372,4 @@ interface MoveSectionOptions {
1253
1372
  fields?: RequestedFieldsWithLiterals[];
1254
1373
  }
1255
1374
 
1256
- 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 };
@@ -139,10 +139,6 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
139
139
  }
140
140
  ],
141
141
  "www.wixapis.com": [
142
- {
143
- srcPath: "/program-sections-service",
144
- destPath: ""
145
- },
146
142
  {
147
143
  srcPath: "/online-programs/v3/sections",
148
144
  destPath: "/v3/sections"
@@ -150,6 +146,10 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
150
146
  {
151
147
  srcPath: "/online-programs/v3/bulk/sections",
152
148
  destPath: "/v3/bulk/sections"
149
+ },
150
+ {
151
+ srcPath: "/program-sections-service",
152
+ destPath: ""
153
153
  }
154
154
  ]
155
155
  };