@wix/auto_sdk_benefit-programs_pools 1.0.40 → 1.0.42

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 +76 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +94 -1
  5. package/build/cjs/index.typings.js +68 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +67 -2
  8. package/build/cjs/meta.js +47 -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 +75 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +94 -1
  14. package/build/es/index.typings.mjs +67 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +67 -2
  17. package/build/es/meta.mjs +46 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +17 -3
  20. package/build/internal/cjs/index.js +76 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +113 -1
  23. package/build/internal/cjs/index.typings.js +68 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +67 -2
  26. package/build/internal/cjs/meta.js +47 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +17 -3
  29. package/build/internal/es/index.mjs +75 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +113 -1
  32. package/build/internal/es/index.typings.mjs +67 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +67 -2
  35. package/build/internal/es/meta.mjs +46 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -447,6 +447,18 @@ interface ProgramDefinitionInfo {
447
447
  * @readonly
448
448
  */
449
449
  externalId?: string | null;
450
+ /**
451
+ * Program external ID.
452
+ * @readonly
453
+ * @maxLength 128
454
+ */
455
+ displayName?: string | null;
456
+ /**
457
+ * Description of the program definition.
458
+ * @readonly
459
+ * @maxLength 450
460
+ */
461
+ description?: string | null;
450
462
  }
451
463
  interface PoolProgramInfo {
452
464
  /**
@@ -461,6 +473,12 @@ interface PoolProgramInfo {
461
473
  * @readonly
462
474
  */
463
475
  externalId?: string | null;
476
+ /**
477
+ * Program external ID.
478
+ * @readonly
479
+ * @maxLength 64
480
+ */
481
+ displayName?: string | null;
464
482
  }
465
483
  declare enum PoolOrigin {
466
484
  /** Unknown pool origin. */
@@ -1569,6 +1587,52 @@ interface CountNumberOfPoolsInProvisioningStatusResponse {
1569
1587
  /** Number of pools in provisioning status */
1570
1588
  count?: number;
1571
1589
  }
1590
+ interface CheckEligibilityByFilterRequest {
1591
+ /** Defines filtering and sorting criteria used to select pools when checking eligibility. */
1592
+ poolFilter?: PoolFilter;
1593
+ /**
1594
+ * 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.
1595
+ * @minLength 1
1596
+ * @maxLength 20
1597
+ */
1598
+ namespace: string;
1599
+ /** Information about the item to check. */
1600
+ itemReference: ItemReference;
1601
+ /**
1602
+ * Amount of items to check.
1603
+ *
1604
+ * Ensures the balance is high enough to redeem this many it
1605
+ * @min 1
1606
+ */
1607
+ count: number;
1608
+ /**
1609
+ * Date that the item will be provided to the beneficiary.
1610
+ *
1611
+ * This parameter should be used to manage the potential logistics of providing the item.
1612
+ */
1613
+ targetDate?: Date | null;
1614
+ /** Pool beneficiary. */
1615
+ beneficiary: CommonIdentificationData;
1616
+ /** Additional information. */
1617
+ additionalData?: Record<string, any> | null;
1618
+ }
1619
+ interface PoolFilter {
1620
+ /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
1621
+ filter?: Record<string, any> | null;
1622
+ /**
1623
+ * List of sort objects.
1624
+ * @maxSize 5
1625
+ */
1626
+ sort?: Sorting[];
1627
+ }
1628
+ interface CheckEligibilityByFilterResponse {
1629
+ /**
1630
+ * Result of the eligibility check.
1631
+ * @minSize 1
1632
+ * @maxSize 100
1633
+ */
1634
+ result?: EligibilityCheckResult[];
1635
+ }
1572
1636
  interface DomainEvent extends DomainEventBodyOneOf {
1573
1637
  createdEvent?: EntityCreatedEvent;
1574
1638
  updatedEvent?: EntityUpdatedEvent;
@@ -2152,5 +2216,34 @@ interface BulkUpdatePoolsOptions {
2152
2216
  */
2153
2217
  returnEntity?: boolean;
2154
2218
  }
2219
+ interface CheckEligibilityByFilterOptions {
2220
+ /** Defines filtering and sorting criteria used to select pools when checking eligibility. */
2221
+ poolFilter?: PoolFilter;
2222
+ /**
2223
+ * 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.
2224
+ * @minLength 1
2225
+ * @maxLength 20
2226
+ */
2227
+ namespace: string;
2228
+ /** Information about the item to check. */
2229
+ itemReference: ItemReference;
2230
+ /**
2231
+ * Amount of items to check.
2232
+ *
2233
+ * Ensures the balance is high enough to redeem this many it
2234
+ * @min 1
2235
+ */
2236
+ count: number;
2237
+ /**
2238
+ * Date that the item will be provided to the beneficiary.
2239
+ *
2240
+ * This parameter should be used to manage the potential logistics of providing the item.
2241
+ */
2242
+ targetDate?: Date | null;
2243
+ /** Pool beneficiary. */
2244
+ beneficiary: CommonIdentificationData;
2245
+ /** Additional information. */
2246
+ additionalData?: Record<string, any> | null;
2247
+ }
2155
2248
 
2156
- export { 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 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 CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, 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 EligibilityCheckResultResultOneOf, EligibilityCheckResultType, type EligibilityCheckResultTypeWithLiterals, type Eligible, 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 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 PoolInfo, type PoolNotActive, type PoolNotFound, PoolOrigin, type PoolOriginWithLiterals, type PoolPaused, type PoolProgramInfo, type PoolProvisionJobFinished, type PoolProvisioned, 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 QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type RateLimitedPolicyPeriodOneOf, RateLimitedPolicyType, type RateLimitedPolicyTypeWithLiterals, 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, 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, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool };
2249
+ export { 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 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 CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CheckEligibilityByFilterOptions, type CheckEligibilityByFilterRequest, type CheckEligibilityByFilterResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, 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 EligibilityCheckResultResultOneOf, EligibilityCheckResultType, type EligibilityCheckResultTypeWithLiterals, type Eligible, 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 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 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 QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type RateLimitedPolicyPeriodOneOf, RateLimitedPolicyType, type RateLimitedPolicyTypeWithLiterals, 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, 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, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool };
@@ -37,6 +37,7 @@ __export(index_typings_exports, {
37
37
  bulkCheckBenefitEligibility: () => bulkCheckBenefitEligibility2,
38
38
  bulkUpdatePools: () => bulkUpdatePools2,
39
39
  checkBenefitEligibility: () => checkBenefitEligibility2,
40
+ checkEligibilityByFilter: () => checkEligibilityByFilter2,
40
41
  getEligibleBenefits: () => getEligibleBenefits2,
41
42
  getPool: () => getPool2,
42
43
  queryPools: () => queryPools2,
@@ -511,6 +512,33 @@ function bulkUpdatePools(payload) {
511
512
  }
512
513
  return __bulkUpdatePools;
513
514
  }
515
+ function checkEligibilityByFilter(payload) {
516
+ function __checkEligibilityByFilter({ host }) {
517
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
518
+ {
519
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
520
+ paths: [{ path: "targetDate" }]
521
+ }
522
+ ]);
523
+ const metadata = {
524
+ entityFqdn: "wix.benefit_programs.v1.pool",
525
+ method: "POST",
526
+ methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckEligibilityByFilter",
527
+ packageName: PACKAGE_NAME,
528
+ migrationOptions: {
529
+ optInTransformResponse: true
530
+ },
531
+ url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
532
+ protoPath: "/v1/pools/check-eligibility-by-filter",
533
+ data: serializedData,
534
+ host
535
+ }),
536
+ data: serializedData
537
+ };
538
+ return metadata;
539
+ }
540
+ return __checkEligibilityByFilter;
541
+ }
514
542
 
