@deepraxis/sdk 0.1.0-dev.ea77ce8 → 0.1.0-dev.ec3814e

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`. 348 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`. 426 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
 
@@ -18,10 +18,63 @@ Multipart request bodies expand plain objects into bracketed fields (for example
18
18
  | retrieve | GET | `/agent/v1/agents/{agent_id}` | no | no |
19
19
  | update | POST | `/agent/v1/agents/{agent_id}` | no | no |
20
20
 
21
+ ### agent.agents.customers.auth.accessTokens
22
+
23
+ | Method | HTTP | Path | Streaming | Pagination |
24
+ |---|---|---|---|---|
25
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/auth/access_tokens` | no | no |
26
+ | deleteCurrent | DELETE | `/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current` | no | no |
27
+
28
+ ### agent.agents.customers.auth.accessTokens.renew
29
+
30
+ | Method | HTTP | Path | Streaming | Pagination |
31
+ |---|---|---|---|---|
32
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/auth/access_tokens/renew` | no | no |
33
+
34
+ ### agent.agents.customers.auth.grantCodes
35
+
36
+ | Method | HTTP | Path | Streaming | Pagination |
37
+ |---|---|---|---|---|
38
+ | create | POST | `/agent/v1/agents/{agent_id}/customers/auth/grant_codes` | no | no |
39
+
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
+
51
+ | Method | HTTP | Path | Streaming | Pagination |
52
+ |---|---|---|---|---|
53
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block` | no | no |
54
+
55
+ ### agent.agents.endUsers.revokeTokens
56
+
57
+ | Method | HTTP | Path | Streaming | Pagination |
58
+ |---|---|---|---|---|
59
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens` | no | no |
60
+
61
+ ### agent.agents.endUsers.unblock
62
+
63
+ | Method | HTTP | Path | Streaming | Pagination |
64
+ |---|---|---|---|---|
65
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock` | no | no |
66
+
67
+ ### agent.agents.unarchive
68
+
69
+ | Method | HTTP | Path | Streaming | Pagination |
70
+ |---|---|---|---|---|
71
+ | create | POST | `/agent/v1/agents/{agent_id}/unarchive` | no | no |
72
+
21
73
  ### agent.agents.versions
22
74
 
23
75
  | Method | HTTP | Path | Streaming | Pagination |
24
76
  |---|---|---|---|---|
77
+ | apply | POST | `/agent/v1/agents/{agent_id}/versions/{version}/apply` | no | no |
25
78
  | list | GET | `/agent/v1/agents/{agent_id}/versions` | no | no |
26
79
 
27
80
  ### agent.computers
@@ -49,6 +102,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
49
102
  | list | GET | `/agent/v1/computers/{computer_id}/files` | no | no |
50
103
  | retrieveContent | GET | `/agent/v1/computers/{computer_id}/files/content` | no | no |
51
104
 
105
+ ### agent.computers.leases
106
+
107
+ | Method | HTTP | Path | Streaming | Pagination |
108
+ |---|---|---|---|---|
109
+ | delete | DELETE | `/agent/v1/computers/{computer_id}/leases/{lease_id}` | no | no |
110
+
111
+ ### agent.computers.leases.renew
112
+
113
+ | Method | HTTP | Path | Streaming | Pagination |
114
+ |---|---|---|---|---|
115
+ | create | POST | `/agent/v1/computers/{computer_id}/leases/{lease_id}/renew` | no | no |
116
+
52
117
  ### agent.deploymentRuns
53
118
 
54
119
  | Method | HTTP | Path | Streaming | Pagination |
@@ -79,6 +144,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
79
144
  |---|---|---|---|---|
80
145
  | create | POST | `/agent/v1/deployments/{deployment_id}/unpause` | no | no |
81
146
 
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
+
82
159
  ### agent.embedTokens
83
160
 
84
161
  | Method | HTTP | Path | Streaming | Pagination |
@@ -86,6 +163,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
86
163
  | create | POST | `/agent/v1/embed_tokens` | no | no |
87
164
  | list | GET | `/agent/v1/embed_tokens` | no | no |
88
165
 
166
+ ### agent.embedTokens.anonymous
167
+
168
+ | Method | HTTP | Path | Streaming | Pagination |
169
+ |---|---|---|---|---|
170
+ | create | POST | `/agent/v1/embed_tokens/anonymous` | no | no |
171
+
89
172
  ### agent.embedTokens.revoke
90
173
 
91
174
  | Method | HTTP | Path | Streaming | Pagination |
@@ -109,6 +192,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
109
192
  | archive | POST | `/agent/v1/sessions/{session_id}/archive` | no | no |
110
193
  | compact | POST | `/agent/v1/sessions/{session_id}/compact` | no | no |
111
194
  | create | POST | `/agent/v1/sessions` | no | no |
195
+ | delete | DELETE | `/agent/v1/sessions/{session_id}` | no | no |
112
196
  | fork | POST | `/agent/v1/sessions/{session_id}/fork` | no | no |
113
197
  | list | GET | `/agent/v1/sessions` | no | no |
114
198
  | retrieve | GET | `/agent/v1/sessions/{session_id}` | no | no |
@@ -174,6 +258,25 @@ Multipart request bodies expand plain objects into bracketed fields (for example
174
258
  |---|---|---|---|---|
175
259
  | list | GET | `/agent/v1/sessions/{session_id}/threads/{thread_id}/events` | no | no |
176
260
 
261
+ ### agent.skills
262
+
263
+ | Method | HTTP | Path | Streaming | Pagination |
264
+ |---|---|---|---|---|
265
+ | create | POST | `/agent/v1/skills` | no | no |
266
+ | delete | DELETE | `/agent/v1/skills/{skill_id}` | no | no |
267
+ | list | GET | `/agent/v1/skills` | no | no |
268
+ | retrieve | GET | `/agent/v1/skills/{skill_id}` | no | no |
269
+
270
+ ### agent.skills.versions
271
+
272
+ | Method | HTTP | Path | Streaming | Pagination |
273
+ |---|---|---|---|---|
274
+ | create | POST | `/agent/v1/skills/{skill_id}/versions` | no | no |
275
+ | delete | DELETE | `/agent/v1/skills/{skill_id}/versions/{version}` | no | no |
276
+ | list | GET | `/agent/v1/skills/{skill_id}/versions` | no | no |
277
+ | retrieve | GET | `/agent/v1/skills/{skill_id}/versions/{version}` | no | no |
278
+ | retrieveContent | GET | `/agent/v1/skills/{skill_id}/versions/{version}/content` | no | no |
279
+
177
280
  ### agent.toolsets
178
281
 
179
282
  | Method | HTTP | Path | Streaming | Pagination |
@@ -256,6 +359,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
256
359
  | list | GET | `/application/v1/workers/{worker_id}/versions` | no | yes |
257
360
  | retrieve | GET | `/application/v1/workers/{worker_id}/versions/{version_id}` | no | no |
258
361
 
362
+ ### application.workers.versions.assets
363
+
364
+ | Method | HTTP | Path | Streaming | Pagination |
365
+ |---|---|---|---|---|
366
+ | retrieveManifest | GET | `/application/v1/workers/{worker_id}/versions/{version_id}/assets/manifest` | no | no |
367
+
259
368
  ## automation
260
369
 
261
370
  ### automation.actions
@@ -555,6 +664,20 @@ Multipart request bodies expand plain objects into bracketed fields (for example
555
664
  | retrieve | GET | `/file/v1/files/{file_id}` | no | no |
556
665
  | retrieveContent | GET | `/file/v1/files/{file_id}/content` | no | no |
557
666
 
667
+ ### file.uploads
668
+
669
+ | Method | HTTP | Path | Streaming | Pagination |
670
+ |---|---|---|---|---|
671
+ | cancel | POST | `/file/v1/uploads/{upload_id}/cancel` | no | no |
672
+ | complete | POST | `/file/v1/uploads/{upload_id}/complete` | no | no |
673
+ | create | POST | `/file/v1/uploads` | no | no |
674
+
675
+ ### file.uploads.parts
676
+
677
+ | Method | HTTP | Path | Streaming | Pagination |
678
+ |---|---|---|---|---|
679
+ | create | POST | `/file/v1/uploads/{upload_id}/parts` | no | no |
680
+
558
681
  ## knowledge
559
682
 
560
683
  ### knowledge.vectorStores
@@ -888,6 +1011,21 @@ Multipart request bodies expand plain objects into bracketed fields (for example
888
1011
  | Method | HTTP | Path | Streaming | Pagination |
889
1012
  |---|---|---|---|---|
890
1013
  | create | POST | `/organization/v1/feedback` | no | no |
1014
+ | list | GET | `/organization/v1/feedback` | no | no |
1015
+ | retrieve | GET | `/organization/v1/feedback/{id}` | no | no |
1016
+
1017
+ ### organization.feedback.counts
1018
+
1019
+ | Method | HTTP | Path | Streaming | Pagination |
1020
+ |---|---|---|---|---|
1021
+ | list | GET | `/organization/v1/feedback/counts` | no | no |
1022
+
1023
+ ### organization.feedback.messages
1024
+
1025
+ | Method | HTTP | Path | Streaming | Pagination |
1026
+ |---|---|---|---|---|
1027
+ | create | POST | `/organization/v1/feedback/{id}/messages` | no | no |
1028
+ | list | GET | `/organization/v1/feedback/{id}/messages` | no | no |
891
1029
 
892
1030
  ### organization.usage
893
1031
 
@@ -1008,6 +1146,123 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1008
1146
  |---|---|---|---|---|
1009
1147
  | create | POST | `/search/v1/search` | no | no |
1010
1148
 
1149
+ ## ticket
1150
+
1151
+ ### ticket.activity
1152
+
1153
+ | Method | HTTP | Path | Streaming | Pagination |
1154
+ |---|---|---|---|---|
1155
+ | retrieve | GET | `/ticket/v1/activity` | no | no |
1156
+
1157
+ ### ticket.comments
1158
+
1159
+ | Method | HTTP | Path | Streaming | Pagination |
1160
+ |---|---|---|---|---|
1161
+ | delete | DELETE | `/ticket/v1/comments/{id}` | no | no |
1162
+ | retrieve | GET | `/ticket/v1/comments/{id}` | no | no |
1163
+ | update | PATCH | `/ticket/v1/comments/{id}` | no | no |
1164
+
1165
+ ### ticket.comments.reactions
1166
+
1167
+ | Method | HTTP | Path | Streaming | Pagination |
1168
+ |---|---|---|---|---|
1169
+ | create | POST | `/ticket/v1/comments/{id}/reactions` | no | no |
1170
+ | delete | DELETE | `/ticket/v1/comments/{id}/reactions/{content}` | no | no |
1171
+ | list | GET | `/ticket/v1/comments/{id}/reactions` | no | no |
1172
+
1173
+ ### ticket.labels
1174
+
1175
+ | Method | HTTP | Path | Streaming | Pagination |
1176
+ |---|---|---|---|---|
1177
+ | create | POST | `/ticket/v1/labels` | no | no |
1178
+ | delete | DELETE | `/ticket/v1/labels/{name}` | no | no |
1179
+ | list | GET | `/ticket/v1/labels` | no | no |
1180
+ | update | PATCH | `/ticket/v1/labels/{name}` | no | no |
1181
+
1182
+ ### ticket.milestones
1183
+
1184
+ | Method | HTTP | Path | Streaming | Pagination |
1185
+ |---|---|---|---|---|
1186
+ | create | POST | `/ticket/v1/milestones` | no | no |
1187
+ | delete | DELETE | `/ticket/v1/milestones/{number}` | no | no |
1188
+ | list | GET | `/ticket/v1/milestones` | no | no |
1189
+ | retrieve | GET | `/ticket/v1/milestones/{number}` | no | no |
1190
+ | update | PATCH | `/ticket/v1/milestones/{number}` | no | no |
1191
+
1192
+ ### ticket.repositories
1193
+
1194
+ | Method | HTTP | Path | Streaming | Pagination |
1195
+ |---|---|---|---|---|
1196
+ | list | GET | `/ticket/v1/repositories` | no | no |
1197
+
1198
+ ### ticket.tickets
1199
+
1200
+ | Method | HTTP | Path | Streaming | Pagination |
1201
+ |---|---|---|---|---|
1202
+ | create | POST | `/ticket/v1/tickets` | no | no |
1203
+ | deleteLock | DELETE | `/ticket/v1/tickets/{number}/lock` | no | no |
1204
+ | list | GET | `/ticket/v1/tickets` | no | no |
1205
+ | retrieve | GET | `/ticket/v1/tickets/{number}` | no | no |
1206
+ | update | PATCH | `/ticket/v1/tickets/{number}` | no | no |
1207
+ | updateLock | PUT | `/ticket/v1/tickets/{number}/lock` | no | no |
1208
+
1209
+ ### ticket.tickets.comments
1210
+
1211
+ | Method | HTTP | Path | Streaming | Pagination |
1212
+ |---|---|---|---|---|
1213
+ | create | POST | `/ticket/v1/tickets/{number}/comments` | no | no |
1214
+ | list | GET | `/ticket/v1/tickets/{number}/comments` | no | no |
1215
+
1216
+ ### ticket.tickets.dependencies
1217
+
1218
+ | Method | HTTP | Path | Streaming | Pagination |
1219
+ |---|---|---|---|---|
1220
+ | retrieveBlockedBy | GET | `/ticket/v1/tickets/{number}/dependencies/blocked_by` | no | no |
1221
+ | retrieveBlocking | GET | `/ticket/v1/tickets/{number}/dependencies/blocking` | no | no |
1222
+
1223
+ ### ticket.tickets.dependencies.blockedBy
1224
+
1225
+ | Method | HTTP | Path | Streaming | Pagination |
1226
+ |---|---|---|---|---|
1227
+ | create | POST | `/ticket/v1/tickets/{number}/dependencies/blocked_by` | no | no |
1228
+ | delete | DELETE | `/ticket/v1/tickets/{number}/dependencies/blocked_by/{n}` | no | no |
1229
+
1230
+ ### ticket.tickets.events
1231
+
1232
+ | Method | HTTP | Path | Streaming | Pagination |
1233
+ |---|---|---|---|---|
1234
+ | list | GET | `/ticket/v1/tickets/{number}/events` | no | no |
1235
+
1236
+ ### ticket.tickets.reactions
1237
+
1238
+ | Method | HTTP | Path | Streaming | Pagination |
1239
+ |---|---|---|---|---|
1240
+ | create | POST | `/ticket/v1/tickets/{number}/reactions` | no | no |
1241
+ | delete | DELETE | `/ticket/v1/tickets/{number}/reactions/{content}` | no | no |
1242
+ | list | GET | `/ticket/v1/tickets/{number}/reactions` | no | no |
1243
+
1244
+ ### ticket.tickets.relations
1245
+
1246
+ | Method | HTTP | Path | Streaming | Pagination |
1247
+ |---|---|---|---|---|
1248
+ | create | POST | `/ticket/v1/tickets/{number}/relations` | no | no |
1249
+ | delete | DELETE | `/ticket/v1/tickets/{number}/relations/{n}` | no | no |
1250
+ | list | GET | `/ticket/v1/tickets/{number}/relations` | no | no |
1251
+
1252
+ ### ticket.tickets.subTickets
1253
+
1254
+ | Method | HTTP | Path | Streaming | Pagination |
1255
+ |---|---|---|---|---|
1256
+ | create | POST | `/ticket/v1/tickets/{number}/sub_tickets` | no | no |
1257
+ | delete | DELETE | `/ticket/v1/tickets/{number}/sub_tickets/{child}` | no | no |
1258
+ | list | GET | `/ticket/v1/tickets/{number}/sub_tickets` | no | no |
1259
+
1260
+ ### ticket.types
1261
+
1262
+ | Method | HTTP | Path | Streaming | Pagination |
1263
+ |---|---|---|---|---|
1264
+ | list | GET | `/ticket/v1/types` | no | no |
1265
+
1011
1266
  ## vault
1012
1267
 
1013
1268
  ### vault.authorizations
@@ -1,10 +1,18 @@
1
+ import { type UploadFileOptions, type UploadedFile } from '../helpers/file-upload.js';
1
2
  import { resourceFactories } from '../resources.generated.js';
2
3
  import { type PraxisOptions } from './transport.js';
3
4
  import { type PublishInput, type PublishResult } from '../helpers/application-publish.js';
5
+ import { type CountInput, type CountResult } from '../helpers/database-count.js';
4
6
  type Resources = {
5
7
  readonly [K in keyof typeof resourceFactories]: ReturnType<(typeof resourceFactories)[K]>;
6
8
  };
7
- export interface Praxis extends Omit<Resources, 'application'> {
9
+ export interface Praxis extends Omit<Resources, 'application' | 'database' | 'file'> {
10
+ readonly file: Resources['file'] & {
11
+ uploadFile(file: Blob | File, options: UploadFileOptions): Promise<UploadedFile>;
12
+ };
13
+ readonly database: Resources['database'] & {
14
+ count(input: CountInput): Promise<CountResult>;
15
+ };
8
16
  readonly application: Resources['application'] & {
9
17
  publish(input: PublishInput): Promise<PublishResult>;
10
18
  };
@@ -1,12 +1,18 @@
1
+ import { uploadFile } from "../helpers/file-upload.js";
1
2
  import { resourceFactories } from "../resources.generated.js";
2
3
  import { Transport } from "./transport.js";
3
4
  import { publish } from "../helpers/application-publish.js";
5
+ import { count } from "../helpers/database-count.js";
4
6
  export class Praxis {
5
7
  constructor(options) {
6
8
  const transport = new Transport(options);
7
9
  for (const [name, create] of Object.entries(resourceFactories)) {
8
10
  const resource = create(transport);
9
11
  // Assemble before sealing the resource property; never replace a readonly SDK resource.
12
+ if (name === 'file')
13
+ Object.assign(resource, { uploadFile: (file, options) => uploadFile(this, file, options) });
14
+ if (name === 'database')
15
+ Object.assign(resource, { count: (input) => count(transport, input) });
10
16
  if (name === 'application')
11
17
  Object.assign(resource, { publish: (input) => publish(this, input) });
12
18
  Object.defineProperty(this, name, { value: resource, enumerable: true });
@@ -31,6 +31,11 @@ export declare class Transport {
31
31
  private validate;
32
32
  private scope;
33
33
  request<R>(operation: Operation, options?: InternalOptions): Promise<R>;
34
+ /** Internal helper access to response metadata, with the same request policy. */
35
+ requestWithResponse<R>(operation: Operation, options?: InternalOptions): Promise<{
36
+ data: R;
37
+ response: Response;
38
+ }>;
34
39
  stream<E extends SSEEvent = SSEEvent>(operation: Operation, options?: InternalOptions): AsyncGenerator<E>;
35
40
  }
36
41
  export {};
@@ -92,9 +92,14 @@ export class Transport {
92
92
  };
93
93
  }
94
94
  async request(operation, options = {}) {
95
+ return (await this.requestWithResponse(operation, options)).data;
96
+ }
97
+ /** Internal helper access to response metadata, with the same request policy. */
98
+ async requestWithResponse(operation, options = {}) {
95
99
  const scope = this.scope(options, false);
96
100
  try {
97
- return (await abortable(operation(scope.options), scope.signal)).data;
101
+ const result = await abortable(operation(scope.options), scope.signal);
102
+ return { data: result.data, response: result.response };
98
103
  }
99
104
  finally {
100
105
  scope.close();