@wix/auto_sdk_online-programs_sections 1.0.13 → 1.0.15

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 +61 -31
  2. package/build/cjs/index.js +47 -26
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +220 -120
  5. package/build/cjs/index.typings.js +41 -21
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +117 -72
  8. package/build/cjs/meta.js +35 -18
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +14 -5
  11. package/build/cjs/schemas.js +335 -212
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +61 -31
  14. package/build/es/index.mjs +46 -25
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +220 -120
  17. package/build/es/index.typings.mjs +40 -20
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +117 -72
  20. package/build/es/meta.mjs +34 -17
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +14 -5
  23. package/build/es/schemas.mjs +333 -210
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +61 -31
  26. package/build/internal/cjs/index.js +47 -26
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +220 -120
  29. package/build/internal/cjs/index.typings.js +41 -21
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +117 -72
  32. package/build/internal/cjs/meta.js +35 -18
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +14 -5
  35. package/build/internal/cjs/schemas.js +335 -212
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +61 -31
  38. package/build/internal/es/index.mjs +46 -25
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +220 -120
  41. package/build/internal/es/index.typings.mjs +40 -20
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +117 -72
  44. package/build/internal/es/meta.mjs +34 -17
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +14 -5
  47. package/build/internal/es/schemas.mjs +333 -210
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -30,10 +30,10 @@ 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,
35
+ BulkCreateSectionsRequest: () => BulkCreateSectionsRequest,
36
+ BulkCreateSectionsResponse: () => BulkCreateSectionsResponse,
37
37
  CloneSectionRequest: () => CloneSectionRequest,
38
38
  CloneSectionResponse: () => CloneSectionResponse,
39
39
  CreateSectionRequest: () => CreateSectionRequest,
@@ -59,16 +59,18 @@ module.exports = __toCommonJS(schemas_exports);
59
59
  var z = __toESM(require("zod"));
60
60
  var CreateSectionRequest = z.object({
61
61
  section: z.object({
62
- _id: z.string().describe("Program Section ID.").regex(
62
+ _id: z.string().describe("Section ID.").regex(
63
63
  /^[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
64
  "Must be a valid GUID"
65
65
  ).optional().nullable(),
66
66
  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"
67
+ "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
68
  ).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(
69
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
70
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
71
+ programId: z.string().describe(
72
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
73
+ ).regex(
72
74
  /^[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
75
  "Must be a valid GUID"
74
76
  ).optional(),
@@ -85,36 +87,44 @@ var CreateSectionRequest = z.object({
85
87
  z.object({ video: z.never().optional(), image: z.string() }),
86
88
  z.object({ image: z.never().optional(), video: z.string() })
87
89
  ])
88
- ).describe("title, description and media content.").optional(),
90
+ ).describe(
91
+ "Section title and deprecated backward-compatibility content fields."
92
+ ).optional(),
89
93
  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(),
94
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
95
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
92
96
  trialSection: z.boolean().describe(
93
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
97
+ "Whether participants can access the section as trial content before purchasing the parent program."
94
98
  ).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(),
99
+ ordering: z.number().describe(
100
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
101
+ ).optional(),
102
+ delayInDays: z.number().int().describe(
103
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
104
+ ).min(0).max(5e3).optional(),
97
105
  extendedFields: z.object({
98
106
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
99
107
  "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
108
  ).optional()
101
- }).describe("extensible field").optional()
102
- }).describe("Section to be created."),
109
+ }).describe("Custom field data for the section.").optional()
110
+ }).describe("Section to create. Must include `section.program_id`."),
103
111
  options: z.object({
104
112
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
105
113
  }).optional()
106
114
  });
