@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
@@ -197,12 +197,12 @@ declare enum AppliedAt {
197
197
  type AppliedAtWithLiterals = AppliedAt | 'UNKNOWN_CHARGE_EVENT' | 'FIRST_PAYMENT';
198
198
  interface ListPublicPlansRequest {
199
199
  /**
200
- * Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)).
200
+ * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).
201
201
  * @min 1
202
202
  * @max 100
203
203
  */
204
204
  limit?: number | null;
205
- /** Number of items to skip. Defaults to `0`. See paging ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) |[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
205
+ /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */
206
206
  offset?: number | null;
207
207
  /**
208
208
  * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.
@@ -295,7 +295,7 @@ interface QueryPublicPlansRequest {
295
295
  query?: QueryV2;
296
296
  }
297
297
  interface QueryV2 {
298
- /** A filter object. See supported fields and operators ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans)). */
298
+ /** A filter object. See [supported fields and operators](https://dev.wix.com/api/rest/wix-pricing-plans/pricing-plans/plans/filter-and-sort#wix-pricing-plans_pricing-plans_plans_filter-and-sort_query-public-plans). */
299
299
  filter?: Record<string, any> | null;
300
300
  /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]. */
301
301
  sort?: Sorting[];
@@ -1016,12 +1016,12 @@ declare function listPublicPlans(options?: ListPublicPlansOptions): Promise<NonN
1016
1016
  }>;
