@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
package/build/cjs/index.d.ts
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, PoolQuery, QueryPoolsOptions, typedQueryPools, PoolsQueryBuilder } from './index.typings.js';
|
|
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,
|
|
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.js';
|
|
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, 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, 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.js';
|
|
4
4
|
|
|
5
5
|
declare function getPool$1(httpClient: HttpClient): GetPoolSignature;
|
|
6
6
|
interface GetPoolSignature {
|
|
@@ -79,6 +79,21 @@ 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
|
+
}
|
|
82
97
|
|
|
83
98
|
declare function customQueryPools(httpClient: HttpClient): {
|
|
84
99
|
(query: PoolQuery, options?: QueryPoolsOptions): ReturnType<typeof typedQueryPools>;
|
|
@@ -91,6 +106,7 @@ declare const checkBenefitEligibility: MaybeContext<BuildRESTFunction<typeof che
|
|
|
91
106
|
declare const bulkCheckBenefitEligibility: MaybeContext<BuildRESTFunction<typeof bulkCheckBenefitEligibility$1> & typeof bulkCheckBenefitEligibility$1>;
|
|
92
107
|
declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getEligibleBenefits$1> & typeof getEligibleBenefits$1>;
|
|
93
108
|
declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdatePools$1> & typeof bulkUpdatePools$1>;
|
|
109
|
+
declare const checkBenefitEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibilityByFilter$1> & typeof checkBenefitEligibilityByFilter$1>;
|
|
94
110
|
declare const queryPools: MaybeContext<BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools>;
|
|
95
111
|
|
|
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 };
|
|
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 };
|
package/build/cjs/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility4,
|
|
38
38
|
bulkUpdatePools: () => bulkUpdatePools4,
|
|
39
39
|
checkBenefitEligibility: () => checkBenefitEligibility4,
|
|
40
|
+
checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter4,
|
|
40
41
|
checkEligibilityByFilter: () => checkEligibilityByFilter4,
|
|
41
42
|
getEligibleBenefits: () => getEligibleBenefits4,
|
|
42
43
|
getPool: () => getPool4,
|
|
@@ -539,6 +540,33 @@ function checkEligibilityByFilter(payload) {
|
|
|
539
540
|
}
|
|
540
541
|
return __checkEligibilityByFilter;
|
|
541
542
|
}
|
|
543
|
+
function checkBenefitEligibilityByFilter(payload) {
|
|
544
|
+
function __checkBenefitEligibilityByFilter({ host }) {
|
|
545
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
546
|
+
{
|
|
547
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
548
|
+
paths: [{ path: "targetDate" }]
|
|
549
|
+
}
|
|
550
|
+
]);
|
|
551
|
+
const metadata = {
|
|
552
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
553
|
+
method: "POST",
|
|
554
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter",
|
|
555
|
+
packageName: PACKAGE_NAME,
|
|
556
|
+
migrationOptions: {
|
|
557
|
+
optInTransformResponse: true
|
|
558
|
+
},
|
|
559
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
560
|
+
protoPath: "/v1/pools/check-benefit-eligibility-by-filter",
|
|
561
|
+
data: serializedData,
|
|
562
|
+
host
|
|
563
|
+
}),
|
|
564
|
+
data: serializedData
|
|
565
|
+
};
|
|
566
|
+
return metadata;
|
|
567
|
+
}
|
|
568
|
+
return __checkBenefitEligibilityByFilter;
|
|
569
|
+
}
|
|
542
570
|
|
|
543
571
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
544
572
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -978,6 +1006,45 @@ async function checkEligibilityByFilter2(options) {
|
|
|
978
1006
|
throw transformedError;
|
|
979
1007
|
}
|
|
980
1008
|
}
|
|
1009
|
+
async function checkBenefitEligibilityByFilter2(options) {
|
|
1010
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1011
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1012
|
+
poolFilter: options?.poolFilter,
|
|
1013
|
+
namespace: options?.namespace,
|
|
1014
|
+
itemReference: options?.itemReference,
|
|
1015
|
+
count: options?.count,
|
|
1016
|
+
targetDate: options?.targetDate,
|
|
1017
|
+
beneficiary: options?.beneficiary,
|
|
1018
|
+
additionalData: options?.additionalData
|
|
1019
|
+
});
|
|
1020
|
+
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
1021
|
+
sideEffects?.onSiteCall?.();
|
|
1022
|
+
try {
|
|
1023
|
+
const result = await httpClient.request(reqOpts);
|
|
1024
|
+
sideEffects?.onSuccess?.(result);
|
|
1025
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1026
|
+
} catch (err) {
|
|
1027
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1028
|
+
err,
|
|
1029
|
+
{
|
|
1030
|
+
spreadPathsToArguments: {},
|
|
1031
|
+
explicitPathsToArguments: {
|
|
1032
|
+
poolFilter: "$[0].poolFilter",
|
|
1033
|
+
namespace: "$[0].namespace",
|
|
1034
|
+
itemReference: "$[0].itemReference",
|
|
1035
|
+
count: "$[0].count",
|
|
1036
|
+
targetDate: "$[0].targetDate",
|
|
1037
|
+
beneficiary: "$[0].beneficiary",
|
|
1038
|
+
additionalData: "$[0].additionalData"
|
|
1039
|
+
},
|
|
1040
|
+
singleArgumentUnchanged: false
|
|
1041
|
+
},
|
|
1042
|
+
["options"]
|
|
1043
|
+
);
|
|
1044
|
+
sideEffects?.onError?.(err);
|
|
1045
|
+
throw transformedError;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
981
1048
|
|
|
982
1049
|
// src/benefit-programs-v1-pool-pools.public.ts
|
|
983
1050
|
function getPool3(httpClient) {
|
|
@@ -1055,6 +1122,13 @@ function checkEligibilityByFilter3(httpClient) {
|
|
|
1055
1122
|
{ httpClient }
|
|
1056
1123
|
);
|
|
1057
1124
|
}
|
|
1125
|
+
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1126
|
+
return (options) => checkBenefitEligibilityByFilter2(
|
|
1127
|
+
options,
|
|
1128
|
+
// @ts-ignore
|
|
1129
|
+
{ httpClient }
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1058
1132
|
|
|
1059
1133
|
// src/benefit-programs-v1-pool-pools.context.ts
|
|
1060
1134
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -1078,6 +1152,7 @@ var bulkCheckBenefitEligibility4 = /* @__PURE__ */ (0, import_rest_modules3.crea
|
|
|
1078
1152
|
var getEligibleBenefits4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getEligibleBenefits3);
|
|
1079
1153
|
var bulkUpdatePools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdatePools3);
|
|
1080
1154
|
var checkEligibilityByFilter4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(checkEligibilityByFilter3);
|
|
1155
|
+
var checkBenefitEligibilityByFilter4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(checkBenefitEligibilityByFilter3);
|
|
1081
1156
|
var queryPools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryPools);
|
|
1082
1157
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1083
1158
|
0 && (module.exports = {
|
|
@@ -1098,6 +1173,7 @@ var queryPools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cus
|
|
|
1098
1173
|
bulkCheckBenefitEligibility,
|
|
1099
1174
|
bulkUpdatePools,
|
|
1100
1175
|
checkBenefitEligibility,
|
|
1176
|
+
checkBenefitEligibilityByFilter,
|
|
1101
1177
|
checkEligibilityByFilter,
|
|
1102
1178
|
getEligibleBenefits,
|
|
1103
1179
|
getPool,
|