@taico/client 0.0.1 → 0.1.0

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.
Files changed (67) hide show
  1. package/dist/contracts/types.d.ts +3176 -1732
  2. package/dist/src/client/index.d.ts +23 -3
  3. package/dist/src/client/index.js +6 -0
  4. package/dist/src/client/models/CreateProjectDto.d.ts +1 -1
  5. package/dist/src/client/models/CreateScheduledTaskDto.d.ts +14 -0
  6. package/dist/src/client/models/CreateScheduledTaskDto.js +1 -0
  7. package/dist/src/client/models/CreateSecretDto.d.ts +14 -0
  8. package/dist/src/client/models/CreateSecretDto.js +1 -0
  9. package/dist/src/client/models/CreateServerDto.d.ts +21 -0
  10. package/dist/src/client/models/CreateServerDto.js +11 -1
  11. package/dist/src/client/models/CreateTaskBlueprintDto.d.ts +22 -0
  12. package/dist/src/client/models/CreateTaskBlueprintDto.js +1 -0
  13. package/dist/src/client/models/CreateThreadDto.d.ts +2 -2
  14. package/dist/src/client/models/CreateThreadMessageDto.d.ts +6 -0
  15. package/dist/src/client/models/CreateThreadMessageDto.js +1 -0
  16. package/dist/src/client/models/IntrospectTokenResponseDto.d.ts +22 -22
  17. package/dist/src/client/models/IntrospectTokenResponseDto.js +1 -1
  18. package/dist/src/client/models/ListThreadMessagesResponseDto.d.ts +19 -0
  19. package/dist/src/client/models/ListThreadMessagesResponseDto.js +1 -0
  20. package/dist/src/client/models/OnboardingRequestDto.d.ts +18 -0
  21. package/dist/src/client/models/OnboardingRequestDto.js +1 -0
  22. package/dist/src/client/models/OnboardingStatusResponseDto.d.ts +6 -0
  23. package/dist/src/client/models/OnboardingStatusResponseDto.js +1 -0
  24. package/dist/src/client/models/PatchAgentDto.d.ts +25 -1
  25. package/dist/src/client/models/PatchProjectDto.d.ts +1 -1
  26. package/dist/src/client/models/ScheduledTaskListResponseDto.d.ts +19 -0
  27. package/dist/src/client/models/ScheduledTaskListResponseDto.js +1 -0
  28. package/dist/src/client/models/ScheduledTaskResponseDto.d.ts +43 -0
  29. package/dist/src/client/models/ScheduledTaskResponseDto.js +1 -0
  30. package/dist/src/client/models/SecretResponseDto.d.ts +34 -0
  31. package/dist/src/client/models/SecretResponseDto.js +1 -0
  32. package/dist/src/client/models/SecretValueResponseDto.d.ts +14 -0
  33. package/dist/src/client/models/SecretValueResponseDto.js +1 -0
  34. package/dist/src/client/models/ServerResponseDto.d.ts +21 -0
  35. package/dist/src/client/models/ServerResponseDto.js +11 -1
  36. package/dist/src/client/models/TaskBlueprintListResponseDto.d.ts +19 -0
  37. package/dist/src/client/models/TaskBlueprintListResponseDto.js +1 -0
  38. package/dist/src/client/models/TaskBlueprintResponseDto.d.ts +48 -0
  39. package/dist/src/client/models/TaskBlueprintResponseDto.js +1 -0
  40. package/dist/src/client/models/ThreadListItemResponseDto.d.ts +4 -0
  41. package/dist/src/client/models/ThreadMessageResponseDto.d.ts +31 -0
  42. package/dist/src/client/models/ThreadMessageResponseDto.js +1 -0
  43. package/dist/src/client/models/ThreadResponseDto.d.ts +6 -2
  44. package/dist/src/client/models/UpdateScheduledTaskDto.d.ts +10 -0
  45. package/dist/src/client/models/UpdateScheduledTaskDto.js +1 -0
  46. package/dist/src/client/models/UpdateSecretDto.d.ts +14 -0
  47. package/dist/src/client/models/UpdateSecretDto.js +1 -0
  48. package/dist/src/client/models/UpdateServerDto.d.ts +21 -0
  49. package/dist/src/client/models/UpdateServerDto.js +11 -1
  50. package/dist/src/client/models/UpdateTaskBlueprintDto.d.ts +22 -0
  51. package/dist/src/client/models/UpdateTaskBlueprintDto.js +1 -0
  52. package/dist/src/client/models/UserResponseDto.d.ts +4 -0
  53. package/dist/src/client/services/AgentService.d.ts +1 -1
  54. package/dist/src/client/services/AgentService.js +1 -1
  55. package/dist/src/client/services/AuthorizationServerService.d.ts +2 -2
  56. package/dist/src/client/services/AuthorizationServerService.js +2 -2
  57. package/dist/src/client/services/ScheduledTasksService.d.ts +45 -0
  58. package/dist/src/client/services/ScheduledTasksService.js +98 -0
  59. package/dist/src/client/services/SecretsService.d.ts +49 -0
  60. package/dist/src/client/services/SecretsService.js +104 -0
  61. package/dist/src/client/services/TaskBlueprintsService.d.ts +52 -0
  62. package/dist/src/client/services/TaskBlueprintsService.js +115 -0
  63. package/dist/src/client/services/ThreadsService.d.ts +27 -0
  64. package/dist/src/client/services/ThreadsService.js +61 -0
  65. package/dist/src/client/services/WebAuthenticationService.d.ts +23 -0
  66. package/dist/src/client/services/WebAuthenticationService.js +42 -0
  67. package/package.json +4 -2
