@wix/auto_sdk_online-programs_sections 1.0.13 → 1.0.14

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 +49 -31
  2. package/build/cjs/index.js +8 -145
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +164 -122
  5. package/build/cjs/index.typings.js +8 -137
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +84 -70
  8. package/build/cjs/meta.js +8 -109
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -92
  11. package/build/cjs/schemas.js +270 -294
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +49 -31
  14. package/build/es/index.mjs +8 -144
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +164 -122
  17. package/build/es/index.typings.mjs +8 -136
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +84 -70
  20. package/build/es/meta.mjs +8 -108
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -92
  23. package/build/es/schemas.mjs +270 -292
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +49 -31
  26. package/build/internal/cjs/index.js +8 -145
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +164 -122
  29. package/build/internal/cjs/index.typings.js +8 -137
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +84 -70
  32. package/build/internal/cjs/meta.js +8 -109
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -92
  35. package/build/internal/cjs/schemas.js +270 -294
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +49 -31
  38. package/build/internal/es/index.mjs +8 -144
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +164 -122
  41. package/build/internal/es/index.typings.mjs +8 -136
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +84 -70
  44. package/build/internal/es/meta.mjs +8 -108
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -92
  47. package/build/internal/es/schemas.mjs +270 -292
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -30,8 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // schemas.ts
31
31
  var schemas_exports = {};
32
32
  __export(schemas_exports, {
33
- BulkCreateSectionMigrationRequest: () => BulkCreateSectionMigrationRequest,
34
- BulkCreateSectionMigrationResponse: () => BulkCreateSectionMigrationResponse,
35
33
  BulkCreateSectionRequest: () => BulkCreateSectionRequest,
36
34
  BulkCreateSectionResponse: () => BulkCreateSectionResponse,
37
35
  CloneSectionRequest: () => CloneSectionRequest,
@@ -59,16 +57,18 @@ module.exports = __toCommonJS(schemas_exports);
59
57
  var z = __toESM(require("zod"));
60
58
  var CreateSectionRequest = z.object({
61
59
  section: z.object({
62
- _id: z.string().describe("Program Section ID.").regex(
60
+ _id: z.string().describe("Section ID.").regex(
63
61
  /^[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}$/,
64
62
  "Must be a valid GUID"
65
63
  ).optional().nullable(),
66
64
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
67
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
65
+ "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."
68
66
  ).optional().nullable(),
69
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
70
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
71
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
67
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
68
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
69
+ programId: z.string().describe(
70
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
71
+ ).regex(
72
72
  /^[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}$/,
73
73
  "Must be a valid GUID"
74
74
  ).optional(),
@@ -85,36 +85,44 @@ var CreateSectionRequest = z.object({
85
85
  z.object({ video: z.never().optional(), image: z.string() }),
86
86
  z.object({ image: z.never().optional(), video: z.string() })
87
87
  ])
88
- ).describe("title, description and media content.").optional(),
88
+ ).describe(
89
+ "Section title and deprecated backward-compatibility content fields."
90
+ ).optional(),
89
91
  state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
90
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
91
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
92
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
93
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
92
94
  trialSection: z.boolean().describe(
93
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
95
+ "Whether participants can access the section as trial content before purchasing the parent program."
96
+ ).optional(),
97
+ ordering: z.number().describe(
98
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
94
99
  ).optional(),
95
- ordering: z.number().describe("field for manual ordering of sections").optional(),
96
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
100
+ delayInDays: z.number().int().describe(
101
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
102
+ ).min(0).max(5e3).optional(),
97
103
  extendedFields: z.object({
98
104
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
99
105
  "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)."
100
106
  ).optional()
101
- }).describe("extensible field").optional()
102
- }).describe("Section to be created."),
107
+ }).describe("Custom field data for the section.").optional()
108
+ }).describe("Section to create. Must include `section.program_id`."),
103
109
  options: z.object({
104
110
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
105
111
  }).optional()
106
112
  });