1017
1017
  interface ListPublicPlansOptions {
1018
1018
  /**
1019
- * Number of items to list. Defaults to `75`. See limits ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)).
1019
+ * Number of items to list. Defaults to `75`. See [limits](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging).
1020
1020
  * @min 1
1021
1021
  * @max 100
1022
1022
  */
1023
1023
  limit?: number | null;
1024
- /** Number of items to skip. Defaults to `0`. See paging ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/list-public-plans) |[REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#paging)). */
1024
+ /** Number of items to skip. Defaults to `0`. See [paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#paging). */
1025
1025
  offset?: number | null;
1026
1026
  /**
1027
1027
  * IDs of plans to list. Non-existent IDs are ignored and don't cause errors. You can specify a maximum of 100 IDs.
@@ -1116,6 +1116,16 @@ interface PlansQueryBuilder {
1116
1116
  skip: (skip: number) => PlansQueryBuilder;
1117
1117
  find: () => Promise<PlansQueryResult>;
1118
1118
  }
1119
+ /**
1120
+ * @hidden
1121
+ * @fqn com.wixpress.membership.v2.plans.PlansServiceV2.QueryPublicPlans
1122
+ * @requiredField query
1123
+ * @returns Fulfilled - The query definition used to run the query using the [`find()`](#find) method.
1124
+ */
1125
+ declare function typedQueryPublicPlans(query: QueryV2): Promise<NonNullablePaths<QueryPublicPlansResponse, `plans` | `plans.${number}._id` | `plans.${number}.pricing.singlePaymentForDuration.unit` | `plans.${number}.pricing.price.value` | `plans.${number}.pricing.price.currency` | `plans.${number}.primary`, 6> & {
1126
+ __applicationErrorsType?: QueryPublicPlansApplicationErrors;
1127
+ __validationErrorsType?: QueryPublicPlansValidationErrors;
1128
+ }>;
1119
1129
  /**
1120
1130
  * Retrieves a pricing plan by ID.
1121
1131
  * @param _id - Plan ID.
@@ -1382,4 +1392,4 @@ declare function archivePlan(_id: string): Promise<NonNullablePaths<ArchivePlanR
1382
1392
  __applicationErrorsType?: ArchivePlanApplicationErrors;
1383
1393
  }>;
1384
1394
 
1385
- export { type ActionEvent, type ApplicationError, AppliedAt, type AppliedAtWithLiterals, type ArchivePlanApplicationErrors, type ArchivePlanRequest, type ArchivePlanResponse, ArchivedFilter, type ArchivedFilterWithLiterals, type ArrangePlansRequest, type ArrangePlansResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkArchivePlanRequest, type BulkArchivePlanResponse, type BulkPlanResult, type BuyerCanCancelUpdated, type ClearPrimaryApplicationErrors, type ClearPrimaryRequest, type ClearPrimaryResponse, type CountPlansRequest, type CountPlansResponse, type CreatePlanApplicationErrors, type CreatePlanRequest, type CreatePlanResponse, type CreatePlanValidationErrors, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FeeConfig, type GetPlanApplicationErrors, type GetPlanRequest, type GetPlanResponse, type GetPlanStatsApplicationErrors, type GetPlanStatsRequest, type GetPlanStatsResponse, type GetPlansPremiumStatusRequest, type GetPlansPremiumStatusResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListPlansApplicationErrors, type ListPlansOptions, type ListPlansRequest, type ListPlansResponse, type ListPlansValidationErrors, type ListPublicPlansApplicationErrors, type ListPublicPlansOptions, type ListPublicPlansRequest, type ListPublicPlansResponse, type MakePlanPrimaryApplicationErrors, type MakePlanPrimaryRequest, type MakePlanPrimaryResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadataV2, PeriodUnit, type PeriodUnitWithLiterals, type Plan, type PlanArchived, type PlanArchivedEnvelope, type PlanBuyerCanCancelUpdatedEnvelope, type PlanCreatedEnvelope, type PlanUpdatedEnvelope, type PlansQueryBuilder, type PlansQueryResult, type Pricing, type PricingPricingModelOneOf, PublicFilter, type PublicFilterWithLiterals, type PublicPlan, type QueryPublicPlansApplicationErrors, type QueryPublicPlansRequest, type QueryPublicPlansResponse, type QueryPublicPlansValidationErrors, type QueryV2, type Recurrence, type RestoreInfo, type SearchPlansRequest, type SearchPlansResponse, type SetPlanVisibilityApplicationErrors, type SetPlanVisibilityRequest, type SetPlanVisibilityResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StringList, type UpdatePlan, type UpdatePlanApplicationErrors, type UpdatePlanRequest, type UpdatePlanResponse, type UpdatePlanValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, archivePlan, clearPrimary, createPlan, getPlan, getPlanStats, listPlans, listPublicPlans, makePlanPrimary, onPlanArchived, onPlanBuyerCanCancelUpdated, onPlanCreated, onPlanUpdated, queryPublicPlans, setPlanVisibility, updatePlan };
1395
+ export { type ActionEvent, type ApplicationError, AppliedAt, type AppliedAtWithLiterals, type ArchivePlanApplicationErrors, type ArchivePlanRequest, type ArchivePlanResponse, ArchivedFilter, type ArchivedFilterWithLiterals, type ArrangePlansRequest, type ArrangePlansResponse, type BaseEventMetadata, type BulkActionMetadata, type BulkArchivePlanRequest, type BulkArchivePlanResponse, type BulkPlanResult, type BuyerCanCancelUpdated, type ClearPrimaryApplicationErrors, type ClearPrimaryRequest, type ClearPrimaryResponse, type CountPlansRequest, type CountPlansResponse, type CreatePlanApplicationErrors, type CreatePlanRequest, type CreatePlanResponse, type CreatePlanValidationErrors, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type Duration, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fee, type FeeConfig, type GetPlanApplicationErrors, type GetPlanRequest, type GetPlanResponse, type GetPlanStatsApplicationErrors, type GetPlanStatsRequest, type GetPlanStatsResponse, type GetPlansPremiumStatusRequest, type GetPlansPremiumStatusResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ListPlansApplicationErrors, type ListPlansOptions, type ListPlansRequest, type ListPlansResponse, type ListPlansValidationErrors, type ListPublicPlansApplicationErrors, type ListPublicPlansOptions, type ListPublicPlansRequest, type ListPublicPlansResponse, type MakePlanPrimaryApplicationErrors, type MakePlanPrimaryRequest, type MakePlanPrimaryResponse, type MessageEnvelope, type Money, type Paging, type PagingMetadataV2, PeriodUnit, type PeriodUnitWithLiterals, type Plan, type PlanArchived, type PlanArchivedEnvelope, type PlanBuyerCanCancelUpdatedEnvelope, type PlanCreatedEnvelope, type PlanUpdatedEnvelope, type PlansQueryBuilder, type PlansQueryResult, type Pricing, type PricingPricingModelOneOf, PublicFilter, type PublicFilterWithLiterals, type PublicPlan, type QueryPublicPlansApplicationErrors, type QueryPublicPlansRequest, type QueryPublicPlansResponse, type QueryPublicPlansValidationErrors, type QueryV2, type Recurrence, type RestoreInfo, type SearchPlansRequest, type SearchPlansResponse, type SetPlanVisibilityApplicationErrors, type SetPlanVisibilityRequest, type SetPlanVisibilityResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StringList, type UpdatePlan, type UpdatePlanApplicationErrors, type UpdatePlanRequest, type UpdatePlanResponse, type UpdatePlanValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, archivePlan, clearPrimary, createPlan, getPlan, getPlanStats, listPlans, listPublicPlans, makePlanPrimary, onPlanArchived, onPlanBuyerCanCancelUpdated, onPlanCreated, onPlanUpdated, queryPublicPlans, setPlanVisibility, typedQueryPublicPlans, updatePlan };
@@ -15,104 +15,98 @@ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths
15
15
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
16
16
  function resolveComWixpressMembershipV2PlansPlansServiceV2Url(opts) {
17
17
  const domainToMappings = {
18
- "www._base_domain_": [
18
+ "api._api_base_domain_": [
19
19
  {
20
- srcPath: "/_api/paid-plans",
20
+ srcPath: "/plan-proxy",
21
21
  destPath: ""
22
22
  }
23
23
  ],
24
- "forums.wixapps.net": [
24
+ "*.dev.wix-code.com": [
25
25
  {
26
- srcPath: "/_api/paid-plans",
27
- destPath: ""
26
+ srcPath: "/_api/paid-plans/v2/plans",
27
+ destPath: "/v2/plans"
28
28
  }
29
29
  ],
30
- "editor._base_domain_": [
30
+ "*.pub.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
- "blocks._base_domain_": [
36
+ "*.wixapps.net": [
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
- "create.editorx": [
42
+ _: [
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
- _: [
49
- {
50
- srcPath: "/_api/paid-plans",
51
- destPath: ""
52
- },
48
+ "editor-flow.wixapps.net": [
53
49
  {
54
- srcPath: "/paid-plans/v1/orders",
55
- destPath: "/v1/orders"
50
+ srcPath: "/_api/paid-plans/v2/plans",
51
+ destPath: "/v2/plans"
56
52
  }
57
53
  ],
58
- "*.wixapps.net": [
54
+ "editor._base_domain_": [
59
55
  {
60
- srcPath: "/_api/paid-plans",
61
- destPath: ""
56
+ srcPath: "/_api/paid-plans/v2/plans",
57
+ destPath: "/v2/plans"
62
58
  }
63
59
  ],
64
- "*.pub.wix-code.com": [
60
+ "blocks._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
- "*.dev.wix-code.com": [
66
+ "create.editorx": [
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
- "manage._base_domain_": [
77
- {
78
- srcPath: "/_api/paid-plans",
79
- destPath: ""
80
- },
72
+ "editor.wixapps.net": [
81
73
  {
82
- srcPath: "/_api/pricing-plans",
83
- destPath: ""
74
+ srcPath: "/_api/paid-plans/v2/plans",
75
+ destPath: "/v2/plans"
84
76
  }
85
77
  ],
86
78
  "forums._base_domain_": [
87
79
  {
88
- srcPath: "/_api/paid-plans",
89
- destPath: ""
80
+ srcPath: "/_api/paid-plans/v2/plans",
81
+ destPath: "/v2/plans"
90
82
  }
91
83
  ],
92
- "editor-flow.wixapps.net": [
84
+ "forums.wixapps.net": [
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
- "editor.wixapps.net": [
90
+ "manage._base_domain_": [
99
91
  {
100
- srcPath: "/_api/paid-plans",
101
- destPath: ""
92
+ srcPath: "/_api/paid-plans/v2/plans",
93
+ destPath: "/v2/plans"
94
+ },
95
+ {
96
+ srcPath: "/_api/pricing-plans/v2/plans",
97
+ destPath: "/v2/plans"
102
98
  }
103
99
  ],
104
- "api._api_base_domain_": [
105
- {
106
- srcPath: "/membership-api",
107
- destPath: ""
108
- },
100
+ "www._base_domain_": [
109
101
  {
110
- srcPath: "/paid-plans",
111
- destPath: ""
112
- },
102
+ srcPath: "/_api/paid-plans/v2/plans",
103
+ destPath: "/v2/plans"
104
+ }
105
+ ],
106
+ "www.wixapis.com": [
113
107
  {
114
- srcPath: "/_api/paid-plans",
115
- destPath: ""
108
+ srcPath: "/pricing-plans/v2/plans",
109
+ destPath: "/v2/plans"
116
110
  }
117
111
  ]
118
112
  };
@@ -544,6 +538,29 @@ function queryPublicPlans2() {
544
538
  transformationPaths: {}
545
539
  });
546
540
  }
541
+ async function typedQueryPublicPlans(query) {
542
+ const { httpClient, sideEffects } = arguments[1];
543
+ const payload = renameKeysFromSDKRequestToRESTRequest({ query });
544
+ const reqOpts = queryPublicPlans(payload);
545
+ sideEffects?.onSiteCall?.();
546
+ try {
547
+ const result = await httpClient.request(reqOpts);
548
+ sideEffects?.onSuccess?.(result);
549
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
550
+ } catch (err) {
551
+ const transformedError = sdkTransformError(
552
+ err,
553
+ {
554
+ spreadPathsToArguments: {},
555
+ explicitPathsToArguments: { query: "$[0]" },
556
+ singleArgumentUnchanged: false
557
+ },
558
+ ["query"]
559
+ );
560
+ sideEffects?.onError?.(err);
561
+ throw transformedError;
562
+ }
563
+ }
547
564
  async function getPlan2(_id) {
548
565
  const { httpClient, sideEffects } = arguments[1];
549
566
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
@@ -785,6 +802,7 @@ export {
785
802
  makePlanPrimary2 as makePlanPrimary,
786
803
  queryPublicPlans2 as queryPublicPlans,
787
804
  setPlanVisibility2 as setPlanVisibility,
805
+ typedQueryPublicPlans,
788
806
  updatePlan2 as updatePlan
789
807
  };
790
808
  //# sourceMappingURL=index.typings.mjs.map