@mestra-dev/contract 0.0.136 → 0.0.138

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 +252 -4
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
26
26
  readonly openapi: "3.0.3";
27
27
  readonly info: {
28
28
  readonly title: "Auth Service API";
29
- readonly version: "1.5.7";
29
+ readonly version: "1.5.8";
30
30
  readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
31
31
  };
32
32
  readonly servers: readonly [
@@ -3310,7 +3310,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
3310
3310
  readonly whatsapp: {
3311
3311
  readonly type: "string";
3312
3312
  readonly nullable: true;
3313
- readonly description: "E.164 WhatsApp number.";
3313
+ };
3314
+ readonly instagram: {
3315
+ readonly type: "string";
3316
+ readonly nullable: true;
3317
+ };
3318
+ readonly synapseId: {
3319
+ readonly type: "string";
3320
+ readonly nullable: true;
3321
+ readonly description: "Matrix (Synapse) user identifier for chat.";
3314
3322
  };
3315
3323
  readonly email: {
3316
3324
  readonly type: "string";
@@ -5740,6 +5748,183 @@ declare const routes: import("hono/hono-base").HonoBase<{
5740
5748
  };
5741
5749
  };
5742
5750
  };
5751
+ readonly "/auth/request-voice-otp": {
5752
+ readonly post: {
5753
+ readonly tags: readonly [
5754
+ "Auth"
5755
+ ];
5756
+ readonly summary: "Request a one-time password by voice call";
5757
+ readonly description: "Without a bearer token this starts voice-call login/signup. With an access token it links a phone to the current account. Voice calls are sent through REDSMS only when dialCode is +7.";
5758
+ readonly security: readonly [
5759
+ never
5760
+ ];
5761
+ readonly requestBody: {
5762
+ readonly required: true;
5763
+ readonly content: {
5764
+ readonly "application/json": {
5765
+ readonly schema: {
5766
+ readonly type: "object";
5767
+ readonly required: readonly [
5768
+ "dialCode",
5769
+ "number"
5770
+ ];
5771
+ readonly properties: {
5772
+ readonly dialCode: {
5773
+ readonly type: "string";
5774
+ readonly description: "International dial code, with or without a leading +.";
5775
+ readonly example: "+7";
5776
+ };
5777
+ readonly number: {
5778
+ readonly type: "string";
5779
+ readonly description: "National phone number without the dial code.";
5780
+ readonly example: "9197286223";
5781
+ };
5782
+ };
5783
+ };
5784
+ };
5785
+ };
5786
+ };
5787
+ readonly responses: {
5788
+ readonly 200: {
5789
+ readonly description: "OTP generated and voice call queued successfully.";
5790
+ readonly content: {
5791
+ readonly "application/json": {
5792
+ readonly schema: {
5793
+ readonly $ref: "#/components/schemas/OtpRequestSuccess";
5794
+ };
5795
+ };
5796
+ };
5797
+ };
5798
+ readonly 400: {
5799
+ readonly description: "Validation failed, an active OTP already exists, or linking was rejected (phone already verified / in use).";
5800
+ readonly content: {
5801
+ readonly "application/json": {
5802
+ readonly schema: {
5803
+ readonly $ref: "#/components/schemas/OtpRequestFailure";
5804
+ };
5805
+ };
5806
+ };
5807
+ };
5808
+ readonly 403: {
5809
+ readonly description: "Authorization header was sent but the access token is missing, invalid, or expired.";
5810
+ readonly content: {
5811
+ readonly "application/json": {
5812
+ readonly schema: {
5813
+ readonly $ref: "#/components/schemas/ErrorResponse";
5814
+ };
5815
+ };
5816
+ };
5817
+ };
5818
+ readonly 429: {
5819
+ readonly description: "Too Many Requests - Rate limit exceeded.";
5820
+ readonly content: {
5821
+ readonly "application/json": {
5822
+ readonly schema: {
5823
+ readonly $ref: "#/components/schemas/ErrorResponse";
5824
+ };
5825
+ };
5826
+ };
5827
+ };
5828
+ };
5829
+ };
5830
+ };
5831
+ readonly "/auth/verify-voice-otp": {
5832
+ readonly post: {
5833
+ readonly tags: readonly [
5834
+ "Auth"
5835
+ ];
5836
+ readonly summary: "Verify a voice-call one-time password";
5837
+ readonly description: "Without a bearer token this completes voice-call login/signup and returns tokens. With an access token it verifies and attaches a phone to the current account.";
5838
+ readonly security: readonly [
5839
+ never
5840
+ ];
5841
+ readonly requestBody: {
5842
+ readonly required: true;
5843
+ readonly content: {
5844
+ readonly "application/json": {
5845
+ readonly schema: {
5846
+ readonly type: "object";
5847
+ readonly required: readonly [
5848
+ "dialCode",
5849
+ "number",
5850
+ "otp"
5851
+ ];
5852
+ readonly properties: {
5853
+ readonly dialCode: {
5854
+ readonly type: "string";
5855
+ readonly description: "International dial code, with or without a leading +.";
5856
+ readonly example: "+7";
5857
+ };
5858
+ readonly number: {
5859
+ readonly type: "string";
5860
+ readonly description: "National phone number without the dial code.";
5861
+ readonly example: "9197286223";
5862
+ };
5863
+ readonly otp: {
5864
+ readonly type: "string";
5865
+ readonly pattern: "^[0-9]{6}$";
5866
+ readonly description: "6-digit OTP code.";
5867
+ };
5868
+ readonly keepSignIn: {
5869
+ readonly type: "boolean";
5870
+ readonly description: "Login only. Extend refresh token validity to 30 days when true (default 7 days). Ignored when linking a contact.";
5871
+ };
5872
+ };
5873
+ };
5874
+ };
5875
+ };
5876
+ };
5877
+ readonly responses: {
5878
+ readonly 200: {
5879
+ readonly description: "Login returns tokens. Linking a phone to the current account returns success only (no new tokens).";
5880
+ readonly content: {
5881
+ readonly "application/json": {
5882
+ readonly schema: {
5883
+ readonly oneOf: readonly [
5884
+ {
5885
+ readonly $ref: "#/components/schemas/VerifyOtpSuccess";
5886
+ },
5887
+ {
5888
+ readonly $ref: "#/components/schemas/SimpleSuccess";
5889
+ }
5890
+ ];
5891
+ };
5892
+ };
5893
+ };
5894
+ };
5895
+ readonly 400: {
5896
+ readonly description: "Validation failed, OTP is invalid/expired, or linking was rejected.";
5897
+ readonly content: {
5898
+ readonly "application/json": {
5899
+ readonly schema: {
5900
+ readonly $ref: "#/components/schemas/VerifyOtpFailure";
5901
+ };
5902
+ };
5903
+ };
5904
+ };
5905
+ readonly 403: {
5906
+ readonly description: "Authorization header was sent but the access token is missing, invalid, or expired.";
5907
+ readonly content: {
5908
+ readonly "application/json": {
5909
+ readonly schema: {
5910
+ readonly $ref: "#/components/schemas/ErrorResponse";
5911
+ };
5912
+ };
5913
+ };
5914
+ };
5915
+ readonly 429: {
5916
+ readonly description: "Too Many Requests - Rate limit exceeded.";
5917
+ readonly content: {
5918
+ readonly "application/json": {
5919
+ readonly schema: {
5920
+ readonly $ref: "#/components/schemas/ErrorResponse";
5921
+ };
5922
+ };
5923
+ };
5924
+ };
5925
+ };
5926
+ };
5927
+ };
5743
5928
  readonly "/auth/me": {
5744
5929
  readonly get: {
5745
5930
  readonly tags: readonly [
@@ -9427,7 +9612,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
9427
9612
  };
9428
9613
  readonly whatsapp: {
9429
9614
  readonly type: "string";
9430
- readonly description: "E.164 WhatsApp number.";
9615
+ };
9616
+ readonly instagram: {
9617
+ readonly type: "string";
9618
+ };
9619
+ readonly synapseId: {
9620
+ readonly type: "string";
9621
+ readonly description: "Matrix (Synapse) user identifier for chat.";
9431
9622
  };
9432
9623
  readonly email: {
9433
9624
  readonly type: "string";
@@ -9659,7 +9850,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
9659
9850
  };
9660
9851
  readonly whatsapp: {
9661
9852
  readonly type: "string";
9662
- readonly description: "E.164 WhatsApp number.";
9853
+ };
9854
+ readonly instagram: {
9855
+ readonly type: "string";
9856
+ };
9857
+ readonly synapseId: {
9858
+ readonly type: "string";
9859
+ readonly description: "Matrix (Synapse) user identifier for chat.";
9663
9860
  };
9664
9861
  readonly email: {
9665
9862
  readonly type: "string";
@@ -15226,6 +15423,47 @@ declare const routes: import("hono/hono-base").HonoBase<{
15226
15423
  status: 200 | 400;
15227
15424
  };
15228
15425
  };
15426
+ } & {
15427
+ "/request-voice-otp": {
15428
+ $post: {
15429
+ input: {};
15430
+ output: {
15431
+ success: false;
15432
+ error: never;
15433
+ };
15434
+ outputFormat: "json";
15435
+ status: 400;
15436
+ } | {
15437
+ input: {};
15438
+ output: {
15439
+ success: boolean;
15440
+ expiresAt: any;
15441
+ };
15442
+ outputFormat: "json";
15443
+ status: 200 | 400;
15444
+ };
15445
+ };
15446
+ } & {
15447
+ "/verify-voice-otp": {
15448
+ $post: {
15449
+ input: {};
15450
+ output: {
15451
+ success: boolean;
15452
+ error: string | undefined;
15453
+ };
15454
+ outputFormat: "json";
15455
+ status: 200 | 400;
15456
+ } | {
15457
+ input: {};
15458
+ output: {
15459
+ success: boolean;
15460
+ accessToken: string | null;
15461
+ refreshToken: string | null;
15462
+ };
15463
+ outputFormat: "json";
15464
+ status: 200 | 400;
15465
+ };
15466
+ };
15229
15467
  } & {
15230
15468
  "/me": {
15231
15469
  $get: {
@@ -16199,6 +16437,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
16199
16437
  phone: string | null;
16200
16438
  telegram: string | null;
16201
16439
  whatsapp: string | null;
16440
+ instagram: string | null;
16441
+ synapseId: string | null;
16202
16442
  email: string | null;
16203
16443
  leadSource: string | null;
16204
16444
  budgetMin: number | null;
@@ -16848,6 +17088,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
16848
17088
  phone: string | null;
16849
17089
  telegram: string | null;
16850
17090
  whatsapp: string | null;
17091
+ instagram: string | null;
17092
+ synapseId: string | null;
16851
17093
  leadSource: string | null;
16852
17094
  budgetMin: number | null;
16853
17095
  budgetMax: number | null;
@@ -16924,6 +17166,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
16924
17166
  phone: string | null;
16925
17167
  telegram: string | null;
16926
17168
  whatsapp: string | null;
17169
+ instagram: string | null;
17170
+ synapseId: string | null;
16927
17171
  email: string | null;
16928
17172
  leadSource: string | null;
16929
17173
  budgetMin: number | null;
@@ -17017,6 +17261,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
17017
17261
  phone: string | null;
17018
17262
  telegram: string | null;
17019
17263
  whatsapp: string | null;
17264
+ instagram: string | null;
17265
+ synapseId: string | null;
17020
17266
  email: string | null;
17021
17267
  leadSource: string | null;
17022
17268
  budgetMin: number | null;
@@ -17129,6 +17375,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
17129
17375
  phone: string | null;
17130
17376
  telegram: string | null;
17131
17377
  whatsapp: string | null;
17378
+ instagram: string | null;
17379
+ synapseId: string | null;
17132
17380
  email: string | null;
17133
17381
  leadSource: string | null;
17134
17382
  budgetMin: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -28,9 +28,9 @@
28
28
  "typescript": "5.9.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/bun": "^1.3.14",
31
+ "@types/bun": "^1.4.0",
32
32
  "dts-bundle-generator": "^9.5.1",
33
- "hono": "^4.13.3",
33
+ "hono": "^4.13.5",
34
34
  "typescript": "5.9.3"
35
35
  }
36
36
  }