107
113
  var CreateSectionResponse = z.object({
108
- _id: z.string().describe("Program Section ID.").regex(
114
+ _id: z.string().describe("Section ID.").regex(
109
115
  /^[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}$/,
110
116
  "Must be a valid GUID"
111
117
  ).optional().nullable(),
112
118
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
113
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
119
+ "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."
114
120
  ).optional().nullable(),
115
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
116
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
117
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
121
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
122
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
123
+ programId: z.string().describe(
124
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
125
+ ).regex(
118
126
  /^[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}$/,
119
127
  "Must be a valid GUID"
120
128
  ).optional(),
@@ -128,34 +136,42 @@ var CreateSectionResponse = z.object({
128
136
  z.object({ video: z.never().optional(), image: z.string() }),
129
137
  z.object({ image: z.never().optional(), video: z.string() })
130
138
  ])
131
- ).describe("title, description and media content.").optional(),
132
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
133
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
134
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
139
+ ).describe(
140
+ "Section title and deprecated backward-compatibility content fields."
141
+ ).optional(),
142
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
143
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
144
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
135
145
  trialSection: z.boolean().describe(
136
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
146
+ "Whether participants can access the section as trial content before purchasing the parent program."
147
+ ).optional(),
148
+ ordering: z.number().describe(
149
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
137
150
  ).optional(),
138
- ordering: z.number().describe("field for manual ordering of sections").optional(),
139
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
151
+ delayInDays: z.number().int().describe(
152
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
153
+ ).min(0).max(5e3).optional(),
140
154
  extendedFields: z.object({
141
155
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
142
156
  "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)."
143
157
  ).optional()
144
- }).describe("extensible field").optional()
158
+ }).describe("Custom field data for the section.").optional()
145
159
  });
146
160
  var BulkCreateSectionRequest = z.object({
147
161
  sections: z.array(
148
162
  z.object({
149
- _id: z.string().describe("Program Section ID.").regex(
163
+ _id: z.string().describe("Section ID.").regex(
150
164
  /^[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}$/,
151
165
  "Must be a valid GUID"
152
166
  ).optional().nullable(),
153
167
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
154
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
168
+ "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."
155
169
  ).optional().nullable(),
156
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
157
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
158
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
170
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
171
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
172
+ programId: z.string().describe(
173
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
174
+ ).regex(
159
175
  /^[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}$/,
160
176
  "Must be a valid GUID"
161
177
  ).optional(),
@@ -172,20 +188,26 @@ var BulkCreateSectionRequest = z.object({
172
188
  z.object({ video: z.never().optional(), image: z.string() }),
173
189
  z.object({ image: z.never().optional(), video: z.string() })
174
190
  ])
175
- ).describe("title, description and media content.").optional(),
191
+ ).describe(
192
+ "Section title and deprecated backward-compatibility content fields."
193
+ ).optional(),
176
194
  state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
177
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
178
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
195
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
196
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
179
197
  trialSection: z.boolean().describe(
180
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
198
+ "Whether participants can access the section as trial content before purchasing the parent program."
199
+ ).optional(),
200
+ ordering: z.number().describe(
201
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
181
202
  ).optional(),
182
- ordering: z.number().describe("field for manual ordering of sections").optional(),
183
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
203
+ delayInDays: z.number().int().describe(
204
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
205
+ ).min(0).max(5e3).optional(),
184
206
  extendedFields: z.object({
185
207
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
186
208
  "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)."
187
209
  ).optional()
188
- }).describe("extensible field").optional()
210
+ }).describe("Custom field data for the section.").optional()
189
211
  })
190
212
  ).min(1).max(100),
