@deepraxis/sdk 0.1.0-dev.f119641 → 0.1.0-dev.f8a7b74

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`. 412 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,39 @@ 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.endUsers
22
+
23
+ | Method | HTTP | Path | Streaming | Pagination |
24
+ |---|---|---|---|---|
25
+ | delete | DELETE | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
26
+ | list | GET | `/agent/v1/agents/{agent_id}/end_users` | no | no |
27
+ | retrieve | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}` | no | no |
28
+ | retrieveDeletion | GET | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion` | no | no |
29
+
30
+ ### agent.agents.endUsers.block
31
+
32
+ | Method | HTTP | Path | Streaming | Pagination |
33
+ |---|---|---|---|---|
34
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block` | no | no |
35
+
36
+ ### agent.agents.endUsers.revokeTokens
37
+
38
+ | Method | HTTP | Path | Streaming | Pagination |
39
+ |---|---|---|---|---|
40
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens` | no | no |
41
+
42
+ ### agent.agents.endUsers.unblock
43
+
44
+ | Method | HTTP | Path | Streaming | Pagination |
45
+ |---|---|---|---|---|
46
+ | create | POST | `/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock` | no | no |
47
+
48
+ ### agent.agents.unarchive
49
+
50
+ | Method | HTTP | Path | Streaming | Pagination |
51
+ |---|---|---|---|---|
52
+ | create | POST | `/agent/v1/agents/{agent_id}/unarchive` | no | no |
53
+
21
54
  ### agent.agents.versions
22
55
 
23
56
  | Method | HTTP | Path | Streaming | Pagination |
@@ -49,6 +82,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
49
82
  | list | GET | `/agent/v1/computers/{computer_id}/files` | no | no |
50
83
  | retrieveContent | GET | `/agent/v1/computers/{computer_id}/files/content` | no | no |
51
84
 
85
+ ### agent.computers.leases
86
+
87
+ | Method | HTTP | Path | Streaming | Pagination |
88
+ |---|---|---|---|---|
89
+ | delete | DELETE | `/agent/v1/computers/{computer_id}/leases/{lease_id}` | no | no |
90
+
91
+ ### agent.computers.leases.renew
92
+
93
+ | Method | HTTP | Path | Streaming | Pagination |
94
+ |---|---|---|---|---|
95
+ | create | POST | `/agent/v1/computers/{computer_id}/leases/{lease_id}/renew` | no | no |
96
+
52
97
  ### agent.deploymentRuns
53
98
 
54
99
  | Method | HTTP | Path | Streaming | Pagination |
@@ -79,6 +124,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
79
124
  |---|---|---|---|---|
80
125
  | create | POST | `/agent/v1/deployments/{deployment_id}/unpause` | no | no |
81
126
 
127
+ ### agent.embed
128
+
129
+ | Method | HTTP | Path | Streaming | Pagination |
130
+ |---|---|---|---|---|
131
+ | retrieveAppearance | GET | `/agent/v1/embed/appearance` | no | no |
132
+
133
+ ### agent.embed.exchange
134
+
135
+ | Method | HTTP | Path | Streaming | Pagination |
136
+ |---|---|---|---|---|
137
+ | create | POST | `/agent/v1/embed/exchange` | no | no |
138
+
82
139
  ### agent.embedTokens
83
140
 
84
141
  | Method | HTTP | Path | Streaming | Pagination |
@@ -86,6 +143,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
86
143
  | create | POST | `/agent/v1/embed_tokens` | no | no |
87
144
  | list | GET | `/agent/v1/embed_tokens` | no | no |
88
145
 
146
+ ### agent.embedTokens.anonymous
147
+
148
+ | Method | HTTP | Path | Streaming | Pagination |
149
+ |---|---|---|---|---|
150
+ | create | POST | `/agent/v1/embed_tokens/anonymous` | no | no |
151
+
89
152
  ### agent.embedTokens.revoke
90
153
 
91
154
  | Method | HTTP | Path | Streaming | Pagination |
@@ -109,6 +172,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
109
172
  | archive | POST | `/agent/v1/sessions/{session_id}/archive` | no | no |
110
173
  | compact | POST | `/agent/v1/sessions/{session_id}/compact` | no | no |
111
174
  | create | POST | `/agent/v1/sessions` | no | no |
175
+ | delete | DELETE | `/agent/v1/sessions/{session_id}` | no | no |
112
176
  | fork | POST | `/agent/v1/sessions/{session_id}/fork` | no | no |
113
177
  | list | GET | `/agent/v1/sessions` | no | no |
114
178
  | retrieve | GET | `/agent/v1/sessions/{session_id}` | no | no |
@@ -256,6 +320,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
256
320
  | list | GET | `/application/v1/workers/{worker_id}/versions` | no | yes |
257
321
  | retrieve | GET | `/application/v1/workers/{worker_id}/versions/{version_id}` | no | no |
258
322
 
323
+ ### application.workers.versions.assets
324
+
325
+ | Method | HTTP | Path | Streaming | Pagination |
326
+ |---|---|---|---|---|
327
+ | retrieveManifest | GET | `/application/v1/workers/{worker_id}/versions/{version_id}/assets/manifest` | no | no |
328
+
259
329
  ## automation
260
330
 
261
331
  ### automation.actions
@@ -555,6 +625,20 @@ Multipart request bodies expand plain objects into bracketed fields (for example
555
625
  | retrieve | GET | `/file/v1/files/{file_id}` | no | no |
556
626
  | retrieveContent | GET | `/file/v1/files/{file_id}/content` | no | no |
557
627
 
628
+ ### file.uploads
629
+
630
+ | Method | HTTP | Path | Streaming | Pagination |
631
+ |---|---|---|---|---|
632
+ | cancel | POST | `/file/v1/uploads/{upload_id}/cancel` | no | no |
633
+ | complete | POST | `/file/v1/uploads/{upload_id}/complete` | no | no |
634
+ | create | POST | `/file/v1/uploads` | no | no |
635
+
636
+ ### file.uploads.parts
637
+
638
+ | Method | HTTP | Path | Streaming | Pagination |
639
+ |---|---|---|---|---|
640
+ | create | POST | `/file/v1/uploads/{upload_id}/parts` | no | no |
641
+
558
642
  ## knowledge
559
643
 
560
644
  ### knowledge.vectorStores
@@ -888,6 +972,21 @@ Multipart request bodies expand plain objects into bracketed fields (for example
888
972
  | Method | HTTP | Path | Streaming | Pagination |
889
973
  |---|---|---|---|---|
890
974
  | create | POST | `/organization/v1/feedback` | no | no |
975
+ | list | GET | `/organization/v1/feedback` | no | no |
976
+ | retrieve | GET | `/organization/v1/feedback/{id}` | no | no |
977
+
978
+ ### organization.feedback.counts
979
+
980
+ | Method | HTTP | Path | Streaming | Pagination |
981
+ |---|---|---|---|---|
982
+ | list | GET | `/organization/v1/feedback/counts` | no | no |
983
+
984
+ ### organization.feedback.messages
985
+
986
+ | Method | HTTP | Path | Streaming | Pagination |
987
+ |---|---|---|---|---|
988
+ | create | POST | `/organization/v1/feedback/{id}/messages` | no | no |
989
+ | list | GET | `/organization/v1/feedback/{id}/messages` | no | no |
891
990
 
892
991
  ### organization.usage
893
992
 
@@ -1008,6 +1107,123 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1008
1107
  |---|---|---|---|---|
1009
1108
  | create | POST | `/search/v1/search` | no | no |
1010
1109
 
1110
+ ## ticket
1111
+
1112
+ ### ticket.activity
1113
+
1114
+ | Method | HTTP | Path | Streaming | Pagination |
1115
+ |---|---|---|---|---|
1116
+ | retrieve | GET | `/ticket/v1/activity` | no | no |
1117
+
1118
+ ### ticket.comments
1119
+
1120
+ | Method | HTTP | Path | Streaming | Pagination |
1121
+ |---|---|---|---|---|
1122
+ | delete | DELETE | `/ticket/v1/comments/{id}` | no | no |
1123
+ | retrieve | GET | `/ticket/v1/comments/{id}` | no | no |
1124
+ | update | PATCH | `/ticket/v1/comments/{id}` | no | no |
1125
+
1126
+ ### ticket.comments.reactions
1127
+
1128
+ | Method | HTTP | Path | Streaming | Pagination |
1129
+ |---|---|---|---|---|
1130
+ | create | POST | `/ticket/v1/comments/{id}/reactions` | no | no |
1131
+ | delete | DELETE | `/ticket/v1/comments/{id}/reactions/{content}` | no | no |
1132
+ | list | GET | `/ticket/v1/comments/{id}/reactions` | no | no |
1133
+
1134
+ ### ticket.labels
1135
+
1136
+ | Method | HTTP | Path | Streaming | Pagination |
1137
+ |---|---|---|---|---|
1138
+ | create | POST | `/ticket/v1/labels` | no | no |
1139
+ | delete | DELETE | `/ticket/v1/labels/{name}` | no | no |
1140
+ | list | GET | `/ticket/v1/labels` | no | no |
1141
+ | update | PATCH | `/ticket/v1/labels/{name}` | no | no |
1142
+
1143
+ ### ticket.milestones
1144
+
1145
+ | Method | HTTP | Path | Streaming | Pagination |
1146
+ |---|---|---|---|---|
1147
+ | create | POST | `/ticket/v1/milestones` | no | no |
1148
+ | delete | DELETE | `/ticket/v1/milestones/{number}` | no | no |
1149
+ | list | GET | `/ticket/v1/milestones` | no | no |
1150
+ | retrieve | GET | `/ticket/v1/milestones/{number}` | no | no |
1151
+ | update | PATCH | `/ticket/v1/milestones/{number}` | no | no |
1152
+
1153
+ ### ticket.repositories
1154
+
1155
+ | Method | HTTP | Path | Streaming | Pagination |
1156
+ |---|---|---|---|---|
1157
+ | list | GET | `/ticket/v1/repositories` | no | no |
1158
+
1159
+ ### ticket.tickets
1160
+
1161
+ | Method | HTTP | Path | Streaming | Pagination |
1162
+ |---|---|---|---|---|
1163
+ | create | POST | `/ticket/v1/tickets` | no | no |
1164
+ | deleteLock | DELETE | `/ticket/v1/tickets/{number}/lock` | no | no |
1165
+ | list | GET | `/ticket/v1/tickets` | no | no |
1166
+ | retrieve | GET | `/ticket/v1/tickets/{number}` | no | no |
1167
+ | update | PATCH | `/ticket/v1/tickets/{number}` | no | no |
1168
+ | updateLock | PUT | `/ticket/v1/tickets/{number}/lock` | no | no |
1169
+
1170
+ ### ticket.tickets.comments
1171
+
1172
+ | Method | HTTP | Path | Streaming | Pagination |
1173
+ |---|---|---|---|---|
1174
+ | create | POST | `/ticket/v1/tickets/{number}/comments` | no | no |
1175
+ | list | GET | `/ticket/v1/tickets/{number}/comments` | no | no |
1176
+
1177
+ ### ticket.tickets.dependencies
1178
+
1179
+ | Method | HTTP | Path | Streaming | Pagination |
1180
+ |---|---|---|---|---|
1181
+ | retrieveBlockedBy | GET | `/ticket/v1/tickets/{number}/dependencies/blocked_by` | no | no |
1182
+ | retrieveBlocking | GET | `/ticket/v1/tickets/{number}/dependencies/blocking` | no | no |
1183
+
1184
+ ### ticket.tickets.dependencies.blockedBy
1185
+
1186
+ | Method | HTTP | Path | Streaming | Pagination |
1187
+ |---|---|---|---|---|
1188
+ | create | POST | `/ticket/v1/tickets/{number}/dependencies/blocked_by` | no | no |
1189
+ | delete | DELETE | `/ticket/v1/tickets/{number}/dependencies/blocked_by/{n}` | no | no |
1190
+
1191
+ ### ticket.tickets.events
1192
+
1193
+ | Method | HTTP | Path | Streaming | Pagination |
1194
+ |---|---|---|---|---|
1195
+ | list | GET | `/ticket/v1/tickets/{number}/events` | no | no |
1196
+
1197
+ ### ticket.tickets.reactions
1198
+
1199
+ | Method | HTTP | Path | Streaming | Pagination |
1200
+ |---|---|---|---|---|
1201
+ | create | POST | `/ticket/v1/tickets/{number}/reactions` | no | no |
1202
+ | delete | DELETE | `/ticket/v1/tickets/{number}/reactions/{content}` | no | no |
1203
+ | list | GET | `/ticket/v1/tickets/{number}/reactions` | no | no |
1204
+
1205
+ ### ticket.tickets.relations
1206
+
1207
+ | Method | HTTP | Path | Streaming | Pagination |
1208
+ |---|---|---|---|---|
1209
+ | create | POST | `/ticket/v1/tickets/{number}/relations` | no | no |
1210
+ | delete | DELETE | `/ticket/v1/tickets/{number}/relations/{n}` | no | no |
1211
+ | list | GET | `/ticket/v1/tickets/{number}/relations` | no | no |
1212
+
1213
+ ### ticket.tickets.subTickets
1214
+
1215
+ | Method | HTTP | Path | Streaming | Pagination |
1216
+ |---|---|---|---|---|
1217
+ | create | POST | `/ticket/v1/tickets/{number}/sub_tickets` | no | no |
1218
+ | delete | DELETE | `/ticket/v1/tickets/{number}/sub_tickets/{child}` | no | no |
1219
+ | list | GET | `/ticket/v1/tickets/{number}/sub_tickets` | no | no |
1220
+
1221
+ ### ticket.types
1222
+
1223
+ | Method | HTTP | Path | Streaming | Pagination |
1224
+ |---|---|---|---|---|
1225
+ | list | GET | `/ticket/v1/types` | no | no |
1226
+
1011
1227
  ## vault
1012
1228
 
1013
1229
  ### 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();