@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
|
@@ -660,6 +660,29 @@ function queryPools2() {
|
|
|
660
660
|
transformationPaths: {}
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
+
async function typedQueryPools(query) {
|
|
664
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
665
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
666
|
+
const reqOpts = queryPools(payload);
|
|
667
|
+
sideEffects?.onSiteCall?.();
|
|
668
|
+
try {
|
|
669
|
+
const result = await httpClient.request(reqOpts);
|
|
670
|
+
sideEffects?.onSuccess?.(result);
|
|
671
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
672
|
+
} catch (err) {
|
|
673
|
+
const transformedError = sdkTransformError(
|
|
674
|
+
err,
|
|
675
|
+
{
|
|
676
|
+
spreadPathsToArguments: {},
|
|
677
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
678
|
+
singleArgumentUnchanged: false
|
|
679
|
+
},
|
|
680
|
+
["query"]
|
|
681
|
+
);
|
|
682
|
+
sideEffects?.onError?.(err);
|
|
683
|
+
throw transformedError;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
663
686
|
async function redeemBenefit2(poolId, options) {
|
|
664
687
|
const { httpClient, sideEffects } = arguments[2];
|
|
665
688
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -864,6 +887,13 @@ function queryPools3(httpClient) {
|
|
|
864
887
|
{ httpClient }
|
|
865
888
|
);
|
|
866
889
|
}
|
|
890
|
+
function typedQueryPools2(httpClient) {
|
|
891
|
+
return (query) => typedQueryPools(
|
|
892
|
+
query,
|
|
893
|
+
// @ts-ignore
|
|
894
|
+
{ httpClient }
|
|
895
|
+
);
|
|
896
|
+
}
|
|
867
897
|
function redeemBenefit3(httpClient) {
|
|
868
898
|
return (poolId, options) => redeemBenefit2(
|
|
869
899
|
poolId,
|
|
@@ -905,14 +935,26 @@ function bulkUpdatePools3(httpClient) {
|
|
|
905
935
|
|
|
906
936
|
// src/benefit-programs-v1-pool-pools.context.ts
|
|
907
937
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
938
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
939
|
+
function customQueryPools(httpClient) {
|
|
940
|
+
const router = createQueryOverloadRouter({
|
|
941
|
+
builderQueryFunction: () => queryPools3(httpClient)(),
|
|
942
|
+
typedQueryFunction: (query) => typedQueryPools2(httpClient)(query),
|
|
943
|
+
hasOptionsParameter: false
|
|
944
|
+
});
|
|
945
|
+
function overloadedQuery(query) {
|
|
946
|
+
return router(...arguments);
|
|
947
|
+
}
|
|
948
|
+
return overloadedQuery;
|
|
949
|
+
}
|
|
908
950
|
var getPool4 = /* @__PURE__ */ createRESTModule(getPool3);
|
|
909
951
|
var updatePool4 = /* @__PURE__ */ createRESTModule(updatePool3);
|
|
910
|
-
var queryPools4 = /* @__PURE__ */ createRESTModule(queryPools3);
|
|
911
952
|
var redeemBenefit4 = /* @__PURE__ */ createRESTModule(redeemBenefit3);
|
|
912
953
|
var checkBenefitEligibility4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibility3);
|
|
913
954
|
var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBenefitEligibility3);
|
|
914
955
|
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
915
956
|
var bulkUpdatePools4 = /* @__PURE__ */ createRESTModule(bulkUpdatePools3);
|
|
957
|
+
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
916
958
|
export {
|
|
917
959
|
EligibilityCheckResultType,
|
|
918
960
|
IdentityType,
|