@wix/auto_sdk_benefit-programs_pools 1.0.37 → 1.0.39
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 +8 -21
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +55 -49
- package/build/cjs/index.typings.js +25 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +48 -48
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -21
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +55 -49
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +48 -48
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -21
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +55 -49
- package/build/internal/cjs/index.typings.js +25 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +48 -48
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -21
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +55 -49
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +48 -48
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -871,6 +871,51 @@ interface NotEnoughBalance {
|
|
|
871
871
|
*/
|
|
872
872
|
requestedBalance?: string;
|
|
873
873
|
}
|
|
874
|
+
interface PoolInfo {
|
|
875
|
+
/** Current pool balance */
|
|
876
|
+
balance?: BalanceAmount;
|
|
877
|
+
/**
|
|
878
|
+
* Initial available amount for associated balances.
|
|
879
|
+
* @decimalValue options { gte:0, maxScale:4 }
|
|
880
|
+
*/
|
|
881
|
+
creditAmount?: string | null;
|
|
882
|
+
/**
|
|
883
|
+
* Pool name
|
|
884
|
+
* @maxLength 64
|
|
885
|
+
*/
|
|
886
|
+
displayName?: string;
|
|
887
|
+
/**
|
|
888
|
+
* Pool description
|
|
889
|
+
* @maxLength 256
|
|
890
|
+
*/
|
|
891
|
+
description?: string | null;
|
|
892
|
+
}
|
|
893
|
+
interface BalanceAmount {
|
|
894
|
+
/**
|
|
895
|
+
* number of available credits.
|
|
896
|
+
* @decimalValue options { maxScale:4 }
|
|
897
|
+
* @readonly
|
|
898
|
+
*/
|
|
899
|
+
available?: string;
|
|
900
|
+
/**
|
|
901
|
+
* number of reserved credits.
|
|
902
|
+
* @decimalValue options { maxScale:4 }
|
|
903
|
+
* @readonly
|
|
904
|
+
*/
|
|
905
|
+
reserved?: string;
|
|
906
|
+
}
|
|
907
|
+
interface BenefitInfo {
|
|
908
|
+
/**
|
|
909
|
+
* Benefit name
|
|
910
|
+
* @maxLength 64
|
|
911
|
+
*/
|
|
912
|
+
displayName?: string | null;
|
|
913
|
+
/**
|
|
914
|
+
* Benefit description
|
|
915
|
+
* @maxLength 256
|
|
916
|
+
*/
|
|
917
|
+
description?: string | null;
|
|
918
|
+
}
|
|
874
919
|
interface PolicyExpressionEvaluatedToFalse {
|
|
875
920
|
/**
|
|
876
921
|
* Pool ID.
|
|
@@ -1123,51 +1168,6 @@ interface EligibleBenefit {
|
|
|
1123
1168
|
*/
|
|
1124
1169
|
price?: string | null;
|
|
1125
1170
|
}
|
|
1126
|
-
interface BalanceAmount {
|
|
1127
|
-
/**
|
|
1128
|
-
* number of available credits.
|
|
1129
|
-
* @decimalValue options { maxScale:4 }
|
|
1130
|
-
* @readonly
|
|
1131
|
-
*/
|
|
1132
|
-
available?: string;
|
|
1133
|
-
/**
|
|
1134
|
-
* number of reserved credits.
|
|
1135
|
-
* @decimalValue options { maxScale:4 }
|
|
1136
|
-
* @readonly
|
|
1137
|
-
*/
|
|
1138
|
-
reserved?: string;
|
|
1139
|
-
}
|
|
1140
|
-
interface PoolInfo {
|
|
1141
|
-
/** Current pool balance */
|
|
1142
|
-
balance?: BalanceAmount;
|
|
1143
|
-
/**
|
|
1144
|
-
* Initial available amount for associated balances.
|
|
1145
|
-
* @decimalValue options { gte:0, maxScale:4 }
|
|
1146
|
-
*/
|
|
1147
|
-
creditAmount?: string | null;
|
|
1148
|
-
/**
|
|
1149
|
-
* Pool name
|
|
1150
|
-
* @maxLength 64
|
|
1151
|
-
*/
|
|
1152
|
-
displayName?: string;
|
|
1153
|
-
/**
|
|
1154
|
-
* Pool description
|
|
1155
|
-
* @maxLength 256
|
|
1156
|
-
*/
|
|
1157
|
-
description?: string;
|
|
1158
|
-
}
|
|
1159
|
-
interface BenefitInfo {
|
|
1160
|
-
/**
|
|
1161
|
-
* Benefit name
|
|
1162
|
-
* @maxLength 64
|
|
1163
|
-
*/
|
|
1164
|
-
displayName?: string;
|
|
1165
|
-
/**
|
|
1166
|
-
* Benefit description
|
|
1167
|
-
* @maxLength 256
|
|
1168
|
-
*/
|
|
1169
|
-
description?: string;
|
|
1170
|
-
}
|
|
1171
1171
|
declare enum EligibilityCheckResultType {
|
|
1172
1172
|
/** Unknown eligibility. */
|
|
1173
1173
|
UNKNOWN = "UNKNOWN",
|
|
@@ -1453,7 +1453,7 @@ interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgramRespo
|
|
|
1453
1453
|
/** Async result */
|
|
1454
1454
|
asyncOptions?: AsyncResult;
|
|
1455
1455
|
/**
|
|
1456
|
-
* Job ID of the program provision associated with this pool. Retrieve job details using the Async Job API
|
|
1456
|
+
* Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).
|
|
1457
1457
|
* @format GUID
|
|
1458
1458
|
*/
|
|
1459
1459
|
jobId?: string;
|
|
@@ -1483,7 +1483,7 @@ interface SyncResult {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
interface AsyncResult {
|
|
1485
1485
|
/**
|
|
1486
|
-
* Job ID of the program provision associated with this pool. Retrieve job details using the Async Job API
|
|
1486
|
+
* Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).
|
|
1487
1487
|
* @format GUID
|
|
1488
1488
|
*/
|
|
1489
1489
|
jobId?: string;
|
|
@@ -1553,7 +1553,7 @@ interface ByProgramIdOptions {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
interface UpdatePoolStatusResponse {
|
|
1555
1555
|
/**
|
|
1556
|
-
* Job ID of the program provision associated with this pool. Retrieve job details using the Async Job API
|
|
1556
|
+
* Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).
|
|
1557
1557
|
* @format GUID
|
|
1558
1558
|
*/
|
|
1559
1559
|
jobId?: string;
|
|
@@ -1943,6 +1943,12 @@ interface PoolsQueryBuilder {
|
|
|
1943
1943
|
skipTo: (cursor: string) => PoolsQueryBuilder;
|
|
1944
1944
|
find: () => Promise<PoolsQueryResult>;
|
|
1945
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* @hidden
|
|
1948
|
+
* @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools
|
|
1949
|
+
* @requiredField query
|
|
1950
|
+
*/
|
|
1951
|
+
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>>;
|
|
1946
1952
|
/**
|
|
1947
1953
|
* Redeems a specified benefit.
|
|
1948
1954
|
*
|
|
@@ -2147,4 +2153,4 @@ interface BulkUpdatePoolsOptions {
|
|
|
2147
2153
|
returnEntity?: boolean;
|
|
2148
2154
|
}
|
|
2149
2155
|
|
|
2150
|
-
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, updatePool };
|
|
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 };
|
|
@@ -41,6 +41,7 @@ __export(index_typings_exports, {
|
|
|
41
41
|
getPool: () => getPool2,
|
|
42
42
|
queryPools: () => queryPools2,
|
|
43
43
|
redeemBenefit: () => redeemBenefit2,
|
|
44
|
+
typedQueryPools: () => typedQueryPools,
|
|
44
45
|
updatePool: () => updatePool2
|
|
45
46
|
});
|
|
46
47
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -704,6 +705,29 @@ function queryPools2() {
|
|
|
704
705
|
transformationPaths: {}
|
|
705
706
|
});
|
|
706
707
|
}
|
|
708
|
+
async function typedQueryPools(query) {
|
|
709
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
710
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
711
|
+
const reqOpts = queryPools(payload);
|
|
712
|
+
sideEffects?.onSiteCall?.();
|
|
713
|
+
try {
|
|
714
|
+
const result = await httpClient.request(reqOpts);
|
|
715
|
+
sideEffects?.onSuccess?.(result);
|
|
716
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
717
|
+
} catch (err) {
|
|
718
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
719
|
+
err,
|
|
720
|
+
{
|
|
721
|
+
spreadPathsToArguments: {},
|
|
722
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
723
|
+
singleArgumentUnchanged: false
|
|
724
|
+
},
|
|
725
|
+
["query"]
|
|
726
|
+
);
|
|
727
|
+
sideEffects?.onError?.(err);
|
|
728
|
+
throw transformedError;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
707
731
|
async function redeemBenefit2(poolId, options) {
|
|
708
732
|
const { httpClient, sideEffects } = arguments[2];
|
|
709
733
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -908,6 +932,7 @@ async function bulkUpdatePools2(options) {
|
|
|
908
932
|
getPool,
|
|
909
933
|
queryPools,
|
|
910
934
|
redeemBenefit,
|
|
935
|
+
typedQueryPools,
|
|
911
936
|
updatePool
|
|
912
937
|
});
|
|
913
938
|
//# sourceMappingURL=index.typings.js.map
|