@wix/auto_sdk_benefit-programs_pools 1.0.89 → 1.0.90

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.
@@ -1340,6 +1340,12 @@ interface CheckBenefitEligibilityRequest {
1340
1340
  * @maxLength 20
1341
1341
  */
1342
1342
  namespace: string;
1343
+ /**
1344
+ * Intent of the eligibility check.
1345
+ *
1346
+ * If not provided, `REDEMPTION` is used by default.
1347
+ */
1348
+ intent?: IntentWithLiterals;
1343
1349
  }
1344
1350
  declare enum Intent {
1345
1351
  /** Check whether the benefit can be redeemed. */
@@ -2405,6 +2411,28 @@ interface RedeemBenefitOptions {
2405
2411
  */
2406
2412
  namespace: string;
2407
2413
  }
2414
+ /**
2415
+ * Reallocates a redeemed benefit to a new target date.
2416
+ *
2417
+ * The reallocation is recorded as a new zero-amount transaction that supersedes the specified transaction in the redemption's transaction chain.
2418
+ * 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.
2419
+ * @param transactionId - ID of the latest transaction in the redemption's transaction chain.
2420
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
2421
+ * @public
2422
+ * @documentationMaturity preview
2423
+ * @requiredField options
2424
+ * @requiredField options.beneficiary
2425
+ * @requiredField options.idempotencyKey
2426
+ * @requiredField options.namespace
2427
+ * @requiredField options.targetDate
2428
+ * @requiredField transactionId
2429
+ * @permissionId benefit_programs:v1:pool:reallocate_benefit
2430
+ * @applicableIdentity APP
2431
+ * @fqn wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit
2432
+ */
2433
+ declare function reallocateBenefit(transactionId: string, options: NonNullablePaths<ReallocateBenefitOptions, `beneficiary` | `idempotencyKey` | `namespace` | `targetDate`, 0>): Promise<NonNullablePaths<ReallocateBenefitResponse, `transactionId`, 0> & {
2434
+ __applicationErrorsType?: ReallocateBenefitApplicationErrors;
2435
+ }>;
2408
2436
  interface ReallocateBenefitOptions {
2409
2437
  /** New date that the item will be provided to the beneficiary. */
2410
2438
  targetDate: Date | null;
@@ -2423,6 +2451,25 @@ interface ReallocateBenefitOptions {
2423
2451
  */
2424
2452
  namespace: string;
2425
2453
  }
2454
+ /**
2455
+ * Cancels a redemption, crediting the redeemed amount back to the pool's available balance.
2456
+ *
2457
+ * The cancellation is recorded as a new transaction that supersedes the specified transaction and terminates the redemption's transaction chain.
2458
+ * 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.
2459
+ * @param transactionId - ID of the latest transaction in the redemption's transaction chain.
2460
+ * For a redemption that has never been reallocated, this is the redemption transaction ID.
2461
+ * @public
2462
+ * @documentationMaturity preview
2463
+ * @requiredField options
2464
+ * @requiredField options.idempotencyKey
2465
+ * @requiredField transactionId
2466
+ * @permissionId benefit_programs:v1:pool:cancel_redemption
2467
+ * @applicableIdentity APP
2468
+ * @fqn wix.benefit_programs.v1.pool.PoolService.CancelRedemption
2469
+ */
2470
+ declare function cancelRedemption(transactionId: string, options: NonNullablePaths<CancelRedemptionOptions, `idempotencyKey`, 0>): Promise<NonNullablePaths<CancelRedemptionResponse, `transactionId`, 0> & {
2471
+ __applicationErrorsType?: CancelRedemptionApplicationErrors;
2472
+ }>;
2426
2473
  interface CancelRedemptionOptions {
2427
2474
  /**
2428
2475
  * Unique identifier, generated by the client.
@@ -2478,6 +2525,12 @@ interface CheckBenefitEligibilityOptions {
2478
2525
  * @maxLength 20
2479
2526
  */
2480
2527
  namespace: string;
2528
+ /**
2529
+ * Intent of the eligibility check.
2530
+ *
2531
+ * If not provided, `REDEMPTION` is used by default.
2532
+ */
2533
+ intent?: IntentWithLiterals;
2481
2534
  }
2482
2535
  /**
2483
2536
  * Checks if benefits can currently be redeemed.
@@ -2628,4 +2681,4 @@ interface CheckBenefitEligibilityByFilterOptions {
2628
2681
  poolSelector?: PoolSelector;
2629
2682
  }
2630
2683
 
2631
- 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 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 };
2684
+ 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 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 };