@mestra-dev/contract 0.0.177 → 0.0.179

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 +168 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10301,7 +10301,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10301
10301
  "Comments"
10302
10302
  ];
10303
10303
  readonly summary: "Edit a comment";
10304
- readonly description: "Updates the content of an existing comment on a task in the specified workspace. Requires workspace access and write access to crm::tasks resource.";
10304
+ readonly description: "Updates a comment body and records its prior body, replacement body, editor, and time. Collaborators with write access to crm::tasks can edit any comment. A read-only collaborator can edit only their own comment when assigned to that task.";
10305
10305
  readonly security: readonly [
10306
10306
  never
10307
10307
  ];
@@ -10374,7 +10374,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10374
10374
  };
10375
10375
  };
10376
10376
  readonly 403: {
10377
- readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::tasks resource.";
10377
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access or read access to crm::tasks resource, or the collaborator is not assigned to the task or is editing another user's comment.";
10378
10378
  readonly content: {
10379
10379
  readonly "application/json": {
10380
10380
  readonly schema: {
@@ -10396,6 +10396,116 @@ declare const routes: import("hono/hono-base").HonoBase<{
10396
10396
  };
10397
10397
  };
10398
10398
  };
10399
+ readonly "/comments/history/{workspace}/{taskId}/{commentId}": {
10400
+ readonly get: {
10401
+ readonly tags: readonly [
10402
+ "Comments"
10403
+ ];
10404
+ readonly summary: "List a comment's edit history";
10405
+ readonly description: "Returns each recorded change to a comment body, including its prior and replacement body, editor, and timestamp. Requires workspace access and read access to crm::tasks resource.";
10406
+ readonly security: readonly [
10407
+ never
10408
+ ];
10409
+ readonly parameters: readonly [
10410
+ {
10411
+ readonly name: "workspace";
10412
+ readonly in: "path";
10413
+ readonly required: true;
10414
+ readonly schema: {
10415
+ readonly type: "string";
10416
+ readonly format: "uuid";
10417
+ };
10418
+ readonly description: "Workspace identifier.";
10419
+ },
10420
+ {
10421
+ readonly name: "taskId";
10422
+ readonly in: "path";
10423
+ readonly required: true;
10424
+ readonly schema: {
10425
+ readonly type: "string";
10426
+ readonly format: "uuid";
10427
+ };
10428
+ readonly description: "Task identifier.";
10429
+ },
10430
+ {
10431
+ readonly name: "commentId";
10432
+ readonly in: "path";
10433
+ readonly required: true;
10434
+ readonly schema: {
10435
+ readonly type: "string";
10436
+ readonly format: "uuid";
10437
+ };
10438
+ readonly description: "Comment identifier.";
10439
+ }
10440
+ ];
10441
+ readonly responses: {
10442
+ readonly 200: {
10443
+ readonly description: "Comment edit history.";
10444
+ readonly content: {
10445
+ readonly "application/json": {
10446
+ readonly schema: {
10447
+ readonly type: "object";
10448
+ readonly required: readonly [
10449
+ "success",
10450
+ "history"
10451
+ ];
10452
+ readonly properties: {
10453
+ readonly success: {
10454
+ readonly type: "boolean";
10455
+ readonly example: true;
10456
+ };
10457
+ readonly history: {
10458
+ readonly type: "array";
10459
+ readonly items: any;
10460
+ };
10461
+ };
10462
+ };
10463
+ };
10464
+ };
10465
+ };
10466
+ readonly 400: {
10467
+ readonly description: "Invalid workspace id.";
10468
+ readonly content: {
10469
+ readonly "application/json": {
10470
+ readonly schema: {
10471
+ readonly $ref: "#/components/schemas/ErrorResponse";
10472
+ };
10473
+ };
10474
+ };
10475
+ };
10476
+ readonly 401: {
10477
+ readonly description: "Unauthorized - Missing or invalid access token.";
10478
+ readonly content: {
10479
+ readonly "application/json": {
10480
+ readonly schema: {
10481
+ readonly $ref: "#/components/schemas/ErrorResponse";
10482
+ };
10483
+ };
10484
+ };
10485
+ };
10486
+ readonly 403: {
10487
+ readonly description: "Forbidden - User lacks workspace or task read access.";
10488
+ readonly content: {
10489
+ readonly "application/json": {
10490
+ readonly schema: {
10491
+ readonly $ref: "#/components/schemas/ErrorResponse";
10492
+ };
10493
+ };
10494
+ };
10495
+ };
10496
+ readonly 404: {
10497
+ readonly description: "Task or comment not found.";
10498
+ readonly content: {
10499
+ readonly "application/json": {
10500
+ readonly schema: {
10501
+ readonly $ref: "#/components/schemas/ErrorResponse";
10502
+ };
10503
+ };
10504
+ };
10505
+ };
10506
+ };
10507
+ };
10508
+ };
10399
10509
  readonly "/event/stream": {
10400
10510
  readonly get: {
10401
10511
  readonly tags: readonly [
@@ -18744,8 +18854,64 @@ declare const routes: import("hono/hono-base").HonoBase<{
18744
18854
  status: 404;
18745
18855
  } | {
18746
18856
  input: {};
18857
+ output: {
18858
+ success: false;
18859
+ error: string;
18860
+ };
18861
+ outputFormat: "json";
18862
+ status: 403;
18863
+ } | {
18864
+ input: {};
18865
+ output: {
18866
+ success: true;
18867
+ };
18868
+ outputFormat: "json";
18869
+ status: 200;
18870
+ };
18871
+ };
18872
+ } & {
18873
+ "/history/:workspace/:taskId/:commentId": {
18874
+ $get: {
18875
+ input: {
18876
+ param: {
18877
+ workspace: string;
18878
+ } & {
18879
+ taskId: string;
18880
+ } & {
18881
+ commentId: string;
18882
+ };
18883
+ };
18884
+ output: {
18885
+ success: false;
18886
+ error: string;
18887
+ };
18888
+ outputFormat: "json";
18889
+ status: 404;
18890
+ } | {
18891
+ input: {
18892
+ param: {
18893
+ workspace: string;
18894
+ } & {
18895
+ taskId: string;
18896
+ } & {
18897
+ commentId: string;
18898
+ };
18899
+ };
18747
18900
  output: {
18748
18901
  success: true;
18902
+ history: {
18903
+ editorFirstName: string | null;
18904
+ editorLastName: string | null;
18905
+ editorProfilePicture: string | null;
18906
+ id: string;
18907
+ commentId: string;
18908
+ taskId: string;
18909
+ workspaceId: string;
18910
+ previousContent: string;
18911
+ content: string;
18912
+ editedBy: string;
18913
+ createdAt: string;
18914
+ }[];
18749
18915
  };
18750
18916
  outputFormat: "json";
18751
18917
  status: 200;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.177",
3
+ "version": "0.0.179",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,