@wix/auto_sdk_online-programs_sections 1.0.12 → 1.0.13

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.
Files changed (50) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +10 -4
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +60 -35
  5. package/build/cjs/index.typings.js +10 -4
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +6 -8
  8. package/build/cjs/meta.js +0 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +628 -0
  11. package/build/cjs/schemas.js +876 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +1 -1
  14. package/build/es/index.mjs +8 -3
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +60 -35
  17. package/build/es/index.typings.mjs +8 -3
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +6 -8
  20. package/build/es/meta.mjs +0 -2
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +628 -0
  23. package/build/es/schemas.mjs +818 -0
  24. package/build/es/schemas.mjs.map +1 -0
  25. package/build/internal/cjs/index.d.ts +1 -1
  26. package/build/internal/cjs/index.js +10 -4
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +60 -35
  29. package/build/internal/cjs/index.typings.js +10 -4
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +6 -8
  32. package/build/internal/cjs/meta.js +0 -2
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +628 -0
  35. package/build/internal/cjs/schemas.js +876 -0
  36. package/build/internal/cjs/schemas.js.map +1 -0
  37. package/build/internal/es/index.d.mts +1 -1
  38. package/build/internal/es/index.mjs +8 -3
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +60 -35
  41. package/build/internal/es/index.typings.mjs +8 -3
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +6 -8
  44. package/build/internal/es/meta.mjs +0 -2
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +628 -0
  47. package/build/internal/es/schemas.mjs +818 -0
  48. package/build/internal/es/schemas.mjs.map +1 -0
  49. package/package.json +12 -5
  50. package/schemas/package.json +3 -0
@@ -1,3 +1,4 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
1
2
  import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
3
 
