@mestra-dev/contract 0.0.234 → 0.0.236

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 +99 -120
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ type Variables = JwtVariables;
16
16
  export type ApiError = {
17
17
  success: false;
18
18
  error: string;
19
+ code?: string;
19
20
  };
20
21
  declare const routes: import("hono/hono-base").HonoBase<{
21
22
  Variables: Variables;
@@ -93,14 +94,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
93
94
  };
94
95
  outputFormat: "json";
95
96
  status: 400;
96
- } | {
97
- input: {};
98
- output: {
99
- success: false;
100
- error: string;
101
- };
102
- outputFormat: "json";
103
- status: 500;
104
97
  };
105
98
  };
106
99
  } & {
@@ -178,12 +171,27 @@ declare const routes: import("hono/hono-base").HonoBase<{
178
171
  };
179
172
  };
180
173
  output: {
181
- success: boolean;
182
- accessToken: string | null;
183
- refreshToken: string | null;
174
+ success: false;
175
+ accessToken: null;
176
+ refreshToken: null;
184
177
  };
185
178
  outputFormat: "json";
186
- status: 200 | 400;
179
+ status: 400;
180
+ } | {
181
+ input: {
182
+ json: {
183
+ email: string;
184
+ otp: string;
185
+ keepSignIn?: boolean | undefined;
186
+ };
187
+ };
188
+ output: {
189
+ success: true;
190
+ accessToken: string;
191
+ refreshToken: string;
192
+ };
193
+ outputFormat: "json";
194
+ status: 200;
187
195
  };
188
196
  };
189
197
  } & {
@@ -230,12 +238,28 @@ declare const routes: import("hono/hono-base").HonoBase<{
230
238
  };
231
239
  };
232
240
  output: {
233
- success: boolean;
234
- accessToken: string | null;
235
- refreshToken: string | null;
241
+ success: false;
242
+ accessToken: null;
243
+ refreshToken: null;
236
244
  };
237
245
  outputFormat: "json";
238
- status: 200 | 400;
246
+ status: 400;
247
+ } | {
248
+ input: {
249
+ json: {
250
+ dialCode: string;
251
+ number: string;
252
+ otp: string;
253
+ keepSignIn?: boolean | undefined;
254
+ };
255
+ };
256
+ output: {
257
+ success: true;
258
+ accessToken: string;
259
+ refreshToken: string;
260
+ };
261
+ outputFormat: "json";
262
+ status: 200;
239
263
  };
240
264
  };
241
265
  } & {
@@ -282,12 +306,28 @@ declare const routes: import("hono/hono-base").HonoBase<{
282
306
  };
283
307
  };
284
308
  output: {
285
- success: boolean;
286
- accessToken: string | null;
287
- refreshToken: string | null;
309
+ success: false;
310
+ accessToken: null;
311
+ refreshToken: null;
288
312
  };
289
313
  outputFormat: "json";
290
- status: 200 | 400;
314
+ status: 400;
315
+ } | {
316
+ input: {
317
+ json: {
318
+ dialCode: string;
319
+ number: string;
320
+ otp: string;
321
+ keepSignIn?: boolean | undefined;
322
+ };
323
+ };
324
+ output: {
325
+ success: true;
326
+ accessToken: string;
327
+ refreshToken: string;
328
+ };
329
+ outputFormat: "json";
330
+ status: 200;
291
331
  };
292
332
  };
293
333
  } & {
@@ -6087,27 +6127,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
6087
6127
  adapter?: undefined;
6088
6128
  baseURL?: string | undefined;
6089
6129
  data?: string | {} | {
6090
- readonly lastModified: number;
6091
- readonly name: string;
6092
- readonly webkitRelativePath: string;
6093
- readonly size: number;
6094
- readonly type: string;
6095
- slice: never;
6096
- image: never;
6097
- } | {
6098
- readonly size: number;
6099
- readonly type: string;
6100
- slice: never;
6101
- image: never;
6102
- } | {
6103
- append: never;
6104
- delete: never;
6105
- get: never;
6106
- getAll: never;
6107
- has: never;
6108
- set: never;
6109
- forEach: never;
6110
- } | {
6111
6130
  readonly readableAborted: boolean;
6112
6131
  readable: boolean;
6113
6132
  readonly readableDidRead: boolean;
@@ -6159,8 +6178,26 @@ declare const routes: import("hono/hono-base").HonoBase<{
6159
6178
  pipe: never;
6160
6179
  setMaxListeners: never;
6161
6180
  } | {
6162
- type: "Buffer";
6163
- data: number[];
6181
+ readonly lastModified: number;
6182
+ readonly name: string;
6183
+ readonly webkitRelativePath: string;
6184
+ readonly size: number;
6185
+ readonly type: string;
6186
+ slice: never;
6187
+ image: never;
6188
+ } | {
6189
+ readonly size: number;
6190
+ readonly type: string;
6191
+ slice: never;
6192
+ image: never;
6193
+ } | {
6194
+ append: never;
6195
+ delete: never;
6196
+ get: never;
6197
+ getAll: never;
6198
+ has: never;
6199
+ set: never;
6200
+ forEach: never;
6164
6201
  } | {
6165
6202
  readonly locked: boolean;
6166
6203
  pipeThrough: never;
@@ -6650,6 +6687,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
6650
6687
  delete: never;
6651
6688
  forEach: never;
6652
6689
  } | {} | {
6690
+ type: "Buffer";
6691
+ data: number[];
6692
+ } | {
6653
6693
  readonly buffer: {
6654
6694
  readonly byteLength: number;
6655
6695
  slice: never;
@@ -9933,18 +9973,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
9933
9973
  };
9934
9974
  outputFormat: "json";
9935
9975
  status: 200;
9936
- } | {
9937
- input: {
9938
- param: {
9939
- invoiceId: string;
9940
- };
9941
- };
9942
- output: {
9943
- success: false;
9944
- error: string;
9945
- };
9946
- outputFormat: "json";
9947
- status: 400 | 404 | 409 | 403 | 502 | 503;
9948
9976
  };
9949
9977
  };
9950
9978
  } & {
@@ -9974,23 +10002,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
9974
10002
  };
