@wix/auto_sdk_benefit-programs_pools 1.0.68 → 1.0.69
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 +3 -19
- package/build/cjs/index.js +0 -76
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +5 -115
- package/build/cjs/index.typings.js +0 -68
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +6 -61
- package/build/cjs/meta.js +0 -47
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +1 -150
- package/build/cjs/schemas.js +0 -256
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +3 -19
- package/build/es/index.mjs +0 -75
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +5 -115
- package/build/es/index.typings.mjs +0 -67
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +6 -61
- package/build/es/meta.mjs +0 -46
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +1 -150
- package/build/es/schemas.mjs +0 -254
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -22
- 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 +5 -120
- 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 +6 -61
- package/build/internal/cjs/meta.js +0 -47
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +1 -150
- package/build/internal/cjs/schemas.js +0 -256
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -22
- 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 +5 -120
- 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 +6 -61
- package/build/internal/es/meta.mjs +0 -46
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +1 -150
- package/build/internal/es/schemas.mjs +0 -254
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -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,
|
|
2
|
+
import { Pool, UpdatePool, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, ItemReference, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, GetEligibleBenefitsApplicationErrors, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, 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, CheckEligibilityByFilterOptions, CheckEligibilityByFilterRequest, CheckEligibilityByFilterResponse, 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, HealPoolsTenantRequest, HealPoolsTenantResponse, 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 {
|
|
@@ -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
|
-
declare function checkBenefitEligibilityByFilter$1(httpClient: HttpClient): CheckBenefitEligibilityByFilterSignature;
|
|
83
|
-
interface CheckBenefitEligibilityByFilterSignature {
|
|
84
|
-
/**
|
|
85
|
-
* Checks benefit eligibility across the pools that match the filter.
|
|
86
|
-
*
|
|
87
|
-
* 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).
|
|
88
|
-
*
|
|
89
|
-
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
90
|
-
*
|
|
91
|
-
* 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.
|
|
92
|
-
*/
|
|
93
|
-
(options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 2> & {
|
|
94
|
-
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
95
|
-
}>;
|
|
96
|
-
}
|
|
97
82
|
|
|
98
83
|
declare function customQueryPools(httpClient: HttpClient): {
|
|
99
84
|
(query: PoolQuery, options?: QueryPoolsOptions): ReturnType<typeof typedQueryPools>;
|
|
@@ -106,7 +91,6 @@ declare const checkBenefitEligibility: MaybeContext<BuildRESTFunction<typeof che
|
|
|
106
91
|
declare const bulkCheckBenefitEligibility: MaybeContext<BuildRESTFunction<typeof bulkCheckBenefitEligibility$1> & typeof bulkCheckBenefitEligibility$1>;
|
|
107
92
|
declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getEligibleBenefits$1> & typeof getEligibleBenefits$1>;
|
|
108
93
|
declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdatePools$1> & typeof bulkUpdatePools$1>;
|
|
109
|
-
declare const checkBenefitEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibilityByFilter$1> & typeof checkBenefitEligibilityByFilter$1>;
|
|
110
94
|
declare const queryPools: MaybeContext<BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools>;
|
|
111
95
|
|
|
112
|
-
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse,
|
|
96
|
+
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolQuery, PoolsQueryBuilder, QueryPoolsOptions, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };
|
package/build/es/index.mjs
CHANGED
|
@@ -493,33 +493,6 @@ 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
|
-
}
|
|
523
496
|
|
|
524
497
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
525
498
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -959,45 +932,6 @@ async function checkEligibilityByFilter2(options) {
|
|
|
959
932
|
throw transformedError;
|
|
960
933
|
}
|
|
961
934
|
}
|
|
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
|
-
}
|
|
1001
935
|
|
|
1002
936
|
// src/benefit-programs-v1-pool-pools.public.ts
|
|
1003
937
|
function getPool3(httpClient) {
|
|
@@ -1075,13 +1009,6 @@ function checkEligibilityByFilter3(httpClient) {
|
|
|
1075
1009
|
{ httpClient }
|
|
1076
1010
|
);
|
|
1077
1011
|
}
|
|
1078
|
-
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1079
|
-
return (options) => checkBenefitEligibilityByFilter2(
|
|
1080
|
-
options,
|
|
1081
|
-
// @ts-ignore
|
|
1082
|
-
{ httpClient }
|
|
1083
|
-
);
|
|
1084
|
-
}
|
|
1085
1012
|
|
|
1086
1013
|
// src/benefit-programs-v1-pool-pools.context.ts
|
|
1087
1014
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
@@ -1105,7 +1032,6 @@ var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBen
|
|
|
1105
1032
|
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
1106
1033
|
var bulkUpdatePools4 = /* @__PURE__ */ createRESTModule(bulkUpdatePools3);
|
|
1107
1034
|
var checkEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkEligibilityByFilter3);
|
|
1108
|
-
var checkBenefitEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibilityByFilter3);
|
|
1109
1035
|
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
1110
1036
|
export {
|
|
1111
1037
|
BenefitResultType,
|
|
@@ -1125,7 +1051,6 @@ export {
|
|
|
1125
1051
|
bulkCheckBenefitEligibility4 as bulkCheckBenefitEligibility,
|
|
1126
1052
|
bulkUpdatePools4 as bulkUpdatePools,
|
|
1127
1053
|
checkBenefitEligibility4 as checkBenefitEligibility,
|
|
1128
|
-
checkBenefitEligibilityByFilter4 as checkBenefitEligibilityByFilter,
|
|
1129
1054
|
checkEligibilityByFilter4 as checkEligibilityByFilter,
|
|
1130
1055
|
getEligibleBenefits4 as getEligibleBenefits,
|
|
1131
1056
|
getPool4 as getPool,
|