@wix/auto_sdk_benefit-programs_pools 1.0.76 → 1.0.78

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 +14 -6
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +16 -13
  5. package/build/cjs/index.typings.js +13 -5
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +12 -1
  8. package/build/cjs/meta.js +8 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.js +18 -18
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/es/index.d.mts +1 -1
  13. package/build/es/index.mjs +13 -6
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +16 -13
  16. package/build/es/index.typings.mjs +12 -5
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +12 -1
  19. package/build/es/meta.mjs +7 -0
  20. package/build/es/meta.mjs.map +1 -1
  21. package/build/es/schemas.mjs +18 -18
  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 +14 -6
  25. package/build/internal/cjs/index.js.map +1 -1
  26. package/build/internal/cjs/index.typings.d.ts +164 -13
  27. package/build/internal/cjs/index.typings.js +13 -5
  28. package/build/internal/cjs/index.typings.js.map +1 -1
  29. package/build/internal/cjs/meta.d.ts +258 -1
  30. package/build/internal/cjs/meta.js +8 -0
  31. package/build/internal/cjs/meta.js.map +1 -1
  32. package/build/internal/cjs/schemas.js +18 -18
  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 +13 -6
  36. package/build/internal/es/index.mjs.map +1 -1
  37. package/build/internal/es/index.typings.d.mts +164 -13
  38. package/build/internal/es/index.typings.mjs +12 -5
  39. package/build/internal/es/index.typings.mjs.map +1 -1
  40. package/build/internal/es/meta.d.mts +258 -1
  41. package/build/internal/es/meta.mjs +7 -0
  42. package/build/internal/es/meta.mjs.map +1 -1
  43. package/build/internal/es/schemas.mjs +18 -18
  44. package/build/internal/es/schemas.mjs.map +1 -1
  45. package/package.json +4 -4
@@ -1141,6 +1141,17 @@ interface CheckBenefitEligibilityRequest {
1141
1141
  */
1142
1142
  namespace: string;
1143
1143
  }
1144
+ declare enum Intent {
1145
+ /** Check whether the benefit can be redeemed. */
1146
+ REDEMPTION = "REDEMPTION",
1147
+ /**
1148
+ * Check whether an already redeemed benefit can be reallocated to the target date.
1149
+ * The redeemed credits are kept, so the balance check is skipped.
1150
+ */
1151
+ REALLOCATION = "REALLOCATION"
1152
+ }
1153
+ /** @enumType */
1154
+ type IntentWithLiterals = Intent | 'REDEMPTION' | 'REALLOCATION';
1144
1155
  interface CheckBenefitEligibilityResponse {
1145
1156
  /** Result of the eligibility check. */
1146
1157
  result?: EligibilityCheckResult;
@@ -1988,11 +1999,11 @@ interface PoolsQueryBuilder {
1988
1999
  /** @param propertyName - Property whose value is compared with `value`.
1989
2000
  * @param value - Value to compare against.
1990
2001
  */
1991
- eq: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
2002
+ eq: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
1992
2003
  /** @param propertyName - Property whose value is compared with `value`.
1993
2004
  * @param value - Value to compare against.
1994
2005
  */
1995
- ne: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
2006
+ ne: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
1996
2007
  /** @param propertyName - Property whose value is compared with `value`.
1997
2008
  * @param value - Value to compare against.
1998
2009
  */
@@ -2013,11 +2024,7 @@ interface PoolsQueryBuilder {
2013
2024
  * @param string - String to compare against. Case-insensitive.
2014
2025
  */
2015
2026
  startsWith: (propertyName: '_id' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: string) => PoolsQueryBuilder;
2016
- /** @param propertyName - Property whose value is compared with `values`.
2017
- * @param values - List of values to compare against.
2018
- */
2019
- hasSome: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any[]) => PoolsQueryBuilder;
2020
- in: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
2027
+ in: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder;
2021
2028
  exists: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: boolean) => PoolsQueryBuilder;
2022
2029
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
2023
2030
  ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id'>) => PoolsQueryBuilder;
@@ -2106,11 +2113,7 @@ type PoolQuery = {
2106
2113
  }[];
2107
2114
  };
