@wix/auto_sdk_benefit-programs_pools 1.0.82 → 1.0.84
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 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +15 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +15 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +12 -12
- package/build/internal/cjs/index.typings.d.ts +17 -17
- package/build/internal/cjs/meta.d.ts +2 -2
- package/build/internal/es/index.d.mts +12 -12
- package/build/internal/es/index.typings.d.mts +17 -17
- package/build/internal/es/meta.d.mts +2 -2
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ interface GetPoolSignature {
|
|
|
9
9
|
* @param - ID of the pool to retrieve.
|
|
10
10
|
* @returns Retrieved pool.
|
|
11
11
|
*/
|
|
12
|
-
(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`,
|
|
12
|
+
(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
13
13
|
}
|
|
14
14
|
declare function updatePool$1(httpClient: HttpClient): UpdatePoolSignature;
|
|
15
15
|
interface UpdatePoolSignature {
|
|
@@ -24,7 +24,7 @@ interface UpdatePoolSignature {
|
|
|
24
24
|
* @param - Pool ID.
|
|
25
25
|
* @returns Updated pool.
|
|
26
26
|
*/
|
|
27
|
-
(_id: string, pool: NonNullablePaths<UpdatePool, `revision`,
|
|
27
|
+
(_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 0>): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
28
28
|
}
|
|
29
29
|
declare function redeemBenefit$1(httpClient: HttpClient): RedeemBenefitSignature;
|
|
30
30
|
interface RedeemBenefitSignature {
|
|
@@ -34,7 +34,7 @@ interface RedeemBenefitSignature {
|
|
|
34
34
|
* Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.
|
|
35
35
|
* @param - ID of the pool that contains the benefit to redeem.
|
|
36
36
|
*/
|
|
37
|
-
(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
37
|
+
(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`, 0> & {
|
|
38
38
|
__applicationErrorsType?: RedeemBenefitApplicationErrors;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
@@ -49,7 +49,7 @@ interface ReallocateBenefitSignature {
|
|
|
49
49
|
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
50
50
|
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
51
51
|
*/
|
|
52
|
-
(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`,
|
|
52
|
+
(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`, 0>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 0> & {
|
|
53
53
|
__applicationErrorsType?: ReallocateBenefitApplicationErrors;
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
@@ -64,7 +64,7 @@ interface CancelRedemptionSignature {
|
|
|
64
64
|
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
65
65
|
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
66
66
|
*/
|
|
67
|
-
(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`,
|
|
67
|
+
(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 0>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 0> & {
|
|
68
68
|
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
69
69
|
}>;
|
|
70
70
|
}
|
|
@@ -76,7 +76,7 @@ interface CheckBenefitEligibilitySignature {
|
|
|
76
76
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
77
77
|
* @param - ID of the pool that the benefit to check belongs to.
|
|
78
78
|
*/
|
|
79
|
-
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
79
|
+
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.benefitResults` | `result.benefitResults.${number}.eligibleBenefitOptions.poolId` | `result.benefitResults.${number}.eligibleBenefitOptions.benefitKey` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.externalId` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.category` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.providerAppId` | `result.benefitResults.${number}.notEnoughBalanceOptions.poolId` | `result.benefitResults.${number}.notEnoughBalanceOptions.availableBalance` | `result.benefitResults.${number}.notEnoughBalanceOptions.requestedBalance` | `result.benefitResults.${number}.policyExpressionEvaluatedToFalseOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolStatus` | `result.benefitResults.${number}.benefitNotFoundOptions.poolId` | `result.benefitResults.${number}.poolNotFoundOptions.poolId` | `result.benefitResults.${number}.type`, 5>>;
|
|
80
80
|
}
|
|
81
81
|
declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient): BulkCheckBenefitEligibilitySignature;
|
|
82
82
|
interface BulkCheckBenefitEligibilitySignature {
|
|
@@ -87,7 +87,7 @@ interface BulkCheckBenefitEligibilitySignature {
|
|
|
87
87
|
*
|
|
88
88
|
* Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
|
|
89
89
|
*/
|
|
90
|
-
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`,
|
|
90
|
+
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 3>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count`, 4>>;
|
|
91
91
|
}
|
|
92
92
|
declare function getEligibleBenefits$1(httpClient: HttpClient): GetEligibleBenefitsSignature;
|
|
93
93
|
interface GetEligibleBenefitsSignature {
|
|
@@ -98,7 +98,7 @@ interface GetEligibleBenefitsSignature {
|
|
|
98
98
|
* This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.
|
|
99
99
|
* @param - Item reference.
|
|
100
100
|
*/
|
|
101
|
-
(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`,
|
|
101
|
+
(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`, 0>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 0>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`, 3> & {
|
|
102
102
|
__applicationErrorsType?: GetEligibleBenefitsApplicationErrors;
|
|
103
103
|
}>;
|
|
104
104
|
}
|
|
@@ -107,21 +107,21 @@ interface BulkUpdatePoolsSignature {
|
|
|
107
107
|
/**
|
|
108
108
|
* Updates pools.
|
|
109
109
|
*/
|
|
110
|
-
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`,
|
|
110
|
+
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 3>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.status` | `results.${number}.item.beneficiary.anonymousVisitorId` | `results.${number}.item.beneficiary.memberId` | `results.${number}.item.beneficiary.wixUserId` | `results.${number}.item.displayName` | `results.${number}.item.programDefinition._id` | `results.${number}.item.program._id` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
111
111
|
}
|
|
112
112
|
declare function checkBenefitEligibilityByFilter$1(httpClient: HttpClient): CheckBenefitEligibilityByFilterSignature;
|
|
113
113
|
interface CheckBenefitEligibilityByFilterSignature {
|
|
114
114
|
/**
|
|
115
|
-
* Checks benefit eligibility across the pools that
|
|
115
|
+
* Checks benefit eligibility across the beneficiary's pools that contain a benefit for the given item.
|
|
116
116
|
*
|
|
117
|
-
*
|
|
117
|
+
* Pools are matched by `itemReference` within `namespace` and must belong to `beneficiary`, which defaults to the calling identity. `poolSelector` narrows the matched pools further.
|
|
118
118
|
*
|
|
119
119
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
120
120
|
*
|
|
121
121
|
* Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
|
|
122
122
|
* @param - 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.
|
|
123
123
|
*/
|
|
124
|
-
(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`,
|
|
124
|
+
(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 0> & {
|
|
125
125
|
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
126
126
|
}>;
|
|
127
127
|
}
|
|
@@ -1915,14 +1915,14 @@ interface CheckBenefitEligibilityByFilterRequest {
|
|
|
1915
1915
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1916
1916
|
*/
|
|
1917
1917
|
targetDate?: Date | null;
|
|
1918
|
-
/** Pool beneficiary.
|
|
1918
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
1919
1919
|
beneficiary?: CommonIdentificationData;
|
|
1920
1920
|
/** Additional information. */
|
|
1921
1921
|
additionalData?: Record<string, any> | null;
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
1924
1924
|
*
|
|
1925
|
-
* When omitted,
|
|
1925
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
1926
1926
|
*/
|
|
1927
1927
|
poolSelector?: PoolSelector;
|
|
1928
1928
|
}
|
|
@@ -2226,7 +2226,7 @@ type CheckBenefitEligibilityByFilterApplicationErrors = {
|
|
|
2226
2226
|
* @returns Retrieved pool.
|
|
2227
2227
|
* @fqn wix.benefit_programs.v1.pool.PoolService.GetPool
|
|
2228
2228
|
*/
|
|
2229
|
-
declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`,
|
|
2229
|
+
declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
2230
2230
|
/**
|
|
2231
2231
|
* Updates a pool.
|
|
2232
2232
|
*
|
|
@@ -2245,7 +2245,7 @@ declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status
|
|
|
2245
2245
|
* @returns Updated pool.
|
|
2246
2246
|
* @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool
|
|
2247
2247
|
*/
|
|
2248
|
-
declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`,
|
|
2248
|
+
declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 0>): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
2249
2249
|
interface UpdatePool {
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Pool ID.
|
|
@@ -2463,7 +2463,7 @@ interface PoolsQueryBuilder {
|
|
|
2463
2463
|
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
2464
2464
|
* @requiredField query
|
|
2465
2465
|
*/
|
|
2466
|
-
declare function typedQueryPools(query: PoolQuery, options?: QueryPoolsOptions): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`,
|
|
2466
|
+
declare function typedQueryPools(query: PoolQuery, options?: QueryPoolsOptions): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`, 4>>;
|
|
2467
2467
|
interface PoolQuerySpec extends QuerySpec {
|
|
2468
2468
|
paging: 'cursor';
|
|
2469
2469
|
wql: [
|
|
@@ -2568,7 +2568,7 @@ declare const utils: {
|
|
|
2568
2568
|
* @applicableIdentity APP
|
|
2569
2569
|
* @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit
|
|
2570
2570
|
*/
|
|
2571
|
-
declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
2571
|
+
declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`, 0> & {
|
|
2572
2572
|
__applicationErrorsType?: RedeemBenefitApplicationErrors;
|
|
2573
2573
|
}>;
|
|
2574
2574
|
interface RedeemBenefitOptions {
|
|
@@ -2626,7 +2626,7 @@ interface RedeemBenefitOptions {
|
|
|
2626
2626
|
* @applicableIdentity APP
|
|
2627
2627
|
* @fqn wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit
|
|
2628
2628
|
*/
|
|
2629
|
-
declare function reallocateBenefit(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`,
|
|
2629
|
+
declare function reallocateBenefit(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`, 0>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 0> & {
|
|
2630
2630
|
__applicationErrorsType?: ReallocateBenefitApplicationErrors;
|
|
2631
2631
|
}>;
|
|
2632
2632
|
interface ReallocateBenefitOptions {
|
|
@@ -2663,7 +2663,7 @@ interface ReallocateBenefitOptions {
|
|
|
2663
2663
|
* @applicableIdentity APP
|
|
2664
2664
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CancelRedemption
|
|
2665
2665
|
*/
|
|
2666
|
-
declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`,
|
|
2666
|
+
declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 0>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 0> & {
|
|
2667
2667
|
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
2668
2668
|
}>;
|
|
2669
2669
|
interface CancelRedemptionOptions {
|
|
@@ -2689,7 +2689,7 @@ interface CancelRedemptionOptions {
|
|
|
2689
2689
|
* @applicableIdentity APP
|
|
2690
2690
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility
|
|
2691
2691
|
*/
|
|
2692
|
-
declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
2692
|
+
declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.benefitResults` | `result.benefitResults.${number}.eligibleBenefitOptions.poolId` | `result.benefitResults.${number}.eligibleBenefitOptions.benefitKey` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.externalId` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.category` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.providerAppId` | `result.benefitResults.${number}.notEnoughBalanceOptions.poolId` | `result.benefitResults.${number}.notEnoughBalanceOptions.availableBalance` | `result.benefitResults.${number}.notEnoughBalanceOptions.requestedBalance` | `result.benefitResults.${number}.policyExpressionEvaluatedToFalseOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolStatus` | `result.benefitResults.${number}.benefitNotFoundOptions.poolId` | `result.benefitResults.${number}.poolNotFoundOptions.poolId` | `result.benefitResults.${number}.type`, 5>>;
|
|
2693
2693
|
interface CheckBenefitEligibilityOptions {
|
|
2694
2694
|
/**
|
|
2695
2695
|
* Key of the benefit to check.
|
|
@@ -2745,7 +2745,7 @@ interface CheckBenefitEligibilityOptions {
|
|
|
2745
2745
|
* @applicableIdentity APP
|
|
2746
2746
|
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility
|
|
2747
2747
|
*/
|
|
2748
|
-
declare function bulkCheckBenefitEligibility(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`,
|
|
2748
|
+
declare function bulkCheckBenefitEligibility(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 3>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count`, 4>>;
|
|
2749
2749
|
interface BulkCheckBenefitEligibilityOptions {
|
|
2750
2750
|
/**
|
|
2751
2751
|
* List of benefits to check.
|
|
@@ -2777,7 +2777,7 @@ interface BulkCheckBenefitEligibilityOptions {
|
|
|
2777
2777
|
* @applicableIdentity APP
|
|
2778
2778
|
* @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits
|
|
2779
2779
|
*/
|
|
2780
|
-
declare function getEligibleBenefits(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`,
|
|
2780
|
+
declare function getEligibleBenefits(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`, 0>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 0>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`, 3> & {
|
|
2781
2781
|
__applicationErrorsType?: GetEligibleBenefitsApplicationErrors;
|
|
2782
2782
|
}>;
|
|
2783
2783
|
interface GetEligibleBenefitsOptions {
|
|
@@ -2813,7 +2813,7 @@ interface GetEligibleBenefitsOptions {
|
|
|
2813
2813
|
* @applicableIdentity APP
|
|
2814
2814
|
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools
|
|
2815
2815
|
*/
|
|
2816
|
-
declare function bulkUpdatePools(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`,
|
|
2816
|
+
declare function bulkUpdatePools(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 3>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.status` | `results.${number}.item.beneficiary.anonymousVisitorId` | `results.${number}.item.beneficiary.memberId` | `results.${number}.item.beneficiary.wixUserId` | `results.${number}.item.displayName` | `results.${number}.item.programDefinition._id` | `results.${number}.item.program._id` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
2817
2817
|
interface BulkUpdatePoolsOptions {
|
|
2818
2818
|
/**
|
|
2819
2819
|
* Pools to update.
|
|
@@ -2829,9 +2829,9 @@ interface BulkUpdatePoolsOptions {
|
|
|
2829
2829
|
returnEntity?: boolean;
|
|
2830
2830
|
}
|
|
2831
2831
|
/**
|
|
2832
|
-
* Checks benefit eligibility across the pools that
|
|
2832
|
+
* Checks benefit eligibility across the beneficiary's pools that contain a benefit for the given item.
|
|
2833
2833
|
*
|
|
2834
|
-
*
|
|
2834
|
+
* Pools are matched by `itemReference` within `namespace` and must belong to `beneficiary`, which defaults to the calling identity. `poolSelector` narrows the matched pools further.
|
|
2835
2835
|
*
|
|
2836
2836
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
2837
2837
|
*
|
|
@@ -2847,7 +2847,7 @@ interface BulkUpdatePoolsOptions {
|
|
|
2847
2847
|
* @applicableIdentity APP
|
|
2848
2848
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter
|
|
2849
2849
|
*/
|
|
2850
|
-
declare function checkBenefitEligibilityByFilter(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`,
|
|
2850
|
+
declare function checkBenefitEligibilityByFilter(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 0> & {
|
|
2851
2851
|
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
2852
2852
|
}>;
|
|
2853
2853
|
interface CheckBenefitEligibilityByFilterOptions {
|
|
@@ -2866,14 +2866,14 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2866
2866
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2867
2867
|
*/
|
|
2868
2868
|
targetDate?: Date | null;
|
|
2869
|
-
/** Pool beneficiary.
|
|
2869
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
2870
2870
|
beneficiary?: CommonIdentificationData;
|
|
2871
2871
|
/** Additional information. */
|
|
2872
2872
|
additionalData?: Record<string, any> | null;
|
|
2873
2873
|
/**
|
|
2874
2874
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
2875
2875
|
*
|
|
2876
|
-
* When omitted,
|
|
2876
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
2877
2877
|
*/
|
|
2878
2878
|
poolSelector?: PoolSelector;
|
|
2879
2879
|
}
|
|
@@ -1915,14 +1915,14 @@ interface CheckBenefitEligibilityByFilterRequest {
|
|
|
1915
1915
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1916
1916
|
*/
|
|
1917
1917
|
targetDate?: Date | null;
|
|
1918
|
-
/** Pool beneficiary.
|
|
1918
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
1919
1919
|
beneficiary?: CommonIdentificationData;
|
|
1920
1920
|
/** Additional information. */
|
|
1921
1921
|
additionalData?: Record<string, any> | null;
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
1924
1924
|
*
|
|
1925
|
-
* When omitted,
|
|
1925
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
1926
1926
|
*/
|
|
1927
1927
|
poolSelector?: PoolSelector;
|
|
1928
1928
|
}
|
|
@@ -9,7 +9,7 @@ interface GetPoolSignature {
|
|
|
9
9
|
* @param - ID of the pool to retrieve.
|
|
10
10
|
* @returns Retrieved pool.
|
|
11
11
|
*/
|
|
12
|
-
(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`,
|
|
12
|
+
(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
13
13
|
}
|
|
14
14
|
declare function updatePool$1(httpClient: HttpClient): UpdatePoolSignature;
|
|
15
15
|
interface UpdatePoolSignature {
|
|
@@ -24,7 +24,7 @@ interface UpdatePoolSignature {
|
|
|
24
24
|
* @param - Pool ID.
|
|
25
25
|
* @returns Updated pool.
|
|
26
26
|
*/
|
|
27
|
-
(_id: string, pool: NonNullablePaths<UpdatePool, `revision`,
|
|
27
|
+
(_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 0>): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
28
28
|
}
|
|
29
29
|
declare function redeemBenefit$1(httpClient: HttpClient): RedeemBenefitSignature;
|
|
30
30
|
interface RedeemBenefitSignature {
|
|
@@ -34,7 +34,7 @@ interface RedeemBenefitSignature {
|
|
|
34
34
|
* Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.
|
|
35
35
|
* @param - ID of the pool that contains the benefit to redeem.
|
|
36
36
|
*/
|
|
37
|
-
(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
37
|
+
(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`, 0> & {
|
|
38
38
|
__applicationErrorsType?: RedeemBenefitApplicationErrors;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
@@ -49,7 +49,7 @@ interface ReallocateBenefitSignature {
|
|
|
49
49
|
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
50
50
|
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
51
51
|
*/
|
|
52
|
-
(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`,
|
|
52
|
+
(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`, 0>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 0> & {
|
|
53
53
|
__applicationErrorsType?: ReallocateBenefitApplicationErrors;
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
@@ -64,7 +64,7 @@ interface CancelRedemptionSignature {
|
|
|
64
64
|
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
65
65
|
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
66
66
|
*/
|
|
67
|
-
(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`,
|
|
67
|
+
(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 0>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 0> & {
|
|
68
68
|
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
69
69
|
}>;
|
|
70
70
|
}
|
|
@@ -76,7 +76,7 @@ interface CheckBenefitEligibilitySignature {
|
|
|
76
76
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
77
77
|
* @param - ID of the pool that the benefit to check belongs to.
|
|
78
78
|
*/
|
|
79
|
-
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
79
|
+
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.benefitResults` | `result.benefitResults.${number}.eligibleBenefitOptions.poolId` | `result.benefitResults.${number}.eligibleBenefitOptions.benefitKey` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.externalId` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.category` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.providerAppId` | `result.benefitResults.${number}.notEnoughBalanceOptions.poolId` | `result.benefitResults.${number}.notEnoughBalanceOptions.availableBalance` | `result.benefitResults.${number}.notEnoughBalanceOptions.requestedBalance` | `result.benefitResults.${number}.policyExpressionEvaluatedToFalseOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolStatus` | `result.benefitResults.${number}.benefitNotFoundOptions.poolId` | `result.benefitResults.${number}.poolNotFoundOptions.poolId` | `result.benefitResults.${number}.type`, 5>>;
|
|
80
80
|
}
|
|
81
81
|
declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient): BulkCheckBenefitEligibilitySignature;
|
|
82
82
|
interface BulkCheckBenefitEligibilitySignature {
|
|
@@ -87,7 +87,7 @@ interface BulkCheckBenefitEligibilitySignature {
|
|
|
87
87
|
*
|
|
88
88
|
* Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
|
|
89
89
|
*/
|
|
90
|
-
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`,
|
|
90
|
+
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 3>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count`, 4>>;
|
|
91
91
|
}
|
|
92
92
|
declare function getEligibleBenefits$1(httpClient: HttpClient): GetEligibleBenefitsSignature;
|
|
93
93
|
interface GetEligibleBenefitsSignature {
|
|
@@ -98,7 +98,7 @@ interface GetEligibleBenefitsSignature {
|
|
|
98
98
|
* This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.
|
|
99
99
|
* @param - Item reference.
|
|
100
100
|
*/
|
|
101
|
-
(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`,
|
|
101
|
+
(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`, 0>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 0>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`, 3> & {
|
|
102
102
|
__applicationErrorsType?: GetEligibleBenefitsApplicationErrors;
|
|
103
103
|
}>;
|
|
104
104
|
}
|
|
@@ -107,21 +107,21 @@ interface BulkUpdatePoolsSignature {
|
|
|
107
107
|
/**
|
|
108
108
|
* Updates pools.
|
|
109
109
|
*/
|
|
110
|
-
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`,
|
|
110
|
+
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 3>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.status` | `results.${number}.item.beneficiary.anonymousVisitorId` | `results.${number}.item.beneficiary.memberId` | `results.${number}.item.beneficiary.wixUserId` | `results.${number}.item.displayName` | `results.${number}.item.programDefinition._id` | `results.${number}.item.program._id` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
111
111
|
}
|
|
112
112
|
declare function checkBenefitEligibilityByFilter$1(httpClient: HttpClient): CheckBenefitEligibilityByFilterSignature;
|
|
113
113
|
interface CheckBenefitEligibilityByFilterSignature {
|
|
114
114
|
/**
|
|
115
|
-
* Checks benefit eligibility across the pools that
|
|
115
|
+
* Checks benefit eligibility across the beneficiary's pools that contain a benefit for the given item.
|
|
116
116
|
*
|
|
117
|
-
*
|
|
117
|
+
* Pools are matched by `itemReference` within `namespace` and must belong to `beneficiary`, which defaults to the calling identity. `poolSelector` narrows the matched pools further.
|
|
118
118
|
*
|
|
119
119
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
120
120
|
*
|
|
121
121
|
* Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
|
|
122
122
|
* @param - 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.
|
|
123
123
|
*/
|
|
124
|
-
(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`,
|
|
124
|
+
(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 0> & {
|
|
125
125
|
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
126
126
|
}>;
|
|
127
127
|
}
|
|
@@ -1915,14 +1915,14 @@ interface CheckBenefitEligibilityByFilterRequest {
|
|
|
1915
1915
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1916
1916
|
*/
|
|
1917
1917
|
targetDate?: Date | null;
|
|
1918
|
-
/** Pool beneficiary.
|
|
1918
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
1919
1919
|
beneficiary?: CommonIdentificationData;
|
|
1920
1920
|
/** Additional information. */
|
|
1921
1921
|
additionalData?: Record<string, any> | null;
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
1924
1924
|
*
|
|
1925
|
-
* When omitted,
|
|
1925
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
1926
1926
|
*/
|
|
1927
1927
|
poolSelector?: PoolSelector;
|
|
1928
1928
|
}
|
|
@@ -2226,7 +2226,7 @@ type CheckBenefitEligibilityByFilterApplicationErrors = {
|
|
|
2226
2226
|
* @returns Retrieved pool.
|
|
2227
2227
|
* @fqn wix.benefit_programs.v1.pool.PoolService.GetPool
|
|
2228
2228
|
*/
|
|
2229
|
-
declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`,
|
|
2229
|
+
declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
2230
2230
|
/**
|
|
2231
2231
|
* Updates a pool.
|
|
2232
2232
|
*
|
|
@@ -2245,7 +2245,7 @@ declare function getPool(poolId: string): Promise<NonNullablePaths<Pool, `status
|
|
|
2245
2245
|
* @returns Updated pool.
|
|
2246
2246
|
* @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool
|
|
2247
2247
|
*/
|
|
2248
|
-
declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`,
|
|
2248
|
+
declare function updatePool(_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 0>): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 3>>;
|
|
2249
2249
|
interface UpdatePool {
|
|
2250
2250
|
/**
|
|
2251
2251
|
* Pool ID.
|
|
@@ -2463,7 +2463,7 @@ interface PoolsQueryBuilder {
|
|
|
2463
2463
|
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
2464
2464
|
* @requiredField query
|
|
2465
2465
|
*/
|
|
2466
|
-
declare function typedQueryPools(query: PoolQuery, options?: QueryPoolsOptions): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`,
|
|
2466
|
+
declare function typedQueryPools(query: PoolQuery, options?: QueryPoolsOptions): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`, 4>>;
|
|
2467
2467
|
interface PoolQuerySpec extends QuerySpec {
|
|
2468
2468
|
paging: 'cursor';
|
|
2469
2469
|
wql: [
|
|
@@ -2568,7 +2568,7 @@ declare const utils: {
|
|
|
2568
2568
|
* @applicableIdentity APP
|
|
2569
2569
|
* @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit
|
|
2570
2570
|
*/
|
|
2571
|
-
declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
2571
|
+
declare function redeemBenefit(poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`, 0> & {
|
|
2572
2572
|
__applicationErrorsType?: RedeemBenefitApplicationErrors;
|
|
2573
2573
|
}>;
|
|
2574
2574
|
interface RedeemBenefitOptions {
|
|
@@ -2626,7 +2626,7 @@ interface RedeemBenefitOptions {
|
|
|
2626
2626
|
* @applicableIdentity APP
|
|
2627
2627
|
* @fqn wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit
|
|
2628
2628
|
*/
|
|
2629
|
-
declare function reallocateBenefit(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`,
|
|
2629
|
+
declare function reallocateBenefit(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`, 0>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 0> & {
|
|
2630
2630
|
__applicationErrorsType?: ReallocateBenefitApplicationErrors;
|
|
2631
2631
|
}>;
|
|
2632
2632
|
interface ReallocateBenefitOptions {
|
|
@@ -2663,7 +2663,7 @@ interface ReallocateBenefitOptions {
|
|
|
2663
2663
|
* @applicableIdentity APP
|
|
2664
2664
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CancelRedemption
|
|
2665
2665
|
*/
|
|
2666
|
-
declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`,
|
|
2666
|
+
declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 0>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 0> & {
|
|
2667
2667
|
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
2668
2668
|
}>;
|
|
2669
2669
|
interface CancelRedemptionOptions {
|
|
@@ -2689,7 +2689,7 @@ interface CancelRedemptionOptions {
|
|
|
2689
2689
|
* @applicableIdentity APP
|
|
2690
2690
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility
|
|
2691
2691
|
*/
|
|
2692
|
-
declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`,
|
|
2692
|
+
declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.benefitResults` | `result.benefitResults.${number}.eligibleBenefitOptions.poolId` | `result.benefitResults.${number}.eligibleBenefitOptions.benefitKey` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.externalId` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.category` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.providerAppId` | `result.benefitResults.${number}.notEnoughBalanceOptions.poolId` | `result.benefitResults.${number}.notEnoughBalanceOptions.availableBalance` | `result.benefitResults.${number}.notEnoughBalanceOptions.requestedBalance` | `result.benefitResults.${number}.policyExpressionEvaluatedToFalseOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolStatus` | `result.benefitResults.${number}.benefitNotFoundOptions.poolId` | `result.benefitResults.${number}.poolNotFoundOptions.poolId` | `result.benefitResults.${number}.type`, 5>>;
|
|
2693
2693
|
interface CheckBenefitEligibilityOptions {
|
|
2694
2694
|
/**
|
|
2695
2695
|
* Key of the benefit to check.
|
|
@@ -2745,7 +2745,7 @@ interface CheckBenefitEligibilityOptions {
|
|
|
2745
2745
|
* @applicableIdentity APP
|
|
2746
2746
|
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility
|
|
2747
2747
|
*/
|
|
2748
|
-
declare function bulkCheckBenefitEligibility(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`,
|
|
2748
|
+
declare function bulkCheckBenefitEligibility(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 3>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count`, 4>>;
|
|
2749
2749
|
interface BulkCheckBenefitEligibilityOptions {
|
|
2750
2750
|
/**
|
|
2751
2751
|
* List of benefits to check.
|
|
@@ -2777,7 +2777,7 @@ interface BulkCheckBenefitEligibilityOptions {
|
|
|
2777
2777
|
* @applicableIdentity APP
|
|
2778
2778
|
* @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits
|
|
2779
2779
|
*/
|
|
2780
|
-
declare function getEligibleBenefits(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`,
|
|
2780
|
+
declare function getEligibleBenefits(itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`, 0>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 0>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`, 3> & {
|
|
2781
2781
|
__applicationErrorsType?: GetEligibleBenefitsApplicationErrors;
|
|
2782
2782
|
}>;
|
|
2783
2783
|
interface GetEligibleBenefitsOptions {
|
|
@@ -2813,7 +2813,7 @@ interface GetEligibleBenefitsOptions {
|
|
|
2813
2813
|
* @applicableIdentity APP
|
|
2814
2814
|
* @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools
|
|
2815
2815
|
*/
|
|
2816
|
-
declare function bulkUpdatePools(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`,
|
|
2816
|
+
declare function bulkUpdatePools(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 3>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.status` | `results.${number}.item.beneficiary.anonymousVisitorId` | `results.${number}.item.beneficiary.memberId` | `results.${number}.item.beneficiary.wixUserId` | `results.${number}.item.displayName` | `results.${number}.item.programDefinition._id` | `results.${number}.item.program._id` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 4>>;
|
|
2817
2817
|
interface BulkUpdatePoolsOptions {
|
|
2818
2818
|
/**
|
|
2819
2819
|
* Pools to update.
|
|
@@ -2829,9 +2829,9 @@ interface BulkUpdatePoolsOptions {
|
|
|
2829
2829
|
returnEntity?: boolean;
|
|
2830
2830
|
}
|
|
2831
2831
|
/**
|
|
2832
|
-
* Checks benefit eligibility across the pools that
|
|
2832
|
+
* Checks benefit eligibility across the beneficiary's pools that contain a benefit for the given item.
|
|
2833
2833
|
*
|
|
2834
|
-
*
|
|
2834
|
+
* Pools are matched by `itemReference` within `namespace` and must belong to `beneficiary`, which defaults to the calling identity. `poolSelector` narrows the matched pools further.
|
|
2835
2835
|
*
|
|
2836
2836
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
2837
2837
|
*
|
|
@@ -2847,7 +2847,7 @@ interface BulkUpdatePoolsOptions {
|
|
|
2847
2847
|
* @applicableIdentity APP
|
|
2848
2848
|
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter
|
|
2849
2849
|
*/
|
|
2850
|
-
declare function checkBenefitEligibilityByFilter(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`,
|
|
2850
|
+
declare function checkBenefitEligibilityByFilter(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`, 1>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 0> & {
|
|
2851
2851
|
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
2852
2852
|
}>;
|
|
2853
2853
|
interface CheckBenefitEligibilityByFilterOptions {
|
|
@@ -2866,14 +2866,14 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2866
2866
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2867
2867
|
*/
|
|
2868
2868
|
targetDate?: Date | null;
|
|
2869
|
-
/** Pool beneficiary.
|
|
2869
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
2870
2870
|
beneficiary?: CommonIdentificationData;
|
|
2871
2871
|
/** Additional information. */
|
|
2872
2872
|
additionalData?: Record<string, any> | null;
|
|
2873
2873
|
/**
|
|
2874
2874
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
2875
2875
|
*
|
|
2876
|
-
* When omitted,
|
|
2876
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
2877
2877
|
*/
|
|
2878
2878
|
poolSelector?: PoolSelector;
|
|
2879
2879
|
}
|
|
@@ -1915,14 +1915,14 @@ interface CheckBenefitEligibilityByFilterRequest {
|
|
|
1915
1915
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1916
1916
|
*/
|
|
1917
1917
|
targetDate?: Date | null;
|
|
1918
|
-
/** Pool beneficiary.
|
|
1918
|
+
/** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */
|
|
1919
1919
|
beneficiary?: CommonIdentificationData;
|
|
1920
1920
|
/** Additional information. */
|
|
1921
1921
|
additionalData?: Record<string, any> | null;
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Predefined attributes used to select the pools to check eligibility in.
|
|
1924
1924
|
*
|
|
1925
|
-
* When omitted,
|
|
1925
|
+
* When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked.
|
|
1926
1926
|
*/
|
|
1927
1927
|
poolSelector?: PoolSelector;
|
|
1928
1928
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_benefit-programs_pools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.84",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"fqdn": "wix.benefit_programs.v1.pool"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "9786204b5cd13d8174cc6787c7adc12da744a1e43e814c3876878eb9"
|
|
54
54
|
}
|