107
115
  var CreateSectionResponse = z.object({
108
- _id: z.string().describe("Program Section ID.").regex(
116
+ _id: z.string().describe("Section ID.").regex(
109
117
  /^[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
118
  "Must be a valid GUID"
111
119
  ).optional().nullable(),
112
120
  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"
121
+ "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
122
  ).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(
123
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
124
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
125
+ programId: z.string().describe(
126
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
127
+ ).regex(
118
128
  /^[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
129
  "Must be a valid GUID"
120
130
  ).optional(),
@@ -128,34 +138,42 @@ var CreateSectionResponse = z.object({
128
138
  z.object({ video: z.never().optional(), image: z.string() }),
129
139
  z.object({ image: z.never().optional(), video: z.string() })
130
140
  ])
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(),
141
+ ).describe(
142
+ "Section title and deprecated backward-compatibility content fields."
143
+ ).optional(),
144
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
145
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
146
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
135
147
  trialSection: z.boolean().describe(
136
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
148
+ "Whether participants can access the section as trial content before purchasing the parent program."
149
+ ).optional(),
150
+ ordering: z.number().describe(
151
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
137
152
  ).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(),
153
+ delayInDays: z.number().int().describe(
154
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
155
+ ).min(0).max(5e3).optional(),
140
156
  extendedFields: z.object({
141
157
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
142
158
  "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
159
  ).optional()
144
- }).describe("extensible field").optional()
160
+ }).describe("Custom field data for the section.").optional()
145
161
  });
146
- var BulkCreateSectionRequest = z.object({
162
+ var BulkCreateSectionsRequest = z.object({
147
163
  sections: z.array(
148
164
  z.object({
149
- _id: z.string().describe("Program Section ID.").regex(
165
+ _id: z.string().describe("Section ID.").regex(
150
166
  /^[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
167
  "Must be a valid GUID"
152
168
  ).optional().nullable(),
153
169
  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"
170
+ "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
171
  ).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(
172
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
173
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
174
+ programId: z.string().describe(
175
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
176
+ ).regex(
159
177
  /^[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
178
  "Must be a valid GUID"
161
179
  ).optional(),
@@ -172,27 +190,33 @@ var BulkCreateSectionRequest = z.object({
172
190
  z.object({ video: z.never().optional(), image: z.string() }),
173
191
  z.object({ image: z.never().optional(), video: z.string() })
174
192
  ])
175
- ).describe("title, description and media content.").optional(),
193
+ ).describe(
194
+ "Section title and deprecated backward-compatibility content fields."
195
+ ).optional(),
176
196
  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(),
197
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
198
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
179
199
  trialSection: z.boolean().describe(
180
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
200
+ "Whether participants can access the section as trial content before purchasing the parent program."
201
+ ).optional(),
202
+ ordering: z.number().describe(
203
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
181
204
  ).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(),
205
+ delayInDays: z.number().int().describe(
206
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
207
+ ).min(0).max(5e3).optional(),
184
208
  extendedFields: z.object({
185
209
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
186
210
  "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
211
  ).optional()
188
- }).describe("extensible field").optional()
212
+ }).describe("Custom field data for the section.").optional()
189
213
  })
190
214
  ).min(1).max(100),
191
215
  options: z.object({
192
216
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
193
217
  }).optional()
194
218
  });
