@mestra-dev/contract 0.0.24 → 0.0.25

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 (2) hide show
  1. package/dist/index.d.ts +324 -212
  2. 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: "Context-based S3 file upload and confirmation using presigned POSTs, with storage, profile, workspace, and comment contexts. Includes folder create/delete, workspace listing, pin/unpin, download, and delete.";
98
98
  },
99
99
  {
100
100
  readonly name: "Chat";
@@ -1404,21 +1404,104 @@ declare const routes: import("hono/hono-base").HonoBase<{
1404
1404
  readonly required: readonly [
1405
1405
  "filename",
1406
1406
  "contentType",
1407
- "workspace"
1407
+ "context"
1408
1408
  ];
1409
1409
  readonly properties: {
1410
1410
  readonly filename: {
1411
1411
  readonly type: "string";
1412
- readonly description: "Original file name (trimmed).";
1412
+ readonly description: "Original file name (trimmed). Must not contain path separators or `..`.";
1413
1413
  readonly example: "invoice-2026.pdf";
1414
1414
  };
1415
1415
  readonly contentType: {
1416
1416
  readonly $ref: "#/components/schemas/FileContentType";
1417
1417
  };
1418
+ readonly context: {
1419
+ readonly type: "string";
1420
+ readonly enum: readonly [
1421
+ "storage",
1422
+ "profile",
1423
+ "workspace",
1424
+ "comment"
1425
+ ];
1426
+ readonly description: "Determines the S3 key prefix.";
1427
+ };
1418
1428
  readonly workspace: {
1419
1429
  readonly type: "string";
1420
1430
  readonly format: "uuid";
1421
- readonly description: "Workspace identifier.";
1431
+ readonly description: "Required for storage, workspace, and comment contexts.";
1432
+ };
1433
+ readonly taskId: {
1434
+ readonly type: "string";
1435
+ readonly format: "uuid";
1436
+ readonly description: "Required for comment context.";
1437
+ };
1438
+ readonly commentId: {
1439
+ readonly type: "string";
1440
+ readonly format: "uuid";
1441
+ readonly description: "Required for comment context.";
1442
+ };
1443
+ };
1444
+ };
1445
+ readonly ConfirmFileRequest: {
1446
+ readonly type: "object";
1447
+ readonly required: readonly [
1448
+ "filename",
1449
+ "context",
1450
+ "uploadId"
1451
+ ];
1452
+ readonly properties: {
1453
+ readonly filename: {
1454
+ readonly type: "string";
1455
+ readonly description: "Original file name used in `/files/upload` (without `.tmp`). Must not contain path separators or `..`.";
1456
+ readonly example: "invoice-2026.pdf";
1457
+ };
1458
+ readonly context: {
1459
+ readonly type: "string";
1460
+ readonly enum: readonly [
1461
+ "storage",
1462
+ "profile",
1463
+ "workspace",
1464
+ "comment"
1465
+ ];
1466
+ readonly description: "Must match the context used for `/files/upload`.";
1467
+ };
1468
+ readonly uploadId: {
1469
+ readonly type: "string";
1470
+ readonly format: "uuid";
1471
+ readonly description: "Upload session identifier returned by `/files/upload`.";
1472
+ };
1473
+ readonly workspace: {
1474
+ readonly type: "string";
1475
+ readonly format: "uuid";
1476
+ readonly description: "Required for storage, workspace, and comment contexts.";
1477
+ };
1478
+ readonly taskId: {
1479
+ readonly type: "string";
1480
+ readonly format: "uuid";
1481
+ readonly description: "Required for comment context.";
1482
+ };
1483
+ readonly commentId: {
1484
+ readonly type: "string";
1485
+ readonly format: "uuid";
1486
+ readonly description: "Required for comment context.";
1487
+ };
1488
+ };
1489
+ };
1490
+ readonly ConfirmFileSuccess: {
1491
+ readonly type: "object";
1492
+ readonly required: readonly [
1493
+ "success",
1494
+ "key"
1495
+ ];
1496
+ readonly properties: {
1497
+ readonly success: {
1498
+ readonly type: "boolean";
1499
+ readonly const: true;
1500
+ };
1501
+ readonly key: {
1502
+ readonly type: "string";
1503
+ readonly description: "Final S3 object key after confirmation, derived from context.";
1504
+ readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1422
1505
  };
1423
1506
  };
1424
1507
  };
@@ -1428,6 +1511,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
1428
1511
  "url",
1429
1512
  "fields",
1430
1513
  "key",
1514
+ "fileKey",
1515
+ "uploadId",
1431
1516
  "maxSize"
1432
1517
  ];