191
213
  options: z.object({
@@ -210,18 +232,20 @@ var BulkCreateSectionResponse = z.object({
210
232
  description: z.string().describe("Description of the error.").optional(),
211
233
  data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
212
234
  }).describe("Details about the error in case of failure.").optional()
213
- }).describe("item metadata").optional(),
235
+ }).describe("Metadata for the bulk operation result.").optional(),
214
236
  item: z.object({
215
- _id: z.string().describe("Program Section ID.").regex(
237
+ _id: z.string().describe("Section ID.").regex(
216
238
  /^[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}$/,
217
239
  "Must be a valid GUID"
218
240
  ).optional().nullable(),
219
241
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
220
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
242
+ "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."
221
243
  ).optional().nullable(),
222
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
223
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
224
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
244
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
245
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
246
+ programId: z.string().describe(
247
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
248
+ ).regex(
225
249
  /^[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}$/,
226
250
  "Must be a valid GUID"
227
251
  ).optional(),
@@ -238,140 +262,28 @@ var BulkCreateSectionResponse = z.object({
238
262
  z.object({ video: z.never().optional(), image: z.string() }),
239
263
  z.object({ image: z.never().optional(), video: z.string() })
240
264
  ])
241
- ).describe("title, description and media content.").optional(),
242
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
243
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
244
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
245
- trialSection: z.boolean().describe(
246
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
247
- ).optional(),
248
- ordering: z.number().describe("field for manual ordering of sections").optional(),
249
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
250
- extendedFields: z.object({
251
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
252
- "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)."
253
- ).optional()
254
- }).describe("extensible field").optional()
255
- }).describe("created section").optional(),
256
- action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("indicator whether it was create or update").optional()
257
- })
258
- ).optional(),
259
- bulkActionMetadata: z.object({
260
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
261
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
262
- undetailedFailures: z.number().int().describe(
263
- "Number of failures without details because detailed failure threshold was exceeded."
264
- ).optional()
265
- }).describe("bulk metadata").optional()
266
- });
267
- var BulkCreateSectionMigrationRequest = z.object({
268
- sections: z.array(
269
- z.object({
270
- _id: z.string().describe("Program Section ID.").regex(
271
- /^[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}$/,
272
- "Must be a valid GUID"
273
- ).optional().nullable(),
274
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
275
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
276
- ).optional().nullable(),
277
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
278
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
279
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
280
- /^[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}$/,
281
- "Must be a valid GUID"
282
- ).optional(),
283
- description: z.intersection(
284
- z.object({
285
- title: z.string().max(500).optional(),
286
- details: z.string().max(1e7).optional().nullable()
287
- }),
288
- z.xor([
289
- z.object({
290
- image: z.never().optional(),
291
- video: z.never().optional()
292
- }),
293
- z.object({ video: z.never().optional(), image: z.string() }),
294
- z.object({ image: z.never().optional(), video: z.string() })
295
- ])
296
- ).describe("title, description and media content.").optional(),
297
- state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
298
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
299
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
300
- trialSection: z.boolean().describe(
301
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
302
- ).optional(),
303
- ordering: z.number().describe("field for manual ordering of sections").optional(),
304
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
305
- extendedFields: z.object({
306
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
307
- "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)."
308
- ).optional()
309
- }).describe("extensible field").optional()
310
- })
311
- ).min(1).max(100)
312
- });
313
- var BulkCreateSectionMigrationResponse = z.object({
314
- results: z.array(
315
- z.object({
316
- itemMetadata: z.object({
317
- _id: z.string().describe(
318
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
319
- ).optional().nullable(),
320
- originalIndex: z.number().int().describe(
321
- "Index of the item within the request array. Allows for correlation between request and response items."
322
- ).optional(),
323
- success: z.boolean().describe(
324
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
325
- ).optional(),
326
- error: z.object({
327
- code: z.string().describe("Error code.").optional(),
328
- description: z.string().describe("Description of the error.").optional(),
329
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
330
- }).describe("Details about the error in case of failure.").optional()
331
- }).describe("item metadata").optional(),
332
- item: z.object({
333
- _id: z.string().describe("Program Section ID.").regex(
334
- /^[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}$/,
335
- "Must be a valid GUID"
336
- ).optional().nullable(),
337
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
338
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
339
- ).optional().nullable(),
340
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
341
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
342
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
343
- /^[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}$/,
344
- "Must be a valid GUID"
265
+ ).describe(
266
+ "Section title and deprecated backward-compatibility content fields."
345
267
  ).optional(),
346
- description: z.intersection(
347
- z.object({
348
- title: z.string().max(500).optional(),
349
- details: z.string().max(1e7).optional().nullable()
350
- }),
351
- z.xor([
352
- z.object({
353
- image: z.never().optional(),
354
- video: z.never().optional()
355
- }),
356
- z.object({ video: z.never().optional(), image: z.string() }),
357
- z.object({ image: z.never().optional(), video: z.string() })
358
- ])
359
- ).describe("title, description and media content.").optional(),
360
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
361
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
362
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
268
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
269
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
270
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
363
271
  trialSection: z.boolean().describe(
364
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
272
+ "Whether participants can access the section as trial content before purchasing the parent program."
365
273
  ).optional(),
366
- ordering: z.number().describe("field for manual ordering of sections").optional(),
367
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
274
+ ordering: z.number().describe(
275
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
276
+ ).optional(),
277
+ delayInDays: z.number().int().describe(
278
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
279
+ ).min(0).max(5e3).optional(),
368
280
  extendedFields: z.object({
369
281
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
370
282
  "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)."
371
283
  ).optional()
372
- }).describe("extensible field").optional()
373
- }).describe("created section").optional(),
374
- action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("indicator whether it was create or update").optional()
284
+ }).describe("Custom field data for the section.").optional()
285
+ }).describe("Created section.").optional(),
286
+ action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
375
287
  })