195
- var BulkCreateSectionResponse = z.object({
219
+ var BulkCreateSectionsResponse = z.object({
196
220
  results: z.array(
197
221
  z.object({
198
222
  itemMetadata: z.object({
@@ -210,18 +234,20 @@ var BulkCreateSectionResponse = z.object({
210
234
  description: z.string().describe("Description of the error.").optional(),
211
235
  data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
212
236
  }).describe("Details about the error in case of failure.").optional()
213
- }).describe("item metadata").optional(),
237
+ }).describe("Metadata for the bulk operation result.").optional(),
214
238
  item: z.object({
215
- _id: z.string().describe("Program Section ID.").regex(
239
+ _id: z.string().describe("Section ID.").regex(
216
240
  /^[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
241
  "Must be a valid GUID"
218
242
  ).optional().nullable(),
219
243
  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"
244
+ "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
245
  ).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(
246
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
247
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
248
+ programId: z.string().describe(
249
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
250
+ ).regex(
225
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}$/,
226
252
  "Must be a valid GUID"
227
253
  ).optional(),
@@ -238,22 +264,28 @@ var BulkCreateSectionResponse = z.object({
238
264
  z.object({ video: z.never().optional(), image: z.string() }),
239
265
  z.object({ image: z.never().optional(), video: z.string() })
240
266
  ])
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(),
267
+ ).describe(
268
+ "Section title and deprecated backward-compatibility content fields."
269
+ ).optional(),
270
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
271
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
272
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
245
273
  trialSection: z.boolean().describe(
246
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
274
+ "Whether participants can access the section as trial content before purchasing the parent program."
275
+ ).optional(),
276
+ ordering: z.number().describe(
277
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
247
278
  ).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(),
279
+ delayInDays: z.number().int().describe(
280
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
281
+ ).min(0).max(5e3).optional(),
250
282
  extendedFields: z.object({
251
283
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
252
284
  "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
285
  ).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()
286
+ }).describe("Custom field data for the section.").optional()
287
+ }).describe("Created section.").optional(),
288
+ action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
257
289
  })
258
290
  ).optional(),
259
291
  bulkActionMetadata: z.object({
@@ -262,21 +294,23 @@ var BulkCreateSectionResponse = z.object({
262
294
  undetailedFailures: z.number().int().describe(
263
295
  "Number of failures without details because detailed failure threshold was exceeded."
264
296
  ).optional()
265
- }).describe("bulk metadata").optional()
297
+ }).describe("Summary of the bulk create operation.").optional()
266
298
  });
267
- var BulkCreateSectionMigrationRequest = z.object({
299
+ var BulkCreateSectionRequest = z.object({
268
300
  sections: z.array(
269
301
  z.object({
270
- _id: z.string().describe("Program Section ID.").regex(
302
+ _id: z.string().describe("Section ID.").regex(
271
303
  /^[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
304
  "Must be a valid GUID"
273
305
  ).optional().nullable(),
274
306
  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"
307
+ "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."
276
308
  ).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(
309
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
310
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
311
+ programId: z.string().describe(
312
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
313
+ ).regex(
280
314
  /^[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
315
  "Must be a valid GUID"
282
316
  ).optional(),
@@ -293,24 +327,33 @@ var BulkCreateSectionMigrationRequest = z.object({
293
327
  z.object({ video: z.never().optional(), image: z.string() }),
294
328
  z.object({ image: z.never().optional(), video: z.string() })
295
329
  ])
296
- ).describe("title, description and media content.").optional(),
330
+ ).describe(
331
+ "Section title and deprecated backward-compatibility content fields."
332
+ ).optional(),
297
333
  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(),
334
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
335
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
300
336
  trialSection: z.boolean().describe(
301
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
337
+ "Whether participants can access the section as trial content before purchasing the parent program."
338
+ ).optional(),
339
+ ordering: z.number().describe(
340
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
302
341
  ).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(),
342
+ delayInDays: z.number().int().describe(
343
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
344
+ ).min(0).max(5e3).optional(),
305
345
  extendedFields: z.object({
306
346
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
307
347
  "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
348
  ).optional()
309
- }).describe("extensible field").optional()
349
+ }).describe("Custom field data for the section.").optional()
310
350
  })
311
- ).min(1).max(100)
351
+ ).min(1).max(100),
352
+ options: z.object({
353
+ fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
354
+ }).optional()
312
355
  });
