@wix/auto_sdk_benefit-programs_pool-definitions 1.0.58 → 1.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +10 -30
- package/build/cjs/index.js +35 -1449
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +11 -1425
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.d.ts +8 -8
- package/build/es/index.d.mts +10 -30
- package/build/es/index.mjs +35 -1439
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +11 -1415
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.d.mts +8 -8
- package/build/internal/cjs/index.d.ts +10 -30
- package/build/internal/cjs/index.js +35 -1449
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +11 -1425
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +8 -8
- package/build/internal/es/index.d.mts +10 -30
- package/build/internal/es/index.mjs +35 -1439
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +11 -1415
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +8 -8
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// index.ts
|
|
@@ -568,1365 +558,6 @@ function findPoolDefinitionsByProgramDefinition(payload) {
|
|
|
568
558
|
|
|
569
559
|
// src/benefit-programs-v1-pool-definition-pool-definitions.universal.ts
|
|
570
560
|
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
|
|
1930
561
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
1931
562
|
var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
|
|
1932
563
|
PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
|
|
@@ -1978,10 +609,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1978
609
|
return WebhookIdentityType2;
|
|
1979
610
|
})(WebhookIdentityType || {});
|
|
1980
611
|
async function createPoolDefinition2(poolDefinition, options) {
|
|
1981
|
-
const { httpClient, sideEffects
|
|
1982
|
-
if (validateRequestSchema) {
|
|
1983
|
-
CreatePoolDefinitionRequest.parse({ poolDefinition, options });
|
|
1984
|
-
}
|
|
612
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1985
613
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1986
614
|
poolDefinition,
|
|
1987
615
|
cascade: options?.cascade
|
|
@@ -2010,10 +638,7 @@ async function createPoolDefinition2(poolDefinition, options) {
|
|
|
2010
638
|
}
|
|
2011
639
|
}
|
|
2012
640
|
async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
2013
|
-
const { httpClient, sideEffects
|
|
2014
|
-
if (validateRequestSchema) {
|
|
2015
|
-
BulkCreatePoolDefinitionsRequest.parse({ poolDefinitions, options });
|
|
2016
|
-
}
|
|
641
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2017
642
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2018
643
|
poolDefinitions,
|
|
2019
644
|
cascade: options?.cascade,
|
|
@@ -2046,10 +671,7 @@ async function bulkCreatePoolDefinitions2(poolDefinitions, options) {
|
|
|
2046
671
|
}
|
|
2047
672
|
}
|
|
2048
673
|
async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
2049
|
-
const { httpClient, sideEffects
|
|
2050
|
-
if (validateRequestSchema) {
|
|
2051
|
-
UpdatePoolDefinitionRequest.parse({ _id, poolDefinition, options });
|
|
2052
|
-
}
|
|
674
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
2053
675
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2054
676
|
poolDefinition: { ...poolDefinition, id: _id },
|
|
2055
677
|
cascade: options?.cascade
|
|
@@ -2078,10 +700,7 @@ async function updatePoolDefinition2(_id, poolDefinition, options) {
|
|
|
2078
700
|
}
|
|
2079
701
|
}
|
|
2080
702
|
async function bulkUpdatePoolDefinitions2(options) {
|
|
2081
|
-
const { httpClient, sideEffects
|
|
2082
|
-
if (validateRequestSchema) {
|
|
2083
|
-
BulkUpdatePoolDefinitionsRequest.parse({ options });
|
|
2084
|
-
}
|
|
703
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2085
704
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2086
705
|
poolDefinitions: options?.poolDefinitions,
|
|
2087
706
|
cascade: options?.cascade,
|
|
@@ -2114,10 +733,7 @@ async function bulkUpdatePoolDefinitions2(options) {
|
|
|
2114
733
|
}
|
|
2115
734
|
}
|
|
2116
735
|
async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
2117
|
-
const { httpClient, sideEffects
|
|
2118
|
-
if (validateRequestSchema) {
|
|
2119
|
-
DeletePoolDefinitionRequest.parse({ poolDefinitionId, cascade });
|
|
2120
|
-
}
|
|
736
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2121
737
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2122
738
|
poolDefinitionId,
|
|
2123
739
|
cascade
|
|
@@ -2142,13 +758,7 @@ async function deletePoolDefinition2(poolDefinitionId, cascade) {
|
|
|
2142
758
|
}
|
|
2143
759
|
}
|
|
2144
760
|
async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
2145
|
-
const { httpClient, sideEffects
|
|
2146
|
-
if (validateRequestSchema) {
|
|
2147
|
-
BulkDeletePoolDefinitionsRequest.parse({
|
|
2148
|
-
poolDefinitionIds,
|
|
2149
|
-
options
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
761
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2152
762
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2153
763
|
poolDefinitionIds,
|
|
2154
764
|
cascade: options?.cascade
|
|
@@ -2179,10 +789,7 @@ async function bulkDeletePoolDefinitions2(poolDefinitionIds, options) {
|
|
|
2179
789
|
}
|
|
2180
790
|
}
|
|
2181
791
|
async function getPoolDefinition2(poolDefinitionId) {
|
|
2182
|
-
const { httpClient, sideEffects
|
|
2183
|
-
if (validateRequestSchema) {
|
|
2184
|
-
GetPoolDefinitionRequest.parse({ poolDefinitionId });
|
|
2185
|
-
}
|
|
792
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2186
793
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2187
794
|
poolDefinitionId
|
|
2188
795
|
});
|
|
@@ -2255,10 +862,7 @@ function queryPoolDefinitions2(options) {
|
|
|
2255
862
|
});
|
|
2256
863
|
}
|
|
2257
864
|
async function typedQueryPoolDefinitions(query, options) {
|
|
2258
|
-
const { httpClient, sideEffects
|
|
2259
|
-
if (validateRequestSchema) {
|
|
2260
|
-
QueryPoolDefinitionsRequest.parse({ query, options });
|
|
2261
|
-
}
|
|
865
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2262
866
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2263
867
|
query,
|
|
2264
868
|
...options
|
|
@@ -2289,13 +893,7 @@ var utils = {
|
|
|
2289
893
|
}
|
|
2290
894
|
};
|
|
2291
895
|
async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options) {
|
|
2292
|
-
const { httpClient, sideEffects
|
|
2293
|
-
if (validateRequestSchema) {
|
|
2294
|
-
AddPoolDefinitionToProgramDefinitionRequest.parse({
|
|
2295
|
-
poolDefinitionId,
|
|
2296
|
-
options
|
|
2297
|
-
});
|
|
2298
|
-
}
|
|
896
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2299
897
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2300
898
|
poolDefinitionId,
|
|
2301
899
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -2328,13 +926,7 @@ async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options)
|
|
|
2328
926
|
}
|
|
2329
927
|
}
|
|
2330
928
|
async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, options) {
|
|
2331
|
-
const { httpClient, sideEffects
|
|
2332
|
-
if (validateRequestSchema) {
|
|
2333
|
-
RemovePoolDefinitionFromProgramDefinitionRequest.parse({
|
|
2334
|
-
poolDefinitionId,
|
|
2335
|
-
options
|
|
2336
|
-
});
|
|
2337
|
-
}
|
|
929
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2338
930
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2339
931
|
poolDefinitionId,
|
|
2340
932
|
programDefinitionId: options?.programDefinitionId,
|
|
@@ -2367,13 +959,7 @@ async function removePoolDefinitionFromProgramDefinition2(poolDefinitionId, opti
|
|
|
2367
959
|
}
|
|
2368
960
|
}
|
|
2369
961
|
async function findPoolDefinitionsByProgramDefinition2(programDefinitionId, options) {
|
|
2370
|
-
const { httpClient, sideEffects
|
|
2371
|
-
if (validateRequestSchema) {
|
|
2372
|
-
FindPoolDefinitionsByProgramDefinitionRequest.parse({
|
|
2373
|
-
programDefinitionId,
|
|
2374
|
-
options
|
|
2375
|
-
});
|
|
2376
|
-
}
|
|
962
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2377
963
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
2378
964
|
programDefinitionId,
|
|
2379
965
|
namespace: options?.namespace
|
|
@@ -2405,98 +991,98 @@ async function findPoolDefinitionsByProgramDefinition2(programDefinitionId, opti
|
|
|
2405
991
|
}
|
|
2406
992
|
|
|
2407
993
|
// src/benefit-programs-v1-pool-definition-pool-definitions.public.ts
|
|
2408
|
-
function createPoolDefinition3(httpClient
|
|
994
|
+
function createPoolDefinition3(httpClient) {
|
|
2409
995
|
return (poolDefinition, options) => createPoolDefinition2(
|
|
2410
996
|
poolDefinition,
|
|
2411
997
|
options,
|
|
2412
998
|
// @ts-ignore
|
|
2413
|
-
{ httpClient
|
|
999
|
+
{ httpClient }
|
|
2414
1000
|
);
|
|
2415
1001
|
}
|
|
2416
|
-
function bulkCreatePoolDefinitions3(httpClient
|
|
1002
|
+
function bulkCreatePoolDefinitions3(httpClient) {
|
|
2417
1003
|
return (poolDefinitions, options) => bulkCreatePoolDefinitions2(
|
|
2418
1004
|
poolDefinitions,
|
|
2419
1005
|
options,
|
|
2420
1006
|
// @ts-ignore
|
|
2421
|
-
{ httpClient
|
|
1007
|
+
{ httpClient }
|
|
2422
1008
|
);
|
|
2423
1009
|
}
|
|
2424
|
-
function updatePoolDefinition3(httpClient
|
|
1010
|
+
function updatePoolDefinition3(httpClient) {
|
|
2425
1011
|
return (_id, poolDefinition, options) => updatePoolDefinition2(
|
|
2426
1012
|
_id,
|
|
2427
1013
|
poolDefinition,
|
|
2428
1014
|
options,
|
|
2429
1015
|
// @ts-ignore
|
|
2430
|
-
{ httpClient
|
|
1016
|
+
{ httpClient }
|
|
2431
1017
|
);
|
|
2432
1018
|
}
|
|
2433
|
-
function bulkUpdatePoolDefinitions3(httpClient
|
|
1019
|
+
function bulkUpdatePoolDefinitions3(httpClient) {
|
|
2434
1020
|
return (options) => bulkUpdatePoolDefinitions2(
|
|
2435
1021
|
options,
|
|
2436
1022
|
// @ts-ignore
|
|
2437
|
-
{ httpClient
|
|
1023
|
+
{ httpClient }
|
|
2438
1024
|
);
|
|
2439
1025
|
}
|
|
2440
|
-
function deletePoolDefinition3(httpClient
|
|
1026
|
+
function deletePoolDefinition3(httpClient) {
|
|
2441
1027
|
return (poolDefinitionId, cascade) => deletePoolDefinition2(
|
|
2442
1028
|
poolDefinitionId,
|
|
2443
1029
|
cascade,
|
|
2444
1030
|
// @ts-ignore
|
|
2445
|
-
{ httpClient
|
|
1031
|
+
{ httpClient }
|
|
2446
1032
|
);
|
|
2447
1033
|
}
|
|
2448
|
-
function bulkDeletePoolDefinitions3(httpClient
|
|
1034
|
+
function bulkDeletePoolDefinitions3(httpClient) {
|
|
2449
1035
|
return (poolDefinitionIds, options) => bulkDeletePoolDefinitions2(
|
|
2450
1036
|
poolDefinitionIds,
|
|
2451
1037
|
options,
|
|
2452
1038
|
// @ts-ignore
|
|
2453
|
-
{ httpClient
|
|
1039
|
+
{ httpClient }
|
|
2454
1040
|
);
|
|
2455
1041
|
}
|
|
2456
|
-
function getPoolDefinition3(httpClient
|
|
1042
|
+
function getPoolDefinition3(httpClient) {
|
|
2457
1043
|
return (poolDefinitionId) => getPoolDefinition2(
|
|
2458
1044
|
poolDefinitionId,
|
|
2459
1045
|
// @ts-ignore
|
|
2460
|
-
{ httpClient
|
|
1046
|
+
{ httpClient }
|
|
2461
1047
|
);
|
|
2462
1048
|
}
|
|
2463
|
-
function queryPoolDefinitions3(httpClient
|
|
1049
|
+
function queryPoolDefinitions3(httpClient) {
|
|
2464
1050
|
return (options) => queryPoolDefinitions2(
|
|
2465
1051
|
options,
|
|
2466
1052
|
// @ts-ignore
|
|
2467
|
-
{ httpClient
|
|
1053
|
+
{ httpClient }
|
|
2468
1054
|
);
|
|
2469
1055
|
}
|
|
2470
|
-
function typedQueryPoolDefinitions2(httpClient
|
|
1056
|
+
function typedQueryPoolDefinitions2(httpClient) {
|
|
2471
1057
|
return (query, options) => typedQueryPoolDefinitions(
|
|
2472
1058
|
query,
|
|
2473
1059
|
options,
|
|
2474
1060
|
// @ts-ignore
|
|
2475
|
-
{ httpClient
|
|
1061
|
+
{ httpClient }
|
|
2476
1062
|
);
|
|
2477
1063
|
}
|
|
2478
|
-
function addPoolDefinitionToProgramDefinition3(httpClient
|
|
1064
|
+
function addPoolDefinitionToProgramDefinition3(httpClient) {
|
|
2479
1065
|
return (poolDefinitionId, options) => addPoolDefinitionToProgramDefinition2(
|
|
2480
1066
|
poolDefinitionId,
|
|
2481
1067
|
options,
|
|
2482
1068
|
// @ts-ignore
|
|
2483
|
-
{ httpClient
|
|
1069
|
+
{ httpClient }
|
|
2484
1070
|
);
|
|
2485
1071
|
}
|
|
2486
|
-
function removePoolDefinitionFromProgramDefinition3(httpClient
|
|
1072
|
+
function removePoolDefinitionFromProgramDefinition3(httpClient) {
|
|
2487
1073
|
return (poolDefinitionId, options) => removePoolDefinitionFromProgramDefinition2(
|
|
2488
1074
|
poolDefinitionId,
|
|
2489
1075
|
options,
|
|
2490
1076
|
// @ts-ignore
|
|
2491
|
-
{ httpClient
|
|
1077
|
+
{ httpClient }
|
|
2492
1078
|
);
|
|
2493
1079
|
}
|
|
2494
|
-
function findPoolDefinitionsByProgramDefinition3(httpClient
|
|
1080
|
+
function findPoolDefinitionsByProgramDefinition3(httpClient) {
|
|
2495
1081
|
return (programDefinitionId, options) => findPoolDefinitionsByProgramDefinition2(
|
|
2496
1082
|
programDefinitionId,
|
|
2497
1083
|
options,
|
|
2498
1084
|
// @ts-ignore
|
|
2499
|
-
{ httpClient
|
|
1085
|
+
{ httpClient }
|
|
2500
1086
|
);
|
|
2501
1087
|
}
|
|
2502
1088
|
|