graphor 0.13.0 → 0.14.0

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 (90) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +320 -31
  3. package/client.d.mts +2 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -8
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -8
  10. package/client.mjs.map +1 -1
  11. package/internal/qs/formats.d.mts +7 -0
  12. package/internal/qs/formats.d.mts.map +1 -0
  13. package/internal/qs/formats.d.ts +7 -0
  14. package/internal/qs/formats.d.ts.map +1 -0
  15. package/internal/qs/formats.js +13 -0
  16. package/internal/qs/formats.js.map +1 -0
  17. package/internal/qs/formats.mjs +9 -0
  18. package/internal/qs/formats.mjs.map +1 -0
  19. package/internal/qs/index.d.mts +10 -0
  20. package/internal/qs/index.d.mts.map +1 -0
  21. package/internal/qs/index.d.ts +10 -0
  22. package/internal/qs/index.d.ts.map +1 -0
  23. package/internal/qs/index.js +14 -0
  24. package/internal/qs/index.js.map +1 -0
  25. package/internal/qs/index.mjs +10 -0
  26. package/internal/qs/index.mjs.map +1 -0
  27. package/internal/qs/stringify.d.mts +3 -0
  28. package/internal/qs/stringify.d.mts.map +1 -0
  29. package/internal/qs/stringify.d.ts +3 -0
  30. package/internal/qs/stringify.d.ts.map +1 -0
  31. package/internal/qs/stringify.js +277 -0
  32. package/internal/qs/stringify.js.map +1 -0
  33. package/internal/qs/stringify.mjs +274 -0
  34. package/internal/qs/stringify.mjs.map +1 -0
  35. package/internal/qs/types.d.mts +57 -0
  36. package/internal/qs/types.d.mts.map +1 -0
  37. package/internal/qs/types.d.ts +57 -0
  38. package/internal/qs/types.d.ts.map +1 -0
  39. package/internal/qs/types.js +3 -0
  40. package/internal/qs/types.js.map +1 -0
  41. package/internal/qs/types.mjs +2 -0
  42. package/internal/qs/types.mjs.map +1 -0
  43. package/internal/qs/utils.d.mts +15 -0
  44. package/internal/qs/utils.d.mts.map +1 -0
  45. package/internal/qs/utils.d.ts +15 -0
  46. package/internal/qs/utils.d.ts.map +1 -0
  47. package/internal/qs/utils.js +230 -0
  48. package/internal/qs/utils.js.map +1 -0
  49. package/internal/qs/utils.mjs +217 -0
  50. package/internal/qs/utils.mjs.map +1 -0
  51. package/internal/tslib.js +17 -17
  52. package/internal/utils/query.d.mts +0 -3
  53. package/internal/utils/query.d.mts.map +1 -1
  54. package/internal/utils/query.d.ts +0 -3
  55. package/internal/utils/query.d.ts.map +1 -1
  56. package/internal/utils/query.js +3 -16
  57. package/internal/utils/query.js.map +1 -1
  58. package/internal/utils/query.mjs +2 -16
  59. package/internal/utils/query.mjs.map +1 -1
  60. package/package.json +1 -1
  61. package/resources/index.d.mts +1 -1
  62. package/resources/index.d.mts.map +1 -1
  63. package/resources/index.d.ts +1 -1
  64. package/resources/index.d.ts.map +1 -1
  65. package/resources/index.js.map +1 -1
  66. package/resources/index.mjs.map +1 -1
  67. package/resources/sources.d.mts +494 -337
  68. package/resources/sources.d.mts.map +1 -1
  69. package/resources/sources.d.ts +494 -337
  70. package/resources/sources.d.ts.map +1 -1
  71. package/resources/sources.js +199 -242
  72. package/resources/sources.js.map +1 -1
  73. package/resources/sources.mjs +199 -242
  74. package/resources/sources.mjs.map +1 -1
  75. package/src/client.ts +40 -24
  76. package/src/internal/qs/LICENSE.md +13 -0
  77. package/src/internal/qs/README.md +3 -0
  78. package/src/internal/qs/formats.ts +10 -0
  79. package/src/internal/qs/index.ts +13 -0
  80. package/src/internal/qs/stringify.ts +385 -0
  81. package/src/internal/qs/types.ts +71 -0
  82. package/src/internal/qs/utils.ts +265 -0
  83. package/src/internal/utils/query.ts +2 -18
  84. package/src/resources/index.ts +17 -8
  85. package/src/resources/sources.ts +613 -370
  86. package/src/version.ts +1 -1
  87. package/version.d.mts +1 -1
  88. package/version.d.ts +1 -1
  89. package/version.js +1 -1
  90. package/version.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 (2026-03-08)
