@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +134 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +246 -1
  5. package/build/cjs/index.typings.js +116 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +223 -2
  8. package/build/cjs/meta.js +88 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +132 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +246 -1
  14. package/build/es/index.typings.mjs +114 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +223 -2
  17. package/build/es/meta.mjs +86 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +37 -3
  20. package/build/internal/cjs/index.js +134 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +283 -1
  23. package/build/internal/cjs/index.typings.js +116 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +223 -2
  26. package/build/internal/cjs/meta.js +88 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +37 -3
  29. package/build/internal/es/index.mjs +132 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +283 -1
  32. package/build/internal/es/index.typings.mjs +114 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +223 -2
  35. package/build/internal/es/meta.mjs +86 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -653,6 +653,74 @@ interface ItemReference {
653
653
  */
654
654
  providerAppId?: string;
655
655
  }
656
+ interface BenefitReallocated {
657
+ /** Pool which the reallocated benefit belongs to */
658
+ pool?: Pool;
659
+ /** Details of the reallocation */
660
+ reallocationDetails?: ReallocationDetails;
661
+ }
662
+ interface ReallocationDetails {
663
+ /**
664
+ * Id of the reallocation transaction. This is the new latest transaction in the chain
665
+ * @format GUID
666
+ */
667
+ transactionId?: string;
668
+ /**
669
+ * Id of the transaction superseded by the reallocation
670
+ * @format GUID
671
+ */
672
+ previousTransactionId?: string;
673
+ /** Reference of the item that is being reallocated */
674
+ itemReference?: ItemReference;
675
+ /**
676
+ * Number of items that were redeemed
677
+ * @min 1
678
+ */
679
+ itemCount?: number;
680
+ /** New date at which the item will be used */
681
+ targetDate?: Date | null;
682
+ /** Date at which the item would have been used before this reallocation */
683
+ previousTargetDate?: Date | null;
684
+ /**
685
+ * Idempotency key of the reallocation request
686
+ * @maxLength 200
687
+ */
688
+ idempotencyKey?: string;
689
+ /** Beneficiary of the entitlement */
690
+ beneficiary?: CommonIdentificationData;
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
+ }
656
724
  interface PoolPaused {
657
725
  /** Pool which has been paused */
658
726
  pool?: Pool;
@@ -1191,6 +1259,93 @@ interface BenefitNotFound {
1191
1259
  */
1192
1260
  programInfo?: PoolProgramInfo;
1193
1261
  }
1262
+ interface ReallocateBenefitRequest {
1263
+ /**
1264
+ * ID of the latest transaction in the redemption's transaction chain.
1265
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
1266
+ * @format GUID
1267
+ */
1268
+ transactionId: string;
1269
+ /** New date that the item will be provided to the beneficiary. */
1270
+ targetDate: Date | null;
1271
+ /**
1272
+ * Unique identifier, generated by the client.
1273
+ * Used to recognize repeated attempts to make the same request.
1274
+ * @maxLength 200
1275
+ */
1276
+ idempotencyKey: string;
1277
+ /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
1278
+ beneficiary?: CommonIdentificationData;
1279
+ /**
1280
+ * 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.
1281
+ * @minLength 1
1282
+ * @maxLength 20
1283
+ */
1284
+ namespace: string;
1285
+ }
1286
+ interface ReallocateBenefitResponse {
1287
+ /**
1288
+ * ID of the reallocation transaction. This is the new latest transaction in the chain.
1289
+ * @format GUID
1290
+ */
1291
+ transactionId?: string;
1292
+ }
1293
+ interface TransactionNotFound {
1294
+ /**
1295
+ * ID of the transaction that wasn't found.
1296
+ * @format GUID
1297
+ */
1298
+ transactionId?: string;
1299
+ }
1300
+ interface NotLatestTransaction {
1301
+ /**
1302
+ * ID of the latest transaction in the chain.
1303
+ * @format GUID
1304
+ */
1305
+ latestTransactionId?: string;
1306
+ }
1307
+ interface RedemptionAlreadyCanceled {
1308
+ /**
1309
+ * ID of the transaction that canceled the redemption.
1310
+ * @format GUID
1311
+ */
1312
+ cancellationTransactionId?: string;
1313
+ }
1314
+ interface ChainOperationInProgress {
1315
+ /**
1316
+ * ID of the pending transaction that hasn't settled yet.
1317
+ * @format GUID
1318
+ */
1319
+ pendingTransactionId?: string;
1320
+ }
1321
+ interface AlreadyExecuted {
1322
+ /**
1323
+ * Idempotency key of the original request.
1324
+ * @maxLength 200
1325
+ */
1326
+ idempotencyKey?: string;
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
+ }
1194
1349
  interface ReserveBenefitRequest {
1195
1350
  /**
1196
1351
  * Id of the pool that is being redeemed from
@@ -2019,6 +2174,70 @@ type RedeemBenefitApplicationErrors = {
2019
2174
  data?: BenefitNotFound;
2020
2175
  };
2021
2176
  /** @docsIgnore */
2177
+ type ReallocateBenefitApplicationErrors = {
2178
+ code?: 'TRANSACTION_NOT_FOUND';
2179
+ description?: string;
2180
+ data?: TransactionNotFound;
2181
+ } | {
2182
+ code?: 'POOL_NOT_FOUND';
2183
+ description?: string;
2184
+ data?: PoolNotFound;
2185
+ } | {
2186
+ code?: 'NOT_LATEST_TRANSACTION';
2187
+ description?: string;
2188
+ data?: NotLatestTransaction;
2189
+ } | {
2190
+ code?: 'REDEMPTION_ALREADY_CANCELED';
2191
+ description?: string;
2192
+ data?: RedemptionAlreadyCanceled;
2193
+ } | {
2194
+ code?: 'TRANSACTION_NOT_REALLOCATABLE';
2195
+ description?: string;
2196
+ data?: Record<string, any>;
2197
+ } | {
2198
+ code?: 'POOL_NOT_ACTIVE';
2199
+ description?: string;
2200
+ data?: PoolNotActive;
2201
+ } | {
2202
+ code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE';
2203
+ description?: string;
2204
+ data?: PolicyExpressionEvaluatedToFalse;
2205
+ } | {
2206
+ code?: 'CHAIN_OPERATION_IN_PROGRESS';
2207
+ description?: string;
2208
+ data?: ChainOperationInProgress;
2209
+ } | {
2210
+ code?: 'ALREADY_EXECUTED';
2211
+ description?: string;
2212
+ data?: AlreadyExecuted;
2213
+ };
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 */
2022
2241
  type GetEligibleBenefitsApplicationErrors = {
2023
2242
  code?: 'INVALID_ITEM_REFERENCE';
2024
2243
  description?: string;
@@ -2425,6 +2644,69 @@ interface RedeemBenefitOptions {
2425
2644
  */
2426
2645
  namespace: string;
2427
2646
  }
2647
+ /**
2648
+ * Reallocates a redeemed benefit to a new target date.
2649
+ *
2650
+ * The reallocation is recorded as a new zero-amount transaction that supersedes the specified transaction in the redemption's transaction chain.
2651
+ * 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.
2652
+ * @param transactionId - ID of the latest transaction in the redemption's transaction chain.
2653
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
2654
+ * @internal
2655
+ * @documentationMaturity preview
2656
+ * @requiredField options.idempotencyKey
2657
+ * @requiredField options.namespace
2658
+ * @requiredField options.targetDate
2659
+ * @requiredField transactionId
2660
+ * @permissionId benefit_programs:v1:pool:reallocate_benefit
2661
+ * @fqn wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit
2662
+ */
2663
+ declare function reallocateBenefit(transactionId: string, options?: NonNullablePaths<ReallocateBenefitOptions, `idempotencyKey` | `namespace` | `targetDate`, 2>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 2> & {
2664
+ __applicationErrorsType?: ReallocateBenefitApplicationErrors;
2665
+ }>;
2666
+ interface ReallocateBenefitOptions {
2667
+ /** New date that the item will be provided to the beneficiary. */
2668
+ targetDate: Date | null;
2669
+ /**
2670
+ * Unique identifier, generated by the client.
2671
+ * Used to recognize repeated attempts to make the same request.
2672
+ * @maxLength 200
2673
+ */
2674
+ idempotencyKey: string;
2675
+ /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
2676
+ beneficiary?: CommonIdentificationData;
2677
+ /**
2678
+ * 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.
2679
+ * @minLength 1
2680
+ * @maxLength 20
2681
+ */
2682
+ namespace: string;
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
+ }
2428
2710
  /**
2429
2711
  * Checks if a benefit can currently be redeemed.
2430
2712
  *
@@ -2654,4 +2936,4 @@ interface CheckBenefitEligibilityByFilterOptions {
2654
2936
  poolSelector?: PoolSelector;
2655
2937
  }
2656
2938
 
2657
- 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, Intent, type IntentWithLiterals, 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 };
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 };
@@ -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({
@@ -953,11 +1065,13 @@ export {
953
1065
  WeekDay,
954
1066
  bulkCheckBenefitEligibility2 as bulkCheckBenefitEligibility,
955
1067
  bulkUpdatePools2 as bulkUpdatePools,
1068
+ cancelRedemption2 as cancelRedemption,
956
1069
  checkBenefitEligibility2 as checkBenefitEligibility,
957
1070
  checkBenefitEligibilityByFilter2 as checkBenefitEligibilityByFilter,
958
1071
  getEligibleBenefits2 as getEligibleBenefits,
959
1072
  getPool2 as getPool,
960
1073
  queryPools2 as queryPools,
1074
+ reallocateBenefit2 as reallocateBenefit,
961
1075
  redeemBenefit2 as redeemBenefit,
962
1076
  typedQueryPools,
963
1077
  updatePool2 as updatePool,