@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 };
@@ -36,11 +36,13 @@ __export(index_typings_exports, {
36
36
  WeekDay: () => WeekDay,
37
37
  bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility2,
38
38
  bulkUpdatePools: () => bulkUpdatePools2,
39
+ cancelRedemption: () => cancelRedemption2,
39
40
  checkBenefitEligibility: () => checkBenefitEligibility2,
40
41
  checkBenefitEligibilityByFilter: () => checkBenefitEligibilityByFilter2,
41
42
  getEligibleBenefits: () => getEligibleBenefits2,
42
43
  getPool: () => getPool2,
43
44
  queryPools: () => queryPools2,
45
+ reallocateBenefit: () => reallocateBenefit2,
44
46
  redeemBenefit: () => redeemBenefit2,
45
47
  typedQueryPools: () => typedQueryPools,
46
48
  updatePool: () => updatePool2,
@@ -383,6 +385,54 @@ function redeemBenefit(payload) {
383
385
  }
384
386
  return __redeemBenefit;
385
387
  }
388
+ function reallocateBenefit(payload) {
389
+ function __reallocateBenefit({ host }) {
390
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
391
+ {
392
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
393
+ paths: [{ path: "targetDate" }]
394
+ }
395
+ ]);
396
+ const metadata = {
397
+ entityFqdn: "wix.benefit_programs.v1.pool",
398
+ method: "POST",
399
+ methodFqn: "wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit",
400
+ packageName: PACKAGE_NAME,
401
+ migrationOptions: {
402
+ optInTransformResponse: true
403
+ },
404
+ url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
405
+ protoPath: "/v1/benefits/reallocate",
406
+ data: serializedData,
407
+ host
408
+ }),
409
+ data: serializedData
410
+ };
411
+ return metadata;
412
+ }
413
+ return __reallocateBenefit;
414
+ }
415
+ function cancelRedemption(payload) {
416
+ function __cancelRedemption({ host }) {
417
+ const metadata = {
418
+ entityFqdn: "wix.benefit_programs.v1.pool",
419
+ method: "POST",
420
+ methodFqn: "wix.benefit_programs.v1.pool.PoolService.CancelRedemption",
421
+ packageName: PACKAGE_NAME,
422
+ migrationOptions: {
423
+ optInTransformResponse: true
424
+ },
425
+ url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
426
+ protoPath: "/v1/benefits/cancel-redemption",
427
+ data: payload,
428
+ host
429
+ }),
430
+ data: payload
431
+ };
432
+ return metadata;
433
+ }
434
+ return __cancelRedemption;
435
+ }
386
436
  function checkBenefitEligibility(payload) {
387
437
  function __checkBenefitEligibility({ host }) {
388
438
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -802,6 +852,70 @@ async function redeemBenefit2(poolId, options) {
802
852
  throw transformedError;
803
853
  }
804
854
  }
855
+ async function reallocateBenefit2(transactionId, options) {
856
+ const { httpClient, sideEffects } = arguments[2];
857
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
858
+ transactionId,
859
+ targetDate: options?.targetDate,
860
+ idempotencyKey: options?.idempotencyKey,
861
+ beneficiary: options?.beneficiary,
862
+ namespace: options?.namespace
863
+ });
864
+ const reqOpts = reallocateBenefit(payload);
865
+ sideEffects?.onSiteCall?.();
866
+ try {
867
+ const result = await httpClient.request(reqOpts);
868
+ sideEffects?.onSuccess?.(result);
869
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
870
+ } catch (err) {
871
+ const transformedError = (0, import_transform_error.transformError)(
872
+ err,
873
+ {
874
+ spreadPathsToArguments: {},
875
+ explicitPathsToArguments: {
876
+ transactionId: "$[0]",
877
+ targetDate: "$[1].targetDate",
878
+ idempotencyKey: "$[1].idempotencyKey",
879
+ beneficiary: "$[1].beneficiary",
880
+ namespace: "$[1].namespace"
881
+ },
882
+ singleArgumentUnchanged: false
883
+ },
884
+ ["transactionId", "options"]
885
+ );
886
+ sideEffects?.onError?.(err);
887
+ throw transformedError;
888
+ }
889
+ }
890
+ async function cancelRedemption2(transactionId, options) {
891
+ const { httpClient, sideEffects } = arguments[2];
892
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
893
+ transactionId,
894
+ idempotencyKey: options?.idempotencyKey
895
+ });
896
+ const reqOpts = cancelRedemption(payload);
897
+ sideEffects?.onSiteCall?.();
898
+ try {
899
+ const result = await httpClient.request(reqOpts);
900
+ sideEffects?.onSuccess?.(result);
901
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
902
+ } catch (err) {
903
+ const transformedError = (0, import_transform_error.transformError)(
904
+ err,
905
+ {
906
+ spreadPathsToArguments: {},
907
+ explicitPathsToArguments: {
908
+ transactionId: "$[0]",
909
+ idempotencyKey: "$[1].idempotencyKey"
910
+ },
911
+ singleArgumentUnchanged: false
912
+ },
913
+ ["transactionId", "options"]
914
+ );
915
+ sideEffects?.onError?.(err);
916
+ throw transformedError;
917
+ }
918
+ }
805
919
  async function checkBenefitEligibility2(poolId, options) {
806
920
  const { httpClient, sideEffects } = arguments[2];
807
921
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1001,11 +1115,13 @@ async function checkBenefitEligibilityByFilter2(options) {
1001
1115
  WeekDay,
1002
1116
  bulkCheckBenefitEligibility,
1003
1117
  bulkUpdatePools,
1118
+ cancelRedemption,
1004
1119
  checkBenefitEligibility,
1005
1120
  checkBenefitEligibilityByFilter,
1006
1121
  getEligibleBenefits,
1007
1122
  getPool,
1008
1123
  queryPools,
1124
+ reallocateBenefit,
1009
1125
  redeemBenefit,
1010
1126
  typedQueryPools,
1011
1127
  updatePool,