@mestra-dev/contract 0.0.98 → 0.0.100

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 +1258 -103
  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";
@@ -1751,6 +1751,133 @@ declare const routes: import("hono/hono-base").HonoBase<{
1751
1751
  };
1752
1752
  };
1753
1753
  };
1754
+ readonly UploadToCustomerRequest: {
1755
+ readonly type: "object";
1756
+ readonly required: readonly [
1757
+ "filename",
1758
+ "contentType",
1759
+ "contentLength",
1760
+ "workspace",
1761
+ "customerId"
1762
+ ];
1763
+ readonly properties: {
1764
+ readonly filename: {
1765
+ readonly type: "string";
1766
+ readonly minLength: 1;
1767
+ readonly maxLength: 200;
1768
+ readonly description: "Safe file name (no path separators, not `.tmp`).";
1769
+ readonly example: "contract.pdf";
1770
+ };
1771
+ readonly contentType: {
1772
+ readonly $ref: "#/components/schemas/FileContentType";
1773
+ };
1774
+ readonly contentLength: {
1775
+ readonly type: "integer";
1776
+ readonly minimum: 1;
1777
+ readonly maximum: 15728640;
1778
+ readonly description: "Exact file byte length.";
1779
+ };
1780
+ readonly workspace: {
1781
+ readonly type: "string";
1782
+ readonly format: "uuid";
1783
+ readonly description: "Workspace identifier.";
1784
+ };
1785
+ readonly customerId: {
1786
+ readonly type: "string";
1787
+ readonly format: "uuid";
1788
+ readonly description: "Customer the file is attached to.";
1789
+ };
1790
+ };
1791
+ };
1792
+ readonly UploadToCustomerSuccess: {
1793
+ readonly type: "object";
1794
+ readonly required: readonly [
1795
+ "success",
1796
+ "url",
1797
+ "fields",
1798
+ "key",
1799
+ "maxSize"
1800
+ ];
1801
+ readonly properties: {
1802
+ readonly success: {
1803
+ readonly type: "boolean";
1804
+ readonly const: true;
1805
+ };
1806
+ readonly url: {
1807
+ readonly type: "string";
1808
+ readonly description: "S3 presigned POST URL.";
1809
+ };
1810
+ readonly fields: {
1811
+ readonly type: "object";
1812
+ readonly additionalProperties: {
1813
+ readonly type: "string";
1814
+ };
1815
+ readonly description: "Form fields to include in the multipart upload POST.";
1816
+ };
1817
+ readonly key: {
1818
+ readonly type: "string";
1819
+ readonly description: "Temporary S3 object key (`{workspace}_customers/{customerId}/{filename}.tmp`).";
1820
+ };
1821
+ readonly maxSize: {
1822
+ readonly type: "integer";
1823
+ readonly description: "Exact requested upload size in bytes.";
1824
+ };
1825
+ };
1826
+ };
1827
+ readonly ConfirmCustomerFileRequest: {
1828
+ readonly type: "object";
1829
+ readonly required: readonly [
1830
+ "filename",
1831
+ "workspace",
1832
+ "customerId"
1833
+ ];
1834
+ readonly properties: {
1835
+ readonly filename: {
1836
+ readonly type: "string";
1837
+ readonly minLength: 1;
1838
+ readonly maxLength: 200;
1839
+ readonly description: "Original file name used for `/files/upload-to-customer`.";
1840
+ readonly example: "contract.pdf";
1841
+ };
1842
+ readonly workspace: {
1843
+ readonly type: "string";
1844
+ readonly format: "uuid";
1845
+ readonly description: "Workspace identifier.";
1846
+ };
1847
+ readonly customerId: {
1848
+ readonly type: "string";
1849
+ readonly format: "uuid";
1850
+ readonly description: "Customer the file is attached to.";
1851
+ };
1852
+ };
1853
+ };
1854
+ readonly DeleteCustomerFileRequest: {
1855
+ readonly type: "object";
1856
+ readonly required: readonly [
1857
+ "filename",
1858
+ "workspace",
1859
+ "customerId"
1860
+ ];
1861
+ readonly properties: {
1862
+ readonly filename: {
1863
+ readonly type: "string";
1864
+ readonly minLength: 1;
1865
+ readonly maxLength: 200;
1866
+ readonly description: "Safe file name (no path separators, not `.tmp`).";
1867
+ readonly example: "contract.pdf";
1868
+ };
1869
+ readonly workspace: {
1870
+ readonly type: "string";
1871
+ readonly format: "uuid";
1872
+ readonly description: "Workspace identifier.";
1873
+ };
1874
+ readonly customerId: {
1875
+ readonly type: "string";
1876
+ readonly format: "uuid";
1877
+ readonly description: "Customer the file is attached to.";
1878
+ };
1879
+ };
1880
+ };
1754
1881
  readonly UploadToServiceRequest: {
1755
1882
  readonly type: "object";
1756
1883
  readonly required: readonly [
@@ -1992,6 +2119,59 @@ declare const routes: import("hono/hono-base").HonoBase<{
1992
2119
  };
1993
2120
  };
1994
2121
  };
2122
+ readonly CustomerFile: {
2123
+ readonly type: "object";
2124
+ readonly required: readonly [
2125
+ "key",
2126
+ "filename",
2127
+ "size",
2128
+ "downloadUrl"
2129
+ ];
2130
+ readonly properties: {
2131
+ readonly key: {
2132
+ readonly type: "string";
2133
+ readonly description: "Full S3 object key (`{workspace}_customers/{customerId}/{filename}`).";
2134
+ };
2135
+ readonly filename: {
2136
+ readonly type: "string";
2137
+ readonly description: "File name under `{workspace}_customers/{customerId}/`.";
2138
+ };
2139
+ readonly size: {
2140
+ readonly type: "integer";
2141
+ readonly description: "Object size in bytes.";
2142
+ };
2143
+ readonly lastModified: {
2144
+ readonly type: "string";
2145
+ readonly format: "date-time";
2146
+ readonly nullable: true;
2147
+ readonly description: "Last modified timestamp from S3 (ISO string).";
2148
+ };
2149
+ readonly downloadUrl: {
2150
+ readonly type: "string";
2151
+ readonly description: "Presigned GET URL (5-minute expiry).";
2152
+ };
2153
+ };
2154
+ };
2155
+ readonly ListCustomerFilesSuccess: {
2156
+ readonly type: "object";
2157
+ readonly required: readonly [
2158
+ "success",
2159
+ "files"
2160
+ ];
2161
+ readonly properties: {
2162
+ readonly success: {
2163
+ readonly type: "boolean";
2164
+ readonly const: true;
2165
+ };
2166
+ readonly files: {
2167
+ readonly type: "array";
2168
+ readonly items: {
2169
+ readonly $ref: "#/components/schemas/CustomerFile";
2170
+ };
2171
+ readonly description: "All non-prefix, non-`.tmp` objects under `{workspace}_customers/{customerId}/`.";
2172
+ };
2173
+ };
2174
+ };
1995
2175
  readonly UploadProfilePictureRequest: {
1996
2176
  readonly type: "object";
1997
2177
  readonly required: readonly [
@@ -2250,6 +2430,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
2250
2430
  "usedBytes",
2251
2431
  "filesBytes",
2252
2432
  "commentsBytes",
2433
+ "customerBytes",
2253
2434
  "servicesBytes",
2254
2435
  "limitBytes"
2255
2436
  ];
@@ -2260,7 +2441,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
2260
2441
  };