@@ -0,0 +1,115 @@
1
+ import { OpenAPI } from '../core/OpenAPI.js';
2
+ import { request as __request } from '../core/request.js';
3
+ export class TaskBlueprintsService {
4
+ /**
5
+ * Create a new task blueprint
6
+ * @param requestBody
7
+ * @returns TaskBlueprintResponseDto Task blueprint created successfully
8
+ * @throws ApiError
9
+ */
10
+ static taskBlueprintsControllerCreateTaskBlueprint(requestBody) {
11
+ return __request(OpenAPI, {
12
+ method: 'POST',
13
+ url: '/api/v1/task-blueprints',
14
+ body: requestBody,
15
+ mediaType: 'application/json',
16
+ errors: {
17
+ 400: `Invalid input data`,
18
+ },
19
+ });
20
+ }
21
+ /**
22
+ * List all task blueprints
23
+ * @param page Page number (1-indexed)
24
+ * @param limit Number of items per page
25
+ * @returns TaskBlueprintListResponseDto Task blueprints retrieved successfully
26
+ * @throws ApiError
27
+ */
28
+ static taskBlueprintsControllerListTaskBlueprints(page = 1, limit = 20) {
29
+ return __request(OpenAPI, {
30
+ method: 'GET',
31
+ url: '/api/v1/task-blueprints',
32
+ query: {
33
+ 'page': page,
34
+ 'limit': limit,
35
+ },
36
+ });
37
+ }
38
+ /**
39
+ * Get a task blueprint by ID
40
+ * @param id Task blueprint ID
41
+ * @returns TaskBlueprintResponseDto Task blueprint retrieved successfully
42
+ * @throws ApiError
43
+ */
44
+ static taskBlueprintsControllerGetTaskBlueprint(id) {
45
+ return __request(OpenAPI, {
46
+ method: 'GET',
47
+ url: '/api/v1/task-blueprints/{id}',
48
+ path: {
49
+ 'id': id,
50
+ },
51
+ errors: {
52
+ 404: `Task blueprint not found`,
53
+ },
54
+ });
55
+ }
56
+ /**
57
+ * Update a task blueprint
58
+ * @param id Task blueprint ID
59
+ * @param requestBody
60
+ * @returns TaskBlueprintResponseDto Task blueprint updated successfully
61
+ * @throws ApiError
62
+ */
63
+ static taskBlueprintsControllerUpdateTaskBlueprint(id, requestBody) {
64
+ return __request(OpenAPI, {
65
+ method: 'PATCH',
66
+ url: '/api/v1/task-blueprints/{id}',
67
+ path: {
68
+ 'id': id,
69
+ },
70
+ body: requestBody,
71
+ mediaType: 'application/json',
72
+ errors: {
73
+ 400: `Invalid input data`,
74
+ 404: `Task blueprint not found`,
75
+ },
76
+ });
77
+ }
78
+ /**
79
+ * Delete a task blueprint
80
+ * @param id Task blueprint ID
81
+ * @returns void
82
+ * @throws ApiError
83
+ */
84
+ static taskBlueprintsControllerDeleteTaskBlueprint(id) {
85
+ return __request(OpenAPI, {
86
+ method: 'DELETE',
87
+ url: '/api/v1/task-blueprints/{id}',
88
+ path: {
89
+ 'id': id,
90
+ },
91
+ errors: {
92
+ 404: `Task blueprint not found`,
93
+ 409: `Task blueprint has active schedules`,
94
+ },
95
+ });
96
+ }
97
+ /**
98
+ * Create a task from a blueprint
99
+ * @param id Task blueprint ID
100
+ * @returns TaskResponseDto Task created from blueprint successfully
101
+ * @throws ApiError
102
+ */
103
+ static taskBlueprintsControllerCreateTaskFromBlueprint(id) {
104
+ return __request(OpenAPI, {
105
+ method: 'POST',
106
+ url: '/api/v1/task-blueprints/{id}/create-task',
107
+ path: {
108
+ 'id': id,
109
+ },
110
+ errors: {
111
+ 404: `Task blueprint not found`,
112
+ },
113
+ });
114
+ }
115
+ }
@@ -3,8 +3,11 @@ import type { AppendThreadStateDto } from '../models/AppendThreadStateDto.js';
3
3
  import type { AttachTaskDto } from '../models/AttachTaskDto.js';