2108
2115
  declare const utils: {
2109
- query: {
2110
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<Pool, PoolQuerySpec, PoolQuery>;
2111
- Filter: _wix_sdk_types.FilterFactory<Pool, PoolQuerySpec>;
2112
- Sort: _wix_sdk_types.SortFactory<PoolQuerySpec>;
2113
- };
2116
+ query: _wix_sdk_types.QueryHelpers<Pool, PoolQuerySpec, PoolQuery>;
2114
2117
  };
2115
2118
  /**
2116
2119
  * Redeems a specified benefit.
@@ -2390,4 +2393,4 @@ interface CheckBenefitEligibilityByFilterOptions {
2390
2393
  poolSelector?: PoolSelector;
2391
2394
  }
2392
2395
 
2393
- 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, 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 };
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 };
@@ -22,6 +22,7 @@ var index_typings_exports = {};
22
22
  __export(index_typings_exports, {
23
23
  BenefitResultType: () => BenefitResultType,
24
24
  IdentityType: () => IdentityType,
25
+ Intent: () => Intent,
25
26
  PolicyExpressionType: () => PolicyExpressionType,
26
27
  PoolOrigin: () => PoolOrigin,
27
28
  PoolRenewalActionType: () => PoolRenewalActionType,
@@ -603,9 +604,15 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
603
604
  SortOrder2["DESC"] = "DESC";
604
605
  return SortOrder2;
605
606
  })(SortOrder || {});
607
+ var Intent = /* @__PURE__ */ ((Intent2) => {
608
+ Intent2["REDEMPTION"] = "REDEMPTION";
609
+ Intent2["REALLOCATION"] = "REALLOCATION";
610
+ return Intent2;
611
+ })(Intent || {});
606
612
  var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
607
613
  BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
608
614
  BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
615
+ BenefitResultType2["POLICY_EXPRESSION_EVALUATED_TO_FALSE"] = "POLICY_EXPRESSION_EVALUATED_TO_FALSE";
609
616
  BenefitResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
610
617
  BenefitResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
611
618
  BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
@@ -750,9 +757,7 @@ async function typedQueryPools(query, options) {
750
757
  }
751
758
  }
752
759
  var utils = {
753
- query: {
754
- ...(0, import_query_builder_utils.createQueryUtils)()
755
- }
760
+ query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
756
761
  };
757
762
  async function redeemBenefit2(poolId, options) {
758
763
  const { httpClient, sideEffects } = arguments[2];
@@ -807,7 +812,8 @@ async function checkBenefitEligibility2(poolId, options) {
807
812
  targetDate: options?.targetDate,
808
813
  additionalData: options?.additionalData,
809
814
  beneficiary: options?.beneficiary,
810
- namespace: options?.namespace
815
+ namespace: options?.namespace,
816
+ intent: options?.intent
811
817
  });
812
818
  const reqOpts = checkBenefitEligibility(payload);
813
819
  sideEffects?.onSiteCall?.();
@@ -828,7 +834,8 @@ async function checkBenefitEligibility2(poolId, options) {
828
834
  targetDate: "$[1].targetDate",
829
835
  additionalData: "$[1].additionalData",
830
836
  beneficiary: "$[1].beneficiary",
831
- namespace: "$[1].namespace"
837
+ namespace: "$[1].namespace",
838
+ intent: "$[1].intent"
832
839
  },
833
840
  singleArgumentUnchanged: false
834
841
  },
@@ -980,6 +987,7 @@ async function checkBenefitEligibilityByFilter2(options) {
980
987
  0 && (module.exports = {
981
988
  BenefitResultType,
982
989
  IdentityType,
990
+ Intent,
983
991
  PolicyExpressionType,
984
992
  PoolOrigin,
985
993
  PoolRenewalActionType,