@wix/auto_sdk_benefit-programs_pools 1.0.54 → 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 +27 -114
- package/build/cjs/index.typings.js +8 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +18 -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 +27 -114
- package/build/es/index.typings.mjs +6 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +18 -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 +28 -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 +18 -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 +28 -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 +18 -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/es/index.d.mts
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.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,
|
|
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.mjs';
|
|
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/es/index.mjs
CHANGED
|
@@ -456,8 +456,6 @@ function bulkUpdatePools(payload) {
|
|
|
456
456
|
{
|
|
457
457
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
458
458
|
paths: [
|
|
459
|
-
{ path: "results.pool.createdDate" },
|
|
460
|
-
{ path: "results.pool.updatedDate" },
|
|
461
459
|
{ path: "results.item.createdDate" },
|
|
462
460
|
{ path: "results.item.updatedDate" }
|
|
463
461
|
]
|
|
@@ -498,6 +496,7 @@ function checkEligibilityByFilter(payload) {
|
|
|
498
496
|
|
|
499
497
|
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
500
498
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
499
|
+
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
501
500
|
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
502
501
|
PoolStatus2["UNDEFINED"] = "UNDEFINED";
|
|
503
502
|
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
@@ -574,15 +573,6 @@ var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
|
574
573
|
BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
575
574
|
return BenefitResultType2;
|
|
576
575
|
})(BenefitResultType || {});
|
|
577
|
-
var EligibilityCheckResultType = /* @__PURE__ */ ((EligibilityCheckResultType2) => {
|
|
578
|
-
EligibilityCheckResultType2["UNKNOWN"] = "UNKNOWN";
|
|
579
|
-
EligibilityCheckResultType2["ELIGIBLE"] = "ELIGIBLE";
|
|
580
|
-
EligibilityCheckResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
581
|
-
EligibilityCheckResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
|
|
582
|
-
EligibilityCheckResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
|
|
583
|
-
EligibilityCheckResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
584
|
-
return EligibilityCheckResultType2;
|
|
585
|
-
})(EligibilityCheckResultType || {});
|
|
586
576
|
var ListPoolsRequestType = /* @__PURE__ */ ((ListPoolsRequestType2) => {
|
|
587
577
|
ListPoolsRequestType2["UNKNOWN_FILTER"] = "UNKNOWN_FILTER";
|
|
588
578
|
ListPoolsRequestType2["BY_ITEM_REFERENCE"] = "BY_ITEM_REFERENCE";
|
|
@@ -728,6 +718,9 @@ async function typedQueryPools(query, options) {
|
|
|
728
718
|
throw transformedError;
|
|
729
719
|
}
|
|
730
720
|
}
|
|
721
|
+
var utils = {
|
|
722
|
+
...createQueryUtils()
|
|
723
|
+
};
|
|
731
724
|
async function redeemBenefit2(poolId, options) {
|
|
732
725
|
const { httpClient, sideEffects } = arguments[2];
|
|
733
726
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1051,7 +1044,6 @@ var checkEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkEligibilit
|
|
|
1051
1044
|
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
1052
1045
|
export {
|
|
1053
1046
|
BenefitResultType,
|
|
1054
|
-
EligibilityCheckResultType,
|
|
1055
1047
|
IdentityType,
|
|
1056
1048
|
ListPoolsRequestType,
|
|
1057
1049
|
PolicyExpressionType,
|
|
@@ -1073,6 +1065,7 @@ export {
|
|
|
1073
1065
|
getPool4 as getPool,
|
|
1074
1066
|
queryPools4 as queryPools,
|
|
1075
1067
|
redeemBenefit4 as redeemBenefit,
|
|
1076
|
-
updatePool4 as updatePool
|
|
1068
|
+
updatePool4 as updatePool,
|
|
1069
|
+
utils
|
|
1077
1070
|
};
|
|
1078
1071
|
//# sourceMappingURL=index.mjs.map
|