@wix/auto_sdk_benefit-programs_pools 1.0.66 → 1.0.68
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 +19 -3
- package/build/cjs/index.js +76 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +116 -6
- package/build/cjs/index.typings.js +68 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +62 -7
- package/build/cjs/meta.js +47 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +150 -1
- package/build/cjs/schemas.js +256 -0
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +19 -3
- package/build/es/index.mjs +75 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +116 -6
- package/build/es/index.typings.mjs +67 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +62 -7
- package/build/es/meta.mjs +46 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +150 -1
- package/build/es/schemas.mjs +254 -0
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +22 -3
- package/build/internal/cjs/index.js +76 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +121 -6
- package/build/internal/cjs/index.typings.js +68 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +62 -7
- package/build/internal/cjs/meta.js +47 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +150 -1
- package/build/internal/cjs/schemas.js +256 -0
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +22 -3
- package/build/internal/es/index.mjs +75 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +121 -6
- package/build/internal/es/index.typings.mjs +67 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +62 -7
- package/build/internal/es/meta.mjs +46 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +150 -1
- package/build/internal/es/schemas.mjs +254 -0
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1722,10 +1722,14 @@ interface CheckEligibilityByFilterRequest {
|
|
|
1722
1722
|
additionalData?: Record<string, any> | null;
|
|
1723
1723
|
}
|
|
1724
1724
|
interface PoolFilter {
|
|
1725
|
-
/**
|
|
1725
|
+
/**
|
|
1726
|
+
* Filter object. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more information.
|
|
1727
|
+
*
|
|
1728
|
+
* For supported filterable and sortable fields, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
|
|
1729
|
+
*/
|
|
1726
1730
|
filter?: Record<string, any> | null;
|
|
1727
1731
|
/**
|
|
1728
|
-
*
|
|
1732
|
+
* Sorting to apply to the matched pools. Determines the order of the returned results, and which results are kept when more than 100 are produced.
|
|
1729
1733
|
* @maxSize 5
|
|
1730
1734
|
*/
|
|
1731
1735
|
sort?: Sorting[];
|
|
@@ -1738,6 +1742,50 @@ interface CheckEligibilityByFilterResponse {
|
|
|
1738
1742
|
*/
|
|
1739
1743
|
result?: EligibilityCheckResult[];
|
|
1740
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
|
+
interface CheckBenefitEligibilityByFilterResponse {
|
|
1781
|
+
/**
|
|
1782
|
+
* 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.
|
|
1783
|
+
*
|
|
1784
|
+
* Empty when no pools match the filter. Capped at 100 results. When more than 100 results are produced, only the first 100, in the order specified by `poolFilter.sort`, are returned.
|
|
1785
|
+
* @maxSize 100
|
|
1786
|
+
*/
|
|
1787
|
+
results?: EligibilityCheckResult[];
|
|
1788
|
+
}
|
|
1741
1789
|
interface HealPoolRequest {
|
|
1742
1790
|
/**
|
|
1743
1791
|
* ID of the pool whose enrichments should be re-materialized.
|
|
@@ -1747,9 +1795,9 @@ interface HealPoolRequest {
|
|
|
1747
1795
|
}
|
|
1748
1796
|
interface HealPoolResponse {
|
|
1749
1797
|
}
|
|
1750
|
-
interface
|
|
1798
|
+
interface HealPoolTenantRequest {
|
|
1751
1799
|
}
|
|
1752
|
-
interface
|
|
1800
|
+
interface HealPoolTenantResponse {
|
|
1753
1801
|
}
|
|
1754
1802
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1755
1803
|
createdEvent?: EntityCreatedEvent;
|
|
@@ -1780,7 +1828,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1780
1828
|
/** If present, indicates the action that triggered the event. */
|
|
1781
1829
|
originatedFrom?: string | null;
|
|
1782
1830
|
/**
|
|
1783
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01
|
|
1831
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
1784
1832
|
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1785
1833
|
*/
|
|
1786
1834
|
entityEventSequence?: string | null;
|
|
@@ -1936,6 +1984,12 @@ type GetEligibleBenefitsApplicationErrors = {
|
|
|
1936
1984
|
description?: string;
|
|
1937
1985
|
data?: Record<string, any>;
|
|
1938
1986
|
};
|
|
1987
|
+
/** @docsIgnore */
|
|
1988
|
+
type CheckBenefitEligibilityByFilterApplicationErrors = {
|
|
1989
|
+
code?: 'INVALID_ITEM_REFERENCE';
|
|
1990
|
+
description?: string;
|
|
1991
|
+
data?: Record<string, any>;
|
|
1992
|
+
};
|
|
1939
1993
|
/**
|
|
1940
1994
|
* Retrieves a pool.
|
|
1941
1995
|
* @param poolId - ID of the pool to retrieve.
|
|
@@ -2433,6 +2487,8 @@ interface BulkUpdatePoolsOptions {
|
|
|
2433
2487
|
returnEntity?: boolean;
|
|
2434
2488
|
}
|
|
2435
2489
|
/**
|
|
2490
|
+
* Deprecated. Use Check Benefit Eligibility By Filter instead.
|
|
2491
|
+
*
|
|
2436
2492
|
* Determines eligibility for each benefit based on the filter.
|
|
2437
2493
|
*
|
|
2438
2494
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
@@ -2448,6 +2504,9 @@ interface BulkUpdatePoolsOptions {
|
|
|
2448
2504
|
* @permissionId BENEFIT_PROGRAMS.POOL_REDEEM
|
|
2449
2505
|
* @applicableIdentity APP
|
|
2450
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
|
|
2451
2510
|
*/
|
|
2452
2511
|
declare function checkEligibilityByFilter(options?: NonNullablePaths<CheckEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckEligibilityByFilterResponse, `result`, 2>>;
|
|
2453
2512
|
interface CheckEligibilityByFilterOptions {
|
|
@@ -2479,5 +2538,61 @@ interface CheckEligibilityByFilterOptions {
|
|
|
2479
2538
|
/** Additional information. */
|
|
2480
2539
|
additionalData?: Record<string, any> | null;
|
|
2481
2540
|
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Checks benefit eligibility across the pools that match the filter.
|
|
2543
|
+
*
|
|
2544
|
+
* The filter selects pools (not individual benefits), 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).
|
|
2545
|
+
*
|
|
2546
|
+
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
2547
|
+
*
|
|
2548
|
+
* 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.
|
|
2549
|
+
* @public
|
|
2550
|
+
* @documentationMaturity preview
|
|
2551
|
+
* @requiredField options.count
|
|
2552
|
+
* @requiredField options.itemReference
|
|
2553
|
+
* @requiredField options.itemReference.externalId
|
|
2554
|
+
* @requiredField options.itemReference.providerAppId
|
|
2555
|
+
* @requiredField options.namespace
|
|
2556
|
+
* @permissionId benefit_programs:v1:pool:check_benefit_eligibility_by_filter
|
|
2557
|
+
* @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter
|
|
2558
|
+
*/
|
|
2559
|
+
declare function checkBenefitEligibilityByFilter(options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 2> & {
|
|
2560
|
+
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
2561
|
+
}>;
|
|
2562
|
+
interface CheckBenefitEligibilityByFilterOptions {
|
|
2563
|
+
/**
|
|
2564
|
+
* Defines filtering and sorting criteria used to select pools when checking eligibility.
|
|
2565
|
+
*
|
|
2566
|
+
* 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).
|
|
2567
|
+
*
|
|
2568
|
+
* 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.
|
|
2569
|
+
*/
|
|
2570
|
+
poolFilter?: PoolFilter;
|
|
2571
|
+
/**
|
|
2572
|
+
* 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.
|
|
2573
|
+
* @minLength 1
|
|
2574
|
+
* @maxLength 20
|
|
2575
|
+
*/
|
|
2576
|
+
namespace: string;
|
|
2577
|
+
/** Information about the item to check. */
|
|
2578
|
+
itemReference: ItemReference;
|
|
2579
|
+
/**
|
|
2580
|
+
* Number of items to check.
|
|
2581
|
+
*
|
|
2582
|
+
* Ensures the balance is high enough to redeem this many items.
|
|
2583
|
+
* @min 1
|
|
2584
|
+
*/
|
|
2585
|
+
count: number;
|
|
2586
|
+
/**
|
|
2587
|
+
* Date that the item will be provided to the beneficiary.
|
|
2588
|
+
*
|
|
2589
|
+
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2590
|
+
*/
|
|
2591
|
+
targetDate?: Date | null;
|
|
2592
|
+
/** Pool beneficiary. When provided, only the beneficiary's pools that also match `pool_filter` are checked. */
|
|
2593
|
+
beneficiary?: CommonIdentificationData;
|
|
2594
|
+
/** Additional information. */
|
|
2595
|
+
additionalData?: Record<string, any> | null;
|
|
2596
|
+
}
|
|
2482
2597
|
|
|
2483
|
-
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 CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CheckEligibilityByFilterOptions, type CheckEligibilityByFilterRequest, type CheckEligibilityByFilterResponse, 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
|
|
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 CheckEligibilityByFilterOptions, type CheckEligibilityByFilterRequest, type CheckEligibilityByFilterResponse, 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, checkEligibilityByFilter, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
@@ -37,6 +37,7 @@ __export(index_typings_exports, {
|
|
|
37
37
|
bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility2,
|
|
38
38
|
bulkUpdatePools: () => bulkUpdatePools2,
|
|
39
39
|
checkBenefitEligibility: () => checkBenefitEligibility2,
|
|
40
|
+
checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter2,
|
|
40
41
|
checkEligibilityByFilter: () => checkEligibilityByFilter2,
|
|
41
42
|
getEligibleBenefits: () => getEligibleBenefits2,
|
|
42
43
|
getPool: () => getPool2,
|
|
@@ -540,6 +541,33 @@ function checkEligibilityByFilter(payload) {
|
|
|
540
541
|
}
|
|
541
542
|
return __checkEligibilityByFilter;
|
|
542
543
|
}
|
|
544
|
+
function checkBenefitEligibilityByFilter(payload) {
|
|
545
|
+
function __checkBenefitEligibilityByFilter({ host }) {
|
|
546
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
547
|
+
{
|
|
548
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
549
|
+
paths: [{ path: "targetDate" }]
|
|
550
|
+
}
|
|
551
|
+
]);
|
|
552
|
+
const metadata = {
|
|
553
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
554
|
+
method: "POST",
|
|
555
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter",
|
|
556
|
+
packageName: PACKAGE_NAME,
|
|
557
|
+
migrationOptions: {
|
|
558
|
+
optInTransformResponse: true
|
|
559
|
+
},
|
|
560
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
561
|
+
protoPath: "/v1/pools/check-benefit-eligibility-by-filter",
|
|
562
|
+
data: serializedData,
|
|
563
|
+
host
|
|
564
|
+
}),
|
|
565
|
+
data: serializedData
|
|
566
|
+
};
|
|
567
|
+
return metadata;
|
|
568
|
+
}
|
|
569
|
+
return __checkBenefitEligibilityByFilter;
|
|
570
|
+
}
|
|
543
571
|
|
|
544
572
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
545
573
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -979,6 +1007,45 @@ async function checkEligibilityByFilter2(options) {
|
|
|
979
1007
|
throw transformedError;
|
|
980
1008
|
}
|
|
981
1009
|
}
|
|
1010
|
+
async function checkBenefitEligibilityByFilter2(options) {
|
|
1011
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1012
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1013
|
+
poolFilter: options?.poolFilter,
|
|
1014
|
+
namespace: options?.namespace,
|
|
1015
|
+
itemReference: options?.itemReference,
|
|
1016
|
+
count: options?.count,
|
|
1017
|
+
targetDate: options?.targetDate,
|
|
1018
|
+
beneficiary: options?.beneficiary,
|
|
1019
|
+
additionalData: options?.additionalData
|
|
1020
|
+
});
|
|
1021
|
+
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
1022
|
+
sideEffects?.onSiteCall?.();
|
|
1023
|
+
try {
|
|
1024
|
+
const result = await httpClient.request(reqOpts);
|
|
1025
|
+
sideEffects?.onSuccess?.(result);
|
|
1026
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1027
|
+
} catch (err) {
|
|
1028
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1029
|
+
err,
|
|
1030
|
+
{
|
|
1031
|
+
spreadPathsToArguments: {},
|
|
1032
|
+
explicitPathsToArguments: {
|
|
1033
|
+
poolFilter: "$[0].poolFilter",
|
|
1034
|
+
namespace: "$[0].namespace",
|
|
1035
|
+
itemReference: "$[0].itemReference",
|
|
1036
|
+
count: "$[0].count",
|
|
1037
|
+
targetDate: "$[0].targetDate",
|
|
1038
|
+
beneficiary: "$[0].beneficiary",
|
|
1039
|
+
additionalData: "$[0].additionalData"
|
|
1040
|
+
},
|
|
1041
|
+
singleArgumentUnchanged: false
|
|
1042
|
+
},
|
|
1043
|
+
["options"]
|
|
1044
|
+
);
|
|
1045
|
+
sideEffects?.onError?.(err);
|
|
1046
|
+
throw transformedError;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
982
1049
|
// Annotate the CommonJS export names for ESM import in node:
|
|
983
1050
|
0 && (module.exports = {
|
|
984
1051
|
BenefitResultType,
|
|
@@ -998,6 +1065,7 @@ async function checkEligibilityByFilter2(options) {
|
|
|
998
1065
|
bulkCheckBenefitEligibility,
|
|
999
1066
|
bulkUpdatePools,
|
|
1000
1067
|
checkBenefitEligibility,
|
|
1068
|
+
checkBenefitEligibilityByFilter,
|
|
1001
1069
|
checkEligibilityByFilter,
|
|
1002
1070
|
getEligibleBenefits,
|
|
1003
1071
|
getPool,
|