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