@gigapay-dev/contracts 1.8.4 → 1.8.6

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.
Files changed (69) hide show
  1. package/build/commands/api-response.d.ts +18 -0
  2. package/build/commands/auth/confirm.d.ts +11 -0
  3. package/build/commands/auth/endpoints.d.ts +114 -0
  4. package/build/commands/auth/index.d.ts +5 -0
  5. package/build/commands/auth/login.d.ts +20 -0
  6. package/build/commands/auth/profile.d.ts +18 -0
  7. package/build/commands/auth/register.d.ts +12 -0
  8. package/build/commands/auth/reset.d.ts +12 -0
  9. package/build/commands/consts.d.ts +1 -0
  10. package/build/commands/index.d.ts +13 -0
  11. package/build/commands/orders/create.d.ts +95 -0
  12. package/build/commands/orders/endpoints.d.ts +726 -0
  13. package/build/commands/orders/enums.d.ts +7 -0
  14. package/build/commands/orders/index.d.ts +6 -0
  15. package/build/commands/orders/query.d.ts +103 -0
  16. package/build/commands/orders/read.d.ts +230 -0
  17. package/build/commands/orders/update.d.ts +23 -0
  18. package/build/commands/pagination.d.ts +12 -0
  19. package/build/commands/payment-methods/create.d.ts +45 -0
  20. package/build/commands/payment-methods/endpoints.d.ts +536 -0
  21. package/build/commands/payment-methods/index.d.ts +4 -0
  22. package/build/commands/payment-methods/read.d.ts +71 -0
  23. package/build/commands/payment-methods/update.d.ts +45 -0
  24. package/build/commands/products/create.d.ts +229 -0
  25. package/build/commands/products/endpoints.d.ts +1881 -0
  26. package/build/commands/products/enums.d.ts +19 -0
  27. package/build/commands/products/index.d.ts +6 -0
  28. package/build/commands/products/query.d.ts +79 -0
  29. package/build/commands/products/read.d.ts +1178 -0
  30. package/build/commands/products/read.js +56 -1
  31. package/build/commands/products/update.d.ts +78 -0
  32. package/build/commands/promocode-activations/create.d.ts +18 -0
  33. package/build/commands/promocode-activations/index.d.ts +3 -0
  34. package/build/commands/promocode-activations/read.d.ts +21 -0
  35. package/build/commands/promocode-activations/update.d.ts +18 -0
  36. package/build/commands/promocodes/create.d.ts +39 -0
  37. package/build/commands/promocodes/endpoints.d.ts +353 -0
  38. package/build/commands/promocodes/enums.d.ts +5 -0
  39. package/build/commands/promocodes/index.d.ts +5 -0
  40. package/build/commands/promocodes/read.d.ts +45 -0
  41. package/build/commands/promocodes/update.d.ts +33 -0
  42. package/build/commands/refresh-sessions/create.d.ts +24 -0
  43. package/build/commands/refresh-sessions/enums.d.ts +3 -0
  44. package/build/commands/refresh-sessions/index.d.ts +4 -0
  45. package/build/commands/refresh-sessions/read.d.ts +27 -0
  46. package/build/commands/refresh-sessions/update.d.ts +24 -0
  47. package/build/commands/settings/endpoints.d.ts +108 -0
  48. package/build/commands/settings/index.d.ts +3 -0
  49. package/build/commands/settings/read.d.ts +18 -0
  50. package/build/commands/settings/update.d.ts +18 -0
  51. package/build/commands/stats/endpoints.d.ts +67 -0
  52. package/build/commands/stats/index.d.ts +3 -0
  53. package/build/commands/stats/query.d.ts +31 -0
  54. package/build/commands/stats/read.d.ts +30 -0
  55. package/build/commands/users/create.d.ts +42 -0
  56. package/build/commands/users/endpoints.d.ts +403 -0
  57. package/build/commands/users/enums.d.ts +6 -0
  58. package/build/commands/users/index.d.ts +6 -0
  59. package/build/commands/users/query.d.ts +52 -0
  60. package/build/commands/users/read.d.ts +60 -0
  61. package/build/commands/users/update.d.ts +42 -0
  62. package/build/index.d.ts +1 -0
  63. package/build/types.d.ts +8 -0
  64. package/commands/products/read.ts +63 -0
  65. package/package.json +3 -2
  66. package/tsconfig.json +1 -1
  67. package/build/commands/status/endpoints.js +0 -33
  68. package/build/commands/status/index.js +0 -18
  69. package/build/commands/status/read.js +0 -12
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- 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;
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
7
  const zod_1 = __importDefault(require("zod"));
