@wix/auto_sdk_benefit-programs_pools 1.0.39 → 1.0.41
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 +1 -1
- package/build/cjs/index.js +76 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +77 -2
- package/build/cjs/index.typings.js +68 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +50 -3
- package/build/cjs/meta.js +47 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +75 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +77 -2
- package/build/es/index.typings.mjs +67 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +50 -3
- package/build/es/meta.mjs +46 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +17 -3
- package/build/internal/cjs/index.js +76 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +96 -2
- package/build/internal/cjs/index.typings.js +68 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +50 -3
- package/build/internal/cjs/meta.js +47 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +17 -3
- package/build/internal/es/index.mjs +75 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +96 -2
- package/build/internal/es/index.typings.mjs +67 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +50 -3
- package/build/internal/es/meta.mjs +46 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -886,7 +886,7 @@ interface PoolInfo {
|
|
|
886
886
|
displayName?: string;
|
|
887
887
|
/**
|
|
888
888
|
* Pool description
|
|
889
|
-
* @maxLength
|
|
889
|
+
* @maxLength 450
|
|
890
890
|
*/
|
|
891
891
|
description?: string | null;
|
|
892
892
|
}
|
|
@@ -1569,6 +1569,52 @@ interface CountNumberOfPoolsInProvisioningStatusResponse {
|
|
|
1569
1569
|
/** Number of pools in provisioning status */
|
|
1570
1570
|
count?: number;
|
|
1571
1571
|
}
|
|
1572
|
+
interface CheckEligibilityByFilterRequest {
|
|
1573
|
+
/** Defines filtering and sorting criteria used to select pools when checking eligibility. */
|
|
1574
|
+
poolFilter?: PoolFilter;
|
|
1575
|
+
/**
|
|
1576
|
+
* 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.
|
|
1577
|
+
* @minLength 1
|
|
1578
|
+
* @maxLength 20
|
|
1579
|
+
*/
|
|
1580
|
+
namespace: string;
|
|
1581
|
+
/** Information about the item to check. */
|
|
1582
|
+
itemReference: ItemReference;
|
|
1583
|
+
/**
|
|
1584
|
+
* Amount of items to check.
|
|
1585
|
+
*
|
|
1586
|
+
* Ensures the balance is high enough to redeem this many it
|
|
1587
|
+
* @min 1
|
|
1588
|
+
*/
|
|
1589
|
+
count: number;
|
|
1590
|
+
/**
|
|
1591
|
+
* Date that the item will be provided to the beneficiary.
|
|
1592
|
+
*
|
|
1593
|
+
* This parameter should be used to manage the potential logistics of providing the item.
|
|
1594
|
+
*/
|
|
1595
|
+
targetDate?: Date | null;
|
|
1596
|
+
/** Pool beneficiary. */
|
|
1597
|
+
beneficiary: CommonIdentificationData;
|
|
1598
|
+
/** Additional information. */
|
|
1599
|
+
additionalData?: Record<string, any> | null;
|
|
1600
|
+
}
|
|
1601
|
+
interface PoolFilter {
|
|
1602
|
+
/** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
1603
|
+
filter?: Record<string, any> | null;
|
|
1604
|
+
/**
|
|
1605
|
+
* List of sort objects.
|
|
1606
|
+
* @maxSize 5
|
|
1607
|
+
*/
|
|
1608
|
+
sort?: Sorting[];
|
|
1609
|
+
}
|
|
1610
|
+
interface CheckEligibilityByFilterResponse {
|
|
1611
|
+
/**
|
|
1612
|
+
* Result of the eligibility check.
|
|
1613
|
+
* @minSize 1
|
|
1614
|
+
* @maxSize 100
|
|
1615
|
+
*/
|
|
1616
|
+
result?: EligibilityCheckResult[];
|
|
1617
|
+
}
|
|
1572
1618
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1573
1619
|
createdEvent?: EntityCreatedEvent;
|
|
1574
1620
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -2152,5 +2198,34 @@ interface BulkUpdatePoolsOptions {
|
|
|
2152
2198
|
*/
|
|
2153
2199
|
returnEntity?: boolean;
|
|
2154
2200
|
}
|
|
2201
|
+
interface CheckEligibilityByFilterOptions {
|
|
2202
|
+
/** Defines filtering and sorting criteria used to select pools when checking eligibility. */
|
|
2203
|
+
poolFilter?: PoolFilter;
|
|
2204
|
+
/**
|
|
2205
|
+
* 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.
|
|
2206
|
+
* @minLength 1
|
|
2207
|
+
* @maxLength 20
|
|
2208
|
+
*/
|
|
2209
|
+
namespace: string;
|
|
2210
|
+
/** Information about the item to check. */
|
|
2211
|
+
itemReference: ItemReference;
|
|
2212
|
+
/**
|
|
2213
|
+
* Amount of items to check.
|
|
2214
|
+
*
|
|
2215
|
+
* Ensures the balance is high enough to redeem this many it
|
|
2216
|
+
* @min 1
|
|
2217
|
+
*/
|
|
2218
|
+
count: number;
|
|
2219
|
+
/**
|
|
2220
|
+
* Date that the item will be provided to the beneficiary.
|
|
2221
|
+
*
|
|
2222
|
+
* This parameter should be used to manage the potential logistics of providing the item.
|
|
2223
|
+
*/
|
|
2224
|
+
targetDate?: Date | null;
|
|
2225
|
+
/** Pool beneficiary. */
|
|
2226
|
+
beneficiary: CommonIdentificationData;
|
|
2227
|
+
/** Additional information. */
|
|
2228
|
+
additionalData?: Record<string, any> | null;
|
|
2229
|
+
}
|
|
2155
2230
|
|
|
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 };
|
|
2231
|
+
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,
|