4
+
5
+ Full Changelog: [v0.13.0...v0.14.0](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.13.0...v0.14.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([79530bb](https://github.com/synapseops/graphor-typescript-sdk/commit/79530bb7d40167582d8223efcf74543e19b46d9b))
10
+ * **api:** api update ([bdb16b8](https://github.com/synapseops/graphor-typescript-sdk/commit/bdb16b89b4fccd7a662443b4725196f9f1042ba3))
11
+ * **api:** manual updates ([1a97076](https://github.com/synapseops/graphor-typescript-sdk/commit/1a97076dc1938e61b1979b0f6c14c39b3655bcde))
12
+ * **api:** manual updates ([5ff7a35](https://github.com/synapseops/graphor-typescript-sdk/commit/5ff7a35f23cf186029622dc9d1f40342592a7972))
13
+ * **api:** manual updates ([7a889c7](https://github.com/synapseops/graphor-typescript-sdk/commit/7a889c7c7d616b87328ddbe8f5a4d51022666f1e))
14
+ * **api:** manual updates ([f5f2308](https://github.com/synapseops/graphor-typescript-sdk/commit/f5f2308b82e8be4e29c7490eb835505419b3c618))
15
+ * **mcp:** add an option to disable code tool ([e94c0ff](https://github.com/synapseops/graphor-typescript-sdk/commit/e94c0ff15bcddf04d9ed695b0d8e252be17848d6))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **client:** preserve URL params already embedded in path ([f15a979](https://github.com/synapseops/graphor-typescript-sdk/commit/f15a979aa41e9df7732389ac958e2c80c45a21fc))
21
+ * **mcp:** update prompt ([820c100](https://github.com/synapseops/graphor-typescript-sdk/commit/820c1009a2be558ebc6ea72f1ae5c1f4e2b2b1b5))
22
+
23
+
24
+ ### Chores
25
+
26
+ * **ci:** skip uploading artifacts on stainless-internal branches ([793e4b8](https://github.com/synapseops/graphor-typescript-sdk/commit/793e4b8c62f5285d32c9f31740d0b00277dbda99))
27
+ * **internal:** codegen related update ([352b490](https://github.com/synapseops/graphor-typescript-sdk/commit/352b490a035cd599359fb9a8fd375c272bd1f4fa))
28
+ * **internal:** codegen related update ([1a22c92](https://github.com/synapseops/graphor-typescript-sdk/commit/1a22c92ac2f4515a8f858ba97ff27710f6731c7d))
29
+ * **internal:** use x-stainless-mcp-client-envs header for MCP remote code tool calls ([b4ef17e](https://github.com/synapseops/graphor-typescript-sdk/commit/b4ef17e9c0a7404731f96391133c934980d868f5))
30
+ * **internal:** version bump ([5b2cd41](https://github.com/synapseops/graphor-typescript-sdk/commit/5b2cd418f89f6149cf3107e3863d395feda56e80))
31
+ * **mcp-server:** improve instructions ([bb8ce84](https://github.com/synapseops/graphor-typescript-sdk/commit/bb8ce845d864439df5c8724c35ffb44f81af53d3))
32
+ * **mcp-server:** return access instructions for 404 without API key ([6b897c3](https://github.com/synapseops/graphor-typescript-sdk/commit/6b897c30b19ea6a6c8e9a692739f89206da5edae))
33
+ * update placeholder string ([4f59192](https://github.com/synapseops/graphor-typescript-sdk/commit/4f59192cc36983c724bed3da0561735690391397))
34
+
3
35
  ## 0.13.0 (2026-03-06)
4
36
 
5
37
  Full Changelog: [v0.12.2...v0.13.0](https://github.com/synapseops/graphor-typescript-sdk/compare/v0.12.2...v0.13.0)
package/README.md CHANGED
@@ -398,8 +398,19 @@ https://mcp.graphor.workers.dev/sse
398
398
 
399
399
  **Web apps (e.g. Claude.ai)** — in Claude.ai, go to **Settings > Connectors > Add custom connector**, fill in the name and the remote MCP server URL. You will be redirected to log in through the OAuth flow:
400
400
 
401
- ```
402
- https://mcp.graphor.workers.dev/sse
401
+ The full API of this library can be found in [api.md](api.md).
402
+
403
+ <!-- prettier-ignore -->
404
+ ```js
405
+ import Graphor from 'graphor';
406
+
407
+ const client = new Graphor({
408
+ apiKey: process.env['GRAPHOR_API_KEY'], // This is the default and can be omitted
409
+ });
410
+
411
+ const response = await client.sources.ingestURL({ url: 'url' });
412
+
413
+ console.log(response.build_id);
403
414
  ```
404
415
 
405
416
  **Desktop clients (e.g. Claude Desktop)** — use [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) as a local proxy:
@@ -427,50 +438,328 @@ const client = new MultiServerMCPClient({
427
438
  }
428
439
  });
429
440
 
430
- const tools = await client.getTools();
431
- // Use tools with your LangChain agent
441
+ const params: Graphor.SourceIngestURLParams = { url: 'url' };
442
+ const response: Graphor.SourceIngestURLResponse = await client.sources.ingestURL(params);
432
443
  ```
433
444
 
434
- See the [MCP Server README](./packages/mcp-server/README.md) for more details.
445
+ Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
435
446
 
436
- ## API Reference
447
+ ## File uploads
437
448
 
438
- ### Sources
449
+ Request parameters that correspond to file uploads can be passed in many different forms:
450
+
451
+ - `File` (or an object with the same structure)
452
+ - a `fetch` `Response` (or an object with the same structure)
453
+ - an `fs.ReadStream`
454
+ - the return value of our `toFile` helper
439
455
 
440
- | Method | Description | Docs |
441
- |--------|-------------|------|
442
- | `sources.upload()` | Upload a local file | [📖](https://docs.graphorlm.com/sdk/sources/upload#upload-a-file) |
443
- | `sources.uploadUrl()` | Upload from web URL | [📖](https://docs.graphorlm.com/sdk/sources/upload#upload-from-url) |
444
- | `sources.uploadGithub()` | Upload from GitHub | [📖](https://docs.graphorlm.com/sdk/sources/upload#upload-from-github) |
445
- | `sources.uploadYoutube()` | Upload from YouTube | [📖](https://docs.graphorlm.com/sdk/sources/upload#upload-from-youtube) |
446
- | `sources.parse()` | Reprocess with different method | [📖](https://docs.graphorlm.com/sdk/sources/process) |
447
- | `sources.list()` | List all sources | [📖](https://docs.graphorlm.com/sdk/sources/list) |
448
- | `sources.delete()` | Delete a source | [📖](https://docs.graphorlm.com/sdk/sources/delete) |
449
- | `sources.loadElements()` | Get parsed elements | [📖](https://docs.graphorlm.com/sdk/sources/list-elements) |
456
+ ```ts
457
+ import fs from 'fs';
458
+ import Graphor, { toFile } from 'graphor';
450
459
 
451
- ### Chat & AI
460
+ const client = new Graphor();
452
461
 
453
- | Method | Description | Docs |
454
- |--------|-------------|------|
455
- | `sources.ask()` | Ask questions about documents | [📖](https://docs.graphorlm.com/sdk/chat) |
456
- | `sources.extract()` | Extract structured data | [📖](https://docs.graphorlm.com/sdk/extract) |
457
- | `sources.retrieveChunks()` | Retrieve chunks for RAG | [📖](https://docs.graphorlm.com/sdk/prebuilt-rag) |
462
+ // If you have access to Node `fs` we recommend using `fs.createReadStream()`:
463
+ await client.sources.ingestFile({ file: fs.createReadStream('/path/to/file') });
458
464
 
459
- ## TypeScript Support
465
+ // Or if you have the web `File` API you can pass a `File` instance:
466
+ await client.sources.ingestFile({ file: new File(['my bytes'], 'file') });
460
467
 
461
- This library includes complete TypeScript definitions for all request params and response fields:
468
+ // You can also pass a `fetch` `Response`:
469
+ await client.sources.ingestFile({ file: await fetch('https://somesite/file') });
462
470
 
463
- ```typescript
464
- import Graphor from 'graphor';
471
+ // Finally, if none of the above are convenient, you can use our `toFile` helper:
472
+ await client.sources.ingestFile({ file: await toFile(Buffer.from('my bytes'), 'file') });
473
+ await client.sources.ingestFile({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
474
+ ```
475
+
476
+ ## Handling errors
477
+
478
+ When the library is unable to connect to the API,
479
+ or if the API returns a non-success status code (i.e., 4xx or 5xx response),
480
+ a subclass of `APIError` will be thrown:
481
+
482
+ <!-- prettier-ignore -->
483
+ ```ts
484
+ const response = await client.sources.ingestURL({ url: 'url' }).catch(async (err) => {
485
+ if (err instanceof Graphor.APIError) {
486
+ console.log(err.status); // 400
487
+ console.log(err.name); // BadRequestError
488
+ console.log(err.headers); // {server: 'nginx', ...}
489
+ } else {
490
+ throw err;
491
+ }
492
+ });
493
+ ```
494
+
495
+ Error codes are as follows:
496
+
497
+ | Status Code | Error Type |
498
+ | ----------- | -------------------------- |
499
+ | 400 | `BadRequestError` |
500
+ | 401 | `AuthenticationError` |
501
+ | 403 | `PermissionDeniedError` |
502
+ | 404 | `NotFoundError` |
503
+ | 422 | `UnprocessableEntityError` |
504
+ | 429 | `RateLimitError` |
505
+ | >=500 | `InternalServerError` |
506
+ | N/A | `APIConnectionError` |
507
+
508
+ ### Retries
509
+
510
+ Certain errors will be automatically retried 0 times by default, with a short exponential backoff.
511
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
512
+ 429 Rate Limit, and >=500 Internal errors will all be retried by default.
513
+
514
+ You can use the `maxRetries` option to configure or disable this:
515
+
516
+ <!-- prettier-ignore -->
517
+ ```js
518
+ // Configure the default for all requests:
519
+ const client = new Graphor({
520
+ maxRetries: 0, // default is 2
521
+ });
465
522
 
523
+ // Or, configure per-request:
524
+ await client.sources.ingestURL({ url: 'url' }, {
525
+ maxRetries: 5,
526
+ });
527
+ ```
528
+
529
+ ### Timeouts
530
+
531
+ Requests time out after 10 minutes by default. You can configure this with a `timeout` option:
532
+
533
+ <!-- prettier-ignore -->
534
+ ```ts
535
+ // Configure the default for all requests:
536
+ const client = new Graphor({
537
+ timeout: 20 * 1000, // 20 seconds (default is 10 minutes)
538
+ });
539
+
540
+ // Override per-request:
541
+ await client.sources.ingestURL({ url: 'url' }, {
542
+ timeout: 5 * 1000,
543
+ });
544
+ ```
545
+
546
+ On timeout, an `APIConnectionTimeoutError` is thrown.
547
+
548
+ Note that requests which time out will be [retried twice by default](#retries).
549
+
550
+ ## Advanced Usage
551
+
552
+ ### Accessing raw Response data (e.g., headers)
553
+
554
+ The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
555
+ This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
556
+
557
+ You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
558
+ Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
559
+
560
+ <!-- prettier-ignore -->
561
+ ```ts
466
562
  const client = new Graphor();
467
563
 
468
- // Type-safe params and responses
469
- const params: Graphor.SourceUploadParams = { file: fs.createReadStream('path/to/file') };
470
- const source: Graphor.PublicSource = await client.sources.upload(params);
564
+ const response = await client.sources.ingestURL({ url: 'url' }).asResponse();
565
+ console.log(response.headers.get('X-My-Header'));
566
+ console.log(response.statusText); // access the underlying Response object
567
+
568
+ const { data: response, response: raw } = await client.sources
569
+ .ingestURL({ url: 'url' })
570
+ .withResponse();
571
+ console.log(raw.headers.get('X-My-Header'));
572
+ console.log(response.build_id);
471
573
  ```
472
574
 
473
- Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
575
+ ### Logging
576
+
577
+ > [!IMPORTANT]
578
+ > All log messages are intended for debugging only. The format and content of log messages
579
+ > may change between releases.
580
+
581
+ #### Log levels
582
+
583
+ The log level can be configured in two ways:
584
+
585
+ 1. Via the `GRAPHOR_LOG` environment variable
586
+ 2. Using the `logLevel` client option (overrides the environment variable if set)
587
+
588
+ ```ts
589
+ import Graphor from 'graphor';
590
+
591
+ const client = new Graphor({
592
+ logLevel: 'debug', // Show all log messages
593
+ });
594
+ ```
595
+
596
+ Available log levels, from most to least verbose:
597
+
598
+ - `'debug'` - Show debug messages, info, warnings, and errors
599
+ - `'info'` - Show info messages, warnings, and errors
600
+ - `'warn'` - Show warnings and errors (default)
601
+ - `'error'` - Show only errors
602
+ - `'off'` - Disable all logging
603
+
604
+ At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
605
+ Some authentication-related headers are redacted, but sensitive data in request and response bodies
606
+ may still be visible.
607
+
608
+ #### Custom logger
609
+
610
+ By default, this library logs to `globalThis.console`. You can also provide a custom logger.
611
+ Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
612
+
613
+ When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
614
+ below the configured level will not be sent to your logger.
615
+
616
+ ```ts
617
+ import Graphor from 'graphor';
618
+ import pino from 'pino';
619
+
620
+ const logger = pino();
621
+
622
+ const client = new Graphor({
623
+ logger: logger.child({ name: 'Graphor' }),
624
+ logLevel: 'debug', // Send all messages to pino, allowing it to filter
625
+ });
626
+ ```
627
+
628
+ ### Making custom/undocumented requests
629
+
630
+ This library is typed for convenient access to the documented API. If you need to access undocumented
631
+ endpoints, params, or response properties, the library can still be used.
632
+
633
+ #### Undocumented endpoints
634
+
635
+ To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
636
+ Options on the client, such as retries, will be respected when making these requests.
637
+
638
+ ```ts
639
+ await client.post('/some/path', {
640
+ body: { some_prop: 'foo' },
641
+ query: { some_query_arg: 'bar' },
642
+ });
643
+ ```
644
+
645
+ #### Undocumented request params
646
+
647
+ To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
648
+ parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
649
+ send will be sent as-is.
650
+
651
+ ```ts
652
+ client.sources.ingestURL({
653
+ // ...
654
+ // @ts-expect-error baz is not yet public
655
+ baz: 'undocumented option',
656
+ });
657
+ ```
658
+
659
+ For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
660
+ extra param in the body.
661
+
662
+ If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
663
+ options.
664
+
665
+ #### Undocumented response properties
666
+
667
+ To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
668
+ the response object, or cast the response object to the requisite type. Like the request params, we do not
669
+ validate or strip extra properties from the response from the API.
670
+
671
+ ### Customizing the fetch client
672
+
673
+ By default, this library expects a global `fetch` function is defined.
674
+
675
+ If you want to use a different `fetch` function, you can either polyfill the global:
676
+
677
+ ```ts
678
+ import fetch from 'my-fetch';
679
+
680
+ globalThis.fetch = fetch;
681
+ ```
682
+
683
+ Or pass it to the client:
684
+
685
+ ```ts
686
+ import Graphor from 'graphor';
687
+ import fetch from 'my-fetch';
688
+
689
+ const client = new Graphor({ fetch });
690
+ ```
691
+
692
+ ### Fetch options
693
+
694
+ 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.)
695
+
696
+ ```ts
697
+ import Graphor from 'graphor';
698
+
699
+ const client = new Graphor({
700
+ fetchOptions: {
701
+ // `RequestInit` options
702
+ },
703
+ });
704
+ ```
705
+
706
+ #### Configuring proxies
707
+
708
+ To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
709
+ options to requests:
710
+
711
+ <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>
712
+
713
+ ```ts
714
+ import Graphor from 'graphor';
715
+ import * as undici from 'undici';
716
+
717
+ const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
718
+ const client = new Graphor({
719
+ fetchOptions: {
720
+ dispatcher: proxyAgent,
721
+ },
722
+ });
723
+ ```
724
+
725
+ <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>
726
+
727
+ ```ts
728
+ import Graphor from 'graphor';
729
+
730
+ const client = new Graphor({
731
+ fetchOptions: {
732
+ proxy: 'http://localhost:8888',
733
+ },
734
+ });
735
+ ```
736
+
737
+ <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>
738
+
739
+ ```ts
740
+ import Graphor from 'npm:graphor';
741
+
742
+ const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
743
+ const client = new Graphor({
744
+ fetchOptions: {
745
+ client: httpClient,
746
+ },
747
+ });
748
+ ```
749
+
750
+ ## Frequently Asked Questions
751
+
752
+ ## Semantic versioning
753
+
754
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
755
+
756
+ 1. Changes that only affect static types, without breaking runtime behavior.
757
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
758
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
759
+
760
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
761
+
762
+ We are keen for your feedback; please open an [issue](https://www.github.com/synapseops/graphor-typescript-sdk/issues) with questions, bugs, or suggestions.
474
763
 
475
764
  ## Requirements
476
765
 
package/client.d.mts CHANGED
@@ -6,7 +6,7 @@ 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 { PublicPartitionMethod, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceListResponse, SourceLoadElementsParams, SourceLoadElementsResponse, SourceParseParams, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, SourceUploadGitHubParams, SourceUploadParams, SourceUploadURLParams, SourceUploadYoutubeParams, Sources } from "./resources/sources.mjs";
9
+ import { Element, Method, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceGetBuildStatusParams, SourceGetBuildStatusResponse, SourceGetElementsParams, SourceGetElementsResponse, SourceIngestFileParams, SourceIngestFileResponse, SourceIngestGitHubParams, SourceIngestGitHubResponse, SourceIngestURLParams, SourceIngestURLResponse, SourceIngestYoutubeParams, SourceIngestYoutubeResponse, SourceListParams, SourceListResponse, SourceReprocessParams, SourceReprocessResponse, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, 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";
@@ -112,9 +112,6 @@ export declare class Graphor {
112
112
  protected defaultQuery(): Record<string, string | undefined> | undefined;
113
113
  protected validateHeaders({ values, nulls }: NullableHeaders): void;
114
114
  protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
115
- /**
116
- * Basic re-implementation of `qs.stringify` for primitive types.
117
- */
118
115
  protected stringifyQuery(query: object | Record<string, unknown>): string;
119
116
  private getUserAgent;
120
117
  protected defaultIdempotencyKey(): string;
@@ -176,6 +173,6 @@ export declare class Graphor {
176
173
  }
177
174
  export declare namespace Graphor {
178
175
  export type RequestOptions = Opts.RequestOptions;
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, };
176
+ export { Sources as Sources, type Element as Element, type Method as Method, type PublicSource as PublicSource, type SourceListResponse as SourceListResponse, type SourceDeleteResponse as SourceDeleteResponse, type SourceAskResponse as SourceAskResponse, type SourceExtractResponse as SourceExtractResponse, type SourceGetBuildStatusResponse as SourceGetBuildStatusResponse, type SourceGetElementsResponse as SourceGetElementsResponse, type SourceIngestFileResponse as SourceIngestFileResponse, type SourceIngestGitHubResponse as SourceIngestGitHubResponse, type SourceIngestURLResponse as SourceIngestURLResponse, type SourceIngestYoutubeResponse as SourceIngestYoutubeResponse, type SourceReprocessResponse as SourceReprocessResponse, type SourceRetrieveChunksResponse as SourceRetrieveChunksResponse, type SourceListParams as SourceListParams, type SourceDeleteParams as SourceDeleteParams, type SourceAskParams as SourceAskParams, type SourceExtractParams as SourceExtractParams, type SourceGetBuildStatusParams as SourceGetBuildStatusParams, type SourceGetElementsParams as SourceGetElementsParams, type SourceIngestFileParams as SourceIngestFileParams, type SourceIngestGitHubParams as SourceIngestGitHubParams, type SourceIngestURLParams as SourceIngestURLParams, type SourceIngestYoutubeParams as SourceIngestYoutubeParams, type SourceReprocessParams as SourceReprocessParams, type SourceRetrieveChunksParams as SourceRetrieveChunksParams, };
180
177
  }
181
178
  //# 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;OAGT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,OAAO,EACR;OACM,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OAEvC,EACL,KAAK,QAAQ,EACb,KAA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AAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
package/client.d.ts CHANGED
@@ -6,7 +6,7 @@ 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 { PublicPartitionMethod, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceListResponse, SourceLoadElementsParams, SourceLoadElementsResponse, SourceParseParams, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, SourceUploadGitHubParams, SourceUploadParams, SourceUploadURLParams, SourceUploadYoutubeParams, Sources } from "./resources/sources.js";
9
+ import { Element, Method, PublicSource, SourceAskParams, SourceAskResponse, SourceDeleteParams, SourceDeleteResponse, SourceExtractParams, SourceExtractResponse, SourceGetBuildStatusParams, SourceGetBuildStatusResponse, SourceGetElementsParams, SourceGetElementsResponse, SourceIngestFileParams, SourceIngestFileResponse, SourceIngestGitHubParams, SourceIngestGitHubResponse, SourceIngestURLParams, SourceIngestURLResponse, SourceIngestYoutubeParams, SourceIngestYoutubeResponse, SourceListParams, SourceListResponse, SourceReprocessParams, SourceReprocessResponse, SourceRetrieveChunksParams, SourceRetrieveChunksResponse, 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";
@@ -112,9 +112,6 @@ export declare class Graphor {
112
112
  protected defaultQuery(): Record<string, string | undefined> | undefined;
113
113
  protected validateHeaders({ values, nulls }: NullableHeaders): void;
114
114
  protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
115
- /**
116
- * Basic re-implementation of `qs.stringify` for primitive types.
117
- */
118
115
  protected stringifyQuery(query: object | Record<string, unknown>): string;
119
116
  private getUserAgent;
120
117
  protected defaultIdempotencyKey(): string;
@@ -176,6 +173,6 @@ export declare class Graphor {
176
173
  }
177
174
  export declare namespace Graphor {
178
175
  export type RequestOptions = Opts.RequestOptions;
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, };
176
+ export { Sources as Sources, type Element as Element, type Method as Method, type PublicSource as PublicSource, type SourceListResponse as SourceListResponse, type SourceDeleteResponse as SourceDeleteResponse, type SourceAskResponse as SourceAskResponse, type SourceExtractResponse as SourceExtractResponse, type SourceGetBuildStatusResponse as SourceGetBuildStatusResponse, type SourceGetElementsResponse as SourceGetElementsResponse, type SourceIngestFileResponse as SourceIngestFileResponse, type SourceIngestGitHubResponse as SourceIngestGitHubResponse, type SourceIngestURLResponse as SourceIngestURLResponse, type SourceIngestYoutubeResponse as SourceIngestYoutubeResponse, type SourceReprocessResponse as SourceReprocessResponse, type SourceRetrieveChunksResponse as SourceRetrieveChunksResponse, type SourceListParams as SourceListParams, type SourceDeleteParams as SourceDeleteParams, type SourceAskParams as SourceAskParams, type SourceExtractParams as SourceExtractParams, type SourceGetBuildStatusParams as SourceGetBuildStatusParams, type SourceGetElementsParams as SourceGetElementsParams, type SourceIngestFileParams as SourceIngestFileParams, type SourceIngestGitHubParams as SourceIngestGitHubParams, type SourceIngestURLParams as SourceIngestURLParams, type SourceIngestYoutubeParams as SourceIngestYoutubeParams, type SourceReprocessParams as SourceReprocessParams, type SourceRetrieveChunksParams as SourceRetrieveChunksParams, };
180
177
  }
181
178
  //# 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;OAGT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,OAAO,EACR;OACM,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OAEvC,EACL,KAAK,QAAQ,EACb,KAAK,MAAM,EAIZ;AAGD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;;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AG,CAAC,OAAO,CAAyB;CAC9C;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAEjD,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,MAAM,IAAI,MAAM,EACrB,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,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
package/client.js CHANGED
@@ -94,9 +94,6 @@ class Graphor {
94
94
  async authHeaders(opts) {
95
95
  return (0, headers_1.buildHeaders)([{ Authorization: `Bearer ${this.apiKey}` }]);
96
96
  }
97
- /**
98
- * Basic re-implementation of `qs.stringify` for primitive types.
99
- */
100
97
  stringifyQuery(query) {
101
98
  return (0, query_1.stringifyQuery)(query);
102
99
  }
@@ -115,8 +112,9 @@ class Graphor {
115
112
  new URL(path)
116
113
  : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
117
114
  const defaultQuery = this.defaultQuery();
118
- if (!(0, values_2.isEmptyObj)(defaultQuery)) {
119
- query = { ...defaultQuery, ...query };
115
+ const pathQuery = Object.fromEntries(url.searchParams);
116
+ if (!(0, values_2.isEmptyObj)(defaultQuery) || !(0, values_2.isEmptyObj)(pathQuery)) {
117
+ query = { ...pathQuery, ...defaultQuery, ...query };
120
118
  }
121
119
  if (typeof query === 'object' && query && !Array.isArray(query)) {
122
120
  url.search = this.stringifyQuery(query);
@@ -331,9 +329,9 @@ class Graphor {
331
329
  timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
332
330
  }
333
331
  }
334
- // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
335
- // just do what it says, but otherwise calculate a default
336
- if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
332
+ // If the API asks us to wait a certain amount of time, just do what it
333
+ // says, but otherwise calculate a default
334
+ if (timeoutMillis === undefined) {
337
335
  const maxRetries = options.maxRetries ?? this.maxRetries;
338
336
  timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
339
337
  }