@deepraxis/sdk 0.1.1-dev.2990b29 → 0.1.1-dev.33a7e79

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/METHODS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDK methods
2
2
 
3
- Generated by `bun run generate`. 421 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
3
+ Generated by `bun run generate`. 473 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
4
4
 
5
5
  `always` returns an AsyncIterable; `optional` streams with `{ stream: true }`; `yes` pagination returns a Page. Only `{ data, next_cursor }` + `cursor` query contracts are automatically paginated.
6
6
 
@@ -374,6 +374,16 @@ Multipart request bodies expand plain objects into bracketed fields (for example
374
374
  |---|---|---|---|---|
375
375
  | send | POST | `/automation/v1/hooks/{trigger_id}/{token}` | no | no |
376
376
 
377
+ ### automation.humanTasks
378
+
379
+ | Method | HTTP | Path | Streaming | Pagination |
380
+ |---|---|---|---|---|
381
+ | cancel | POST | `/automation/v1/human-tasks/{id}/cancel` | no | no |
382
+ | delegate | POST | `/automation/v1/human-tasks/{id}/delegate` | no | no |
383
+ | list | GET | `/automation/v1/human-tasks` | no | yes |
384
+ | respond | POST | `/automation/v1/human-tasks/{id}/respond` | no | no |
385
+ | retrieve | GET | `/automation/v1/human-tasks/{id}` | no | no |
386
+
377
387
  ### automation.resolve
378
388
 
379
389
  | Method | HTTP | Path | Streaming | Pagination |
@@ -439,6 +449,14 @@ Multipart request bodies expand plain objects into bracketed fields (for example
439
449
  | list | GET | `/automation/v1/scripts/{ns}/{name}/dist-tags` | no | no |
440
450
  | set | PUT | `/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}` | no | no |
441
451
 
452
+ ### automation.scripts.vaults
453
+
454
+ | Method | HTTP | Path | Streaming | Pagination |
455
+ |---|---|---|---|---|
456
+ | delete | DELETE | `/automation/v1/scripts/{ns}/{name}/vaults/{alias}` | no | no |
457
+ | list | GET | `/automation/v1/scripts/{ns}/{name}/vaults` | no | no |
458
+ | set | PUT | `/automation/v1/scripts/{ns}/{name}/vaults/{alias}` | no | no |
459
+
442
460
  ### automation.scripts.versions
443
461
 
444
462
  | Method | HTTP | Path | Streaming | Pagination |
@@ -500,6 +518,14 @@ Multipart request bodies expand plain objects into bracketed fields (for example
500
518
  | list | GET | `/automation/v1/workflows/{ns}/{name}/dist-tags` | no | no |
501
519
  | set | PUT | `/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}` | no | no |
502
520
 
521
+ ### automation.workflows.vaults
522
+
523
+ | Method | HTTP | Path | Streaming | Pagination |
524
+ |---|---|---|---|---|
525
+ | delete | DELETE | `/automation/v1/workflows/{ns}/{name}/vaults/{alias}` | no | no |
526
+ | list | GET | `/automation/v1/workflows/{ns}/{name}/vaults` | no | no |
527
+ | set | PUT | `/automation/v1/workflows/{ns}/{name}/vaults/{alias}` | no | no |
528
+
503
529
  ### automation.workflows.versions
504
530
 
505
531
  | Method | HTTP | Path | Streaming | Pagination |
@@ -569,6 +595,110 @@ Multipart request bodies expand plain objects into bracketed fields (for example
569
595
  |---|---|---|---|---|
570
596
  | create | POST | `/browser/v1/sessions/{sessionId}/viewer` | no | no |
571
597
 
598
+ ## canvas
599
+
600
+ ### canvas.canvases
601
+
602
+ | Method | HTTP | Path | Streaming | Pagination |
603
+ |---|---|---|---|---|
604
+ | create | POST | `/canvas/v1/canvases` | no | no |
605
+ | delete | DELETE | `/canvas/v1/canvases/{canvas_id}` | no | no |
606
+ | execute | POST | `/canvas/v1/canvases/{canvas_id}:execute` | no | no |
607
+ | list | GET | `/canvas/v1/canvases` | no | yes |
608
+ | retrieve | GET | `/canvas/v1/canvases/{canvas_id}` | no | no |
609
+ | update | PATCH | `/canvas/v1/canvases/{canvas_id}` | no | no |
610
+
611
+ ### canvas.canvases.images
612
+
613
+ | Method | HTTP | Path | Streaming | Pagination |
614
+ |---|---|---|---|---|
615
+ | list | GET | `/canvas/v1/canvases/{canvas_id}/images` | no | no |
616
+
617
+ ### canvas.canvases.nodes
618
+
619
+ | Method | HTTP | Path | Streaming | Pagination |
620
+ |---|---|---|---|---|
621
+ | list | GET | `/canvas/v1/canvases/{canvas_id}/nodes` | no | no |
622
+
623
+ ### canvas.collections
624
+
625
+ | Method | HTTP | Path | Streaming | Pagination |
626
+ |---|---|---|---|---|
627
+ | create | POST | `/canvas/v1/collections` | no | no |
628
+ | delete | DELETE | `/canvas/v1/collections/{collection_id}` | no | no |
629
+ | list | GET | `/canvas/v1/collections` | no | no |
630
+ | retrieve | GET | `/canvas/v1/collections/{collection_id}` | no | no |
631
+ | update | PATCH | `/canvas/v1/collections/{collection_id}` | no | no |
632
+
633
+ ## cut
634
+
635
+ ### cut.exports
636
+
637
+ | Method | HTTP | Path | Streaming | Pagination |
638
+ |---|---|---|---|---|
639
+ | cancel | POST | `/cut/v1/exports/{export_id}:cancel` | no | no |
640
+ | retrieve | GET | `/cut/v1/exports/{export_id}` | no | no |
641
+
642
+ ### cut.projects
643
+
644
+ | Method | HTTP | Path | Streaming | Pagination |
645
+ |---|---|---|---|---|
646
+ | create | POST | `/cut/v1/projects` | no | no |
647
+ | delete | DELETE | `/cut/v1/projects/{project_id}` | no | no |
648
+ | execute | POST | `/cut/v1/projects/{project_id}:execute` | no | no |
649
+ | list | GET | `/cut/v1/projects` | no | no |
650
+ | retrieve | GET | `/cut/v1/projects/{project_id}` | no | no |
651
+ | retrieveState | GET | `/cut/v1/projects/{project_id}/state` | no | no |
652
+ | retrieveTimeline | GET | `/cut/v1/projects/{project_id}/timeline` | no | no |
653
+ | undelete | POST | `/cut/v1/projects/{project_id}:undelete` | no | no |
654
+ | update | PATCH | `/cut/v1/projects/{project_id}` | no | no |
655
+
656
+ ### cut.projects.analysis
657
+
658
+ | Method | HTTP | Path | Streaming | Pagination |
659
+ |---|---|---|---|---|
660
+ | create | POST | `/cut/v1/projects/{project_id}/analysis` | no | no |
661
+
662
+ ### cut.projects.bindings
663
+
664
+ | Method | HTTP | Path | Streaming | Pagination |
665
+ |---|---|---|---|---|
666
+ | create | POST | `/cut/v1/projects/{project_id}/bindings` | no | no |
667
+ | delete | DELETE | `/cut/v1/projects/{project_id}/bindings/{name}` | no | no |
668
+ | list | GET | `/cut/v1/projects/{project_id}/bindings` | no | no |
669
+
670
+ ### cut.projects.exports
671
+
672
+ | Method | HTTP | Path | Streaming | Pagination |
673
+ |---|---|---|---|---|
674
+ | create | POST | `/cut/v1/projects/{project_id}/exports` | no | no |
675
+ | list | GET | `/cut/v1/projects/{project_id}/exports` | no | no |
676
+
677
+ ### cut.projects.frames
678
+
679
+ | Method | HTTP | Path | Streaming | Pagination |
680
+ |---|---|---|---|---|
681
+ | list | GET | `/cut/v1/projects/{project_id}/frames` | no | no |
682
+
683
+ ### cut.projects.media
684
+
685
+ | Method | HTTP | Path | Streaming | Pagination |
686
+ |---|---|---|---|---|
687
+ | import | POST | `/cut/v1/projects/{project_id}/media:import` | no | no |
688
+
689
+ ### cut.projects.versions
690
+
691
+ | Method | HTTP | Path | Streaming | Pagination |
692
+ |---|---|---|---|---|
693
+ | create | POST | `/cut/v1/projects/{project_id}/versions` | no | no |
694
+ | list | GET | `/cut/v1/projects/{project_id}/versions` | no | no |
695
+
696
+ ### cut.versions
697
+
698
+ | Method | HTTP | Path | Streaming | Pagination |
699
+ |---|---|---|---|---|
700
+ | restore | POST | `/cut/v1/versions/{version_id}:restore` | no | no |
701
+
572
702
  ## database
573
703
 
574
704
  ### database.databases
@@ -634,6 +764,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
634
764
  | retrieve | GET | `/file/v1/files/{file_id}` | no | no |
635
765
  | retrieveContent | GET | `/file/v1/files/{file_id}/content` | no | no |
636
766
 
767
+ ### file.files.contentLinks
768
+
769
+ | Method | HTTP | Path | Streaming | Pagination |
770
+ |---|---|---|---|---|
771
+ | revoke | POST | `/file/v1/files/{file_id}/content_links:revoke` | no | no |
772
+
637
773
  ### file.uploads
638
774
 
639
775
  | Method | HTTP | Path | Streaming | Pagination |
@@ -641,6 +777,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
641
777
  | cancel | POST | `/file/v1/uploads/{upload_id}/cancel` | no | no |
642
778
  | complete | POST | `/file/v1/uploads/{upload_id}/complete` | no | no |
643
779
  | create | POST | `/file/v1/uploads` | no | no |
780
+ | createSigned | POST | `/file/v1/uploads/signed` | no | no |
644
781
 
645
782
  ### file.uploads.parts
646
783
 
@@ -771,6 +908,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
771
908
  | create | POST | `/media/v1/libraries/{library_id}/batches` | no | no |
772
909
  | retrieve | GET | `/media/v1/libraries/{library_id}/batches/{job_id}` | no | no |
773
910
 
911
+ ### media.libraries.deliveryTokens
912
+
913
+ | Method | HTTP | Path | Streaming | Pagination |
914
+ |---|---|---|---|---|
915
+ | create | POST | `/media/v1/libraries/{library_id}/delivery_tokens` | no | no |
916
+
774
917
  ### media.libraries.events
775
918
 
776
919
  | Method | HTTP | Path | Streaming | Pagination |
@@ -821,6 +964,13 @@ Multipart request bodies expand plain objects into bracketed fields (for example
821
964
 
822
965
  ## meta
823
966
 
967
+ ### meta.docs
968
+
969
+ | Method | HTTP | Path | Streaming | Pagination |
970
+ |---|---|---|---|---|
971
+ | retrieve | GET | `/meta/v1/docs/{path}` | no | no |
972
+ | search | GET | `/meta/v1/docs/search` | no | no |
973
+
824
974
  ### meta.health
825
975
 
826
976
  | Method | HTTP | Path | Streaming | Pagination |
@@ -944,6 +1094,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
944
1094
  |---|---|---|---|---|
945
1095
  | create | POST | `/model/v1/responses/input_tokens` | no | no |
946
1096
 
1097
+ ### model.systemone
1098
+
1099
+ | Method | HTTP | Path | Streaming | Pagination |
1100
+ |---|---|---|---|---|
1101
+ | create | POST | `/model/v1/systemone` | no | no |
1102
+
947
1103
  ### model.videos
948
1104
 
949
1105
  | Method | HTTP | Path | Streaming | Pagination |
@@ -1329,10 +1485,14 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1329
1485
  | agent.sessions.events.send | Events submit session input; the product verb is send rather than create. |
1330
1486
  | automation.hooks.send | Delivers a payload to a trigger's secret webhook URL; it sends an event rather than updating a hook resource. |
1331
1487
  | automation.scripts.distTags.set | A dist-tag assigns a version to a name; use npm vocabulary set rather than update. |
1488
+ | automation.scripts.vaults.set | Assign a whole vault to a definition alias, independently of published versions. |
1332
1489
  | automation.scripts.versions.create / publish | Creating a script version publishes it; publish is a product alias of versions.create. |
1333
1490
  | automation.workflows.distTags.set | Workflow dist-tags use the same npm-style assignment vocabulary as script dist-tags. |
1491
+ | automation.workflows.vaults.set | Assign a whole vault to a definition alias, independently of published versions. |
1334
1492
  | automation.workflows.versions.create / publish | Creating a workflow version publishes it; publish is a product alias of versions.create. |
1335
1493
  | database.databases.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
1494
+ | file.uploads.createSigned | Signed upload creation returns a one-time local PUT URL; ADR-039 names this operation uploads.createSigned. |
1495
+ | meta.docs.search | Documentation keyword search is an operation on docs, not a nested collection. |
1336
1496
  | sandbox.sandboxes.commands.run | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
1337
1497
  | sandbox.sandboxes.files.remove | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
1338
1498
  | sandbox.sandboxes.files.read | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
package/README.md CHANGED
@@ -55,7 +55,7 @@ server. You need a Praxis account; sign up at [deepraxis.com](https://deepraxis.
55
55
  const praxis = new Praxis({
56
56
  apiKey: process.env.PRAXIS_API_KEY!,
57
57
  baseUrl: 'https://api.deepraxis.com', // default
58
- timeoutMs: 60_000, // default; the whole call, body included
58
+ timeoutMs: 600_000, // default (10 minutes, as the OpenAI and Anthropic SDKs); the whole call, body included
59
59
  maxRetries: 2, // default
60
60
  // fetch: customFetch, // bring your own fetch
61
61
  });
@@ -23,6 +23,13 @@ export declare function createAutomationClient(options: PraxisOptions): {
23
23
  hooks: {
24
24
  send: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHooksReceiveData>) => Promise<import("./generated/types.gen.js").AutomationFiring>;
25
25
  };
26
+ humanTasks: {
27
+ cancel: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHumanTasksCancelData>) => Promise<import("./generated/types.gen.js").AutomationHumanTask>;
28
+ delegate: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHumanTasksDelegateData>) => Promise<import("./generated/types.gen.js").AutomationHumanTask>;
29
+ list: (options?: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHumanTasksListData> | undefined) => Promise<import("./automation.js").Page<import("./generated/types.gen.js").AutomationHumanTask>>;
30
+ respond: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHumanTasksRespondData>) => Promise<import("./generated/types.gen.js").AutomationHumanTask>;
31
+ retrieve: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationHumanTasksGetData>) => Promise<import("./generated/types.gen.js").AutomationHumanTask>;
32
+ };
26
33
  resolve: {
27
34
  retrieve: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationResolveResolveData>) => Promise<import("./generated/types.gen.js").AutomationResolveResult>;
28
35
  };
@@ -89,6 +96,33 @@ export declare function createAutomationClient(options: PraxisOptions): {
89
96
  restore: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsRestoreData>) => Promise<import("./generated/types.gen.js").AutomationDefinition>;
90
97
  retrieve: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsGetData>) => Promise<import("./generated/types.gen.js").AutomationDefinitionDetail>;
