@wix/auto_sdk_online-programs_sections 1.0.15 → 1.0.17

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 (49) hide show
  1. package/build/cjs/index.d.ts +6 -16
  2. package/build/cjs/index.js +2 -153
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +8 -40
  5. package/build/cjs/index.typings.js +1 -143
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -7
  8. package/build/cjs/meta.js +0 -109
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -129
  11. package/build/cjs/schemas.js +23 -212
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +6 -16
  14. package/build/es/index.mjs +2 -152
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +8 -40
  17. package/build/es/index.typings.mjs +1 -142
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +4 -7
  20. package/build/es/meta.mjs +0 -108
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -129
  23. package/build/es/schemas.mjs +23 -210
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +6 -16
  26. package/build/internal/cjs/index.js +2 -153
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +114 -39
  29. package/build/internal/cjs/index.typings.js +1 -143
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +210 -6
  32. package/build/internal/cjs/meta.js +0 -109
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -129
  35. package/build/internal/cjs/schemas.js +23 -212
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +6 -16
  38. package/build/internal/es/index.mjs +2 -152
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +114 -39
  41. package/build/internal/es/index.typings.mjs +1 -142
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +210 -6
  44. package/build/internal/es/meta.mjs +0 -108
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -129
  47. package/build/internal/es/schemas.mjs +23 -210
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -122,134 +122,6 @@ declare const BulkCreateSectionsResponse: z.ZodObject<{
122
122
  data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
123
123
  }, z.core.$strip>>;
124
124
  }, z.core.$strip>>;
