@schematichq/schematic-typescript-node 1.1.0 → 1.1.2
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.
- package/README.md +19 -11
- package/api/resources/accesstokens/client/Client.js +1 -1
- package/api/resources/accounts/client/Client.js +14 -14
- package/api/resources/billing/client/Client.js +8 -8
- package/api/resources/companies/client/Client.js +32 -32
- package/api/resources/components/client/Client.d.ts +0 -1
- package/api/resources/components/client/Client.js +7 -8
- package/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
- package/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
- package/api/resources/crm/client/Client.js +5 -5
- package/api/resources/entitlements/client/Client.js +19 -19
- package/api/resources/events/client/Client.js +8 -8
- package/api/resources/features/client/Client.js +19 -19
- package/api/resources/plans/client/Client.js +18 -12
- package/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
- package/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
- package/api/resources/plans/types/CountPlansParams.d.ts +3 -0
- package/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
- package/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
- package/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
- package/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
- package/api/resources/plans/types/ListPlansParams.d.ts +3 -0
- package/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
- package/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
- package/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
- package/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
- package/api/resources/plans/types/index.d.ts +4 -0
- package/api/resources/plans/types/index.js +4 -0
- package/api/resources/webhooks/client/Client.js +9 -9
- package/api/types/ComponentResponseData.d.ts +1 -1
- package/dist/api/resources/accesstokens/client/Client.js +1 -1
- package/dist/api/resources/accounts/client/Client.js +14 -14
- package/dist/api/resources/billing/client/Client.js +8 -8
- package/dist/api/resources/companies/client/Client.js +32 -32
- package/dist/api/resources/components/client/Client.d.ts +0 -1
- package/dist/api/resources/components/client/Client.js +7 -8
- package/dist/api/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -2
- package/dist/api/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
- package/dist/api/resources/crm/client/Client.js +5 -5
- package/dist/api/resources/entitlements/client/Client.js +19 -19
- package/dist/api/resources/events/client/Client.js +8 -8
- package/dist/api/resources/features/client/Client.js +19 -19
- package/dist/api/resources/plans/client/Client.js +18 -12
- package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -0
- package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -0
- package/dist/api/resources/plans/types/CountPlansParams.d.ts +3 -0
- package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +11 -0
- package/dist/api/resources/plans/types/CountPlansRequestPlanType.js +10 -0
- package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +11 -0
- package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.js +10 -0
- package/dist/api/resources/plans/types/ListPlansParams.d.ts +3 -0
- package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +11 -0
- package/dist/api/resources/plans/types/ListPlansRequestPlanType.js +10 -0
- package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +11 -0
- package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.js +10 -0
- package/dist/api/resources/plans/types/index.d.ts +4 -0
- package/dist/api/resources/plans/types/index.js +4 -0
- package/dist/api/resources/webhooks/client/Client.js +9 -9
- package/dist/api/types/ComponentResponseData.d.ts +1 -1
- package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
- package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
- package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
- package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
- package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
- package/dist/serialization/resources/plans/types/CountPlansParams.js +2 -0
- package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
- package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
- package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
- package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.js +2 -0
- package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
- package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
- package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
- package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
- package/dist/serialization/resources/plans/types/index.d.ts +4 -0
- package/dist/serialization/resources/plans/types/index.js +4 -0
- package/dist/serialization/types/ComponentResponseData.d.ts +1 -1
- package/dist/serialization/types/ComponentResponseData.js +1 -1
- package/dist/wrapper.d.ts +2 -1
- package/dist/wrapper.js +3 -6
- package/package.json +10 -13
- package/reference.md +0 -1
- package/serialization/resources/components/client/requests/CreateComponentRequestBody.d.ts +1 -1
- package/serialization/resources/components/client/requests/CreateComponentRequestBody.js +1 -1
- package/serialization/resources/components/client/requests/UpdateComponentRequestBody.d.ts +1 -1
- package/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +1 -1
- package/serialization/resources/plans/types/CountPlansParams.d.ts +2 -0
- package/serialization/resources/plans/types/CountPlansParams.js +2 -0
- package/serialization/resources/plans/types/CountPlansRequestPlanType.d.ts +10 -0
- package/serialization/resources/plans/types/CountPlansRequestPlanType.js +31 -0
- package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +10 -0
- package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +31 -0
- package/serialization/resources/plans/types/ListPlansParams.d.ts +2 -0
- package/serialization/resources/plans/types/ListPlansParams.js +2 -0
- package/serialization/resources/plans/types/ListPlansRequestPlanType.d.ts +10 -0
- package/serialization/resources/plans/types/ListPlansRequestPlanType.js +31 -0
- package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +10 -0
- package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +31 -0
- package/serialization/resources/plans/types/index.d.ts +4 -0
- package/serialization/resources/plans/types/index.js +4 -0
- package/serialization/types/ComponentResponseData.d.ts +1 -1
- package/serialization/types/ComponentResponseData.js +1 -1
- package/wrapper.d.ts +2 -1
- package/wrapper.js +3 -6
- package/.husky/pre-commit +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/generate-version.js +0 -6
- package/version.d.ts +0 -1
- package/version.js +0 -4
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(
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
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.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
84
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
177
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
268
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
360
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
459
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
563
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
671
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
762
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
869
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
976
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
1070
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
1161
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
1253
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
1352
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
188
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
296
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
392
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
505
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
602
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
715
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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.
|
|
815
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.2", "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, {
|