91
98
  update: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsPatchData>) => Promise<import("./generated/types.gen.js").AutomationDefinitionDetail>;
99
+ vaults: {
100
+ delete: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsVaultsDeleteData>) => Promise<void>;
101
+ list: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsVaultsListData>) => Promise<{
102
+ data: Array<{
103
+ alias: string;
104
+ vault: {
105
+ id: string;
106
+ name: string;
107
+ };
108
+ secrets: Array<{
109
+ name: string;
110
+ }>;
111
+ secrets_unavailable?: true;
112
+ }>;
113
+ }>;
114
+ set: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsVaultsSetData>) => Promise<{
115
+ alias: string;
116
+ vault: {
117
+ id: string;
118
+ name: string;
119
+ };
120
+ secrets: Array<{
121
+ name: string;
122
+ }>;
123
+ secrets_unavailable?: true;
124
+ }>;
125
+ };
92
126
  versions: {
93
127
  create: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsPublishData>) => Promise<import("./generated/types.gen.js").AutomationVersion>;
94
128
  deprecate: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationScriptsDeprecateData>) => Promise<import("./generated/types.gen.js").AutomationVersion>;
@@ -136,6 +170,33 @@ export declare function createAutomationClient(options: PraxisOptions): {
136
170
  restore: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsRestoreData>) => Promise<import("./generated/types.gen.js").AutomationDefinition>;
