@mestra-dev/contract 0.0.25 → 0.0.27

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 +212 -324
  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: "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.";
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).";
98
98
  },
99
99
  {
100
100
  readonly name: "Chat";
@@ -1404,104 +1404,21 @@ declare const routes: import("hono/hono-base").HonoBase<{
1404
1404
  readonly required: readonly [
1405
1405
  "filename",
1406
1406
  "contentType",
1407
- "context"
1407
+ "workspace"
1408
1408
  ];
1409
1409
  readonly properties: {
1410
1410
  readonly filename: {
1411
1411
  readonly type: "string";
1412
- readonly description: "Original file name (trimmed). Must not contain path separators or `..`.";
1412
+ readonly description: "Original file name (trimmed).";
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
- };
1428
- readonly workspace: {
1429
- readonly type: "string";
1430
- readonly format: "uuid";
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
1418
  readonly workspace: {
1474
1419
  readonly type: "string";
1475
1420
  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";
1421
+ readonly description: "Workspace identifier.";
1505
1422
  };
1506
1423
  };
1507
1424
  };
@@ -1511,8 +1428,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
1511
1428
  "url",
1512
1429
  "fields",
1513
1430
  "key",
1514
- "fileKey",
1515
- "uploadId",
1516
1431
  "maxSize"
1517
1432
  ];
1518
1433
  readonly properties: {
@@ -1529,23 +1444,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
1529
1444
  };
1530
1445
  readonly key: {
1531
1446
  readonly type: "string";
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";
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";
1534
1449
  };
1535
1450
  readonly maxSize: {
1536
1451
  readonly type: "integer";
1537
1452
  readonly description: "Maximum allowed upload size in bytes (15 MB).";
1538
1453
  readonly example: 15728640;
1539
1454
  };
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
- };
1549
1455
  };
1550
1456
  };
1551
1457
  readonly UploadToCommentRequest: {
@@ -1824,11 +1730,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
1824
1730
  readonly workspace: {
1825
1731
  readonly type: "string";
1826
1732
  readonly format: "uuid";
1827
- readonly description: "Workspace identifier. `fileKey` must be under `{workspace}/`.";
1733
+ readonly description: "Workspace identifier (used for access check).";
1828
1734
  };
1829
1735
  readonly fileKey: {
1830
1736
  readonly type: "string";
1831
- readonly description: "Full S3 object key to pin or unpin. Must start with `{workspace}/` (as returned by list or confirm).";
1737
+ readonly description: "Full S3 object key to pin or unpin (as returned by list or upload).";
1832
1738
  readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1833
1739
  };
1834
1740
  readonly pin: {
@@ -1956,34 +1862,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
1956
1862
  readonly workspace: {
1957
1863
  readonly type: "string";
1958
1864
  readonly format: "uuid";
1959
- readonly description: "Workspace identifier. `fileKey` must be under `{workspace}/`.";
1865
+ readonly description: "Workspace identifier (used for access check).";
1960
1866
  };
1961
1867
  readonly fileKey: {
1962
1868
  readonly type: "string";
1963
- readonly description: "Full S3 object key to delete. Must start with `{workspace}/` (as returned by list or confirm).";
1869
+ readonly description: "Full S3 object key to delete (as returned by list or upload).";
1964
1870
  readonly example: "550e8400-e29b-41d4-a716-446655440000/invoice-2026.pdf";
1965
1871
  };
1966
1872
  };
1967
1873
  };
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
- };
1987
1874
  readonly DeleteFileSuccess: {
1988
1875
  readonly type: "object";
1989
1876
  readonly required: readonly [
@@ -2006,28 +1893,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
2006
1893
  };
2007
1894
  };
2008
1895
  };
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
- };
2031
1896
  readonly DeleteFileFailure: {
2032
1897
  readonly type: "object";
2033
1898
  readonly required: readonly [
@@ -9795,7 +9660,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
9795
9660
  "Files"
9796
9661
  ];
9797
9662
  readonly summary: "Create presigned S3 upload";
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.";
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.";
9799
9664
  readonly security: readonly [
9800
9665
  never
9801
9666
  ];
@@ -9821,81 +9686,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
9821
9686
  };
9822
9687
  };
9823
9688
  readonly 400: {
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.";
9689
+ readonly description: "Invalid request payload or unsupported content type.";
9899
9690
  readonly content: {
9900
9691
  readonly "application/json": {
9901
9692
  readonly schema: {
@@ -10091,7 +9882,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10091
9882
  "Files"
10092
9883
  ];
10093
9884
  readonly summary: "List workspace files";
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.";
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.";
10095
9886
  readonly security: readonly [
10096
9887
  never
10097
9888
  ];
@@ -10252,7 +10043,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10252
10043
  "Files"
10253
10044
  ];
10254
10045
  readonly summary: "Pin or unpin a file";
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.";
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.";
10256
10047
  readonly security: readonly [
10257
10048
  never
10258
10049
  ];
@@ -10326,7 +10117,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10326
10117
  "Files"
10327
10118
  ];
10328
10119
  readonly summary: "Delete a file by S3 key";
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.";
10120
+ readonly description: "Deletes an S3 object by full `fileKey`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access.";
10330
10121
  readonly security: readonly [
10331
10122
  never
10332
10123
  ];
@@ -10372,11 +10163,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
10372
10163
  };
10373
10164
  };
