@wix/auto_sdk_benefit-programs_pools 1.0.72 → 1.0.74
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 +1 -1
- package/build/cjs/index.js +0 -76
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +11 -77
- package/build/cjs/index.typings.js +0 -68
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +12 -50
- package/build/cjs/meta.js +0 -47
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +0 -75
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +11 -77
- package/build/es/index.typings.mjs +0 -67
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +12 -50
- package/build/es/meta.mjs +0 -46
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -20
- package/build/internal/cjs/index.js +0 -76
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +11 -100
- package/build/internal/cjs/index.typings.js +0 -68
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +12 -50
- package/build/internal/cjs/meta.js +0 -47
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -20
- package/build/internal/es/index.mjs +0 -75
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +11 -100
- package/build/internal/es/index.typings.mjs +0 -67
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +12 -50
- package/build/internal/es/meta.mjs +0 -46
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1692,8 +1692,14 @@ interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
|
1692
1692
|
/** Number of pools in provisioning status */
|
|
1693
1693
|
count?: number;
|
|
1694
1694
|
}
|
|
1695
|
-
interface
|
|
1696
|
-
/**
|
|
1695
|
+
interface CheckBenefitEligibilityByFilterRequest {
|
|
1696
|
+
/**
|
|
1697
|
+
* Defines filtering and sorting criteria used to select pools when checking eligibility.
|
|
1698
|
+
*
|
|
1699
|
+
* The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
|
|
1700
|
+
*
|
|
1701
|
+
* When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
|
|
1702
|
+
*/
|
|
1697
1703
|
poolFilter?: PoolFilter;
|
|
1698
1704
|
/**
|
|
1699
1705
|
* 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.
|
|
@@ -1704,7 +1710,7 @@ interface CheckEligibilityByFilterRequest {
|
|
|
1704
1710
|
/** Information about the item to check. */
|
|
1705
1711
|
itemReference: ItemReference;
|
|
1706
1712
|
/**
|
|
1707
|
-
*
|
|
1713
|
+
* Number of items to check.
|
|
1708
1714
|
*
|
|
1709
1715
|
* Ensures the balance is high enough to redeem this many items.
|
|
1710
1716
|
* @min 1
|
|
@@ -1716,7 +1722,7 @@ interface CheckEligibilityByFilterRequest {
|
|
|
1716
1722
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1717
1723
|
*/
|
|
1718
1724
|
targetDate?: Date | null;
|
|
1719
|
-
/** Pool beneficiary. */
|
|
1725
|
+
/** Pool beneficiary. When provided, only the beneficiary's pools that also match `pool_filter` are checked. */
|
|
1720
1726
|
beneficiary?: CommonIdentificationData;
|
|
1721
1727
|
/** Additional information. */
|
|
1722
1728
|
additionalData?: Record<string, any> | null;
|
|
@@ -1734,49 +1740,6 @@ interface PoolFilter {
|
|
|
1734
1740
|
*/
|
|
1735
1741
|
sort?: Sorting[];
|
|
1736
1742
|
}
|
|
1737
|
-
interface CheckEligibilityByFilterResponse {
|
|
1738
|
-
/**
|
|
1739
|
-
* Result of the eligibility check.
|
|
1740
|
-
* @minSize 1
|
|
1741
|
-
* @maxSize 100
|
|
1742
|
-
*/
|
|
1743
|
-
result?: EligibilityCheckResult[];
|
|
1744
|
-
}
|
|
1745
|
-
interface CheckBenefitEligibilityByFilterRequest {
|
|
1746
|
-
/**
|
|
1747
|
-
* Defines filtering and sorting criteria used to select pools when checking eligibility.
|
|
1748
|
-
*
|
|
1749
|
-
* The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
|
|
1750
|
-
*
|
|
1751
|
-
* When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
|
|
1752
|
-
*/
|
|
1753
|
-
poolFilter?: PoolFilter;
|
|
1754
|
-
/**
|
|
1755
|
-
* 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.
|
|
1756
|
-
* @minLength 1
|
|
1757
|
-
* @maxLength 20
|
|
1758
|
-
*/
|
|
1759
|
-
namespace: string;
|
|
1760
|
-
/** Information about the item to check. */
|
|
1761
|
-
itemReference: ItemReference;
|
|
1762
|
-
/**
|
|
1763
|
-
* Number of items to check.
|
|
1764
|
-
*
|
|
1765
|
-
* Ensures the balance is high enough to redeem this many items.
|
|
1766
|
-
* @min 1
|
|
1767
|
-
*/
|
|
1768
|
-
count: number;
|
|
1769
|
-
/**
|
|
1770
|
-
* Date that the item will be provided to the beneficiary.
|
|
1771
|
-
*
|
|
1772
|
-
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1773
|
-
*/
|
|
1774
|
-
targetDate?: Date | null;
|
|
1775
|
-
/** Pool beneficiary. When provided, only the beneficiary's pools that also match `pool_filter` are checked. */
|
|
1776
|
-
beneficiary?: CommonIdentificationData;
|
|
1777
|
-
/** Additional information. */
|
|
1778
|
-
additionalData?: Record<string, any> | null;
|
|
1779
|
-
}
|
|
1780
1743
|
interface CheckBenefitEligibilityByFilterResponse {
|
|
1781
1744
|
/**
|
|
1782
1745
|
* Results of the eligibility check for the benefits in the pools that matched the filter. A pool that contains multiple benefits for the requested item produces one result per benefit.
|
|
@@ -2486,58 +2449,6 @@ interface BulkUpdatePoolsOptions {
|
|
|
2486
2449
|
*/
|
|
2487
2450
|
returnEntity?: boolean;
|
|
2488
2451
|
}
|
|
2489
|
-
/**
|
|
2490
|
-
* Deprecated. Use Check Benefit Eligibility By Filter instead.
|
|
2491
|
-
*
|
|
2492
|
-
* Determines eligibility for each benefit based on the filter.
|
|
2493
|
-
*
|
|
2494
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
2495
|
-
*
|
|
2496
|
-
* 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.
|
|
2497
|
-
* @internal
|
|
2498
|
-
* @documentationMaturity preview
|
|
2499
|
-
* @requiredField options.count
|
|
2500
|
-
* @requiredField options.itemReference
|
|
2501
|
-
* @requiredField options.itemReference.externalId
|
|
2502
|
-
* @requiredField options.itemReference.providerAppId
|
|
2503
|
-
* @requiredField options.namespace
|
|
2504
|
-
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
2505
|
-
* @applicableIdentity APP
|
|
2506
|
-
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckEligibilityByFilter
|
|
2507
|
-
* @deprecated
|
|
2508
|
-
* @replacedBy wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter
|
|
2509
|
-
* @targetRemovalDate 2026-12-31
|
|
2510
|
-
*/
|
|
2511
|
-
declare function checkEligibilityByFilter(options?: NonNullablePaths<CheckEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckEligibilityByFilterResponse, `result`, 2>>;
|
|
2512
|
-
interface CheckEligibilityByFilterOptions {
|
|
2513
|
-
/** Defines filtering and sorting criteria used to select pools when checking eligibility. */
|
|
2514
|
-
poolFilter?: PoolFilter;
|
|
2515
|
-
/**
|
|
2516
|
-
* 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.
|
|
2517
|
-
* @minLength 1
|
|
2518
|
-
* @maxLength 20
|
|
2519
|
-
*/
|
|
2520
|
-
namespace: string;
|
|
2521
|
-
/** Information about the item to check. */
|
|
2522
|
-
itemReference: ItemReference;
|
|
2523
|
-
/**
|
|
2524
|
-
* Amount of items to check.
|
|
2525
|
-
*
|
|
2526
|
-
* Ensures the balance is high enough to redeem this many items.
|
|
2527
|
-
* @min 1
|
|
2528
|
-
*/
|
|
2529
|
-
count: number;
|
|
2530
|
-
/**
|
|
2531
|
-
* Date that the item will be provided to the beneficiary.
|
|
2532
|
-
*
|
|
2533
|
-
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2534
|
-
*/
|
|
2535
|
-
targetDate?: Date | null;
|
|
2536
|
-
/** Pool beneficiary. */
|
|
2537
|
-
beneficiary?: CommonIdentificationData;
|
|
2538
|
-
/** Additional information. */
|
|
2539
|
-
additionalData?: Record<string, any> | null;
|
|
2540
|
-
}
|
|
2541
2452
|
/**
|
|
2542
2453
|
* Checks benefit eligibility across the pools that match the filter.
|
|
2543
2454
|
*
|
|
@@ -2595,4 +2506,4 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2595
2506
|
additionalData?: Record<string, any> | null;
|
|
2596
2507
|
}
|
|
2597
2508
|
|
|
2598
|
-
export { type AccountInfo, type ActionEvent, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, type BenefitRedeemed, type BenefitReservationCanceled, type BenefitReservationReleased, type BenefitReserved, type BenefitResult, type BenefitResultResultOneOf, BenefitResultType, type BenefitResultTypeWithLiterals, type BenefitSelector, type BulkActionMetadata, type BulkCheckBenefitEligibilityOptions, type BulkCheckBenefitEligibilityRequest, type BulkCheckBenefitEligibilityResponse, type BulkEligibilityCheckResult, type BulkPoolResult, type BulkUpdatePoolsOptions, type BulkUpdatePoolsRequest, type BulkUpdatePoolsResponse, type ByItemReference, type ByItemReferenceFilter, type ByPoolDefinitionIdAndProgramDefinitionIdOptions, type ByProgramIdOptions, type CancelBenefitReservationRequest, type CancelBenefitReservationResponse, type CheckBenefitEligibilityByFilterApplicationErrors, type CheckBenefitEligibilityByFilterOptions, type CheckBenefitEligibilityByFilterRequest, type CheckBenefitEligibilityByFilterResponse, type CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type
|
|
2509
|
+
export { type AccountInfo, type ActionEvent, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, type BenefitRedeemed, type BenefitReservationCanceled, type BenefitReservationReleased, type BenefitReserved, type BenefitResult, type BenefitResultResultOneOf, BenefitResultType, type BenefitResultTypeWithLiterals, type BenefitSelector, type BulkActionMetadata, type BulkCheckBenefitEligibilityOptions, type BulkCheckBenefitEligibilityRequest, type BulkCheckBenefitEligibilityResponse, type BulkEligibilityCheckResult, type BulkPoolResult, type BulkUpdatePoolsOptions, type BulkUpdatePoolsRequest, type BulkUpdatePoolsResponse, type ByItemReference, type ByItemReferenceFilter, type ByPoolDefinitionIdAndProgramDefinitionIdOptions, type ByProgramIdOptions, type CancelBenefitReservationRequest, type CancelBenefitReservationResponse, type CheckBenefitEligibilityByFilterApplicationErrors, type CheckBenefitEligibilityByFilterOptions, type CheckBenefitEligibilityByFilterRequest, type CheckBenefitEligibilityByFilterResponse, type CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CountNumberOfPoolsInProvisioningStatusRequest, type CountNumberOfPoolsInProvisioningStatusResponse, type CreatePoolRequest, type CreatePoolResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolRequest, type DeletePoolResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EligibilityCheckResult, type EligibleBenefit, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailureDetails, type Filter, type FilterFilterOneOf, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type ListPoolsRequest, ListPoolsRequestType, type ListPoolsRequestTypeWithLiterals, type ListPoolsResponse, type MaskedPool, type MessageEnvelope, type NotEnoughBalance, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionEvaluatedToFalse, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type Pool, type PoolDefinitionAndProgramDefinition, type PoolDefinitionLookupId, type PoolDefinitionLookupIdIdOneOf, type PoolEnded, type PoolFilter, type PoolInfo, type PoolNotActive, type PoolNotFound, PoolOrigin, type PoolOriginWithLiterals, type PoolPaused, type PoolProgramInfo, type PoolProvisionJobFinished, type PoolProvisioned, type PoolQuery, type PoolQuerySpec, type PoolRenewalAction, type PoolRenewalActionActionOneOf, PoolRenewalActionType, type PoolRenewalActionTypeWithLiterals, type PoolRenewed, type PoolResumed, PoolSelectorType, type PoolSelectorTypeWithLiterals, PoolStatus, type PoolStatusUpdateJobFinished, type PoolStatusUpdateJobFinishedContextOneOf, type PoolStatusUpdateParamsPoolInfo, type PoolStatusWithLiterals, type PoolWithItems, type PoolsQueryBuilder, type PoolsQueryResult, type ProgramDefinitionInfo, type ProgramInfo, type ProvisionPoolsForProgramRequest, type ProvisionPoolsForProgramResponse, type ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, type ProvisionPoolsForProgramResponseTypeWithLiterals, type QueryPoolsOptions, type QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type RedeemBenefitApplicationErrors, type RedeemBenefitOptions, type RedeemBenefitRequest, type RedeemBenefitResponse, type RedemptionDetails, type ReleaseBenefitReservationRequest, type ReleaseBenefitReservationResponse, type RenewPoolsForProgramRequest, type RenewPoolsForProgramResponse, type ReserveBenefitRequest, type ReserveBenefitResponse, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncResult, TimePeriod, type TimePeriodWithLiterals, Type, type TypeWithLiterals, type Update, type UpdatePool, type UpdatePoolRequest, type UpdatePoolResponse, type UpdatePoolStatusRequest, type UpdatePoolStatusRequestPoolSelectorOneOf, type UpdatePoolStatusResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
@@ -466,33 +466,6 @@ function bulkUpdatePools(payload) {
|
|
|
466
466
|
}
|
|
467
467
|
return __bulkUpdatePools;
|
|
468
468
|
}
|
|
469
|
-
function checkEligibilityByFilter(payload) {
|
|
470
|
-
function __checkEligibilityByFilter({ host }) {
|
|
471
|
-
const serializedData = transformPaths(payload, [
|
|
472
|
-
{
|
|
473
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
474
|
-
paths: [{ path: "targetDate" }]
|
|
475
|
-
}
|
|
476
|
-
]);
|
|
477
|
-
const metadata = {
|
|
478
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
479
|
-
method: "POST",
|
|
480
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckEligibilityByFilter",
|
|
481
|
-
packageName: PACKAGE_NAME,
|
|
482
|
-
migrationOptions: {
|
|
483
|
-
optInTransformResponse: true
|
|
484
|
-
},
|
|
485
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
486
|
-
protoPath: "/v1/pools/check-eligibility-by-filter",
|
|
487
|
-
data: serializedData,
|
|
488
|
-
host
|
|
489
|
-
}),
|
|
490
|
-
data: serializedData
|
|
491
|
-
};
|
|
492
|
-
return metadata;
|
|
493
|
-
}
|
|
494
|
-
return __checkEligibilityByFilter;
|
|
495
|
-
}
|
|
496
469
|
function checkBenefitEligibilityByFilter(payload) {
|
|
497
470
|
function __checkBenefitEligibilityByFilter({ host }) {
|
|
498
471
|
const serializedData = transformPaths(payload, [
|
|
@@ -920,45 +893,6 @@ async function bulkUpdatePools2(options) {
|
|
|
920
893
|
throw transformedError;
|
|
921
894
|
}
|
|
922
895
|
}
|
|
923
|
-
async function checkEligibilityByFilter2(options) {
|
|
924
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
925
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
926
|
-
poolFilter: options?.poolFilter,
|
|
927
|
-
namespace: options?.namespace,
|
|
928
|
-
itemReference: options?.itemReference,
|
|
929
|
-
count: options?.count,
|
|
930
|
-
targetDate: options?.targetDate,
|
|
931
|
-
beneficiary: options?.beneficiary,
|
|
932
|
-
additionalData: options?.additionalData
|
|
933
|
-
});
|
|
934
|
-
const reqOpts = checkEligibilityByFilter(payload);
|
|
935
|
-
sideEffects?.onSiteCall?.();
|
|
936
|
-
try {
|
|
937
|
-
const result = await httpClient.request(reqOpts);
|
|
938
|
-
sideEffects?.onSuccess?.(result);
|
|
939
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
940
|
-
} catch (err) {
|
|
941
|
-
const transformedError = sdkTransformError(
|
|
942
|
-
err,
|
|
943
|
-
{
|
|
944
|
-
spreadPathsToArguments: {},
|
|
945
|
-
explicitPathsToArguments: {
|
|
946
|
-
poolFilter: "$[0].poolFilter",
|
|
947
|
-
namespace: "$[0].namespace",
|
|
948
|
-
itemReference: "$[0].itemReference",
|
|
949
|
-
count: "$[0].count",
|
|
950
|
-
targetDate: "$[0].targetDate",
|
|
951
|
-
beneficiary: "$[0].beneficiary",
|
|
952
|
-
additionalData: "$[0].additionalData"
|
|
953
|
-
},
|
|
954
|
-
singleArgumentUnchanged: false
|
|
955
|
-
},
|
|
956
|
-
["options"]
|
|
957
|
-
);
|
|
958
|
-
sideEffects?.onError?.(err);
|
|
959
|
-
throw transformedError;
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
896
|
async function checkBenefitEligibilityByFilter2(options) {
|
|
963
897
|
const { httpClient, sideEffects } = arguments[1];
|
|
964
898
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1017,7 +951,6 @@ export {
|
|
|
1017
951
|
bulkUpdatePools2 as bulkUpdatePools,
|
|
1018
952
|
checkBenefitEligibility2 as checkBenefitEligibility,
|
|
1019
953
|
checkBenefitEligibilityByFilter2 as checkBenefitEligibilityByFilter,
|
|
1020
|
-
checkEligibilityByFilter2 as checkEligibilityByFilter,
|
|
1021
954
|
getEligibleBenefits2 as getEligibleBenefits,
|
|
1022
955
|
getPool2 as getPool,
|
|
1023
956
|
queryPools2 as queryPools,
|