4
4
  import type { CreateTagDto } from '../models/CreateTagDto.js';
5
5
  import type { CreateThreadDto } from '../models/CreateThreadDto.js';
6
+ import type { CreateThreadMessageDto } from '../models/CreateThreadMessageDto.js';
7
+ import type { ListThreadMessagesResponseDto } from '../models/ListThreadMessagesResponseDto.js';
6
8
  import type { ReferenceContextBlockDto } from '../models/ReferenceContextBlockDto.js';
7
9
  import type { ThreadListResponseDto } from '../models/ThreadListResponseDto.js';
10
+ import type { ThreadMessageResponseDto } from '../models/ThreadMessageResponseDto.js';
8
11
  import type { ThreadResponseDto } from '../models/ThreadResponseDto.js';
9
12
  import type { ThreadStateResponseDto } from '../models/ThreadStateResponseDto.js';
10
13
  import type { UpdateThreadDto } from '../models/UpdateThreadDto.js';
@@ -48,6 +51,13 @@ export declare class ThreadsService {
48
51
  * @throws ApiError
49
52
  */
50
53
  static threadsControllerDeleteThread(id: string): CancelablePromise<void>;
54
+ /**
55
+ * Get a thread by task ID
56
+ * @param taskId
57
+ * @returns ThreadResponseDto Thread found for task or null when task has no thread
58
+ * @throws ApiError
59
+ */
60
+ static threadsControllerGetThreadByTaskId(taskId: string): CancelablePromise<ThreadResponseDto>;
51
61
  /**
52
62
  * Attach a task to the thread
53
63
  * @param id Thread UUID
@@ -111,4 +121,21 @@ export declare class ThreadsService {
111
121
  * @throws ApiError
112
122
  */
113
123
  static threadsControllerAppendThreadState(id: string, requestBody: AppendThreadStateDto): CancelablePromise<ThreadStateResponseDto>;
124
+ /**
125
+ * Create a message in the thread
126
+ * @param id Thread UUID
127
+ * @param requestBody
128
+ * @returns ThreadMessageResponseDto Message created successfully
129
+ * @throws ApiError
130
+ */
131
+ static threadsControllerCreateMessage(id: string, requestBody: CreateThreadMessageDto): CancelablePromise<ThreadMessageResponseDto>;
132
+ /**
133
+ * List messages in a thread
134
+ * @param id Thread UUID
135
+ * @param page Page number
136
+ * @param limit Number of items per page
137
+ * @returns ListThreadMessagesResponseDto Paginated list of thread messages
138
+ * @throws ApiError
139
+ */
140
+ static threadsControllerListMessages(id: string, page?: number, limit?: number): CancelablePromise<ListThreadMessagesResponseDto>;
114
141
  }
