@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,231 +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.SteamParseResponseSchema = exports.KeysCountResponseSchema = exports.ProductDetailResponseSchema = exports.ProductCatalogResponseSchema = exports.DlcBriefSchema = exports.SystemRequirementsResponseSchema = exports.MediaResponseSchema = exports.VariantDetailSchema = exports.VariantCatalogSchema = exports.RegionResponseSchema = exports.RegionBriefSchema = exports.TagBriefSchema = exports.GenreResponseSchema = exports.GenreBriefSchema = exports.CategoryResponseSchema = exports.CategoryBriefSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
// === Вложенные схемы ===
|
|
9
|
-
/** Категория (краткая) */
|
|
10
|
-
exports.CategoryBriefSchema = zod_1.default.object({
|
|
11
|
-
slug: zod_1.default.string(),
|
|
12
|
-
name: zod_1.default.string(),
|
|
13
|
-
});
|
|
14
|
-
/** Категория (полная, для списка категорий) */
|
|
15
|
-
exports.CategoryResponseSchema = zod_1.default.object({
|
|
16
|
-
id: zod_1.default.number(),
|
|
17
|
-
slug: zod_1.default.string(),
|
|
18
|
-
name: zod_1.default.string(),
|
|
19
|
-
description: zod_1.default.string().nullable(),
|
|
20
|
-
iconUrl: zod_1.default.string().nullable(),
|
|
21
|
-
_count: zod_1.default.object({
|
|
22
|
-
products: zod_1.default.number(),
|
|
23
|
-
}),
|
|
24
|
-
});
|
|
25
|
-
/** Жанр (краткий, без ID) */
|
|
26
|
-
exports.GenreBriefSchema = zod_1.default.object({
|
|
27
|
-
slug: zod_1.default.string(),
|
|
28
|
-
name: zod_1.default.string(),
|
|
29
|
-
});
|
|
30
|
-
/** Жанр (полный, для списка жанров) */
|
|
31
|
-
exports.GenreResponseSchema = zod_1.default.object({
|
|
32
|
-
id: zod_1.default.number(),
|
|
33
|
-
slug: zod_1.default.string(),
|
|
34
|
-
name: zod_1.default.string(),
|
|
35
|
-
_count: zod_1.default.object({
|
|
36
|
-
products: zod_1.default.number(),
|
|
37
|
-
}),
|
|
38
|
-
});
|
|
39
|
-
/** Тег */
|
|
40
|
-
exports.TagBriefSchema = zod_1.default.object({
|
|
41
|
-
id: zod_1.default.number(),
|
|
42
|
-
slug: zod_1.default.string(),
|
|
43
|
-
name: zod_1.default.string(),
|
|
44
|
-
});
|
|
45
|
-
/** Регион (краткий, без ID) */
|
|
46
|
-
exports.RegionBriefSchema = zod_1.default.object({
|
|
47
|
-
code: zod_1.default.string(),
|
|
48
|
-
name: zod_1.default.string(),
|
|
49
|
-
});
|
|
50
|
-
/** Регион (полный, для списка регионов) */
|
|
51
|
-
exports.RegionResponseSchema = zod_1.default.object({
|
|
52
|
-
id: zod_1.default.number(),
|
|
53
|
-
code: zod_1.default.string(),
|
|
54
|
-
name: zod_1.default.string(),
|
|
55
|
-
_count: zod_1.default.object({
|
|
56
|
-
products: zod_1.default.number(),
|
|
57
|
-
}),
|
|
58
|
-
});
|
|
59
|
-
/** Вариант в каталоге (краткий) */
|
|
60
|
-
exports.VariantCatalogSchema = zod_1.default.object({
|
|
61
|
-
id: zod_1.default.number(),
|
|
62
|
-
name: zod_1.default.string(),
|
|
63
|
-
price: zod_1.default.string(),
|
|
64
|
-
originalPrice: zod_1.default.string().nullable(),
|
|
65
|
-
platform: zod_1.default.string().nullable(),
|
|
66
|
-
regionCode: zod_1.default.string().nullable(),
|
|
67
|
-
});
|
|
68
|
-
/** Вариант в детальной карточке */
|
|
69
|
-
exports.VariantDetailSchema = zod_1.default.object({
|
|
70
|
-
id: zod_1.default.number(),
|
|
71
|
-
name: zod_1.default.string(),
|
|
72
|
-
sku: zod_1.default.string(),
|
|
73
|
-
price: zod_1.default.string(),
|
|
74
|
-
originalPrice: zod_1.default.string().nullable(),
|
|
75
|
-
topupAmount: zod_1.default.string().nullable(),
|
|
76
|
-
currency: zod_1.default.string().nullable(),
|
|
77
|
-
durationDays: zod_1.default.number().nullable(),
|
|
78
|
-
platform: zod_1.default.string().nullable(),
|
|
79
|
-
regionCode: zod_1.default.string().nullable(),
|
|
80
|
-
deliveryType: zod_1.default.string(),
|
|
81
|
-
inStock: zod_1.default.boolean(),
|
|
82
|
-
});
|
|
83
|
-
/** Медиа */
|
|
84
|
-
exports.MediaResponseSchema = zod_1.default.object({
|
|
85
|
-
id: zod_1.default.number(),
|
|
86
|
-
type: zod_1.default.string(),
|
|
87
|
-
url: zod_1.default.string(),
|
|
88
|
-
alt: zod_1.default.string().nullable(),
|
|
89
|
-
});
|
|
90
|
-
/** Системные требования */
|
|
91
|
-
exports.SystemRequirementsResponseSchema = zod_1.default.object({
|
|
92
|
-
type: zod_1.default.string(),
|
|
93
|
-
os: zod_1.default.string().nullable(),
|
|
94
|
-
processor: zod_1.default.string().nullable(),
|
|
95
|
-
memory: zod_1.default.string().nullable(),
|
|
96
|
-
graphics: zod_1.default.string().nullable(),
|
|
97
|
-
storage: zod_1.default.string().nullable(),
|
|
98
|
-
directx: zod_1.default.string().nullable(),
|
|
99
|
-
network: zod_1.default.string().nullable(),
|
|
100
|
-
additional: zod_1.default.string().nullable(),
|
|
101
|
-
});
|
|
102
|
-
/** DLC в детальной карточке */
|
|
103
|
-
exports.DlcBriefSchema = zod_1.default.object({
|
|
104
|
-
id: zod_1.default.number(),
|
|
105
|
-
slug: zod_1.default.string(),
|
|
106
|
-
title: zod_1.default.string(),
|
|
107
|
-
coverImageUrl: zod_1.default.string().nullable(),
|
|
108
|
-
variants: zod_1.default.array(zod_1.default.object({
|
|
109
|
-
price: zod_1.default.any(),
|
|
110
|
-
originalPrice: zod_1.default.any(),
|
|
111
|
-
})),
|
|
112
|
-
});
|
|
113
|
-
// === Основные схемы ответов ===
|
|
114
|
-
/** Продукт в каталоге (карточка) */
|
|
115
|
-
exports.ProductCatalogResponseSchema = zod_1.default.object({
|
|
116
|
-
id: zod_1.default.number(),
|
|
117
|
-
slug: zod_1.default.string(),
|
|
118
|
-
title: zod_1.default.string(),
|
|
119
|
-
type: zod_1.default.string(),
|
|
120
|
-
shortDescription: zod_1.default.string().nullable(),
|
|
121
|
-
coverImageUrl: zod_1.default.string().nullable(),
|
|
122
|
-
steamRating: zod_1.default.number().nullable(),
|
|
123
|
-
hasMultiplayer: zod_1.default.boolean(),
|
|
124
|
-
hasCoop: zod_1.default.boolean(),
|
|
125
|
-
salesCount: zod_1.default.number(),
|
|
126
|
-
publisher: zod_1.default.string().nullable(),
|
|
127
|
-
releaseDate: zod_1.default.coerce.date().nullable(),
|
|
128
|
-
category: exports.CategoryBriefSchema,
|
|
129
|
-
genres: zod_1.default.array(exports.GenreBriefSchema),
|
|
130
|
-
regions: zod_1.default.array(exports.RegionBriefSchema),
|
|
131
|
-
variants: zod_1.default.array(exports.VariantCatalogSchema),
|
|
132
|
-
minPrice: zod_1.default.string().nullable(),
|
|
133
|
-
hasDiscount: zod_1.default.boolean(),
|
|
134
|
-
});
|
|
135
|
-
/** Продукт (полная детальная карточка) */
|
|
136
|
-
exports.ProductDetailResponseSchema = zod_1.default.object({
|
|
137
|
-
id: zod_1.default.number(),
|
|
138
|
-
slug: zod_1.default.string(),
|
|
139
|
-
title: zod_1.default.string(),
|
|
140
|
-
originalTitle: zod_1.default.string().nullable(),
|
|
141
|
-
type: zod_1.default.string(),
|
|
142
|
-
status: zod_1.default.string(),
|
|
143
|
-
description: zod_1.default.string().nullable(),
|
|
144
|
-
customDescription: zod_1.default.string().nullable(),
|
|
145
|
-
shortDescription: zod_1.default.string().nullable(),
|
|
146
|
-
coverImageUrl: zod_1.default.string().nullable(),
|
|
147
|
-
developer: zod_1.default.string().nullable(),
|
|
148
|
-
publisher: zod_1.default.string().nullable(),
|
|
149
|
-
releaseDate: zod_1.default.coerce.date().nullable(),
|
|
150
|
-
steamAppId: zod_1.default.number().nullable(),
|
|
151
|
-
steamRating: zod_1.default.number().nullable(),
|
|
152
|
-
hasMultiplayer: zod_1.default.boolean(),
|
|
153
|
-
hasCoop: zod_1.default.boolean(),
|
|
154
|
-
hasSinglePlayer: zod_1.default.boolean(),
|
|
155
|
-
metaTitle: zod_1.default.string().nullable(),
|
|
156
|
-
metaDescription: zod_1.default.string().nullable(),
|
|
157
|
-
salesCount: zod_1.default.number(),
|
|
158
|
-
viewsCount: zod_1.default.number(),
|
|
159
|
-
category: exports.CategoryBriefSchema.extend({ id: zod_1.default.number() }),
|
|
160
|
-
variants: zod_1.default.array(exports.VariantDetailSchema),
|
|
161
|
-
media: zod_1.default.array(exports.MediaResponseSchema),
|
|
162
|
-
genres: zod_1.default.array(exports.TagBriefSchema),
|
|
163
|
-
tags: zod_1.default.array(exports.TagBriefSchema),
|
|
164
|
-
regions: zod_1.default.array(exports.RegionResponseSchema.omit({ _count: true })),
|
|
165
|
-
systemRequirements: zod_1.default.array(exports.SystemRequirementsResponseSchema),
|
|
166
|
-
dlcs: zod_1.default.array(exports.DlcBriefSchema),
|
|
167
|
-
createdAt: zod_1.default.coerce.date(),
|
|
168
|
-
updatedAt: zod_1.default.coerce.date(),
|
|
169
|
-
});
|
|
170
|
-
/** Статистика ключей по варианту */
|
|
171
|
-
exports.KeysCountResponseSchema = zod_1.default.object({
|
|
172
|
-
available: zod_1.default.number(),
|
|
173
|
-
sold: zod_1.default.number(),
|
|
174
|
-
reserved: zod_1.default.number(),
|
|
175
|
-
total: zod_1.default.number(),
|
|
176
|
-
});
|
|
177
|
-
// === Парсинг Steam ===
|
|
178
|
-
/** Спарсенные системные требования */
|
|
179
|
-
const ParsedSystemRequirementsSchema = zod_1.default.object({
|
|
180
|
-
os: zod_1.default.string().optional(),
|
|
181
|
-
processor: zod_1.default.string().optional(),
|
|
182
|
-
memory: zod_1.default.string().optional(),
|
|
183
|
-
graphics: zod_1.default.string().optional(),
|
|
184
|
-
storage: zod_1.default.string().optional(),
|
|
185
|
-
directx: zod_1.default.string().optional(),
|
|
186
|
-
network: zod_1.default.string().optional(),
|
|
187
|
-
});
|
|
188
|
-
/** Данные игры из Steam Store API */
|
|
189
|
-
const SteamParsedDataSchema = zod_1.default.object({
|
|
190
|
-
title: zod_1.default.string(),
|
|
191
|
-
originalTitle: zod_1.default.string().optional(),
|
|
192
|
-
description: zod_1.default.string(),
|
|
193
|
-
shortDescription: zod_1.default.string(),
|
|
194
|
-
coverImageUrl: zod_1.default.string(),
|
|
195
|
-
developer: zod_1.default.string().optional(),
|
|
196
|
-
publisher: zod_1.default.string().optional(),
|
|
197
|
-
releaseDate: zod_1.default.string().optional(),
|
|
198
|
-
steamAppId: zod_1.default.number(),
|
|
199
|
-
steamRating: zod_1.default.number().optional(),
|
|
200
|
-
hasMultiplayer: zod_1.default.boolean(),
|
|
201
|
-
hasCoop: zod_1.default.boolean(),
|
|
202
|
-
hasSinglePlayer: zod_1.default.boolean(),
|
|
203
|
-
genres: zod_1.default.array(zod_1.default.string()),
|
|
204
|
-
screenshots: zod_1.default.array(zod_1.default.string()),
|
|
205
|
-
systemRequirements: zod_1.default.object({
|
|
206
|
-
minimum: ParsedSystemRequirementsSchema.optional(),
|
|
207
|
-
recommended: ParsedSystemRequirementsSchema.optional(),
|
|
208
|
-
}),
|
|
209
|
-
});
|
|
210
|
-
/** Региональная цена из Dessly */
|
|
211
|
-
const DesslyRegionPriceSchema = zod_1.default.object({
|
|
212
|
-
region: zod_1.default.string(),
|
|
213
|
-
price: zod_1.default.string(),
|
|
214
|
-
priceOriginal: zod_1.default.string(),
|
|
215
|
-
discount: zod_1.default.string(),
|
|
216
|
-
});
|
|
217
|
-
/** Издание игры из Dessly */
|
|
218
|
-
const DesslyEditionSchema = zod_1.default.object({
|
|
219
|
-
edition: zod_1.default.string(),
|
|
220
|
-
packageId: zod_1.default.number(),
|
|
221
|
-
regions: zod_1.default.array(DesslyRegionPriceSchema),
|
|
222
|
-
});
|
|
223
|
-
/** Данные из Dessly API */
|
|
224
|
-
const DesslyParsedDataSchema = zod_1.default.object({
|
|
225
|
-
editions: zod_1.default.array(DesslyEditionSchema),
|
|
226
|
-
});
|
|
227
|
-
/** Ответ парсинга игры по Steam App ID */
|
|
228
|
-
exports.SteamParseResponseSchema = zod_1.default.object({
|
|
229
|
-
steam: SteamParsedDataSchema.nullable(),
|
|
230
|
-
dessly: DesslyParsedDataSchema.nullable(),
|
|
231
|
-
});
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/** Запрос на обновление продукта (частичное) */
|
|
3
|
-
export declare const ProductUpdateRequestSchema: z.ZodObject<{
|
|
4
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
5
|
-
title: z.ZodOptional<z.ZodString>;
|
|
6
|
-
originalTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
7
|
-
type: z.ZodOptional<z.ZodEnum<["GAME_KEY", "GAME_GIFT", "TOPUP", "SUBSCRIPTION", "IN_GAME_ITEM", "DLC", "CURRENCY"]>>;
|
|
8
|
-
categoryId: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
parentProductId: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
11
|
-
customDescription: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
12
|
-
shortDescription: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
13
|
-
coverImageUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
14
|
-
developer: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
15
|
-
publisher: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
16
|
-
releaseDate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
17
|
-
steamAppId: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
18
|
-
hasMultiplayer: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
19
|
-
hasCoop: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
20
|
-
hasSinglePlayer: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
21
|
-
metaTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
22
|
-
metaDescription: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
23
|
-
genreIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
24
|
-
tagIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
25
|
-
regionIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>>;
|
|
26
|
-
} & {
|
|
27
|
-
/** Статус продукта */
|
|
28
|
-
status: z.ZodOptional<z.ZodEnum<["DRAFT", "ACTIVE", "OUT_OF_STOCK", "ARCHIVED"]>>;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
type?: "GAME_KEY" | "GAME_GIFT" | "TOPUP" | "SUBSCRIPTION" | "IN_GAME_ITEM" | "DLC" | "CURRENCY" | undefined;
|
|
31
|
-
status?: "ACTIVE" | "DRAFT" | "OUT_OF_STOCK" | "ARCHIVED" | undefined;
|
|
32
|
-
slug?: string | undefined;
|
|
33
|
-
title?: string | undefined;
|
|
34
|
-
originalTitle?: string | undefined;
|
|
35
|
-
categoryId?: number | undefined;
|
|
36
|
-
parentProductId?: number | undefined;
|
|
37
|
-
description?: string | undefined;
|
|
38
|
-
customDescription?: string | undefined;
|
|
39
|
-
shortDescription?: string | undefined;
|
|
40
|
-
coverImageUrl?: string | undefined;
|
|
41
|
-
developer?: string | undefined;
|
|
42
|
-
publisher?: string | undefined;
|
|
43
|
-
releaseDate?: string | undefined;
|
|
44
|
-
steamAppId?: number | undefined;
|
|
45
|
-
hasMultiplayer?: boolean | undefined;
|
|
46
|
-
hasCoop?: boolean | undefined;
|
|
47
|
-
hasSinglePlayer?: boolean | undefined;
|
|
48
|
-
metaTitle?: string | undefined;
|
|
49
|
-
metaDescription?: string | undefined;
|
|
50
|
-
genreIds?: number[] | undefined;
|
|
51
|
-
tagIds?: number[] | undefined;
|
|
52
|
-
regionIds?: number[] | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
type?: "GAME_KEY" | "GAME_GIFT" | "TOPUP" | "SUBSCRIPTION" | "IN_GAME_ITEM" | "DLC" | "CURRENCY" | undefined;
|
|
55
|
-
status?: "ACTIVE" | "DRAFT" | "OUT_OF_STOCK" | "ARCHIVED" | undefined;
|
|
56
|
-
slug?: string | undefined;
|
|
57
|
-
title?: string | undefined;
|
|
58
|
-
originalTitle?: string | undefined;
|
|
59
|
-
categoryId?: number | undefined;
|
|
60
|
-
parentProductId?: number | undefined;
|
|
61
|
-
description?: string | undefined;
|
|
62
|
-
customDescription?: string | undefined;
|
|
63
|
-
shortDescription?: string | undefined;
|
|
64
|
-
coverImageUrl?: string | undefined;
|
|
65
|
-
developer?: string | undefined;
|
|
66
|
-
publisher?: string | undefined;
|
|
67
|
-
releaseDate?: string | undefined;
|
|
68
|
-
steamAppId?: number | undefined;
|
|
69
|
-
hasMultiplayer?: boolean | undefined;
|
|
70
|
-
hasCoop?: boolean | undefined;
|
|
71
|
-
hasSinglePlayer?: boolean | undefined;
|
|
72
|
-
metaTitle?: string | undefined;
|
|
73
|
-
metaDescription?: string | undefined;
|
|
74
|
-
genreIds?: number[] | undefined;
|
|
75
|
-
tagIds?: number[] | undefined;
|
|
76
|
-
regionIds?: number[] | undefined;
|
|
77
|
-
}>;
|
|
78
|
-
export type ProductUpdateRequest = z.infer<typeof ProductUpdateRequestSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductUpdateRequestSchema = void 0;
|
|
4
|
-
const create_1 = require("./create");
|
|
5
|
-
const enums_1 = require("./enums");
|
|
6
|
-
/** Запрос на обновление продукта (частичное) */
|
|
7
|
-
exports.ProductUpdateRequestSchema = create_1.ProductCreateRequestSchema.partial().extend({
|
|
8
|
-
/** Статус продукта */
|
|
9
|
-
status: enums_1.ProductStatus.optional(),
|
|
10
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const PromoCodeActivationCreateSchema: z.ZodObject<{
|
|
3
|
-
promocodeId: z.ZodNumber;
|
|
4
|
-
refferalId: z.ZodNumber;
|
|
5
|
-
discountValue: z.ZodNumber;
|
|
6
|
-
activatedAt: z.ZodDate;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
promocodeId: number;
|
|
9
|
-
discountValue: number;
|
|
10
|
-
refferalId: number;
|
|
11
|
-
activatedAt: Date;
|
|
12
|
-
}, {
|
|
13
|
-
promocodeId: number;
|
|
14
|
-
discountValue: number;
|
|
15
|
-
refferalId: number;
|
|
16
|
-
activatedAt: Date;
|
|
17
|
-
}>;
|
|
18
|
-
export type PromoCodeActivationCreate = z.infer<typeof PromoCodeActivationCreateSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PromoCodeActivationCreateSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.PromoCodeActivationCreateSchema = zod_1.z.object({
|
|
6
|
-
promocodeId: zod_1.z.coerce.number(),
|
|
7
|
-
refferalId: zod_1.z.coerce.number(),
|
|
8
|
-
discountValue: zod_1.z.coerce.number(),
|
|
9
|
-
activatedAt: zod_1.z.coerce.date(),
|
|
10
|
-
});
|
|
@@ -1,19 +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("./create"), exports);
|
|
18
|
-
__exportStar(require("./read"), exports);
|
|
19
|
-
__exportStar(require("./update"), exports);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
export declare const PromoCodeActivationReadResponseSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodNumber;
|
|
4
|
-
promocodeId: z.ZodNumber;
|
|
5
|
-
refferalId: z.ZodNumber;
|
|
6
|
-
discountValue: z.ZodString;
|
|
7
|
-
activatedAt: z.ZodDate;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
id: number;
|
|
10
|
-
promocodeId: number;
|
|
11
|
-
discountValue: string;
|
|
12
|
-
refferalId: number;
|
|
13
|
-
activatedAt: Date;
|
|
14
|
-
}, {
|
|
15
|
-
id: number;
|
|
16
|
-
promocodeId: number;
|
|
17
|
-
discountValue: string;
|
|
18
|
-
refferalId: number;
|
|
19
|
-
activatedAt: Date;
|
|
20
|
-
}>;
|
|
21
|
-
export type PromoCodeActivationReadResponse = z.infer<typeof PromoCodeActivationReadResponseSchema>;
|
|
@@ -1,14 +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.PromoCodeActivationReadResponseSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
exports.PromoCodeActivationReadResponseSchema = zod_1.default.object({
|
|
9
|
-
id: zod_1.default.coerce.number().positive(),
|
|
10
|
-
promocodeId: zod_1.default.coerce.number().positive(),
|
|
11
|
-
refferalId: zod_1.default.coerce.number().positive(),
|
|
12
|
-
discountValue: zod_1.default.string(),
|
|
13
|
-
activatedAt: zod_1.default.coerce.date(),
|
|
14
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const PromoCodeActivationUpdateSchema: z.ZodObject<{
|
|
3
|
-
promocodeId: z.ZodOptional<z.ZodNumber>;
|
|
4
|
-
refferalId: z.ZodOptional<z.ZodNumber>;
|
|
5
|
-
discountValue: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
activatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
promocodeId?: number | undefined;
|
|
9
|
-
discountValue?: number | undefined;
|
|
10
|
-
refferalId?: number | undefined;
|
|
11
|
-
activatedAt?: Date | null | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
promocodeId?: number | undefined;
|
|
14
|
-
discountValue?: number | undefined;
|
|
15
|
-
refferalId?: number | undefined;
|
|
16
|
-
activatedAt?: Date | null | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export type PromoCodeActivationUpdate = z.infer<typeof PromoCodeActivationUpdateSchema>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PromoCodeActivationUpdateSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.PromoCodeActivationUpdateSchema = zod_1.z.object({
|
|
6
|
-
promocodeId: zod_1.z.coerce.number().optional(),
|
|
7
|
-
refferalId: zod_1.z.coerce.number().optional(),
|
|
8
|
-
discountValue: zod_1.z.coerce.number().optional(),
|
|
9
|
-
activatedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
10
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const PromoCodeCreateSchema: z.ZodObject<{
|
|
3
|
-
value: z.ZodString;
|
|
4
|
-
discountValue: z.ZodString;
|
|
5
|
-
expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
6
|
-
startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
7
|
-
createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
8
|
-
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
9
|
-
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10
|
-
activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11
|
-
activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
|
-
type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
|
|
13
|
-
status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
value: string;
|
|
16
|
-
type: "USER" | "AD" | "SYSTEM";
|
|
17
|
-
status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
|
|
18
|
-
discountValue: string;
|
|
19
|
-
createdAt?: Date | null | undefined;
|
|
20
|
-
updatedAt?: Date | null | undefined;
|
|
21
|
-
expiredAt?: Date | null | undefined;
|
|
22
|
-
startedAt?: Date | null | undefined;
|
|
23
|
-
deletedAt?: Date | null | undefined;
|
|
24
|
-
activationLimit?: number | null | undefined;
|
|
25
|
-
activationPerUserLimit?: number | null | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
value: string;
|
|
28
|
-
type: "USER" | "AD" | "SYSTEM";
|
|
29
|
-
status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
|
|
30
|
-
discountValue: string;
|
|
31
|
-
createdAt?: Date | null | undefined;
|
|
32
|
-
updatedAt?: Date | null | undefined;
|
|
33
|
-
expiredAt?: Date | null | undefined;
|
|
34
|
-
startedAt?: Date | null | undefined;
|
|
35
|
-
deletedAt?: Date | null | undefined;
|
|
36
|
-
activationLimit?: number | null | undefined;
|
|
37
|
-
activationPerUserLimit?: number | null | undefined;
|
|
38
|
-
}>;
|
|
39
|
-
export type PromoCodeCreate = z.infer<typeof PromoCodeCreateSchema>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PromoCodeCreateSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const enums_1 = require("./enums");
|
|
6
|
-
exports.PromoCodeCreateSchema = zod_1.z.object({
|
|
7
|
-
value: zod_1.z.string(),
|
|
8
|
-
discountValue: zod_1.z.string(),
|
|
9
|
-
expiredAt: zod_1.z.coerce.date().nullable().optional(),
|
|
10
|
-
startedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
11
|
-
createdAt: zod_1.z.coerce.date().nullable().optional(),
|
|
12
|
-
deletedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
13
|
-
updatedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
14
|
-
activationLimit: zod_1.z.coerce.number().positive().nullable().optional(),
|
|
15
|
-
activationPerUserLimit: zod_1.z.coerce.number().positive().nullable().optional(),
|
|
16
|
-
type: enums_1.PromoCodeType,
|
|
17
|
-
status: enums_1.PromoCodeStatus,
|
|
18
|
-
});
|