@wix/auto_sdk_online-programs_sections 1.0.15 → 1.0.17
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 +6 -16
- package/build/cjs/index.js +2 -153
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -40
- package/build/cjs/index.typings.js +1 -143
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -7
- package/build/cjs/meta.js +0 -109
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +1 -129
- package/build/cjs/schemas.js +23 -212
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +6 -16
- package/build/es/index.mjs +2 -152
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -40
- package/build/es/index.typings.mjs +1 -142
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +4 -7
- package/build/es/meta.mjs +0 -108
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +1 -129
- package/build/es/schemas.mjs +23 -210
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +6 -16
- package/build/internal/cjs/index.js +2 -153
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +114 -39
- package/build/internal/cjs/index.typings.js +1 -143
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +210 -6
- package/build/internal/cjs/meta.js +0 -109
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +1 -129
- package/build/internal/cjs/schemas.js +23 -212
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +6 -16
- package/build/internal/es/index.mjs +2 -152
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +114 -39
- package/build/internal/es/index.typings.mjs +1 -142
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +210 -6
- package/build/internal/es/meta.mjs +0 -108
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +1 -129
- package/build/internal/es/schemas.mjs +23 -210
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -122,134 +122,6 @@ declare const BulkCreateSectionsResponse: z.ZodObject<{
|
|
|
122
122
|
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
123
123
|
}, z.core.$strip>>;
|
|
124
124
|
}, z.core.$strip>>;
|
|
125
|
-
item: z.ZodOptional<z.ZodObject<{
|
|
126
|
-
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
127
|
-
revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
128
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
129
|
-
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
130
|
-
programId: z.ZodOptional<z.ZodString>;
|
|
131
|
-
description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
132
|
-
title: z.ZodOptional<z.ZodString>;
|
|
133
|
-
details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
134
|
-
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
135
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
136
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
137
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
139
|
-
image: z.ZodString;
|
|
140
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
142
|
-
video: z.ZodString;
|
|
143
|
-
}, z.core.$strip>]>>>;
|
|
144
|
-
state: z.ZodOptional<z.ZodEnum<{
|
|
145
|
-
DRAFT: "DRAFT";
|
|
146
|
-
PUBLISHED: "PUBLISHED";
|
|
147
|
-
}>>;
|
|
148
|
-
oldTotalSteps: z.ZodOptional<z.ZodNumber>;
|
|
149
|
-
totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
150
|
-
trialSection: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
-
ordering: z.ZodOptional<z.ZodNumber>;
|
|
152
|
-
delayInDays: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
extendedFields: z.ZodOptional<z.ZodObject<{
|
|
154
|
-
namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
155
|
-
}, z.core.$strip>>;
|
|
156
|
-
}, z.core.$strip>>;
|
|
157
|
-
action: z.ZodOptional<z.ZodEnum<{
|
|
158
|
-
DELETE: "DELETE";
|
|
159
|
-
UNKNOWN_ACTION_TYPE: "UNKNOWN_ACTION_TYPE";
|
|
160
|
-
INSERT: "INSERT";
|
|
161
|
-
UPDATE: "UPDATE";
|
|
162
|
-
}>>;
|
|
163
|
-
}, z.core.$strip>>>;
|
|
164
|
-
bulkActionMetadata: z.ZodOptional<z.ZodObject<{
|
|
165
|
-
totalSuccesses: z.ZodOptional<z.ZodNumber>;
|
|
166
|
-
totalFailures: z.ZodOptional<z.ZodNumber>;
|
|
167
|
-
undetailedFailures: z.ZodOptional<z.ZodNumber>;
|
|
168
|
-
}, z.core.$strip>>;
|
|
169
|
-
}, z.core.$strip>;
|
|
170
|
-
declare const BulkCreateSectionRequest: z.ZodObject<{
|
|
171
|
-
sections: z.ZodArray<z.ZodObject<{
|
|
172
|
-
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
173
|
-
revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
174
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
175
|
-
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
176
|
-
programId: z.ZodOptional<z.ZodString>;
|
|
177
|
-
description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
178
|
-
title: z.ZodOptional<z.ZodString>;
|
|
179
|
-
details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
180
|
-
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
181
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
182
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
183
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
185
|
-
image: z.ZodString;
|
|
186
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
188
|
-
video: z.ZodString;
|
|
189
|
-
}, z.core.$strip>]>>>;
|
|
190
|
-
state: z.ZodOptional<z.ZodEnum<{
|
|
191
|
-
DRAFT: "DRAFT";
|
|
192
|
-
PUBLISHED: "PUBLISHED";
|
|
193
|
-
}>>;
|
|
194
|
-
oldTotalSteps: z.ZodOptional<z.ZodNumber>;
|
|
195
|
-
totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
196
|
-
trialSection: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
-
ordering: z.ZodOptional<z.ZodNumber>;
|
|
198
|
-
delayInDays: z.ZodOptional<z.ZodNumber>;
|
|
199
|
-
extendedFields: z.ZodOptional<z.ZodObject<{
|
|
200
|
-
namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
201
|
-
}, z.core.$strip>>;
|
|
202
|
-
}, z.core.$strip>>;
|
|
203
|
-
options: z.ZodOptional<z.ZodObject<{
|
|
204
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
205
|
-
TOTAL_STEPS: "TOTAL_STEPS";
|
|
206
|
-
}>>>;
|
|
207
|
-
}, z.core.$strip>>;
|
|
208
|
-
}, z.core.$strip>;
|
|
209
|
-
declare const BulkCreateSectionResponse: z.ZodObject<{
|
|
210
|
-
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
-
itemMetadata: z.ZodOptional<z.ZodObject<{
|
|
212
|
-
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
213
|
-
originalIndex: z.ZodOptional<z.ZodNumber>;
|
|
214
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
216
|
-
code: z.ZodOptional<z.ZodString>;
|
|
217
|
-
description: z.ZodOptional<z.ZodString>;
|
|
218
|
-
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
219
|
-
}, z.core.$strip>>;
|
|
220
|
-
}, z.core.$strip>>;
|
|
221
|
-
item: z.ZodOptional<z.ZodObject<{
|
|
222
|
-
_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
223
|
-
revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
224
|
-
_createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
225
|
-
_updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
226
|
-
programId: z.ZodOptional<z.ZodString>;
|
|
227
|
-
description: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
228
|
-
title: z.ZodOptional<z.ZodString>;
|
|
229
|
-
details: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
230
|
-
}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
231
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
232
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
233
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
-
video: z.ZodOptional<z.ZodNever>;
|
|
235
|
-
image: z.ZodString;
|
|
236
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
-
image: z.ZodOptional<z.ZodNever>;
|
|
238
|
-
video: z.ZodString;
|
|
239
|
-
}, z.core.$strip>]>>>;
|
|
240
|
-
state: z.ZodOptional<z.ZodEnum<{
|
|
241
|
-
DRAFT: "DRAFT";
|
|
242
|
-
PUBLISHED: "PUBLISHED";
|
|
243
|
-
}>>;
|
|
244
|
-
oldTotalSteps: z.ZodOptional<z.ZodNumber>;
|
|
245
|
-
totalSteps: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
246
|
-
trialSection: z.ZodOptional<z.ZodBoolean>;
|
|
247
|
-
ordering: z.ZodOptional<z.ZodNumber>;
|
|
248
|
-
delayInDays: z.ZodOptional<z.ZodNumber>;
|
|
249
|
-
extendedFields: z.ZodOptional<z.ZodObject<{
|
|
250
|
-
namespaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
251
|
-
}, z.core.$strip>>;
|
|
252
|
-
}, z.core.$strip>>;
|
|
253
125
|
action: z.ZodOptional<z.ZodEnum<{
|
|
254
126
|
DELETE: "DELETE";
|
|
255
127
|
UNKNOWN_ACTION_TYPE: "UNKNOWN_ACTION_TYPE";
|
|
@@ -634,4 +506,4 @@ declare const PublishSectionResponse: z.ZodObject<{
|
|
|
634
506
|
}, z.core.$strip>>;
|
|
635
507
|
}, z.core.$strip>;
|
|
636
508
|
|
|
637
|
-
export {
|
|
509
|
+
export { BulkCreateSectionsRequest, BulkCreateSectionsResponse, CloneSectionRequest, CloneSectionResponse, CreateSectionRequest, CreateSectionResponse, DeleteSectionRequest, DeleteSectionResponse, GetSectionRequest, GetSectionResponse, ListSectionsRequest, ListSectionsResponse, MoveSectionRequest, MoveSectionResponse, PublishSectionRequest, PublishSectionResponse, QuerySectionsRequest, QuerySectionsResponse, UpdateSectionRequest, UpdateSectionResponse };
|
|
@@ -30,8 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// schemas.ts
|
|
31
31
|
var schemas_exports = {};
|
|
32
32
|
__export(schemas_exports, {
|
|
33
|
-
BulkCreateSectionRequest: () => BulkCreateSectionRequest,
|
|
34
|
-
BulkCreateSectionResponse: () => BulkCreateSectionResponse,
|
|
35
33
|
BulkCreateSectionsRequest: () => BulkCreateSectionsRequest,
|
|
36
34
|
BulkCreateSectionsResponse: () => BulkCreateSectionsResponse,
|
|
37
35
|
CloneSectionRequest: () => CloneSectionRequest,
|
|
@@ -57,7 +55,7 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
57
55
|
|
|
58
56
|
// src/online-programs-v3-section-sections.schemas.ts
|
|
59
57
|
var z = __toESM(require("zod"));
|
|
60
|
-
var CreateSectionRequest = z.object({
|
|
58
|
+
var CreateSectionRequest = /* @__PURE__ */ z.object({
|
|
61
59
|
section: z.object({
|
|
62
60
|
_id: z.string().describe("Section ID.").regex(
|
|
63
61
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -112,7 +110,7 @@ var CreateSectionRequest = z.object({
|
|
|
112
110
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
113
111
|
}).optional()
|
|
114
112
|
});
|
|
115
|
-
var CreateSectionResponse = z.object({
|
|
113
|
+
var CreateSectionResponse = /* @__PURE__ */ z.object({
|
|
116
114
|
_id: z.string().describe("Section ID.").regex(
|
|
117
115
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
118
116
|
"Must be a valid GUID"
|
|
@@ -159,7 +157,7 @@ var CreateSectionResponse = z.object({
|
|
|
159
157
|
).optional()
|
|
160
158
|
}).describe("Custom field data for the section.").optional()
|
|
161
159
|
});
|
|
162
|
-
var BulkCreateSectionsRequest = z.object({
|
|
160
|
+
var BulkCreateSectionsRequest = /* @__PURE__ */ z.object({
|
|
163
161
|
sections: z.array(
|
|
164
162
|
z.object({
|
|
165
163
|
_id: z.string().describe("Section ID.").regex(
|
|
@@ -216,7 +214,7 @@ var BulkCreateSectionsRequest = z.object({
|
|
|
216
214
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
217
215
|
}).optional()
|
|
218
216
|
});
|
|
219
|
-
var BulkCreateSectionsResponse = z.object({
|
|
217
|
+
var BulkCreateSectionsResponse = /* @__PURE__ */ z.object({
|
|
220
218
|
results: z.array(
|
|
221
219
|
z.object({
|
|
222
220
|
itemMetadata: z.object({
|
|
@@ -235,193 +233,6 @@ var BulkCreateSectionsResponse = z.object({
|
|
|
235
233
|
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
236
234
|
}).describe("Details about the error in case of failure.").optional()
|
|
237
235
|
}).describe("Metadata for the bulk operation result.").optional(),
|
|
238
|
-
item: z.object({
|
|
239
|
-
_id: z.string().describe("Section ID.").regex(
|
|
240
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
241
|
-
"Must be a valid GUID"
|
|
242
|
-
).optional().nullable(),
|
|
243
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
244
|
-
"Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
|
|
245
|
-
).optional().nullable(),
|
|
246
|
-
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
247
|
-
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
248
|
-
programId: z.string().describe(
|
|
249
|
-
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
250
|
-
).regex(
|
|
251
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
252
|
-
"Must be a valid GUID"
|
|
253
|
-
).optional(),
|
|
254
|
-
description: z.intersection(
|
|
255
|
-
z.object({
|
|
256
|
-
title: z.string().max(500).optional(),
|
|
257
|
-
details: z.string().max(1e7).optional().nullable()
|
|
258
|
-
}),
|
|
259
|
-
z.xor([
|
|
260
|
-
z.object({
|
|
261
|
-
image: z.never().optional(),
|
|
262
|
-
video: z.never().optional()
|
|
263
|
-
}),
|
|
264
|
-
z.object({ video: z.never().optional(), image: z.string() }),
|
|
265
|
-
z.object({ image: z.never().optional(), video: z.string() })
|
|
266
|
-
])
|
|
267
|
-
).describe(
|
|
268
|
-
"Section title and deprecated backward-compatibility content fields."
|
|
269
|
-
).optional(),
|
|
270
|
-
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
271
|
-
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
272
|
-
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
273
|
-
trialSection: z.boolean().describe(
|
|
274
|
-
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
275
|
-
).optional(),
|
|
276
|
-
ordering: z.number().describe(
|
|
277
|
-
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
278
|
-
).optional(),
|
|
279
|
-
delayInDays: z.number().int().describe(
|
|
280
|
-
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
281
|
-
).min(0).max(5e3).optional(),
|
|
282
|
-
extendedFields: z.object({
|
|
283
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
284
|
-
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
285
|
-
).optional()
|
|
286
|
-
}).describe("Custom field data for the section.").optional()
|
|
287
|
-
}).describe("Created section.").optional(),
|
|
288
|
-
action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
|
|
289
|
-
})
|
|
290
|
-
).optional(),
|
|
291
|
-
bulkActionMetadata: z.object({
|
|
292
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
293
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
294
|
-
undetailedFailures: z.number().int().describe(
|
|
295
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
296
|
-
).optional()
|
|
297
|
-
}).describe("Summary of the bulk create operation.").optional()
|
|
298
|
-
});
|
|
299
|
-
var BulkCreateSectionRequest = z.object({
|
|
300
|
-
sections: z.array(
|
|
301
|
-
z.object({
|
|
302
|
-
_id: z.string().describe("Section ID.").regex(
|
|
303
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
304
|
-
"Must be a valid GUID"
|
|
305
|
-
).optional().nullable(),
|
|
306
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
307
|
-
"Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
|
|
308
|
-
).optional().nullable(),
|
|
309
|
-
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
310
|
-
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
311
|
-
programId: z.string().describe(
|
|
312
|
-
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
313
|
-
).regex(
|
|
314
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
315
|
-
"Must be a valid GUID"
|
|
316
|
-
).optional(),
|
|
317
|
-
description: z.intersection(
|
|
318
|
-
z.object({
|
|
319
|
-
title: z.string().max(500).optional(),
|
|
320
|
-
details: z.string().max(1e7).optional().nullable()
|
|
321
|
-
}),
|
|
322
|
-
z.xor([
|
|
323
|
-
z.object({
|
|
324
|
-
image: z.never().optional(),
|
|
325
|
-
video: z.never().optional()
|
|
326
|
-
}),
|
|
327
|
-
z.object({ video: z.never().optional(), image: z.string() }),
|
|
328
|
-
z.object({ image: z.never().optional(), video: z.string() })
|
|
329
|
-
])
|
|
330
|
-
).describe(
|
|
331
|
-
"Section title and deprecated backward-compatibility content fields."
|
|
332
|
-
).optional(),
|
|
333
|
-
state: z.enum(["DRAFT", "PUBLISHED"]).optional(),
|
|
334
|
-
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
335
|
-
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
336
|
-
trialSection: z.boolean().describe(
|
|
337
|
-
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
338
|
-
).optional(),
|
|
339
|
-
ordering: z.number().describe(
|
|
340
|
-
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
341
|
-
).optional(),
|
|
342
|
-
delayInDays: z.number().int().describe(
|
|
343
|
-
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
344
|
-
).min(0).max(5e3).optional(),
|
|
345
|
-
extendedFields: z.object({
|
|
346
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
347
|
-
"Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
|
|
348
|
-
).optional()
|
|
349
|
-
}).describe("Custom field data for the section.").optional()
|
|
350
|
-
})
|
|
351
|
-
).min(1).max(100),
|
|
352
|
-
options: z.object({
|
|
353
|
-
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
354
|
-
}).optional()
|
|
355
|
-
});
|
|
356
|
-
var BulkCreateSectionResponse = z.object({
|
|
357
|
-
results: z.array(
|
|
358
|
-
z.object({
|
|
359
|
-
itemMetadata: z.object({
|
|
360
|
-
_id: z.string().describe(
|
|
361
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
362
|
-
).optional().nullable(),
|
|
363
|
-
originalIndex: z.number().int().describe(
|
|
364
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
365
|
-
).optional(),
|
|
366
|
-
success: z.boolean().describe(
|
|
367
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
368
|
-
).optional(),
|
|
369
|
-
error: z.object({
|
|
370
|
-
code: z.string().describe("Error code.").optional(),
|
|
371
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
372
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
373
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
374
|
-
}).describe("Metadata for the bulk operation result.").optional(),
|
|
375
|
-
item: z.object({
|
|
376
|
-
_id: z.string().describe("Section ID.").regex(
|
|
377
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
378
|
-
"Must be a valid GUID"
|
|
379
|
-
).optional().nullable(),
|
|
380
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
381
|
-
"Revision number, which increments by 1 each time the section is updated. To prevent conflicting changes, the current `revision` must be passed when updating or publishing the section."
|
|
382
|
-
).optional().nullable(),
|
|
383
|
-
_createdDate: z.date().describe("Date and time the section was created.").optional().nullable(),
|
|
384
|
-
_updatedDate: z.date().describe("Date and time the section was last updated.").optional().nullable(),
|
|
385
|
-
programId: z.string().describe(
|
|
386
|
-
"Program ID of the parent program. Provide it when creating a section. After creation, this value can't be changed."
|
|
387
|
-
).regex(
|
|
388
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
389
|
-
"Must be a valid GUID"
|
|
390
|
-
).optional(),
|
|
391
|
-
description: z.intersection(
|
|
392
|
-
z.object({
|
|
393
|
-
title: z.string().max(500).optional(),
|
|
394
|
-
details: z.string().max(1e7).optional().nullable()
|
|
395
|
-
}),
|
|
396
|
-
z.xor([
|
|
397
|
-
z.object({
|
|
398
|
-
image: z.never().optional(),
|
|
399
|
-
video: z.never().optional()
|
|
400
|
-
}),
|
|
401
|
-
z.object({ video: z.never().optional(), image: z.string() }),
|
|
402
|
-
z.object({ image: z.never().optional(), video: z.string() })
|
|
403
|
-
])
|
|
404
|
-
).describe(
|
|
405
|
-
"Section title and deprecated backward-compatibility content fields."
|
|
406
|
-
).optional(),
|
|
407
|
-
state: z.enum(["DRAFT", "PUBLISHED"]).describe("Publication state of the section.").optional(),
|
|
408
|
-
oldTotalSteps: z.number().int().describe("Legacy total number of steps in the section.").optional(),
|
|
409
|
-
totalSteps: z.number().int().describe("Total number of steps in the section.").optional().nullable(),
|
|
410
|
-
trialSection: z.boolean().describe(
|
|
411
|
-
"Whether participants can access the section as trial content before purchasing the parent program."
|
|
412
|
-
).optional(),
|
|
413
|
-
ordering: z.number().describe(
|
|
414
|
-
"Position rank used to order sections within a program. To reorder sections, call Move Section."
|
|
415
|
-
).optional(),
|
|
416
|
-
delayInDays: z.number().int().describe(
|
|
417
|
-
"Number of days after the parent program starts before the section becomes available. Use `0` to make the section available immediately."
|
|
418
|
-
).min(0).max(5e3).optional(),
|
|
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("Custom field data for the section.").optional()
|
|
424
|
-
}).describe("Created section.").optional(),
|
|
425
236
|
action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
|
|
426
237
|
})
|
|
427
238
|
).optional(),
|
|
@@ -433,7 +244,7 @@ var BulkCreateSectionResponse = z.object({
|
|
|
433
244
|
).optional()
|
|
434
245
|
}).describe("Summary of the bulk create operation.").optional()
|
|
435
246
|
});
|
|
436
|
-
var GetSectionRequest = z.object({
|
|
247
|
+
var GetSectionRequest = /* @__PURE__ */ z.object({
|
|
437
248
|
sectionId: z.string().describe("ID of the Section to retrieve.").regex(
|
|
438
249
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
439
250
|
"Must be a valid GUID"
|
|
@@ -443,7 +254,7 @@ var GetSectionRequest = z.object({
|
|
|
443
254
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
444
255
|
}).optional()
|
|
445
256
|
});
|
|
446
|
-
var GetSectionResponse = z.object({
|
|
257
|
+
var GetSectionResponse = /* @__PURE__ */ z.object({
|
|
447
258
|
_id: z.string().describe("Section ID.").regex(
|
|
448
259
|
/^[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}$/,
|
|
449
260
|
"Must be a valid GUID"
|
|
@@ -490,7 +301,7 @@ var GetSectionResponse = z.object({
|
|
|
490
301
|
).optional()
|
|
491
302
|
}).describe("Custom field data for the section.").optional()
|
|
492
303
|
});
|
|
493
|
-
var UpdateSectionRequest = z.object({
|
|
304
|
+
var UpdateSectionRequest = /* @__PURE__ */ z.object({
|
|
494
305
|
_id: z.string().describe("Section ID.").regex(
|
|
495
306
|
/^[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}$/,
|
|
496
307
|
"Must be a valid GUID"
|
|
@@ -551,7 +362,7 @@ var UpdateSectionRequest = z.object({
|
|
|
551
362
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
552
363
|
}).optional()
|
|
553
364
|
});
|
|
554
|
-
var UpdateSectionResponse = z.object({
|
|
365
|
+
var UpdateSectionResponse = /* @__PURE__ */ z.object({
|
|
555
366
|
_id: z.string().describe("Section ID.").regex(
|
|
556
367
|
/^[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}$/,
|
|
557
368
|
"Must be a valid GUID"
|
|
@@ -598,14 +409,14 @@ var UpdateSectionResponse = z.object({
|
|
|
598
409
|
).optional()
|
|
599
410
|
}).describe("Custom field data for the section.").optional()
|
|
600
411
|
});
|
|
601
|
-
var DeleteSectionRequest = z.object({
|
|
412
|
+
var DeleteSectionRequest = /* @__PURE__ */ z.object({
|
|
602
413
|
sectionId: z.string().describe("ID of the section to delete.").regex(
|
|
603
414
|
/^[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}$/,
|
|
604
415
|
"Must be a valid GUID"
|
|
605
416
|
)
|
|
606
417
|
});
|
|
607
|
-
var DeleteSectionResponse = z.object({});
|
|
608
|
-
var QuerySectionsRequest = z.object({
|
|
418
|
+
var DeleteSectionResponse = /* @__PURE__ */ z.object({});
|
|
419
|
+
var QuerySectionsRequest = /* @__PURE__ */ z.object({
|
|
609
420
|
query: z.intersection(
|
|
610
421
|
z.object({
|
|
611
422
|
filter: z.record(z.string(), z.any()).describe(
|
|
@@ -646,7 +457,7 @@ var QuerySectionsRequest = z.object({
|
|
|
646
457
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
647
458
|
}).optional()
|
|
648
459
|
});
|
|
649
|
-
var QuerySectionsResponse = z.object({
|
|
460
|
+
var QuerySectionsResponse = /* @__PURE__ */ z.object({
|
|
650
461
|
sections: z.array(
|
|
651
462
|
z.object({
|
|
652
463
|
_id: z.string().describe("Section ID.").regex(
|
|
@@ -716,7 +527,7 @@ var QuerySectionsResponse = z.object({
|
|
|
716
527
|
).optional().nullable()
|
|
717
528
|
}).describe("Paging metadata.").optional()
|
|
718
529
|
});
|
|
719
|
-
var ListSectionsRequest = z.object({
|
|
530
|
+
var ListSectionsRequest = /* @__PURE__ */ z.object({
|
|
720
531
|
programId: z.string().describe("Program ID to list sections for.").regex(
|
|
721
532
|
/^[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}$/,
|
|
722
533
|
"Must be a valid GUID"
|
|
@@ -726,7 +537,7 @@ var ListSectionsRequest = z.object({
|
|
|
726
537
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
727
538
|
}).optional()
|
|
728
539
|
});
|
|
729
|
-
var ListSectionsResponse = z.object({
|
|
540
|
+
var ListSectionsResponse = /* @__PURE__ */ z.object({
|
|
730
541
|
sections: z.array(
|
|
731
542
|
z.object({
|
|
732
543
|
_id: z.string().describe("Section ID.").regex(
|
|
@@ -780,7 +591,7 @@ var ListSectionsResponse = z.object({
|
|
|
780
591
|
})
|
|
781
592
|
).max(1e3).optional()
|
|
782
593
|
});
|
|
783
|
-
var CloneSectionRequest = z.object({
|
|
594
|
+
var CloneSectionRequest = /* @__PURE__ */ z.object({
|
|
784
595
|
sectionId: z.string().describe("ID of the section to clone.").regex(
|
|
785
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}$/,
|
|
786
597
|
"Must be a valid GUID"
|
|
@@ -789,7 +600,7 @@ var CloneSectionRequest = z.object({
|
|
|
789
600
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
790
601
|
}).optional()
|
|
791
602
|
});
|
|
792
|
-
var CloneSectionResponse = z.object({
|
|
603
|
+
var CloneSectionResponse = /* @__PURE__ */ z.object({
|
|
793
604
|
section: z.object({
|
|
794
605
|
_id: z.string().describe("Section ID.").regex(
|
|
795
606
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
@@ -841,7 +652,7 @@ var CloneSectionResponse = z.object({
|
|
|
841
652
|
}).describe("Custom field data for the section.").optional()
|
|
842
653
|
}).describe("Cloned section.").optional()
|
|
843
654
|
});
|
|
844
|
-
var MoveSectionRequest = z.object({
|
|
655
|
+
var MoveSectionRequest = /* @__PURE__ */ z.object({
|
|
845
656
|
options: z.object({
|
|
846
657
|
sectionId: z.string().describe("ID of the section to move.").regex(
|
|
847
658
|
/^[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}$/,
|
|
@@ -853,11 +664,13 @@ var MoveSectionRequest = z.object({
|
|
|
853
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}$/,
|
|
854
665
|
"Must be a valid GUID"
|
|
855
666
|
).optional().nullable(),
|
|
856
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
667
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
668
|
+
"Current revision of the section. When provided, it must match the current revision to protect against conflicting updates."
|
|
669
|
+
).optional(),
|
|
857
670
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
858
671
|
}).optional()
|
|
859
672
|
});
|
|
860
|
-
var MoveSectionResponse = z.object({
|
|
673
|
+
var MoveSectionResponse = /* @__PURE__ */ z.object({
|
|
861
674
|
section: z.object({
|
|
862
675
|
_id: z.string().describe("Section ID.").regex(
|
|
863
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}$/,
|
|
@@ -909,7 +722,7 @@ var MoveSectionResponse = z.object({
|
|
|
909
722
|
}).describe("Custom field data for the section.").optional()
|
|
910
723
|
}).describe("Moved section.").optional()
|
|
911
724
|
});
|
|
912
|
-
var PublishSectionRequest = z.object({
|
|
725
|
+
var PublishSectionRequest = /* @__PURE__ */ z.object({
|
|
913
726
|
options: z.object({
|
|
914
727
|
sectionId: z.string().describe("ID of the section to publish.").regex(
|
|
915
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}$/,
|
|
@@ -919,7 +732,7 @@ var PublishSectionRequest = z.object({
|
|
|
919
732
|
fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
|
|
920
733
|
}).optional()
|
|
921
734
|
});
|
|
922
|
-
var PublishSectionResponse = z.object({
|
|
735
|
+
var PublishSectionResponse = /* @__PURE__ */ z.object({
|
|
923
736
|
section: z.object({
|
|
924
737
|
_id: z.string().describe("Section ID.").regex(
|
|
925
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}$/,
|
|
@@ -973,8 +786,6 @@ var PublishSectionResponse = z.object({
|
|
|
973
786
|
});
|
|
974
787
|
// Annotate the CommonJS export names for ESM import in node:
|
|
975
788
|
0 && (module.exports = {
|
|
976
|
-
BulkCreateSectionRequest,
|
|
977
|
-
BulkCreateSectionResponse,
|
|
978
789
|
BulkCreateSectionsRequest,
|
|
979
790
|
BulkCreateSectionsResponse,
|
|
980
791
|
CloneSectionRequest,
|