@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.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, 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.js';
|
|
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.js';
|
|
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.js';
|
|
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 };
|
|
@@ -36,11 +36,13 @@ __export(index_exports, {
|
|
|
36
36
|
WeekDay: () => WeekDay,
|
|
37
37
|
bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility4,
|
|
38
38
|
bulkUpdatePools: () => bulkUpdatePools4,
|
|
39
|
+
cancelRedemption: () => cancelRedemption4,
|
|
39
40
|
checkBenefitEligibility: () => checkBenefitEligibility4,
|
|
40
41
|
checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter4,
|
|
41
42
|
getEligibleBenefits: () => getEligibleBenefits4,
|
|
42
43
|
getPool: () => getPool4,
|
|
43
44
|
queryPools: () => queryPools4,
|
|
45
|
+
reallocateBenefit: () => reallocateBenefit4,
|
|
44
46
|
redeemBenefit: () => redeemBenefit4,
|
|
45
47
|
updatePool: () => updatePool4,
|
|
46
48
|
utils: () => utils
|
|
@@ -382,6 +384,54 @@ function redeemBenefit(payload) {
|
|
|
382
384
|
}
|
|
383
385
|
return __redeemBenefit;
|
|
384
386
|
}
|
|
387
|
+
function reallocateBenefit(payload) {
|
|
388
|
+
function __reallocateBenefit({ host }) {
|
|
389
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
390
|
+
{
|
|
391
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
392
|
+
paths: [{ path: "targetDate" }]
|
|
393
|
+
}
|
|
394
|
+
]);
|
|
395
|
+
const metadata = {
|
|
396
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
397
|
+
method: "POST",
|
|
398
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit",
|
|
399
|
+
packageName: PACKAGE_NAME,
|
|
400
|
+
migrationOptions: {
|
|
401
|
+
optInTransformResponse: true
|
|
402
|
+
},
|
|
403
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
404
|
+
protoPath: "/v1/benefits/reallocate",
|
|
405
|
+
data: serializedData,
|
|
406
|
+
host
|
|
407
|
+
}),
|
|
408
|
+
data: serializedData
|
|
409
|
+
};
|
|
410
|
+
return metadata;
|
|
411
|
+
}
|
|
412
|
+
return __reallocateBenefit;
|
|
413
|
+
}
|
|
414
|
+
function cancelRedemption(payload) {
|
|
415
|
+
function __cancelRedemption({ host }) {
|
|
416
|
+
const metadata = {
|
|
417
|
+
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
418
|
+
method: "POST",
|
|
419
|
+
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CancelRedemption",
|
|
420
|
+
packageName: PACKAGE_NAME,
|
|
421
|
+
migrationOptions: {
|
|
422
|
+
optInTransformResponse: true
|
|
423
|
+
},
|
|
424
|
+
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
425
|
+
protoPath: "/v1/benefits/cancel-redemption",
|
|
426
|
+
data: payload,
|
|
427
|
+
host
|
|
428
|
+
}),
|
|
429
|
+
data: payload
|
|
430
|
+
};
|
|
431
|
+
return metadata;
|
|
432
|
+
}
|
|
433
|
+
return __cancelRedemption;
|
|
434
|
+
}
|
|
385
435
|
function checkBenefitEligibility(payload) {
|
|
386
436
|
function __checkBenefitEligibility({ host }) {
|
|
387
437
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -801,6 +851,70 @@ async function redeemBenefit2(poolId, options) {
|
|
|
801
851
|
throw transformedError;
|
|
802
852
|
}
|
|
803
853
|
}
|
|
854
|
+
async function reallocateBenefit2(transactionId, options) {
|
|
855
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
856
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
857
|
+
transactionId,
|
|
858
|
+
targetDate: options?.targetDate,
|
|
859
|
+
idempotencyKey: options?.idempotencyKey,
|
|
860
|
+
beneficiary: options?.beneficiary,
|
|
861
|
+
namespace: options?.namespace
|
|
862
|
+
});
|
|
863
|
+
const reqOpts = reallocateBenefit(payload);
|
|
864
|
+
sideEffects?.onSiteCall?.();
|
|
865
|
+
try {
|
|
866
|
+
const result = await httpClient.request(reqOpts);
|
|
867
|
+
sideEffects?.onSuccess?.(result);
|
|
868
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
869
|
+
} catch (err) {
|
|
870
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
871
|
+
err,
|
|
872
|
+
{
|
|
873
|
+
spreadPathsToArguments: {},
|
|
874
|
+
explicitPathsToArguments: {
|
|
875
|
+
transactionId: "$[0]",
|
|
876
|
+
targetDate: "$[1].targetDate",
|
|
877
|
+
idempotencyKey: "$[1].idempotencyKey",
|
|
878
|
+
beneficiary: "$[1].beneficiary",
|
|
879
|
+
namespace: "$[1].namespace"
|
|
880
|
+
},
|
|
881
|
+
singleArgumentUnchanged: false
|
|
882
|
+
},
|
|
883
|
+
["transactionId", "options"]
|
|
884
|
+
);
|
|
885
|
+
sideEffects?.onError?.(err);
|
|
886
|
+
throw transformedError;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
async function cancelRedemption2(transactionId, options) {
|
|
890
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
891
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
892
|
+
transactionId,
|
|
893
|
+
idempotencyKey: options?.idempotencyKey
|
|
894
|
+
});
|
|
895
|
+
const reqOpts = cancelRedemption(payload);
|
|
896
|
+
sideEffects?.onSiteCall?.();
|
|
897
|
+
try {
|
|
898
|
+
const result = await httpClient.request(reqOpts);
|
|
899
|
+
sideEffects?.onSuccess?.(result);
|
|
900
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
901
|
+
} catch (err) {
|
|
902
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
903
|
+
err,
|
|
904
|
+
{
|
|
905
|
+
spreadPathsToArguments: {},
|
|
906
|
+
explicitPathsToArguments: {
|
|
907
|
+
transactionId: "$[0]",
|
|
908
|
+
idempotencyKey: "$[1].idempotencyKey"
|
|
909
|
+
},
|
|
910
|
+
singleArgumentUnchanged: false
|
|
911
|
+
},
|
|
912
|
+
["transactionId", "options"]
|
|
913
|
+
);
|
|
914
|
+
sideEffects?.onError?.(err);
|
|
915
|
+
throw transformedError;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
804
918
|
async function checkBenefitEligibility2(poolId, options) {
|
|
805
919
|
const { httpClient, sideEffects } = arguments[2];
|
|
806
920
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1022,6 +1136,22 @@ function redeemBenefit3(httpClient) {
|
|
|
1022
1136
|
{ httpClient }
|
|
1023
1137
|
);
|
|
1024
1138
|
}
|
|
1139
|
+
function reallocateBenefit3(httpClient) {
|
|
1140
|
+
return (transactionId, options) => reallocateBenefit2(
|
|
1141
|
+
transactionId,
|
|
1142
|
+
options,
|
|
1143
|
+
// @ts-ignore
|
|
1144
|
+
{ httpClient }
|
|
1145
|
+
);
|
|
1146
|
+
}
|
|
1147
|
+
function cancelRedemption3(httpClient) {
|
|
1148
|
+
return (transactionId, options) => cancelRedemption2(
|
|
1149
|
+
transactionId,
|
|
1150
|
+
options,
|
|
1151
|
+
// @ts-ignore
|
|
1152
|
+
{ httpClient }
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1025
1155
|
function checkBenefitEligibility3(httpClient) {
|
|
1026
1156
|
return (poolId, options) => checkBenefitEligibility2(
|
|
1027
1157
|
poolId,
|
|
@@ -1077,6 +1207,8 @@ function customQueryPools(httpClient) {
|
|
|
1077
1207
|
var getPool4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPool3);
|
|
1078
1208
|
var updatePool4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updatePool3);
|
|
1079
1209
|
var redeemBenefit4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(redeemBenefit3);
|
|
1210
|
+
var reallocateBenefit4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(reallocateBenefit3);
|
|
1211
|
+
var cancelRedemption4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cancelRedemption3);
|
|
1080
1212
|
var checkBenefitEligibility4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(checkBenefitEligibility3);
|
|
1081
1213
|
var bulkCheckBenefitEligibility4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCheckBenefitEligibility3);
|
|
1082
1214
|
var getEligibleBenefits4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getEligibleBenefits3);
|
|
@@ -1101,11 +1233,13 @@ var queryPools4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cus
|
|
|
1101
1233
|
WeekDay,
|
|
1102
1234
|
bulkCheckBenefitEligibility,
|
|
1103
1235
|
bulkUpdatePools,
|
|
1236
|
+
cancelRedemption,
|
|
1104
1237
|
checkBenefitEligibility,
|
|
1105
1238
|
checkBenefitEligibilityByFilter,
|
|
1106
1239
|
getEligibleBenefits,
|
|
1107
1240
|
getPool,
|
|
1108
1241
|
queryPools,
|
|
1242
|
+
reallocateBenefit,
|
|
1109
1243
|
redeemBenefit,
|
|
1110
1244
|
updatePool,
|
|
1111
1245
|
utils
|