@wix/auto_sdk_benefit-programs_pools 1.0.44 → 1.0.46
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.
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +25 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +15 -8
- package/build/cjs/index.typings.js +17 -9
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +10 -5
- package/build/cjs/meta.js +3 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +25 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +15 -8
- package/build/es/index.typings.mjs +17 -9
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +10 -5
- package/build/es/meta.mjs +3 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +25 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +110 -8
- package/build/internal/cjs/index.typings.js +17 -9
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +10 -5
- package/build/internal/cjs/meta.js +3 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +25 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +110 -8
- package/build/internal/es/index.typings.mjs +17 -9
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +10 -5
- package/build/internal/es/meta.mjs +3 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -368,10 +368,11 @@ interface RateLimitedPolicy {
|
|
|
368
368
|
/** Time period for the rate limit, resets at the start of each period. */
|
|
369
369
|
timePeriod?: TimePeriodWithLiterals;
|
|
370
370
|
/**
|
|
371
|
-
* Unique identifier for the quota resource. Set
|
|
372
|
-
*
|
|
371
|
+
* Unique identifier for the quota resource. Set automatically when creating a policy.
|
|
372
|
+
* Updating RateLimitedPolicy `time period` or `times` will result in a quota reset.
|
|
373
373
|
* @immutable
|
|
374
374
|
* @readonly
|
|
375
|
+
* @format GUID
|
|
375
376
|
*/
|
|
376
377
|
quotaId?: string | null;
|
|
377
378
|
}
|
|
@@ -450,7 +451,7 @@ interface ProgramDefinitionInfo {
|
|
|
450
451
|
*/
|
|
451
452
|
externalId?: string | null;
|
|
452
453
|
/**
|
|
453
|
-
*
|
|
454
|
+
* Display name of the program definition.
|
|
454
455
|
* @readonly
|
|
455
456
|
* @maxLength 128
|
|
456
457
|
*/
|
|
@@ -476,7 +477,7 @@ interface PoolProgramInfo {
|
|
|
476
477
|
*/
|
|
477
478
|
externalId?: string | null;
|
|
478
479
|
/**
|
|
479
|
-
*
|
|
480
|
+
* Display name of the program.
|
|
480
481
|
* @readonly
|
|
481
482
|
* @maxLength 64
|
|
482
483
|
*/
|
|
@@ -1011,7 +1012,7 @@ interface BenefitNotFound {
|
|
|
1011
1012
|
poolId?: string;
|
|
1012
1013
|
/**
|
|
1013
1014
|
* Specified benefit key.
|
|
1014
|
-
* @
|
|
1015
|
+
* @maxLength 64
|
|
1015
1016
|
*/
|
|
1016
1017
|
benefitKey?: string | null;
|
|
1017
1018
|
}
|
|
@@ -1401,8 +1402,12 @@ interface BulkUpdatePoolsResponse {
|
|
|
1401
1402
|
interface BulkPoolResult {
|
|
1402
1403
|
/** Pool metadata. */
|
|
1403
1404
|
poolMetadata?: ItemMetadata;
|
|
1405
|
+
/** Item metadata. */
|
|
1406
|
+
itemMetadata?: ItemMetadata;
|
|
1404
1407
|
/** Pool data. */
|
|
1405
1408
|
pool?: Pool;
|
|
1409
|
+
/** Pool data. */
|
|
1410
|
+
item?: Pool;
|
|
1406
1411
|
}
|
|
1407
1412
|
interface ItemMetadata {
|
|
1408
1413
|
/**
|
|
@@ -1950,7 +1955,9 @@ interface UpdatePool {
|
|
|
1950
1955
|
* @applicableIdentity APP
|
|
1951
1956
|
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
1952
1957
|
*/
|
|
1953
|
-
declare function queryPools(): PoolsQueryBuilder;
|
|
1958
|
+
declare function queryPools(options?: QueryPoolsOptions): PoolsQueryBuilder;
|
|
1959
|
+
interface QueryPoolsOptions {
|
|
1960
|
+
}
|
|
1954
1961
|
interface QueryCursorResult {
|
|
1955
1962
|
cursors: Cursors;
|
|
1956
1963
|
hasNext: () => boolean;
|
|
@@ -2014,7 +2021,7 @@ interface PoolsQueryBuilder {
|
|
|
2014
2021
|
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
2015
2022
|
* @requiredField query
|
|
2016
2023
|
*/
|
|
2017
|
-
declare function typedQueryPools(query: CursorQuery): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`, 6>>;
|
|
2024
|
+
declare function typedQueryPools(query: CursorQuery, options?: QueryPoolsOptions): Promise<NonNullablePaths<QueryPoolsResponse, `pools` | `pools.${number}.status` | `pools.${number}.beneficiary.anonymousVisitorId` | `pools.${number}.beneficiary.memberId` | `pools.${number}.beneficiary.wixUserId` | `pools.${number}.details.creditConfiguration.amount` | `pools.${number}.displayName` | `pools.${number}.programDefinition._id` | `pools.${number}.program._id`, 6>>;
|
|
2018
2025
|
/**
|
|
2019
2026
|
* Redeems a specified benefit.
|
|
2020
2027
|
*
|
|
@@ -2248,4 +2255,4 @@ interface CheckEligibilityByFilterOptions {
|
|
|
2248
2255
|
additionalData?: Record<string, any> | null;
|
|
2249
2256
|
}
|
|
2250
2257
|
|
|
2251
|
-
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 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, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool };
|
|
2258
|
+
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 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, getEligibleBenefits, getPool, queryPools, redeemBenefit, typedQueryPools, updatePool };
|
|
@@ -457,7 +457,9 @@ function bulkUpdatePools(payload) {
|
|
|
457
457
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
458
458
|
paths: [
|
|
459
459
|
{ path: "results.pool.createdDate" },
|
|
460
|
-
{ path: "results.pool.updatedDate" }
|
|
460
|
+
{ path: "results.pool.updatedDate" },
|
|
461
|
+
{ path: "results.item.createdDate" },
|
|
462
|
+
{ path: "results.item.updatedDate" }
|
|
461
463
|
]
|
|
462
464
|
}
|
|
463
465
|
])
|
|
@@ -645,11 +647,14 @@ async function updatePool2(_id, pool) {
|
|
|
645
647
|
throw transformedError;
|
|
646
648
|
}
|
|
647
649
|
}
|
|
648
|
-
function queryPools2() {
|
|
649
|
-
const { httpClient, sideEffects } = arguments[
|
|
650
|
+
function queryPools2(options) {
|
|
651
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
650
652
|
return queryBuilder({
|
|
651
653
|
func: async (payload) => {
|
|
652
|
-
const reqOpts = queryPools(
|
|
654
|
+
const reqOpts = queryPools({
|
|
655
|
+
...payload,
|
|
656
|
+
...options ?? {}
|
|
657
|
+
});
|
|
653
658
|
sideEffects?.onSiteCall?.();
|
|
654
659
|
try {
|
|
655
660
|
const result = await httpClient.request(reqOpts);
|
|
@@ -661,7 +666,7 @@ function queryPools2() {
|
|
|
661
666
|
}
|
|
662
667
|
},
|
|
663
668
|
requestTransformer: (query) => {
|
|
664
|
-
const args = [query,
|
|
669
|
+
const args = [query, options];
|
|
665
670
|
return renameKeysFromSDKRequestToRESTRequest({
|
|
666
671
|
...args?.[1],
|
|
667
672
|
query: args?.[0]
|
|
@@ -688,9 +693,12 @@ function queryPools2() {
|
|
|
688
693
|
transformationPaths: {}
|
|
689
694
|
});
|
|
690
695
|
}
|
|
691
|
-
async function typedQueryPools(query) {
|
|
692
|
-
const { httpClient, sideEffects } = arguments[
|
|
693
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
696
|
+
async function typedQueryPools(query, options) {
|
|
697
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
698
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
699
|
+
query,
|
|
700
|
+
...options
|
|
701
|
+
});
|
|
694
702
|
const reqOpts = queryPools(payload);
|
|
695
703
|
sideEffects?.onSiteCall?.();
|
|
696
704
|
try {
|
|
@@ -705,7 +713,7 @@ async function typedQueryPools(query) {
|
|
|
705
713
|
explicitPathsToArguments: { query: "$[0]" },
|
|
706
714
|
singleArgumentUnchanged: false
|
|
707
715
|
},
|
|
708
|
-
["query"]
|
|
716
|
+
["query", "options"]
|
|
709
717
|
);
|
|
710
718
|
sideEffects?.onError?.(err);
|
|
711
719
|
throw transformedError;
|