@wix/auto_sdk_online-programs_sections 1.0.11 → 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 +62 -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 +8 -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 +62 -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 +8 -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 +62 -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 +8 -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 +62 -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 +8 -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
  /**
@@ -753,6 +752,8 @@ interface MessageEnvelope {
753
752
  identity?: IdentificationData;
754
753
  /** Stringify payload. */
755
754
  data?: string;
755
+ /** Details related to the account */
756
+ accountInfo?: AccountInfo;
756
757
  }
757
758
  interface IdentificationData extends IdentificationDataIdOneOf {
758
759
  /**
@@ -910,7 +911,7 @@ interface GetSectionOptions {
910
911
  */
911
912
  declare function updateSection(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
912
913
  interface UpdateSectionOptions {
913
- section: {
914
+ section?: {
914
915
  /**
915
916
  * Program Section ID.
916
917
  * @format GUID
@@ -997,8 +998,10 @@ interface QuerySectionsOptions {
997
998
  /** Whenever to return description only with title or with details as well */
998
999
  descriptionFieldSet?: DescriptionFieldSetWithLiterals | undefined;
999
1000
  /**
1000
- * Program id to query sections
1001
- * @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
1002
1005
  */
1003
1006
  programId?: string | undefined;
1004
1007
  /**
@@ -1025,22 +1028,54 @@ interface SectionsQueryBuilder {
1025
1028
  * @param value - Value to compare against.
1026
1029
  * @documentationMaturity preview
1027
1030
  */
1028
- 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;
1029
1042
  /** @param propertyName - Property whose value is compared with `value`.
1030
1043
  * @param value - Value to compare against.
1031
1044
  * @documentationMaturity preview
1032
1045
  */
1033
- 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;
1034
1067
  /** @documentationMaturity preview */
1035
- 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;
1036
1071
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1037
1072
  * @documentationMaturity preview
1038
1073
  */
1039
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1074
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1040
1075
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1041
1076
  * @documentationMaturity preview
1042
1077
  */
1043
- descending: (...propertyNames: Array<'_id' | '_createdDate' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1078
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | 'state' | 'trialSection' | 'ordering' | 'delayInDays'>) => SectionsQueryBuilder;
1044
1079
  /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1045
1080
  * @documentationMaturity preview
1046
1081
  */
@@ -1067,27 +1102,12 @@ interface SectionQuerySpec extends QuerySpec {
1067
1102
  sort: 'NONE';
1068
1103
  },
1069
1104
  {
1070
- fields: ['delayInDays'];
1071
- operators: ['$eq'];
1072
- sort: 'BOTH';
1073
- },
1074
- {
1075
- fields: ['_createdDate'];
1076
- operators: [];
1077
- sort: 'BOTH';
1078
- },
1079
- {
1080
- fields: ['trialSection'];
1081
- operators: ['$eq'];
1082
- sort: 'NONE';
1083
- },
1084
- {
1085
- fields: ['_id'];
1086
- operators: ['$eq', '$in', '$ne', '$nin'];
1105
+ fields: ['_id', 'delayInDays', 'state', 'trialSection'];
1106
+ operators: '*';
1087
1107
  sort: 'BOTH';
1088
1108
  },
1089
1109
  {
1090
- fields: ['ordering'];
1110
+ fields: ['_createdDate', 'ordering'];
1091
1111
  operators: [];
1092
1112
  sort: 'BOTH';
1093
1113
  }
@@ -1139,6 +1159,13 @@ type SectionQuery = {
1139
1159
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1140
1160
  }[];
1141
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
+ };
1142
1169
  /**
1143
1170
  * List sections per program id
1144
1171
  * @param programId - Program id to list sections
@@ -1229,4 +1256,4 @@ interface PublishSectionOptions {
1229
1256
  fields?: RequestedFieldsWithLiterals[];
1230
1257
  }
1231
1258
 
1232
- 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 };
@@ -39,7 +39,8 @@ __export(index_typings_exports, {
39
39
  publishSection: () => publishSection2,
40
40
  querySections: () => querySections2,
41
41
  typedQuerySections: () => typedQuerySections,
42
- updateSection: () => updateSection2
42
+ updateSection: () => updateSection2,
43
+ utils: () => utils
43
44
  });
44
45
  module.exports = __toCommonJS(index_typings_exports);
45
46
 
@@ -855,8 +856,8 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
855
856
  var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
856
857
  var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
857
858
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
859
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
858
860
  var State = /* @__PURE__ */ ((State2) => {
859
- State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
860
861
  State2["DRAFT"] = "DRAFT";
861
862
  State2["PUBLISHED"] = "PUBLISHED";
862
863
  return State2;
@@ -871,7 +872,6 @@ var Enum = /* @__PURE__ */ ((Enum2) => {
871
872
  return Enum2;
872
873
  })(Enum || {});
873
874
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
874
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
875
875
  RequestedFields2["TOTAL_STEPS"] = "TOTAL_STEPS";
876
876
  return RequestedFields2;
877
877
  })(RequestedFields || {});
@@ -1260,6 +1260,11 @@ async function typedQuerySections(query, options) {
1260
1260
  throw transformedError;
1261
1261
  }
1262
1262
  }
1263
+ var utils = {
1264
+ query: {
1265
+ ...(0, import_query_builder_utils.createQueryUtils)()
1266
+ }
1267
+ };
1263
1268
  async function listSections2(programId, options) {
1264
1269
  const { httpClient, sideEffects } = arguments[2];
1265
1270
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1446,6 +1451,7 @@ async function publishSection2(options) {
1446
1451
  publishSection,
1447
1452
  querySections,
1448
1453
  typedQuerySections,
1449
- updateSection
1454
+ updateSection,
1455
+ utils
1450
1456
  });
1451
1457
  //# sourceMappingURL=index.typings.js.map