313
- var BulkCreateSectionMigrationResponse = z.object({
356
+ var BulkCreateSectionResponse = z.object({
314
357
  results: z.array(
315
358
  z.object({
316
359
  itemMetadata: z.object({
@@ -328,18 +371,20 @@ var BulkCreateSectionMigrationResponse = z.object({
328
371
  description: z.string().describe("Description of the error.").optional(),
329
372
  data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
330
373
  }).describe("Details about the error in case of failure.").optional()
331
- }).describe("item metadata").optional(),
374
+ }).describe("Metadata for the bulk operation result.").optional(),
332
375
  item: z.object({
333
- _id: z.string().describe("Program Section ID.").regex(
376
+ _id: z.string().describe("Section ID.").regex(
334
377
  /^[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
378
  "Must be a valid GUID"
336
379
  ).optional().nullable(),
337
380
  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"
381
+ "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."
339
382
  ).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(
383
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
384
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
385
+ programId: z.string().describe(
386
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
387
+ ).regex(
343
388
  /^[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
389
  "Must be a valid GUID"
345
390
  ).optional(),
@@ -356,22 +401,28 @@ var BulkCreateSectionMigrationResponse = z.object({
356
401
  z.object({ video: z.never().optional(), image: z.string() }),
357
402
  z.object({ image: z.never().optional(), video: z.string() })
358
403
  ])
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(),
404
+ ).describe(
405
+ "Section title and deprecated backward-compatibility content fields."
406
+ ).optional(),
407
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
408
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
409
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
363
410
  trialSection: z.boolean().describe(
364
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
411
+ "Whether participants can access the section as trial content before purchasing the parent program."
365
412
  ).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(),
413
+ ordering: z.number().describe(
414
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
415
+ ).optional(),
416
+ delayInDays: z.number().int().describe(
417
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
418
+ ).min(0).max(5e3).optional(),
368
419
  extendedFields: z.object({
369
420
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
370
421
  "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
422
  ).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()
423
+ }).describe("Custom field data for the section.").optional()
424
+ }).describe("Created section.").optional(),
425
+ action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
375
426
  })
376
427
  ).optional(),
377
428
  bulkActionMetadata: z.object({
@@ -380,7 +431,7 @@ var BulkCreateSectionMigrationResponse = z.object({
380
431
  undetailedFailures: z.number().int().describe(
381
432
  "Number of failures without details because detailed failure threshold was exceeded."
382
433
  ).optional()
383
- }).describe("bulk metadata").optional()
434
+ }).describe("Summary of the bulk create operation.").optional()
384
435
  });
385
436
  var GetSectionRequest = z.object({
386
437
  sectionId: z.string().describe("ID of the Section to retrieve.").regex(
@@ -393,16 +444,18 @@ var GetSectionRequest = z.object({
393
444
  }).optional()
394
445
  });
395
446
  var GetSectionResponse = z.object({
396
- _id: z.string().describe("Program Section ID.").regex(
447
+ _id: z.string().describe("Section ID.").regex(
397
448
  /^[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
449
  "Must be a valid GUID"
399
450
  ).optional().nullable(),
400
451
  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"
452
+ "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
453
  ).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(
454
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
455
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
456
+ programId: z.string().describe(
457
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
458
+ ).regex(
406
459
  /^[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
460
  "Must be a valid GUID"
408
461
  ).optional(),
@@ -416,38 +469,46 @@ var GetSectionResponse = z.object({
416
469
  z.object({ video: z.never().optional(), image: z.string() }),
417
470
  z.object({ image: z.never().optional(), video: z.string() })
418
471
  ])
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(),
472
+ ).describe(
473
+ "Section title and deprecated backward-compatibility content fields."
474
+ ).optional(),
475
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
476
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
477
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
423
478
  trialSection: z.boolean().describe(
424
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
479
+ "Whether participants can access the section as trial content before purchasing the parent program."
480
+ ).optional(),
481
+ ordering: z.number().describe(
482
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
425
483
  ).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(),
484
+ delayInDays: z.number().int().describe(
485
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
486
+ ).min(0).max(5e3).optional(),
428
487
  extendedFields: z.object({
429
488
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
430
489
  "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
490
  ).optional()
432
- }).describe("extensible field").optional()
491
+ }).describe("Custom field data for the section.").optional()
433
492
  });
434
493
  var UpdateSectionRequest = z.object({
435
- _id: z.string().describe("Program Section ID.").regex(
494
+ _id: z.string().describe("Section ID.").regex(
436
495
  /^[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
496
  "Must be a valid GUID"
438
497
  ),
439
498
  options: z.object({
440
499
  section: z.object({
441
- _id: z.string().describe("Program Section ID.").regex(
500
+ _id: z.string().describe("Section ID.").regex(
442
501
  /^[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
502
  "Must be a valid GUID"
444
503
  ).optional().nullable(),
445
504
  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"
505
+ "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
506
  ),
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(
507
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
508
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
509
+ programId: z.string().describe(
510
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
511
+ ).regex(
451
512
  /^[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
513
  "Must be a valid GUID"
453
514
  ).optional(),
@@ -464,35 +525,45 @@ var UpdateSectionRequest = z.object({
464
525
  z.object({ video: z.never().optional(), image: z.string() }),
465
526
  z.object({ image: z.never().optional(), video: z.string() })
466
527
  ])
467
- ).describe("title, description and media content.").optional(),
528
+ ).describe(
529
+ "Section title and deprecated backward-compatibility content fields."
530
+ ).optional(),
468
531
  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(),
532
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
533
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
471
534
  trialSection: z.boolean().describe(
472
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
535
+ "Whether participants can access the section as trial content before purchasing the parent program."
536
+ ).optional(),
537
+ ordering: z.number().describe(
538
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
473
539
  ).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(),
540
+ delayInDays: z.number().int().describe(
541
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
542
+ ).min(0).max(5e3).optional(),
476
543
  extendedFields: z.object({
477
544
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
478
545
  "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
546
  ).optional()
480
- }).describe("extensible field").optional()
481
- }).describe("Section to be updated, may be partial.").optional(),
547
+ }).describe("Custom field data for the section.").optional()
548
+ }).describe(
549
+ "Section to update. Include `section.id`, `section.revision`, and the fields to update."
550
+ ).optional(),
482
551
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
483
552
  }).optional()
484
553
  });
