@mestra-dev/contract 0.0.10 → 0.0.12
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/README.md +3 -3
- package/dist/index.d.ts +492 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,10 +34,10 @@ Always use `import type` so the bundler never pulls server code.
|
|
|
34
34
|
|
|
35
35
|
## Build (maintainers)
|
|
36
36
|
|
|
37
|
-
Requires local `services/
|
|
37
|
+
Requires local `services/core` and `services/utils` sources plus core `node_modules` for type resolution. Those packages are **not** published with this contract.
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
cd services/
|
|
40
|
+
cd services/hc
|
|
41
41
|
bun install
|
|
42
42
|
bun run build
|
|
43
43
|
```
|
|
@@ -47,7 +47,7 @@ Output: `dist/index.d.ts` (self-contained; depends on `hono` types only).
|
|
|
47
47
|
## Publish to npmjs
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
cd services/
|
|
50
|
+
cd services/hc
|
|
51
51
|
bun run build
|
|
52
52
|
bun pm version patch # or: minor / major
|
|
53
53
|
bun publish --access public
|
package/dist/index.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20
20
|
readonly openapi: "3.0.3";
|
|
21
21
|
readonly info: {
|
|
22
22
|
readonly title: "Auth Service API";
|
|
23
|
-
readonly version: "1.5.
|
|
24
|
-
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, and
|
|
23
|
+
readonly version: "1.5.2";
|
|
24
|
+
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, Files, and Notifications endpoints exposed by the k3-core platform.";
|
|
25
25
|
};
|
|
26
26
|
readonly servers: readonly [
|
|
27
27
|
{
|
|
@@ -93,6 +93,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
93
93
|
{
|
|
94
94
|
readonly name: "Chat";
|
|
95
95
|
readonly description: "Matrix (Synapse) chat session bootstrap and chat-tenant collaborator listing; owners get an `owner_` username prefix; caches Matrix access tokens. Requires workspace access and crm::chats read.";
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
readonly name: "Notifications";
|
|
99
|
+
readonly description: "Cursor-based incremental notification sync, plus mark-read and archive. Clients store the sync cursor and pass it on the next call; read/archive bump updated_at so changes propagate via sync.";
|
|
96
100
|
}
|
|
97
101
|
];
|
|
98
102
|
readonly components: {
|
|
@@ -219,6 +223,119 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
219
223
|
};
|
|
220
224
|
};
|
|
221
225
|
};
|
|
226
|
+
readonly NotificationType: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly enum: readonly [
|
|
229
|
+
"info",
|
|
230
|
+
"warning",
|
|
231
|
+
"success",
|
|
232
|
+
"failure"
|
|
233
|
+
];
|
|
234
|
+
readonly default: "info";
|
|
235
|
+
readonly description: "Notification severity (`notification_type` Postgres enum).";
|
|
236
|
+
};
|
|
237
|
+
readonly Notification: {
|
|
238
|
+
readonly type: "object";
|
|
239
|
+
readonly required: readonly [
|
|
240
|
+
"id",
|
|
241
|
+
"userId",
|
|
242
|
+
"workspaceId",
|
|
243
|
+
"title",
|
|
244
|
+
"message",
|
|
245
|
+
"type",
|
|
246
|
+
"read",
|
|
247
|
+
"archive",
|
|
248
|
+
"created_at"
|
|
249
|
+
];
|
|
250
|
+
readonly properties: {
|
|
251
|
+
readonly id: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly format: "uuid";
|
|
254
|
+
};
|
|
255
|
+
readonly userId: {
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly format: "uuid";
|
|
258
|
+
};
|
|
259
|
+
readonly workspaceId: {
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
readonly format: "uuid";
|
|
262
|
+
};
|
|
263
|
+
readonly title: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
readonly maxLength: 256;
|
|
266
|
+
};
|
|
267
|
+
readonly message: {
|
|
268
|
+
readonly type: "string";
|
|
269
|
+
readonly maxLength: 256;
|
|
270
|
+
};
|
|
271
|
+
readonly type: {
|
|
272
|
+
readonly $ref: "#/components/schemas/NotificationType";
|
|
273
|
+
};
|
|
274
|
+
readonly read: {
|
|
275
|
+
readonly type: "boolean";
|
|
276
|
+
};
|
|
277
|
+
readonly archive: {
|
|
278
|
+
readonly type: "boolean";
|
|
279
|
+
};
|
|
280
|
+
readonly created_at: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly format: "date-time";
|
|
283
|
+
};
|
|
284
|
+
readonly updated_at: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
readonly format: "date-time";
|
|
287
|
+
readonly nullable: true;
|
|
288
|
+
readonly description: "Set when the notification is marked read or archived.";
|
|
289
|
+
};
|
|
290
|
+
readonly deleted_at: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
readonly format: "date-time";
|
|
293
|
+
readonly nullable: true;
|
|
294
|
+
};
|
|
295
|
+
readonly verified_at: {
|
|
296
|
+
readonly type: "string";
|
|
297
|
+
readonly format: "date-time";
|
|
298
|
+
readonly nullable: true;
|
|
299
|
+
};
|
|
300
|
+
readonly suspended_at: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
readonly format: "date-time";
|
|
303
|
+
readonly nullable: true;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly NotificationSyncSuccess: {
|
|
308
|
+
readonly type: "object";
|
|
309
|
+
readonly required: readonly [
|
|
310
|
+
"success",
|
|
311
|
+
"notifications",
|
|
312
|
+
"cursor",
|
|
313
|
+
"hasMore"
|
|
314
|
+
];
|
|
315
|
+
readonly properties: {
|
|
316
|
+
readonly success: {
|
|
317
|
+
readonly type: "boolean";
|
|
318
|
+
readonly const: true;
|
|
319
|
+
};
|
|
320
|
+
readonly notifications: {
|
|
321
|
+
readonly type: "array";
|
|
322
|
+
readonly items: {
|
|
323
|
+
readonly $ref: "#/components/schemas/Notification";
|
|
324
|
+
};
|
|
325
|
+
readonly description: "Notifications created or updated after the request cursor, oldest change first.";
|
|
326
|
+
};
|
|
327
|
+
readonly cursor: {
|
|
328
|
+
readonly type: "string";
|
|
329
|
+
readonly format: "date-time";
|
|
330
|
+
readonly nullable: true;
|
|
331
|
+
readonly description: "Newest change timestamp in this page. Store it and pass it as `cursor` on the next sync. Null only when no cursor was sent and no notifications exist.";
|
|
332
|
+
};
|
|
333
|
+
readonly hasMore: {
|
|
334
|
+
readonly type: "boolean";
|
|
335
|
+
readonly description: "True when more changes remain; call again immediately with the returned cursor.";
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
};
|
|
222
339
|
readonly CreateWorkspaceSuccess: {
|
|
223
340
|
readonly type: "object";
|
|
224
341
|
readonly required: readonly [
|
|
@@ -256,10 +373,30 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
256
373
|
readonly description: "Human readable error message.";
|
|
257
374
|
};
|
|
258
375
|
readonly error: {
|
|
259
|
-
readonly type: "object";
|
|
260
376
|
readonly nullable: true;
|
|
261
|
-
readonly description: "
|
|
262
|
-
readonly
|
|
377
|
+
readonly description: "String message or Zod validation details, depending on the failure.";
|
|
378
|
+
readonly oneOf: readonly [
|
|
379
|
+
{
|
|
380
|
+
readonly type: "string";
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
readonly type: "object";
|
|
384
|
+
readonly additionalProperties: true;
|
|
385
|
+
}
|
|
386
|
+
];
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
readonly NotificationIdRequest: {
|
|
391
|
+
readonly type: "object";
|
|
392
|
+
readonly required: readonly [
|
|
393
|
+
"notificationId"
|
|
394
|
+
];
|
|
395
|
+
readonly properties: {
|
|
396
|
+
readonly notificationId: {
|
|
397
|
+
readonly type: "string";
|
|
398
|
+
readonly format: "uuid";
|
|
399
|
+
readonly description: "Notification identifier belonging to the authenticated user.";
|
|
263
400
|
};
|
|
264
401
|
};
|
|
265
402
|
};
|
|
@@ -758,6 +895,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
758
895
|
readonly workspaceName: {
|
|
759
896
|
readonly type: "string";
|
|
760
897
|
};
|
|
898
|
+
readonly profilePicture: {
|
|
899
|
+
readonly type: "string";
|
|
900
|
+
readonly nullable: true;
|
|
901
|
+
readonly description: "Presigned workspace avatar URL from `workspaces.picture` (7-day expiry); null or empty when unset.";
|
|
902
|
+
};
|
|
761
903
|
readonly workspaceCategory: {
|
|
762
904
|
readonly $ref: "#/components/schemas/WorkspaceCategory";
|
|
763
905
|
};
|
|
@@ -2959,7 +3101,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2959
3101
|
};
|
|
2960
3102
|
};
|
|
2961
3103
|
readonly 400: {
|
|
2962
|
-
readonly description: "Missing code or token
|
|
3104
|
+
readonly description: "Missing `code`, or Google token exchange failed. `error` is a string such as Google's `error_description` (e.g. missing client_secret / invalid_request).";
|
|
2963
3105
|
readonly content: {
|
|
2964
3106
|
readonly "application/json": {
|
|
2965
3107
|
readonly schema: {
|
|
@@ -2969,7 +3111,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2969
3111
|
};
|
|
2970
3112
|
};
|
|
2971
3113
|
readonly 500: {
|
|
2972
|
-
readonly description: "
|
|
3114
|
+
readonly description: "`GOOGLE_CLIENT_SECRET is not configured`, or failed to issue session tokens after a successful Google exchange.";
|
|
2973
3115
|
readonly content: {
|
|
2974
3116
|
readonly "application/json": {
|
|
2975
3117
|
readonly schema: {
|
|
@@ -3073,7 +3215,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3073
3215
|
};
|
|
3074
3216
|
};
|
|
3075
3217
|
readonly 400: {
|
|
3076
|
-
readonly description: "Missing
|
|
3218
|
+
readonly description: "`Missing code or state`, `Invalid state`, `Invalid or expired state`, or Google token exchange failure (`error` string from Google / OAuth helper).";
|
|
3077
3219
|
readonly content: {
|
|
3078
3220
|
readonly "application/json": {
|
|
3079
3221
|
readonly schema: {
|
|
@@ -3099,7 +3241,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3099
3241
|
};
|
|
3100
3242
|
};
|
|
3101
3243
|
readonly 500: {
|
|
3102
|
-
readonly description: "
|
|
3244
|
+
readonly description: "`GOOGLE_CLIENT_SECRET is not configured`, or calendar creation / watch registration / persistence failed (e.g. invalid watch response).";
|
|
3103
3245
|
readonly content: {
|
|
3104
3246
|
readonly "application/json": {
|
|
3105
3247
|
readonly schema: {
|
|
@@ -4111,7 +4253,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4111
4253
|
"Workspace"
|
|
4112
4254
|
];
|
|
4113
4255
|
readonly summary: "List workspaces for the authenticated user";
|
|
4114
|
-
readonly description: "Returns workspaces the user collaborates on, each with category, role, billing flags, invitation state, and the resource grants effective for the caller.";
|
|
4256
|
+
readonly description: "Returns workspaces the user collaborates on, each with category, role, billing flags, invitation state, workspace profile picture URL, and the resource grants effective for the caller.";
|
|
4115
4257
|
readonly security: readonly [
|
|
4116
4258
|
never
|
|
4117
4259
|
];
|
|
@@ -4461,7 +4603,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4461
4603
|
"Workspace"
|
|
4462
4604
|
];
|
|
4463
4605
|
readonly summary: "Create workspace invitation";
|
|
4464
|
-
readonly description: "Creates an invitation for
|
|
4606
|
+
readonly description: "Creates an invitation for an email to join a workspace with specified resources and role. Works for emails that are not yet registered: a pending `invitations` row is stored and a collaborator is materialized when that email creates an account (OTP signup or OAuth). If the user already exists, a pending collaborator with policies is created immediately (same accept flow as before). Always returns the invite `token` for the frontend to share. Requires write access to crm::general. Pending invitations for unknown emails count toward the workspace collaborator seat limit.";
|
|
4465
4607
|
readonly security: readonly [
|
|
4466
4608
|
never
|
|
4467
4609
|
];
|
|
@@ -4481,7 +4623,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4481
4623
|
readonly email: {
|
|
4482
4624
|
readonly type: "string";
|
|
4483
4625
|
readonly format: "email";
|
|
4484
|
-
readonly description: "Email
|
|
4626
|
+
readonly description: "Email to invite (registered or not).";
|
|
4485
4627
|
};
|
|
4486
4628
|
readonly workspace: {
|
|
4487
4629
|
readonly type: "string";
|
|
@@ -4511,13 +4653,29 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4511
4653
|
readonly content: {
|
|
4512
4654
|
readonly "application/json": {
|
|
4513
4655
|
readonly schema: {
|
|
4514
|
-
readonly
|
|
4656
|
+
readonly type: "object";
|
|
4657
|
+
readonly required: readonly [
|
|
4658
|
+
"success",
|
|
4659
|
+
"token"
|
|
4660
|
+
];
|
|
4661
|
+
readonly properties: {
|
|
4662
|
+
readonly success: {
|
|
4663
|
+
readonly type: "boolean";
|
|
4664
|
+
readonly const: true;
|
|
4665
|
+
};
|
|
4666
|
+
readonly token: {
|
|
4667
|
+
readonly type: "string";
|
|
4668
|
+
readonly minLength: 64;
|
|
4669
|
+
readonly maxLength: 64;
|
|
4670
|
+
readonly description: "Invite token for GET /workspace/invite/{workspace}/{token} after the invitee authenticates.";
|
|
4671
|
+
};
|
|
4672
|
+
};
|
|
4515
4673
|
};
|
|
4516
4674
|
};
|
|
4517
4675
|
};
|
|
4518
4676
|
};
|
|
4519
4677
|
readonly 400: {
|
|
4520
|
-
readonly description: "Invalid request payload, max collaborators reached,
|
|
4678
|
+
readonly description: "Invalid request payload, max collaborators reached, invitation already pending, user is already a collaborator, or resource not found.";
|
|
4521
4679
|
readonly content: {
|
|
4522
4680
|
readonly "application/json": {
|
|
4523
4681
|
readonly schema: {
|
|
@@ -5015,13 +5173,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5015
5173
|
};
|
|
5016
5174
|
};
|
|
5017
5175
|
};
|
|
5018
|
-
readonly "/workspace/leave/{workspace}
|
|
5176
|
+
readonly "/workspace/leave/{workspace}": {
|
|
5019
5177
|
readonly get: {
|
|
5020
5178
|
readonly tags: readonly [
|
|
5021
5179
|
"Workspace"
|
|
5022
5180
|
];
|
|
5023
|
-
readonly summary: "
|
|
5024
|
-
readonly description: "Removes the
|
|
5181
|
+
readonly summary: "Leave a workspace";
|
|
5182
|
+
readonly description: "Removes the authenticated user from the workspace. Workspace owners cannot leave; they must delete the workspace instead (`Owner cannot leave the workspace, Delete the workspace instead`).";
|
|
5025
5183
|
readonly security: readonly [
|
|
5026
5184
|
never
|
|
5027
5185
|
];
|
|
@@ -5035,21 +5193,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5035
5193
|
readonly type: "string";
|
|
5036
5194
|
readonly format: "uuid";
|
|
5037
5195
|
};
|
|
5038
|
-
},
|
|
5039
|
-
{
|
|
5040
|
-
readonly name: "collaboratorId";
|
|
5041
|
-
readonly in: "path";
|
|
5042
|
-
readonly required: true;
|
|
5043
|
-
readonly description: "Collaborator identifier to remove.";
|
|
5044
|
-
readonly schema: {
|
|
5045
|
-
readonly type: "string";
|
|
5046
|
-
readonly format: "uuid";
|
|
5047
|
-
};
|
|
5048
5196
|
}
|
|
5049
5197
|
];
|
|
5050
5198
|
readonly responses: {
|
|
5051
5199
|
readonly 200: {
|
|
5052
|
-
readonly description: "
|
|
5200
|
+
readonly description: "Left the workspace successfully.";
|
|
5053
5201
|
readonly content: {
|
|
5054
5202
|
readonly "application/json": {
|
|
5055
5203
|
readonly schema: {
|
|
@@ -5059,7 +5207,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5059
5207
|
};
|
|
5060
5208
|
};
|
|
5061
5209
|
readonly 400: {
|
|
5062
|
-
readonly description: "Invalid workspace id,
|
|
5210
|
+
readonly description: "Invalid workspace id, caller is not a collaborator, or caller is the workspace owner.";
|
|
5063
5211
|
readonly content: {
|
|
5064
5212
|
readonly "application/json": {
|
|
5065
5213
|
readonly schema: {
|
|
@@ -9906,6 +10054,190 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9906
10054
|
};
|
|
9907
10055
|
};
|
|
9908
10056
|
};
|
|
10057
|
+
readonly "/notifications/sync": {
|
|
10058
|
+
readonly get: {
|
|
10059
|
+
readonly tags: readonly [
|
|
10060
|
+
"Notifications"
|
|
10061
|
+
];
|
|
10062
|
+
readonly summary: "Sync notifications incrementally";
|
|
10063
|
+
readonly description: "Returns the authenticated user's notifications created or updated after the given `cursor` (change timestamp = greatest of created_at/updated_at), ordered oldest change first. Without a cursor, returns notifications from the beginning. Responses are paged by `limit`; when `hasMore` is true, call again with the returned cursor until it is false. Marking notifications read or archived bumps their change timestamp, so state changes propagate to all of the user's devices. Requires a valid access token (no workspace policy check).";
|
|
10064
|
+
readonly security: readonly [
|
|
10065
|
+
never
|
|
10066
|
+
];
|
|
10067
|
+
readonly parameters: readonly [
|
|
10068
|
+
{
|
|
10069
|
+
readonly name: "cursor";
|
|
10070
|
+
readonly in: "query";
|
|
10071
|
+
readonly required: false;
|
|
10072
|
+
readonly schema: {
|
|
10073
|
+
readonly type: "string";
|
|
10074
|
+
readonly format: "date-time";
|
|
10075
|
+
};
|
|
10076
|
+
readonly description: "Change timestamp returned by the previous sync call (ISO 8601). Omit for a full initial sync.";
|
|
10077
|
+
},
|
|
10078
|
+
{
|
|
10079
|
+
readonly name: "limit";
|
|
10080
|
+
readonly in: "query";
|
|
10081
|
+
readonly required: false;
|
|
10082
|
+
readonly schema: {
|
|
10083
|
+
readonly type: "integer";
|
|
10084
|
+
readonly minimum: 1;
|
|
10085
|
+
readonly maximum: 200;
|
|
10086
|
+
readonly default: 100;
|
|
10087
|
+
};
|
|
10088
|
+
readonly description: "Maximum notifications per page.";
|
|
10089
|
+
}
|
|
10090
|
+
];
|
|
10091
|
+
readonly responses: {
|
|
10092
|
+
readonly 200: {
|
|
10093
|
+
readonly description: "Changed notifications with the next cursor.";
|
|
10094
|
+
readonly content: {
|
|
10095
|
+
readonly "application/json": {
|
|
10096
|
+
readonly schema: {
|
|
10097
|
+
readonly $ref: "#/components/schemas/NotificationSyncSuccess";
|
|
10098
|
+
};
|
|
10099
|
+
};
|
|
10100
|
+
};
|
|
10101
|
+
};
|
|
10102
|
+
readonly 400: {
|
|
10103
|
+
readonly description: "Invalid cursor or limit query parameter.";
|
|
10104
|
+
readonly content: {
|
|
10105
|
+
readonly "application/json": {
|
|
10106
|
+
readonly schema: {
|
|
10107
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10108
|
+
};
|
|
10109
|
+
};
|
|
10110
|
+
};
|
|
10111
|
+
};
|
|
10112
|
+
readonly 401: {
|
|
10113
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
10114
|
+
};
|
|
10115
|
+
readonly 403: {
|
|
10116
|
+
readonly description: "Forbidden - Token issuer is not 'access'.";
|
|
10117
|
+
};
|
|
10118
|
+
};
|
|
10119
|
+
};
|
|
10120
|
+
};
|
|
10121
|
+
readonly "/notifications/read": {
|
|
10122
|
+
readonly post: {
|
|
10123
|
+
readonly tags: readonly [
|
|
10124
|
+
"Notifications"
|
|
10125
|
+
];
|
|
10126
|
+
readonly summary: "Mark a notification as read";
|
|
10127
|
+
readonly description: "Sets `read=true` and bumps `updated_at` for a notification owned by the authenticated user so the change is picked up by `/notifications/sync`. Requires a valid access token (no workspace policy check).";
|
|
10128
|
+
readonly security: readonly [
|
|
10129
|
+
never
|
|
10130
|
+
];
|
|
10131
|
+
readonly requestBody: {
|
|
10132
|
+
readonly required: true;
|
|
10133
|
+
readonly content: {
|
|
10134
|
+
readonly "application/json": {
|
|
10135
|
+
readonly schema: {
|
|
10136
|
+
readonly $ref: "#/components/schemas/NotificationIdRequest";
|
|
10137
|
+
};
|
|
10138
|
+
};
|
|
10139
|
+
};
|
|
10140
|
+
};
|
|
10141
|
+
readonly responses: {
|
|
10142
|
+
readonly 200: {
|
|
10143
|
+
readonly description: "Notification marked as read.";
|
|
10144
|
+
readonly content: {
|
|
10145
|
+
readonly "application/json": {
|
|
10146
|
+
readonly schema: {
|
|
10147
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
10148
|
+
};
|
|
10149
|
+
};
|
|
10150
|
+
};
|
|
10151
|
+
};
|
|
10152
|
+
readonly 400: {
|
|
10153
|
+
readonly description: "Invalid request payload.";
|
|
10154
|
+
readonly content: {
|
|
10155
|
+
readonly "application/json": {
|
|
10156
|
+
readonly schema: {
|
|
10157
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10158
|
+
};
|
|
10159
|
+
};
|
|
10160
|
+
};
|
|
10161
|
+
};
|
|
10162
|
+
readonly 401: {
|
|
10163
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
10164
|
+
};
|
|
10165
|
+
readonly 403: {
|
|
10166
|
+
readonly description: "Forbidden - Token issuer is not 'access'.";
|
|
10167
|
+
};
|
|
10168
|
+
readonly 404: {
|
|
10169
|
+
readonly description: "Notification not found for this user.";
|
|
10170
|
+
readonly content: {
|
|
10171
|
+
readonly "application/json": {
|
|
10172
|
+
readonly schema: {
|
|
10173
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10174
|
+
};
|
|
10175
|
+
};
|
|
10176
|
+
};
|
|
10177
|
+
};
|
|
10178
|
+
};
|
|
10179
|
+
};
|
|
10180
|
+
};
|
|
10181
|
+
readonly "/notifications/archive": {
|
|
10182
|
+
readonly post: {
|
|
10183
|
+
readonly tags: readonly [
|
|
10184
|
+
"Notifications"
|
|
10185
|
+
];
|
|
10186
|
+
readonly summary: "Archive a notification";
|
|
10187
|
+
readonly description: "Sets `archive=true` and bumps `updated_at` for a notification owned by the authenticated user so the change is picked up by `/notifications/sync`. Requires a valid access token (no workspace policy check).";
|
|
10188
|
+
readonly security: readonly [
|
|
10189
|
+
never
|
|
10190
|
+
];
|
|
10191
|
+
readonly requestBody: {
|
|
10192
|
+
readonly required: true;
|
|
10193
|
+
readonly content: {
|
|
10194
|
+
readonly "application/json": {
|
|
10195
|
+
readonly schema: {
|
|
10196
|
+
readonly $ref: "#/components/schemas/NotificationIdRequest";
|
|
10197
|
+
};
|
|
10198
|
+
};
|
|
10199
|
+
};
|
|
10200
|
+
};
|
|
10201
|
+
readonly responses: {
|
|
10202
|
+
readonly 200: {
|
|
10203
|
+
readonly description: "Notification archived.";
|
|
10204
|
+
readonly content: {
|
|
10205
|
+
readonly "application/json": {
|
|
10206
|
+
readonly schema: {
|
|
10207
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
10208
|
+
};
|
|
10209
|
+
};
|
|
10210
|
+
};
|
|
10211
|
+
};
|
|
10212
|
+
readonly 400: {
|
|
10213
|
+
readonly description: "Invalid request payload.";
|
|
10214
|
+
readonly content: {
|
|
10215
|
+
readonly "application/json": {
|
|
10216
|
+
readonly schema: {
|
|
10217
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10218
|
+
};
|
|
10219
|
+
};
|
|
10220
|
+
};
|
|
10221
|
+
};
|
|
10222
|
+
readonly 401: {
|
|
10223
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
10224
|
+
};
|
|
10225
|
+
readonly 403: {
|
|
10226
|
+
readonly description: "Forbidden - Token issuer is not 'access'.";
|
|
10227
|
+
};
|
|
10228
|
+
readonly 404: {
|
|
10229
|
+
readonly description: "Notification not found for this user.";
|
|
10230
|
+
readonly content: {
|
|
10231
|
+
readonly "application/json": {
|
|
10232
|
+
readonly schema: {
|
|
10233
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10234
|
+
};
|
|
10235
|
+
};
|
|
10236
|
+
};
|
|
10237
|
+
};
|
|
10238
|
+
};
|
|
10239
|
+
};
|
|
10240
|
+
};
|
|
9909
10241
|
readonly "/chat/start": {
|
|
9910
10242
|
readonly post: {
|
|
9911
10243
|
readonly tags: readonly [
|
|
@@ -10321,6 +10653,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10321
10653
|
workspaces: {
|
|
10322
10654
|
workspaceId: string;
|
|
10323
10655
|
workspaceName: string;
|
|
10656
|
+
profilePicture: string | null;
|
|
10324
10657
|
workspaceCategory: string;
|
|
10325
10658
|
role: string;
|
|
10326
10659
|
maxCollaborators: number;
|
|
@@ -10444,6 +10777,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10444
10777
|
input: {};
|
|
10445
10778
|
output: {
|
|
10446
10779
|
success: true;
|
|
10780
|
+
token: string;
|
|
10447
10781
|
};
|
|
10448
10782
|
outputFormat: "json";
|
|
10449
10783
|
status: 201;
|
|
@@ -10806,9 +11140,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10806
11140
|
output: {
|
|
10807
11141
|
success: true;
|
|
10808
11142
|
task: {
|
|
10809
|
-
status: string | null;
|
|
10810
11143
|
id: string;
|
|
10811
11144
|
workspaceId: string;
|
|
11145
|
+
created_at: string;
|
|
11146
|
+
status: string | null;
|
|
10812
11147
|
description: string | null;
|
|
10813
11148
|
subject: string;
|
|
10814
11149
|
created_by: string;
|
|
@@ -10817,7 +11152,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10817
11152
|
deleted_at: string | null;
|
|
10818
11153
|
verified_at: string | null;
|
|
10819
11154
|
suspended_at: string | null;
|
|
10820
|
-
created_at: string;
|
|
10821
11155
|
priority: string | null;
|
|
10822
11156
|
visibility: string | null;
|
|
10823
11157
|
};
|
|
@@ -11067,16 +11401,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11067
11401
|
output: {
|
|
11068
11402
|
success: true;
|
|
11069
11403
|
template: {
|
|
11070
|
-
title: string;
|
|
11071
11404
|
id: string;
|
|
11072
11405
|
workspaceId: string;
|
|
11406
|
+
title: string;
|
|
11407
|
+
created_at: string;
|
|
11073
11408
|
created_by: string;
|
|
11074
11409
|
content: string;
|
|
11075
11410
|
updated_at: string | null;
|
|
11076
11411
|
deleted_at: string | null;
|
|
11077
11412
|
verified_at: string | null;
|
|
11078
11413
|
suspended_at: string | null;
|
|
11079
|
-
created_at: string;
|
|
11080
11414
|
}[];
|
|
11081
11415
|
};
|
|
11082
11416
|
outputFormat: "json";
|
|
@@ -11125,20 +11459,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11125
11459
|
output: {
|
|
11126
11460
|
success: true;
|
|
11127
11461
|
service: {
|
|
11128
|
-
name: string;
|
|
11129
|
-
active: boolean | null;
|
|
11130
11462
|
id: string;
|
|
11131
11463
|
workspaceId: string;
|
|
11464
|
+
type: string | null;
|
|
11465
|
+
created_at: string;
|
|
11466
|
+
name: string;
|
|
11467
|
+
active: boolean | null;
|
|
11132
11468
|
description: string | null;
|
|
11133
11469
|
price: number | null;
|
|
11134
11470
|
stock: number | null;
|
|
11135
11471
|
currency: string | null;
|
|
11136
|
-
type: string | null;
|
|
11137
11472
|
updated_at: string | null;
|
|
11138
11473
|
deleted_at: string | null;
|
|
11139
11474
|
verified_at: string | null;
|
|
11140
11475
|
suspended_at: string | null;
|
|
11141
|
-
created_at: string;
|
|
11142
11476
|
qrCode: string | null;
|
|
11143
11477
|
}[];
|
|
11144
11478
|
};
|
|
@@ -11295,19 +11629,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11295
11629
|
output: {
|
|
11296
11630
|
success: true;
|
|
11297
11631
|
customer: {
|
|
11632
|
+
id: string;
|
|
11633
|
+
workspaceId: string;
|
|
11634
|
+
type: string | null;
|
|
11635
|
+
created_at: string;
|
|
11298
11636
|
name: string;
|
|
11299
11637
|
active: boolean | null;
|
|
11300
11638
|
email: string | null;
|
|
11301
|
-
id: string;
|
|
11302
|
-
workspaceId: string;
|
|
11303
11639
|
description: string | null;
|
|
11304
|
-
type: string | null;
|
|
11305
11640
|
phone: string | null;
|
|
11306
11641
|
updated_at: string | null;
|
|
11307
11642
|
deleted_at: string | null;
|
|
11308
11643
|
verified_at: string | null;
|
|
11309
11644
|
suspended_at: string | null;
|
|
11310
|
-
created_at: string;
|
|
11311
11645
|
website: string | null;
|
|
11312
11646
|
companyPhone: string | null;
|
|
11313
11647
|
companyAddress: string | null;
|
|
@@ -11527,9 +11861,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11527
11861
|
output: {
|
|
11528
11862
|
success: true;
|
|
11529
11863
|
billing: {
|
|
11530
|
-
active: boolean | null;
|
|
11531
11864
|
id: string;
|
|
11532
11865
|
workspaceId: string;
|
|
11866
|
+
created_at: string;
|
|
11867
|
+
active: boolean | null;
|
|
11533
11868
|
country: string;
|
|
11534
11869
|
companyName: string;
|
|
11535
11870
|
inn: string;
|
|
@@ -11544,7 +11879,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11544
11879
|
deleted_at: string | null;
|
|
11545
11880
|
verified_at: string | null;
|
|
11546
11881
|
suspended_at: string | null;
|
|
11547
|
-
created_at: string;
|
|
11548
11882
|
}[];
|
|
11549
11883
|
};
|
|
11550
11884
|
outputFormat: "json";
|
|
@@ -11765,11 +12099,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11765
12099
|
output: {
|
|
11766
12100
|
success: true;
|
|
11767
12101
|
assignee: {
|
|
12102
|
+
id: string;
|
|
12103
|
+
workspaceId: string;
|
|
12104
|
+
created_at: string;
|
|
11768
12105
|
startDate: string | null;
|
|
11769
12106
|
endDate: string | null;
|
|
11770
12107
|
collaboratorId: string;
|
|
11771
|
-
id: string;
|
|
11772
|
-
workspaceId: string;
|
|
11773
12108
|
description: string | null;
|
|
11774
12109
|
created_by: string;
|
|
11775
12110
|
taskId: string;
|
|
@@ -11777,7 +12112,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11777
12112
|
deleted_at: string | null;
|
|
11778
12113
|
verified_at: string | null;
|
|
11779
12114
|
suspended_at: string | null;
|
|
11780
|
-
created_at: string;
|
|
11781
12115
|
};
|
|
11782
12116
|
};
|
|
11783
12117
|
outputFormat: "json";
|
|
@@ -11887,15 +12221,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11887
12221
|
output: {
|
|
11888
12222
|
success: true;
|
|
11889
12223
|
tag: {
|
|
11890
|
-
name: string;
|
|
11891
12224
|
id: string;
|
|
11892
12225
|
workspaceId: string;
|
|
12226
|
+
created_at: string;
|
|
12227
|
+
name: string;
|
|
11893
12228
|
description: string | null;
|
|
11894
12229
|
updated_at: string | null;
|
|
11895
12230
|
deleted_at: string | null;
|
|
11896
12231
|
verified_at: string | null;
|
|
11897
12232
|
suspended_at: string | null;
|
|
11898
|
-
created_at: string;
|
|
11899
12233
|
}[];
|
|
11900
12234
|
};
|
|
11901
12235
|
outputFormat: "json";
|
|
@@ -12093,6 +12427,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12093
12427
|
};
|
|
12094
12428
|
outputFormat: "json";
|
|
12095
12429
|
status: 400;
|
|
12430
|
+
} | {
|
|
12431
|
+
input: {};
|
|
12432
|
+
output: {
|
|
12433
|
+
success: false;
|
|
12434
|
+
error: string;
|
|
12435
|
+
};
|
|
12436
|
+
outputFormat: "json";
|
|
12437
|
+
status: 500;
|
|
12096
12438
|
} | {
|
|
12097
12439
|
input: {};
|
|
12098
12440
|
output: {
|
|
@@ -12828,10 +13170,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12828
13170
|
"www-authenticate"?: string | undefined | undefined;
|
|
12829
13171
|
":status"?: number | undefined | undefined;
|
|
12830
13172
|
};
|
|
13173
|
+
readonly type: ResponseType;
|
|
12831
13174
|
readonly url: string;
|
|
12832
13175
|
readonly status: number;
|
|
12833
13176
|
readonly ok: boolean;
|
|
12834
|
-
readonly type: ResponseType;
|
|
12835
13177
|
data: {
|
|
12836
13178
|
anyoneCanAddSelf?: boolean | null | undefined;
|
|
12837
13179
|
attachments?: {
|
|
@@ -15585,7 +15927,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15585
15927
|
output: {
|
|
15586
15928
|
success: false;
|
|
15587
15929
|
error: string;
|
|
15588
|
-
details: string;
|
|
15589
15930
|
};
|
|
15590
15931
|
outputFormat: "json";
|
|
15591
15932
|
status: 500;
|
|
@@ -15632,5 +15973,105 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15632
15973
|
status: 200;
|
|
15633
15974
|
};
|
|
15634
15975
|
};
|
|
15635
|
-
}, "/chat"
|
|
15976
|
+
}, "/chat"> | import("hono/types").MergeSchemaPath<{
|
|
15977
|
+
"/sync": {
|
|
15978
|
+
$get: {
|
|
15979
|
+
input: {};
|
|
15980
|
+
output: {
|
|
15981
|
+
success: false;
|
|
15982
|
+
error: {
|
|
15983
|
+
_errors: string[];
|
|
15984
|
+
limit?: {
|
|
15985
|
+
[x: string]: any;
|
|
15986
|
+
_errors: string[];
|
|
15987
|
+
} | undefined;
|
|
15988
|
+
cursor?: {
|
|
15989
|
+
[x: string]: any;
|
|
15990
|
+
_errors: string[];
|
|
15991
|
+
} | undefined;
|
|
15992
|
+
};
|
|
15993
|
+
};
|
|
15994
|
+
outputFormat: "json";
|
|
15995
|
+
status: 400;
|
|
15996
|
+
} | {
|
|
15997
|
+
input: {};
|
|
15998
|
+
output: {
|
|
15999
|
+
success: true;
|
|
16000
|
+
notifications: {
|
|
16001
|
+
updated_at: string | null;
|
|
16002
|
+
deleted_at: string | null;
|
|
16003
|
+
verified_at: string | null;
|
|
16004
|
+
suspended_at: string | null;
|
|
16005
|
+
created_at: string;
|
|
16006
|
+
id: string;
|
|
16007
|
+
userId: string;
|
|
16008
|
+
workspaceId: string;
|
|
16009
|
+
title: string;
|
|
16010
|
+
message: string;
|
|
16011
|
+
type: "success" | "info" | "warning" | "failure";
|
|
16012
|
+
read: boolean;
|
|
16013
|
+
archive: boolean;
|
|
16014
|
+
}[];
|
|
16015
|
+
cursor: string | null;
|
|
16016
|
+
hasMore: boolean;
|
|
16017
|
+
};
|
|
16018
|
+
outputFormat: "json";
|
|
16019
|
+
status: 200;
|
|
16020
|
+
};
|
|
16021
|
+
};
|
|
16022
|
+
} & {
|
|
16023
|
+
"/read": {
|
|
16024
|
+
$post: {
|
|
16025
|
+
input: {};
|
|
16026
|
+
output: {
|
|
16027
|
+
success: false;
|
|
16028
|
+
error: never;
|
|
16029
|
+
};
|
|
16030
|
+
outputFormat: "json";
|
|
16031
|
+
status: 400;
|
|
16032
|
+
} | {
|
|
16033
|
+
input: {};
|
|
16034
|
+
output: {
|
|
16035
|
+
success: false;
|
|
16036
|
+
error: string;
|
|
16037
|
+
};
|
|
16038
|
+
outputFormat: "json";
|
|
16039
|
+
status: 404;
|
|
16040
|
+
} | {
|
|
16041
|
+
input: {};
|
|
16042
|
+
output: {
|
|
16043
|
+
success: true;
|
|
16044
|
+
};
|
|
16045
|
+
outputFormat: "json";
|
|
16046
|
+
status: 200;
|
|
16047
|
+
};
|
|
16048
|
+
};
|
|
16049
|
+
} & {
|
|
16050
|
+
"/archive": {
|
|
16051
|
+
$post: {
|
|
16052
|
+
input: {};
|
|
16053
|
+
output: {
|
|
16054
|
+
success: false;
|
|
16055
|
+
error: never;
|
|
16056
|
+
};
|
|
16057
|
+
outputFormat: "json";
|
|
16058
|
+
status: 400;
|
|
16059
|
+
} | {
|
|
16060
|
+
input: {};
|
|
16061
|
+
output: {
|
|
16062
|
+
success: false;
|
|
16063
|
+
error: string;
|
|
16064
|
+
};
|
|
16065
|
+
outputFormat: "json";
|
|
16066
|
+
status: 404;
|
|
16067
|
+
} | {
|
|
16068
|
+
input: {};
|
|
16069
|
+
output: {
|
|
16070
|
+
success: true;
|
|
16071
|
+
};
|
|
16072
|
+
outputFormat: "json";
|
|
16073
|
+
status: 200;
|
|
16074
|
+
};
|
|
16075
|
+
};
|
|
16076
|
+
}, "/notifications">, "/", "/">;
|
|
15636
16077
|
export type AppType = typeof routes;
|