137
171
  retrieve: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsGetData>) => Promise<import("./generated/types.gen.js").AutomationDefinitionDetail>;
138
172
  update: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsPatchData>) => Promise<import("./generated/types.gen.js").AutomationDefinitionDetail>;
173
+ vaults: {
174
+ delete: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsVaultsDeleteData>) => Promise<void>;
175
+ list: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsVaultsListData>) => Promise<{
176
+ data: Array<{
177
+ alias: string;
178
+ vault: {
179
+ id: string;
180
+ name: string;
181
+ };
182
+ secrets: Array<{
183
+ name: string;
184
+ }>;
185
+ secrets_unavailable?: true;
186
+ }>;
187
+ }>;
188
+ set: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsVaultsSetData>) => Promise<{
189
+ alias: string;
190
+ vault: {
191
+ id: string;
192
+ name: string;
193
+ };
194
+ secrets: Array<{
195
+ name: string;
196
+ }>;
197
+ secrets_unavailable?: true;
198
+ }>;
199
+ };
139
200
  versions: {
140
201
  create: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsPublishData>) => Promise<import("./generated/types.gen.js").AutomationVersion>;
141
202
  deprecate: (options: import("./core/transport.js").CallOptions<import("./generated/types.gen.js").AutomationWorkflowsDeprecateData>) => Promise<import("./generated/types.gen.js").AutomationVersion>;