376
288
  ).optional(),
377
289
  bulkActionMetadata: z.object({
@@ -380,7 +292,7 @@ var BulkCreateSectionMigrationResponse = z.object({
380
292
  undetailedFailures: z.number().int().describe(
381
293
  "Number of failures without details because detailed failure threshold was exceeded."
382
294
  ).optional()
383
- }).describe("bulk metadata").optional()
295
+ }).describe("Summary of the bulk create operation.").optional()
384
296
  });
385
297
  var GetSectionRequest = z.object({
386
298
  sectionId: z.string().describe("ID of the Section to retrieve.").regex(
@@ -393,16 +305,18 @@ var GetSectionRequest = z.object({
393
305
  }).optional()
394
306
  });
395
307
  var GetSectionResponse = z.object({
396
- _id: z.string().describe("Program Section ID.").regex(
308
+ _id: z.string().describe("Section ID.").regex(
397
309
  /^[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}$/,
398
310
  "Must be a valid GUID"
399
311
  ).optional().nullable(),
400
312
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
401
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
313
+ "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."
402
314
  ).optional().nullable(),
403
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
404
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
405
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
315
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
316
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
317
+ programId: z.string().describe(
318
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
319
+ ).regex(
406
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}$/,
407
321
  "Must be a valid GUID"
408
322
  ).optional(),
@@ -416,38 +330,46 @@ var GetSectionResponse = z.object({
416
330
  z.object({ video: z.never().optional(), image: z.string() }),
417
331
  z.object({ image: z.never().optional(), video: z.string() })
418
332
  ])
419
- ).describe("title, description and media content.").optional(),
420
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
421
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
422
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
333
+ ).describe(
334
+ "Section title and deprecated backward-compatibility content fields."
335
+ ).optional(),
336
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
337
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
338
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
423
339
  trialSection: z.boolean().describe(
424
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
340
+ "Whether participants can access the section as trial content before purchasing the parent program."
425
341
  ).optional(),
426
- ordering: z.number().describe("field for manual ordering of sections").optional(),
427
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
342
+ ordering: z.number().describe(
343
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
344
+ ).optional(),
345
+ delayInDays: z.number().int().describe(
346
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
347
+ ).min(0).max(5e3).optional(),
428
348
  extendedFields: z.object({
429
349
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
430
350
  "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)."
431
351
  ).optional()
432
- }).describe("extensible field").optional()
352
+ }).describe("Custom field data for the section.").optional()
433
353
  });
