@wix/auto_sdk_benefit-programs_programs 1.0.49 → 1.0.51

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 (37) hide show
  1. package/build/cjs/index.d.ts +9 -25
  2. package/build/cjs/index.js +29 -912
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +14 -1
  5. package/build/cjs/index.typings.js +9 -892
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +14 -1
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +1 -1
  10. package/build/es/index.d.mts +9 -25
  11. package/build/es/index.mjs +29 -902
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +14 -1
  14. package/build/es/index.typings.mjs +9 -882
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +14 -1
  17. package/build/es/meta.mjs.map +1 -1
  18. package/build/es/schemas.d.mts +1 -1
  19. package/build/internal/cjs/index.d.ts +9 -25
  20. package/build/internal/cjs/index.js +29 -912
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +14 -1
  23. package/build/internal/cjs/index.typings.js +9 -892
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +14 -1
  26. package/build/internal/cjs/meta.js.map +1 -1
  27. package/build/internal/cjs/schemas.d.ts +1 -1
  28. package/build/internal/es/index.d.mts +9 -25
  29. package/build/internal/es/index.mjs +29 -902
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +14 -1
  32. package/build/internal/es/index.typings.mjs +9 -882
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +14 -1
  35. package/build/internal/es/meta.mjs.map +1 -1
  36. package/build/internal/es/schemas.d.mts +1 -1
  37. package/package.json +2 -2
