@darco2903/auth-api 2.1.4 → 2.1.6
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.
- package/dist/client.d.ts +371 -363
- package/dist/client.js +2 -1
- package/dist/contract/assets.d.ts +2 -2
- package/dist/contract/assets.js +2 -2
- package/dist/contract/auth.d.ts +8 -752
- package/dist/contract/auth.js +4 -77
- package/dist/contract/index.d.ts +906 -889
- package/dist/contract/index.js +2 -0
- package/dist/contract/requests.d.ts +2 -2
- package/dist/contract/requests.js +2 -2
- package/dist/contract/totp.d.ts +763 -0
- package/dist/contract/totp.js +81 -0
- package/dist/contract/user.d.ts +4 -4
- package/dist/contract/user.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/otp.d.ts +2 -0
- package/dist/otp.js +7 -0
- package/dist/server.d.ts +2 -1
- package/dist/server.js +2 -1
- package/dist/types/auth.d.ts +17 -0
- package/dist/types/auth.js +4 -0
- package/package.json +4 -3
- package/LICENSE +0 -674
package/dist/contract/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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({
|