485
554
  var UpdateSectionResponse = z.object({
486
- _id: z.string().describe("Program Section ID.").regex(
555
+ _id: z.string().describe("Section ID.").regex(
487
556
  /^[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
557
  "Must be a valid GUID"
489
558
  ).optional().nullable(),
490
559
  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"
560
+ "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
561
  ).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(
562
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
563
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
564
+ programId: z.string().describe(
565
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
566
+ ).regex(
496
567
  /^[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
568
  "Must be a valid GUID"
498
569
  ).optional(),
@@ -506,23 +577,29 @@ var UpdateSectionResponse = z.object({
506
577
  z.object({ video: z.never().optional(), image: z.string() }),
507
578
  z.object({ image: z.never().optional(), video: z.string() })
508
579
  ])
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(),
580
+ ).describe(
581
+ "Section title and deprecated backward-compatibility content fields."
582
+ ).optional(),
583
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
584
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
585
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
513
586
  trialSection: z.boolean().describe(
514
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
587
+ "Whether participants can access the section as trial content before purchasing the parent program."
588
+ ).optional(),
589
+ ordering: z.number().describe(
590
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
515
591
  ).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(),
592
+ delayInDays: z.number().int().describe(
593
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
594
+ ).min(0).max(5e3).optional(),
518
595
  extendedFields: z.object({
519
596
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
520
597
  "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
598
  ).optional()
522
- }).describe("extensible field").optional()
599
+ }).describe("Custom field data for the section.").optional()
523
600
  });
