@wix/auto_sdk_benefit-programs_pool-definitions 1.0.57 → 1.0.58
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 +30 -10
- package/build/cjs/index.js +1449 -35
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +1425 -11
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.d.ts +8 -8
- package/build/es/index.d.mts +30 -10
- package/build/es/index.mjs +1439 -35
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +1415 -11
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.d.mts +8 -8
- package/build/internal/cjs/index.d.ts +30 -10
- package/build/internal/cjs/index.js +1449 -35
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +1425 -11
- 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 +30 -10
- package/build/internal/es/index.mjs +1439 -35
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +1415 -11
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +8 -8
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// index.ts
|
|
@@ -558,6 +568,1365 @@ function findPoolDefinitionsByProgramDefinition(payload) {
|
|
|
558
568
|
|
|
559
569
|
// src/benefit-programs-v1-pool-definition-pool-definitions.universal.ts
|
|
560
570
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
571
|
+
|
|
572
|
+
// src/benefit-programs-v1-pool-definition-pool-definitions.schemas.ts
|
|
573
|
+
var z = __toESM(require("zod"));
|
|
574
|
+
var CreatePoolDefinitionRequest = z.object({
|
|
575
|
+
poolDefinition: z.object({
|
|
576
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
577
|
+
/^[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}$/,
|
|
578
|
+
"Must be a valid GUID"
|
|
579
|
+
).optional().nullable(),
|
|
580
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
581
|
+
"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."
|
|
582
|
+
).optional().nullable(),
|
|
583
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
584
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
585
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
586
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
587
|
+
details: z.object({
|
|
588
|
+
benefits: z.array(
|
|
589
|
+
z.object({
|
|
590
|
+
benefitKey: z.string().describe(
|
|
591
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
592
|
+
).max(64),
|
|
593
|
+
itemSetId: z.string().describe(
|
|
594
|
+
"ID that is used to associated items with this benefit."
|
|
595
|
+
).regex(
|
|
596
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
597
|
+
"Must be a valid GUID"
|
|
598
|
+
).optional().nullable(),
|
|
599
|
+
price: z.string().describe(
|
|
600
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
601
|
+
).optional().nullable(),
|
|
602
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
603
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
604
|
+
/^[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}$/,
|
|
605
|
+
"Must be a valid GUID"
|
|
606
|
+
),
|
|
607
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
608
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
609
|
+
})
|
|
610
|
+
).max(10),
|
|
611
|
+
creditConfiguration: z.object({
|
|
612
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
613
|
+
rolloverConfiguration: z.object({
|
|
614
|
+
enabled: z.boolean().describe(
|
|
615
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
616
|
+
).optional().nullable(),
|
|
617
|
+
balanceCap: z.string().describe(
|
|
618
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
619
|
+
).optional().nullable()
|
|
620
|
+
}).describe("Rollover settings.").optional(),
|
|
621
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
622
|
+
}).describe(
|
|
623
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
624
|
+
).optional(),
|
|
625
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
626
|
+
}).describe("Pool definition benefits and settings."),
|
|
627
|
+
namespace: z.string().describe(
|
|
628
|
+
"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."
|
|
629
|
+
).min(1).max(20),
|
|
630
|
+
extendedFields: z.object({
|
|
631
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
632
|
+
"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)."
|
|
633
|
+
).optional()
|
|
634
|
+
}).describe(
|
|
635
|
+
"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."
|
|
636
|
+
).optional(),
|
|
637
|
+
programDefinitions: z.array(
|
|
638
|
+
z.object({
|
|
639
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
640
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
641
|
+
"Must be a valid GUID"
|
|
642
|
+
).optional(),
|
|
643
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
644
|
+
/^[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}$/,
|
|
645
|
+
"Must be a valid GUID"
|
|
646
|
+
).optional().nullable()
|
|
647
|
+
})
|
|
648
|
+
).max(20).optional()
|
|
649
|
+
}).describe("Pool definition to create."),
|
|
650
|
+
options: z.object({
|
|
651
|
+
cascade: z.enum([
|
|
652
|
+
"UNKNOWN_CASCADE",
|
|
653
|
+
"IMMEDIATELY",
|
|
654
|
+
"NEXT_RENEWAL",
|
|
655
|
+
"FUTURE_PROVISIONS"
|
|
656
|
+
]).optional()
|
|
657
|
+
}).optional()
|
|
658
|
+
});
|
|
659
|
+
var CreatePoolDefinitionResponse = z.object({
|
|
660
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
661
|
+
/^[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}$/,
|
|
662
|
+
"Must be a valid GUID"
|
|
663
|
+
).optional().nullable(),
|
|
664
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
665
|
+
"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."
|
|
666
|
+
).optional().nullable(),
|
|
667
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
668
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
669
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
670
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
671
|
+
details: z.object({
|
|
672
|
+
benefits: z.array(
|
|
673
|
+
z.object({
|
|
674
|
+
benefitKey: z.string().describe(
|
|
675
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
676
|
+
).max(64).optional(),
|
|
677
|
+
itemSetId: z.string().describe(
|
|
678
|
+
"ID that is used to associated items with this benefit."
|
|
679
|
+
).regex(
|
|
680
|
+
/^[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}$/,
|
|
681
|
+
"Must be a valid GUID"
|
|
682
|
+
).optional().nullable(),
|
|
683
|
+
price: z.string().describe(
|
|
684
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
685
|
+
).optional().nullable(),
|
|
686
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
687
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
688
|
+
/^[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}$/,
|
|
689
|
+
"Must be a valid GUID"
|
|
690
|
+
).optional().nullable(),
|
|
691
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
692
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
693
|
+
})
|
|
694
|
+
).max(10).optional(),
|
|
695
|
+
creditConfiguration: z.object({
|
|
696
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
697
|
+
rolloverConfiguration: z.object({
|
|
698
|
+
enabled: z.boolean().describe(
|
|
699
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
700
|
+
).optional().nullable(),
|
|
701
|
+
balanceCap: z.string().describe(
|
|
702
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
703
|
+
).optional().nullable()
|
|
704
|
+
}).describe("Rollover settings.").optional(),
|
|
705
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
706
|
+
}).describe(
|
|
707
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
708
|
+
).optional(),
|
|
709
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
710
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
711
|
+
namespace: z.string().describe(
|
|
712
|
+
"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."
|
|
713
|
+
).min(1).max(20).optional().nullable(),
|
|
714
|
+
extendedFields: z.object({
|
|
715
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
716
|
+
"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)."
|
|
717
|
+
).optional()
|
|
718
|
+
}).describe(
|
|
719
|
+
"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."
|
|
720
|
+
).optional(),
|
|
721
|
+
programDefinitions: z.array(
|
|
722
|
+
z.object({
|
|
723
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
724
|
+
/^[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}$/,
|
|
725
|
+
"Must be a valid GUID"
|
|
726
|
+
).optional(),
|
|
727
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
728
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
729
|
+
"Must be a valid GUID"
|
|
730
|
+
).optional().nullable()
|
|
731
|
+
})
|
|
732
|
+
).max(20).optional()
|
|
733
|
+
});
|
|
734
|
+
var BulkCreatePoolDefinitionsRequest = z.object({
|
|
735
|
+
poolDefinitions: z.array(
|
|
736
|
+
z.object({
|
|
737
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
738
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
739
|
+
"Must be a valid GUID"
|
|
740
|
+
).optional().nullable(),
|
|
741
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
742
|
+
"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."
|
|
743
|
+
).optional().nullable(),
|
|
744
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
745
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
746
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
747
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
748
|
+
details: z.object({
|
|
749
|
+
benefits: z.array(
|
|
750
|
+
z.object({
|
|
751
|
+
benefitKey: z.string().describe(
|
|
752
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
753
|
+
).max(64),
|
|
754
|
+
itemSetId: z.string().describe(
|
|
755
|
+
"ID that is used to associated items with this benefit."
|
|
756
|
+
).regex(
|
|
757
|
+
/^[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}$/,
|
|
758
|
+
"Must be a valid GUID"
|
|
759
|
+
).optional().nullable(),
|
|
760
|
+
price: z.string().describe(
|
|
761
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
762
|
+
).optional().nullable(),
|
|
763
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
764
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
765
|
+
/^[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}$/,
|
|
766
|
+
"Must be a valid GUID"
|
|
767
|
+
),
|
|
768
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
769
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
770
|
+
})
|
|
771
|
+
).max(10),
|
|
772
|
+
creditConfiguration: z.object({
|
|
773
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
774
|
+
rolloverConfiguration: z.object({
|
|
775
|
+
enabled: z.boolean().describe(
|
|
776
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
777
|
+
).optional().nullable(),
|
|
778
|
+
balanceCap: z.string().describe(
|
|
779
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
780
|
+
).optional().nullable()
|
|
781
|
+
}).describe("Rollover settings.").optional(),
|
|
782
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
783
|
+
}).describe(
|
|
784
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
785
|
+
).optional(),
|
|
786
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
787
|
+
}).describe("Pool definition benefits and settings."),
|
|
788
|
+
namespace: z.string().describe(
|
|
789
|
+
"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."
|
|
790
|
+
).min(1).max(20),
|
|
791
|
+
extendedFields: z.object({
|
|
792
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
793
|
+
"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)."
|
|
794
|
+
).optional()
|
|
795
|
+
}).describe(
|
|
796
|
+
"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."
|
|
797
|
+
).optional(),
|
|
798
|
+
programDefinitions: z.array(
|
|
799
|
+
z.object({
|
|
800
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
801
|
+
/^[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}$/,
|
|
802
|
+
"Must be a valid GUID"
|
|
803
|
+
).optional(),
|
|
804
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
805
|
+
/^[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}$/,
|
|
806
|
+
"Must be a valid GUID"
|
|
807
|
+
).optional().nullable()
|
|
808
|
+
})
|
|
809
|
+
).max(20).optional()
|
|
810
|
+
})
|
|
811
|
+
).min(1).max(100),
|
|
812
|
+
options: z.object({
|
|
813
|
+
cascade: z.enum([
|
|
814
|
+
"UNKNOWN_CASCADE",
|
|
815
|
+
"IMMEDIATELY",
|
|
816
|
+
"NEXT_RENEWAL",
|
|
817
|
+
"FUTURE_PROVISIONS"
|
|
818
|
+
]).optional(),
|
|
819
|
+
returnEntity: z.boolean().describe(
|
|
820
|
+
"Whether to return the created pool definitions.\n\nDefault: `false`"
|
|
821
|
+
).optional()
|
|
822
|
+
}).optional()
|
|
823
|
+
});
|
|
824
|
+
var BulkCreatePoolDefinitionsResponse = z.object({
|
|
825
|
+
results: z.array(
|
|
826
|
+
z.object({
|
|
827
|
+
itemMetadata: z.object({
|
|
828
|
+
_id: z.string().describe(
|
|
829
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
830
|
+
).regex(
|
|
831
|
+
/^[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}$/,
|
|
832
|
+
"Must be a valid GUID"
|
|
833
|
+
).optional().nullable(),
|
|
834
|
+
originalIndex: z.number().int().describe(
|
|
835
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
836
|
+
).optional(),
|
|
837
|
+
success: z.boolean().describe(
|
|
838
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
839
|
+
).optional(),
|
|
840
|
+
error: z.object({
|
|
841
|
+
code: z.string().describe("Error code.").optional(),
|
|
842
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
843
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
844
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
845
|
+
}).describe("Item metadata.").optional(),
|
|
846
|
+
item: z.object({
|
|
847
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
848
|
+
/^[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}$/,
|
|
849
|
+
"Must be a valid GUID"
|
|
850
|
+
).optional().nullable(),
|
|
851
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
852
|
+
"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."
|
|
853
|
+
).optional().nullable(),
|
|
854
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
855
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
856
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
857
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
858
|
+
details: z.object({
|
|
859
|
+
benefits: z.array(
|
|
860
|
+
z.object({
|
|
861
|
+
benefitKey: z.string().describe(
|
|
862
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
863
|
+
).max(64).optional(),
|
|
864
|
+
itemSetId: z.string().describe(
|
|
865
|
+
"ID that is used to associated items with this benefit."
|
|
866
|
+
).regex(
|
|
867
|
+
/^[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}$/,
|
|
868
|
+
"Must be a valid GUID"
|
|
869
|
+
).optional().nullable(),
|
|
870
|
+
price: z.string().describe(
|
|
871
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
872
|
+
).optional().nullable(),
|
|
873
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
874
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
875
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
876
|
+
"Must be a valid GUID"
|
|
877
|
+
).optional().nullable(),
|
|
878
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
879
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
880
|
+
})
|
|
881
|
+
).max(10).optional(),
|
|
882
|
+
creditConfiguration: z.object({
|
|
883
|
+
amount: z.string().describe(
|
|
884
|
+
"Initial available amount for associated balances."
|
|
885
|
+
).optional(),
|
|
886
|
+
rolloverConfiguration: z.object({
|
|
887
|
+
enabled: z.boolean().describe(
|
|
888
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
889
|
+
).optional().nullable(),
|
|
890
|
+
balanceCap: z.string().describe(
|
|
891
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
892
|
+
).optional().nullable()
|
|
893
|
+
}).describe("Rollover settings.").optional(),
|
|
894
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
895
|
+
}).describe(
|
|
896
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
897
|
+
).optional(),
|
|
898
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
899
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
900
|
+
namespace: z.string().describe(
|
|
901
|
+
"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."
|
|
902
|
+
).min(1).max(20).optional().nullable(),
|
|
903
|
+
extendedFields: z.object({
|
|
904
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
905
|
+
"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)."
|
|
906
|
+
).optional()
|
|
907
|
+
}).describe(
|
|
908
|
+
"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."
|
|
909
|
+
).optional(),
|
|
910
|
+
programDefinitions: z.array(
|
|
911
|
+
z.object({
|
|
912
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
913
|
+
/^[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}$/,
|
|
914
|
+
"Must be a valid GUID"
|
|
915
|
+
).optional(),
|
|
916
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
917
|
+
/^[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}$/,
|
|
918
|
+
"Must be a valid GUID"
|
|
919
|
+
).optional().nullable()
|
|
920
|
+
})
|
|
921
|
+
).max(20).optional()
|
|
922
|
+
}).describe("Pool definition.").optional()
|
|
923
|
+
})
|
|
924
|
+
).min(1).max(100).optional(),
|
|
925
|
+
bulkActionMetadata: z.object({
|
|
926
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
927
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
928
|
+
undetailedFailures: z.number().int().describe(
|
|
929
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
930
|
+
).optional()
|
|
931
|
+
}).describe("Bulk action metadata.").optional()
|
|
932
|
+
});
|
|
933
|
+
var UpdatePoolDefinitionRequest = z.object({
|
|
934
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
935
|
+
/^[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}$/,
|
|
936
|
+
"Must be a valid GUID"
|
|
937
|
+
),
|
|
938
|
+
poolDefinition: z.object({
|
|
939
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
940
|
+
/^[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}$/,
|
|
941
|
+
"Must be a valid GUID"
|
|
942
|
+
).optional().nullable(),
|
|
943
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
944
|
+
"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."
|
|
945
|
+
),
|
|
946
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
947
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
948
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
949
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
950
|
+
details: z.object({
|
|
951
|
+
benefits: z.array(
|
|
952
|
+
z.object({
|
|
953
|
+
benefitKey: z.string().describe(
|
|
954
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
955
|
+
).max(64).optional(),
|
|
956
|
+
itemSetId: z.string().describe(
|
|
957
|
+
"ID that is used to associated items with this benefit."
|
|
958
|
+
).regex(
|
|
959
|
+
/^[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}$/,
|
|
960
|
+
"Must be a valid GUID"
|
|
961
|
+
).optional().nullable(),
|
|
962
|
+
price: z.string().describe(
|
|
963
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
964
|
+
).optional().nullable(),
|
|
965
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
966
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
967
|
+
/^[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}$/,
|
|
968
|
+
"Must be a valid GUID"
|
|
969
|
+
).optional().nullable(),
|
|
970
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
971
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
972
|
+
})
|
|
973
|
+
).max(10).optional(),
|
|
974
|
+
creditConfiguration: z.object({
|
|
975
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
976
|
+
rolloverConfiguration: z.object({
|
|
977
|
+
enabled: z.boolean().describe(
|
|
978
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
979
|
+
).optional().nullable(),
|
|
980
|
+
balanceCap: z.string().describe(
|
|
981
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
982
|
+
).optional().nullable()
|
|
983
|
+
}).describe("Rollover settings.").optional(),
|
|
984
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
985
|
+
}).describe(
|
|
986
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
987
|
+
).optional(),
|
|
988
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
989
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
990
|
+
namespace: z.string().describe(
|
|
991
|
+
"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."
|
|
992
|
+
).min(1).max(20).optional().nullable(),
|
|
993
|
+
extendedFields: z.object({
|
|
994
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
995
|
+
"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)."
|
|
996
|
+
).optional()
|
|
997
|
+
}).describe(
|
|
998
|
+
"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."
|
|
999
|
+
).optional(),
|
|
1000
|
+
programDefinitions: z.array(
|
|
1001
|
+
z.object({
|
|
1002
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1003
|
+
/^[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}$/,
|
|
1004
|
+
"Must be a valid GUID"
|
|
1005
|
+
).optional(),
|
|
1006
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1007
|
+
/^[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}$/,
|
|
1008
|
+
"Must be a valid GUID"
|
|
1009
|
+
).optional().nullable()
|
|
1010
|
+
})
|
|
1011
|
+
).max(20).optional()
|
|
1012
|
+
}).describe("Pool definition to update."),
|
|
1013
|
+
options: z.object({
|
|
1014
|
+
cascade: z.enum([
|
|
1015
|
+
"UNKNOWN_CASCADE",
|
|
1016
|
+
"IMMEDIATELY",
|
|
1017
|
+
"NEXT_RENEWAL",
|
|
1018
|
+
"FUTURE_PROVISIONS"
|
|
1019
|
+
]).optional()
|
|
1020
|
+
}).optional()
|
|
1021
|
+
});
|
|
1022
|
+
var UpdatePoolDefinitionResponse = z.object({
|
|
1023
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1024
|
+
/^[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}$/,
|
|
1025
|
+
"Must be a valid GUID"
|
|
1026
|
+
).optional().nullable(),
|
|
1027
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1028
|
+
"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."
|
|
1029
|
+
).optional().nullable(),
|
|
1030
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1031
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1032
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1033
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1034
|
+
details: z.object({
|
|
1035
|
+
benefits: z.array(
|
|
1036
|
+
z.object({
|
|
1037
|
+
benefitKey: z.string().describe(
|
|
1038
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1039
|
+
).max(64).optional(),
|
|
1040
|
+
itemSetId: z.string().describe(
|
|
1041
|
+
"ID that is used to associated items with this benefit."
|
|
1042
|
+
).regex(
|
|
1043
|
+
/^[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}$/,
|
|
1044
|
+
"Must be a valid GUID"
|
|
1045
|
+
).optional().nullable(),
|
|
1046
|
+
price: z.string().describe(
|
|
1047
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1048
|
+
).optional().nullable(),
|
|
1049
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1050
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1051
|
+
/^[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}$/,
|
|
1052
|
+
"Must be a valid GUID"
|
|
1053
|
+
).optional().nullable(),
|
|
1054
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1055
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1056
|
+
})
|
|
1057
|
+
).max(10).optional(),
|
|
1058
|
+
creditConfiguration: z.object({
|
|
1059
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1060
|
+
rolloverConfiguration: z.object({
|
|
1061
|
+
enabled: z.boolean().describe(
|
|
1062
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1063
|
+
).optional().nullable(),
|
|
1064
|
+
balanceCap: z.string().describe(
|
|
1065
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1066
|
+
).optional().nullable()
|
|
1067
|
+
}).describe("Rollover settings.").optional(),
|
|
1068
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1069
|
+
}).describe(
|
|
1070
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1071
|
+
).optional(),
|
|
1072
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1073
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1074
|
+
namespace: z.string().describe(
|
|
1075
|
+
"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."
|
|
1076
|
+
).min(1).max(20).optional().nullable(),
|
|
1077
|
+
extendedFields: z.object({
|
|
1078
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1079
|
+
"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)."
|
|
1080
|
+
).optional()
|
|
1081
|
+
}).describe(
|
|
1082
|
+
"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."
|
|
1083
|
+
).optional(),
|
|
1084
|
+
programDefinitions: z.array(
|
|
1085
|
+
z.object({
|
|
1086
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1087
|
+
/^[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}$/,
|
|
1088
|
+
"Must be a valid GUID"
|
|
1089
|
+
).optional(),
|
|
1090
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1091
|
+
/^[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}$/,
|
|
1092
|
+
"Must be a valid GUID"
|
|
1093
|
+
).optional().nullable()
|
|
1094
|
+
})
|
|
1095
|
+
).max(20).optional()
|
|
1096
|
+
});
|
|
1097
|
+
var BulkUpdatePoolDefinitionsRequest = z.object({
|
|
1098
|
+
options: z.object({
|
|
1099
|
+
poolDefinitions: z.array(
|
|
1100
|
+
z.object({
|
|
1101
|
+
poolDefinition: z.object({
|
|
1102
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1103
|
+
/^[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}$/,
|
|
1104
|
+
"Must be a valid GUID"
|
|
1105
|
+
),
|
|
1106
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1107
|
+
"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."
|
|
1108
|
+
),
|
|
1109
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1110
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1111
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1112
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1113
|
+
details: z.object({
|
|
1114
|
+
benefits: z.array(
|
|
1115
|
+
z.object({
|
|
1116
|
+
benefitKey: z.string().describe(
|
|
1117
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1118
|
+
).max(64).optional(),
|
|
1119
|
+
itemSetId: z.string().describe(
|
|
1120
|
+
"ID that is used to associated items with this benefit."
|
|
1121
|
+
).regex(
|
|
1122
|
+
/^[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}$/,
|
|
1123
|
+
"Must be a valid GUID"
|
|
1124
|
+
).optional().nullable(),
|
|
1125
|
+
price: z.string().describe(
|
|
1126
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1127
|
+
).optional().nullable(),
|
|
1128
|
+
additionalData: z.record(z.string(), z.any()).describe(
|
|
1129
|
+
"Additional information for this benefit."
|
|
1130
|
+
).optional().nullable(),
|
|
1131
|
+
providerAppId: z.string().describe(
|
|
1132
|
+
"ID of the app providing the benefit items."
|
|
1133
|
+
).regex(
|
|
1134
|
+
/^[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}$/,
|
|
1135
|
+
"Must be a valid GUID"
|
|
1136
|
+
).optional().nullable(),
|
|
1137
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1138
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1139
|
+
})
|
|
1140
|
+
).max(10).optional(),
|
|
1141
|
+
creditConfiguration: z.object({
|
|
1142
|
+
amount: z.string().describe(
|
|
1143
|
+
"Initial available amount for associated balances."
|
|
1144
|
+
).optional(),
|
|
1145
|
+
rolloverConfiguration: z.object({
|
|
1146
|
+
enabled: z.boolean().describe(
|
|
1147
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1148
|
+
).optional().nullable(),
|
|
1149
|
+
balanceCap: z.string().describe(
|
|
1150
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1151
|
+
).optional().nullable()
|
|
1152
|
+
}).describe("Rollover settings.").optional(),
|
|
1153
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1154
|
+
}).describe(
|
|
1155
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1156
|
+
).optional(),
|
|
1157
|
+
additionalData: z.record(z.string(), z.any()).describe(
|
|
1158
|
+
"Additional information relating to this object."
|
|
1159
|
+
).optional().nullable()
|
|
1160
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1161
|
+
namespace: z.string().describe(
|
|
1162
|
+
"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."
|
|
1163
|
+
).min(1).max(20).optional().nullable(),
|
|
1164
|
+
extendedFields: z.object({
|
|
1165
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1166
|
+
"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)."
|
|
1167
|
+
).optional()
|
|
1168
|
+
}).describe(
|
|
1169
|
+
"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."
|
|
1170
|
+
).optional(),
|
|
1171
|
+
programDefinitions: z.array(
|
|
1172
|
+
z.object({
|
|
1173
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1174
|
+
/^[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}$/,
|
|
1175
|
+
"Must be a valid GUID"
|
|
1176
|
+
).optional(),
|
|
1177
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1178
|
+
/^[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}$/,
|
|
1179
|
+
"Must be a valid GUID"
|
|
1180
|
+
).optional().nullable()
|
|
1181
|
+
})
|
|
1182
|
+
).max(20).optional()
|
|
1183
|
+
}).describe("Pool definition to update."),
|
|
1184
|
+
fieldMask: z.array(z.string()).optional()
|
|
1185
|
+
})
|
|
1186
|
+
).min(1).max(100).optional(),
|
|
1187
|
+
cascade: z.enum([
|
|
1188
|
+
"UNKNOWN_CASCADE",
|
|
1189
|
+
"IMMEDIATELY",
|
|
1190
|
+
"NEXT_RENEWAL",
|
|
1191
|
+
"FUTURE_PROVISIONS"
|
|
1192
|
+
]).optional(),
|
|
1193
|
+
returnEntity: z.boolean().describe(
|
|
1194
|
+
"Whether to return the updated pool definitions.\n\nDefault: `false`"
|
|
1195
|
+
).optional()
|
|
1196
|
+
}).optional()
|
|
1197
|
+
});
|
|
1198
|
+
var BulkUpdatePoolDefinitionsResponse = z.object({
|
|
1199
|
+
results: z.array(
|
|
1200
|
+
z.object({
|
|
1201
|
+
itemMetadata: z.object({
|
|
1202
|
+
_id: z.string().describe(
|
|
1203
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1204
|
+
).regex(
|
|
1205
|
+
/^[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}$/,
|
|
1206
|
+
"Must be a valid GUID"
|
|
1207
|
+
).optional().nullable(),
|
|
1208
|
+
originalIndex: z.number().int().describe(
|
|
1209
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1210
|
+
).optional(),
|
|
1211
|
+
success: z.boolean().describe(
|
|
1212
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1213
|
+
).optional(),
|
|
1214
|
+
error: z.object({
|
|
1215
|
+
code: z.string().describe("Error code.").optional(),
|
|
1216
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1217
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1218
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1219
|
+
}).describe("Item metadata.").optional(),
|
|
1220
|
+
item: z.object({
|
|
1221
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1222
|
+
/^[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}$/,
|
|
1223
|
+
"Must be a valid GUID"
|
|
1224
|
+
).optional().nullable(),
|
|
1225
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1226
|
+
"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."
|
|
1227
|
+
).optional().nullable(),
|
|
1228
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1229
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1230
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1231
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1232
|
+
details: z.object({
|
|
1233
|
+
benefits: z.array(
|
|
1234
|
+
z.object({
|
|
1235
|
+
benefitKey: z.string().describe(
|
|
1236
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1237
|
+
).max(64).optional(),
|
|
1238
|
+
itemSetId: z.string().describe(
|
|
1239
|
+
"ID that is used to associated items with this benefit."
|
|
1240
|
+
).regex(
|
|
1241
|
+
/^[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}$/,
|
|
1242
|
+
"Must be a valid GUID"
|
|
1243
|
+
).optional().nullable(),
|
|
1244
|
+
price: z.string().describe(
|
|
1245
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1246
|
+
).optional().nullable(),
|
|
1247
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1248
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1249
|
+
/^[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}$/,
|
|
1250
|
+
"Must be a valid GUID"
|
|
1251
|
+
).optional().nullable(),
|
|
1252
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1253
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1254
|
+
})
|
|
1255
|
+
).max(10).optional(),
|
|
1256
|
+
creditConfiguration: z.object({
|
|
1257
|
+
amount: z.string().describe(
|
|
1258
|
+
"Initial available amount for associated balances."
|
|
1259
|
+
).optional(),
|
|
1260
|
+
rolloverConfiguration: z.object({
|
|
1261
|
+
enabled: z.boolean().describe(
|
|
1262
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1263
|
+
).optional().nullable(),
|
|
1264
|
+
balanceCap: z.string().describe(
|
|
1265
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1266
|
+
).optional().nullable()
|
|
1267
|
+
}).describe("Rollover settings.").optional(),
|
|
1268
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1269
|
+
}).describe(
|
|
1270
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1271
|
+
).optional(),
|
|
1272
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1273
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1274
|
+
namespace: z.string().describe(
|
|
1275
|
+
"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."
|
|
1276
|
+
).min(1).max(20).optional().nullable(),
|
|
1277
|
+
extendedFields: z.object({
|
|
1278
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1279
|
+
"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)."
|
|
1280
|
+
).optional()
|
|
1281
|
+
}).describe(
|
|
1282
|
+
"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."
|
|
1283
|
+
).optional(),
|
|
1284
|
+
programDefinitions: z.array(
|
|
1285
|
+
z.object({
|
|
1286
|
+
_id: z.string().describe("Program definition ID.").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(),
|
|
1290
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1291
|
+
/^[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}$/,
|
|
1292
|
+
"Must be a valid GUID"
|
|
1293
|
+
).optional().nullable()
|
|
1294
|
+
})
|
|
1295
|
+
).max(20).optional()
|
|
1296
|
+
}).describe("Pool definition.").optional()
|
|
1297
|
+
})
|
|
1298
|
+
).min(1).max(100).optional(),
|
|
1299
|
+
bulkActionMetadata: z.object({
|
|
1300
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1301
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1302
|
+
undetailedFailures: z.number().int().describe(
|
|
1303
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1304
|
+
).optional()
|
|
1305
|
+
}).describe("Bulk action metadata.").optional()
|
|
1306
|
+
});
|
|
1307
|
+
var DeletePoolDefinitionRequest = z.object({
|
|
1308
|
+
poolDefinitionId: z.string().describe("ID of the pool definition to delete.").regex(
|
|
1309
|
+
/^[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}$/,
|
|
1310
|
+
"Must be a valid GUID"
|
|
1311
|
+
),
|
|
1312
|
+
cascade: z.enum([
|
|
1313
|
+
"UNKNOWN_CASCADE",
|
|
1314
|
+
"IMMEDIATELY",
|
|
1315
|
+
"NEXT_RENEWAL",
|
|
1316
|
+
"FUTURE_PROVISIONS"
|
|
1317
|
+
])
|
|
1318
|
+
});
|
|
1319
|
+
var DeletePoolDefinitionResponse = z.object({});
|
|
1320
|
+
var BulkDeletePoolDefinitionsRequest = z.object({
|
|
1321
|
+
poolDefinitionIds: z.array(z.string()).min(1).max(100),
|
|
1322
|
+
options: z.object({
|
|
1323
|
+
cascade: z.enum([
|
|
1324
|
+
"UNKNOWN_CASCADE",
|
|
1325
|
+
"IMMEDIATELY",
|
|
1326
|
+
"NEXT_RENEWAL",
|
|
1327
|
+
"FUTURE_PROVISIONS"
|
|
1328
|
+
]).optional()
|
|
1329
|
+
}).optional()
|
|
1330
|
+
});
|
|
1331
|
+
var BulkDeletePoolDefinitionsResponse = z.object({
|
|
1332
|
+
results: z.array(
|
|
1333
|
+
z.object({
|
|
1334
|
+
itemMetadata: z.object({
|
|
1335
|
+
_id: z.string().describe(
|
|
1336
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
1337
|
+
).regex(
|
|
1338
|
+
/^[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}$/,
|
|
1339
|
+
"Must be a valid GUID"
|
|
1340
|
+
).optional().nullable(),
|
|
1341
|
+
originalIndex: z.number().int().describe(
|
|
1342
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
1343
|
+
).optional(),
|
|
1344
|
+
success: z.boolean().describe(
|
|
1345
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
1346
|
+
).optional(),
|
|
1347
|
+
error: z.object({
|
|
1348
|
+
code: z.string().describe("Error code.").optional(),
|
|
1349
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
1350
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
1351
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
1352
|
+
}).describe("Item metadata.").optional(),
|
|
1353
|
+
item: z.object({
|
|
1354
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1355
|
+
/^[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}$/,
|
|
1356
|
+
"Must be a valid GUID"
|
|
1357
|
+
).optional().nullable(),
|
|
1358
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1359
|
+
"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."
|
|
1360
|
+
).optional().nullable(),
|
|
1361
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1362
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1363
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1364
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1365
|
+
details: z.object({
|
|
1366
|
+
benefits: z.array(
|
|
1367
|
+
z.object({
|
|
1368
|
+
benefitKey: z.string().describe(
|
|
1369
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1370
|
+
).max(64).optional(),
|
|
1371
|
+
itemSetId: z.string().describe(
|
|
1372
|
+
"ID that is used to associated items with this benefit."
|
|
1373
|
+
).regex(
|
|
1374
|
+
/^[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}$/,
|
|
1375
|
+
"Must be a valid GUID"
|
|
1376
|
+
).optional().nullable(),
|
|
1377
|
+
price: z.string().describe(
|
|
1378
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1379
|
+
).optional().nullable(),
|
|
1380
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1381
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1382
|
+
/^[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}$/,
|
|
1383
|
+
"Must be a valid GUID"
|
|
1384
|
+
).optional().nullable(),
|
|
1385
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1386
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1387
|
+
})
|
|
1388
|
+
).max(10).optional(),
|
|
1389
|
+
creditConfiguration: z.object({
|
|
1390
|
+
amount: z.string().describe(
|
|
1391
|
+
"Initial available amount for associated balances."
|
|
1392
|
+
).optional(),
|
|
1393
|
+
rolloverConfiguration: z.object({
|
|
1394
|
+
enabled: z.boolean().describe(
|
|
1395
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1396
|
+
).optional().nullable(),
|
|
1397
|
+
balanceCap: z.string().describe(
|
|
1398
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1399
|
+
).optional().nullable()
|
|
1400
|
+
}).describe("Rollover settings.").optional(),
|
|
1401
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1402
|
+
}).describe(
|
|
1403
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1404
|
+
).optional(),
|
|
1405
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1406
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1407
|
+
namespace: z.string().describe(
|
|
1408
|
+
"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."
|
|
1409
|
+
).min(1).max(20).optional().nullable(),
|
|
1410
|
+
extendedFields: z.object({
|
|
1411
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1412
|
+
"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)."
|
|
1413
|
+
).optional()
|
|
1414
|
+
}).describe(
|
|
1415
|
+
"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."
|
|
1416
|
+
).optional(),
|
|
1417
|
+
programDefinitions: z.array(
|
|
1418
|
+
z.object({
|
|
1419
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1420
|
+
/^[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}$/,
|
|
1421
|
+
"Must be a valid GUID"
|
|
1422
|
+
).optional(),
|
|
1423
|
+
externalId: z.string().describe("Program definition external ID.").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
|
+
})
|
|
1428
|
+
).max(20).optional()
|
|
1429
|
+
}).describe("Pool definition.").optional()
|
|
1430
|
+
})
|
|
1431
|
+
).min(1).max(100).optional(),
|
|
1432
|
+
bulkActionMetadata: z.object({
|
|
1433
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
1434
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
1435
|
+
undetailedFailures: z.number().int().describe(
|
|
1436
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
1437
|
+
).optional()
|
|
1438
|
+
}).describe("Bulk action metadata.").optional()
|
|
1439
|
+
});
|
|
1440
|
+
var GetPoolDefinitionRequest = z.object({
|
|
1441
|
+
poolDefinitionId: z.string().describe("ID of the pool definition to retrieve.").regex(
|
|
1442
|
+
/^[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}$/,
|
|
1443
|
+
"Must be a valid GUID"
|
|
1444
|
+
)
|
|
1445
|
+
});
|
|
1446
|
+
var GetPoolDefinitionResponse = z.object({
|
|
1447
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1448
|
+
/^[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}$/,
|
|
1449
|
+
"Must be a valid GUID"
|
|
1450
|
+
).optional().nullable(),
|
|
1451
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1452
|
+
"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."
|
|
1453
|
+
).optional().nullable(),
|
|
1454
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1455
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1456
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1457
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1458
|
+
details: z.object({
|
|
1459
|
+
benefits: z.array(
|
|
1460
|
+
z.object({
|
|
1461
|
+
benefitKey: z.string().describe(
|
|
1462
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1463
|
+
).max(64).optional(),
|
|
1464
|
+
itemSetId: z.string().describe(
|
|
1465
|
+
"ID that is used to associated items with this benefit."
|
|
1466
|
+
).regex(
|
|
1467
|
+
/^[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}$/,
|
|
1468
|
+
"Must be a valid GUID"
|
|
1469
|
+
).optional().nullable(),
|
|
1470
|
+
price: z.string().describe(
|
|
1471
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1472
|
+
).optional().nullable(),
|
|
1473
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1474
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1475
|
+
/^[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}$/,
|
|
1476
|
+
"Must be a valid GUID"
|
|
1477
|
+
).optional().nullable(),
|
|
1478
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1479
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1480
|
+
})
|
|
1481
|
+
).max(10).optional(),
|
|
1482
|
+
creditConfiguration: z.object({
|
|
1483
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1484
|
+
rolloverConfiguration: z.object({
|
|
1485
|
+
enabled: z.boolean().describe(
|
|
1486
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1487
|
+
).optional().nullable(),
|
|
1488
|
+
balanceCap: z.string().describe(
|
|
1489
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1490
|
+
).optional().nullable()
|
|
1491
|
+
}).describe("Rollover settings.").optional(),
|
|
1492
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1493
|
+
}).describe(
|
|
1494
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1495
|
+
).optional(),
|
|
1496
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1497
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1498
|
+
namespace: z.string().describe(
|
|
1499
|
+
"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."
|
|
1500
|
+
).min(1).max(20).optional().nullable(),
|
|
1501
|
+
extendedFields: z.object({
|
|
1502
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1503
|
+
"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)."
|
|
1504
|
+
).optional()
|
|
1505
|
+
}).describe(
|
|
1506
|
+
"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."
|
|
1507
|
+
).optional(),
|
|
1508
|
+
programDefinitions: z.array(
|
|
1509
|
+
z.object({
|
|
1510
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1511
|
+
/^[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}$/,
|
|
1512
|
+
"Must be a valid GUID"
|
|
1513
|
+
).optional(),
|
|
1514
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1515
|
+
/^[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}$/,
|
|
1516
|
+
"Must be a valid GUID"
|
|
1517
|
+
).optional().nullable()
|
|
1518
|
+
})
|
|
1519
|
+
).max(20).optional()
|
|
1520
|
+
});
|
|
1521
|
+
var QueryPoolDefinitionsRequest = z.object({
|
|
1522
|
+
query: z.intersection(
|
|
1523
|
+
z.object({
|
|
1524
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
1525
|
+
"Filter object.\nSee [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\nfor more information."
|
|
1526
|
+
).optional().nullable(),
|
|
1527
|
+
sort: z.array(
|
|
1528
|
+
z.object({
|
|
1529
|
+
fieldName: z.string().describe("Field to sort by.").max(512).optional(),
|
|
1530
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
1531
|
+
})
|
|
1532
|
+
).max(5).optional()
|
|
1533
|
+
}),
|
|
1534
|
+
z.xor([
|
|
1535
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
1536
|
+
z.object({
|
|
1537
|
+
cursorPaging: z.object({
|
|
1538
|
+
limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
|
|
1539
|
+
cursor: z.string().describe(
|
|
1540
|
+
"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."
|
|
1541
|
+
).max(16e3).optional().nullable()
|
|
1542
|
+
}).describe(
|
|
1543
|
+
"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`."
|
|
1544
|
+
)
|
|
1545
|
+
})
|
|
1546
|
+
])
|
|
1547
|
+
).describe("Filter, sort, and paging to apply to the query.")
|
|
1548
|
+
});
|
|
1549
|
+
var QueryPoolDefinitionsResponse = z.object({
|
|
1550
|
+
poolDefinitions: z.array(
|
|
1551
|
+
z.object({
|
|
1552
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1553
|
+
/^[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}$/,
|
|
1554
|
+
"Must be a valid GUID"
|
|
1555
|
+
).optional().nullable(),
|
|
1556
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1557
|
+
"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."
|
|
1558
|
+
).optional().nullable(),
|
|
1559
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1560
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1561
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1562
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1563
|
+
details: z.object({
|
|
1564
|
+
benefits: z.array(
|
|
1565
|
+
z.object({
|
|
1566
|
+
benefitKey: z.string().describe(
|
|
1567
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1568
|
+
).max(64).optional(),
|
|
1569
|
+
itemSetId: z.string().describe(
|
|
1570
|
+
"ID that is used to associated items with this benefit."
|
|
1571
|
+
).regex(
|
|
1572
|
+
/^[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}$/,
|
|
1573
|
+
"Must be a valid GUID"
|
|
1574
|
+
).optional().nullable(),
|
|
1575
|
+
price: z.string().describe(
|
|
1576
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1577
|
+
).optional().nullable(),
|
|
1578
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1579
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1580
|
+
/^[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}$/,
|
|
1581
|
+
"Must be a valid GUID"
|
|
1582
|
+
).optional().nullable(),
|
|
1583
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1584
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1585
|
+
})
|
|
1586
|
+
).max(10).optional(),
|
|
1587
|
+
creditConfiguration: z.object({
|
|
1588
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1589
|
+
rolloverConfiguration: z.object({
|
|
1590
|
+
enabled: z.boolean().describe(
|
|
1591
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1592
|
+
).optional().nullable(),
|
|
1593
|
+
balanceCap: z.string().describe(
|
|
1594
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1595
|
+
).optional().nullable()
|
|
1596
|
+
}).describe("Rollover settings.").optional(),
|
|
1597
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1598
|
+
}).describe(
|
|
1599
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1600
|
+
).optional(),
|
|
1601
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1602
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1603
|
+
namespace: z.string().describe(
|
|
1604
|
+
"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."
|
|
1605
|
+
).min(1).max(20).optional().nullable(),
|
|
1606
|
+
extendedFields: z.object({
|
|
1607
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1608
|
+
"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)."
|
|
1609
|
+
).optional()
|
|
1610
|
+
}).describe(
|
|
1611
|
+
"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."
|
|
1612
|
+
).optional(),
|
|
1613
|
+
programDefinitions: z.array(
|
|
1614
|
+
z.object({
|
|
1615
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1616
|
+
/^[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}$/,
|
|
1617
|
+
"Must be a valid GUID"
|
|
1618
|
+
).optional(),
|
|
1619
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1620
|
+
/^[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}$/,
|
|
1621
|
+
"Must be a valid GUID"
|
|
1622
|
+
).optional().nullable()
|
|
1623
|
+
})
|
|
1624
|
+
).max(20).optional()
|
|
1625
|
+
})
|
|
1626
|
+
).optional(),
|
|
1627
|
+
metadata: z.object({
|
|
1628
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
1629
|
+
cursors: z.object({
|
|
1630
|
+
next: z.string().describe(
|
|
1631
|
+
"Cursor string pointing to the next page in the list of results."
|
|
1632
|
+
).max(16e3).optional().nullable(),
|
|
1633
|
+
prev: z.string().describe(
|
|
1634
|
+
"Cursor pointing to the previous page in the list of results."
|
|
1635
|
+
).max(16e3).optional().nullable()
|
|
1636
|
+
}).describe(
|
|
1637
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
1638
|
+
).optional(),
|
|
1639
|
+
hasNext: z.boolean().describe(
|
|
1640
|
+
"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."
|
|
1641
|
+
).optional().nullable()
|
|
1642
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
1643
|
+
});
|
|
1644
|
+
var AddPoolDefinitionToProgramDefinitionRequest = z.object({
|
|
1645
|
+
poolDefinitionId: z.string().describe("ID of the pool definition to add to the program definition.").regex(
|
|
1646
|
+
/^[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}$/,
|
|
1647
|
+
"Must be a valid GUID"
|
|
1648
|
+
),
|
|
1649
|
+
options: z.object({
|
|
1650
|
+
programDefinitionId: z.string().describe("ID of the program definition to add the pool definition to.").regex(
|
|
1651
|
+
/^[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}$/,
|
|
1652
|
+
"Must be a valid GUID"
|
|
1653
|
+
),
|
|
1654
|
+
cascade: z.enum([
|
|
1655
|
+
"UNKNOWN_CASCADE",
|
|
1656
|
+
"IMMEDIATELY",
|
|
1657
|
+
"NEXT_RENEWAL",
|
|
1658
|
+
"FUTURE_PROVISIONS"
|
|
1659
|
+
])
|
|
1660
|
+
})
|
|
1661
|
+
});
|
|
1662
|
+
var AddPoolDefinitionToProgramDefinitionResponse = z.object({
|
|
1663
|
+
poolDefinition: z.object({
|
|
1664
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1665
|
+
/^[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}$/,
|
|
1666
|
+
"Must be a valid GUID"
|
|
1667
|
+
).optional().nullable(),
|
|
1668
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1669
|
+
"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."
|
|
1670
|
+
).optional().nullable(),
|
|
1671
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1672
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1673
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1674
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1675
|
+
details: z.object({
|
|
1676
|
+
benefits: z.array(
|
|
1677
|
+
z.object({
|
|
1678
|
+
benefitKey: z.string().describe(
|
|
1679
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1680
|
+
).max(64).optional(),
|
|
1681
|
+
itemSetId: z.string().describe(
|
|
1682
|
+
"ID that is used to associated items with this benefit."
|
|
1683
|
+
).regex(
|
|
1684
|
+
/^[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}$/,
|
|
1685
|
+
"Must be a valid GUID"
|
|
1686
|
+
).optional().nullable(),
|
|
1687
|
+
price: z.string().describe(
|
|
1688
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1689
|
+
).optional().nullable(),
|
|
1690
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1691
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").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
|
+
).optional().nullable(),
|
|
1695
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1696
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1697
|
+
})
|
|
1698
|
+
).max(10).optional(),
|
|
1699
|
+
creditConfiguration: z.object({
|
|
1700
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1701
|
+
rolloverConfiguration: z.object({
|
|
1702
|
+
enabled: z.boolean().describe(
|
|
1703
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1704
|
+
).optional().nullable(),
|
|
1705
|
+
balanceCap: z.string().describe(
|
|
1706
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1707
|
+
).optional().nullable()
|
|
1708
|
+
}).describe("Rollover settings.").optional(),
|
|
1709
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1710
|
+
}).describe(
|
|
1711
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1712
|
+
).optional(),
|
|
1713
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1714
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1715
|
+
namespace: z.string().describe(
|
|
1716
|
+
"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."
|
|
1717
|
+
).min(1).max(20).optional().nullable(),
|
|
1718
|
+
extendedFields: z.object({
|
|
1719
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1720
|
+
"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)."
|
|
1721
|
+
).optional()
|
|
1722
|
+
}).describe(
|
|
1723
|
+
"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."
|
|
1724
|
+
).optional(),
|
|
1725
|
+
programDefinitions: z.array(
|
|
1726
|
+
z.object({
|
|
1727
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1728
|
+
/^[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}$/,
|
|
1729
|
+
"Must be a valid GUID"
|
|
1730
|
+
).optional(),
|
|
1731
|
+
externalId: z.string().describe("Program definition external ID.").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
|
+
})
|
|
1736
|
+
).max(20).optional()
|
|
1737
|
+
}).describe("Updated pool definition.").optional()
|
|
1738
|
+
});
|
|
1739
|
+
var RemovePoolDefinitionFromProgramDefinitionRequest = z.object({
|
|
1740
|
+
poolDefinitionId: z.string().describe(
|
|
1741
|
+
"ID of the pool definition to remove from the program definition."
|
|
1742
|
+
).regex(
|
|
1743
|
+
/^[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}$/,
|
|
1744
|
+
"Must be a valid GUID"
|
|
1745
|
+
),
|
|
1746
|
+
options: z.object({
|
|
1747
|
+
programDefinitionId: z.string().describe(
|
|
1748
|
+
"ID of the program definition to remove the pool definition from."
|
|
1749
|
+
).regex(
|
|
1750
|
+
/^[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}$/,
|
|
1751
|
+
"Must be a valid GUID"
|
|
1752
|
+
),
|
|
1753
|
+
cascade: z.enum([
|
|
1754
|
+
"UNKNOWN_CASCADE",
|
|
1755
|
+
"IMMEDIATELY",
|
|
1756
|
+
"NEXT_RENEWAL",
|
|
1757
|
+
"FUTURE_PROVISIONS"
|
|
1758
|
+
])
|
|
1759
|
+
})
|
|
1760
|
+
});
|
|
1761
|
+
var RemovePoolDefinitionFromProgramDefinitionResponse = z.object({
|
|
1762
|
+
poolDefinition: z.object({
|
|
1763
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1764
|
+
/^[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}$/,
|
|
1765
|
+
"Must be a valid GUID"
|
|
1766
|
+
).optional().nullable(),
|
|
1767
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1768
|
+
"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."
|
|
1769
|
+
).optional().nullable(),
|
|
1770
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1771
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1772
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1773
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1774
|
+
details: z.object({
|
|
1775
|
+
benefits: z.array(
|
|
1776
|
+
z.object({
|
|
1777
|
+
benefitKey: z.string().describe(
|
|
1778
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1779
|
+
).max(64).optional(),
|
|
1780
|
+
itemSetId: z.string().describe(
|
|
1781
|
+
"ID that is used to associated items with this benefit."
|
|
1782
|
+
).regex(
|
|
1783
|
+
/^[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}$/,
|
|
1784
|
+
"Must be a valid GUID"
|
|
1785
|
+
).optional().nullable(),
|
|
1786
|
+
price: z.string().describe(
|
|
1787
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1788
|
+
).optional().nullable(),
|
|
1789
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1790
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1791
|
+
/^[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}$/,
|
|
1792
|
+
"Must be a valid GUID"
|
|
1793
|
+
).optional().nullable(),
|
|
1794
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1795
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1796
|
+
})
|
|
1797
|
+
).max(10).optional(),
|
|
1798
|
+
creditConfiguration: z.object({
|
|
1799
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1800
|
+
rolloverConfiguration: z.object({
|
|
1801
|
+
enabled: z.boolean().describe(
|
|
1802
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1803
|
+
).optional().nullable(),
|
|
1804
|
+
balanceCap: z.string().describe(
|
|
1805
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1806
|
+
).optional().nullable()
|
|
1807
|
+
}).describe("Rollover settings.").optional(),
|
|
1808
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1809
|
+
}).describe(
|
|
1810
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1811
|
+
).optional(),
|
|
1812
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1813
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1814
|
+
namespace: z.string().describe(
|
|
1815
|
+
"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."
|
|
1816
|
+
).min(1).max(20).optional().nullable(),
|
|
1817
|
+
extendedFields: z.object({
|
|
1818
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1819
|
+
"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)."
|
|
1820
|
+
).optional()
|
|
1821
|
+
}).describe(
|
|
1822
|
+
"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."
|
|
1823
|
+
).optional(),
|
|
1824
|
+
programDefinitions: z.array(
|
|
1825
|
+
z.object({
|
|
1826
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1827
|
+
/^[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}$/,
|
|
1828
|
+
"Must be a valid GUID"
|
|
1829
|
+
).optional(),
|
|
1830
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1831
|
+
/^[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}$/,
|
|
1832
|
+
"Must be a valid GUID"
|
|
1833
|
+
).optional().nullable()
|
|
1834
|
+
})
|
|
1835
|
+
).max(20).optional()
|
|
1836
|
+
}).describe("Updated pool definition.").optional()
|
|
1837
|
+
});
|
|
1838
|
+
var FindPoolDefinitionsByProgramDefinitionRequest = z.object({
|
|
1839
|
+
programDefinitionId: z.string().describe("ID of the program definition to retrieve its pool definitions.").regex(
|
|
1840
|
+
/^[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}$/,
|
|
1841
|
+
"Must be a valid GUID"
|
|
1842
|
+
),
|
|
1843
|
+
options: z.object({
|
|
1844
|
+
namespace: z.string().describe(
|
|
1845
|
+
"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."
|
|
1846
|
+
).min(1).max(20)
|
|
1847
|
+
})
|
|
1848
|
+
});
|
|
1849
|
+
var FindPoolDefinitionsByProgramDefinitionResponse = z.object({
|
|
1850
|
+
poolDefinitions: z.array(
|
|
1851
|
+
z.object({
|
|
1852
|
+
_id: z.string().describe("Pool definition ID.").regex(
|
|
1853
|
+
/^[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}$/,
|
|
1854
|
+
"Must be a valid GUID"
|
|
1855
|
+
).optional().nullable(),
|
|
1856
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
1857
|
+
"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."
|
|
1858
|
+
).optional().nullable(),
|
|
1859
|
+
_createdDate: z.date().describe("Date and time the pool definition was created.").optional().nullable(),
|
|
1860
|
+
_updatedDate: z.date().describe("Date and time the pool definition was updated.").optional().nullable(),
|
|
1861
|
+
displayName: z.string().describe("Pool definition name.").max(128).optional(),
|
|
1862
|
+
programDefinitionIds: z.array(z.string()).max(20).optional(),
|
|
1863
|
+
details: z.object({
|
|
1864
|
+
benefits: z.array(
|
|
1865
|
+
z.object({
|
|
1866
|
+
benefitKey: z.string().describe(
|
|
1867
|
+
"Unique identifier for this benefit.\n\nThis key is consistent across the pool definition and all associated pools that contain this benefit."
|
|
1868
|
+
).max(64).optional(),
|
|
1869
|
+
itemSetId: z.string().describe(
|
|
1870
|
+
"ID that is used to associated items with this benefit."
|
|
1871
|
+
).regex(
|
|
1872
|
+
/^[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}$/,
|
|
1873
|
+
"Must be a valid GUID"
|
|
1874
|
+
).optional().nullable(),
|
|
1875
|
+
price: z.string().describe(
|
|
1876
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
1877
|
+
).optional().nullable(),
|
|
1878
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information for this benefit.").optional().nullable(),
|
|
1879
|
+
providerAppId: z.string().describe("ID of the app providing the benefit items.").regex(
|
|
1880
|
+
/^[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}$/,
|
|
1881
|
+
"Must be a valid GUID"
|
|
1882
|
+
).optional().nullable(),
|
|
1883
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
1884
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
1885
|
+
})
|
|
1886
|
+
).max(10).optional(),
|
|
1887
|
+
creditConfiguration: z.object({
|
|
1888
|
+
amount: z.string().describe("Initial available amount for associated balances.").optional(),
|
|
1889
|
+
rolloverConfiguration: z.object({
|
|
1890
|
+
enabled: z.boolean().describe(
|
|
1891
|
+
"Whether unused credits roll over to a new cycle when a program renews."
|
|
1892
|
+
).optional().nullable(),
|
|
1893
|
+
balanceCap: z.string().describe(
|
|
1894
|
+
"Maximum number of credits that can roll over to the next cycle when a program renews."
|
|
1895
|
+
).optional().nullable()
|
|
1896
|
+
}).describe("Rollover settings.").optional(),
|
|
1897
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable()
|
|
1898
|
+
}).describe(
|
|
1899
|
+
"Credit settings.\n\nIf this object is empty, you can't set a price for the benefit."
|
|
1900
|
+
).optional(),
|
|
1901
|
+
additionalData: z.record(z.string(), z.any()).describe("Additional information relating to this object.").optional().nullable()
|
|
1902
|
+
}).describe("Pool definition benefits and settings.").optional(),
|
|
1903
|
+
namespace: z.string().describe(
|
|
1904
|
+
"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."
|
|
1905
|
+
).min(1).max(20).optional().nullable(),
|
|
1906
|
+
extendedFields: z.object({
|
|
1907
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
1908
|
+
"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)."
|
|
1909
|
+
).optional()
|
|
1910
|
+
}).describe(
|
|
1911
|
+
"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."
|
|
1912
|
+
).optional(),
|
|
1913
|
+
programDefinitions: z.array(
|
|
1914
|
+
z.object({
|
|
1915
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
1916
|
+
/^[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}$/,
|
|
1917
|
+
"Must be a valid GUID"
|
|
1918
|
+
).optional(),
|
|
1919
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
1920
|
+
/^[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}$/,
|
|
1921
|
+
"Must be a valid GUID"
|
|
1922
|
+
).optional().nullable()
|
|
1923
|
+
})
|
|
1924
|
+
).max(20).optional()
|
|
1925
|
+
})
|
|
1926
|
+
).optional()
|
|
1927
|
+
});
|
|
1928
|
+
|
|
1929
|
+
// src/benefit-programs-v1-pool-definition-pool-definitions.universal.ts
|
|
561
1930
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
562
1931
|
var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
|
|
563
1932
|
PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
|
|
@@ -609,7 +1978,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
609
1978
|
return WebhookIdentityType2;
|
|
610
1979
|
})(WebhookIdentityType || {});
|
|
611
1980
|
async function createPoolDefinition2(poolDefinition, options) {
|
|
612
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1981
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
1982
|
+
if (validateRequestSchema) {
|
|
1983
|
+
CreatePoolDefinitionRequest.parse({ poolDefinition, options });
|
|
1984
|
+
}
|
|
613
1985
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
614
1986
|
poolDefinition,
|
|
615
1987
|
cascade: options?.cascade
|
|
@@ -638,7 +2010,10 @@ async function createPoolDefinition2(poolDefinition, options) {
|
|
|
638
2010
|
}
|
|
639
2011
|
}
|
|
640
2012
|
async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
641
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2013
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2014
|
+
if (validateRequestSchema) {
|
|
2015
|
+
BulkCreatePoolDefinitionsRequest.parse({ poolDefinitions, options });
|
|
2016
|
+
}
|
|
642
2017
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
643
2018
|
poolDefinitions,
|
|
644
2019
|
cascade: options?.cascade,
|
|
@@ -671,7 +2046,10 @@ async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
|
671
2046
|
}
|
|
672
2047
|
}
|
|
673
2048
|
async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
674
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
2049
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
|
|
2050
|
+
if (validateRequestSchema) {
|
|
2051
|
+
UpdatePoolDefinitionRequest.parse({ _id, poolDefinition, options });
|
|
2052
|
+
}
|
|
675
2053
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
676
2054
|
poolDefinition: { ...poolDefinition, id: _id },
|
|
677
2055
|
cascade: options?.cascade
|
|
@@ -700,7 +2078,10 @@ async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
|
700
2078
|
}
|
|
701
2079
|
}
|
|
702
2080
|
async function bulkUpdatePoolDefinitions2(options) {
|
|
703
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
2081
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
2082
|
+
if (validateRequestSchema) {
|
|
2083
|
+
BulkUpdatePoolDefinitionsRequest.parse({ options });
|
|
2084
|
+
}
|
|
704
2085
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
705
2086
|
poolDefinitions: options?.poolDefinitions,
|
|
706
2087
|
cascade: options?.cascade,
|
|
@@ -733,7 +2114,10 @@ async function bulkUpdatePoolDefinitions2(options) {
|
|
|
733
2114
|
}
|
|
734
2115
|
}
|
|
735
2116
|
async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
736
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2117
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2118
|
+
if (validateRequestSchema) {
|
|
2119
|
+
DeletePoolDefinitionRequest.parse({ poolDefinitionId, cascade });
|
|
2120
|
+
}
|
|
737
2121
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
738
2122
|
poolDefinitionId,
|
|
739
2123
|
cascade
|
|
@@ -758,7 +2142,13 @@ async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
|
758
2142
|
}
|
|
759
2143
|
}
|
|
760
2144
|
async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
761
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2145
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2146
|
+
if (validateRequestSchema) {
|
|
2147
|
+
BulkDeletePoolDefinitionsRequest.parse({
|
|
2148
|
+
poolDefinitionIds,
|
|
2149
|
+
options
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
762
2152
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
763
2153
|
poolDefinitionIds,
|
|
764
2154
|
cascade: options?.cascade
|
|
@@ -789,7 +2179,10 @@ async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
|
789
2179
|
}
|
|
790
2180
|
}
|
|
791
2181
|
async function getPoolDefinition2(poolDefinitionId) {
|
|
792
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
2182
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
2183
|
+
if (validateRequestSchema) {
|
|
2184
|
+
GetPoolDefinitionRequest.parse({ poolDefinitionId });
|
|
2185
|
+
}
|
|
793
2186
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
794
2187
|
poolDefinitionId
|
|
795
2188
|
});
|
|
@@ -862,7 +2255,10 @@ function queryPoolDefinitions2(options) {
|
|
|
862
2255
|
});
|
|
863
2256
|
}
|
|
864
2257
|
async function typedQueryPoolDefinitions(query, options) {
|
|
865
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2258
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2259
|
+
if (validateRequestSchema) {
|
|
2260
|
+
QueryPoolDefinitionsRequest.parse({ query, options });
|
|
2261
|
+
}
|
|
866
2262
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
867
2263
|
query,
|
|
868
2264
|
...options
|
|
@@ -893,7 +2289,13 @@ var utils = {
|
|
|
893
2289
|
}
|
|
894
2290
|
};
|
|
895
2291
|
async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options) {
|
|
896
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2292
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2293
|
+
if (validateRequestSchema) {
|
|
2294
|
+
AddPoolDefinitionToProgramDefinitionRequest.parse({
|
|
2295
|
+
poolDefinitionId,
|
|
2296
|
+
options
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
897
2299
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
898
2300
|
poolDefinitionId,
|
|
899
2301
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -926,7 +2328,13 @@ async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options)
|
|
|
926
2328
|
}
|
|
927
2329
|
}
|
|
928
2330
|
async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, options) {
|
|
929
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2331
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2332
|
+
if (validateRequestSchema) {
|
|
2333
|
+
RemovePoolDefinitionFromProgramDefinitionRequest.parse({
|
|
2334
|
+
poolDefinitionId,
|
|
2335
|
+
options
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
930
2338
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
931
2339
|
poolDefinitionId,
|
|
932
2340
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -959,7 +2367,13 @@ async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, opti
|
|
|
959
2367
|
}
|
|
960
2368
|
}
|
|
961
2369
|
async function findPoolDefinitionsByProgramDefinition2(programDefinitionId, options) {
|
|
962
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
2370
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
2371
|
+
if (validateRequestSchema) {
|
|
2372
|
+
FindPoolDefinitionsByProgramDefinitionRequest.parse({
|
|
2373
|
+
programDefinitionId,
|
|
2374
|
+
options
|
|
2375
|
+
});
|
|
2376
|
+
}
|
|
963
2377
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
964
2378
|
programDefinitionId,
|
|
965
2379
|
namespace: options?.namespace
|
|
@@ -991,98 +2405,98 @@ async function findPoolDefinitionsByProgramDefinition2(programDefinitionId, opti
|
|
|
991
2405
|
}
|
|
992
2406
|
|
|
993
2407
|
// src/benefit-programs-v1-pool-definition-pool-definitions.public.ts
|
|
994
|
-
function createPoolDefinition3(httpClient) {
|
|
2408
|
+
function createPoolDefinition3(httpClient, __options) {
|
|
995
2409
|
return (poolDefinition, options) => createPoolDefinition2(
|
|
996
2410
|
poolDefinition,
|
|
997
2411
|
options,
|
|
998
2412
|
// @ts-ignore
|
|
999
|
-
{ httpClient }
|
|
2413
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1000
2414
|
);
|
|
1001
2415
|
}
|
|
1002
|
-
function bulkCreatePoolDefinitions3(httpClient) {
|
|
2416
|
+
function bulkCreatePoolDefinitions3(httpClient, __options) {
|
|
1003
2417
|
return (poolDefinitions, options) => bulkCreatePoolDefinitions2(
|
|
1004
2418
|
poolDefinitions,
|
|
1005
2419
|
options,
|
|
1006
2420
|
// @ts-ignore
|
|
1007
|
-
{ httpClient }
|
|
2421
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1008
2422
|
);
|
|
1009
2423
|
}
|
|
1010
|
-
function updatePoolDefinition3(httpClient) {
|
|
2424
|
+
function updatePoolDefinition3(httpClient, __options) {
|
|
1011
2425
|
return (_id, poolDefinition, options) => updatePoolDefinition2(
|
|
1012
2426
|
_id,
|
|
1013
2427
|
poolDefinition,
|
|
1014
2428
|
options,
|
|
1015
2429
|
// @ts-ignore
|
|
1016
|
-
{ httpClient }
|
|
2430
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1017
2431
|
);
|
|
1018
2432
|
}
|
|
1019
|
-
function bulkUpdatePoolDefinitions3(httpClient) {
|
|
2433
|
+
function bulkUpdatePoolDefinitions3(httpClient, __options) {
|
|
1020
2434
|
return (options) => bulkUpdatePoolDefinitions2(
|
|
1021
2435
|
options,
|
|
1022
2436
|
// @ts-ignore
|
|
1023
|
-
{ httpClient }
|
|
2437
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1024
2438
|
);
|
|
1025
2439
|
}
|
|
1026
|
-
function deletePoolDefinition3(httpClient) {
|
|
2440
|
+
function deletePoolDefinition3(httpClient, __options) {
|
|
1027
2441
|
return (poolDefinitionId, cascade) => deletePoolDefinition2(
|
|
1028
2442
|
poolDefinitionId,
|
|
1029
2443
|
cascade,
|
|
1030
2444
|
// @ts-ignore
|
|
1031
|
-
{ httpClient }
|
|
2445
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1032
2446
|
);
|
|
1033
2447
|
}
|
|
1034
|
-
function bulkDeletePoolDefinitions3(httpClient) {
|
|
2448
|
+
function bulkDeletePoolDefinitions3(httpClient, __options) {
|
|
1035
2449
|
return (poolDefinitionIds, options) => bulkDeletePoolDefinitions2(
|
|
1036
2450
|
poolDefinitionIds,
|
|
1037
2451
|
options,
|
|
1038
2452
|
// @ts-ignore
|
|
1039
|
-
{ httpClient }
|
|
2453
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1040
2454
|
);
|
|
1041
2455
|
}
|
|
1042
|
-
function getPoolDefinition3(httpClient) {
|
|
2456
|
+
function getPoolDefinition3(httpClient, __options) {
|
|
1043
2457
|
return (poolDefinitionId) => getPoolDefinition2(
|
|
1044
2458
|
poolDefinitionId,
|
|
1045
2459
|
// @ts-ignore
|
|
1046
|
-
{ httpClient }
|
|
2460
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1047
2461
|
);
|
|
1048
2462
|
}
|
|
1049
|
-
function queryPoolDefinitions3(httpClient) {
|
|
2463
|
+
function queryPoolDefinitions3(httpClient, __options) {
|
|
1050
2464
|
return (options) => queryPoolDefinitions2(
|
|
1051
2465
|
options,
|
|
1052
2466
|
// @ts-ignore
|
|
1053
|
-
{ httpClient }
|
|
2467
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1054
2468
|
);
|
|
1055
2469
|
}
|
|
1056
|
-
function typedQueryPoolDefinitions2(httpClient) {
|
|
2470
|
+
function typedQueryPoolDefinitions2(httpClient, __options) {
|
|
1057
2471
|
return (query, options) => typedQueryPoolDefinitions(
|
|
1058
2472
|
query,
|
|
1059
2473
|
options,
|
|
1060
2474
|
// @ts-ignore
|
|
1061
|
-
{ httpClient }
|
|
2475
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1062
2476
|
);
|
|
1063
2477
|
}
|
|
1064
|
-
function addPoolDefinitionToProgramDefinition3(httpClient) {
|
|
2478
|
+
function addPoolDefinitionToProgramDefinition3(httpClient, __options) {
|
|
1065
2479
|
return (poolDefinitionId, options) => addPoolDefinitionToProgramDefinition2(
|
|
1066
2480
|
poolDefinitionId,
|
|
1067
2481
|
options,
|
|
1068
2482
|
// @ts-ignore
|
|
1069
|
-
{ httpClient }
|
|
2483
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1070
2484
|
);
|
|
1071
2485
|
}
|
|
1072
|
-
function removePoolDefinitionFromProgramDefinition3(httpClient) {
|
|
2486
|
+
function removePoolDefinitionFromProgramDefinition3(httpClient, __options) {
|
|
1073
2487
|
return (poolDefinitionId, options) => removePoolDefinitionFromProgramDefinition2(
|
|
1074
2488
|
poolDefinitionId,
|
|
1075
2489
|
options,
|
|
1076
2490
|
// @ts-ignore
|
|
1077
|
-
{ httpClient }
|
|
2491
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1078
2492
|
);
|
|
1079
2493
|
}
|
|
1080
|
-
function findPoolDefinitionsByProgramDefinition3(httpClient) {
|
|
2494
|
+
function findPoolDefinitionsByProgramDefinition3(httpClient, __options) {
|
|
1081
2495
|
return (programDefinitionId, options) => findPoolDefinitionsByProgramDefinition2(
|
|
1082
2496
|
programDefinitionId,
|
|
1083
2497
|
options,
|
|
1084
2498
|
// @ts-ignore
|
|
1085
|
-
{ httpClient }
|
|
2499
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
1086
2500
|
);
|
|
1087
2501
|
}
|
|
1088
2502
|
|