@wix/auto_sdk_benefit-programs_pools 1.0.77 → 1.0.79
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 +84 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +170 -1
- package/build/cjs/index.typings.js +75 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +154 -2
- package/build/cjs/meta.js +54 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +82 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +170 -1
- package/build/es/index.typings.mjs +73 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +154 -2
- package/build/es/meta.mjs +52 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -3
- package/build/internal/cjs/index.js +84 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +203 -1
- package/build/internal/cjs/index.typings.js +75 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +161 -2
- package/build/internal/cjs/meta.js +54 -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 +82 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +203 -1
- package/build/internal/es/index.typings.mjs +73 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +161 -2
- package/build/internal/es/meta.mjs +52 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -592,6 +592,42 @@ interface ItemReference {
|
|
|
592
592
|
*/
|
|
593
593
|
providerAppId?: string;
|
|
594
594
|
}
|
|
595
|
+
interface BenefitReallocated {
|
|
596
|
+
/** Pool which the reallocated benefit belongs to */
|
|
597
|
+
pool?: Pool;
|
|
598
|
+
/** Details of the reallocation */
|
|
599
|
+
reallocationDetails?: ReallocationDetails;
|
|
600
|
+
}
|
|
601
|
+
interface ReallocationDetails {
|
|
602
|
+
/**
|
|
603
|
+
* Id of the reallocation transaction. This is the new latest transaction in the chain
|
|
604
|
+
* @format GUID
|
|
605
|
+
*/
|
|
606
|
+
transactionId?: string;
|
|
607
|
+
/**
|
|
608
|
+
* Id of the transaction superseded by the reallocation
|
|
609
|
+
* @format GUID
|
|
610
|
+
*/
|
|
611
|
+
previousTransactionId?: string;
|
|
612
|
+
/** Reference of the item that is being reallocated */
|
|
613
|
+
itemReference?: ItemReference;
|
|
614
|
+
/**
|
|
615
|
+
* Number of items that were redeemed
|
|
616
|
+
* @min 1
|
|
617
|
+
*/
|
|
618
|
+
itemCount?: number;
|
|
619
|
+
/** New date at which the item will be used */
|
|
620
|
+
targetDate?: Date | null;
|
|
621
|
+
/** Date at which the item would have been used before this reallocation */
|
|
622
|
+
previousTargetDate?: Date | null;
|
|
623
|
+
/**
|
|
624
|
+
* Idempotency key of the reallocation request
|
|
625
|
+
* @maxLength 200
|
|
626
|
+
*/
|
|
627
|
+
idempotencyKey?: string;
|
|
628
|
+
/** Beneficiary of the entitlement */
|
|
629
|
+
beneficiary?: CommonIdentificationData;
|
|
630
|
+
}
|
|
595
631
|
interface PoolPaused {
|
|
596
632
|
/** Pool which has been paused */
|
|
597
633
|
pool?: Pool;
|
|
@@ -1019,6 +1055,72 @@ interface BenefitNotFound {
|
|
|
1019
1055
|
*/
|
|
1020
1056
|
benefitKey?: string | null;
|
|
1021
1057
|
}
|
|
1058
|
+
interface ReallocateBenefitRequest {
|
|
1059
|
+
/**
|
|
1060
|
+
* ID of the latest transaction in the redemption's transaction chain.
|
|
1061
|
+
* For a redemption that has never been reallocated, this is the redemption transaction ID.
|
|
1062
|
+
* @format GUID
|
|
1063
|
+
*/
|
|
1064
|
+
transactionId: string;
|
|
1065
|
+
/** New date that the item will be provided to the beneficiary. */
|
|
1066
|
+
targetDate: Date | null;
|
|
1067
|
+
/**
|
|
1068
|
+
* Unique identifier, generated by the client.
|
|
1069
|
+
* Used to recognize repeated attempts to make the same request.
|
|
1070
|
+
* @maxLength 200
|
|
1071
|
+
*/
|
|
1072
|
+
idempotencyKey: string;
|
|
1073
|
+
/** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
|
|
1074
|
+
beneficiary?: CommonIdentificationData;
|
|
1075
|
+
/**
|
|
1076
|
+
* 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.
|
|
1077
|
+
* @minLength 1
|
|
1078
|
+
* @maxLength 20
|
|
1079
|
+
*/
|
|
1080
|
+
namespace: string;
|
|
1081
|
+
}
|
|
1082
|
+
interface ReallocateBenefitResponse {
|
|
1083
|
+
/**
|
|
1084
|
+
* ID of the reallocation transaction. This is the new latest transaction in the chain.
|
|
1085
|
+
* @format GUID
|
|
1086
|
+
*/
|
|
1087
|
+
transactionId?: string;
|
|
1088
|
+
}
|
|
1089
|
+
interface TransactionNotFound {
|
|
1090
|
+
/**
|
|
1091
|
+
* ID of the transaction that wasn't found.
|
|
1092
|
+
* @format GUID
|
|
1093
|
+
*/
|
|
1094
|
+
transactionId?: string;
|
|
1095
|
+
}
|
|
1096
|
+
interface NotLatestTransaction {
|
|
1097
|
+
/**
|
|
1098
|
+
* ID of the latest transaction in the chain.
|
|
1099
|
+
* @format GUID
|
|
1100
|
+
*/
|
|
1101
|
+
latestTransactionId?: string;
|
|
1102
|
+
}
|
|
1103
|
+
interface RedemptionAlreadyCanceled {
|
|
1104
|
+
/**
|
|
1105
|
+
* ID of the transaction that canceled the redemption.
|
|
1106
|
+
* @format GUID
|
|
1107
|
+
*/
|
|
1108
|
+
cancellationTransactionId?: string;
|
|
1109
|
+
}
|
|
1110
|
+
interface ChainOperationInProgress {
|
|
1111
|
+
/**
|
|
1112
|
+
* ID of the pending transaction that hasn't settled yet.
|
|
1113
|
+
* @format GUID
|
|
1114
|
+
*/
|
|
1115
|
+
pendingTransactionId?: string;
|
|
1116
|
+
}
|
|
1117
|
+
interface AlreadyExecuted {
|
|
1118
|
+
/**
|
|
1119
|
+
* Idempotency key of the original request.
|
|
1120
|
+
* @maxLength 200
|
|
1121
|
+
*/
|
|
1122
|
+
idempotencyKey?: string;
|
|
1123
|
+
}
|
|
1022
1124
|
interface ReserveBenefitRequest {
|
|
1023
1125
|
/**
|
|
1024
1126
|
* Id of the pool that is being redeemed from
|
|
@@ -1141,6 +1243,17 @@ interface CheckBenefitEligibilityRequest {
|
|
|
1141
1243
|
*/
|
|
1142
1244
|
namespace: string;
|
|
1143
1245
|
}
|
|
1246
|
+
declare enum Intent {
|
|
1247
|
+
/** Check whether the benefit can be redeemed. */
|
|
1248
|
+
REDEMPTION = "REDEMPTION",
|
|
1249
|
+
/**
|
|
1250
|
+
* Check whether an already redeemed benefit can be reallocated to the target date.
|
|
1251
|
+
* The redeemed credits are kept, so the balance check is skipped.
|
|
1252
|
+
*/
|
|
1253
|
+
REALLOCATION = "REALLOCATION"
|
|
1254
|
+
}
|
|
1255
|
+
/** @enumType */
|
|
1256
|
+
type IntentWithLiterals = Intent | 'REDEMPTION' | 'REALLOCATION';
|
|
1144
1257
|
interface CheckBenefitEligibilityResponse {
|
|
1145
1258
|
/** Result of the eligibility check. */
|
|
1146
1259
|
result?: EligibilityCheckResult;
|
|
@@ -1804,6 +1917,44 @@ type RedeemBenefitApplicationErrors = {
|
|
|
1804
1917
|
data?: BenefitNotFound;
|
|
1805
1918
|
};
|
|
1806
1919
|
/** @docsIgnore */
|
|
1920
|
+
type ReallocateBenefitApplicationErrors = {
|
|
1921
|
+
code?: 'TRANSACTION_NOT_FOUND';
|
|
1922
|
+
description?: string;
|
|
1923
|
+
data?: TransactionNotFound;
|
|
1924
|
+
} | {
|
|
1925
|
+
code?: 'POOL_NOT_FOUND';
|
|
1926
|
+
description?: string;
|
|
1927
|
+
data?: PoolNotFound;
|
|
1928
|
+
} | {
|
|
1929
|
+
code?: 'NOT_LATEST_TRANSACTION';
|
|
1930
|
+
description?: string;
|
|
1931
|
+
data?: NotLatestTransaction;
|
|
1932
|
+
} | {
|
|
1933
|
+
code?: 'REDEMPTION_ALREADY_CANCELED';
|
|
1934
|
+
description?: string;
|
|
1935
|
+
data?: RedemptionAlreadyCanceled;
|
|
1936
|
+
} | {
|
|
1937
|
+
code?: 'TRANSACTION_NOT_REALLOCATABLE';
|
|
1938
|
+
description?: string;
|
|
1939
|
+
data?: Record<string, any>;
|
|
1940
|
+
} | {
|
|
1941
|
+
code?: 'POOL_NOT_ACTIVE';
|
|
1942
|
+
description?: string;
|
|
1943
|
+
data?: PoolNotActive;
|
|
1944
|
+
} | {
|
|
1945
|
+
code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE';
|
|
1946
|
+
description?: string;
|
|
1947
|
+
data?: PolicyExpressionEvaluatedToFalse;
|
|
1948
|
+
} | {
|
|
1949
|
+
code?: 'CHAIN_OPERATION_IN_PROGRESS';
|
|
1950
|
+
description?: string;
|
|
1951
|
+
data?: ChainOperationInProgress;
|
|
1952
|
+
} | {
|
|
1953
|
+
code?: 'ALREADY_EXECUTED';
|
|
1954
|
+
description?: string;
|
|
1955
|
+
data?: AlreadyExecuted;
|
|
1956
|
+
};
|
|
1957
|
+
/** @docsIgnore */
|
|
1807
1958
|
type GetEligibleBenefitsApplicationErrors = {
|
|
1808
1959
|
code?: 'INVALID_ITEM_REFERENCE';
|
|
1809
1960
|
description?: string;
|
|
@@ -2160,6 +2311,24 @@ interface RedeemBenefitOptions {
|
|
|
2160
2311
|
*/
|
|
2161
2312
|
namespace: string;
|
|
2162
2313
|
}
|
|
2314
|
+
interface ReallocateBenefitOptions {
|
|
2315
|
+
/** New date that the item will be provided to the beneficiary. */
|
|
2316
|
+
targetDate: Date | null;
|
|
2317
|
+
/**
|
|
2318
|
+
* Unique identifier, generated by the client.
|
|
2319
|
+
* Used to recognize repeated attempts to make the same request.
|
|
2320
|
+
* @maxLength 200
|
|
2321
|
+
*/
|
|
2322
|
+
idempotencyKey: string;
|
|
2323
|
+
/** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
|
|
2324
|
+
beneficiary?: CommonIdentificationData;
|
|
2325
|
+
/**
|
|
2326
|
+
* 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.
|
|
2327
|
+
* @minLength 1
|
|
2328
|
+
* @maxLength 20
|
|
2329
|
+
*/
|
|
2330
|
+
namespace: string;
|
|
2331
|
+
}
|
|
2163
2332
|
/**
|
|
2164
2333
|
* Checks if a benefit can currently be redeemed.
|
|
2165
2334
|
*
|
|
@@ -2382,4 +2551,4 @@ interface CheckBenefitEligibilityByFilterOptions {
|
|
|
2382
2551
|
poolSelector?: PoolSelector;
|
|
2383
2552
|
}
|
|
2384
2553
|
|
|
2385
|
-
export { type AccountInfo, type ActionEvent, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, 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 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, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type MaskedPool, type MessageEnvelope, type NotEnoughBalance, 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 RedeemBenefitApplicationErrors, type RedeemBenefitOptions, type RedeemBenefitRequest, type RedeemBenefitResponse, 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, 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, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
2554
|
+
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, redeemBenefit, typedQueryPools, updatePool, utils };
|
|
@@ -22,6 +22,7 @@ var index_typings_exports = {};
|
|
|
22
22
|
__export(index_typings_exports, {
|
|
23
23
|
BenefitResultType: () => BenefitResultType,
|
|
24
24
|
IdentityType: () => IdentityType,
|
|
25
|
+
Intent: () => Intent,
|
|
25
26
|
PolicyExpressionType: () => PolicyExpressionType,
|
|
26
27
|
PoolOrigin: () => PoolOrigin,
|
|
27
28
|
PoolRenewalActionType: () => PoolRenewalActionType,
|
|
@@ -40,6 +41,7 @@ __export(index_typings_exports, {
|
|
|
40
41
|
getEligibleBenefits: () => getEligibleBenefits2,
|
|
41
42
|
getPool: () => getPool2,
|
|
42
43
|
queryPools: () => queryPools2,
|
|
44
|
+
reallocateBenefit: () => reallocateBenefit2,
|
|
43
45
|
redeemBenefit: () => redeemBenefit2,
|
|
44
46
|
typedQueryPools: () => typedQueryPools,
|
|
45
47
|
updatePool: () => updatePool2,
|
|
@@ -382,6 +384,33 @@ 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
|
+
}
|
|
385
414
|
function checkBenefitEligibility(payload) {
|
|
386
415
|
function __checkBenefitEligibility({ host }) {
|
|
387
416
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -603,6 +632,11 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
603
632
|
SortOrder2["DESC"] = "DESC";
|
|
604
633
|
return SortOrder2;
|
|
605
634
|
})(SortOrder || {});
|
|
635
|
+
var Intent = /* @__PURE__ */ ((Intent2) => {
|
|
636
|
+
Intent2["REDEMPTION"] = "REDEMPTION";
|
|
637
|
+
Intent2["REALLOCATION"] = "REALLOCATION";
|
|
638
|
+
return Intent2;
|
|
639
|
+
})(Intent || {});
|
|
606
640
|
var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
607
641
|
BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
|
|
608
642
|
BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
@@ -796,6 +830,41 @@ async function redeemBenefit2(poolId, options) {
|
|
|
796
830
|
throw transformedError;
|
|
797
831
|
}
|
|
798
832
|
}
|
|
833
|
+
async function reallocateBenefit2(transactionId, options) {
|
|
834
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
835
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
836
|
+
transactionId,
|
|
837
|
+
targetDate: options?.targetDate,
|
|
838
|
+
idempotencyKey: options?.idempotencyKey,
|
|
839
|
+
beneficiary: options?.beneficiary,
|
|
840
|
+
namespace: options?.namespace
|
|
841
|
+
});
|
|
842
|
+
const reqOpts = reallocateBenefit(payload);
|
|
843
|
+
sideEffects?.onSiteCall?.();
|
|
844
|
+
try {
|
|
845
|
+
const result = await httpClient.request(reqOpts);
|
|
846
|
+
sideEffects?.onSuccess?.(result);
|
|
847
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
848
|
+
} catch (err) {
|
|
849
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
850
|
+
err,
|
|
851
|
+
{
|
|
852
|
+
spreadPathsToArguments: {},
|
|
853
|
+
explicitPathsToArguments: {
|
|
854
|
+
transactionId: "$[0]",
|
|
855
|
+
targetDate: "$[1].targetDate",
|
|
856
|
+
idempotencyKey: "$[1].idempotencyKey",
|
|
857
|
+
beneficiary: "$[1].beneficiary",
|
|
858
|
+
namespace: "$[1].namespace"
|
|
859
|
+
},
|
|
860
|
+
singleArgumentUnchanged: false
|
|
861
|
+
},
|
|
862
|
+
["transactionId", "options"]
|
|
863
|
+
);
|
|
864
|
+
sideEffects?.onError?.(err);
|
|
865
|
+
throw transformedError;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
799
868
|
async function checkBenefitEligibility2(poolId, options) {
|
|
800
869
|
const { httpClient, sideEffects } = arguments[2];
|
|
801
870
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -806,7 +875,8 @@ async function checkBenefitEligibility2(poolId, options) {
|
|
|
806
875
|
targetDate: options?.targetDate,
|
|
807
876
|
additionalData: options?.additionalData,
|
|
808
877
|
beneficiary: options?.beneficiary,
|
|
809
|
-
namespace: options?.namespace
|
|
878
|
+
namespace: options?.namespace,
|
|
879
|
+
intent: options?.intent
|
|
810
880
|
});
|
|
811
881
|
const reqOpts = checkBenefitEligibility(payload);
|
|
812
882
|
sideEffects?.onSiteCall?.();
|
|
@@ -827,7 +897,8 @@ async function checkBenefitEligibility2(poolId, options) {
|
|
|
827
897
|
targetDate: "$[1].targetDate",
|
|
828
898
|
additionalData: "$[1].additionalData",
|
|
829
899
|
beneficiary: "$[1].beneficiary",
|
|
830
|
-
namespace: "$[1].namespace"
|
|
900
|
+
namespace: "$[1].namespace",
|
|
901
|
+
intent: "$[1].intent"
|
|
831
902
|
},
|
|
832
903
|
singleArgumentUnchanged: false
|
|
833
904
|
},
|
|
@@ -979,6 +1050,7 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
979
1050
|
0 && (module.exports = {
|
|
980
1051
|
BenefitResultType,
|
|
981
1052
|
IdentityType,
|
|
1053
|
+
Intent,
|
|
982
1054
|
PolicyExpressionType,
|
|
983
1055
|
PoolOrigin,
|
|
984
1056
|
PoolRenewalActionType,
|
|
@@ -997,6 +1069,7 @@ async function checkBenefitEligibilityByFilter2(options) {
|
|
|
997
1069
|
getEligibleBenefits,
|
|
998
1070
|
getPool,
|
|
999
1071
|
queryPools,
|
|
1072
|
+
reallocateBenefit,
|
|
1000
1073
|
redeemBenefit,
|
|
1001
1074
|
typedQueryPools,
|
|
1002
1075
|
updatePool,
|