2261
2442
  readonly usedBytes: {
2262
2443
  readonly type: "integer";
2263
- readonly description: "Total finalized storage in bytes (`filesBytes` + `commentsBytes` + `servicesBytes`). Excludes `.tmp` objects.";
2444
+ readonly description: "Total finalized storage in bytes (`filesBytes` + `commentsBytes` + `customerBytes` + `servicesBytes`). Excludes `.tmp` objects.";
2264
2445
  readonly example: 348320;
2265
2446
  };
2266
2447
  readonly filesBytes: {
@@ -2273,6 +2454,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
2273
2454
  readonly description: "Finalized comment attachment storage under `{workspace}_comments/`. Excludes `.tmp`.";
2274
2455
  readonly example: 100000;
2275
2456
  };
2457
+ readonly customerBytes: {
2458
+ readonly type: "integer";
2459
+ readonly description: "Finalized customer file storage under `{workspace}_customers/`. Excludes `.tmp`.";
2460
+ readonly example: 50000;
2461
+ };
2276
2462
  readonly servicesBytes: {
2277
2463
  readonly type: "integer";
2278
2464
  readonly description: "Finalized service file storage under `{workspace}_services/`. Excludes `.tmp`.";
@@ -9247,13 +9433,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
9247
9433
  };
9248
9434
  };
9249
9435
  };
