@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
@@ -592,6 +592,74 @@ 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
+ }
631
+ interface RedemptionCanceled {
632
+ /** Pool which the canceled redemption belongs to */
633
+ pool?: Pool;
634
+ /** Details of the cancellation */
635
+ cancellationDetails?: CancellationDetails;
636
+ }
637
+ interface CancellationDetails {
638
+ /**
639
+ * Id of the cancellation transaction. This is the terminal transaction of the chain
640
+ * @format GUID
641
+ */
642
+ transactionId?: string;
643
+ /**
644
+ * Id of the transaction superseded by the cancellation
645
+ * @format GUID
646
+ */
647
+ previousTransactionId?: string;
648
+ /** Reference of the item whose redemption was canceled */
649
+ itemReference?: ItemReference;
650
+ /**
651
+ * Number of items that were redeemed
652
+ * @min 1
653
+ */
654
+ itemCount?: number;
655
+ /**
656
+ * Idempotency key of the cancellation request
657
+ * @maxLength 200
658
+ */
659
+ idempotencyKey?: string;
660
+ /** Beneficiary of the entitlement */
661
+ beneficiary?: CommonIdentificationData;
662
+ }
595
663
  interface PoolPaused {
596
664
  /** Pool which has been paused */
597
665
  pool?: Pool;
@@ -1019,6 +1087,93 @@ interface BenefitNotFound {
1019
1087
  */
1020
1088
  benefitKey?: string | null;
1021
1089
  }
1090
+ interface ReallocateBenefitRequest {
1091
+ /**
1092
+ * ID of the latest transaction in the redemption's transaction chain.
1093
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
1094
+ * @format GUID
1095
+ */
1096
+ transactionId: string;
1097
+ /** New date that the item will be provided to the beneficiary. */
1098
+ targetDate: Date | null;
1099
+ /**
1100
+ * Unique identifier, generated by the client.
1101
+ * Used to recognize repeated attempts to make the same request.
1102
+ * @maxLength 200
1103
+ */
1104
+ idempotencyKey: string;
1105
+ /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
1106
+ beneficiary?: CommonIdentificationData;
1107
+ /**
1108
+ * 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.
1109
+ * @minLength 1
1110
+ * @maxLength 20
1111
+ */
1112
+ namespace: string;
1113
+ }
1114
+ interface ReallocateBenefitResponse {
1115
+ /**
1116
+ * ID of the reallocation transaction. This is the new latest transaction in the chain.
1117
+ * @format GUID
1118
+ */
1119
+ transactionId?: string;
1120
+ }
1121
+ interface TransactionNotFound {
1122
+ /**
1123
+ * ID of the transaction that wasn't found.
1124
+ * @format GUID
1125
+ */
1126
+ transactionId?: string;
1127
+ }
1128
+ interface NotLatestTransaction {
1129
+ /**
1130
+ * ID of the latest transaction in the chain.
1131
+ * @format GUID
1132
+ */
1133
+ latestTransactionId?: string;
1134
+ }
1135
+ interface RedemptionAlreadyCanceled {
1136
+ /**
1137
+ * ID of the transaction that canceled the redemption.
1138
+ * @format GUID
1139
+ */
1140
+ cancellationTransactionId?: string;
1141
+ }
1142
+ interface ChainOperationInProgress {
1143
+ /**
1144
+ * ID of the pending transaction that hasn't settled yet.
1145
+ * @format GUID
1146
+ */
1147
+ pendingTransactionId?: string;
1148
+ }
1149
+ interface AlreadyExecuted {
1150
+ /**
1151
+ * Idempotency key of the original request.
1152
+ * @maxLength 200
1153
+ */
1154
+ idempotencyKey?: string;
1155
+ }
1156
+ interface CancelRedemptionRequest {
1157
+ /**
1158
+ * ID of the latest transaction in the redemption's transaction chain.
1159
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
1160
+ * @format GUID
1161
+ */
1162
+ transactionId: string;
1163
+ /**
1164
+ * Unique identifier, generated by the client.
1165
+ * Used to recognize repeated attempts to make the same request.
1166
+ * @maxLength 200
1167
+ */
1168
+ idempotencyKey: string;
1169
+ }
1170
+ interface CancelRedemptionResponse {
1171
+ /**
1172
+ * ID of the cancellation transaction. This is the terminal transaction of the chain.
1173
+ * @format GUID
1174
+ */
1175
+ transactionId?: string;
1176
+ }
1022
1177
  interface ReserveBenefitRequest {
1023
1178
  /**
1024
1179
  * Id of the pool that is being redeemed from
@@ -1815,6 +1970,70 @@ type RedeemBenefitApplicationErrors = {
1815
1970
  data?: BenefitNotFound;
1816
1971
  };
1817
1972
  /** @docsIgnore */
1973
+ type ReallocateBenefitApplicationErrors = {
1974
+ code?: 'TRANSACTION_NOT_FOUND';
1975
+ description?: string;
1976
+ data?: TransactionNotFound;
1977
+ } | {
1978
+ code?: 'POOL_NOT_FOUND';
1979
+ description?: string;
1980
+ data?: PoolNotFound;
1981
+ } | {
1982
+ code?: 'NOT_LATEST_TRANSACTION';
1983
+ description?: string;
1984
+ data?: NotLatestTransaction;
1985
+ } | {
1986
+ code?: 'REDEMPTION_ALREADY_CANCELED';
1987
+ description?: string;
1988
+ data?: RedemptionAlreadyCanceled;
1989
+ } | {
1990
+ code?: 'TRANSACTION_NOT_REALLOCATABLE';
1991
+ description?: string;
1992
+ data?: Record<string, any>;
1993
+ } | {
1994
+ code?: 'POOL_NOT_ACTIVE';
1995
+ description?: string;
1996
+ data?: PoolNotActive;
1997
+ } | {
1998
+ code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE';
1999
+ description?: string;
2000
+ data?: PolicyExpressionEvaluatedToFalse;
2001
+ } | {
2002
+ code?: 'CHAIN_OPERATION_IN_PROGRESS';
2003
+ description?: string;
2004
+ data?: ChainOperationInProgress;
2005
+ } | {
2006
+ code?: 'ALREADY_EXECUTED';
2007
+ description?: string;
2008
+ data?: AlreadyExecuted;
2009
+ };
2010
+ /** @docsIgnore */
2011
+ type CancelRedemptionApplicationErrors = {
2012
+ code?: 'TRANSACTION_NOT_FOUND';
2013
+ description?: string;
2014
+ data?: TransactionNotFound;
2015
+ } | {
2016
+ code?: 'NOT_LATEST_TRANSACTION';
2017
+ description?: string;
2018
+ data?: NotLatestTransaction;
2019
+ } | {
2020
+ code?: 'REDEMPTION_ALREADY_CANCELED';
2021
+ description?: string;
2022
+ data?: RedemptionAlreadyCanceled;
2023
+ } | {
2024
+ code?: 'TRANSACTION_NOT_CANCELABLE';
2025
+ description?: string;
2026
+ data?: Record<string, any>;
2027
+ } | {
2028
+ code?: 'CHAIN_OPERATION_IN_PROGRESS';
2029
+ description?: string;
2030
+ data?: ChainOperationInProgress;
2031
+ } | {
2032
+ code?: 'ALREADY_EXECUTED';
2033
+ description?: string;
2034
+ data?: AlreadyExecuted;
2035
+ };
2036
+ /** @docsIgnore */
1818
2037
  type GetEligibleBenefitsApplicationErrors = {
1819
2038
  code?: 'INVALID_ITEM_REFERENCE';
1820
2039
  description?: string;
@@ -2171,6 +2390,32 @@ interface RedeemBenefitOptions {
2171
2390
  */
2172
2391
  namespace: string;
2173
2392
  }
2393
+ interface ReallocateBenefitOptions {
2394
+ /** New date that the item will be provided to the beneficiary. */
2395
+ targetDate: Date | null;
2396
+ /**
2397
+ * Unique identifier, generated by the client.
2398
+ * Used to recognize repeated attempts to make the same request.
2399
+ * @maxLength 200
2400
+ */
2401
+ idempotencyKey: string;
2402
+ /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */
2403
+ beneficiary?: CommonIdentificationData;
2404
+ /**
2405
+ * 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.
2406
+ * @minLength 1
2407
+ * @maxLength 20
2408
+ */
2409
+ namespace: string;
2410
+ }
2411
+ interface CancelRedemptionOptions {
2412
+ /**
2413
+ * Unique identifier, generated by the client.
2414
+ * Used to recognize repeated attempts to make the same request.
2415
+ * @maxLength 200
2416
+ */
2417
+ idempotencyKey: string;
2418
+ }
2174
2419
  /**
2175
2420
  * Checks if a benefit can currently be redeemed.
2176
2421
  *
@@ -2393,4 +2638,4 @@ interface CheckBenefitEligibilityByFilterOptions {
2393
2638
  poolSelector?: PoolSelector;
2394
2639
  }
2395
2640
 
2396
- 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 };
2641
+ 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, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, 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,