@mestra-dev/contract 0.0.210 → 0.0.212

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 +325 -11
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -77,7 +77,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
77
77
  },
78
78
  {
79
79
  readonly name: "Tags";
80
- readonly description: "Workspace tag CRUD and assignment to tasks or customers; list/create accept crm::tasks or crm::customers access; update/delete require crm::general write.";
80
+ readonly description: "Workspace tag CRUD and assignment to tasks, real-estate customers, or services; list/create accept crm::tasks, crm::customers, or crm::services access; update/delete require crm::general write.";
81
81
  },
82
82
  {
83
83
  readonly name: "Failure Reasons";
@@ -1370,6 +1370,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
1370
1370
  readonly nullable: true;
1371
1371
  readonly description: "Total number of comments attached to the task.";
1372
1372
  };
1373
+ readonly tags: {
1374
+ readonly type: "array";
1375
+ readonly items: {
1376
+ readonly $ref: "#/components/schemas/TagListItem";
1377
+ };
1378
+ readonly description: "Tags assigned to the task (id, name, description).";
1379
+ };
1373
1380
  };
1374
1381
  };
1375
1382
  readonly TaskPhase: {
@@ -1487,9 +1494,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
1487
1494
  readonly TagListItem: {
1488
1495
  readonly type: "object";
1489
1496
  readonly required: readonly [
1497
+ "id",
1490
1498
  "name"
1491
1499
  ];
1492
1500
  readonly properties: {
1501
+ readonly id: {
1502
+ readonly type: "string";
1503
+ readonly format: "uuid";
1504
+ readonly description: "Tag identifier.";
1505
+ };
1493
1506
  readonly name: {
1494
1507
  readonly type: "string";
1495
1508
  readonly description: "Tag label.";
@@ -1500,7 +1513,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
1500
1513
  readonly description: "Tag description when set.";
1501
1514
  };
1502
1515
  };
1503
- readonly description: "Shape returned by list-by-workspace (name and description only).";
1516
+ readonly description: "Tag fields returned on list endpoints (id, name, description).";
1504
1517
  };
1505
1518
  readonly CreateTagSuccess: {
1506
1519
  readonly type: "object";
@@ -1556,7 +1569,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
1556
1569
  readonly items: {
1557
1570
  readonly $ref: "#/components/schemas/TagListItem";
1558
1571
  };
1559
- readonly description: "Tags in the workspace (name and description fields).";
1572
+ readonly description: "Tags in the workspace (id, name, and description).";
1560
1573
  };
1561
1574
  };
1562
1575
  };
@@ -3869,6 +3882,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
3869
3882
  readonly format: "date-time";
3870
3883
  readonly nullable: true;
3871
3884
  };
3885
+ readonly tags: {
3886
+ readonly type: "array";
3887
+ readonly items: {
3888
+ readonly $ref: "#/components/schemas/TagListItem";
3889
+ };
3890
+ readonly description: "Tags assigned to the customer (id, name, description).";
3891
+ };
3872
3892
  };
3873
3893
  };
3874
3894
  readonly CreateCustomerSuccess: {
@@ -4187,6 +4207,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
4187
4207
  readonly format: "date-time";
4188
4208
  readonly nullable: true;
4189
4209
  };
4210
+ readonly tags: {
4211
+ readonly type: "array";
4212
+ readonly items: {
4213
+ readonly $ref: "#/components/schemas/TagListItem";
4214
+ };
4215
+ readonly description: "Tags assigned to the service (id, name, description).";
4216
+ };
4190
4217
  };
4191
4218
  };
4192
4219
  readonly CreateServiceSuccess: {
@@ -16104,7 +16131,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16104
16131
  "Tags"
16105
16132
  ];
16106
16133
  readonly summary: "List tags by workspace";
16107
- readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks or crm::customers.";
16134
+ readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks, crm::customers, or crm::services.";
16108
16135
  readonly security: readonly [
16109
16136
  never
16110
16137
  ];
@@ -16142,7 +16169,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16142
16169
  };
16143
16170
  };
