@wix/auto_sdk_benefit-programs_pool-definitions 1.0.58 → 1.0.59
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 +10 -30
- package/build/cjs/index.js +35 -1449
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +11 -1425
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.d.ts +8 -8
- package/build/es/index.d.mts +10 -30
- package/build/es/index.mjs +35 -1439
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +11 -1415
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.d.mts +8 -8
- package/build/internal/cjs/index.d.ts +10 -30
- package/build/internal/cjs/index.js +35 -1449
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +11 -1425
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +8 -8
- package/build/internal/es/index.d.mts +10 -30
- package/build/internal/es/index.mjs +35 -1439
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +11 -1415
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +8 -8
- package/package.json +2 -2
|
@@ -517,1365 +517,6 @@ function findPoolDefinitionsByProgramDefinition(payload) {
|
|
|
517
517
|
|
|
518
518
|
// src/benefit-programs-v1-pool-definition-pool-definitions.universal.ts
|
|
519
519
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
520
|
-
|
|
521
|
-
// src/benefit-programs-v1-pool-definition-pool-definitions.schemas.ts
|
|
522
|
-
import * as z from "zod";
|
|
523
|
-
var CreatePoolDefinitionRequest = z.object({
|
|
524
|
-
poolDefinition: z.object({
|
|
525
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
526
|
-
/^[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}$/,
|
|
527
|
-
"Must be a valid GUID"
|
|
528
|
-
).optional().nullable(),
|
|
529
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
530
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
531
|
-
).optional().nullable(),
|
|
532
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
533
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
534
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
535
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
536
|
-
details: z.object({
|
|
537
|
-
benefits: z.array(
|
|
538
|
-
z.object({
|
|
539
|
-
benefitKey: z.string().describe(
|
|
540
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
541
|
-
).max(64),
|
|
542
|
-
itemSetId: z.string().describe(
|
|
543
|
-
"ID that is used to associated items with this benefit."
|
|
544
|
-
).regex(
|
|
545
|
-
/^[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}$/,
|
|
546
|
-
"Must be a valid GUID"
|
|
547
|
-
).optional().nullable(),
|
|
548
|
-
price: z.string().describe(
|
|
549
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
550
|
-
).optional().nullable(),
|
|
551
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
552
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
553
|
-
/^[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}$/,
|
|
554
|
-
"Must be a valid GUID"
|
|
555
|
-
),
|
|
556
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
557
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
558
|
-
})
|
|
559
|
-
).max(10),
|
|
560
|
-
creditConfiguration: z.object({
|
|
561
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
562
|
-
rolloverConfiguration: z.object({
|
|
563
|
-
enabled: z.boolean().describe(
|
|
564
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
565
|
-
).optional().nullable(),
|
|
566
|
-
balanceCap: z.string().describe(
|
|
567
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
568
|
-
).optional().nullable()
|
|
569
|
-
}).describe("Rollover settings.").optional(),
|
|
570
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
571
|
-
}).describe(
|
|
572
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
573
|
-
).optional(),
|
|
574
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
575
|
-
}).describe("Pool definition benefits and settings."),
|
|
576
|
-
namespace: z.string().describe(
|
|
577
|
-
"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."
|
|
578
|
-
).min(1).max(20),
|
|
579
|
-
extendedFields: z.object({
|
|
580
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
581
|
-
"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)."
|
|
582
|
-
).optional()
|
|
583
|
-
}).describe(
|
|
584
|
-
"Custom field data for the pool definition 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."
|
|
585
|
-
).optional(),
|
|
586
|
-
programDefinitions: z.array(
|
|
587
|
-
z.object({
|
|
588
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
589
|
-
/^[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}$/,
|
|
590
|
-
"Must be a valid GUID"
|
|
591
|
-
).optional(),
|
|
592
|
-
externalId: z.string().describe("Program definition external ID.").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
|
-
).optional().nullable()
|
|
596
|
-
})
|
|
597
|
-
).max(20).optional()
|
|
598
|
-
}).describe("Pool definition to create."),
|
|
599
|
-
options: z.object({
|
|
600
|
-
cascade: z.enum([
|
|
601
|
-
"UNKNOWN_CASCADE",
|
|
602
|
-
"IMMEDIATELY",
|
|
603
|
-
"NEXT_RENEWAL",
|
|
604
|
-
"FUTURE_PROVISIONS"
|
|
605
|
-
]).optional()
|
|
606
|
-
}).optional()
|
|
607
|
-
});
|
|
608
|
-
var CreatePoolDefinitionResponse = z.object({
|
|
609
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
610
|
-
/^[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}$/,
|
|
611
|
-
"Must be a valid GUID"
|
|
612
|
-
).optional().nullable(),
|
|
613
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
614
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
615
|
-
).optional().nullable(),
|
|
616
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
617
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
618
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
619
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
620
|
-
details: z.object({
|
|
621
|
-
benefits: z.array(
|
|
622
|
-
z.object({
|
|
623
|
-
benefitKey: z.string().describe(
|
|
624
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
625
|
-
).max(64).optional(),
|
|
626
|
-
itemSetId: z.string().describe(
|
|
627
|
-
"ID that is used to associated items with this benefit."
|
|
628
|
-
).regex(
|
|
629
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
630
|
-
"Must be a valid GUID"
|
|
631
|
-
).optional().nullable(),
|
|
632
|
-
price: z.string().describe(
|
|
633
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
634
|
-
).optional().nullable(),
|
|
635
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
636
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
637
|
-
/^[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}$/,
|
|
638
|
-
"Must be a valid GUID"
|
|
639
|
-
).optional().nullable(),
|
|
640
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
641
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
642
|
-
})
|
|
643
|
-
).max(10).optional(),
|
|
644
|
-
creditConfiguration: z.object({
|
|
645
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
646
|
-
rolloverConfiguration: z.object({
|
|
647
|
-
enabled: z.boolean().describe(
|
|
648
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
649
|
-
).optional().nullable(),
|
|
650
|
-
balanceCap: z.string().describe(
|
|
651
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
652
|
-
).optional().nullable()
|
|
653
|
-
}).describe("Rollover settings.").optional(),
|
|
654
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
655
|
-
}).describe(
|
|
656
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
657
|
-
).optional(),
|
|
658
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
659
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
660
|
-
namespace: z.string().describe(
|
|
661
|
-
"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."
|
|
662
|
-
).min(1).max(20).optional().nullable(),
|
|
663
|
-
extendedFields: z.object({
|
|
664
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
665
|
-
"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)."
|
|
666
|
-
).optional()
|
|
667
|
-
}).describe(
|
|
668
|
-
"Custom field data for the pool definition 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."
|
|
669
|
-
).optional(),
|
|
670
|
-
programDefinitions: z.array(
|
|
671
|
-
z.object({
|
|
672
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
673
|
-
/^[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}$/,
|
|
674
|
-
"Must be a valid GUID"
|
|
675
|
-
).optional(),
|
|
676
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
677
|
-
/^[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}$/,
|
|
678
|
-
"Must be a valid GUID"
|
|
679
|
-
).optional().nullable()
|
|
680
|
-
})
|
|
681
|
-
).max(20).optional()
|
|
682
|
-
});
|
|
683
|
-
var BulkCreatePoolDefinitionsRequest = z.object({
|
|
684
|
-
poolDefinitions: z.array(
|
|
685
|
-
z.object({
|
|
686
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
687
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
688
|
-
"Must be a valid GUID"
|
|
689
|
-
).optional().nullable(),
|
|
690
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
691
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
692
|
-
).optional().nullable(),
|
|
693
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
694
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
695
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
696
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
697
|
-
details: z.object({
|
|
698
|
-
benefits: z.array(
|
|
699
|
-
z.object({
|
|
700
|
-
benefitKey: z.string().describe(
|
|
701
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
702
|
-
).max(64),
|
|
703
|
-
itemSetId: z.string().describe(
|
|
704
|
-
"ID that is used to associated items with this benefit."
|
|
705
|
-
).regex(
|
|
706
|
-
/^[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}$/,
|
|
707
|
-
"Must be a valid GUID"
|
|
708
|
-
).optional().nullable(),
|
|
709
|
-
price: z.string().describe(
|
|
710
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
711
|
-
).optional().nullable(),
|
|
712
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
713
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
714
|
-
/^[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}$/,
|
|
715
|
-
"Must be a valid GUID"
|
|
716
|
-
),
|
|
717
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
718
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
719
|
-
})
|
|
720
|
-
).max(10),
|
|
721
|
-
creditConfiguration: z.object({
|
|
722
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
723
|
-
rolloverConfiguration: z.object({
|
|
724
|
-
enabled: z.boolean().describe(
|
|
725
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
726
|
-
).optional().nullable(),
|
|
727
|
-
balanceCap: z.string().describe(
|
|
728
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
729
|
-
).optional().nullable()
|
|
730
|
-
}).describe("Rollover settings.").optional(),
|
|
731
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
732
|
-
}).describe(
|
|
733
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
734
|
-
).optional(),
|
|
735
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
736
|
-
}).describe("Pool definition benefits and settings."),
|
|
737
|
-
namespace: z.string().describe(
|
|
738
|
-
"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."
|
|
739
|
-
).min(1).max(20),
|
|
740
|
-
extendedFields: z.object({
|
|
741
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
742
|
-
"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)."
|
|
743
|
-
).optional()
|
|
744
|
-
}).describe(
|
|
745
|
-
"Custom field data for the pool definition 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."
|
|
746
|
-
).optional(),
|
|
747
|
-
programDefinitions: z.array(
|
|
748
|
-
z.object({
|
|
749
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
750
|
-
/^[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}$/,
|
|
751
|
-
"Must be a valid GUID"
|
|
752
|
-
).optional(),
|
|
753
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
754
|
-
/^[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}$/,
|
|
755
|
-
"Must be a valid GUID"
|
|
756
|
-
).optional().nullable()
|
|
757
|
-
})
|
|
758
|
-
).max(20).optional()
|
|
759
|
-
})
|
|
760
|
-
).min(1).max(100),
|
|
761
|
-
options: z.object({
|
|
762
|
-
cascade: z.enum([
|
|
763
|
-
"UNKNOWN_CASCADE",
|
|
764
|
-
"IMMEDIATELY",
|
|
765
|
-
"NEXT_RENEWAL",
|
|
766
|
-
"FUTURE_PROVISIONS"
|
|
767
|
-
]).optional(),
|
|
768
|
-
returnEntity: z.boolean().describe(
|
|
769
|
-
"Whether to return the created pool definitions.\n\nDefault: `false`"
|
|
770
|
-
).optional()
|
|
771
|
-
}).optional()
|
|
772
|
-
});
|
|
773
|
-
var BulkCreatePoolDefinitionsResponse = z.object({
|
|
774
|
-
results: z.array(
|
|
775
|
-
z.object({
|
|
776
|
-
itemMetadata: z.object({
|
|
777
|
-
_id: z.string().describe(
|
|
778
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
779
|
-
).regex(
|
|
780
|
-
/^[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}$/,
|
|
781
|
-
"Must be a valid GUID"
|
|
782
|
-
).optional().nullable(),
|
|
783
|
-
originalIndex: z.number().int().describe(
|
|
784
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
785
|
-
).optional(),
|
|
786
|
-
success: z.boolean().describe(
|
|
787
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
788
|
-
).optional(),
|
|
789
|
-
error: z.object({
|
|
790
|
-
code: z.string().describe("Error code.").optional(),
|
|
791
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
792
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
793
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
794
|
-
}).describe("Item metadata.").optional(),
|
|
795
|
-
item: z.object({
|
|
796
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
797
|
-
/^[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}$/,
|
|
798
|
-
"Must be a valid GUID"
|
|
799
|
-
).optional().nullable(),
|
|
800
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
801
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
802
|
-
).optional().nullable(),
|
|
803
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
804
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
805
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
806
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
807
|
-
details: z.object({
|
|
808
|
-
benefits: z.array(
|
|
809
|
-
z.object({
|
|
810
|
-
benefitKey: z.string().describe(
|
|
811
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
812
|
-
).max(64).optional(),
|
|
813
|
-
itemSetId: z.string().describe(
|
|
814
|
-
"ID that is used to associated items with this benefit."
|
|
815
|
-
).regex(
|
|
816
|
-
/^[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}$/,
|
|
817
|
-
"Must be a valid GUID"
|
|
818
|
-
).optional().nullable(),
|
|
819
|
-
price: z.string().describe(
|
|
820
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
821
|
-
).optional().nullable(),
|
|
822
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
823
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
824
|
-
/^[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}$/,
|
|
825
|
-
"Must be a valid GUID"
|
|
826
|
-
).optional().nullable(),
|
|
827
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
828
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
829
|
-
})
|
|
830
|
-
).max(10).optional(),
|
|
831
|
-
creditConfiguration: z.object({
|
|
832
|
-
amount: z.string().describe(
|
|
833
|
-
"Initial available amount for associated balances."
|
|
834
|
-
).optional(),
|
|
835
|
-
rolloverConfiguration: z.object({
|
|
836
|
-
enabled: z.boolean().describe(
|
|
837
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
838
|
-
).optional().nullable(),
|
|
839
|
-
balanceCap: z.string().describe(
|
|
840
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
841
|
-
).optional().nullable()
|
|
842
|
-
}).describe("Rollover settings.").optional(),
|
|
843
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
844
|
-
}).describe(
|
|
845
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
846
|
-
).optional(),
|
|
847
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
848
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
849
|
-
namespace: z.string().describe(
|
|
850
|
-
"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."
|
|
851
|
-
).min(1).max(20).optional().nullable(),
|
|
852
|
-
extendedFields: z.object({
|
|
853
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
854
|
-
"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)."
|
|
855
|
-
).optional()
|
|
856
|
-
}).describe(
|
|
857
|
-
"Custom field data for the pool definition 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."
|
|
858
|
-
).optional(),
|
|
859
|
-
programDefinitions: z.array(
|
|
860
|
-
z.object({
|
|
861
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
862
|
-
/^[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}$/,
|
|
863
|
-
"Must be a valid GUID"
|
|
864
|
-
).optional(),
|
|
865
|
-
externalId: z.string().describe("Program definition external ID.").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
|
-
})
|
|
870
|
-
).max(20).optional()
|
|
871
|
-
}).describe("Pool definition.").optional()
|
|
872
|
-
})
|
|
873
|
-
).min(1).max(100).optional(),
|
|
874
|
-
bulkActionMetadata: z.object({
|
|
875
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
876
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
877
|
-
undetailedFailures: z.number().int().describe(
|
|
878
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
879
|
-
).optional()
|
|
880
|
-
}).describe("Bulk action metadata.").optional()
|
|
881
|
-
});
|
|
882
|
-
var UpdatePoolDefinitionRequest = z.object({
|
|
883
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
884
|
-
/^[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}$/,
|
|
885
|
-
"Must be a valid GUID"
|
|
886
|
-
),
|
|
887
|
-
poolDefinition: z.object({
|
|
888
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
889
|
-
/^[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}$/,
|
|
890
|
-
"Must be a valid GUID"
|
|
891
|
-
).optional().nullable(),
|
|
892
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
893
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
894
|
-
),
|
|
895
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
896
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
897
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
898
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
899
|
-
details: z.object({
|
|
900
|
-
benefits: z.array(
|
|
901
|
-
z.object({
|
|
902
|
-
benefitKey: z.string().describe(
|
|
903
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
904
|
-
).max(64).optional(),
|
|
905
|
-
itemSetId: z.string().describe(
|
|
906
|
-
"ID that is used to associated items with this benefit."
|
|
907
|
-
).regex(
|
|
908
|
-
/^[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
|
-
"Must be a valid GUID"
|
|
910
|
-
).optional().nullable(),
|
|
911
|
-
price: z.string().describe(
|
|
912
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
913
|
-
).optional().nullable(),
|
|
914
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
915
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
916
|
-
/^[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}$/,
|
|
917
|
-
"Must be a valid GUID"
|
|
918
|
-
).optional().nullable(),
|
|
919
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
920
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
921
|
-
})
|
|
922
|
-
).max(10).optional(),
|
|
923
|
-
creditConfiguration: z.object({
|
|
924
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
925
|
-
rolloverConfiguration: z.object({
|
|
926
|
-
enabled: z.boolean().describe(
|
|
927
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
928
|
-
).optional().nullable(),
|
|
929
|
-
balanceCap: z.string().describe(
|
|
930
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
931
|
-
).optional().nullable()
|
|
932
|
-
}).describe("Rollover settings.").optional(),
|
|
933
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
934
|
-
}).describe(
|
|
935
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
936
|
-
).optional(),
|
|
937
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
938
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
939
|
-
namespace: z.string().describe(
|
|
940
|
-
"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."
|
|
941
|
-
).min(1).max(20).optional().nullable(),
|
|
942
|
-
extendedFields: z.object({
|
|
943
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
944
|
-
"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)."
|
|
945
|
-
).optional()
|
|
946
|
-
}).describe(
|
|
947
|
-
"Custom field data for the pool definition 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."
|
|
948
|
-
).optional(),
|
|
949
|
-
programDefinitions: z.array(
|
|
950
|
-
z.object({
|
|
951
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
952
|
-
/^[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}$/,
|
|
953
|
-
"Must be a valid GUID"
|
|
954
|
-
).optional(),
|
|
955
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
956
|
-
/^[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}$/,
|
|
957
|
-
"Must be a valid GUID"
|
|
958
|
-
).optional().nullable()
|
|
959
|
-
})
|
|
960
|
-
).max(20).optional()
|
|
961
|
-
}).describe("Pool definition to update."),
|
|
962
|
-
options: z.object({
|
|
963
|
-
cascade: z.enum([
|
|
964
|
-
"UNKNOWN_CASCADE",
|
|
965
|
-
"IMMEDIATELY",
|
|
966
|
-
"NEXT_RENEWAL",
|
|
967
|
-
"FUTURE_PROVISIONS"
|
|
968
|
-
]).optional()
|
|
969
|
-
}).optional()
|
|
970
|
-
});
|
|
971
|
-
var UpdatePoolDefinitionResponse = z.object({
|
|
972
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
973
|
-
/^[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}$/,
|
|
974
|
-
"Must be a valid GUID"
|
|
975
|
-
).optional().nullable(),
|
|
976
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
977
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
978
|
-
).optional().nullable(),
|
|
979
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
980
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
981
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
982
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
983
|
-
details: z.object({
|
|
984
|
-
benefits: z.array(
|
|
985
|
-
z.object({
|
|
986
|
-
benefitKey: z.string().describe(
|
|
987
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
988
|
-
).max(64).optional(),
|
|
989
|
-
itemSetId: z.string().describe(
|
|
990
|
-
"ID that is used to associated items with this benefit."
|
|
991
|
-
).regex(
|
|
992
|
-
/^[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}$/,
|
|
993
|
-
"Must be a valid GUID"
|
|
994
|
-
).optional().nullable(),
|
|
995
|
-
price: z.string().describe(
|
|
996
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
997
|
-
).optional().nullable(),
|
|
998
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
999
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1000
|
-
/^[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}$/,
|
|
1001
|
-
"Must be a valid GUID"
|
|
1002
|
-
).optional().nullable(),
|
|
1003
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1004
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1005
|
-
})
|
|
1006
|
-
).max(10).optional(),
|
|
1007
|
-
creditConfiguration: z.object({
|
|
1008
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1009
|
-
rolloverConfiguration: z.object({
|
|
1010
|
-
enabled: z.boolean().describe(
|
|
1011
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1012
|
-
).optional().nullable(),
|
|
1013
|
-
balanceCap: z.string().describe(
|
|
1014
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1015
|
-
).optional().nullable()
|
|
1016
|
-
}).describe("Rollover settings.").optional(),
|
|
1017
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1018
|
-
}).describe(
|
|
1019
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1020
|
-
).optional(),
|
|
1021
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1022
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1023
|
-
namespace: z.string().describe(
|
|
1024
|
-
"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."
|
|
1025
|
-
).min(1).max(20).optional().nullable(),
|
|
1026
|
-
extendedFields: z.object({
|
|
1027
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1028
|
-
"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)."
|
|
1029
|
-
).optional()
|
|
1030
|
-
}).describe(
|
|
1031
|
-
"Custom field data for the pool definition 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."
|
|
1032
|
-
).optional(),
|
|
1033
|
-
programDefinitions: z.array(
|
|
1034
|
-
z.object({
|
|
1035
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1036
|
-
/^[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}$/,
|
|
1037
|
-
"Must be a valid GUID"
|
|
1038
|
-
).optional(),
|
|
1039
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1040
|
-
/^[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}$/,
|
|
1041
|
-
"Must be a valid GUID"
|
|
1042
|
-
).optional().nullable()
|
|
1043
|
-
})
|
|
1044
|
-
).max(20).optional()
|
|
1045
|
-
});
|
|
1046
|
-
var BulkUpdatePoolDefinitionsRequest = z.object({
|
|
1047
|
-
options: z.object({
|
|
1048
|
-
poolDefinitions: z.array(
|
|
1049
|
-
z.object({
|
|
1050
|
-
poolDefinition: z.object({
|
|
1051
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1052
|
-
/^[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}$/,
|
|
1053
|
-
"Must be a valid GUID"
|
|
1054
|
-
),
|
|
1055
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1056
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1057
|
-
),
|
|
1058
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1059
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1060
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1061
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1062
|
-
details: z.object({
|
|
1063
|
-
benefits: z.array(
|
|
1064
|
-
z.object({
|
|
1065
|
-
benefitKey: z.string().describe(
|
|
1066
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1067
|
-
).max(64).optional(),
|
|
1068
|
-
itemSetId: z.string().describe(
|
|
1069
|
-
"ID that is used to associated items with this benefit."
|
|
1070
|
-
).regex(
|
|
1071
|
-
/^[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}$/,
|
|
1072
|
-
"Must be a valid GUID"
|
|
1073
|
-
).optional().nullable(),
|
|
1074
|
-
price: z.string().describe(
|
|
1075
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1076
|
-
).optional().nullable(),
|
|
1077
|
-
additionalData: z.record(z.string(), z.any()).describe(
|
|
1078
|
-
"Additional information for this benefit."
|
|
1079
|
-
).optional().nullable(),
|
|
1080
|
-
providerAppId: z.string().describe(
|
|
1081
|
-
"ID of the app providing the benefit items."
|
|
1082
|
-
).regex(
|
|
1083
|
-
/^[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}$/,
|
|
1084
|
-
"Must be a valid GUID"
|
|
1085
|
-
).optional().nullable(),
|
|
1086
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1087
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1088
|
-
})
|
|
1089
|
-
).max(10).optional(),
|
|
1090
|
-
creditConfiguration: z.object({
|
|
1091
|
-
amount: z.string().describe(
|
|
1092
|
-
"Initial available amount for associated balances."
|
|
1093
|
-
).optional(),
|
|
1094
|
-
rolloverConfiguration: z.object({
|
|
1095
|
-
enabled: z.boolean().describe(
|
|
1096
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1097
|
-
).optional().nullable(),
|
|
1098
|
-
balanceCap: z.string().describe(
|
|
1099
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1100
|
-
).optional().nullable()
|
|
1101
|
-
}).describe("Rollover settings.").optional(),
|
|
1102
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1103
|
-
}).describe(
|
|
1104
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1105
|
-
).optional(),
|
|
1106
|
-
additionalData: z.record(z.string(), z.any()).describe(
|
|
1107
|
-
"Additional information relating to this object."
|
|
1108
|
-
).optional().nullable()
|
|
1109
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1110
|
-
namespace: z.string().describe(
|
|
1111
|
-
"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."
|
|
1112
|
-
).min(1).max(20).optional().nullable(),
|
|
1113
|
-
extendedFields: z.object({
|
|
1114
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1115
|
-
"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)."
|
|
1116
|
-
).optional()
|
|
1117
|
-
}).describe(
|
|
1118
|
-
"Custom field data for the pool definition 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."
|
|
1119
|
-
).optional(),
|
|
1120
|
-
programDefinitions: z.array(
|
|
1121
|
-
z.object({
|
|
1122
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1123
|
-
/^[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}$/,
|
|
1124
|
-
"Must be a valid GUID"
|
|
1125
|
-
).optional(),
|
|
1126
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1127
|
-
/^[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}$/,
|
|
1128
|
-
"Must be a valid GUID"
|
|
1129
|
-
).optional().nullable()
|
|
1130
|
-
})
|
|
1131
|
-
).max(20).optional()
|
|
1132
|
-
}).describe("Pool definition to update."),
|
|
1133
|
-
fieldMask: z.array(z.string()).optional()
|
|
1134
|
-
})
|
|
1135
|
-
).min(1).max(100).optional(),
|
|
1136
|
-
cascade: z.enum([
|
|
1137
|
-
"UNKNOWN_CASCADE",
|
|
1138
|
-
"IMMEDIATELY",
|
|
1139
|
-
"NEXT_RENEWAL",
|
|
1140
|
-
"FUTURE_PROVISIONS"
|
|
1141
|
-
]).optional(),
|
|
1142
|
-
returnEntity: z.boolean().describe(
|
|
1143
|
-
"Whether to return the updated pool definitions.\n\nDefault: `false`"
|
|
1144
|
-
).optional()
|
|
1145
|
-
}).optional()
|
|
1146
|
-
});
|
|
1147
|
-
var BulkUpdatePoolDefinitionsResponse = z.object({
|
|
1148
|
-
results: z.array(
|
|
1149
|
-
z.object({
|
|
1150
|
-
itemMetadata: z.object({
|
|
1151
|
-
_id: z.string().describe(
|
|
1152
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1153
|
-
).regex(
|
|
1154
|
-
/^[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}$/,
|
|
1155
|
-
"Must be a valid GUID"
|
|
1156
|
-
).optional().nullable(),
|
|
1157
|
-
originalIndex: z.number().int().describe(
|
|
1158
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1159
|
-
).optional(),
|
|
1160
|
-
success: z.boolean().describe(
|
|
1161
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1162
|
-
).optional(),
|
|
1163
|
-
error: z.object({
|
|
1164
|
-
code: z.string().describe("Error code.").optional(),
|
|
1165
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1166
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1167
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1168
|
-
}).describe("Item metadata.").optional(),
|
|
1169
|
-
item: z.object({
|
|
1170
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1171
|
-
/^[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}$/,
|
|
1172
|
-
"Must be a valid GUID"
|
|
1173
|
-
).optional().nullable(),
|
|
1174
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1175
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1176
|
-
).optional().nullable(),
|
|
1177
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1178
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1179
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1180
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1181
|
-
details: z.object({
|
|
1182
|
-
benefits: z.array(
|
|
1183
|
-
z.object({
|
|
1184
|
-
benefitKey: z.string().describe(
|
|
1185
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1186
|
-
).max(64).optional(),
|
|
1187
|
-
itemSetId: z.string().describe(
|
|
1188
|
-
"ID that is used to associated items with this benefit."
|
|
1189
|
-
).regex(
|
|
1190
|
-
/^[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}$/,
|
|
1191
|
-
"Must be a valid GUID"
|
|
1192
|
-
).optional().nullable(),
|
|
1193
|
-
price: z.string().describe(
|
|
1194
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1195
|
-
).optional().nullable(),
|
|
1196
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1197
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1198
|
-
/^[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}$/,
|
|
1199
|
-
"Must be a valid GUID"
|
|
1200
|
-
).optional().nullable(),
|
|
1201
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1202
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1203
|
-
})
|
|
1204
|
-
).max(10).optional(),
|
|
1205
|
-
creditConfiguration: z.object({
|
|
1206
|
-
amount: z.string().describe(
|
|
1207
|
-
"Initial available amount for associated balances."
|
|
1208
|
-
).optional(),
|
|
1209
|
-
rolloverConfiguration: z.object({
|
|
1210
|
-
enabled: z.boolean().describe(
|
|
1211
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1212
|
-
).optional().nullable(),
|
|
1213
|
-
balanceCap: z.string().describe(
|
|
1214
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1215
|
-
).optional().nullable()
|
|
1216
|
-
}).describe("Rollover settings.").optional(),
|
|
1217
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1218
|
-
}).describe(
|
|
1219
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1220
|
-
).optional(),
|
|
1221
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1222
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1223
|
-
namespace: z.string().describe(
|
|
1224
|
-
"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."
|
|
1225
|
-
).min(1).max(20).optional().nullable(),
|
|
1226
|
-
extendedFields: z.object({
|
|
1227
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1228
|
-
"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)."
|
|
1229
|
-
).optional()
|
|
1230
|
-
}).describe(
|
|
1231
|
-
"Custom field data for the pool definition 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."
|
|
1232
|
-
).optional(),
|
|
1233
|
-
programDefinitions: z.array(
|
|
1234
|
-
z.object({
|
|
1235
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1236
|
-
/^[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}$/,
|
|
1237
|
-
"Must be a valid GUID"
|
|
1238
|
-
).optional(),
|
|
1239
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1240
|
-
/^[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}$/,
|
|
1241
|
-
"Must be a valid GUID"
|
|
1242
|
-
).optional().nullable()
|
|
1243
|
-
})
|
|
1244
|
-
).max(20).optional()
|
|
1245
|
-
}).describe("Pool definition.").optional()
|
|
1246
|
-
})
|
|
1247
|
-
).min(1).max(100).optional(),
|
|
1248
|
-
bulkActionMetadata: z.object({
|
|
1249
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1250
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1251
|
-
undetailedFailures: z.number().int().describe(
|
|
1252
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1253
|
-
).optional()
|
|
1254
|
-
}).describe("Bulk action metadata.").optional()
|
|
1255
|
-
});
|
|
1256
|
-
var DeletePoolDefinitionRequest = z.object({
|
|
1257
|
-
poolDefinitionId: z.string().describe("ID of the pool definition to delete.").regex(
|
|
1258
|
-
/^[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}$/,
|
|
1259
|
-
"Must be a valid GUID"
|
|
1260
|
-
),
|
|
1261
|
-
cascade: z.enum([
|
|
1262
|
-
"UNKNOWN_CASCADE",
|
|
1263
|
-
"IMMEDIATELY",
|
|
1264
|
-
"NEXT_RENEWAL",
|
|
1265
|
-
"FUTURE_PROVISIONS"
|
|
1266
|
-
])
|
|
1267
|
-
});
|
|
1268
|
-
var DeletePoolDefinitionResponse = z.object({});
|
|
1269
|
-
var BulkDeletePoolDefinitionsRequest = z.object({
|
|
1270
|
-
poolDefinitionIds: z.array(z.string()).min(1).max(100),
|
|
1271
|
-
options: z.object({
|
|
1272
|
-
cascade: z.enum([
|
|
1273
|
-
"UNKNOWN_CASCADE",
|
|
1274
|
-
"IMMEDIATELY",
|
|
1275
|
-
"NEXT_RENEWAL",
|
|
1276
|
-
"FUTURE_PROVISIONS"
|
|
1277
|
-
]).optional()
|
|
1278
|
-
}).optional()
|
|
1279
|
-
});
|
|
1280
|
-
var BulkDeletePoolDefinitionsResponse = z.object({
|
|
1281
|
-
results: z.array(
|
|
1282
|
-
z.object({
|
|
1283
|
-
itemMetadata: z.object({
|
|
1284
|
-
_id: z.string().describe(
|
|
1285
|
-
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1286
|
-
).regex(
|
|
1287
|
-
/^[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}$/,
|
|
1288
|
-
"Must be a valid GUID"
|
|
1289
|
-
).optional().nullable(),
|
|
1290
|
-
originalIndex: z.number().int().describe(
|
|
1291
|
-
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1292
|
-
).optional(),
|
|
1293
|
-
success: z.boolean().describe(
|
|
1294
|
-
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1295
|
-
).optional(),
|
|
1296
|
-
error: z.object({
|
|
1297
|
-
code: z.string().describe("Error code.").optional(),
|
|
1298
|
-
description: z.string().describe("Description of the error.").optional(),
|
|
1299
|
-
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1300
|
-
}).describe("Details about the error in case of failure.").optional()
|
|
1301
|
-
}).describe("Item metadata.").optional(),
|
|
1302
|
-
item: z.object({
|
|
1303
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1304
|
-
/^[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}$/,
|
|
1305
|
-
"Must be a valid GUID"
|
|
1306
|
-
).optional().nullable(),
|
|
1307
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1308
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1309
|
-
).optional().nullable(),
|
|
1310
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1311
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1312
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1313
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1314
|
-
details: z.object({
|
|
1315
|
-
benefits: z.array(
|
|
1316
|
-
z.object({
|
|
1317
|
-
benefitKey: z.string().describe(
|
|
1318
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1319
|
-
).max(64).optional(),
|
|
1320
|
-
itemSetId: z.string().describe(
|
|
1321
|
-
"ID that is used to associated items with this benefit."
|
|
1322
|
-
).regex(
|
|
1323
|
-
/^[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}$/,
|
|
1324
|
-
"Must be a valid GUID"
|
|
1325
|
-
).optional().nullable(),
|
|
1326
|
-
price: z.string().describe(
|
|
1327
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1328
|
-
).optional().nullable(),
|
|
1329
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1330
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1331
|
-
/^[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}$/,
|
|
1332
|
-
"Must be a valid GUID"
|
|
1333
|
-
).optional().nullable(),
|
|
1334
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1335
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1336
|
-
})
|
|
1337
|
-
).max(10).optional(),
|
|
1338
|
-
creditConfiguration: z.object({
|
|
1339
|
-
amount: z.string().describe(
|
|
1340
|
-
"Initial available amount for associated balances."
|
|
1341
|
-
).optional(),
|
|
1342
|
-
rolloverConfiguration: z.object({
|
|
1343
|
-
enabled: z.boolean().describe(
|
|
1344
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1345
|
-
).optional().nullable(),
|
|
1346
|
-
balanceCap: z.string().describe(
|
|
1347
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1348
|
-
).optional().nullable()
|
|
1349
|
-
}).describe("Rollover settings.").optional(),
|
|
1350
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1351
|
-
}).describe(
|
|
1352
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1353
|
-
).optional(),
|
|
1354
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1355
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1356
|
-
namespace: z.string().describe(
|
|
1357
|
-
"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."
|
|
1358
|
-
).min(1).max(20).optional().nullable(),
|
|
1359
|
-
extendedFields: z.object({
|
|
1360
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1361
|
-
"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)."
|
|
1362
|
-
).optional()
|
|
1363
|
-
}).describe(
|
|
1364
|
-
"Custom field data for the pool definition 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."
|
|
1365
|
-
).optional(),
|
|
1366
|
-
programDefinitions: z.array(
|
|
1367
|
-
z.object({
|
|
1368
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1369
|
-
/^[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}$/,
|
|
1370
|
-
"Must be a valid GUID"
|
|
1371
|
-
).optional(),
|
|
1372
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1373
|
-
/^[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}$/,
|
|
1374
|
-
"Must be a valid GUID"
|
|
1375
|
-
).optional().nullable()
|
|
1376
|
-
})
|
|
1377
|
-
).max(20).optional()
|
|
1378
|
-
}).describe("Pool definition.").optional()
|
|
1379
|
-
})
|
|
1380
|
-
).min(1).max(100).optional(),
|
|
1381
|
-
bulkActionMetadata: z.object({
|
|
1382
|
-
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1383
|
-
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1384
|
-
undetailedFailures: z.number().int().describe(
|
|
1385
|
-
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1386
|
-
).optional()
|
|
1387
|
-
}).describe("Bulk action metadata.").optional()
|
|
1388
|
-
});
|
|
1389
|
-
var GetPoolDefinitionRequest = z.object({
|
|
1390
|
-
poolDefinitionId: z.string().describe("ID of the pool definition to retrieve.").regex(
|
|
1391
|
-
/^[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}$/,
|
|
1392
|
-
"Must be a valid GUID"
|
|
1393
|
-
)
|
|
1394
|
-
});
|
|
1395
|
-
var GetPoolDefinitionResponse = z.object({
|
|
1396
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1397
|
-
/^[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}$/,
|
|
1398
|
-
"Must be a valid GUID"
|
|
1399
|
-
).optional().nullable(),
|
|
1400
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1401
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1402
|
-
).optional().nullable(),
|
|
1403
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1404
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1405
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1406
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1407
|
-
details: z.object({
|
|
1408
|
-
benefits: z.array(
|
|
1409
|
-
z.object({
|
|
1410
|
-
benefitKey: z.string().describe(
|
|
1411
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1412
|
-
).max(64).optional(),
|
|
1413
|
-
itemSetId: z.string().describe(
|
|
1414
|
-
"ID that is used to associated items with this benefit."
|
|
1415
|
-
).regex(
|
|
1416
|
-
/^[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}$/,
|
|
1417
|
-
"Must be a valid GUID"
|
|
1418
|
-
).optional().nullable(),
|
|
1419
|
-
price: z.string().describe(
|
|
1420
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1421
|
-
).optional().nullable(),
|
|
1422
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1423
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1424
|
-
/^[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}$/,
|
|
1425
|
-
"Must be a valid GUID"
|
|
1426
|
-
).optional().nullable(),
|
|
1427
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1428
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1429
|
-
})
|
|
1430
|
-
).max(10).optional(),
|
|
1431
|
-
creditConfiguration: z.object({
|
|
1432
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1433
|
-
rolloverConfiguration: z.object({
|
|
1434
|
-
enabled: z.boolean().describe(
|
|
1435
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1436
|
-
).optional().nullable(),
|
|
1437
|
-
balanceCap: z.string().describe(
|
|
1438
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1439
|
-
).optional().nullable()
|
|
1440
|
-
}).describe("Rollover settings.").optional(),
|
|
1441
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1442
|
-
}).describe(
|
|
1443
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1444
|
-
).optional(),
|
|
1445
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1446
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1447
|
-
namespace: z.string().describe(
|
|
1448
|
-
"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."
|
|
1449
|
-
).min(1).max(20).optional().nullable(),
|
|
1450
|
-
extendedFields: z.object({
|
|
1451
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1452
|
-
"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)."
|
|
1453
|
-
).optional()
|
|
1454
|
-
}).describe(
|
|
1455
|
-
"Custom field data for the pool definition 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."
|
|
1456
|
-
).optional(),
|
|
1457
|
-
programDefinitions: z.array(
|
|
1458
|
-
z.object({
|
|
1459
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1460
|
-
/^[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}$/,
|
|
1461
|
-
"Must be a valid GUID"
|
|
1462
|
-
).optional(),
|
|
1463
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1464
|
-
/^[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}$/,
|
|
1465
|
-
"Must be a valid GUID"
|
|
1466
|
-
).optional().nullable()
|
|
1467
|
-
})
|
|
1468
|
-
).max(20).optional()
|
|
1469
|
-
});
|
|
1470
|
-
var QueryPoolDefinitionsRequest = z.object({
|
|
1471
|
-
query: z.intersection(
|
|
1472
|
-
z.object({
|
|
1473
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
1474
|
-
"Filter object.\nSee [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\nfor more information."
|
|
1475
|
-
).optional().nullable(),
|
|
1476
|
-
sort: z.array(
|
|
1477
|
-
z.object({
|
|
1478
|
-
fieldName: z.string().describe("Field to sort by.").max(512).optional(),
|
|
1479
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
1480
|
-
})
|
|
1481
|
-
).max(5).optional()
|
|
1482
|
-
}),
|
|
1483
|
-
z.xor([
|
|
1484
|
-
z.object({ cursorPaging: z.never().optional() }),
|
|
1485
|
-
z.object({
|
|
1486
|
-
cursorPaging: z.object({
|
|
1487
|
-
limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
|
|
1488
|
-
cursor: z.string().describe(
|
|
1489
|
-
"Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
|
|
1490
|
-
).max(16e3).optional().nullable()
|
|
1491
|
-
}).describe(
|
|
1492
|
-
"Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`."
|
|
1493
|
-
)
|
|
1494
|
-
})
|
|
1495
|
-
])
|
|
1496
|
-
).describe("Filter, sort, and paging to apply to the query.")
|
|
1497
|
-
});
|
|
1498
|
-
var QueryPoolDefinitionsResponse = z.object({
|
|
1499
|
-
poolDefinitions: z.array(
|
|
1500
|
-
z.object({
|
|
1501
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1502
|
-
/^[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}$/,
|
|
1503
|
-
"Must be a valid GUID"
|
|
1504
|
-
).optional().nullable(),
|
|
1505
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1506
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1507
|
-
).optional().nullable(),
|
|
1508
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1509
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1510
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1511
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1512
|
-
details: z.object({
|
|
1513
|
-
benefits: z.array(
|
|
1514
|
-
z.object({
|
|
1515
|
-
benefitKey: z.string().describe(
|
|
1516
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1517
|
-
).max(64).optional(),
|
|
1518
|
-
itemSetId: z.string().describe(
|
|
1519
|
-
"ID that is used to associated items with this benefit."
|
|
1520
|
-
).regex(
|
|
1521
|
-
/^[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}$/,
|
|
1522
|
-
"Must be a valid GUID"
|
|
1523
|
-
).optional().nullable(),
|
|
1524
|
-
price: z.string().describe(
|
|
1525
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1526
|
-
).optional().nullable(),
|
|
1527
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1528
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1529
|
-
/^[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}$/,
|
|
1530
|
-
"Must be a valid GUID"
|
|
1531
|
-
).optional().nullable(),
|
|
1532
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1533
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1534
|
-
})
|
|
1535
|
-
).max(10).optional(),
|
|
1536
|
-
creditConfiguration: z.object({
|
|
1537
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1538
|
-
rolloverConfiguration: z.object({
|
|
1539
|
-
enabled: z.boolean().describe(
|
|
1540
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1541
|
-
).optional().nullable(),
|
|
1542
|
-
balanceCap: z.string().describe(
|
|
1543
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1544
|
-
).optional().nullable()
|
|
1545
|
-
}).describe("Rollover settings.").optional(),
|
|
1546
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1547
|
-
}).describe(
|
|
1548
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1549
|
-
).optional(),
|
|
1550
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1551
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1552
|
-
namespace: z.string().describe(
|
|
1553
|
-
"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."
|
|
1554
|
-
).min(1).max(20).optional().nullable(),
|
|
1555
|
-
extendedFields: z.object({
|
|
1556
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1557
|
-
"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)."
|
|
1558
|
-
).optional()
|
|
1559
|
-
}).describe(
|
|
1560
|
-
"Custom field data for the pool definition 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."
|
|
1561
|
-
).optional(),
|
|
1562
|
-
programDefinitions: z.array(
|
|
1563
|
-
z.object({
|
|
1564
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1565
|
-
/^[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}$/,
|
|
1566
|
-
"Must be a valid GUID"
|
|
1567
|
-
).optional(),
|
|
1568
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1569
|
-
/^[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}$/,
|
|
1570
|
-
"Must be a valid GUID"
|
|
1571
|
-
).optional().nullable()
|
|
1572
|
-
})
|
|
1573
|
-
).max(20).optional()
|
|
1574
|
-
})
|
|
1575
|
-
).optional(),
|
|
1576
|
-
metadata: z.object({
|
|
1577
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1578
|
-
cursors: z.object({
|
|
1579
|
-
next: z.string().describe(
|
|
1580
|
-
"Cursor string pointing to the next page in the list of results."
|
|
1581
|
-
).max(16e3).optional().nullable(),
|
|
1582
|
-
prev: z.string().describe(
|
|
1583
|
-
"Cursor pointing to the previous page in the list of results."
|
|
1584
|
-
).max(16e3).optional().nullable()
|
|
1585
|
-
}).describe(
|
|
1586
|
-
"Cursor strings that point to the next page, previous page, or both."
|
|
1587
|
-
).optional(),
|
|
1588
|
-
hasNext: z.boolean().describe(
|
|
1589
|
-
"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."
|
|
1590
|
-
).optional().nullable()
|
|
1591
|
-
}).describe("Metadata for the paginated results.").optional()
|
|
1592
|
-
});
|
|
1593
|
-
var AddPoolDefinitionToProgramDefinitionRequest = z.object({
|
|
1594
|
-
poolDefinitionId: z.string().describe("ID of the pool definition to add to the program definition.").regex(
|
|
1595
|
-
/^[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}$/,
|
|
1596
|
-
"Must be a valid GUID"
|
|
1597
|
-
),
|
|
1598
|
-
options: z.object({
|
|
1599
|
-
programDefinitionId: z.string().describe("ID of the program definition to add the pool definition to.").regex(
|
|
1600
|
-
/^[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}$/,
|
|
1601
|
-
"Must be a valid GUID"
|
|
1602
|
-
),
|
|
1603
|
-
cascade: z.enum([
|
|
1604
|
-
"UNKNOWN_CASCADE",
|
|
1605
|
-
"IMMEDIATELY",
|
|
1606
|
-
"NEXT_RENEWAL",
|
|
1607
|
-
"FUTURE_PROVISIONS"
|
|
1608
|
-
])
|
|
1609
|
-
})
|
|
1610
|
-
});
|
|
1611
|
-
var AddPoolDefinitionToProgramDefinitionResponse = z.object({
|
|
1612
|
-
poolDefinition: z.object({
|
|
1613
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1614
|
-
/^[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}$/,
|
|
1615
|
-
"Must be a valid GUID"
|
|
1616
|
-
).optional().nullable(),
|
|
1617
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1618
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1619
|
-
).optional().nullable(),
|
|
1620
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1621
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1622
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1623
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1624
|
-
details: z.object({
|
|
1625
|
-
benefits: z.array(
|
|
1626
|
-
z.object({
|
|
1627
|
-
benefitKey: z.string().describe(
|
|
1628
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1629
|
-
).max(64).optional(),
|
|
1630
|
-
itemSetId: z.string().describe(
|
|
1631
|
-
"ID that is used to associated items with this benefit."
|
|
1632
|
-
).regex(
|
|
1633
|
-
/^[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}$/,
|
|
1634
|
-
"Must be a valid GUID"
|
|
1635
|
-
).optional().nullable(),
|
|
1636
|
-
price: z.string().describe(
|
|
1637
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1638
|
-
).optional().nullable(),
|
|
1639
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1640
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1641
|
-
/^[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}$/,
|
|
1642
|
-
"Must be a valid GUID"
|
|
1643
|
-
).optional().nullable(),
|
|
1644
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1645
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1646
|
-
})
|
|
1647
|
-
).max(10).optional(),
|
|
1648
|
-
creditConfiguration: z.object({
|
|
1649
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1650
|
-
rolloverConfiguration: z.object({
|
|
1651
|
-
enabled: z.boolean().describe(
|
|
1652
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1653
|
-
).optional().nullable(),
|
|
1654
|
-
balanceCap: z.string().describe(
|
|
1655
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1656
|
-
).optional().nullable()
|
|
1657
|
-
}).describe("Rollover settings.").optional(),
|
|
1658
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1659
|
-
}).describe(
|
|
1660
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1661
|
-
).optional(),
|
|
1662
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1663
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1664
|
-
namespace: z.string().describe(
|
|
1665
|
-
"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."
|
|
1666
|
-
).min(1).max(20).optional().nullable(),
|
|
1667
|
-
extendedFields: z.object({
|
|
1668
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1669
|
-
"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)."
|
|
1670
|
-
).optional()
|
|
1671
|
-
}).describe(
|
|
1672
|
-
"Custom field data for the pool definition 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."
|
|
1673
|
-
).optional(),
|
|
1674
|
-
programDefinitions: z.array(
|
|
1675
|
-
z.object({
|
|
1676
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1677
|
-
/^[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}$/,
|
|
1678
|
-
"Must be a valid GUID"
|
|
1679
|
-
).optional(),
|
|
1680
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1681
|
-
/^[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}$/,
|
|
1682
|
-
"Must be a valid GUID"
|
|
1683
|
-
).optional().nullable()
|
|
1684
|
-
})
|
|
1685
|
-
).max(20).optional()
|
|
1686
|
-
}).describe("Updated pool definition.").optional()
|
|
1687
|
-
});
|
|
1688
|
-
var RemovePoolDefinitionFromProgramDefinitionRequest = z.object({
|
|
1689
|
-
poolDefinitionId: z.string().describe(
|
|
1690
|
-
"ID of the pool definition to remove from the program definition."
|
|
1691
|
-
).regex(
|
|
1692
|
-
/^[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}$/,
|
|
1693
|
-
"Must be a valid GUID"
|
|
1694
|
-
),
|
|
1695
|
-
options: z.object({
|
|
1696
|
-
programDefinitionId: z.string().describe(
|
|
1697
|
-
"ID of the program definition to remove the pool definition from."
|
|
1698
|
-
).regex(
|
|
1699
|
-
/^[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}$/,
|
|
1700
|
-
"Must be a valid GUID"
|
|
1701
|
-
),
|
|
1702
|
-
cascade: z.enum([
|
|
1703
|
-
"UNKNOWN_CASCADE",
|
|
1704
|
-
"IMMEDIATELY",
|
|
1705
|
-
"NEXT_RENEWAL",
|
|
1706
|
-
"FUTURE_PROVISIONS"
|
|
1707
|
-
])
|
|
1708
|
-
})
|
|
1709
|
-
});
|
|
1710
|
-
var RemovePoolDefinitionFromProgramDefinitionResponse = z.object({
|
|
1711
|
-
poolDefinition: z.object({
|
|
1712
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1713
|
-
/^[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}$/,
|
|
1714
|
-
"Must be a valid GUID"
|
|
1715
|
-
).optional().nullable(),
|
|
1716
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1717
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1718
|
-
).optional().nullable(),
|
|
1719
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1720
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1721
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1722
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1723
|
-
details: z.object({
|
|
1724
|
-
benefits: z.array(
|
|
1725
|
-
z.object({
|
|
1726
|
-
benefitKey: z.string().describe(
|
|
1727
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1728
|
-
).max(64).optional(),
|
|
1729
|
-
itemSetId: z.string().describe(
|
|
1730
|
-
"ID that is used to associated items with this benefit."
|
|
1731
|
-
).regex(
|
|
1732
|
-
/^[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}$/,
|
|
1733
|
-
"Must be a valid GUID"
|
|
1734
|
-
).optional().nullable(),
|
|
1735
|
-
price: z.string().describe(
|
|
1736
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1737
|
-
).optional().nullable(),
|
|
1738
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1739
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1740
|
-
/^[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}$/,
|
|
1741
|
-
"Must be a valid GUID"
|
|
1742
|
-
).optional().nullable(),
|
|
1743
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1744
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1745
|
-
})
|
|
1746
|
-
).max(10).optional(),
|
|
1747
|
-
creditConfiguration: z.object({
|
|
1748
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1749
|
-
rolloverConfiguration: z.object({
|
|
1750
|
-
enabled: z.boolean().describe(
|
|
1751
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1752
|
-
).optional().nullable(),
|
|
1753
|
-
balanceCap: z.string().describe(
|
|
1754
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1755
|
-
).optional().nullable()
|
|
1756
|
-
}).describe("Rollover settings.").optional(),
|
|
1757
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1758
|
-
}).describe(
|
|
1759
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1760
|
-
).optional(),
|
|
1761
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1762
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1763
|
-
namespace: z.string().describe(
|
|
1764
|
-
"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."
|
|
1765
|
-
).min(1).max(20).optional().nullable(),
|
|
1766
|
-
extendedFields: z.object({
|
|
1767
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1768
|
-
"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)."
|
|
1769
|
-
).optional()
|
|
1770
|
-
}).describe(
|
|
1771
|
-
"Custom field data for the pool definition 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."
|
|
1772
|
-
).optional(),
|
|
1773
|
-
programDefinitions: z.array(
|
|
1774
|
-
z.object({
|
|
1775
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1776
|
-
/^[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}$/,
|
|
1777
|
-
"Must be a valid GUID"
|
|
1778
|
-
).optional(),
|
|
1779
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1780
|
-
/^[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}$/,
|
|
1781
|
-
"Must be a valid GUID"
|
|
1782
|
-
).optional().nullable()
|
|
1783
|
-
})
|
|
1784
|
-
).max(20).optional()
|
|
1785
|
-
}).describe("Updated pool definition.").optional()
|
|
1786
|
-
});
|
|
1787
|
-
var FindPoolDefinitionsByProgramDefinitionRequest = z.object({
|
|
1788
|
-
programDefinitionId: z.string().describe("ID of the program definition to retrieve its pool definitions.").regex(
|
|
1789
|
-
/^[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}$/,
|
|
1790
|
-
"Must be a valid GUID"
|
|
1791
|
-
),
|
|
1792
|
-
options: z.object({
|
|
1793
|
-
namespace: z.string().describe(
|
|
1794
|
-
"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."
|
|
1795
|
-
).min(1).max(20)
|
|
1796
|
-
})
|
|
1797
|
-
});
|
|
1798
|
-
var FindPoolDefinitionsByProgramDefinitionResponse = z.object({
|
|
1799
|
-
poolDefinitions: z.array(
|
|
1800
|
-
z.object({
|
|
1801
|
-
_id: z.string().describe("Pool definition ID.").regex(
|
|
1802
|
-
/^[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}$/,
|
|
1803
|
-
"Must be a valid GUID"
|
|
1804
|
-
).optional().nullable(),
|
|
1805
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1806
|
-
"Revision number, which increments by 1 each time the pool definition is updated.\nTo prevent conflicting changes, the current revision must be specified when updating the pool definition.\n\nIgnored when creating a pool definition."
|
|
1807
|
-
).optional().nullable(),
|
|
1808
|
-
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1809
|
-
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1810
|
-
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1811
|
-
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1812
|
-
details: z.object({
|
|
1813
|
-
benefits: z.array(
|
|
1814
|
-
z.object({
|
|
1815
|
-
benefitKey: z.string().describe(
|
|
1816
|
-
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1817
|
-
).max(64).optional(),
|
|
1818
|
-
itemSetId: z.string().describe(
|
|
1819
|
-
"ID that is used to associated items with this benefit."
|
|
1820
|
-
).regex(
|
|
1821
|
-
/^[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}$/,
|
|
1822
|
-
"Must be a valid GUID"
|
|
1823
|
-
).optional().nullable(),
|
|
1824
|
-
price: z.string().describe(
|
|
1825
|
-
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1826
|
-
).optional().nullable(),
|
|
1827
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1828
|
-
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1829
|
-
/^[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}$/,
|
|
1830
|
-
"Must be a valid GUID"
|
|
1831
|
-
).optional().nullable(),
|
|
1832
|
-
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1833
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1834
|
-
})
|
|
1835
|
-
).max(10).optional(),
|
|
1836
|
-
creditConfiguration: z.object({
|
|
1837
|
-
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1838
|
-
rolloverConfiguration: z.object({
|
|
1839
|
-
enabled: z.boolean().describe(
|
|
1840
|
-
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1841
|
-
).optional().nullable(),
|
|
1842
|
-
balanceCap: z.string().describe(
|
|
1843
|
-
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1844
|
-
).optional().nullable()
|
|
1845
|
-
}).describe("Rollover settings.").optional(),
|
|
1846
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1847
|
-
}).describe(
|
|
1848
|
-
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1849
|
-
).optional(),
|
|
1850
|
-
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1851
|
-
}).describe("Pool definition benefits and settings.").optional(),
|
|
1852
|
-
namespace: z.string().describe(
|
|
1853
|
-
"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."
|
|
1854
|
-
).min(1).max(20).optional().nullable(),
|
|
1855
|
-
extendedFields: z.object({
|
|
1856
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1857
|
-
"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)."
|
|
1858
|
-
).optional()
|
|
1859
|
-
}).describe(
|
|
1860
|
-
"Custom field data for the pool definition 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."
|
|
1861
|
-
).optional(),
|
|
1862
|
-
programDefinitions: z.array(
|
|
1863
|
-
z.object({
|
|
1864
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
1865
|
-
/^[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}$/,
|
|
1866
|
-
"Must be a valid GUID"
|
|
1867
|
-
).optional(),
|
|
1868
|
-
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1869
|
-
/^[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}$/,
|
|
1870
|
-
"Must be a valid GUID"
|
|
1871
|
-
).optional().nullable()
|
|
1872
|
-
})
|
|
1873
|
-
).max(20).optional()
|
|
1874
|
-
})
|
|
1875
|
-
).optional()
|
|
1876
|
-
});
|
|
1877
|
-
|
|
1878
|
-
// src/benefit-programs-v1-pool-definition-pool-definitions.universal.ts
|
|
1879
520
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
1880
521
|
var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
|
|
1881
522
|
PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
|
|
@@ -1927,10 +568,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1927
568
|
return WebhookIdentityType2;
|
|
1928
569
|
})(WebhookIdentityType || {});
|
|
1929
570
|
async function createPoolDefinition2(poolDefinition, options) {
|
|
1930
|
-
const { httpClient, sideEffects
|
|
1931
|
-
if (validateRequestSchema) {
|
|
1932
|
-
CreatePoolDefinitionRequest.parse({ poolDefinition, options });
|
|
1933
|
-
}
|
|
571
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1934
572
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1935
573
|
poolDefinition,
|
|
1936
574
|
cascade: options?.cascade
|
|
@@ -1959,10 +597,7 @@ async function createPoolDefinition2(poolDefinition, options) {
|
|
|
1959
597
|
}
|
|
1960
598
|
}
|
|
1961
599
|
async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
1962
|
-
const { httpClient, sideEffects
|
|
1963
|
-
if (validateRequestSchema) {
|
|
1964
|
-
BulkCreatePoolDefinitionsRequest.parse({ poolDefinitions, options });
|
|
1965
|
-
}
|
|
600
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1966
601
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1967
602
|
poolDefinitions,
|
|
1968
603
|
cascade: options?.cascade,
|
|
@@ -1995,10 +630,7 @@ async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
|
1995
630
|
}
|
|
1996
631
|
}
|
|
1997
632
|
async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
1998
|
-
const { httpClient, sideEffects
|
|
1999
|
-
if (validateRequestSchema) {
|
|
2000
|
-
UpdatePoolDefinitionRequest.parse({ _id, poolDefinition, options });
|
|
2001
|
-
}
|
|
633
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2002
634
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2003
635
|
poolDefinition: { ...poolDefinition, id: _id },
|
|
2004
636
|
cascade: options?.cascade
|
|
@@ -2027,10 +659,7 @@ async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
|
2027
659
|
}
|
|
2028
660
|
}
|
|
2029
661
|
async function bulkUpdatePoolDefinitions2(options) {
|
|
2030
|
-
const { httpClient, sideEffects
|
|
2031
|
-
if (validateRequestSchema) {
|
|
2032
|
-
BulkUpdatePoolDefinitionsRequest.parse({ options });
|
|
2033
|
-
}
|
|
662
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2034
663
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2035
664
|
poolDefinitions: options?.poolDefinitions,
|
|
2036
665
|
cascade: options?.cascade,
|
|
@@ -2063,10 +692,7 @@ async function bulkUpdatePoolDefinitions2(options) {
|
|
|
2063
692
|
}
|
|
2064
693
|
}
|
|
2065
694
|
async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
2066
|
-
const { httpClient, sideEffects
|
|
2067
|
-
if (validateRequestSchema) {
|
|
2068
|
-
DeletePoolDefinitionRequest.parse({ poolDefinitionId, cascade });
|
|
2069
|
-
}
|
|
695
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2070
696
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2071
697
|
poolDefinitionId,
|
|
2072
698
|
cascade
|
|
@@ -2091,13 +717,7 @@ async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
|
2091
717
|
}
|
|
2092
718
|
}
|
|
2093
719
|
async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
2094
|
-
const { httpClient, sideEffects
|
|
2095
|
-
if (validateRequestSchema) {
|
|
2096
|
-
BulkDeletePoolDefinitionsRequest.parse({
|
|
2097
|
-
poolDefinitionIds,
|
|
2098
|
-
options
|
|
2099
|
-
});
|
|
2100
|
-
}
|
|
720
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2101
721
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2102
722
|
poolDefinitionIds,
|
|
2103
723
|
cascade: options?.cascade
|
|
@@ -2128,10 +748,7 @@ async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
|
2128
748
|
}
|
|
2129
749
|
}
|
|
2130
750
|
async function getPoolDefinition2(poolDefinitionId) {
|
|
2131
|
-
const { httpClient, sideEffects
|
|
2132
|
-
if (validateRequestSchema) {
|
|
2133
|
-
GetPoolDefinitionRequest.parse({ poolDefinitionId });
|
|
2134
|
-
}
|
|
751
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2135
752
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2136
753
|
poolDefinitionId
|
|
2137
754
|
});
|
|
@@ -2204,10 +821,7 @@ function queryPoolDefinitions2(options) {
|
|
|
2204
821
|
});
|
|
2205
822
|
}
|
|
2206
823
|
async function typedQueryPoolDefinitions(query, options) {
|
|
2207
|
-
const { httpClient, sideEffects
|
|
2208
|
-
if (validateRequestSchema) {
|
|
2209
|
-
QueryPoolDefinitionsRequest.parse({ query, options });
|
|
2210
|
-
}
|
|
824
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2211
825
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2212
826
|
query,
|
|
2213
827
|
...options
|
|
@@ -2238,13 +852,7 @@ var utils = {
|
|
|
2238
852
|
}
|
|
2239
853
|
};
|
|
2240
854
|
async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options) {
|
|
2241
|
-
const { httpClient, sideEffects
|
|
2242
|
-
if (validateRequestSchema) {
|
|
2243
|
-
AddPoolDefinitionToProgramDefinitionRequest.parse({
|
|
2244
|
-
poolDefinitionId,
|
|
2245
|
-
options
|
|
2246
|
-
});
|
|
2247
|
-
}
|
|
855
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2248
856
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2249
857
|
poolDefinitionId,
|
|
2250
858
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -2277,13 +885,7 @@ async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options)
|
|
|
2277
885
|
}
|
|
2278
886
|
}
|
|
2279
887
|
async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, options) {
|
|
2280
|
-
const { httpClient, sideEffects
|
|
2281
|
-
if (validateRequestSchema) {
|
|
2282
|
-
RemovePoolDefinitionFromProgramDefinitionRequest.parse({
|
|
2283
|
-
poolDefinitionId,
|
|
2284
|
-
options
|
|
2285
|
-
});
|
|
2286
|
-
}
|
|
888
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2287
889
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2288
890
|
poolDefinitionId,
|
|
2289
891
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -2316,13 +918,7 @@ async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, opti
|
|
|
2316
918
|
}
|
|
2317
919
|
}
|
|
2318
920
|
async function findPoolDefinitionsByProgramDefinition2(programDefinitionId, options) {
|
|
2319
|
-
const { httpClient, sideEffects
|
|
2320
|
-
if (validateRequestSchema) {
|
|
2321
|
-
FindPoolDefinitionsByProgramDefinitionRequest.parse({
|
|
2322
|
-
programDefinitionId,
|
|
2323
|
-
options
|
|
2324
|
-
});
|
|
2325
|
-
}
|
|
921
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2326
922
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
2327
923
|
programDefinitionId,
|
|
2328
924
|
namespace: options?.namespace
|