434
354
  var UpdateSectionRequest = z.object({
435
- _id: z.string().describe("Program Section ID.").regex(
355
+ _id: z.string().describe("Section ID.").regex(
436
356
  /^[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}$/,
437
357
  "Must be a valid GUID"
438
358
  ),
439
359
  options: z.object({
440
360
  section: z.object({
441
- _id: z.string().describe("Program Section ID.").regex(
361
+ _id: z.string().describe("Section ID.").regex(
442
362
  /^[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}$/,
443
363
  "Must be a valid GUID"
444
364
  ).optional().nullable(),
445
365
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
446
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
366
+ "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."
447
367
  ),
448
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
449
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
450
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
368
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
369
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
370
+ programId: z.string().describe(
371
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
372
+ ).regex(
451
373
  /^[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}$/,
452
374
  "Must be a valid GUID"
453
375
  ).optional(),
@@ -464,35 +386,45 @@ var UpdateSectionRequest = z.object({
464
386
  z.object({ video: z.never().optional(), image: z.string() }),
465
387
  z.object({ image: z.never().optional(), video: z.string() })
466
388
  ])
467
- ).describe("title, description and media content.").optional(),
389
+ ).describe(
390
+ "Section title and deprecated backward-compatibility content fields."
391
+ ).optional(),
468
392
  state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
469
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
470
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
393
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
394
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
471
395
  trialSection: z.boolean().describe(
472
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
396
+ "Whether participants can access the section as trial content before purchasing the parent program."
473
397
  ).optional(),
474
- ordering: z.number().describe("field for manual ordering of sections").optional(),
475
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
398
+ ordering: z.number().describe(
399
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
400
+ ).optional(),
401
+ delayInDays: z.number().int().describe(
402
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
403
+ ).min(0).max(5e3).optional(),
476
404
  extendedFields: z.object({
477
405
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
478
406
  "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)."
479
407
  ).optional()
480
- }).describe("extensible field").optional()
481
- }).describe("Section to be updated, may be partial.").optional(),
408
+ }).describe("Custom field data for the section.").optional()
409
+ }).describe(
410
+ "Section to update. Include `section.id`, `section.revision`, and the fields to update."
411
+ ).optional(),
482
412
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
483
413
  }).optional()
484
414
  });
485
415
  var UpdateSectionResponse = z.object({
486
- _id: z.string().describe("Program Section ID.").regex(
416
+ _id: z.string().describe("Section ID.").regex(
487
417
  /^[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}$/,
488
418
  "Must be a valid GUID"
489
419
  ).optional().nullable(),
490
420
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
491
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
421
+ "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."
492
422
  ).optional().nullable(),
493
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
494
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
495
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
423
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
424
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
425
+ programId: z.string().describe(
426
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
427
+ ).regex(
496
428
  /^[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}$/,
497
429
  "Must be a valid GUID"
498
430
  ).optional(),
@@ -506,23 +438,29 @@ var UpdateSectionResponse = z.object({
506
438
  z.object({ video: z.never().optional(), image: z.string() }),
507
439
  z.object({ image: z.never().optional(), video: z.string() })
508
440
  ])
509
- ).describe("title, description and media content.").optional(),
510
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
511
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
512
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
441
+ ).describe(
442
+ "Section title and deprecated backward-compatibility content fields."
443
+ ).optional(),
444
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
445
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
446
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
513
447
  trialSection: z.boolean().describe(
514
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
448
+ "Whether participants can access the section as trial content before purchasing the parent program."
515
449
  ).optional(),
516
- ordering: z.number().describe("field for manual ordering of sections").optional(),
517
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
450
+ ordering: z.number().describe(
451
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
452
+ ).optional(),
453
+ delayInDays: z.number().int().describe(
454
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
455
+ ).min(0).max(5e3).optional(),
518
456
  extendedFields: z.object({
519
457
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
520
458
  "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)."
521
459
  ).optional()
522
- }).describe("extensible field").optional()
460
+ }).describe("Custom field data for the section.").optional()
523
461
  });