@@ -25,6 +25,15 @@ type InternalOptions = RequestOptions & {
25
25
  query?: unknown;
26
26
  lastEventId?: string;
27
27
  };
28
+ /** Margin over a server-side execution deadline: the response still has to travel back after it. */
29
+ export declare const SERVER_DEADLINE_MARGIN_MS = 30000;
30
+ /**
31
+ * A request body that carries its own execution deadline (`timeoutMs`, as in sandbox commands.run) is
32
+ * waited for at least that long plus a margin, so the client never gives up before the server answers.
33
+ */
34
+ export declare function serverDeadlineMs(options: {
35
+ body?: unknown;
36
+ }): number;
28
37
  export declare class Transport {
29
38
  private readonly config;
30
39
  constructor(options: PraxisOptions);
@@ -32,10 +32,21 @@ function assertKnownOptions(options) {
32
32
  detail: `Unrecognised option ${stray.length > 1 ? 'keys' : 'key'} ${names}. Request parameters are not flat: put each under \`query\` (GET/DELETE: filters, pagination), \`path\` (URL segments) or \`body\` (POST/PATCH/PUT payload), e.g. call({ query: { ${stray[0]} } }) or call({ body: { ${stray[0]} } }). Common top-level keys: path, query, body, headers, signal, timeoutMs, maxRetries.`,
33
33
  });
