@wix/auto_sdk_benefit-programs_pools 1.0.53 → 1.0.55
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 +4 -4
- package/build/cjs/index.js +8 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +32 -114
- package/build/cjs/index.typings.js +8 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +23 -111
- package/build/cjs/meta.js +0 -13
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +6 -13
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +32 -114
- package/build/es/index.typings.mjs +6 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +23 -111
- package/build/es/meta.mjs +0 -12
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -5
- package/build/internal/cjs/index.js +8 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +33 -115
- package/build/internal/cjs/index.typings.js +8 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +23 -111
- package/build/internal/cjs/meta.js +0 -13
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +5 -5
- package/build/internal/es/index.mjs +6 -13
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +33 -115
- package/build/internal/es/index.typings.mjs +6 -13
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +23 -111
- package/build/internal/es/meta.mjs +0 -12
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
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,
|
|
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, 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 {
|
|
@@ -46,7 +46,7 @@ interface CheckBenefitEligibilitySignature {
|
|
|
46
46
|
* To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
|
|
47
47
|
* @param - ID of the pool that the benefit to check belongs to.
|
|
48
48
|
*/
|
|
49
|
-
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.
|
|
49
|
+
(poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.benefitResults` | `result.benefitResults.${number}.eligibleBenefitOptions.poolId` | `result.benefitResults.${number}.eligibleBenefitOptions.benefitKey` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.externalId` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.category` | `result.benefitResults.${number}.eligibleBenefitOptions.itemReference.providerAppId` | `result.benefitResults.${number}.notEnoughBalanceOptions.poolId` | `result.benefitResults.${number}.notEnoughBalanceOptions.availableBalance` | `result.benefitResults.${number}.notEnoughBalanceOptions.requestedBalance` | `result.benefitResults.${number}.policyExpressionEvaluatedToFalseOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolId` | `result.benefitResults.${number}.poolNotActiveOptions.poolStatus` | `result.benefitResults.${number}.benefitNotFoundOptions.poolId` | `result.benefitResults.${number}.poolNotFoundOptions.poolId` | `result.benefitResults.${number}.type`, 7>>;
|
|
50
50
|
}
|
|
51
51
|
declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient): BulkCheckBenefitEligibilitySignature;
|
|
52
52
|
interface BulkCheckBenefitEligibilitySignature {
|
|
@@ -57,7 +57,7 @@ interface BulkCheckBenefitEligibilitySignature {
|
|
|
57
57
|
*
|
|
58
58
|
* 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.
|
|
59
59
|
*/
|
|
60
|
-
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 5>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count
|
|
60
|
+
(options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 5>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count`, 6>>;
|
|
61
61
|
}
|
|
62
62
|
declare function getEligibleBenefits$1(httpClient: HttpClient): GetEligibleBenefitsSignature;
|
|
63
63
|
interface GetEligibleBenefitsSignature {
|
|
@@ -77,7 +77,7 @@ interface BulkUpdatePoolsSignature {
|
|
|
77
77
|
/**
|
|
78
78
|
* Updates pools.
|
|
79
79
|
*/
|
|
80
|
-
(options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 5>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.
|
|
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
82
|
|
|
83
83
|
declare function customQueryPools(httpClient: HttpClient): {
|
package/build/cjs/index.js
CHANGED
|
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
BenefitResultType: () => BenefitResultType,
|
|
24
|
-
EligibilityCheckResultType: () => EligibilityCheckResultType,
|
|
25
24
|
IdentityType: () => IdentityType,
|
|
26
25
|
ListPoolsRequestType: () => ListPoolsRequestType,
|
|
27
26
|
PolicyExpressionType: () => PolicyExpressionType,
|
|
@@ -43,7 +42,8 @@ __export(index_exports, {
|
|
|
43
42
|
getPool: () => getPool4,
|
|
44
43
|
queryPools: () => queryPools4,
|
|
45
44
|
redeemBenefit: () => redeemBenefit4,
|
|
46
|
-
updatePool: () => updatePool4
|
|
45
|
+
updatePool: () => updatePool4,
|
|
46
|
+
utils: () => utils
|
|
47
47
|
});
|
|
48
48
|
module.exports = __toCommonJS(index_exports);
|
|
49
49
|
|
|
@@ -502,8 +502,6 @@ function bulkUpdatePools(payload) {
|
|
|
502
502
|
{
|
|
503
503
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
504
504
|
paths: [
|
|
505
|
-
{ path: "results.pool.createdDate" },
|
|
506
|
-
{ path: "results.pool.updatedDate" },
|
|
507
505
|
{ path: "results.item.createdDate" },
|
|
508
506
|
{ path: "results.item.updatedDate" }
|
|
509
507
|
]
|
|
@@ -544,6 +542,7 @@ function checkEligibilityByFilter(payload) {
|
|
|
544
542
|
|
|
545
543
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
546
544
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
545
|
+
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
547
546
|
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
548
547
|
PoolStatus2["UNDEFINED"] = "UNDEFINED";
|
|
549
548
|
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
@@ -620,15 +619,6 @@ var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
|
620
619
|
BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
621
620
|
return BenefitResultType2;
|
|
622
621
|
})(BenefitResultType || {});
|
|
623
|
-
var EligibilityCheckResultType = /* @__PURE__ */ ((EligibilityCheckResultType2) => {
|
|
624
|
-
EligibilityCheckResultType2["UNKNOWN"] = "UNKNOWN";
|
|
625
|
-
EligibilityCheckResultType2["ELIGIBLE"] = "ELIGIBLE";
|
|
626
|
-
EligibilityCheckResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
627
|
-
EligibilityCheckResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
|
|
628
|
-
EligibilityCheckResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
|
|
629
|
-
EligibilityCheckResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
630
|
-
return EligibilityCheckResultType2;
|
|
631
|
-
})(EligibilityCheckResultType || {});
|
|
632
622
|
var ListPoolsRequestType = /* @__PURE__ */ ((ListPoolsRequestType2) => {
|
|
633
623
|
ListPoolsRequestType2["UNKNOWN_FILTER"] = "UNKNOWN_FILTER";
|
|
634
624
|
ListPoolsRequestType2["BY_ITEM_REFERENCE"] = "BY_ITEM_REFERENCE";
|
|
@@ -774,6 +764,9 @@ async function typedQueryPools(query, options) {
|
|
|
774
764
|
throw transformedError;
|
|
775
765
|
}
|
|
776
766
|
}
|
|
767
|
+
var utils = {
|
|
768
|
+
...(0, import_query_builder_utils.createQueryUtils)()
|
|
769
|
+
};
|
|
777
770
|
async function redeemBenefit2(poolId, options) {
|
|
778
771
|
const { httpClient, sideEffects } = arguments[2];
|
|
779
772
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1098,7 +1091,6 @@ var queryPools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cus
|
|
|
1098
1091
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1099
1092
|
0 && (module.exports = {
|
|
1100
1093
|
BenefitResultType,
|
|
1101
|
-
EligibilityCheckResultType,
|
|
1102
1094
|
IdentityType,
|
|
1103
1095
|
ListPoolsRequestType,
|
|
1104
1096
|
PolicyExpressionType,
|
|
@@ -1120,6 +1112,7 @@ var queryPools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cus
|
|
|
1120
1112
|
getPool,
|
|
1121
1113
|
queryPools,
|
|
1122
1114
|
redeemBenefit,
|
|
1123
|
-
updatePool
|
|
1115
|
+
updatePool,
|
|
1116
|
+
utils
|
|
1124
1117
|
});
|
|
1125
1118
|
//# sourceMappingURL=index.js.map
|