@schematichq/schematic-typescript-node 1.1.1 → 1.1.4

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 (242) hide show
  1. package/Client.d.ts +10 -0
  2. package/Client.js +88 -0
  3. package/api/resources/accesstokens/client/Client.js +1 -1
  4. package/api/resources/accounts/client/Client.js +14 -14
  5. package/api/resources/billing/client/Client.d.ts +61 -0
  6. package/api/resources/billing/client/Client.js +392 -8
  7. package/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +16 -0
  8. package/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
  9. package/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
  10. package/api/resources/billing/client/requests/index.d.ts +3 -0
  11. package/api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +9 -0
  12. package/api/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +9 -0
  13. package/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +9 -0
  14. package/api/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +9 -0
  15. package/api/resources/billing/types/index.d.ts +4 -0
  16. package/api/resources/billing/types/index.js +4 -0
  17. package/api/resources/companies/client/Client.d.ts +0 -13
  18. package/api/resources/companies/client/Client.js +31 -136
  19. package/api/resources/companies/client/requests/index.d.ts +0 -1
  20. package/api/resources/companies/types/index.d.ts +0 -2
  21. package/api/resources/companies/types/index.js +0 -2
  22. package/api/resources/components/client/Client.d.ts +0 -1
  23. package/api/resources/components/client/Client.js +7 -8
  24. package/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
  25. package/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  26. package/api/resources/crm/client/Client.js +5 -5
  27. package/api/resources/entitlements/client/Client.js +19 -19
  28. package/api/resources/events/client/Client.js +8 -8
  29. package/api/resources/features/client/Client.js +19 -19
  30. package/api/resources/plans/client/Client.d.ts +12 -1
  31. package/api/resources/plans/client/Client.js +99 -11
  32. package/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
  33. package/api/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -2
  34. package/api/resources/{companies/types/ListCompanyPlansResponse.d.ts → plans/types/ListActivePlansResponse.d.ts} +3 -3
  35. package/api/resources/plans/types/index.d.ts +1 -0
  36. package/api/resources/plans/types/index.js +1 -0
  37. package/api/resources/webhooks/client/Client.js +9 -9
  38. package/api/types/BillingPlan.d.ts +11 -0
  39. package/api/types/BillingPlan.js +5 -0
  40. package/api/types/BillingPlanGroupResponseData.d.ts +11 -0
  41. package/api/types/BillingPlanGroupResponseData.js +5 -0
  42. package/api/types/BillingProductForSubscriptionResponseData.d.ts +16 -0
  43. package/api/types/BillingProductForSubscriptionResponseData.js +5 -0
  44. package/api/types/BillingProductPricing.d.ts +2 -0
  45. package/api/types/CompanyDetailResponseData.d.ts +1 -1
  46. package/api/types/CompanySubscriptionResponseData.d.ts +1 -1
  47. package/api/types/PlanDetailResponseData.d.ts +0 -1
  48. package/api/types/PlanResponseData.d.ts +0 -1
  49. package/api/types/index.d.ts +3 -1
  50. package/api/types/index.js +3 -1
  51. package/dist/Client.d.ts +10 -0
  52. package/dist/Client.js +88 -0
  53. package/dist/api/resources/accesstokens/client/Client.js +1 -1
  54. package/dist/api/resources/accounts/client/Client.js +14 -14
  55. package/dist/api/resources/billing/client/Client.d.ts +61 -0
  56. package/dist/api/resources/billing/client/Client.js +392 -8
  57. package/dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +16 -0
  58. package/dist/api/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +5 -0
  59. package/dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
  60. package/dist/api/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +5 -0
  61. package/dist/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
  62. package/dist/api/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +5 -0
  63. package/dist/api/resources/billing/client/requests/index.d.ts +3 -0
  64. package/dist/api/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +9 -0
  65. package/dist/api/resources/billing/types/ChangeSubscriptionWebResponse.js +5 -0
  66. package/dist/api/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +9 -0
  67. package/dist/api/resources/billing/types/CreateBillingPlanGroupResponse.js +5 -0
  68. package/dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +9 -0
  69. package/dist/api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js +5 -0
  70. package/dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +9 -0
  71. package/dist/api/resources/billing/types/UpdateBillingPlanGroupResponse.js +5 -0
  72. package/dist/api/resources/billing/types/index.d.ts +4 -0
  73. package/dist/api/resources/billing/types/index.js +4 -0
  74. package/dist/api/resources/companies/client/Client.d.ts +0 -13
  75. package/dist/api/resources/companies/client/Client.js +31 -136
  76. package/dist/api/resources/companies/client/requests/index.d.ts +0 -1
  77. package/dist/api/resources/companies/types/index.d.ts +0 -2
  78. package/dist/api/resources/companies/types/index.js +0 -2
  79. package/dist/api/resources/components/client/Client.d.ts +0 -1
  80. package/dist/api/resources/components/client/Client.js +7 -8
  81. package/dist/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
  82. package/dist/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  83. package/dist/api/resources/crm/client/Client.js +5 -5
  84. package/dist/api/resources/entitlements/client/Client.js +19 -19
  85. package/dist/api/resources/events/client/Client.js +8 -8
  86. package/dist/api/resources/features/client/Client.js +19 -19
  87. package/dist/api/resources/plans/client/Client.d.ts +12 -1
  88. package/dist/api/resources/plans/client/Client.js +99 -11
  89. package/dist/api/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
  90. package/dist/api/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -2
  91. package/dist/api/resources/{companies/types/ListCompanyPlansResponse.d.ts → plans/types/ListActivePlansResponse.d.ts} +3 -3
  92. package/dist/api/resources/plans/types/ListActivePlansResponse.js +5 -0
  93. package/dist/api/resources/plans/types/index.d.ts +1 -0
  94. package/dist/api/resources/plans/types/index.js +1 -0
  95. package/dist/api/resources/webhooks/client/Client.js +9 -9
  96. package/dist/api/types/BillingPlan.d.ts +11 -0
  97. package/dist/api/types/BillingPlan.js +5 -0
  98. package/dist/api/types/BillingPlanGroupResponseData.d.ts +11 -0
  99. package/dist/api/types/BillingPlanGroupResponseData.js +5 -0
  100. package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +16 -0
  101. package/dist/api/types/BillingProductForSubscriptionResponseData.js +5 -0
  102. package/dist/api/types/BillingProductPricing.d.ts +2 -0
  103. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -1
  104. package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -1
  105. package/dist/api/types/PlanDetailResponseData.d.ts +0 -1
  106. package/dist/api/types/PlanResponseData.d.ts +0 -1
  107. package/dist/api/types/index.d.ts +3 -1
  108. package/dist/api/types/index.js +3 -1
  109. package/dist/events.d.ts +3 -0
  110. package/dist/events.js +17 -5
  111. package/dist/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +14 -0
  112. package/dist/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +35 -0
  113. package/dist/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
  114. package/dist/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +34 -0
  115. package/dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
  116. package/dist/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +34 -0
  117. package/dist/serialization/resources/billing/client/requests/index.d.ts +3 -0
  118. package/dist/serialization/resources/billing/client/requests/index.js +7 -1
  119. package/dist/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +14 -0
  120. package/dist/serialization/resources/{companies/types/ListCompanyPlansParams.js → billing/types/ChangeSubscriptionWebResponse.js} +5 -6
  121. package/dist/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +14 -0
  122. package/{serialization/resources/companies/types/ListCompanyPlansParams.js → dist/serialization/resources/billing/types/CreateBillingPlanGroupResponse.js} +5 -6
  123. package/dist/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +14 -0
  124. package/dist/serialization/resources/{companies/types/ListCompanyPlansResponse.js → billing/types/GetBillingPlanGroupByAccountIdResponse.js} +5 -6
  125. package/dist/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +14 -0
  126. package/{serialization/resources/companies/types/ListCompanyPlansResponse.js → dist/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.js} +5 -6
  127. package/dist/serialization/resources/billing/types/index.d.ts +4 -0
  128. package/dist/serialization/resources/billing/types/index.js +4 -0
  129. package/dist/serialization/resources/companies/types/index.d.ts +0 -2
  130. package/dist/serialization/resources/companies/types/index.js +0 -2
  131. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  132. package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
  133. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  134. package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
  135. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
  136. package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +0 -1
  137. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -1
  138. package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +0 -1
  139. package/dist/serialization/resources/plans/types/ListActivePlansResponse.d.ts +14 -0
  140. package/dist/serialization/resources/plans/types/ListActivePlansResponse.js +35 -0
  141. package/dist/serialization/resources/plans/types/index.d.ts +1 -0
  142. package/dist/serialization/resources/plans/types/index.js +1 -0
  143. package/dist/serialization/types/BillingPlan.d.ts +17 -0
  144. package/dist/serialization/types/BillingPlan.js +38 -0
  145. package/dist/serialization/types/BillingPlanGroupResponseData.d.ts +14 -0
  146. package/dist/serialization/types/BillingPlanGroupResponseData.js +35 -0
  147. package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +22 -0
  148. package/{serialization/types/CompanyPlanResponseData.js → dist/serialization/types/BillingProductForSubscriptionResponseData.js} +9 -4
  149. package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
  150. package/dist/serialization/types/BillingProductPricing.js +2 -0
  151. package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  152. package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
  153. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +2 -2
  154. package/dist/serialization/types/CompanySubscriptionResponseData.js +2 -2
  155. package/dist/serialization/types/PlanDetailResponseData.d.ts +0 -1
  156. package/dist/serialization/types/PlanDetailResponseData.js +0 -1
  157. package/dist/serialization/types/PlanResponseData.d.ts +0 -1
  158. package/dist/serialization/types/PlanResponseData.js +0 -1
  159. package/dist/serialization/types/index.d.ts +3 -1
  160. package/dist/serialization/types/index.js +3 -1
  161. package/dist/wrapper.js +21 -19
  162. package/events.d.ts +3 -0
  163. package/events.js +17 -5
  164. package/package.json +10 -13
  165. package/reference.md +282 -50
  166. package/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.d.ts +14 -0
  167. package/serialization/resources/billing/client/requests/ChangeSubscriptionRequestBody.js +35 -0
  168. package/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.d.ts +13 -0
  169. package/serialization/resources/billing/client/requests/CreateBillingPlanGroupRequestBody.js +34 -0
  170. package/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.d.ts +13 -0
  171. package/serialization/resources/billing/client/requests/UpdateBillingPlanGroupRequestBody.js +34 -0
  172. package/serialization/resources/billing/client/requests/index.d.ts +3 -0
  173. package/serialization/resources/billing/client/requests/index.js +7 -1
  174. package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.d.ts +14 -0
  175. package/serialization/resources/billing/types/ChangeSubscriptionWebResponse.js +35 -0
  176. package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.d.ts +14 -0
  177. package/serialization/resources/billing/types/CreateBillingPlanGroupResponse.js +35 -0
  178. package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.d.ts +14 -0
  179. package/serialization/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js +35 -0
  180. package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.d.ts +14 -0
  181. package/serialization/resources/billing/types/UpdateBillingPlanGroupResponse.js +35 -0
  182. package/serialization/resources/billing/types/index.d.ts +4 -0
  183. package/serialization/resources/billing/types/index.js +4 -0
  184. package/serialization/resources/companies/types/index.d.ts +0 -2
  185. package/serialization/resources/companies/types/index.js +0 -2
  186. package/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
  187. package/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
  188. package/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
  189. package/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
  190. package/serialization/resources/plans/client/requests/CreatePlanRequestBody.d.ts +0 -1
  191. package/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +0 -1
  192. package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.d.ts +0 -1
  193. package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +0 -1
  194. package/serialization/resources/plans/types/ListActivePlansResponse.d.ts +14 -0
  195. package/serialization/resources/plans/types/ListActivePlansResponse.js +35 -0
  196. package/serialization/resources/plans/types/index.d.ts +1 -0
  197. package/serialization/resources/plans/types/index.js +1 -0
  198. package/serialization/types/BillingPlan.d.ts +17 -0
  199. package/serialization/types/BillingPlan.js +38 -0
  200. package/serialization/types/BillingPlanGroupResponseData.d.ts +14 -0
  201. package/serialization/types/BillingPlanGroupResponseData.js +35 -0
  202. package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +22 -0
  203. package/{dist/serialization/types/CompanyPlanResponseData.js → serialization/types/BillingProductForSubscriptionResponseData.js} +9 -4
  204. package/serialization/types/BillingProductPricing.d.ts +2 -0
  205. package/serialization/types/BillingProductPricing.js +2 -0
  206. package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
  207. package/serialization/types/CompanyDetailResponseData.js +2 -1
  208. package/serialization/types/CompanySubscriptionResponseData.d.ts +2 -2
  209. package/serialization/types/CompanySubscriptionResponseData.js +2 -2
  210. package/serialization/types/PlanDetailResponseData.d.ts +0 -1
  211. package/serialization/types/PlanDetailResponseData.js +0 -1
  212. package/serialization/types/PlanResponseData.d.ts +0 -1
  213. package/serialization/types/PlanResponseData.js +0 -1
  214. package/serialization/types/index.d.ts +3 -1
  215. package/serialization/types/index.js +3 -1
  216. package/wrapper.js +21 -19
  217. package/.husky/pre-commit +0 -1
  218. package/api/resources/companies/client/requests/ListCompanyPlansRequest.d.ts +0 -19
  219. package/api/resources/companies/types/ListCompanyPlansParams.d.ts +0 -14
  220. package/api/types/CompanyPlanResponseData.d.ts +0 -11
  221. package/dist/api/resources/companies/client/requests/ListCompanyPlansRequest.d.ts +0 -19
  222. package/dist/api/resources/companies/types/ListCompanyPlansParams.d.ts +0 -14
  223. package/dist/api/types/CompanyPlanResponseData.d.ts +0 -11
  224. package/dist/serialization/resources/companies/types/ListCompanyPlansParams.d.ts +0 -15
  225. package/dist/serialization/resources/companies/types/ListCompanyPlansResponse.d.ts +0 -15
  226. package/dist/serialization/types/CompanyPlanResponseData.d.ts +0 -17
  227. package/dist/version.d.ts +0 -1
  228. package/dist/version.js +0 -4
  229. package/generate-version.js +0 -6
  230. package/serialization/resources/companies/types/ListCompanyPlansParams.d.ts +0 -15
  231. package/serialization/resources/companies/types/ListCompanyPlansResponse.d.ts +0 -15
  232. package/serialization/types/CompanyPlanResponseData.d.ts +0 -17
  233. package/version.d.ts +0 -1
  234. package/version.js +0 -4
  235. /package/api/resources/{companies/client/requests/ListCompanyPlansRequest.js → billing/client/requests/ChangeSubscriptionRequestBody.js} +0 -0
  236. /package/api/resources/{companies/types/ListCompanyPlansParams.js → billing/client/requests/CreateBillingPlanGroupRequestBody.js} +0 -0
  237. /package/api/resources/{companies/types/ListCompanyPlansResponse.js → billing/client/requests/UpdateBillingPlanGroupRequestBody.js} +0 -0
  238. /package/api/{types/CompanyPlanResponseData.js → resources/billing/types/ChangeSubscriptionWebResponse.js} +0 -0
  239. /package/{dist/api/resources/companies/client/requests/ListCompanyPlansRequest.js → api/resources/billing/types/CreateBillingPlanGroupResponse.js} +0 -0
  240. /package/{dist/api/resources/companies/types/ListCompanyPlansParams.js → api/resources/billing/types/GetBillingPlanGroupByAccountIdResponse.js} +0 -0
  241. /package/{dist/api/resources/companies/types/ListCompanyPlansResponse.js → api/resources/billing/types/UpdateBillingPlanGroupResponse.js} +0 -0
  242. /package/{dist/api/types/CompanyPlanResponseData.js → api/resources/plans/types/ListActivePlansResponse.js} +0 -0
