@wix/auto_sdk_benefit-programs_pools 1.0.78 → 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 +134 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +246 -1
- package/build/cjs/index.typings.js +116 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +223 -2
- package/build/cjs/meta.js +88 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +132 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +246 -1
- package/build/es/index.typings.mjs +114 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +223 -2
- package/build/es/meta.mjs +86 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +37 -3
- package/build/internal/cjs/index.js +134 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +283 -1
- package/build/internal/cjs/index.typings.js +116 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +223 -2
- package/build/internal/cjs/meta.js +88 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +37 -3
- package/build/internal/es/index.mjs +132 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +283 -1
- package/build/internal/es/index.typings.mjs +114 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +223 -2
- package/build/internal/es/meta.mjs +86 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityByFilterApplicationErrors, 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, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, 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, 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, PoolSelector, PoolSelectorType, PoolSelectorTypeWithLiterals, PoolStatus, PoolStatusUpdateJobFinished, PoolStatusUpdateJobFinishedContextOneOf, PoolStatusUpdateParamsPoolInfo, PoolStatusWithLiterals, 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';
|
|
2
|
+
import { Pool, UpdatePool, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, ReallocateBenefitOptions, ReallocateBenefitResponse, ReallocateBenefitApplicationErrors, CancelRedemptionOptions, CancelRedemptionResponse, CancelRedemptionApplicationErrors, 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, CancelRedemptionRequest, 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, PoolFilter, 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, ReallocateBenefitRequest, 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 {
|
|
@@ -38,6 +38,36 @@ interface RedeemBenefitSignature {
|
|
|
38
38
|
__applicationErrorsType?: RedeemBenefitApplicationErrors;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
41
|
+
/** @internal */
|
|
42
|
+
declare function reallocateBenefit$1(httpClient: HttpClient): ReallocateBenefitSignature;
|
|
43
|
+
interface ReallocateBenefitSignature {
|
|
44
|
+
/**
|
|
45
|
+
* Reallocates a redeemed benefit to a new target date.
|
|
46
|
+
*
|
|
47
|
+
* The reallocation is recorded as a new zero-amount transaction that supersedes the specified transaction in the redemption's transaction chain.
|
|
48
|
+
* The specified transaction must be the latest transaction in the chain. The item, count and benefit key are carried over from the original redemption; only the target date changes.
|
|
49
|
+
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
50
|
+
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
51
|
+
*/
|
|
52
|
+
(transactionId: string, options?: NonNullablePaths<ReallocateBenefitOptions, `idempotencyKey` | `namespace` | `targetDate`, 2>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 2> & {
|
|
53
|
+
__applicationErrorsType?: ReallocateBenefitApplicationErrors;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
declare function cancelRedemption$1(httpClient: HttpClient): CancelRedemptionSignature;
|
|
58
|
+
interface CancelRedemptionSignature {
|
|
59
|
+
/**
|
|
60
|
+
* Cancels a redemption, crediting the redeemed amount back to the pool's available balance.
|
|
61
|
+
*
|
|
62
|
+
* The cancellation is recorded as a new transaction that supersedes the specified transaction and terminates the redemption's transaction chain.
|
|
63
|
+
* 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.
|
|
64
|
+
* @param - ID of the latest transaction in the redemption's transaction chain.
|
|
65
|
+
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
66
|
+
*/
|
|
67
|
+
(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 2>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 2> & {
|
|
68
|
+
__applicationErrorsType?: CancelRedemptionApplicationErrors;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
41
71
|
declare function checkBenefitEligibility$1(httpClient: HttpClient): CheckBenefitEligibilitySignature;
|
|
42
72
|
interface CheckBenefitEligibilitySignature {
|
|
43
73
|
/**
|
|
@@ -102,6 +132,10 @@ declare function customQueryPools(httpClient: HttpClient): {
|
|
|
102
132
|
declare const getPool: MaybeContext<BuildRESTFunction<typeof getPool$1> & typeof getPool$1>;
|
|
103
133
|
declare const updatePool: MaybeContext<BuildRESTFunction<typeof updatePool$1> & typeof updatePool$1>;
|
|
104
134
|
declare const redeemBenefit: MaybeContext<BuildRESTFunction<typeof redeemBenefit$1> & typeof redeemBenefit$1>;
|
|
135
|
+
/** @internal */
|
|
136
|
+
declare const reallocateBenefit: MaybeContext<BuildRESTFunction<typeof reallocateBenefit$1> & typeof reallocateBenefit$1>;
|
|
137
|
+
/** @internal */
|
|
138
|
+
declare const cancelRedemption: MaybeContext<BuildRESTFunction<typeof cancelRedemption$1> & typeof cancelRedemption$1>;
|
|
105
139
|
declare const checkBenefitEligibility: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibility$1> & typeof checkBenefitEligibility$1>;
|
|
106
140
|
declare const bulkCheckBenefitEligibility: MaybeContext<BuildRESTFunction<typeof bulkCheckBenefitEligibility$1> & typeof bulkCheckBenefitEligibility$1>;
|
|
107
141
|
declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getEligibleBenefits$1> & typeof getEligibleBenefits$1>;
|
|
@@ -109,4 +143,4 @@ declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdateP
|
|
|
109
143
|
declare const checkBenefitEligibilityByFilter: MaybeContext<BuildRESTFunction<typeof checkBenefitEligibilityByFilter$1> & typeof checkBenefitEligibilityByFilter$1>;
|
|
110
144
|
declare const queryPools: MaybeContext<BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools>;
|
|
111
145
|
|
|
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 };
|
|
146
|
+
export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CancelRedemptionApplicationErrors, CancelRedemptionOptions, CancelRedemptionResponse, CheckBenefitEligibilityByFilterApplicationErrors, CheckBenefitEligibilityByFilterOptions, CheckBenefitEligibilityByFilterResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolQuery, PoolsQueryBuilder, QueryPoolsOptions, ReallocateBenefitApplicationErrors, ReallocateBenefitOptions, ReallocateBenefitResponse, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, cancelRedemption, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, reallocateBenefit, redeemBenefit, updatePool };
|
|
@@ -336,6 +336,54 @@ function redeemBenefit(payload) {
|
|
|
336
336
|
}
|
|
337
337
|
return __redeemBenefit;
|
|
338
338
|
}
|
|
339
|
+
function reallocateBenefit(payload) {
|
|
340
|
+
function __reallocateBenefit({ host }) {
|
|
341
|
+
const serializedData = transformPaths(payload, [
|
|
342
|
+
{
|
|
343
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
344
|
+
paths: [{ path: "targetDate" }]
|
|
345
|
+
}
|
|
346
|
+
]);
|
|
347
|
+
const metadata = {
|
|
348
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
349
|
+
method: "POST",
|
|
350
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit",
|
|
351
|
+
packageName: PACKAGE_NAME,
|
|
352
|
+
migrationOptions: {
|
|
353
|
+
optInTransformResponse: true
|
|
354
|
+
},
|
|
355
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
356
|
+
protoPath: "/v1/benefits/reallocate",
|
|
357
|
+
data: serializedData,
|
|
358
|
+
host
|
|
359
|
+
}),
|
|
360
|
+
data: serializedData
|
|
361
|
+
};
|
|
362
|
+
return metadata;
|
|
363
|
+
}
|
|
364
|
+
return __reallocateBenefit;
|
|
365
|
+
}
|
|
366
|
+
function cancelRedemption(payload) {
|
|
367
|
+
function __cancelRedemption({ host }) {
|
|
368
|
+
const metadata = {
|
|
369
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
370
|
+
method: "POST",
|
|
371
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CancelRedemption",
|
|
372
|
+
packageName: PACKAGE_NAME,
|
|
373
|
+
migrationOptions: {
|
|
374
|
+
optInTransformResponse: true
|
|
375
|
+
},
|
|
376
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
377
|
+
protoPath: "/v1/benefits/cancel-redemption",
|
|
378
|
+
data: payload,
|
|
379
|
+
host
|
|
380
|
+
}),
|
|
381
|
+
data: payload
|
|
382
|
+
};
|
|
383
|
+
return metadata;
|
|
384
|
+
}
|
|
385
|
+
return __cancelRedemption;
|
|
386
|
+
}
|
|
339
387
|
function checkBenefitEligibility(payload) {
|
|
340
388
|
function __checkBenefitEligibility({ host }) {
|
|
341
389
|
const serializedData = transformPaths(payload, [
|
|
@@ -755,6 +803,70 @@ async function redeemBenefit2(poolId, options) {
|
|
|
755
803
|
throw transformedError;
|
|
756
804
|
}
|
|
757
805
|
}
|
|
806
|
+
async function reallocateBenefit2(transactionId, options) {
|
|
807
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
808
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
809
|
+
transactionId,
|
|
810
|
+
targetDate: options?.targetDate,
|
|
811
|
+
idempotencyKey: options?.idempotencyKey,
|
|
812
|
+
beneficiary: options?.beneficiary,
|
|
813
|
+
namespace: options?.namespace
|
|
814
|
+
});
|
|
815
|
+
const reqOpts = reallocateBenefit(payload);
|
|
816
|
+
sideEffects?.onSiteCall?.();
|
|
817
|
+
try {
|
|
818
|
+
const result = await httpClient.request(reqOpts);
|
|
819
|
+
sideEffects?.onSuccess?.(result);
|
|
820
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
821
|
+
} catch (err) {
|
|
822
|
+
const transformedError = sdkTransformError(
|
|
823
|
+
err,
|
|
824
|
+
{
|
|
825
|
+
spreadPathsToArguments: {},
|
|
826
|
+
explicitPathsToArguments: {
|
|
827
|
+
transactionId: "$[0]",
|
|
828
|
+
targetDate: "$[1].targetDate",
|
|
829
|
+
idempotencyKey: "$[1].idempotencyKey",
|
|
830
|
+
beneficiary: "$[1].beneficiary",
|
|
831
|
+
namespace: "$[1].namespace"
|
|
832
|
+
},
|
|
833
|
+
singleArgumentUnchanged: false
|
|
834
|
+
},
|
|
835
|
+
["transactionId", "options"]
|
|
836
|
+
);
|
|
837
|
+
sideEffects?.onError?.(err);
|
|
838
|
+
throw transformedError;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
async function cancelRedemption2(transactionId, options) {
|
|
842
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
843
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
844
|
+
transactionId,
|
|
845
|
+
idempotencyKey: options?.idempotencyKey
|
|
846
|
+
});
|
|
847
|
+
const reqOpts = cancelRedemption(payload);
|
|
848
|
+
sideEffects?.onSiteCall?.();
|
|
849
|
+
try {
|
|
850
|
+
const result = await httpClient.request(reqOpts);
|
|
851
|
+
sideEffects?.onSuccess?.(result);
|
|
852
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
853
|
+
} catch (err) {
|
|
854
|
+
const transformedError = sdkTransformError(
|
|
855
|
+
err,
|
|
856
|
+
{
|
|
857
|
+
spreadPathsToArguments: {},
|
|
858
|
+
explicitPathsToArguments: {
|
|
859
|
+
transactionId: "$[0]",
|
|
860
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
861
|
+
},
|
|
862
|
+
singleArgumentUnchanged: false
|
|
863
|
+
},
|
|
864
|
+
["transactionId", "options"]
|
|
865
|
+
);
|
|
866
|
+
sideEffects?.onError?.(err);
|
|
867
|
+
throw transformedError;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
758
870
|
async function checkBenefitEligibility2(poolId, options) {
|
|
759
871
|
const { httpClient, sideEffects } = arguments[2];
|
|
760
872
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -976,6 +1088,22 @@ function redeemBenefit3(httpClient) {
|
|
|
976
1088
|
{ httpClient }
|
|
977
1089
|
);
|
|
978
1090
|
}
|
|
1091
|
+
function reallocateBenefit3(httpClient) {
|
|
1092
|
+
return (transactionId, options) => reallocateBenefit2(
|
|
1093
|
+
transactionId,
|
|
1094
|
+
options,
|
|
1095
|
+
// @ts-ignore
|
|
1096
|
+
{ httpClient }
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function cancelRedemption3(httpClient) {
|
|
1100
|
+
return (transactionId, options) => cancelRedemption2(
|
|
1101
|
+
transactionId,
|
|
1102
|
+
options,
|
|
1103
|
+
// @ts-ignore
|
|
1104
|
+
{ httpClient }
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
979
1107
|
function checkBenefitEligibility3(httpClient) {
|
|
980
1108
|
return (poolId, options) => checkBenefitEligibility2(
|
|
981
1109
|
poolId,
|
|
@@ -1031,6 +1159,8 @@ function customQueryPools(httpClient) {
|
|
|
1031
1159
|
var getPool4 = /* @__PURE__ */ createRESTModule(getPool3);
|
|
1032
1160
|
var updatePool4 = /* @__PURE__ */ createRESTModule(updatePool3);
|
|
1033
1161
|
var redeemBenefit4 = /* @__PURE__ */ createRESTModule(redeemBenefit3);
|
|
1162
|
+
var reallocateBenefit4 = /* @__PURE__ */ createRESTModule(reallocateBenefit3);
|
|
1163
|
+
var cancelRedemption4 = /* @__PURE__ */ createRESTModule(cancelRedemption3);
|
|
1034
1164
|
var checkBenefitEligibility4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibility3);
|
|
1035
1165
|
var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBenefitEligibility3);
|
|
1036
1166
|
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
@@ -1054,11 +1184,13 @@ export {
|
|
|
1054
1184
|
WeekDay,
|
|
1055
1185
|
bulkCheckBenefitEligibility4 as bulkCheckBenefitEligibility,
|
|
1056
1186
|
bulkUpdatePools4 as bulkUpdatePools,
|
|
1187
|
+
cancelRedemption4 as cancelRedemption,
|
|
1057
1188
|
checkBenefitEligibility4 as checkBenefitEligibility,
|
|
1058
1189
|
checkBenefitEligibilityByFilter4 as checkBenefitEligibilityByFilter,
|
|
1059
1190
|
getEligibleBenefits4 as getEligibleBenefits,
|
|
1060
1191
|
getPool4 as getPool,
|
|
1061
1192
|
queryPools4 as queryPools,
|
|
1193
|
+
reallocateBenefit4 as reallocateBenefit,
|
|
1062
1194
|
redeemBenefit4 as redeemBenefit,
|
|
1063
1195
|
updatePool4 as updatePool,
|
|
1064
1196
|
utils
|