@wix/auto_sdk_benefit-programs_pools 1.0.73 → 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 -78
- 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 -78
- 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 -101
- 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 -101
- 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
|
@@ -1591,8 +1591,14 @@ interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
|
1591
1591
|
/** Number of pools in provisioning status */
|
|
1592
1592
|
count?: number;
|
|
1593
1593
|
}
|
|
1594
|
-
interface
|
|
1595
|
-
/**
|
|
1594
|
+
interface CheckBenefitEligibilityByFilterRequest {
|
|
1595
|
+
/**
|
|
1596
|
+
* Defines filtering and sorting criteria used to select pools when checking eligibility.
|
|
1597
|
+
*
|
|
1598
|
+
* 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).
|
|
1599
|
+
*
|
|
1600
|
+
* 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.
|
|
1601
|
+
*/
|
|
1596
1602
|
poolFilter?: PoolFilter;
|
|
1597
1603
|
/**
|
|
1598
1604
|
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
@@ -1603,7 +1609,7 @@ interface CheckEligibilityByFilterRequest {
|
|
|
1603
1609
|
/** Information about the item to check. */
|
|
1604
1610
|
itemReference: ItemReference;
|
|
1605
1611
|
/**
|
|
1606
|
-
*
|
|
1612
|
+
* Number of items to check.
|
|
1607
1613
|
*
|
|
1608
1614
|
* Ensures the balance is high enough to redeem this many items.
|
|
1609
1615
|
* @min 1
|
|
@@ -1615,7 +1621,7 @@ interface CheckEligibilityByFilterRequest {
|
|
|
1615
1621
|
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1616
1622
|
*/
|
|
1617
1623
|
targetDate?: Date | null;
|
|
1618
|
-
/** Pool beneficiary. */
|
|
1624
|
+
/** Pool beneficiary. When provided, only the beneficiary's pools that also match `pool_filter` are checked. */
|
|
1619
1625
|
beneficiary?: CommonIdentificationData;
|
|
1620
1626
|
/** Additional information. */
|
|
1621
1627
|
additionalData?: Record<string, any> | null;
|
|
@@ -1633,49 +1639,6 @@ interface PoolFilter {
|
|
|
1633
1639
|
*/
|
|
1634
1640
|
sort?: Sorting[];
|
|
1635
1641
|
}
|
|
1636
|
-
interface CheckEligibilityByFilterResponse {
|
|
1637
|
-
/**
|
|
1638
|
-
* Result of the eligibility check.
|
|
1639
|
-
* @minSize 1
|
|
1640
|
-
* @maxSize 100
|
|
1641
|
-
*/
|
|
1642
|
-
result?: EligibilityCheckResult[];
|
|
1643
|
-
}
|
|
1644
|
-
interface CheckBenefitEligibilityByFilterRequest {
|
|
1645
|
-
/**
|
|
1646
|
-
* Defines filtering and sorting criteria used to select pools when checking eligibility.
|
|
1647
|
-
*
|
|
1648
|
-
* 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).
|
|
1649
|
-
*
|
|
1650
|
-
* 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.
|
|
1651
|
-
*/
|
|
1652
|
-
poolFilter?: PoolFilter;
|
|
1653
|
-
/**
|
|
1654
|
-
* 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.
|
|
1655
|
-
* @minLength 1
|
|
1656
|
-
* @maxLength 20
|
|
1657
|
-
*/
|
|
1658
|
-
namespace: string;
|
|
1659
|
-
/** Information about the item to check. */
|
|
1660
|
-
itemReference: ItemReference;
|
|
1661
|
-
/**
|
|
1662
|
-
* Number of items to check.
|
|
1663
|
-
*
|
|
1664
|
-
* Ensures the balance is high enough to redeem this many items.
|
|
1665
|
-
* @min 1
|
|
1666
|
-
*/
|
|
1667
|
-
count: number;
|
|
1668
|
-
/**
|
|
1669
|
-
* Date that the item will be provided to the beneficiary.
|
|
1670
|
-
*
|
|
1671
|
-
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1672
|
-
*/
|
|
1673
|
-
targetDate?: Date | null;
|
|
1674
|
-
/** Pool beneficiary. When provided, only the beneficiary's pools that also match `pool_filter` are checked. */
|
|
1675
|
-
beneficiary?: CommonIdentificationData;
|
|
1676
|
-
/** Additional information. */
|
|
1677
|
-
additionalData?: Record<string, any> | null;
|
|
1678
|
-
}
|
|
1679
1642
|
interface CheckBenefitEligibilityByFilterResponse {
|
|
1680
1643
|
/**
|
|
1681
1644
|
* 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.
|
|
@@ -2385,35 +2348,6 @@ interface BulkUpdatePoolsOptions {
|
|
|
2385
2348
|
*/
|
|
2386
2349
|
returnEntity?: boolean;
|
|
2387
2350
|
}
|
|
2388
|
-
interface CheckEligibilityByFilterOptions {
|
|
2389
|
-
/** Defines filtering and sorting criteria used to select pools when checking eligibility. */
|
|
2390
|
-
poolFilter?: PoolFilter;
|
|
2391
|
-
/**
|
|
2392
|
-
* 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.
|
|
2393
|
-
* @minLength 1
|
|
2394
|
-
* @maxLength 20
|
|
2395
|
-
*/
|
|
2396
|
-
namespace: string;
|
|
2397
|
-
/** Information about the item to check. */
|
|
2398
|
-
itemReference: ItemReference;
|
|
2399
|
-
/**
|
|
2400
|
-
* Amount of items to check.
|
|
2401
|
-
*
|
|
2402
|
-
* Ensures the balance is high enough to redeem this many items.
|
|
2403
|
-
* @min 1
|
|
2404
|
-
*/
|
|
2405
|
-
count: number;
|
|
2406
|
-
/**
|
|
2407
|
-
* Date that the item will be provided to the beneficiary.
|
|
2408
|
-
*
|
|
2409
|
-
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2410
|
-
*/
|
|
2411
|
-
targetDate?: Date | null;
|
|
2412
|
-
/** Pool beneficiary. */
|
|
2413
|
-
beneficiary?: CommonIdentificationData;
|
|
2414
|
-
/** Additional information. */
|
|
2415
|
-
additionalData?: Record<string, any> | null;
|
|
2416
|
-
}
|
|
2417
2351
|
/**
|
|
2418
2352
|
* Checks benefit eligibility across the pools that match the filter.
|
|
2419
2353
|
*
|
|
@@ -2423,7 +2357,6 @@ interface CheckEligibilityByFilterOptions {
|
|
|
2423
2357
|
*
|
|
2424
2358
|
* 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.
|
|
2425
2359
|
* @public
|
|
2426
|
-
* @documentationMaturity preview
|
|
2427
2360
|
* @requiredField options.count
|
|
2428
2361
|
* @requiredField options.itemReference
|
|
2429
2362
|
* @requiredField options.itemReference.externalId
|
|
@@ -2472,4 +2405,4 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2472
2405
|
additionalData?: Record<string, any> | null;
|
|
2473
2406
|
}
|
|
2474
2407
|
|
|
2475
|
-
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
|
|
2408
|
+
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 };
|
|
@@ -38,7 +38,6 @@ __export(index_typings_exports, {
|
|
|
38
38
|
bulkUpdatePools: () => bulkUpdatePools2,
|
|
39
39
|
checkBenefitEligibility: () => checkBenefitEligibility2,
|
|
40
40
|
checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter2,
|
|
41
|
-
checkEligibilityByFilter: () => checkEligibilityByFilter2,
|
|
42
41
|
getEligibleBenefits: () => getEligibleBenefits2,
|
|
43
42
|
getPool: () => getPool2,
|
|
44
43
|
queryPools: () => queryPools2,
|
|
@@ -514,33 +513,6 @@ function bulkUpdatePools(payload) {
|
|
|
514
513
|
}
|
|
515
514
|
return __bulkUpdatePools;
|
|
516
515
|
}
|
|
517
|
-
function checkEligibilityByFilter(payload) {
|
|
518
|
-
function __checkEligibilityByFilter({ host }) {
|
|
519
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
520
|
-
{
|
|
521
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
522
|
-
paths: [{ path: "targetDate" }]
|
|
523
|
-
}
|
|
524
|
-
]);
|
|
525
|
-
const metadata = {
|
|
526
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
527
|
-
method: "POST",
|
|
528
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckEligibilityByFilter",
|
|
529
|
-
packageName: PACKAGE_NAME,
|
|
530
|
-
migrationOptions: {
|
|
531
|
-
optInTransformResponse: true
|
|
532
|
-
},
|
|
533
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
534
|
-
protoPath: "/v1/pools/check-eligibility-by-filter",
|
|
535
|
-
data: serializedData,
|
|
536
|
-
host
|
|
537
|
-
}),
|
|
538
|
-
data: serializedData
|
|
539
|
-
};
|
|
540
|
-
return metadata;
|
|
541
|
-
}
|
|
542
|
-
return __checkEligibilityByFilter;
|
|
543
|
-
}
|
|
544
516
|
function checkBenefitEligibilityByFilter(payload) {
|
|
545
517
|
function __checkBenefitEligibilityByFilter({ host }) {
|
|
546
518
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -968,45 +940,6 @@ async function bulkUpdatePools2(options) {
|
|
|
968
940
|
throw transformedError;
|
|
969
941
|
}
|
|
970
942
|
}
|
|
971
|
-
async function checkEligibilityByFilter2(options) {
|
|
972
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
973
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
974
|
-
poolFilter: options?.poolFilter,
|
|
975
|
-
namespace: options?.namespace,
|
|
976
|
-
itemReference: options?.itemReference,
|
|
977
|
-
count: options?.count,
|
|
978
|
-
targetDate: options?.targetDate,
|
|
979
|
-
beneficiary: options?.beneficiary,
|
|
980
|
-
additionalData: options?.additionalData
|
|
981
|
-
});
|
|
982
|
-
const reqOpts = checkEligibilityByFilter(payload);
|
|
983
|
-
sideEffects?.onSiteCall?.();
|
|
984
|
-
try {
|
|
985
|
-
const result = await httpClient.request(reqOpts);
|
|
986
|
-
sideEffects?.onSuccess?.(result);
|
|
987
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
988
|
-
} catch (err) {
|
|
989
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
990
|
-
err,
|
|
991
|
-
{
|
|
992
|
-
spreadPathsToArguments: {},
|
|
993
|
-
explicitPathsToArguments: {
|
|
994
|
-
poolFilter: "$[0].poolFilter",
|
|
995
|
-
namespace: "$[0].namespace",
|
|
996
|
-
itemReference: "$[0].itemReference",
|
|
997
|
-
count: "$[0].count",
|
|
998
|
-
targetDate: "$[0].targetDate",
|
|
999
|
-
beneficiary: "$[0].beneficiary",
|
|
1000
|
-
additionalData: "$[0].additionalData"
|
|
1001
|
-
},
|
|
1002
|
-
singleArgumentUnchanged: false
|
|
1003
|
-
},
|
|
1004
|
-
["options"]
|
|
1005
|
-
);
|
|
1006
|
-
sideEffects?.onError?.(err);
|
|
1007
|
-
throw transformedError;
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
943
|
async function checkBenefitEligibilityByFilter2(options) {
|
|
1011
944
|
const { httpClient, sideEffects } = arguments[1];
|
|
1012
945
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1066,7 +999,6 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
1066
999
|
bulkUpdatePools,
|
|
1067
1000
|
checkBenefitEligibility,
|
|
1068
1001
|
checkBenefitEligibilityByFilter,
|
|
1069
|
-
checkEligibilityByFilter,
|
|
1070
1002
|
getEligibleBenefits,
|
|
1071
1003
|
getPool,
|
|
1072
1004
|
queryPools,
|