package/Client.d.ts CHANGED
@@ -32,6 +32,13 @@ export declare namespace SchematicClient {
32
32
  export declare class SchematicClient {
33
33
  protected readonly _options: SchematicClient.Options;
34
34
  constructor(_options: SchematicClient.Options);
35
+ /**
36
+ * @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @example
39
+ * await client.getCompanyPlans()
40
+ */
41
+ getCompanyPlans(requestOptions?: SchematicClient.RequestOptions): Promise<void>;
35
42
  protected _accounts: Accounts | undefined;
36
43
  get accounts(): Accounts;
37
44
  protected _features: Features | undefined;
@@ -54,4 +61,7 @@ export declare class SchematicClient {
54
61
  get accesstokens(): Accesstokens;
55
62
  protected _webhooks: Webhooks | undefined;
56
63
  get webhooks(): Webhooks;
64
+ protected _getCustomAuthorizationHeaders(): Promise<{
65
+ "X-Schematic-Api-Key": string;
66
+ }>;
57
67
  }
package/Client.js CHANGED
@@ -2,8 +2,47 @@
2
2
  /**
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
5
40
  Object.defineProperty(exports, "__esModule", { value: true });
6
41
  exports.SchematicClient = void 0;
42
+ const environments = __importStar(require("./environments"));
43
+ const core = __importStar(require("./core"));
44
+ const url_join_1 = __importDefault(require("url-join"));
45
+ const errors = __importStar(require("./errors/index"));
7
46
  const Client_1 = require("./api/resources/accounts/client/Client");
8
47
  const Client_2 = require("./api/resources/features/client/Client");
9
48
  const Client_3 = require("./api/resources/billing/client/Client");
@@ -19,6 +58,49 @@ class SchematicClient {
19
58
  constructor(_options) {
20
59
  this._options = _options;
21
60
  }
61
+ /**
62
+ * @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @example
65
+ * await client.getCompanyPlans()
66
+ */
67
+ getCompanyPlans(requestOptions) {
68
+ var _a, _b;
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "company-plans"),
72
+ method: "GET",
73
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
74
+ contentType: "application/json",
75
+ requestType: "json",
76
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
+ });
80
+ if (_response.ok) {
81
+ return;
82
+ }
83
+ if (_response.error.reason === "status-code") {
84
+ throw new errors.SchematicError({
85
+ statusCode: _response.error.statusCode,
86
+ body: _response.error.body,
87
+ });
88
+ }
89
+ switch (_response.error.reason) {
90
+ case "non-json":
91
+ throw new errors.SchematicError({
92
+ statusCode: _response.error.statusCode,
93
+ body: _response.error.rawBody,
94
+ });
95
+ case "timeout":
96
+ throw new errors.SchematicTimeoutError();
97
+ case "unknown":
98
+ throw new errors.SchematicError({
99
+ message: _response.error.errorMessage,
100
+ });
101
+ }
102
+ });
103
+ }
22
104
  get accounts() {
23
105
  var _a;
24
106
  return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Client_1.Accounts(this._options)));