10374
10165
  readonly 403: {
10375
- readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or fileKey is outside the workspace prefix.";
10166
+ readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
10376
10167
  readonly content: {
10377
10168
  readonly "application/json": {
10378
10169
  readonly schema: {
10379
- readonly $ref: "#/components/schemas/DeleteFileFailure";
10170
+ readonly $ref: "#/components/schemas/ErrorResponse";
10380
10171
  };
10381
10172
  };
10382
10173
  };
@@ -10478,80 +10269,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10478
10269
  };
10479
10270
  };
10480
10271
  };
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
- };
10555
10272
  readonly "/files/download-from-task/{workspace}/{taskId}": {
10556
10273
  readonly get: {
10557
10274
  readonly tags: readonly [
@@ -16721,21 +16438,18 @@ declare const routes: import("hono/hono-base").HonoBase<{
16721
16438
  input: {};
16722
16439
  output: {
16723
16440
  success: false;
16724
- error: string;
16441
+ error: never;
16725
16442
  };
16726
16443
  outputFormat: "json";
16727
16444
  status: 400;
16728
16445
  } | {
16729
16446
  input: {};
16730
16447
  output: {
16731
- success: true;
16732
16448
  url: string;
16733
16449
  fields: {
16734
16450
  [x: string]: string;
16735
16451
  };
16736
16452
  key: string;
16737
- fileKey: string;
16738
- uploadId: `${string}-${string}-${string}-${string}-${string}`;
16739
16453
  maxSize: number;
16740
16454
  };
16741
16455
  outputFormat: "json";
@@ -16743,12 +16457,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16743
16457
  };
16744
16458
  };
16745
16459
  } & {
16746
- "/confirm": {
16460
+ "/create-folder": {
16747
16461
  $post: {
16748
16462
  input: {};
16749
16463
  output: {
16750
16464
  success: false;
16751
- error: string;
16465
+ error: never;
16752
16466
  };
16753
16467
  outputFormat: "json";
16754
16468
  status: 400;
@@ -16756,11 +16470,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
16756
16470
  input: {};
16757
16471
  output: {
16758
16472
  success: true;
16473
+ message: string;
16759
16474
  key: string;
16760
- fileKey: string;
16761
16475
  };
16762
16476
  outputFormat: "json";
16763
- status: import("hono/utils/http-status").ContentfulStatusCode;
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;
16764
16520
  };
16765
16521
  };
16766
16522
  } & {
@@ -16821,6 +16577,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
16821
16577
  };
16822
16578
  outputFormat: "json";
16823
16579
  status: 404;
16580
+ } | {
16581
+ input: {};
16582
+ output: {
16583
+ success: false;
16584
+ message: string;
16585
+ key: string;
16586
+ };
16587
+ outputFormat: "json";
16588
+ status: 500;
16824
16589
  } | {
16825
16590
  input: {};
16826
16591
  output: {
@@ -16833,7 +16598,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16833
16598
  };
16834
16599
  };
16835
16600
  } & {
16836
- "/create-folder": {
16601
+ "/upload-to-comment": {
16837
16602
  $post: {
16838
16603
  input: {};
16839
16604
  output: {
@@ -16846,15 +16611,44 @@ declare const routes: import("hono/hono-base").HonoBase<{
16846
16611
  input: {};
16847
16612
  output: {
16848
16613
  success: true;
16849
- message: string;
16614
+ url: string;
16615
+ fields: {
16616
+ [x: string]: string;
16617
+ };
16850
16618
  key: string;
16619
+ maxSize: number;
16851
16620
  };
16852
16621
  outputFormat: "json";
16853
- status: 201;
16622
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16854
16623
  };
16855
16624
  };
16856
16625
  } & {
16857
- "/delete-folder": {
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;
16648
+ };
16649
+ };
16650
+ } & {
16651
+ "/upload-profile-picture": {
16858
16652
  $post: {
16859
16653
  input: {};
16860
16654
  output: {
@@ -16864,6 +16658,42 @@ declare const routes: import("hono/hono-base").HonoBase<{
16864
16658
  outputFormat: "json";
16865
16659
  status: 400;
16866
16660
  } | {
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: {
16867
16697
  input: {};
16868
16698
  output: {
16869
16699
  success: true;
@@ -16871,28 +16701,86 @@ declare const routes: import("hono/hono-base").HonoBase<{
16871
16701
  };
16872
16702
  outputFormat: "json";
16873
16703
  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;
16874
16712
  };
16875
16713
  };
16876
16714
  } & {
16877
- "/list/:workspace": {
16878
- $get: {
16879
- input: {
16880
- param: {
16881
- workspace: string;
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;
16882
16730
  };
16731
+ key: string;
16732
+ maxSize: number;
16883
16733
  };
16734
+ outputFormat: "json";
16735
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16736
+ };
16737
+ };
16738
+ } & {
16739
+ "/confirm-workspace-picture": {
16740
+ $post: {
16741
+ input: {};
16884
16742
  output: {
16885
16743
  success: true;
16886
- files: {
16887
- key: string | undefined;
16888
- size: number | undefined;
16889
- lastModified: string | undefined;
16890
- pin: boolean;
16891
- }[];
16892
- nextToken: string | undefined;
16744
+ url: string;
16893
16745
  };
16894
16746
  outputFormat: "json";
16895
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;
16773
+ };
16774
+ outputFormat: "json";
16775
+ 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;
16896
16784
  };
16897
16785
  };
16898
16786
  }, "/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.25",
3
+ "version": "0.0.27",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,