@wix/auto_sdk_online-programs_sections 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +61 -31
- package/build/cjs/index.js +47 -26
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +220 -120
- package/build/cjs/index.typings.js +41 -21
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +117 -72
- package/build/cjs/meta.js +35 -18
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +14 -5
- package/build/cjs/schemas.js +335 -212
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +61 -31
- package/build/es/index.mjs +46 -25
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +220 -120
- package/build/es/index.typings.mjs +40 -20
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +117 -72
- package/build/es/meta.mjs +34 -17
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +14 -5
- package/build/es/schemas.mjs +333 -210
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +61 -31
- package/build/internal/cjs/index.js +47 -26
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +220 -120
- package/build/internal/cjs/index.typings.js +41 -21
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +117 -72
- package/build/internal/cjs/meta.js +35 -18
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +14 -5
- package/build/internal/cjs/schemas.js +335 -212
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +61 -31
- package/build/internal/es/index.mjs +46 -25
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +220 -120
- package/build/internal/es/index.typings.mjs +40 -20
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +117 -72
- package/build/internal/es/meta.mjs +34 -17
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +14 -5
- package/build/internal/es/schemas.mjs +333 -210
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/schemas.mjs
CHANGED
|
@@ -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("
|
|
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
|
-
"
|
|
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("
|
|
13
|
-
_updatedDate: z.date().describe("
|
|
14
|
-
programId: z.string().describe(
|
|
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(
|
|
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
|
|
34
|
-
totalSteps: z.number().int().describe("number of
|
|
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
|
-
"
|
|
40
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
37
41
|
).optional(),
|
|
38
|
-
ordering: z.number().describe(
|
|
39
|
-
|
|
42
|
+
ordering: z.number().describe(
|
|
43
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
44
|
+
).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("
|
|
45
|
-
}).describe("Section to
|
|
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("
|
|
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
|
-
"
|
|
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("
|
|
59
|
-
_updatedDate: z.date().describe("
|
|
60
|
-
programId: z.string().describe(
|
|
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(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
"
|
|
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
|
-
|
|
82
|
-
|
|
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("
|
|
103
|
+
}).describe("Custom field data for the section.").optional()
|
|
88
104
|
});
|
|
89
|
-
var
|
|
105
|
+
var BulkCreateSectionsRequest = z.object({
|
|
90
106
|
sections: z.array(
|
|
91
107
|
z.object({
|
|
92
|
-
_id: z.string().describe("
|
|
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
|
-
"
|
|
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("
|
|
100
|
-
_updatedDate: z.date().describe("
|
|
101
|
-
programId: z.string().describe(
|
|
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,27 +133,33 @@ 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(
|
|
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
|
|
121
|
-
totalSteps: z.number().int().describe("number of
|
|
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
|
-
"
|
|
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
|
-
|
|
126
|
-
|
|
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("
|
|
155
|
+
}).describe("Custom field data for the section.").optional()
|
|
132
156
|
})
|
|
133
157
|
).min(1).max(100),
|
|
134
158
|
options: z.object({
|
|
135
159
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
136
160
|
}).optional()
|
|
137
161
|
});
|
|
138
|
-
var
|
|
162
|
+
var BulkCreateSectionsResponse = z.object({
|
|
139
163
|
results: z.array(
|
|
140
164
|
z.object({
|
|
141
165
|
itemMetadata: 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("
|
|
180
|
+
}).describe("Metadata for the bulk operation result.").optional(),
|
|
157
181
|
item: z.object({
|
|
158
|
-
_id: z.string().describe("
|
|
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
|
-
"
|
|
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("
|
|
166
|
-
_updatedDate: z.date().describe("
|
|
167
|
-
programId: z.string().describe(
|
|
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,22 +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(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
210
|
+
).describe(
|
|
211
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
212
|
+
).optional(),
|
|
213
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
214
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
215
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
188
216
|
trialSection: z.boolean().describe(
|
|
189
|
-
"
|
|
217
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
218
|
+
).optional(),
|
|
219
|
+
ordering: z.number().describe(
|
|
220
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
190
221
|
).optional(),
|
|
191
|
-
|
|
192
|
-
|
|
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(),
|
|
193
225
|
extendedFields: z.object({
|
|
194
226
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
195
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)."
|
|
196
228
|
).optional()
|
|
197
|
-
}).describe("
|
|
198
|
-
}).describe("
|
|
199
|
-
action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("
|
|
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()
|
|
200
232
|
})
|
|
201
233
|
).optional(),
|
|
202
234
|
bulkActionMetadata: z.object({
|
|
@@ -205,21 +237,23 @@ var BulkCreateSectionResponse = z.object({
|
|
|
205
237
|
undetailedFailures: z.number().int().describe(
|
|
206
238
|
"Number of failures without details because detailed failure threshold was exceeded."
|
|
207
239
|
).optional()
|
|
208
|
-
}).describe("bulk
|
|
240
|
+
}).describe("Summary of the bulk create operation.").optional()
|
|
209
241
|
});
|
|
210
|
-
var
|
|
242
|
+
var BulkCreateSectionRequest = z.object({
|
|
211
243
|
sections: z.array(
|
|
212
244
|
z.object({
|
|
213
|
-
_id: z.string().describe("
|
|
245
|
+
_id: z.string().describe("Section ID.").regex(
|
|
214
246
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
215
247
|
"Must be a valid GUID"
|
|
216
248
|
).optional().nullable(),
|
|
217
249
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
218
|
-
"
|
|
250
|
+
"Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
|
|
219
251
|
).optional().nullable(),
|
|
220
|
-
_createdDate: z.date().describe("
|
|
221
|
-
_updatedDate: z.date().describe("
|
|
222
|
-
programId: z.string().describe(
|
|
252
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
253
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
254
|
+
programId: z.string().describe(
|
|
255
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
256
|
+
).regex(
|
|
223
257
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
224
258
|
"Must be a valid GUID"
|
|
225
259
|
).optional(),
|
|
@@ -236,24 +270,33 @@ var BulkCreateSectionMigrationRequest = z.object({
|
|
|
236
270
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
237
271
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
238
272
|
])
|
|
239
|
-
).describe(
|
|
273
|
+
).describe(
|
|
274
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
275
|
+
).optional(),
|
|
240
276
|
state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
|
|
241
|
-
oldTotalSteps: z.number().int().describe("number of
|
|
242
|
-
totalSteps: z.number().int().describe("number of
|
|
277
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
278
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
243
279
|
trialSection: z.boolean().describe(
|
|
244
|
-
"
|
|
280
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
281
|
+
).optional(),
|
|
282
|
+
ordering: z.number().describe(
|
|
283
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
245
284
|
).optional(),
|
|
246
|
-
|
|
247
|
-
|
|
285
|
+
delayInDays: z.number().int().describe(
|
|
286
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
287
|
+
).min(0).max(5e3).optional(),
|
|
248
288
|
extendedFields: z.object({
|
|
249
289
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
250
290
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
251
291
|
).optional()
|
|
252
|
-
}).describe("
|
|
292
|
+
}).describe("Custom field data for the section.").optional()
|
|
253
293
|
})
|
|
254
|
-
).min(1).max(100)
|
|
294
|
+
).min(1).max(100),
|
|
295
|
+
options: z.object({
|
|
296
|
+
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
297
|
+
}).optional()
|
|
255
298
|
});
|
|
256
|
-
var
|
|
299
|
+
var BulkCreateSectionResponse = z.object({
|
|
257
300
|
results: z.array(
|
|
258
301
|
z.object({
|
|
259
302
|
itemMetadata: z.object({
|
|
@@ -271,18 +314,20 @@ var BulkCreateSectionMigrationResponse = z.object({
|
|
|
271
314
|
description: z.string().describe("Description of the error.").optional(),
|
|
272
315
|
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
273
316
|
}).describe("Details about the error in case of failure.").optional()
|
|
274
|
-
}).describe("
|
|
317
|
+
}).describe("Metadata for the bulk operation result.").optional(),
|
|
275
318
|
item: z.object({
|
|
276
|
-
_id: z.string().describe("
|
|
319
|
+
_id: z.string().describe("Section ID.").regex(
|
|
277
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}$/,
|
|
278
321
|
"Must be a valid GUID"
|
|
279
322
|
).optional().nullable(),
|
|
280
323
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
281
|
-
"
|
|
324
|
+
"Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
|
|
282
325
|
).optional().nullable(),
|
|
283
|
-
_createdDate: z.date().describe("
|
|
284
|
-
_updatedDate: z.date().describe("
|
|
285
|
-
programId: z.string().describe(
|
|
326
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
327
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
328
|
+
programId: z.string().describe(
|
|
329
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
330
|
+
).regex(
|
|
286
331
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
287
332
|
"Must be a valid GUID"
|
|
288
333
|
).optional(),
|
|
@@ -299,22 +344,28 @@ var BulkCreateSectionMigrationResponse = z.object({
|
|
|
299
344
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
300
345
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
301
346
|
])
|
|
302
|
-
).describe(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
347
|
+
).describe(
|
|
348
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
349
|
+
).optional(),
|
|
350
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
351
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
352
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
306
353
|
trialSection: z.boolean().describe(
|
|
307
|
-
"
|
|
354
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
308
355
|
).optional(),
|
|
309
|
-
ordering: z.number().describe(
|
|
310
|
-
|
|
356
|
+
ordering: z.number().describe(
|
|
357
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
358
|
+
).optional(),
|
|
359
|
+
delayInDays: z.number().int().describe(
|
|
360
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
361
|
+
).min(0).max(5e3).optional(),
|
|
311
362
|
extendedFields: z.object({
|
|
312
363
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
313
364
|
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
314
365
|
).optional()
|
|
315
|
-
}).describe("
|
|
316
|
-
}).describe("
|
|
317
|
-
action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("
|
|
366
|
+
}).describe("Custom field data for the section.").optional()
|
|
367
|
+
}).describe("Created section.").optional(),
|
|
368
|
+
action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
|
|
318
369
|
})
|
|
319
370
|
).optional(),
|
|
320
371
|
bulkActionMetadata: z.object({
|
|
@@ -323,7 +374,7 @@ var BulkCreateSectionMigrationResponse = z.object({
|
|
|
323
374
|
undetailedFailures: z.number().int().describe(
|
|
324
375
|
"Number of failures without details because detailed failure threshold was exceeded."
|
|
325
376
|
).optional()
|
|
326
|
-
}).describe("bulk
|
|
377
|
+
}).describe("Summary of the bulk create operation.").optional()
|
|
327
378
|
});
|
|
328
379
|
var GetSectionRequest = z.object({
|
|
329
380
|
sectionId: z.string().describe("ID of the Section to retrieve.").regex(
|
|
@@ -336,16 +387,18 @@ var GetSectionRequest = z.object({
|
|
|
336
387
|
}).optional()
|
|
337
388
|
});
|
|
338
389
|
var GetSectionResponse = z.object({
|
|
339
|
-
_id: z.string().describe("
|
|
390
|
+
_id: z.string().describe("Section ID.").regex(
|
|
340
391
|
/^[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
392
|
"Must be a valid GUID"
|
|
342
393
|
).optional().nullable(),
|
|
343
394
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
344
|
-
"
|
|
395
|
+
"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
396
|
).optional().nullable(),
|
|
346
|
-
_createdDate: z.date().describe("
|
|
347
|
-
_updatedDate: z.date().describe("
|
|
348
|
-
programId: z.string().describe(
|
|
397
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
398
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
399
|
+
programId: z.string().describe(
|
|
400
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
401
|
+
).regex(
|
|
349
402
|
/^[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
403
|
"Must be a valid GUID"
|
|
351
404
|
).optional(),
|
|
@@ -359,38 +412,46 @@ var GetSectionResponse = z.object({
|
|
|
359
412
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
360
413
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
361
414
|
])
|
|
362
|
-
).describe(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
415
|
+
).describe(
|
|
416
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
417
|
+
).optional(),
|
|
418
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
419
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
420
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
366
421
|
trialSection: z.boolean().describe(
|
|
367
|
-
"
|
|
422
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
423
|
+
).optional(),
|
|
424
|
+
ordering: z.number().describe(
|
|
425
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
368
426
|
).optional(),
|
|
369
|
-
|
|
370
|
-
|
|
427
|
+
delayInDays: z.number().int().describe(
|
|
428
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
429
|
+
).min(0).max(5e3).optional(),
|
|
371
430
|
extendedFields: z.object({
|
|
372
431
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
373
432
|
"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
433
|
).optional()
|
|
375
|
-
}).describe("
|
|
434
|
+
}).describe("Custom field data for the section.").optional()
|
|
376
435
|
});
|
|
377
436
|
var UpdateSectionRequest = z.object({
|
|
378
|
-
_id: z.string().describe("
|
|
437
|
+
_id: z.string().describe("Section ID.").regex(
|
|
379
438
|
/^[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
439
|
"Must be a valid GUID"
|
|
381
440
|
),
|
|
382
441
|
options: z.object({
|
|
383
442
|
section: z.object({
|
|
384
|
-
_id: z.string().describe("
|
|
443
|
+
_id: z.string().describe("Section ID.").regex(
|
|
385
444
|
/^[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
445
|
"Must be a valid GUID"
|
|
387
446
|
).optional().nullable(),
|
|
388
447
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
389
|
-
"
|
|
448
|
+
"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
449
|
),
|
|
391
|
-
_createdDate: z.date().describe("
|
|
392
|
-
_updatedDate: z.date().describe("
|
|
393
|
-
programId: z.string().describe(
|
|
450
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
451
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
452
|
+
programId: z.string().describe(
|
|
453
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
454
|
+
).regex(
|
|
394
455
|
/^[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
456
|
"Must be a valid GUID"
|
|
396
457
|
).optional(),
|
|
@@ -407,35 +468,45 @@ var UpdateSectionRequest = z.object({
|
|
|
407
468
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
408
469
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
409
470
|
])
|
|
410
|
-
).describe(
|
|
471
|
+
).describe(
|
|
472
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
473
|
+
).optional(),
|
|
411
474
|
state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
|
|
412
|
-
oldTotalSteps: z.number().int().describe("number of
|
|
413
|
-
totalSteps: z.number().int().describe("number of
|
|
475
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
476
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
414
477
|
trialSection: z.boolean().describe(
|
|
415
|
-
"
|
|
478
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
479
|
+
).optional(),
|
|
480
|
+
ordering: z.number().describe(
|
|
481
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
416
482
|
).optional(),
|
|
417
|
-
|
|
418
|
-
|
|
483
|
+
delayInDays: z.number().int().describe(
|
|
484
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
485
|
+
).min(0).max(5e3).optional(),
|
|
419
486
|
extendedFields: z.object({
|
|
420
487
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
421
488
|
"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
489
|
).optional()
|
|
423
|
-
}).describe("
|
|
424
|
-
}).describe(
|
|
490
|
+
}).describe("Custom field data for the section.").optional()
|
|
491
|
+
}).describe(
|
|
492
|
+
"Section to update. Include `section.id`, `section.revision`, and the fields to update."
|
|
493
|
+
).optional(),
|
|
425
494
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
426
495
|
}).optional()
|
|
427
496
|
});
|
|
428
497
|
var UpdateSectionResponse = z.object({
|
|
429
|
-
_id: z.string().describe("
|
|
498
|
+
_id: z.string().describe("Section ID.").regex(
|
|
430
499
|
/^[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
500
|
"Must be a valid GUID"
|
|
432
501
|
).optional().nullable(),
|
|
433
502
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
434
|
-
"
|
|
503
|
+
"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
504
|
).optional().nullable(),
|
|
436
|
-
_createdDate: z.date().describe("
|
|
437
|
-
_updatedDate: z.date().describe("
|
|
438
|
-
programId: z.string().describe(
|
|
505
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
506
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
507
|
+
programId: z.string().describe(
|
|
508
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
509
|
+
).regex(
|
|
439
510
|
/^[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
511
|
"Must be a valid GUID"
|
|
441
512
|
).optional(),
|
|
@@ -449,23 +520,29 @@ var UpdateSectionResponse = z.object({
|
|
|
449
520
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
450
521
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
451
522
|
])
|
|
452
|
-
).describe(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
523
|
+
).describe(
|
|
524
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
525
|
+
).optional(),
|
|
526
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
527
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
528
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
456
529
|
trialSection: z.boolean().describe(
|
|
457
|
-
"
|
|
530
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
531
|
+
).optional(),
|
|
532
|
+
ordering: z.number().describe(
|
|
533
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
458
534
|
).optional(),
|
|
459
|
-
|
|
460
|
-
|
|
535
|
+
delayInDays: z.number().int().describe(
|
|
536
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
537
|
+
).min(0).max(5e3).optional(),
|
|
461
538
|
extendedFields: z.object({
|
|
462
539
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
463
540
|
"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
541
|
).optional()
|
|
465
|
-
}).describe("
|
|
542
|
+
}).describe("Custom field data for the section.").optional()
|
|
466
543
|
});
|
|
467
544
|
var DeleteSectionRequest = z.object({
|
|
468
|
-
sectionId: z.string().describe("
|
|
545
|
+
sectionId: z.string().describe("ID of the section to delete.").regex(
|
|
469
546
|
/^[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
547
|
"Must be a valid GUID"
|
|
471
548
|
)
|
|
@@ -480,7 +557,13 @@ var QuerySectionsRequest = z.object({
|
|
|
480
557
|
sort: z.array(
|
|
481
558
|
z.object({
|
|
482
559
|
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
483
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
560
|
+
order: z.enum(["ASC", "DESC"]).optional(),
|
|
561
|
+
origin: z.object({
|
|
562
|
+
latitude: z.number().describe("Address latitude.").optional().nullable(),
|
|
563
|
+
longitude: z.number().describe("Address longitude.").optional().nullable()
|
|
564
|
+
}).describe(
|
|
565
|
+
"Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
|
|
566
|
+
).optional()
|
|
484
567
|
})
|
|
485
568
|
).max(5).optional()
|
|
486
569
|
}),
|
|
@@ -501,7 +584,7 @@ var QuerySectionsRequest = z.object({
|
|
|
501
584
|
options: z.object({
|
|
502
585
|
descriptionFieldSet: z.enum(["STANDARD", "EXTENDED"]).optional(),
|
|
503
586
|
programId: z.string().describe(
|
|
504
|
-
"Program
|
|
587
|
+
"Deprecated. Program ID used to scope the query. Use `query.filter` instead."
|
|
505
588
|
).optional(),
|
|
506
589
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
507
590
|
}).optional()
|
|
@@ -509,16 +592,18 @@ var QuerySectionsRequest = z.object({
|
|
|
509
592
|
var QuerySectionsResponse = z.object({
|
|
510
593
|
sections: z.array(
|
|
511
594
|
z.object({
|
|
512
|
-
_id: z.string().describe("
|
|
595
|
+
_id: z.string().describe("Section ID.").regex(
|
|
513
596
|
/^[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
597
|
"Must be a valid GUID"
|
|
515
598
|
).optional().nullable(),
|
|
516
599
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
517
|
-
"
|
|
600
|
+
"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
601
|
).optional().nullable(),
|
|
519
|
-
_createdDate: z.date().describe("
|
|
520
|
-
_updatedDate: z.date().describe("
|
|
521
|
-
programId: z.string().describe(
|
|
602
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
603
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
604
|
+
programId: z.string().describe(
|
|
605
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
606
|
+
).regex(
|
|
522
607
|
/^[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
608
|
"Must be a valid GUID"
|
|
524
609
|
).optional(),
|
|
@@ -535,20 +620,26 @@ var QuerySectionsResponse = z.object({
|
|
|
535
620
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
536
621
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
537
622
|
])
|
|
538
|
-
).describe(
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
623
|
+
).describe(
|
|
624
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
625
|
+
).optional(),
|
|
626
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
627
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
628
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
542
629
|
trialSection: z.boolean().describe(
|
|
543
|
-
"
|
|
630
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
631
|
+
).optional(),
|
|
632
|
+
ordering: z.number().describe(
|
|
633
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
544
634
|
).optional(),
|
|
545
|
-
|
|
546
|
-
|
|
635
|
+
delayInDays: z.number().int().describe(
|
|
636
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
637
|
+
).min(0).max(5e3).optional(),
|
|
547
638
|
extendedFields: z.object({
|
|
548
639
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
549
640
|
"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
641
|
).optional()
|
|
551
|
-
}).describe("
|
|
642
|
+
}).describe("Custom field data for the section.").optional()
|
|
552
643
|
})
|
|
553
644
|
).optional(),
|
|
554
645
|
pagingMetadata: z.object({
|
|
@@ -566,10 +657,10 @@ var QuerySectionsResponse = z.object({
|
|
|
566
657
|
hasNext: z.boolean().describe(
|
|
567
658
|
"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
659
|
).optional().nullable()
|
|
569
|
-
}).describe("Paging metadata").optional()
|
|
660
|
+
}).describe("Paging metadata.").optional()
|
|
570
661
|
});
|
|
571
662
|
var ListSectionsRequest = z.object({
|
|
572
|
-
programId: z.string().describe("Program
|
|
663
|
+
programId: z.string().describe("Program ID to list sections for.").regex(
|
|
573
664
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
574
665
|
"Must be a valid GUID"
|
|
575
666
|
),
|
|
@@ -581,16 +672,18 @@ var ListSectionsRequest = z.object({
|
|
|
581
672
|
var ListSectionsResponse = z.object({
|
|
582
673
|
sections: z.array(
|
|
583
674
|
z.object({
|
|
584
|
-
_id: z.string().describe("
|
|
675
|
+
_id: z.string().describe("Section ID.").regex(
|
|
585
676
|
/^[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
677
|
"Must be a valid GUID"
|
|
587
678
|
).optional().nullable(),
|
|
588
679
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
589
|
-
"
|
|
680
|
+
"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
681
|
).optional().nullable(),
|
|
591
|
-
_createdDate: z.date().describe("
|
|
592
|
-
_updatedDate: z.date().describe("
|
|
593
|
-
programId: z.string().describe(
|
|
682
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
683
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
684
|
+
programId: z.string().describe(
|
|
685
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
686
|
+
).regex(
|
|
594
687
|
/^[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
688
|
"Must be a valid GUID"
|
|
596
689
|
).optional(),
|
|
@@ -607,25 +700,31 @@ var ListSectionsResponse = z.object({
|
|
|
607
700
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
608
701
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
609
702
|
])
|
|
610
|
-
).describe(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
703
|
+
).describe(
|
|
704
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
705
|
+
).optional(),
|
|
706
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
707
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
708
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
614
709
|
trialSection: z.boolean().describe(
|
|
615
|
-
"
|
|
710
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
711
|
+
).optional(),
|
|
712
|
+
ordering: z.number().describe(
|
|
713
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
616
714
|
).optional(),
|
|
617
|
-
|
|
618
|
-
|
|
715
|
+
delayInDays: z.number().int().describe(
|
|
716
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
717
|
+
).min(0).max(5e3).optional(),
|
|
619
718
|
extendedFields: z.object({
|
|
620
719
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
621
720
|
"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
721
|
).optional()
|
|
623
|
-
}).describe("
|
|
722
|
+
}).describe("Custom field data for the section.").optional()
|
|
624
723
|
})
|
|
625
724
|
).max(1e3).optional()
|
|
626
725
|
});
|
|
627
726
|
var CloneSectionRequest = z.object({
|
|
628
|
-
sectionId: z.string().describe("
|
|
727
|
+
sectionId: z.string().describe("ID of the section to clone.").regex(
|
|
629
728
|
/^[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
729
|
"Must be a valid GUID"
|
|
631
730
|
),
|
|
@@ -635,16 +734,18 @@ var CloneSectionRequest = z.object({
|
|
|
635
734
|
});
|
|
636
735
|
var CloneSectionResponse = z.object({
|
|
637
736
|
section: z.object({
|
|
638
|
-
_id: z.string().describe("
|
|
737
|
+
_id: z.string().describe("Section ID.").regex(
|
|
639
738
|
/^[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
739
|
"Must be a valid GUID"
|
|
641
740
|
).optional().nullable(),
|
|
642
741
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
643
|
-
"
|
|
742
|
+
"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
743
|
).optional().nullable(),
|
|
645
|
-
_createdDate: z.date().describe("
|
|
646
|
-
_updatedDate: z.date().describe("
|
|
647
|
-
programId: z.string().describe(
|
|
744
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
745
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
746
|
+
programId: z.string().describe(
|
|
747
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
748
|
+
).regex(
|
|
648
749
|
/^[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
750
|
"Must be a valid GUID"
|
|
650
751
|
).optional(),
|
|
@@ -661,50 +762,58 @@ var CloneSectionResponse = z.object({
|
|
|
661
762
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
662
763
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
663
764
|
])
|
|
664
|
-
).describe(
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
765
|
+
).describe(
|
|
766
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
767
|
+
).optional(),
|
|
768
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
769
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
770
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
668
771
|
trialSection: z.boolean().describe(
|
|
669
|
-
"
|
|
772
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
773
|
+
).optional(),
|
|
774
|
+
ordering: z.number().describe(
|
|
775
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
670
776
|
).optional(),
|
|
671
|
-
|
|
672
|
-
|
|
777
|
+
delayInDays: z.number().int().describe(
|
|
778
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
779
|
+
).min(0).max(5e3).optional(),
|
|
673
780
|
extendedFields: z.object({
|
|
674
781
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
675
782
|
"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
783
|
).optional()
|
|
677
|
-
}).describe("
|
|
678
|
-
}).describe("
|
|
784
|
+
}).describe("Custom field data for the section.").optional()
|
|
785
|
+
}).describe("Cloned section.").optional()
|
|
679
786
|
});
|
|
680
787
|
var MoveSectionRequest = z.object({
|
|
681
788
|
options: z.object({
|
|
682
|
-
sectionId: z.string().describe("
|
|
789
|
+
sectionId: z.string().describe("ID of the section to move.").regex(
|
|
683
790
|
/^[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
791
|
"Must be a valid GUID"
|
|
685
792
|
).optional(),
|
|
686
793
|
afterSectionId: z.string().describe(
|
|
687
|
-
|
|
794
|
+
"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
795
|
).regex(
|
|
689
796
|
/^[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
797
|
"Must be a valid GUID"
|
|
691
798
|
).optional().nullable(),
|
|
692
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("
|
|
799
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
|
|
693
800
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
694
801
|
}).optional()
|
|
695
802
|
});
|
|
696
803
|
var MoveSectionResponse = z.object({
|
|
697
804
|
section: z.object({
|
|
698
|
-
_id: z.string().describe("
|
|
805
|
+
_id: z.string().describe("Section ID.").regex(
|
|
699
806
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
700
807
|
"Must be a valid GUID"
|
|
701
808
|
).optional().nullable(),
|
|
702
809
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
703
|
-
"
|
|
810
|
+
"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
811
|
).optional().nullable(),
|
|
705
|
-
_createdDate: z.date().describe("
|
|
706
|
-
_updatedDate: z.date().describe("
|
|
707
|
-
programId: z.string().describe(
|
|
812
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
813
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
814
|
+
programId: z.string().describe(
|
|
815
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
816
|
+
).regex(
|
|
708
817
|
/^[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
818
|
"Must be a valid GUID"
|
|
710
819
|
).optional(),
|
|
@@ -721,44 +830,52 @@ var MoveSectionResponse = z.object({
|
|
|
721
830
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
722
831
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
723
832
|
])
|
|
724
|
-
).describe(
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
833
|
+
).describe(
|
|
834
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
835
|
+
).optional(),
|
|
836
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
837
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
838
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
728
839
|
trialSection: z.boolean().describe(
|
|
729
|
-
"
|
|
840
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
730
841
|
).optional(),
|
|
731
|
-
ordering: z.number().describe(
|
|
732
|
-
|
|
842
|
+
ordering: z.number().describe(
|
|
843
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
844
|
+
).optional(),
|
|
845
|
+
delayInDays: z.number().int().describe(
|
|
846
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
847
|
+
).min(0).max(5e3).optional(),
|
|
733
848
|
extendedFields: z.object({
|
|
734
849
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
735
850
|
"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
851
|
).optional()
|
|
737
|
-
}).describe("
|
|
738
|
-
}).describe("
|
|
852
|
+
}).describe("Custom field data for the section.").optional()
|
|
853
|
+
}).describe("Moved section.").optional()
|
|
739
854
|
});
|
|
740
855
|
var PublishSectionRequest = z.object({
|
|
741
856
|
options: z.object({
|
|
742
|
-
sectionId: z.string().describe("
|
|
857
|
+
sectionId: z.string().describe("ID of the section to publish.").regex(
|
|
743
858
|
/^[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
859
|
"Must be a valid GUID"
|
|
745
860
|
).optional(),
|
|
746
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("
|
|
861
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Current revision of the section.").optional(),
|
|
747
862
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
748
863
|
}).optional()
|
|
749
864
|
});
|
|
750
865
|
var PublishSectionResponse = z.object({
|
|
751
866
|
section: z.object({
|
|
752
|
-
_id: z.string().describe("
|
|
867
|
+
_id: z.string().describe("Section ID.").regex(
|
|
753
868
|
/^[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
869
|
"Must be a valid GUID"
|
|
755
870
|
).optional().nullable(),
|
|
756
871
|
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
757
|
-
"
|
|
872
|
+
"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
873
|
).optional().nullable(),
|
|
759
|
-
_createdDate: z.date().describe("
|
|
760
|
-
_updatedDate: z.date().describe("
|
|
761
|
-
programId: z.string().describe(
|
|
874
|
+
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
875
|
+
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
876
|
+
programId: z.string().describe(
|
|
877
|
+
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
878
|
+
).regex(
|
|
762
879
|
/^[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
880
|
"Must be a valid GUID"
|
|
764
881
|
).optional(),
|
|
@@ -775,27 +892,33 @@ var PublishSectionResponse = z.object({
|
|
|
775
892
|
z.object({ video: z.never().optional(), image: z.string() }),
|
|
776
893
|
z.object({ image: z.never().optional(), video: z.string() })
|
|
777
894
|
])
|
|
778
|
-
).describe(
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
895
|
+
).describe(
|
|
896
|
+
"Section title and deprecated backward-compatibility content fields."
|
|
897
|
+
).optional(),
|
|
898
|
+
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
899
|
+
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
900
|
+
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
782
901
|
trialSection: z.boolean().describe(
|
|
783
|
-
"
|
|
902
|
+
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
903
|
+
).optional(),
|
|
904
|
+
ordering: z.number().describe(
|
|
905
|
+
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
784
906
|
).optional(),
|
|
785
|
-
|
|
786
|
-
|
|
907
|
+
delayInDays: z.number().int().describe(
|
|
908
|
+
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
909
|
+
).min(0).max(5e3).optional(),
|
|
787
910
|
extendedFields: z.object({
|
|
788
911
|
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
789
912
|
"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
913
|
).optional()
|
|
791
|
-
}).describe("
|
|
792
|
-
}).describe("Published section").optional()
|
|
914
|
+
}).describe("Custom field data for the section.").optional()
|
|
915
|
+
}).describe("Published section.").optional()
|
|
793
916
|
});
|
|
794
917
|
export {
|
|
795
|
-
BulkCreateSectionMigrationRequest,
|
|
796
|
-
BulkCreateSectionMigrationResponse,
|
|
797
918
|
BulkCreateSectionRequest,
|
|
798
919
|
BulkCreateSectionResponse,
|
|
920
|
+
BulkCreateSectionsRequest,
|
|
921
|
+
BulkCreateSectionsResponse,
|
|
799
922
|
CloneSectionRequest,
|
|
800
923
|
CloneSectionResponse,
|
|
801
924
|
CreateSectionRequest,
|