@wix/auto_sdk_online-programs_sections 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +18 -6
  2. package/build/cjs/index.js +163 -7
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +63 -14
  5. package/build/cjs/index.typings.js +153 -6
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +35 -4
  8. package/build/cjs/meta.js +122 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +101 -1
  11. package/build/cjs/schemas.js +168 -21
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +18 -6
  14. package/build/es/index.mjs +162 -7
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +63 -14
  17. package/build/es/index.typings.mjs +152 -6
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +35 -4
  20. package/build/es/meta.mjs +121 -4
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +101 -1
  23. package/build/es/schemas.mjs +166 -21
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +18 -6
  26. package/build/internal/cjs/index.js +163 -7
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +165 -14
  29. package/build/internal/cjs/index.typings.js +153 -6
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +237 -4
  32. package/build/internal/cjs/meta.js +122 -4
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +101 -1
  35. package/build/internal/cjs/schemas.js +168 -21
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +18 -6
  38. package/build/internal/es/index.mjs +162 -7
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +165 -14
  41. package/build/internal/es/index.typings.mjs +152 -6
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +237 -4
  44. package/build/internal/es/meta.mjs +121 -4
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +101 -1
  47. package/build/internal/es/schemas.mjs +166 -21
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -32,6 +32,8 @@ var schemas_exports = {};
32
32
  __export(schemas_exports, {
33
33
  BulkCreateSectionRequest: () => BulkCreateSectionRequest,
34
34
  BulkCreateSectionResponse: () => BulkCreateSectionResponse,
35
+ BulkCreateSectionsRequest: () => BulkCreateSectionsRequest,
36
+ BulkCreateSectionsResponse: () => BulkCreateSectionsResponse,
35
37
  CloneSectionRequest: () => CloneSectionRequest,
36
38
  CloneSectionResponse: () => CloneSectionResponse,
37
39
  CreateSectionRequest: () => CreateSectionRequest,
@@ -55,7 +57,7 @@ module.exports = __toCommonJS(schemas_exports);
55
57
 
56
58
  // src/online-programs-v3-section-sections.schemas.ts
57
59
  var z = __toESM(require("zod"));
58
- var CreateSectionRequest = z.object({
60
+ var CreateSectionRequest = /* @__PURE__ */ z.object({
59
61
  section: z.object({
60
62
  _id: z.string().describe("Section ID.").regex(
61
63
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
@@ -110,7 +112,7 @@ var CreateSectionRequest = z.object({
110
112
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
111
113
  }).optional()
112
114
  });
113
- var CreateSectionResponse = z.object({
115
+ var CreateSectionResponse = /* @__PURE__ */ z.object({
114
116
  _id: z.string().describe("Section ID.").regex(
115
117
  /^[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}$/,
116
118
  "Must be a valid GUID"
@@ -157,7 +159,7 @@ var CreateSectionResponse = z.object({
157
159
  ).optional()
158
160
  }).describe("Custom field data for the section.").optional()
159
161
  });
160
- var BulkCreateSectionRequest = z.object({
162
+ var BulkCreateSectionsRequest = /* @__PURE__ */ z.object({
161
163
  sections: z.array(
162
164
  z.object({
163
165
  _id: z.string().describe("Section ID.").regex(
@@ -214,7 +216,7 @@ var BulkCreateSectionRequest = z.object({
214
216
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
215
217
  }).optional()
216
218
  });
217
- var BulkCreateSectionResponse = z.object({
219
+ var BulkCreateSectionsResponse = /* @__PURE__ */ z.object({
218
220
  results: z.array(
219
221
  z.object({
220
222
  itemMetadata: z.object({
@@ -294,7 +296,144 @@ var BulkCreateSectionResponse = z.object({
294
296
  ).optional()
295
297
  }).describe("Summary of the bulk create operation.").optional()
296
298
  });
297
- var GetSectionRequest = z.object({
299
+ var BulkCreateSectionRequest = /* @__PURE__ */ 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 = /* @__PURE__ */ 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
+ action: z.enum(["UNKNOWN_ACTION_TYPE", "INSERT", "UPDATE", "DELETE"]).describe("Action associated with the bulk result.").optional()
426
+ })
427
+ ).optional(),
428
+ bulkActionMetadata: z.object({
429
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
430
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
431
+ undetailedFailures: z.number().int().describe(
432
+ "Number of failures without details because detailed failure threshold was exceeded."
433
+ ).optional()
434
+ }).describe("Summary of the bulk create operation.").optional()
435
+ });
436
+ var GetSectionRequest = /* @__PURE__ */ z.object({
298
437
  sectionId: z.string().describe("ID of the Section to retrieve.").regex(
299
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}$/,
300
439
  "Must be a valid GUID"
@@ -304,7 +443,7 @@ var GetSectionRequest = z.object({
304
443
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
305
444
  }).optional()
306
445
  });
307
- var GetSectionResponse = z.object({
446
+ var GetSectionResponse = /* @__PURE__ */ z.object({
308
447
  _id: z.string().describe("Section ID.").regex(
309
448
  /^[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}$/,
310
449
  "Must be a valid GUID"
@@ -351,7 +490,7 @@ var GetSectionResponse = z.object({
351
490
  ).optional()
352
491
  }).describe("Custom field data for the section.").optional()
353
492
  });
354
- var UpdateSectionRequest = z.object({
493
+ var UpdateSectionRequest = /* @__PURE__ */ z.object({
355
494
  _id: z.string().describe("Section ID.").regex(
356
495
  /^[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}$/,
357
496
  "Must be a valid GUID"
@@ -412,7 +551,7 @@ var UpdateSectionRequest = z.object({
412
551
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
413
552
  }).optional()
414
553
  });
415
- var UpdateSectionResponse = z.object({
554
+ var UpdateSectionResponse = /* @__PURE__ */ z.object({
416
555
  _id: z.string().describe("Section ID.").regex(
417
556
  /^[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}$/,
418
557
  "Must be a valid GUID"
@@ -459,14 +598,14 @@ var UpdateSectionResponse = z.object({
459
598
  ).optional()
460
599
  }).describe("Custom field data for the section.").optional()
461
600
  });
462
- var DeleteSectionRequest = z.object({
601
+ var DeleteSectionRequest = /* @__PURE__ */ z.object({
463
602
  sectionId: z.string().describe("ID of the section to delete.").regex(
464
603
  /^[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}$/,
465
604
  "Must be a valid GUID"
466
605
  )
467
606
  });
468
- var DeleteSectionResponse = z.object({});
469
- var QuerySectionsRequest = z.object({
607
+ var DeleteSectionResponse = /* @__PURE__ */ z.object({});
608
+ var QuerySectionsRequest = /* @__PURE__ */ z.object({
470
609
  query: z.intersection(
471
610
  z.object({
472
611
  filter: z.record(z.string(), z.any()).describe(
@@ -475,7 +614,13 @@ var QuerySectionsRequest = z.object({
475
614
  sort: z.array(
476
615
  z.object({
477
616
  fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
478
- order: z.enum(["ASC", "DESC"]).optional()
617
+ order: z.enum(["ASC", "DESC"]).optional(),
618
+ origin: z.object({
619
+ latitude: z.number().describe("Address latitude.").optional().nullable(),
620
+ longitude: z.number().describe("Address longitude.").optional().nullable()
621
+ }).describe(
622
+ "Origin point for geo-distance sorting on a GEO field\nresults are ordered by distance from this point (ASC = nearest first, DESC = farthest first)."
623
+ ).optional()
479
624
  })
480
625
  ).max(5).optional()
481
626
  }),
@@ -501,7 +646,7 @@ var QuerySectionsRequest = z.object({
501
646
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
502
647
  }).optional()
503
648
  });
504
- var QuerySectionsResponse = z.object({
649
+ var QuerySectionsResponse = /* @__PURE__ */ z.object({
505
650
  sections: z.array(
506
651
  z.object({
507
652
  _id: z.string().describe("Section ID.").regex(
@@ -571,7 +716,7 @@ var QuerySectionsResponse = z.object({
571
716
  ).optional().nullable()
572
717
  }).describe("Paging metadata.").optional()
573
718
  });
574
- var ListSectionsRequest = z.object({
719
+ var ListSectionsRequest = /* @__PURE__ */ z.object({
575
720
  programId: z.string().describe("Program ID to list sections for.").regex(
576
721
  /^[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}$/,
577
722
  "Must be a valid GUID"
@@ -581,7 +726,7 @@ var ListSectionsRequest = z.object({
581
726
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
582
727
  }).optional()
583
728
  });
584
- var ListSectionsResponse = z.object({
729
+ var ListSectionsResponse = /* @__PURE__ */ z.object({
585
730
  sections: z.array(
586
731
  z.object({
587
732
  _id: z.string().describe("Section ID.").regex(
@@ -635,7 +780,7 @@ var ListSectionsResponse = z.object({
635
780
  })
636
781
  ).max(1e3).optional()
637
782
  });
638
- var CloneSectionRequest = z.object({
783
+ var CloneSectionRequest = /* @__PURE__ */ z.object({
639
784
  sectionId: z.string().describe("ID of the section to clone.").regex(
640
785
  /^[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}$/,
641
786
  "Must be a valid GUID"
@@ -644,7 +789,7 @@ var CloneSectionRequest = z.object({
644
789
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
645
790
  }).optional()
646
791
  });
647
- var CloneSectionResponse = z.object({
792
+ var CloneSectionResponse = /* @__PURE__ */ z.object({
648
793
  section: z.object({
649
794
  _id: z.string().describe("Section ID.").regex(
650
795
  /^[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}$/,
@@ -696,7 +841,7 @@ var CloneSectionResponse = z.object({
696
841
  }).describe("Custom field data for the section.").optional()
697
842
  }).describe("Cloned section.").optional()
698
843
  });
699
- var MoveSectionRequest = z.object({
844
+ var MoveSectionRequest = /* @__PURE__ */ z.object({
700
845
  options: z.object({
701
846
  sectionId: z.string().describe("ID of the section to move.").regex(
702
847
  /^[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}$/,
@@ -712,7 +857,7 @@ var MoveSectionRequest = z.object({
712
857
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
713
858
  }).optional()
714
859
  });
715
- var MoveSectionResponse = z.object({
860
+ var MoveSectionResponse = /* @__PURE__ */ z.object({
716
861
  section: z.object({
717
862
  _id: z.string().describe("Section ID.").regex(
718
863
  /^[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}$/,
@@ -764,7 +909,7 @@ var MoveSectionResponse = z.object({
764
909
  }).describe("Custom field data for the section.").optional()
765
910
  }).describe("Moved section.").optional()
766
911
  });
767
- var PublishSectionRequest = z.object({
912
+ var PublishSectionRequest = /* @__PURE__ */ z.object({
768
913
  options: z.object({
769
914
  sectionId: z.string().describe("ID of the section to publish.").regex(
770
915
  /^[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}$/,
@@ -774,7 +919,7 @@ var PublishSectionRequest = z.object({
774
919
  fields: z.array(z.enum(["TOTAL_STEPS"])).max(1).optional()
775
920
  }).optional()
776
921
  });
777
- var PublishSectionResponse = z.object({
922
+ var PublishSectionResponse = /* @__PURE__ */ z.object({
778
923
  section: z.object({
779
924
  _id: z.string().describe("Section ID.").regex(
780
925
  /^[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}$/,
@@ -830,6 +975,8 @@ var PublishSectionResponse = z.object({
830
975
  0 && (module.exports = {
831
976
  BulkCreateSectionRequest,
832
977
  BulkCreateSectionResponse,
978
+ BulkCreateSectionsRequest,
979
+ BulkCreateSectionsResponse,
833
980
  CloneSectionRequest,
834
981
  CloneSectionResponse,
835
982
  CreateSectionRequest,