1433
1518
  readonly properties: {
@@ -1444,14 +1529,23 @@ declare const routes: import("hono/hono-base").HonoBase<{
1444
1529
  };
1445
1530
  readonly key: {
1446
1531
  readonly type: "string";
1447
- readonly description: "S3 object key where the file will be stored (`{workspace}/{filename}`).";
1448
- readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1532
+ readonly description: "Context-derived temporary S3 object key. Call `/files/confirm` after upload.";
1533
+ readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf.tmp/7b7c3c8b-2d17-4d5f-9f2b-1e7b3b4c5d6e";
1449
1534
  };
1450
1535
  readonly maxSize: {
1451
1536
  readonly type: "integer";
1452
1537
  readonly description: "Maximum allowed upload size in bytes (15 MB).";
1453
1538
  readonly example: 15728640;
1454
1539
  };
1540
+ readonly fileKey: {
1541
+ readonly type: "string";
1542
+ readonly description: "Final S3 object key to use with generic file operations.";
1543
+ };
1544
+ readonly uploadId: {
1545
+ readonly type: "string";
1546
+ readonly format: "uuid";
1547
+ readonly description: "Upload session identifier required by `/files/confirm`.";
1548
+ };
1455
1549
  };
1456
1550
  };
1457
1551
  readonly UploadToCommentRequest: {
@@ -1730,11 +1824,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
1730
1824
  readonly workspace: {
1731
1825
  readonly type: "string";
1732
1826
  readonly format: "uuid";
1733
- readonly description: "Workspace identifier (used for access check).";
1827
+ readonly description: "Workspace identifier. `fileKey` must be under `{workspace}/`.";
1734
1828
  };
1735
1829
  readonly fileKey: {
1736
1830
  readonly type: "string";
1737
- readonly description: "Full S3 object key to pin or unpin (as returned by list or upload).";
1831
+ readonly description: "Full S3 object key to pin or unpin. Must start with `{workspace}/` (as returned by list or confirm).";
1738
1832
  readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1739
1833
  };
1740
1834
  readonly pin: {
@@ -1862,15 +1956,34 @@ declare const routes: import("hono/hono-base").HonoBase<{
1862
1956
  readonly workspace: {
1863
1957
  readonly type: "string";
1864
1958
  readonly format: "uuid";
1865
- readonly description: "Workspace identifier (used for access check).";
1959
+ readonly description: "Workspace identifier. `fileKey` must be under `{workspace}/`.";
1866
1960
  };
1867
1961
  readonly fileKey: {
1868
1962
  readonly type: "string";
1869
- readonly description: "Full S3 object key to delete (as returned by list or upload).";
1963
+ readonly description: "Full S3 object key to delete. Must start with `{workspace}/` (as returned by list or confirm).";
1870
1964
  readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1871
1965
  };
1872
1966
  };
1873
1967
  };
1968
+ readonly DeleteCommentFileRequest: {
1969
+ readonly type: "object";
1970
+ readonly required: readonly [
1971
+ "workspace",
1972
+ "fileKey"
1973
+ ];
1974
+ readonly properties: {
1975
+ readonly workspace: {
1976
+ readonly type: "string";
1977
+ readonly format: "uuid";
1978
+ readonly description: "Workspace identifier. `fileKey` must be under `{workspace}_comments/`.";
1979
+ };
1980
+ readonly fileKey: {
1981
+ readonly type: "string";
1982
+ readonly description: "Full S3 object key to delete (as returned by upload-to-comment or download-from-task).";
1983
+ readonly example: "550e8400-e29b-41d4-a716-446655440000_comments/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/ffffffff-1111-2222-3333-444444444444/receipt.pdf";
1984
+ };
1985
+ };
1986
+ };
1874
1987
  readonly DeleteFileSuccess: {
1875
1988
  readonly type: "object";
1876
1989
  readonly required: readonly [
@@ -1893,6 +2006,28 @@ declare const routes: import("hono/hono-base").HonoBase<{
1893
2006
  };
1894
2007
  };
1895
2008
  };
2009
+ readonly DeleteCommentFileSuccess: {
2010
+ readonly type: "object";
2011
+ readonly required: readonly [
2012
+ "success",
2013
+ "message",
2014
+ "key"
2015
+ ];
2016
+ readonly properties: {
2017
+ readonly success: {
2018
+ readonly type: "boolean";
2019
+ readonly const: true;
2020
+ };
2021
+ readonly message: {
2022
+ readonly type: "string";
2023
+ readonly example: "Comment file deleted successfully";
2024
+ };
2025
+ readonly key: {
2026
+ readonly type: "string";
2027
+ readonly description: "S3 object key that was deleted.";
2028
+ };
2029
+ };
2030
+ };
1896
2031
  readonly DeleteFileFailure: {
1897
2032
  readonly type: "object";
1898
2033
  readonly required: readonly [
@@ -9660,7 +9795,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
9660
9795
  "Files"
9661
9796
  ];
9662
9797
  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.";
9798
+ readonly description: "Returns a presigned POST URL for a context-based temporary upload (max 15 MB, 5-minute expiry). The context may be `storage`, `profile`, `workspace`, or `comment`; related identifiers are required for each context. The response includes a server-generated `uploadId`, which must be sent to `/files/confirm` to prevent temporary-upload substitution. Workspace, comment, and workspace-profile contexts require the corresponding workspace permissions.";
9664
9799
  readonly security: readonly [
9665
9800
  never
9666
9801
  ];
@@ -9686,7 +9821,81 @@ declare const routes: import("hono/hono-base").HonoBase<{
9686
9821
  };
9687
9822
  };
9688
9823
  readonly 400: {
9689
- readonly description: "Invalid request payload or unsupported content type.";
9824
+ readonly description: "Invalid request payload, unsupported content type, or unsafe filename.";
9825
+ readonly content: {
9826
+ readonly "application/json": {
9827
+ readonly schema: {
9828
+ readonly $ref: "#/components/schemas/ErrorResponse";
9829
+ };
9830
+ };
9831
+ };
9832
+ };
9833
+ readonly 401: {
9834
+ readonly description: "Unauthorized - Missing or invalid access token.";
9835
+ readonly content: {
9836
+ readonly "application/json": {
9837
+ readonly schema: {
9838
+ readonly $ref: "#/components/schemas/ErrorResponse";
9839
+ };
9840
+ };
9841
+ };
9842
+ };
9843
+ readonly 403: {
9844
+ readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
9845
+ readonly content: {
9846
+ readonly "application/json": {
9847
+ readonly schema: {
9848
+ readonly $ref: "#/components/schemas/ErrorResponse";
9849
+ };
9850
+ };
9851
+ };
9852
+ };
9853
+ readonly 404: {
9854
+ readonly description: "Workspace not found.";
9855
+ readonly content: {
9856
+ readonly "application/json": {
9857
+ readonly schema: {
9858
+ readonly $ref: "#/components/schemas/ErrorResponse";
9859
+ };
9860
+ };
9861
+ };
9862
+ };
9863
+ };
9864
+ };
9865
+ };
9866
+ readonly "/files/confirm": {
9867
+ readonly post: {
9868
+ readonly tags: readonly [
9869
+ "Files"
9870
+ ];
9871
+ readonly summary: "Confirm and persist an uploaded workspace file";
9872
+ readonly description: "Reads the context-specific temporary object identified by `uploadId`, verifies size (<= 15 MB) and real file type via magic bytes (JPEG, PNG, WebP, or PDF), writes it to the context-derived final key, and deletes the temporary object. On failure, the temporary object is deleted. The same context identifiers and uploadId returned by `/files/upload` are required.";
9873
+ readonly security: readonly [
9874
+ never
9875
+ ];
9876
+ readonly requestBody: {
9877
+ readonly required: true;
9878
+ readonly content: {
9879
+ readonly "application/json": {
9880
+ readonly schema: {
9881
+ readonly $ref: "#/components/schemas/ConfirmFileRequest";
9882
+ };
9883
+ };
9884
+ };
9885
+ };
9886
+ readonly responses: {
9887
+ readonly 200: {
9888
+ readonly description: "File confirmed and stored at the final key.";
9889
+ readonly content: {
9890
+ readonly "application/json": {
9891
+ readonly schema: {
9892
+ readonly $ref: "#/components/schemas/ConfirmFileSuccess";
9893
+ };
9894
+ };
9895
+ };
9896
+ };
9897
+ readonly 400: {
9898
+ readonly description: "Invalid payload, missing temp object, file too large, or invalid file type.";
9690
9899
  readonly content: {
9691
9900
  readonly "application/json": {
9692
9901
  readonly schema: {
@@ -9882,7 +10091,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
9882
10091
  "Files"
9883
10092
  ];
9884
10093
  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.";
10094
+ readonly description: "Lists up to 50 S3 objects under the workspace prefix (excludes keys ending in `.tmp`). Each item includes `pin` from S3 object user metadata. Requires workspace access.";
9886
10095
  readonly security: readonly [
9887
10096
  never
9888
10097
  ];
@@ -10043,7 +10252,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10043
10252
  "Files"
10044
10253
  ];
10045
10254
  readonly summary: "Pin or unpin a file";
10046
- readonly description: "Sets S3 object user metadata `pin` to `true` or `false` on the given full `fileKey` via copy-in-place with MetadataDirective REPLACE. Requires workspace access.";
10255
+ readonly description: "Sets S3 object user metadata `pin` to `true` or `false` on the given full `fileKey` via copy-in-place with MetadataDirective REPLACE. `fileKey` must start with `{workspace}/`. Requires workspace access.";
10047
10256
  readonly security: readonly [
10048
10257
  never
10049
10258
  ];
@@ -10117,7 +10326,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10117
10326
  "Files"
10118
10327
  ];
10119
10328
  readonly summary: "Delete a file by S3 key";
10120
- readonly description: "Deletes an S3 object by full `fileKey`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access.";
10329
+ readonly description: "Deletes an S3 object by full `fileKey`. Rejects keys that are not under `{workspace}/`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access.";
10121
10330
  readonly security: readonly [
10122
10331
  never
10123
10332
  ];
@@ -10163,11 +10372,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
10163
10372
  };
10164
10373
  };
10165
10374
  readonly 403: {
10166
- readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
10375
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or fileKey is outside the workspace prefix.";
10167
10376
  readonly content: {
10168
10377
  readonly "application/json": {
10169
10378
  readonly schema: {
10170
- readonly $ref: "#/components/schemas/ErrorResponse";
10379
+ readonly $ref: "#/components/schemas/DeleteFileFailure";
10171
10380
  };
10172
10381
  };
10173
10382
  };
@@ -10269,6 +10478,80 @@ declare const routes: import("hono/hono-base").HonoBase<{
10269
10478
  };
10270
10479
  };
10271
10480
  };
10481
+ readonly "/files/delete-from-comment": {
10482
+ readonly post: {
10483
+ readonly tags: readonly [
10484
+ "Files"
10485
+ ];
10486
+ readonly summary: "Delete a comment attachment by S3 key";
10487
+ readonly description: "Deletes a comment attachment S3 object by full `fileKey`. Rejects keys that are not under `{workspace}_comments/`. Requires workspace access and write access to crm::tasks.";
10488
+ readonly security: readonly [
10489
+ never
10490
+ ];
10491
+ readonly requestBody: {
10492
+ readonly required: true;
10493
+ readonly content: {
10494
+ readonly "application/json": {
10495
+ readonly schema: {
10496
+ readonly $ref: "#/components/schemas/DeleteCommentFileRequest";
10497
+ };
10498
+ };
10499
+ };
10500
+ };
10501
+ readonly responses: {
10502
+ readonly 200: {
10503
+ readonly description: "Comment file deleted successfully.";
10504
+ readonly content: {
10505
+ readonly "application/json": {
10506
+ readonly schema: {
10507
+ readonly $ref: "#/components/schemas/DeleteCommentFileSuccess";
10508
+ };
10509
+ };
10510
+ };
10511
+ };
10512
+ readonly 400: {
10513
+ readonly description: "Invalid request payload.";
10514
+ readonly content: {
10515
+ readonly "application/json": {
10516
+ readonly schema: {
10517
+ readonly $ref: "#/components/schemas/ErrorResponse";
10518
+ };
10519
+ };
10520
+ };
10521
+ };
10522
+ readonly 401: {
10523
+ readonly description: "Unauthorized - Missing or invalid access token.";
10524
+ readonly content: {
10525
+ readonly "application/json": {
10526
+ readonly schema: {
10527
+ readonly $ref: "#/components/schemas/ErrorResponse";
10528
+ };
10529
+ };
10530
+ };
10531
+ };
10532
+ readonly 403: {
10533
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, user lacks write access to crm::tasks, or fileKey is outside the comment attachments prefix.";
10534
+ readonly content: {
10535
+ readonly "application/json": {
10536
+ readonly schema: {
10537
+ readonly $ref: "#/components/schemas/DeleteFileFailure";
10538
+ };
10539
+ };
10540
+ };
10541
+ };
10542
+ readonly 404: {
10543
+ readonly description: "File not found at the given key.";
10544
+ readonly content: {
10545
+ readonly "application/json": {
10546
+ readonly schema: {
10547
+ readonly $ref: "#/components/schemas/DeleteFileFailure";
10548
+ };
10549
+ };
10550
+ };
10551
+ };
10552
+ };
10553
+ };
10554
+ };
10272
10555
  readonly "/files/download-from-task/{workspace}/{taskId}": {
10273
10556
  readonly get: {
10274
10557
  readonly tags: readonly [
@@ -16438,18 +16721,21 @@ declare const routes: import("hono/hono-base").HonoBase<{
16438
16721
  input: {};
16439
16722
  output: {
16440
16723
  success: false;
16441
- error: never;
16724
+ error: string;
16442
16725
  };
16443
16726
  outputFormat: "json";
16444
16727
  status: 400;
16445
16728
  } | {
16446
16729
  input: {};
16447
16730
  output: {
16731
+ success: true;
16448
16732
  url: string;
16449
16733
  fields: {
16450
16734
  [x: string]: string;
16451
16735
  };
16452
16736
  key: string;
16737
+ fileKey: string;
16738
+ uploadId: `${string}-${string}-${string}-${string}-${string}`;
16453
16739
  maxSize: number;
16454
16740
  };
16455
16741
  outputFormat: "json";
@@ -16457,12 +16743,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16457
16743
  };
16458
16744
  };
16459
16745
  } & {
16460
- "/create-folder": {
16746
+ "/confirm": {
16461
16747
  $post: {
16462
16748
  input: {};
16463
16749
  output: {
16464
16750
  success: false;
16465
- error: never;
16751
+ error: string;
16466
16752
  };
16467
16753
  outputFormat: "json";
16468
16754
  status: 400;
@@ -16470,53 +16756,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
16470
16756
  input: {};
16471
16757
  output: {
16472
16758
  success: true;
16473
- message: string;
16474
16759
  key: string;
16760
+ fileKey: string;
16475
16761
  };
16476
16762
  outputFormat: "json";
16477
- status: 201;
16478
- };
16479
- };
16480
- } & {
16481
- "/delete-folder": {
16482
- $post: {
16483
- input: {};
16484
- output: {
16485
- success: false;
16486
- error: never;
16487
- };
16488
- outputFormat: "json";
16489
- status: 400;
16490
- } | {
16491
- input: {};
16492
- output: {
16493
- success: true;
16494
- message: string;
16495
- };
16496
- outputFormat: "json";
16497
- status: 200;
16498
- };
16499
- };
16500
- } & {
16501
- "/list/:workspace": {
16502
- $get: {
16503
- input: {
16504
- param: {
16505
- workspace: string;
16506
- };
16507
- };
16508
- output: {
16509
- success: true;
16510
- files: {
16511
- key: string | undefined;
16512
- size: number | undefined;
16513
- lastModified: string | undefined;
16514
- pin: boolean;
16515
- }[];
16516
- nextToken: string | undefined;
16517
- };
16518
- outputFormat: "json";
16519
- status: 200;
16763
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16520
16764
  };
16521
16765
  };
16522
16766
  } & {
@@ -16577,15 +16821,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
16577
16821
  };
16578
16822
  outputFormat: "json";
16579
16823
  status: 404;
16580
- } | {
16581
- input: {};
16582
- output: {
16583
- success: false;
16584
- message: string;
16585
- key: string;
16586
- };
16587
- outputFormat: "json";
16588
- status: 500;
16589
16824
  } | {
16590
16825
  input: {};
16591
16826
  output: {
@@ -16598,7 +16833,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16598
16833
  };
16599
16834
  };
16600
16835
  } & {
16601
- "/upload-to-comment": {
16836
+ "/create-folder": {
16602
16837
  $post: {
16603
16838
  input: {};
16604
16839
  output: {
@@ -16611,44 +16846,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
16611
16846
  input: {};
16612
16847
  output: {
16613
16848
  success: true;
16614
- url: string;
16615
- fields: {
16616
- [x: string]: string;
16617
- };
16849
+ message: string;
16618
16850
  key: string;
16619
- maxSize: number;
16620
16851
  };
16621
16852
  outputFormat: "json";
16622
- status: import("hono/utils/http-status").ContentfulStatusCode;
16623
- };
16624
- };
16625
- } & {
16626
- "/download-from-task/:workspace/:taskId": {
16627
- $get: {
16628
- input: {
16629
- param: {
16630
- workspace: string;
16631
- } & {
16632
- taskId: string;
16633
- };
16634
- };
16635
- output: {
16636
- success: true;
16637
- files: {
16638
- key: string;
16639
- filename: string;
16640
- commentId: string;
16641
- size: number;
16642
- lastModified: string | null;
16643
- downloadUrl: string;
16644
- }[];
16645
- };
16646
- outputFormat: "json";
16647
- status: import("hono/utils/http-status").ContentfulStatusCode;
16853
+ status: 201;
16648
16854
  };
16649
16855
  };
16650
16856
  } & {
16651
- "/upload-profile-picture": {
16857
+ "/delete-folder": {
16652
16858
  $post: {
16653
16859
  input: {};
16654
16860
  output: {
@@ -16658,42 +16864,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
16658
16864
  outputFormat: "json";
16659
16865
  status: 400;
16660
16866
  } | {
16661
- input: {};
16662
- output: {
16663
- url: string;
16664
- fields: {
16665
- [x: string]: string;
16666
- };
16667
- key: string;
16668
- maxSize: number;
16669
- };
16670
- outputFormat: "json";
16671
- status: import("hono/utils/http-status").ContentfulStatusCode;
16672
- };
16673
- };
16674
- } & {
16675
- "/confirm-profile-picture": {
16676
- $post: {
16677
- input: {};
16678
- output: {
16679
- success: true;
16680
- url: string;
16681
- };
16682
- outputFormat: "json";
16683
- status: import("hono/utils/http-status").ContentfulStatusCode;
16684
- } | {
16685
- input: {};
16686
- output: {
16687
- success: false;
16688
- error: string;
16689
- };
16690
- outputFormat: "json";
16691
- status: 400;
16692
- };
16693
- };
16694
- } & {
16695
- "/delete-profile-picture": {
16696
- $post: {
16697
16867
  input: {};
16698
16868
  output: {
16699
16869
  success: true;
@@ -16701,86 +16871,28 @@ declare const routes: import("hono/hono-base").HonoBase<{
16701
16871
  };
16702
16872
  outputFormat: "json";
16703
16873
  status: import("hono/utils/http-status").ContentfulStatusCode;
16704
- } | {
16705
- input: {};
16706
- output: {
16707
- success: false;
16708
- error: string;
16709
- };
16710
- outputFormat: "json";
16711
- status: 500;
16712
16874
  };
16713
16875
  };
16714
16876
  } & {
16715
- "/upload-workspace-picture": {
16716
- $post: {
16717
- input: {};
16718
- output: {
16719
- success: false;
16720
- error: never;
16721
- };
16722
- outputFormat: "json";
16723
- status: 400;
16724
- } | {
16725
- input: {};
16726
- output: {
16727
- url: string;
16728
- fields: {
16729
- [x: string]: string;
16877
+ "/list/:workspace": {
16878
+ $get: {
16879
+ input: {
16880
+ param: {
16881
+ workspace: string;
16730
16882
  };
16731
- key: string;
16732
- maxSize: number;
16733
16883
  };
16734
- outputFormat: "json";
16735
- status: import("hono/utils/http-status").ContentfulStatusCode;
16736
- };
16737
- };
16738
- } & {
16739
- "/confirm-workspace-picture": {
16740
- $post: {
16741
- input: {};
16742
16884
  output: {
16743
16885
  success: true;
16744
- url: string;
16745
- };
16746
- outputFormat: "json";
16747
- status: import("hono/utils/http-status").ContentfulStatusCode;
16748
- } | {
16749
- input: {};
16750
- output: {
16751
- success: false;
16752
- error: string;
16753
- };
16754
- outputFormat: "json";
16755
- status: 400;
16756
- };
16757
- };
16758
- } & {
16759
- "/delete-workspace-picture": {
16760
- $post: {
16761
- input: {};
16762
- output: {
16763
- success: false;
16764
- error: never;
16765
- };
16766
- outputFormat: "json";
16767
- status: 400;
16768
- } | {
16769
- input: {};
16770
- output: {
16771
- success: true;
16772
- message: string;
16886
+ files: {
16887
+ key: string | undefined;
16888
+ size: number | undefined;
16889
+ lastModified: string | undefined;
16890
+ pin: boolean;
16891
+ }[];
16892
+ nextToken: string | undefined;
16773
16893
  };
16774
16894
  outputFormat: "json";
16775
16895
  status: import("hono/utils/http-status").ContentfulStatusCode;
16776
- } | {
16777
- input: {};
16778
- output: {
16779
- success: false;
16780
- error: string;
16781
- };
16782
- outputFormat: "json";
16783
- status: 500;
16784
16896
  };
16785
16897
  };
16786
16898
  }, "/files"> | import("hono/types").MergeSchemaPath<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,