9975
10003
  outputFormat: "json";
9976
10004
  status: 200;
9977
- } | {
9978
- input: {
9979
- json: {
9980
- code: string;
9981
- };
9982
- } & {
9983
- param: {
9984
- invoiceId: string;
9985
- };
9986
- };
9987
- output: {
9988
- success: false;
9989
- error: string;
9990
- code: string | undefined;
9991
- };
9992
- outputFormat: "json";
9993
- status: 400 | 404 | 409 | 403 | 502 | 503;
9994
10005
  };
9995
10006
  };
9996
10007
  } & {
@@ -10014,18 +10025,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10014
10025
  };
10015
10026
  outputFormat: "json";
10016
10027
  status: 200;
10017
- } | {
10018
- input: {
10019
- param: {
10020
- invoiceId: string;
10021
- };
10022
- };
10023
- output: {
10024
- success: false;
10025
- error: string;
10026
- };
10027
- outputFormat: "json";
10028
- status: 400 | 404 | 409 | 403;
10029
10028
  };
10030
10029
  };
10031
10030
  } & {
@@ -10047,19 +10046,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10047
10046
  };
10048
10047
  outputFormat: "json";
10049
10048
  status: 200;
10050
- } | {
10051
- input: {
10052
- param: {
10053
- invoiceId: string;
10054
- };
10055
- };
10056
- output: {
10057
- success: false;
10058
- error: string;
10059
- code: string | undefined;
10060
- };
10061
- outputFormat: "json";
10062
- status: 400 | 404 | 409 | 403 | 502 | 503;
10063
10049
  };
10064
10050
  };
10065
10051
  } & {
@@ -10081,22 +10067,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10081
10067
  };
10082
10068
  outputFormat: "json";
10083
10069
  status: 201;
10084
- } | {
10085
- input: {
10086
- json: {
10087
- workspace: string;
10088
- plan?: string | undefined;
10089
- seats?: number | undefined;
10090
- billingInterval?: "monthly" | "yearly" | undefined;
10091
- billingCycles?: number | undefined;
10092
- };
10093
- };
10094
- output: {
10095
- success: false;
10096
- error: string;
10097
- };
10098
- outputFormat: "json";
10099
- status: 400 | 404 | 403;
10100
10070
  };
10101
10071
  };
10102
10072
  } & {
@@ -10104,27 +10074,27 @@ declare const routes: import("hono/hono-base").HonoBase<{
10104
10074
  $post: {
10105
10075
  input: {};
10106
10076
  output: {
10107
- success: true;
10108
- ignored: true;
10077
+ success: false;
10078
+ error: string;
10109
10079
  };
10110
10080
  outputFormat: "json";
10111
- status: 200;
10081
+ status: 400;
10112
10082
  } | {
10113
10083
  input: {};
10114
10084
  output: {
10115
10085
  success: true;
10116
- invoiceId: string;
10086
+ ignored: true;
10117
10087
  };
10118
10088
  outputFormat: "json";
10119
10089
  status: 200;
10120
10090
  } | {
10121
10091
  input: {};
10122
10092
  output: {
10123
- success: false;
10124
- error: string;
10093
+ success: true;
10094
+ invoiceId: string;
10125
10095
  };
10126
10096
  outputFormat: "json";
10127
- status: 400 | 404 | 409 | 502 | 503;
10097
+ status: 200;
10128
10098
  };
10129
10099
  };
10130
10100
  }, "/payments"> | import("hono/types").MergeSchemaPath<{
@@ -11351,12 +11321,21 @@ type GlobalErrorResponses = {
11351
11321
  404: {
11352
11322
  json: ApiError;
11353
11323
  };
11324
+ 409: {
11325
+ json: ApiError;
11326
+ };
11354
11327
  429: {
11355
11328
  json: ApiError;
11356
11329
  };
11357
11330
  500: {
11358
11331
  json: ApiError;
11359
11332
  };
11333
+ 502: {
11334
+ json: ApiError;
11335
+ };
11336
+ 503: {
11337
+ json: ApiError;
11338
+ };
11360
11339
  };
11361
11340
  /** AppType for `hc` — includes route responses plus global auth/middleware error statuses. */
11362
11341
  export type AppType = ApplyGlobalResponse<typeof routes, GlobalErrorResponses>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.234",
3
+ "version": "0.0.236",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,