@wix/auto_sdk_benefit-programs_pools 1.0.74 → 1.0.75

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 (45) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +4 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +54 -1
  5. package/build/cjs/index.typings.js +4 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +36 -1
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +10 -0
  10. package/build/cjs/schemas.js +16 -2
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/es/index.d.mts +1 -1
  13. package/build/es/index.mjs +4 -2
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +54 -1
  16. package/build/es/index.typings.mjs +4 -2
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +36 -1
  19. package/build/es/meta.mjs.map +1 -1
  20. package/build/es/schemas.d.mts +10 -0
  21. package/build/es/schemas.mjs +16 -2
  22. package/build/es/schemas.mjs.map +1 -1
  23. package/build/internal/cjs/index.d.ts +1 -1
  24. package/build/internal/cjs/index.js +4 -2
  25. package/build/internal/cjs/index.js.map +1 -1
  26. package/build/internal/cjs/index.typings.d.ts +66 -1
  27. package/build/internal/cjs/index.typings.js +4 -2
  28. package/build/internal/cjs/index.typings.js.map +1 -1
  29. package/build/internal/cjs/meta.d.ts +36 -1
  30. package/build/internal/cjs/meta.js.map +1 -1
  31. package/build/internal/cjs/schemas.d.ts +10 -0
  32. package/build/internal/cjs/schemas.js +16 -2
  33. package/build/internal/cjs/schemas.js.map +1 -1
  34. package/build/internal/es/index.d.mts +1 -1
  35. package/build/internal/es/index.mjs +4 -2
  36. package/build/internal/es/index.mjs.map +1 -1
  37. package/build/internal/es/index.typings.d.mts +66 -1
  38. package/build/internal/es/index.typings.mjs +4 -2
  39. package/build/internal/es/index.typings.mjs.map +1 -1
  40. package/build/internal/es/meta.d.mts +36 -1
  41. package/build/internal/es/meta.mjs.map +1 -1
  42. package/build/internal/es/schemas.d.mts +10 -0
  43. package/build/internal/es/schemas.mjs +16 -2
  44. package/build/internal/es/schemas.mjs.map +1 -1
  45. package/package.json +2 -2
@@ -934,6 +934,12 @@ interface PoolInfo {
934
934
  * @format GUID
935
935
  */
936
936
  poolDefinitionId?: string;
937
+ /**
938
+ * Credit unit type.
939
+ * @internal
940
+ * @maxLength 16
941
+ */
942
+ creditUnitType?: string | null;
937
943
  }
938
944
  interface BalanceAmount {
939
945
  /**
@@ -965,6 +971,12 @@ interface BenefitInfo {
965
971
  * @maxLength 64
966
972
  */
967
973
  benefitKey?: string;
974
+ /**
975
+ * Price of the benefit in credits.
976
+ * @internal
977
+ * @decimalValue options { gte:0, maxScale:4 }
978
+ */
979
+ price?: string | null;
968
980
  }
969
981
  interface PolicyExpressionEvaluatedToFalse {
970
982
  /**
@@ -1699,6 +1711,16 @@ interface CheckBenefitEligibilityByFilterRequest {
1699
1711
  * The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
1700
1712
  *
1701
1713
  * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
1714
+ *
1715
+ * Deprecated: use `pool_selector` instead. Can't be combined with `pool_selector`.
1716
+ * @deprecated Defines filtering and sorting criteria used to select pools when checking eligibility.
1717
+ *
1718
+ * The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
1719
+ *
1720
+ * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
1721
+ *
1722
+ * Deprecated: use `pool_selector` instead. Can't be combined with `pool_selector`.
1723
+ * @targetRemovalDate 2026-08-01
1702
1724
  */
1703
1725
  poolFilter?: PoolFilter;
1704
1726
  /**
@@ -1726,6 +1748,14 @@ interface CheckBenefitEligibilityByFilterRequest {
1726
1748
  beneficiary?: CommonIdentificationData;
1727
1749
  /** Additional information. */
1728
1750
  additionalData?: Record<string, any> | null;
1751
+ /**
1752
+ * Predefined attributes used to select the pools to check eligibility in.
1753
+ *
1754
+ * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the selector further narrows which pools are checked.
1755
+ *
1756
+ * Can't be combined with `pool_filter`.
1757
+ */
1758
+ poolSelector?: PoolSelector;
1729
1759
  }
1730
1760
  interface PoolFilter {
1731
1761
  /**
@@ -1740,6 +1770,19 @@ interface PoolFilter {
1740
1770
  */
1741
1771
  sort?: Sorting[];
1742
1772
  }
