@deepraxis/sdk 0.1.1-dev.d25d171 → 0.1.1-dev.ed5af3e

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
@@ -16,8 +16,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
16
16
  | create | POST | `/agent/v1/agents` | no | no |
17
17
  | list | GET | `/agent/v1/agents` | no | no |
18
18
  | retrieve | GET | `/agent/v1/agents/{agent_id}` | no | no |
19
+ | retrieveAppearance | GET | `/agent/v1/agents/{agent_id}/appearance` | no | no |
19
20
  | update | POST | `/agent/v1/agents/{agent_id}` | no | no |
20
21
 
22
+ ### agent.agents.customers
23
+
24
+ | Method | HTTP | Path | Streaming | Pagination |
25
+ |---|---|---|---|---|
26
+ | delete | DELETE | `/agent/v1/agents/{agent_id}/customers/{customer_id}` | no | no |
27
+ | list | GET | `/agent/v1/agents/{agent_id}/customers` | no | no |
28
+ | retrieve | GET | `/agent/v1/agents/{agent_id}/customers/{customer_id}` | no | no |
29
+ | retrieveDeletion | GET | `/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion` | no | no |
30
+
21
31
  ### agent.agents.customers.auth.accessTokens
22
32
 
23
33
  | Method | HTTP | Path | Streaming | Pagination |
@@ -37,32 +47,23 @@ Multipart request bodies expand plain objects into bracketed fields (for example
37
47
  |---|---|---|---|---|
38
48
  | create | POST | `/agent/v1/agents/{agent_id}/customers/auth/grant_codes` | no | no |
39
49
 
40
- ### agent.agents.endUsers
41
-
42
- | Method | HTTP | Path | Streaming | Pagination |
43
- |---|---|---|---|---|
44
- | delete | DELETE | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
45
- | list | GET | `/agent/v1/agents/{agent_id}/end_users` | no | no |
46
- | retrieve | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
47
- | retrieveDeletion | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion` | no | no |
48
-
49
- ### agent.agents.endUsers.block
50
+ ### agent.agents.customers.block
50
51
 
51
52
  | Method | HTTP | Path | Streaming | Pagination |
52
53
  |---|---|---|---|---|
53
- | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block` | no | no |
54
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/{customer_id}/block` | no | no |
54
55
 
55
- ### agent.agents.endUsers.revokeTokens
56
+ ### agent.agents.customers.revokeTokens
56
57
 
57
58
  | Method | HTTP | Path | Streaming | Pagination |
58
59
  |---|---|---|---|---|
59
- | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens` | no | no |
60
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens` | no | no |
60
61
 
61
- ### agent.agents.endUsers.unblock
62
+ ### agent.agents.customers.unblock
62
63
 
63
64
  | Method | HTTP | Path | Streaming | Pagination |
64
65
  |---|---|---|---|---|
65
- | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock` | no | no |
66
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock` | no | no |
66
67
 
67
68
  ### agent.agents.unarchive
68
69
 
@@ -144,37 +145,6 @@ Multipart request bodies expand plain objects into bracketed fields (for example
144
145
  |---|---|---|---|---|
145
146
  | create | POST | `/agent/v1/deployments/{deployment_id}/unpause` | no | no |
146
147
 
147
- ### agent.embed
148
-
149
- | Method | HTTP | Path | Streaming | Pagination |
150
- |---|---|---|---|---|
151
- | retrieveAppearance | GET | `/agent/v1/embed/appearance` | no | no |
152
-
153
- ### agent.embed.exchange
154
-
155
- | Method | HTTP | Path | Streaming | Pagination |
156
- |---|---|---|---|---|
157
- | create | POST | `/agent/v1/embed/exchange` | no | no |
158
-
159
- ### agent.embedTokens
160
-
161
- | Method | HTTP | Path | Streaming | Pagination |
162
- |---|---|---|---|---|
163
- | create | POST | `/agent/v1/embed_tokens` | no | no |
164
- | list | GET | `/agent/v1/embed_tokens` | no | no |
165
-
166
- ### agent.embedTokens.anonymous
167
-
168
- | Method | HTTP | Path | Streaming | Pagination |
169
- |---|---|---|---|---|
170
- | create | POST | `/agent/v1/embed_tokens/anonymous` | no | no |
171
-
172
- ### agent.embedTokens.revoke
173
-
174
- | Method | HTTP | Path | Streaming | Pagination |
175
- |---|---|---|---|---|
176
- | create | POST | `/agent/v1/embed_tokens/{id}/revoke` | no | no |
177
-
178
148
  ### agent.environments
179
149
 
180
150
  | Method | HTTP | Path | Streaming | Pagination |
@@ -404,6 +374,16 @@ Multipart request bodies expand plain objects into bracketed fields (for example
404
374
  |---|---|---|---|---|
405
375
  | send | POST | `/automation/v1/hooks/{trigger_id}/{token}` | no | no |
406
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
+
407
387
  ### automation.resolve
408
388
 
409
389
  | Method | HTTP | Path | Streaming | Pagination |
@@ -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
  };
@@ -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
  };
@@ -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 });