@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +8 -27
  2. package/build/cjs/index.js +92 -56
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +16 -6
  5. package/build/cjs/index.typings.js +74 -55
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -3
  8. package/build/cjs/meta.js +49 -55
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +8 -27
  11. package/build/es/index.mjs +92 -56
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +16 -6
  14. package/build/es/index.typings.mjs +73 -55
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +3 -3
  17. package/build/es/meta.mjs +49 -55
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +8 -27
  20. package/build/internal/cjs/index.js +92 -56
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +16 -6
  23. package/build/internal/cjs/index.typings.js +74 -55
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +3 -3
  26. package/build/internal/cjs/meta.js +49 -55
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +8 -27
  29. package/build/internal/es/index.mjs +92 -56
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +16 -6
  32. package/build/internal/es/index.typings.mjs +73 -55
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +3 -3
  35. package/build/internal/es/meta.mjs +49 -55
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -64,104 +64,98 @@ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform
64
64
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
65
65
  function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
66
66
  const domainToMappings = {
67
- "www._base_domain_": [
67
+ "api._api_base_domain_": [
68
68
  {
69
- srcPath: "/_api/paid-plans",
69
+ srcPath: "/plan-proxy",
70
70
  destPath: ""
71
71
  }
72
72
  ],
73
- "forums.wixapps.net": [
73
+ "*.dev.wix-code.com": [
74
74
  {
75
- srcPath: "/_api/paid-plans",
76
- destPath: ""
75
+ srcPath: "/_api/paid-plans/v2/plans",
76
+ destPath: "/v2/plans"
77
77
  }
78
78
  ],
79
- "editor._base_domain_": [
79
+ "*.pub.wix-code.com": [
80
80
  {
81
- srcPath: "/_api/paid-plans",
82
- destPath: ""
81
+ srcPath: "/_api/paid-plans/v2/plans",
82
+ destPath: "/v2/plans"
83
83
  }
84
84
  ],
85
- "blocks._base_domain_": [
85
+ "*.wixapps.net": [
86
86
  {
87
- srcPath: "/_api/paid-plans",
88
- destPath: ""
87
+ srcPath: "/_api/paid-plans/v2/plans",
88
+ destPath: "/v2/plans"
89
89
  }
90
90
  ],
91
- "create.editorx": [
91
+ _: [
92
92
  {
93
- srcPath: "/_api/paid-plans",
94
- destPath: ""
93
+ srcPath: "/_api/paid-plans/v2/plans",
94
+ destPath: "/v2/plans"
95
95
  }
96
96
  ],
97
- _: [
98
- {
99
- srcPath: "/_api/paid-plans",
100
- destPath: ""
101
- },
97
+ "editor-flow.wixapps.net": [
102
98
  {
103
- srcPath: "/paid-plans/v1/orders",
104
- destPath: "/v1/orders"
99
+ srcPath: "/_api/paid-plans/v2/plans",
100
+ destPath: "/v2/plans"
105
101
  }
106
102
  ],
107
- "*.wixapps.net": [
103
+ "editor._base_domain_": [
108
104
  {
109
- srcPath: "/_api/paid-plans",
110
- destPath: ""
105
+ srcPath: "/_api/paid-plans/v2/plans",
106
+ destPath: "/v2/plans"
111
107
  }
112
108
  ],
113
- "*.pub.wix-code.com": [
109
+ "blocks._base_domain_": [
114
110
  {
115
- srcPath: "/_api/paid-plans",
116
- destPath: ""
111
+ srcPath: "/_api/paid-plans/v2/plans",
112
+ destPath: "/v2/plans"
117
113
  }
118
114
  ],
119
- "*.dev.wix-code.com": [
115
+ "create.editorx": [
120
116
  {
121
- srcPath: "/_api/paid-plans",
122
- destPath: ""
117
+ srcPath: "/_api/paid-plans/v2/plans",
118
+ destPath: "/v2/plans"
123
119
  }
124
120
  ],
125
- "manage._base_domain_": [
126
- {
127
- srcPath: "/_api/paid-plans",
128
- destPath: ""
129
- },
121
+ "editor.wixapps.net": [
130
122
  {
131
- srcPath: "/_api/pricing-plans",
132
- destPath: ""
123
+ srcPath: "/_api/paid-plans/v2/plans",
124
+ destPath: "/v2/plans"
133
125
  }
134
126
  ],
135
127
  "forums._base_domain_": [
136
128
  {
137
- srcPath: "/_api/paid-plans",
138
- destPath: ""
129
+ srcPath: "/_api/paid-plans/v2/plans",
130
+ destPath: "/v2/plans"
139
131
  }
140
132
  ],
141
- "editor-flow.wixapps.net": [
133
+ "forums.wixapps.net": [
142
134
  {
143
- srcPath: "/_api/paid-plans",
144
- destPath: ""
135
+ srcPath: "/_api/paid-plans/v2/plans",
136
+ destPath: "/v2/plans"
145
137
  }
146
138
  ],
147
- "editor.wixapps.net": [
139
+ "manage._base_domain_": [
148
140
  {
149
- srcPath: "/_api/paid-plans",
150
- destPath: ""
141
+ srcPath: "/_api/paid-plans/v2/plans",
142
+ destPath: "/v2/plans"
143
+ },
144
+ {
145
+ srcPath: "/_api/pricing-plans/v2/plans",
146
+ destPath: "/v2/plans"
151
147
  }
152
148
  ],
153
- "api._api_base_domain_": [
154
- {
155
- srcPath: "/membership-api",
156
- destPath: ""
157
- },
149
+ "www._base_domain_": [
158
150
  {
159
- srcPath: "/paid-plans",
160
- destPath: ""
161
- },
151
+ srcPath: "/_api/paid-plans/v2/plans",
152
+ destPath: "/v2/plans"
153
+ }
154
+ ],
155
+ "www.wixapis.com": [
162
156
  {
163
- srcPath: "/_api/paid-plans",
164
- destPath: ""
157
+ srcPath: "/pricing-plans/v2/plans",
158
+ destPath: "/v2/plans"
165
159
  }
166
160
  ]
167
161
  };
@@ -593,6 +587,29 @@ function queryPublicPlans2() {
593
587
  transformationPaths: {}
594
588
  });
595
589
  }
590
+ async function typedQueryPublicPlans(query) {
591
+ const { httpClient, sideEffects } = arguments[1];
592
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
593
+ const reqOpts = queryPublicPlans(payload);
594
+ sideEffects?.onSiteCall?.();
595
+ try {
596
+ const result = await httpClient.request(reqOpts);
597
+ sideEffects?.onSuccess?.(result);
598
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
599
+ } catch (err) {
600
+ const transformedError = (0, import_transform_error.transformError)(
601
+ err,
602
+ {
603
+ spreadPathsToArguments: {},
604
+ explicitPathsToArguments: { query: "$[0]" },
605
+ singleArgumentUnchanged: false
606
+ },
607
+ ["query"]
608
+ );
609
+ sideEffects?.onError?.(err);
610
+ throw transformedError;
611
+ }
612
+ }
596
613
  async function getPlan2(_id) {
597
614
  const { httpClient, sideEffects } = arguments[1];
598
615
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
@@ -832,6 +849,13 @@ function queryPublicPlans3(httpClient) {
832
849
  { httpClient }
833
850
  );
834
851
  }
852
+ function typedQueryPublicPlans2(httpClient) {
853
+ return (query) => typedQueryPublicPlans(
854
+ query,
855
+ // @ts-ignore
856
+ { httpClient }
857
+ );
858
+ }
835
859
  function getPlan3(httpClient) {
836
860
  return (_id) => getPlan2(
837
861
  _id,
@@ -963,8 +987,19 @@ var onPlanUpdated = (0, import_sdk_types.EventDefinition)(
963
987
  // src/pricing-plans-v2-plan-plans.context.ts
964
988
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
965
989
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
990
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
991
+ function customQueryPublicPlans(httpClient) {
992
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
993
+ builderQueryFunction: () => queryPublicPlans3(httpClient)(),
994
+ typedQueryFunction: (query) => typedQueryPublicPlans2(httpClient)(query),
995
+ hasOptionsParameter: false
996
+ });
997
+ function overloadedQuery(query) {
998
+ return router(...arguments);
999
+ }
1000
+ return overloadedQuery;
1001
+ }
966
1002
  var listPublicPlans4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listPublicPlans3);
967
- var queryPublicPlans4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryPublicPlans3);
968
1003
  var getPlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPlan3);
969
1004
  var listPlans4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listPlans3);
970
1005
  var getPlanStats4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPlanStats3);
@@ -974,6 +1009,7 @@ var setPlanVisibility4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModu
974
1009
  var makePlanPrimary4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(makePlanPrimary3);
975
1010
  var clearPrimary4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(clearPrimary3);
976
1011
  var archivePlan4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(archivePlan3);
1012
+ var queryPublicPlans4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryPublicPlans);
977
1013
  var onPlanBuyerCanCancelUpdated2 = (0, import_event_definition_modules.createEventModule)(
978
1014
  onPlanBuyerCanCancelUpdated
979
1015
  );