3
4
  interface Section {
@@ -104,15 +105,13 @@ interface VideoResolution {
104
105
  format?: string;
105
106
  }
106
107
  declare enum State {
107
- /** invalid default state. */
108
- UNKNOWN_STATE = "UNKNOWN_STATE",
109
108
  /** the section isn't ready to be shown to participants. */
110
109
  DRAFT = "DRAFT",
111
110
  /** this content is visible to participants. */
112
111
  PUBLISHED = "PUBLISHED"
113
112
  }
114
113
  /** @enumType */
115
- type StateWithLiterals = State | 'UNKNOWN_STATE' | 'DRAFT' | 'PUBLISHED';
114
+ type StateWithLiterals = State | 'DRAFT' | 'PUBLISHED';
116
115
  interface ExtendedFields {
117
116
  /**
118
117
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -277,13 +276,11 @@ interface CreateSectionRequest {
277
276
  fields?: RequestedFieldsWithLiterals[];
278
277
  }
279
278
  declare enum RequestedFields {
280
- /** not implemented, invalid default value. */
281
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
282
279
  /** return total number of steps in this section. */
283
280
  TOTAL_STEPS = "TOTAL_STEPS"
284
281
  }
285
282
  /** @enumType */
286
- type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'TOTAL_STEPS';
283
+ type RequestedFieldsWithLiterals = RequestedFields | 'TOTAL_STEPS';
287
284
  interface CreateSectionResponse {
288
285
  /** The created Section. */
289
286
  section?: Section;
@@ -430,8 +427,10 @@ interface QuerySectionsRequest {
430
427
  /** Whenever to return description only with title or with details as well */
431
428
  descriptionFieldSet?: DescriptionFieldSetWithLiterals;
432
429
  /**
433
- * Program id to query sections
434
- * @maxLength 36
430
+ * Program id to query sections. Not used anymore. Deprecated in favor of query filter param.
431
+ * @deprecated
432
+ * @replacedBy wix.common.CursorQuery
433
+ * @targetRemovalDate 2026-06-30
435
434
  */
436
435
  programId?: string;
437
436
  /**
@@ -912,7 +911,7 @@ interface GetSectionOptions {
912
911
  */
913
912
  declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
914
913
  interface UpdateSectionOptions {
915
- section: {
914
+ section?: {
916
915
  /**
917
916
  * Program Section ID.
918
917
  * @format GUID
@@ -999,8 +998,10 @@ interface QuerySectionsOptions {
999
998
  /** Whenever to return description only with title or with details as well */
1000
999
  descriptionFieldSet?: DescriptionFieldSetWithLiterals | undefined;
1001
1000
  /**
1002
- * Program id to query sections
1003
- * @maxLength 36
1001
+ * Program id to query sections. Not used anymore. Deprecated in favor of query filter param.
1002
+ * @deprecated
1003
+ * @replacedBy wix.common.CursorQuery
1004
+ * @targetRemovalDate 2026-06-30
1004
1005
  */
1005
1006
  programId?: string | undefined;
1006
1007
  /**
@@ -1027,22 +1028,54 @@ interface SectionsQueryBuilder {
1027
1028
  * @param value - Value to compare against.
1028
1029
  * @documentationMaturity preview
1029
1030
  */
1030
- eq: (propertyName: '_id' | 'programId' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1031
+ eq: (propertyName: '_id' | 'programId' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1032
+ /** @param propertyName - Property whose value is compared with `value`.
1033
+ * @param value - Value to compare against.
1034
+ * @documentationMaturity preview
1035
+ */
1036
+ ne: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1037
+ /** @param propertyName - Property whose value is compared with `value`.
1038
+ * @param value - Value to compare against.
1039
+ * @documentationMaturity preview
1040
+ */
1041
+ ge: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
1031
1042
  /** @param propertyName - Property whose value is compared with `value`.
1032
1043
  * @param value - Value to compare against.
1033
1044
  * @documentationMaturity preview
1034
1045
  */
1035
- ne: (propertyName: '_id', value: any) => SectionsQueryBuilder;
1046
+ gt: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
1047
+ /** @param propertyName - Property whose value is compared with `value`.
1048
+ * @param value - Value to compare against.
1049
+ * @documentationMaturity preview
1050
+ */
1051
+ le: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
1052
+ /** @param propertyName - Property whose value is compared with `value`.
1053
+ * @param value - Value to compare against.
1054
+ * @documentationMaturity preview
1055
+ */
1056
+ lt: (propertyName: '_id' | 'delayInDays', value: any) => SectionsQueryBuilder;
1057
+ /** @param propertyName - Property whose value is compared with `string`.
1058
+ * @param string - String to compare against. Case-insensitive.
1059
+ * @documentationMaturity preview
1060
+ */
1061
+ startsWith: (propertyName: '_id', value: string) => SectionsQueryBuilder;
1062
+ /** @param propertyName - Property whose value is compared with `values`.
1063
+ * @param values - List of values to compare against.
1064
+ * @documentationMaturity preview
1065
+ */
1066
+ hasSome: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any[]) => SectionsQueryBuilder;
1036
1067
  /** @documentationMaturity preview */
1037
- in: (propertyName: '_id', value: any) => SectionsQueryBuilder;
1068
+ in: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
1069
+ /** @documentationMaturity preview */
1070
+ exists: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: boolean) => SectionsQueryBuilder;
1038
1071
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1039
1072
  * @documentationMaturity preview
1040
1073
  */
1041
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1074
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1042
1075
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1043
1076
  * @documentationMaturity preview
1044
1077
  */
1045
- descending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1078
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1046
1079
  /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1047
1080
  * @documentationMaturity preview
1048
1081
  */
@@ -1069,27 +1102,12 @@ interface SectionQuerySpec extends QuerySpec {
1069
1102
  sort: 'NONE';
1070
1103
  },
1071
1104
  {
1072
- fields: ['delayInDays'];
1073
- operators: ['$eq'];
1074
- sort: 'BOTH';
1075
- },
1076
- {
1077
- fields: ['_createdDate'];
1078
- operators: [];
1079
- sort: 'BOTH';
1080
- },
1081
- {
1082
- fields: ['trialSection'];
1083
- operators: ['$eq'];
1084
- sort: 'NONE';
1085
- },
1086
- {
1087
- fields: ['_id'];
1088
- operators: ['$eq', '$in', '$ne', '$nin'];
1105
+ fields: ['_id', 'delayInDays', 'state', 'trialSection'];
1106
+ operators: '*';
1089
1107
  sort: 'BOTH';
1090
1108
  },
1091
1109
  {
1092
- fields: ['ordering'];
1110
+ fields: ['_createdDate', 'ordering'];
1093
1111
  operators: [];
1094
1112
  sort: 'BOTH';
1095
1113
  }
@@ -1141,6 +1159,13 @@ type SectionQuery = {
1141
1159
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1142
1160
  }[];
1143
1161
  };
1162
+ declare const utils: {
1163
+ query: {
1164
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<Section, SectionQuerySpec, SectionQuery>;
1165
+ Filter: _wix_sdk_types.FilterFactory<Section, SectionQuerySpec>;
1166
+ Sort: _wix_sdk_types.SortFactory<SectionQuerySpec>;
1167
+ };
1168
+ };
1144
1169
  /**
1145
1170
  * List sections per program id
1146
1171
  * @param programId - Program id to list sections
@@ -1231,4 +1256,4 @@ interface PublishSectionOptions {
1231
1256
  fields?: RequestedFieldsWithLiterals[];
1232
1257
  }
1233
1258
 
1234
- export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionOptions, type BulkCreateSectionRequest, type BulkCreateSectionResponse, 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, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection };
1259
+ export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionOptions, type BulkCreateSectionRequest, type BulkCreateSectionResponse, 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, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
@@ -813,8 +813,8 @@ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/i
813
813
  import { transformSDKVideoV2ToRESTVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
814
814
  import { transformRESTVideoV2ToSDKVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
815
815
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
816
+ import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
816
817
  var State = /* @__PURE__ */ ((State2) => {
817
- State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
818
818
  State2["DRAFT"] = "DRAFT";
819
819
  State2["PUBLISHED"] = "PUBLISHED";
820
820
  return State2;
@@ -829,7 +829,6 @@ var Enum = /* @__PURE__ */ ((Enum2) => {
829
829
  return Enum2;
830
830
  })(Enum || {});
831
831
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
832
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
833
832
  RequestedFields2["TOTAL_STEPS"] = "TOTAL_STEPS";
834
833
  return RequestedFields2;
835
834
  })(RequestedFields || {});
@@ -1218,6 +1217,11 @@ async function typedQuerySections(query, options) {
1218
1217
  throw transformedError;
1219
1218
  }
1220
1219
  }
1220
+ var utils = {
1221
+ query: {
1222
+ ...createQueryUtils()
1223
+ }
1224
+ };
1221
1225
  async function listSections2(programId, options) {
1222
1226
  const { httpClient, sideEffects } = arguments[2];
1223
1227
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1403,6 +1407,7 @@ export {
1403
1407
  publishSection2 as publishSection,
1404
1408
  querySections2 as querySections,
1405
1409
  typedQuerySections,
1406
- updateSection2 as updateSection
1410
+ updateSection2 as updateSection,
1411
+ utils
1407
1412
  };
1408
1413
  //# sourceMappingURL=index.typings.mjs.map