@mestra-dev/contract 0.0.27 → 0.0.29
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/dist/index.d.ts +485 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
readonly name: "Files";
|
|
97
|
-
readonly description: "S3 file upload (presigned POST), profile and workspace picture upload/confirm/delete, comment attachment upload, list task comment files with download URLs, folder create/delete, list (includes pin metadata), pin/unpin, download, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB).";
|
|
97
|
+
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, folder create/delete, list (includes pin metadata; excludes `.tmp` objects), pin/unpin, download, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB). Workspace file routes require active collaborator status and crm::files access; comment attachments require crm::tasks write/read.";
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
readonly name: "Chat";
|
|
@@ -1409,7 +1409,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1409
1409
|
readonly properties: {
|
|
1410
1410
|
readonly filename: {
|
|
1411
1411
|
readonly type: "string";
|
|
1412
|
-
readonly
|
|
1412
|
+
readonly minLength: 1;
|
|
1413
|
+
readonly maxLength: 200;
|
|
1414
|
+
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
1413
1415
|
readonly example: "invoice-2026.pdf";
|
|
1414
1416
|
};
|
|
1415
1417
|
readonly contentType: {
|
|
@@ -1422,6 +1424,45 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1422
1424
|
};
|
|
1423
1425
|
};
|
|
1424
1426
|
};
|
|
1427
|
+
readonly ConfirmFileRequest: {
|
|
1428
|
+
readonly type: "object";
|
|
1429
|
+
readonly required: readonly [
|
|
1430
|
+
"filename",
|
|
1431
|
+
"workspace"
|
|
1432
|
+
];
|
|
1433
|
+
readonly properties: {
|
|
1434
|
+
readonly filename: {
|
|
1435
|
+
readonly type: "string";
|
|
1436
|
+
readonly minLength: 1;
|
|
1437
|
+
readonly maxLength: 200;
|
|
1438
|
+
readonly description: "Original file name used for `/files/upload` (without the `.tmp` suffix).";
|
|
1439
|
+
readonly example: "invoice-2026.pdf";
|
|
1440
|
+
};
|
|
1441
|
+
readonly workspace: {
|
|
1442
|
+
readonly type: "string";
|
|
1443
|
+
readonly format: "uuid";
|
|
1444
|
+
readonly description: "Workspace identifier.";
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
};
|
|
1448
|
+
readonly ConfirmFileSuccess: {
|
|
1449
|
+
readonly type: "object";
|
|
1450
|
+
readonly required: readonly [
|
|
1451
|
+
"success",
|
|
1452
|
+
"key"
|
|
1453
|
+
];
|
|
1454
|
+
readonly properties: {
|
|
1455
|
+
readonly success: {
|
|
1456
|
+
readonly type: "boolean";
|
|
1457
|
+
readonly const: true;
|
|
1458
|
+
};
|
|
1459
|
+
readonly key: {
|
|
1460
|
+
readonly type: "string";
|
|
1461
|
+
readonly description: "Final S3 object key after promotion (`{workspace}/{filename}`).";
|
|
1462
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1425
1466
|
readonly PresignedUploadSuccess: {
|
|
1426
1467
|
readonly type: "object";
|
|
1427
1468
|
readonly required: readonly [
|
|
@@ -1444,8 +1485,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1444
1485
|
};
|
|
1445
1486
|
readonly key: {
|
|
1446
1487
|
readonly type: "string";
|
|
1447
|
-
readonly description: "S3 object key
|
|
1448
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
|
|
1488
|
+
readonly description: "Temporary S3 object key (`{workspace}/{filename}.tmp`). Call `/files/confirm` after upload.";
|
|
1489
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf.tmp";
|
|
1449
1490
|
};
|
|
1450
1491
|
readonly maxSize: {
|
|
1451
1492
|
readonly type: "integer";
|
|
@@ -1466,7 +1507,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1466
1507
|
readonly properties: {
|
|
1467
1508
|
readonly filename: {
|
|
1468
1509
|
readonly type: "string";
|
|
1469
|
-
readonly
|
|
1510
|
+
readonly minLength: 1;
|
|
1511
|
+
readonly maxLength: 200;
|
|
1512
|
+
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
1470
1513
|
readonly example: "receipt.pdf";
|
|
1471
1514
|
};
|
|
1472
1515
|
readonly contentType: {
|
|
@@ -1516,8 +1559,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1516
1559
|
};
|
|
1517
1560
|
readonly key: {
|
|
1518
1561
|
readonly type: "string";
|
|
1519
|
-
readonly description: "S3 object key (`{workspace}_comments/{taskId}/{commentId}/{filename}`).";
|
|
1520
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000_comments/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/ffffffff-1111-2222-3333-444444444444/receipt.pdf";
|
|
1562
|
+
readonly description: "Temporary S3 object key (`{workspace}_comments/{taskId}/{commentId}/{filename}.tmp`). Call `/files/confirm-comment-file` after upload.";
|
|
1563
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000_comments/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/ffffffff-1111-2222-3333-444444444444/receipt.pdf.tmp";
|
|
1521
1564
|
};
|
|
1522
1565
|
readonly maxSize: {
|
|
1523
1566
|
readonly type: "integer";
|
|
@@ -1526,6 +1569,72 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1526
1569
|
};
|
|
1527
1570
|
};
|
|
1528
1571
|
};
|
|
1572
|
+
readonly ConfirmCommentFileRequest: {
|
|
1573
|
+
readonly type: "object";
|
|
1574
|
+
readonly required: readonly [
|
|
1575
|
+
"filename",
|
|
1576
|
+
"workspace",
|
|
1577
|
+
"taskId",
|
|
1578
|
+
"commentId"
|
|
1579
|
+
];
|
|
1580
|
+
readonly properties: {
|
|
1581
|
+
readonly filename: {
|
|
1582
|
+
readonly type: "string";
|
|
1583
|
+
readonly minLength: 1;
|
|
1584
|
+
readonly maxLength: 200;
|
|
1585
|
+
readonly description: "Original file name used for `/files/upload-to-comment` (without the `.tmp` suffix).";
|
|
1586
|
+
readonly example: "receipt.pdf";
|
|
1587
|
+
};
|
|
1588
|
+
readonly workspace: {
|
|
1589
|
+
readonly type: "string";
|
|
1590
|
+
readonly format: "uuid";
|
|
1591
|
+
readonly description: "Workspace identifier.";
|
|
1592
|
+
};
|
|
1593
|
+
readonly taskId: {
|
|
1594
|
+
readonly type: "string";
|
|
1595
|
+
readonly format: "uuid";
|
|
1596
|
+
readonly description: "Task the comment belongs to.";
|
|
1597
|
+
};
|
|
1598
|
+
readonly commentId: {
|
|
1599
|
+
readonly type: "string";
|
|
1600
|
+
readonly format: "uuid";
|
|
1601
|
+
readonly description: "Comment the file is attached to.";
|
|
1602
|
+
};
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
readonly DeleteCommentFileRequest: {
|
|
1606
|
+
readonly type: "object";
|
|
1607
|
+
readonly required: readonly [
|
|
1608
|
+
"filename",
|
|
1609
|
+
"workspace",
|
|
1610
|
+
"taskId",
|
|
1611
|
+
"commentId"
|
|
1612
|
+
];
|
|
1613
|
+
readonly properties: {
|
|
1614
|
+
readonly filename: {
|
|
1615
|
+
readonly type: "string";
|
|
1616
|
+
readonly minLength: 1;
|
|
1617
|
+
readonly maxLength: 200;
|
|
1618
|
+
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
1619
|
+
readonly example: "receipt.pdf";
|
|
1620
|
+
};
|
|
1621
|
+
readonly workspace: {
|
|
1622
|
+
readonly type: "string";
|
|
1623
|
+
readonly format: "uuid";
|
|
1624
|
+
readonly description: "Workspace identifier.";
|
|
1625
|
+
};
|
|
1626
|
+
readonly taskId: {
|
|
1627
|
+
readonly type: "string";
|
|
1628
|
+
readonly format: "uuid";
|
|
1629
|
+
readonly description: "Task the comment belongs to.";
|
|
1630
|
+
};
|
|
1631
|
+
readonly commentId: {
|
|
1632
|
+
readonly type: "string";
|
|
1633
|
+
readonly format: "uuid";
|
|
1634
|
+
readonly description: "Comment the file is attached to.";
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1529
1638
|
readonly TaskCommentFile: {
|
|
1530
1639
|
readonly type: "object";
|
|
1531
1640
|
readonly required: readonly [
|
|
@@ -9660,7 +9769,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9660
9769
|
"Files"
|
|
9661
9770
|
];
|
|
9662
9771
|
readonly summary: "Create presigned S3 upload";
|
|
9663
|
-
readonly description: "Returns a presigned POST URL and form fields for uploading a file to S3 (max 15 MB, 5-minute expiry). Object key is `{workspace}/{filename}`. Only JPEG, PNG, WebP, and PDF content types are accepted. Requires workspace access.";
|
|
9772
|
+
readonly description: "Returns a presigned POST URL and form fields for uploading a file to S3 (max 15 MB, 5-minute expiry). Object key is `{workspace}/{filename}.tmp`. Only JPEG, PNG, WebP, and PDF content types are accepted. After the multipart upload succeeds, call `/files/confirm` to validate magic bytes and promote the object to `{workspace}/{filename}`. Temporary objects are excluded from list results. Requires active workspace access and write access to crm::files.";
|
|
9664
9773
|
readonly security: readonly [
|
|
9665
9774
|
never
|
|
9666
9775
|
];
|
|
@@ -9728,6 +9837,80 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9728
9837
|
};
|
|
9729
9838
|
};
|
|
9730
9839
|
};
|
|
9840
|
+
readonly "/files/confirm": {
|
|
9841
|
+
readonly post: {
|
|
9842
|
+
readonly tags: readonly [
|
|
9843
|
+
"Files"
|
|
9844
|
+
];
|
|
9845
|
+
readonly summary: "Confirm and promote a temporary upload";
|
|
9846
|
+
readonly description: "Reads the temporary object at `{workspace}/{filename}.tmp`, verifies size (<= 15 MB) and real file type (JPEG, PNG, WebP, or PDF), copies it to `{workspace}/{filename}`, and deletes the temporary object. On failure, the temporary object is deleted. Requires workspace access.";
|
|
9847
|
+
readonly security: readonly [
|
|
9848
|
+
never
|
|
9849
|
+
];
|
|
9850
|
+
readonly requestBody: {
|
|
9851
|
+
readonly required: true;
|
|
9852
|
+
readonly content: {
|
|
9853
|
+
readonly "application/json": {
|
|
9854
|
+
readonly schema: {
|
|
9855
|
+
readonly $ref: "#/components/schemas/ConfirmFileRequest";
|
|
9856
|
+
};
|
|
9857
|
+
};
|
|
9858
|
+
};
|
|
9859
|
+
};
|
|
9860
|
+
readonly responses: {
|
|
9861
|
+
readonly 200: {
|
|
9862
|
+
readonly description: "File confirmed and promoted successfully.";
|
|
9863
|
+
readonly content: {
|
|
9864
|
+
readonly "application/json": {
|
|
9865
|
+
readonly schema: {
|
|
9866
|
+
readonly $ref: "#/components/schemas/ConfirmFileSuccess";
|
|
9867
|
+
};
|
|
9868
|
+
};
|
|
9869
|
+
};
|
|
9870
|
+
};
|
|
9871
|
+
readonly 400: {
|
|
9872
|
+
readonly description: "Temporary object missing, file too large, invalid file type, or processing failed.";
|
|
9873
|
+
readonly content: {
|
|
9874
|
+
readonly "application/json": {
|
|
9875
|
+
readonly schema: {
|
|
9876
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
9877
|
+
};
|
|
9878
|
+
};
|
|
9879
|
+
};
|
|
9880
|
+
};
|
|
9881
|
+
readonly 401: {
|
|
9882
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
9883
|
+
readonly content: {
|
|
9884
|
+
readonly "application/json": {
|
|
9885
|
+
readonly schema: {
|
|
9886
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
9887
|
+
};
|
|
9888
|
+
};
|
|
9889
|
+
};
|
|
9890
|
+
};
|
|
9891
|
+
readonly 403: {
|
|
9892
|
+
readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
|
|
9893
|
+
readonly content: {
|
|
9894
|
+
readonly "application/json": {
|
|
9895
|
+
readonly schema: {
|
|
9896
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
9897
|
+
};
|
|
9898
|
+
};
|
|
9899
|
+
};
|
|
9900
|
+
};
|
|
9901
|
+
readonly 404: {
|
|
9902
|
+
readonly description: "Workspace not found.";
|
|
9903
|
+
readonly content: {
|
|
9904
|
+
readonly "application/json": {
|
|
9905
|
+
readonly schema: {
|
|
9906
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
9907
|
+
};
|
|
9908
|
+
};
|
|
9909
|
+
};
|
|
9910
|
+
};
|
|
9911
|
+
};
|
|
9912
|
+
};
|
|
9913
|
+
};
|
|
9731
9914
|
readonly "/files/create-folder": {
|
|
9732
9915
|
readonly post: {
|
|
9733
9916
|
readonly tags: readonly [
|
|
@@ -9882,7 +10065,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9882
10065
|
"Files"
|
|
9883
10066
|
];
|
|
9884
10067
|
readonly summary: "List workspace files";
|
|
9885
|
-
readonly description: "Lists up to 50 S3 objects under the workspace prefix. Each item includes `pin` from S3 object user metadata. Requires workspace access.";
|
|
10068
|
+
readonly description: "Lists up to 50 S3 objects under the workspace prefix. Temporary uploads ending in `.tmp` are excluded. Each item includes `pin` from S3 object user metadata. Requires workspace access.";
|
|
9886
10069
|
readonly security: readonly [
|
|
9887
10070
|
never
|
|
9888
10071
|
];
|
|
@@ -10201,7 +10384,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10201
10384
|
"Files"
|
|
10202
10385
|
];
|
|
10203
10386
|
readonly summary: "Create presigned upload for a comment attachment";
|
|
10204
|
-
readonly description: "Returns a presigned POST URL and form fields for uploading a file attached to a task comment. Object key is `{workspace}_comments/{taskId}/{commentId}/{filename}` (max 15 MB, 5-minute expiry). Accepts JPEG, PNG, WebP, and PDF. Requires workspace access and write access to crm::tasks.";
|
|
10387
|
+
readonly description: "Returns a presigned POST URL and form fields for uploading a file attached to a task comment. Object key is `{workspace}_comments/{taskId}/{commentId}/{filename}.tmp` (max 15 MB, 5-minute expiry). Accepts JPEG, PNG, WebP, and PDF. After upload, call `/files/confirm-comment-file` to validate magic bytes and promote the object. Verifies the task and comment belong to the workspace. Requires active workspace access and write access to crm::tasks.";
|
|
10205
10388
|
readonly security: readonly [
|
|
10206
10389
|
never
|
|
10207
10390
|
];
|
|
@@ -10257,7 +10440,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10257
10440
|
};
|
|
10258
10441
|
};
|
|
10259
10442
|
readonly 404: {
|
|
10260
|
-
readonly description: "Workspace not found.";
|
|
10443
|
+
readonly description: "Workspace, task, or comment not found.";
|
|
10261
10444
|
readonly content: {
|
|
10262
10445
|
readonly "application/json": {
|
|
10263
10446
|
readonly schema: {
|
|
@@ -10269,6 +10452,164 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10269
10452
|
};
|
|
10270
10453
|
};
|
|
10271
10454
|
};
|
|
10455
|
+
readonly "/files/confirm-comment-file": {
|
|
10456
|
+
readonly post: {
|
|
10457
|
+
readonly tags: readonly [
|
|
10458
|
+
"Files"
|
|
10459
|
+
];
|
|
10460
|
+
readonly summary: "Confirm a comment attachment upload";
|
|
10461
|
+
readonly description: "Reads the temporary object at `{workspace}_comments/{taskId}/{commentId}/{filename}.tmp`, verifies size (<= 15 MB) and real file type (JPEG, PNG, WebP, or PDF), promotes it to `{workspace}_comments/{taskId}/{commentId}/{filename}`, and deletes the temporary object. Verifies the task and comment belong to the workspace. Requires active workspace access and write access to crm::tasks.";
|
|
10462
|
+
readonly security: readonly [
|
|
10463
|
+
never
|
|
10464
|
+
];
|
|
10465
|
+
readonly requestBody: {
|
|
10466
|
+
readonly required: true;
|
|
10467
|
+
readonly content: {
|
|
10468
|
+
readonly "application/json": {
|
|
10469
|
+
readonly schema: {
|
|
10470
|
+
readonly $ref: "#/components/schemas/ConfirmCommentFileRequest";
|
|
10471
|
+
};
|
|
10472
|
+
};
|
|
10473
|
+
};
|
|
10474
|
+
};
|
|
10475
|
+
readonly responses: {
|
|
10476
|
+
readonly 200: {
|
|
10477
|
+
readonly description: "Comment file confirmed and promoted.";
|
|
10478
|
+
readonly content: {
|
|
10479
|
+
readonly "application/json": {
|
|
10480
|
+
readonly schema: {
|
|
10481
|
+
readonly $ref: "#/components/schemas/ConfirmFileSuccess";
|
|
10482
|
+
};
|
|
10483
|
+
};
|
|
10484
|
+
};
|
|
10485
|
+
};
|
|
10486
|
+
readonly 400: {
|
|
10487
|
+
readonly description: "Invalid request payload, missing temp object, oversized file, or invalid file type.";
|
|
10488
|
+
readonly content: {
|
|
10489
|
+
readonly "application/json": {
|
|
10490
|
+
readonly schema: {
|
|
10491
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10492
|
+
};
|
|
10493
|
+
};
|
|
10494
|
+
};
|
|
10495
|
+
};
|
|
10496
|
+
readonly 401: {
|
|
10497
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
10498
|
+
readonly content: {
|
|
10499
|
+
readonly "application/json": {
|
|
10500
|
+
readonly schema: {
|
|
10501
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10502
|
+
};
|
|
10503
|
+
};
|
|
10504
|
+
};
|
|
10505
|
+
};
|
|
10506
|
+
readonly 403: {
|
|
10507
|
+
readonly description: "Forbidden - Token issuer is not 'access', invite not accepted, user lacks workspace access, or user lacks write access to crm::tasks.";
|
|
10508
|
+
readonly content: {
|
|
10509
|
+
readonly "application/json": {
|
|
10510
|
+
readonly schema: {
|
|
10511
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10512
|
+
};
|
|
10513
|
+
};
|
|
10514
|
+
};
|
|
10515
|
+
};
|
|
10516
|
+
readonly 404: {
|
|
10517
|
+
readonly description: "Workspace, task, or comment not found.";
|
|
10518
|
+
readonly content: {
|
|
10519
|
+
readonly "application/json": {
|
|
10520
|
+
readonly schema: {
|
|
10521
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10522
|
+
};
|
|
10523
|
+
};
|
|
10524
|
+
};
|
|
10525
|
+
};
|
|
10526
|
+
};
|
|
10527
|
+
};
|
|
10528
|
+
};
|
|
10529
|
+
readonly "/files/delete-comment-file": {
|
|
10530
|
+
readonly post: {
|
|
10531
|
+
readonly tags: readonly [
|
|
10532
|
+
"Files"
|
|
10533
|
+
];
|
|
10534
|
+
readonly summary: "Delete a comment attachment";
|
|
10535
|
+
readonly description: "Deletes the S3 object at `{workspace}_comments/{taskId}/{commentId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and write access to crm::tasks.";
|
|
10536
|
+
readonly security: readonly [
|
|
10537
|
+
never
|
|
10538
|
+
];
|
|
10539
|
+
readonly requestBody: {
|
|
10540
|
+
readonly required: true;
|
|
10541
|
+
readonly content: {
|
|
10542
|
+
readonly "application/json": {
|
|
10543
|
+
readonly schema: {
|
|
10544
|
+
readonly $ref: "#/components/schemas/DeleteCommentFileRequest";
|
|
10545
|
+
};
|
|
10546
|
+
};
|
|
10547
|
+
};
|
|
10548
|
+
};
|
|
10549
|
+
readonly responses: {
|
|
10550
|
+
readonly 200: {
|
|
10551
|
+
readonly description: "Comment file deleted successfully.";
|
|
10552
|
+
readonly content: {
|
|
10553
|
+
readonly "application/json": {
|
|
10554
|
+
readonly schema: {
|
|
10555
|
+
readonly $ref: "#/components/schemas/DeleteFileSuccess";
|
|
10556
|
+
};
|
|
10557
|
+
};
|
|
10558
|
+
};
|
|
10559
|
+
};
|
|
10560
|
+
readonly 400: {
|
|
10561
|
+
readonly description: "Invalid request payload.";
|
|
10562
|
+
readonly content: {
|
|
10563
|
+
readonly "application/json": {
|
|
10564
|
+
readonly schema: {
|
|
10565
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10566
|
+
};
|
|
10567
|
+
};
|
|
10568
|
+
};
|
|
10569
|
+
};
|
|
10570
|
+
readonly 401: {
|
|
10571
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
10572
|
+
readonly content: {
|
|
10573
|
+
readonly "application/json": {
|
|
10574
|
+
readonly schema: {
|
|
10575
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10576
|
+
};
|
|
10577
|
+
};
|
|
10578
|
+
};
|
|
10579
|
+
};
|
|
10580
|
+
readonly 403: {
|
|
10581
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::tasks.";
|
|
10582
|
+
readonly content: {
|
|
10583
|
+
readonly "application/json": {
|
|
10584
|
+
readonly schema: {
|
|
10585
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10586
|
+
};
|
|
10587
|
+
};
|
|
10588
|
+
};
|
|
10589
|
+
};
|
|
10590
|
+
readonly 404: {
|
|
10591
|
+
readonly description: "File not found at the given comment attachment key.";
|
|
10592
|
+
readonly content: {
|
|
10593
|
+
readonly "application/json": {
|
|
10594
|
+
readonly schema: {
|
|
10595
|
+
readonly $ref: "#/components/schemas/DeleteFileFailure";
|
|
10596
|
+
};
|
|
10597
|
+
};
|
|
10598
|
+
};
|
|
10599
|
+
};
|
|
10600
|
+
readonly 500: {
|
|
10601
|
+
readonly description: "Delete command ran but the object still exists.";
|
|
10602
|
+
readonly content: {
|
|
10603
|
+
readonly "application/json": {
|
|
10604
|
+
readonly schema: {
|
|
10605
|
+
readonly $ref: "#/components/schemas/DeleteFileFailure";
|
|
10606
|
+
};
|
|
10607
|
+
};
|
|
10608
|
+
};
|
|
10609
|
+
};
|
|
10610
|
+
};
|
|
10611
|
+
};
|
|
10612
|
+
};
|
|
10272
10613
|
readonly "/files/download-from-task/{workspace}/{taskId}": {
|
|
10273
10614
|
readonly get: {
|
|
10274
10615
|
readonly tags: readonly [
|
|
@@ -10430,7 +10771,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10430
10771
|
"Files"
|
|
10431
10772
|
];
|
|
10432
10773
|
readonly summary: "Confirm and persist an uploaded profile picture";
|
|
10433
|
-
readonly description: "Reads the temporary object at `profiles/clients/{userId}/temp`, verifies size (<= 0.5 MB) and real image type (JPEG, PNG, or WebP), resizes it to a 512x512 WebP avatar (cover fit, without enlargement, input pixel limit 4096x4096), stores it privately at `profiles/clients/{userId}/avatar.webp`, deletes the temporary object, creates a 7-day presigned GET URL for the avatar, and saves that URL on the user profile. On failure, the temporary object is deleted
|
|
10774
|
+
readonly description: "Reads the temporary object at `profiles/clients/{userId}/temp`, verifies size (<= 0.5 MB) and real image type (JPEG, PNG, or WebP), resizes it to a 512x512 WebP avatar (cover fit, without enlargement, input pixel limit 4096x4096), stores it privately at `profiles/clients/{userId}/avatar.webp`, deletes the temporary object, creates a 7-day presigned GET URL for the avatar, and saves that URL on the user profile. On failure, the temporary object is deleted; the existing profile picture is left unchanged.";
|
|
10434
10775
|
readonly security: readonly [
|
|
10435
10776
|
never
|
|
10436
10777
|
];
|
|
@@ -10617,7 +10958,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10617
10958
|
"Files"
|
|
10618
10959
|
];
|
|
10619
10960
|
readonly summary: "Confirm and persist an uploaded workspace picture";
|
|
10620
|
-
readonly description: "Reads the temporary object at `profiles/workspaces/{workspace}/temp`, verifies size (<= 0.5 MB) and real image type (JPEG, PNG, or WebP), resizes it to a 512x512 WebP avatar (cover fit, without enlargement, input pixel limit 4096x4096), stores it privately at `profiles/workspaces/{workspace}/avatar.webp`, deletes the temporary object, creates a 7-day presigned GET URL for the avatar, and saves that URL on the workspace. On failure, the temporary object is deleted
|
|
10961
|
+
readonly description: "Reads the temporary object at `profiles/workspaces/{workspace}/temp`, verifies size (<= 0.5 MB) and real image type (JPEG, PNG, or WebP), resizes it to a 512x512 WebP avatar (cover fit, without enlargement, input pixel limit 4096x4096), stores it privately at `profiles/workspaces/{workspace}/avatar.webp`, deletes the temporary object, creates a 7-day presigned GET URL for the avatar, and saves that URL on the workspace. On failure, the temporary object is deleted; the existing workspace picture is left unchanged. Requires workspace access and write access to crm::general.";
|
|
10621
10962
|
readonly security: readonly [
|
|
10622
10963
|
never
|
|
10623
10964
|
];
|
|
@@ -16456,6 +16797,26 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16456
16797
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
16457
16798
|
};
|
|
16458
16799
|
};
|
|
16800
|
+
} & {
|
|
16801
|
+
"/confirm": {
|
|
16802
|
+
$post: {
|
|
16803
|
+
input: {};
|
|
16804
|
+
output: {
|
|
16805
|
+
success: true;
|
|
16806
|
+
key: string;
|
|
16807
|
+
};
|
|
16808
|
+
outputFormat: "json";
|
|
16809
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
16810
|
+
} | {
|
|
16811
|
+
input: {};
|
|
16812
|
+
output: {
|
|
16813
|
+
success: false;
|
|
16814
|
+
error: string;
|
|
16815
|
+
};
|
|
16816
|
+
outputFormat: "json";
|
|
16817
|
+
status: 400;
|
|
16818
|
+
};
|
|
16819
|
+
};
|
|
16459
16820
|
} & {
|
|
16460
16821
|
"/create-folder": {
|
|
16461
16822
|
$post: {
|
|
@@ -16522,6 +16883,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16522
16883
|
} & {
|
|
16523
16884
|
"/download/:workspace/:fileKey": {
|
|
16524
16885
|
$get: {
|
|
16886
|
+
input: {
|
|
16887
|
+
param: {
|
|
16888
|
+
workspace: string;
|
|
16889
|
+
} & {
|
|
16890
|
+
fileKey: string;
|
|
16891
|
+
};
|
|
16892
|
+
};
|
|
16893
|
+
output: {
|
|
16894
|
+
success: false;
|
|
16895
|
+
error: string;
|
|
16896
|
+
};
|
|
16897
|
+
outputFormat: "json";
|
|
16898
|
+
status: 400;
|
|
16899
|
+
} | {
|
|
16525
16900
|
input: {
|
|
16526
16901
|
param: {
|
|
16527
16902
|
workspace: string;
|
|
@@ -16607,6 +16982,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16607
16982
|
};
|
|
16608
16983
|
outputFormat: "json";
|
|
16609
16984
|
status: 400;
|
|
16985
|
+
} | {
|
|
16986
|
+
input: {};
|
|
16987
|
+
output: {
|
|
16988
|
+
success: false;
|
|
16989
|
+
error: string;
|
|
16990
|
+
};
|
|
16991
|
+
outputFormat: "json";
|
|
16992
|
+
status: 404;
|
|
16610
16993
|
} | {
|
|
16611
16994
|
input: {};
|
|
16612
16995
|
output: {
|
|
@@ -16622,9 +17005,98 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16622
17005
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
16623
17006
|
};
|
|
16624
17007
|
};
|
|
17008
|
+
} & {
|
|
17009
|
+
"/confirm-comment-file": {
|
|
17010
|
+
$post: {
|
|
17011
|
+
input: {};
|
|
17012
|
+
output: {
|
|
17013
|
+
success: false;
|
|
17014
|
+
error: string;
|
|
17015
|
+
};
|
|
17016
|
+
outputFormat: "json";
|
|
17017
|
+
status: 404;
|
|
17018
|
+
} | {
|
|
17019
|
+
input: {};
|
|
17020
|
+
output: {
|
|
17021
|
+
success: true;
|
|
17022
|
+
key: string;
|
|
17023
|
+
};
|
|
17024
|
+
outputFormat: "json";
|
|
17025
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
17026
|
+
} | {
|
|
17027
|
+
input: {};
|
|
17028
|
+
output: {
|
|
17029
|
+
success: false;
|
|
17030
|
+
error: string;
|
|
17031
|
+
};
|
|
17032
|
+
outputFormat: "json";
|
|
17033
|
+
status: 400;
|
|
17034
|
+
};
|
|
17035
|
+
};
|
|
17036
|
+
} & {
|
|
17037
|
+
"/delete-comment-file": {
|
|
17038
|
+
$post: {
|
|
17039
|
+
input: {};
|
|
17040
|
+
output: {
|
|
17041
|
+
success: false;
|
|
17042
|
+
error: never;
|
|
17043
|
+
};
|
|
17044
|
+
outputFormat: "json";
|
|
17045
|
+
status: 400;
|
|
17046
|
+
} | {
|
|
17047
|
+
input: {};
|
|
17048
|
+
output: {
|
|
17049
|
+
success: false;
|
|
17050
|
+
error: string;
|
|
17051
|
+
};
|
|
17052
|
+
outputFormat: "json";
|
|
17053
|
+
status: 404;
|
|
17054
|
+
} | {
|
|
17055
|
+
input: {};
|
|
17056
|
+
output: {
|
|
17057
|
+
success: false;
|
|
17058
|
+
message: string;
|
|
17059
|
+
key: string;
|
|
17060
|
+
};
|
|
17061
|
+
outputFormat: "json";
|
|
17062
|
+
status: 404;
|
|
17063
|
+
} | {
|
|
17064
|
+
input: {};
|
|
17065
|
+
output: {
|
|
17066
|
+
success: false;
|
|
17067
|
+
message: string;
|
|
17068
|
+
key: string;
|
|
17069
|
+
};
|
|
17070
|
+
outputFormat: "json";
|
|
17071
|
+
status: 500;
|
|
17072
|
+
} | {
|
|
17073
|
+
input: {};
|
|
17074
|
+
output: {
|
|
17075
|
+
success: true;
|
|
17076
|
+
message: string;
|
|
17077
|
+
key: string;
|
|
17078
|
+
};
|
|
17079
|
+
outputFormat: "json";
|
|
17080
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
17081
|
+
};
|
|
17082
|
+
};
|
|
16625
17083
|
} & {
|
|
16626
17084
|
"/download-from-task/:workspace/:taskId": {
|
|
16627
17085
|
$get: {
|
|
17086
|
+
input: {
|
|
17087
|
+
param: {
|
|
17088
|
+
workspace: string;
|
|
17089
|
+
} & {
|
|
17090
|
+
taskId: string;
|
|
17091
|
+
};
|
|
17092
|
+
};
|
|
17093
|
+
output: {
|
|
17094
|
+
success: false;
|
|
17095
|
+
error: string;
|
|
17096
|
+
};
|
|
17097
|
+
outputFormat: "json";
|
|
17098
|
+
status: 404;
|
|
17099
|
+
} | {
|
|
16628
17100
|
input: {
|
|
16629
17101
|
param: {
|
|
16630
17102
|
workspace: string;
|