@wix/auto_sdk_benefit-programs_pools 1.0.73 → 1.0.75
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 +4 -78
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +61 -75
- package/build/cjs/index.typings.js +4 -70
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +44 -47
- package/build/cjs/meta.js +0 -47
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +10 -0
- package/build/cjs/schemas.js +16 -2
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +4 -77
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +61 -75
- package/build/es/index.typings.mjs +4 -69
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +44 -47
- package/build/es/meta.mjs +0 -46
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +10 -0
- package/build/es/schemas.mjs +16 -2
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -20
- package/build/internal/cjs/index.js +4 -78
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +73 -98
- package/build/internal/cjs/index.typings.js +4 -70
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +44 -47
- package/build/internal/cjs/meta.js +0 -47
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +10 -0
- package/build/internal/cjs/schemas.js +16 -2
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -20
- package/build/internal/es/index.mjs +4 -77
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +73 -98
- package/build/internal/es/index.typings.mjs +4 -69
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +44 -47
- package/build/internal/es/meta.mjs +0 -46
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +10 -0
- package/build/internal/es/schemas.mjs +16 -2
- 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,
|
|
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,
|
|
2
|
+
import { Pool, UpdatePool, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, ItemReference, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, GetEligibleBenefitsApplicationErrors, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, 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, 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, PoolSelector, 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 {
|
|
@@ -79,21 +79,6 @@ interface BulkUpdatePoolsSignature {
|
|
|
79
79
|
*/
|
|
80
80
|
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 5>): 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`, 6>>;
|
|
81
81
|
}
|
|
82
|
-
/** @internal */
|
|
83
|
-
declare function checkEligibilityByFilter$1(httpClient: HttpClient): CheckEligibilityByFilterSignature;
|
|
84
|
-
interface CheckEligibilityByFilterSignature {
|
|
85
|
-
/**
|
|
86
|
-
* Deprecated. Use Check Benefit Eligibility By Filter instead.
|
|
87
|
-
*
|
|
88
|
-
* Determines eligibility for each benefit based on the filter.
|
|
89
|
-
*
|
|
90
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
91
|
-
*
|
|
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
|
|
94
|
-
*/
|
|
95
|
-
(options?: NonNullablePaths<CheckEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckEligibilityByFilterResponse, `result`, 2>>;
|
|
96
|
-
}
|
|
97
82
|
declare function checkBenefitEligibilityByFilter$1(httpClient: HttpClient): CheckBenefitEligibilityByFilterSignature;
|
|
98
83
|
interface CheckBenefitEligibilityByFilterSignature {
|
|
99
84
|
/**
|
|
@@ -121,9 +106,7 @@ declare const checkBenefitEligibility: MaybeContext<BuildRESTFunction<typeof che
|
|
|
121
106
|
declare const bulkCheckBenefitEligibility: MaybeContext<BuildRESTFunction<typeof bulkCheckBenefitEligibility$1> & typeof bulkCheckBenefitEligibility$1>;
|
|
122
107
|
declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getEligibleBenefits$1> & typeof getEligibleBenefits$1>;
|
|
123
108
|
declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdatePools$1> & typeof bulkUpdatePools$1>;
|
|
124
|
-
/** @internal */
|
|
125
|
-
declare const checkEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkEligibilityByFilter$1> & typeof checkEligibilityByFilter$1>;
|
|
126
109
|
declare const checkBenefitEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibilityByFilter$1> & typeof checkBenefitEligibilityByFilter$1>;
|
|
127
110
|
declare const queryPools: MaybeContext<BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools>;
|
|
128
111
|
|
|
129
|
-
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityByFilterApplicationErrors, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse,
|
|
112
|
+
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityByFilterApplicationErrors, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolQuery, PoolsQueryBuilder, QueryPoolsOptions, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };
|
|
@@ -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({
|
|
@@ -968,7 +902,8 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
968
902
|
count: options?.count,
|
|
969
903
|
targetDate: options?.targetDate,
|
|
970
904
|
beneficiary: options?.beneficiary,
|
|
971
|
-
additionalData: options?.additionalData
|
|
905
|
+
additionalData: options?.additionalData,
|
|
906
|
+
poolSelector: options?.poolSelector
|
|
972
907
|
});
|
|
973
908
|
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
974
909
|
sideEffects?.onSiteCall?.();
|
|
@@ -988,7 +923,8 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
988
923
|
count: "$[0].count",
|
|
989
924
|
targetDate: "$[0].targetDate",
|
|
990
925
|
beneficiary: "$[0].beneficiary",
|
|
991
|
-
additionalData: "$[0].additionalData"
|
|
926
|
+
additionalData: "$[0].additionalData",
|
|
927
|
+
poolSelector: "$[0].poolSelector"
|
|
992
928
|
},
|
|
993
929
|
singleArgumentUnchanged: false
|
|
994
930
|
},
|
|
@@ -1068,13 +1004,6 @@ function bulkUpdatePools3(httpClient) {
|
|
|
1068
1004
|
{ httpClient }
|
|
1069
1005
|
);
|
|
1070
1006
|
}
|
|
1071
|
-
function checkEligibilityByFilter3(httpClient) {
|
|
1072
|
-
return (options) => checkEligibilityByFilter2(
|
|
1073
|
-
options,
|
|
1074
|
-
// @ts-ignore
|
|
1075
|
-
{ httpClient }
|
|
1076
|
-
);
|
|
1077
|
-
}
|
|
1078
1007
|
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1079
1008
|
return (options) => checkBenefitEligibilityByFilter2(
|
|
1080
1009
|
options,
|
|
@@ -1104,7 +1033,6 @@ var checkBenefitEligibility4 = /* @__PURE__ */ createRESTModule(checkBenefitElig
|
|
|
1104
1033
|
var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBenefitEligibility3);
|
|
1105
1034
|
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
1106
1035
|
var bulkUpdatePools4 = /* @__PURE__ */ createRESTModule(bulkUpdatePools3);
|
|
1107
|
-
var checkEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkEligibilityByFilter3);
|
|
1108
1036
|
var checkBenefitEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibilityByFilter3);
|
|
1109
1037
|
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
1110
1038
|
export {
|
|
@@ -1126,7 +1054,6 @@ export {
|
|
|
1126
1054
|
bulkUpdatePools4 as bulkUpdatePools,
|
|
1127
1055
|
checkBenefitEligibility4 as checkBenefitEligibility,
|
|
1128
1056
|
checkBenefitEligibilityByFilter4 as checkBenefitEligibilityByFilter,
|
|
1129
|
-
checkEligibilityByFilter4 as checkEligibilityByFilter,
|
|
1130
1057
|
getEligibleBenefits4 as getEligibleBenefits,
|
|
1131
1058
|
getPool4 as getPool,
|
|
1132
1059
|
queryPools4 as queryPools,
|