@mestra-dev/contract 0.0.94 → 0.0.96

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 +366 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -3420,6 +3420,26 @@ declare const routes: import("hono/hono-base").HonoBase<{
3420
3420
  };
3421
3421
  };
3422
3422
  };
3423
+ readonly UpdateServiceSuccess: {
3424
+ readonly type: "object";
3425
+ readonly required: readonly [
3426
+ "success",
3427
+ "service"
3428
+ ];
3429
+ readonly properties: {
3430
+ readonly success: {
3431
+ readonly type: "boolean";
3432
+ readonly const: true;
3433
+ };
3434
+ readonly service: {
3435
+ readonly type: "array";
3436
+ readonly items: {
3437
+ readonly $ref: "#/components/schemas/Service";
3438
+ };
3439
+ readonly description: "Updated service(s) from update returning.";
3440
+ };
3441
+ };
3442
+ };
3423
3443
  readonly ListServicesSuccess: {
3424
3444
  readonly type: "object";
3425
3445
  readonly required: readonly [
@@ -9778,6 +9798,263 @@ declare const routes: import("hono/hono-base").HonoBase<{
9778
9798
  };
9779
9799
  };
9780
9800
  };
9801
+ readonly "/services/update": {
9802
+ readonly post: {
9803
+ readonly tags: readonly [
9804
+ "Services"
9805
+ ];
9806
+ readonly summary: "Update a service";
9807
+ readonly description: "Partially updates a category-specific service in the specified workspace. Real-estate workspaces update only the provided listing fields on service_real_estates. Requires workspace access, write access to crm::services, and billing access for services.";
9808
+ readonly security: readonly [
9809
+ never
9810
+ ];
9811
+ readonly requestBody: {
9812
+ readonly required: true;
9813
+ readonly content: {
9814
+ readonly "application/json": {
9815
+ readonly schema: {
9816
+ readonly type: "object";
9817
+ readonly required: readonly [
9818
+ "workspace",
9819
+ "serviceId"
9820
+ ];
9821
+ readonly properties: {
9822
+ readonly workspace: {
9823
+ readonly type: "string";
9824
+ readonly format: "uuid";
9825
+ readonly description: "Workspace identifier where the service belongs.";
9826
+ };
9827
+ readonly serviceId: {
9828
+ readonly type: "string";
9829
+ readonly format: "uuid";
9830
+ readonly description: "Service identifier to update.";
9831
+ };
9832
+ readonly title: {
9833
+ readonly type: "string";
9834
+ readonly description: "Listing title.";
9835
+ };
9836
+ readonly active: {
9837
+ readonly type: "boolean";
9838
+ readonly description: "Whether the listing is active.";
9839
+ };
9840
+ readonly type: {
9841
+ readonly type: "string";
9842
+ };
9843
+ readonly currency: {
9844
+ readonly type: "string";
9845
+ readonly enum: readonly [
9846
+ "USD",
9847
+ "EUR",
9848
+ "RUB"
9849
+ ];
9850
+ };
9851
+ readonly description: {
9852
+ readonly type: "string";
9853
+ };
9854
+ readonly price: {
9855
+ readonly type: "number";
9856
+ };
9857
+ readonly propertyType: {
9858
+ readonly type: "string";
9859
+ };
9860
+ readonly propertyStatus: {
9861
+ readonly type: "string";
9862
+ };
9863
+ readonly commercialType: {
9864
+ readonly type: "string";
9865
+ };
9866
+ readonly commercialClass: {
9867
+ readonly type: "string";
9868
+ };
9869
+ readonly landType: {
9870
+ readonly type: "string";
9871
+ };
9872
+ readonly ownershipType: {
9873
+ readonly type: "string";
9874
+ };
9875
+ readonly loadingDockAccess: {
9876
+ readonly type: "boolean";
9877
+ };
9878
+ readonly waterAccess: {
9879
+ readonly type: "boolean";
9880
+ };
9881
+ readonly electricityAccess: {
9882
+ readonly type: "boolean";
9883
+ };
9884
+ readonly gasAccess: {
9885
+ readonly type: "boolean";
9886
+ };
9887
+ readonly sewageAccess: {
9888
+ readonly type: "boolean";
9889
+ };
9890
+ readonly internetAccess: {
9891
+ readonly type: "boolean";
9892
+ };
9893
+ readonly elevaorAccess: {
9894
+ readonly type: "boolean";
9895
+ };
9896
+ readonly seprateEntrance: {
9897
+ readonly type: "boolean";
9898
+ };
9899
+ readonly furnishedType: {
9900
+ readonly type: "string";
9901
+ };
9902
+ readonly parkingType: {
9903
+ readonly type: "string";
9904
+ };
9905
+ readonly balconyAccess: {
9906
+ readonly type: "boolean";
9907
+ };
9908
+ readonly loggiaAccess: {
9909
+ readonly type: "boolean";
9910
+ };
9911
+ readonly otherFeatures: {
9912
+ readonly type: "string";
9913
+ };
9914
+ readonly fullPayment: {
9915
+ readonly type: "boolean";
9916
+ };
9917
+ readonly mortgagePayment: {
9918
+ readonly type: "boolean";
9919
+ };
9920
+ readonly installmentPayment: {
9921
+ readonly type: "boolean";
9922
+ };
9923
+ readonly fullPaymentAmount: {
9924
+ readonly type: "number";
9925
+ };
9926
+ readonly mortgagePaymentAmount: {
9927
+ readonly type: "number";
9928
+ };
9929
+ readonly installmentPaymentAmount: {
9930
+ readonly type: "number";
9931
+ };
9932
+ readonly pricePerSquareMeter: {
9933
+ readonly type: "number";
9934
+ };
9935
+ readonly alternativeEURCurrency: {
9936
+ readonly type: "boolean";
9937
+ };
9938
+ readonly alternativeRUBCurrency: {
9939
+ readonly type: "boolean";
9940
+ };
9941
+ readonly alternativeUSDCurrency: {
9942
+ readonly type: "boolean";
9943
+ };
9944
+ readonly estimatedDeliveryDate: {
9945
+ readonly type: "string";
9946
+ readonly format: "date-time";
9947
+ };
9948
+ readonly roomsCount: {
9949
+ readonly type: "number";
9950
+ };
9951
+ readonly bathroomsCount: {
9952
+ readonly type: "number";
9953
+ };
9954
+ readonly bedroomsCount: {
9955
+ readonly type: "number";
9956
+ };
9957
+ readonly totalArea: {
9958
+ readonly type: "number";
9959
+ };
9960
+ readonly livingArea: {
9961
+ readonly type: "number";
9962
+ };
9963
+ readonly ceilingHeight: {
9964
+ readonly type: "number";
9965
+ };
9966
+ readonly floor: {
9967
+ readonly type: "number";
9968
+ };
9969
+ readonly totalFloors: {
9970
+ readonly type: "number";
9971
+ };
9972
+ readonly yearBuilt: {
9973
+ readonly type: "number";
9974
+ };
9975
+ readonly renovation: {
9976
+ readonly type: "string";
9977
+ };
9978
+ readonly developerName: {
9979
+ readonly type: "string";
9980
+ };
9981
+ readonly city: {
9982
+ readonly type: "string";
9983
+ };
9984
+ readonly district: {
9985
+ readonly type: "string";
9986
+ };
9987
+ readonly nearestMetroStation: {
9988
+ readonly type: "string";
9989
+ };
9990
+ readonly fullAddress: {
9991
+ readonly type: "string";
9992
+ };
9993
+ readonly latitude: {
9994
+ readonly type: "number";
9995
+ };
9996
+ readonly longitude: {
9997
+ readonly type: "number";
9998
+ };
9999
+ };
10000
+ };
10001
+ };
10002
+ };
10003
+ };
10004
+ readonly responses: {
10005
+ readonly 200: {
10006
+ readonly description: "Service updated successfully.";
10007
+ readonly content: {
10008
+ readonly "application/json": {
10009
+ readonly schema: {
10010
+ readonly $ref: "#/components/schemas/UpdateServiceSuccess";
10011
+ };
10012
+ };
10013
+ };
10014
+ };
10015
+ readonly 400: {
10016
+ readonly description: "Invalid request payload.";
10017
+ readonly content: {
10018
+ readonly "application/json": {
10019
+ readonly schema: {
10020
+ readonly $ref: "#/components/schemas/ErrorResponse";
10021
+ };
10022
+ };
10023
+ };
10024
+ };
10025
+ readonly 404: {
10026
+ readonly description: "Service not found.";
10027
+ readonly content: {
10028
+ readonly "application/json": {
10029
+ readonly schema: {
10030
+ readonly $ref: "#/components/schemas/ErrorResponse";
10031
+ };
10032
+ };
10033
+ };
10034
+ };
10035
+ readonly 401: {
10036
+ readonly description: "Unauthorized - Missing or invalid access token.";
10037
+ readonly content: {
10038
+ readonly "application/json": {
10039
+ readonly schema: {
10040
+ readonly $ref: "#/components/schemas/ErrorResponse";
10041
+ };
10042
+ };
10043
+ };
10044
+ };
10045
+ readonly 403: {
10046
+ readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::services resource.";
10047
+ readonly content: {
10048
+ readonly "application/json": {
10049
+ readonly schema: {
10050
+ readonly $ref: "#/components/schemas/ErrorResponse";
10051
+ };
10052
+ };
10053
+ };
10054
+ };
10055
+ };
10056
+ };
10057
+ };
9781
10058
  readonly "/services/get/{workspace}/{serviceId}": {
9782
10059
  readonly get: {
9783
10060
  readonly tags: readonly [
@@ -15347,6 +15624,95 @@ declare const routes: import("hono/hono-base").HonoBase<{
15347
15624
  status: 201;
15348
15625
  };
15349
15626
  };
15627
+ } & {
15628
+ "/update": {
15629
+ $post: {
15630
+ input: {};
15631
+ output: {
15632
+ success: false;
15633
+ error: string;
15634
+ };
15635
+ outputFormat: "json";
15636
+ status: 400;
15637
+ } | {
15638
+ input: {};
15639
+ output: {
15640
+ success: false;
15641
+ error: string;
15642
+ };
15643
+ outputFormat: "json";
15644
+ status: 404;
15645
+ } | {
15646
+ input: {};
15647
+ output: {
15648
+ success: true;
15649
+ service: {
15650
+ updated_at: string | null;
15651
+ deleted_at: string | null;
15652
+ verified_at: string | null;
15653
+ suspended_at: string | null;
15654
+ created_at: string;
15655
+ id: string;
15656
+ workspaceId: string;
15657
+ title: string;
15658
+ active: boolean | null;
15659
+ type: string | null;
15660
+ currency: string | null;
15661
+ description: string | null;
15662
+ price: number | null;
15663
+ propertyType: string | null;
15664
+ propertyStatus: string | null;
15665
+ commercialType: string | null;
15666
+ commercialClass: string | null;
15667
+ landType: string | null;
15668
+ ownershipType: string | null;
15669
+ loadingDockAccess: boolean | null;
15670
+ waterAccess: boolean | null;
15671
+ electricityAccess: boolean | null;
15672
+ gasAccess: boolean | null;
15673
+ sewageAccess: boolean | null;
15674
+ internetAccess: boolean | null;
15675
+ elevaorAccess: boolean | null;
15676
+ seprateEntrance: boolean | null;
15677
+ furnishedType: string | null;
15678
+ parkingType: string | null;
15679
+ balconyAccess: boolean | null;
15680
+ loggiaAccess: boolean | null;
15681
+ otherFeatures: string | null;
15682
+ fullPayment: boolean | null;
15683
+ mortgagePayment: boolean | null;
15684
+ installmentPayment: boolean | null;
15685
+ fullPaymentAmount: number | null;
15686
+ mortgagePaymentAmount: number | null;
15687
+ installmentPaymentAmount: number | null;
15688
+ pricePerSquareMeter: number | null;
15689
+ alternativeEURCurrency: boolean | null;
15690
+ alternativeRUBCurrency: boolean | null;
15691
+ alternativeUSDCurrency: boolean | null;
15692
+ estimatedDeliveryDate: string | null;
15693
+ roomsCount: number | null;
15694
+ bathroomsCount: number | null;
15695
+ bedroomsCount: number | null;
15696
+ totalArea: number | null;
15697
+ livingArea: number | null;
15698
+ ceilingHeight: number | null;
15699
+ floor: number | null;
15700
+ totalFloors: number | null;
15701
+ yearBuilt: number | null;
15702
+ renovation: string | null;
15703
+ developerName: string | null;
15704
+ city: string | null;
15705
+ district: string | null;
15706
+ nearestMetroStation: string | null;
15707
+ fullAddress: string | null;
15708
+ latitude: string | null;
15709
+ longitude: string | null;
15710
+ }[];
15711
+ };
15712
+ outputFormat: "json";
15713
+ status: 200;
15714
+ };
15715
+ };
15350
15716
  } & {
15351
15717
  "/list/:workspace": {
15352
15718
  $get: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "@types/bun": "^1.3.14",
29
29
  "dts-bundle-generator": "^9.5.1",
30
- "hono": "^4.13.2",
30
+ "hono": "^4.13.3",
31
31
  "typescript": "^5.9.3"
32
32
  }
33
33
  }