@wix/auto_sdk_online-programs_sections 1.0.20 → 1.0.21

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.
@@ -37,8 +37,6 @@ interface Section {
37
37
  programId?: string;
38
38
  /** Section title and deprecated backward-compatibility content fields. */
39
39
  description?: Description;
40
- /** Publication state of the section. If omitted when creating a section, the state defaults to `PUBLISHED`. */
41
- state?: StateWithLiterals;
42
40
  /**
43
41
  * Legacy total number of steps in the section.
44
42
  * @readonly
@@ -860,7 +858,7 @@ interface AccountInfo {
860
858
  * @returns Created section.
861
859
  * @fqn wix.onlineprograms.sections.v3.SectionsService.CreateSection
862
860
  */
863
- declare function createSection(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
861
+ declare function createSection(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
864
862
  interface CreateSectionOptions {
865
863
  /**
866
864
  * Predefined sets of fields to return.
@@ -903,7 +901,7 @@ interface BulkCreateSectionsOptions {
903
901
  * @returns Retrieved section.
904
902
  * @fqn wix.onlineprograms.sections.v3.SectionsService.GetSection
905
903
  */
906
- declare function getSection(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
904
+ declare function getSection(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
907
905
  interface GetSectionOptions {
908
906
  /** Compatibility option for existing integrations. Current section responses return the section title. */
909
907
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
@@ -918,7 +916,7 @@ interface GetSectionOptions {
918
916
  *
919
917
  * Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when updating the section. This ensures you're working with the latest section and prevents unintended overwrites.
920
918
  *
921
- * Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section). To publish a section, call [Publish Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/publish-section).
919
+ * Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section).
922
920
  * @param _id - Section ID.
923
921
  * @public
924
922
  * @documentationMaturity preview
@@ -929,7 +927,7 @@ interface GetSectionOptions {
929
927
  * @returns Updated section.
930
928
  * @fqn wix.onlineprograms.sections.v3.SectionsService.UpdateSection
931
929
  */
932
- declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
930
+ declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
933
931
  interface UpdateSectionOptions {
934
932
  section?: {
935
933
  /**
@@ -962,8 +960,6 @@ interface UpdateSectionOptions {
962
960
  programId?: string;
963
961
  /** Section title and deprecated backward-compatibility content fields. */
964
962
  description?: Description;
965
- /** Publication state of the section. If omitted when creating a section, the state defaults to `PUBLISHED`. */
966
- state?: StateWithLiterals;
967
963
  /**
968
964
  * Legacy total number of steps in the section.
969
965
  * @readonly
@@ -1014,8 +1010,8 @@ declare function deleteSection(sectionId: string): Promise<void>;
1014
1010
  * - `paging.limit` is `1000`.
1015
1011
  * - `paging.offset` is `0`.
1016
1012
  *
1017
- * Supported filter fields are `programId`, `id`, `delayInDays`, `trialSection`, and `state`.
1018
- * Supported sorting fields are `id`, `delayInDays`, `trialSection`, `state`, `createdDate`, and `ordering`. When sorting by a field other than `programId`, also filter by `programId`.
1013
+ * Supported filter fields are `programId`, `id`, `delayInDays`, and `trialSection`.
1014
+ * Supported sorting fields are `id`, `delayInDays`, `trialSection`, `createdDate`, and `ordering`. When sorting by a field other than `programId`, also filter by `programId`.
1019
1015
  * `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
1020
1016
  *
1021
1017
  * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).
@@ -1060,12 +1056,12 @@ interface SectionsQueryBuilder {
1060
1056
  * @param value - Value to compare against.
1061
1057
  * @documentationMaturity preview
1062
1058
  */
1063
- eq: (propertyName: '_id' | 'programId' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1059
+ eq: (propertyName: '_id' | 'programId' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1064
1060
  /** @param propertyName - Property whose value is compared with `value`.
1065
1061
  * @param value - Value to compare against.
1066
1062
  * @documentationMaturity preview
1067
1063
  */
1068
- ne: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1064
+ ne: (propertyName: '_id' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1069
1065
  /** @param propertyName - Property whose value is compared with `value`.
1070
1066
  * @param value - Value to compare against.
1071
1067
  * @documentationMaturity preview
@@ -1092,9 +1088,9 @@ interface SectionsQueryBuilder {
1092
1088
  */
1093
1089
  startsWith: (propertyName: '_id', value: string) => SectionsQueryBuilder;
1094
1090
  /** @documentationMaturity preview */
1095
- in: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1091
+ in: (propertyName: '_id' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1096
1092
  /** @documentationMaturity preview */
1097
- exists: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: boolean) => SectionsQueryBuilder;
1093
+ exists: (propertyName: '_id' | 'trialSection' | 'delayInDays', value: boolean) => SectionsQueryBuilder;
1098
1094
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1099
1095
  * @documentationMaturity preview
1100
1096
  */
@@ -1119,7 +1115,7 @@ interface SectionsQueryBuilder {
1119
1115
  * @fqn wix.onlineprograms.sections.v3.SectionsService.QuerySections
1120
1116
  * @requiredField query
1121
1117
  */
1122
- declare function typedQuerySections(query: SectionQuery, options?: QuerySectionsOptions): Promise<NonNullablePaths<QuerySectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
1118
+ declare function typedQuerySections(query: SectionQuery, options?: QuerySectionsOptions): Promise<NonNullablePaths<QuerySectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
1123
1119
  interface SectionQuerySpec extends QuerySpec {
1124
1120
  paging: 'cursor';
1125
1121
  wql: [
@@ -1129,7 +1125,7 @@ interface SectionQuerySpec extends QuerySpec {
1129
1125
  sort: 'NONE';
1130
1126
  },
1131
1127
  {
1132
- fields: ['_id', 'delayInDays', 'state', 'trialSection'];
1128
+ fields: ['_id', 'delayInDays', 'trialSection'];
1133
1129
  operators: '*';
1134
1130
  sort: 'BOTH';
1135
1131
  },
@@ -1208,7 +1204,7 @@ declare const utils: {
1208
1204
  * @applicableIdentity APP
1209
1205
  * @fqn wix.onlineprograms.sections.v3.SectionsService.ListSections
1210
1206
  */
1211
- declare function listSections(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
1207
+ declare function listSections(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
1212
1208
  interface ListSectionsOptions {
1213
1209
  /** Compatibility option for existing integrations. Current section responses return the section title. */
1214
1210
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
@@ -1230,7 +1226,7 @@ interface ListSectionsOptions {
1230
1226
  * @applicableIdentity APP
1231
1227
  * @fqn wix.onlineprograms.sections.v3.SectionsService.CloneSection
1232
1228
  */
1233
- declare function cloneSection(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
1229
+ declare function cloneSection(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
1234
1230
  interface CloneSectionOptions {
1235
1231
  /**
1236
1232
  * Predefined sets of fields to return.
@@ -1250,7 +1246,7 @@ interface CloneSectionOptions {
1250
1246
  * @applicableIdentity APP
1251
1247
  * @fqn wix.onlineprograms.sections.v3.SectionsService.MoveSection
1252
1248
  */
1253
- declare function moveSection(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
1249
+ declare function moveSection(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
1254
1250
  interface MoveSectionOptions {
1255
1251
  /**
1256
1252
  * ID of the section to move.
@@ -1270,32 +1266,5 @@ interface MoveSectionOptions {
1270
1266
  */
1271
1267
  fields?: RequestedFieldsWithLiterals[];
1272
1268
  }
1273
- /**
1274
- * Publishes a section.
1275
- *
1276
- * Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when publishing the section. This ensures you're working with the latest section and prevents unintended overwrites.
1277
- *
1278
- * Publishing sets the section's `state` to `PUBLISHED`.
1279
- * @public
1280
- * @documentationMaturity preview
1281
- * @permissionId ONLINE_PROGRAMS.SECTION_UPDATE
1282
- * @applicableIdentity APP
1283
- * @fqn wix.onlineprograms.sections.v3.SectionsService.PublishSection
1284
- */
1285
- declare function publishSection(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
1286
- interface PublishSectionOptions {
1287
- /**
1288
- * ID of the section to publish.
1289
- * @format GUID
1290
- */
1291
- sectionId?: string;
1292
- /** Current revision of the section. */
1293
- revision?: string;
1294
- /**
1295
- * Predefined sets of fields to return.
1296
- * @maxSize 1
1297
- */
1298
- fields?: RequestedFieldsWithLiterals[];
1299
- }
1300
1269
 
1301
- export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, 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 DescriptionMediaOneOf, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, type FocalPoint, type GetSectionOptions, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MessageEnvelope, type MoveSectionOptions, type MoveSectionRequest, type MoveSectionResponse, type PublishSectionOptions, type PublishSectionRequest, type PublishSectionResponse, type QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionDeleted, type SectionMoved, type SectionPublished, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateSectionOptions, type UpdateSectionRequest, type UpdateSectionResponse, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
1270
+ export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, 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 DescriptionMediaOneOf, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, type FocalPoint, type GetSectionOptions, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MessageEnvelope, type MoveSectionOptions, type MoveSectionRequest, type MoveSectionResponse, type PublishSectionRequest, type PublishSectionResponse, type QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionDeleted, type SectionMoved, type SectionPublished, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateSectionOptions, type UpdateSectionRequest, type UpdateSectionResponse, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, querySections, typedQuerySections, updateSection, utils };
@@ -679,61 +679,6 @@ function moveSection(payload) {
679
679
  }
680
680
  return __moveSection;
681
681
  }
682
- function publishSection(payload) {
683
- function __publishSection({ host }) {
684
- const metadata = {
685
- entityFqdn: "wix.online_programs.v3.section",
686
- method: "PATCH",
687
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.PublishSection",
688
- packageName: PACKAGE_NAME,
689
- migrationOptions: {
690
- optInTransformResponse: true
691
- },
692
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
693
- protoPath: "/v3/sections/publish",
694
- data: payload,
695
- host
696
- }),
697
- data: payload,
698
- transformResponse: (payload2) => transformPaths(payload2, [
699
- {
700
- transformFn: transformRESTTimestampToSDKTimestamp,
701
- paths: [
702
- { path: "section.createdDate" },
703
- { path: "section.updatedDate" },
704
- { path: "section.description.image.urlExpirationDate" },
705
- { path: "section.description.video.urlExpirationDate" },
706
- {
707
- path: "section.description.video.resolutions.urlExpirationDate"
708
- },
709
- {
710
- path: "section.description.video.resolutions.poster.urlExpirationDate"
711
- },
712
- { path: "section.description.video.posters.urlExpirationDate" }
713
- ]
714
- },
715
- {
716
- transformFn: transformRESTFloatToSDKFloat,
717
- paths: [
718
- { path: "section.ordering" },
719
- { path: "section.description.image.focalPoint.x" },
720
- { path: "section.description.image.focalPoint.y" },
721
- {
722
- path: "section.description.video.resolutions.poster.focalPoint.x"
723
- },
724
- {
725
- path: "section.description.video.resolutions.poster.focalPoint.y"
726
- },
727
- { path: "section.description.video.posters.focalPoint.x" },
728
- { path: "section.description.video.posters.focalPoint.y" }
729
- ]
730
- }
731
- ])
732
- };
733
- return metadata;
734
- }
735
- return __publishSection;
736
- }
737
682
 
738
683
  // src/online-programs-v3-section-sections.universal.ts
739
684
  import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
@@ -1225,48 +1170,6 @@ async function moveSection2(options) {
1225
1170
  throw transformedError;
1226
1171
  }
1227
1172
  }
1228
- async function publishSection2(options) {
1229
- const { httpClient, sideEffects } = arguments[1];
1230
- const payload = renameKeysFromSDKRequestToRESTRequest({
1231
- sectionId: options?.sectionId,
1232
- revision: options?.revision,
1233
- fields: options?.fields
1234
- });
1235
- const reqOpts = publishSection(payload);
1236
- sideEffects?.onSiteCall?.();
1237
- try {
1238
- const result = await httpClient.request(reqOpts);
1239
- sideEffects?.onSuccess?.(result);
1240
- return renameKeysFromRESTResponseToSDKResponse(
1241
- transformPaths2(result.data, [
1242
- {
1243
- transformFn: transformRESTImageToSDKImage,
1244
- paths: [{ path: "section.description.image" }]
1245
- },
1246
- {
1247
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1248
- paths: [{ path: "section.description.video" }]
1249
- }
1250
- ])
1251
- );
1252
- } catch (err) {
1253
- const transformedError = sdkTransformError(
1254
- err,
1255
- {
1256
- spreadPathsToArguments: {},
1257
- explicitPathsToArguments: {
1258
- sectionId: "$[0].sectionId",
1259
- revision: "$[0].revision",
1260
- fields: "$[0].fields"
1261
- },
1262
- singleArgumentUnchanged: false
1263
- },
1264
- ["options"]
1265
- );
1266
- sideEffects?.onError?.(err);
1267
- throw transformedError;
1268
- }
1269
- }
1270
1173
  export {
1271
1174
  BulkActionType,
1272
1175
  DescriptionFieldSet,
@@ -1283,7 +1186,6 @@ export {
1283
1186
  getSection2 as getSection,
1284
1187
  listSections2 as listSections,
1285
1188
  moveSection2 as moveSection,
1286
- publishSection2 as publishSection,
1287
1189
  querySections2 as querySections,
1288
1190
  typedQuerySections,
1289
1191
  updateSection2 as updateSection,