125
- item: z.ZodOptional<z.ZodObject<{
126
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
127
- revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
128
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
129
- _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
130
- programId: z.ZodOptional<z.ZodString>;
131
- description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
132
- title: z.ZodOptional<z.ZodString>;
133
- details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
134
- }, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
135
- image: z.ZodOptional<z.ZodNever>;
136
- video: z.ZodOptional<z.ZodNever>;
137
- }, z.core.$strip>, z.ZodObject<{
138
- video: z.ZodOptional<z.ZodNever>;
139
- image: z.ZodString;
140
- }, z.core.$strip>, z.ZodObject<{
141
- image: z.ZodOptional<z.ZodNever>;
142
- video: z.ZodString;
143
- }, z.core.$strip>]>>>;
144
- state: z.ZodOptional<z.ZodEnum<{
145
- DRAFT: "DRAFT";
146
- PUBLISHED: "PUBLISHED";
147
- }>>;
148
- oldTotalSteps: z.ZodOptional<z.ZodNumber>;
149
- totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
150
- trialSection: z.ZodOptional<z.ZodBoolean>;
151
- ordering: z.ZodOptional<z.ZodNumber>;
152
- delayInDays: z.ZodOptional<z.ZodNumber>;
153
- extendedFields: z.ZodOptional<z.ZodObject<{
154
- namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
155
- }, z.core.$strip>>;
156
- }, z.core.$strip>>;
157
- action: z.ZodOptional<z.ZodEnum<{
158
- DELETE: "DELETE";
159
- UNKNOWN_ACTION_TYPE: "UNKNOWN_ACTION_TYPE";
160
- INSERT: "INSERT";
161
- UPDATE: "UPDATE";
162
- }>>;
163
- }, z.core.$strip>>>;
164
- bulkActionMetadata: z.ZodOptional<z.ZodObject<{
165
- totalSuccesses: z.ZodOptional<z.ZodNumber>;
166
- totalFailures: z.ZodOptional<z.ZodNumber>;
167
- undetailedFailures: z.ZodOptional<z.ZodNumber>;
168
- }, z.core.$strip>>;
169
- }, z.core.$strip>;
170
- declare const BulkCreateSectionRequest: z.ZodObject<{
171
- sections: z.ZodArray<z.ZodObject<{
172
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
173
- revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
174
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
175
- _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
176
- programId: z.ZodOptional<z.ZodString>;
177
- description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
178
- title: z.ZodOptional<z.ZodString>;
179
- details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
180
- }, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
181
- image: z.ZodOptional<z.ZodNever>;
182
- video: z.ZodOptional<z.ZodNever>;
183
- }, z.core.$strip>, z.ZodObject<{
184
- video: z.ZodOptional<z.ZodNever>;
185
- image: z.ZodString;
186
- }, z.core.$strip>, z.ZodObject<{
187
- image: z.ZodOptional<z.ZodNever>;
188
- video: z.ZodString;
189
- }, z.core.$strip>]>>>;
190
- state: z.ZodOptional<z.ZodEnum<{
191
- DRAFT: "DRAFT";
192
- PUBLISHED: "PUBLISHED";
193
- }>>;
194
- oldTotalSteps: z.ZodOptional<z.ZodNumber>;
195
- totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
196
- trialSection: z.ZodOptional<z.ZodBoolean>;
197
- ordering: z.ZodOptional<z.ZodNumber>;
198
- delayInDays: z.ZodOptional<z.ZodNumber>;
199
- extendedFields: z.ZodOptional<z.ZodObject<{
200
- namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
201
- }, z.core.$strip>>;
202
- }, z.core.$strip>>;
203
- options: z.ZodOptional<z.ZodObject<{
204
- fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
205
- TOTAL_STEPS: "TOTAL_STEPS";
206
- }>>>;
207
- }, z.core.$strip>>;
208
- }, z.core.$strip>;
209
- declare const BulkCreateSectionResponse: z.ZodObject<{
210
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
211
- itemMetadata: z.ZodOptional<z.ZodObject<{
212
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
213
- originalIndex: z.ZodOptional<z.ZodNumber>;
214
- success: z.ZodOptional<z.ZodBoolean>;
215
- error: z.ZodOptional<z.ZodObject<{
216
- code: z.ZodOptional<z.ZodString>;
217
- description: z.ZodOptional<z.ZodString>;
218
- data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
219
- }, z.core.$strip>>;
220
- }, z.core.$strip>>;
221
- item: z.ZodOptional<z.ZodObject<{
222
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
223
- revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
224
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
225
- _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
226
- programId: z.ZodOptional<z.ZodString>;
227
- description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
228
- title: z.ZodOptional<z.ZodString>;
229
- details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
230
- }, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
231
- image: z.ZodOptional<z.ZodNever>;
232
- video: z.ZodOptional<z.ZodNever>;
233
- }, z.core.$strip>, z.ZodObject<{
234
- video: z.ZodOptional<z.ZodNever>;
235
- image: z.ZodString;
236
- }, z.core.$strip>, z.ZodObject<{
237
- image: z.ZodOptional<z.ZodNever>;
238
- video: z.ZodString;
239
- }, z.core.$strip>]>>>;
240
- state: z.ZodOptional<z.ZodEnum<{
241
- DRAFT: "DRAFT";
242
- PUBLISHED: "PUBLISHED";
243
- }>>;
244
- oldTotalSteps: z.ZodOptional<z.ZodNumber>;
245
- totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
246
- trialSection: z.ZodOptional<z.ZodBoolean>;
247
- ordering: z.ZodOptional<z.ZodNumber>;
248
- delayInDays: z.ZodOptional<z.ZodNumber>;
249
- extendedFields: z.ZodOptional<z.ZodObject<{
250
- namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
251
- }, z.core.$strip>>;
252
- }, z.core.$strip>>;
253
125
  action: z.ZodOptional<z.ZodEnum<{
254
126
  DELETE: "DELETE";
255
127
  UNKNOWN_ACTION_TYPE: "UNKNOWN_ACTION_TYPE";
@@ -634,4 +506,4 @@ declare const PublishSectionResponse: z.ZodObject<{
634
506
  }, z.core.$strip>>;
635
507
  }, z.core.$strip>;
636
508
 
