@gigapay-dev/contracts 3.11.0 → 3.13.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.
@@ -0,0 +1,278 @@
1
+ export * from "./dtos";
2
+ export * from "./queries";
3
+ export * from "./commands";
4
+ export declare const CollectionEndpoints: {
5
+ readonly create: {
6
+ readonly method: "POST";
7
+ readonly path: "/api/admin/collections";
8
+ readonly request: import("zod").ZodObject<{
9
+ slug: import("zod").ZodString;
10
+ name: import("zod").ZodString;
11
+ description: import("zod").ZodOptional<import("zod").ZodString>;
12
+ imageUrl: import("zod").ZodOptional<import("zod").ZodURL>;
13
+ isActive: import("zod").ZodOptional<import("zod").ZodBoolean>;
14
+ }, import("zod/v4/core").$strip>;
15
+ readonly response: import("zod").ZodObject<{
16
+ id: import("zod").ZodNumber;
17
+ slug: import("zod").ZodString;
18
+ name: import("zod").ZodString;
19
+ description: import("zod").ZodNullable<import("zod").ZodString>;
20
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
21
+ isActive: import("zod").ZodBoolean;
22
+ createdAt: import("zod").ZodString;
23
+ updatedAt: import("zod").ZodString;
24
+ version: import("zod").ZodNumber;
25
+ }, import("zod/v4/core").$strip>;
26
+ readonly requiresAuth: true;
27
+ readonly requiresAdmin: true;
28
+ };
29
+ readonly update: {
30
+ readonly method: "PATCH";
31
+ readonly path: "/api/admin/collections/:id";
32
+ readonly params: import("zod").ZodObject<{
33
+ id: import("zod").ZodCoercedNumber<unknown>;
34
+ }, import("zod/v4/core").$strip>;
35
+ readonly request: import("zod").ZodObject<{
36
+ slug: import("zod").ZodOptional<import("zod").ZodString>;
37
+ name: import("zod").ZodOptional<import("zod").ZodString>;
38
+ description: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
39
+ imageUrl: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodURL>>;
40
+ isActive: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodBoolean>>;
41
+ }, import("zod/v4/core").$strip>;
42
+ readonly response: import("zod").ZodObject<{
43
+ id: import("zod").ZodNumber;
44
+ slug: import("zod").ZodString;
45
+ name: import("zod").ZodString;
46
+ description: import("zod").ZodNullable<import("zod").ZodString>;
47
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
48
+ isActive: import("zod").ZodBoolean;
49
+ createdAt: import("zod").ZodString;
50
+ updatedAt: import("zod").ZodString;
51
+ version: import("zod").ZodNumber;
52
+ }, import("zod/v4/core").$strip>;
53
+ readonly requiresAuth: true;
54
+ readonly requiresAdmin: true;
55
+ };
56
+ readonly replaceProducts: {
57
+ readonly method: "PUT";
58
+ readonly path: "/api/admin/collections/:id/products";
59
+ readonly params: import("zod").ZodObject<{
60
+ id: import("zod").ZodCoercedNumber<unknown>;
61
+ }, import("zod/v4/core").$strip>;
62
+ readonly request: import("zod").ZodObject<{
63
+ productIds: import("zod").ZodArray<import("zod").ZodNumber>;
64
+ }, import("zod/v4/core").$strip>;
65
+ readonly response: import("zod").ZodObject<{
66
+ id: import("zod").ZodNumber;
67
+ slug: import("zod").ZodString;
68
+ name: import("zod").ZodString;
69
+ description: import("zod").ZodNullable<import("zod").ZodString>;
70
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
71
+ isActive: import("zod").ZodBoolean;
72
+ createdAt: import("zod").ZodString;
73
+ updatedAt: import("zod").ZodString;
74
+ version: import("zod").ZodNumber;
75
+ products: import("zod").ZodArray<import("zod").ZodObject<{
76
+ productId: import("zod").ZodNumber;
77
+ collectionId: import("zod").ZodNumber;
78
+ sortOrder: import("zod").ZodNumber;
79
+ product: import("zod").ZodObject<{
80
+ id: import("zod").ZodNumber;
81
+ slug: import("zod").ZodString;
82
+ title: import("zod").ZodString;
83
+ status: import("zod").ZodEnum<{
84
+ OUT_OF_STOCK: "OUT_OF_STOCK";
85
+ ACTIVE: "ACTIVE";
86
+ DRAFT: "DRAFT";
87
+ ARCHIVED: "ARCHIVED";
88
+ }>;
89
+ }, import("zod/v4/core").$strip>;
90
+ }, import("zod/v4/core").$strip>>;
91
+ }, import("zod/v4/core").$strip>;
92
+ readonly requiresAuth: true;
93
+ readonly requiresAdmin: true;
94
+ };
95
+ readonly delete: {
96
+ readonly method: "DELETE";
97
+ readonly path: "/api/admin/collections/:id";
98
+ readonly params: import("zod").ZodObject<{
99
+ id: import("zod").ZodCoercedNumber<unknown>;
100
+ }, import("zod/v4/core").$strip>;
101
+ readonly response: import("zod").ZodObject<{
102
+ ok: import("zod").ZodLiteral<true>;
103
+ }, import("zod/v4/core").$strip>;
104
+ readonly requiresAuth: true;
105
+ readonly requiresAdmin: true;
106
+ };
107
+ readonly getBySlug: {
108
+ readonly method: "GET";
109
+ readonly path: "/api/collections/:slug";
110
+ readonly params: import("zod").ZodObject<{
111
+ slug: import("zod").ZodString;
112
+ }, import("zod/v4/core").$strip>;
113
+ readonly query: import("zod").ZodObject<{
114
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<{
115
+ manual: "manual";
116
+ popular: "popular";
117
+ }>>;
118
+ skip: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
119
+ take: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
120
+ currency: import("zod").ZodDefault<import("zod").ZodEnum<{
121
+ USD: "USD";
122
+ RUB: "RUB";
123
+ UAH: "UAH";
124
+ KZT: "KZT";
125
+ }>>;
126
+ }, import("zod/v4/core").$strip>;
127
+ readonly response: import("zod").ZodObject<{
128
+ collection: import("zod").ZodObject<{
129
+ id: import("zod").ZodNumber;
130
+ slug: import("zod").ZodString;
131
+ name: import("zod").ZodString;
132
+ description: import("zod").ZodNullable<import("zod").ZodString>;
133
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
134
+ isActive: import("zod").ZodBoolean;
135
+ createdAt: import("zod").ZodString;
136
+ updatedAt: import("zod").ZodString;
137
+ version: import("zod").ZodNumber;
138
+ }, import("zod/v4/core").$strip>;
139
+ items: import("zod").ZodArray<import("zod").ZodObject<{
140
+ id: import("zod").ZodNumber;
141
+ slug: import("zod").ZodString;
142
+ title: import("zod").ZodString;
143
+ type: import("zod").ZodEnum<{
144
+ GAME_KEY: "GAME_KEY";
145
+ GAME_GIFT: "GAME_GIFT";
146
+ TOPUP: "TOPUP";
147
+ SUBSCRIPTION: "SUBSCRIPTION";
148
+ IN_GAME_ITEM: "IN_GAME_ITEM";
149
+ DLC: "DLC";
150
+ CURRENCY: "CURRENCY";
151
+ VOUCHER: "VOUCHER";
152
+ }>;
153
+ status: import("zod").ZodEnum<{
154
+ OUT_OF_STOCK: "OUT_OF_STOCK";
155
+ ACTIVE: "ACTIVE";
156
+ DRAFT: "DRAFT";
157
+ ARCHIVED: "ARCHIVED";
158
+ }>;
159
+ description: import("zod").ZodNullable<import("zod").ZodString>;
160
+ shortDescription: import("zod").ZodNullable<import("zod").ZodString>;
161
+ coverImageUrl: import("zod").ZodNullable<import("zod").ZodString>;
162
+ basePrice: import("zod").ZodObject<{
163
+ usd: import("zod").ZodString;
164
+ rub: import("zod").ZodString;
165
+ uah: import("zod").ZodString;
166
+ kzt: import("zod").ZodString;
167
+ }, import("zod/v4/core").$strip>;
168
+ popularityScore: import("zod").ZodNumber;
169
+ seo: import("zod").ZodObject<{
170
+ metaTitle: import("zod").ZodString;
171
+ metaDescription: import("zod").ZodString;
172
+ ogImageUrl: import("zod").ZodNullable<import("zod").ZodString>;
173
+ canonicalPath: import("zod").ZodString;
174
+ breadcrumb: import("zod").ZodArray<import("zod").ZodObject<{
175
+ id: import("zod").ZodNumber;
176
+ slug: import("zod").ZodString;
177
+ name: import("zod").ZodString;
178
+ }, import("zod/v4/core").$strip>>;
179
+ }, import("zod/v4/core").$strip>;
180
+ variants: import("zod").ZodArray<import("zod").ZodObject<{
181
+ id: import("zod").ZodNumber;
182
+ name: import("zod").ZodString;
183
+ sku: import("zod").ZodString;
184
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
185
+ price: import("zod").ZodObject<{
186
+ usd: import("zod").ZodString;
187
+ rub: import("zod").ZodString;
188
+ uah: import("zod").ZodString;
189
+ kzt: import("zod").ZodString;
190
+ }, import("zod/v4/core").$strip>;
191
+ deliveryType: import("zod").ZodEnum<{
192
+ AUTOMATIC: "AUTOMATIC";
193
+ MANUAL: "MANUAL";
194
+ BOT: "BOT";
195
+ }>;
196
+ desslyServiceType: import("zod").ZodNullable<import("zod").ZodEnum<{
197
+ VOUCHER: "VOUCHER";
198
+ STEAM_TOPUP: "STEAM_TOPUP";
199
+ STEAM_GIFT: "STEAM_GIFT";
200
+ MOBILE_REFILL: "MOBILE_REFILL";
201
+ CRYPTO_REFILL: "CRYPTO_REFILL";
202
+ }>>;
203
+ isActive: import("zod").ZodBoolean;
204
+ }, import("zod/v4/core").$strip>>;
205
+ media: import("zod").ZodArray<import("zod").ZodObject<{
206
+ id: import("zod").ZodNumber;
207
+ type: import("zod").ZodEnum<{
208
+ IMAGE: "IMAGE";
209
+ VIDEO: "VIDEO";
210
+ }>;
211
+ url: import("zod").ZodString;
212
+ thumbnailUrl: import("zod").ZodNullable<import("zod").ZodString>;
213
+ sortOrder: import("zod").ZodNumber;
214
+ }, import("zod/v4/core").$strip>>;
215
+ }, import("zod/v4/core").$strip>>;
216
+ total: import("zod").ZodNumber;
217
+ skip: import("zod").ZodNumber;
218
+ take: import("zod").ZodNumber;
219
+ }, import("zod/v4/core").$strip>;
220
+ };
221
+ readonly adminList: {
222
+ readonly method: "GET";
223
+ readonly path: "/api/admin/collections";
224
+ readonly response: import("zod").ZodArray<import("zod").ZodObject<{
225
+ id: import("zod").ZodNumber;
226
+ slug: import("zod").ZodString;
227
+ name: import("zod").ZodString;
228
+ description: import("zod").ZodNullable<import("zod").ZodString>;
229
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
230
+ isActive: import("zod").ZodBoolean;
231
+ createdAt: import("zod").ZodString;
232
+ updatedAt: import("zod").ZodString;
233
+ version: import("zod").ZodNumber;
234
+ _count: import("zod").ZodObject<{
235
+ products: import("zod").ZodNumber;
236
+ }, import("zod/v4/core").$strip>;
237
+ }, import("zod/v4/core").$strip>>;
238
+ readonly requiresAuth: true;
239
+ readonly requiresAdmin: true;
240
+ };
241
+ readonly adminGetById: {
242
+ readonly method: "GET";
243
+ readonly path: "/api/admin/collections/:id";
244
+ readonly params: import("zod").ZodObject<{
245
+ id: import("zod").ZodCoercedNumber<unknown>;
246
+ }, import("zod/v4/core").$strip>;
247
+ readonly response: import("zod").ZodObject<{
248
+ id: import("zod").ZodNumber;
249
+ slug: import("zod").ZodString;
250
+ name: import("zod").ZodString;
251
+ description: import("zod").ZodNullable<import("zod").ZodString>;
252
+ imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
253
+ isActive: import("zod").ZodBoolean;
254
+ createdAt: import("zod").ZodString;
255
+ updatedAt: import("zod").ZodString;
256
+ version: import("zod").ZodNumber;
257
+ products: import("zod").ZodArray<import("zod").ZodObject<{
258
+ productId: import("zod").ZodNumber;
259
+ collectionId: import("zod").ZodNumber;
260
+ sortOrder: import("zod").ZodNumber;
261
+ product: import("zod").ZodObject<{
262
+ id: import("zod").ZodNumber;
263
+ slug: import("zod").ZodString;
264
+ title: import("zod").ZodString;
265
+ status: import("zod").ZodEnum<{
266
+ OUT_OF_STOCK: "OUT_OF_STOCK";
267
+ ACTIVE: "ACTIVE";
268
+ DRAFT: "DRAFT";
269
+ ARCHIVED: "ARCHIVED";
270
+ }>;
271
+ }, import("zod/v4/core").$strip>;
272
+ }, import("zod/v4/core").$strip>>;
273
+ }, import("zod/v4/core").$strip>;
274
+ readonly requiresAuth: true;
275
+ readonly requiresAdmin: true;
276
+ };
277
+ };
278
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/collections/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAK3B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtB,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CollectionEndpoints = void 0;
18
+ __exportStar(require("./dtos"), exports);
19
+ __exportStar(require("./queries"), exports);
20
+ __exportStar(require("./commands"), exports);
21
+ const commands_1 = require("./commands");
22
+ const queries_1 = require("./queries");
23
+ exports.CollectionEndpoints = {
24
+ ...queries_1.CollectionQueries,
25
+ ...commands_1.CollectionCommands,
26
+ };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,4CAA0B;AAC1B,6CAA2B;AAE3B,yCAAgD;AAChD,uCAA8C;AAEjC,QAAA,mBAAmB,GAAG;IAClC,GAAG,2BAAiB;IACpB,GAAG,6BAAkB;CACZ,CAAC"}
@@ -0,0 +1,364 @@
1
+ import { z } from "zod";
2
+ export declare const CollectionSortSchema: z.ZodEnum<{
3
+ manual: "manual";
4
+ popular: "popular";
5
+ }>;
6
+ export type CollectionSort = z.infer<typeof CollectionSortSchema>;
7
+ export declare const CollectionProductsQuerySchema: z.ZodObject<{
8
+ sort: z.ZodDefault<z.ZodEnum<{
9
+ manual: "manual";
10
+ popular: "popular";
11
+ }>>;
12
+ skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
13
+ take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
14
+ currency: z.ZodDefault<z.ZodEnum<{
15
+ USD: "USD";
16
+ RUB: "RUB";
17
+ UAH: "UAH";
18
+ KZT: "KZT";
19
+ }>>;
20
+ }, z.core.$strip>;
21
+ export type CollectionProductsQuery = z.infer<typeof CollectionProductsQuerySchema>;
22
+ export declare const GetCollectionBySlugEndpoint: {
23
+ readonly method: "GET";
24
+ readonly path: "/api/collections/:slug";
25
+ readonly params: z.ZodObject<{
26
+ slug: z.ZodString;
27
+ }, z.core.$strip>;
28
+ readonly query: z.ZodObject<{
29
+ sort: z.ZodDefault<z.ZodEnum<{
30
+ manual: "manual";
31
+ popular: "popular";
32
+ }>>;
33
+ skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
34
+ take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
35
+ currency: z.ZodDefault<z.ZodEnum<{
36
+ USD: "USD";
37
+ RUB: "RUB";
38
+ UAH: "UAH";
39
+ KZT: "KZT";
40
+ }>>;
41
+ }, z.core.$strip>;
42
+ readonly response: z.ZodObject<{
43
+ collection: z.ZodObject<{
44
+ id: z.ZodNumber;
45
+ slug: z.ZodString;
46
+ name: z.ZodString;
47
+ description: z.ZodNullable<z.ZodString>;
48
+ imageUrl: z.ZodNullable<z.ZodString>;
49
+ isActive: z.ZodBoolean;
50
+ createdAt: z.ZodString;
51
+ updatedAt: z.ZodString;
52
+ version: z.ZodNumber;
53
+ }, z.core.$strip>;
54
+ items: z.ZodArray<z.ZodObject<{
55
+ id: z.ZodNumber;
56
+ slug: z.ZodString;
57
+ title: z.ZodString;
58
+ type: z.ZodEnum<{
59
+ GAME_KEY: "GAME_KEY";
60
+ GAME_GIFT: "GAME_GIFT";
61
+ TOPUP: "TOPUP";
62
+ SUBSCRIPTION: "SUBSCRIPTION";
63
+ IN_GAME_ITEM: "IN_GAME_ITEM";
64
+ DLC: "DLC";
65
+ CURRENCY: "CURRENCY";
66
+ VOUCHER: "VOUCHER";
67
+ }>;
68
+ status: z.ZodEnum<{
69
+ OUT_OF_STOCK: "OUT_OF_STOCK";
70
+ ACTIVE: "ACTIVE";
71
+ DRAFT: "DRAFT";
72
+ ARCHIVED: "ARCHIVED";
73
+ }>;
74
+ description: z.ZodNullable<z.ZodString>;
75
+ shortDescription: z.ZodNullable<z.ZodString>;
76
+ coverImageUrl: z.ZodNullable<z.ZodString>;
77
+ basePrice: z.ZodObject<{
78
+ usd: z.ZodString;
79
+ rub: z.ZodString;
80
+ uah: z.ZodString;
81
+ kzt: z.ZodString;
82
+ }, z.core.$strip>;
83
+ popularityScore: z.ZodNumber;
84
+ seo: z.ZodObject<{
85
+ metaTitle: z.ZodString;
86
+ metaDescription: z.ZodString;
87
+ ogImageUrl: z.ZodNullable<z.ZodString>;
88
+ canonicalPath: z.ZodString;
89
+ breadcrumb: z.ZodArray<z.ZodObject<{
90
+ id: z.ZodNumber;
91
+ slug: z.ZodString;
92
+ name: z.ZodString;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>;
95
+ variants: z.ZodArray<z.ZodObject<{
96
+ id: z.ZodNumber;
97
+ name: z.ZodString;
98
+ sku: z.ZodString;
99
+ imageUrl: z.ZodNullable<z.ZodString>;
100
+ price: z.ZodObject<{
101
+ usd: z.ZodString;
102
+ rub: z.ZodString;
103
+ uah: z.ZodString;
104
+ kzt: z.ZodString;
105
+ }, z.core.$strip>;
106
+ deliveryType: z.ZodEnum<{
107
+ AUTOMATIC: "AUTOMATIC";
108
+ MANUAL: "MANUAL";
109
+ BOT: "BOT";
110
+ }>;
111
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
112
+ VOUCHER: "VOUCHER";
113
+ STEAM_TOPUP: "STEAM_TOPUP";
114
+ STEAM_GIFT: "STEAM_GIFT";
115
+ MOBILE_REFILL: "MOBILE_REFILL";
116
+ CRYPTO_REFILL: "CRYPTO_REFILL";
117
+ }>>;
118
+ isActive: z.ZodBoolean;
119
+ }, z.core.$strip>>;
120
+ media: z.ZodArray<z.ZodObject<{
121
+ id: z.ZodNumber;
122
+ type: z.ZodEnum<{
123
+ IMAGE: "IMAGE";
124
+ VIDEO: "VIDEO";
125
+ }>;
126
+ url: z.ZodString;
127
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
128
+ sortOrder: z.ZodNumber;
129
+ }, z.core.$strip>>;
130
+ }, z.core.$strip>>;
131
+ total: z.ZodNumber;
132
+ skip: z.ZodNumber;
133
+ take: z.ZodNumber;
134
+ }, z.core.$strip>;
135
+ };
136
+ export declare const ListAdminCollectionsEndpoint: {
137
+ readonly method: "GET";
138
+ readonly path: "/api/admin/collections";
139
+ readonly response: z.ZodArray<z.ZodObject<{
140
+ id: z.ZodNumber;
141
+ slug: z.ZodString;
142
+ name: z.ZodString;
143
+ description: z.ZodNullable<z.ZodString>;
144
+ imageUrl: z.ZodNullable<z.ZodString>;
145
+ isActive: z.ZodBoolean;
146
+ createdAt: z.ZodString;
147
+ updatedAt: z.ZodString;
148
+ version: z.ZodNumber;
149
+ _count: z.ZodObject<{
150
+ products: z.ZodNumber;
151
+ }, z.core.$strip>;
152
+ }, z.core.$strip>>;
153
+ readonly requiresAuth: true;
154
+ readonly requiresAdmin: true;
155
+ };
156
+ export declare const GetAdminCollectionEndpoint: {
157
+ readonly method: "GET";
158
+ readonly path: "/api/admin/collections/:id";
159
+ readonly params: z.ZodObject<{
160
+ id: z.ZodCoercedNumber<unknown>;
161
+ }, z.core.$strip>;
162
+ readonly response: z.ZodObject<{
163
+ id: z.ZodNumber;
164
+ slug: z.ZodString;
165
+ name: z.ZodString;
166
+ description: z.ZodNullable<z.ZodString>;
167
+ imageUrl: z.ZodNullable<z.ZodString>;
168
+ isActive: z.ZodBoolean;
169
+ createdAt: z.ZodString;
170
+ updatedAt: z.ZodString;
171
+ version: z.ZodNumber;
172
+ products: z.ZodArray<z.ZodObject<{
173
+ productId: z.ZodNumber;
174
+ collectionId: z.ZodNumber;
175
+ sortOrder: z.ZodNumber;
176
+ product: z.ZodObject<{
177
+ id: z.ZodNumber;
178
+ slug: z.ZodString;
179
+ title: z.ZodString;
180
+ status: z.ZodEnum<{
181
+ OUT_OF_STOCK: "OUT_OF_STOCK";
182
+ ACTIVE: "ACTIVE";
183
+ DRAFT: "DRAFT";
184
+ ARCHIVED: "ARCHIVED";
185
+ }>;
186
+ }, z.core.$strip>;
187
+ }, z.core.$strip>>;
188
+ }, z.core.$strip>;
189
+ readonly requiresAuth: true;
190
+ readonly requiresAdmin: true;
191
+ };
192
+ export declare const CollectionQueries: {
193
+ readonly getBySlug: {
194
+ readonly method: "GET";
195
+ readonly path: "/api/collections/:slug";
196
+ readonly params: z.ZodObject<{
197
+ slug: z.ZodString;
198
+ }, z.core.$strip>;
199
+ readonly query: z.ZodObject<{
200
+ sort: z.ZodDefault<z.ZodEnum<{
201
+ manual: "manual";
202
+ popular: "popular";
203
+ }>>;
204
+ skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
205
+ take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
206
+ currency: z.ZodDefault<z.ZodEnum<{
207
+ USD: "USD";
208
+ RUB: "RUB";
209
+ UAH: "UAH";
210
+ KZT: "KZT";
211
+ }>>;
212
+ }, z.core.$strip>;
213
+ readonly response: z.ZodObject<{
214
+ collection: z.ZodObject<{
215
+ id: z.ZodNumber;
216
+ slug: z.ZodString;
217
+ name: z.ZodString;
218
+ description: z.ZodNullable<z.ZodString>;
219
+ imageUrl: z.ZodNullable<z.ZodString>;
220
+ isActive: z.ZodBoolean;
221
+ createdAt: z.ZodString;
222
+ updatedAt: z.ZodString;
223
+ version: z.ZodNumber;
224
+ }, z.core.$strip>;
225
+ items: z.ZodArray<z.ZodObject<{
226
+ id: z.ZodNumber;
227
+ slug: z.ZodString;
228
+ title: z.ZodString;
229
+ type: z.ZodEnum<{
230
+ GAME_KEY: "GAME_KEY";
231
+ GAME_GIFT: "GAME_GIFT";
232
+ TOPUP: "TOPUP";
233
+ SUBSCRIPTION: "SUBSCRIPTION";
234
+ IN_GAME_ITEM: "IN_GAME_ITEM";
235
+ DLC: "DLC";
236
+ CURRENCY: "CURRENCY";
237
+ VOUCHER: "VOUCHER";
238
+ }>;
239
+ status: z.ZodEnum<{
240
+ OUT_OF_STOCK: "OUT_OF_STOCK";
241
+ ACTIVE: "ACTIVE";
242
+ DRAFT: "DRAFT";
243
+ ARCHIVED: "ARCHIVED";
244
+ }>;
245
+ description: z.ZodNullable<z.ZodString>;
246
+ shortDescription: z.ZodNullable<z.ZodString>;
247
+ coverImageUrl: z.ZodNullable<z.ZodString>;
248
+ basePrice: z.ZodObject<{
249
+ usd: z.ZodString;
250
+ rub: z.ZodString;
251
+ uah: z.ZodString;
252
+ kzt: z.ZodString;
253
+ }, z.core.$strip>;
254
+ popularityScore: z.ZodNumber;
255
+ seo: z.ZodObject<{
256
+ metaTitle: z.ZodString;
257
+ metaDescription: z.ZodString;
258
+ ogImageUrl: z.ZodNullable<z.ZodString>;
259
+ canonicalPath: z.ZodString;
260
+ breadcrumb: z.ZodArray<z.ZodObject<{
261
+ id: z.ZodNumber;
262
+ slug: z.ZodString;
263
+ name: z.ZodString;
264
+ }, z.core.$strip>>;
265
+ }, z.core.$strip>;
266
+ variants: z.ZodArray<z.ZodObject<{
267
+ id: z.ZodNumber;
268
+ name: z.ZodString;
269
+ sku: z.ZodString;
270
+ imageUrl: z.ZodNullable<z.ZodString>;
271
+ price: z.ZodObject<{
272
+ usd: z.ZodString;
273
+ rub: z.ZodString;
274
+ uah: z.ZodString;
275
+ kzt: z.ZodString;
276
+ }, z.core.$strip>;
277
+ deliveryType: z.ZodEnum<{
278
+ AUTOMATIC: "AUTOMATIC";
279
+ MANUAL: "MANUAL";
280
+ BOT: "BOT";
281
+ }>;
282
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
283
+ VOUCHER: "VOUCHER";
284
+ STEAM_TOPUP: "STEAM_TOPUP";
285
+ STEAM_GIFT: "STEAM_GIFT";
286
+ MOBILE_REFILL: "MOBILE_REFILL";
287
+ CRYPTO_REFILL: "CRYPTO_REFILL";
288
+ }>>;
289
+ isActive: z.ZodBoolean;
290
+ }, z.core.$strip>>;
291
+ media: z.ZodArray<z.ZodObject<{
292
+ id: z.ZodNumber;
293
+ type: z.ZodEnum<{
294
+ IMAGE: "IMAGE";
295
+ VIDEO: "VIDEO";
296
+ }>;
297
+ url: z.ZodString;
298
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
299
+ sortOrder: z.ZodNumber;
300
+ }, z.core.$strip>>;
301
+ }, z.core.$strip>>;
302
+ total: z.ZodNumber;
303
+ skip: z.ZodNumber;
304
+ take: z.ZodNumber;
305
+ }, z.core.$strip>;
306
+ };
307
+ readonly adminList: {
308
+ readonly method: "GET";
309
+ readonly path: "/api/admin/collections";
310
+ readonly response: z.ZodArray<z.ZodObject<{
311
+ id: z.ZodNumber;
312
+ slug: z.ZodString;
313
+ name: z.ZodString;
314
+ description: z.ZodNullable<z.ZodString>;
315
+ imageUrl: z.ZodNullable<z.ZodString>;
316
+ isActive: z.ZodBoolean;
317
+ createdAt: z.ZodString;
318
+ updatedAt: z.ZodString;
319
+ version: z.ZodNumber;
320
+ _count: z.ZodObject<{
321
+ products: z.ZodNumber;
322
+ }, z.core.$strip>;
323
+ }, z.core.$strip>>;
324
+ readonly requiresAuth: true;
325
+ readonly requiresAdmin: true;
326
+ };
327
+ readonly adminGetById: {
328
+ readonly method: "GET";
329
+ readonly path: "/api/admin/collections/:id";
330
+ readonly params: z.ZodObject<{
331
+ id: z.ZodCoercedNumber<unknown>;
332
+ }, z.core.$strip>;
333
+ readonly response: z.ZodObject<{
334
+ id: z.ZodNumber;
335
+ slug: z.ZodString;
336
+ name: z.ZodString;
337
+ description: z.ZodNullable<z.ZodString>;
338
+ imageUrl: z.ZodNullable<z.ZodString>;
339
+ isActive: z.ZodBoolean;
340
+ createdAt: z.ZodString;
341
+ updatedAt: z.ZodString;
342
+ version: z.ZodNumber;
343
+ products: z.ZodArray<z.ZodObject<{
344
+ productId: z.ZodNumber;
345
+ collectionId: z.ZodNumber;
346
+ sortOrder: z.ZodNumber;
347
+ product: z.ZodObject<{
348
+ id: z.ZodNumber;
349
+ slug: z.ZodString;
350
+ title: z.ZodString;
351
+ status: z.ZodEnum<{
352
+ OUT_OF_STOCK: "OUT_OF_STOCK";
353
+ ACTIVE: "ACTIVE";
354
+ DRAFT: "DRAFT";
355
+ ARCHIVED: "ARCHIVED";
356
+ }>;
357
+ }, z.core.$strip>;
358
+ }, z.core.$strip>>;
359
+ }, z.core.$strip>;
360
+ readonly requiresAuth: true;
361
+ readonly requiresAdmin: true;
362
+ };
363
+ };
364
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/domains/collections/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,oBAAoB;;;EAAgC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAKxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMH,CAAC;AAEtC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;CAMJ,CAAC;AAEtC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOF,CAAC;AAEtC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC"}