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