@@ -93,6 +93,21 @@ export class ThreadsService {
93
93
  },
94
94
  });
95
95
  }
96
+ /**
97
+ * Get a thread by task ID
98
+ * @param taskId
99
+ * @returns ThreadResponseDto Thread found for task or null when task has no thread
100
+ * @throws ApiError
101
+ */
102
+ static threadsControllerGetThreadByTaskId(taskId) {
103
+ return __request(OpenAPI, {
104
+ method: 'GET',
105
+ url: '/api/v1/threads/by-task/{taskId}',
106
+ path: {
107
+ 'taskId': taskId,
108
+ },
109
+ });
110
+ }
96
111
  /**
97
112
  * Attach a task to the thread
98
113
  * @param id Thread UUID
@@ -263,4 +278,50 @@ export class ThreadsService {
263
278
  },
264
279
  });
265
280
  }
281
+ /**
282
+ * Create a message in the thread
283
+ * @param id Thread UUID
284
+ * @param requestBody
285
+ * @returns ThreadMessageResponseDto Message created successfully
286
+ * @throws ApiError
287
+ */
288
+ static threadsControllerCreateMessage(id, requestBody) {
289
+ return __request(OpenAPI, {
290
+ method: 'POST',
291
+ url: '/api/v1/threads/{id}/messages',
292
+ path: {
293
+ 'id': id,
294
+ },
295
+ body: requestBody,
296
+ mediaType: 'application/json',
297
+ errors: {
298
+ 400: `Invalid input data`,
299
+ 404: `Thread not found`,
300
+ },
301
+ });
302
+ }
303
+ /**
304
+ * List messages in a thread
305
+ * @param id Thread UUID
306
+ * @param page Page number
307
+ * @param limit Number of items per page
308
+ * @returns ListThreadMessagesResponseDto Paginated list of thread messages
309
+ * @throws ApiError
310
+ */
311
+ static threadsControllerListMessages(id, page = 1, limit = 20) {
312
+ return __request(OpenAPI, {
313
+ method: 'GET',
314
+ url: '/api/v1/threads/{id}/messages',
315
+ path: {
316
+ 'id': id,
317
+ },
318
+ query: {
319
+ 'page': page,
320
+ 'limit': limit,
321
+ },
322
+ errors: {
323
+ 404: `Thread not found`,
324
+ },
325
+ });
326
+ }
266
327
  }
@@ -1,6 +1,8 @@
1
1
  import type { ChangePasswordRequestDto } from '../models/ChangePasswordRequestDto.js';
2
2
  import type { LoginRequestDto } from '../models/LoginRequestDto.js';
3
3
  import type { LoginResponseDto } from '../models/LoginResponseDto.js';
4
+ import type { OnboardingRequestDto } from '../models/OnboardingRequestDto.js';
5
+ import type { OnboardingStatusResponseDto } from '../models/OnboardingStatusResponseDto.js';
4
6
  import type { UserResponseDto } from '../models/UserResponseDto.js';
