@gigapay-dev/contracts 1.8.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/domains/admin/index.d.ts +150 -0
- package/build/domains/admin/index.d.ts.map +1 -0
- package/build/domains/admin/index.js +72 -0
- package/build/domains/admin/index.js.map +1 -0
- package/build/domains/auth/commands.d.ts +294 -0
- package/build/domains/auth/commands.d.ts.map +1 -0
- package/build/domains/auth/commands.js +116 -0
- package/build/domains/auth/commands.js.map +1 -0
- package/build/domains/auth/dtos.d.ts +37 -0
- package/build/domains/auth/dtos.d.ts.map +1 -0
- package/build/domains/auth/dtos.js +26 -0
- package/build/domains/auth/dtos.js.map +1 -0
- package/build/domains/auth/events.d.ts +35 -0
- package/build/domains/auth/events.d.ts.map +1 -0
- package/build/domains/auth/events.js +24 -0
- package/build/domains/auth/events.js.map +1 -0
- package/build/domains/auth/index.d.ts +165 -0
- package/build/domains/auth/index.d.ts.map +1 -0
- package/build/{commands/products → domains/auth}/index.js +12 -6
- package/build/domains/auth/index.js.map +1 -0
- package/build/domains/auth/queries.d.ts +75 -0
- package/build/domains/auth/queries.d.ts.map +1 -0
- package/build/domains/auth/queries.js +25 -0
- package/build/domains/auth/queries.js.map +1 -0
- package/build/domains/catalog/commands.d.ts +255 -0
- package/build/domains/catalog/commands.d.ts.map +1 -0
- package/build/domains/catalog/commands.js +82 -0
- package/build/domains/catalog/commands.js.map +1 -0
- package/build/domains/catalog/dtos.d.ts +89 -0
- package/build/domains/catalog/dtos.d.ts.map +1 -0
- package/build/domains/catalog/dtos.js +43 -0
- package/build/domains/catalog/dtos.js.map +1 -0
- package/build/domains/catalog/index.d.ts +194 -0
- package/build/domains/catalog/index.d.ts.map +1 -0
- package/build/{commands/payment-methods → domains/catalog}/index.js +11 -4
- package/build/domains/catalog/index.js.map +1 -0
- package/build/domains/catalog/queries.d.ts +168 -0
- package/build/domains/catalog/queries.d.ts.map +1 -0
- package/build/domains/catalog/queries.js +29 -0
- package/build/domains/catalog/queries.js.map +1 -0
- package/build/domains/config/index.d.ts +40 -0
- package/build/domains/config/index.d.ts.map +1 -0
- package/build/domains/config/index.js +18 -0
- package/build/domains/config/index.js.map +1 -0
- package/build/domains/orders/commands.d.ts +262 -0
- package/build/domains/orders/commands.d.ts.map +1 -0
- package/build/domains/orders/commands.js +47 -0
- package/build/domains/orders/commands.js.map +1 -0
- package/build/domains/orders/dtos.d.ts +112 -0
- package/build/domains/orders/dtos.d.ts.map +1 -0
- package/build/domains/orders/dtos.js +44 -0
- package/build/domains/orders/dtos.js.map +1 -0
- package/build/domains/orders/events.d.ts +21 -0
- package/build/domains/orders/events.d.ts.map +1 -0
- package/build/domains/orders/events.js +19 -0
- package/build/domains/orders/events.js.map +1 -0
- package/build/domains/orders/index.d.ts +381 -0
- package/build/domains/orders/index.d.ts.map +1 -0
- package/build/domains/orders/index.js +28 -0
- package/build/domains/orders/index.js.map +1 -0
- package/build/domains/orders/queries.d.ts +532 -0
- package/build/domains/orders/queries.d.ts.map +1 -0
- package/build/domains/orders/queries.js +40 -0
- package/build/domains/orders/queries.js.map +1 -0
- package/build/domains/payments/index.d.ts +96 -0
- package/build/domains/payments/index.d.ts.map +1 -0
- package/build/domains/payments/index.js +34 -0
- package/build/domains/payments/index.js.map +1 -0
- package/build/domains/products/commands.d.ts +302 -0
- package/build/domains/products/commands.d.ts.map +1 -0
- package/build/domains/products/commands.js +101 -0
- package/build/domains/products/commands.js.map +1 -0
- package/build/domains/products/dtos.d.ts +122 -0
- package/build/domains/products/dtos.d.ts.map +1 -0
- package/build/domains/products/dtos.js +54 -0
- package/build/domains/products/dtos.js.map +1 -0
- package/build/domains/products/index.d.ts +276 -0
- package/build/domains/products/index.d.ts.map +1 -0
- package/build/{commands/auth → domains/products}/index.js +11 -5
- package/build/domains/products/index.js.map +1 -0
- package/build/domains/products/queries.d.ts +334 -0
- package/build/domains/products/queries.d.ts.map +1 -0
- package/build/domains/products/queries.js +41 -0
- package/build/domains/products/queries.js.map +1 -0
- package/build/domains/promo-codes/index.d.ts +92 -0
- package/build/domains/promo-codes/index.d.ts.map +1 -0
- package/build/domains/promo-codes/index.js +40 -0
- package/build/domains/promo-codes/index.js.map +1 -0
- package/build/domains/stats/index.d.ts +274 -0
- package/build/domains/stats/index.d.ts.map +1 -0
- package/build/domains/stats/index.js +76 -0
- package/build/domains/stats/index.js.map +1 -0
- package/build/domains/users/dtos.d.ts +9 -0
- package/build/domains/users/dtos.d.ts.map +1 -0
- package/build/domains/users/dtos.js +11 -0
- package/build/domains/users/dtos.js.map +1 -0
- package/build/domains/users/index.d.ts +101 -0
- package/build/domains/users/index.d.ts.map +1 -0
- package/build/domains/users/index.js +52 -0
- package/build/domains/users/index.js.map +1 -0
- package/build/index.d.ts +1310 -1
- package/build/index.d.ts.map +1 -0
- package/build/index.js +35 -1
- package/build/index.js.map +1 -0
- package/build/shared/api-response.d.ts +17 -0
- package/build/shared/api-response.d.ts.map +1 -0
- package/build/shared/api-response.js +22 -0
- package/build/shared/api-response.js.map +1 -0
- package/build/shared/common.d.ts +14 -0
- package/build/shared/common.d.ts.map +1 -0
- package/build/shared/common.js +8 -0
- package/build/shared/common.js.map +1 -0
- package/build/shared/errors.d.ts +34 -0
- package/build/shared/errors.d.ts.map +1 -0
- package/build/shared/errors.js +36 -0
- package/build/shared/errors.js.map +1 -0
- package/build/shared/index.d.ts +7 -0
- package/build/shared/index.d.ts.map +1 -0
- package/build/{commands/orders → shared}/index.js +7 -6
- package/build/shared/index.js.map +1 -0
- package/build/shared/money.d.ts +32 -0
- package/build/shared/money.d.ts.map +1 -0
- package/build/shared/money.js +20 -0
- package/build/shared/money.js.map +1 -0
- package/build/shared/pagination.d.ts +27 -0
- package/build/shared/pagination.d.ts.map +1 -0
- package/build/shared/pagination.js +22 -0
- package/build/shared/pagination.js.map +1 -0
- package/build/shared/types.d.ts +20 -0
- package/build/shared/types.d.ts.map +1 -0
- package/build/{types.js → shared/types.js} +1 -0
- package/build/shared/types.js.map +1 -0
- package/package.json +41 -15
- package/build/commands/api-response.d.ts +0 -18
- package/build/commands/api-response.js +0 -13
- package/build/commands/auth/confirm.d.ts +0 -11
- package/build/commands/auth/confirm.js +0 -11
- package/build/commands/auth/endpoints.d.ts +0 -114
- package/build/commands/auth/endpoints.js +0 -50
- package/build/commands/auth/index.d.ts +0 -5
- package/build/commands/auth/login.d.ts +0 -20
- package/build/commands/auth/login.js +0 -11
- package/build/commands/auth/profile.d.ts +0 -18
- package/build/commands/auth/profile.js +0 -10
- package/build/commands/auth/register.d.ts +0 -12
- package/build/commands/auth/register.js +0 -11
- package/build/commands/auth/reset.d.ts +0 -12
- package/build/commands/auth/reset.js +0 -9
- package/build/commands/consts.d.ts +0 -1
- package/build/commands/consts.js +0 -4
- package/build/commands/index.d.ts +0 -13
- package/build/commands/index.js +0 -29
- package/build/commands/orders/create.d.ts +0 -95
- package/build/commands/orders/create.js +0 -40
- package/build/commands/orders/endpoints.d.ts +0 -726
- package/build/commands/orders/endpoints.js +0 -47
- package/build/commands/orders/enums.d.ts +0 -7
- package/build/commands/orders/enums.js +0 -25
- package/build/commands/orders/index.d.ts +0 -6
- package/build/commands/orders/query.d.ts +0 -103
- package/build/commands/orders/query.js +0 -45
- package/build/commands/orders/read.d.ts +0 -230
- package/build/commands/orders/read.js +0 -81
- package/build/commands/orders/update.d.ts +0 -23
- package/build/commands/orders/update.js +0 -16
- package/build/commands/pagination.d.ts +0 -12
- package/build/commands/pagination.js +0 -11
- package/build/commands/payment-methods/create.d.ts +0 -45
- package/build/commands/payment-methods/create.js +0 -22
- package/build/commands/payment-methods/endpoints.d.ts +0 -536
- package/build/commands/payment-methods/endpoints.js +0 -63
- package/build/commands/payment-methods/index.d.ts +0 -4
- package/build/commands/payment-methods/read.d.ts +0 -71
- package/build/commands/payment-methods/read.js +0 -28
- package/build/commands/payment-methods/update.d.ts +0 -45
- package/build/commands/payment-methods/update.js +0 -19
- package/build/commands/products/create.d.ts +0 -229
- package/build/commands/products/create.js +0 -122
- package/build/commands/products/endpoints.d.ts +0 -1881
- package/build/commands/products/endpoints.js +0 -99
- package/build/commands/products/enums.d.ts +0 -19
- package/build/commands/products/enums.js +0 -27
- package/build/commands/products/index.d.ts +0 -6
- package/build/commands/products/query.d.ts +0 -79
- package/build/commands/products/query.js +0 -55
- package/build/commands/products/read.d.ts +0 -1178
- package/build/commands/products/read.js +0 -231
- package/build/commands/products/update.d.ts +0 -78
- package/build/commands/products/update.js +0 -10
- package/build/commands/promocode-activations/create.d.ts +0 -18
- package/build/commands/promocode-activations/create.js +0 -10
- package/build/commands/promocode-activations/index.d.ts +0 -3
- package/build/commands/promocode-activations/index.js +0 -19
- package/build/commands/promocode-activations/read.d.ts +0 -21
- package/build/commands/promocode-activations/read.js +0 -14
- package/build/commands/promocode-activations/update.d.ts +0 -18
- package/build/commands/promocode-activations/update.js +0 -10
- package/build/commands/promocodes/create.d.ts +0 -39
- package/build/commands/promocodes/create.js +0 -18
- package/build/commands/promocodes/endpoints.d.ts +0 -353
- package/build/commands/promocodes/endpoints.js +0 -46
- package/build/commands/promocodes/enums.d.ts +0 -5
- package/build/commands/promocodes/enums.js +0 -9
- package/build/commands/promocodes/index.d.ts +0 -5
- package/build/commands/promocodes/index.js +0 -21
- package/build/commands/promocodes/read.d.ts +0 -45
- package/build/commands/promocodes/read.js +0 -23
- package/build/commands/promocodes/update.d.ts +0 -33
- package/build/commands/promocodes/update.js +0 -16
- package/build/commands/refresh-sessions/create.d.ts +0 -24
- package/build/commands/refresh-sessions/create.js +0 -13
- package/build/commands/refresh-sessions/enums.d.ts +0 -3
- package/build/commands/refresh-sessions/enums.js +0 -8
- package/build/commands/refresh-sessions/index.d.ts +0 -4
- package/build/commands/refresh-sessions/index.js +0 -20
- package/build/commands/refresh-sessions/read.d.ts +0 -27
- package/build/commands/refresh-sessions/read.js +0 -17
- package/build/commands/refresh-sessions/update.d.ts +0 -24
- package/build/commands/refresh-sessions/update.js +0 -16
- package/build/commands/settings/endpoints.d.ts +0 -108
- package/build/commands/settings/endpoints.js +0 -43
- package/build/commands/settings/index.d.ts +0 -3
- package/build/commands/settings/index.js +0 -19
- package/build/commands/settings/read.d.ts +0 -18
- package/build/commands/settings/read.js +0 -10
- package/build/commands/settings/update.d.ts +0 -18
- package/build/commands/settings/update.js +0 -10
- package/build/commands/stats/endpoints.d.ts +0 -67
- package/build/commands/stats/endpoints.js +0 -13
- package/build/commands/stats/index.d.ts +0 -3
- package/build/commands/stats/index.js +0 -19
- package/build/commands/stats/query.d.ts +0 -31
- package/build/commands/stats/query.js +0 -15
- package/build/commands/stats/read.d.ts +0 -30
- package/build/commands/stats/read.js +0 -17
- package/build/commands/users/create.d.ts +0 -42
- package/build/commands/users/create.js +0 -19
- package/build/commands/users/endpoints.d.ts +0 -403
- package/build/commands/users/endpoints.js +0 -39
- package/build/commands/users/enums.d.ts +0 -6
- package/build/commands/users/enums.js +0 -10
- package/build/commands/users/index.d.ts +0 -6
- package/build/commands/users/index.js +0 -22
- package/build/commands/users/query.d.ts +0 -52
- package/build/commands/users/query.js +0 -21
- package/build/commands/users/read.d.ts +0 -60
- package/build/commands/users/read.js +0 -28
- package/build/commands/users/update.d.ts +0 -42
- package/build/commands/users/update.js +0 -19
- package/build/types.d.ts +0 -8
- package/commands/api-response.ts +0 -10
- package/commands/auth/confirm.ts +0 -10
- package/commands/auth/endpoints.ts +0 -51
- package/commands/auth/index.ts +0 -5
- package/commands/auth/login.ts +0 -13
- package/commands/auth/profile.ts +0 -10
- package/commands/auth/register.ts +0 -8
- package/commands/auth/reset.ts +0 -9
- package/commands/consts.ts +0 -1
- package/commands/index.ts +0 -13
- package/commands/orders/create.ts +0 -41
- package/commands/orders/endpoints.ts +0 -51
- package/commands/orders/enums.ts +0 -25
- package/commands/orders/index.ts +0 -6
- package/commands/orders/query.ts +0 -46
- package/commands/orders/read.ts +0 -83
- package/commands/orders/update.ts +0 -16
- package/commands/pagination.ts +0 -8
- package/commands/payment-methods/create.ts +0 -19
- package/commands/payment-methods/endpoints.ts +0 -67
- package/commands/payment-methods/index.ts +0 -4
- package/commands/payment-methods/read.ts +0 -30
- package/commands/payment-methods/update.ts +0 -19
- package/commands/products/create.ts +0 -134
- package/commands/products/endpoints.ts +0 -108
- package/commands/products/enums.ts +0 -33
- package/commands/products/index.ts +0 -6
- package/commands/products/query.ts +0 -52
- package/commands/products/read.ts +0 -268
- package/commands/products/update.ts +0 -11
- package/commands/promocode-activations/create.ts +0 -10
- package/commands/promocode-activations/index.ts +0 -3
- package/commands/promocode-activations/read.ts +0 -11
- package/commands/promocode-activations/update.ts +0 -10
- package/commands/promocodes/create.ts +0 -18
- package/commands/promocodes/endpoints.ts +0 -62
- package/commands/promocodes/enums.ts +0 -9
- package/commands/promocodes/index.ts +0 -5
- package/commands/promocodes/read.ts +0 -20
- package/commands/promocodes/update.ts +0 -16
- package/commands/refresh-sessions/create.ts +0 -13
- package/commands/refresh-sessions/enums.ts +0 -4
- package/commands/refresh-sessions/index.ts +0 -4
- package/commands/refresh-sessions/read.ts +0 -14
- package/commands/refresh-sessions/update.ts +0 -13
- package/commands/settings/endpoints.ts +0 -52
- package/commands/settings/index.ts +0 -3
- package/commands/settings/read.ts +0 -10
- package/commands/settings/update.ts +0 -10
- package/commands/stats/endpoints.ts +0 -23
- package/commands/stats/index.ts +0 -3
- package/commands/stats/query.ts +0 -18
- package/commands/stats/read.ts +0 -14
- package/commands/users/create.ts +0 -19
- package/commands/users/endpoints.ts +0 -47
- package/commands/users/enums.ts +0 -10
- package/commands/users/index.ts +0 -6
- package/commands/users/query.ts +0 -20
- package/commands/users/read.ts +0 -25
- package/commands/users/update.ts +0 -19
- package/index.ts +0 -1
- package/tsconfig.json +0 -111
- package/types.ts +0 -9
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentEndpoints = exports.PaymentWebhookEndpoint = exports.InitiatePaymentEndpoint = exports.InitiatePaymentResponseSchema = exports.InitiatePaymentRequestSchema = exports.PaymentProviderSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../shared/common");
|
|
6
|
+
exports.PaymentProviderSchema = zod_1.z.enum(["antilopay", "cryptopayo"]);
|
|
7
|
+
exports.InitiatePaymentRequestSchema = zod_1.z.object({
|
|
8
|
+
orderId: zod_1.z.number().int().positive(),
|
|
9
|
+
});
|
|
10
|
+
exports.InitiatePaymentResponseSchema = zod_1.z.object({
|
|
11
|
+
paymentUrl: zod_1.z.string(),
|
|
12
|
+
providerPaymentId: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.InitiatePaymentEndpoint = {
|
|
15
|
+
method: "POST",
|
|
16
|
+
path: "/api/payments/:provider/initiate",
|
|
17
|
+
params: zod_1.z.object({ provider: exports.PaymentProviderSchema }),
|
|
18
|
+
request: exports.InitiatePaymentRequestSchema,
|
|
19
|
+
response: exports.InitiatePaymentResponseSchema,
|
|
20
|
+
requiresAuth: true,
|
|
21
|
+
rateLimit: { limit: 5, ttlSec: 60 },
|
|
22
|
+
};
|
|
23
|
+
exports.PaymentWebhookEndpoint = {
|
|
24
|
+
method: "POST",
|
|
25
|
+
path: "/api/payments/webhook/:provider",
|
|
26
|
+
params: zod_1.z.object({ provider: exports.PaymentProviderSchema }),
|
|
27
|
+
response: common_1.SuccessResponseSchema,
|
|
28
|
+
rateLimit: { limit: 60, ttlSec: 60 },
|
|
29
|
+
};
|
|
30
|
+
exports.PaymentEndpoints = {
|
|
31
|
+
initiate: exports.InitiatePaymentEndpoint,
|
|
32
|
+
webhook: exports.PaymentWebhookEndpoint,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/payments/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,gDAA4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|
|
5
|
+
type: z.ZodEnum<{
|
|
6
|
+
GAME_KEY: "GAME_KEY";
|
|
7
|
+
GAME_GIFT: "GAME_GIFT";
|
|
8
|
+
TOPUP: "TOPUP";
|
|
9
|
+
SUBSCRIPTION: "SUBSCRIPTION";
|
|
10
|
+
IN_GAME_ITEM: "IN_GAME_ITEM";
|
|
11
|
+
DLC: "DLC";
|
|
12
|
+
CURRENCY: "CURRENCY";
|
|
13
|
+
VOUCHER: "VOUCHER";
|
|
14
|
+
}>;
|
|
15
|
+
basePriceUsd: z.ZodString;
|
|
16
|
+
description: z.ZodOptional<z.ZodString>;
|
|
17
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
18
|
+
coverImageUrl: z.ZodOptional<z.ZodURL>;
|
|
19
|
+
steamAppId: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
showcaseId: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
subShowcaseId: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
categoryId: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type CreateProductRequest = z.infer<typeof CreateProductRequestSchema>;
|
|
25
|
+
export declare const CreateVariantRequestSchema: z.ZodObject<{
|
|
26
|
+
productId: z.ZodNumber;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
sku: z.ZodString;
|
|
29
|
+
priceUsd: z.ZodString;
|
|
30
|
+
deliveryType: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
AUTOMATIC: "AUTOMATIC";
|
|
32
|
+
MANUAL: "MANUAL";
|
|
33
|
+
BOT: "BOT";
|
|
34
|
+
}>>;
|
|
35
|
+
desslyServiceType: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
VOUCHER: "VOUCHER";
|
|
37
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
38
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
39
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
40
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
41
|
+
}>>;
|
|
42
|
+
desslyProductId: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
desslyVariationId: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
desslyRegion: z.ZodOptional<z.ZodString>;
|
|
45
|
+
topupAmount: z.ZodOptional<z.ZodString>;
|
|
46
|
+
topupCurrency: z.ZodOptional<z.ZodString>;
|
|
47
|
+
durationDays: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
49
|
+
regionCode: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type CreateVariantRequest = z.infer<typeof CreateVariantRequestSchema>;
|
|
52
|
+
export declare const ImportKeysRequestSchema: z.ZodObject<{
|
|
53
|
+
keys: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type ImportKeysRequest = z.infer<typeof ImportKeysRequestSchema>;
|
|
56
|
+
export declare const ParseSteamResponseSchema: z.ZodObject<{
|
|
57
|
+
appId: z.ZodNumber;
|
|
58
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
59
|
+
edition: z.ZodString;
|
|
60
|
+
packageId: z.ZodNumber;
|
|
61
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
62
|
+
region: z.ZodString;
|
|
63
|
+
price: z.ZodString;
|
|
64
|
+
priceOriginal: z.ZodString;
|
|
65
|
+
discount: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type ParseSteamResponse = z.infer<typeof ParseSteamResponseSchema>;
|
|
70
|
+
export declare const CreateProductEndpoint: {
|
|
71
|
+
readonly method: "POST";
|
|
72
|
+
readonly path: "/api/admin/products";
|
|
73
|
+
readonly request: z.ZodObject<{
|
|
74
|
+
slug: z.ZodString;
|
|
75
|
+
title: z.ZodString;
|
|
76
|
+
type: z.ZodEnum<{
|
|
77
|
+
GAME_KEY: "GAME_KEY";
|
|
78
|
+
GAME_GIFT: "GAME_GIFT";
|
|
79
|
+
TOPUP: "TOPUP";
|
|
80
|
+
SUBSCRIPTION: "SUBSCRIPTION";
|
|
81
|
+
IN_GAME_ITEM: "IN_GAME_ITEM";
|
|
82
|
+
DLC: "DLC";
|
|
83
|
+
CURRENCY: "CURRENCY";
|
|
84
|
+
VOUCHER: "VOUCHER";
|
|
85
|
+
}>;
|
|
86
|
+
basePriceUsd: z.ZodString;
|
|
87
|
+
description: z.ZodOptional<z.ZodString>;
|
|
88
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
89
|
+
coverImageUrl: z.ZodOptional<z.ZodURL>;
|
|
90
|
+
steamAppId: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
showcaseId: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
subShowcaseId: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
categoryId: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
readonly response: z.ZodObject<{
|
|
96
|
+
id: z.ZodNumber;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
readonly requiresAuth: true;
|
|
99
|
+
readonly requiresAdmin: true;
|
|
100
|
+
};
|
|
101
|
+
export declare const ArchiveProductEndpoint: {
|
|
102
|
+
readonly method: "POST";
|
|
103
|
+
readonly path: "/api/admin/products/:id/archive";
|
|
104
|
+
readonly params: z.ZodObject<{
|
|
105
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
readonly response: z.ZodObject<{
|
|
108
|
+
id: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
readonly requiresAuth: true;
|
|
111
|
+
readonly requiresAdmin: true;
|
|
112
|
+
};
|
|
113
|
+
export declare const CreateVariantEndpoint: {
|
|
114
|
+
readonly method: "POST";
|
|
115
|
+
readonly path: "/api/admin/products/variants";
|
|
116
|
+
readonly request: z.ZodObject<{
|
|
117
|
+
productId: z.ZodNumber;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
sku: z.ZodString;
|
|
120
|
+
priceUsd: z.ZodString;
|
|
121
|
+
deliveryType: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
AUTOMATIC: "AUTOMATIC";
|
|
123
|
+
MANUAL: "MANUAL";
|
|
124
|
+
BOT: "BOT";
|
|
125
|
+
}>>;
|
|
126
|
+
desslyServiceType: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
VOUCHER: "VOUCHER";
|
|
128
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
129
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
130
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
131
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
132
|
+
}>>;
|
|
133
|
+
desslyProductId: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
desslyVariationId: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
desslyRegion: z.ZodOptional<z.ZodString>;
|
|
136
|
+
topupAmount: z.ZodOptional<z.ZodString>;
|
|
137
|
+
topupCurrency: z.ZodOptional<z.ZodString>;
|
|
138
|
+
durationDays: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
140
|
+
regionCode: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
readonly response: z.ZodObject<{
|
|
143
|
+
id: z.ZodNumber;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
readonly requiresAuth: true;
|
|
146
|
+
readonly requiresAdmin: true;
|
|
147
|
+
};
|
|
148
|
+
export declare const ImportKeysEndpoint: {
|
|
149
|
+
readonly method: "POST";
|
|
150
|
+
readonly path: "/api/admin/products/variants/:id/keys";
|
|
151
|
+
readonly params: z.ZodObject<{
|
|
152
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
readonly request: z.ZodObject<{
|
|
155
|
+
keys: z.ZodArray<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
readonly response: z.ZodObject<{
|
|
158
|
+
imported: z.ZodNumber;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
readonly requiresAuth: true;
|
|
161
|
+
readonly requiresAdmin: true;
|
|
162
|
+
};
|
|
163
|
+
export declare const ParseSteamEndpoint: {
|
|
164
|
+
readonly method: "GET";
|
|
165
|
+
readonly path: "/api/admin/products/parse/steam/:appId";
|
|
166
|
+
readonly params: z.ZodObject<{
|
|
167
|
+
appId: z.ZodCoercedNumber<unknown>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
readonly response: z.ZodObject<{
|
|
170
|
+
appId: z.ZodNumber;
|
|
171
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
172
|
+
edition: z.ZodString;
|
|
173
|
+
packageId: z.ZodNumber;
|
|
174
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
175
|
+
region: z.ZodString;
|
|
176
|
+
price: z.ZodString;
|
|
177
|
+
priceOriginal: z.ZodString;
|
|
178
|
+
discount: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
readonly requiresAuth: true;
|
|
183
|
+
readonly requiresAdmin: true;
|
|
184
|
+
};
|
|
185
|
+
export declare const ProductCommands: {
|
|
186
|
+
readonly create: {
|
|
187
|
+
readonly method: "POST";
|
|
188
|
+
readonly path: "/api/admin/products";
|
|
189
|
+
readonly request: z.ZodObject<{
|
|
190
|
+
slug: z.ZodString;
|
|
191
|
+
title: z.ZodString;
|
|
192
|
+
type: z.ZodEnum<{
|
|
193
|
+
GAME_KEY: "GAME_KEY";
|
|
194
|
+
GAME_GIFT: "GAME_GIFT";
|
|
195
|
+
TOPUP: "TOPUP";
|
|
196
|
+
SUBSCRIPTION: "SUBSCRIPTION";
|
|
197
|
+
IN_GAME_ITEM: "IN_GAME_ITEM";
|
|
198
|
+
DLC: "DLC";
|
|
199
|
+
CURRENCY: "CURRENCY";
|
|
200
|
+
VOUCHER: "VOUCHER";
|
|
201
|
+
}>;
|
|
202
|
+
basePriceUsd: z.ZodString;
|
|
203
|
+
description: z.ZodOptional<z.ZodString>;
|
|
204
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
205
|
+
coverImageUrl: z.ZodOptional<z.ZodURL>;
|
|
206
|
+
steamAppId: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
showcaseId: z.ZodOptional<z.ZodNumber>;
|
|
208
|
+
subShowcaseId: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
categoryId: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
readonly response: z.ZodObject<{
|
|
212
|
+
id: z.ZodNumber;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
readonly requiresAuth: true;
|
|
215
|
+
readonly requiresAdmin: true;
|
|
216
|
+
};
|
|
217
|
+
readonly archive: {
|
|
218
|
+
readonly method: "POST";
|
|
219
|
+
readonly path: "/api/admin/products/:id/archive";
|
|
220
|
+
readonly params: z.ZodObject<{
|
|
221
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
readonly response: z.ZodObject<{
|
|
224
|
+
id: z.ZodNumber;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
readonly requiresAuth: true;
|
|
227
|
+
readonly requiresAdmin: true;
|
|
228
|
+
};
|
|
229
|
+
readonly createVariant: {
|
|
230
|
+
readonly method: "POST";
|
|
231
|
+
readonly path: "/api/admin/products/variants";
|
|
232
|
+
readonly request: z.ZodObject<{
|
|
233
|
+
productId: z.ZodNumber;
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
sku: z.ZodString;
|
|
236
|
+
priceUsd: z.ZodString;
|
|
237
|
+
deliveryType: z.ZodOptional<z.ZodEnum<{
|
|
238
|
+
AUTOMATIC: "AUTOMATIC";
|
|
239
|
+
MANUAL: "MANUAL";
|
|
240
|
+
BOT: "BOT";
|
|
241
|
+
}>>;
|
|
242
|
+
desslyServiceType: z.ZodOptional<z.ZodEnum<{
|
|
243
|
+
VOUCHER: "VOUCHER";
|
|
244
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
245
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
246
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
247
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
248
|
+
}>>;
|
|
249
|
+
desslyProductId: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
desslyVariationId: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
desslyRegion: z.ZodOptional<z.ZodString>;
|
|
252
|
+
topupAmount: z.ZodOptional<z.ZodString>;
|
|
253
|
+
topupCurrency: z.ZodOptional<z.ZodString>;
|
|
254
|
+
durationDays: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
256
|
+
regionCode: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
readonly response: z.ZodObject<{
|
|
259
|
+
id: z.ZodNumber;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
readonly requiresAuth: true;
|
|
262
|
+
readonly requiresAdmin: true;
|
|
263
|
+
};
|
|
264
|
+
readonly importKeys: {
|
|
265
|
+
readonly method: "POST";
|
|
266
|
+
readonly path: "/api/admin/products/variants/:id/keys";
|
|
267
|
+
readonly params: z.ZodObject<{
|
|
268
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
readonly request: z.ZodObject<{
|
|
271
|
+
keys: z.ZodArray<z.ZodString>;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
readonly response: z.ZodObject<{
|
|
274
|
+
imported: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
readonly requiresAuth: true;
|
|
277
|
+
readonly requiresAdmin: true;
|
|
278
|
+
};
|
|
279
|
+
readonly parseSteam: {
|
|
280
|
+
readonly method: "GET";
|
|
281
|
+
readonly path: "/api/admin/products/parse/steam/:appId";
|
|
282
|
+
readonly params: z.ZodObject<{
|
|
283
|
+
appId: z.ZodCoercedNumber<unknown>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
readonly response: z.ZodObject<{
|
|
286
|
+
appId: z.ZodNumber;
|
|
287
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
288
|
+
edition: z.ZodString;
|
|
289
|
+
packageId: z.ZodNumber;
|
|
290
|
+
regions: z.ZodArray<z.ZodObject<{
|
|
291
|
+
region: z.ZodString;
|
|
292
|
+
price: z.ZodString;
|
|
293
|
+
priceOriginal: z.ZodString;
|
|
294
|
+
discount: z.ZodString;
|
|
295
|
+
}, z.core.$strip>>;
|
|
296
|
+
}, z.core.$strip>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
readonly requiresAuth: true;
|
|
299
|
+
readonly requiresAdmin: true;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/domains/products/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;iBAYrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;iBAerC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAgBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOG,CAAC;AAEtC,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAOE,CAAC;AAEtC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOG,CAAC;AAEtC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;CAQM,CAAC;AAEtC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAOM,CAAC;AAEtC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductCommands = exports.ParseSteamEndpoint = exports.ImportKeysEndpoint = exports.CreateVariantEndpoint = exports.ArchiveProductEndpoint = exports.CreateProductEndpoint = exports.ParseSteamResponseSchema = exports.ImportKeysRequestSchema = exports.CreateVariantRequestSchema = exports.CreateProductRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../shared/common");
|
|
6
|
+
const money_1 = require("../../shared/money");
|
|
7
|
+
const dtos_1 = require("./dtos");
|
|
8
|
+
exports.CreateProductRequestSchema = zod_1.z.object({
|
|
9
|
+
slug: zod_1.z.string().min(1).max(128),
|
|
10
|
+
title: zod_1.z.string().min(1).max(256),
|
|
11
|
+
type: dtos_1.ProductTypeSchema,
|
|
12
|
+
basePriceUsd: money_1.MoneyAmountSchema,
|
|
13
|
+
description: zod_1.z.string().max(8192).optional(),
|
|
14
|
+
shortDescription: zod_1.z.string().max(1024).optional(),
|
|
15
|
+
coverImageUrl: zod_1.z.url().optional(),
|
|
16
|
+
steamAppId: zod_1.z.number().int().positive().optional(),
|
|
17
|
+
showcaseId: zod_1.z.number().int().positive().optional(),
|
|
18
|
+
subShowcaseId: zod_1.z.number().int().positive().optional(),
|
|
19
|
+
categoryId: zod_1.z.number().int().positive().optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.CreateVariantRequestSchema = zod_1.z.object({
|
|
22
|
+
productId: zod_1.z.number().int().positive(),
|
|
23
|
+
name: zod_1.z.string().min(1).max(128),
|
|
24
|
+
sku: zod_1.z.string().min(1).max(128),
|
|
25
|
+
priceUsd: money_1.MoneyAmountSchema,
|
|
26
|
+
deliveryType: dtos_1.DeliveryTypeSchema.optional(),
|
|
27
|
+
desslyServiceType: dtos_1.DesslyServiceTypeSchema.optional(),
|
|
28
|
+
desslyProductId: zod_1.z.number().int().positive().optional(),
|
|
29
|
+
desslyVariationId: zod_1.z.number().int().positive().optional(),
|
|
30
|
+
desslyRegion: zod_1.z.string().max(16).optional(),
|
|
31
|
+
topupAmount: money_1.MoneyAmountSchema.optional(),
|
|
32
|
+
topupCurrency: zod_1.z.string().max(8).optional(),
|
|
33
|
+
durationDays: zod_1.z.number().int().positive().optional(),
|
|
34
|
+
platform: zod_1.z.string().max(32).optional(),
|
|
35
|
+
regionCode: zod_1.z.string().max(8).optional(),
|
|
36
|
+
});
|
|
37
|
+
exports.ImportKeysRequestSchema = zod_1.z.object({
|
|
38
|
+
keys: zod_1.z.array(zod_1.z.string().min(1)).min(1).max(10_000),
|
|
39
|
+
});
|
|
40
|
+
exports.ParseSteamResponseSchema = zod_1.z.object({
|
|
41
|
+
appId: zod_1.z.number().int().positive(),
|
|
42
|
+
editions: zod_1.z.array(zod_1.z.object({
|
|
43
|
+
edition: zod_1.z.string(),
|
|
44
|
+
packageId: zod_1.z.number().int().positive(),
|
|
45
|
+
regions: zod_1.z.array(zod_1.z.object({
|
|
46
|
+
region: zod_1.z.string(),
|
|
47
|
+
price: zod_1.z.string(),
|
|
48
|
+
priceOriginal: zod_1.z.string(),
|
|
49
|
+
discount: zod_1.z.string(),
|
|
50
|
+
})),
|
|
51
|
+
})),
|
|
52
|
+
});
|
|
53
|
+
exports.CreateProductEndpoint = {
|
|
54
|
+
method: "POST",
|
|
55
|
+
path: "/api/admin/products",
|
|
56
|
+
request: exports.CreateProductRequestSchema,
|
|
57
|
+
response: zod_1.z.object({ id: zod_1.z.number().int().positive() }),
|
|
58
|
+
requiresAuth: true,
|
|
59
|
+
requiresAdmin: true,
|
|
60
|
+
};
|
|
61
|
+
exports.ArchiveProductEndpoint = {
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: "/api/admin/products/:id/archive",
|
|
64
|
+
params: common_1.IdParamSchema,
|
|
65
|
+
response: zod_1.z.object({ id: zod_1.z.number().int().positive() }),
|
|
66
|
+
requiresAuth: true,
|
|
67
|
+
requiresAdmin: true,
|
|
68
|
+
};
|
|
69
|
+
exports.CreateVariantEndpoint = {
|
|
70
|
+
method: "POST",
|
|
71
|
+
path: "/api/admin/products/variants",
|
|
72
|
+
request: exports.CreateVariantRequestSchema,
|
|
73
|
+
response: zod_1.z.object({ id: zod_1.z.number().int().positive() }),
|
|
74
|
+
requiresAuth: true,
|
|
75
|
+
requiresAdmin: true,
|
|
76
|
+
};
|
|
77
|
+
exports.ImportKeysEndpoint = {
|
|
78
|
+
method: "POST",
|
|
79
|
+
path: "/api/admin/products/variants/:id/keys",
|
|
80
|
+
params: common_1.IdParamSchema,
|
|
81
|
+
request: exports.ImportKeysRequestSchema,
|
|
82
|
+
response: zod_1.z.object({ imported: zod_1.z.number().int().nonnegative() }),
|
|
83
|
+
requiresAuth: true,
|
|
84
|
+
requiresAdmin: true,
|
|
85
|
+
};
|
|
86
|
+
exports.ParseSteamEndpoint = {
|
|
87
|
+
method: "GET",
|
|
88
|
+
path: "/api/admin/products/parse/steam/:appId",
|
|
89
|
+
params: zod_1.z.object({ appId: zod_1.z.coerce.number().int().positive() }),
|
|
90
|
+
response: exports.ParseSteamResponseSchema,
|
|
91
|
+
requiresAuth: true,
|
|
92
|
+
requiresAdmin: true,
|
|
93
|
+
};
|
|
94
|
+
exports.ProductCommands = {
|
|
95
|
+
create: exports.CreateProductEndpoint,
|
|
96
|
+
archive: exports.ArchiveProductEndpoint,
|
|
97
|
+
createVariant: exports.CreateVariantEndpoint,
|
|
98
|
+
importKeys: exports.ImportKeysEndpoint,
|
|
99
|
+
parseSteam: exports.ParseSteamEndpoint,
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../src/domains/products/commands.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,gDAAoD;AACpD,8CAAuD;AACvD,iCAAwF;AAE3E,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,IAAI,EAAE,wBAAiB;IACvB,YAAY,EAAE,yBAAiB;IAC/B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CA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,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,kBAAkB,GAAG;IACjC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,wCAAwC;IAC9C,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC/D,QAAQ,EAAE,gCAAwB;IAClC,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,eAAe,GAAG;IAC9B,MAAM,EAAE,6BAAqB;IAC7B,OAAO,EAAE,8BAAsB;IAC/B,aAAa,EAAE,6BAAqB;IACpC,UAAU,EAAE,0BAAkB;IAC9B,UAAU,EAAE,0BAAkB;CACrB,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MoneyAmountSchema } from "../../shared/money";
|
|
3
|
+
export declare const ProductTypeSchema: z.ZodEnum<{
|
|
4
|
+
GAME_KEY: "GAME_KEY";
|
|
5
|
+
GAME_GIFT: "GAME_GIFT";
|
|
6
|
+
TOPUP: "TOPUP";
|
|
7
|
+
SUBSCRIPTION: "SUBSCRIPTION";
|
|
8
|
+
IN_GAME_ITEM: "IN_GAME_ITEM";
|
|
9
|
+
DLC: "DLC";
|
|
10
|
+
CURRENCY: "CURRENCY";
|
|
11
|
+
VOUCHER: "VOUCHER";
|
|
12
|
+
}>;
|
|
13
|
+
export type ProductType = z.infer<typeof ProductTypeSchema>;
|
|
14
|
+
export declare const ProductStatusSchema: z.ZodEnum<{
|
|
15
|
+
OUT_OF_STOCK: "OUT_OF_STOCK";
|
|
16
|
+
ACTIVE: "ACTIVE";
|
|
17
|
+
DRAFT: "DRAFT";
|
|
18
|
+
ARCHIVED: "ARCHIVED";
|
|
19
|
+
}>;
|
|
20
|
+
export type ProductStatus = z.infer<typeof ProductStatusSchema>;
|
|
21
|
+
export declare const DeliveryTypeSchema: z.ZodEnum<{
|
|
22
|
+
AUTOMATIC: "AUTOMATIC";
|
|
23
|
+
MANUAL: "MANUAL";
|
|
24
|
+
BOT: "BOT";
|
|
25
|
+
}>;
|
|
26
|
+
export type DeliveryType = z.infer<typeof DeliveryTypeSchema>;
|
|
27
|
+
export declare const DesslyServiceTypeSchema: z.ZodEnum<{
|
|
28
|
+
VOUCHER: "VOUCHER";
|
|
29
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
30
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
31
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
32
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
33
|
+
}>;
|
|
34
|
+
export type DesslyServiceType = z.infer<typeof DesslyServiceTypeSchema>;
|
|
35
|
+
export declare const ProductVariantSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodNumber;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
sku: z.ZodString;
|
|
39
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
40
|
+
price: z.ZodObject<{
|
|
41
|
+
usd: z.ZodString;
|
|
42
|
+
rub: z.ZodString;
|
|
43
|
+
uah: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
deliveryType: z.ZodEnum<{
|
|
46
|
+
AUTOMATIC: "AUTOMATIC";
|
|
47
|
+
MANUAL: "MANUAL";
|
|
48
|
+
BOT: "BOT";
|
|
49
|
+
}>;
|
|
50
|
+
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
51
|
+
VOUCHER: "VOUCHER";
|
|
52
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
53
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
54
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
55
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
56
|
+
}>>;
|
|
57
|
+
isActive: z.ZodBoolean;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type ProductVariant = z.infer<typeof ProductVariantSchema>;
|
|
60
|
+
export declare const ProductSchema: z.ZodObject<{
|
|
61
|
+
id: z.ZodNumber;
|
|
62
|
+
slug: z.ZodString;
|
|
63
|
+
title: z.ZodString;
|
|
64
|
+
type: z.ZodEnum<{
|
|
65
|
+
GAME_KEY: "GAME_KEY";
|
|
66
|
+
GAME_GIFT: "GAME_GIFT";
|
|
67
|
+
TOPUP: "TOPUP";
|
|
68
|
+
SUBSCRIPTION: "SUBSCRIPTION";
|
|
69
|
+
IN_GAME_ITEM: "IN_GAME_ITEM";
|
|
70
|
+
DLC: "DLC";
|
|
71
|
+
CURRENCY: "CURRENCY";
|
|
72
|
+
VOUCHER: "VOUCHER";
|
|
73
|
+
}>;
|
|
74
|
+
status: z.ZodEnum<{
|
|
75
|
+
OUT_OF_STOCK: "OUT_OF_STOCK";
|
|
76
|
+
ACTIVE: "ACTIVE";
|
|
77
|
+
DRAFT: "DRAFT";
|
|
78
|
+
ARCHIVED: "ARCHIVED";
|
|
79
|
+
}>;
|
|
80
|
+
description: z.ZodNullable<z.ZodString>;
|
|
81
|
+
shortDescription: z.ZodNullable<z.ZodString>;
|
|
82
|
+
coverImageUrl: z.ZodNullable<z.ZodString>;
|
|
83
|
+
basePrice: z.ZodObject<{
|
|
84
|
+
usd: z.ZodString;
|
|
85
|
+
rub: z.ZodString;
|
|
86
|
+
uah: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
89
|
+
id: z.ZodNumber;
|
|
90
|
+
name: z.ZodString;
|
|
91
|
+
sku: z.ZodString;
|
|
92
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
93
|
+
price: z.ZodObject<{
|
|
94
|
+
usd: z.ZodString;
|
|
95
|
+
rub: z.ZodString;
|
|
96
|
+
uah: z.ZodString;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
deliveryType: z.ZodEnum<{
|
|
99
|
+
AUTOMATIC: "AUTOMATIC";
|
|
100
|
+
MANUAL: "MANUAL";
|
|
101
|
+
BOT: "BOT";
|
|
102
|
+
}>;
|
|
103
|
+
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
104
|
+
VOUCHER: "VOUCHER";
|
|
105
|
+
STEAM_TOPUP: "STEAM_TOPUP";
|
|
106
|
+
STEAM_GIFT: "STEAM_GIFT";
|
|
107
|
+
MOBILE_REFILL: "MOBILE_REFILL";
|
|
108
|
+
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
109
|
+
}>>;
|
|
110
|
+
isActive: z.ZodBoolean;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export type Product = z.infer<typeof ProductSchema>;
|
|
114
|
+
export declare const VariantStockSchema: z.ZodObject<{
|
|
115
|
+
available: z.ZodNumber;
|
|
116
|
+
sold: z.ZodNumber;
|
|
117
|
+
reserved: z.ZodNumber;
|
|
118
|
+
total: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export type VariantStock = z.infer<typeof VariantStockSchema>;
|
|
121
|
+
export { MoneyAmountSchema };
|
|
122
|
+
//# sourceMappingURL=dtos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtos.d.ts","sourceRoot":"","sources":["../../../src/domains/products/dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAsB,MAAM,oBAAoB,CAAC;AAE3E,eAAO,MAAM,iBAAiB;;;;;;;;;EAS5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,mBAAmB;;;;;EAA0D,CAAC;AAC3F,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB;;;;EAAyC,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;iBAS/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,kBAAkB;;;;;iBAK7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoneyAmountSchema = exports.VariantStockSchema = exports.ProductSchema = exports.ProductVariantSchema = exports.DesslyServiceTypeSchema = exports.DeliveryTypeSchema = exports.ProductStatusSchema = exports.ProductTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const money_1 = require("../../shared/money");
|
|
6
|
+
Object.defineProperty(exports, "MoneyAmountSchema", { enumerable: true, get: function () { return money_1.MoneyAmountSchema; } });
|
|
7
|
+
exports.ProductTypeSchema = zod_1.z.enum([
|
|
8
|
+
"GAME_KEY",
|
|
9
|
+
"GAME_GIFT",
|
|
10
|
+
"TOPUP",
|
|
11
|
+
"SUBSCRIPTION",
|
|
12
|
+
"IN_GAME_ITEM",
|
|
13
|
+
"DLC",
|
|
14
|
+
"CURRENCY",
|
|
15
|
+
"VOUCHER",
|
|
16
|
+
]);
|
|
17
|
+
exports.ProductStatusSchema = zod_1.z.enum(["DRAFT", "ACTIVE", "OUT_OF_STOCK", "ARCHIVED"]);
|
|
18
|
+
exports.DeliveryTypeSchema = zod_1.z.enum(["AUTOMATIC", "MANUAL", "BOT"]);
|
|
19
|
+
exports.DesslyServiceTypeSchema = zod_1.z.enum([
|
|
20
|
+
"STEAM_TOPUP",
|
|
21
|
+
"STEAM_GIFT",
|
|
22
|
+
"MOBILE_REFILL",
|
|
23
|
+
"VOUCHER",
|
|
24
|
+
"CRYPTO_REFILL",
|
|
25
|
+
]);
|
|
26
|
+
exports.ProductVariantSchema = zod_1.z.object({
|
|
27
|
+
id: zod_1.z.number().int().positive(),
|
|
28
|
+
name: zod_1.z.string(),
|
|
29
|
+
sku: zod_1.z.string(),
|
|
30
|
+
imageUrl: zod_1.z.string().nullable(),
|
|
31
|
+
price: money_1.MoneyTripletSchema,
|
|
32
|
+
deliveryType: exports.DeliveryTypeSchema,
|
|
33
|
+
desslyServiceType: exports.DesslyServiceTypeSchema.nullable(),
|
|
34
|
+
isActive: zod_1.z.boolean(),
|
|
35
|
+
});
|
|
36
|
+
exports.ProductSchema = zod_1.z.object({
|
|
37
|
+
id: zod_1.z.number().int().positive(),
|
|
38
|
+
slug: zod_1.z.string(),
|
|
39
|
+
title: zod_1.z.string(),
|
|
40
|
+
type: exports.ProductTypeSchema,
|
|
41
|
+
status: exports.ProductStatusSchema,
|
|
42
|
+
description: zod_1.z.string().nullable(),
|
|
43
|
+
shortDescription: zod_1.z.string().nullable(),
|
|
44
|
+
coverImageUrl: zod_1.z.string().nullable(),
|
|
45
|
+
basePrice: money_1.MoneyTripletSchema,
|
|
46
|
+
variants: zod_1.z.array(exports.ProductVariantSchema),
|
|
47
|
+
});
|
|
48
|
+
exports.VariantStockSchema = zod_1.z.object({
|
|
49
|
+
available: zod_1.z.number().int().nonnegative(),
|
|
50
|
+
sold: zod_1.z.number().int().nonnegative(),
|
|
51
|
+
reserved: zod_1.z.number().int().nonnegative(),
|
|
52
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=dtos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtos.js","sourceRoot":"","sources":["../../../src/domains/products/dtos.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAA2E;AA+DlE,kGA/DA,yBAAiB,OA+DA;AA7Db,QAAA,iBAAiB,GAAG,OAAC,CAAC,IAAI,CAAC;IACvC,UAAU;IACV,WAAW;IACX,OAAO;IACP,cAAc;IACd,cAAc;IACd,KAAK;IACL,UAAU;IACV,SAAS;CACT,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC;AAG9E,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAG5D,QAAA,uBAAuB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC7C,aAAa;IACb,YAAY;IACZ,eAAe;IACf,SAAS;IACT,eAAe;CACf,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B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