8
8
  // === Вложенные схемы ===
9
9
  /** Категория (краткая) */
@@ -174,3 +174,58 @@ exports.KeysCountResponseSchema = zod_1.default.object({
174
174
  reserved: zod_1.default.number(),
175
175
  total: zod_1.default.number(),
176
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
+ });
@@ -0,0 +1,78 @@
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>;
@@ -0,0 +1,18 @@
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>;
@@ -0,0 +1,3 @@
1
+ export * from "./create";
2
+ export * from "./read";
3
+ export * from "./update";
@@ -0,0 +1,21 @@
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>;
@@ -0,0 +1,18 @@
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>;
@@ -0,0 +1,39 @@
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>;
@@ -0,0 +1,353 @@
1
+ import { z } from "zod";
2
+ export declare const PromoCodeEndpoints: {
3
+ create: {
4
+ method: "POST";
5
+ path: string;
6
+ request: z.ZodObject<{
7
+ value: z.ZodString;
8
+ discountValue: z.ZodString;
9
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
12
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
13
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
14
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
17
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ value: string;
20
+ type: "USER" | "AD" | "SYSTEM";
21
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
22
+ discountValue: string;
23
+ createdAt?: Date | null | undefined;
24
+ updatedAt?: Date | null | undefined;
25
+ expiredAt?: Date | null | undefined;
26
+ startedAt?: Date | null | undefined;
27
+ deletedAt?: Date | null | undefined;
28
+ activationLimit?: number | null | undefined;
29
+ activationPerUserLimit?: number | null | undefined;
30
+ }, {
31
+ value: string;
32
+ type: "USER" | "AD" | "SYSTEM";
33
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
34
+ discountValue: string;
35
+ createdAt?: Date | null | undefined;
36
+ updatedAt?: Date | null | undefined;
37
+ expiredAt?: Date | null | undefined;
38
+ startedAt?: Date | null | undefined;
39
+ deletedAt?: Date | null | undefined;
40
+ activationLimit?: number | null | undefined;
41
+ activationPerUserLimit?: number | null | undefined;
42
+ }>;
43
+ response: z.ZodObject<{
44
+ id: z.ZodNumber;
45
+ value: z.ZodString;
46
+ activated: z.ZodNumber;
47
+ discountValue: z.ZodString;
48
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
49
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
50
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
51
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
52
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
53
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
56
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ value: string;
59
+ type: "USER" | "AD" | "SYSTEM";
60
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
61
+ id: number;
62
+ discountValue: string;
63
+ activated: number;
64
+ createdAt?: Date | null | undefined;
65
+ updatedAt?: Date | null | undefined;
66
+ expiredAt?: Date | null | undefined;
67
+ startedAt?: Date | null | undefined;
68
+ deletedAt?: Date | null | undefined;
69
+ activationLimit?: number | null | undefined;
70
+ activationPerUserLimit?: number | null | undefined;
71
+ }, {
72
+ value: string;
73
+ type: "USER" | "AD" | "SYSTEM";
74
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
75
+ id: number;
76
+ discountValue: string;
77
+ activated: number;
78
+ createdAt?: Date | null | undefined;
79
+ updatedAt?: Date | null | undefined;
80
+ expiredAt?: Date | null | undefined;
81
+ startedAt?: Date | null | undefined;
82
+ deletedAt?: Date | null | undefined;
83
+ activationLimit?: number | null | undefined;
84
+ activationPerUserLimit?: number | null | undefined;
85
+ }>;
86
+ };
87
+ list: {
88
+ method: "GET";
89
+ path: string;
90
+ request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
91
+ response: z.ZodArray<z.ZodObject<{
92
+ id: z.ZodNumber;
93
+ value: z.ZodString;
94
+ activated: z.ZodNumber;
95
+ discountValue: z.ZodString;
96
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
97
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
98
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
99
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
100
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
101
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
102
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
103
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
104
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ value: string;
107
+ type: "USER" | "AD" | "SYSTEM";
108
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
109
+ id: number;
110
+ discountValue: string;
111
+ activated: number;
112
+ createdAt?: Date | null | undefined;
113
+ updatedAt?: Date | null | undefined;
114
+ expiredAt?: Date | null | undefined;
115
+ startedAt?: Date | null | undefined;
116
+ deletedAt?: Date | null | undefined;
117
+ activationLimit?: number | null | undefined;
118
+ activationPerUserLimit?: number | null | undefined;
119
+ }, {
120
+ value: string;
121
+ type: "USER" | "AD" | "SYSTEM";
122
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
123
+ id: number;
124
+ discountValue: string;
125
+ activated: number;
126
+ createdAt?: Date | null | undefined;
127
+ updatedAt?: Date | null | undefined;
128
+ expiredAt?: Date | null | undefined;
129
+ startedAt?: Date | null | undefined;
130
+ deletedAt?: Date | null | undefined;
131
+ activationLimit?: number | null | undefined;
132
+ activationPerUserLimit?: number | null | undefined;
133
+ }>, "many">;
134
+ };
135
+ getById: {
136
+ method: "GET";
137
+ path: string;
138
+ request: z.ZodObject<{
139
+ id: z.ZodNumber;
140
+ }, "strip", z.ZodTypeAny, {
141
+ id: number;
142
+ }, {
143
+ id: number;
144
+ }>;
145
+ response: z.ZodObject<{
146
+ id: z.ZodNumber;
147
+ value: z.ZodString;
148
+ activated: z.ZodNumber;
149
+ discountValue: z.ZodString;
150
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
151
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
152
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
153
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
154
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
155
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
156
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
157
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
158
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ value: string;
161
+ type: "USER" | "AD" | "SYSTEM";
162
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
163
+ id: number;
164
+ discountValue: string;
165
+ activated: number;
166
+ createdAt?: Date | null | undefined;
167
+ updatedAt?: Date | null | undefined;
168
+ expiredAt?: Date | null | undefined;
169
+ startedAt?: Date | null | undefined;
170
+ deletedAt?: Date | null | undefined;
171
+ activationLimit?: number | null | undefined;
172
+ activationPerUserLimit?: number | null | undefined;
173
+ }, {
174
+ value: string;
175
+ type: "USER" | "AD" | "SYSTEM";
176
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
177
+ id: number;
178
+ discountValue: string;
179
+ activated: number;
180
+ createdAt?: Date | null | undefined;
181
+ updatedAt?: Date | null | undefined;
182
+ expiredAt?: Date | null | undefined;
183
+ startedAt?: Date | null | undefined;
184
+ deletedAt?: Date | null | undefined;
185
+ activationLimit?: number | null | undefined;
186
+ activationPerUserLimit?: number | null | undefined;
187
+ }>;
188
+ };
189
+ getByValue: {
190
+ method: "GET";
191
+ path: string;
192
+ request: z.ZodObject<{
193
+ value: z.ZodString;
194
+ }, "strip", z.ZodTypeAny, {
195
+ value: string;
196
+ }, {
197
+ value: string;
198
+ }>;
199
+ response: z.ZodObject<{
200
+ id: z.ZodNumber;
201
+ value: z.ZodString;
202
+ activated: z.ZodNumber;
203
+ discountValue: z.ZodString;
204
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
205
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
206
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
207
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
208
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
209
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
210
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
211
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
212
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ value: string;
215
+ type: "USER" | "AD" | "SYSTEM";
216
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
217
+ id: number;
218
+ discountValue: string;
219
+ activated: number;
220
+ createdAt?: Date | null | undefined;
221
+ updatedAt?: Date | null | undefined;
222
+ expiredAt?: Date | null | undefined;
223
+ startedAt?: Date | null | undefined;
224
+ deletedAt?: Date | null | undefined;
225
+ activationLimit?: number | null | undefined;
226
+ activationPerUserLimit?: number | null | undefined;
227
+ }, {
228
+ value: string;
229
+ type: "USER" | "AD" | "SYSTEM";
230
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
231
+ id: number;
232
+ discountValue: string;
233
+ activated: number;
234
+ createdAt?: Date | null | undefined;
235
+ updatedAt?: Date | null | undefined;
236
+ expiredAt?: Date | null | undefined;
237
+ startedAt?: Date | null | undefined;
238
+ deletedAt?: Date | null | undefined;
239
+ activationLimit?: number | null | undefined;
240
+ activationPerUserLimit?: number | null | undefined;
241
+ }>;
242
+ };
243
+ update: {
244
+ method: "PATCH";
245
+ path: string;
246
+ request: z.ZodObject<{
247
+ id: z.ZodNumber;
248
+ body: z.ZodObject<{
249
+ value: z.ZodOptional<z.ZodString>;
250
+ discountValue: z.ZodOptional<z.ZodString>;
251
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
252
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
253
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
254
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
255
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
256
+ type: z.ZodOptional<z.ZodEnum<["USER", "AD", "SYSTEM"]>>;
257
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ value?: string | undefined;
260
+ type?: "USER" | "AD" | "SYSTEM" | undefined;
261
+ status?: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED" | undefined;
262
+ discountValue?: string | undefined;
263
+ expiredAt?: Date | null | undefined;
264
+ startedAt?: Date | null | undefined;
265
+ deletedAt?: Date | null | undefined;
266
+ activationLimit?: number | null | undefined;
267
+ activationPerUserLimit?: number | null | undefined;
268
+ }, {
269
+ value?: string | undefined;
270
+ type?: "USER" | "AD" | "SYSTEM" | undefined;
271
+ status?: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED" | undefined;
272
+ discountValue?: string | undefined;
273
+ expiredAt?: Date | null | undefined;
274
+ startedAt?: Date | null | undefined;
275
+ deletedAt?: Date | null | undefined;
276
+ activationLimit?: number | null | undefined;
277
+ activationPerUserLimit?: number | null | undefined;
278
+ }>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ id: number;
281
+ body: {
282
+ value?: string | undefined;
283
+ type?: "USER" | "AD" | "SYSTEM" | undefined;
284
+ status?: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED" | undefined;
285
+ discountValue?: string | undefined;
286
+ expiredAt?: Date | null | undefined;
287
+ startedAt?: Date | null | undefined;
288
+ deletedAt?: Date | null | undefined;
289
+ activationLimit?: number | null | undefined;
290
+ activationPerUserLimit?: number | null | undefined;
291
+ };
292
+ }, {
293
+ id: number;
294
+ body: {
295
+ value?: string | undefined;
296
+ type?: "USER" | "AD" | "SYSTEM" | undefined;
297
+ status?: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED" | undefined;
298
+ discountValue?: string | undefined;
299
+ expiredAt?: Date | null | undefined;
300
+ startedAt?: Date | null | undefined;
301
+ deletedAt?: Date | null | undefined;
302
+ activationLimit?: number | null | undefined;
303
+ activationPerUserLimit?: number | null | undefined;
304
+ };
305
+ }>;
306
+ response: z.ZodObject<{
307
+ id: z.ZodNumber;
308
+ value: z.ZodString;
309
+ activated: z.ZodNumber;
310
+ discountValue: z.ZodString;
311
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
312
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
313
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
314
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
315
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
316
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
317
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
318
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
319
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ value: string;
322
+ type: "USER" | "AD" | "SYSTEM";
323
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
324
+ id: number;
325
+ discountValue: string;
326
+ activated: number;
327
+ createdAt?: Date | null | undefined;
328
+ updatedAt?: Date | null | undefined;
329
+ expiredAt?: Date | null | undefined;
330
+ startedAt?: Date | null | undefined;
331
+ deletedAt?: Date | null | undefined;
332
+ activationLimit?: number | null | undefined;
333
+ activationPerUserLimit?: number | null | undefined;
334
+ }, {
335
+ value: string;
336
+ type: "USER" | "AD" | "SYSTEM";
337
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
338
+ id: number;
339
+ discountValue: string;
340
+ activated: number;
341
+ createdAt?: Date | null | undefined;
342
+ updatedAt?: Date | null | undefined;
343
+ expiredAt?: Date | null | undefined;
344
+ startedAt?: Date | null | undefined;
345
+ deletedAt?: Date | null | undefined;
346
+ activationLimit?: number | null | undefined;
347
+ activationPerUserLimit?: number | null | undefined;
348
+ }>;
349
+ };
350
+ };
351
+ export type PromoCodeEndpointKey = keyof typeof PromoCodeEndpoints;
352
+ export type GetPromoCodeRequest<K extends PromoCodeEndpointKey> = z.infer<typeof PromoCodeEndpoints[K]["request"]>;
353
+ export type GetPromoCodeResponse<K extends PromoCodeEndpointKey> = z.infer<typeof PromoCodeEndpoints[K]["response"]>;
@@ -0,0 +1,5 @@
1
+ import z from "zod";
2
+ export declare const PromoCodeType: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
3
+ export declare const PromoCodeStatus: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
4
+ export type PromoCodeType = z.infer<typeof PromoCodeType>;
5
+ export type PromoCodeStatus = z.infer<typeof PromoCodeStatus>;
@@ -0,0 +1,5 @@
1
+ export * from "./create";
2
+ export * from "./read";
3
+ export * from "./update";
4
+ export * from "./enums";
5
+ export * from "./endpoints";
@@ -0,0 +1,45 @@
1
+ import z from "zod";
2
+ export declare const PromoCodeReadResponseSchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ value: z.ZodString;
5
+ activated: z.ZodNumber;
6
+ discountValue: z.ZodString;
7
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
8
+ expiredAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
9
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
12
+ activationLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
13
+ activationPerUserLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14
+ type: z.ZodEnum<["USER", "AD", "SYSTEM"]>;
15
+ status: z.ZodEnum<["ACTIVE", "INACTIVE", "LIMITED", "EXPIRED", "DELETED"]>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ value: string;
18
+ type: "USER" | "AD" | "SYSTEM";
19
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
20
+ id: number;
21
+ discountValue: string;
22
+ activated: number;
23
+ createdAt?: Date | null | undefined;
24
+ updatedAt?: Date | null | undefined;
25
+ expiredAt?: Date | null | undefined;
26
+ startedAt?: Date | null | undefined;
27
+ deletedAt?: Date | null | undefined;
28
+ activationLimit?: number | null | undefined;
29
+ activationPerUserLimit?: number | null | undefined;
30
+ }, {
31
+ value: string;
32
+ type: "USER" | "AD" | "SYSTEM";
33
+ status: "ACTIVE" | "INACTIVE" | "LIMITED" | "EXPIRED" | "DELETED";
34
+ id: number;
35
+ discountValue: string;
36
+ activated: number;
37
+ createdAt?: Date | null | undefined;
38
+ updatedAt?: Date | null | undefined;
39
+ expiredAt?: Date | null | undefined;
40
+ startedAt?: Date | null | undefined;
41
+ deletedAt?: Date | null | undefined;
42
+ activationLimit?: number | null | undefined;
43
+ activationPerUserLimit?: number | null | undefined;
44
+ }>;
45
+ export type PromoCodeReadResponse = z.infer<typeof PromoCodeReadResponseSchema>;