5
7
  import type { CancelablePromise } from '../core/CancelablePromise.js';
6
8
  export declare class WebAuthenticationService {
@@ -40,4 +42,25 @@ export declare class WebAuthenticationService {
40
42
  static webAuthControllerChangePassword(requestBody: ChangePasswordRequestDto): CancelablePromise<{
41
43
  ok?: boolean;
42
44
  }>;
45
+ /**
46
+ * Check if system needs onboarding
47
+ * @returns OnboardingStatusResponseDto Onboarding status
48
+ * @throws ApiError
49
+ */
50
+ static webAuthControllerGetOnboardingStatus(): CancelablePromise<OnboardingStatusResponseDto>;
51
+ /**
52
+ * Create first admin user (only works if no admins exist)
53
+ * @param requestBody
54
+ * @returns LoginResponseDto First admin user created and logged in
55
+ * @throws ApiError
56
+ */
57
+ static webAuthControllerOnboard(requestBody: OnboardingRequestDto): CancelablePromise<LoginResponseDto>;
58
+ /**
59
+ * Mark walkthrough as seen for authenticated user
60
+ * @returns any Walkthrough marked as seen
61
+ * @throws ApiError
62
+ */
63
+ static webAuthControllerMarkWalkthroughSeen(): CancelablePromise<{
64
+ ok?: boolean;
65
+ }>;
43
66
  }
@@ -74,4 +74,46 @@ export class WebAuthenticationService {
74
74
  },
75
75
  });
76
76
  }
77
+ /**
78
+ * Check if system needs onboarding
79
+ * @returns OnboardingStatusResponseDto Onboarding status
80
+ * @throws ApiError
81
+ */
82
+ static webAuthControllerGetOnboardingStatus() {
83
+ return __request(OpenAPI, {
84
+ method: 'GET',
85
+ url: '/api/v1/auth/onboarding-status',
86
+ });
87
+ }
88
+ /**
89
+ * Create first admin user (only works if no admins exist)
90
+ * @param requestBody
91
+ * @returns LoginResponseDto First admin user created and logged in
92
+ * @throws ApiError
93
+ */
94
+ static webAuthControllerOnboard(requestBody) {
95
+ return __request(OpenAPI, {
96
+ method: 'POST',
97
+ url: '/api/v1/auth/onboard',
98
+ body: requestBody,
99
+ mediaType: 'application/json',
100
+ errors: {
101
+ 409: `Admin users already exist, onboarding not allowed`,
102
+ },
103
+ });
104
+ }
105
+ /**
106
+ * Mark walkthrough as seen for authenticated user
107
+ * @returns any Walkthrough marked as seen
108
+ * @throws ApiError
109
+ */
110
+ static webAuthControllerMarkWalkthroughSeen() {
111
+ return __request(OpenAPI, {
112
+ method: 'POST',
113
+ url: '/api/v1/auth/mark-walkthrough-seen',
114
+ errors: {
115
+ 401: `Not authenticated`,
116
+ },
117
+ });
118
+ }
77
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taico/client",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -32,7 +32,9 @@
32
32
  "copy:contracts": "mkdir -p contracts && cp ../../apps/backend/openapi.json contracts/openapi.json",
33
33
  "generate:types": "openapi-typescript contracts/openapi.json -o contracts/types.ts",
34
34
  "generate:client": "openapi --input contracts/openapi.json --output src/client --client fetch && npm run fix:esm-imports",
35
- "fix:esm-imports": "node scripts/fix-esm-imports.js"
35
+ "fix:esm-imports": "node scripts/fix-esm-imports.js",
36
+ "pack": "npm run build:prod && npm pack",
37
+ "release": "npm run build:prod && npm publish --access public"
36
38
  },
37
39
  "devDependencies": {
38
40
  "openapi-typescript": "^7.10.1",