16144
16171
  readonly 403: {
16145
- readonly description: "Forbidden - User lacks workspace access, or user lacks read access to both crm::tasks and crm::customers.";
16172
+ readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::tasks, crm::customers, and crm::services.";
16146
16173
  readonly content: {
16147
16174
  readonly "application/json": {
16148
16175
  readonly schema: {
@@ -16160,7 +16187,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16160
16187
  "Tags"
16161
16188
  ];
16162
16189
  readonly summary: "Create a tag";
16163
- readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::customers.";
16190
+ readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks, crm::customers, or crm::services.";
16164
16191
  readonly security: readonly [
16165
16192
  never
16166
16193
  ];
@@ -16225,7 +16252,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16225
16252
  };
16226
16253
  };
16227
16254
  readonly 403: {
16228
- readonly description: "Forbidden - User lacks workspace access, or user lacks write access to both crm::tasks and crm::customers.";
16255
+ readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::tasks, crm::customers, and crm::services.";
16229
16256
  readonly content: {
16230
16257
  readonly "application/json": {
16231
16258
  readonly schema: {
@@ -16331,7 +16358,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16331
16358
  "Tags"
16332
16359
  ];
16333
16360
  readonly summary: "Delete a tag";
16334
- readonly description: "Removes the tag from all linked tasks and customers, then deletes it from the workspace. Requires workspace access and write access to crm::general.";
16361
+ readonly description: "Removes the tag from all linked tasks, customers, and services, then deletes it from the workspace. Requires workspace access and write access to crm::general.";
16335
16362
  readonly security: readonly [
16336
16363
  never
16337
16364
  ];
@@ -16499,7 +16526,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16499
16526
  };
16500
16527
  };
16501
16528
  readonly 404: {
16502
- readonly description: "Tag not found.";
16529
+ readonly description: "Tag or task not found.";
16503
16530
  readonly content: {
16504
16531
  readonly "application/json": {
16505
16532
  readonly schema: {
@@ -16703,6 +16730,198 @@ declare const routes: import("hono/hono-base").HonoBase<{
16703
16730
  };
16704
16731
  };
16705
16732
  };
16733
+ readonly "/tags/assign-to-service": {
16734
+ readonly post: {
16735
+ readonly tags: readonly [
16736
+ "Tags"
16737
+ ];
16738
+ readonly summary: "Assign a tag to a service";
16739
+ readonly description: "Links an existing workspace tag to a category-specific service. Real-estate workspaces resolve the service from service_real_estates. Requires workspace access and write access to crm::services resource.";
16740
+ readonly security: readonly [
16741
+ never
16742
+ ];
16743
+ readonly requestBody: {
16744
+ readonly required: true;
16745
+ readonly content: {
16746
+ readonly "application/json": {
16747
+ readonly schema: {
16748
+ readonly type: "object";
16749
+ readonly required: readonly [
16750
+ "workspace",
16751
+ "serviceId",
16752
+ "tagId"
16753
+ ];
16754
+ readonly properties: {
16755
+ readonly workspace: {
16756
+ readonly type: "string";
16757
+ readonly format: "uuid";
16758
+ readonly description: "Workspace identifier.";
16759
+ };
16760
+ readonly serviceId: {
16761
+ readonly type: "string";
16762
+ readonly format: "uuid";
16763
+ readonly description: "Service identifier.";
16764
+ };
16765
+ readonly tagId: {
16766
+ readonly type: "string";
16767
+ readonly format: "uuid";
16768
+ readonly description: "Tag identifier.";
16769
+ };
16770
+ };
16771
+ };
16772
+ };
16773
+ };
16774
+ };
16775
+ readonly responses: {
16776
+ readonly 200: {
16777
+ readonly description: "Tag assigned to service successfully.";
16778
+ readonly content: {
16779
+ readonly "application/json": {
16780
+ readonly schema: {
16781
+ readonly $ref: "#/components/schemas/SimpleSuccess";
16782
+ };
16783
+ };
16784
+ };
16785
+ };
16786
+ readonly 400: {
16787
+ readonly description: "Invalid request payload or unsupported workspace category.";
16788
+ readonly content: {
16789
+ readonly "application/json": {
16790
+ readonly schema: {
16791
+ readonly $ref: "#/components/schemas/ErrorResponse";
16792
+ };
16793
+ };
16794
+ };
16795
+ };
16796
+ readonly 401: {
16797
+ readonly description: "Unauthorized - Missing or invalid access token.";
16798
+ readonly content: {
16799
+ readonly "application/json": {
16800
+ readonly schema: {
16801
+ readonly $ref: "#/components/schemas/ErrorResponse";
16802
+ };
16803
+ };
16804
+ };
16805
+ };
16806
+ readonly 403: {
16807
+ readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::services resource.";
16808
+ readonly content: {
16809
+ readonly "application/json": {
16810
+ readonly schema: {
16811
+ readonly $ref: "#/components/schemas/ErrorResponse";
16812
+ };
16813
+ };
16814
+ };
16815
+ };
16816
+ readonly 404: {
16817
+ readonly description: "Workspace, tag, or service not found.";
16818
+ readonly content: {
16819
+ readonly "application/json": {
16820
+ readonly schema: {
16821
+ readonly $ref: "#/components/schemas/ErrorResponse";
16822
+ };
16823
+ };
16824
+ };
16825
+ };
16826
+ };
16827
+ };
16828
+ };
16829
+ readonly "/tags/remove-from-service": {
16830
+ readonly post: {
16831
+ readonly tags: readonly [
16832
+ "Tags"
16833
+ ];
16834
+ readonly summary: "Remove a tag from a service";
16835
+ readonly description: "Unlinks a tag from a category-specific service. Requires workspace access and write access to crm::services resource.";
16836
+ readonly security: readonly [
16837
+ never
16838
+ ];
16839
+ readonly requestBody: {
16840
+ readonly required: true;
16841
+ readonly content: {
16842
+ readonly "application/json": {
16843
+ readonly schema: {
16844
+ readonly type: "object";
16845
+ readonly required: readonly [
16846
+ "workspace",
16847
+ "serviceId",
16848
+ "tagId"
16849
+ ];
16850
+ readonly properties: {
16851
+ readonly workspace: {
16852
+ readonly type: "string";
16853
+ readonly format: "uuid";
16854
+ readonly description: "Workspace identifier.";
16855
+ };
16856
+ readonly serviceId: {
16857
+ readonly type: "string";
16858
+ readonly format: "uuid";
16859
+ readonly description: "Service identifier.";
16860
+ };
16861
+ readonly tagId: {
16862
+ readonly type: "string";
16863
+ readonly format: "uuid";
16864
+ readonly description: "Tag identifier.";
16865
+ };
16866
+ };
16867
+ };
16868
+ };
16869
+ };
16870
+ };
16871
+ readonly responses: {
16872
+ readonly 200: {
16873
+ readonly description: "Tag removed from service successfully.";
16874
+ readonly content: {
16875
+ readonly "application/json": {
16876
+ readonly schema: {
16877
+ readonly $ref: "#/components/schemas/SimpleSuccess";
16878
+ };
16879
+ };
16880
+ };
16881
+ };
16882
+ readonly 400: {
16883
+ readonly description: "Invalid request payload or unsupported workspace category.";
16884
+ readonly content: {
16885
+ readonly "application/json": {
16886
+ readonly schema: {
16887
+ readonly $ref: "#/components/schemas/ErrorResponse";
16888
+ };
16889
+ };
16890
+ };
16891
+ };
16892
+ readonly 401: {
16893
+ readonly description: "Unauthorized - Missing or invalid access token.";
16894
+ readonly content: {
16895
+ readonly "application/json": {
16896
+ readonly schema: {
16897
+ readonly $ref: "#/components/schemas/ErrorResponse";
16898
+ };
16899
+ };
16900
+ };
16901
+ };
16902
+ readonly 403: {
16903
+ readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::services resource.";
16904
+ readonly content: {
16905
+ readonly "application/json": {
16906
+ readonly schema: {
16907
+ readonly $ref: "#/components/schemas/ErrorResponse";
16908
+ };
16909
+ };
16910
+ };
16911
+ };
16912
+ readonly 404: {
16913
+ readonly description: "Workspace, tag, or service not found.";
16914
+ readonly content: {
16915
+ readonly "application/json": {
16916
+ readonly schema: {
16917
+ readonly $ref: "#/components/schemas/ErrorResponse";
16918
+ };
16919
+ };
16920
+ };
16921
+ };
16922
+ };
16923
+ };
16924
+ };
16706
16925
  readonly "/tags/remove-from-task": {
16707
16926
  readonly post: {
16708
16927
  readonly tags: readonly [
@@ -16787,7 +17006,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16787
17006
  };
16788
17007
  };
16789
17008
  readonly 404: {
16790
- readonly description: "Tag not found.";
17009
+ readonly description: "Tag or task not found.";
16791
17010
  readonly content: {
16792
17011
  readonly "application/json": {
16793
17012
  readonly schema: {
@@ -22654,6 +22873,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
22654
22873
  workspaceId: string;
22655
22874
  created_by: string;
22656
22875
  comments_count: number;
22876
+ tags: {
22877
+ id: string;
22878
+ name: string;
22879
+ description: string | null;
22880
+ }[];
22657
22881
  }[] | undefined;
22658
22882
  collaborators: {
22659
22883
  id: string;
@@ -22720,10 +22944,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
22720
22944
  phaseName: string | null;
22721
22945
  phaseSortOrder: number | null;
22722
22946
  priority: string | null;
22947
+ created_at: string;
22723
22948
  workspaceId: string;
22724
22949
  created_by: string;
22725
- created_at: string;
22726
22950
  comments_count: number;
22951
+ tags: {
22952
+ id: string;
22953
+ name: string;
22954
+ description: string | null;
22955
+ }[];
22727
22956
  };
22728
22957
  collaborators: {
22729
22958
  id: string;
@@ -22732,6 +22961,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
22732
22961
  profilePicture: string | null;
22733
22962
  }[];
22734
22963
  customer: {
22964
+ tags: {
22965
+ id: string;
22966
+ name: string;
22967
+ description: string | null;
22968
+ }[];
22735
22969
  updated_at: string | null;
22736
22970
  deleted_at: string | null;
22737
22971
  verified_at: string | null;
@@ -23349,6 +23583,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
23349
23583
  lastName: string | null;
23350
23584
  profilePicture: string | null;
23351
23585
  } | null;
23586
+ tags: {
23587
+ id: string;
23588
+ name: string;
23589
+ description: string | null;
23590
+ }[];
23352
23591
  updated_at: string | null;
23353
23592
  deleted_at: string | null;
23354
23593
  verified_at: string | null;
@@ -23463,6 +23702,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
23463
23702
  lastName: string | null;
23464
23703
  profilePicture: string | null;
23465
23704
  } | null;
23705
+ tags: {
23706
+ id: string;
23707
+ name: string;
23708
+ description: string | null;
23709
+ }[];
23466
23710
  updated_at: string | null;
23467
23711
  deleted_at: string | null;
23468
23712
  verified_at: string | null;
@@ -23667,6 +23911,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
23667
23911
  lastName: string | null;
23668
23912
  profilePicture: string | null;
23669
23913
  } | null;
23914
+ tags: {
23915
+ id: string;
23916
+ name: string;
23917
+ description: string | null;
23918
+ }[];
23670
23919
  updated_at: string | null;
23671
23920
  deleted_at: string | null;
23672
23921
  verified_at: string | null;
@@ -23768,6 +24017,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
23768
24017
  lastName: string | null;
23769
24018
  profilePicture: string | null;
23770
24019
  } | null;
24020
+ tags: {
24021
+ id: string;
24022
+ name: string;
24023
+ description: string | null;
24024
+ }[];
23771
24025
  updated_at: string | null;
23772
24026
  deleted_at: string | null;
23773
24027
  verified_at: string | null;
@@ -23979,6 +24233,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
23979
24233
  workspaceId: string;
23980
24234
  created_by: string;
23981
24235
  comments_count: number;
24236
+ tags: {
24237
+ id: string;
24238
+ name: string;
24239
+ description: string | null;
24240
+ }[];
23982
24241
  }[] | null;
23983
24242
  };
23984
24243
  outputFormat: "json";
@@ -24736,6 +24995,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
24736
24995
  output: {
24737
24996
  success: true;
24738
24997
  tags: {
24998
+ id: string;
24739
24999
  name: string;
24740
25000
  description: string | null;
24741
25001
  }[];
@@ -24916,6 +25176,60 @@ declare const routes: import("hono/hono-base").HonoBase<{
24916
25176
  status: 200;
24917
25177
  };
24918
25178
  };
25179
+ } & {
25180
+ "/assign-to-service": {
25181
+ $post: {
25182
+ input: {};
25183
+ output: {
25184
+ success: false;
25185
+ error: string;
25186
+ };
25187
+ outputFormat: "json";
25188
+ status: 404;
25189
+ } | {
25190
+ input: {};
25191
+ output: {
25192
+ success: false;
25193
+ error: string;
25194
+ };
25195
+ outputFormat: "json";
25196
+ status: 400;
25197
+ } | {
25198
+ input: {};
25199
+ output: {
25200
+ success: true;
25201
+ };
25202
+ outputFormat: "json";
25203
+ status: 200;
25204
+ };
25205
+ };
25206
+ } & {
25207
+ "/remove-from-service": {
25208
+ $post: {
25209
+ input: {};
25210
+ output: {
25211
+ success: false;
25212
+ error: string;
25213
+ };
25214
+ outputFormat: "json";
25215
+ status: 404;
25216
+ } | {
25217
+ input: {};
25218
+ output: {
25219
+ success: false;
25220
+ error: string;
25221
+ };
25222
+ outputFormat: "json";
25223
+ status: 400;
25224
+ } | {
25225
+ input: {};
25226
+ output: {
25227
+ success: true;
25228
+ };
25229
+ outputFormat: "json";
25230
+ status: 200;
25231
+ };
25232
+ };
24919
25233
  } & {
24920
25234
  "/remove-from-task": {
24921
25235
  $post: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.210",
3
+ "version": "0.0.212",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,