@wix/auto_sdk_benefit-programs_pools 1.0.81 → 1.0.82
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 -2
- package/build/cjs/index.js +13 -14
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +10 -72
- package/build/cjs/index.typings.js +11 -13
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -42
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -2
- package/build/es/index.mjs +13 -14
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +10 -72
- package/build/es/index.typings.mjs +11 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -42
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -3
- package/build/internal/cjs/index.typings.d.ts +13 -73
- package/build/internal/cjs/meta.d.ts +5 -42
- package/build/internal/es/index.d.mts +4 -3
- package/build/internal/es/index.typings.d.mts +13 -73
- package/build/internal/es/meta.d.mts +5 -42
- 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
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, AlreadyExecuted, ApplicationError, AsyncResult, BalanceAmount, Benefit, BenefitAlreadyRedeemed, BenefitInfo, BenefitNotFound, BenefitReallocated, BenefitRedeemed, BenefitReservationCanceled, BenefitReservationReleased, BenefitReserved, BenefitResult, BenefitResultResultOneOf, BenefitResultType, BenefitResultTypeWithLiterals, BenefitSelector, BulkActionMetadata, BulkCheckBenefitEligibilityRequest, BulkEligibilityCheckResult, BulkPoolResult, BulkUpdatePoolsRequest, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, CancelRedemptionApplicationErrors, CancelRedemptionOptions, CancelRedemptionRequest, CancelRedemptionResponse, CancellationDetails, ChainOperationInProgress, 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, FixedIntervalPolicy, GetEligibleBenefitsRequest, GetPoolRequest, GetPoolResponse, HealPoolRequest, HealPoolResponse, HealPoolTenantRequest, HealPoolTenantResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, Intent, IntentWithLiterals, InvalidPoolDefinitionReference, ItemMetadata, MaskedPool, MessageEnvelope, NotEnoughBalance, NotLatestTransaction, Policy, PolicyExpression, PolicyExpressionAnd, PolicyExpressionEvaluatedToFalse, PolicyExpressionExpressionOneOf, PolicyExpressionNot, PolicyExpressionOr, PolicyExpressionType, PolicyExpressionTypeWithLiterals, PolicyPolicyOneOf, PoolDefinitionAndProgramDefinition, PoolDefinitionLookupId, PoolDefinitionLookupIdIdOneOf, PoolEnded,
|
|
3
|
+
export { AccountInfo, ActionEvent, AlreadyExecuted, ApplicationError, AsyncResult, BalanceAmount, Benefit, BenefitAlreadyRedeemed, BenefitInfo, BenefitNotFound, BenefitReallocated, BenefitRedeemed, BenefitReservationCanceled, BenefitReservationReleased, BenefitReserved, BenefitResult, BenefitResultResultOneOf, BenefitResultType, BenefitResultTypeWithLiterals, BenefitSelector, BulkActionMetadata, BulkCheckBenefitEligibilityRequest, BulkEligibilityCheckResult, BulkPoolResult, BulkUpdatePoolsRequest, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, CancelRedemptionApplicationErrors, CancelRedemptionOptions, CancelRedemptionRequest, CancelRedemptionResponse, CancellationDetails, ChainOperationInProgress, 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, FixedIntervalPolicy, GetEligibleBenefitsRequest, GetPoolRequest, GetPoolResponse, HealPoolRequest, HealPoolResponse, HealPoolTenantRequest, HealPoolTenantResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, Intent, IntentWithLiterals, InvalidPoolDefinitionReference, ItemMetadata, MaskedPool, MessageEnvelope, NotEnoughBalance, NotLatestTransaction, Policy, PolicyExpression, PolicyExpressionAnd, PolicyExpressionEvaluatedToFalse, PolicyExpressionExpressionOneOf, PolicyExpressionNot, PolicyExpressionOr, PolicyExpressionType, PolicyExpressionTypeWithLiterals, PolicyPolicyOneOf, PoolDefinitionAndProgramDefinition, PoolDefinitionLookupId, PoolDefinitionLookupIdIdOneOf, PoolEnded, PoolInfo, PoolNotActive, PoolNotFound, PoolOrigin, PoolOriginWithLiterals, PoolPaused, PoolProgramInfo, PoolProvisionJobFinished, PoolProvisioned, PoolQuerySpec, PoolRenewalAction, PoolRenewalActionActionOneOf, PoolRenewalActionType, PoolRenewalActionTypeWithLiterals, PoolRenewed, PoolResumed, PoolSelector, PoolSelectorType, PoolSelectorTypeWithLiterals, PoolStatus, PoolStatusUpdateJobFinished, PoolStatusUpdateJobFinishedContextOneOf, PoolStatusUpdateParamsPoolInfo, PoolStatusWithLiterals, PoolsQueryResult, ProgramDefinitionInfo, ProgramInfo, ProvisionPoolsForProgramRequest, ProvisionPoolsForProgramResponse, ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, ProvisionPoolsForProgramResponseTypeWithLiterals, QueryPoolsRequest, QueryPoolsResponse, RateLimitedPolicy, ReallocateBenefitApplicationErrors, ReallocateBenefitOptions, ReallocateBenefitRequest, ReallocateBenefitResponse, ReallocationDetails, RedeemBenefitRequest, RedemptionAlreadyCanceled, RedemptionCanceled, RedemptionDetails, ReleaseBenefitReservationRequest, ReleaseBenefitReservationResponse, RenewPoolsForProgramRequest, RenewPoolsForProgramResponse, ReserveBenefitRequest, ReserveBenefitResponse, RestoreInfo, RolloverConfiguration, SortOrder, SortOrderWithLiterals, Sorting, SyncResult, TimePeriod, TimePeriodWithLiterals, TransactionNotFound, 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 {
|
|
@@ -89,8 +89,9 @@ interface CheckBenefitEligibilityByFilterSignature {
|
|
|
89
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
90
|
*
|
|
91
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
|
+
* @param - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
92
93
|
*/
|
|
93
|
-
(options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId
|
|
94
|
+
(namespace: string, options?: NonNullablePaths<CheckBenefitEligibilityByFilterOptions, `count` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityByFilterResponse, `results`, 2> & {
|
|
94
95
|
__applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors;
|
|
95
96
|
}>;
|
|
96
97
|
}
|
package/build/es/index.mjs
CHANGED
|
@@ -1007,11 +1007,10 @@ async function bulkUpdatePools2(options) {
|
|
|
1007
1007
|
throw transformedError;
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
async function checkBenefitEligibilityByFilter2(options) {
|
|
1011
|
-
const { httpClient, sideEffects } = arguments[
|
|
1010
|
+
async function checkBenefitEligibilityByFilter2(namespace, options) {
|
|
1011
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1012
1012
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1013
|
-
|
|
1014
|
-
namespace: options?.namespace,
|
|
1013
|
+
namespace,
|
|
1015
1014
|
itemReference: options?.itemReference,
|
|
1016
1015
|
count: options?.count,
|
|
1017
1016
|
targetDate: options?.targetDate,
|
|
@@ -1031,18 +1030,17 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
1031
1030
|
{
|
|
1032
1031
|
spreadPathsToArguments: {},
|
|
1033
1032
|
explicitPathsToArguments: {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
poolSelector: "$[0].poolSelector"
|
|
1033
|
+
namespace: "$[0]",
|
|
1034
|
+
itemReference: "$[1].itemReference",
|
|
1035
|
+
count: "$[1].count",
|
|
1036
|
+
targetDate: "$[1].targetDate",
|
|
1037
|
+
beneficiary: "$[1].beneficiary",
|
|
1038
|
+
additionalData: "$[1].additionalData",
|
|
1039
|
+
poolSelector: "$[1].poolSelector"
|
|
1042
1040
|
},
|
|
1043
1041
|
singleArgumentUnchanged: false
|
|
1044
1042
|
},
|
|
1045
|
-
["options"]
|
|
1043
|
+
["namespace", "options"]
|
|
1046
1044
|
);
|
|
1047
1045
|
sideEffects?.onError?.(err);
|
|
1048
1046
|
throw transformedError;
|
|
@@ -1135,7 +1133,8 @@ function bulkUpdatePools3(httpClient) {
|
|
|
1135
1133
|
);
|
|
1136
1134
|
}
|
|
1137
1135
|
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1138
|
-
return (options) => checkBenefitEligibilityByFilter2(
|
|
1136
|
+
return (namespace, options) => checkBenefitEligibilityByFilter2(
|
|
1137
|
+
namespace,
|
|
1139
1138
|
options,
|
|
1140
1139
|
// @ts-ignore
|
|
1141
1140
|
{ httpClient }
|