@mestra-dev/contract 0.0.161 → 0.0.163

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 +742 -61
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -27,7 +27,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
27
27
  readonly info: {
28
28
  readonly title: "Auth Service API";
29
29
  readonly version: "1.5.12";
30
- readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, CInvoices, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
30
+ readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, CInvoices, Customer History, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
31
31
  };
32
32
  readonly servers: readonly [
33
33
  {
@@ -100,6 +100,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
100
100
  readonly name: "CInvoices";
101
101
  readonly description: "Customer invoice management for real-estate workspaces. Requires workspace access and crm::customers access. Seller billing, customer, and service must belong to the workspace.";
102
102
  },
103
+ {
104
+ readonly name: "Customer History";
105
+ readonly description: "Customer service-history CRUD for real-estate workspaces. Requires workspace access and crm::customers access. Customer and service must belong to the workspace.";
106
+ },
103
107
  {
104
108
  readonly name: "Files";
105
109
  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, service file upload/confirm/delete, list service files with download URLs, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), storage usage, 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; service files require crm::services write/read.";
@@ -4251,6 +4255,123 @@ declare const routes: import("hono/hono-base").HonoBase<{
4251
4255
  };
4252
4256
  };
4253
4257
  };
4258
+ readonly CHistory: {
4259
+ readonly type: "object";
4260
+ readonly required: readonly [
4261
+ "id",
4262
+ "workspaceId",
4263
+ "customerId",
4264
+ "serviceId",
4265
+ "date",
4266
+ "created_by"
4267
+ ];
4268
+ readonly properties: {
4269
+ readonly id: {
4270
+ readonly type: "string";
4271
+ readonly format: "uuid";
4272
+ };
4273
+ readonly workspaceId: {
4274
+ readonly type: "string";
4275
+ readonly format: "uuid";
4276
+ };
4277
+ readonly customerId: {
4278
+ readonly type: "string";
4279
+ readonly format: "uuid";
4280
+ readonly description: "Real-estate customer identifier.";
4281
+ };
4282
+ readonly serviceId: {
4283
+ readonly type: "string";
4284
+ readonly format: "uuid";
4285
+ readonly description: "Real-estate service identifier.";
4286
+ };
4287
+ readonly notes: {
4288
+ readonly type: "string";
4289
+ readonly nullable: true;
4290
+ readonly maxLength: 256;
4291
+ };
4292
+ readonly date: {
4293
+ readonly type: "string";
4294
+ readonly format: "date-time";
4295
+ };
4296
+ readonly created_by: {
4297
+ readonly type: "string";
4298
+ readonly format: "uuid";
4299
+ };
4300
+ readonly created_at: {
4301
+ readonly type: "string";
4302
+ readonly format: "date-time";
4303
+ readonly nullable: true;
4304
+ };
4305
+ readonly updated_at: {
4306
+ readonly type: "string";
4307
+ readonly format: "date-time";
4308
+ readonly nullable: true;
4309
+ };
4310
+ readonly deleted_at: {
4311
+ readonly type: "string";
4312
+ readonly format: "date-time";
4313
+ readonly nullable: true;
4314
+ };
4315
+ };
4316
+ };
4317
+ readonly CreateCHistorySuccess: {
4318
+ readonly type: "object";
4319
+ readonly required: readonly [
4320
+ "success",
4321
+ "history"
4322
+ ];
4323
+ readonly properties: {
4324
+ readonly success: {
4325
+ readonly type: "boolean";
4326
+ readonly const: true;
4327
+ };
4328
+ readonly history: {
4329
+ readonly type: "array";
4330
+ readonly items: {
4331
+ readonly $ref: "#/components/schemas/CHistory";
4332
+ };
4333
+ readonly description: "Created history entry returned from the insert.";
4334
+ };
4335
+ };
4336
+ };
4337
+ readonly ListCHistorySuccess: {
4338
+ readonly type: "object";
4339
+ readonly required: readonly [
4340
+ "success",
4341
+ "history"
4342
+ ];
4343
+ readonly properties: {
4344
+ readonly success: {
4345
+ readonly type: "boolean";
4346
+ readonly const: true;
4347
+ };
4348
+ readonly history: {
4349
+ readonly type: "array";
4350
+ readonly items: {
4351
+ readonly $ref: "#/components/schemas/CHistory";
4352
+ };
4353
+ };
4354
+ };
4355
+ };
4356
+ readonly UpdateCHistorySuccess: {
4357
+ readonly type: "object";
4358
+ readonly required: readonly [
4359
+ "success",
4360
+ "history"
4361
+ ];
4362
+ readonly properties: {
4363
+ readonly success: {
4364
+ readonly type: "boolean";
4365
+ readonly const: true;
4366
+ };
4367
+ readonly history: {
4368
+ readonly type: "array";
4369
+ readonly items: {
4370
+ readonly $ref: "#/components/schemas/CHistory";
4371
+ };
4372
+ };
4373
+ };
4374
+ };
4254
4375
  readonly BillingInterval: {
4255
4376
  readonly type: "string";
4256
4377
  readonly enum: readonly [
@@ -13093,35 +13214,73 @@ declare const routes: import("hono/hono-base").HonoBase<{
13093
13214
  };
13094
13215
  };
13095
13216
  };
