@wix/auto_sdk_benefit-programs_pools 1.0.67 → 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 +115 -5
- package/build/cjs/index.typings.js +68 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +61 -6
- 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 +115 -5
- package/build/es/index.typings.mjs +67 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +61 -6
- 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 +120 -5
- 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 +61 -6
- 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 +120 -5
- 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 +61 -6
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Pool, UpdatePool, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, ItemReference, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, GetEligibleBenefitsApplicationErrors, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckEligibilityByFilterOptions, CheckEligibilityByFilterResponse, PoolQuery, QueryPoolsOptions, typedQueryPools, PoolsQueryBuilder } from './index.typings.mjs';
|
|
3
|
-
export { AccountInfo, ActionEvent, ApplicationError, AsyncResult, BalanceAmount, Benefit, BenefitAlreadyRedeemed, BenefitInfo, BenefitNotFound, BenefitRedeemed, BenefitReservationCanceled, BenefitReservationReleased, BenefitReserved, BenefitResult, BenefitResultResultOneOf, BenefitResultType, BenefitResultTypeWithLiterals, BenefitSelector, BulkActionMetadata, BulkCheckBenefitEligibilityRequest, BulkEligibilityCheckResult, BulkPoolResult, BulkUpdatePoolsRequest, ByItemReference, ByItemReferenceFilter, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, CheckBenefitEligibilityRequest, CheckEligibilityByFilterRequest, CommonIdentificationData, CommonIdentificationDataIdOneOf, CommonQueryWithEntityContext, CountNumberOfPoolsInProvisioningStatusRequest, CountNumberOfPoolsInProvisioningStatusResponse, CreatePoolRequest, CreatePoolResponse, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomPolicy, DeletePoolRequest, DeletePoolResponse, Details, DomainEvent, DomainEventBodyOneOf, EligibilityCheckResult, EligibleBenefit, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, FailureDetails, Filter, FilterFilterOneOf, FixedIntervalPolicy, GetEligibleBenefitsRequest, GetPoolRequest, GetPoolResponse, HealPoolRequest, HealPoolResponse,
|
|
2
|
+
import { Pool, UpdatePool, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, ItemReference, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, GetEligibleBenefitsApplicationErrors, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckEligibilityByFilterOptions, CheckEligibilityByFilterResponse, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityByFilterApplicationErrors, PoolQuery, QueryPoolsOptions, typedQueryPools, PoolsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, ActionEvent, ApplicationError, AsyncResult, BalanceAmount, Benefit, BenefitAlreadyRedeemed, BenefitInfo, BenefitNotFound, BenefitRedeemed, BenefitReservationCanceled, BenefitReservationReleased, BenefitReserved, BenefitResult, BenefitResultResultOneOf, BenefitResultType, BenefitResultTypeWithLiterals, BenefitSelector, BulkActionMetadata, BulkCheckBenefitEligibilityRequest, BulkEligibilityCheckResult, BulkPoolResult, BulkUpdatePoolsRequest, ByItemReference, ByItemReferenceFilter, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, CheckBenefitEligibilityByFilterRequest, CheckBenefitEligibilityRequest, CheckEligibilityByFilterRequest, CommonIdentificationData, CommonIdentificationDataIdOneOf, CommonQueryWithEntityContext, CountNumberOfPoolsInProvisioningStatusRequest, CountNumberOfPoolsInProvisioningStatusResponse, CreatePoolRequest, CreatePoolResponse, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomPolicy, DeletePoolRequest, DeletePoolResponse, Details, DomainEvent, DomainEventBodyOneOf, EligibilityCheckResult, EligibleBenefit, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, FailureDetails, Filter, FilterFilterOneOf, FixedIntervalPolicy, GetEligibleBenefitsRequest, GetPoolRequest, GetPoolResponse, HealPoolRequest, HealPoolResponse, HealPoolTenantRequest, HealPoolTenantResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, InvalidPoolDefinitionReference, ItemMetadata, ListPoolsRequest, ListPoolsRequestType, ListPoolsRequestTypeWithLiterals, ListPoolsResponse, MaskedPool, MessageEnvelope, NotEnoughBalance, Policy, PolicyExpression, PolicyExpressionAnd, PolicyExpressionEvaluatedToFalse, PolicyExpressionExpressionOneOf, PolicyExpressionNot, PolicyExpressionOr, PolicyExpressionType, PolicyExpressionTypeWithLiterals, PolicyPolicyOneOf, PoolDefinitionAndProgramDefinition, PoolDefinitionLookupId, PoolDefinitionLookupIdIdOneOf, PoolEnded, PoolFilter, PoolInfo, PoolNotActive, PoolNotFound, PoolOrigin, PoolOriginWithLiterals, PoolPaused, PoolProgramInfo, PoolProvisionJobFinished, PoolProvisioned, PoolQuerySpec, PoolRenewalAction, PoolRenewalActionActionOneOf, PoolRenewalActionType, PoolRenewalActionTypeWithLiterals, PoolRenewed, PoolResumed, PoolSelectorType, PoolSelectorTypeWithLiterals, PoolStatus, PoolStatusUpdateJobFinished, PoolStatusUpdateJobFinishedContextOneOf, PoolStatusUpdateParamsPoolInfo, PoolStatusWithLiterals, PoolWithItems, PoolsQueryResult, ProgramDefinitionInfo, ProgramInfo, ProvisionPoolsForProgramRequest, ProvisionPoolsForProgramResponse, ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, ProvisionPoolsForProgramResponseTypeWithLiterals, QueryPoolsRequest, QueryPoolsResponse, RateLimitedPolicy, RedeemBenefitRequest, RedemptionDetails, ReleaseBenefitReservationRequest, ReleaseBenefitReservationResponse, RenewPoolsForProgramRequest, RenewPoolsForProgramResponse, ReserveBenefitRequest, ReserveBenefitResponse, RestoreInfo, RolloverConfiguration, SortOrder, SortOrderWithLiterals, Sorting, SyncResult, TimePeriod, TimePeriodWithLiterals, Type, TypeWithLiterals, Update, UpdatePoolRequest, UpdatePoolResponse, UpdatePoolStatusRequest, UpdatePoolStatusRequestPoolSelectorOneOf, UpdatePoolStatusResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeekDay, WeekDayWithLiterals, utils } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function getPool$1(httpClient: HttpClient): GetPoolSignature;
|
|
6
6
|
interface GetPoolSignature {
|
|
@@ -83,14 +83,32 @@ interface BulkUpdatePoolsSignature {
|
|
|
83
83
|
declare function checkEligibilityByFilter$1(httpClient: HttpClient): CheckEligibilityByFilterSignature;
|
|
84
84
|
interface CheckEligibilityByFilterSignature {
|
|
85
85
|
/**
|
|
86
|
+
* Deprecated. Use Check Benefit Eligibility By Filter instead.
|
|
87
|
+
*
|
|
86
88
|
* Determines eligibility for each benefit based on the filter.
|
|
87
89
|
*
|
|
88
90
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
89
91
|
*
|
|
90
92
|
* 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.
|
|
93
|
+
* @deprecated
|
|
91
94
|
*/
|
|
92
95
|
(options?: NonNullablePaths<CheckEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckEligibilityByFilterResponse, `result`, 2>>;
|
|
93
96
|
}
|
|
97
|
+
declare function checkBenefitEligibilityByFilter$1(httpClient: HttpClient): CheckBenefitEligibilityByFilterSignature;
|
|
98
|
+
interface CheckBenefitEligibilityByFilterSignature {
|
|
99
|
+
/**
|
|
100
|
+
* Checks benefit eligibility across the pools that match the filter.
|
|
101
|
+
*
|
|
102
|
+
* 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).
|
|
103
|
+
*
|
|
104
|
+
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
105
|
+
*
|
|
106
|
+
* 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.
|
|
107
|
+
*/
|
|
108
|
+
(options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 2> & {
|
|
109
|
+
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
94
112
|
|
|
95
113
|
declare function customQueryPools(httpClient: HttpClient): {
|
|
96
114
|
(query: PoolQuery, options?: QueryPoolsOptions): ReturnType<typeof typedQueryPools>;
|
|
@@ -105,6 +123,7 @@ declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getElig
|
|
|
105
123
|
declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdatePools$1> & typeof bulkUpdatePools$1>;
|
|
106
124
|
/** @internal */
|
|
107
125
|
declare const checkEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkEligibilityByFilter$1> & typeof checkEligibilityByFilter$1>;
|
|
126
|
+
declare const checkBenefitEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibilityByFilter$1> & typeof checkBenefitEligibilityByFilter$1>;
|
|
108
127
|
declare const queryPools: MaybeContext<BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools>;
|
|
109
128
|
|
|
110
|
-
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, CheckEligibilityByFilterOptions, CheckEligibilityByFilterResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolQuery, PoolsQueryBuilder, QueryPoolsOptions, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, checkEligibilityByFilter, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };
|
|
129
|
+
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityByFilterApplicationErrors, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, CheckEligibilityByFilterOptions, CheckEligibilityByFilterResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolQuery, PoolsQueryBuilder, QueryPoolsOptions, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, checkBenefitEligibilityByFilter, checkEligibilityByFilter, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };
|
|
@@ -493,6 +493,33 @@ function checkEligibilityByFilter(payload) {
|
|
|
493
493
|
}
|
|
494
494
|
return __checkEligibilityByFilter;
|
|
495
495
|
}
|
|
496
|
+
function checkBenefitEligibilityByFilter(payload) {
|
|
497
|
+
function __checkBenefitEligibilityByFilter({ host }) {
|
|
498
|
+
const serializedData = transformPaths(payload, [
|
|
499
|
+
{
|
|
500
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
501
|
+
paths: [{ path: "targetDate" }]
|
|
502
|
+
}
|
|
503
|
+
]);
|
|
504
|
+
const metadata = {
|
|
505
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
506
|
+
method: "POST",
|
|
507
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter",
|
|
508
|
+
packageName: PACKAGE_NAME,
|
|
509
|
+
migrationOptions: {
|
|
510
|
+
optInTransformResponse: true
|
|
511
|
+
},
|
|
512
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
513
|
+
protoPath: "/v1/pools/check-benefit-eligibility-by-filter",
|
|
514
|
+
data: serializedData,
|
|
515
|
+
host
|
|
516
|
+
}),
|
|
517
|
+
data: serializedData
|
|
518
|
+
};
|
|
519
|
+
return metadata;
|
|
520
|
+
}
|
|
521
|
+
return __checkBenefitEligibilityByFilter;
|
|
522
|
+
}
|
|
496
523
|
|
|
497
524
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
498
525
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -932,6 +959,45 @@ async function checkEligibilityByFilter2(options) {
|
|
|
932
959
|
throw transformedError;
|
|
933
960
|
}
|
|
934
961
|
}
|
|
962
|
+
async function checkBenefitEligibilityByFilter2(options) {
|
|
963
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
964
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
965
|
+
poolFilter: options?.poolFilter,
|
|
966
|
+
namespace: options?.namespace,
|
|
967
|
+
itemReference: options?.itemReference,
|
|
968
|
+
count: options?.count,
|
|
969
|
+
targetDate: options?.targetDate,
|
|
970
|
+
beneficiary: options?.beneficiary,
|
|
971
|
+
additionalData: options?.additionalData
|
|
972
|
+
});
|
|
973
|
+
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
974
|
+
sideEffects?.onSiteCall?.();
|
|
975
|
+
try {
|
|
976
|
+
const result = await httpClient.request(reqOpts);
|
|
977
|
+
sideEffects?.onSuccess?.(result);
|
|
978
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
979
|
+
} catch (err) {
|
|
980
|
+
const transformedError = sdkTransformError(
|
|
981
|
+
err,
|
|
982
|
+
{
|
|
983
|
+
spreadPathsToArguments: {},
|
|
984
|
+
explicitPathsToArguments: {
|
|
985
|
+
poolFilter: "$[0].poolFilter",
|
|
986
|
+
namespace: "$[0].namespace",
|
|
987
|
+
itemReference: "$[0].itemReference",
|
|
988
|
+
count: "$[0].count",
|
|
989
|
+
targetDate: "$[0].targetDate",
|
|
990
|
+
beneficiary: "$[0].beneficiary",
|
|
991
|
+
additionalData: "$[0].additionalData"
|
|
992
|
+
},
|
|
993
|
+
singleArgumentUnchanged: false
|
|
994
|
+
},
|
|
995
|
+
["options"]
|
|
996
|
+
);
|
|
997
|
+
sideEffects?.onError?.(err);
|
|
998
|
+
throw transformedError;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
935
1001
|
|
|
936
1002
|
// src/benefit-programs-v1-pool-pools.public.ts
|
|
937
1003
|
function getPool3(httpClient) {
|
|
@@ -1009,6 +1075,13 @@ function checkEligibilityByFilter3(httpClient) {
|
|
|
1009
1075
|
{ httpClient }
|
|
1010
1076
|
);
|
|
1011
1077
|
}
|
|
1078
|
+
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1079
|
+
return (options) => checkBenefitEligibilityByFilter2(
|
|
1080
|
+
options,
|
|
1081
|
+
// @ts-ignore
|
|
1082
|
+
{ httpClient }
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1012
1085
|
|
|
1013
1086
|
// src/benefit-programs-v1-pool-pools.context.ts
|
|
1014
1087
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
@@ -1032,6 +1105,7 @@ var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBen
|
|
|
1032
1105
|
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
1033
1106
|
var bulkUpdatePools4 = /* @__PURE__ */ createRESTModule(bulkUpdatePools3);
|
|
1034
1107
|
var checkEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkEligibilityByFilter3);
|
|
1108
|
+
var checkBenefitEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibilityByFilter3);
|
|
1035
1109
|
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
1036
1110
|
export {
|
|
1037
1111
|
BenefitResultType,
|
|
@@ -1051,6 +1125,7 @@ export {
|
|
|
1051
1125
|
bulkCheckBenefitEligibility4 as bulkCheckBenefitEligibility,
|
|
1052
1126
|
bulkUpdatePools4 as bulkUpdatePools,
|
|
1053
1127
|
checkBenefitEligibility4 as checkBenefitEligibility,
|
|
1128
|
+
checkBenefitEligibilityByFilter4 as checkBenefitEligibilityByFilter,
|
|
1054
1129
|
checkEligibilityByFilter4 as checkEligibilityByFilter,
|
|
1055
1130
|
getEligibleBenefits4 as getEligibleBenefits,
|
|
1056
1131
|
getPool4 as getPool,
|