@gigapay-dev/contracts 1.8.6 → 3.0.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.
- package/README.md +1 -0
- package/build/domains/admin/index.d.ts +150 -0
- package/build/domains/admin/index.d.ts.map +1 -0
- package/build/domains/admin/index.js +72 -0
- package/build/domains/admin/index.js.map +1 -0
- package/build/domains/auth/commands.d.ts +294 -0
- package/build/domains/auth/commands.d.ts.map +1 -0
- package/build/domains/auth/commands.js +116 -0
- package/build/domains/auth/commands.js.map +1 -0
- package/build/domains/auth/dtos.d.ts +37 -0
- package/build/domains/auth/dtos.d.ts.map +1 -0
- package/build/domains/auth/dtos.js +26 -0
- package/build/domains/auth/dtos.js.map +1 -0
- package/build/domains/auth/events.d.ts +35 -0
- package/build/domains/auth/events.d.ts.map +1 -0
- package/build/domains/auth/events.js +24 -0
- package/build/domains/auth/events.js.map +1 -0
- package/build/domains/auth/index.d.ts +165 -0
- package/build/domains/auth/index.d.ts.map +1 -0
- package/build/{commands/products → domains/auth}/index.js +12 -6
- package/build/domains/auth/index.js.map +1 -0
- package/build/domains/auth/queries.d.ts +75 -0
- package/build/domains/auth/queries.d.ts.map +1 -0
- package/build/domains/auth/queries.js +25 -0
- package/build/domains/auth/queries.js.map +1 -0
- package/build/domains/catalog/commands.d.ts +255 -0
- package/build/domains/catalog/commands.d.ts.map +1 -0
- package/build/domains/catalog/commands.js +82 -0
- package/build/domains/catalog/commands.js.map +1 -0
- package/build/domains/catalog/dtos.d.ts +89 -0
- package/build/domains/catalog/dtos.d.ts.map +1 -0
- package/build/domains/catalog/dtos.js +43 -0
- package/build/domains/catalog/dtos.js.map +1 -0
- package/build/domains/catalog/index.d.ts +194 -0
- package/build/domains/catalog/index.d.ts.map +1 -0
- package/build/{commands/payment-methods → domains/catalog}/index.js +11 -4
- package/build/domains/catalog/index.js.map +1 -0
- package/build/domains/catalog/queries.d.ts +168 -0
- package/build/domains/catalog/queries.d.ts.map +1 -0
- package/build/domains/catalog/queries.js +29 -0
- package/build/domains/catalog/queries.js.map +1 -0
- package/build/domains/config/index.d.ts +40 -0
- package/build/domains/config/index.d.ts.map +1 -0
- package/build/domains/config/index.js +18 -0
- package/build/domains/config/index.js.map +1 -0
- package/build/domains/orders/commands.d.ts +262 -0
- package/build/domains/orders/commands.d.ts.map +1 -0
- package/build/domains/orders/commands.js +47 -0
- package/build/domains/orders/commands.js.map +1 -0
- package/build/domains/orders/dtos.d.ts +112 -0
- package/build/domains/orders/dtos.d.ts.map +1 -0
- package/build/domains/orders/dtos.js +44 -0
- package/build/domains/orders/dtos.js.map +1 -0
- package/build/domains/orders/events.d.ts +21 -0
- package/build/domains/orders/events.d.ts.map +1 -0
- package/build/domains/orders/events.js +19 -0
- package/build/domains/orders/events.js.map +1 -0
- package/build/domains/orders/index.d.ts +381 -0
- package/build/domains/orders/index.d.ts.map +1 -0
- package/build/domains/orders/index.js +28 -0
- package/build/domains/orders/index.js.map +1 -0
- package/build/domains/orders/queries.d.ts +532 -0
- package/build/domains/orders/queries.d.ts.map +1 -0
- package/build/domains/orders/queries.js +40 -0
- package/build/domains/orders/queries.js.map +1 -0
- package/build/domains/payments/index.d.ts +96 -0
- package/build/domains/payments/index.d.ts.map +1 -0
- package/build/domains/payments/index.js +34 -0
- package/build/domains/payments/index.js.map +1 -0
- package/build/domains/products/commands.d.ts +302 -0
- package/build/domains/products/commands.d.ts.map +1 -0
- package/build/domains/products/commands.js +101 -0
- package/build/domains/products/commands.js.map +1 -0
- package/build/domains/products/dtos.d.ts +122 -0
- package/build/domains/products/dtos.d.ts.map +1 -0
- package/build/domains/products/dtos.js +54 -0
- package/build/domains/products/dtos.js.map +1 -0
- package/build/domains/products/index.d.ts +276 -0
- package/build/domains/products/index.d.ts.map +1 -0
- package/build/{commands/auth → domains/products}/index.js +11 -5
- package/build/domains/products/index.js.map +1 -0
- package/build/domains/products/queries.d.ts +334 -0
- package/build/domains/products/queries.d.ts.map +1 -0
- package/build/domains/products/queries.js +41 -0
- package/build/domains/products/queries.js.map +1 -0
- package/build/domains/promo-codes/index.d.ts +92 -0
- package/build/domains/promo-codes/index.d.ts.map +1 -0
- package/build/domains/promo-codes/index.js +40 -0
- package/build/domains/promo-codes/index.js.map +1 -0
- package/build/domains/stats/index.d.ts +274 -0
- package/build/domains/stats/index.d.ts.map +1 -0
- package/build/domains/stats/index.js +76 -0
- package/build/domains/stats/index.js.map +1 -0
- package/build/domains/users/dtos.d.ts +9 -0
- package/build/domains/users/dtos.d.ts.map +1 -0
- package/build/domains/users/dtos.js +11 -0
- package/build/domains/users/dtos.js.map +1 -0
- package/build/domains/users/index.d.ts +101 -0
- package/build/domains/users/index.d.ts.map +1 -0
- package/build/domains/users/index.js +52 -0
- package/build/domains/users/index.js.map +1 -0
- package/build/index.d.ts +1310 -1
- package/build/index.d.ts.map +1 -0
- package/build/index.js +35 -1
- package/build/index.js.map +1 -0
- package/build/shared/api-response.d.ts +17 -0
- package/build/shared/api-response.d.ts.map +1 -0
- package/build/shared/api-response.js +22 -0
- package/build/shared/api-response.js.map +1 -0
- package/build/shared/common.d.ts +14 -0
- package/build/shared/common.d.ts.map +1 -0
- package/build/shared/common.js +8 -0
- package/build/shared/common.js.map +1 -0
- package/build/shared/errors.d.ts +34 -0
- package/build/shared/errors.d.ts.map +1 -0
- package/build/shared/errors.js +36 -0
- package/build/shared/errors.js.map +1 -0
- package/build/shared/index.d.ts +7 -0
- package/build/shared/index.d.ts.map +1 -0
- package/build/{commands/orders → shared}/index.js +7 -6
- package/build/shared/index.js.map +1 -0
- package/build/shared/money.d.ts +32 -0
- package/build/shared/money.d.ts.map +1 -0
- package/build/shared/money.js +20 -0
- package/build/shared/money.js.map +1 -0
- package/build/shared/pagination.d.ts +27 -0
- package/build/shared/pagination.d.ts.map +1 -0
- package/build/shared/pagination.js +22 -0
- package/build/shared/pagination.js.map +1 -0
- package/build/shared/types.d.ts +20 -0
- package/build/shared/types.d.ts.map +1 -0
- package/build/{types.js → shared/types.js} +1 -0
- package/build/shared/types.js.map +1 -0
- package/package.json +41 -15
- package/build/commands/api-response.d.ts +0 -18
- package/build/commands/api-response.js +0 -13
- package/build/commands/auth/confirm.d.ts +0 -11
- package/build/commands/auth/confirm.js +0 -11
- package/build/commands/auth/endpoints.d.ts +0 -114
- package/build/commands/auth/endpoints.js +0 -50
- package/build/commands/auth/index.d.ts +0 -5
- package/build/commands/auth/login.d.ts +0 -20
- package/build/commands/auth/login.js +0 -11
- package/build/commands/auth/profile.d.ts +0 -18
- package/build/commands/auth/profile.js +0 -10
- package/build/commands/auth/register.d.ts +0 -12
- package/build/commands/auth/register.js +0 -11
- package/build/commands/auth/reset.d.ts +0 -12
- package/build/commands/auth/reset.js +0 -9
- package/build/commands/consts.d.ts +0 -1
- package/build/commands/consts.js +0 -4
- package/build/commands/index.d.ts +0 -13
- package/build/commands/index.js +0 -29
- package/build/commands/orders/create.d.ts +0 -95
- package/build/commands/orders/create.js +0 -40
- package/build/commands/orders/endpoints.d.ts +0 -726
- package/build/commands/orders/endpoints.js +0 -47
- package/build/commands/orders/enums.d.ts +0 -7
- package/build/commands/orders/enums.js +0 -25
- package/build/commands/orders/index.d.ts +0 -6
- package/build/commands/orders/query.d.ts +0 -103
- package/build/commands/orders/query.js +0 -45
- package/build/commands/orders/read.d.ts +0 -230
- package/build/commands/orders/read.js +0 -81
- package/build/commands/orders/update.d.ts +0 -23
- package/build/commands/orders/update.js +0 -16
- package/build/commands/pagination.d.ts +0 -12
- package/build/commands/pagination.js +0 -11
- package/build/commands/payment-methods/create.d.ts +0 -45
- package/build/commands/payment-methods/create.js +0 -22
- package/build/commands/payment-methods/endpoints.d.ts +0 -536
- package/build/commands/payment-methods/endpoints.js +0 -63
- package/build/commands/payment-methods/index.d.ts +0 -4
- package/build/commands/payment-methods/read.d.ts +0 -71
- package/build/commands/payment-methods/read.js +0 -28
- package/build/commands/payment-methods/update.d.ts +0 -45
- package/build/commands/payment-methods/update.js +0 -19
- package/build/commands/products/create.d.ts +0 -229
- package/build/commands/products/create.js +0 -122
- package/build/commands/products/endpoints.d.ts +0 -1881
- package/build/commands/products/endpoints.js +0 -99
- package/build/commands/products/enums.d.ts +0 -19
- package/build/commands/products/enums.js +0 -27
- package/build/commands/products/index.d.ts +0 -6
- package/build/commands/products/query.d.ts +0 -79
- package/build/commands/products/query.js +0 -55
- package/build/commands/products/read.d.ts +0 -1178
- package/build/commands/products/read.js +0 -231
- package/build/commands/products/update.d.ts +0 -78
- package/build/commands/products/update.js +0 -10
- package/build/commands/promocode-activations/create.d.ts +0 -18
- package/build/commands/promocode-activations/create.js +0 -10
- package/build/commands/promocode-activations/index.d.ts +0 -3
- package/build/commands/promocode-activations/index.js +0 -19
- package/build/commands/promocode-activations/read.d.ts +0 -21
- package/build/commands/promocode-activations/read.js +0 -14
- package/build/commands/promocode-activations/update.d.ts +0 -18
- package/build/commands/promocode-activations/update.js +0 -10
- package/build/commands/promocodes/create.d.ts +0 -39
- package/build/commands/promocodes/create.js +0 -18
- package/build/commands/promocodes/endpoints.d.ts +0 -353
- package/build/commands/promocodes/endpoints.js +0 -46
- package/build/commands/promocodes/enums.d.ts +0 -5
- package/build/commands/promocodes/enums.js +0 -9
- package/build/commands/promocodes/index.d.ts +0 -5
- package/build/commands/promocodes/index.js +0 -21
- package/build/commands/promocodes/read.d.ts +0 -45
- package/build/commands/promocodes/read.js +0 -23
- package/build/commands/promocodes/update.d.ts +0 -33
- package/build/commands/promocodes/update.js +0 -16
- package/build/commands/refresh-sessions/create.d.ts +0 -24
- package/build/commands/refresh-sessions/create.js +0 -13
- package/build/commands/refresh-sessions/enums.d.ts +0 -3
- package/build/commands/refresh-sessions/enums.js +0 -8
- package/build/commands/refresh-sessions/index.d.ts +0 -4
- package/build/commands/refresh-sessions/index.js +0 -20
- package/build/commands/refresh-sessions/read.d.ts +0 -27
- package/build/commands/refresh-sessions/read.js +0 -17
- package/build/commands/refresh-sessions/update.d.ts +0 -24
- package/build/commands/refresh-sessions/update.js +0 -16
- package/build/commands/settings/endpoints.d.ts +0 -108
- package/build/commands/settings/endpoints.js +0 -43
- package/build/commands/settings/index.d.ts +0 -3
- package/build/commands/settings/index.js +0 -19
- package/build/commands/settings/read.d.ts +0 -18
- package/build/commands/settings/read.js +0 -10
- package/build/commands/settings/update.d.ts +0 -18
- package/build/commands/settings/update.js +0 -10
- package/build/commands/stats/endpoints.d.ts +0 -67
- package/build/commands/stats/endpoints.js +0 -13
- package/build/commands/stats/index.d.ts +0 -3
- package/build/commands/stats/index.js +0 -19
- package/build/commands/stats/query.d.ts +0 -31
- package/build/commands/stats/query.js +0 -15
- package/build/commands/stats/read.d.ts +0 -30
- package/build/commands/stats/read.js +0 -17
- package/build/commands/users/create.d.ts +0 -42
- package/build/commands/users/create.js +0 -19
- package/build/commands/users/endpoints.d.ts +0 -403
- package/build/commands/users/endpoints.js +0 -39
- package/build/commands/users/enums.d.ts +0 -6
- package/build/commands/users/enums.js +0 -10
- package/build/commands/users/index.d.ts +0 -6
- package/build/commands/users/index.js +0 -22
- package/build/commands/users/query.d.ts +0 -52
- package/build/commands/users/query.js +0 -21
- package/build/commands/users/read.d.ts +0 -60
- package/build/commands/users/read.js +0 -28
- package/build/commands/users/update.d.ts +0 -42
- package/build/commands/users/update.js +0 -19
- package/build/types.d.ts +0 -8
- package/commands/api-response.ts +0 -10
- package/commands/auth/confirm.ts +0 -10
- package/commands/auth/endpoints.ts +0 -51
- package/commands/auth/index.ts +0 -5
- package/commands/auth/login.ts +0 -13
- package/commands/auth/profile.ts +0 -10
- package/commands/auth/register.ts +0 -8
- package/commands/auth/reset.ts +0 -9
- package/commands/consts.ts +0 -1
- package/commands/index.ts +0 -13
- package/commands/orders/create.ts +0 -41
- package/commands/orders/endpoints.ts +0 -51
- package/commands/orders/enums.ts +0 -25
- package/commands/orders/index.ts +0 -6
- package/commands/orders/query.ts +0 -46
- package/commands/orders/read.ts +0 -83
- package/commands/orders/update.ts +0 -16
- package/commands/pagination.ts +0 -8
- package/commands/payment-methods/create.ts +0 -19
- package/commands/payment-methods/endpoints.ts +0 -67
- package/commands/payment-methods/index.ts +0 -4
- package/commands/payment-methods/read.ts +0 -30
- package/commands/payment-methods/update.ts +0 -19
- package/commands/products/create.ts +0 -134
- package/commands/products/endpoints.ts +0 -108
- package/commands/products/enums.ts +0 -33
- package/commands/products/index.ts +0 -6
- package/commands/products/query.ts +0 -52
- package/commands/products/read.ts +0 -268
- package/commands/products/update.ts +0 -11
- package/commands/promocode-activations/create.ts +0 -10
- package/commands/promocode-activations/index.ts +0 -3
- package/commands/promocode-activations/read.ts +0 -11
- package/commands/promocode-activations/update.ts +0 -10
- package/commands/promocodes/create.ts +0 -18
- package/commands/promocodes/endpoints.ts +0 -62
- package/commands/promocodes/enums.ts +0 -9
- package/commands/promocodes/index.ts +0 -5
- package/commands/promocodes/read.ts +0 -20
- package/commands/promocodes/update.ts +0 -16
- package/commands/refresh-sessions/create.ts +0 -13
- package/commands/refresh-sessions/enums.ts +0 -4
- package/commands/refresh-sessions/index.ts +0 -4
- package/commands/refresh-sessions/read.ts +0 -14
- package/commands/refresh-sessions/update.ts +0 -13
- package/commands/settings/endpoints.ts +0 -52
- package/commands/settings/index.ts +0 -3
- package/commands/settings/read.ts +0 -10
- package/commands/settings/update.ts +0 -10
- package/commands/stats/endpoints.ts +0 -23
- package/commands/stats/index.ts +0 -3
- package/commands/stats/query.ts +0 -18
- package/commands/stats/read.ts +0 -14
- package/commands/users/create.ts +0 -19
- package/commands/users/endpoints.ts +0 -47
- package/commands/users/enums.ts +0 -10
- package/commands/users/index.ts +0 -6
- package/commands/users/query.ts +0 -20
- package/commands/users/read.ts +0 -25
- package/commands/users/update.ts +0 -19
- package/index.ts +0 -1
- package/tsconfig.json +0 -111
- package/types.ts +0 -9
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UserRoleSchema: z.ZodEnum<{
|
|
3
|
+
USER: "USER";
|
|
4
|
+
ADMIN: "ADMIN";
|
|
5
|
+
}>;
|
|
6
|
+
export type UserRole = z.infer<typeof UserRoleSchema>;
|
|
7
|
+
export declare const UserStatusSchema: z.ZodEnum<{
|
|
8
|
+
ACTIVE: "ACTIVE";
|
|
9
|
+
BLOCKED: "BLOCKED";
|
|
10
|
+
}>;
|
|
11
|
+
export type UserStatus = z.infer<typeof UserStatusSchema>;
|
|
12
|
+
export declare const SessionInfoSchema: z.ZodObject<{
|
|
13
|
+
sid: z.ZodString;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
16
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
17
|
+
current: z.ZodBoolean;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type SessionInfo = z.infer<typeof SessionInfoSchema>;
|
|
20
|
+
export declare const TokensResponseSchema: z.ZodObject<{
|
|
21
|
+
accessToken: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type TokensResponse = z.infer<typeof TokensResponseSchema>;
|
|
24
|
+
export declare const CurrentUserSchema: z.ZodObject<{
|
|
25
|
+
id: z.ZodNumber;
|
|
26
|
+
email: z.ZodString;
|
|
27
|
+
username: z.ZodNullable<z.ZodString>;
|
|
28
|
+
picture: z.ZodNullable<z.ZodString>;
|
|
29
|
+
role: z.ZodEnum<{
|
|
30
|
+
USER: "USER";
|
|
31
|
+
ADMIN: "ADMIN";
|
|
32
|
+
}>;
|
|
33
|
+
isEmailConfirmed: z.ZodBoolean;
|
|
34
|
+
hasTotp: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type CurrentUser = z.infer<typeof CurrentUserSchema>;
|
|
37
|
+
//# sourceMappingURL=dtos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtos.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;EAA4B,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB;;;EAAgC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;iBAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;;iBAQ5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CurrentUserSchema = exports.TokensResponseSchema = exports.SessionInfoSchema = exports.UserStatusSchema = exports.UserRoleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.UserRoleSchema = zod_1.z.enum(["USER", "ADMIN"]);
|
|
6
|
+
exports.UserStatusSchema = zod_1.z.enum(["ACTIVE", "BLOCKED"]);
|
|
7
|
+
exports.SessionInfoSchema = zod_1.z.object({
|
|
8
|
+
sid: zod_1.z.string(),
|
|
9
|
+
createdAt: zod_1.z.string(),
|
|
10
|
+
ip: zod_1.z.string().nullable(),
|
|
11
|
+
userAgent: zod_1.z.string().nullable(),
|
|
12
|
+
current: zod_1.z.boolean(),
|
|
13
|
+
});
|
|
14
|
+
exports.TokensResponseSchema = zod_1.z.object({
|
|
15
|
+
accessToken: zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
exports.CurrentUserSchema = zod_1.z.object({
|
|
18
|
+
id: zod_1.z.number().int().positive(),
|
|
19
|
+
email: zod_1.z.string().email(),
|
|
20
|
+
username: zod_1.z.string().nullable(),
|
|
21
|
+
picture: zod_1.z.string().nullable(),
|
|
22
|
+
role: exports.UserRoleSchema,
|
|
23
|
+
isEmailConfirmed: zod_1.z.boolean(),
|
|
24
|
+
hasTotp: zod_1.z.boolean(),
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=dtos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtos.js","sourceRoot":"","sources":["../../../src/domains/auth/dtos.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,cAAc,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAG3C,QAAA,gBAAgB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAGjD,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAGU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,sBAAc;IACpB,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE;IAC7B,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UserRegisteredEventSchema: z.ZodObject<{
|
|
3
|
+
userId: z.ZodNumber;
|
|
4
|
+
email: z.ZodString;
|
|
5
|
+
utmSource: z.ZodNullable<z.ZodString>;
|
|
6
|
+
at: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type UserRegisteredEvent = z.infer<typeof UserRegisteredEventSchema>;
|
|
9
|
+
export declare const UserLoggedInEventSchema: z.ZodObject<{
|
|
10
|
+
userId: z.ZodNumber;
|
|
11
|
+
sid: z.ZodString;
|
|
12
|
+
provider: z.ZodEnum<{
|
|
13
|
+
password: "password";
|
|
14
|
+
google: "google";
|
|
15
|
+
steam: "steam";
|
|
16
|
+
vk: "vk";
|
|
17
|
+
telegram: "telegram";
|
|
18
|
+
}>;
|
|
19
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
20
|
+
at: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type UserLoggedInEvent = z.infer<typeof UserLoggedInEventSchema>;
|
|
23
|
+
export declare const SocialAccountLinkedEventSchema: z.ZodObject<{
|
|
24
|
+
userId: z.ZodNumber;
|
|
25
|
+
provider: z.ZodEnum<{
|
|
26
|
+
google: "google";
|
|
27
|
+
steam: "steam";
|
|
28
|
+
vk: "vk";
|
|
29
|
+
telegram: "telegram";
|
|
30
|
+
}>;
|
|
31
|
+
externalId: z.ZodString;
|
|
32
|
+
at: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type SocialAccountLinkedEvent = z.infer<typeof SocialAccountLinkedEventSchema>;
|
|
35
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,8BAA8B;;;;;;;;;;iBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialAccountLinkedEventSchema = exports.UserLoggedInEventSchema = exports.UserRegisteredEventSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.UserRegisteredEventSchema = zod_1.z.object({
|
|
6
|
+
userId: zod_1.z.number().int().positive(),
|
|
7
|
+
email: zod_1.z.string().email(),
|
|
8
|
+
utmSource: zod_1.z.string().nullable(),
|
|
9
|
+
at: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
exports.UserLoggedInEventSchema = zod_1.z.object({
|
|
12
|
+
userId: zod_1.z.number().int().positive(),
|
|
13
|
+
sid: zod_1.z.string(),
|
|
14
|
+
provider: zod_1.z.enum(["password", "google", "steam", "vk", "telegram"]),
|
|
15
|
+
ip: zod_1.z.string().nullable(),
|
|
16
|
+
at: zod_1.z.string(),
|
|
17
|
+
});
|
|
18
|
+
exports.SocialAccountLinkedEventSchema = zod_1.z.object({
|
|
19
|
+
userId: zod_1.z.number().int().positive(),
|
|
20
|
+
provider: zod_1.z.enum(["google", "steam", "vk", "telegram"]),
|
|
21
|
+
externalId: zod_1.z.string(),
|
|
22
|
+
at: zod_1.z.string(),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/domains/auth/events.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACd,CAAC,CAAC;AAGU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACnE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACd,CAAC,CAAC;AAGU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACvD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export * from "./dtos";
|
|
2
|
+
export * from "./commands";
|
|
3
|
+
export * from "./queries";
|
|
4
|
+
export * from "./events";
|
|
5
|
+
export declare const AuthEndpoints: {
|
|
6
|
+
readonly getCurrentUser: {
|
|
7
|
+
readonly method: "GET";
|
|
8
|
+
readonly path: "/api/auth/me";
|
|
9
|
+
readonly response: import("zod").ZodObject<{
|
|
10
|
+
id: import("zod").ZodNumber;
|
|
11
|
+
email: import("zod").ZodString;
|
|
12
|
+
username: import("zod").ZodNullable<import("zod").ZodString>;
|
|
13
|
+
picture: import("zod").ZodNullable<import("zod").ZodString>;
|
|
14
|
+
role: import("zod").ZodEnum<{
|
|
15
|
+
USER: "USER";
|
|
16
|
+
ADMIN: "ADMIN";
|
|
17
|
+
}>;
|
|
18
|
+
isEmailConfirmed: import("zod").ZodBoolean;
|
|
19
|
+
hasTotp: import("zod").ZodBoolean;
|
|
20
|
+
}, import("zod/v4/core").$strip>;
|
|
21
|
+
readonly requiresAuth: true;
|
|
22
|
+
};
|
|
23
|
+
readonly listSessions: {
|
|
24
|
+
readonly method: "GET";
|
|
25
|
+
readonly path: "/api/auth/sessions";
|
|
26
|
+
readonly response: import("zod").ZodObject<{
|
|
27
|
+
sessions: import("zod").ZodArray<import("zod").ZodObject<{
|
|
28
|
+
sid: import("zod").ZodString;
|
|
29
|
+
createdAt: import("zod").ZodString;
|
|
30
|
+
ip: import("zod").ZodNullable<import("zod").ZodString>;
|
|
31
|
+
userAgent: import("zod").ZodNullable<import("zod").ZodString>;
|
|
32
|
+
current: import("zod").ZodBoolean;
|
|
33
|
+
}, import("zod/v4/core").$strip>>;
|
|
34
|
+
}, import("zod/v4/core").$strip>;
|
|
35
|
+
readonly requiresAuth: true;
|
|
36
|
+
};
|
|
37
|
+
readonly register: {
|
|
38
|
+
readonly method: "POST";
|
|
39
|
+
readonly path: "/api/auth/register";
|
|
40
|
+
readonly request: import("zod").ZodObject<{
|
|
41
|
+
email: import("zod").ZodEmail;
|
|
42
|
+
password: import("zod").ZodString;
|
|
43
|
+
utmSource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
+
}, import("zod/v4/core").$strip>;
|
|
45
|
+
readonly response: import("zod").ZodObject<{
|
|
46
|
+
userId: import("zod").ZodNumber;
|
|
47
|
+
}, import("zod/v4/core").$strip>;
|
|
48
|
+
readonly requiresCaptcha: "register";
|
|
49
|
+
readonly rateLimit: {
|
|
50
|
+
readonly limit: 3;
|
|
51
|
+
readonly ttlSec: 3600;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
readonly login: {
|
|
55
|
+
readonly method: "POST";
|
|
56
|
+
readonly path: "/api/auth/login";
|
|
57
|
+
readonly request: import("zod").ZodObject<{
|
|
58
|
+
email: import("zod").ZodEmail;
|
|
59
|
+
password: import("zod").ZodString;
|
|
60
|
+
totpCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
+
}, import("zod/v4/core").$strip>;
|
|
62
|
+
readonly response: import("zod").ZodObject<{
|
|
63
|
+
accessToken: import("zod").ZodString;
|
|
64
|
+
}, import("zod/v4/core").$strip>;
|
|
65
|
+
readonly rateLimit: {
|
|
66
|
+
readonly limit: 5;
|
|
67
|
+
readonly ttlSec: 900;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly refresh: {
|
|
71
|
+
readonly method: "POST";
|
|
72
|
+
readonly path: "/api/auth/refresh";
|
|
73
|
+
readonly response: import("zod").ZodObject<{
|
|
74
|
+
accessToken: import("zod").ZodString;
|
|
75
|
+
}, import("zod/v4/core").$strip>;
|
|
76
|
+
readonly rateLimit: {
|
|
77
|
+
readonly limit: 30;
|
|
78
|
+
readonly ttlSec: 60;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly logout: {
|
|
82
|
+
readonly method: "POST";
|
|
83
|
+
readonly path: "/api/auth/logout";
|
|
84
|
+
readonly response: import("zod").ZodObject<{
|
|
85
|
+
ok: import("zod").ZodLiteral<true>;
|
|
86
|
+
}, import("zod/v4/core").$strip>;
|
|
87
|
+
readonly requiresAuth: true;
|
|
88
|
+
};
|
|
89
|
+
readonly logoutAll: {
|
|
90
|
+
readonly method: "POST";
|
|
91
|
+
readonly path: "/api/auth/logout-all";
|
|
92
|
+
readonly response: import("zod").ZodObject<{
|
|
93
|
+
ok: import("zod").ZodLiteral<true>;
|
|
94
|
+
}, import("zod/v4/core").$strip>;
|
|
95
|
+
readonly requiresAuth: true;
|
|
96
|
+
};
|
|
97
|
+
readonly revokeSession: {
|
|
98
|
+
readonly method: "DELETE";
|
|
99
|
+
readonly path: "/api/auth/sessions/:sid";
|
|
100
|
+
readonly params: import("zod").ZodObject<{
|
|
101
|
+
sid: import("zod").ZodString;
|
|
102
|
+
}, import("zod/v4/core").$strip>;
|
|
103
|
+
readonly response: import("zod").ZodObject<{
|
|
104
|
+
ok: import("zod").ZodLiteral<true>;
|
|
105
|
+
}, import("zod/v4/core").$strip>;
|
|
106
|
+
readonly requiresAuth: true;
|
|
107
|
+
};
|
|
108
|
+
readonly forgotPassword: {
|
|
109
|
+
readonly method: "POST";
|
|
110
|
+
readonly path: "/api/auth/forgot-password";
|
|
111
|
+
readonly request: import("zod").ZodObject<{
|
|
112
|
+
email: import("zod").ZodEmail;
|
|
113
|
+
}, import("zod/v4/core").$strip>;
|
|
114
|
+
readonly response: import("zod").ZodObject<{
|
|
115
|
+
ok: import("zod").ZodLiteral<true>;
|
|
116
|
+
}, import("zod/v4/core").$strip>;
|
|
117
|
+
readonly requiresCaptcha: "forgot_password";
|
|
118
|
+
readonly rateLimit: {
|
|
119
|
+
readonly limit: 3;
|
|
120
|
+
readonly ttlSec: 3600;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly confirmPasswordReset: {
|
|
124
|
+
readonly method: "POST";
|
|
125
|
+
readonly path: "/api/auth/reset-password";
|
|
126
|
+
readonly request: import("zod").ZodObject<{
|
|
127
|
+
code: import("zod").ZodString;
|
|
128
|
+
password: import("zod").ZodString;
|
|
129
|
+
}, import("zod/v4/core").$strip>;
|
|
130
|
+
readonly response: import("zod").ZodObject<{
|
|
131
|
+
ok: import("zod").ZodLiteral<true>;
|
|
132
|
+
}, import("zod/v4/core").$strip>;
|
|
133
|
+
};
|
|
134
|
+
readonly confirmEmail: {
|
|
135
|
+
readonly method: "POST";
|
|
136
|
+
readonly path: "/api/auth/confirm-email";
|
|
137
|
+
readonly request: import("zod").ZodObject<{
|
|
138
|
+
code: import("zod").ZodString;
|
|
139
|
+
}, import("zod/v4/core").$strip>;
|
|
140
|
+
readonly response: import("zod").ZodObject<{
|
|
141
|
+
ok: import("zod").ZodLiteral<true>;
|
|
142
|
+
}, import("zod/v4/core").$strip>;
|
|
143
|
+
};
|
|
144
|
+
readonly enableTotp: {
|
|
145
|
+
readonly method: "POST";
|
|
146
|
+
readonly path: "/api/auth/totp/enable";
|
|
147
|
+
readonly response: import("zod").ZodObject<{
|
|
148
|
+
otpAuthUri: import("zod").ZodString;
|
|
149
|
+
secret: import("zod").ZodString;
|
|
150
|
+
}, import("zod/v4/core").$strip>;
|
|
151
|
+
readonly requiresAuth: true;
|
|
152
|
+
};
|
|
153
|
+
readonly verifyTotp: {
|
|
154
|
+
readonly method: "POST";
|
|
155
|
+
readonly path: "/api/auth/totp/verify";
|
|
156
|
+
readonly request: import("zod").ZodObject<{
|
|
157
|
+
code: import("zod").ZodString;
|
|
158
|
+
}, import("zod/v4/core").$strip>;
|
|
159
|
+
readonly response: import("zod").ZodObject<{
|
|
160
|
+
ok: import("zod").ZodLiteral<true>;
|
|
161
|
+
}, import("zod/v4/core").$strip>;
|
|
162
|
+
readonly requiresAuth: true;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AAKzB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGhB,CAAC"}
|
|
@@ -14,9 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
|
|
17
|
+
exports.AuthEndpoints = void 0;
|
|
18
|
+
__exportStar(require("./dtos"), exports);
|
|
19
|
+
__exportStar(require("./commands"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
21
|
+
__exportStar(require("./events"), exports);
|
|
22
|
+
const commands_1 = require("./commands");
|
|
23
|
+
const queries_1 = require("./queries");
|
|
24
|
+
exports.AuthEndpoints = {
|
|
25
|
+
...commands_1.AuthCommands,
|
|
26
|
+
...queries_1.AuthQueries,
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AAEzB,yCAA0C;AAC1C,uCAAwC;AAE3B,QAAA,aAAa,GAAG;IAC5B,GAAG,uBAAY;IACf,GAAG,qBAAW;CACL,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const GetCurrentUserEndpoint: {
|
|
3
|
+
readonly method: "GET";
|
|
4
|
+
readonly path: "/api/auth/me";
|
|
5
|
+
readonly response: z.ZodObject<{
|
|
6
|
+
id: z.ZodNumber;
|
|
7
|
+
email: z.ZodString;
|
|
8
|
+
username: z.ZodNullable<z.ZodString>;
|
|
9
|
+
picture: z.ZodNullable<z.ZodString>;
|
|
10
|
+
role: z.ZodEnum<{
|
|
11
|
+
USER: "USER";
|
|
12
|
+
ADMIN: "ADMIN";
|
|
13
|
+
}>;
|
|
14
|
+
isEmailConfirmed: z.ZodBoolean;
|
|
15
|
+
hasTotp: z.ZodBoolean;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
readonly requiresAuth: true;
|
|
18
|
+
};
|
|
19
|
+
export declare const ListSessionsResponseSchema: z.ZodObject<{
|
|
20
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
21
|
+
sid: z.ZodString;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
24
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
25
|
+
current: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const ListSessionsEndpoint: {
|
|
29
|
+
readonly method: "GET";
|
|
30
|
+
readonly path: "/api/auth/sessions";
|
|
31
|
+
readonly response: z.ZodObject<{
|
|
32
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
33
|
+
sid: z.ZodString;
|
|
34
|
+
createdAt: z.ZodString;
|
|
35
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
36
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
37
|
+
current: z.ZodBoolean;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
readonly requiresAuth: true;
|
|
41
|
+
};
|
|
42
|
+
export declare const AuthQueries: {
|
|
43
|
+
readonly getCurrentUser: {
|
|
44
|
+
readonly method: "GET";
|
|
45
|
+
readonly path: "/api/auth/me";
|
|
46
|
+
readonly response: z.ZodObject<{
|
|
47
|
+
id: z.ZodNumber;
|
|
48
|
+
email: z.ZodString;
|
|
49
|
+
username: z.ZodNullable<z.ZodString>;
|
|
50
|
+
picture: z.ZodNullable<z.ZodString>;
|
|
51
|
+
role: z.ZodEnum<{
|
|
52
|
+
USER: "USER";
|
|
53
|
+
ADMIN: "ADMIN";
|
|
54
|
+
}>;
|
|
55
|
+
isEmailConfirmed: z.ZodBoolean;
|
|
56
|
+
hasTotp: z.ZodBoolean;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
readonly requiresAuth: true;
|
|
59
|
+
};
|
|
60
|
+
readonly listSessions: {
|
|
61
|
+
readonly method: "GET";
|
|
62
|
+
readonly path: "/api/auth/sessions";
|
|
63
|
+
readonly response: z.ZodObject<{
|
|
64
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
65
|
+
sid: z.ZodString;
|
|
66
|
+
createdAt: z.ZodString;
|
|
67
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
68
|
+
userAgent: z.ZodNullable<z.ZodString>;
|
|
69
|
+
current: z.ZodBoolean;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
readonly requiresAuth: true;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAKE,CAAC;AAEtC,eAAO,MAAM,0BAA0B;;;;;;;;iBAErC,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;CAKI,CAAC;AAEtC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthQueries = exports.ListSessionsEndpoint = exports.ListSessionsResponseSchema = exports.GetCurrentUserEndpoint = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const dtos_1 = require("./dtos");
|
|
6
|
+
exports.GetCurrentUserEndpoint = {
|
|
7
|
+
method: "GET",
|
|
8
|
+
path: "/api/auth/me",
|
|
9
|
+
response: dtos_1.CurrentUserSchema,
|
|
10
|
+
requiresAuth: true,
|
|
11
|
+
};
|
|
12
|
+
exports.ListSessionsResponseSchema = zod_1.z.object({
|
|
13
|
+
sessions: zod_1.z.array(dtos_1.SessionInfoSchema),
|
|
14
|
+
});
|
|
15
|
+
exports.ListSessionsEndpoint = {
|
|
16
|
+
method: "GET",
|
|
17
|
+
path: "/api/auth/sessions",
|
|
18
|
+
response: exports.ListSessionsResponseSchema,
|
|
19
|
+
requiresAuth: true,
|
|
20
|
+
};
|
|
21
|
+
exports.AuthQueries = {
|
|
22
|
+
getCurrentUser: exports.GetCurrentUserEndpoint,
|
|
23
|
+
listSessions: exports.ListSessionsEndpoint,
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/domains/auth/queries.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,iCAA8D;AAEjD,QAAA,sBAAsB,GAAG;IACrC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,wBAAiB;IAC3B,YAAY,EAAE,IAAI;CACkB,CAAC;AAEzB,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,wBAAiB,CAAC;CACpC,CAAC,CAAC;AACU,QAAA,oBAAoB,GAAG;IACnC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,kCAA0B;IACpC,YAAY,EAAE,IAAI;CACkB,CAAC;AAEzB,QAAA,WAAW,GAAG;IAC1B,cAAc,EAAE,8BAAsB;IACtC,YAAY,EAAE,4BAAoB;CACzB,CAAC"}
|