@@ -353,849 +353,6 @@ function getProgramByExternalIdAndNamespace(payload) {
353
353
 
354
354
  // src/benefit-programs-v1-program-programs.universal.ts
355
355
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
356
-
357
- // src/benefit-programs-v1-program-programs.schemas.ts
358
- import * as z from "zod";
359
- var ProvisionProgramRequest = z.object({
360
- poolDefinitionLookupId: z.intersection(
361
- z.object({}),
362
- z.xor([
363
- z.object({
364
- poolDefinitionId: z.never().optional(),
365
- programDefinitionId: z.never().optional()
366
- }),
367
- z.object({
368
- programDefinitionId: z.never().optional(),
369
- poolDefinitionId: z.string().describe("Pool definition ID.").regex(
370
- /^[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}$/,
371
- "Must be a valid GUID"
372
- )
373
- }),
374
- z.object({
375
- poolDefinitionId: z.never().optional(),
376
- programDefinitionId: z.string().describe("Program definition 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
- )
380
- })
381
- ])
382
- ).describe(
383
- "The program definition or pool definition to use to provision the program."
384
- ),
385
- options: z.object({
386
- beneficiary: z.intersection(
387
- z.object({}),
388
- z.xor([
389
- z.object({
390
- anonymousVisitorId: z.never().optional(),
391
- memberId: z.never().optional(),
392
- wixUserId: z.never().optional()
393
- }),
394
- z.object({
395
- memberId: z.never().optional(),
396
- wixUserId: z.never().optional(),
397
- anonymousVisitorId: z.string().describe(
398
- "ID of a site visitor that hasn't logged in to the site."
399
- ).regex(
400
- /^[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}$/,
401
- "Must be a valid GUID"
402
- )
403
- }),
404
- z.object({
405
- anonymousVisitorId: z.never().optional(),
406
- wixUserId: z.never().optional(),
407
- memberId: z.string().describe("ID of a site member.").regex(
408
- /^[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}$/,
409
- "Must be a valid GUID"
410
- )
411
- }),
412
- z.object({
413
- anonymousVisitorId: z.never().optional(),
414
- memberId: z.never().optional(),
415
- wixUserId: z.string().describe("ID of a Wix user.").regex(
416
- /^[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}$/,
417
- "Must be a valid GUID"
418
- )
419
- })
420
- ])
421
- ).describe("Program beneficiary."),
422
- programStatus: z.enum(["ACTIVE", "PAUSED"]).optional(),
423
- namespace: z.string().describe(
424
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
425
- ).min(1).max(20),
426
- displayName: z.string().describe(
427
- "Program name.\n\nIf you're provisioning the program from a program definition, you may want to use the same name that was used for the program definition."
428
- ).max(64).optional().nullable(),
429
- externalProgramId: z.string().describe(
430
- "ID for the program defined by you. You can use `externalId` to filter queries."
431
- ).regex(
432
- /^[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}$/,
433
- "Must be a valid GUID"
434
- )
435
- })
436
- });
437
- var ProvisionProgramResponse = z.object({
438
- jobId: z.string().describe(
439
- "Job ID of the provisioning of the program. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction)."
440
- ).regex(
441
- /^[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}$/,
442
- "Must be a valid GUID"
443
- ).optional(),
444
- program: z.object({
445
- _id: z.string().describe("Program ID.").regex(
446
- /^[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}$/,
447
- "Must be a valid GUID"
448
- ).optional().nullable(),
449
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
450
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
451
- ).optional().nullable(),
452
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
453
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
454
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
455
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
456
- "Must be a valid GUID"
457
- ).optional().nullable(),
458
- status: z.enum([
459
- "ACTIVE",
460
- "PAUSED",
461
- "ENDED",
462
- "PROVISIONING",
463
- "PAUSING",
464
- "RESUMING",
465
- "ENDING"
466
- ]).describe("Program status.").optional(),
467
- beneficiary: z.intersection(
468
- z.object({}),
469
- z.xor([
470
- z.object({
471
- anonymousVisitorId: z.never().optional(),
472
- memberId: z.never().optional(),
473
- wixUserId: z.never().optional()
474
- }),
475
- z.object({
476
- memberId: z.never().optional(),
477
- wixUserId: z.never().optional(),
478
- anonymousVisitorId: z.string().describe(
479
- "ID of a site visitor that hasn't logged in to the site."
480
- ).regex(
481
- /^[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}$/,
482
- "Must be a valid GUID"
483
- )
484
- }),
485
- z.object({
486
- anonymousVisitorId: z.never().optional(),
487
- wixUserId: z.never().optional(),
488
- memberId: z.string().describe("ID of a site member.").regex(
489
- /^[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}$/,
490
- "Must be a valid GUID"
491
- )
492
- }),
493
- z.object({
494
- anonymousVisitorId: z.never().optional(),
495
- memberId: z.never().optional(),
496
- wixUserId: z.string().describe("ID of a Wix user.").regex(
497
- /^[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}$/,
498
- "Must be a valid GUID"
499
- )
500
- })
501
- ])
502
- ).describe("Program beneficiary.").optional(),
503
- displayName: z.string().describe(
504
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
505
- ).max(64).optional().nullable(),
506
- namespace: z.string().describe(
507
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
508
- ).min(1).max(20).optional().nullable(),
509
- extendedFields: z.object({
510
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
511
- "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)."
512
- ).optional()
513
- }).describe(
514
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
515
- ).optional(),
516
- externalId: z.string().describe(
517
- "ID for the program defined by you. You can use `externalId` to filter queries."
518
- ).regex(
519
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
520
- "Must be a valid GUID"
521
- ).optional().nullable(),
522
- programDefinition: z.object({
523
- _id: z.string().describe("Program definition ID.").regex(
524
- /^[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}$/,
525
- "Must be a valid GUID"
526
- ).optional(),
527
- externalId: z.string().describe("Program definition external ID.").regex(
528
- /^[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}$/,
529
- "Must be a valid GUID"
530
- ).optional().nullable()
531
- }).describe("Associated program definition information.").optional()
532
- }).describe("Provisioned program.").optional()
533
- });
534
- var RenewProgramRequest = z.object({
535
- programId: z.string().describe("ID of the program to renew.").regex(
536
- /^[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}$/,
537
- "Must be a valid GUID"
538
- ),
539
- options: z.object({
540
- idempotencyKey: z.string().describe(
541
- "Idempotency key to ensure that the request is processed only once."
542
- ).max(64)
543
- })
544
- });
545
- var RenewProgramResponse = z.object({
546
- jobId: z.string().describe(
547
- "Job ID of the program renewal. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction)."
548
- ).regex(
549
- /^[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}$/,
550
- "Must be a valid GUID"
551
- ).optional()
552
- });
553
- var PauseProgramRequest = z.object({
554
- programId: z.string().describe("ID of the program to pause.").regex(
555
- /^[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}$/,
556
- "Must be a valid GUID"
557
- ),
558
- options: z.object({
559
- idempotencyKey: z.string().describe(
560
- "Idempotency key to ensure that the request is processed only once."
561
- ).max(64)
562
- })
563
- });
564
- var PauseProgramResponse = z.object({
565
- jobId: z.string().describe(
566
- "Job ID of the pausing of the program. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction)."
567
- ).regex(
568
- /^[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}$/,
569
- "Must be a valid GUID"
570
- ).optional()
571
- });
572
- var ResumeProgramRequest = z.object({
573
- programId: z.string().describe("ID of program to resume.").regex(
574
- /^[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}$/,
575
- "Must be a valid GUID"
576
- ),
577
- options: z.object({
578
- idempotencyKey: z.string().describe(
579
- "Idempotency key to ensure that the request is processed only once."
580
- ).max(64)
581
- })
582
- });
583
- var ResumeProgramResponse = z.object({
584
- jobId: z.string().describe(
585
- "Job ID of the resuming of the program. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction)."
586
- ).regex(
587
- /^[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}$/,
588
- "Must be a valid GUID"
589
- ).optional()
590
- });
591
- var EndProgramRequest = z.object({
592
- programId: z.string().describe("ID of the program to end.").regex(
593
- /^[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}$/,
594
- "Must be a valid GUID"
595
- )
596
- });
597
- var EndProgramResponse = z.object({
598
- jobId: z.string().describe(
599
- "Job ID of the ending of the program. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction)."
600
- ).regex(
601
- /^[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}$/,
602
- "Must be a valid GUID"
603
- ).optional()
604
- });
605
- var UpdateProgramRequest = z.object({
606
- _id: z.string().describe("Program ID.").regex(
607
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
608
- "Must be a valid GUID"
609
- ),
610
- program: z.object({
611
- _id: z.string().describe("Program ID.").regex(
612
- /^[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}$/,
613
- "Must be a valid GUID"
614
- ).optional().nullable(),
615
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
616
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
617
- ),
618
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
619
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
620
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
621
- /^[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}$/,
622
- "Must be a valid GUID"
623
- ).optional().nullable(),
624
- status: z.enum([
625
- "ACTIVE",
626
- "PAUSED",
627
- "ENDED",
628
- "PROVISIONING",
629
- "PAUSING",
630
- "RESUMING",
631
- "ENDING"
632
- ]).optional(),
633
- beneficiary: z.intersection(
634
- z.object({}),
635
- z.xor([
636
- z.object({
637
- anonymousVisitorId: z.never().optional(),
638
- memberId: z.never().optional(),
639
- wixUserId: z.never().optional()
640
- }),
641
- z.object({
642
- memberId: z.never().optional(),
643
- wixUserId: z.never().optional(),
644
- anonymousVisitorId: z.string().describe(
645
- "ID of a site visitor that hasn't logged in to the site."
646
- ).regex(
647
- /^[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}$/,
648
- "Must be a valid GUID"
649
- )
650
- }),
651
- z.object({
652
- anonymousVisitorId: z.never().optional(),
653
- wixUserId: z.never().optional(),
654
- memberId: z.string().describe("ID of a site member.").regex(
655
- /^[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}$/,
656
- "Must be a valid GUID"
657
- )
658
- }),
659
- z.object({
660
- anonymousVisitorId: z.never().optional(),
661
- memberId: z.never().optional(),
662
- wixUserId: z.string().describe("ID of a Wix user.").regex(
663
- /^[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}$/,
664
- "Must be a valid GUID"
665
- )
666
- })
667
- ])
668
- ).describe("Program beneficiary.").optional(),
669
- displayName: z.string().describe(
670
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
671
- ).max(64).optional().nullable(),
672
- namespace: z.string().describe(
673
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
674
- ).min(1).max(20).optional().nullable(),
675
- extendedFields: z.object({
676
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
677
- "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)."
678
- ).optional()
679
- }).describe(
680
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
681
- ).optional(),
682
- externalId: z.string().describe(
683
- "ID for the program defined by you. You can use `externalId` to filter queries."
684
- ).regex(
685
- /^[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}$/,
686
- "Must be a valid GUID"
687
- ).optional().nullable(),
688
- programDefinition: z.object({
689
- _id: z.string().describe("Program definition ID.").regex(
690
- /^[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}$/,
691
- "Must be a valid GUID"
692
- ).optional(),
693
- externalId: z.string().describe("Program definition external ID.").regex(
694
- /^[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}$/,
695
- "Must be a valid GUID"
696
- ).optional().nullable()
697
- }).describe("Associated program definition information.").optional()
698
- }).describe("Program to update.")
699
- });
700
- var UpdateProgramResponse = z.object({
701
- _id: z.string().describe("Program ID.").regex(
702
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
703
- "Must be a valid GUID"
704
- ).optional().nullable(),
705
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
706
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
707
- ).optional().nullable(),
708
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
709
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
710
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
711
- /^[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
- "Must be a valid GUID"
713
- ).optional().nullable(),
714
- status: z.enum([
715
- "ACTIVE",
716
- "PAUSED",
717
- "ENDED",
718
- "PROVISIONING",
719
- "PAUSING",
720
- "RESUMING",
721
- "ENDING"
722
- ]).describe("Program status.").optional(),
723
- beneficiary: z.intersection(
724
- z.object({}),
725
- z.xor([
726
- z.object({
727
- anonymousVisitorId: z.never().optional(),
728
- memberId: z.never().optional(),
729
- wixUserId: z.never().optional()
730
- }),
731
- z.object({
732
- memberId: z.never().optional(),
733
- wixUserId: z.never().optional(),
734
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
735
- /^[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}$/,
736
- "Must be a valid GUID"
737
- )
738
- }),
739
- z.object({
740
- anonymousVisitorId: z.never().optional(),
741
- wixUserId: z.never().optional(),
742
- memberId: z.string().describe("ID of a site member.").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
- )
746
- }),
747
- z.object({
748
- anonymousVisitorId: z.never().optional(),
749
- memberId: z.never().optional(),
750
- wixUserId: z.string().describe("ID of a Wix user.").regex(
751
- /^[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}$/,
752
- "Must be a valid GUID"
753
- )
754
- })
755
- ])
756
- ).describe("Program beneficiary.").optional(),
757
- displayName: z.string().describe(
758
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
759
- ).max(64).optional().nullable(),
760
- namespace: z.string().describe(
761
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
762
- ).min(1).max(20).optional().nullable(),
763
- extendedFields: z.object({
764
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
765
- "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)."
766
- ).optional()
767
- }).describe(
768
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
769
- ).optional(),
770
- externalId: z.string().describe(
771
- "ID for the program defined by you. You can use `externalId` to filter queries."
772
- ).regex(
773
- /^[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
- "Must be a valid GUID"
775
- ).optional().nullable(),
776
- programDefinition: z.object({
777
- _id: z.string().describe("Program definition ID.").regex(
778
- /^[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}$/,
779
- "Must be a valid GUID"
780
- ).optional(),
781
- externalId: z.string().describe("Program definition external ID.").regex(
782
- /^[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}$/,
783
- "Must be a valid GUID"
784
- ).optional().nullable()
785
- }).describe("Associated program definition information.").optional()
786
- });
787
- var GetProgramRequest = z.object({
788
- programId: z.string().describe("ID of the program to retrieve.").regex(
789
- /^[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}$/,
790
- "Must be a valid GUID"
791
- )
792
- });
793
- var GetProgramResponse = z.object({
794
- _id: z.string().describe("Program ID.").regex(
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}$/,
796
- "Must be a valid GUID"
797
- ).optional().nullable(),
798
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
799
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
800
- ).optional().nullable(),
801
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
802
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
803
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
804
- /^[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}$/,
805
- "Must be a valid GUID"
806
- ).optional().nullable(),
807
- status: z.enum([
808
- "ACTIVE",
809
- "PAUSED",
810
- "ENDED",
811
- "PROVISIONING",
812
- "PAUSING",
813
- "RESUMING",
814
- "ENDING"
815
- ]).describe("Program status.").optional(),
816
- beneficiary: z.intersection(
817
- z.object({}),
818
- z.xor([
819
- z.object({
820
- anonymousVisitorId: z.never().optional(),
821
- memberId: z.never().optional(),
822
- wixUserId: z.never().optional()
823
- }),
824
- z.object({
825
- memberId: z.never().optional(),
826
- wixUserId: z.never().optional(),
827
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
828
- /^[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}$/,
829
- "Must be a valid GUID"
830
- )
831
- }),
832
- z.object({
833
- anonymousVisitorId: z.never().optional(),
834
- wixUserId: z.never().optional(),
835
- memberId: z.string().describe("ID of a site member.").regex(
836
- /^[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}$/,
837
- "Must be a valid GUID"
838
- )
839
- }),
840
- z.object({
841
- anonymousVisitorId: z.never().optional(),
842
- memberId: z.never().optional(),
843
- wixUserId: z.string().describe("ID of a Wix user.").regex(
844
- /^[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}$/,
845
- "Must be a valid GUID"
846
- )
847
- })
848
- ])
849
- ).describe("Program beneficiary.").optional(),
850
- displayName: z.string().describe(
851
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
852
- ).max(64).optional().nullable(),
853
- namespace: z.string().describe(
854
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
855
- ).min(1).max(20).optional().nullable(),
856
- extendedFields: z.object({
857
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
858
- "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)."
859
- ).optional()
860
- }).describe(
861
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
862
- ).optional(),
863
- externalId: z.string().describe(
864
- "ID for the program defined by you. You can use `externalId` to filter queries."
865
- ).regex(
866
- /^[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}$/,
867
- "Must be a valid GUID"
868
- ).optional().nullable(),
869
- programDefinition: z.object({
870
- _id: z.string().describe("Program definition ID.").regex(
871
- /^[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}$/,
872
- "Must be a valid GUID"
873
- ).optional(),
874
- externalId: z.string().describe("Program definition external ID.").regex(
875
- /^[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}$/,
876
- "Must be a valid GUID"
877
- ).optional().nullable()
878
- }).describe("Associated program definition information.").optional()
879
- });
880
- var QueryProgramsRequest = z.object({
881
- query: z.object({
882
- filter: z.object({
883
- _id: z.object({
884
- $eq: z.string(),
885
- $exists: z.boolean(),
886
- $gt: z.string(),
887
- $gte: z.string(),
888
- $hasAll: z.array(z.string()),
889
- $hasSome: z.array(z.string()),
890
- $in: z.array(z.string()),
891
- $lt: z.string(),
892
- $lte: z.string(),
893
- $ne: z.string(),
894
- $nin: z.array(z.string()),
895
- $startsWith: z.string()
896
- }).partial().strict().optional(),
897
- namespace: z.object({
898
- $eq: z.string(),
899
- $exists: z.boolean(),
900
- $gt: z.string(),
901
- $gte: z.string(),
902
- $hasAll: z.array(z.string()),
903
- $hasSome: z.array(z.string()),
904
- $in: z.array(z.string()),
905
- $lt: z.string(),
906
- $lte: z.string(),
907
- $ne: z.string(),
908
- $nin: z.array(z.string()),
909
- $startsWith: z.string()
910
- }).partial().strict().optional(),
911
- externalId: z.object({
912
- $eq: z.string(),
913
- $exists: z.boolean(),
914
- $gt: z.string(),
915
- $gte: z.string(),
916
- $hasAll: z.array(z.string()),
917
- $hasSome: z.array(z.string()),
918
- $in: z.array(z.string()),
919
- $lt: z.string(),
920
- $lte: z.string(),
921
- $ne: z.string(),
922
- $nin: z.array(z.string()),
923
- $startsWith: z.string()
924
- }).partial().strict().optional(),
925
- programDefinitionId: z.object({
926
- $eq: z.string(),
927
- $exists: z.boolean(),
928
- $gt: z.string(),
929
- $gte: z.string(),
930
- $hasAll: z.array(z.string()),
931
- $hasSome: z.array(z.string()),
932
- $in: z.array(z.string()),
933
- $lt: z.string(),
934
- $lte: z.string(),
935
- $ne: z.string(),
936
- $nin: z.array(z.string()),
937
- $startsWith: z.string()
938
- }).partial().strict().optional(),
939
- status: z.object({
940
- $eq: z.string(),
941
- $exists: z.boolean(),
942
- $gt: z.string(),
943
- $gte: z.string(),
944
- $hasAll: z.array(z.string()),
945
- $hasSome: z.array(z.string()),
946
- $in: z.array(z.string()),
947
- $lt: z.string(),
948
- $lte: z.string(),
949
- $ne: z.string(),
950
- $nin: z.array(z.string()),
951
- $startsWith: z.string()
952
- }).partial().strict().optional(),
953
- _createdDate: z.object({
954
- $eq: z.string(),
955
- $exists: z.boolean(),
956
- $gt: z.string(),
957
- $gte: z.string(),
958
- $hasAll: z.array(z.string()),
959
- $hasSome: z.array(z.string()),
960
- $in: z.array(z.string()),
961
- $lt: z.string(),
962
- $lte: z.string(),
963
- $ne: z.string(),
964
- $nin: z.array(z.string()),
965
- $startsWith: z.string()
966
- }).partial().strict().optional(),
967
- $and: z.array(z.any()).optional(),
968
- $or: z.array(z.any()).optional(),
969
- $not: z.any().optional()
970
- }).strict().optional(),
971
- sort: z.array(
972
- z.object({
973
- fieldName: z.enum([
974
- "_id",
975
- "namespace",
976
- "externalId",
977
- "programDefinitionId",
978
- "status",
979
- "_createdDate"
980
- ]).optional(),
981
- order: z.enum(["ASC", "DESC"]).optional()
982
- })
983
- ).optional()
984
- }).catchall(z.any()).describe("Filter, sort, and paging to apply to the query.")
985
- });
986
- var QueryProgramsResponse = z.object({
987
- programs: z.array(
988
- z.object({
989
- _id: z.string().describe("Program ID.").regex(
990
- /^[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}$/,
991
- "Must be a valid GUID"
992
- ).optional().nullable(),
993
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
994
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
995
- ).optional().nullable(),
996
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
997
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
998
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
999
- /^[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}$/,
1000
- "Must be a valid GUID"
1001
- ).optional().nullable(),
1002
- status: z.enum([
1003
- "ACTIVE",
1004
- "PAUSED",
1005
- "ENDED",
1006
- "PROVISIONING",
1007
- "PAUSING",
1008
- "RESUMING",
1009
- "ENDING"
1010
- ]).describe("Program status.").optional(),
1011
- beneficiary: z.intersection(
1012
- z.object({}),
1013
- z.xor([
1014
- z.object({
1015
- anonymousVisitorId: z.never().optional(),
1016
- memberId: z.never().optional(),
1017
- wixUserId: z.never().optional()
1018
- }),
1019
- z.object({
1020
- memberId: z.never().optional(),
1021
- wixUserId: z.never().optional(),
1022
- anonymousVisitorId: z.string().describe(
1023
- "ID of a site visitor that hasn't logged in to the site."
1024
- ).regex(
1025
- /^[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}$/,
1026
- "Must be a valid GUID"
1027
- )
1028
- }),
1029
- z.object({
1030
- anonymousVisitorId: z.never().optional(),
1031
- wixUserId: z.never().optional(),
1032
- memberId: z.string().describe("ID of a site member.").regex(
1033
- /^[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}$/,
1034
- "Must be a valid GUID"
1035
- )
1036
- }),
1037
- z.object({
1038
- anonymousVisitorId: z.never().optional(),
1039
- memberId: z.never().optional(),
1040
- wixUserId: z.string().describe("ID of a Wix user.").regex(
1041
- /^[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}$/,
1042
- "Must be a valid GUID"
1043
- )
1044
- })
1045
- ])
1046
- ).describe("Program beneficiary.").optional(),
1047
- displayName: z.string().describe(
1048
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
1049
- ).max(64).optional().nullable(),
1050
- namespace: z.string().describe(
1051
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
1052
- ).min(1).max(20).optional().nullable(),
1053
- extendedFields: z.object({
1054
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1055
- "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)."
1056
- ).optional()
1057
- }).describe(
1058
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
1059
- ).optional(),
1060
- externalId: z.string().describe(
1061
- "ID for the program defined by you. You can use `externalId` to filter queries."
1062
- ).regex(
1063
- /^[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}$/,
1064
- "Must be a valid GUID"
1065
- ).optional().nullable(),
1066
- programDefinition: z.object({
1067
- _id: z.string().describe("Program definition ID.").regex(
1068
- /^[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}$/,
1069
- "Must be a valid GUID"
1070
- ).optional(),
1071
- externalId: z.string().describe("Program definition external ID.").regex(
1072
- /^[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}$/,
1073
- "Must be a valid GUID"
1074
- ).optional().nullable()
1075
- }).describe("Associated program definition information.").optional()
1076
- })
1077
- ).optional(),
1078
- metadata: z.object({
1079
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1080
- cursors: z.object({
1081
- next: z.string().describe(
1082
- "Cursor string pointing to the next page in the list of results."
1083
- ).max(16e3).optional().nullable(),
1084
- prev: z.string().describe(
1085
- "Cursor pointing to the previous page in the list of results."
1086
- ).max(16e3).optional().nullable()
1087
- }).describe(
1088
- "Cursor strings that point to the next page, previous page, or both."
1089
- ).optional(),
1090
- hasNext: z.boolean().describe(
1091
- "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."
1092
- ).optional().nullable()
1093
- }).describe("Metadata for the paginated results.").optional()
1094
- });
1095
- var GetProgramByExternalIdAndNamespaceRequest = z.object({
1096
- namespace: z.string().describe(
1097
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
1098
- ).min(1).max(20),
1099
- options: z.object({
1100
- externalId: z.string().describe("Program's external ID.").regex(
1101
- /^[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}$/,
1102
- "Must be a valid GUID"
1103
- )
1104
- })
1105
- });
1106
- var GetProgramByExternalIdAndNamespaceResponse = z.object({
1107
- program: z.object({
1108
- _id: z.string().describe("Program ID.").regex(
1109
- /^[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}$/,
1110
- "Must be a valid GUID"
1111
- ).optional().nullable(),
1112
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1113
- "Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the program.\n\nIgnored when creating a program."
1114
- ).optional().nullable(),
1115
- _createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
1116
- _updatedDate: z.date().describe("Date and time the program was updated.").optional().nullable(),
1117
- programDefinitionId: z.string().describe("ID of the associated program definition.").regex(
1118
- /^[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}$/,
1119
- "Must be a valid GUID"
1120
- ).optional().nullable(),
1121
- status: z.enum([
1122
- "ACTIVE",
1123
- "PAUSED",
1124
- "ENDED",
1125
- "PROVISIONING",
1126
- "PAUSING",
1127
- "RESUMING",
1128
- "ENDING"
1129
- ]).describe("Program status.").optional(),
1130
- beneficiary: z.intersection(
1131
- z.object({}),
1132
- z.xor([
1133
- z.object({
1134
- anonymousVisitorId: z.never().optional(),
1135
- memberId: z.never().optional(),
1136
- wixUserId: z.never().optional()
1137
- }),
1138
- z.object({
1139
- memberId: z.never().optional(),
1140
- wixUserId: z.never().optional(),
1141
- anonymousVisitorId: z.string().describe(
1142
- "ID of a site visitor that hasn't logged in to the site."
1143
- ).regex(
1144
- /^[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}$/,
1145
- "Must be a valid GUID"
1146
- )
1147
- }),
1148
- z.object({
1149
- anonymousVisitorId: z.never().optional(),
1150
- wixUserId: z.never().optional(),
1151
- memberId: z.string().describe("ID of a site member.").regex(
1152
- /^[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}$/,
1153
- "Must be a valid GUID"
1154
- )
1155
- }),
1156
- z.object({
1157
- anonymousVisitorId: z.never().optional(),
1158
- memberId: z.never().optional(),
1159
- wixUserId: z.string().describe("ID of a Wix user.").regex(
1160
- /^[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}$/,
1161
- "Must be a valid GUID"
1162
- )
1163
- })
1164
- ])
1165
- ).describe("Program beneficiary.").optional(),
1166
- displayName: z.string().describe(
1167
- "Program name.\n\nYou may want to use the same name that's used in the associated program definition, if it exists."
1168
- ).max(64).optional().nullable(),
1169
- namespace: z.string().describe(
1170
- "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created."
1171
- ).min(1).max(20).optional().nullable(),
1172
- extendedFields: z.object({
1173
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
1174
- "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)."
1175
- ).optional()
1176
- }).describe(
1177
- "Custom field data for the program object.\n\n[Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls."
1178
- ).optional(),
1179
- externalId: z.string().describe(
1180
- "ID for the program defined by you. You can use `externalId` to filter queries."
1181
- ).regex(
1182
- /^[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}$/,
1183
- "Must be a valid GUID"
1184
- ).optional().nullable(),
1185
- programDefinition: z.object({
1186
- _id: z.string().describe("Program definition ID.").regex(
1187
- /^[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}$/,
1188
- "Must be a valid GUID"
1189
- ).optional(),
1190
- externalId: z.string().describe("Program definition external ID.").regex(
1191
- /^[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}$/,
1192
- "Must be a valid GUID"
1193
- ).optional().nullable()
1194
- }).describe("Associated program definition information.").optional()
1195
- }).describe("Retrieved program.").optional()
1196
- });
1197
-
1198
- // src/benefit-programs-v1-program-programs.universal.ts
1199
356
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
1200
357
  var ProgramStatus = /* @__PURE__ */ ((ProgramStatus2) => {
1201
358
  ProgramStatus2["ACTIVE"] = "ACTIVE";
@@ -1240,10 +397,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1240
397
  return WebhookIdentityType2;
1241
398
  })(WebhookIdentityType || {});
