@mestra-dev/contract 0.0.97 → 0.0.99

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 +922 -76
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -86,7 +86,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
86
86
  },
87
87
  {
88
88
  readonly name: "Customers";
89
- readonly description: "Category-specific customer create. Real-estate workspaces persist leads on customer_real_estates. List, get, update, delete, and get-tasks are not currently exposed.";
89
+ readonly description: "Category-specific customer CRUD. Real-estate workspaces persist leads on customer_real_estates.";
90
90
  },
91
91
  {
92
92
  readonly name: "Events";
@@ -9247,6 +9247,555 @@ declare const routes: import("hono/hono-base").HonoBase<{
9247
9247
  };
9248
9248
  };
9249
9249
  };
9250
+ readonly "/customers/update": {
9251
+ readonly post: {
9252
+ readonly tags: readonly [
9253
+ "Customers"
9254
+ ];
9255
+ readonly summary: "Update a customer";
9256
+ readonly description: "Partially updates a category-specific customer in the specified workspace. Real-estate workspaces update only the provided lead fields on customer_real_estates. Requires workspace access, write access to crm::customers, and billing access for customers.";
9257
+ readonly security: readonly [
9258
+ never
9259
+ ];
9260
+ readonly requestBody: {
9261
+ readonly required: true;
9262
+ readonly content: {
9263
+ readonly "application/json": {
9264
+ readonly schema: {
9265
+ readonly type: "object";
9266
+ readonly required: readonly [
9267
+ "workspace",
9268
+ "customerId"
9269
+ ];
9270
+ readonly properties: {
9271
+ readonly workspace: {
9272
+ readonly type: "string";
9273
+ readonly format: "uuid";
9274
+ readonly description: "Workspace identifier where the customer belongs.";
9275
+ };
9276
+ readonly customerId: {
9277
+ readonly type: "string";
9278
+ readonly format: "uuid";
9279
+ readonly description: "Customer identifier to update.";
9280
+ };
9281
+ readonly name: {
9282
+ readonly type: "string";
9283
+ };
9284
+ readonly type: {
9285
+ readonly type: "string";
9286
+ readonly enum: readonly [
9287
+ "buyer",
9288
+ "seller",
9289
+ "tenant",
9290
+ "landlord",
9291
+ "investor",
9292
+ "agent"
9293
+ ];
9294
+ };
9295
+ readonly companyName: {
9296
+ readonly type: "string";
9297
+ };
9298
+ readonly phone: {
9299
+ readonly type: "string";
9300
+ readonly description: "E.164 phone number.";
9301
+ };
9302
+ readonly telegram: {
9303
+ readonly type: "string";
9304
+ };
9305
+ readonly whatsapp: {
9306
+ readonly type: "string";
9307
+ readonly description: "E.164 WhatsApp number.";
9308
+ };
9309
+ readonly email: {
9310
+ readonly type: "string";
9311
+ readonly format: "email";
9312
+ };
9313
+ readonly leadSource: {
9314
+ readonly type: "string";
9315
+ readonly enum: readonly [
9316
+ "cian",
9317
+ "avito",
9318
+ "vk",
9319
+ "yandex",
9320
+ "website",
9321
+ "referral",
9322
+ "walk_in"
9323
+ ];
9324
+ };
9325
+ readonly budgetMin: {
9326
+ readonly type: "number";
9327
+ readonly minimum: 0;
9328
+ };
9329
+ readonly budgetMax: {
9330
+ readonly type: "number";
9331
+ readonly minimum: 0;
9332
+ };
9333
+ readonly inHandBudget: {
9334
+ readonly type: "number";
9335
+ readonly minimum: 0;
9336
+ };
9337
+ readonly installmentBudget: {
9338
+ readonly type: "number";
9339
+ readonly minimum: 0;
9340
+ };
9341
+ readonly minArea: {
9342
+ readonly type: "number";
9343
+ readonly minimum: 0;
9344
+ };
9345
+ readonly maxArea: {
9346
+ readonly type: "number";
9347
+ readonly minimum: 0;
9348
+ };
9349
+ readonly roomsCount: {
9350
+ readonly type: "integer";
9351
+ readonly minimum: 0;
9352
+ };
9353
+ readonly preferredDistricts: {
9354
+ readonly type: "array";
9355
+ readonly items: {
9356
+ readonly type: "string";
9357
+ };
9358
+ };
9359
+ readonly propertyType: {
9360
+ readonly type: "string";
9361
+ };
9362
+ readonly maxMetroDistance: {
9363
+ readonly type: "number";
9364
+ readonly minimum: 0;
9365
+ };
9366
+ readonly dealStatus: {
9367
+ readonly type: "string";
9368
+ readonly enum: readonly [
9369
+ "just_browsing",
9370
+ "serious_buyer",
9371
+ "mortgage_approved",
9372
+ "signed_contract",
9373
+ "closed_deal"
9374
+ ];
9375
+ };
9376
+ readonly preferredPaymentMethod: {
9377
+ readonly type: "string";
9378
+ readonly enum: readonly [
9379
+ "full_payment",
9380
+ "mortgage",
9381
+ "installment"
9382
+ ];
9383
+ };
9384
+ readonly childrenCount: {
9385
+ readonly type: "integer";
9386
+ readonly minimum: 0;
9387
+ };
9388
+ readonly hasPets: {
9389
+ readonly type: "boolean";
9390
+ };
9391
+ readonly carsCount: {
9392
+ readonly type: "integer";
9393
+ readonly minimum: 0;
9394
+ };
9395
+ readonly birthDate: {
9396
+ readonly type: "string";
9397
+ readonly format: "date-time";
9398
+ };
9399
+ readonly notes: {
9400
+ readonly type: "string";
9401
+ };
9402
+ };
9403
+ };
9404
+ };
9405
+ };
9406
+ };
9407
+ readonly responses: {
9408
+ readonly 200: {
9409
+ readonly description: "Customer updated successfully.";
9410
+ readonly content: {
9411
+ readonly "application/json": {
9412
+ readonly schema: {
9413
+ readonly $ref: "#/components/schemas/UpdateCustomerSuccess";
9414
+ };
9415
+ };
9416
+ };
9417
+ };
9418
+ readonly 400: {
9419
+ readonly description: "Invalid request payload or unsupported workspace category.";
9420
+ readonly content: {
9421
+ readonly "application/json": {
9422
+ readonly schema: {
9423
+ readonly $ref: "#/components/schemas/ErrorResponse";
9424
+ };
9425
+ };
9426
+ };
9427
+ };
9428
+ readonly 404: {
9429
+ readonly description: "Customer or workspace not found.";
9430
+ readonly content: {
9431
+ readonly "application/json": {
9432
+ readonly schema: {
9433
+ readonly $ref: "#/components/schemas/ErrorResponse";
9434
+ };
9435
+ };
9436
+ };
9437
+ };
9438
+ readonly 401: {
9439
+ readonly description: "Unauthorized - Missing or invalid access token.";
9440
+ readonly content: {
9441
+ readonly "application/json": {
9442
+ readonly schema: {
9443
+ readonly $ref: "#/components/schemas/ErrorResponse";
9444
+ };
9445
+ };
9446
+ };
9447
+ };
9448
+ readonly 403: {
9449
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, write access to crm::customers, or billing access for customers.";
9450
+ readonly content: {
9451
+ readonly "application/json": {
9452
+ readonly schema: {
9453
+ readonly $ref: "#/components/schemas/ErrorResponse";
9454
+ };
9455
+ };
9456
+ };
9457
+ };
9458
+ };
9459
+ };
9460
+ };
9461
+ readonly "/customers/get/{workspace}/{customerId}": {
9462
+ readonly get: {
9463
+ readonly tags: readonly [
9464
+ "Customers"
9465
+ ];
9466
+ readonly summary: "Get a customer by ID";
9467
+ readonly description: "Returns a single customer by ID within the workspace. Real-estate workspaces read from customer_real_estates. Requires workspace access and read access to crm::customers resource.";
9468
+ readonly security: readonly [
9469
+ never
9470
+ ];
9471
+ readonly parameters: readonly [
9472
+ {
9473
+ readonly name: "workspace";
9474
+ readonly in: "path";
9475
+ readonly required: true;
9476
+ readonly schema: {
9477
+ readonly type: "string";
9478
+ readonly format: "uuid";
9479
+ };
9480
+ readonly description: "Workspace identifier.";
9481
+ },
9482
+ {
9483
+ readonly name: "customerId";
9484
+ readonly in: "path";
9485
+ readonly required: true;
9486
+ readonly schema: {
9487
+ readonly type: "string";
9488
+ readonly format: "uuid";
9489
+ };
9490
+ readonly description: "Customer identifier.";
9491
+ }
9492
+ ];
9493
+ readonly responses: {
9494
+ readonly 200: {
9495
+ readonly description: "Customer fetched successfully.";
9496
+ readonly content: {
9497
+ readonly "application/json": {
9498
+ readonly schema: {
9499
+ readonly $ref: "#/components/schemas/GetCustomerSuccess";
9500
+ };
9501
+ };
9502
+ };
9503
+ };
9504
+ readonly 400: {
9505
+ readonly description: "Unsupported workspace category.";
9506
+ readonly content: {
9507
+ readonly "application/json": {
9508
+ readonly schema: {
9509
+ readonly $ref: "#/components/schemas/ErrorResponse";
9510
+ };
9511
+ };
9512
+ };
9513
+ };
9514
+ readonly 404: {
9515
+ readonly description: "Customer or workspace not found.";
9516
+ readonly content: {
9517
+ readonly "application/json": {
9518
+ readonly schema: {
9519
+ readonly $ref: "#/components/schemas/ErrorResponse";
9520
+ };
9521
+ };
9522
+ };
9523
+ };
9524
+ readonly 401: {
9525
+ readonly description: "Unauthorized - Missing or invalid access token.";
9526
+ readonly content: {
9527
+ readonly "application/json": {
9528
+ readonly schema: {
9529
+ readonly $ref: "#/components/schemas/ErrorResponse";
9530
+ };
9531
+ };
9532
+ };
9533
+ };
9534
+ readonly 403: {
9535
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::customers resource.";
9536
+ readonly content: {
9537
+ readonly "application/json": {
9538
+ readonly schema: {
9539
+ readonly $ref: "#/components/schemas/ErrorResponse";
9540
+ };
9541
+ };
9542
+ };
9543
+ };
9544
+ };
9545
+ };
9546
+ };
9547
+ readonly "/customers/list/{workspace}": {
9548
+ readonly get: {
9549
+ readonly tags: readonly [
9550
+ "Customers"
9551
+ ];
9552
+ readonly summary: "List customers in workspace";
9553
+ readonly description: "Returns all customers in the specified workspace. Real-estate workspaces list leads from customer_real_estates. Requires workspace access and read access to crm::customers resource.";
9554
+ readonly security: readonly [
9555
+ never
9556
+ ];
9557
+ readonly parameters: readonly [
9558
+ {
9559
+ readonly name: "workspace";
9560
+ readonly in: "path";
9561
+ readonly required: true;
9562
+ readonly description: "Workspace identifier where customers belong.";
9563
+ readonly schema: {
9564
+ readonly type: "string";
9565
+ readonly format: "uuid";
9566
+ };
9567
+ }
9568
+ ];
9569
+ readonly responses: {
9570
+ readonly 200: {
9571
+ readonly description: "Customers fetched successfully.";
9572
+ readonly content: {
9573
+ readonly "application/json": {
9574
+ readonly schema: {
9575
+ readonly $ref: "#/components/schemas/ListCustomersSuccess";
9576
+ };
9577
+ };
9578
+ };
9579
+ };
9580
+ readonly 400: {
9581
+ readonly description: "Unsupported workspace category.";
9582
+ readonly content: {
9583
+ readonly "application/json": {
9584
+ readonly schema: {
9585
+ readonly $ref: "#/components/schemas/ErrorResponse";
9586
+ };
9587
+ };
9588
+ };
9589
+ };
9590
+ readonly 404: {
9591
+ readonly description: "Workspace not found.";
9592
+ readonly content: {
9593
+ readonly "application/json": {
9594
+ readonly schema: {
9595
+ readonly $ref: "#/components/schemas/ErrorResponse";
9596
+ };
9597
+ };
9598
+ };
9599
+ };
9600
+ readonly 401: {
9601
+ readonly description: "Unauthorized - Missing or invalid access token.";
9602
+ readonly content: {
9603
+ readonly "application/json": {
9604
+ readonly schema: {
9605
+ readonly $ref: "#/components/schemas/ErrorResponse";
9606
+ };
9607
+ };
9608
+ };
9609
+ };
9610
+ readonly 403: {
9611
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::customers resource.";
9612
+ readonly content: {
9613
+ readonly "application/json": {
9614
+ readonly schema: {
9615
+ readonly $ref: "#/components/schemas/ErrorResponse";
9616
+ };
9617
+ };
9618
+ };
9619
+ };
9620
+ };
9621
+ };
9622
+ };
9623
+ readonly "/customers/delete": {
9624
+ readonly post: {
9625
+ readonly tags: readonly [
9626
+ "Customers"
9627
+ ];
9628
+ readonly summary: "Delete a customer";
9629
+ readonly description: "Deletes a customer in the specified workspace. Real-estate workspaces remove a lead from customer_real_estates. Requires workspace access and write access to crm::customers resource.";
9630
+ readonly security: readonly [
9631
+ never
9632
+ ];
9633
+ readonly requestBody: {
9634
+ readonly required: true;
9635
+ readonly content: {
9636
+ readonly "application/json": {
9637
+ readonly schema: {
9638
+ readonly type: "object";
9639
+ readonly required: readonly [
9640
+ "customerId",
9641
+ "workspace"
9642
+ ];
9643
+ readonly properties: {
9644
+ readonly customerId: {
9645
+ readonly type: "string";
9646
+ readonly format: "uuid";
9647
+ readonly description: "Customer identifier.";
9648
+ };
9649
+ readonly workspace: {
9650
+ readonly type: "string";
9651
+ readonly format: "uuid";
9652
+ readonly description: "Workspace identifier.";
9653
+ };
9654
+ };
9655
+ };
9656
+ };
9657
+ };
9658
+ };
9659
+ readonly responses: {
9660
+ readonly 200: {
9661
+ readonly description: "Customer deleted successfully.";
9662
+ readonly content: {
9663
+ readonly "application/json": {
9664
+ readonly schema: {
9665
+ readonly $ref: "#/components/schemas/SimpleSuccess";
9666
+ };
9667
+ };
9668
+ };
9669
+ };
9670
+ readonly 400: {
9671
+ readonly description: "Invalid request payload or unsupported workspace category.";
9672
+ readonly content: {
9673
+ readonly "application/json": {
9674
+ readonly schema: {
9675
+ readonly $ref: "#/components/schemas/ErrorResponse";
9676
+ };
9677
+ };
9678
+ };
9679
+ };
9680
+ readonly 404: {
9681
+ readonly description: "Customer or workspace not found.";
9682
+ readonly content: {
9683
+ readonly "application/json": {
9684
+ readonly schema: {
9685
+ readonly $ref: "#/components/schemas/ErrorResponse";
9686
+ };
9687
+ };
9688
+ };
9689
+ };
9690
+ readonly 401: {
9691
+ readonly description: "Unauthorized - Missing or invalid access token.";
9692
+ readonly content: {
9693
+ readonly "application/json": {
9694
+ readonly schema: {
9695
+ readonly $ref: "#/components/schemas/ErrorResponse";
9696
+ };
9697
+ };
9698
+ };
9699
+ };
9700
+ readonly 403: {
9701
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::customers resource.";
9702
+ readonly content: {
9703
+ readonly "application/json": {
9704
+ readonly schema: {
9705
+ readonly $ref: "#/components/schemas/ErrorResponse";
9706
+ };
9707
+ };
9708
+ };
9709
+ };
9710
+ };
9711
+ };
9712
+ };
9713
+ readonly "/customers/get-tasks/{workspace}/{customerId}": {
9714
+ readonly get: {
9715
+ readonly tags: readonly [
9716
+ "Customers"
9717
+ ];
9718
+ readonly summary: "List tasks for a customer";
9719
+ readonly description: "Returns tasks linked to the specified customer in the workspace. Requires workspace access and read access to crm::tasks resource.";
9720
+ readonly security: readonly [
9721
+ never
9722
+ ];
9723
+ readonly parameters: readonly [
9724
+ {
9725
+ readonly name: "workspace";
9726
+ readonly in: "path";
9727
+ readonly required: true;
9728
+ readonly schema: {
9729
+ readonly type: "string";
9730
+ readonly format: "uuid";
9731
+ };
9732
+ readonly description: "Workspace identifier.";
9733
+ },
9734
+ {
9735
+ readonly name: "customerId";
9736
+ readonly in: "path";
9737
+ readonly required: true;
9738
+ readonly schema: {
9739
+ readonly type: "string";
9740
+ readonly format: "uuid";
9741
+ };
9742
+ readonly description: "Customer identifier.";
9743
+ }
9744
+ ];
9745
+ readonly responses: {
9746
+ readonly 200: {
9747
+ readonly description: "Tasks fetched successfully.";
9748
+ readonly content: {
9749
+ readonly "application/json": {
9750
+ readonly schema: {
9751
+ readonly $ref: "#/components/schemas/ListTasksSuccess";
9752
+ };
9753
+ };
9754
+ };
9755
+ };
9756
+ readonly 400: {
9757
+ readonly description: "Unsupported workspace category.";
9758
+ readonly content: {
9759
+ readonly "application/json": {
9760
+ readonly schema: {
9761
+ readonly $ref: "#/components/schemas/ErrorResponse";
9762
+ };
9763
+ };
9764
+ };
9765
+ };
9766
+ readonly 404: {
9767
+ readonly description: "Customer or workspace not found.";
9768
+ readonly content: {
9769
+ readonly "application/json": {
9770
+ readonly schema: {
9771
+ readonly $ref: "#/components/schemas/ErrorResponse";
9772
+ };
9773
+ };
9774
+ };
9775
+ };
9776
+ readonly 401: {
9777
+ readonly description: "Unauthorized - Missing or invalid access token.";
9778
+ readonly content: {
9779
+ readonly "application/json": {
9780
+ readonly schema: {
9781
+ readonly $ref: "#/components/schemas/ErrorResponse";
9782
+ };
9783
+ };
9784
+ };
9785
+ };
9786
+ readonly 403: {
9787
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::tasks resource.";
9788
+ readonly content: {
9789
+ readonly "application/json": {
9790
+ readonly schema: {
9791
+ readonly $ref: "#/components/schemas/ErrorResponse";
9792
+ };
9793
+ };
9794
+ };
9795
+ };
9796
+ };
9797
+ };
9798
+ };
9250
9799
  readonly "/services/create": {
9251
9800
  readonly post: {
9252
9801
  readonly tags: readonly [
@@ -15490,17 +16039,202 @@ declare const routes: import("hono/hono-base").HonoBase<{
15490
16039
  }[];
15491
16040
  };
15492
16041
  outputFormat: "json";
15493
- status: 200;
16042
+ status: 200;
16043
+ };
16044
+ };
16045
+ } & {
16046
+ "/get/:workspace/:serviceId": {
16047
+ $get: {
16048
+ input: {
16049
+ param: {
16050
+ workspace: string;
16051
+ } & {
16052
+ serviceId: string;
16053
+ };
16054
+ };
16055
+ output: {
16056
+ success: false;
16057
+ error: string;
16058
+ };
16059
+ outputFormat: "json";
16060
+ status: 400;
16061
+ } | {
16062
+ input: {
16063
+ param: {
16064
+ workspace: string;
16065
+ } & {
16066
+ serviceId: string;
16067
+ };
16068
+ };
16069
+ output: {
16070
+ success: false;
16071
+ error: string;
16072
+ };
16073
+ outputFormat: "json";
16074
+ status: 404;
16075
+ } | {
16076
+ input: {
16077
+ param: {
16078
+ workspace: string;
16079
+ } & {
16080
+ serviceId: string;
16081
+ };
16082
+ };
16083
+ output: {
16084
+ success: true;
16085
+ service: {
16086
+ updated_at: string | null;
16087
+ deleted_at: string | null;
16088
+ verified_at: string | null;
16089
+ suspended_at: string | null;
16090
+ created_at: string;
16091
+ id: string;
16092
+ workspaceId: string;
16093
+ title: string;
16094
+ active: boolean | null;
16095
+ type: string | null;
16096
+ currency: string | null;
16097
+ description: string | null;
16098
+ price: number | null;
16099
+ propertyType: string | null;
16100
+ propertyStatus: string | null;
16101
+ commercialType: string | null;
16102
+ commercialClass: string | null;
16103
+ landType: string | null;
16104
+ ownershipType: string | null;
16105
+ loadingDockAccess: boolean | null;
16106
+ waterAccess: boolean | null;
16107
+ electricityAccess: boolean | null;
16108
+ gasAccess: boolean | null;
16109
+ sewageAccess: boolean | null;
16110
+ internetAccess: boolean | null;
16111
+ elevaorAccess: boolean | null;
16112
+ seprateEntrance: boolean | null;
16113
+ furnishedType: string | null;
16114
+ parkingType: string | null;
16115
+ balconyAccess: boolean | null;
16116
+ loggiaAccess: boolean | null;
16117
+ otherFeatures: string | null;
16118
+ fullPayment: boolean | null;
16119
+ mortgagePayment: boolean | null;
16120
+ installmentPayment: boolean | null;
16121
+ fullPaymentAmount: number | null;
16122
+ mortgagePaymentAmount: number | null;
16123
+ installmentPaymentAmount: number | null;
16124
+ pricePerSquareMeter: number | null;
16125
+ alternativeEURCurrency: boolean | null;
16126
+ alternativeRUBCurrency: boolean | null;
16127
+ alternativeUSDCurrency: boolean | null;
16128
+ estimatedDeliveryDate: string | null;
16129
+ roomsCount: number | null;
16130
+ bathroomsCount: number | null;
16131
+ bedroomsCount: number | null;
16132
+ totalArea: number | null;
16133
+ livingArea: number | null;
16134
+ ceilingHeight: number | null;
16135
+ floor: number | null;
16136
+ totalFloors: number | null;
16137
+ yearBuilt: number | null;
16138
+ renovation: string | null;
16139
+ developerName: string | null;
16140
+ city: string | null;
16141
+ district: string | null;
16142
+ nearestMetroStation: string | null;
16143
+ fullAddress: string | null;
16144
+ latitude: string | null;
16145
+ longitude: string | null;
16146
+ };
16147
+ };
16148
+ outputFormat: "json";
16149
+ status: 200;
16150
+ };
16151
+ };
16152
+ } & {
16153
+ "/delete": {
16154
+ $post: {
16155
+ input: {};
16156
+ output: {
16157
+ success: false;
16158
+ error: string;
16159
+ };
16160
+ outputFormat: "json";
16161
+ status: 404;
16162
+ } | {
16163
+ input: {};
16164
+ output: {
16165
+ success: false;
16166
+ error: string;
16167
+ };
16168
+ outputFormat: "json";
16169
+ status: 400;
16170
+ } | {
16171
+ input: {};
16172
+ output: {
16173
+ success: true;
16174
+ };
16175
+ outputFormat: "json";
16176
+ status: 200;
16177
+ };
16178
+ };
16179
+ }, "/services"> | import("hono/types").MergeSchemaPath<{
16180
+ "/create": {
16181
+ $post: {
16182
+ input: {};
16183
+ output: {
16184
+ success: false;
16185
+ error: string;
16186
+ };
16187
+ outputFormat: "json";
16188
+ status: 400;
16189
+ } | {
16190
+ input: {};
16191
+ output: {
16192
+ success: true;
16193
+ customer: {
16194
+ id: string;
16195
+ type: string | null;
16196
+ created_at: string;
16197
+ name: string;
16198
+ email: string | null;
16199
+ workspaceId: string;
16200
+ companyName: string | null;
16201
+ updated_at: string | null;
16202
+ deleted_at: string | null;
16203
+ verified_at: string | null;
16204
+ suspended_at: string | null;
16205
+ phone: string | null;
16206
+ birthDate: string | null;
16207
+ telegram: string | null;
16208
+ whatsapp: string | null;
16209
+ leadSource: string | null;
16210
+ budgetMin: number | null;
16211
+ budgetMax: number | null;
16212
+ inHandBudget: number | null;
16213
+ installmentBudget: number | null;
16214
+ minArea: number | null;
16215
+ maxArea: number | null;
16216
+ roomsCount: number | null;
16217
+ preferredDistricts: string[] | null;
16218
+ propertyType: string | null;
16219
+ maxMetroDistance: number | null;
16220
+ dealStatus: string | null;
16221
+ preferredPaymentMethod: string | null;
16222
+ childrenCount: number | null;
16223
+ hasPets: boolean | null;
16224
+ carsCount: number | null;
16225
+ notes: string | null;
16226
+ }[];
16227
+ };
16228
+ outputFormat: "json";
16229
+ status: 201;
15494
16230
  };
15495
16231
  };
15496
16232
  } & {
15497
- "/get/:workspace/:serviceId": {
16233
+ "/list/:workspace": {
15498
16234
  $get: {
15499
16235
  input: {
15500
16236
  param: {
15501
16237
  workspace: string;
15502
- } & {
15503
- serviceId: string;
15504
16238
  };
15505
16239
  };
15506
16240
  output: {
@@ -15508,13 +16242,74 @@ declare const routes: import("hono/hono-base").HonoBase<{
15508
16242
  error: string;
15509
16243
  };
15510
16244
  outputFormat: "json";
15511
- status: 400;
16245
+ status: 404;
16246
+ } | {
16247
+ input: {
16248
+ param: {
16249
+ workspace: string;
16250
+ };
16251
+ };
16252
+ output: {
16253
+ success: true;
16254
+ customers: {
16255
+ updated_at: string | null;
16256
+ deleted_at: string | null;
16257
+ verified_at: string | null;
16258
+ suspended_at: string | null;
16259
+ created_at: string;
16260
+ id: string;
16261
+ workspaceId: string;
16262
+ type: string | null;
16263
+ name: string;
16264
+ companyName: string | null;
16265
+ phone: string | null;
16266
+ telegram: string | null;
16267
+ whatsapp: string | null;
16268
+ email: string | null;
16269
+ leadSource: string | null;
16270
+ budgetMin: number | null;
16271
+ budgetMax: number | null;
16272
+ inHandBudget: number | null;
16273
+ installmentBudget: number | null;
16274
+ minArea: number | null;
16275
+ maxArea: number | null;
16276
+ roomsCount: number | null;
16277
+ preferredDistricts: string[] | null;
16278
+ propertyType: string | null;
16279
+ maxMetroDistance: number | null;
16280
+ dealStatus: string | null;
16281
+ preferredPaymentMethod: string | null;
16282
+ childrenCount: number | null;
16283
+ hasPets: boolean | null;
16284
+ carsCount: number | null;
16285
+ birthDate: string | null;
16286
+ notes: string | null;
16287
+ }[];
16288
+ };
16289
+ outputFormat: "json";
16290
+ status: 200;
15512
16291
  } | {
16292
+ input: {
16293
+ param: {
16294
+ workspace: string;
16295
+ };
16296
+ };
16297
+ output: {
16298
+ success: false;
16299
+ error: string;
16300
+ };
16301
+ outputFormat: "json";
16302
+ status: 400;
16303
+ };
16304
+ };
16305
+ } & {
16306
+ "/get/:workspace/:customerId": {
16307
+ $get: {
15513
16308
  input: {
15514
16309
  param: {
15515
16310
  workspace: string;
15516
16311
  } & {
15517
- serviceId: string;
16312
+ customerId: string;
15518
16313
  };
15519
16314
  };
15520
16315
  output: {
@@ -15528,12 +16323,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
15528
16323
  param: {
15529
16324
  workspace: string;
15530
16325
  } & {
15531
- serviceId: string;
16326
+ customerId: string;
15532
16327
  };
15533
16328
  };
15534
16329
  output: {
15535
16330
  success: true;
15536
- service: {
16331
+ customer: {
15537
16332
  updated_at: string | null;
15538
16333
  deleted_at: string | null;
15539
16334
  verified_at: string | null;
@@ -15541,63 +16336,49 @@ declare const routes: import("hono/hono-base").HonoBase<{
15541
16336
  created_at: string;
15542
16337
  id: string;
15543
16338
  workspaceId: string;
15544
- title: string;
15545
- active: boolean | null;
15546
16339
  type: string | null;
15547
- currency: string | null;
15548
- description: string | null;
15549
- price: number | null;
15550
- propertyType: string | null;
15551
- propertyStatus: string | null;
15552
- commercialType: string | null;
15553
- commercialClass: string | null;
15554
- landType: string | null;
15555
- ownershipType: string | null;
15556
- loadingDockAccess: boolean | null;
15557
- waterAccess: boolean | null;
15558
- electricityAccess: boolean | null;
15559
- gasAccess: boolean | null;
15560
- sewageAccess: boolean | null;
15561
- internetAccess: boolean | null;
15562
- elevaorAccess: boolean | null;
15563
- seprateEntrance: boolean | null;
15564
- furnishedType: string | null;
15565
- parkingType: string | null;
15566
- balconyAccess: boolean | null;
15567
- loggiaAccess: boolean | null;
15568
- otherFeatures: string | null;
15569
- fullPayment: boolean | null;
15570
- mortgagePayment: boolean | null;
15571
- installmentPayment: boolean | null;
15572
- fullPaymentAmount: number | null;
15573
- mortgagePaymentAmount: number | null;
15574
- installmentPaymentAmount: number | null;
15575
- pricePerSquareMeter: number | null;
15576
- alternativeEURCurrency: boolean | null;
15577
- alternativeRUBCurrency: boolean | null;
15578
- alternativeUSDCurrency: boolean | null;
15579
- estimatedDeliveryDate: string | null;
16340
+ name: string;
16341
+ companyName: string | null;
16342
+ phone: string | null;
16343
+ telegram: string | null;
16344
+ whatsapp: string | null;
16345
+ email: string | null;
16346
+ leadSource: string | null;
16347
+ budgetMin: number | null;
16348
+ budgetMax: number | null;
16349
+ inHandBudget: number | null;
16350
+ installmentBudget: number | null;
16351
+ minArea: number | null;
16352
+ maxArea: number | null;
15580
16353
  roomsCount: number | null;
15581
- bathroomsCount: number | null;
15582
- bedroomsCount: number | null;
15583
- totalArea: number | null;
15584
- livingArea: number | null;
15585
- ceilingHeight: number | null;
15586
- floor: number | null;
15587
- totalFloors: number | null;
15588
- yearBuilt: number | null;
15589
- renovation: string | null;
15590
- developerName: string | null;
15591
- city: string | null;
15592
- district: string | null;
15593
- nearestMetroStation: string | null;
15594
- fullAddress: string | null;
15595
- latitude: string | null;
15596
- longitude: string | null;
16354
+ preferredDistricts: string[] | null;
16355
+ propertyType: string | null;
16356
+ maxMetroDistance: number | null;
16357
+ dealStatus: string | null;
16358
+ preferredPaymentMethod: string | null;
16359
+ childrenCount: number | null;
16360
+ hasPets: boolean | null;
16361
+ carsCount: number | null;
16362
+ birthDate: string | null;
16363
+ notes: string | null;
15597
16364
  };
15598
16365
  };
15599
16366
  outputFormat: "json";
15600
16367
  status: 200;
16368
+ } | {
16369
+ input: {
16370
+ param: {
16371
+ workspace: string;
16372
+ } & {
16373
+ customerId: string;
16374
+ };
16375
+ };
16376
+ output: {
16377
+ success: false;
16378
+ error: string;
16379
+ };
16380
+ outputFormat: "json";
16381
+ status: 400;
15601
16382
  };
15602
16383
  };
15603
16384
  } & {
@@ -15613,23 +16394,31 @@ declare const routes: import("hono/hono-base").HonoBase<{
15613
16394
  } | {
15614
16395
  input: {};
15615
16396
  output: {
15616
- success: false;
15617
- error: string;
16397
+ success: true;
15618
16398
  };
15619
16399
  outputFormat: "json";
15620
- status: 400;
16400
+ status: 200;
15621
16401
  } | {
15622
16402
  input: {};
15623
16403
  output: {
15624
- success: true;
16404
+ success: false;
16405
+ error: string;
15625
16406
  };
15626
16407
  outputFormat: "json";
15627
- status: 200;
16408
+ status: 400;
15628
16409
  };
15629
16410
  };
15630
- }, "/services"> | import("hono/types").MergeSchemaPath<{
15631
- "/create": {
16411
+ } & {
16412
+ "/update": {
15632
16413
  $post: {
16414
+ input: {};
16415
+ output: {
16416
+ success: false;
16417
+ error: string;
16418
+ };
16419
+ outputFormat: "json";
16420
+ status: 404;
16421
+ } | {
15633
16422
  input: {};
15634
16423
  output: {
15635
16424
  success: false;
@@ -15642,21 +16431,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
15642
16431
  output: {
15643
16432
  success: true;
15644
16433
  customer: {
15645
- id: string;
15646
- type: string | null;
15647
- created_at: string;
15648
- name: string;
15649
- email: string | null;
15650
- workspaceId: string;
15651
- companyName: string | null;
15652
16434
  updated_at: string | null;
15653
16435
  deleted_at: string | null;
15654
16436
  verified_at: string | null;
15655
16437
  suspended_at: string | null;
16438
+ created_at: string;
16439
+ id: string;
16440
+ workspaceId: string;
16441
+ type: string | null;
16442
+ name: string;
16443
+ companyName: string | null;
15656
16444
  phone: string | null;
15657
- birthDate: string | null;
15658
16445
  telegram: string | null;
15659
16446
  whatsapp: string | null;
16447
+ email: string | null;
15660
16448
  leadSource: string | null;
15661
16449
  budgetMin: number | null;
15662
16450
  budgetMax: number | null;
@@ -15673,11 +16461,69 @@ declare const routes: import("hono/hono-base").HonoBase<{
15673
16461
  childrenCount: number | null;
15674
16462
  hasPets: boolean | null;
15675
16463
  carsCount: number | null;
16464
+ birthDate: string | null;
15676
16465
  notes: string | null;
15677
16466
  }[];
15678
16467
  };
15679
16468
  outputFormat: "json";
15680
- status: 201;
16469
+ status: 200;
16470
+ };
16471
+ };
16472
+ } & {
16473
+ "/get-tasks/:workspace/:customerId": {
16474
+ $get: {
16475
+ input: {
16476
+ param: {
16477
+ workspace: string;
16478
+ } & {
16479
+ customerId: string;
16480
+ };
16481
+ };
16482
+ output: {
16483
+ success: false;
16484
+ error: string;
16485
+ };
16486
+ outputFormat: "json";
16487
+ status: 404;
16488
+ } | {
16489
+ input: {
16490
+ param: {
16491
+ workspace: string;
16492
+ } & {
16493
+ customerId: string;
16494
+ };
16495
+ };
16496
+ output: {
16497
+ success: true;
16498
+ tasks: {
16499
+ id: string;
16500
+ subject: string;
16501
+ description: string | null;
16502
+ visibility: string | null;
16503
+ status: string | null;
16504
+ priority: string | null;
16505
+ created_at: string;
16506
+ workspaceId: string;
16507
+ created_by: string;
16508
+ comments_count: number;
16509
+ }[] | null;
16510
+ };
16511
+ outputFormat: "json";
16512
+ status: 200;
16513
+ } | {
16514
+ input: {
16515
+ param: {
16516
+ workspace: string;
16517
+ } & {
16518
+ customerId: string;
16519
+ };
16520
+ };
16521
+ output: {
16522
+ success: false;
16523
+ error: string;
16524
+ };
16525
+ outputFormat: "json";
16526
+ status: 400;
15681
16527
  };
15682
16528
  };
15683
16529
  }, "/customers"> | import("hono/types").MergeSchemaPath<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,