@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,99 +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.ProductEndpoints = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const query_1 = require("./query");
|
|
9
|
-
const create_1 = require("./create");
|
|
10
|
-
const update_1 = require("./update");
|
|
11
|
-
const read_1 = require("./read");
|
|
12
|
-
exports.ProductEndpoints = {
|
|
13
|
-
// === Публичные ===
|
|
14
|
-
catalog: {
|
|
15
|
-
method: "GET",
|
|
16
|
-
path: "/products",
|
|
17
|
-
request: query_1.ProductFilterSchema,
|
|
18
|
-
response: zod_1.default.object({
|
|
19
|
-
items: zod_1.default.array(read_1.ProductCatalogResponseSchema),
|
|
20
|
-
total: zod_1.default.number(),
|
|
21
|
-
skip: zod_1.default.number(),
|
|
22
|
-
take: zod_1.default.number(),
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
categories: {
|
|
26
|
-
method: "GET",
|
|
27
|
-
path: "/products/categories",
|
|
28
|
-
response: zod_1.default.array(read_1.CategoryResponseSchema),
|
|
29
|
-
},
|
|
30
|
-
genres: {
|
|
31
|
-
method: "GET",
|
|
32
|
-
path: "/products/genres",
|
|
33
|
-
response: zod_1.default.array(read_1.GenreResponseSchema),
|
|
34
|
-
},
|
|
35
|
-
regions: {
|
|
36
|
-
method: "GET",
|
|
37
|
-
path: "/products/regions",
|
|
38
|
-
response: zod_1.default.array(read_1.RegionResponseSchema),
|
|
39
|
-
},
|
|
40
|
-
getBySlug: {
|
|
41
|
-
method: "GET",
|
|
42
|
-
path: "/products/:slug",
|
|
43
|
-
request: zod_1.default.object({ slug: zod_1.default.string() }),
|
|
44
|
-
response: read_1.ProductDetailResponseSchema,
|
|
45
|
-
},
|
|
46
|
-
// === Администрирование ===
|
|
47
|
-
create: {
|
|
48
|
-
method: "POST",
|
|
49
|
-
path: "/products/admin",
|
|
50
|
-
request: create_1.ProductCreateRequestSchema,
|
|
51
|
-
response: read_1.ProductDetailResponseSchema,
|
|
52
|
-
},
|
|
53
|
-
update: {
|
|
54
|
-
method: "PUT",
|
|
55
|
-
path: "/products/admin/:id",
|
|
56
|
-
request: update_1.ProductUpdateRequestSchema,
|
|
57
|
-
response: read_1.ProductDetailResponseSchema,
|
|
58
|
-
},
|
|
59
|
-
archive: {
|
|
60
|
-
method: "DELETE",
|
|
61
|
-
path: "/products/admin/:id",
|
|
62
|
-
response: zod_1.default.object({ status: zod_1.default.string() }),
|
|
63
|
-
},
|
|
64
|
-
createVariant: {
|
|
65
|
-
method: "POST",
|
|
66
|
-
path: "/products/admin/:productId/variants",
|
|
67
|
-
request: create_1.VariantCreateRequestSchema,
|
|
68
|
-
},
|
|
69
|
-
updateVariant: {
|
|
70
|
-
method: "PUT",
|
|
71
|
-
path: "/products/admin/variants/:variantId",
|
|
72
|
-
request: create_1.VariantCreateRequestSchema,
|
|
73
|
-
},
|
|
74
|
-
importKeys: {
|
|
75
|
-
method: "POST",
|
|
76
|
-
path: "/products/admin/variants/:variantId/keys",
|
|
77
|
-
request: create_1.KeysImportRequestSchema,
|
|
78
|
-
response: create_1.KeysImportResponseSchema,
|
|
79
|
-
},
|
|
80
|
-
getKeysCount: {
|
|
81
|
-
method: "GET",
|
|
82
|
-
path: "/products/admin/variants/:variantId/keys/count",
|
|
83
|
-
response: read_1.KeysCountResponseSchema,
|
|
84
|
-
},
|
|
85
|
-
addMedia: {
|
|
86
|
-
method: "POST",
|
|
87
|
-
path: "/products/admin/:productId/media",
|
|
88
|
-
request: create_1.MediaCreateRequestSchema,
|
|
89
|
-
},
|
|
90
|
-
removeMedia: {
|
|
91
|
-
method: "DELETE",
|
|
92
|
-
path: "/products/admin/media/:mediaId",
|
|
93
|
-
},
|
|
94
|
-
upsertSystemRequirements: {
|
|
95
|
-
method: "POST",
|
|
96
|
-
path: "/products/admin/:productId/system-requirements",
|
|
97
|
-
request: create_1.SystemRequirementsRequestSchema,
|
|
98
|
-
},
|
|
99
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
/** Тип продукта */
|
|
3
|
-
export declare const ProductType: z.ZodEnum<["GAME_KEY", "GAME_GIFT", "TOPUP", "SUBSCRIPTION", "IN_GAME_ITEM", "DLC", "CURRENCY"]>;
|
|
4
|
-
export type ProductType = z.infer<typeof ProductType>;
|
|
5
|
-
/** Статус продукта */
|
|
6
|
-
export declare const ProductStatus: z.ZodEnum<["DRAFT", "ACTIVE", "OUT_OF_STOCK", "ARCHIVED"]>;
|
|
7
|
-
export type ProductStatus = z.infer<typeof ProductStatus>;
|
|
8
|
-
/** Тип доставки варианта */
|
|
9
|
-
export declare const DeliveryType: z.ZodEnum<["AUTOMATIC", "MANUAL", "BOT"]>;
|
|
10
|
-
export type DeliveryType = z.infer<typeof DeliveryType>;
|
|
11
|
-
/** Тип медиа-контента */
|
|
12
|
-
export declare const MediaType: z.ZodEnum<["SCREENSHOT", "SLIDER", "VIDEO", "TRAILER"]>;
|
|
13
|
-
export type MediaType = z.infer<typeof MediaType>;
|
|
14
|
-
/** Статус ключа */
|
|
15
|
-
export declare const KeyStatus: z.ZodEnum<["AVAILABLE", "RESERVED", "SOLD"]>;
|
|
16
|
-
export type KeyStatus = z.infer<typeof KeyStatus>;
|
|
17
|
-
/** Тип системных требований */
|
|
18
|
-
export declare const SystemRequirementType: z.ZodEnum<["minimum", "recommended"]>;
|
|
19
|
-
export type SystemRequirementType = z.infer<typeof SystemRequirementType>;
|
|
@@ -1,27 +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.SystemRequirementType = exports.KeyStatus = exports.MediaType = exports.DeliveryType = exports.ProductStatus = exports.ProductType = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
/** Тип продукта */
|
|
9
|
-
exports.ProductType = zod_1.default.enum([
|
|
10
|
-
"GAME_KEY",
|
|
11
|
-
"GAME_GIFT",
|
|
12
|
-
"TOPUP",
|
|
13
|
-
"SUBSCRIPTION",
|
|
14
|
-
"IN_GAME_ITEM",
|
|
15
|
-
"DLC",
|
|
16
|
-
"CURRENCY",
|
|
17
|
-
]);
|
|
18
|
-
/** Статус продукта */
|
|
19
|
-
exports.ProductStatus = zod_1.default.enum(["DRAFT", "ACTIVE", "OUT_OF_STOCK", "ARCHIVED"]);
|
|
20
|
-
/** Тип доставки варианта */
|
|
21
|
-
exports.DeliveryType = zod_1.default.enum(["AUTOMATIC", "MANUAL", "BOT"]);
|
|
22
|
-
/** Тип медиа-контента */
|
|
23
|
-
exports.MediaType = zod_1.default.enum(["SCREENSHOT", "SLIDER", "VIDEO", "TRAILER"]);
|
|
24
|
-
/** Статус ключа */
|
|
25
|
-
exports.KeyStatus = zod_1.default.enum(["AVAILABLE", "RESERVED", "SOLD"]);
|
|
26
|
-
/** Тип системных требований */
|
|
27
|
-
exports.SystemRequirementType = zod_1.default.enum(["minimum", "recommended"]);
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
/** Фильтры каталога продуктов */
|
|
3
|
-
export declare const ProductFilterSchema: z.ZodObject<{
|
|
4
|
-
/** Slug категории */
|
|
5
|
-
category: z.ZodOptional<z.ZodString>;
|
|
6
|
-
/** Тип продукта (GAME_KEY, TOPUP, ...) */
|
|
7
|
-
type: z.ZodOptional<z.ZodString>;
|
|
8
|
-
/** Slugs жанров через запятую */
|
|
9
|
-
genre: z.ZodOptional<z.ZodString>;
|
|
10
|
-
/** Slugs тегов через запятую */
|
|
11
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
12
|
-
/** Код региона (RU, TR, KZ, GLOBAL) */
|
|
13
|
-
region: z.ZodOptional<z.ZodString>;
|
|
14
|
-
/** Платформа (Steam, Epic Games, ...) */
|
|
15
|
-
platform: z.ZodOptional<z.ZodString>;
|
|
16
|
-
/** Минимальная цена */
|
|
17
|
-
minPrice: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
/** Максимальная цена */
|
|
19
|
-
maxPrice: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
/** Фильтр: мультиплеер */
|
|
21
|
-
hasMultiplayer: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
|
|
22
|
-
/** Фильтр: кооператив */
|
|
23
|
-
hasCoop: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
|
|
24
|
-
/** Фильтр: издатель (частичное совпадение) */
|
|
25
|
-
publisher: z.ZodOptional<z.ZodString>;
|
|
26
|
-
/** Минимальный рейтинг */
|
|
27
|
-
minRating: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
/** Фильтр: наличие скидки */
|
|
29
|
-
hasDiscount: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
|
|
30
|
-
/** Поиск по названию */
|
|
31
|
-
search: z.ZodOptional<z.ZodString>;
|
|
32
|
-
/** Поле сортировки */
|
|
33
|
-
sortBy: z.ZodDefault<z.ZodEnum<["price", "popularity", "rating", "releaseDate", "title"]>>;
|
|
34
|
-
/** Направление сортировки */
|
|
35
|
-
sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
36
|
-
/** Смещение для пагинации */
|
|
37
|
-
skip: z.ZodDefault<z.ZodNumber>;
|
|
38
|
-
/** Количество записей */
|
|
39
|
-
take: z.ZodDefault<z.ZodNumber>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
take: number;
|
|
42
|
-
skip: number;
|
|
43
|
-
sortBy: "price" | "title" | "releaseDate" | "popularity" | "rating";
|
|
44
|
-
sortDir: "asc" | "desc";
|
|
45
|
-
type?: string | undefined;
|
|
46
|
-
publisher?: string | undefined;
|
|
47
|
-
hasMultiplayer?: boolean | undefined;
|
|
48
|
-
hasCoop?: boolean | undefined;
|
|
49
|
-
platform?: string | undefined;
|
|
50
|
-
category?: string | undefined;
|
|
51
|
-
minPrice?: number | undefined;
|
|
52
|
-
hasDiscount?: boolean | undefined;
|
|
53
|
-
region?: string | undefined;
|
|
54
|
-
genre?: string | undefined;
|
|
55
|
-
tag?: string | undefined;
|
|
56
|
-
maxPrice?: number | undefined;
|
|
57
|
-
minRating?: number | undefined;
|
|
58
|
-
search?: string | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
type?: string | undefined;
|
|
61
|
-
take?: number | undefined;
|
|
62
|
-
skip?: number | undefined;
|
|
63
|
-
sortBy?: "price" | "title" | "releaseDate" | "popularity" | "rating" | undefined;
|
|
64
|
-
sortDir?: "asc" | "desc" | undefined;
|
|
65
|
-
publisher?: string | undefined;
|
|
66
|
-
hasMultiplayer?: "true" | "false" | undefined;
|
|
67
|
-
hasCoop?: "true" | "false" | undefined;
|
|
68
|
-
platform?: string | undefined;
|
|
69
|
-
category?: string | undefined;
|
|
70
|
-
minPrice?: number | undefined;
|
|
71
|
-
hasDiscount?: "true" | "false" | undefined;
|
|
72
|
-
region?: string | undefined;
|
|
73
|
-
genre?: string | undefined;
|
|
74
|
-
tag?: string | undefined;
|
|
75
|
-
maxPrice?: number | undefined;
|
|
76
|
-
minRating?: number | undefined;
|
|
77
|
-
search?: string | undefined;
|
|
78
|
-
}>;
|
|
79
|
-
export type ProductFilter = z.infer<typeof ProductFilterSchema>;
|
|
@@ -1,55 +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.ProductFilterSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
/** Фильтры каталога продуктов */
|
|
9
|
-
exports.ProductFilterSchema = zod_1.default.object({
|
|
10
|
-
/** Slug категории */
|
|
11
|
-
category: zod_1.default.string().optional(),
|
|
12
|
-
/** Тип продукта (GAME_KEY, TOPUP, ...) */
|
|
13
|
-
type: zod_1.default.string().optional(),
|
|
14
|
-
/** Slugs жанров через запятую */
|
|
15
|
-
genre: zod_1.default.string().optional(),
|
|
16
|
-
/** Slugs тегов через запятую */
|
|
17
|
-
tag: zod_1.default.string().optional(),
|
|
18
|
-
/** Код региона (RU, TR, KZ, GLOBAL) */
|
|
19
|
-
region: zod_1.default.string().optional(),
|
|
20
|
-
/** Платформа (Steam, Epic Games, ...) */
|
|
21
|
-
platform: zod_1.default.string().optional(),
|
|
22
|
-
/** Минимальная цена */
|
|
23
|
-
minPrice: zod_1.default.coerce.number().optional(),
|
|
24
|
-
/** Максимальная цена */
|
|
25
|
-
maxPrice: zod_1.default.coerce.number().optional(),
|
|
26
|
-
/** Фильтр: мультиплеер */
|
|
27
|
-
hasMultiplayer: zod_1.default
|
|
28
|
-
.enum(["true", "false"])
|
|
29
|
-
.transform(v => v === "true")
|
|
30
|
-
.optional(),
|
|
31
|
-
/** Фильтр: кооператив */
|
|
32
|
-
hasCoop: zod_1.default
|
|
33
|
-
.enum(["true", "false"])
|
|
34
|
-
.transform(v => v === "true")
|
|
35
|
-
.optional(),
|
|
36
|
-
/** Фильтр: издатель (частичное совпадение) */
|
|
37
|
-
publisher: zod_1.default.string().optional(),
|
|
38
|
-
/** Минимальный рейтинг */
|
|
39
|
-
minRating: zod_1.default.coerce.number().optional(),
|
|
40
|
-
/** Фильтр: наличие скидки */
|
|
41
|
-
hasDiscount: zod_1.default
|
|
42
|
-
.enum(["true", "false"])
|
|
43
|
-
.transform(v => v === "true")
|
|
44
|
-
.optional(),
|
|
45
|
-
/** Поиск по названию */
|
|
46
|
-
search: zod_1.default.string().optional(),
|
|
47
|
-
/** Поле сортировки */
|
|
48
|
-
sortBy: zod_1.default.enum(["price", "popularity", "rating", "releaseDate", "title"]).default("popularity"),
|
|
49
|
-
/** Направление сортировки */
|
|
50
|
-
sortDir: zod_1.default.enum(["asc", "desc"]).default("desc"),
|
|
51
|
-
/** Смещение для пагинации */
|
|
52
|
-
skip: zod_1.default.coerce.number().default(0),
|
|
53
|
-
/** Количество записей */
|
|
54
|
-
take: zod_1.default.coerce.number().default(20),
|
|
55
|
-
});
|