34
34
  }
35
+ /** Margin over a server-side execution deadline: the response still has to travel back after it. */
36
+ export const SERVER_DEADLINE_MARGIN_MS = 30_000;
37
+ /**
38
+ * A request body that carries its own execution deadline (`timeoutMs`, as in sandbox commands.run) is
39
+ * waited for at least that long plus a margin, so the client never gives up before the server answers.
40
+ */
41
+ export function serverDeadlineMs(options) {
42
+ const body = options.body;
43
+ const deadline = body && typeof body === 'object' ? body.timeoutMs : undefined;
44
+ return typeof deadline === 'number' && Number.isFinite(deadline) && deadline > 0 ? deadline + SERVER_DEADLINE_MARGIN_MS : 0;
45
+ }
35
46
  export class Transport {
36
47
  config;
37
48
  constructor(options) {
38
- this.config = { timeoutMs: 60_000, maxRetries: 2, fetch: globalThis.fetch, ...options };
49
+ this.config = { timeoutMs: 600_000, maxRetries: 2, fetch: globalThis.fetch, ...options };
39
50
  this.validate(this.config.timeoutMs, this.config.maxRetries);
40
51
  }
41
52
  validate(timeout, retries) {
@@ -46,7 +57,7 @@ export class Transport {
46
57
  }
47
58
  scope(options, streaming) {
48
59
  assertKnownOptions(options);
49
- const timeoutMs = options.timeoutMs ?? this.config.timeoutMs;
60
+ const timeoutMs = options.timeoutMs ?? Math.max(this.config.timeoutMs, serverDeadlineMs(options));
50
61
  const maxRetries = options.maxRetries ?? this.config.maxRetries;
51
62
  this.validate(timeoutMs, maxRetries);
52
63
  const controller = new AbortController();