@wix/auto_sdk_pricing-plans_plans 1.0.83 → 1.0.85
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 -27
- package/build/cjs/index.js +92 -56
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +16 -6
- package/build/cjs/index.typings.js +74 -55
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js +49 -55
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -27
- package/build/es/index.mjs +92 -56
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +16 -6
- package/build/es/index.typings.mjs +73 -55
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +3 -3
- package/build/es/meta.mjs +49 -55
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -27
- package/build/internal/cjs/index.js +92 -56
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +16 -6
- package/build/internal/cjs/index.typings.js +74 -55
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +3 -3
- package/build/internal/cjs/meta.js +49 -55
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -27
- package/build/internal/es/index.mjs +92 -56
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +16 -6
- package/build/internal/es/index.typings.mjs +73 -55
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +3 -3
- package/build/internal/es/meta.mjs +49 -55
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/es/index.mjs
CHANGED
|
@@ -21,104 +21,98 @@ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths
|
|
|
21
21
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
22
22
|
function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
|
|
23
23
|
const domainToMappings = {
|
|
24
|
-
"
|
|
24
|
+
"api._api_base_domain_": [
|
|
25
25
|
{
|
|
26
|
-
srcPath: "/
|
|
26
|
+
srcPath: "/plan-proxy",
|
|
27
27
|
destPath: ""
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
|
-
"
|
|
30
|
+
"*.dev.wix-code.com": [
|
|
31
31
|
{
|
|
32
|
-
srcPath: "/_api/paid-plans",
|
|
33
|
-
destPath: ""
|
|
32
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
33
|
+
destPath: "/v2/plans"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"
|
|
36
|
+
"*.pub.wix-code.com": [
|
|
37
37
|
{
|
|
38
|
-
srcPath: "/_api/paid-plans",
|
|
39
|
-
destPath: ""
|
|
38
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
39
|
+
destPath: "/v2/plans"
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
|
-
"
|
|
42
|
+
"*.wixapps.net": [
|
|
43
43
|
{
|
|
44
|
-
srcPath: "/_api/paid-plans",
|
|
45
|
-
destPath: ""
|
|
44
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
45
|
+
destPath: "/v2/plans"
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
|
-
|
|
48
|
+
_: [
|
|
49
49
|
{
|
|
50
|
-
srcPath: "/_api/paid-plans",
|
|
51
|
-
destPath: ""
|
|
50
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
51
|
+
destPath: "/v2/plans"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
srcPath: "/_api/paid-plans",
|
|
57
|
-
destPath: ""
|
|
58
|
-
},
|
|
54
|
+
"editor-flow.wixapps.net": [
|
|
59
55
|
{
|
|
60
|
-
srcPath: "/paid-plans/
|
|
61
|
-
destPath: "/
|
|
56
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
57
|
+
destPath: "/v2/plans"
|
|
62
58
|
}
|
|
63
59
|
],
|
|
64
|
-
"
|
|
60
|
+
"editor._base_domain_": [
|
|
65
61
|
{
|
|
66
|
-
srcPath: "/_api/paid-plans",
|
|
67
|
-
destPath: ""
|
|
62
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
63
|
+
destPath: "/v2/plans"
|
|
68
64
|
}
|
|
69
65
|
],
|
|
70
|
-
"
|
|
66
|
+
"blocks._base_domain_": [
|
|
71
67
|
{
|
|
72
|
-
srcPath: "/_api/paid-plans",
|
|
73
|
-
destPath: ""
|
|
68
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
69
|
+
destPath: "/v2/plans"
|
|
74
70
|
}
|
|
75
71
|
],
|
|
76
|
-
"
|
|
72
|
+
"create.editorx": [
|
|
77
73
|
{
|
|
78
|
-
srcPath: "/_api/paid-plans",
|
|
79
|
-
destPath: ""
|
|
74
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
75
|
+
destPath: "/v2/plans"
|
|
80
76
|
}
|
|
81
77
|
],
|
|
82
|
-
"
|
|
83
|
-
{
|
|
84
|
-
srcPath: "/_api/paid-plans",
|
|
85
|
-
destPath: ""
|
|
86
|
-
},
|
|
78
|
+
"editor.wixapps.net": [
|
|
87
79
|
{
|
|
88
|
-
srcPath: "/_api/
|
|
89
|
-
destPath: ""
|
|
80
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
81
|
+
destPath: "/v2/plans"
|
|
90
82
|
}
|
|
91
83
|
],
|
|
92
84
|
"forums._base_domain_": [
|
|
93
85
|
{
|
|
94
|
-
srcPath: "/_api/paid-plans",
|
|
95
|
-
destPath: ""
|
|
86
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
87
|
+
destPath: "/v2/plans"
|
|
96
88
|
}
|
|
97
89
|
],
|
|
98
|
-
"
|
|
90
|
+
"forums.wixapps.net": [
|
|
99
91
|
{
|
|
100
|
-
srcPath: "/_api/paid-plans",
|
|
101
|
-
destPath: ""
|
|
92
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
93
|
+
destPath: "/v2/plans"
|
|
102
94
|
}
|
|
103
95
|
],
|
|
104
|
-
"
|
|
96
|
+
"manage._base_domain_": [
|
|
105
97
|
{
|
|
106
|
-
srcPath: "/_api/paid-plans",
|
|
107
|
-
destPath: ""
|
|
98
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
99
|
+
destPath: "/v2/plans"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
srcPath: "/_api/pricing-plans/v2/plans",
|
|
103
|
+
destPath: "/v2/plans"
|
|
108
104
|
}
|
|
109
105
|
],
|
|
110
|
-
"
|
|
111
|
-
{
|
|
112
|
-
srcPath: "/membership-api",
|
|
113
|
-
destPath: ""
|
|
114
|
-
},
|
|
106
|
+
"www._base_domain_": [
|
|
115
107
|
{
|
|
116
|
-
srcPath: "/paid-plans",
|
|
117
|
-
destPath: ""
|
|
118
|
-
}
|
|
108
|
+
srcPath: "/_api/paid-plans/v2/plans",
|
|
109
|
+
destPath: "/v2/plans"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"www.wixapis.com": [
|
|
119
113
|
{
|
|
120
|
-
srcPath: "/
|
|
121
|
-
destPath: ""
|
|
114
|
+
srcPath: "/pricing-plans/v2/plans",
|
|
115
|
+
destPath: "/v2/plans"
|
|
122
116
|
}
|
|
123
117
|
]
|
|
124
118
|
};
|
|
@@ -550,6 +544,29 @@ function queryPublicPlans2() {
|
|
|
550
544
|
transformationPaths: {}
|
|
551
545
|
});
|
|
552
546
|
}
|
|
547
|
+
async function typedQueryPublicPlans(query) {
|
|
548
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
549
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
550
|
+
const reqOpts = queryPublicPlans(payload);
|
|
551
|
+
sideEffects?.onSiteCall?.();
|
|
552
|
+
try {
|
|
553
|
+
const result = await httpClient.request(reqOpts);
|
|
554
|
+
sideEffects?.onSuccess?.(result);
|
|
555
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
556
|
+
} catch (err) {
|
|
557
|
+
const transformedError = sdkTransformError(
|
|
558
|
+
err,
|
|
559
|
+
{
|
|
560
|
+
spreadPathsToArguments: {},
|
|
561
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
562
|
+
singleArgumentUnchanged: false
|
|
563
|
+
},
|
|
564
|
+
["query"]
|
|
565
|
+
);
|
|
566
|
+
sideEffects?.onError?.(err);
|
|
567
|
+
throw transformedError;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
553
570
|
async function getPlan2(_id) {
|
|
554
571
|
const { httpClient, sideEffects } = arguments[1];
|
|
555
572
|
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
@@ -789,6 +806,13 @@ function queryPublicPlans3(httpClient) {
|
|
|
789
806
|
{ httpClient }
|
|
790
807
|
);
|
|
791
808
|
}
|
|
809
|
+
function typedQueryPublicPlans2(httpClient) {
|
|
810
|
+
return (query) => typedQueryPublicPlans(
|
|
811
|
+
query,
|
|
812
|
+
// @ts-ignore
|
|
813
|
+
{ httpClient }
|
|
814
|
+
);
|
|
815
|
+
}
|
|
792
816
|
function getPlan3(httpClient) {
|
|
793
817
|
return (_id) => getPlan2(
|
|
794
818
|
_id,
|
|
@@ -920,8 +944,19 @@ var onPlanUpdated = EventDefinition(
|
|
|
920
944
|
// src/pricing-plans-v2-plan-plans.context.ts
|
|
921
945
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
922
946
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
947
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
948
|
+
function customQueryPublicPlans(httpClient) {
|
|
949
|
+
const router = createQueryOverloadRouter({
|
|
950
|
+
builderQueryFunction: () => queryPublicPlans3(httpClient)(),
|
|
951
|
+
typedQueryFunction: (query) => typedQueryPublicPlans2(httpClient)(query),
|
|
952
|
+
hasOptionsParameter: false
|
|
953
|
+
});
|
|
954
|
+
function overloadedQuery(query) {
|
|
955
|
+
return router(...arguments);
|
|
956
|
+
}
|
|
957
|
+
return overloadedQuery;
|
|
958
|
+
}
|
|
923
959
|
var listPublicPlans4 = /* @__PURE__ */ createRESTModule(listPublicPlans3);
|
|
924
|
-
var queryPublicPlans4 = /* @__PURE__ */ createRESTModule(queryPublicPlans3);
|
|
925
960
|
var getPlan4 = /* @__PURE__ */ createRESTModule(getPlan3);
|
|
926
961
|
var listPlans4 = /* @__PURE__ */ createRESTModule(listPlans3);
|
|
927
962
|
var getPlanStats4 = /* @__PURE__ */ createRESTModule(getPlanStats3);
|
|
@@ -931,6 +966,7 @@ var setPlanVisibility4 = /* @__PURE__ */ createRESTModule(setPlanVisibility3);
|
|
|
931
966
|
var makePlanPrimary4 = /* @__PURE__ */ createRESTModule(makePlanPrimary3);
|
|
932
967
|
var clearPrimary4 = /* @__PURE__ */ createRESTModule(clearPrimary3);
|
|
933
968
|
var archivePlan4 = /* @__PURE__ */ createRESTModule(archivePlan3);
|
|
969
|
+
var queryPublicPlans4 = /* @__PURE__ */ createRESTModule(customQueryPublicPlans);
|
|
934
970
|
var onPlanBuyerCanCancelUpdated2 = createEventModule(
|
|
935
971
|
onPlanBuyerCanCancelUpdated
|
|
936
972
|
);
|