13096
- readonly "/tags/list/{workspace}": {
13097
- readonly get: {
13217
+ readonly "/chistory/create": {
13218
+ readonly post: {
13098
13219
  readonly tags: readonly [
13099
- "Tags"
13220
+ "Customer History"
13100
13221
  ];
13101
- readonly summary: "List tags by workspace";
13102
- readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks or crm::customers.";
13222
+ readonly summary: "Create a customer history entry";
13223
+ readonly description: "Records a service-history entry for a real-estate customer. The customer and service must exist in the specified workspace. created_by is taken from the access token. Requires workspace access and write access to crm::customers.";
13103
13224
  readonly security: readonly [
13104
13225
  never
13105
13226
  ];
13106
- readonly parameters: readonly [
13107
- {
13108
- readonly name: "workspace";
13109
- readonly in: "path";
13110
- readonly required: true;
13111
- readonly schema: {
13112
- readonly type: "string";
13113
- readonly format: "uuid";
13227
+ readonly requestBody: {
13228
+ readonly required: true;
13229
+ readonly content: {
13230
+ readonly "application/json": {
13231
+ readonly schema: {
13232
+ readonly type: "object";
13233
+ readonly required: readonly [
13234
+ "workspace",
13235
+ "customerId",
13236
+ "serviceId",
13237
+ "date"
13238
+ ];
13239
+ readonly properties: {
13240
+ readonly workspace: {
13241
+ readonly type: "string";
13242
+ readonly format: "uuid";
13243
+ };
13244
+ readonly customerId: {
13245
+ readonly type: "string";
13246
+ readonly format: "uuid";
13247
+ readonly description: "Real-estate customer identifier.";
13248
+ };
13249
+ readonly serviceId: {
13250
+ readonly type: "string";
13251
+ readonly format: "uuid";
13252
+ readonly description: "Real-estate service identifier.";
13253
+ };
13254
+ readonly notes: {
13255
+ readonly type: "string";
13256
+ readonly maxLength: 256;
13257
+ };
13258
+ readonly date: {
13259
+ readonly type: "string";
13260
+ readonly format: "date-time";
13261
+ };
13262
+ };
13263
+ };
13114
13264
  };
13115
- readonly description: "Workspace identifier.";
13116
- }
13117
- ];
13265
+ };
13266
+ };
13118
13267
  readonly responses: {
13119
- readonly 200: {
13120
- readonly description: "Tags fetched successfully.";
13268
+ readonly 201: {
13269
+ readonly description: "History entry created successfully.";
13121
13270
  readonly content: {
13122
13271
  readonly "application/json": {
13123
13272
  readonly schema: {
13124
- readonly $ref: "#/components/schemas/ListTagsSuccess";
13273
+ readonly $ref: "#/components/schemas/CreateCHistorySuccess";
13274
+ };
13275
+ };
13276
+ };
13277
+ };
13278
+ readonly 400: {
13279
+ readonly description: "Invalid request payload or unsupported workspace category.";
13280
+ readonly content: {
13281
+ readonly "application/json": {
13282
+ readonly schema: {
13283
+ readonly $ref: "#/components/schemas/ErrorResponse";
13125
13284
  };
13126
13285
  };
13127
13286
  };
@@ -13137,7 +13296,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
13137
13296
  };
13138
13297
  };
13139
13298
  readonly 403: {
13140
- readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to both crm::tasks and crm::customers.";
13299
+ readonly description: "Forbidden - User lacks workspace access or write access to crm::customers.";
13300
+ readonly content: {
13301
+ readonly "application/json": {
13302
+ readonly schema: {
13303
+ readonly $ref: "#/components/schemas/ErrorResponse";
13304
+ };
13305
+ };
13306
+ };
13307
+ };
13308
+ readonly 404: {
13309
+ readonly description: "Workspace, customer, or service not found.";
13141
13310
  readonly content: {
13142
13311
  readonly "application/json": {
13143
13312
  readonly schema: {
@@ -13149,58 +13318,51 @@ declare const routes: import("hono/hono-base").HonoBase<{
13149
13318
  };
13150
13319
  };
13151
13320
  };
13152
- readonly "/tags/create": {
13153
- readonly post: {
13321
+ readonly "/chistory/list/{workspace}/{customerId}": {
13322
+ readonly get: {
13154
13323
  readonly tags: readonly [
13155
- "Tags"
13324
+ "Customer History"
13156
13325
  ];
13157
- readonly summary: "Create a tag";
13158
- readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::customers.";
13326
+ readonly summary: "List a customer's service history";
13327
+ readonly description: "Returns all service-history entries for a real-estate customer in the specified workspace. Requires workspace access and read access to crm::customers.";
13159
13328
  readonly security: readonly [
13160
13329
  never
13161
13330
  ];
13162
- readonly requestBody: {
13163
- readonly required: true;
13164
- readonly content: {
13165
- readonly "application/json": {
13166
- readonly schema: {
13167
- readonly type: "object";
13168
- readonly required: readonly [
13169
- "workspace",
13170
- "name"
13171
- ];
13172
- readonly properties: {
13173
- readonly workspace: {
13174
- readonly type: "string";
13175
- readonly format: "uuid";
13176
- readonly description: "Workspace identifier.";
13177
- };
13178
- readonly name: {
13179
- readonly type: "string";
13180
- readonly description: "Tag label.";
13181
- };
13182
- readonly description: {
13183
- readonly type: "string";
13184
- readonly description: "Optional tag description.";
13185
- };
13186
- };
13187
- };
13331
+ readonly parameters: readonly [
13332
+ {
13333
+ readonly name: "workspace";
13334
+ readonly in: "path";
13335
+ readonly required: true;
13336
+ readonly schema: {
13337
+ readonly type: "string";
13338
+ readonly format: "uuid";
13188
13339
  };
13189
- };
13190
- };
13340
+ readonly description: "Workspace identifier.";
13341
+ },
13342
+ {
13343
+ readonly name: "customerId";
13344
+ readonly in: "path";
13345
+ readonly required: true;
13346
+ readonly schema: {
13347
+ readonly type: "string";
13348
+ readonly format: "uuid";
13349
+ };
13350
+ readonly description: "Real-estate customer identifier.";
13351
+ }
13352
+ ];
13191
13353
  readonly responses: {
13192
- readonly 201: {
13193
- readonly description: "Tag created successfully.";
13354
+ readonly 200: {
13355
+ readonly description: "History entries fetched successfully.";
13194
13356
  readonly content: {
13195
13357
  readonly "application/json": {
13196
13358
  readonly schema: {
13197
- readonly $ref: "#/components/schemas/CreateTagSuccess";
13359
+ readonly $ref: "#/components/schemas/ListCHistorySuccess";
13198
13360
  };
13199
13361
  };
13200
13362
  };
13201
13363
  };
13202
13364
  readonly 400: {
13203
- readonly description: "Invalid request payload.";
13365
+ readonly description: "Unsupported workspace category.";
13204
13366
  readonly content: {
13205
13367
  readonly "application/json": {
13206
13368
  readonly schema: {
@@ -13220,7 +13382,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
13220
13382
  };
13221
13383
  };
13222
13384
  readonly 403: {
13223
- readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to both crm::tasks and crm::customers.";
13385
+ readonly description: "Forbidden - User lacks workspace access or read access to crm::customers.";
13386
+ readonly content: {
13387
+ readonly "application/json": {
13388
+ readonly schema: {
13389
+ readonly $ref: "#/components/schemas/ErrorResponse";
13390
+ };
13391
+ };
13392
+ };
13393
+ };
13394
+ readonly 404: {
13395
+ readonly description: "Workspace or customer not found.";
13224
13396
  readonly content: {
13225
13397
  readonly "application/json": {
13226
13398
  readonly schema: {
@@ -13232,10 +13404,345 @@ declare const routes: import("hono/hono-base").HonoBase<{
13232
13404
  };
13233
13405
  };
13234
13406
  };
13235
- readonly "/tags/update": {
13407
+ readonly "/chistory/update": {
13236
13408
  readonly post: {
13237
13409
  readonly tags: readonly [
13238
- "Tags"
13410
+ "Customer History"
13411
+ ];
13412
+ readonly summary: "Update a customer history entry";
13413
+ readonly description: "Updates specified fields of a customer service-history entry in a real-estate workspace. Any replacement customer or service must belong to the workspace. Requires workspace access and write access to crm::customers.";
13414
+ readonly security: readonly [
13415
+ never
13416
+ ];
13417
+ readonly requestBody: {
13418
+ readonly required: true;
13419
+ readonly content: {
13420
+ readonly "application/json": {
13421
+ readonly schema: {
13422
+ readonly type: "object";
13423
+ readonly required: readonly [
13424
+ "chistoryId",
13425
+ "workspace"
13426
+ ];
13427
+ readonly properties: {
13428
+ readonly chistoryId: {
13429
+ readonly type: "string";
13430
+ readonly format: "uuid";
13431
+ readonly description: "Customer history entry identifier.";
13432
+ };
13433
+ readonly workspace: {
13434
+ readonly type: "string";
13435
+ readonly format: "uuid";
13436
+ };
13437
+ readonly customerId: {
13438
+ readonly type: "string";
13439
+ readonly format: "uuid";
13440
+ readonly description: "Replacement real-estate customer identifier.";
13441
+ };
13442
+ readonly serviceId: {
13443
+ readonly type: "string";
13444
+ readonly format: "uuid";
13445
+ readonly description: "Replacement real-estate service identifier.";
13446
+ };
13447
+ readonly notes: {
13448
+ readonly type: "string";
13449
+ readonly maxLength: 256;
13450
+ };
13451
+ readonly date: {
13452
+ readonly type: "string";
13453
+ readonly format: "date-time";
13454
+ };
13455
+ };
13456
+ };
13457
+ };
13458
+ };
13459
+ };
13460
+ readonly responses: {
13461
+ readonly 200: {
13462
+ readonly description: "History entry updated successfully.";
13463
+ readonly content: {
13464
+ readonly "application/json": {
13465
+ readonly schema: {
13466
+ readonly $ref: "#/components/schemas/UpdateCHistorySuccess";
13467
+ };
13468
+ };
13469
+ };
13470
+ };
13471
+ readonly 400: {
13472
+ readonly description: "Invalid request payload or unsupported workspace category.";
13473
+ readonly content: {
13474
+ readonly "application/json": {
13475
+ readonly schema: {
13476
+ readonly $ref: "#/components/schemas/ErrorResponse";
13477
+ };
13478
+ };
13479
+ };
13480
+ };
13481
+ readonly 401: {
13482
+ readonly description: "Unauthorized - Missing or invalid access token.";
13483
+ readonly content: {
13484
+ readonly "application/json": {
13485
+ readonly schema: {
13486
+ readonly $ref: "#/components/schemas/ErrorResponse";
13487
+ };
13488
+ };
13489
+ };
13490
+ };
13491
+ readonly 403: {
13492
+ readonly description: "Forbidden - User lacks workspace access or write access to crm::customers.";
13493
+ readonly content: {
13494
+ readonly "application/json": {
13495
+ readonly schema: {
13496
+ readonly $ref: "#/components/schemas/ErrorResponse";
13497
+ };
13498
+ };
13499
+ };
13500
+ };
13501
+ readonly 404: {
13502
+ readonly description: "Workspace, history entry, customer, or service not found.";
13503
+ readonly content: {
13504
+ readonly "application/json": {
13505
+ readonly schema: {
13506
+ readonly $ref: "#/components/schemas/ErrorResponse";
13507
+ };
13508
+ };
13509
+ };
13510
+ };
13511
+ };
13512
+ };
13513
+ };
13514
+ readonly "/chistory/delete": {
13515
+ readonly post: {
13516
+ readonly tags: readonly [
13517
+ "Customer History"
13518
+ ];
13519
+ readonly summary: "Delete a customer history entry";
13520
+ readonly description: "Deletes a customer service-history entry from a real-estate workspace. Requires workspace access and write access to crm::customers.";
13521
+ readonly security: readonly [
13522
+ never
13523
+ ];
13524
+ readonly requestBody: {
13525
+ readonly required: true;
13526
+ readonly content: {
13527
+ readonly "application/json": {
13528
+ readonly schema: {
13529
+ readonly type: "object";
13530
+ readonly required: readonly [
13531
+ "chistoryId",
13532
+ "workspace"
13533
+ ];
13534
+ readonly properties: {
13535
+ readonly chistoryId: {
13536
+ readonly type: "string";
13537
+ readonly format: "uuid";
13538
+ readonly description: "Customer history entry identifier.";
13539
+ };
13540
+ readonly workspace: {
13541
+ readonly type: "string";
13542
+ readonly format: "uuid";
13543
+ };
13544
+ };
13545
+ };
13546
+ };
13547
+ };
13548
+ };
13549
+ readonly responses: {
13550
+ readonly 200: {
13551
+ readonly description: "History entry deleted successfully.";
13552
+ readonly content: {
13553
+ readonly "application/json": {
13554
+ readonly schema: {
13555
+ readonly $ref: "#/components/schemas/SimpleSuccess";
13556
+ };
13557
+ };
13558
+ };
13559
+ };
13560
+ readonly 400: {
13561
+ readonly description: "Invalid request payload or unsupported workspace category.";
13562
+ readonly content: {
13563
+ readonly "application/json": {
13564
+ readonly schema: {
13565
+ readonly $ref: "#/components/schemas/ErrorResponse";
13566
+ };
13567
+ };
13568
+ };
13569
+ };
13570
+ readonly 401: {
13571
+ readonly description: "Unauthorized - Missing or invalid access token.";
13572
+ readonly content: {
13573
+ readonly "application/json": {
13574
+ readonly schema: {
13575
+ readonly $ref: "#/components/schemas/ErrorResponse";
13576
+ };
13577
+ };
13578
+ };
13579
+ };
13580
+ readonly 403: {
13581
+ readonly description: "Forbidden - User lacks workspace access or write access to crm::customers.";
13582
+ readonly content: {
13583
+ readonly "application/json": {
13584
+ readonly schema: {
13585
+ readonly $ref: "#/components/schemas/ErrorResponse";
13586
+ };
13587
+ };
13588
+ };
13589
+ };
13590
+ readonly 404: {
13591
+ readonly description: "Workspace or history entry not found.";
13592
+ readonly content: {
13593
+ readonly "application/json": {
13594
+ readonly schema: {
13595
+ readonly $ref: "#/components/schemas/ErrorResponse";
13596
+ };
13597
+ };
13598
+ };
13599
+ };
13600
+ };
13601
+ };
13602
+ };
13603
+ readonly "/tags/list/{workspace}": {
13604
+ readonly get: {
13605
+ readonly tags: readonly [
13606
+ "Tags"
13607
+ ];
13608
+ readonly summary: "List tags by workspace";
13609
+ readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks or crm::customers.";
13610
+ readonly security: readonly [
13611
+ never
13612
+ ];
13613
+ readonly parameters: readonly [
13614
+ {
13615
+ readonly name: "workspace";
13616
+ readonly in: "path";
13617
+ readonly required: true;
13618
+ readonly schema: {
13619
+ readonly type: "string";
13620
+ readonly format: "uuid";
13621
+ };
13622
+ readonly description: "Workspace identifier.";
13623
+ }
13624
+ ];
13625
+ readonly responses: {
13626
+ readonly 200: {
13627
+ readonly description: "Tags fetched successfully.";
13628
+ readonly content: {
13629
+ readonly "application/json": {
13630
+ readonly schema: {
13631
+ readonly $ref: "#/components/schemas/ListTagsSuccess";
13632
+ };
13633
+ };
13634
+ };
13635
+ };
13636
+ readonly 401: {
13637
+ readonly description: "Unauthorized - Missing or invalid access token.";
13638
+ readonly content: {
13639
+ readonly "application/json": {
13640
+ readonly schema: {
13641
+ readonly $ref: "#/components/schemas/ErrorResponse";
13642
+ };
13643
+ };
13644
+ };
13645
+ };
13646
+ readonly 403: {
13647
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to both crm::tasks and crm::customers.";
13648
+ readonly content: {
13649
+ readonly "application/json": {
13650
+ readonly schema: {
13651
+ readonly $ref: "#/components/schemas/ErrorResponse";
13652
+ };
13653
+ };
13654
+ };
13655
+ };
13656
+ };
13657
+ };
13658
+ };
13659
+ readonly "/tags/create": {
13660
+ readonly post: {
13661
+ readonly tags: readonly [
13662
+ "Tags"
13663
+ ];
13664
+ readonly summary: "Create a tag";
13665
+ readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::customers.";
13666
+ readonly security: readonly [
13667
+ never
13668
+ ];
13669
+ readonly requestBody: {
13670
+ readonly required: true;
13671
+ readonly content: {
13672
+ readonly "application/json": {
13673
+ readonly schema: {
13674
+ readonly type: "object";
13675
+ readonly required: readonly [
13676
+ "workspace",
13677
+ "name"
13678
+ ];
13679
+ readonly properties: {
13680
+ readonly workspace: {
13681
+ readonly type: "string";
13682
+ readonly format: "uuid";
13683
+ readonly description: "Workspace identifier.";
13684
+ };
13685
+ readonly name: {
13686
+ readonly type: "string";
13687
+ readonly description: "Tag label.";
13688
+ };
13689
+ readonly description: {
13690
+ readonly type: "string";
13691
+ readonly description: "Optional tag description.";
13692
+ };
13693
+ };
13694
+ };
13695
+ };
13696
+ };
13697
+ };
13698
+ readonly responses: {
13699
+ readonly 201: {
13700
+ readonly description: "Tag created successfully.";
13701
+ readonly content: {
13702
+ readonly "application/json": {
13703
+ readonly schema: {
13704
+ readonly $ref: "#/components/schemas/CreateTagSuccess";
13705
+ };
13706
+ };
13707
+ };
13708
+ };
13709
+ readonly 400: {
13710
+ readonly description: "Invalid request payload.";
13711
+ readonly content: {
13712
+ readonly "application/json": {
13713
+ readonly schema: {
13714
+ readonly $ref: "#/components/schemas/ErrorResponse";
13715
+ };
13716
+ };
13717
+ };
13718
+ };
13719
+ readonly 401: {
13720
+ readonly description: "Unauthorized - Missing or invalid access token.";
13721
+ readonly content: {
13722
+ readonly "application/json": {
13723
+ readonly schema: {
13724
+ readonly $ref: "#/components/schemas/ErrorResponse";
13725
+ };
13726
+ };
13727
+ };
13728
+ };
13729
+ readonly 403: {
13730
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to both crm::tasks and crm::customers.";
13731
+ readonly content: {
13732
+ readonly "application/json": {
13733
+ readonly schema: {
13734
+ readonly $ref: "#/components/schemas/ErrorResponse";
13735
+ };
13736
+ };
13737
+ };
13738
+ };
13739
+ };
13740
+ };
13741
+ };
13742
+ readonly "/tags/update": {
13743
+ readonly post: {
13744
+ readonly tags: readonly [
13745
+ "Tags"
13239
13746
  ];
13240
13747
  readonly summary: "Update a tag";
13241
13748
  readonly description: "Updates a tag's name and/or description. Requires workspace access and write access to crm::general.";
@@ -19107,6 +19614,180 @@ declare const routes: import("hono/hono-base").HonoBase<{
19107
19614
  };
19108
19615
  };
19109
19616
  }, "/cinvoices"> | import("hono/types").MergeSchemaPath<{
19617
+ "/create": {
19618
+ $post: {
19619
+ input: {};
19620
+ output: {
19621
+ success: false;
19622
+ error: string;
19623
+ };
19624
+ outputFormat: "json";
19625
+ status: 404;
19626
+ } | {
19627
+ input: {};
19628
+ output: {
19629
+ success: false;
19630
+ error: string;
19631
+ };
19632
+ outputFormat: "json";
19633
+ status: 400;
19634
+ } | {
19635
+ input: {};
19636
+ output: {
19637
+ success: true;
19638
+ history: {
19639
+ id: string;
19640
+ created_at: string;
19641
+ workspaceId: string;
19642
+ created_by: string;
19643
+ customerId: string;
19644
+ serviceId: string;
19645
+ date: string;
19646
+ updated_at: string | null;
19647
+ deleted_at: string | null;
19648
+ verified_at: string | null;
19649
+ suspended_at: string | null;
19650
+ notes: string | null;
19651
+ }[];
19652
+ };
19653
+ outputFormat: "json";
19654
+ status: 201;
19655
+ };
19656
+ };
19657
+ } & {
19658
+ "/list/:workspace/:customerId": {
19659
+ $get: {
19660
+ input: {
19661
+ param: {
19662
+ workspace: string;
19663
+ } & {
19664
+ customerId: string;
19665
+ };
19666
+ };
19667
+ output: {
19668
+ success: false;
19669
+ error: string;
19670
+ };
19671
+ outputFormat: "json";
19672
+ status: 404;
19673
+ } | {
19674
+ input: {
19675
+ param: {
19676
+ workspace: string;
19677
+ } & {
19678
+ customerId: string;
19679
+ };
19680
+ };
19681
+ output: {
19682
+ success: false;
19683
+ error: string;
19684
+ };
19685
+ outputFormat: "json";
19686
+ status: 400;
19687
+ } | {
19688
+ input: {
19689
+ param: {
19690
+ workspace: string;
19691
+ } & {
19692
+ customerId: string;
19693
+ };
19694
+ };
19695
+ output: {
19696
+ success: true;
19697
+ history: {
19698
+ createdBy: {
19699
+ id: string;
19700
+ firstName: string | null;
19701
+ lastName: string | null;
19702
+ profilePicture: string | null;
19703
+ } | null;
19704
+ updated_at: string | null;
19705
+ deleted_at: string | null;
19706
+ verified_at: string | null;
19707
+ suspended_at: string | null;
19708
+ created_at: string;
19709
+ id: string;
19710
+ workspaceId: string;
19711
+ customerId: string;
19712
+ serviceId: string;
19713
+ notes: string | null;
19714
+ date: string;
19715
+ created_by: string;
19716
+ }[];
19717
+ };
19718
+ outputFormat: "json";
19719
+ status: 200;
19720
+ };
19721
+ };
19722
+ } & {
19723
+ "/update": {
19724
+ $post: {
19725
+ input: {};
19726
+ output: {
19727
+ success: false;
19728
+ error: string;
19729
+ };
19730
+ outputFormat: "json";
19731
+ status: 404;
19732
+ } | {
19733
+ input: {};
19734
+ output: {
19735
+ success: false;
19736
+ error: string;
19737
+ };
19738
+ outputFormat: "json";
19739
+ status: 400;
19740
+ } | {
19741
+ input: {};
19742
+ output: {
19743
+ success: true;
19744
+ history: {
19745
+ updated_at: string | null;
19746
+ deleted_at: string | null;
19747
+ verified_at: string | null;
19748
+ suspended_at: string | null;
19749
+ created_at: string;
19750
+ id: string;
19751
+ workspaceId: string;
19752
+ customerId: string;
19753
+ serviceId: string;
19754
+ notes: string | null;
19755
+ date: string;
19756
+ created_by: string;
19757
+ }[];
19758
+ };
19759
+ outputFormat: "json";
19760
+ status: 200;
19761
+ };
19762
+ };
19763
+ } & {
19764
+ "/delete": {
19765
+ $post: {
19766
+ input: {};
19767
+ output: {
19768
+ success: false;
19769
+ error: string;
19770
+ };
19771
+ outputFormat: "json";
19772
+ status: 404;
19773
+ } | {
19774
+ input: {};
19775
+ output: {
19776
+ success: false;
19777
+ error: string;
19778
+ };
19779
+ outputFormat: "json";
19780
+ status: 400;
19781
+ } | {
19782
+ input: {};
19783
+ output: {
19784
+ success: true;
19785
+ };
19786
+ outputFormat: "json";
19787
+ status: 200;
19788
+ };
19789
+ };
19790
+ }, "/chistory"> | import("hono/types").MergeSchemaPath<{
19110
19791
  "/list/:workspace": {
19111
19792
  $get: {
19112
19793
  input: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.161",
3
+ "version": "0.0.163",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,