@@ -63,5 +145,11 @@ class SchematicClient {
63
145
  var _a;
64
146
  return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_11.Webhooks(this._options)));
65
147
  }
148
+ _getCustomAuthorizationHeaders() {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
151
+ return { "X-Schematic-Api-Key": apiKeyValue };
152
+ });
153
+ }
66
154
  }
67
155
  exports.SchematicClient = SchematicClient;
@@ -72,7 +72,7 @@ class Accesstokens {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "temporary-access-tokens"),
74
74
  method: "POST",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
76
  contentType: "application/json",
77
77
  requestType: "json",
78
78
  body: serializers.IssueTemporaryAccessTokenRequestBody.jsonOrThrow(request, {
@@ -81,7 +81,7 @@ class Accounts {
81
81
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
82
82
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -174,7 +174,7 @@ class Accounts {
174
174
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
175
175
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys"),
176
176
  method: "POST",
177
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
177
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
178
178
  contentType: "application/json",
179
179
  requestType: "json",
180
180
  body: serializers.CreateApiKeyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -265,7 +265,7 @@ class Accounts {
265
265
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
266
266
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
267
267
  method: "GET",
268
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
268
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
269
269
  contentType: "application/json",
270
270
  requestType: "json",
271
271
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -357,7 +357,7 @@ class Accounts {
357
357
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
358
358
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
359
359
  method: "PUT",
360
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
360
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
361
361
  contentType: "application/json",
362
362
  requestType: "json",
363
363
  body: serializers.UpdateApiKeyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -456,7 +456,7 @@ class Accounts {
456
456
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
457
457
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-keys/${encodeURIComponent(apiKeyId)}`),
458
458
  method: "DELETE",
459
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
459
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
460
460
  contentType: "application/json",
461
461
  requestType: "json",
462
462
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -560,7 +560,7 @@ class Accounts {
560
560
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
561
561
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-keys/count"),
562
562
  method: "GET",
563
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
563
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
564
564
  contentType: "application/json",
565
565
  queryParameters: _queryParams,
566
566
  requestType: "json",
@@ -668,7 +668,7 @@ class Accounts {
668
668
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
669
669
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-requests"),
670
670
  method: "GET",
671
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
671
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
672
672
  contentType: "application/json",
673
673
  queryParameters: _queryParams,
674
674
  requestType: "json",
@@ -759,7 +759,7 @@ class Accounts {
759
759
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
760
760
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `api-requests/${encodeURIComponent(apiRequestId)}`),
761
761
  method: "GET",
762
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
762
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
763
763
  contentType: "application/json",
764
764
  requestType: "json",
765
765
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -866,7 +866,7 @@ class Accounts {
866
866
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
867
867
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "api-requests/count"),
868
868
  method: "GET",
869
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
869
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
870
870
  contentType: "application/json",
871
871
  queryParameters: _queryParams,
872
872
  requestType: "json",
@@ -973,7 +973,7 @@ class Accounts {
973
973
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
974
974
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "environments"),
975
975
  method: "GET",
976
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
976
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
977
977
  contentType: "application/json",
978
978
  queryParameters: _queryParams,
979
979
  requestType: "json",
@@ -1067,7 +1067,7 @@ class Accounts {
1067
1067
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1068
1068
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "environments"),
1069
1069
  method: "POST",
1070
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1070
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1071
1071
  contentType: "application/json",
1072
1072
  requestType: "json",
1073
1073
  body: serializers.CreateEnvironmentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1158,7 +1158,7 @@ class Accounts {
1158
1158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1159
1159
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1160
1160
  method: "GET",
1161
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1161
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1162
1162
  contentType: "application/json",
1163
1163
  requestType: "json",
1164
1164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1250,7 +1250,7 @@ class Accounts {
1250
1250
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1251
1251
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1252
1252
  method: "PUT",
1253
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1253
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1254
1254
  contentType: "application/json",
1255
1255
  requestType: "json",
1256
1256
  body: serializers.UpdateEnvironmentRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1349,7 +1349,7 @@ class Accounts {
1349
1349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1350
1350
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, `environments/${encodeURIComponent(environmentId)}`),
1351
1351
  method: "DELETE",
1352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1352
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1353
1353
  contentType: "application/json",
1354
1354
  requestType: "json",
1355
1355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -69,6 +69,50 @@ export declare class Billing {
69
69
  * await client.billing.countCustomers()
70
70
  */
71
71
  countCustomers(request?: Schematic.CountCustomersRequest, requestOptions?: Billing.RequestOptions): Promise<Schematic.CountCustomersResponse>;
72
+ /**
73
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @throws {@link Schematic.UnauthorizedError}
76
+ * @throws {@link Schematic.ForbiddenError}
77
+ * @throws {@link Schematic.NotFoundError}
78
+ * @throws {@link Schematic.InternalServerError}
79
+ *
80
+ * @example
81
+ * await client.billing.getBillingPlanGroupByAccountId()
82
+ */
83
+ getBillingPlanGroupByAccountId(requestOptions?: Billing.RequestOptions): Promise<Schematic.GetBillingPlanGroupByAccountIdResponse>;
84
+ /**
85
+ * @param {Schematic.CreateBillingPlanGroupRequestBody} request
86
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
87
+ *
88
+ * @throws {@link Schematic.BadRequestError}
89
+ * @throws {@link Schematic.UnauthorizedError}
90
+ * @throws {@link Schematic.ForbiddenError}
91
+ * @throws {@link Schematic.InternalServerError}
92
+ *
93
+ * @example
94
+ * await client.billing.createBillingPlanGroup({
95
+ * planIds: ["plan_ids"]
96
+ * })
97
+ */
98
+ createBillingPlanGroup(request: Schematic.CreateBillingPlanGroupRequestBody, requestOptions?: Billing.RequestOptions): Promise<Schematic.CreateBillingPlanGroupResponse>;
99
+ /**
100
+ * @param {string} billingId - billing_id
101
+ * @param {Schematic.UpdateBillingPlanGroupRequestBody} request
102
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
103
+ *
104
+ * @throws {@link Schematic.BadRequestError}
105
+ * @throws {@link Schematic.UnauthorizedError}
106
+ * @throws {@link Schematic.ForbiddenError}
107
+ * @throws {@link Schematic.NotFoundError}
108
+ * @throws {@link Schematic.InternalServerError}
109
+ *
110
+ * @example
111
+ * await client.billing.updateBillingPlanGroup("billing_id", {
112
+ * planIds: ["plan_ids"]
113
+ * })
114
+ */
115
+ updateBillingPlanGroup(billingId: string, request: Schematic.UpdateBillingPlanGroupRequestBody, requestOptions?: Billing.RequestOptions): Promise<Schematic.UpdateBillingPlanGroupResponse>;
72
116
  /**
73
117
  * @param {Schematic.CreateBillingPriceRequestBody} request
74
118
  * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
@@ -154,6 +198,23 @@ export declare class Billing {
154
198
  * })
155
199
  */
156
200
  upsertBillingSubscription(request: Schematic.CreateBillingSubscriptionsRequestBody, requestOptions?: Billing.RequestOptions): Promise<Schematic.UpsertBillingSubscriptionResponse>;
201
+ /**
202
+ * @param {Schematic.ChangeSubscriptionRequestBody} request
203
+ * @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
204
+ *
205
+ * @throws {@link Schematic.BadRequestError}
206
+ * @throws {@link Schematic.UnauthorizedError}
207
+ * @throws {@link Schematic.ForbiddenError}
208
+ * @throws {@link Schematic.InternalServerError}
209
+ *
210
+ * @example
211
+ * await client.billing.changeSubscriptionWeb({
212
+ * action: "action",
213
+ * newPlanId: "new_plan_id",
214
+ * newPriceId: "new_price_id"
215
+ * })
216
+ */
217
+ changeSubscriptionWeb(request: Schematic.ChangeSubscriptionRequestBody, requestOptions?: Billing.RequestOptions): Promise<Schematic.ChangeSubscriptionWebResponse>;
157
218
  protected _getCustomAuthorizationHeaders(): Promise<{
158
219
  "X-Schematic-Api-Key": string;
159
220
  }>;