524
601
  var DeleteSectionRequest = z.object({
525
- sectionId: z.string().describe("Id of the Section to delete.").regex(
602
+ sectionId: z.string().describe("ID of the section to delete.").regex(
526
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}$/,
527
604
  "Must be a valid GUID"
528
605
  )
@@ -537,7 +614,13 @@ var QuerySectionsRequest = z.object({
537
614
  sort: z.array(
538
615
  z.object({
539
616
  fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
540
- order: z.enum(["ASC", "DESC"]).optional()
617
+ order: z.enum(["ASC", "DESC"]).optional(),
618
+ origin: z.object({
619
+ latitude: z.number().describe("Address latitude.").optional().nullable(),
620
+ longitude: z.number().describe("Address longitude.").optional().nullable()
621
+ }).describe(
622
+ "Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
623
+ ).optional()
541
624
  })
542
625
  ).max(5).optional()
543
626
  }),
@@ -558,7 +641,7 @@ var QuerySectionsRequest = z.object({
558
641
  options: z.object({
559
642
  descriptionFieldSet: z.enum(["STANDARD", "EXTENDED"]).optional(),
560
643
  programId: z.string().describe(
561
- "Program id to query sections. Not used anymore. Deprecated in favor of query filter param."
644
+ "Deprecated. Program ID used to scope the query. Use `query.filter` instead."
562
645
  ).optional(),
563
646
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
564
647
  }).optional()
@@ -566,16 +649,18 @@ var QuerySectionsRequest = z.object({
566
649
  var QuerySectionsResponse = z.object({
567
650
  sections: z.array(
568
651
  z.object({
569
- _id: z.string().describe("Program Section ID.").regex(
652
+ _id: z.string().describe("Section ID.").regex(
570
653
  /^[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
654
  "Must be a valid GUID"
572
655
  ).optional().nullable(),
573
656
  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"
657
+ "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
658
  ).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(
659
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
660
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
661
+ programId: z.string().describe(
662
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
663
+ ).regex(
579
664
  /^[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
665
  "Must be a valid GUID"
581
666
  ).optional(),
@@ -592,20 +677,26 @@ var QuerySectionsResponse = z.object({
592
677
  z.object({ video: z.never().optional(), image: z.string() }),
593
678
  z.object({ image: z.never().optional(), video: z.string() })
594
679
  ])
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(),
680
+ ).describe(
681
+ "Section title and deprecated backward-compatibility content fields."
682
+ ).optional(),
683
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
684
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
685
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
599
686
  trialSection: z.boolean().describe(
600
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
687
+ "Whether participants can access the section as trial content before purchasing the parent program."
688
+ ).optional(),
689
+ ordering: z.number().describe(
690
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
601
691
  ).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(),
692
+ delayInDays: z.number().int().describe(
693
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
694
+ ).min(0).max(5e3).optional(),
604
695
  extendedFields: z.object({
605
696
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
606
697
  "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
698
  ).optional()
608
- }).describe("extensible field").optional()
699
+ }).describe("Custom field data for the section.").optional()
609
700
  })
610
701
  ).optional(),
611
702
  pagingMetadata: z.object({
@@ -623,10 +714,10 @@ var QuerySectionsResponse = z.object({
623
714
  hasNext: z.boolean().describe(
624
715
  "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
716
  ).optional().nullable()
626
- }).describe("Paging metadata").optional()
717
+ }).describe("Paging metadata.").optional()
627
718
  });
628
719
  var ListSectionsRequest = z.object({
629
- programId: z.string().describe("Program id to list sections").regex(
720
+ programId: z.string().describe("Program ID to list sections for.").regex(
630
721
  /^[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
722
  "Must be a valid GUID"
632
723
  ),
@@ -638,16 +729,18 @@ var ListSectionsRequest = z.object({
638
729
  var ListSectionsResponse = z.object({
639
730
  sections: z.array(
640
731
  z.object({
641
- _id: z.string().describe("Program Section ID.").regex(
732
+ _id: z.string().describe("Section ID.").regex(
642
733
  /^[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
734
  "Must be a valid GUID"
644
735
  ).optional().nullable(),
645
736
  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"
737
+ "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
738
  ).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(
739
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
740
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
741
+ programId: z.string().describe(
742
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
743
+ ).regex(
651
744
  /^[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
745
  "Must be a valid GUID"
653
746
  ).optional(),
@@ -664,25 +757,31 @@ var ListSectionsResponse = z.object({
664
757
  z.object({ video: z.never().optional(), image: z.string() }),
665
758
  z.object({ image: z.never().optional(), video: z.string() })
666
759
  ])
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(),
760
+ ).describe(
761
+ "Section title and deprecated backward-compatibility content fields."
762
+ ).optional(),
763
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
764
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
765
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
671
766
  trialSection: z.boolean().describe(
672
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
767
+ "Whether participants can access the section as trial content before purchasing the parent program."
768
+ ).optional(),
769
+ ordering: z.number().describe(
770
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
673
771
  ).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(),
772
+ delayInDays: z.number().int().describe(
773
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
774
+ ).min(0).max(5e3).optional(),
676
775
  extendedFields: z.object({
677
776
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
678
777
  "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
778
  ).optional()
680
- }).describe("extensible field").optional()
779
+ }).describe("Custom field data for the section.").optional()
681
780
  })
682
781
  ).max(1e3).optional()
683
782
  });
684
783
  var CloneSectionRequest = z.object({
685
- sectionId: z.string().describe("Section to clone").regex(
784
+ sectionId: z.string().describe("ID of the section to clone.").regex(
686
785
  /^[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
786
  "Must be a valid GUID"
688
787
  ),
@@ -692,16 +791,18 @@ var CloneSectionRequest = z.object({
692
791
  });
693
792
  var CloneSectionResponse = z.object({
694
793
  section: z.object({
695
- _id: z.string().describe("Program Section ID.").regex(
794
+ _id: z.string().describe("Section ID.").regex(
696
795
  /^[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
796
  "Must be a valid GUID"
698
797
  ).optional().nullable(),
699
798
  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"
799
+ "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
800
  ).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(
801
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
802
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
803
+ programId: z.string().describe(
804
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
805
+ ).regex(
705
806
  /^[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
807
  "Must be a valid GUID"
707
808
  ).optional(),
@@ -718,50 +819,58 @@ var CloneSectionResponse = z.object({
718
819
  z.object({ video: z.never().optional(), image: z.string() }),
719
820
  z.object({ image: z.never().optional(), video: z.string() })
720
821
  ])
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(),
822
+ ).describe(
823
+ "Section title and deprecated backward-compatibility content fields."
824
+ ).optional(),
825
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
826
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
827
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
725
828
  trialSection: z.boolean().describe(
726
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
829
+ "Whether participants can access the section as trial content before purchasing the parent program."
830
+ ).optional(),
831
+ ordering: z.number().describe(
832
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
727
833
  ).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(),
834
+ delayInDays: z.number().int().describe(
835
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
836
+ ).min(0).max(5e3).optional(),
730
837
  extendedFields: z.object({
731
838
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
732
839
  "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
840
  ).optional()
734
- }).describe("extensible field").optional()
735
- }).describe("cloned section").optional()
841
+ }).describe("Custom field data for the section.").optional()
842
+ }).describe("Cloned section.").optional()
736
843
  });
737
844
  var MoveSectionRequest = z.object({
738
845
  options: z.object({
739
- sectionId: z.string().describe("Section to move").regex(
846
+ sectionId: z.string().describe("ID of the section to move.").regex(
740
847
  /^[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
848
  "Must be a valid GUID"
742
849
  ).optional(),
743
850
  afterSectionId: z.string().describe(
744
- 'change section position to be after the specified section. If empty insert in the "0" position.'
851
+ "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
852
  ).regex(
746
853
  /^[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
854
  "Must be a valid GUID"
748
855
  ).optional().nullable(),
749
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("section revision").optional(),
856
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
750
857
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
751
858
  }).optional()
752
859
  });
753
860
  var MoveSectionResponse = z.object({
754
861
  section: z.object({
755
- _id: z.string().describe("Program Section ID.").regex(
862
+ _id: z.string().describe("Section ID.").regex(
756
863
  /^[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
864
  "Must be a valid GUID"
758
865
  ).optional().nullable(),
759
866
  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"
867
+ "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
868
  ).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(
869
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
870
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
871
+ programId: z.string().describe(
872
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
873
+ ).regex(
765
874
  /^[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
875
  "Must be a valid GUID"
767
876
  ).optional(),
@@ -778,44 +887,52 @@ var MoveSectionResponse = z.object({
778
887
  z.object({ video: z.never().optional(), image: z.string() }),
779
888
  z.object({ image: z.never().optional(), video: z.string() })
780
889
  ])
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(),
890
+ ).describe(
891
+ "Section title and deprecated backward-compatibility content fields."
892
+ ).optional(),
893
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
894
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
895
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
785
896
  trialSection: z.boolean().describe(
786
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
897
+ "Whether participants can access the section as trial content before purchasing the parent program."
787
898
  ).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(),
899
+ ordering: z.number().describe(
900
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
901
+ ).optional(),
902
+ delayInDays: z.number().int().describe(
903
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
904
+ ).min(0).max(5e3).optional(),
790
905
  extendedFields: z.object({
791
906
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
792
907
  "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
908
  ).optional()
794
- }).describe("extensible field").optional()
795
- }).describe("updated section which was moved").optional()
909
+ }).describe("Custom field data for the section.").optional()
910
+ }).describe("Moved section.").optional()
796
911
  });
797
912
  var PublishSectionRequest = z.object({
798
913
  options: z.object({
799
- sectionId: z.string().describe("Section to publish").regex(
914
+ sectionId: z.string().describe("ID of the section to publish.").regex(
800
915
  /^[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
916
  "Must be a valid GUID"
802
917
  ).optional(),
803
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("section revision").optional(),
918
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
804
919
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
805
920
  }).optional()
806
921
  });
807
922
  var PublishSectionResponse = z.object({
808
923
  section: z.object({
809
- _id: z.string().describe("Program Section ID.").regex(
924
+ _id: z.string().describe("Section ID.").regex(
810
925
  /^[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
926
  "Must be a valid GUID"
812
927
  ).optional().nullable(),
813
928
  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"
929
+ "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
930
  ).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(
931
+ _createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
932
+ _updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
933
+ programId: z.string().describe(
934
+ "Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
935
+ ).regex(
819
936
  /^[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
937
  "Must be a valid GUID"
821
938
  ).optional(),
@@ -832,28 +949,34 @@ var PublishSectionResponse = z.object({
832
949
  z.object({ video: z.never().optional(), image: z.string() }),
833
950
  z.object({ image: z.never().optional(), video: z.string() })
834
951
  ])
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(),
952
+ ).describe(
953
+ "Section title and deprecated backward-compatibility content fields."
954
+ ).optional(),
955
+ state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
956
+ oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
957
+ totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
839
958
  trialSection: z.boolean().describe(
840
- "should we open this section as a trial content even though the owning program isn't purchased yet?"
959
+ "Whether participants can access the section as trial content before purchasing the parent program."
960
+ ).optional(),
961
+ ordering: z.number().describe(
962
+ "Position rank used to order sections within a program. To reorder sections, call Move Section."
841
963
  ).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(),
964
+ delayInDays: z.number().int().describe(
965
+ "Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
966
+ ).min(0).max(5e3).optional(),
844
967
  extendedFields: z.object({
845
968
  namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
846
969
  "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
970
  ).optional()
848
- }).describe("extensible field").optional()
849
- }).describe("Published section").optional()
971
+ }).describe("Custom field data for the section.").optional()
972
+ }).describe("Published section.").optional()
850
973
  });
851
974
  // Annotate the CommonJS export names for ESM import in node:
852
975
  0 && (module.exports = {
853
- BulkCreateSectionMigrationRequest,
854
- BulkCreateSectionMigrationResponse,
855
976
  BulkCreateSectionRequest,
856
977
  BulkCreateSectionResponse,
978
+ BulkCreateSectionsRequest,
979
+ BulkCreateSectionsResponse,
857
980
  CloneSectionRequest,
858
981
  CloneSectionResponse,
859
982
  CreateSectionRequest,