@wix/auto_sdk_benefit-programs_pools 1.0.25 → 1.0.26

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.
@@ -1,6 +1,6 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { P as Pool, U as UpdatePool, a as PoolsQueryBuilder, R as RedeemBenefitOptions, b as RedeemBenefitResponse, C as CheckBenefitEligibilityOptions, c as CheckBenefitEligibilityResponse, B as BulkCheckBenefitEligibilityOptions, d as BulkCheckBenefitEligibilityResponse, I as ItemReference, G as GetEligibleBenefitsOptions, e as GetEligibleBenefitsResponse, f as BulkUpdatePoolsOptions, g as BulkUpdatePoolsResponse } from './benefit-programs-v1-pool-pools.universal-cRyidFWD.js';
3
- export { bj as ActionEvent, aW as ApplicationError, b2 as AsyncResult, r as Benefit, au as BenefitAlreadyRedeemed, av as BenefitNotFound, X as BenefitRedeemed, a1 as BenefitReservationCanceled, a2 as BenefitReservationReleased, a0 as BenefitReserved, aI as BenefitSelector, aX as BulkActionMetadata, aH as BulkCheckBenefitEligibilityRequest, aJ as BulkEligibilityCheckResult, aU as BulkPoolResult, aS as BulkUpdatePoolsRequest, aM as ByItemReference, aN as ByItemReferenceFilter, b8 as ByPoolDefinitionIdAndProgramDefinitionIdOptions, b9 as ByProgramIdOptions, ay as CancelBenefitReservationRequest, az as CancelBenefitReservationResponse, aC as CheckBenefitEligibilityRequest, p as CommonIdentificationData, q as CommonIdentificationDataIdOneOf, bb as CountNumberOfPoolsInProvisioningStatusRequest, bc as CountNumberOfPoolsInProvisioningStatusResponse, a8 as CreatePoolRequest, a9 as CreatePoolResponse, J as CreditConfiguration, ak as CursorPaging, am as CursorPagingMetadata, ah as CursorQuery, ai as CursorQueryPagingMethodOneOf, an as Cursors, H as CustomPolicy, ae as DeletePoolRequest, af as DeletePoolResponse, D as Details, bd as DomainEvent, be as DomainEventBodyOneOf, aD as EligibilityCheckResult, aE as EligibilityCheckResultResultOneOf, E as EligibilityCheckResultType, aG as Eligible, aF as EligibleBenefit, bf as EntityCreatedEvent, bi as EntityDeletedEvent, bh as EntityUpdatedEvent, M as ExtendedFields, ar as FailureDetails, aO as Filter, aP as FilterFilterOneOf, F as FixedIntervalPolicy, aK as GetEligibleBenefitsRequest, aa as GetPoolRequest, ab as GetPoolResponse, bl as IdentificationData, bm as IdentificationDataIdOneOf, i as IdentityType, b3 as InvalidPoolDefinitionReference, aV as ItemMetadata, aL as ListPoolsRequest, L as ListPoolsRequestType, aQ as ListPoolsResponse, aT as MaskedPool, bk as MessageEnvelope, ap as NotEnoughBalance, x as Policy, s as PolicyExpression, v as PolicyExpressionAnd, aq as PolicyExpressionEvaluatedToFalse, t as PolicyExpressionExpressionOneOf, u as PolicyExpressionNot, w as PolicyExpressionOr, j as PolicyExpressionType, y as PolicyPolicyOneOf, a6 as PoolDefinitionAndProgramDefinition, aZ as PoolDefinitionLookupId, a_ as PoolDefinitionLookupIdIdOneOf, $ as PoolEnded, as as PoolNotActive, at as PoolNotFound, l as PoolOrigin, Z as PoolPaused, O as PoolProgramInfo, a3 as PoolProvisionJobFinished, Q as PoolProvisioned, V as PoolRenewed, _ as PoolResumed, n as PoolSelectorType, h as PoolStatus, a4 as PoolStatusUpdateJobFinished, a5 as PoolStatusUpdateJobFinishedContextOneOf, aR as PoolWithItems, bn as PoolsQueryResult, N as ProgramDefinitionInfo, a7 as ProgramInfo, aY as ProvisionPoolsForProgramRequest, a$ as ProvisionPoolsForProgramResponse, b0 as ProvisionPoolsForProgramResponseResultOneOf, m as ProvisionPoolsForProgramResponseType, ag as QueryPoolsRequest, al as QueryPoolsResponse, z as RateLimitedPolicy, A as RateLimitedPolicyPeriodOneOf, k as RateLimitedPolicyType, ao as RedeemBenefitRequest, Y as RedemptionDetails, aA as ReleaseBenefitReservationRequest, aB as ReleaseBenefitReservationResponse, b4 as RenewPoolsForProgramRequest, b5 as RenewPoolsForProgramResponse, aw as ReserveBenefitRequest, ax as ReserveBenefitResponse, bg as RestoreInfo, K as RolloverConfiguration, S as SortOrder, aj as Sorting, b1 as SyncResult, T as Type, ac as UpdatePoolRequest, ad as UpdatePoolResponse, b6 as UpdatePoolStatusRequest, b7 as UpdatePoolStatusRequestPoolSelectorOneOf, ba as UpdatePoolStatusResponse, o as WebhookIdentityType, W as WeekDay } from './benefit-programs-v1-pool-pools.universal-cRyidFWD.js';
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Pool, UpdatePool, PoolsQueryBuilder, RedeemBenefitOptions, RedeemBenefitResponse, RedeemBenefitApplicationErrors, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, ItemReference, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, GetEligibleBenefitsApplicationErrors, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse } from './index.typings.js';
3
+ export { ActionEvent, ApplicationError, AsyncResult, Benefit, BenefitAlreadyRedeemed, BenefitNotFound, BenefitRedeemed, BenefitReservationCanceled, BenefitReservationReleased, BenefitReserved, BenefitSelector, BulkActionMetadata, BulkCheckBenefitEligibilityRequest, BulkEligibilityCheckResult, BulkPoolResult, BulkUpdatePoolsRequest, ByItemReference, ByItemReferenceFilter, ByPoolDefinitionIdAndProgramDefinitionIdOptions, ByProgramIdOptions, CancelBenefitReservationRequest, CancelBenefitReservationResponse, CheckBenefitEligibilityRequest, CommonIdentificationData, CommonIdentificationDataIdOneOf, CountNumberOfPoolsInProvisioningStatusRequest, CountNumberOfPoolsInProvisioningStatusResponse, CreatePoolRequest, CreatePoolResponse, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomPolicy, DeletePoolRequest, DeletePoolResponse, Details, DomainEvent, DomainEventBodyOneOf, EligibilityCheckResult, EligibilityCheckResultResultOneOf, EligibilityCheckResultType, EligibilityCheckResultTypeWithLiterals, Eligible, EligibleBenefit, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, FailureDetails, Filter, FilterFilterOneOf, FixedIntervalPolicy, GetEligibleBenefitsRequest, GetPoolRequest, GetPoolResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, InvalidPoolDefinitionReference, ItemMetadata, ListPoolsRequest, ListPoolsRequestType, ListPoolsRequestTypeWithLiterals, ListPoolsResponse, MaskedPool, MessageEnvelope, NotEnoughBalance, Policy, PolicyExpression, PolicyExpressionAnd, PolicyExpressionEvaluatedToFalse, PolicyExpressionExpressionOneOf, PolicyExpressionNot, PolicyExpressionOr, PolicyExpressionType, PolicyExpressionTypeWithLiterals, PolicyPolicyOneOf, PoolDefinitionAndProgramDefinition, PoolDefinitionLookupId, PoolDefinitionLookupIdIdOneOf, PoolEnded, PoolNotActive, PoolNotFound, PoolOrigin, PoolOriginWithLiterals, PoolPaused, PoolProgramInfo, PoolProvisionJobFinished, PoolProvisioned, PoolRenewed, PoolResumed, PoolSelectorType, PoolSelectorTypeWithLiterals, PoolStatus, PoolStatusUpdateJobFinished, PoolStatusUpdateJobFinishedContextOneOf, PoolStatusWithLiterals, PoolWithItems, PoolsQueryResult, ProgramDefinitionInfo, ProgramInfo, ProvisionPoolsForProgramRequest, ProvisionPoolsForProgramResponse, ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, ProvisionPoolsForProgramResponseTypeWithLiterals, QueryPoolsRequest, QueryPoolsResponse, RateLimitedPolicy, RateLimitedPolicyPeriodOneOf, RateLimitedPolicyType, RateLimitedPolicyTypeWithLiterals, RedeemBenefitRequest, RedemptionDetails, ReleaseBenefitReservationRequest, ReleaseBenefitReservationResponse, RenewPoolsForProgramRequest, RenewPoolsForProgramResponse, ReserveBenefitRequest, ReserveBenefitResponse, RestoreInfo, RolloverConfiguration, SortOrder, SortOrderWithLiterals, Sorting, SyncResult, Type, TypeWithLiterals, UpdatePoolRequest, UpdatePoolResponse, UpdatePoolStatusRequest, UpdatePoolStatusRequestPoolSelectorOneOf, UpdatePoolStatusResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeekDay, WeekDayWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function getPool$1(httpClient: HttpClient): GetPoolSignature;
6
6
  interface GetPoolSignature {
@@ -9,7 +9,7 @@ interface GetPoolSignature {
9
9
  * @param - ID of the pool to retrieve.
10
10
  * @returns Retrieved pool.
11
11
  */
12
- (poolId: string): Promise<Pool>;
12
+ (poolId: string): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 5>>;
13
13
  }
14
14
  declare function updatePool$1(httpClient: HttpClient): UpdatePoolSignature;
15
15
  interface UpdatePoolSignature {
@@ -24,7 +24,7 @@ interface UpdatePoolSignature {
24
24
  * @param - Pool ID.
25
25
  * @returns Updated pool.
26
26
  */
27
- (_id: string, pool: UpdatePool): Promise<Pool>;
27
+ (_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 2>): Promise<NonNullablePaths<Pool, `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `details.benefits` | `details.benefits.${number}.benefitKey` | `details.creditConfiguration.amount` | `displayName` | `programDefinition._id` | `program._id`, 5>>;
28
28
  }
29
29
  declare function queryPools$1(httpClient: HttpClient): QueryPoolsSignature;
30
30
  interface QueryPoolsSignature {
@@ -51,7 +51,9 @@ interface RedeemBenefitSignature {
51
51
  * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.
52
52
  * @param - ID of the pool that contains the benefit to redeem.
53
53
  */
54
- (poolId: string, options?: RedeemBenefitOptions | undefined): Promise<RedeemBenefitResponse>;
54
+ (poolId: string, options?: NonNullablePaths<RedeemBenefitOptions, `benefitKey` | `idempotencyKey` | `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<RedeemBenefitResponse, `transactionId`, 2> & {
55
+ __applicationErrorsType?: RedeemBenefitApplicationErrors;
56
+ }>;
55
57
  }
56
58
  declare function checkBenefitEligibility$1(httpClient: HttpClient): CheckBenefitEligibilitySignature;
57
59
  interface CheckBenefitEligibilitySignature {
@@ -61,7 +63,7 @@ interface CheckBenefitEligibilitySignature {
61
63
  * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.
62
64
  * @param - ID of the pool that the benefit to check belongs to.
63
65
  */
64
- (poolId: string, options?: CheckBenefitEligibilityOptions | undefined): Promise<CheckBenefitEligibilityResponse>;
66
+ (poolId: string, options?: NonNullablePaths<CheckBenefitEligibilityOptions, `itemReference` | `itemReference.externalId` | `itemReference.providerAppId` | `namespace`, 3>): Promise<NonNullablePaths<CheckBenefitEligibilityResponse, `result.eligibleOptions.eligibleBenefits` | `result.eligibleOptions.eligibleBenefits.${number}.poolId` | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category` | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId` | `result.notEnoughBalanceOptions.poolId` | `result.notEnoughBalanceOptions.availableBalance` | `result.notEnoughBalanceOptions.requestedBalance` | `result.poolNotActiveOptions.poolId` | `result.poolNotActiveOptions.poolStatus` | `result.benefitNotFoundOptions.poolId` | `result.poolNotFoundOptions.poolId` | `result.type`, 7>>;
65
67
  }
66
68
  declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient): BulkCheckBenefitEligibilitySignature;
67
69
  interface BulkCheckBenefitEligibilitySignature {
@@ -72,7 +74,7 @@ interface BulkCheckBenefitEligibilitySignature {
72
74
  *
73
75
  * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.
74
76
  */
75
- (options?: BulkCheckBenefitEligibilityOptions | undefined): Promise<BulkCheckBenefitEligibilityResponse>;
77
+ (options?: NonNullablePaths<BulkCheckBenefitEligibilityOptions, `benefitSelectors.${number}.itemReference` | `benefitSelectors.${number}.itemReference.externalId` | `benefitSelectors.${number}.itemReference.providerAppId` | `benefitSelectors.${number}.poolId` | `namespace`, 5>): Promise<NonNullablePaths<BulkCheckBenefitEligibilityResponse, `results` | `results.${number}.benefitSelector.poolId` | `results.${number}.benefitSelector.itemReference.externalId` | `results.${number}.benefitSelector.itemReference.category` | `results.${number}.benefitSelector.itemReference.providerAppId` | `results.${number}.benefitSelector.count` | `results.${number}.result.notEnoughBalanceOptions.poolId` | `results.${number}.result.notEnoughBalanceOptions.availableBalance` | `results.${number}.result.notEnoughBalanceOptions.requestedBalance` | `results.${number}.result.poolNotActiveOptions.poolId` | `results.${number}.result.poolNotActiveOptions.poolStatus` | `results.${number}.result.benefitNotFoundOptions.poolId` | `results.${number}.result.poolNotFoundOptions.poolId` | `results.${number}.result.type`, 6>>;
76
78
  }
77
79
  declare function getEligibleBenefits$1(httpClient: HttpClient): GetEligibleBenefitsSignature;
78
80
  interface GetEligibleBenefitsSignature {
@@ -83,14 +85,16 @@ interface GetEligibleBenefitsSignature {
83
85
  * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.
84
86
  * @param - Item reference.
85
87
  */
86
- (itemReference: ItemReference, options?: GetEligibleBenefitsOptions | undefined): Promise<GetEligibleBenefitsResponse>;
88
+ (itemReference: NonNullablePaths<ItemReference, `externalId` | `providerAppId`, 2>, options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>): Promise<NonNullablePaths<GetEligibleBenefitsResponse, `eligibleBenefits` | `eligibleBenefits.${number}.poolId` | `eligibleBenefits.${number}.benefitKey` | `eligibleBenefits.${number}.itemReference.externalId` | `eligibleBenefits.${number}.itemReference.category` | `eligibleBenefits.${number}.itemReference.providerAppId`, 5> & {
89
+ __applicationErrorsType?: GetEligibleBenefitsApplicationErrors;
90
+ }>;
87
91
  }
88
92
  declare function bulkUpdatePools$1(httpClient: HttpClient): BulkUpdatePoolsSignature;
89
93
  interface BulkUpdatePoolsSignature {
90
94
  /**
91
95
  * Updates pools.
92
96
  */
93
- (options?: BulkUpdatePoolsOptions | undefined): Promise<BulkUpdatePoolsResponse>;
97
+ (options?: NonNullablePaths<BulkUpdatePoolsOptions, `pools.${number}.pool` | `pools.${number}.pool._id` | `pools.${number}.pool.revision`, 5>): Promise<NonNullablePaths<BulkUpdatePoolsResponse, `results` | `results.${number}.poolMetadata.originalIndex` | `results.${number}.poolMetadata.success` | `results.${number}.poolMetadata.error.code` | `results.${number}.poolMetadata.error.description` | `results.${number}.pool.status` | `results.${number}.pool.beneficiary.anonymousVisitorId` | `results.${number}.pool.beneficiary.memberId` | `results.${number}.pool.beneficiary.wixUserId` | `results.${number}.pool.displayName` | `results.${number}.pool.programDefinition._id` | `results.${number}.pool.program._id` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
94
98
  }
95
99
 
96
100
  declare const getPool: MaybeContext<BuildRESTFunction<typeof getPool$1> & typeof getPool$1>;
@@ -102,4 +106,4 @@ declare const bulkCheckBenefitEligibility: MaybeContext<BuildRESTFunction<typeof
102
106
  declare const getEligibleBenefits: MaybeContext<BuildRESTFunction<typeof getEligibleBenefits$1> & typeof getEligibleBenefits$1>;
103
107
  declare const bulkUpdatePools: MaybeContext<BuildRESTFunction<typeof bulkUpdatePools$1> & typeof bulkUpdatePools$1>;
104
108
 
105
- export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolsQueryBuilder, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };
109
+ export { BulkCheckBenefitEligibilityOptions, BulkCheckBenefitEligibilityResponse, BulkUpdatePoolsOptions, BulkUpdatePoolsResponse, CheckBenefitEligibilityOptions, CheckBenefitEligibilityResponse, GetEligibleBenefitsApplicationErrors, GetEligibleBenefitsOptions, GetEligibleBenefitsResponse, ItemReference, Pool, PoolsQueryBuilder, RedeemBenefitApplicationErrors, RedeemBenefitOptions, RedeemBenefitResponse, UpdatePool, bulkCheckBenefitEligibility, bulkUpdatePools, checkBenefitEligibility, getEligibleBenefits, getPool, queryPools, redeemBenefit, updatePool };