@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
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AuthEndpoints = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const login_1 = require("./login");
|
|
9
|
-
const register_1 = require("./register");
|
|
10
|
-
const confirm_1 = require("./confirm");
|
|
11
|
-
const reset_1 = require("./reset");
|
|
12
|
-
const profile_1 = require("./profile");
|
|
13
|
-
exports.AuthEndpoints = {
|
|
14
|
-
login: {
|
|
15
|
-
method: "POST",
|
|
16
|
-
path: "/auth/login",
|
|
17
|
-
request: login_1.UserLoginRequestSchema,
|
|
18
|
-
response: login_1.UserLoginResponseSchema,
|
|
19
|
-
},
|
|
20
|
-
register: {
|
|
21
|
-
method: "POST",
|
|
22
|
-
path: "/auth/sign-up",
|
|
23
|
-
request: register_1.UserRegisterRequestSchema,
|
|
24
|
-
response: login_1.UserLoginResponseSchema,
|
|
25
|
-
},
|
|
26
|
-
refresh: {
|
|
27
|
-
method: "GET",
|
|
28
|
-
path: "/auth/refresh",
|
|
29
|
-
request: zod_1.default.void(),
|
|
30
|
-
response: login_1.UserLoginResponseSchema,
|
|
31
|
-
},
|
|
32
|
-
reset: {
|
|
33
|
-
method: "POST",
|
|
34
|
-
path: "/auth/reset",
|
|
35
|
-
request: reset_1.UserResetRequestSchema,
|
|
36
|
-
response: zod_1.default.void(),
|
|
37
|
-
},
|
|
38
|
-
confirm: {
|
|
39
|
-
method: "GET",
|
|
40
|
-
path: "/auth/confirm-code/:code",
|
|
41
|
-
request: confirm_1.ConfirmCodeRequestSchema,
|
|
42
|
-
response: login_1.UserLoginResponseSchema,
|
|
43
|
-
},
|
|
44
|
-
profile: {
|
|
45
|
-
method: "GET",
|
|
46
|
-
path: "/auth/profile",
|
|
47
|
-
request: zod_1.default.void(),
|
|
48
|
-
response: profile_1.UserProfileResponseSchema,
|
|
49
|
-
}
|
|
50
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const UserLoginRequestSchema: z.ZodObject<{
|
|
3
|
-
email: z.ZodString;
|
|
4
|
-
password: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
email: string;
|
|
7
|
-
password: string;
|
|
8
|
-
}, {
|
|
9
|
-
email: string;
|
|
10
|
-
password: string;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const UserLoginResponseSchema: z.ZodObject<{
|
|
13
|
-
accessToken: z.ZodString;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
accessToken: string;
|
|
16
|
-
}, {
|
|
17
|
-
accessToken: string;
|
|
18
|
-
}>;
|
|
19
|
-
export type UserLoginRequest = z.infer<typeof UserLoginRequestSchema>;
|
|
20
|
-
export type UserLoginResponse = z.infer<typeof UserLoginResponseSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserLoginResponseSchema = exports.UserLoginRequestSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.UserLoginRequestSchema = zod_1.z.object({
|
|
6
|
-
email: zod_1.z.string().email(),
|
|
7
|
-
password: zod_1.z.string().min(6),
|
|
8
|
-
});
|
|
9
|
-
exports.UserLoginResponseSchema = zod_1.z.object({
|
|
10
|
-
accessToken: zod_1.z.string(),
|
|
11
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const UserProfileResponseSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodNumber;
|
|
4
|
-
username: z.ZodString;
|
|
5
|
-
email: z.ZodString;
|
|
6
|
-
avatar: z.ZodNullable<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
email: string;
|
|
9
|
-
id: number;
|
|
10
|
-
username: string;
|
|
11
|
-
avatar: string | null;
|
|
12
|
-
}, {
|
|
13
|
-
email: string;
|
|
14
|
-
id: number;
|
|
15
|
-
username: string;
|
|
16
|
-
avatar: string | null;
|
|
17
|
-
}>;
|
|
18
|
-
export type UserProfileResponse = z.infer<typeof UserProfileResponseSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserProfileResponseSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.UserProfileResponseSchema = zod_1.z.object({
|
|
6
|
-
id: zod_1.z.coerce.number(),
|
|
7
|
-
username: zod_1.z.string(),
|
|
8
|
-
email: zod_1.z.string(),
|
|
9
|
-
avatar: zod_1.z.string().nullable(),
|
|
10
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
export declare const UserRegisterRequestSchema: z.ZodObject<{
|
|
3
|
-
email: z.ZodString;
|
|
4
|
-
password: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
email: string;
|
|
7
|
-
password: string;
|
|
8
|
-
}, {
|
|
9
|
-
email: string;
|
|
10
|
-
password: string;
|
|
11
|
-
}>;
|
|
12
|
-
export type UserRegisterRequest = z.infer<typeof UserRegisterRequestSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UserRegisterRequestSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
exports.UserRegisterRequestSchema = zod_1.default.object({
|
|
9
|
-
email: zod_1.default.string().email(),
|
|
10
|
-
password: zod_1.default.string().min(6),
|
|
11
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const UserResetRequestSchema: z.ZodObject<{
|
|
3
|
-
code: z.ZodString;
|
|
4
|
-
password: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
password: string;
|
|
7
|
-
code: string;
|
|
8
|
-
}, {
|
|
9
|
-
password: string;
|
|
10
|
-
code: string;
|
|
11
|
-
}>;
|
|
12
|
-
export type UserResetRequest = z.infer<typeof UserResetRequestSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserResetRequestSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const consts_1 = require("../consts");
|
|
6
|
-
exports.UserResetRequestSchema = zod_1.z.object({
|
|
7
|
-
code: zod_1.z.string().min(consts_1.CONFIRMATION_CODE_LENGTH),
|
|
8
|
-
password: zod_1.z.string().min(6),
|
|
9
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CONFIRMATION_CODE_LENGTH = 4;
|
package/build/commands/consts.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './auth';
|
|
2
|
-
export * from './orders';
|
|
3
|
-
export * from './promocodes';
|
|
4
|
-
export * from './promocode-activations';
|
|
5
|
-
export * from './refresh-sessions';
|
|
6
|
-
export * from './consts';
|
|
7
|
-
export * from './pagination';
|
|
8
|
-
export * from './payment-methods';
|
|
9
|
-
export * from './api-response';
|
|
10
|
-
export * from './users';
|
|
11
|
-
export * from './stats';
|
|
12
|
-
export * from './settings';
|
|
13
|
-
export * from './products';
|
package/build/commands/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./auth"), exports);
|
|
18
|
-
__exportStar(require("./orders"), exports);
|
|
19
|
-
__exportStar(require("./promocodes"), exports);
|
|
20
|
-
__exportStar(require("./promocode-activations"), exports);
|
|
21
|
-
__exportStar(require("./refresh-sessions"), exports);
|
|
22
|
-
__exportStar(require("./consts"), exports);
|
|
23
|
-
__exportStar(require("./pagination"), exports);
|
|
24
|
-
__exportStar(require("./payment-methods"), exports);
|
|
25
|
-
__exportStar(require("./api-response"), exports);
|
|
26
|
-
__exportStar(require("./users"), exports);
|
|
27
|
-
__exportStar(require("./stats"), exports);
|
|
28
|
-
__exportStar(require("./settings"), exports);
|
|
29
|
-
__exportStar(require("./products"), exports);
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
export declare const OrderItemInputSchema: z.ZodObject<{
|
|
3
|
-
variantId: z.ZodNumber;
|
|
4
|
-
quantity: z.ZodDefault<z.ZodNumber>;
|
|
5
|
-
gameUsername: z.ZodOptional<z.ZodString>;
|
|
6
|
-
gameUsernameType: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
variantId: number;
|
|
9
|
-
quantity: number;
|
|
10
|
-
gameUsername?: string | undefined;
|
|
11
|
-
gameUsernameType?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
variantId: number;
|
|
14
|
-
quantity?: number | undefined;
|
|
15
|
-
gameUsername?: string | undefined;
|
|
16
|
-
gameUsernameType?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
/** Запрос на создание заказа */
|
|
19
|
-
export declare const OrderCreateRequestSchema: z.ZodObject<{
|
|
20
|
-
/** Email покупателя */
|
|
21
|
-
email: z.ZodString;
|
|
22
|
-
/** ID способа оплаты */
|
|
23
|
-
paymentMethodId: z.ZodNumber;
|
|
24
|
-
/** Список товаров в заказе (минимум 1) */
|
|
25
|
-
items: z.ZodArray<z.ZodObject<{
|
|
26
|
-
variantId: z.ZodNumber;
|
|
27
|
-
quantity: z.ZodDefault<z.ZodNumber>;
|
|
28
|
-
gameUsername: z.ZodOptional<z.ZodString>;
|
|
29
|
-
gameUsernameType: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
variantId: number;
|
|
32
|
-
quantity: number;
|
|
33
|
-
gameUsername?: string | undefined;
|
|
34
|
-
gameUsernameType?: string | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
variantId: number;
|
|
37
|
-
quantity?: number | undefined;
|
|
38
|
-
gameUsername?: string | undefined;
|
|
39
|
-
gameUsernameType?: string | undefined;
|
|
40
|
-
}>, "many">;
|
|
41
|
-
/** ID промокода (опционально) */
|
|
42
|
-
promocodeId: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
/** ID существующего пользователя (опционально) */
|
|
44
|
-
userId: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
/** Telegram ID покупателя (опционально) */
|
|
46
|
-
telegramId: z.ZodOptional<z.ZodString>;
|
|
47
|
-
/** UTM-метка источника трафика */
|
|
48
|
-
utmSource: z.ZodOptional<z.ZodString>;
|
|
49
|
-
/** Тип дизайна формы оплаты */
|
|
50
|
-
designType: z.ZodOptional<z.ZodString>;
|
|
51
|
-
/** Тип заказа: MAIN (сайт) или WEBAPP (Telegram Mini App) */
|
|
52
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["MAIN", "WEBAPP"]>>>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
email: string;
|
|
55
|
-
type: "MAIN" | "WEBAPP";
|
|
56
|
-
paymentMethodId: number;
|
|
57
|
-
items: {
|
|
58
|
-
variantId: number;
|
|
59
|
-
quantity: number;
|
|
60
|
-
gameUsername?: string | undefined;
|
|
61
|
-
gameUsernameType?: string | undefined;
|
|
62
|
-
}[];
|
|
63
|
-
promocodeId?: number | undefined;
|
|
64
|
-
userId?: number | undefined;
|
|
65
|
-
telegramId?: string | undefined;
|
|
66
|
-
utmSource?: string | undefined;
|
|
67
|
-
designType?: string | undefined;
|
|
68
|
-
}, {
|
|
69
|
-
email: string;
|
|
70
|
-
paymentMethodId: number;
|
|
71
|
-
items: {
|
|
72
|
-
variantId: number;
|
|
73
|
-
quantity?: number | undefined;
|
|
74
|
-
gameUsername?: string | undefined;
|
|
75
|
-
gameUsernameType?: string | undefined;
|
|
76
|
-
}[];
|
|
77
|
-
type?: "MAIN" | "WEBAPP" | undefined;
|
|
78
|
-
promocodeId?: number | undefined;
|
|
79
|
-
userId?: number | undefined;
|
|
80
|
-
telegramId?: string | undefined;
|
|
81
|
-
utmSource?: string | undefined;
|
|
82
|
-
designType?: string | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
/** Ответ на создание заказа — ссылка для оплаты */
|
|
85
|
-
export declare const OrderCreateResponseSchema: z.ZodObject<{
|
|
86
|
-
/** URL для редиректа на платёжную страницу */
|
|
87
|
-
redirectUrl: z.ZodString;
|
|
88
|
-
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
redirectUrl: string;
|
|
90
|
-
}, {
|
|
91
|
-
redirectUrl: string;
|
|
92
|
-
}>;
|
|
93
|
-
export type OrderItemInput = z.infer<typeof OrderItemInputSchema>;
|
|
94
|
-
export type OrderCreateRequest = z.infer<typeof OrderCreateRequestSchema>;
|
|
95
|
-
export type OrderCreateResponse = z.infer<typeof OrderCreateResponseSchema>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.OrderCreateResponseSchema = exports.OrderCreateRequestSchema = exports.OrderItemInputSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const enums_1 = require("./enums");
|
|
9
|
-
exports.OrderItemInputSchema = zod_1.default.object({
|
|
10
|
-
variantId: zod_1.default.coerce.number().int().positive(),
|
|
11
|
-
quantity: zod_1.default.coerce.number().int().min(1).default(1),
|
|
12
|
-
gameUsername: zod_1.default.string().max(255).optional(),
|
|
13
|
-
gameUsernameType: zod_1.default.string().max(64).optional(),
|
|
14
|
-
});
|
|
15
|
-
/** Запрос на создание заказа */
|
|
16
|
-
exports.OrderCreateRequestSchema = zod_1.default.object({
|
|
17
|
-
/** Email покупателя */
|
|
18
|
-
email: zod_1.default.string().email(),
|
|
19
|
-
/** ID способа оплаты */
|
|
20
|
-
paymentMethodId: zod_1.default.coerce.number().positive(),
|
|
21
|
-
/** Список товаров в заказе (минимум 1) */
|
|
22
|
-
items: zod_1.default.array(exports.OrderItemInputSchema).min(1),
|
|
23
|
-
/** ID промокода (опционально) */
|
|
24
|
-
promocodeId: zod_1.default.coerce.number().positive().optional(),
|
|
25
|
-
/** ID существующего пользователя (опционально) */
|
|
26
|
-
userId: zod_1.default.coerce.number().positive().optional(),
|
|
27
|
-
/** Telegram ID покупателя (опционально) */
|
|
28
|
-
telegramId: zod_1.default.string().optional(),
|
|
29
|
-
/** UTM-метка источника трафика */
|
|
30
|
-
utmSource: zod_1.default.string().optional(),
|
|
31
|
-
/** Тип дизайна формы оплаты */
|
|
32
|
-
designType: zod_1.default.string().optional(),
|
|
33
|
-
/** Тип заказа: MAIN (сайт) или WEBAPP (Telegram Mini App) */
|
|
34
|
-
type: enums_1.OrderType.optional().default("MAIN"),
|
|
35
|
-
});
|
|
36
|
-
/** Ответ на создание заказа — ссылка для оплаты */
|
|
37
|
-
exports.OrderCreateResponseSchema = zod_1.default.object({
|
|
38
|
-
/** URL для редиректа на платёжную страницу */
|
|
39
|
-
redirectUrl: zod_1.default.string(),
|
|
40
|
-
});
|