graphor 0.4.1 → 0.4.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/CHANGELOG.md +24 -44
- package/LICENSE +1 -1
- package/README.md +37 -33
- package/client.d.mts +16 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -15
- package/client.d.ts.map +1 -1
- package/client.js +46 -47
- package/client.js.map +1 -1
- package/client.mjs +44 -45
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/sources.d.mts +9 -6
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +9 -6
- package/resources/sources.d.ts.map +1 -1
- package/src/client.ts +37 -37
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/index.ts +1 -1
- package/src/resources/sources.ts +18 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,66 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.4.
|
|
3
|
+
## 0.4.2 (2026-02-10)
|
|
4
4
|
|
|
5
|
-
Full Changelog: [v0.
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
9
|
-
* **client:** avoid memory leak with abort signals ([15e14bd](https://github.com/synapseops/graphor-typescript-sdk/commit/15e14bd243787944a5fe5421a88b1e2de8403840))
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Chores
|
|
13
|
-
|
|
14
|
-
* **client:** do not parse responses with empty content-length ([b91e45d](https://github.com/synapseops/graphor-typescript-sdk/commit/b91e45de2e60f565abd800aa72d77b1c86317590))
|
|
15
|
-
* configure new SDK language ([da4ce18](https://github.com/synapseops/graphor-typescript-sdk/commit/da4ce1872ff957d203ed135c297d693a28a18309))
|
|
16
|
-
|
|
17
|
-
## 0.4.0 (2026-01-29)
|
|
18
|
-
|
|
19
|
-
Full Changelog: [v0.3.0...v0.4.0](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.3.0...v0.4.0)
|
|
5
|
+
Full Changelog: [v0.0.1...v0.4.2](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.0.1...v0.4.2)
|
|
20
6
|
|
|
21
7
|
### Features
|
|
22
8
|
|
|
23
9
|
* **api:** api update ([0f686b0](https://github.com/synapseops/graphor-typescript-sdk/commit/0f686b0bd56368415eb50b140a8c14bb337f0b38))
|
|
10
|
+
* **api:** api update ([f11be93](https://github.com/synapseops/graphor-typescript-sdk/commit/f11be9365691e89aad88d54c9fa5d4e11ed9f7cd))
|
|
11
|
+
* **api:** api update ([d32277d](https://github.com/synapseops/graphor-typescript-sdk/commit/d32277ddb7fdaf1eb85ed18780a5bafcc033fd1c))
|
|
12
|
+
* **api:** api update ([5ad42fd](https://github.com/synapseops/graphor-typescript-sdk/commit/5ad42fde9cb0162dd29758dfd820fcec62d192b8))
|
|
13
|
+
* **api:** manual updates ([25ea06d](https://github.com/synapseops/graphor-typescript-sdk/commit/25ea06d24da0bb21e0c78594fcd31bcd29cd98bf))
|
|
14
|
+
* **api:** manual updates ([a783c74](https://github.com/synapseops/graphor-typescript-sdk/commit/a783c74a9b59a8f35da65281129fa4df3dfcf2d1))
|
|
15
|
+
* **api:** manual updates ([1f997a8](https://github.com/synapseops/graphor-typescript-sdk/commit/1f997a8e571bd09556858368adfc5d0084712189))
|
|
16
|
+
* **api:** manual updates ([8e982cb](https://github.com/synapseops/graphor-typescript-sdk/commit/8e982cb5568ec0bac99339b768dc1fb4b50c5d64))
|
|
24
17
|
|
|
25
|
-
## 0.3.0 (2026-01-26)
|
|
26
|
-
|
|
27
|
-
Full Changelog: [v0.2.0...v0.3.0](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.2.0...v0.3.0)
|
|
28
18
|
|
|
29
|
-
###
|
|
19
|
+
### Bug Fixes
|
|
30
20
|
|
|
31
|
-
* **
|
|
32
|
-
* **api:** api update ([d32277d](https://github.com/synapseops/graphor-typescript-sdk/commit/d32277ddb7fdaf1eb85ed18780a5bafcc033fd1c))
|
|
21
|
+
* **client:** avoid memory leak with abort signals ([15e14bd](https://github.com/synapseops/graphor-typescript-sdk/commit/15e14bd243787944a5fe5421a88b1e2de8403840))
|
|
33
22
|
|
|
34
23
|
|
|
35
24
|
### Chores
|
|
36
25
|
|
|
37
26
|
* **ci:** upgrade `actions/github-script` ([b77f1ee](https://github.com/synapseops/graphor-typescript-sdk/commit/b77f1ee991cd4a12fc66783f92d80948389d265a))
|
|
27
|
+
* **client:** do not parse responses with empty content-length ([b91e45d](https://github.com/synapseops/graphor-typescript-sdk/commit/b91e45de2e60f565abd800aa72d77b1c86317590))
|
|
28
|
+
* configure new SDK language ([f078283](https://github.com/synapseops/graphor-typescript-sdk/commit/f07828334f19fdf42304cb3da859d4fc4bb48f01))
|
|
29
|
+
* configure new SDK language ([da4ce18](https://github.com/synapseops/graphor-typescript-sdk/commit/da4ce1872ff957d203ed135c297d693a28a18309))
|
|
38
30
|
* **internal:** update `actions/checkout` version ([39004f9](https://github.com/synapseops/graphor-typescript-sdk/commit/39004f98547edfcba6aeee3f57a731ab4e9d7c19))
|
|
39
31
|
* **internal:** update lock file ([fd16cec](https://github.com/synapseops/graphor-typescript-sdk/commit/fd16cece35d8b7d1acb4c383c4ce8f13deb358fa))
|
|
40
32
|
* **internal:** upgrade babel, qs, js-yaml ([b79e597](https://github.com/synapseops/graphor-typescript-sdk/commit/b79e597c30e17c90b1825189d5d1ece9f924403b))
|
|
41
33
|
* **internal:** upgrade brace-expansion and @babel/helpers ([647d7af](https://github.com/synapseops/graphor-typescript-sdk/commit/647d7af3bdfb9304a08025bf34f2639d38aece54))
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
|
|
51
|
-
## 0.1.0 (2026-01-09)
|
|
52
|
-
|
|
53
|
-
Full Changelog: [v0.0.1...v0.1.0](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.0.1...v0.1.0)
|
|
54
|
-
|
|
55
|
-
### Features
|
|
56
|
-
|
|
57
|
-
* **api:** api update ([5ad42fd](https://github.com/synapseops/graphor-typescript-sdk/commit/5ad42fde9cb0162dd29758dfd820fcec62d192b8))
|
|
58
|
-
* **api:** manual updates ([a783c74](https://github.com/synapseops/graphor-typescript-sdk/commit/a783c74a9b59a8f35da65281129fa4df3dfcf2d1))
|
|
59
|
-
* **api:** manual updates ([1f997a8](https://github.com/synapseops/graphor-typescript-sdk/commit/1f997a8e571bd09556858368adfc5d0084712189))
|
|
60
|
-
* **api:** manual updates ([8e982cb](https://github.com/synapseops/graphor-typescript-sdk/commit/8e982cb5568ec0bac99339b768dc1fb4b50c5d64))
|
|
34
|
+
* sync repo ([392f73f](https://github.com/synapseops/graphor-typescript-sdk/commit/392f73f00e137758492cbc146fb883ca9015eb70))
|
|
35
|
+
* sync repo ([9a78c9d](https://github.com/synapseops/graphor-typescript-sdk/commit/9a78c9d4fcd6c9e43e77e229162788adaa662fa0))
|
|
36
|
+
* update SDK settings ([2bdc306](https://github.com/synapseops/graphor-typescript-sdk/commit/2bdc3062b283ef55e183276074c386f60557e4d0))
|
|
37
|
+
* update SDK settings ([31015b6](https://github.com/synapseops/graphor-typescript-sdk/commit/31015b63cac9e20bccefe35ecbc30f13d181e565))
|
|
38
|
+
* update SDK settings ([970a15b](https://github.com/synapseops/graphor-typescript-sdk/commit/970a15b9c0e93eb9d1887c7f55e9219b46aa928d))
|
|
39
|
+
* update SDK settings ([22390b1](https://github.com/synapseops/graphor-typescript-sdk/commit/22390b100985f7ad43ab15d444ce6da5738f6958))
|
|
40
|
+
* update SDK settings ([4d361ac](https://github.com/synapseops/graphor-typescript-sdk/commit/4d361acab60cca536b3528cc696ebdf82c614437))
|
|
41
|
+
* update SDK settings ([73a01be](https://github.com/synapseops/graphor-typescript-sdk/commit/73a01be740cf289e84cb40b4451ae5f2fdd10d87))
|
|
61
42
|
|
|
62
43
|
|
|
63
|
-
###
|
|
44
|
+
### Documentation
|
|
64
45
|
|
|
65
|
-
* update
|
|
66
|
-
* update SDK settings ([73a01be](https://github.com/synapseops/graphor-typescript-sdk/commit/73a01be740cf289e84cb40b4451ae5f2fdd10d87))
|
|
46
|
+
* **readme:** update ([dded427](https://github.com/synapseops/graphor-typescript-sdk/commit/dded42711e175b45ee3916ec13a8640d82aa93c7))
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2026 Graphor
|
|
189
|
+
Copyright 2026 Graphor Prd
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Graphor TypeScript API Library
|
|
1
|
+
# Graphor Prd TypeScript API Library
|
|
2
2
|
|
|
3
3
|
[>)](https://npmjs.org/package/graphor) 
|
|
4
4
|
|
|
5
|
-
This library provides convenient access to the Graphor REST API from server-side TypeScript or JavaScript.
|
|
5
|
+
This library provides convenient access to the Graphor Prd REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
7
7
|
The full API of this library can be found in [api.md](api.md).
|
|
8
8
|
|
|
@@ -10,10 +10,10 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
|
10
10
|
|
|
11
11
|
## MCP Server
|
|
12
12
|
|
|
13
|
-
Use the Graphor MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
13
|
+
Use the Graphor Prd MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
14
14
|
|
|
15
|
-
[](https://cursor.com/en-US/install-mcp?name=graphor-mcp&config=
|
|
16
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22graphor-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22graphor-mcp%22%5D%2C%22env%22%3A%7B%
|
|
15
|
+
[](https://cursor.com/en-US/install-mcp?name=graphor-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImdyYXBob3ItbWNwIl0sImVudiI6eyJHUkFQSE9SX1BSRF9BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)
|
|
16
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22graphor-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22graphor-mcp%22%5D%2C%22env%22%3A%7B%22GRAPHOR_PRD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
17
17
|
|
|
18
18
|
> Note: You may need to set environment variables in your MCP client.
|
|
19
19
|
|
|
@@ -29,9 +29,11 @@ The full API of this library can be found in [api.md](api.md).
|
|
|
29
29
|
|
|
30
30
|
<!-- prettier-ignore -->
|
|
31
31
|
```js
|
|
32
|
-
import
|
|
32
|
+
import GraphorPrd from 'graphor';
|
|
33
33
|
|
|
34
|
-
const client = new
|
|
34
|
+
const client = new GraphorPrd({
|
|
35
|
+
apiKey: process.env['GRAPHOR_PRD_API_KEY'], // This is the default and can be omitted
|
|
36
|
+
});
|
|
35
37
|
|
|
36
38
|
const publicSource = await client.sources.upload({ file: fs.createReadStream('path/to/file') });
|
|
37
39
|
|
|
@@ -44,12 +46,14 @@ This library includes TypeScript definitions for all request params and response
|
|
|
44
46
|
|
|
45
47
|
<!-- prettier-ignore -->
|
|
46
48
|
```ts
|
|
47
|
-
import
|
|
49
|
+
import GraphorPrd from 'graphor';
|
|
48
50
|
|
|
49
|
-
const client = new
|
|
51
|
+
const client = new GraphorPrd({
|
|
52
|
+
apiKey: process.env['GRAPHOR_PRD_API_KEY'], // This is the default and can be omitted
|
|
53
|
+
});
|
|
50
54
|
|
|
51
|
-
const params:
|
|
52
|
-
const publicSource:
|
|
55
|
+
const params: GraphorPrd.SourceUploadParams = { file: fs.createReadStream('path/to/file') };
|
|
56
|
+
const publicSource: GraphorPrd.PublicSource = await client.sources.upload(params);
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -65,9 +69,9 @@ Request parameters that correspond to file uploads can be passed in many differe
|
|
|
65
69
|
|
|
66
70
|
```ts
|
|
67
71
|
import fs from 'fs';
|
|
68
|
-
import
|
|
72
|
+
import GraphorPrd, { toFile } from 'graphor';
|
|
69
73
|
|
|
70
|
-
const client = new
|
|
74
|
+
const client = new GraphorPrd();
|
|
71
75
|
|
|
72
76
|
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
|
|
73
77
|
await client.sources.upload({ file: fs.createReadStream('/path/to/file') });
|
|
@@ -94,7 +98,7 @@ a subclass of `APIError` will be thrown:
|
|
|
94
98
|
const publicSource = await client.sources
|
|
95
99
|
.upload({ file: fs.createReadStream('path/to/file') })
|
|
96
100
|
.catch(async (err) => {
|
|
97
|
-
if (err instanceof
|
|
101
|
+
if (err instanceof GraphorPrd.APIError) {
|
|
98
102
|
console.log(err.status); // 400
|
|
99
103
|
console.log(err.name); // BadRequestError
|
|
100
104
|
console.log(err.headers); // {server: 'nginx', ...}
|
|
@@ -128,7 +132,7 @@ You can use the `maxRetries` option to configure or disable this:
|
|
|
128
132
|
<!-- prettier-ignore -->
|
|
129
133
|
```js
|
|
130
134
|
// Configure the default for all requests:
|
|
131
|
-
const client = new
|
|
135
|
+
const client = new GraphorPrd({
|
|
132
136
|
maxRetries: 0, // default is 2
|
|
133
137
|
});
|
|
134
138
|
|
|
@@ -145,7 +149,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
|
|
|
145
149
|
<!-- prettier-ignore -->
|
|
146
150
|
```ts
|
|
147
151
|
// Configure the default for all requests:
|
|
148
|
-
const client = new
|
|
152
|
+
const client = new GraphorPrd({
|
|
149
153
|
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
150
154
|
});
|
|
151
155
|
|
|
@@ -171,7 +175,7 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
|
|
|
171
175
|
|
|
172
176
|
<!-- prettier-ignore -->
|
|
173
177
|
```ts
|
|
174
|
-
const client = new
|
|
178
|
+
const client = new GraphorPrd();
|
|
175
179
|
|
|
176
180
|
const response = await client.sources
|
|
177
181
|
.upload({ file: fs.createReadStream('path/to/file') })
|
|
@@ -196,13 +200,13 @@ console.log(publicSource.project_id);
|
|
|
196
200
|
|
|
197
201
|
The log level can be configured in two ways:
|
|
198
202
|
|
|
199
|
-
1. Via the `
|
|
203
|
+
1. Via the `GRAPHOR_PRD_LOG` environment variable
|
|
200
204
|
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
201
205
|
|
|
202
206
|
```ts
|
|
203
|
-
import
|
|
207
|
+
import GraphorPrd from 'graphor';
|
|
204
208
|
|
|
205
|
-
const client = new
|
|
209
|
+
const client = new GraphorPrd({
|
|
206
210
|
logLevel: 'debug', // Show all log messages
|
|
207
211
|
});
|
|
208
212
|
```
|
|
@@ -228,13 +232,13 @@ When providing a custom logger, the `logLevel` option still controls which messa
|
|
|
228
232
|
below the configured level will not be sent to your logger.
|
|
229
233
|
|
|
230
234
|
```ts
|
|
231
|
-
import
|
|
235
|
+
import GraphorPrd from 'graphor';
|
|
232
236
|
import pino from 'pino';
|
|
233
237
|
|
|
234
238
|
const logger = pino();
|
|
235
239
|
|
|
236
|
-
const client = new
|
|
237
|
-
logger: logger.child({ name: '
|
|
240
|
+
const client = new GraphorPrd({
|
|
241
|
+
logger: logger.child({ name: 'GraphorPrd' }),
|
|
238
242
|
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
239
243
|
});
|
|
240
244
|
```
|
|
@@ -297,10 +301,10 @@ globalThis.fetch = fetch;
|
|
|
297
301
|
Or pass it to the client:
|
|
298
302
|
|
|
299
303
|
```ts
|
|
300
|
-
import
|
|
304
|
+
import GraphorPrd from 'graphor';
|
|
301
305
|
import fetch from 'my-fetch';
|
|
302
306
|
|
|
303
|
-
const client = new
|
|
307
|
+
const client = new GraphorPrd({ fetch });
|
|
304
308
|
```
|
|
305
309
|
|
|
306
310
|
### Fetch options
|
|
@@ -308,9 +312,9 @@ const client = new Graphor({ fetch });
|
|
|
308
312
|
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
309
313
|
|
|
310
314
|
```ts
|
|
311
|
-
import
|
|
315
|
+
import GraphorPrd from 'graphor';
|
|
312
316
|
|
|
313
|
-
const client = new
|
|
317
|
+
const client = new GraphorPrd({
|
|
314
318
|
fetchOptions: {
|
|
315
319
|
// `RequestInit` options
|
|
316
320
|
},
|
|
@@ -325,11 +329,11 @@ options to requests:
|
|
|
325
329
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
326
330
|
|
|
327
331
|
```ts
|
|
328
|
-
import
|
|
332
|
+
import GraphorPrd from 'graphor';
|
|
329
333
|
import * as undici from 'undici';
|
|
330
334
|
|
|
331
335
|
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
332
|
-
const client = new
|
|
336
|
+
const client = new GraphorPrd({
|
|
333
337
|
fetchOptions: {
|
|
334
338
|
dispatcher: proxyAgent,
|
|
335
339
|
},
|
|
@@ -339,9 +343,9 @@ const client = new Graphor({
|
|
|
339
343
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
|
|
340
344
|
|
|
341
345
|
```ts
|
|
342
|
-
import
|
|
346
|
+
import GraphorPrd from 'graphor';
|
|
343
347
|
|
|
344
|
-
const client = new
|
|
348
|
+
const client = new GraphorPrd({
|
|
345
349
|
fetchOptions: {
|
|
346
350
|
proxy: 'http://localhost:8888',
|
|
347
351
|
},
|
|
@@ -351,10 +355,10 @@ const client = new Graphor({
|
|
|
351
355
|
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
352
356
|
|
|
353
357
|
```ts
|
|
354
|
-
import
|
|
358
|
+
import GraphorPrd from 'npm:graphor';
|
|
355
359
|
|
|
356
360
|
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
357
|
-
const client = new
|
|
361
|
+
const client = new GraphorPrd({
|
|
358
362
|
fetchOptions: {
|
|
359
363
|
client: httpClient,
|
|
360
364
|
},
|
package/client.d.mts
CHANGED
|
@@ -6,20 +6,20 @@ import * as Errors from "./core/error.mjs";
|
|
|
6
6
|
import * as Uploads from "./core/uploads.mjs";
|
|
7
7
|
import * as API from "./resources/index.mjs";
|
|
8
8
|
import { APIPromise } from "./core/api-promise.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { PublicPartitionMethod, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceListResponse, SourceLoadElementsParams, SourceLoadElementsResponse, SourceParseParams, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, SourceUploadGitHubParams, SourceUploadParams, SourceUploadURLParams, SourceUploadYoutubeParams, Sources } from "./resources/sources.mjs";
|
|
10
10
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
11
11
|
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
12
12
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
13
13
|
import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
|
|
14
14
|
export interface ClientOptions {
|
|
15
15
|
/**
|
|
16
|
-
* Defaults to process.env['
|
|
16
|
+
* Defaults to process.env['GRAPHOR_PRD_API_KEY'].
|
|
17
17
|
*/
|
|
18
|
-
apiKey?: string |
|
|
18
|
+
apiKey?: string | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
21
21
|
*
|
|
22
|
-
* Defaults to process.env['
|
|
22
|
+
* Defaults to process.env['GRAPHOR_PRD_BASE_URL'].
|
|
23
23
|
*/
|
|
24
24
|
baseURL?: string | null | undefined;
|
|
25
25
|
/**
|
|
@@ -67,7 +67,7 @@ export interface ClientOptions {
|
|
|
67
67
|
/**
|
|
68
68
|
* Set the log level.
|
|
69
69
|
*
|
|
70
|
-
* Defaults to process.env['
|
|
70
|
+
* Defaults to process.env['GRAPHOR_PRD_LOG'] or 'warn' if it isn't set.
|
|
71
71
|
*/
|
|
72
72
|
logLevel?: LogLevel | undefined;
|
|
73
73
|
/**
|
|
@@ -78,11 +78,11 @@ export interface ClientOptions {
|
|
|
78
78
|
logger?: Logger | undefined;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* API Client for interfacing with the Graphor API.
|
|
81
|
+
* API Client for interfacing with the Graphor Prd API.
|
|
82
82
|
*/
|
|
83
|
-
export declare class
|
|
83
|
+
export declare class GraphorPrd {
|
|
84
84
|
#private;
|
|
85
|
-
apiKey: string
|
|
85
|
+
apiKey: string;
|
|
86
86
|
baseURL: string;
|
|
87
87
|
maxRetries: number;
|
|
88
88
|
timeout: number;
|
|
@@ -93,10 +93,10 @@ export declare class Graphor {
|
|
|
93
93
|
protected idempotencyHeader?: string;
|
|
94
94
|
private _options;
|
|
95
95
|
/**
|
|
96
|
-
* API Client for interfacing with the Graphor API.
|
|
96
|
+
* API Client for interfacing with the Graphor Prd API.
|
|
97
97
|
*
|
|
98
|
-
* @param {string |
|
|
99
|
-
* @param {string} [opts.baseURL=process.env['
|
|
98
|
+
* @param {string | undefined} [opts.apiKey=process.env['GRAPHOR_PRD_API_KEY'] ?? undefined]
|
|
99
|
+
* @param {string} [opts.baseURL=process.env['GRAPHOR_PRD_BASE_URL'] ?? https://graphorlm.com/api/public/v1] - Override the default base URL for the API.
|
|
100
100
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
101
101
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
102
102
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -154,10 +154,11 @@ export declare class Graphor {
|
|
|
154
154
|
timeout: number;
|
|
155
155
|
}>;
|
|
156
156
|
private buildHeaders;
|
|
157
|
+
private _makeAbort;
|
|
157
158
|
private buildBody;
|
|
158
|
-
static
|
|
159
|
+
static GraphorPrd: typeof GraphorPrd;
|
|
159
160
|
static DEFAULT_TIMEOUT: number;
|
|
160
|
-
static
|
|
161
|
+
static GraphorPrdError: typeof Errors.GraphorPrdError;
|
|
161
162
|
static APIError: typeof Errors.APIError;
|
|
162
163
|
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
163
164
|
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
@@ -173,8 +174,8 @@ export declare class Graphor {
|
|
|
173
174
|
static toFile: typeof Uploads.toFile;
|
|
174
175
|
sources: API.Sources;
|
|
175
176
|
}
|
|
176
|
-
export declare namespace
|
|
177
|
+
export declare namespace GraphorPrd {
|
|
177
178
|
export type RequestOptions = Opts.RequestOptions;
|
|
178
|
-
export { Sources as Sources, type
|
|
179
|
+
export { Sources as Sources, type PublicPartitionMethod as PublicPartitionMethod, type PublicSource as PublicSource, type SourceListResponse as SourceListResponse, type SourceDeleteResponse as SourceDeleteResponse, type SourceAskResponse as SourceAskResponse, type SourceExtractResponse as SourceExtractResponse, type SourceLoadElementsResponse as SourceLoadElementsResponse, type SourceRetrieveChunksResponse as SourceRetrieveChunksResponse, type SourceDeleteParams as SourceDeleteParams, type SourceAskParams as SourceAskParams, type SourceExtractParams as SourceExtractParams, type SourceLoadElementsParams as SourceLoadElementsParams, type SourceParseParams as SourceParseParams, type SourceRetrieveChunksParams as SourceRetrieveChunksParams, type SourceUploadParams as SourceUploadParams, type SourceUploadGitHubParams as SourceUploadGitHubParams, type SourceUploadURLParams as SourceUploadURLParams, type SourceUploadYoutubeParams as SourceUploadYoutubeParams, };
|
|
179
180
|
}
|
|
180
181
|
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/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,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAEjD,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/client.d.ts
CHANGED
|
@@ -6,20 +6,20 @@ import * as Errors from "./core/error.js";
|
|
|
6
6
|
import * as Uploads from "./core/uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { APIPromise } from "./core/api-promise.js";
|
|
9
|
-
import {
|
|
9
|
+
import { PublicPartitionMethod, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceListResponse, SourceLoadElementsParams, SourceLoadElementsResponse, SourceParseParams, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, SourceUploadGitHubParams, SourceUploadParams, SourceUploadURLParams, SourceUploadYoutubeParams, Sources } from "./resources/sources.js";
|
|
10
10
|
import { type Fetch } from "./internal/builtin-types.js";
|
|
11
11
|
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
|
12
12
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
|
|
13
13
|
import { type LogLevel, type Logger } from "./internal/utils/log.js";
|
|
14
14
|
export interface ClientOptions {
|
|
15
15
|
/**
|
|
16
|
-
* Defaults to process.env['
|
|
16
|
+
* Defaults to process.env['GRAPHOR_PRD_API_KEY'].
|
|
17
17
|
*/
|
|
18
|
-
apiKey?: string |
|
|
18
|
+
apiKey?: string | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
21
21
|
*
|
|
22
|
-
* Defaults to process.env['
|
|
22
|
+
* Defaults to process.env['GRAPHOR_PRD_BASE_URL'].
|
|
23
23
|
*/
|
|
24
24
|
baseURL?: string | null | undefined;
|
|
25
25
|
/**
|
|
@@ -67,7 +67,7 @@ export interface ClientOptions {
|
|
|
67
67
|
/**
|
|
68
68
|
* Set the log level.
|
|
69
69
|
*
|
|
70
|
-
* Defaults to process.env['
|
|
70
|
+
* Defaults to process.env['GRAPHOR_PRD_LOG'] or 'warn' if it isn't set.
|
|
71
71
|
*/
|
|
72
72
|
logLevel?: LogLevel | undefined;
|
|
73
73
|
/**
|
|
@@ -78,11 +78,11 @@ export interface ClientOptions {
|
|
|
78
78
|
logger?: Logger | undefined;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* API Client for interfacing with the Graphor API.
|
|
81
|
+
* API Client for interfacing with the Graphor Prd API.
|
|
82
82
|
*/
|
|
83
|
-
export declare class
|
|
83
|
+
export declare class GraphorPrd {
|
|
84
84
|
#private;
|
|
85
|
-
apiKey: string
|
|
85
|
+
apiKey: string;
|
|
86
86
|
baseURL: string;
|
|
87
87
|
maxRetries: number;
|
|
88
88
|
timeout: number;
|
|
@@ -93,10 +93,10 @@ export declare class Graphor {
|
|
|
93
93
|
protected idempotencyHeader?: string;
|
|
94
94
|
private _options;
|
|
95
95
|
/**
|
|
96
|
-
* API Client for interfacing with the Graphor API.
|
|
96
|
+
* API Client for interfacing with the Graphor Prd API.
|
|
97
97
|
*
|
|
98
|
-
* @param {string |
|
|
99
|
-
* @param {string} [opts.baseURL=process.env['
|
|
98
|
+
* @param {string | undefined} [opts.apiKey=process.env['GRAPHOR_PRD_API_KEY'] ?? undefined]
|
|
99
|
+
* @param {string} [opts.baseURL=process.env['GRAPHOR_PRD_BASE_URL'] ?? https://graphorlm.com/api/public/v1] - Override the default base URL for the API.
|
|
100
100
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
101
101
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
102
102
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -154,10 +154,11 @@ export declare class Graphor {
|
|
|
154
154
|
timeout: number;
|
|
155
155
|
}>;
|
|
156
156
|
private buildHeaders;
|
|
157
|
+
private _makeAbort;
|
|
157
158
|
private buildBody;
|
|
158
|
-
static
|
|
159
|
+
static GraphorPrd: typeof GraphorPrd;
|
|
159
160
|
static DEFAULT_TIMEOUT: number;
|
|
160
|
-
static
|
|
161
|
+
static GraphorPrdError: typeof Errors.GraphorPrdError;
|
|
161
162
|
static APIError: typeof Errors.APIError;
|
|
162
163
|
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
163
164
|
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
@@ -173,8 +174,8 @@ export declare class Graphor {
|
|
|
173
174
|
static toFile: typeof Uploads.toFile;
|
|
174
175
|
sources: API.Sources;
|
|
175
176
|
}
|
|
176
|
-
export declare namespace
|
|
177
|
+
export declare namespace GraphorPrd {
|
|
177
178
|
export type RequestOptions = Opts.RequestOptions;
|
|
178
|
-
export { Sources as Sources, type
|
|
179
|
+
export { Sources as Sources, type PublicPartitionMethod as PublicPartitionMethod, type PublicSource as PublicSource, type SourceListResponse as SourceListResponse, type SourceDeleteResponse as SourceDeleteResponse, type SourceAskResponse as SourceAskResponse, type SourceExtractResponse as SourceExtractResponse, type SourceLoadElementsResponse as SourceLoadElementsResponse, type SourceRetrieveChunksResponse as SourceRetrieveChunksResponse, type SourceDeleteParams as SourceDeleteParams, type SourceAskParams as SourceAskParams, type SourceExtractParams as SourceExtractParams, type SourceLoadElementsParams as SourceLoadElementsParams, type SourceParseParams as SourceParseParams, type SourceRetrieveChunksParams as SourceRetrieveChunksParams, type SourceUploadParams as SourceUploadParams, type SourceUploadGitHubParams as SourceUploadGitHubParams, type SourceUploadURLParams as SourceUploadURLParams, type SourceUploadYoutubeParams as SourceUploadYoutubeParams, };
|
|
179
180
|
}
|
|
180
181
|
//# sourceMappingURL=client.d.ts.map
|
package/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,iBAAiB,E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