515
543
  // src/benefit-programs-v1-pool-pools.universal.ts
516
544
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
@@ -909,6 +937,45 @@ async function bulkUpdatePools2(options) {
909
937
  throw transformedError;
910
938
  }
911
939
  }
940
+ async function checkEligibilityByFilter2(options) {
941
+ const { httpClient, sideEffects } = arguments[1];
942
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
943
+ poolFilter: options?.poolFilter,
944
+ namespace: options?.namespace,
945
+ itemReference: options?.itemReference,
946
+ count: options?.count,
947
+ targetDate: options?.targetDate,
948
+ beneficiary: options?.beneficiary,
949
+ additionalData: options?.additionalData
950
+ });
951
+ const reqOpts = checkEligibilityByFilter(payload);
952
+ sideEffects?.onSiteCall?.();
953
+ try {
954
+ const result = await httpClient.request(reqOpts);
955
+ sideEffects?.onSuccess?.(result);
956
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
957
+ } catch (err) {
958
+ const transformedError = (0, import_transform_error.transformError)(
959
+ err,
960
+ {
961
+ spreadPathsToArguments: {},
962
+ explicitPathsToArguments: {
963
+ poolFilter: "$[0].poolFilter",
964
+ namespace: "$[0].namespace",
965
+ itemReference: "$[0].itemReference",
966
+ count: "$[0].count",
967
+ targetDate: "$[0].targetDate",
968
+ beneficiary: "$[0].beneficiary",
969
+ additionalData: "$[0].additionalData"
970
+ },
971
+ singleArgumentUnchanged: false
972
+ },
973
+ ["options"]
974
+ );
975
+ sideEffects?.onError?.(err);
976
+ throw transformedError;
977
+ }
978
+ }
912
979
  // Annotate the CommonJS export names for ESM import in node:
913
980
  0 && (module.exports = {
914
981
  EligibilityCheckResultType,
@@ -928,6 +995,7 @@ async function bulkUpdatePools2(options) {
928
995
  bulkCheckBenefitEligibility,
929
996
  bulkUpdatePools,
930
997
  checkBenefitEligibility,
998
+ checkEligibilityByFilter,
931
999
  getEligibleBenefits,
932
1000
  getPool,
933
1001
  queryPools,