@mestra-dev/contract 0.0.36 → 0.0.38
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 +239 -43
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
readonly name: "Files";
|
|
101
|
-
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.";
|
|
101
|
+
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), optional nested folder destination under `{workspace}/folders/{path}/`, profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), pin/unpin, download by relative path, move, 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.";
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
readonly name: "Chat";
|
|
@@ -1451,7 +1451,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1451
1451
|
readonly type: "string";
|
|
1452
1452
|
readonly minLength: 1;
|
|
1453
1453
|
readonly maxLength: 200;
|
|
1454
|
-
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
1454
|
+
readonly description: "Safe leaf file name (no path separators, not `.tmp`).";
|
|
1455
1455
|
readonly example: "invoice-2026.pdf";
|
|
1456
1456
|
};
|
|
1457
1457
|
readonly contentType: {
|
|
@@ -1468,6 +1468,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1468
1468
|
readonly format: "uuid";
|
|
1469
1469
|
readonly description: "Workspace identifier.";
|
|
1470
1470
|
};
|
|
1471
|
+
readonly folder: {
|
|
1472
|
+
readonly type: "string";
|
|
1473
|
+
readonly minLength: 1;
|
|
1474
|
+
readonly maxLength: 800;
|
|
1475
|
+
readonly description: "Optional nested folder path under `{workspace}/folders/` (e.g. `a/b`). Each segment is a safe name; max depth 10. The folder marker must already exist via `/files/create-folder`. Omitting uploads to the workspace root.";
|
|
1476
|
+
readonly example: "contracts/2026";
|
|
1477
|
+
};
|
|
1471
1478
|
};
|
|
1472
1479
|
};
|
|
1473
1480
|
readonly ConfirmFileRequest: {
|
|
@@ -1481,7 +1488,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1481
1488
|
readonly type: "string";
|
|
1482
1489
|
readonly minLength: 1;
|
|
1483
1490
|
readonly maxLength: 200;
|
|
1484
|
-
readonly description: "Original file name used for `/files/upload` (without the `.tmp` suffix).";
|
|
1491
|
+
readonly description: "Original leaf file name used for `/files/upload` (without the `.tmp` suffix).";
|
|
1485
1492
|
readonly example: "invoice-2026.pdf";
|
|
1486
1493
|
};
|
|
1487
1494
|
readonly workspace: {
|
|
@@ -1489,6 +1496,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1489
1496
|
readonly format: "uuid";
|
|
1490
1497
|
readonly description: "Workspace identifier.";
|
|
1491
1498
|
};
|
|
1499
|
+
readonly folder: {
|
|
1500
|
+
readonly type: "string";
|
|
1501
|
+
readonly minLength: 1;
|
|
1502
|
+
readonly maxLength: 800;
|
|
1503
|
+
readonly description: "Same optional nested folder path passed to `/files/upload`.";
|
|
1504
|
+
readonly example: "contracts/2026";
|
|
1505
|
+
};
|
|
1492
1506
|
};
|
|
1493
1507
|
};
|
|
1494
1508
|
readonly ConfirmFileSuccess: {
|
|
@@ -1504,8 +1518,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1504
1518
|
};
|
|
1505
1519
|
readonly key: {
|
|
1506
1520
|
readonly type: "string";
|
|
1507
|
-
readonly description: "Final S3 object key after promotion (`{workspace}/{filename}`).";
|
|
1508
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
|
|
1521
|
+
readonly description: "Final S3 object key after promotion (`{workspace}/{filename}` or `{workspace}/folders/{folder}/{filename}`).";
|
|
1522
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000/folders/contracts/2026/invoice-2026.pdf";
|
|
1509
1523
|
};
|
|
1510
1524
|
};
|
|
1511
1525
|
};
|
|
@@ -1531,8 +1545,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1531
1545
|
};
|
|
1532
1546
|
readonly key: {
|
|
1533
1547
|
readonly type: "string";
|
|
1534
|
-
readonly description: "Temporary S3 object key (
|
|
1535
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf.tmp";
|
|
1548
|
+
readonly description: "Temporary S3 object key (`.tmp` suffix). Call `/files/confirm` after upload. Root: `{workspace}/{filename}.tmp`. Folder: `{workspace}/folders/{folder}/{filename}.tmp`.";
|
|
1549
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000/folders/contracts/2026/invoice-2026.pdf.tmp";
|
|
1536
1550
|
};
|
|
1537
1551
|
readonly maxSize: {
|
|
1538
1552
|
readonly type: "integer";
|
|
@@ -1876,16 +1890,25 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1876
1890
|
};
|
|
1877
1891
|
readonly name: {
|
|
1878
1892
|
readonly type: "string";
|
|
1879
|
-
readonly
|
|
1880
|
-
readonly
|
|
1893
|
+
readonly minLength: 1;
|
|
1894
|
+
readonly maxLength: 800;
|
|
1895
|
+
readonly description: "Nested folder path under `{workspace}/folders/` (e.g. `contracts` or `contracts/2026`). Each segment is a safe name; max depth 10.";
|
|
1896
|
+
readonly example: "contracts/2026";
|
|
1881
1897
|
};
|
|
1882
1898
|
};
|
|
1883
1899
|
};
|
|
1900
|
+
readonly WorkspaceRelativeFilePath: {
|
|
1901
|
+
readonly type: "string";
|
|
1902
|
+
readonly minLength: 1;
|
|
1903
|
+
readonly maxLength: 800;
|
|
1904
|
+
readonly description: "Path after `{workspace}/`. Root file: `invoice.pdf`. Folder file: `folders/contracts/2026/invoice.pdf`. Not a full S3 key; no leading slash; not `.tmp`.";
|
|
1905
|
+
readonly example: "folders/contracts/2026/invoice-2026.pdf";
|
|
1906
|
+
};
|
|
1884
1907
|
readonly PinFileRequest: {
|
|
1885
1908
|
readonly type: "object";
|
|
1886
1909
|
readonly required: readonly [
|
|
1887
1910
|
"workspace",
|
|
1888
|
-
"
|
|
1911
|
+
"path",
|
|
1889
1912
|
"pin"
|
|
1890
1913
|
];
|
|
1891
1914
|
readonly properties: {
|
|
@@ -1894,10 +1917,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1894
1917
|
readonly format: "uuid";
|
|
1895
1918
|
readonly description: "Workspace identifier (used for access check).";
|
|
1896
1919
|
};
|
|
1897
|
-
readonly
|
|
1898
|
-
readonly
|
|
1899
|
-
readonly description: "Full S3 object key to pin or unpin (as returned by list or upload).";
|
|
1900
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
|
|
1920
|
+
readonly path: {
|
|
1921
|
+
readonly $ref: "#/components/schemas/WorkspaceRelativeFilePath";
|
|
1901
1922
|
};
|
|
1902
1923
|
readonly pin: {
|
|
1903
1924
|
readonly type: "boolean";
|
|
@@ -1945,7 +1966,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1945
1966
|
readonly key: {
|
|
1946
1967
|
readonly type: "string";
|
|
1947
1968
|
readonly description: "S3 prefix key for the empty folder (`{workspace}/folders/{name}/`).";
|
|
1948
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/folders/contracts/";
|
|
1969
|
+
readonly example: "550e8400-e29b-41d4-a716-446655440000/folders/contracts/2026/";
|
|
1949
1970
|
};
|
|
1950
1971
|
};
|
|
1951
1972
|
};
|
|
@@ -2018,7 +2039,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2018
2039
|
readonly type: "object";
|
|
2019
2040
|
readonly required: readonly [
|
|
2020
2041
|
"workspace",
|
|
2021
|
-
"
|
|
2042
|
+
"path"
|
|
2022
2043
|
];
|
|
2023
2044
|
readonly properties: {
|
|
2024
2045
|
readonly workspace: {
|
|
@@ -2026,10 +2047,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2026
2047
|
readonly format: "uuid";
|
|
2027
2048
|
readonly description: "Workspace identifier (used for access check).";
|
|
2028
2049
|
};
|
|
2029
|
-
readonly
|
|
2030
|
-
readonly
|
|
2031
|
-
readonly description: "Full S3 object key to delete (as returned by list or upload).";
|
|
2032
|
-
readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
|
|
2050
|
+
readonly path: {
|
|
2051
|
+
readonly $ref: "#/components/schemas/WorkspaceRelativeFilePath";
|
|
2033
2052
|
};
|
|
2034
2053
|
};
|
|
2035
2054
|
};
|
|
@@ -2080,6 +2099,49 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2080
2099
|
};
|
|
2081
2100
|
};
|
|
2082
2101
|
};
|
|
2102
|
+
readonly MoveFileRequest: {
|
|
2103
|
+
readonly type: "object";
|
|
2104
|
+
readonly required: readonly [
|
|
2105
|
+
"workspace",
|
|
2106
|
+
"from",
|
|
2107
|
+
"to"
|
|
2108
|
+
];
|
|
2109
|
+
readonly properties: {
|
|
2110
|
+
readonly workspace: {
|
|
2111
|
+
readonly type: "string";
|
|
2112
|
+
readonly format: "uuid";
|
|
2113
|
+
readonly description: "Workspace identifier.";
|
|
2114
|
+
};
|
|
2115
|
+
readonly from: {
|
|
2116
|
+
readonly $ref: "#/components/schemas/WorkspaceRelativeFilePath";
|
|
2117
|
+
};
|
|
2118
|
+
readonly to: {
|
|
2119
|
+
readonly $ref: "#/components/schemas/WorkspaceRelativeFilePath";
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
readonly MoveFileSuccess: {
|
|
2124
|
+
readonly type: "object";
|
|
2125
|
+
readonly required: readonly [
|
|
2126
|
+
"success",
|
|
2127
|
+
"from",
|
|
2128
|
+
"to"
|
|
2129
|
+
];
|
|
2130
|
+
readonly properties: {
|
|
2131
|
+
readonly success: {
|
|
2132
|
+
readonly type: "boolean";
|
|
2133
|
+
readonly const: true;
|
|
2134
|
+
};
|
|
2135
|
+
readonly from: {
|
|
2136
|
+
readonly type: "string";
|
|
2137
|
+
readonly description: "Source full S3 object key.";
|
|
2138
|
+
};
|
|
2139
|
+
readonly to: {
|
|
2140
|
+
readonly type: "string";
|
|
2141
|
+
readonly description: "Destination full S3 object key.";
|
|
2142
|
+
};
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2083
2145
|
readonly MatrixLoginResponse: {
|
|
2084
2146
|
readonly type: "object";
|
|
2085
2147
|
readonly description: "Raw Matrix login payload returned directly (not wrapped). Existing tenants are looked up by JWT `userId` + workspace. On first login, Synapse `/login` response is returned and the access token is persisted on the tenant. On subsequent calls, a cached payload is synthesized from the stored token with `device_id` `MESTRA_{tenantId}` and `well_known.m.homeserver.base_url`. Workspace owners use Matrix localpart `owner_{emailLocalPart}-{workspaceId}`; other collaborators use `{emailLocalPart}-{workspaceId}`.";
|
|
@@ -10655,7 +10717,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10655
10717
|
"Files"
|
|
10656
10718
|
];
|
|
10657
10719
|
readonly summary: "Create presigned S3 upload";
|
|
10658
|
-
readonly description: "Returns a presigned POST URL and form fields for uploading a file to S3 (max 15 MB, 5-minute expiry).
|
|
10720
|
+
readonly description: "Returns a presigned POST URL and form fields for uploading a file to S3 (max 15 MB, 5-minute expiry). Root object key is `{workspace}/{filename}.tmp`. With optional `folder`, key is `{workspace}/folders/{folder}/{filename}.tmp` and the folder marker must already exist. Only JPEG, PNG, WebP, and PDF content types are accepted. After the multipart upload succeeds, call `/files/confirm` with the same `filename` and `folder` to validate magic bytes and promote the object. Temporary objects are excluded from list results. Requires active workspace access and write access to crm::files.";
|
|
10659
10721
|
readonly security: readonly [
|
|
10660
10722
|
never
|
|
10661
10723
|
];
|
|
@@ -10711,7 +10773,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10711
10773
|
};
|
|
10712
10774
|
};
|
|
10713
10775
|
readonly 404: {
|
|
10714
|
-
readonly description: "Workspace not found.";
|
|
10776
|
+
readonly description: "Workspace or destination folder not found.";
|
|
10715
10777
|
readonly content: {
|
|
10716
10778
|
readonly "application/json": {
|
|
10717
10779
|
readonly schema: {
|
|
@@ -10729,7 +10791,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10729
10791
|
"Files"
|
|
10730
10792
|
];
|
|
10731
10793
|
readonly summary: "Confirm and promote a temporary upload";
|
|
10732
|
-
readonly description: "Reads the temporary object
|
|
10794
|
+
readonly description: "Reads the temporary object (root or under `folders/{folder}/`), verifies size (<= 15 MB) and real file type (JPEG, PNG, WebP, or PDF), promotes it to the final key, and deletes the temporary object. On failure, the temporary object is deleted. Requires workspace access.";
|
|
10733
10795
|
readonly security: readonly [
|
|
10734
10796
|
never
|
|
10735
10797
|
];
|
|
@@ -10785,7 +10847,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10785
10847
|
};
|
|
10786
10848
|
};
|
|
10787
10849
|
readonly 404: {
|
|
10788
|
-
readonly description: "Workspace not found.";
|
|
10850
|
+
readonly description: "Workspace or destination folder not found.";
|
|
10789
10851
|
readonly content: {
|
|
10790
10852
|
readonly "application/json": {
|
|
10791
10853
|
readonly schema: {
|
|
@@ -10803,7 +10865,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10803
10865
|
"Files"
|
|
10804
10866
|
];
|
|
10805
10867
|
readonly summary: "Create an empty S3 folder";
|
|
10806
|
-
readonly description: "Creates an empty folder marker in S3 at `{workspace}/folders/{name}/`. Requires workspace access.";
|
|
10868
|
+
readonly description: "Creates an empty folder marker in S3 at `{workspace}/folders/{name}/`. `name` may be nested (e.g. `contracts/2026`). Requires workspace access.";
|
|
10807
10869
|
readonly security: readonly [
|
|
10808
10870
|
never
|
|
10809
10871
|
];
|
|
@@ -10877,7 +10939,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10877
10939
|
"Files"
|
|
10878
10940
|
];
|
|
10879
10941
|
readonly summary: "Delete an S3 folder and its contents";
|
|
10880
|
-
readonly description: "Deletes all objects under `{workspace}/folders/{name}/` in paginated batches. Requires workspace access.";
|
|
10942
|
+
readonly description: "Deletes all objects under `{workspace}/folders/{name}/` in paginated batches. `name` may be nested. Requires workspace access.";
|
|
10881
10943
|
readonly security: readonly [
|
|
10882
10944
|
never
|
|
10883
10945
|
];
|
|
@@ -11021,13 +11083,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11021
11083
|
};
|
|
11022
11084
|
};
|
|
11023
11085
|
};
|
|
11024
|
-
readonly "/files/download/{workspace}
|
|
11086
|
+
readonly "/files/download/{workspace}": {
|
|
11025
11087
|
readonly get: {
|
|
11026
11088
|
readonly tags: readonly [
|
|
11027
11089
|
"Files"
|
|
11028
11090
|
];
|
|
11029
11091
|
readonly summary: "Get presigned download URL";
|
|
11030
|
-
readonly description: "Returns a presigned GET URL for `{workspace}/{
|
|
11092
|
+
readonly description: "Returns a presigned GET URL for `{workspace}/{path}` (5-minute expiry). Pass the workspace-relative path as the `path` query parameter (root leaf or `folders/...`). Requires workspace access.";
|
|
11031
11093
|
readonly security: readonly [
|
|
11032
11094
|
never
|
|
11033
11095
|
];
|
|
@@ -11043,13 +11105,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11043
11105
|
readonly description: "Workspace identifier.";
|
|
11044
11106
|
},
|
|
11045
11107
|
{
|
|
11046
|
-
readonly name: "
|
|
11047
|
-
readonly in: "
|
|
11108
|
+
readonly name: "path";
|
|
11109
|
+
readonly in: "query";
|
|
11048
11110
|
readonly required: true;
|
|
11049
11111
|
readonly schema: {
|
|
11050
|
-
readonly
|
|
11112
|
+
readonly $ref: "#/components/schemas/WorkspaceRelativeFilePath";
|
|
11051
11113
|
};
|
|
11052
|
-
readonly description: "
|
|
11114
|
+
readonly description: "Workspace-relative file path after the workspace prefix.";
|
|
11053
11115
|
}
|
|
11054
11116
|
];
|
|
11055
11117
|
readonly responses: {
|
|
@@ -11064,7 +11126,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11064
11126
|
};
|
|
11065
11127
|
};
|
|
11066
11128
|
readonly 400: {
|
|
11067
|
-
readonly description: "Invalid workspace id.";
|
|
11129
|
+
readonly description: "Invalid workspace id or file path.";
|
|
11068
11130
|
readonly content: {
|
|
11069
11131
|
readonly "application/json": {
|
|
11070
11132
|
readonly schema: {
|
|
@@ -11112,7 +11174,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11112
11174
|
"Files"
|
|
11113
11175
|
];
|
|
11114
11176
|
readonly summary: "Pin or unpin a file";
|
|
11115
|
-
readonly description: "Sets S3 object user metadata `pin` to `true` or `false` on
|
|
11177
|
+
readonly description: "Sets S3 object user metadata `pin` to `true` or `false` on `{workspace}/{path}` via copy-in-place with MetadataDirective REPLACE. Requires workspace access.";
|
|
11116
11178
|
readonly security: readonly [
|
|
11117
11179
|
never
|
|
11118
11180
|
];
|
|
@@ -11185,8 +11247,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11185
11247
|
readonly tags: readonly [
|
|
11186
11248
|
"Files"
|
|
11187
11249
|
];
|
|
11188
|
-
readonly summary: "Delete a file by
|
|
11189
|
-
readonly description: "Deletes
|
|
11250
|
+
readonly summary: "Delete a file by workspace-relative path";
|
|
11251
|
+
readonly description: "Deletes the S3 object at `{workspace}/{path}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access.";
|
|
11190
11252
|
readonly security: readonly [
|
|
11191
11253
|
never
|
|
11192
11254
|
];
|
|
@@ -11242,7 +11304,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11242
11304
|
};
|
|
11243
11305
|
};
|
|
11244
11306
|
readonly 404: {
|
|
11245
|
-
readonly description: "File not found
|
|
11307
|
+
readonly description: "File or workspace not found.";
|
|
11246
11308
|
readonly content: {
|
|
11247
11309
|
readonly "application/json": {
|
|
11248
11310
|
readonly schema: {
|
|
@@ -11252,7 +11314,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11252
11314
|
};
|
|
11253
11315
|
};
|
|
11254
11316
|
readonly 500: {
|
|
11255
|
-
readonly description: "Delete
|
|
11317
|
+
readonly description: "Delete failed (object still present after delete).";
|
|
11256
11318
|
readonly content: {
|
|
11257
11319
|
readonly "application/json": {
|
|
11258
11320
|
readonly schema: {
|
|
@@ -11264,6 +11326,90 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11264
11326
|
};
|
|
11265
11327
|
};
|
|
11266
11328
|
};
|
|
11329
|
+
readonly "/files/move": {
|
|
11330
|
+
readonly post: {
|
|
11331
|
+
readonly tags: readonly [
|
|
11332
|
+
"Files"
|
|
11333
|
+
];
|
|
11334
|
+
readonly summary: "Move a file within a workspace";
|
|
11335
|
+
readonly description: "Copies `{workspace}/{from}` to `{workspace}/{to}` (preserving content type and metadata including pin), then deletes the source. Destination must not already exist (409). If `to` is under `folders/`, the parent folder marker must exist. Requires workspace access and write access to crm::files.";
|
|
11336
|
+
readonly security: readonly [
|
|
11337
|
+
never
|
|
11338
|
+
];
|
|
11339
|
+
readonly requestBody: {
|
|
11340
|
+
readonly required: true;
|
|
11341
|
+
readonly content: {
|
|
11342
|
+
readonly "application/json": {
|
|
11343
|
+
readonly schema: {
|
|
11344
|
+
readonly $ref: "#/components/schemas/MoveFileRequest";
|
|
11345
|
+
};
|
|
11346
|
+
};
|
|
11347
|
+
};
|
|
11348
|
+
};
|
|
11349
|
+
readonly responses: {
|
|
11350
|
+
readonly 200: {
|
|
11351
|
+
readonly description: "File moved successfully.";
|
|
11352
|
+
readonly content: {
|
|
11353
|
+
readonly "application/json": {
|
|
11354
|
+
readonly schema: {
|
|
11355
|
+
readonly $ref: "#/components/schemas/MoveFileSuccess";
|
|
11356
|
+
};
|
|
11357
|
+
};
|
|
11358
|
+
};
|
|
11359
|
+
};
|
|
11360
|
+
readonly 400: {
|
|
11361
|
+
readonly description: "Invalid request payload.";
|
|
11362
|
+
readonly content: {
|
|
11363
|
+
readonly "application/json": {
|
|
11364
|
+
readonly schema: {
|
|
11365
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
11366
|
+
};
|
|
11367
|
+
};
|
|
11368
|
+
};
|
|
11369
|
+
};
|
|
11370
|
+
readonly 401: {
|
|
11371
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
11372
|
+
readonly content: {
|
|
11373
|
+
readonly "application/json": {
|
|
11374
|
+
readonly schema: {
|
|
11375
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
11376
|
+
};
|
|
11377
|
+
};
|
|
11378
|
+
};
|
|
11379
|
+
};
|
|
11380
|
+
readonly 403: {
|
|
11381
|
+
readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
|
|
11382
|
+
readonly content: {
|
|
11383
|
+
readonly "application/json": {
|
|
11384
|
+
readonly schema: {
|
|
11385
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
11386
|
+
};
|
|
11387
|
+
};
|
|
11388
|
+
};
|
|
11389
|
+
};
|
|
11390
|
+
readonly 404: {
|
|
11391
|
+
readonly description: "Source file, destination folder, or workspace not found.";
|
|
11392
|
+
readonly content: {
|
|
11393
|
+
readonly "application/json": {
|
|
11394
|
+
readonly schema: {
|
|
11395
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
11396
|
+
};
|
|
11397
|
+
};
|
|
11398
|
+
};
|
|
11399
|
+
};
|
|
11400
|
+
readonly 409: {
|
|
11401
|
+
readonly description: "Destination already exists.";
|
|
11402
|
+
readonly content: {
|
|
11403
|
+
readonly "application/json": {
|
|
11404
|
+
readonly schema: {
|
|
11405
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
11406
|
+
};
|
|
11407
|
+
};
|
|
11408
|
+
};
|
|
11409
|
+
};
|
|
11410
|
+
};
|
|
11411
|
+
};
|
|
11412
|
+
};
|
|
11267
11413
|
readonly "/files/upload-to-comment": {
|
|
11268
11414
|
readonly post: {
|
|
11269
11415
|
readonly tags: readonly [
|
|
@@ -12852,6 +12998,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12852
12998
|
action: string;
|
|
12853
12999
|
}[];
|
|
12854
13000
|
}[];
|
|
13001
|
+
unpaidLimit: number;
|
|
12855
13002
|
};
|
|
12856
13003
|
outputFormat: "json";
|
|
12857
13004
|
status: 200;
|
|
@@ -17860,6 +18007,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17860
18007
|
};
|
|
17861
18008
|
outputFormat: "json";
|
|
17862
18009
|
status: 400;
|
|
18010
|
+
} | {
|
|
18011
|
+
input: {};
|
|
18012
|
+
output: {
|
|
18013
|
+
success: false;
|
|
18014
|
+
error: string;
|
|
18015
|
+
};
|
|
18016
|
+
outputFormat: "json";
|
|
18017
|
+
status: 404;
|
|
17863
18018
|
} | {
|
|
17864
18019
|
input: {};
|
|
17865
18020
|
output: {
|
|
@@ -17877,6 +18032,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17877
18032
|
} & {
|
|
17878
18033
|
"/confirm": {
|
|
17879
18034
|
$post: {
|
|
18035
|
+
input: {};
|
|
18036
|
+
output: {
|
|
18037
|
+
success: false;
|
|
18038
|
+
error: string;
|
|
18039
|
+
};
|
|
18040
|
+
outputFormat: "json";
|
|
18041
|
+
status: 404;
|
|
18042
|
+
} | {
|
|
17880
18043
|
input: {};
|
|
17881
18044
|
output: {
|
|
17882
18045
|
success: true;
|
|
@@ -17958,13 +18121,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17958
18121
|
};
|
|
17959
18122
|
};
|
|
17960
18123
|
} & {
|
|
17961
|
-
"/download/:workspace
|
|
18124
|
+
"/download/:workspace": {
|
|
17962
18125
|
$get: {
|
|
17963
18126
|
input: {
|
|
17964
18127
|
param: {
|
|
17965
18128
|
workspace: string;
|
|
17966
|
-
} & {
|
|
17967
|
-
fileKey: string;
|
|
17968
18129
|
};
|
|
17969
18130
|
};
|
|
17970
18131
|
output: {
|
|
@@ -17977,8 +18138,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17977
18138
|
input: {
|
|
17978
18139
|
param: {
|
|
17979
18140
|
workspace: string;
|
|
17980
|
-
} & {
|
|
17981
|
-
fileKey: string;
|
|
17982
18141
|
};
|
|
17983
18142
|
};
|
|
17984
18143
|
output: {
|
|
@@ -18049,6 +18208,43 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18049
18208
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18050
18209
|
};
|
|
18051
18210
|
};
|
|
18211
|
+
} & {
|
|
18212
|
+
"/move": {
|
|
18213
|
+
$post: {
|
|
18214
|
+
input: {};
|
|
18215
|
+
output: {
|
|
18216
|
+
success: false;
|
|
18217
|
+
error: never;
|
|
18218
|
+
};
|
|
18219
|
+
outputFormat: "json";
|
|
18220
|
+
status: 400;
|
|
18221
|
+
} | {
|
|
18222
|
+
input: {};
|
|
18223
|
+
output: {
|
|
18224
|
+
success: false;
|
|
18225
|
+
error: string;
|
|
18226
|
+
};
|
|
18227
|
+
outputFormat: "json";
|
|
18228
|
+
status: 404;
|
|
18229
|
+
} | {
|
|
18230
|
+
input: {};
|
|
18231
|
+
output: {
|
|
18232
|
+
success: false;
|
|
18233
|
+
error: string;
|
|
18234
|
+
};
|
|
18235
|
+
outputFormat: "json";
|
|
18236
|
+
status: 409;
|
|
18237
|
+
} | {
|
|
18238
|
+
input: {};
|
|
18239
|
+
output: {
|
|
18240
|
+
success: true;
|
|
18241
|
+
from: string;
|
|
18242
|
+
to: string;
|
|
18243
|
+
};
|
|
18244
|
+
outputFormat: "json";
|
|
18245
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18246
|
+
};
|
|
18247
|
+
};
|
|
18052
18248
|
} & {
|
|
18053
18249
|
"/upload-to-comment": {
|
|
18054
18250
|
$post: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mestra-dev/contract",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "Types-only Hono AppType contract for the Mestra auth API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/bun": "^1.3.14",
|
|
29
29
|
"dts-bundle-generator": "^9.5.1",
|
|
30
|
-
"hono": "^4.
|
|
31
|
-
"typescript": "^5.
|
|
30
|
+
"hono": "^4.13.1",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
32
32
|
}
|
|
33
33
|
}
|