524
462
  var DeleteSectionRequest = z.object({
525
- sectionId: z.string().describe("Id of the Section to delete.").regex(
463
+ sectionId: z.string().describe("ID of the section to delete.").regex(
526
464
  /^[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}$/,
527
465
  "Must be a valid GUID"
528
466
  )
@@ -558,7 +496,7 @@ var QuerySectionsRequest = z.object({
558
496
  options: z.object({
559
497
  descriptionFieldSet: z.enum(["STANDARD", "EXTENDED"]).optional(),
560
498
  programId: z.string().describe(
561
- "Program id to query sections. Not used anymore. Deprecated in favor of query filter param."
499
+ "Deprecated. Program ID used to scope the query. Use `query.filter` instead."
562
500
  ).optional(),
563
501
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
564
502
  }).optional()
@@ -566,16 +504,18 @@ var QuerySectionsRequest = z.object({
566
504
  var QuerySectionsResponse = z.object({
567
505
  sections: z.array(
568
506
  z.object({
569
- _id: z.string().describe("Program Section ID.").regex(
507
+ _id: z.string().describe("Section ID.").regex(
570
508
  /^[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}$/,
571
509
  "Must be a valid GUID"
572
510
  ).optional().nullable(),
573
511
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
574
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
512
+ "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."
575
513
  ).optional().nullable(),
576
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
577
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
578
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
514
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
515
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
516
+ programId: z.string().describe(
517
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
518
+ ).regex(
579
519
  /^[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}$/,
580
520
  "Must be a valid GUID"
581
521
  ).optional(),
@@ -592,20 +532,26 @@ var QuerySectionsResponse = z.object({
592
532
  z.object({ video: z.never().optional(), image: z.string() }),
593
533
  z.object({ image: z.never().optional(), video: z.string() })
594
534
  ])
595
- ).describe("title, description and media content.").optional(),
596
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
597
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
598
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
535
+ ).describe(
536
+ "Section title and deprecated backward-compatibility content fields."
537
+ ).optional(),
538
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
539
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
540
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
599
541
  trialSection: z.boolean().describe(
600
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
542
+ "Whether participants can access the section as trial content before purchasing the parent program."
543
+ ).optional(),
544
+ ordering: z.number().describe(
545
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
601
546
  ).optional(),
602
- ordering: z.number().describe("field for manual ordering of sections").optional(),
603
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
547
+ delayInDays: z.number().int().describe(
548
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
549
+ ).min(0).max(5e3).optional(),
604
550
  extendedFields: z.object({
605
551
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
606
552
  "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)."
607
553
  ).optional()
608
- }).describe("extensible field").optional()
554
+ }).describe("Custom field data for the section.").optional()
609
555
  })
610
556
  ).optional(),
611
557
  pagingMetadata: z.object({
@@ -623,10 +569,10 @@ var QuerySectionsResponse = z.object({
623
569
  hasNext: z.boolean().describe(
624
570
  "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
625
571
  ).optional().nullable()
626
- }).describe("Paging metadata").optional()
572
+ }).describe("Paging metadata.").optional()
627
573
  });
628
574
  var ListSectionsRequest = z.object({
629
- programId: z.string().describe("Program id to list sections").regex(
575
+ programId: z.string().describe("Program ID to list sections for.").regex(
630
576
  /^[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}$/,
631
577
  "Must be a valid GUID"
632
578
  ),
@@ -638,16 +584,18 @@ var ListSectionsRequest = z.object({
638
584
  var ListSectionsResponse = z.object({
639
585
  sections: z.array(
640
586
  z.object({
641
- _id: z.string().describe("Program Section ID.").regex(
587
+ _id: z.string().describe("Section ID.").regex(
642
588
  /^[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}$/,
643
589
  "Must be a valid GUID"
644
590
  ).optional().nullable(),
645
591
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
646
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
592
+ "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."
647
593
  ).optional().nullable(),
648
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
649
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
650
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
594
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
595
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
596
+ programId: z.string().describe(
597
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
598
+ ).regex(
651
599
  /^[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}$/,
652
600
  "Must be a valid GUID"
653
601
  ).optional(),
@@ -664,25 +612,31 @@ var ListSectionsResponse = z.object({
664
612
  z.object({ video: z.never().optional(), image: z.string() }),
665
613
  z.object({ image: z.never().optional(), video: z.string() })
666
614
  ])
667
- ).describe("title, description and media content.").optional(),
668
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
669
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
670
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
615
+ ).describe(
616
+ "Section title and deprecated backward-compatibility content fields."
617
+ ).optional(),
618
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
619
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
620
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
671
621
  trialSection: z.boolean().describe(
672
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
622
+ "Whether participants can access the section as trial content before purchasing the parent program."
623
+ ).optional(),
624
+ ordering: z.number().describe(
625
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
673
626
  ).optional(),
674
- ordering: z.number().describe("field for manual ordering of sections").optional(),
675
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
627
+ delayInDays: z.number().int().describe(
628
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
629
+ ).min(0).max(5e3).optional(),
676
630
  extendedFields: z.object({
677
631
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
678
632
  "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)."
679
633
  ).optional()
680
- }).describe("extensible field").optional()
634
+ }).describe("Custom field data for the section.").optional()
681
635
  })
682
636
  ).max(1e3).optional()
683
637
  });
684
638
  var CloneSectionRequest = z.object({
685
- sectionId: z.string().describe("Section to clone").regex(
639
+ sectionId: z.string().describe("ID of the section to clone.").regex(
686
640
  /^[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}$/,
687
641
  "Must be a valid GUID"
688
642
  ),
@@ -692,16 +646,18 @@ var CloneSectionRequest = z.object({
692
646
  });
693
647
  var CloneSectionResponse = z.object({
694
648
  section: z.object({
695
- _id: z.string().describe("Program Section ID.").regex(
649
+ _id: z.string().describe("Section ID.").regex(
696
650
  /^[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}$/,
697
651
  "Must be a valid GUID"
698
652
  ).optional().nullable(),
699
653
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
700
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
654
+ "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."
701
655
  ).optional().nullable(),
702
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
703
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
704
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
656
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
657
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
658
+ programId: z.string().describe(
659
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
660
+ ).regex(
705
661
  /^[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}$/,
706
662
  "Must be a valid GUID"
707
663
  ).optional(),
@@ -718,50 +674,58 @@ var CloneSectionResponse = z.object({
718
674
  z.object({ video: z.never().optional(), image: z.string() }),
719
675
  z.object({ image: z.never().optional(), video: z.string() })
720
676
  ])
721
- ).describe("title, description and media content.").optional(),
722
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
723
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
724
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
677
+ ).describe(
678
+ "Section title and deprecated backward-compatibility content fields."
679
+ ).optional(),
680
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
681
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
682
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
725
683
  trialSection: z.boolean().describe(
726
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
684
+ "Whether participants can access the section as trial content before purchasing the parent program."
685
+ ).optional(),
686
+ ordering: z.number().describe(
687
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
727
688
  ).optional(),
728
- ordering: z.number().describe("field for manual ordering of sections").optional(),
729
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
689
+ delayInDays: z.number().int().describe(
690
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
691
+ ).min(0).max(5e3).optional(),
730
692
  extendedFields: z.object({
731
693
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
732
694
  "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)."
733
695
  ).optional()
734
- }).describe("extensible field").optional()
735
- }).describe("cloned section").optional()
696
+ }).describe("Custom field data for the section.").optional()
697
+ }).describe("Cloned section.").optional()
736
698
  });
