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