1242
399
  async function provisionProgram2(poolDefinitionLookupId, options) {
1243
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1244
- if (validateRequestSchema) {
1245
- ProvisionProgramRequest.parse({ poolDefinitionLookupId, options });
1246
- }
400
+ const { httpClient, sideEffects } = arguments[2];
1247
401
  const payload = renameKeysFromSDKRequestToRESTRequest({
1248
402
  poolDefinitionLookupId,
1249
403
  beneficiary: options?.beneficiary,
@@ -1280,10 +434,7 @@ async function provisionProgram2(poolDefinitionLookupId, options) {
1280
434
  }
1281
435
  }
1282
436
  async function renewProgram2(programId, options) {
1283
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1284
- if (validateRequestSchema) {
1285
- RenewProgramRequest.parse({ programId, options });
1286
- }
437
+ const { httpClient, sideEffects } = arguments[2];
1287
438
  const payload = renameKeysFromSDKRequestToRESTRequest({
1288
439
  programId,
1289
440
  idempotencyKey: options?.idempotencyKey
@@ -1312,10 +463,7 @@ async function renewProgram2(programId, options) {
1312
463
  }
1313
464
  }
1314
465
  async function pauseProgram2(programId, options) {
1315
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1316
- if (validateRequestSchema) {
1317
- PauseProgramRequest.parse({ programId, options });
1318
- }
466
+ const { httpClient, sideEffects } = arguments[2];
1319
467
  const payload = renameKeysFromSDKRequestToRESTRequest({
1320
468
  programId,
1321
469
  idempotencyKey: options?.idempotencyKey
@@ -1344,10 +492,7 @@ async function pauseProgram2(programId, options) {
1344
492
  }
1345
493
  }
1346
494
  async function resumeProgram2(programId, options) {
1347
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1348
- if (validateRequestSchema) {
1349
- ResumeProgramRequest.parse({ programId, options });
1350
- }
495
+ const { httpClient, sideEffects } = arguments[2];
1351
496
  const payload = renameKeysFromSDKRequestToRESTRequest({
1352
497
  programId,
1353
498
  idempotencyKey: options?.idempotencyKey
@@ -1376,10 +521,7 @@ async function resumeProgram2(programId, options) {
1376
521
  }
1377
522
  }
1378
523
  async function endProgram2(programId) {
1379
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1380
- if (validateRequestSchema) {
1381
- EndProgramRequest.parse({ programId });
1382
- }
524
+ const { httpClient, sideEffects } = arguments[1];
1383
525
  const payload = renameKeysFromSDKRequestToRESTRequest({
1384
526
  programId
1385
527
  });
@@ -1404,10 +546,7 @@ async function endProgram2(programId) {
1404
546
  }
1405
547
  }
1406
548
  async function updateProgram2(_id, program) {
1407
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1408
- if (validateRequestSchema) {
1409
- UpdateProgramRequest.parse({ _id, program });
1410
- }
549
+ const { httpClient, sideEffects } = arguments[2];
1411
550
  const payload = renameKeysFromSDKRequestToRESTRequest({
1412
551
  program: { ...program, id: _id }
1413
552
  });
@@ -1432,10 +571,7 @@ async function updateProgram2(_id, program) {
1432
571
  }
1433
572
  }
1434
573
  async function getProgram2(programId) {
1435
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1436
- if (validateRequestSchema) {
1437
- GetProgramRequest.parse({ programId });
1438
- }
574
+ const { httpClient, sideEffects } = arguments[1];
1439
575
  const payload = renameKeysFromSDKRequestToRESTRequest({
1440
576
  programId
1441
577
  });
@@ -1503,10 +639,7 @@ function queryPrograms2() {
1503
639
  });
1504
640
  }
1505
641
  async function typedQueryPrograms(query) {
1506
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
1507
- if (validateRequestSchema) {
1508
- QueryProgramsRequest.parse({ query });
1509
- }
642
+ const { httpClient, sideEffects } = arguments[1];
1510
643
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1511
644
  const reqOpts = queryPrograms(payload);
1512
645
  sideEffects?.onSiteCall?.();
@@ -1534,13 +667,7 @@ var utils = {
1534
667
  }
1535
668
  };
1536
669
  async function getProgramByExternalIdAndNamespace2(namespace, options) {
1537
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
1538
- if (validateRequestSchema) {
1539
- GetProgramByExternalIdAndNamespaceRequest.parse({
1540
- namespace,
1541
- options
1542
- });
1543
- }
670
+ const { httpClient, sideEffects } = arguments[2];
1544
671
  const payload = renameKeysFromSDKRequestToRESTRequest({
1545
672
  namespace,
1546
673
  externalId: options?.externalId
@@ -1572,79 +699,79 @@ async function getProgramByExternalIdAndNamespace2(namespace, options) {
1572
699
  }
1573
700
 
1574
701
  // src/benefit-programs-v1-program-programs.public.ts
1575
- function provisionProgram3(httpClient, __options) {
702
+ function provisionProgram3(httpClient) {
1576
703
  return (poolDefinitionLookupId, options) => provisionProgram2(
1577
704
  poolDefinitionLookupId,
1578
705
  options,
1579
706
  // @ts-ignore
1580
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
707
+ { httpClient }
1581
708
  );
1582
709
  }
1583
- function renewProgram3(httpClient, __options) {
710
+ function renewProgram3(httpClient) {
1584
711
  return (programId, options) => renewProgram2(
1585
712
  programId,
1586
713
  options,
1587
714
  // @ts-ignore
1588
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
715
+ { httpClient }
1589
716
  );
1590
717
  }
1591
- function pauseProgram3(httpClient, __options) {
718
+ function pauseProgram3(httpClient) {
1592
719
  return (programId, options) => pauseProgram2(
1593
720
  programId,
1594
721
  options,
1595
722
  // @ts-ignore
1596
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
723
+ { httpClient }
1597
724
  );
1598
725
  }
1599
- function resumeProgram3(httpClient, __options) {
726
+ function resumeProgram3(httpClient) {
1600
727
  return (programId, options) => resumeProgram2(
1601
728
  programId,
1602
729
  options,
1603
730
  // @ts-ignore
1604
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
731
+ { httpClient }
1605
732
  );
1606
733
  }
1607
- function endProgram3(httpClient, __options) {
734
+ function endProgram3(httpClient) {
1608
735
  return (programId) => endProgram2(
1609
736
  programId,
1610
737
  // @ts-ignore
1611
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
738
+ { httpClient }
1612
739
  );
1613
740
  }
1614
- function updateProgram3(httpClient, __options) {
741
+ function updateProgram3(httpClient) {
1615
742
  return (_id, program) => updateProgram2(
1616
743
  _id,
1617
744
  program,
1618
745
  // @ts-ignore
1619
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
746
+ { httpClient }
1620
747
  );
1621
748
  }
1622
- function getProgram3(httpClient, __options) {
749
+ function getProgram3(httpClient) {
1623
750
  return (programId) => getProgram2(
1624
751
  programId,
1625
752
  // @ts-ignore
1626
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
753
+ { httpClient }
1627
754
  );
1628
755
  }
1629
- function queryPrograms3(httpClient, __options) {
756
+ function queryPrograms3(httpClient) {
1630
757
  return () => queryPrograms2(
1631
758
  // @ts-ignore
1632
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
759
+ { httpClient }
1633
760
  );
1634
761
  }
1635
- function typedQueryPrograms2(httpClient, __options) {
762
+ function typedQueryPrograms2(httpClient) {
1636
763
  return (query) => typedQueryPrograms(
1637
764
  query,
1638
765
  // @ts-ignore
1639
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
766
+ { httpClient }
1640
767
  );
1641
768
  }
1642
- function getProgramByExternalIdAndNamespace3(httpClient, __options) {
769
+ function getProgramByExternalIdAndNamespace3(httpClient) {
1643
770
  return (namespace, options) => getProgramByExternalIdAndNamespace2(
1644
771
  namespace,
1645
772
  options,
1646
773
  // @ts-ignore
1647
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
774
+ { httpClient }
1648
775
  );
1649
776
  }
1650
777