737
699
  var MoveSectionRequest = z.object({
738
700
  options: z.object({
739
- sectionId: z.string().describe("Section to move").regex(
701
+ sectionId: z.string().describe("ID of the section to move.").regex(
740
702
  /^[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}$/,
741
703
  "Must be a valid GUID"
742
704
  ).optional(),
743
705
  afterSectionId: z.string().describe(
744
- 'change section position to be after the specified section. If empty insert in the "0" position.'
706
+ "ID of the section that the moved section should be placed after. Leave empty to move the section to the beginning of the program."
745
707
  ).regex(
746
708
  /^[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}$/,
747
709
  "Must be a valid GUID"
748
710
  ).optional().nullable(),
749
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("section revision").optional(),
711
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
750
712
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
751
713
  }).optional()
752
714
  });
753
715
  var MoveSectionResponse = z.object({
754
716
  section: z.object({
755
- _id: z.string().describe("Program Section ID.").regex(
717
+ _id: z.string().describe("Section ID.").regex(
756
718
  /^[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}$/,
757
719
  "Must be a valid GUID"
758
720
  ).optional().nullable(),
759
721
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
760
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
722
+ "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."
761
723
  ).optional().nullable(),
762
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
763
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
764
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
724
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
725
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
726
+ programId: z.string().describe(
727
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
728
+ ).regex(
765
729
  /^[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}$/,
766
730
  "Must be a valid GUID"
767
731
  ).optional(),
@@ -778,44 +742,52 @@ var MoveSectionResponse = z.object({
778
742
  z.object({ video: z.never().optional(), image: z.string() }),
779
743
  z.object({ image: z.never().optional(), video: z.string() })
780
744
  ])
781
- ).describe("title, description and media content.").optional(),
782
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
783
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
784
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
745
+ ).describe(
746
+ "Section title and deprecated backward-compatibility content fields."
747
+ ).optional(),
748
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
749
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
750
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
785
751
  trialSection: z.boolean().describe(
786
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
752
+ "Whether participants can access the section as trial content before purchasing the parent program."
787
753
  ).optional(),
788
- ordering: z.number().describe("field for manual ordering of sections").optional(),
789
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
754
+ ordering: z.number().describe(
755
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
756
+ ).optional(),
757
+ delayInDays: z.number().int().describe(
758
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
759
+ ).min(0).max(5e3).optional(),
790
760
  extendedFields: z.object({
791
761
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
792
762
  "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)."
793
763
  ).optional()
794
- }).describe("extensible field").optional()
795
- }).describe("updated section which was moved").optional()
764
+ }).describe("Custom field data for the section.").optional()
765
+ }).describe("Moved section.").optional()
796
766
  });
