@wix/auto_sdk_benefit-programs_pools 1.0.79 → 1.0.80
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 +1 -1
- package/build/cjs/index.js +61 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +88 -1
- package/build/cjs/index.typings.js +52 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +82 -2
- package/build/cjs/meta.js +41 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +60 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +88 -1
- package/build/es/index.typings.mjs +51 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +82 -2
- package/build/es/meta.mjs +40 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -3
- package/build/internal/cjs/index.js +61 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +106 -1
- package/build/internal/cjs/index.typings.js +52 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +82 -2
- package/build/internal/cjs/meta.js +41 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +20 -3
- package/build/internal/es/index.mjs +60 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +106 -1
- package/build/internal/es/index.typings.mjs +51 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +82 -2
- package/build/internal/es/meta.mjs +40 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -689,6 +689,38 @@ interface ReallocationDetails {
|
|
|
689
689
|
/** Beneficiary of the entitlement */
|
|
690
690
|
beneficiary?: CommonIdentificationData;
|
|
691
691
|
}
|
|
692
|
+
interface RedemptionCanceled {
|
|
693
|
+
/** Pool which the canceled redemption belongs to */
|
|
694
|
+
pool?: Pool;
|
|
695
|
+
/** Details of the cancellation */
|
|
696
|
+
cancellationDetails?: CancellationDetails;
|
|
697
|
+
}
|
|
698
|
+
interface CancellationDetails {
|
|
699
|
+
/**
|
|
700
|
+
* Id of the cancellation transaction. This is the terminal transaction of the chain
|
|
701
|
+
* @format GUID
|
|
702
|
+
*/
|
|
703
|
+
transactionId?: string;
|
|
704
|
+
/**
|
|
705
|
+
* Id of the transaction superseded by the cancellation
|
|
706
|
+
* @format GUID
|
|
707
|
+
*/
|
|
708
|
+
previousTransactionId?: string;
|
|
709
|
+
/** Reference of the item whose redemption was canceled */
|
|
710
|
+
itemReference?: ItemReference;
|
|
711
|
+
/**
|
|
712
|
+
* Number of items that were redeemed
|
|
713
|
+
* @min 1
|
|
714
|
+
*/
|
|
715
|
+
itemCount?: number;
|
|
716
|
+
/**
|
|
717
|
+
* Idempotency key of the cancellation request
|
|
718
|
+
* @maxLength 200
|
|
719
|
+
*/
|
|
720
|
+
idempotencyKey?: string;
|
|
721
|
+
/** Beneficiary of the entitlement */
|
|
722
|
+
beneficiary?: CommonIdentificationData;
|
|
723
|
+
}
|
|
692
724
|
interface PoolPaused {
|
|
693
725
|
/** Pool which has been paused */
|
|
694
726
|
pool?: Pool;
|
|
@@ -1293,6 +1325,27 @@ interface AlreadyExecuted {
|
|
|
1293
1325
|
*/
|
|
1294
1326
|
idempotencyKey?: string;
|
|
1295
1327
|
}
|
|
1328
|
+
interface CancelRedemptionRequest {
|
|
1329
|
+
/**
|
|
1330
|
+
* ID of the latest transaction in the redemption's transaction chain.
|
|
1331
|
+
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
1332
|
+
* @format GUID
|
|
1333
|
+
*/
|
|
1334
|
+
transactionId: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* Unique identifier, generated by the client.
|
|
1337
|
+
* Used to recognize repeated attempts to make the same request.
|
|
1338
|
+
* @maxLength 200
|
|
1339
|
+
*/
|
|
1340
|
+
idempotencyKey: string;
|
|
1341
|
+
}
|
|
1342
|
+
interface CancelRedemptionResponse {
|
|
1343
|
+
/**
|
|
1344
|
+
* ID of the cancellation transaction. This is the terminal transaction of the chain.
|
|
1345
|
+
* @format GUID
|
|
1346
|
+
*/
|
|
1347
|
+
transactionId?: string;
|
|
1348
|
+
}
|
|
1296
1349
|
interface ReserveBenefitRequest {
|
|
1297
1350
|
/**
|
|
1298
1351
|
* Id of the pool that is being redeemed from
|
|
@@ -2159,6 +2212,32 @@ type ReallocateBenefitApplicationErrors = {
|
|
|
2159
2212
|
data?: AlreadyExecuted;
|
|
2160
2213
|
};
|
|
2161
2214
|
/** @docsIgnore */
|
|
2215
|
+
type CancelRedemptionApplicationErrors = {
|
|
2216
|
+
code?: 'TRANSACTION_NOT_FOUND';
|
|
2217
|
+
description?: string;
|
|
2218
|
+
data?: TransactionNotFound;
|
|
2219
|
+
} | {
|
|
2220
|
+
code?: 'NOT_LATEST_TRANSACTION';
|
|
2221
|
+
description?: string;
|
|
2222
|
+
data?: NotLatestTransaction;
|
|
2223
|
+
} | {
|
|
2224
|
+
code?: 'REDEMPTION_ALREADY_CANCELED';
|
|
2225
|
+
description?: string;
|
|
2226
|
+
data?: RedemptionAlreadyCanceled;
|
|
2227
|
+
} | {
|
|
2228
|
+
code?: 'TRANSACTION_NOT_CANCELABLE';
|
|
2229
|
+
description?: string;
|
|
2230
|
+
data?: Record<string, any>;
|
|
2231
|
+
} | {
|
|
2232
|
+
code?: 'CHAIN_OPERATION_IN_PROGRESS';
|
|
2233
|
+
description?: string;
|
|
2234
|
+
data?: ChainOperationInProgress;
|
|
2235
|
+
} | {
|
|
2236
|
+
code?: 'ALREADY_EXECUTED';
|
|
2237
|
+
description?: string;
|
|
2238
|
+
data?: AlreadyExecuted;
|
|
2239
|
+
};
|
|
2240
|
+
/** @docsIgnore */
|
|
2162
2241
|
type GetEligibleBenefitsApplicationErrors = {
|
|
2163
2242
|
code?: 'INVALID_ITEM_REFERENCE';
|
|
2164
2243
|
description?: string;
|
|
@@ -2602,6 +2681,32 @@ interface ReallocateBenefitOptions {
|
|
|
2602
2681
|
*/
|
|
2603
2682
|
namespace: string;
|
|
2604
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Cancels a redemption, crediting the redeemed amount back to the pool's available balance.
|
|
2686
|
+
*
|
|
2687
|
+
* The cancellation is recorded as a new transaction that supersedes the specified transaction and terminates the redemption's transaction chain.
|
|
2688
|
+
* The specified transaction must be the latest transaction in the chain. The credited amount is always the amount of the original redemption, regardless of any reallocations in between.
|
|
2689
|
+
* @param transactionId - ID of the latest transaction in the redemption's transaction chain.
|
|
2690
|
+
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
2691
|
+
* @internal
|
|
2692
|
+
* @documentationMaturity preview
|
|
2693
|
+
* @requiredField options
|
|
2694
|
+
* @requiredField options.idempotencyKey
|
|
2695
|
+
* @requiredField transactionId
|
|
2696
|
+
* @permissionId benefit_programs:v1:pool:cancel_redemption
|
|
2697
|
+
* @fqn wix.benefit_programs.v1.pool.PoolService.CancelRedemption
|
|
2698
|
+
*/
|
|
2699
|
+
declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 2>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 2> & {
|
|
2700
|
+
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
2701
|
+
}>;
|
|
2702
|
+
interface CancelRedemptionOptions {
|
|
2703
|
+
/**
|
|
2704
|
+
* Unique identifier, generated by the client.
|
|
2705
|
+
* Used to recognize repeated attempts to make the same request.
|
|
2706
|
+
* @maxLength 200
|
|
2707
|
+
*/
|
|
2708
|
+
idempotencyKey: string;
|
|
2709
|
+
}
|
|
2605
2710
|
/**
|
|
2606
2711
|
* Checks if a benefit can currently be redeemed.
|
|
2607
2712
|
*
|
|
@@ -2831,4 +2936,4 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2831
2936
|
poolSelector?: PoolSelector;
|
|
2832
2937
|
}
|
|
2833
2938
|
|
|
2834
|
-
export { type AccountInfo, type ActionEvent, type AlreadyExecuted, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, type BenefitReallocated, type BenefitRedeemed, type BenefitReservationCanceled, type BenefitReservationReleased, type BenefitReserved, type BenefitResult, type BenefitResultResultOneOf, BenefitResultType, type BenefitResultTypeWithLiterals, type BenefitSelector, type BulkActionMetadata, type BulkCheckBenefitEligibilityOptions, type BulkCheckBenefitEligibilityRequest, type BulkCheckBenefitEligibilityResponse, type BulkEligibilityCheckResult, type BulkPoolResult, type BulkUpdatePoolsOptions, type BulkUpdatePoolsRequest, type BulkUpdatePoolsResponse, type ByPoolDefinitionIdAndProgramDefinitionIdOptions, type ByProgramIdOptions, type CancelBenefitReservationRequest, type CancelBenefitReservationResponse, type ChainOperationInProgress, type CheckBenefitEligibilityByFilterApplicationErrors, type CheckBenefitEligibilityByFilterOptions, type CheckBenefitEligibilityByFilterRequest, type CheckBenefitEligibilityByFilterResponse, type CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CountNumberOfPoolsInProvisioningStatusRequest, type CountNumberOfPoolsInProvisioningStatusResponse, type CreatePoolRequest, type CreatePoolResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolRequest, type DeletePoolResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EligibilityCheckResult, type EligibleBenefit, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailureDetails, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, Intent, type IntentWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type MaskedPool, type MessageEnvelope, type NotEnoughBalance, type NotLatestTransaction, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionEvaluatedToFalse, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type Pool, type PoolDefinitionAndProgramDefinition, type PoolDefinitionLookupId, type PoolDefinitionLookupIdIdOneOf, type PoolEnded, type PoolFilter, type PoolInfo, type PoolNotActive, type PoolNotFound, PoolOrigin, type PoolOriginWithLiterals, type PoolPaused, type PoolProgramInfo, type PoolProvisionJobFinished, type PoolProvisioned, type PoolQuery, type PoolQuerySpec, type PoolRenewalAction, type PoolRenewalActionActionOneOf, PoolRenewalActionType, type PoolRenewalActionTypeWithLiterals, type PoolRenewed, type PoolResumed, type PoolSelector, PoolSelectorType, type PoolSelectorTypeWithLiterals, PoolStatus, type PoolStatusUpdateJobFinished, type PoolStatusUpdateJobFinishedContextOneOf, type PoolStatusUpdateParamsPoolInfo, type PoolStatusWithLiterals, type PoolsQueryBuilder, type PoolsQueryResult, type ProgramDefinitionInfo, type ProgramInfo, type ProvisionPoolsForProgramRequest, type ProvisionPoolsForProgramResponse, type ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, type ProvisionPoolsForProgramResponseTypeWithLiterals, type QueryPoolsOptions, type QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type ReallocateBenefitApplicationErrors, type ReallocateBenefitOptions, type ReallocateBenefitRequest, type ReallocateBenefitResponse, type ReallocationDetails, type RedeemBenefitApplicationErrors, type RedeemBenefitOptions, type RedeemBenefitRequest, type RedeemBenefitResponse, type RedemptionAlreadyCanceled, type RedemptionDetails, type ReleaseBenefitReservationRequest, type ReleaseBenefitReservationResponse, type RenewPoolsForProgramRequest, type RenewPoolsForProgramResponse, type ReserveBenefitRequest, type ReserveBenefitResponse, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncResult, TimePeriod, type TimePeriodWithLiterals, type TransactionNotFound, Type, type TypeWithLiterals, type Update, type UpdatePool, type UpdatePoolRequest, type UpdatePoolResponse, type UpdatePoolStatusRequest, type UpdatePoolStatusRequestPoolSelectorOneOf, type UpdatePoolStatusResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, reallocateBenefit, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
2939
|
+
export { type AccountInfo, type ActionEvent, type AlreadyExecuted, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, type BenefitReallocated, type BenefitRedeemed, type BenefitReservationCanceled, type BenefitReservationReleased, type BenefitReserved, type BenefitResult, type BenefitResultResultOneOf, BenefitResultType, type BenefitResultTypeWithLiterals, type BenefitSelector, type BulkActionMetadata, type BulkCheckBenefitEligibilityOptions, type BulkCheckBenefitEligibilityRequest, type BulkCheckBenefitEligibilityResponse, type BulkEligibilityCheckResult, type BulkPoolResult, type BulkUpdatePoolsOptions, type BulkUpdatePoolsRequest, type BulkUpdatePoolsResponse, type ByPoolDefinitionIdAndProgramDefinitionIdOptions, type ByProgramIdOptions, type CancelBenefitReservationRequest, type CancelBenefitReservationResponse, type CancelRedemptionApplicationErrors, type CancelRedemptionOptions, type CancelRedemptionRequest, type CancelRedemptionResponse, type CancellationDetails, type ChainOperationInProgress, type CheckBenefitEligibilityByFilterApplicationErrors, type CheckBenefitEligibilityByFilterOptions, type CheckBenefitEligibilityByFilterRequest, type CheckBenefitEligibilityByFilterResponse, type CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CountNumberOfPoolsInProvisioningStatusRequest, type CountNumberOfPoolsInProvisioningStatusResponse, type CreatePoolRequest, type CreatePoolResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolRequest, type DeletePoolResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EligibilityCheckResult, type EligibleBenefit, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailureDetails, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, Intent, type IntentWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type MaskedPool, type MessageEnvelope, type NotEnoughBalance, type NotLatestTransaction, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionEvaluatedToFalse, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type Pool, type PoolDefinitionAndProgramDefinition, type PoolDefinitionLookupId, type PoolDefinitionLookupIdIdOneOf, type PoolEnded, type PoolFilter, type PoolInfo, type PoolNotActive, type PoolNotFound, PoolOrigin, type PoolOriginWithLiterals, type PoolPaused, type PoolProgramInfo, type PoolProvisionJobFinished, type PoolProvisioned, type PoolQuery, type PoolQuerySpec, type PoolRenewalAction, type PoolRenewalActionActionOneOf, PoolRenewalActionType, type PoolRenewalActionTypeWithLiterals, type PoolRenewed, type PoolResumed, type PoolSelector, PoolSelectorType, type PoolSelectorTypeWithLiterals, PoolStatus, type PoolStatusUpdateJobFinished, type PoolStatusUpdateJobFinishedContextOneOf, type PoolStatusUpdateParamsPoolInfo, type PoolStatusWithLiterals, type PoolsQueryBuilder, type PoolsQueryResult, type ProgramDefinitionInfo, type ProgramInfo, type ProvisionPoolsForProgramRequest, type ProvisionPoolsForProgramResponse, type ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, type ProvisionPoolsForProgramResponseTypeWithLiterals, type QueryPoolsOptions, type QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type ReallocateBenefitApplicationErrors, type ReallocateBenefitOptions, type ReallocateBenefitRequest, type ReallocateBenefitResponse, type ReallocationDetails, type RedeemBenefitApplicationErrors, type RedeemBenefitOptions, type RedeemBenefitRequest, type RedeemBenefitResponse, type RedemptionAlreadyCanceled, type RedemptionCanceled, type RedemptionDetails, type ReleaseBenefitReservationRequest, type ReleaseBenefitReservationResponse, type RenewPoolsForProgramRequest, type RenewPoolsForProgramResponse, type ReserveBenefitRequest, type ReserveBenefitResponse, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncResult, TimePeriod, type TimePeriodWithLiterals, type TransactionNotFound, Type, type TypeWithLiterals, type Update, type UpdatePool, type UpdatePoolRequest, type UpdatePoolResponse, type UpdatePoolStatusRequest, type UpdatePoolStatusRequestPoolSelectorOneOf, type UpdatePoolStatusResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, bulkCheckBenefitEligibility, bulkUpdatePools, cancelRedemption, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, reallocateBenefit, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
@@ -36,6 +36,7 @@ __export(index_typings_exports, {
|
|
|
36
36
|
WeekDay: () => WeekDay,
|
|
37
37
|
bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility2,
|
|
38
38
|
bulkUpdatePools: () => bulkUpdatePools2,
|
|
39
|
+
cancelRedemption: () => cancelRedemption2,
|
|
39
40
|
checkBenefitEligibility: () => checkBenefitEligibility2,
|
|
40
41
|
checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter2,
|
|
41
42
|
getEligibleBenefits: () => getEligibleBenefits2,
|
|
@@ -411,6 +412,27 @@ function reallocateBenefit(payload) {
|
|
|
411
412
|
}
|
|
412
413
|
return __reallocateBenefit;
|
|
413
414
|
}
|
|
415
|
+
function cancelRedemption(payload) {
|
|
416
|
+
function __cancelRedemption({ host }) {
|
|
417
|
+
const metadata = {
|
|
418
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
419
|
+
method: "POST",
|
|
420
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CancelRedemption",
|
|
421
|
+
packageName: PACKAGE_NAME,
|
|
422
|
+
migrationOptions: {
|
|
423
|
+
optInTransformResponse: true
|
|
424
|
+
},
|
|
425
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
426
|
+
protoPath: "/v1/benefits/cancel-redemption",
|
|
427
|
+
data: payload,
|
|
428
|
+
host
|
|
429
|
+
}),
|
|
430
|
+
data: payload
|
|
431
|
+
};
|
|
432
|
+
return metadata;
|
|
433
|
+
}
|
|
434
|
+
return __cancelRedemption;
|
|
435
|
+
}
|
|
414
436
|
function checkBenefitEligibility(payload) {
|
|
415
437
|
function __checkBenefitEligibility({ host }) {
|
|
416
438
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -865,6 +887,35 @@ async function reallocateBenefit2(transactionId, options) {
|
|
|
865
887
|
throw transformedError;
|
|
866
888
|
}
|
|
867
889
|
}
|
|
890
|
+
async function cancelRedemption2(transactionId, options) {
|
|
891
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
892
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
893
|
+
transactionId,
|
|
894
|
+
idempotencyKey: options?.idempotencyKey
|
|
895
|
+
});
|
|
896
|
+
const reqOpts = cancelRedemption(payload);
|
|
897
|
+
sideEffects?.onSiteCall?.();
|
|
898
|
+
try {
|
|
899
|
+
const result = await httpClient.request(reqOpts);
|
|
900
|
+
sideEffects?.onSuccess?.(result);
|
|
901
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
902
|
+
} catch (err) {
|
|
903
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
904
|
+
err,
|
|
905
|
+
{
|
|
906
|
+
spreadPathsToArguments: {},
|
|
907
|
+
explicitPathsToArguments: {
|
|
908
|
+
transactionId: "$[0]",
|
|
909
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
910
|
+
},
|
|
911
|
+
singleArgumentUnchanged: false
|
|
912
|
+
},
|
|
913
|
+
["transactionId", "options"]
|
|
914
|
+
);
|
|
915
|
+
sideEffects?.onError?.(err);
|
|
916
|
+
throw transformedError;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
868
919
|
async function checkBenefitEligibility2(poolId, options) {
|
|
869
920
|
const { httpClient, sideEffects } = arguments[2];
|
|
870
921
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1064,6 +1115,7 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
1064
1115
|
WeekDay,
|
|
1065
1116
|
bulkCheckBenefitEligibility,
|
|
1066
1117
|
bulkUpdatePools,
|
|
1118
|
+
cancelRedemption,
|
|
1067
1119
|
checkBenefitEligibility,
|
|
1068
1120
|
checkBenefitEligibilityByFilter,
|
|
1069
1121
|
getEligibleBenefits,
|