@schematichq/schematic-typescript-node 1.1.0 → 1.1.1

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 (94) hide show
  1. package/README.md +19 -11
  2. package/api/resources/accesstokens/client/Client.js +1 -1
  3. package/api/resources/accounts/client/Client.js +14 -14
  4. package/api/resources/billing/client/Client.js +8 -8
  5. package/api/resources/companies/client/Client.js +32 -32
  6. package/api/resources/components/client/Client.js +7 -7
  7. package/api/resources/crm/client/Client.js +5 -5
  8. package/api/resources/entitlements/client/Client.js +19 -19
  9. package/api/resources/events/client/Client.js +8 -8
  10. package/api/resources/features/client/Client.js +19 -19
  11. package/api/resources/plans/client/Client.js +18 -12
  12. package/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
  13. package/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
  14. package/api/resources/plans/types/CountPlansParams.d.ts +3 -0
  15. package/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
  16. package/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
  17. package/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
  18. package/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
  19. package/api/resources/plans/types/ListPlansParams.d.ts +3 -0
  20. package/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
  21. package/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
  22. package/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
  23. package/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
  24. package/api/resources/plans/types/index.d.ts +4 -0
  25. package/api/resources/plans/types/index.js +4 -0
  26. package/api/resources/webhooks/client/Client.js +9 -9
  27. package/api/types/ComponentResponseData.d.ts +1 -1
  28. package/dist/api/resources/accesstokens/client/Client.js +1 -1
  29. package/dist/api/resources/accounts/client/Client.js +14 -14
  30. package/dist/api/resources/billing/client/Client.js +8 -8
  31. package/dist/api/resources/companies/client/Client.js +32 -32
  32. package/dist/api/resources/components/client/Client.js +7 -7
  33. package/dist/api/resources/crm/client/Client.js +5 -5
  34. package/dist/api/resources/entitlements/client/Client.js +19 -19
  35. package/dist/api/resources/events/client/Client.js +8 -8
  36. package/dist/api/resources/features/client/Client.js +19 -19
  37. package/dist/api/resources/plans/client/Client.js +18 -12
  38. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
  39. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
  40. package/dist/api/resources/plans/types/CountPlansParams.d.ts +3 -0
  41. package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
  42. package/dist/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
  43. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
  44. package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
  45. package/dist/api/resources/plans/types/ListPlansParams.d.ts +3 -0
  46. package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
  47. package/dist/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
  48. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
  49. package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
  50. package/dist/api/resources/plans/types/index.d.ts +4 -0
  51. package/dist/api/resources/plans/types/index.js +4 -0
  52. package/dist/api/resources/webhooks/client/Client.js +9 -9
  53. package/dist/api/types/ComponentResponseData.d.ts +1 -1
  54. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  55. package/dist/serialization/resources/plans/types/CountPlansParams.js +2 -0
  56. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
  57. package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
  58. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
  59. package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
  60. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  61. package/dist/serialization/resources/plans/types/ListPlansParams.js +2 -0
  62. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
  63. package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
  64. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
  65. package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
  66. package/dist/serialization/resources/plans/types/index.d.ts +4 -0
  67. package/dist/serialization/resources/plans/types/index.js +4 -0
  68. package/dist/serialization/types/ComponentResponseData.d.ts +1 -1
  69. package/dist/serialization/types/ComponentResponseData.js +1 -1
  70. package/dist/version.d.ts +1 -1
  71. package/dist/version.js +1 -1
  72. package/dist/wrapper.d.ts +2 -1
  73. package/dist/wrapper.js +2 -2
  74. package/package.json +1 -1
  75. package/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
  76. package/serialization/resources/plans/types/CountPlansParams.js +2 -0
  77. package/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
  78. package/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
  79. package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
  80. package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
  81. package/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
  82. package/serialization/resources/plans/types/ListPlansParams.js +2 -0
  83. package/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
  84. package/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
  85. package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
  86. package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
  87. package/serialization/resources/plans/types/index.d.ts +4 -0
  88. package/serialization/resources/plans/types/index.js +4 -0
  89. package/serialization/types/ComponentResponseData.d.ts +1 -1
  90. package/serialization/types/ComponentResponseData.js +1 -1
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/wrapper.d.ts +2 -1
  94. package/wrapper.js +2 -2
package/README.md CHANGED
@@ -20,7 +20,7 @@ pnpm add @schematichq/schematic-typescript-node
20
20
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
21
21
 
22
22
  const apiKey = process.env.SCHEMATIC_API_KEY;
23
- const client = new SchematicClient(apiKey);
23
+ const client = new SchematicClient({ apiKey });
24
24
 
25
25
  // interactions with the client
26
26
 
@@ -35,7 +35,8 @@ import { LocalCache, SchematicClient } from "@schematichq/schematic-typescript-n
35
35
  const apiKey = process.env.SCHEMATIC_API_KEY;
36
36
  const cacheSize = 100;
37
37
  const cacheTTL = 1000; // in milliseconds