1773
+ /**
1774
+ * Predefined pool-selection attributes used to select the pools to check eligibility in.
1775
+ *
1776
+ * All provided attributes must match for a pool to be selected, while the values within each attribute are alternatives.
1777
+ * An empty selector selects all pools in the namespace that match the provided `beneficiary`.
1778
+ */
1779
+ interface PoolSelector {
1780
+ /**
1781
+ * Only pools in these statuses are checked. When empty, pools in all statuses are checked.
1782
+ * @maxSize 10
1783
+ */
1784
+ poolStatuses?: PoolStatusWithLiterals[];
1785
+ }
1743
1786
  interface CheckBenefitEligibilityByFilterResponse {
1744
1787
  /**
1745
1788
  * Results of the eligibility check for the benefits in the pools that matched the filter. A pool that contains multiple benefits for the requested item produces one result per benefit.
@@ -1952,6 +1995,10 @@ type CheckBenefitEligibilityByFilterApplicationErrors = {
1952
1995
  code?: 'INVALID_ITEM_REFERENCE';
1953
1996
  description?: string;
1954
1997
  data?: Record<string, any>;
1998
+ } | {
1999
+ code?: 'POOL_FILTER_AND_POOL_SELECTOR_PROVIDED';
2000
+ description?: string;
2001
+ data?: Record<string, any>;
1955
2002
  };
1956
2003
  /**
1957
2004
  * Retrieves a pool.
@@ -2477,6 +2524,16 @@ interface CheckBenefitEligibilityByFilterOptions {
2477
2524
  * The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
2478
2525
  *
2479
2526
  * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
2527
+ *
2528
+ * Deprecated: use `pool_selector` instead. Can't be combined with `pool_selector`.
2529
+ * @deprecated Defines filtering and sorting criteria used to select pools when checking eligibility.
2530
+ *
2531
+ * The filter selects pools using the same fields supported by Query Pools. For field support, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/pools/filtering-and-sorting).
2532
+ *
2533
+ * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the filter further narrows which pools are checked.
2534
+ *
2535
+ * Deprecated: use `pool_selector` instead. Can't be combined with `pool_selector`.
2536
+ * @targetRemovalDate 2026-08-01
2480
2537
  */
2481
2538
  poolFilter?: PoolFilter;
2482
2539
  /**
@@ -2504,6 +2561,14 @@ interface CheckBenefitEligibilityByFilterOptions {
2504
2561
  beneficiary?: CommonIdentificationData;
2505
2562
  /** Additional information. */
2506
2563
  additionalData?: Record<string, any> | null;
2564
+ /**
2565
+ * Predefined attributes used to select the pools to check eligibility in.
2566
+ *
2567
+ * When omitted, eligibility is checked across all pools in the namespace that match the provided `beneficiary`. Combined with `beneficiary` and `namespace`, the selector further narrows which pools are checked.
2568
+ *
2569
+ * Can't be combined with `pool_filter`.
2570
+ */
2571
+ poolSelector?: PoolSelector;
2507
2572
  }
2508
2573
 
2509
- 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 ByItemReference, type ByItemReferenceFilter, 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 Filter, type FilterFilterOneOf, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type ListPoolsRequest, ListPoolsRequestType, type ListPoolsRequestTypeWithLiterals, type ListPoolsResponse, 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, PoolSelectorType, type PoolSelectorTypeWithLiterals, PoolStatus, type PoolStatusUpdateJobFinished, type PoolStatusUpdateJobFinishedContextOneOf, type PoolStatusUpdateParamsPoolInfo, type PoolStatusWithLiterals, type PoolWithItems, 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 };
2574
+ 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 ByItemReference, type ByItemReferenceFilter, 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 Filter, type FilterFilterOneOf, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemReference, type ListPoolsRequest, ListPoolsRequestType, type ListPoolsRequestTypeWithLiterals, type ListPoolsResponse, 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 PoolWithItems, 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 };
@@ -902,7 +902,8 @@ async function checkBenefitEligibilityByFilter2(options) {
902
902
  count: options?.count,
903
903
  targetDate: options?.targetDate,
904
904
  beneficiary: options?.beneficiary,
905
- additionalData: options?.additionalData
905
+ additionalData: options?.additionalData,
906
+ poolSelector: options?.poolSelector
906
907
  });
907
908
  const reqOpts = checkBenefitEligibilityByFilter(payload);
908
909
  sideEffects?.onSiteCall?.();
@@ -922,7 +923,8 @@ async function checkBenefitEligibilityByFilter2(options) {
922
923
  count: "$[0].count",
923
924
  targetDate: "$[0].targetDate",
924
925
  beneficiary: "$[0].beneficiary",
925
- additionalData: "$[0].additionalData"
926
+ additionalData: "$[0].additionalData",
927
+ poolSelector: "$[0].poolSelector"
926
928
  },
927
929
  singleArgumentUnchanged: false
928
930
  },