@deepraxis/sdk 0.1.0-dev.13103a0 → 0.1.0-dev.2a7b87f
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 +171 -1
- package/dist/core/client.d.ts +9 -1
- package/dist/core/client.js +6 -0
- package/dist/core/transport.d.ts +5 -0
- package/dist/core/transport.js +6 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +439 -81
- package/dist/generated/sdk.gen.js +1229 -109
- package/dist/generated/types.gen.d.ts +24439 -16233
- package/dist/helpers/database-count.d.ts +17 -0
- package/dist/helpers/database-count.js +11 -0
- package/dist/helpers/file-upload.d.ts +24 -0
- package/dist/helpers/file-upload.js +113 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/operations.generated.d.ts +1787 -154
- package/dist/operations.generated.js +2242 -205
- package/dist/resources.generated.d.ts +742 -14
- package/dist/resources.generated.js +111 -0
- 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`. 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,6 +18,25 @@ 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
|
+
|
|
21
40
|
### agent.agents.endUsers
|
|
22
41
|
|
|
23
42
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -55,6 +74,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
55
74
|
|
|
56
75
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
57
76
|
|---|---|---|---|---|
|
|
77
|
+
| apply | POST | `/agent/v1/agents/{agent_id}/versions/{version}/apply` | no | no |
|
|
58
78
|
| list | GET | `/agent/v1/agents/{agent_id}/versions` | no | no |
|
|
59
79
|
|
|
60
80
|
### agent.computers
|
|
@@ -238,6 +258,25 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
238
258
|
|---|---|---|---|---|
|
|
239
259
|
| list | GET | `/agent/v1/sessions/{session_id}/threads/{thread_id}/events` | no | no |
|
|
240
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
|
+
|
|
241
280
|
### agent.toolsets
|
|
242
281
|
|
|
243
282
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -625,6 +664,20 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
625
664
|
| retrieve | GET | `/file/v1/files/{file_id}` | no | no |
|
|
626
665
|
| retrieveContent | GET | `/file/v1/files/{file_id}/content` | no | no |
|
|
627
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
|
+
|
|
628
681
|
## knowledge
|
|
629
682
|
|
|
630
683
|
### knowledge.vectorStores
|
|
@@ -1093,6 +1146,123 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1093
1146
|
|---|---|---|---|---|
|
|
1094
1147
|
| create | POST | `/search/v1/search` | no | no |
|
|
1095
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
|
+
|
|
1096
1266
|
## vault
|
|
1097
1267
|
|
|
1098
1268
|
### vault.authorizations
|
package/dist/core/client.d.ts
CHANGED
|
@@ -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
|
};
|
package/dist/core/client.js
CHANGED
|
@@ -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 });
|
package/dist/core/transport.d.ts
CHANGED
|
@@ -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 {};
|
package/dist/core/transport.js
CHANGED
|
@@ -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
|
-
|
|
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();
|