797
767
  var PublishSectionRequest = z.object({
798
768
  options: z.object({
799
- sectionId: z.string().describe("Section to publish").regex(
769
+ sectionId: z.string().describe("ID of the section to publish.").regex(
800
770
  /^[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}$/,
801
771
  "Must be a valid GUID"
802
772
  ).optional(),
803
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("section revision").optional(),
773
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
804
774
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
805
775
  }).optional()
806
776
  });
807
777
  var PublishSectionResponse = z.object({
808
778
  section: z.object({
809
- _id: z.string().describe("Program Section ID.").regex(
779
+ _id: z.string().describe("Section ID.").regex(
810
780
  /^[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}$/,
811
781
  "Must be a valid GUID"
812
782
  ).optional().nullable(),
813
783
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
814
- "Represents the current state of an item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision"
784
+ "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."
815
785
  ).optional().nullable(),
816
- _createdDate: z.date().describe("Represents the time this Section was created").optional().nullable(),
817
- _updatedDate: z.date().describe("Represents the time this Section was last updated").optional().nullable(),
818
- programId: z.string().describe("Program Id to which this section is assigned to.").regex(
786
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
787
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
788
+ programId: z.string().describe(
789
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
790
+ ).regex(
819
791
  /^[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}$/,
820
792
  "Must be a valid GUID"
821
793
  ).optional(),
@@ -832,26 +804,30 @@ var PublishSectionResponse = z.object({
832
804
  z.object({ video: z.never().optional(), image: z.string() }),
833
805
  z.object({ image: z.never().optional(), video: z.string() })
834
806
  ])
835
- ).describe("title, description and media content.").optional(),
836
- state: z.enum(["DRAFT", "PUBLISHED"]).describe("is this section published yet?").optional(),
837
- oldTotalSteps: z.number().int().describe("number of program steps in this section.").optional(),
838
- totalSteps: z.number().int().describe("number of program steps in this section.").optional().nullable(),
807
+ ).describe(
808
+ "Section title and deprecated backward-compatibility content fields."
809
+ ).optional(),
810
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
811
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
812
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
839
813
  trialSection: z.boolean().describe(
840
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
814
+ "Whether participants can access the section as trial content before purchasing the parent program."
815
+ ).optional(),
816
+ ordering: z.number().describe(
817
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
841
818
  ).optional(),
842
- ordering: z.number().describe("field for manual ordering of sections").optional(),
843
- delayInDays: z.number().int().describe("open after defined number of days passed.").min(0).max(5e3).optional(),
819
+ delayInDays: z.number().int().describe(
820
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
821
+ ).min(0).max(5e3).optional(),
844
822
  extendedFields: z.object({
845
823
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
846
824
  "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)."
847
825
  ).optional()
848
- }).describe("extensible field").optional()
849
- }).describe("Published section").optional()
826
+ }).describe("Custom field data for the section.").optional()
827
+ }).describe("Published section.").optional()
850
828
  });
851
829
  // Annotate the CommonJS export names for ESM import in node:
852
830
  0 && (module.exports = {
853
- BulkCreateSectionMigrationRequest,
854
- BulkCreateSectionMigrationResponse,
855
831
  BulkCreateSectionRequest,
856
832
  BulkCreateSectionResponse,
857
833
  CloneSectionRequest,