@darco2903/auth-api 2.1.4 → 2.2.0

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.
@@ -2,6 +2,7 @@ import { initContract } from "@ts-rest/core";
2
2
  import assets from "./assets.js";
3
3
  import auth from "./auth.js";
4
4
  import key from "./key.js";
5
+ import totp from "./totp.js";
5
6
  import requests from "./requests.js";
6
7
  import user from "./user.js";
7
8
  const c = initContract();
@@ -9,6 +10,7 @@ export default c.router({
9
10
  assets,
10
11
  ...auth,
11
12
  ...key,
13
+ totp,
12
14
  ...requests,
13
15
  user,
14
16
  }, {
@@ -14,7 +14,7 @@ declare const _default: {
14
14
  method: "POST";
15
15
  path: "/password/request";
16
16
  responses: {
17
- 200: typeof import("@ts-rest/core").ContractNoBody;
17
+ 204: typeof import("@ts-rest/core").ContractNoBody;
18
18
  400: z.ZodObject<{
19
19
  name: z.ZodLiteral<"ZodError">;
20
20
  issues: z.ZodArray<z.ZodObject<{
@@ -375,7 +375,7 @@ declare const _default: {
375
375
  method: "POST";
376
376
  path: "/verify/request";
377
377
  responses: {
378
- 200: typeof import("@ts-rest/core").ContractNoBody;
378
+ 204: typeof import("@ts-rest/core").ContractNoBody;
379
379
  400: z.ZodObject<{
380
380
  name: z.ZodLiteral<"ZodError">;
381
381
  issues: z.ZodArray<z.ZodObject<{
@@ -12,7 +12,7 @@ export default c.router({
12
12
  turnstile: turnstileSchema,
13
13
  }),
14
14
  responses: {
15
- 200: apiSuccess(c.noBody()),
15
+ 204: apiSuccess(c.noBody()),
16
16
  400: ZodErrorSchema,
17
17
  401: apiError(z.literal("INVALID_TURNSTILE"), z.literal("Invalid Turnstile")),
18
18
  429: apiErrorData(z.literal("PASSWORD_RESET_WAIT"), z.literal("Please wait before requesting a new password reset email"), z.object({
@@ -46,7 +46,7 @@ export default c.router({
46
46
  turnstile: turnstileSchema,
47
47
  }),
48
48
  responses: {
49
- 200: apiSuccess(c.noBody()),
49
+ 204: apiSuccess(c.noBody()),
50
50
  400: ZodErrorSchema,
51
51
  401: apiError(z.literal("INVALID_TURNSTILE"), z.literal("Invalid Turnstile")),
52
52
  429: apiErrorData(z.literal("EMAIL_VERIF_WAIT"), z.literal("Please wait before requesting a new verification email"), z.object({