38
- const client = new SchematicClient(apiKey, {
38
+ const client = new SchematicClient({
39
+ apiKey,
39
40
  cacheProviders: {
40
41
  flagChecks: [new LocalCache<boolean>({ size: cacheSize, ttl: cacheTTL })],
41
42
  },
@@ -52,7 +53,8 @@ You can also disable local caching entirely with an initialization option; bear
52
53
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
53
54
 
54
55
  const apiKey = process.env.SCHEMATIC_API_KEY;
55
- const client = new SchematicClient(apiKey, {
56
+ const client = new SchematicClient({
57
+ apiKey,
56
58
  cacheProviders: {
57
59
  flagChecks: [],
58
60
  },
@@ -69,7 +71,8 @@ You may want to specify default flag values for your application, which will be
69
71
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
70
72
 
71
73
  const apiKey = process.env.SCHEMATIC_API_KEY;
72
- const client = new SchematicClient(apiKey, {
74
+ const client = new SchematicClient({
75
+ apiKey,
73
76
  flagDefaults: {
74
77
  "some-flag-key": true,
75
78
  },
@@ -89,7 +92,8 @@ Create or update users and companies using identify events.
89
92
  ```ts
90
93
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
91
94
 
92
- const client = new SchematicClient(process.env.SCHEMATIC_API_KEY);
95
+ const apiKey = process.env.SCHEMATIC_API_KEY;
96
+ const client = new SchematicClient({ apiKey });
93
97
 
94
98
  client.identify({
95
99
  company: {
@@ -119,7 +123,8 @@ Track activity in your application using track events; these events can later be
119
123
  ```ts
120
124
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
121
125
 
122
- const client = new SchematicClient(process.env.SCHEMATIC_API_KEY);
126
+ const apiKey = process.env.SCHEMATIC_API_KEY;
127
+ const client = new SchematicClient({ apiKey });
123
128
 
124
129
  client.track({
125
130
  event: "some-action",
@@ -144,7 +149,8 @@ Although it is faster to create companies and users via identify events, if you
144
149
  ```ts
145
150
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
146
151
 
147
- const client = new SchematicClient(process.env.SCHEMATIC_API_KEY);
152
+ const apiKey = process.env.SCHEMATIC_API_KEY;
153
+ const client = new SchematicClient({ apiKey });
148
154
 
149
155
  const body = {
150
156
  keys: {
@@ -179,7 +185,8 @@ Similarly, you can upsert users using the Schematic API, as an alternative to us
179
185
  ```ts
180
186
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
181
187
 
182
- const client = new SchematicClient(process.env.SCHEMATIC_API_KEY);
188
+ const apiKey = process.env.SCHEMATIC_API_KEY;
189
+ const client = new SchematicClient({ apiKey });
183
190
 
184
191
  const body = {
185
192
  keys: {
@@ -216,7 +223,8 @@ When checking a flag, you'll provide keys for a company and/or keys for a user.
216
223
  ```ts
217
224
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
218
225
 
219
- const client = new SchematicClient(process.env.SCHEMATIC_API_KEY);
226
+ const apiKey = process.env.SCHEMATIC_API_KEY;
227
+ const client = new SchematicClient({ apiKey });
220
228
 
221
229
  const evaluationCtx = {
222
230
  company: { id: "your-company-id" },
@@ -253,7 +261,7 @@ In development or testing environments, you may want to avoid making network req
253
261
  ```ts
254
262
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
255
263
 
256
- const client = new SchematicClient("", { offline: true });
264
+ const client = new SchematicClient({ offline: true });
257
265
 
258
266
  client.close();
259
267
  ```
@@ -263,7 +271,7 @@ Offline mode works well with flag defaults:
263
271
  ```ts
264
272
  import { SchematicClient } from "@schematichq/schematic-typescript-node";
265
273
 
266
- const client = new SchematicClient("", {
274
+ const client = new SchematicClient({
267
275
  flagDefaults: { "some-flag-key": true },
268
276
  offline: true,
269
277
  });
@@ -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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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.0", "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.1", "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,
@@ -75,7 +75,7 @@ class Billing {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customer/upsert"),
77
77
  method: "POST",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ 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())),
79
79
  contentType: "application/json",
80
80
  requestType: "json",
81
81
  body: serializers.CreateBillingCustomerRequestBody.jsonOrThrow(request, {
@@ -185,7 +185,7 @@ class Billing {
185
185
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
186
186
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customers"),
187
187
  method: "GET",
188
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
188
+ 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())),
189
189
  contentType: "application/json",
190
190
  queryParameters: _queryParams,
191
191
  requestType: "json",
@@ -293,7 +293,7 @@ class Billing {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/customers/count"),
295
295
  method: "GET",
296
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
296
+ 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())),
297
297
  contentType: "application/json",
298
298
  queryParameters: _queryParams,
299
299
  requestType: "json",
@@ -389,7 +389,7 @@ class Billing {
389
389
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
390
390
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/price/upsert"),
391
391
  method: "POST",
392
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
392
+ 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())),
393
393
  contentType: "application/json",
394
394
  requestType: "json",
395
395
  body: serializers.CreateBillingPriceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -502,7 +502,7 @@ class Billing {
502
502
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
503
503
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/product/prices"),
504
504
  method: "GET",
505
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
505
+ 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())),
506
506
  contentType: "application/json",
507
507
  queryParameters: _queryParams,
508
508
  requestType: "json",
@@ -599,7 +599,7 @@ class Billing {
599
599
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
600
600
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/product/upsert"),
601
601
  method: "POST",
602
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
602
+ 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())),
603
603
  contentType: "application/json",
604
604
  requestType: "json",
605
605
  body: serializers.CreateBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -712,7 +712,7 @@ class Billing {
712
712
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
713
713
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/products"),
714
714
  method: "GET",
715
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
715
+ 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())),
716
716
  contentType: "application/json",
717
717
  queryParameters: _queryParams,
718
718
  requestType: "json",
@@ -812,7 +812,7 @@ class Billing {
812
812
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
813
813
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SchematicEnvironment.Default, "billing/subscription/upsert"),
814
814
  method: "POST",
815
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
815
+ 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())),
816
816
  contentType: "application/json",
817
817
  requestType: "json",
818
818
  body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {