@wix/auto_sdk_pricing-plans_plans 1.0.111 → 1.0.113

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 (39) hide show
  1. package/build/cjs/index.js +60 -18
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +1 -9
  4. package/build/cjs/index.typings.js +51 -9
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.js +50 -6
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/cjs/schemas.js +22 -22
  9. package/build/cjs/schemas.js.map +1 -1
  10. package/build/es/index.mjs +60 -18
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.d.mts +1 -9
  13. package/build/es/index.typings.mjs +51 -9
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.mjs +50 -6
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/es/schemas.mjs +22 -22
  18. package/build/es/schemas.mjs.map +1 -1
  19. package/build/internal/cjs/index.js +60 -18
  20. package/build/internal/cjs/index.js.map +1 -1
  21. package/build/internal/cjs/index.typings.d.ts +75 -9
  22. package/build/internal/cjs/index.typings.js +51 -9
  23. package/build/internal/cjs/index.typings.js.map +1 -1
  24. package/build/internal/cjs/meta.d.ts +96 -0
  25. package/build/internal/cjs/meta.js +50 -6
  26. package/build/internal/cjs/meta.js.map +1 -1
  27. package/build/internal/cjs/schemas.js +22 -22
  28. package/build/internal/cjs/schemas.js.map +1 -1
  29. package/build/internal/es/index.mjs +60 -18
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +75 -9
  32. package/build/internal/es/index.typings.mjs +51 -9
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +96 -0
  35. package/build/internal/es/meta.mjs +50 -6
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/build/internal/es/schemas.mjs +22 -22
  38. package/build/internal/es/schemas.mjs.map +1 -1
  39. package/package.json +4 -4
@@ -77,6 +77,12 @@ interface Plan {
77
77
  * @maxLength 3000
78
78
  */
79
79
  termsAndConditions?: string | null;
80
+ /**
81
+ * Client data such as the plan's cover image, terms & conditions settings.
82
+ * @internal
83
+ * @maxSize 10
84
+ */
85
+ clientData?: Record<string, string>;
80
86
  /**
81
87
  * ID of the form associated with the plan at checkout.
82
88
  *
@@ -109,6 +115,11 @@ interface Pricing extends PricingPricingModelOneOf {
109
115
  * @max 999
110
116
  */
111
117
  freeTrialDays?: number | null;
118
+ /**
119
+ * Additional fees that would apply to the order, one of which might be a setup fee.
120
+ * @internal
121
+ */
122
+ feeConfigs?: FeeConfig[];
112
123
  }
113
124
  /** @oneof */
114
125
  interface PricingPricingModelOneOf {
@@ -258,6 +269,12 @@ interface PublicPlan {
258
269
  buyerCanCancel?: boolean | null;
259
270
  /** Any terms and conditions that apply to the plan. This information is displayed during checkout. */
260
271
  termsAndConditions?: string | null;
272
+ /**
273
+ * Client data such as the plan's cover image, terms & conditions settings.
274
+ * @internal
275
+ * @maxSize 10
276
+ */
277
+ clientData?: Record<string, string>;
261
278
  /**
262
279
  * ID of the form associated with the plan at checkout.
263
280
  *
@@ -277,6 +294,13 @@ interface PagingMetadataV2 {
277
294
  tooManyToCount?: boolean | null;
278
295
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
279
296
  cursors?: Cursors;
297
+ /**
298
+ * Indicates if there are more results after the current page.
299
+ * If `true`, another page of results can be retrieved.
300
+ * If `false`, this is the last page.
301
+ * @internal
302
+ */
303
+ hasNext?: boolean | null;
280
304
  }
281
305
  interface Cursors {
282
306
  /**
@@ -310,6 +334,20 @@ interface Sorting {
310
334
  fieldName?: string;
311
335
  /** Sort order. */
312
336
  order?: SortOrderWithLiterals;
337
+ /**
338
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
339
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
340
+ *
341
+ * If multiple filters are provided, they are combined with AND operator.
342
+ *
343
+ * Example:
344
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
345
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
346
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
347
+ * @internal
348
+ * @maxSize 10
349
+ */
350
+ selectItemsBy?: Record<string, any>[] | null;
313
351
  /**
314
352
  * Origin point for geo-distance sorting on a GEO field
315
353
  * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
@@ -370,6 +408,17 @@ interface ListPlansRequest {
370
408
  * @maxSize 100
371
409
  */
372
410
  planIds?: string[];
411
+ /**
412
+ * Plan name for filtering. Also checks for and includes partial matches.
413
+ * @internal
414
+ * @maxLength 50
415
+ */
416
+ name?: string | null;
417
+ /**
418
+ * Filters for free plans only.
419
+ * @internal
420
+ */
421
+ free?: boolean | null;
373
422
  }
374
423
  declare enum ArchivedFilter {
375
424
  /** Returns all plans that are active. */
@@ -414,6 +463,11 @@ interface CreatePlanResponse {
414
463
  interface UpdatePlanRequest {
415
464
  /** ID of the plan to update. */
416
465
  plan: Plan;
466
+ /**
467
+ * Explicit list of fields to update.
468
+ * @internal
469
+ */
470
+ fieldMask?: string[];
417
471
  }
418
472
  interface UpdatePlanResponse {
419
473
  /** Updated plan. */
@@ -1149,10 +1203,6 @@ interface PlansQueryBuilder {
1149
1203
  * @param string - String to compare against. Case-insensitive.
1150
1204
  */
1151
1205
  startsWith: (propertyName: '_id' | 'slug', value: string) => PlansQueryBuilder;
1152
- /** @param propertyName - Property whose value is compared with `values`.
1153
- * @param values - List of values to compare against.
1154
- */
1155
- hasSome: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any[]) => PlansQueryBuilder;
1156
1206
  in: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: any) => PlansQueryBuilder;
1157
1207
  exists: (propertyName: '_id' | 'primary' | '_createdDate' | '_updatedDate' | 'slug', value: boolean) => PlansQueryBuilder;
1158
1208
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
@@ -1205,6 +1255,20 @@ type PlanQuery = {
1205
1255
  */
1206
1256
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1207
1257
  /**
1258
+ When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1259
+ a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1260
+
1261
+ If multiple filters are provided, they are combined with AND operator.
1262
+
1263
+ Example:
1264
+ Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1265
+ and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1266
+ { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1267
+ @internal: undefined,
1268
+ @maxSize: 10
1269
+ */
1270
+ selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
1271
+ /**
1208
1272
  Origin point for geo-distance sorting on a GEO field
1209
1273
  results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
1210
1274
  */
@@ -1225,11 +1289,7 @@ type PlanQuery = {
1225
1289
  };
1226
1290
  };
1227
1291
  declare const utils: {
1228
- query: {
1229
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<Plan, PlanQuerySpec, PlanQuery>;
1230
- Filter: _wix_sdk_types.FilterFactory<Plan, PlanQuerySpec>;
1231
- Sort: _wix_sdk_types.SortFactory<PlanQuerySpec>;
1232
- };
1292
+ query: _wix_sdk_types.QueryHelpers<Plan, PlanQuerySpec, PlanQuery>;
1233
1293
  };
1234
1294
  /**
1235
1295
  * Retrieves a pricing plan by ID.
@@ -1418,6 +1478,12 @@ interface UpdatePlan {
1418
1478
  * @maxLength 3000
1419
1479
  */
1420
1480
  termsAndConditions?: string | null;
1481
+ /**
1482
+ * Client data such as the plan's cover image, terms & conditions settings.
1483
+ * @internal
1484
+ * @maxSize 10
1485
+ */
1486
+ clientData?: Record<string, string>;
1421
1487
  /**
1422
1488
  * ID of the form associated with the plan at checkout.
1423
1489
  *
@@ -16,16 +16,14 @@ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths
16
16
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
17
  function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
18
18
  const domainToMappings = {
19
- "api._api_base_domain_": [
20
- {
21
- srcPath: "/plan-proxy",
22
- destPath: ""
23
- }
24
- ],
25
19
  "*.dev.wix-code.com": [
26
20
  {
27
21
  srcPath: "/_api/paid-plans/v2/plans",
28
22
  destPath: "/v2/plans"
23
+ },
24
+ {
25
+ srcPath: "/_api/pricing-plans/v2/plans",
26
+ destPath: "/v2/plans"
29
27
  }
30
28
  ],
31
29
  "*.pub.wix-code.com": [
@@ -44,6 +42,10 @@ function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
44
42
  {
45
43
  srcPath: "/_api/paid-plans/v2/plans",
46
44
  destPath: "/v2/plans"
45
+ },
46
+ {
47
+ srcPath: "/_api/pricing-plans/v2/plans",
48
+ destPath: "/v2/plans"
47
49
  }
48
50
  ],
49
51
  "editor-flow.wixapps.net": [
@@ -56,24 +58,40 @@ function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
56
58
  {
57
59
  srcPath: "/_api/paid-plans/v2/plans",
58
60
  destPath: "/v2/plans"
61
+ },
62
+ {
63
+ srcPath: "/_api/pricing-plans/v2/plans",
64
+ destPath: "/v2/plans"
59
65
  }
60
66
  ],
61
67
  "blocks._base_domain_": [
62
68
  {
63
69
  srcPath: "/_api/paid-plans/v2/plans",
64
70
  destPath: "/v2/plans"
71
+ },
72
+ {
73
+ srcPath: "/_api/pricing-plans/v2/plans",
74
+ destPath: "/v2/plans"
65
75
  }
66
76
  ],
67
77
  "create.editorx": [
68
78
  {
69
79
  srcPath: "/_api/paid-plans/v2/plans",
70
80
  destPath: "/v2/plans"
81
+ },
82
+ {
83
+ srcPath: "/_api/pricing-plans/v2/plans",
84
+ destPath: "/v2/plans"
71
85
  }
72
86
  ],
73
87
  "editor.wixapps.net": [
74
88
  {
75
89
  srcPath: "/_api/paid-plans/v2/plans",
76
90
  destPath: "/v2/plans"
91
+ },
92
+ {
93
+ srcPath: "/_api/pricing-plans/v2/plans",
94
+ destPath: "/v2/plans"
77
95
  }
78
96
  ],
79
97
  "forums._base_domain_": [
@@ -109,6 +127,32 @@ function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
109
127
  srcPath: "/pricing-plans/v2/plans",
110
128
  destPath: "/v2/plans"
111
129
  }
130
+ ],
131
+ "apps._base_domain_": [
132
+ {
133
+ srcPath: "/_api/paid-plans/v2/plans",
134
+ destPath: "/v2/plans"
135
+ },
136
+ {
137
+ srcPath: "/_api/pricing-plans/v2/plans",
138
+ destPath: "/v2/plans"
139
+ }
140
+ ],
141
+ "dev._base_domain_": [
142
+ {
143
+ srcPath: "/_api/paid-plans/v2/plans",
144
+ destPath: "/v2/plans"
145
+ },
146
+ {
147
+ srcPath: "/_api/pricing-plans/v2/plans",
148
+ destPath: "/v2/plans"
149
+ }
150
+ ],
151
+ "api._api_base_domain_": [
152
+ {
153
+ srcPath: "/plan-proxy",
154
+ destPath: ""
155
+ }
112
156
  ]
113
157
  };
114
158
  return resolveUrl(Object.assign(opts, { domainToMappings }));
@@ -572,9 +616,7 @@ async function typedQueryPublicPlans(query) {
572
616
  }
573
617
  }
574
618
  var utils = {
575
- query: {
576
- ...createQueryUtils()
577
- }
619
+ query: /* @__PURE__ */ createQueryUtils()
578
620
  };
579
621
  async function getPlan2(_id) {
580
622
  const { httpClient, sideEffects } = arguments[1];