9250
- readonly "/services/create": {
9436
+ readonly "/customers/update": {
9251
9437
  readonly post: {
9252
9438
  readonly tags: readonly [
9253
- "Services"
9439
+ "Customers"
9254
9440
  ];
9255
- readonly summary: "Create a new service";
9256
- readonly description: "Creates a category-specific service in the specified workspace. Real-estate workspaces persist a listing on service_real_estates. Requires workspace access, write access to crm::services, and billing capacity for services.";
9441
+ readonly summary: "Update a customer";
9442
+ 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
9443
  readonly security: readonly [
9258
9444
  never
9259
9445
  ];
@@ -9265,80 +9451,629 @@ declare const routes: import("hono/hono-base").HonoBase<{
9265
9451
  readonly type: "object";
9266
9452
  readonly required: readonly [
9267
9453
  "workspace",
9268
- "title"
9454
+ "customerId"
9269
9455
  ];
9270
9456
  readonly properties: {
9271
9457
  readonly workspace: {
9272
9458
  readonly type: "string";
9273
9459
  readonly format: "uuid";
9274
- readonly description: "Workspace identifier where the service is created.";
9460
+ readonly description: "Workspace identifier where the customer belongs.";
9275
9461
  };
9276
- readonly title: {
9462
+ readonly customerId: {
9277
9463
  readonly type: "string";
9278
- readonly description: "Listing title.";
9279
- };
9280
- readonly active: {
9281
- readonly type: "boolean";
9282
- readonly description: "Whether the listing is active. Defaults to true when omitted.";
9464
+ readonly format: "uuid";
9465
+ readonly description: "Customer identifier to update.";
9283
9466
  };
9284
- readonly type: {
9467
+ readonly name: {
9285
9468
  readonly type: "string";
9286
9469
  };
9287
- readonly currency: {
9470
+ readonly type: {
9288
9471
  readonly type: "string";
9289
9472
  readonly enum: readonly [
9290
- "USD",
9291
- "EUR",
9292
- "RUB"
9473
+ "buyer",
9474
+ "seller",
9475
+ "tenant",
9476
+ "landlord",
9477
+ "investor",
9478
+ "agent"
9293
9479
  ];
9294
9480
  };
9295
- readonly description: {
9296
- readonly type: "string";
9297
- };
9298
- readonly price: {
9299
- readonly type: "number";
9300
- };
9301
- readonly propertyType: {
9481
+ readonly companyName: {
9302
9482
  readonly type: "string";
9303
9483
  };
9304
- readonly propertyStatus: {
9484
+ readonly phone: {
9305
9485
  readonly type: "string";
9486
+ readonly description: "E.164 phone number.";
9306
9487
  };
9307
- readonly commercialType: {
9488
+ readonly telegram: {
9308
9489
  readonly type: "string";
9309
9490
  };
9310
- readonly commercialClass: {
9491
+ readonly whatsapp: {
9311
9492
  readonly type: "string";
9493
+ readonly description: "E.164 WhatsApp number.";
9312
9494
  };
9313
- readonly landType: {
9495
+ readonly email: {
9314
9496
  readonly type: "string";
9497
+ readonly format: "email";
9315
9498
  };
9316
- readonly ownershipType: {
9499
+ readonly leadSource: {
9317
9500
  readonly type: "string";
9501
+ readonly enum: readonly [
9502
+ "cian",
9503
+ "avito",
9504
+ "vk",
9505
+ "yandex",
9506
+ "website",
9507
+ "referral",
9508
+ "walk_in"
9509
+ ];
9318
9510
  };
9319
- readonly loadingDockAccess: {
9320
- readonly type: "boolean";
9511
+ readonly budgetMin: {
9512
+ readonly type: "number";
9513
+ readonly minimum: 0;
9321
9514
  };
9322
- readonly waterAccess: {
9323
- readonly type: "boolean";
9515
+ readonly budgetMax: {
9516
+ readonly type: "number";
9517
+ readonly minimum: 0;
9324
9518
  };
9325
- readonly electricityAccess: {
9326
- readonly type: "boolean";
9519
+ readonly inHandBudget: {
9520
+ readonly type: "number";
9521
+ readonly minimum: 0;
9327
9522
  };
9328
- readonly gasAccess: {
9329
- readonly type: "boolean";
9523
+ readonly installmentBudget: {
9524
+ readonly type: "number";
9525
+ readonly minimum: 0;
9330
9526
  };
9331
- readonly sewageAccess: {
9332
- readonly type: "boolean";
9527
+ readonly minArea: {
9528
+ readonly type: "number";
9529
+ readonly minimum: 0;
9333
9530
  };
9334
- readonly internetAccess: {
9335
- readonly type: "boolean";
9531
+ readonly maxArea: {
9532
+ readonly type: "number";
9533
+ readonly minimum: 0;
9336
9534
  };
9337
- readonly elevaorAccess: {
9338
- readonly type: "boolean";
9535
+ readonly roomsCount: {
9536
+ readonly type: "integer";
9537
+ readonly minimum: 0;
9339
9538
  };
9340
- readonly seprateEntrance: {
9341
- readonly type: "boolean";
9539
+ readonly preferredDistricts: {
9540
+ readonly type: "array";
9541
+ readonly items: {
9542
+ readonly type: "string";
9543
+ };
9544
+ };
9545
+ readonly propertyType: {
9546
+ readonly type: "string";
9547
+ };
9548
+ readonly maxMetroDistance: {
9549
+ readonly type: "number";
9550
+ readonly minimum: 0;
9551
+ };
9552
+ readonly dealStatus: {
9553
+ readonly type: "string";
9554
+ readonly enum: readonly [
9555
+ "just_browsing",
9556
+ "serious_buyer",
9557
+ "mortgage_approved",
9558
+ "signed_contract",
9559
+ "closed_deal"
9560
+ ];
9561
+ };
9562
+ readonly preferredPaymentMethod: {
9563
+ readonly type: "string";
9564
+ readonly enum: readonly [
9565
+ "full_payment",
9566
+ "mortgage",
9567
+ "installment"
9568
+ ];
9569
+ };
9570
+ readonly childrenCount: {
9571
+ readonly type: "integer";
9572
+ readonly minimum: 0;
9573
+ };
9574
+ readonly hasPets: {
9575
+ readonly type: "boolean";
9576
+ };
9577
+ readonly carsCount: {
9578
+ readonly type: "integer";
9579
+ readonly minimum: 0;
9580
+ };
9581
+ readonly birthDate: {
9582
+ readonly type: "string";
9583
+ readonly format: "date-time";
9584
+ };
9585
+ readonly notes: {
9586
+ readonly type: "string";
9587
+ };
9588
+ };
9589
+ };
9590
+ };
9591
+ };
9592
+ };
9593
+ readonly responses: {
9594
+ readonly 200: {
9595
+ readonly description: "Customer updated successfully.";
9596
+ readonly content: {
9597
+ readonly "application/json": {
9598
+ readonly schema: {
9599
+ readonly $ref: "#/components/schemas/UpdateCustomerSuccess";
9600
+ };
9601
+ };
9602
+ };
9603
+ };
9604
+ readonly 400: {
9605
+ readonly description: "Invalid request payload or unsupported workspace category.";
9606
+ readonly content: {
9607
+ readonly "application/json": {
9608
+ readonly schema: {
9609
+ readonly $ref: "#/components/schemas/ErrorResponse";
9610
+ };
9611
+ };
9612
+ };
9613
+ };
9614
+ readonly 404: {
9615
+ readonly description: "Customer or workspace not found.";
9616
+ readonly content: {
9617
+ readonly "application/json": {
9618
+ readonly schema: {
9619
+ readonly $ref: "#/components/schemas/ErrorResponse";
9620
+ };
9621
+ };
9622
+ };
9623
+ };
9624
+ readonly 401: {
9625
+ readonly description: "Unauthorized - Missing or invalid access token.";
9626
+ readonly content: {
9627
+ readonly "application/json": {
9628
+ readonly schema: {
9629
+ readonly $ref: "#/components/schemas/ErrorResponse";
9630
+ };
9631
+ };
9632
+ };
9633
+ };
9634
+ readonly 403: {
9635
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, write access to crm::customers, or billing access for customers.";
9636
+ readonly content: {
9637
+ readonly "application/json": {
9638
+ readonly schema: {
9639
+ readonly $ref: "#/components/schemas/ErrorResponse";
9640
+ };
9641
+ };
9642
+ };
9643
+ };
9644
+ };
9645
+ };
9646
+ };
9647
+ readonly "/customers/get/{workspace}/{customerId}": {
9648
+ readonly get: {
9649
+ readonly tags: readonly [
9650
+ "Customers"
9651
+ ];
9652
+ readonly summary: "Get a customer by ID";
9653
+ 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.";
9654
+ readonly security: readonly [
9655
+ never
9656
+ ];
9657
+ readonly parameters: readonly [
9658
+ {
9659
+ readonly name: "workspace";
9660
+ readonly in: "path";
9661
+ readonly required: true;
9662
+ readonly schema: {
9663
+ readonly type: "string";
9664
+ readonly format: "uuid";
9665
+ };
9666
+ readonly description: "Workspace identifier.";
9667
+ },
9668
+ {
9669
+ readonly name: "customerId";
9670
+ readonly in: "path";
9671
+ readonly required: true;
9672
+ readonly schema: {
9673
+ readonly type: "string";
9674
+ readonly format: "uuid";
9675
+ };
9676
+ readonly description: "Customer identifier.";
9677
+ }
9678
+ ];
9679
+ readonly responses: {
9680
+ readonly 200: {
9681
+ readonly description: "Customer fetched successfully.";
9682
+ readonly content: {
9683
+ readonly "application/json": {
9684
+ readonly schema: {
9685
+ readonly $ref: "#/components/schemas/GetCustomerSuccess";
9686
+ };
9687
+ };
9688
+ };
9689
+ };
9690
+ readonly 400: {
9691
+ readonly description: "Unsupported workspace category.";
9692
+ readonly content: {
9693
+ readonly "application/json": {
9694
+ readonly schema: {
9695
+ readonly $ref: "#/components/schemas/ErrorResponse";
9696
+ };
9697
+ };
9698
+ };
9699
+ };
9700
+ readonly 404: {
9701
+ readonly description: "Customer or workspace not found.";
9702
+ readonly content: {
9703
+ readonly "application/json": {
9704
+ readonly schema: {
9705
+ readonly $ref: "#/components/schemas/ErrorResponse";
9706
+ };
9707
+ };
9708
+ };
9709
+ };
9710
+ readonly 401: {
9711
+ readonly description: "Unauthorized - Missing or invalid access token.";
9712
+ readonly content: {
9713
+ readonly "application/json": {
9714
+ readonly schema: {
9715
+ readonly $ref: "#/components/schemas/ErrorResponse";
9716
+ };
9717
+ };
9718
+ };
9719
+ };
9720
+ readonly 403: {
9721
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::customers resource.";
9722
+ readonly content: {
9723
+ readonly "application/json": {
9724
+ readonly schema: {
9725
+ readonly $ref: "#/components/schemas/ErrorResponse";
9726
+ };
9727
+ };
9728
+ };
9729
+ };
9730
+ };
9731
+ };
9732
+ };
9733
+ readonly "/customers/list/{workspace}": {
9734
+ readonly get: {
9735
+ readonly tags: readonly [
9736
+ "Customers"
9737
+ ];
9738
+ readonly summary: "List customers in workspace";
9739
+ 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.";
9740
+ readonly security: readonly [
9741
+ never
9742
+ ];
9743
+ readonly parameters: readonly [
9744
+ {
9745
+ readonly name: "workspace";
9746
+ readonly in: "path";
9747
+ readonly required: true;
9748
+ readonly description: "Workspace identifier where customers belong.";
9749
+ readonly schema: {
9750
+ readonly type: "string";
9751
+ readonly format: "uuid";
9752
+ };
9753
+ }
9754
+ ];
9755
+ readonly responses: {
9756
+ readonly 200: {
9757
+ readonly description: "Customers fetched successfully.";
9758
+ readonly content: {
9759
+ readonly "application/json": {
9760
+ readonly schema: {
9761
+ readonly $ref: "#/components/schemas/ListCustomersSuccess";
9762
+ };
9763
+ };
9764
+ };
9765
+ };
9766
+ readonly 400: {
9767
+ readonly description: "Unsupported workspace category.";
9768
+ readonly content: {
9769
+ readonly "application/json": {
9770
+ readonly schema: {
9771
+ readonly $ref: "#/components/schemas/ErrorResponse";
9772
+ };
9773
+ };
9774
+ };
9775
+ };
9776
+ readonly 404: {
9777
+ readonly description: "Workspace not found.";
9778
+ readonly content: {
9779
+ readonly "application/json": {
9780
+ readonly schema: {
9781
+ readonly $ref: "#/components/schemas/ErrorResponse";
9782
+ };
9783
+ };
9784
+ };
9785
+ };
9786
+ readonly 401: {
9787
+ readonly description: "Unauthorized - Missing or invalid access token.";
9788
+ readonly content: {
9789
+ readonly "application/json": {
9790
+ readonly schema: {
9791
+ readonly $ref: "#/components/schemas/ErrorResponse";
9792
+ };
9793
+ };
9794
+ };
9795
+ };
9796
+ readonly 403: {
9797
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::customers resource.";
9798
+ readonly content: {
9799
+ readonly "application/json": {
9800
+ readonly schema: {
9801
+ readonly $ref: "#/components/schemas/ErrorResponse";
9802
+ };
9803
+ };
9804
+ };
9805
+ };
9806
+ };
9807
+ };
9808
+ };
9809
+ readonly "/customers/delete": {
9810
+ readonly post: {
9811
+ readonly tags: readonly [
9812
+ "Customers"
9813
+ ];
9814
+ readonly summary: "Delete a customer";
9815
+ 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.";
9816
+ readonly security: readonly [
9817
+ never
9818
+ ];
9819
+ readonly requestBody: {
9820
+ readonly required: true;
9821
+ readonly content: {
9822
+ readonly "application/json": {
9823
+ readonly schema: {
9824
+ readonly type: "object";
9825
+ readonly required: readonly [
9826
+ "customerId",
9827
+ "workspace"
9828
+ ];
9829
+ readonly properties: {
9830
+ readonly customerId: {
9831
+ readonly type: "string";
9832
+ readonly format: "uuid";
9833
+ readonly description: "Customer identifier.";
9834
+ };
9835
+ readonly workspace: {
9836
+ readonly type: "string";
9837
+ readonly format: "uuid";
9838
+ readonly description: "Workspace identifier.";
9839
+ };
9840
+ };
9841
+ };
9842
+ };
9843
+ };
9844
+ };
9845
+ readonly responses: {
9846
+ readonly 200: {
9847
+ readonly description: "Customer deleted successfully.";
9848
+ readonly content: {
9849
+ readonly "application/json": {
9850
+ readonly schema: {
9851
+ readonly $ref: "#/components/schemas/SimpleSuccess";
9852
+ };
9853
+ };
9854
+ };
9855
+ };
9856
+ readonly 400: {
9857
+ readonly description: "Invalid request payload or unsupported workspace category.";
9858
+ readonly content: {
9859
+ readonly "application/json": {
9860
+ readonly schema: {
9861
+ readonly $ref: "#/components/schemas/ErrorResponse";
9862
+ };
9863
+ };
9864
+ };
9865
+ };
9866
+ readonly 404: {
9867
+ readonly description: "Customer or workspace not found.";
9868
+ readonly content: {
9869
+ readonly "application/json": {
9870
+ readonly schema: {
9871
+ readonly $ref: "#/components/schemas/ErrorResponse";
9872
+ };
9873
+ };
9874
+ };
9875
+ };
9876
+ readonly 401: {
9877
+ readonly description: "Unauthorized - Missing or invalid access token.";
9878
+ readonly content: {
9879
+ readonly "application/json": {
9880
+ readonly schema: {
9881
+ readonly $ref: "#/components/schemas/ErrorResponse";
9882
+ };
9883
+ };
9884
+ };
9885
+ };
9886
+ readonly 403: {
9887
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::customers resource.";
9888
+ readonly content: {
9889
+ readonly "application/json": {
9890
+ readonly schema: {
9891
+ readonly $ref: "#/components/schemas/ErrorResponse";
9892
+ };
9893
+ };
9894
+ };
9895
+ };
9896
+ };
9897
+ };
9898
+ };
9899
+ readonly "/customers/get-tasks/{workspace}/{customerId}": {
9900
+ readonly get: {
9901
+ readonly tags: readonly [
9902
+ "Customers"
9903
+ ];
9904
+ readonly summary: "List tasks for a customer";
9905
+ readonly description: "Returns tasks linked to the specified customer in the workspace. Requires workspace access and read access to crm::tasks resource.";
9906
+ readonly security: readonly [
9907
+ never
9908
+ ];
9909
+ readonly parameters: readonly [
9910
+ {
9911
+ readonly name: "workspace";
9912
+ readonly in: "path";
9913
+ readonly required: true;
9914
+ readonly schema: {
9915
+ readonly type: "string";
9916
+ readonly format: "uuid";
9917
+ };
9918
+ readonly description: "Workspace identifier.";
9919
+ },
9920
+ {
9921
+ readonly name: "customerId";
9922
+ readonly in: "path";
9923
+ readonly required: true;
9924
+ readonly schema: {
9925
+ readonly type: "string";
9926
+ readonly format: "uuid";
9927
+ };
9928
+ readonly description: "Customer identifier.";
9929
+ }
9930
+ ];
9931
+ readonly responses: {
9932
+ readonly 200: {
9933
+ readonly description: "Tasks fetched successfully.";
9934
+ readonly content: {
9935
+ readonly "application/json": {
9936
+ readonly schema: {
9937
+ readonly $ref: "#/components/schemas/ListTasksSuccess";
9938
+ };
9939
+ };
9940
+ };
9941
+ };
9942
+ readonly 400: {
9943
+ readonly description: "Unsupported workspace category.";
9944
+ readonly content: {
9945
+ readonly "application/json": {
9946
+ readonly schema: {
9947
+ readonly $ref: "#/components/schemas/ErrorResponse";
9948
+ };
9949
+ };
9950
+ };
9951
+ };
9952
+ readonly 404: {
9953
+ readonly description: "Customer or workspace not found.";
9954
+ readonly content: {
9955
+ readonly "application/json": {
9956
+ readonly schema: {
9957
+ readonly $ref: "#/components/schemas/ErrorResponse";
9958
+ };
9959
+ };
9960
+ };
9961
+ };
9962
+ readonly 401: {
9963
+ readonly description: "Unauthorized - Missing or invalid access token.";
9964
+ readonly content: {
9965
+ readonly "application/json": {
9966
+ readonly schema: {
9967
+ readonly $ref: "#/components/schemas/ErrorResponse";
9968
+ };
9969
+ };
9970
+ };
9971
+ };
9972
+ readonly 403: {
9973
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::tasks resource.";
9974
+ readonly content: {
9975
+ readonly "application/json": {
9976
+ readonly schema: {
9977
+ readonly $ref: "#/components/schemas/ErrorResponse";
9978
+ };
9979
+ };
9980
+ };
9981
+ };
9982
+ };
9983
+ };
9984
+ };
9985
+ readonly "/services/create": {
9986
+ readonly post: {
9987
+ readonly tags: readonly [
9988
+ "Services"
9989
+ ];
9990
+ readonly summary: "Create a new service";
9991
+ readonly description: "Creates a category-specific service in the specified workspace. Real-estate workspaces persist a listing on service_real_estates. Requires workspace access, write access to crm::services, and billing capacity for services.";
9992
+ readonly security: readonly [
9993
+ never
9994
+ ];
9995
+ readonly requestBody: {
9996
+ readonly required: true;
9997
+ readonly content: {
9998
+ readonly "application/json": {
9999
+ readonly schema: {
10000
+ readonly type: "object";
10001
+ readonly required: readonly [
10002
+ "workspace",
10003
+ "title"
10004
+ ];
10005
+ readonly properties: {
10006
+ readonly workspace: {
10007
+ readonly type: "string";
10008
+ readonly format: "uuid";
10009
+ readonly description: "Workspace identifier where the service is created.";
10010
+ };
10011
+ readonly title: {
10012
+ readonly type: "string";
10013
+ readonly description: "Listing title.";
10014
+ };
10015
+ readonly active: {
10016
+ readonly type: "boolean";
10017
+ readonly description: "Whether the listing is active. Defaults to true when omitted.";
10018
+ };
10019
+ readonly type: {
10020
+ readonly type: "string";
10021
+ };
10022
+ readonly currency: {
10023
+ readonly type: "string";
10024
+ readonly enum: readonly [
10025
+ "USD",
10026
+ "EUR",
10027
+ "RUB"
10028
+ ];
10029
+ };
10030
+ readonly description: {
10031
+ readonly type: "string";
10032
+ };
10033
+ readonly price: {
10034
+ readonly type: "number";
10035
+ };
10036
+ readonly propertyType: {
10037
+ readonly type: "string";
10038
+ };
10039
+ readonly propertyStatus: {
10040
+ readonly type: "string";
10041
+ };
10042
+ readonly commercialType: {
10043
+ readonly type: "string";
10044
+ };
10045
+ readonly commercialClass: {
10046
+ readonly type: "string";
10047
+ };
10048
+ readonly landType: {
10049
+ readonly type: "string";
10050
+ };
10051
+ readonly ownershipType: {
10052
+ readonly type: "string";
10053
+ };
10054
+ readonly loadingDockAccess: {
10055
+ readonly type: "boolean";
10056
+ };
10057
+ readonly waterAccess: {
10058
+ readonly type: "boolean";
10059
+ };
10060
+ readonly electricityAccess: {
10061
+ readonly type: "boolean";
10062
+ };
10063
+ readonly gasAccess: {
10064
+ readonly type: "boolean";
10065
+ };
10066
+ readonly sewageAccess: {
10067
+ readonly type: "boolean";
10068
+ };
10069
+ readonly internetAccess: {
10070
+ readonly type: "boolean";
10071
+ };
10072
+ readonly elevaorAccess: {
10073
+ readonly type: "boolean";
10074
+ };
10075
+ readonly seprateEntrance: {
10076
+ readonly type: "boolean";
9342
10077
  };
9343
10078
  readonly furnishedType: {
9344
10079
  readonly type: "string";
@@ -11993,7 +12728,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11993
12728
  "Files"
11994
12729
  ];
11995
12730
  readonly summary: "Get workspace storage usage";
11996
- readonly description: "Returns finalized storage usage broken down by workspace files (`filesBytes`), comment attachments (`commentsBytes`), and service files (`servicesBytes`), plus the combined total and plan limit. Temporary `.tmp` objects are excluded. Requires workspace access and read access to crm::files.";
12731
+ readonly description: "Returns finalized storage usage broken down by workspace files (`filesBytes`), comment attachments (`commentsBytes`), customer files (`customerBytes`), and service files (`servicesBytes`), plus the combined total and plan limit. Temporary `.tmp` objects are excluded. Requires workspace access and read access to crm::files.";
11997
12732
  readonly security: readonly [
11998
12733
  never
11999
12734
  ];
@@ -12826,6 +13561,204 @@ declare const routes: import("hono/hono-base").HonoBase<{
12826
13561
  };
12827
13562
  };
12828
13563
  };
13564
+ readonly "/files/upload-to-customer": {
13565
+ readonly post: {
13566
+ readonly tags: readonly [
13567
+ "Files"
13568
+ ];
13569
+ readonly summary: "Create presigned upload for a customer file";
13570
+ readonly description: "Returns a presigned POST for `{workspace}_customers/{customerId}/{filename}.tmp`. JPEG, PNG, WebP, and PDF files up to 15 MB are supported. The customer must belong to a real-estate workspace. Confirm the upload with `/files/confirm-customer-file`.";
13571
+ readonly security: readonly [
13572
+ never
13573
+ ];
13574
+ readonly requestBody: {
13575
+ readonly required: true;
13576
+ readonly content: {
13577
+ readonly "application/json": {
13578
+ readonly schema: {
13579
+ readonly $ref: "#/components/schemas/UploadToCustomerRequest";
13580
+ };
13581
+ };
13582
+ };
13583
+ };
13584
+ readonly responses: {
13585
+ readonly 200: {
13586
+ readonly description: "Presigned customer upload created.";
13587
+ readonly content: {
13588
+ readonly "application/json": {
13589
+ readonly schema: {
13590
+ readonly $ref: "#/components/schemas/UploadToCustomerSuccess";
13591
+ };
13592
+ };
13593
+ };
13594
+ };
13595
+ readonly 400: {
13596
+ readonly description: "Invalid payload or unsupported workspace category.";
13597
+ readonly content: {
13598
+ readonly "application/json": {
13599
+ readonly schema: {
13600
+ readonly $ref: "#/components/schemas/ErrorResponse";
13601
+ };
13602
+ };
13603
+ };
13604
+ };
13605
+ readonly 404: {
13606
+ readonly description: "Real-estate customer not found.";
13607
+ readonly content: {
13608
+ readonly "application/json": {
13609
+ readonly schema: {
13610
+ readonly $ref: "#/components/schemas/ErrorResponse";
13611
+ };
13612
+ };
13613
+ };
13614
+ };
13615
+ };
13616
+ };
13617
+ };
13618
+ readonly "/files/confirm-customer-file": {
13619
+ readonly post: {
13620
+ readonly tags: readonly [
13621
+ "Files"
13622
+ ];
13623
+ readonly summary: "Confirm a customer file upload";
13624
+ readonly description: "Validates and promotes `{workspace}_customers/{customerId}/{filename}.tmp` to its finalized key. Confirmed bytes contribute to `customerBytes`.";
13625
+ readonly security: readonly [
13626
+ never
13627
+ ];
13628
+ readonly requestBody: {
13629
+ readonly required: true;
13630
+ readonly content: {
13631
+ readonly "application/json": {
13632
+ readonly schema: {
13633
+ readonly $ref: "#/components/schemas/ConfirmCustomerFileRequest";
13634
+ };
13635
+ };
13636
+ };
13637
+ };
13638
+ readonly responses: {
13639
+ readonly 200: {
13640
+ readonly description: "Customer file confirmed.";
13641
+ readonly content: {
13642
+ readonly "application/json": {
13643
+ readonly schema: {
13644
+ readonly $ref: "#/components/schemas/ConfirmFileSuccess";
13645
+ };
13646
+ };
13647
+ };
13648
+ };
13649
+ readonly 400: {
13650
+ readonly description: "Invalid request, missing temporary object, oversized file, or invalid file type.";
13651
+ readonly content: {
13652
+ readonly "application/json": {
13653
+ readonly schema: {
13654
+ readonly $ref: "#/components/schemas/ErrorResponse";
13655
+ };
13656
+ };
13657
+ };
13658
+ };
13659
+ };
13660
+ };
13661
+ };
13662
+ readonly "/files/download-from-customer/{workspace}/{customerId}": {
13663
+ readonly get: {
13664
+ readonly tags: readonly [
13665
+ "Files"
13666
+ ];
13667
+ readonly summary: "List files for a customer";
13668
+ readonly description: "Lists finalized objects under `{workspace}_customers/{customerId}/`, each with a 5-minute presigned download URL. Requires workspace access and read access to crm::customers.";
13669
+ readonly security: readonly [
13670
+ never
13671
+ ];
13672
+ readonly parameters: readonly [
13673
+ {
13674
+ readonly name: "workspace";
13675
+ readonly in: "path";
13676
+ readonly required: true;
13677
+ readonly schema: {
13678
+ readonly type: "string";
13679
+ readonly format: "uuid";
13680
+ };
13681
+ readonly description: "Workspace identifier.";
13682
+ },
13683
+ {
13684
+ readonly name: "customerId";
13685
+ readonly in: "path";
13686
+ readonly required: true;
13687
+ readonly schema: {
13688
+ readonly type: "string";
13689
+ readonly format: "uuid";
13690
+ };
13691
+ readonly description: "Customer identifier.";
13692
+ }
13693
+ ];
13694
+ readonly responses: {
13695
+ readonly 200: {
13696
+ readonly description: "Customer files listed.";
13697
+ readonly content: {
13698
+ readonly "application/json": {
13699
+ readonly schema: {
13700
+ readonly $ref: "#/components/schemas/ListCustomerFilesSuccess";
13701
+ };
13702
+ };
13703
+ };
13704
+ };
13705
+ readonly 403: {
13706
+ readonly description: "Workspace or customer read access is missing.";
13707
+ readonly content: {
13708
+ readonly "application/json": {
13709
+ readonly schema: {
13710
+ readonly $ref: "#/components/schemas/ErrorResponse";
13711
+ };
13712
+ };
13713
+ };
13714
+ };
13715
+ };
13716
+ };
13717
+ };
13718
+ readonly "/files/delete-customer-file": {
13719
+ readonly post: {
13720
+ readonly tags: readonly [
13721
+ "Files"
13722
+ ];
13723
+ readonly summary: "Delete a customer file";
13724
+ readonly description: "Deletes `{workspace}_customers/{customerId}/{filename}`. Requires workspace access, write access to crm::customers, and billing access.";
13725
+ readonly security: readonly [
13726
+ never
13727
+ ];
13728
+ readonly requestBody: {
13729
+ readonly required: true;
13730
+ readonly content: {
13731
+ readonly "application/json": {
13732
+ readonly schema: {
13733
+ readonly $ref: "#/components/schemas/DeleteCustomerFileRequest";
13734
+ };
13735
+ };
13736
+ };
13737
+ };
13738
+ readonly responses: {
13739
+ readonly 200: {
13740
+ readonly description: "Customer file deleted.";
13741
+ readonly content: {
13742
+ readonly "application/json": {
13743
+ readonly schema: {
13744
+ readonly $ref: "#/components/schemas/DeleteFileSuccess";
13745
+ };
13746
+ };
13747
+ };
13748
+ };
13749
+ readonly 404: {
13750
+ readonly description: "File not found.";
13751
+ readonly content: {
13752
+ readonly "application/json": {
13753
+ readonly schema: {
13754
+ readonly $ref: "#/components/schemas/DeleteFileFailure";
13755
+ };
13756
+ };
13757
+ };
13758
+ };
13759
+ };
13760
+ };
13761
+ };
12829
13762
  readonly "/files/delete-comment-file": {
12830
13763
  readonly post: {
12831
13764
  readonly tags: readonly [
@@ -15677,43 +16610,80 @@ declare const routes: import("hono/hono-base").HonoBase<{
15677
16610
  }[];
15678
16611
  };
15679
16612
  outputFormat: "json";
15680
- status: 201;
15681
- };
15682
- };
15683
- } & {
15684
- "/list/:workspace": {
15685
- $get: {
16613
+ status: 201;
16614
+ };
16615
+ };
16616
+ } & {
16617
+ "/list/:workspace": {
16618
+ $get: {
16619
+ input: {
16620
+ param: {
16621
+ workspace: string;
16622
+ };
16623
+ };
16624
+ output: {
16625
+ success: false;
16626
+ error: string;
16627
+ };
16628
+ outputFormat: "json";
16629
+ status: 404;
16630
+ } | {
16631
+ input: {
16632
+ param: {
16633
+ workspace: string;
16634
+ };
16635
+ };
16636
+ output: {
16637
+ success: true;
16638
+ customers: {
16639
+ updated_at: string | null;
16640
+ deleted_at: string | null;
16641
+ verified_at: string | null;
16642
+ suspended_at: string | null;
16643
+ created_at: string;
16644
+ id: string;
16645
+ workspaceId: string;
16646
+ type: string | null;
16647
+ name: string;
16648
+ companyName: string | null;
16649
+ phone: string | null;
16650
+ telegram: string | null;
16651
+ whatsapp: string | null;
16652
+ email: string | null;
16653
+ leadSource: string | null;
16654
+ budgetMin: number | null;
16655
+ budgetMax: number | null;
16656
+ inHandBudget: number | null;
16657
+ installmentBudget: number | null;
16658
+ minArea: number | null;
16659
+ maxArea: number | null;
16660
+ roomsCount: number | null;
16661
+ preferredDistricts: string[] | null;
16662
+ propertyType: string | null;
16663
+ maxMetroDistance: number | null;
16664
+ dealStatus: string | null;
16665
+ preferredPaymentMethod: string | null;
16666
+ childrenCount: number | null;
16667
+ hasPets: boolean | null;
16668
+ carsCount: number | null;
16669
+ birthDate: string | null;
16670
+ notes: string | null;
16671
+ }[];
16672
+ };
16673
+ outputFormat: "json";
16674
+ status: 200;
16675
+ } | {
15686
16676
  input: {
15687
16677
  param: {
15688
16678
  workspace: string;
15689
16679
  };
15690
16680
  };
15691
16681
  output: {
15692
- success: true;
15693
- customers: {
15694
- updated_at: string | null;
15695
- deleted_at: string | null;
15696
- verified_at: string | null;
15697
- suspended_at: string | null;
15698
- created_at: string;
15699
- id: string;
15700
- workspaceId: string;
15701
- name: string;
15702
- email: string | null;
15703
- website: string | null;
15704
- type: string | null;
15705
- description: string | null;
15706
- active: boolean | null;
15707
- phone: string | null;
15708
- companyPhone: string | null;
15709
- companyAddress: string | null;
15710
- address: string | null;
15711
- birthDate: string | null;
15712
- utmSource: string | null;
15713
- }[];
16682
+ success: false;
16683
+ error: string;
15714
16684
  };
15715
16685
  outputFormat: "json";
15716
- status: 200;
16686
+ status: 400;
15717
16687
  };
15718
16688
  };
15719
16689
  } & {
@@ -15750,22 +16720,49 @@ declare const routes: import("hono/hono-base").HonoBase<{
15750
16720
  created_at: string;
15751
16721
  id: string;
15752
16722
  workspaceId: string;
15753
- name: string;
15754
- email: string | null;
15755
- website: string | null;
15756
16723
  type: string | null;
15757
- description: string | null;
15758
- active: boolean | null;
16724
+ name: string;
16725
+ companyName: string | null;
15759
16726
  phone: string | null;
15760
- companyPhone: string | null;
15761
- companyAddress: string | null;
15762
- address: string | null;
16727
+ telegram: string | null;
16728
+ whatsapp: string | null;
16729
+ email: string | null;
16730
+ leadSource: string | null;
16731
+ budgetMin: number | null;
16732
+ budgetMax: number | null;
16733
+ inHandBudget: number | null;
16734
+ installmentBudget: number | null;
16735
+ minArea: number | null;
16736
+ maxArea: number | null;
16737
+ roomsCount: number | null;
16738
+ preferredDistricts: string[] | null;
16739
+ propertyType: string | null;
16740
+ maxMetroDistance: number | null;
16741
+ dealStatus: string | null;
16742
+ preferredPaymentMethod: string | null;
16743
+ childrenCount: number | null;
16744
+ hasPets: boolean | null;
16745
+ carsCount: number | null;
15763
16746
  birthDate: string | null;
15764
- utmSource: string | null;
15765
- }[];
16747
+ notes: string | null;
16748
+ };
15766
16749
  };
15767
16750
  outputFormat: "json";
15768
16751
  status: 200;
16752
+ } | {
16753
+ input: {
16754
+ param: {
16755
+ workspace: string;
16756
+ } & {
16757
+ customerId: string;
16758
+ };
16759
+ };
16760
+ output: {
16761
+ success: false;
16762
+ error: string;
16763
+ };
16764
+ outputFormat: "json";
16765
+ status: 400;
15769
16766
  };
15770
16767
  };
15771
16768
  } & {
@@ -15774,10 +16771,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
15774
16771
  input: {};
15775
16772
  output: {
15776
16773
  success: false;
15777
- error: never;
16774
+ error: string;
15778
16775
  };
15779
16776
  outputFormat: "json";
15780
- status: 400;
16777
+ status: 404;
15781
16778
  } | {
15782
16779
  input: {};
15783
16780
  output: {
@@ -15785,7 +16782,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
15785
16782
  error: string;
15786
16783
  };
15787
16784
  outputFormat: "json";
15788
- status: 404;
16785
+ status: 400;
15789
16786
  } | {
15790
16787
  input: {};
15791
16788
  output: {
@@ -15801,10 +16798,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
15801
16798
  input: {};
15802
16799
  output: {
15803
16800
  success: false;
15804
- error: never;
16801
+ error: string;
15805
16802
  };
15806
16803
  outputFormat: "json";
15807
- status: 400;
16804
+ status: 404;
15808
16805
  } | {
15809
16806
  input: {};
15810
16807
  output: {
@@ -15812,7 +16809,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
15812
16809
  error: string;
15813
16810
  };
15814
16811
  outputFormat: "json";
15815
- status: 404;
16812
+ status: 400;
15816
16813
  } | {
15817
16814
  input: {};
15818
16815
  output: {
@@ -15825,19 +16822,32 @@ declare const routes: import("hono/hono-base").HonoBase<{
15825
16822
  created_at: string;
15826
16823
  id: string;
15827
16824
  workspaceId: string;
15828
- name: string;
15829
- email: string | null;
15830
- website: string | null;
15831
16825
  type: string | null;
15832
- description: string | null;
15833
- active: boolean | null;
16826
+ name: string;
16827
+ companyName: string | null;
15834
16828
  phone: string | null;
15835
- companyPhone: string | null;
15836
- companyAddress: string | null;
15837
- address: string | null;
16829
+ telegram: string | null;
16830
+ whatsapp: string | null;
16831
+ email: string | null;
16832
+ leadSource: string | null;
16833
+ budgetMin: number | null;
16834
+ budgetMax: number | null;
16835
+ inHandBudget: number | null;
16836
+ installmentBudget: number | null;
16837
+ minArea: number | null;
16838
+ maxArea: number | null;
16839
+ roomsCount: number | null;
16840
+ preferredDistricts: string[] | null;
16841
+ propertyType: string | null;
16842
+ maxMetroDistance: number | null;
16843
+ dealStatus: string | null;
16844
+ preferredPaymentMethod: string | null;
16845
+ childrenCount: number | null;
16846
+ hasPets: boolean | null;
16847
+ carsCount: number | null;
15838
16848
  birthDate: string | null;
15839
- utmSource: string | null;
15840
- };
16849
+ notes: string | null;
16850
+ }[];
15841
16851
  };
15842
16852
  outputFormat: "json";
15843
16853
  status: 200;
@@ -15846,6 +16856,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
15846
16856
  } & {
15847
16857
  "/get-tasks/:workspace/:customerId": {
15848
16858
  $get: {
16859
+ input: {
16860
+ param: {
16861
+ workspace: string;
16862
+ } & {
16863
+ customerId: string;
16864
+ };
16865
+ };
16866
+ output: {
16867
+ success: false;
16868
+ error: string;
16869
+ };
16870
+ outputFormat: "json";
16871
+ status: 404;
16872
+ } | {
15849
16873
  input: {
15850
16874
  param: {
15851
16875
  workspace: string;
@@ -15870,6 +16894,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
15870
16894
  };
15871
16895
  outputFormat: "json";
15872
16896
  status: 200;
16897
+ } | {
16898
+ input: {
16899
+ param: {
16900
+ workspace: string;
16901
+ } & {
16902
+ customerId: string;
16903
+ };
16904
+ };
16905
+ output: {
16906
+ success: false;
16907
+ error: string;
16908
+ };
16909
+ outputFormat: "json";
16910
+ status: 400;
15873
16911
  };
15874
16912
  };
15875
16913
  }, "/customers"> | import("hono/types").MergeSchemaPath<{
@@ -19723,6 +20761,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
19723
20761
  usedBytes: number;
19724
20762
  filesBytes: number;
19725
20763
  commentsBytes: number;
20764
+ customerBytes: number;
19726
20765
  servicesBytes: number;
19727
20766
  limitBytes: number | null;
19728
20767
  };
@@ -20254,6 +21293,122 @@ declare const routes: import("hono/hono-base").HonoBase<{
20254
21293
  status: import("hono/utils/http-status").ContentfulStatusCode;
20255
21294
  };
20256
21295
  };
21296
+ } & {
21297
+ "/upload-to-customer": {
21298
+ $post: {
21299
+ input: {};
21300
+ output: {
21301
+ success: false;
21302
+ error: string;
21303
+ };
21304
+ outputFormat: "json";
21305
+ status: 404;
21306
+ } | {
21307
+ input: {};
21308
+ output: {
21309
+ success: false;
21310
+ error: string;
21311
+ };
21312
+ outputFormat: "json";
21313
+ status: 400;
21314
+ } | {
21315
+ input: {};
21316
+ output: {
21317
+ success: true;
21318
+ url: string;
21319
+ fields: {
21320
+ [x: string]: string;
21321
+ };
21322
+ key: string;
21323
+ maxSize: number;
21324
+ };
21325
+ outputFormat: "json";
21326
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21327
+ };
21328
+ };
21329
+ } & {
21330
+ "/confirm-customer-file": {
21331
+ $post: {
21332
+ input: {};
21333
+ output: {
21334
+ success: true;
21335
+ key: string;
21336
+ };
21337
+ outputFormat: "json";
21338
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21339
+ } | {
21340
+ input: {};
21341
+ output: {
21342
+ success: false;
21343
+ error: string;
21344
+ };
21345
+ outputFormat: "json";
21346
+ status: 400;
21347
+ };
21348
+ };
21349
+ } & {
21350
+ "/download-from-customer/:workspace/:customerId": {
21351
+ $get: {
21352
+ input: {
21353
+ param: {
21354
+ workspace: string;
21355
+ } & {
21356
+ customerId: string;
21357
+ };
21358
+ };
21359
+ output: {
21360
+ success: true;
21361
+ files: {
21362
+ key: string;
21363
+ filename: string;
21364
+ size: number;
21365
+ lastModified: string | null;
21366
+ downloadUrl: string;
21367
+ }[];
21368
+ };
21369
+ outputFormat: "json";
21370
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21371
+ };
21372
+ };
21373
+ } & {
21374
+ "/delete-customer-file": {
21375
+ $post: {
21376
+ input: {};
21377
+ output: {
21378
+ success: false;
21379
+ error: never;
21380
+ };
21381
+ outputFormat: "json";
21382
+ status: 400;
21383
+ } | {
21384
+ input: {};
21385
+ output: {
21386
+ success: false;
21387
+ message: string;
21388
+ key: string;
21389
+ };
21390
+ outputFormat: "json";
21391
+ status: 404;
21392
+ } | {
21393
+ input: {};
21394
+ output: {
21395
+ success: false;
21396
+ message: string;
21397
+ key: string;
21398
+ };
21399
+ outputFormat: "json";
21400
+ status: 500;
21401
+ } | {
21402
+ input: {};
21403
+ output: {
21404
+ success: true;
21405
+ message: string;
21406
+ key: string;
21407
+ };
21408
+ outputFormat: "json";
21409
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21410
+ };
21411
+ };
20257
21412
  }, "/files"> | import("hono/types").MergeSchemaPath<{
20258
21413
  "/start": {
20259
21414
  $post: {