@deepraxis/sdk 0.1.1-dev.78b913a → 0.1.1-dev.7bc135e
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 +118 -59
- package/README.md +1 -1
- package/dist/automation.d.ts +7 -0
- package/dist/core/client.d.ts +5 -1
- package/dist/core/client.js +10 -0
- package/dist/core/transport.js +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +262 -125
- package/dist/generated/sdk.gen.js +710 -270
- package/dist/generated/types.gen.d.ts +11261 -8408
- package/dist/helpers/application-build.d.ts +10 -0
- package/dist/helpers/application-build.js +98 -0
- package/dist/helpers/application-publish.d.ts +8 -0
- package/dist/helpers/application-publish.js +26 -9
- package/dist/helpers/browser-connect.d.ts +78 -0
- package/dist/helpers/browser-connect.js +161 -0
- package/dist/helpers/browser-decisions.d.ts +44 -0
- package/dist/helpers/browser-decisions.js +84 -0
- package/dist/helpers/browser-documentation.d.ts +2 -0
- package/dist/helpers/browser-documentation.js +47 -0
- package/dist/helpers/file-upload.d.ts +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/operations.generated.d.ts +1156 -516
- package/dist/operations.generated.js +1494 -690
- package/dist/resources.generated.d.ts +244 -445
- package/dist/resources.generated.js +77 -31
- package/package.json +1 -1
package/METHODS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SDK methods
|
|
2
2
|
|
|
3
|
-
Generated by `bun run generate`.
|
|
3
|
+
Generated by `bun run generate`. 458 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
|
|
|
@@ -65,33 +65,6 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
65
65
|
|---|---|---|---|---|
|
|
66
66
|
| create | POST | `/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock` | no | no |
|
|
67
67
|
|
|
68
|
-
### agent.agents.endUsers
|
|
69
|
-
|
|
70
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
71
|
-
|---|---|---|---|---|
|
|
72
|
-
| delete | DELETE | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
|
|
73
|
-
| list | GET | `/agent/v1/agents/{agent_id}/end_users` | no | no |
|
|
74
|
-
| retrieve | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
|
|
75
|
-
| retrieveDeletion | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion` | no | no |
|
|
76
|
-
|
|
77
|
-
### agent.agents.endUsers.block
|
|
78
|
-
|
|
79
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
80
|
-
|---|---|---|---|---|
|
|
81
|
-
| create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block` | no | no |
|
|
82
|
-
|
|
83
|
-
### agent.agents.endUsers.revokeTokens
|
|
84
|
-
|
|
85
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
86
|
-
|---|---|---|---|---|
|
|
87
|
-
| create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens` | no | no |
|
|
88
|
-
|
|
89
|
-
### agent.agents.endUsers.unblock
|
|
90
|
-
|
|
91
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
92
|
-
|---|---|---|---|---|
|
|
93
|
-
| create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock` | no | no |
|
|
94
|
-
|
|
95
68
|
### agent.agents.unarchive
|
|
96
69
|
|
|
97
70
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -172,37 +145,6 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
172
145
|
|---|---|---|---|---|
|
|
173
146
|
| create | POST | `/agent/v1/deployments/{deployment_id}/unpause` | no | no |
|
|
174
147
|
|
|
175
|
-
### agent.embed
|
|
176
|
-
|
|
177
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
178
|
-
|---|---|---|---|---|
|
|
179
|
-
| retrieveAppearance | GET | `/agent/v1/embed/appearance` | no | no |
|
|
180
|
-
|
|
181
|
-
### agent.embed.exchange
|
|
182
|
-
|
|
183
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
184
|
-
|---|---|---|---|---|
|
|
185
|
-
| create | POST | `/agent/v1/embed/exchange` | no | no |
|
|
186
|
-
|
|
187
|
-
### agent.embedTokens
|
|
188
|
-
|
|
189
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
190
|
-
|---|---|---|---|---|
|
|
191
|
-
| create | POST | `/agent/v1/embed_tokens` | no | no |
|
|
192
|
-
| list | GET | `/agent/v1/embed_tokens` | no | no |
|
|
193
|
-
|
|
194
|
-
### agent.embedTokens.anonymous
|
|
195
|
-
|
|
196
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
197
|
-
|---|---|---|---|---|
|
|
198
|
-
| create | POST | `/agent/v1/embed_tokens/anonymous` | no | no |
|
|
199
|
-
|
|
200
|
-
### agent.embedTokens.revoke
|
|
201
|
-
|
|
202
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
203
|
-
|---|---|---|---|---|
|
|
204
|
-
| create | POST | `/agent/v1/embed_tokens/{id}/revoke` | no | no |
|
|
205
|
-
|
|
206
148
|
### agent.environments
|
|
207
149
|
|
|
208
150
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -432,6 +374,16 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
432
374
|
|---|---|---|---|---|
|
|
433
375
|
| send | POST | `/automation/v1/hooks/{trigger_id}/{token}` | no | no |
|
|
434
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
|
+
|
|
435
387
|
### automation.resolve
|
|
436
388
|
|
|
437
389
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -627,6 +579,99 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
627
579
|
|---|---|---|---|---|
|
|
628
580
|
| create | POST | `/browser/v1/sessions/{sessionId}/viewer` | no | no |
|
|
629
581
|
|
|
582
|
+
## canvas
|
|
583
|
+
|
|
584
|
+
### canvas.canvases
|
|
585
|
+
|
|
586
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
587
|
+
|---|---|---|---|---|
|
|
588
|
+
| create | POST | `/canvas/v1/canvases` | no | no |
|
|
589
|
+
| delete | DELETE | `/canvas/v1/canvases/{canvas_id}` | no | no |
|
|
590
|
+
| execute | POST | `/canvas/v1/canvases/{canvas_id}:execute` | no | no |
|
|
591
|
+
| list | GET | `/canvas/v1/canvases` | no | yes |
|
|
592
|
+
| retrieve | GET | `/canvas/v1/canvases/{canvas_id}` | no | no |
|
|
593
|
+
|
|
594
|
+
### canvas.canvases.images
|
|
595
|
+
|
|
596
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
597
|
+
|---|---|---|---|---|
|
|
598
|
+
| list | GET | `/canvas/v1/canvases/{canvas_id}/images` | no | no |
|
|
599
|
+
|
|
600
|
+
### canvas.canvases.nodes
|
|
601
|
+
|
|
602
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
603
|
+
|---|---|---|---|---|
|
|
604
|
+
| list | GET | `/canvas/v1/canvases/{canvas_id}/nodes` | no | no |
|
|
605
|
+
|
|
606
|
+
## cut
|
|
607
|
+
|
|
608
|
+
### cut.exports
|
|
609
|
+
|
|
610
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
611
|
+
|---|---|---|---|---|
|
|
612
|
+
| cancel | POST | `/cut/v1/exports/{export_id}:cancel` | no | no |
|
|
613
|
+
| retrieve | GET | `/cut/v1/exports/{export_id}` | no | no |
|
|
614
|
+
|
|
615
|
+
### cut.projects
|
|
616
|
+
|
|
617
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
618
|
+
|---|---|---|---|---|
|
|
619
|
+
| create | POST | `/cut/v1/projects` | no | no |
|
|
620
|
+
| delete | DELETE | `/cut/v1/projects/{project_id}` | no | no |
|
|
621
|
+
| execute | POST | `/cut/v1/projects/{project_id}:execute` | no | no |
|
|
622
|
+
| list | GET | `/cut/v1/projects` | no | no |
|
|
623
|
+
| retrieve | GET | `/cut/v1/projects/{project_id}` | no | no |
|
|
624
|
+
| retrieveState | GET | `/cut/v1/projects/{project_id}/state` | no | no |
|
|
625
|
+
| retrieveTimeline | GET | `/cut/v1/projects/{project_id}/timeline` | no | no |
|
|
626
|
+
| undelete | POST | `/cut/v1/projects/{project_id}:undelete` | no | no |
|
|
627
|
+
| update | PATCH | `/cut/v1/projects/{project_id}` | no | no |
|
|
628
|
+
|
|
629
|
+
### cut.projects.analysis
|
|
630
|
+
|
|
631
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
632
|
+
|---|---|---|---|---|
|
|
633
|
+
| create | POST | `/cut/v1/projects/{project_id}/analysis` | no | no |
|
|
634
|
+
|
|
635
|
+
### cut.projects.bindings
|
|
636
|
+
|
|
637
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
638
|
+
|---|---|---|---|---|
|
|
639
|
+
| create | POST | `/cut/v1/projects/{project_id}/bindings` | no | no |
|
|
640
|
+
| delete | DELETE | `/cut/v1/projects/{project_id}/bindings/{name}` | no | no |
|
|
641
|
+
| list | GET | `/cut/v1/projects/{project_id}/bindings` | no | no |
|
|
642
|
+
|
|
643
|
+
### cut.projects.exports
|
|
644
|
+
|
|
645
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
646
|
+
|---|---|---|---|---|
|
|
647
|
+
| create | POST | `/cut/v1/projects/{project_id}/exports` | no | no |
|
|
648
|
+
| list | GET | `/cut/v1/projects/{project_id}/exports` | no | no |
|
|
649
|
+
|
|
650
|
+
### cut.projects.frames
|
|
651
|
+
|
|
652
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
653
|
+
|---|---|---|---|---|
|
|
654
|
+
| list | GET | `/cut/v1/projects/{project_id}/frames` | no | no |
|
|
655
|
+
|
|
656
|
+
### cut.projects.media
|
|
657
|
+
|
|
658
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
659
|
+
|---|---|---|---|---|
|
|
660
|
+
| import | POST | `/cut/v1/projects/{project_id}/media:import` | no | no |
|
|
661
|
+
|
|
662
|
+
### cut.projects.versions
|
|
663
|
+
|
|
664
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
665
|
+
|---|---|---|---|---|
|
|
666
|
+
| create | POST | `/cut/v1/projects/{project_id}/versions` | no | no |
|
|
667
|
+
| list | GET | `/cut/v1/projects/{project_id}/versions` | no | no |
|
|
668
|
+
|
|
669
|
+
### cut.versions
|
|
670
|
+
|
|
671
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
672
|
+
|---|---|---|---|---|
|
|
673
|
+
| restore | POST | `/cut/v1/versions/{version_id}:restore` | no | no |
|
|
674
|
+
|
|
630
675
|
## database
|
|
631
676
|
|
|
632
677
|
### database.databases
|
|
@@ -879,6 +924,13 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
879
924
|
|
|
880
925
|
## meta
|
|
881
926
|
|
|
927
|
+
### meta.docs
|
|
928
|
+
|
|
929
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
930
|
+
|---|---|---|---|---|
|
|
931
|
+
| retrieve | GET | `/meta/v1/docs/{path}` | no | no |
|
|
932
|
+
| search | GET | `/meta/v1/docs/search` | no | no |
|
|
933
|
+
|
|
882
934
|
### meta.health
|
|
883
935
|
|
|
884
936
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1002,6 +1054,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1002
1054
|
|---|---|---|---|---|
|
|
1003
1055
|
| create | POST | `/model/v1/responses/input_tokens` | no | no |
|
|
1004
1056
|
|
|
1057
|
+
### model.systemone
|
|
1058
|
+
|
|
1059
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1060
|
+
|---|---|---|---|---|
|
|
1061
|
+
| create | POST | `/model/v1/systemone` | no | no |
|
|
1062
|
+
|
|
1005
1063
|
### model.videos
|
|
1006
1064
|
|
|
1007
1065
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1391,6 +1449,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1391
1449
|
| automation.workflows.distTags.set | Workflow dist-tags use the same npm-style assignment vocabulary as script dist-tags. |
|
|
1392
1450
|
| automation.workflows.versions.create / publish | Creating a workflow version publishes it; publish is a product alias of versions.create. |
|
|
1393
1451
|
| database.databases.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
|
|
1452
|
+
| meta.docs.search | Documentation keyword search is an operation on docs, not a nested collection. |
|
|
1394
1453
|
| sandbox.sandboxes.commands.run | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
1395
1454
|
| sandbox.sandboxes.files.remove | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
1396
1455
|
| 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:
|
|
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
|
});
|
package/dist/automation.d.ts
CHANGED
|
@@ -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
|
};
|
package/dist/core/client.d.ts
CHANGED
|
@@ -2,11 +2,15 @@ import { type UploadFileOptions, type UploadedFile } from '../helpers/file-uploa
|
|
|
2
2
|
import { resourceFactories } from '../resources.generated.js';
|
|
3
3
|
import { type PraxisOptions } from './transport.js';
|
|
4
4
|
import { type PublishInput, type PublishResult } from '../helpers/application-publish.js';
|
|
5
|
+
import { type BrowserConnectOptions, type PraxisBrowser } from '../helpers/browser-connect.js';
|
|
5
6
|
import { type CountInput, type CountResult } from '../helpers/database-count.js';
|
|
6
7
|
type Resources = {
|
|
7
8
|
readonly [K in keyof typeof resourceFactories]: ReturnType<(typeof resourceFactories)[K]>;
|
|
8
9
|
};
|
|
9
|
-
export interface Praxis extends Omit<Resources, 'application' | 'database' | 'file'> {
|
|
10
|
+
export interface Praxis extends Omit<Resources, 'application' | 'browser' | 'database' | 'file'> {
|
|
11
|
+
readonly browser: Resources['browser'] & {
|
|
12
|
+
connect(options?: BrowserConnectOptions): Promise<PraxisBrowser>;
|
|
13
|
+
};
|
|
10
14
|
readonly file: Resources['file'] & {
|
|
11
15
|
uploadFile(file: Blob | File, options: UploadFileOptions): Promise<UploadedFile>;
|
|
12
16
|
};
|
package/dist/core/client.js
CHANGED
|
@@ -2,6 +2,7 @@ import { uploadFile } from "../helpers/file-upload.js";
|
|
|
2
2
|
import { resourceFactories } from "../resources.generated.js";
|
|
3
3
|
import { Transport } from "./transport.js";
|
|
4
4
|
import { publish } from "../helpers/application-publish.js";
|
|
5
|
+
import { connectBrowser } from "../helpers/browser-connect.js";
|
|
5
6
|
import { count } from "../helpers/database-count.js";
|
|
6
7
|
export class Praxis {
|
|
7
8
|
constructor(options) {
|
|
@@ -13,6 +14,15 @@ export class Praxis {
|
|
|
13
14
|
Object.assign(resource, { uploadFile: (file, options) => uploadFile(this, file, options) });
|
|
14
15
|
if (name === 'database')
|
|
15
16
|
Object.assign(resource, { count: (input) => count(transport, input) });
|
|
17
|
+
if (name === 'browser') {
|
|
18
|
+
// The npm build has no Node globals in scope; name the process shape this helper reads.
|
|
19
|
+
const host = globalThis.process;
|
|
20
|
+
Object.assign(resource, { connect: (options) => connectBrowser({
|
|
21
|
+
contexts: resource.contexts,
|
|
22
|
+
env: host?.env ?? {},
|
|
23
|
+
builtin: host?.getBuiltinModule?.bind(host),
|
|
24
|
+
}, options) });
|
|
25
|
+
}
|
|
16
26
|
if (name === 'application')
|
|
17
27
|
Object.assign(resource, { publish: (input) => publish(this, input) });
|
|
18
28
|
Object.defineProperty(this, name, { value: resource, enumerable: true });
|
package/dist/core/transport.js
CHANGED
|
@@ -35,7 +35,7 @@ function assertKnownOptions(options) {
|
|
|
35
35
|
export class Transport {
|
|
36
36
|
config;
|
|
37
37
|
constructor(options) {
|
|
38
|
-
this.config = { timeoutMs:
|
|
38
|
+
this.config = { timeoutMs: 600_000, maxRetries: 2, fetch: globalThis.fetch, ...options };
|
|
39
39
|
this.validate(this.config.timeoutMs, this.config.maxRetries);
|
|
40
40
|
}
|
|
41
41
|
validate(timeout, retries) {
|