637
- export { BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkCreateSectionsResponse, CloneSectionRequest, CloneSectionResponse, CreateSectionRequest, CreateSectionResponse, DeleteSectionRequest, DeleteSectionResponse, GetSectionRequest, GetSectionResponse, ListSectionsRequest, ListSectionsResponse, MoveSectionRequest, MoveSectionResponse, PublishSectionRequest, PublishSectionResponse, QuerySectionsRequest, QuerySectionsResponse, UpdateSectionRequest, UpdateSectionResponse };
509
+ export { BulkCreateSectionsRequest, BulkCreateSectionsResponse, CloneSectionRequest, CloneSectionResponse, CreateSectionRequest, CreateSectionResponse, DeleteSectionRequest, DeleteSectionResponse, GetSectionRequest, GetSectionResponse, ListSectionsRequest, ListSectionsResponse, MoveSectionRequest, MoveSectionResponse, PublishSectionRequest, PublishSectionResponse, QuerySectionsRequest, QuerySectionsResponse, UpdateSectionRequest, UpdateSectionResponse };
@@ -1,6 +1,6 @@
1
1
  // src/online-programs-v3-section-sections.schemas.ts
2
2
  import * as z from "zod";
3
- var CreateSectionRequest = z.object({
3
+ var CreateSectionRequest = /* @__PURE__ */ z.object({
4
4
  section: z.object({
5
5
  _id: z.string().describe("Section ID.").regex(
6
6
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -55,7 +55,7 @@ var CreateSectionRequest = z.object({
55
55
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
56
56
  }).optional()
57
57
  });
58
- var CreateSectionResponse = z.object({
58
+ var CreateSectionResponse = /* @__PURE__ */ z.object({
59
59
  _id: z.string().describe("Section ID.").regex(
60
60
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
61
61
  "Must be a valid GUID"
@@ -102,7 +102,7 @@ var CreateSectionResponse = z.object({
102
102
  ).optional()
103
103
  }).describe("Custom field data for the section.").optional()
104
104
  });
105
- var BulkCreateSectionsRequest = z.object({
105
+ var BulkCreateSectionsRequest = /* @__PURE__ */ z.object({
106
106
  sections: z.array(
107
107
  z.object({
108
108
  _id: z.string().describe("Section ID.").regex(
@@ -159,7 +159,7 @@ var BulkCreateSectionsRequest = z.object({
159
159
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
160
160
  }).optional()
161
161
  });
162
- var BulkCreateSectionsResponse = z.object({
162
+ var BulkCreateSectionsResponse = /* @__PURE__ */ z.object({
163
163
  results: z.array(
164
164
  z.object({
165
165
  itemMetadata: z.object({
@@ -178,193 +178,6 @@ var BulkCreateSectionsResponse = z.object({
178
178
  data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
179
179
  }).describe("Details about the error in case of failure.").optional()
180
180
  }).describe("Metadata for the bulk operation result.").optional(),
181
- item: z.object({
182
- _id: z.string().describe("Section ID.").regex(
183
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
184
- "Must be a valid GUID"
185
- ).optional().nullable(),
186
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
187
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
188
- ).optional().nullable(),
189
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
190
- _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
191
- programId: z.string().describe(
192
- "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
193
- ).regex(
194
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
195
- "Must be a valid GUID"
196
- ).optional(),
197
- description: z.intersection(
198
- z.object({
199
- title: z.string().max(500).optional(),
200
- details: z.string().max(1e7).optional().nullable()
201
- }),
202
- z.xor([
203
- z.object({
204
- image: z.never().optional(),
205
- video: z.never().optional()
206
- }),
207
- z.object({ video: z.never().optional(), image: z.string() }),
208
- z.object({ image: z.never().optional(), video: z.string() })
209
- ])
210
- ).describe(
211
- "Section title and deprecated backward-compatibility content fields."
212
- ).optional(),
213
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
214
- oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
215
- totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
216
- trialSection: z.boolean().describe(
217
- "Whether participants can access the section as trial content before purchasing the parent program."
218
- ).optional(),
219
- ordering: z.number().describe(
220
- "Position rank used to order sections within a program. To reorder sections, call Move Section."
221
- ).optional(),
222
- delayInDays: z.number().int().describe(
223
- "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
224
- ).min(0).max(5e3).optional(),
225
- extendedFields: z.object({
226
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
227
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
228
- ).optional()
229
- }).describe("Custom field data for the section.").optional()
230
- }).describe("Created section.").optional(),
231
- action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
232
- })
233
- ).optional(),
234
- bulkActionMetadata: z.object({
235
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
236
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
237
- undetailedFailures: z.number().int().describe(
238
- "Number of failures without details because detailed failure threshold was exceeded."
239
- ).optional()
240
- }).describe("Summary of the bulk create operation.").optional()
241
- });
242
- var BulkCreateSectionRequest = z.object({
243
- sections: z.array(
244
- z.object({
245
- _id: z.string().describe("Section ID.").regex(
246
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
247
- "Must be a valid GUID"
248
- ).optional().nullable(),
249
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
250
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
251
- ).optional().nullable(),
252
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
253
- _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
254
- programId: z.string().describe(
255
- "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
256
- ).regex(
257
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
258
- "Must be a valid GUID"
259
- ).optional(),
260
- description: z.intersection(
261
- z.object({
262
- title: z.string().max(500).optional(),
263
- details: z.string().max(1e7).optional().nullable()
264
- }),
265
- z.xor([
266
- z.object({
267
- image: z.never().optional(),
268
- video: z.never().optional()
269
- }),
270
- z.object({ video: z.never().optional(), image: z.string() }),
271
- z.object({ image: z.never().optional(), video: z.string() })
272
- ])
273
- ).describe(
274
- "Section title and deprecated backward-compatibility content fields."
275
- ).optional(),
276
- state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
277
- oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
278
- totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
279
- trialSection: z.boolean().describe(
280
- "Whether participants can access the section as trial content before purchasing the parent program."
281
- ).optional(),
282
- ordering: z.number().describe(
283
- "Position rank used to order sections within a program. To reorder sections, call Move Section."
284
- ).optional(),
285
- delayInDays: z.number().int().describe(
286
- "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
287
- ).min(0).max(5e3).optional(),
288
- extendedFields: z.object({
289
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
290
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
291
- ).optional()
292
- }).describe("Custom field data for the section.").optional()
293
- })
294
- ).min(1).max(100),
295
- options: z.object({
296
- fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
297
- }).optional()
298
- });
299
- var BulkCreateSectionResponse = z.object({
300
- results: z.array(
301
- z.object({
302
- itemMetadata: z.object({
303
- _id: z.string().describe(
304
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
305
- ).optional().nullable(),
306
- originalIndex: z.number().int().describe(
307
- "Index of the item within the request array. Allows for correlation between request and response items."
308
- ).optional(),
309
- success: z.boolean().describe(
310
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
311
- ).optional(),
312
- error: z.object({
313
- code: z.string().describe("Error code.").optional(),
314
- description: z.string().describe("Description of the error.").optional(),
315
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
316
- }).describe("Details about the error in case of failure.").optional()
317
- }).describe("Metadata for the bulk operation result.").optional(),
318
- item: z.object({
319
- _id: z.string().describe("Section ID.").regex(
320
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
321
- "Must be a valid GUID"
322
- ).optional().nullable(),
323
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
324
- "Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
325
- ).optional().nullable(),
326
- _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
327
- _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
328
- programId: z.string().describe(
329
- "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
330
- ).regex(
331
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
332
- "Must be a valid GUID"
333
- ).optional(),
334
- description: z.intersection(
335
- z.object({
336
- title: z.string().max(500).optional(),
337
- details: z.string().max(1e7).optional().nullable()
338
- }),
339
- z.xor([
340
- z.object({
341
- image: z.never().optional(),
342
- video: z.never().optional()
343
- }),
344
- z.object({ video: z.never().optional(), image: z.string() }),
345
- z.object({ image: z.never().optional(), video: z.string() })
346
- ])
347
- ).describe(
348
- "Section title and deprecated backward-compatibility content fields."
349
- ).optional(),
350
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
351
- oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
352
- totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
353
- trialSection: z.boolean().describe(
354
- "Whether participants can access the section as trial content before purchasing the parent program."
355
- ).optional(),
356
- ordering: z.number().describe(
357
- "Position rank used to order sections within a program. To reorder sections, call Move Section."
358
- ).optional(),
359
- delayInDays: z.number().int().describe(
360
- "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
361
- ).min(0).max(5e3).optional(),
362
- extendedFields: z.object({
363
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
364
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
365
- ).optional()
366
- }).describe("Custom field data for the section.").optional()
367
- }).describe("Created section.").optional(),
368
181
  action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
369
182
  })
370
183
  ).optional(),
@@ -376,7 +189,7 @@ var BulkCreateSectionResponse = z.object({
376
189
  ).optional()
377
190
  }).describe("Summary of the bulk create operation.").optional()
378
191
  });
379
- var GetSectionRequest = z.object({
192
+ var GetSectionRequest = /* @__PURE__ */ z.object({
380
193
  sectionId: z.string().describe("ID of the Section to retrieve.").regex(
381
194
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
382
195
  "Must be a valid GUID"
@@ -386,7 +199,7 @@ var GetSectionRequest = z.object({
386
199
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
387
200
  }).optional()
388
201
  });
389
- var GetSectionResponse = z.object({
202
+ var GetSectionResponse = /* @__PURE__ */ z.object({
390
203
  _id: z.string().describe("Section ID.").regex(
391
204
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
392
205
  "Must be a valid GUID"
@@ -433,7 +246,7 @@ var GetSectionResponse = z.object({
433
246
  ).optional()
434
247
  }).describe("Custom field data for the section.").optional()
435
248
  });
436
- var UpdateSectionRequest = z.object({
249
+ var UpdateSectionRequest = /* @__PURE__ */ z.object({
437
250
  _id: z.string().describe("Section ID.").regex(
438
251
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
439
252
  "Must be a valid GUID"
@@ -494,7 +307,7 @@ var UpdateSectionRequest = z.object({
494
307
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
495
308
  }).optional()
496
309
  });
497
- var UpdateSectionResponse = z.object({
310
+ var UpdateSectionResponse = /* @__PURE__ */ z.object({
498
311
  _id: z.string().describe("Section ID.").regex(
499
312
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
500
313
  "Must be a valid GUID"
@@ -541,14 +354,14 @@ var UpdateSectionResponse = z.object({
541
354
  ).optional()
542
355
  }).describe("Custom field data for the section.").optional()
543
356
  });
544
- var DeleteSectionRequest = z.object({
357
+ var DeleteSectionRequest = /* @__PURE__ */ z.object({
545
358
  sectionId: z.string().describe("ID of the section to delete.").regex(
546
359
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
547
360
  "Must be a valid GUID"
548
361
  )
549
362
  });
550
- var DeleteSectionResponse = z.object({});
551
- var QuerySectionsRequest = z.object({
363
+ var DeleteSectionResponse = /* @__PURE__ */ z.object({});
364
+ var QuerySectionsRequest = /* @__PURE__ */ z.object({
552
365
  query: z.intersection(
553
366
  z.object({
554
367
  filter: z.record(z.string(), z.any()).describe(
@@ -589,7 +402,7 @@ var QuerySectionsRequest = z.object({
589
402
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
590
403
  }).optional()
591
404
  });
592
- var QuerySectionsResponse = z.object({
405
+ var QuerySectionsResponse = /* @__PURE__ */ z.object({
593
406
  sections: z.array(
594
407
  z.object({
595
408
  _id: z.string().describe("Section ID.").regex(
@@ -659,7 +472,7 @@ var QuerySectionsResponse = z.object({
659
472
  ).optional().nullable()
660
473
  }).describe("Paging metadata.").optional()
661
474
  });
662
- var ListSectionsRequest = z.object({
475
+ var ListSectionsRequest = /* @__PURE__ */ z.object({
663
476
  programId: z.string().describe("Program ID to list sections for.").regex(
664
477
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
665
478
  "Must be a valid GUID"
@@ -669,7 +482,7 @@ var ListSectionsRequest = z.object({
669
482
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
670
483
  }).optional()
671
484
  });
672
- var ListSectionsResponse = z.object({
485
+ var ListSectionsResponse = /* @__PURE__ */ z.object({
673
486
  sections: z.array(
674
487
  z.object({
675
488
  _id: z.string().describe("Section ID.").regex(
@@ -723,7 +536,7 @@ var ListSectionsResponse = z.object({
723
536
  })
724
537
  ).max(1e3).optional()
725
538
  });
726
- var CloneSectionRequest = z.object({
539
+ var CloneSectionRequest = /* @__PURE__ */ z.object({
727
540
  sectionId: z.string().describe("ID of the section to clone.").regex(
728
541
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
729
542
  "Must be a valid GUID"
@@ -732,7 +545,7 @@ var CloneSectionRequest = z.object({
732
545
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
733
546
  }).optional()
734
547
  });
735
- var CloneSectionResponse = z.object({
548
+ var CloneSectionResponse = /* @__PURE__ */ z.object({
736
549
  section: z.object({
737
550
  _id: z.string().describe("Section ID.").regex(
738
551
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -784,7 +597,7 @@ var CloneSectionResponse = z.object({
784
597
  }).describe("Custom field data for the section.").optional()
785
598
  }).describe("Cloned section.").optional()
786
599
  });
787
- var MoveSectionRequest = z.object({
600
+ var MoveSectionRequest = /* @__PURE__ */ z.object({
788
601
  options: z.object({
789
602
  sectionId: z.string().describe("ID of the section to move.").regex(
790
603
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -796,11 +609,13 @@ var MoveSectionRequest = z.object({
796
609
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
797
610
  "Must be a valid GUID"
798
611
  ).optional().nullable(),
799
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
612
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
613
+ "Current revision of the section. When provided, it must match the current revision to protect against conflicting updates."
614
+ ).optional(),
800
615
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
801
616
  }).optional()
802
617
  });
803
- var MoveSectionResponse = z.object({
618
+ var MoveSectionResponse = /* @__PURE__ */ z.object({
804
619
  section: z.object({
805
620
  _id: z.string().describe("Section ID.").regex(
806
621
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -852,7 +667,7 @@ var MoveSectionResponse = z.object({
852
667
  }).describe("Custom field data for the section.").optional()
853
668
  }).describe("Moved section.").optional()
854
669
  });
855
- var PublishSectionRequest = z.object({
670
+ var PublishSectionRequest = /* @__PURE__ */ z.object({
856
671
  options: z.object({
857
672
  sectionId: z.string().describe("ID of the section to publish.").regex(
858
673
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -862,7 +677,7 @@ var PublishSectionRequest = z.object({
862
677
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
863
678
  }).optional()
864
679
  });
865
- var PublishSectionResponse = z.object({
680
+ var PublishSectionResponse = /* @__PURE__ */ z.object({
866
681
  section: z.object({
867
682
  _id: z.string().describe("Section ID.").regex(
868
683
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -915,8 +730,6 @@ var PublishSectionResponse = z.object({
915
730
  }).describe("Published section.").optional()
916
731
  });
917
732
  export {
918
- BulkCreateSectionRequest,
919
- BulkCreateSectionResponse,
920
733
  BulkCreateSectionsRequest,
921
734
  BulkCreateSectionsResponse,
922
735
  CloneSectionRequest,