@djaouad10/shared-types 1.0.3 → 1.0.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 (89) hide show
  1. package/index.d.ts +2414 -0
  2. package/package.json +4 -4
  3. package/dist/api/root.d.ts +0 -2442
  4. package/dist/api/routers/admin/handler-input-schema.d.ts +0 -6
  5. package/dist/api/routers/admin/index.d.ts +0 -56
  6. package/dist/api/routers/cart/handler-input-schema.d.ts +0 -17
  7. package/dist/api/routers/cart/index.d.ts +0 -93
  8. package/dist/api/routers/category/handler-input-schema.d.ts +0 -12
  9. package/dist/api/routers/category/index.d.ts +0 -73
  10. package/dist/api/routers/client/handler-input-schema.d.ts +0 -30
  11. package/dist/api/routers/client/index.d.ts +0 -102
  12. package/dist/api/routers/file/handler-input-schema.d.ts +0 -77
  13. package/dist/api/routers/file/index.d.ts +0 -85
  14. package/dist/api/routers/order/handler-input-schema.d.ts +0 -96
  15. package/dist/api/routers/order/index.d.ts +0 -187
  16. package/dist/api/routers/product/handler-input-schema.d.ts +0 -65
  17. package/dist/api/routers/product/index.d.ts +0 -228
  18. package/dist/api/routers/product/variation/handler-input-schema.d.ts +0 -56
  19. package/dist/api/routers/product/variation/index.d.ts +0 -90
  20. package/dist/api/routers/rating/handler-input-schema.d.ts +0 -41
  21. package/dist/api/routers/rating/index.d.ts +0 -128
  22. package/dist/api/routers/shipping/address/handler-input-schema.d.ts +0 -5
  23. package/dist/api/routers/shipping/address/index.d.ts +0 -66
  24. package/dist/api/routers/shipping/handler-input-schema.d.ts +0 -2
  25. package/dist/api/routers/shipping/index.d.ts +0 -182
  26. package/dist/api/routers/shipping/shipments/handler-input-schema.d.ts +0 -8
  27. package/dist/api/routers/shipping/shipments/index.d.ts +0 -72
  28. package/dist/api/routers/statistics/handler-input-schema.d.ts +0 -2
  29. package/dist/api/routers/statistics/index.d.ts +0 -51
  30. package/dist/api/trpc.d.ts +0 -329
  31. package/dist/data-access-layer/admin.dal.d.ts +0 -12
  32. package/dist/data-access-layer/cart.dal.d.ts +0 -29
  33. package/dist/data-access-layer/category.dal.d.ts +0 -11
  34. package/dist/data-access-layer/client.dal.d.ts +0 -30
  35. package/dist/data-access-layer/file.dal.d.ts +0 -42
  36. package/dist/data-access-layer/order.dal.d.ts +0 -133
  37. package/dist/data-access-layer/product.dal.d.ts +0 -69
  38. package/dist/data-access-layer/rating.dal.d.ts +0 -40
  39. package/dist/data-access-layer/shipping/world-express.dal.d.ts +0 -205
  40. package/dist/data-access-layer/statistic.dal.d.ts +0 -6
  41. package/dist/data-transfer-objects/cart.dto.d.ts +0 -17
  42. package/dist/data-transfer-objects/category.dto.d.ts +0 -5
  43. package/dist/data-transfer-objects/client.dto.d.ts +0 -9
  44. package/dist/data-transfer-objects/file.dto.d.ts +0 -13
  45. package/dist/data-transfer-objects/order.dto.d.ts +0 -52
  46. package/dist/data-transfer-objects/product.dto.d.ts +0 -33
  47. package/dist/data-transfer-objects/rating.dto.d.ts +0 -9
  48. package/dist/errors/index.d.ts +0 -32
  49. package/dist/index.d.ts +0 -2
  50. package/dist/lib/auth.d.ts +0 -1051
  51. package/dist/lib/core.d.ts +0 -15
  52. package/dist/lib/db.d.ts +0 -5
  53. package/dist/lib/env.d.ts +0 -15
  54. package/dist/lib/external-shared-types.d.ts +0 -7
  55. package/dist/lib/static.d.ts +0 -8
  56. package/dist/lib/validation/shared-schemas.d.ts +0 -173
  57. package/dist/services/admin.service.d.ts +0 -12
  58. package/dist/services/cart.service.d.ts +0 -24
  59. package/dist/services/category.service.d.ts +0 -12
  60. package/dist/services/client.service.d.ts +0 -25
  61. package/dist/services/email.service.d.ts +0 -11
  62. package/dist/services/file.service.d.ts +0 -37
  63. package/dist/services/index.d.ts +0 -23
  64. package/dist/services/order.service.d.ts +0 -90
  65. package/dist/services/product.service.d.ts +0 -47
  66. package/dist/services/rating.service.d.ts +0 -31
  67. package/dist/services/shipping/service-definitons.d.ts +0 -122
  68. package/dist/services/shipping/world-epress.service.d.ts +0 -86
  69. package/dist/services/statistic.service.d.ts +0 -8
  70. package/dist/shared-types/admin.shared-types.d.ts +0 -6
  71. package/dist/shared-types/cart.shared-types.d.ts +0 -19
  72. package/dist/shared-types/client.shared-types.d.ts +0 -29
  73. package/dist/shared-types/file.shared-types.d.ts +0 -11
  74. package/dist/shared-types/order.shared-types.d.ts +0 -30
  75. package/dist/shared-types/product.shared-types.d.ts +0 -52
  76. package/dist/shared-types/rating.shared-types.d.ts +0 -40
  77. package/dist/test/factories/cart-item.factory.d.ts +0 -2
  78. package/dist/test/factories/category.factory.d.ts +0 -9
  79. package/dist/test/factories/file.factory.d.ts +0 -21
  80. package/dist/test/factories/index.d.ts +0 -11
  81. package/dist/test/factories/order.factory.d.ts +0 -2
  82. package/dist/test/factories/product.factory.d.ts +0 -48
  83. package/dist/test/factories/rating.factory.d.ts +0 -2
  84. package/dist/test/factories/shipping-details.factory.d.ts +0 -2
  85. package/dist/test/factories/types.d.ts +0 -27
  86. package/dist/test/factories/user.factory.d.ts +0 -13
  87. package/dist/test/factories/variation.factory.d.ts +0 -2
  88. package/dist/test/setup.d.ts +0 -2
  89. package/dist/test/verify-test-env.d.ts +0 -2
package/index.d.ts ADDED
@@ -0,0 +1,2414 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { Color, DeliveryType, OrderStatus, ShippingProvider, Size } from '@prisma/client';
4
+
5
+ export interface PublicCategoryDTO {
6
+ id: string;
7
+ name: string;
8
+ }
9
+ export interface ExtendedImageDTO {
10
+ key: string;
11
+ name: string;
12
+ public_url: string;
13
+ color: string | null;
14
+ product_id: string;
15
+ is_main: boolean;
16
+ }
17
+ export interface PublicImageDTO {
18
+ public_url: string;
19
+ name: string;
20
+ }
21
+ export interface PublicProductDTO {
22
+ id: string;
23
+ category: PublicCategoryDTO | null;
24
+ brand: string;
25
+ name: string;
26
+ price: number;
27
+ discount_price: number | null;
28
+ material: string;
29
+ average_rating: number;
30
+ description: string | null;
31
+ images: PublicImageDTO[];
32
+ }
33
+ export interface PublicVariationDTO {
34
+ id: string;
35
+ size: Size;
36
+ color: Color;
37
+ available_qty: number;
38
+ weight_in_grams: number;
39
+ }
40
+ export interface ExtendedVariationDTO {
41
+ id: string;
42
+ product_id: string;
43
+ size: Size;
44
+ color: Color;
45
+ total_qty: number;
46
+ reserved_qty: number;
47
+ available_qty: number;
48
+ weight_in_grams: number;
49
+ }
50
+ export interface PublicCartItemDTO {
51
+ id: string;
52
+ userId: string;
53
+ variation_id: string;
54
+ selected_qty: number;
55
+ createdAt: Date;
56
+ }
57
+ export type CartItemWithItsVariation = PublicCartItemDTO & {
58
+ variation: PublicVariationDTO & {
59
+ product: {
60
+ price: number;
61
+ discount_price: number | null;
62
+ };
63
+ };
64
+ };
65
+ export interface PublicClientDTO {
66
+ id: string;
67
+ email: string;
68
+ name: string;
69
+ createdAt: Date;
70
+ banned: boolean | null;
71
+ banReason: string | null;
72
+ }
73
+ export interface PublicOrderItemDTO {
74
+ id: string;
75
+ variation_id: string;
76
+ orderId: string;
77
+ qty: number;
78
+ unit_price_at_order_time: number;
79
+ }
80
+ export interface PublicOrderDTO {
81
+ id: string;
82
+ createdAt: Date;
83
+ userId: string;
84
+ tracking_number: string | null;
85
+ status: OrderStatus;
86
+ shipping_status: string | null;
87
+ total_order_price: number;
88
+ total_product_price: number;
89
+ shipping_price_at_order_time: number;
90
+ selected_shipping_provider: ShippingProvider;
91
+ shipping_details_id: string | null;
92
+ delivery_type: DeliveryType;
93
+ fragile: boolean;
94
+ total_weight: number;
95
+ }
96
+ export interface PublicShippingDetailsDTO {
97
+ id: string;
98
+ delivery_type: DeliveryType;
99
+ fragile: boolean;
100
+ full_name: string;
101
+ first_phone: string;
102
+ second_phone: string | null;
103
+ code_wilaya: number;
104
+ commune: string;
105
+ code_postal: string;
106
+ address: string;
107
+ gps_link: string | null;
108
+ client_note: string | null;
109
+ }
110
+ export type ExtendedOrderItemDTO = PublicOrderItemDTO & {
111
+ variation: {
112
+ product_id: string;
113
+ size: Size;
114
+ color: Color;
115
+ weight_in_grams: number;
116
+ };
117
+ };
118
+ export type ExtendedOrderDTO = PublicOrderDTO & {
119
+ shipping_details: PublicShippingDetailsDTO;
120
+ order_items: ExtendedOrderItemDTO[];
121
+ };
122
+ export interface PublicRatingDTO {
123
+ rating: number;
124
+ userId: string;
125
+ product_id: string;
126
+ comment: string | null;
127
+ isApproved: boolean;
128
+ createdAt: Date;
129
+ }
130
+ export interface RatingCursor {
131
+ userId: string;
132
+ productId: string;
133
+ }
134
+ declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
135
+ ctx: {
136
+ db: import("@prisma/client").PrismaClient<{
137
+ log: ("error" | "query" | "warn")[];
138
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
139
+ session: {
140
+ id: string;
141
+ createdAt: Date;
142
+ updatedAt: Date;
143
+ userId: string;
144
+ expiresAt: Date;
145
+ token: string;
146
+ ipAddress?: string | null | undefined;
147
+ userAgent?: string | null | undefined;
148
+ } | null;
149
+ user: {
150
+ id: string;
151
+ createdAt: Date;
152
+ updatedAt: Date;
153
+ email: string;
154
+ emailVerified: boolean;
155
+ name: string;
156
+ image?: string | null | undefined;
157
+ role?: import("@prisma/client").$Enums.Role;
158
+ banned?: boolean | null;
159
+ } | null;
160
+ headers: Headers;
161
+ };
162
+ meta: object;
163
+ errorShape: {
164
+ data: {
165
+ zodError: {
166
+ errors: string[];
167
+ } | null;
168
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
169
+ httpStatus: number;
170
+ path?: string;
171
+ stack?: string;
172
+ };
173
+ message: string;
174
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
175
+ };
176
+ transformer: true;
177
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
178
+ category: import("@trpc/server").TRPCBuiltRouter<{
179
+ ctx: {
180
+ db: import("@prisma/client").PrismaClient<{
181
+ log: ("error" | "query" | "warn")[];
182
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
183
+ session: {
184
+ id: string;
185
+ createdAt: Date;
186
+ updatedAt: Date;
187
+ userId: string;
188
+ expiresAt: Date;
189
+ token: string;
190
+ ipAddress?: string | null | undefined;
191
+ userAgent?: string | null | undefined;
192
+ } | null;
193
+ user: {
194
+ id: string;
195
+ createdAt: Date;
196
+ updatedAt: Date;
197
+ email: string;
198
+ emailVerified: boolean;
199
+ name: string;
200
+ image?: string | null | undefined;
201
+ role?: import("@prisma/client").$Enums.Role;
202
+ banned?: boolean | null;
203
+ } | null;
204
+ headers: Headers;
205
+ };
206
+ meta: object;
207
+ errorShape: {
208
+ data: {
209
+ zodError: {
210
+ errors: string[];
211
+ } | null;
212
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
213
+ httpStatus: number;
214
+ path?: string;
215
+ stack?: string;
216
+ };
217
+ message: string;
218
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
219
+ };
220
+ transformer: true;
221
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
222
+ getAll: import("@trpc/server").TRPCQueryProcedure<{
223
+ input: void;
224
+ output: PublicCategoryDTO[];
225
+ meta: object;
226
+ }>;
227
+ create: import("@trpc/server").TRPCMutationProcedure<{
228
+ input: {
229
+ name: string;
230
+ };
231
+ output: PublicCategoryDTO;
232
+ meta: object;
233
+ }>;
234
+ update: import("@trpc/server").TRPCMutationProcedure<{
235
+ input: {
236
+ categoryId: string;
237
+ newName: string;
238
+ };
239
+ output: PublicCategoryDTO;
240
+ meta: object;
241
+ }>;
242
+ delete: import("@trpc/server").TRPCMutationProcedure<{
243
+ input: {
244
+ categoryId: string;
245
+ };
246
+ output: PublicCategoryDTO;
247
+ meta: object;
248
+ }>;
249
+ }>>;
250
+ admin: import("@trpc/server").TRPCBuiltRouter<{
251
+ ctx: {
252
+ db: import("@prisma/client").PrismaClient<{
253
+ log: ("error" | "query" | "warn")[];
254
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
255
+ session: {
256
+ id: string;
257
+ createdAt: Date;
258
+ updatedAt: Date;
259
+ userId: string;
260
+ expiresAt: Date;
261
+ token: string;
262
+ ipAddress?: string | null | undefined;
263
+ userAgent?: string | null | undefined;
264
+ } | null;
265
+ user: {
266
+ id: string;
267
+ createdAt: Date;
268
+ updatedAt: Date;
269
+ email: string;
270
+ emailVerified: boolean;
271
+ name: string;
272
+ image?: string | null | undefined;
273
+ role?: import("@prisma/client").$Enums.Role;
274
+ banned?: boolean | null;
275
+ } | null;
276
+ headers: Headers;
277
+ };
278
+ meta: object;
279
+ errorShape: {
280
+ data: {
281
+ zodError: {
282
+ errors: string[];
283
+ } | null;
284
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
285
+ httpStatus: number;
286
+ path?: string;
287
+ stack?: string;
288
+ };
289
+ message: string;
290
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
291
+ };
292
+ transformer: true;
293
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
294
+ updatePassword: import("@trpc/server").TRPCMutationProcedure<{
295
+ input: {
296
+ currentPassword: string;
297
+ newPassword: string;
298
+ };
299
+ output: {
300
+ success: boolean;
301
+ };
302
+ meta: object;
303
+ }>;
304
+ }>>;
305
+ cart: import("@trpc/server").TRPCBuiltRouter<{
306
+ ctx: {
307
+ db: import("@prisma/client").PrismaClient<{
308
+ log: ("error" | "query" | "warn")[];
309
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
310
+ session: {
311
+ id: string;
312
+ createdAt: Date;
313
+ updatedAt: Date;
314
+ userId: string;
315
+ expiresAt: Date;
316
+ token: string;
317
+ ipAddress?: string | null | undefined;
318
+ userAgent?: string | null | undefined;
319
+ } | null;
320
+ user: {
321
+ id: string;
322
+ createdAt: Date;
323
+ updatedAt: Date;
324
+ email: string;
325
+ emailVerified: boolean;
326
+ name: string;
327
+ image?: string | null | undefined;
328
+ role?: import("@prisma/client").$Enums.Role;
329
+ banned?: boolean | null;
330
+ } | null;
331
+ headers: Headers;
332
+ };
333
+ meta: object;
334
+ errorShape: {
335
+ data: {
336
+ zodError: {
337
+ errors: string[];
338
+ } | null;
339
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
340
+ httpStatus: number;
341
+ path?: string;
342
+ stack?: string;
343
+ };
344
+ message: string;
345
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
346
+ };
347
+ transformer: true;
348
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
349
+ getMyItems: import("@trpc/server").TRPCQueryProcedure<{
350
+ input: void;
351
+ output: {
352
+ items: CartItemWithItsVariation[];
353
+ };
354
+ meta: object;
355
+ }>;
356
+ updateItemQty: import("@trpc/server").TRPCMutationProcedure<{
357
+ input: {
358
+ variationId: string;
359
+ data: {
360
+ newQty: number;
361
+ };
362
+ };
363
+ output: {
364
+ cartItem: PublicCartItemDTO;
365
+ };
366
+ meta: object;
367
+ }>;
368
+ removeItem: import("@trpc/server").TRPCMutationProcedure<{
369
+ input: {
370
+ variationId: string;
371
+ };
372
+ output: {
373
+ cartItem: PublicCartItemDTO;
374
+ };
375
+ meta: object;
376
+ }>;
377
+ clear: import("@trpc/server").TRPCMutationProcedure<{
378
+ input: void;
379
+ output: {
380
+ count: number;
381
+ };
382
+ meta: object;
383
+ }>;
384
+ addVariation: import("@trpc/server").TRPCMutationProcedure<{
385
+ input: {
386
+ variationId: string;
387
+ data: {
388
+ selectedQty: number;
389
+ };
390
+ };
391
+ output: {
392
+ cartItem: PublicCartItemDTO;
393
+ };
394
+ meta: object;
395
+ }>;
396
+ }>>;
397
+ client: import("@trpc/server").TRPCBuiltRouter<{
398
+ ctx: {
399
+ db: import("@prisma/client").PrismaClient<{
400
+ log: ("error" | "query" | "warn")[];
401
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
402
+ session: {
403
+ id: string;
404
+ createdAt: Date;
405
+ updatedAt: Date;
406
+ userId: string;
407
+ expiresAt: Date;
408
+ token: string;
409
+ ipAddress?: string | null | undefined;
410
+ userAgent?: string | null | undefined;
411
+ } | null;
412
+ user: {
413
+ id: string;
414
+ createdAt: Date;
415
+ updatedAt: Date;
416
+ email: string;
417
+ emailVerified: boolean;
418
+ name: string;
419
+ image?: string | null | undefined;
420
+ role?: import("@prisma/client").$Enums.Role;
421
+ banned?: boolean | null;
422
+ } | null;
423
+ headers: Headers;
424
+ };
425
+ meta: object;
426
+ errorShape: {
427
+ data: {
428
+ zodError: {
429
+ errors: string[];
430
+ } | null;
431
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
432
+ httpStatus: number;
433
+ path?: string;
434
+ stack?: string;
435
+ };
436
+ message: string;
437
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
438
+ };
439
+ transformer: true;
440
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
441
+ getProfileDetails: import("@trpc/server").TRPCQueryProcedure<{
442
+ input: {
443
+ clientId?: string | undefined;
444
+ };
445
+ output: {
446
+ client: PublicClientDTO;
447
+ };
448
+ meta: object;
449
+ }>;
450
+ getInfiniteList: import("@trpc/server").TRPCQueryProcedure<{
451
+ input: {
452
+ limit: number;
453
+ cursor?: string | undefined;
454
+ criteria?: "banned" | "most-orders" | undefined;
455
+ };
456
+ output: {
457
+ clients: PublicClientDTO[];
458
+ nextCursor: string | undefined;
459
+ };
460
+ meta: object;
461
+ }>;
462
+ isBanned: import("@trpc/server").TRPCQueryProcedure<{
463
+ input: {
464
+ clientId: string;
465
+ };
466
+ output: {
467
+ banned: boolean;
468
+ };
469
+ meta: object;
470
+ }>;
471
+ updateProfile: import("@trpc/server").TRPCMutationProcedure<{
472
+ input: {
473
+ newName?: string | undefined;
474
+ currentPassword?: string | undefined;
475
+ newPassword?: string | undefined;
476
+ };
477
+ output: {
478
+ success: boolean;
479
+ };
480
+ meta: object;
481
+ }>;
482
+ updateBanStatus: import("@trpc/server").TRPCMutationProcedure<{
483
+ input: {
484
+ clientId: string;
485
+ banClient: true;
486
+ banExpiresInSeconds: number | null;
487
+ reason: string | null;
488
+ } | {
489
+ clientId: string;
490
+ banClient: false;
491
+ };
492
+ output: {
493
+ success: boolean;
494
+ };
495
+ meta: object;
496
+ }>;
497
+ }>>;
498
+ file: import("@trpc/server").TRPCBuiltRouter<{
499
+ ctx: {
500
+ db: import("@prisma/client").PrismaClient<{
501
+ log: ("error" | "query" | "warn")[];
502
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
503
+ session: {
504
+ id: string;
505
+ createdAt: Date;
506
+ updatedAt: Date;
507
+ userId: string;
508
+ expiresAt: Date;
509
+ token: string;
510
+ ipAddress?: string | null | undefined;
511
+ userAgent?: string | null | undefined;
512
+ } | null;
513
+ user: {
514
+ id: string;
515
+ createdAt: Date;
516
+ updatedAt: Date;
517
+ email: string;
518
+ emailVerified: boolean;
519
+ name: string;
520
+ image?: string | null | undefined;
521
+ role?: import("@prisma/client").$Enums.Role;
522
+ banned?: boolean | null;
523
+ } | null;
524
+ headers: Headers;
525
+ };
526
+ meta: object;
527
+ errorShape: {
528
+ data: {
529
+ zodError: {
530
+ errors: string[];
531
+ } | null;
532
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
533
+ httpStatus: number;
534
+ path?: string;
535
+ stack?: string;
536
+ };
537
+ message: string;
538
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
539
+ };
540
+ transformer: true;
541
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
542
+ updateMainImageOfProduct: import("@trpc/server").TRPCMutationProcedure<{
543
+ input: {
544
+ productId: string;
545
+ newImage: {
546
+ key: string;
547
+ name: string;
548
+ public_url: string;
549
+ color: "BLACK" | "WHITE" | "GRAY" | "RED" | "BLUE" | "GREEN" | "YELLOW" | "ORANGE" | "PURPLE" | "PINK" | "BROWN" | "BEIGE" | "NAVY" | "MAROON" | "TEAL" | null;
550
+ };
551
+ };
552
+ output: {
553
+ success: boolean;
554
+ };
555
+ meta: object;
556
+ }>;
557
+ deleteSingleImageOfProduct: import("@trpc/server").TRPCMutationProcedure<{
558
+ input: {
559
+ imageKey: string;
560
+ };
561
+ output: {
562
+ success: boolean;
563
+ };
564
+ meta: object;
565
+ }>;
566
+ addSingleImageOfProduct: import("@trpc/server").TRPCMutationProcedure<{
567
+ input: {
568
+ productId: string;
569
+ newImage: {
570
+ key: string;
571
+ name: string;
572
+ public_url: string;
573
+ color: "BLACK" | "WHITE" | "GRAY" | "RED" | "BLUE" | "GREEN" | "YELLOW" | "ORANGE" | "PURPLE" | "PINK" | "BROWN" | "BEIGE" | "NAVY" | "MAROON" | "TEAL" | null;
574
+ };
575
+ };
576
+ output: {
577
+ image: ExtendedImageDTO;
578
+ };
579
+ meta: object;
580
+ }>;
581
+ }>>;
582
+ order: import("@trpc/server").TRPCBuiltRouter<{
583
+ ctx: {
584
+ db: import("@prisma/client").PrismaClient<{
585
+ log: ("error" | "query" | "warn")[];
586
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
587
+ session: {
588
+ id: string;
589
+ createdAt: Date;
590
+ updatedAt: Date;
591
+ userId: string;
592
+ expiresAt: Date;
593
+ token: string;
594
+ ipAddress?: string | null | undefined;
595
+ userAgent?: string | null | undefined;
596
+ } | null;
597
+ user: {
598
+ id: string;
599
+ createdAt: Date;
600
+ updatedAt: Date;
601
+ email: string;
602
+ emailVerified: boolean;
603
+ name: string;
604
+ image?: string | null | undefined;
605
+ role?: import("@prisma/client").$Enums.Role;
606
+ banned?: boolean | null;
607
+ } | null;
608
+ headers: Headers;
609
+ };
610
+ meta: object;
611
+ errorShape: {
612
+ data: {
613
+ zodError: {
614
+ errors: string[];
615
+ } | null;
616
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
617
+ httpStatus: number;
618
+ path?: string;
619
+ stack?: string;
620
+ };
621
+ message: string;
622
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
623
+ };
624
+ transformer: true;
625
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
626
+ getInfiniteListOfClient: import("@trpc/server").TRPCQueryProcedure<{
627
+ input: {
628
+ limit: number;
629
+ cursor?: string | undefined;
630
+ status?: "PENDING" | "CONFIRMED" | "PRE_TRANSIT" | "SHIPPING" | "DELIVERED" | "RETURNED" | "CANCELLED" | "SUSPENDED" | undefined;
631
+ clientId?: string | undefined;
632
+ };
633
+ output: {
634
+ orders: {
635
+ id: string;
636
+ createdAt: Date;
637
+ userId: string;
638
+ tracking_number: string | null;
639
+ status: import("@prisma/client").$Enums.OrderStatus;
640
+ shipping_status: string | null;
641
+ total_order_price: number;
642
+ shipping_price_at_order_time: number;
643
+ selected_shipping_provider: "WORLD_EXPRESS";
644
+ total_weight: number;
645
+ shipping_details_id: string;
646
+ total_product_price: never;
647
+ delivery_type: never;
648
+ fragile: never;
649
+ }[];
650
+ nextCursor: string | undefined;
651
+ };
652
+ meta: object;
653
+ }>;
654
+ getFullDetails: import("@trpc/server").TRPCQueryProcedure<{
655
+ input: {
656
+ orderId: string;
657
+ };
658
+ output: {
659
+ order: ExtendedOrderDTO & {
660
+ user: {
661
+ role: import("@prisma/client").Role;
662
+ };
663
+ };
664
+ };
665
+ meta: object;
666
+ }>;
667
+ getInfiniteList: import("@trpc/server").TRPCQueryProcedure<{
668
+ input: {
669
+ limit: number;
670
+ cursor?: string | undefined;
671
+ status?: "PENDING" | "CONFIRMED" | "PRE_TRANSIT" | "SHIPPING" | "DELIVERED" | "RETURNED" | "CANCELLED" | "SUSPENDED" | undefined;
672
+ };
673
+ output: {
674
+ orders: (PublicOrderDTO & {
675
+ user: {
676
+ role: import("@prisma/client").Role;
677
+ };
678
+ })[];
679
+ nextCursor: string | undefined;
680
+ };
681
+ meta: object;
682
+ }>;
683
+ findWithTrackingNumber: import("@trpc/server").TRPCQueryProcedure<{
684
+ input: {
685
+ trackingNumber: string;
686
+ };
687
+ output: {
688
+ order: PublicOrderDTO;
689
+ };
690
+ meta: object;
691
+ }>;
692
+ create: import("@trpc/server").TRPCMutationProcedure<{
693
+ input: {
694
+ clientId: string;
695
+ providedShippingPrice: number;
696
+ selectedShippingProvider: "WORLD_EXPRESS";
697
+ shippingDetails: {
698
+ full_name: string;
699
+ first_phone: string;
700
+ code_wilaya: number;
701
+ commune: string;
702
+ code_postal: string;
703
+ address: string;
704
+ delivery_type: "TO_DESK" | "TO_HOME";
705
+ fragile: boolean;
706
+ second_phone?: string | undefined;
707
+ gps_link?: string | undefined;
708
+ client_note?: string | undefined;
709
+ };
710
+ };
711
+ output: {
712
+ order: PublicOrderDTO;
713
+ };
714
+ meta: object;
715
+ }>;
716
+ cancel: import("@trpc/server").TRPCMutationProcedure<{
717
+ input: {
718
+ orderId: string;
719
+ };
720
+ output: {
721
+ order: PublicOrderDTO;
722
+ };
723
+ meta: object;
724
+ }>;
725
+ updateStatus: import("@trpc/server").TRPCMutationProcedure<{
726
+ input: {
727
+ orderId: string;
728
+ newStatus: "PENDING" | "CONFIRMED" | "PRE_TRANSIT" | "SHIPPING" | "DELIVERED" | "RETURNED" | "CANCELLED" | "SUSPENDED";
729
+ };
730
+ output: {
731
+ order: PublicOrderDTO;
732
+ };
733
+ meta: object;
734
+ }>;
735
+ updateDetails: import("@trpc/server").TRPCMutationProcedure<{
736
+ input: {
737
+ trackingNumber: string;
738
+ orderId: string;
739
+ data: {
740
+ reference: string;
741
+ clientName: string;
742
+ phone: string;
743
+ address: string;
744
+ postalCode: string;
745
+ commune: string;
746
+ wilayaCode: number;
747
+ isFragile: boolean;
748
+ phone2?: string | undefined;
749
+ note?: string | undefined;
750
+ gpsLink?: string | undefined;
751
+ };
752
+ };
753
+ output: {
754
+ success: boolean;
755
+ };
756
+ meta: object;
757
+ }>;
758
+ confirmMany: import("@trpc/server").TRPCMutationProcedure<{
759
+ input: {
760
+ orderIds: string[];
761
+ };
762
+ output: {
763
+ success: boolean;
764
+ };
765
+ meta: object;
766
+ }>;
767
+ }>>;
768
+ product: import("@trpc/server").TRPCBuiltRouter<{
769
+ ctx: {
770
+ db: import("@prisma/client").PrismaClient<{
771
+ log: ("error" | "query" | "warn")[];
772
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
773
+ session: {
774
+ id: string;
775
+ createdAt: Date;
776
+ updatedAt: Date;
777
+ userId: string;
778
+ expiresAt: Date;
779
+ token: string;
780
+ ipAddress?: string | null | undefined;
781
+ userAgent?: string | null | undefined;
782
+ } | null;
783
+ user: {
784
+ id: string;
785
+ createdAt: Date;
786
+ updatedAt: Date;
787
+ email: string;
788
+ emailVerified: boolean;
789
+ name: string;
790
+ image?: string | null | undefined;
791
+ role?: import("@prisma/client").$Enums.Role;
792
+ banned?: boolean | null;
793
+ } | null;
794
+ headers: Headers;
795
+ };
796
+ meta: object;
797
+ errorShape: {
798
+ data: {
799
+ zodError: {
800
+ errors: string[];
801
+ } | null;
802
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
803
+ httpStatus: number;
804
+ path?: string;
805
+ stack?: string;
806
+ };
807
+ message: string;
808
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
809
+ };
810
+ transformer: true;
811
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
812
+ variation: import("@trpc/server").TRPCBuiltRouter<{
813
+ ctx: {
814
+ db: import("@prisma/client").PrismaClient<{
815
+ log: ("error" | "query" | "warn")[];
816
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
817
+ session: {
818
+ id: string;
819
+ createdAt: Date;
820
+ updatedAt: Date;
821
+ userId: string;
822
+ expiresAt: Date;
823
+ token: string;
824
+ ipAddress?: string | null | undefined;
825
+ userAgent?: string | null | undefined;
826
+ } | null;
827
+ user: {
828
+ id: string;
829
+ createdAt: Date;
830
+ updatedAt: Date;
831
+ email: string;
832
+ emailVerified: boolean;
833
+ name: string;
834
+ image?: string | null | undefined;
835
+ role?: import("@prisma/client").$Enums.Role;
836
+ banned?: boolean | null;
837
+ } | null;
838
+ headers: Headers;
839
+ };
840
+ meta: object;
841
+ errorShape: {
842
+ data: {
843
+ zodError: {
844
+ errors: string[];
845
+ } | null;
846
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
847
+ httpStatus: number;
848
+ path?: string;
849
+ stack?: string;
850
+ };
851
+ message: string;
852
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
853
+ };
854
+ transformer: true;
855
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
856
+ getAll: import("@trpc/server").TRPCQueryProcedure<{
857
+ input: {
858
+ productId: string;
859
+ };
860
+ output: {
861
+ variations: PublicVariationDTO[];
862
+ };
863
+ meta: object;
864
+ }>;
865
+ update: import("@trpc/server").TRPCMutationProcedure<{
866
+ input: {
867
+ varaitionId: string;
868
+ data: {
869
+ totalQty?: number | undefined;
870
+ weightInGrams?: number | undefined;
871
+ };
872
+ };
873
+ output: ExtendedVariationDTO;
874
+ meta: object;
875
+ }>;
876
+ create: import("@trpc/server").TRPCMutationProcedure<{
877
+ input: {
878
+ productId: string;
879
+ data: {
880
+ size: "XS" | "S" | "M" | "L" | "XL" | "XXL" | "XXXL" | "EU_36" | "EU_37" | "EU_38" | "EU_39" | "EU_40" | "EU_41" | "EU_42" | "EU_43";
881
+ color: "BLACK" | "WHITE" | "GRAY" | "RED" | "BLUE" | "GREEN" | "YELLOW" | "ORANGE" | "PURPLE" | "PINK" | "BROWN" | "BEIGE" | "NAVY" | "MAROON" | "TEAL";
882
+ totalQty: number;
883
+ weightInGrams: number;
884
+ };
885
+ };
886
+ output: {
887
+ variation: PublicVariationDTO;
888
+ };
889
+ meta: object;
890
+ }>;
891
+ delete: import("@trpc/server").TRPCMutationProcedure<{
892
+ input: {
893
+ variationId: string;
894
+ };
895
+ output: {
896
+ variation: PublicVariationDTO;
897
+ };
898
+ meta: object;
899
+ }>;
900
+ }>>;
901
+ getInfiniteList: import("@trpc/server").TRPCQueryProcedure<{
902
+ input: {
903
+ limit: number;
904
+ cursor?: string | undefined;
905
+ categoryId?: string | undefined;
906
+ min_price?: number | undefined;
907
+ max_price?: number | undefined;
908
+ };
909
+ output: {
910
+ products: PublicProductDTO[];
911
+ nextCursor: string | undefined;
912
+ };
913
+ meta: object;
914
+ }>;
915
+ getStaticData: import("@trpc/server").TRPCQueryProcedure<{
916
+ input: {
917
+ productId: string;
918
+ };
919
+ output: {
920
+ product: PublicProductDTO;
921
+ };
922
+ meta: object;
923
+ }>;
924
+ getUpdateData: import("@trpc/server").TRPCQueryProcedure<{
925
+ input: {
926
+ productId: string;
927
+ };
928
+ output: {
929
+ product: PublicProductDTO;
930
+ variations: ExtendedVariationDTO[];
931
+ images: ExtendedImageDTO[];
932
+ };
933
+ meta: object;
934
+ }>;
935
+ getInfiniteLowStock: import("@trpc/server").TRPCQueryProcedure<{
936
+ input: {
937
+ limit: number;
938
+ cursor?: string | undefined;
939
+ };
940
+ output: {
941
+ products: PublicProductDTO[];
942
+ nextCursor: string | undefined;
943
+ };
944
+ meta: object;
945
+ }>;
946
+ create: import("@trpc/server").TRPCMutationProcedure<{
947
+ input: {
948
+ price: number;
949
+ name: string;
950
+ description: string | null;
951
+ brand: string;
952
+ material: string;
953
+ discount_price: number | null;
954
+ categoryId: string;
955
+ image: {
956
+ name: string;
957
+ public_url: string;
958
+ key: string;
959
+ color?: "BLACK" | "WHITE" | "GRAY" | "RED" | "BLUE" | "GREEN" | "YELLOW" | "ORANGE" | "PURPLE" | "PINK" | "BROWN" | "BEIGE" | "NAVY" | "MAROON" | "TEAL" | undefined;
960
+ };
961
+ };
962
+ output: {
963
+ product: PublicProductDTO;
964
+ };
965
+ meta: object;
966
+ }>;
967
+ updateStaticDetails: import("@trpc/server").TRPCMutationProcedure<{
968
+ input: {
969
+ productId: string;
970
+ data: {
971
+ price?: number | undefined;
972
+ name?: string | undefined;
973
+ description?: string | null | undefined;
974
+ brand?: string | undefined;
975
+ material?: string | undefined;
976
+ discount_price?: number | null | undefined;
977
+ categoryId?: string | undefined;
978
+ };
979
+ };
980
+ output: {
981
+ product: PublicProductDTO;
982
+ };
983
+ meta: object;
984
+ }>;
985
+ delete: import("@trpc/server").TRPCMutationProcedure<{
986
+ input: {
987
+ productId: string;
988
+ };
989
+ output: {
990
+ product: PublicProductDTO;
991
+ };
992
+ meta: object;
993
+ }>;
994
+ }>>;
995
+ rating: import("@trpc/server").TRPCBuiltRouter<{
996
+ ctx: {
997
+ db: import("@prisma/client").PrismaClient<{
998
+ log: ("error" | "query" | "warn")[];
999
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1000
+ session: {
1001
+ id: string;
1002
+ createdAt: Date;
1003
+ updatedAt: Date;
1004
+ userId: string;
1005
+ expiresAt: Date;
1006
+ token: string;
1007
+ ipAddress?: string | null | undefined;
1008
+ userAgent?: string | null | undefined;
1009
+ } | null;
1010
+ user: {
1011
+ id: string;
1012
+ createdAt: Date;
1013
+ updatedAt: Date;
1014
+ email: string;
1015
+ emailVerified: boolean;
1016
+ name: string;
1017
+ image?: string | null | undefined;
1018
+ role?: import("@prisma/client").$Enums.Role;
1019
+ banned?: boolean | null;
1020
+ } | null;
1021
+ headers: Headers;
1022
+ };
1023
+ meta: object;
1024
+ errorShape: {
1025
+ data: {
1026
+ zodError: {
1027
+ errors: string[];
1028
+ } | null;
1029
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1030
+ httpStatus: number;
1031
+ path?: string;
1032
+ stack?: string;
1033
+ };
1034
+ message: string;
1035
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1036
+ };
1037
+ transformer: true;
1038
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1039
+ getInfiniteApprovedListOfProduct: import("@trpc/server").TRPCQueryProcedure<{
1040
+ input: {
1041
+ limit: number;
1042
+ productId: string;
1043
+ cursor?: {
1044
+ userId: string;
1045
+ productId: string;
1046
+ } | undefined;
1047
+ };
1048
+ output: {
1049
+ ratings: PublicRatingDTO[];
1050
+ nextCursor: RatingCursor | undefined;
1051
+ };
1052
+ meta: object;
1053
+ }>;
1054
+ getInfiniteListOfClient: import("@trpc/server").TRPCQueryProcedure<{
1055
+ input: {
1056
+ limit: number;
1057
+ clientId?: string | undefined;
1058
+ cursor?: {
1059
+ userId: string;
1060
+ productId: string;
1061
+ } | undefined;
1062
+ };
1063
+ output: {
1064
+ ratings: PublicRatingDTO[];
1065
+ nextCursor: RatingCursor | undefined;
1066
+ };
1067
+ meta: object;
1068
+ }>;
1069
+ didUserRateProduct: import("@trpc/server").TRPCQueryProcedure<{
1070
+ input: {
1071
+ productId: string;
1072
+ };
1073
+ output: boolean;
1074
+ meta: object;
1075
+ }>;
1076
+ getInfinitePendingRatings: import("@trpc/server").TRPCQueryProcedure<{
1077
+ input: {
1078
+ limit: number;
1079
+ cursor?: {
1080
+ userId: string;
1081
+ productId: string;
1082
+ } | undefined;
1083
+ };
1084
+ output: {
1085
+ ratings: PublicRatingDTO[];
1086
+ nextCursor: RatingCursor | undefined;
1087
+ };
1088
+ meta: object;
1089
+ }>;
1090
+ submit: import("@trpc/server").TRPCMutationProcedure<{
1091
+ input: {
1092
+ productId: string;
1093
+ ratingNum: number;
1094
+ comment: string | null;
1095
+ };
1096
+ output: {
1097
+ rating: PublicRatingDTO;
1098
+ };
1099
+ meta: object;
1100
+ }>;
1101
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1102
+ input: {
1103
+ productId: string;
1104
+ clientId: string;
1105
+ };
1106
+ output: {
1107
+ rating: PublicRatingDTO;
1108
+ };
1109
+ meta: object;
1110
+ }>;
1111
+ approve: import("@trpc/server").TRPCMutationProcedure<{
1112
+ input: {
1113
+ productId: string;
1114
+ clientId: string;
1115
+ };
1116
+ output: {
1117
+ rating: PublicRatingDTO;
1118
+ };
1119
+ meta: object;
1120
+ }>;
1121
+ }>>;
1122
+ shipping: import("@trpc/server").TRPCBuiltRouter<{
1123
+ ctx: {
1124
+ db: import("@prisma/client").PrismaClient<{
1125
+ log: ("error" | "query" | "warn")[];
1126
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1127
+ session: {
1128
+ id: string;
1129
+ createdAt: Date;
1130
+ updatedAt: Date;
1131
+ userId: string;
1132
+ expiresAt: Date;
1133
+ token: string;
1134
+ ipAddress?: string | null | undefined;
1135
+ userAgent?: string | null | undefined;
1136
+ } | null;
1137
+ user: {
1138
+ id: string;
1139
+ createdAt: Date;
1140
+ updatedAt: Date;
1141
+ email: string;
1142
+ emailVerified: boolean;
1143
+ name: string;
1144
+ image?: string | null | undefined;
1145
+ role?: import("@prisma/client").$Enums.Role;
1146
+ banned?: boolean | null;
1147
+ } | null;
1148
+ headers: Headers;
1149
+ };
1150
+ meta: object;
1151
+ errorShape: {
1152
+ data: {
1153
+ zodError: {
1154
+ errors: string[];
1155
+ } | null;
1156
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1157
+ httpStatus: number;
1158
+ path?: string;
1159
+ stack?: string;
1160
+ };
1161
+ message: string;
1162
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1163
+ };
1164
+ transformer: true;
1165
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1166
+ address: import("@trpc/server").TRPCBuiltRouter<{
1167
+ ctx: {
1168
+ db: import("@prisma/client").PrismaClient<{
1169
+ log: ("error" | "query" | "warn")[];
1170
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1171
+ session: {
1172
+ id: string;
1173
+ createdAt: Date;
1174
+ updatedAt: Date;
1175
+ userId: string;
1176
+ expiresAt: Date;
1177
+ token: string;
1178
+ ipAddress?: string | null | undefined;
1179
+ userAgent?: string | null | undefined;
1180
+ } | null;
1181
+ user: {
1182
+ id: string;
1183
+ createdAt: Date;
1184
+ updatedAt: Date;
1185
+ email: string;
1186
+ emailVerified: boolean;
1187
+ name: string;
1188
+ image?: string | null | undefined;
1189
+ role?: import("@prisma/client").$Enums.Role;
1190
+ banned?: boolean | null;
1191
+ } | null;
1192
+ headers: Headers;
1193
+ };
1194
+ meta: object;
1195
+ errorShape: {
1196
+ data: {
1197
+ zodError: {
1198
+ errors: string[];
1199
+ } | null;
1200
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1201
+ httpStatus: number;
1202
+ path?: string;
1203
+ stack?: string;
1204
+ };
1205
+ message: string;
1206
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1207
+ };
1208
+ transformer: true;
1209
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1210
+ getActiveWilayasOfProvider: import("@trpc/server").TRPCQueryProcedure<{
1211
+ input: void;
1212
+ output: {
1213
+ wilayaId: string;
1214
+ wilayaName: string;
1215
+ }[];
1216
+ meta: object;
1217
+ }>;
1218
+ getActiveMunicipalitiesOfWilaya: import("@trpc/server").TRPCQueryProcedure<{
1219
+ input: {
1220
+ wilayaId: number;
1221
+ };
1222
+ output: {
1223
+ name: string;
1224
+ wilayaId: string;
1225
+ postalCode: string;
1226
+ hasStopDesk: boolean;
1227
+ }[];
1228
+ meta: object;
1229
+ }>;
1230
+ }>>;
1231
+ shipments: import("@trpc/server").TRPCBuiltRouter<{
1232
+ ctx: {
1233
+ db: import("@prisma/client").PrismaClient<{
1234
+ log: ("error" | "query" | "warn")[];
1235
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1236
+ session: {
1237
+ id: string;
1238
+ createdAt: Date;
1239
+ updatedAt: Date;
1240
+ userId: string;
1241
+ expiresAt: Date;
1242
+ token: string;
1243
+ ipAddress?: string | null | undefined;
1244
+ userAgent?: string | null | undefined;
1245
+ } | null;
1246
+ user: {
1247
+ id: string;
1248
+ createdAt: Date;
1249
+ updatedAt: Date;
1250
+ email: string;
1251
+ emailVerified: boolean;
1252
+ name: string;
1253
+ image?: string | null | undefined;
1254
+ role?: import("@prisma/client").$Enums.Role;
1255
+ banned?: boolean | null;
1256
+ } | null;
1257
+ headers: Headers;
1258
+ };
1259
+ meta: object;
1260
+ errorShape: {
1261
+ data: {
1262
+ zodError: {
1263
+ errors: string[];
1264
+ } | null;
1265
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1266
+ httpStatus: number;
1267
+ path?: string;
1268
+ stack?: string;
1269
+ };
1270
+ message: string;
1271
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1272
+ };
1273
+ transformer: true;
1274
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1275
+ getSingleLabelPdfUrl: import("@trpc/server").TRPCQueryProcedure<{
1276
+ input: {
1277
+ trackingNumber: string;
1278
+ };
1279
+ output: void;
1280
+ meta: object;
1281
+ }>;
1282
+ getManyLabelsPdfUrl: import("@trpc/server").TRPCQueryProcedure<{
1283
+ input: void;
1284
+ output: void;
1285
+ meta: object;
1286
+ }>;
1287
+ }>>;
1288
+ }>>;
1289
+ statistics: import("@trpc/server").TRPCBuiltRouter<{
1290
+ ctx: {
1291
+ db: import("@prisma/client").PrismaClient<{
1292
+ log: ("error" | "query" | "warn")[];
1293
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1294
+ session: {
1295
+ id: string;
1296
+ createdAt: Date;
1297
+ updatedAt: Date;
1298
+ userId: string;
1299
+ expiresAt: Date;
1300
+ token: string;
1301
+ ipAddress?: string | null | undefined;
1302
+ userAgent?: string | null | undefined;
1303
+ } | null;
1304
+ user: {
1305
+ id: string;
1306
+ createdAt: Date;
1307
+ updatedAt: Date;
1308
+ email: string;
1309
+ emailVerified: boolean;
1310
+ name: string;
1311
+ image?: string | null | undefined;
1312
+ role?: import("@prisma/client").$Enums.Role;
1313
+ banned?: boolean | null;
1314
+ } | null;
1315
+ headers: Headers;
1316
+ };
1317
+ meta: object;
1318
+ errorShape: {
1319
+ data: {
1320
+ zodError: {
1321
+ errors: string[];
1322
+ } | null;
1323
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1324
+ httpStatus: number;
1325
+ path?: string;
1326
+ stack?: string;
1327
+ };
1328
+ message: string;
1329
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1330
+ };
1331
+ transformer: true;
1332
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1333
+ getPlatformStats: import("@trpc/server").TRPCQueryProcedure<{
1334
+ input: void;
1335
+ output: void;
1336
+ meta: object;
1337
+ }>;
1338
+ }>>;
1339
+ }>>;
1340
+ export type AppRouter = typeof appRouter;
1341
+ declare const auth: import("better-auth").Auth<{
1342
+ database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
1343
+ plugins: [
1344
+ {
1345
+ id: "admin";
1346
+ init(): {
1347
+ options: {
1348
+ databaseHooks: {
1349
+ user: {
1350
+ create: {
1351
+ before(user: {
1352
+ id: string;
1353
+ createdAt: Date;
1354
+ updatedAt: Date;
1355
+ email: string;
1356
+ emailVerified: boolean;
1357
+ name: string;
1358
+ image?: string | null | undefined;
1359
+ } & Record<string, unknown>): Promise<{
1360
+ data: {
1361
+ id: string;
1362
+ createdAt: Date;
1363
+ updatedAt: Date;
1364
+ email: string;
1365
+ emailVerified: boolean;
1366
+ name: string;
1367
+ image?: string | null | undefined;
1368
+ role: string;
1369
+ };
1370
+ }>;
1371
+ };
1372
+ };
1373
+ session: {
1374
+ create: {
1375
+ before(session: {
1376
+ id: string;
1377
+ createdAt: Date;
1378
+ updatedAt: Date;
1379
+ userId: string;
1380
+ expiresAt: Date;
1381
+ token: string;
1382
+ ipAddress?: string | null | undefined;
1383
+ userAgent?: string | null | undefined;
1384
+ } & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
1385
+ };
1386
+ };
1387
+ };
1388
+ };
1389
+ };
1390
+ hooks: {
1391
+ after: {
1392
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1393
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>;
1394
+ }[];
1395
+ };
1396
+ endpoints: {
1397
+ setRole: import("better-auth").StrictEndpoint<"/admin/set-role", {
1398
+ method: "POST";
1399
+ body: import("better-auth").ZodObject<{
1400
+ userId: import("better-auth").ZodCoercedString<unknown>;
1401
+ role: import("better-auth").ZodUnion<readonly [
1402
+ import("better-auth").ZodString,
1403
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1404
+ ]>;
1405
+ }, import("better-auth").$strip>;
1406
+ requireHeaders: true;
1407
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1408
+ session: {
1409
+ user: import("better-auth/plugins").UserWithRole;
1410
+ session: {
1411
+ id: string;
1412
+ createdAt: Date;
1413
+ updatedAt: Date;
1414
+ userId: string;
1415
+ expiresAt: Date;
1416
+ token: string;
1417
+ ipAddress?: string | null | undefined;
1418
+ userAgent?: string | null | undefined;
1419
+ };
1420
+ };
1421
+ }>)[];
1422
+ metadata: {
1423
+ openapi: {
1424
+ operationId: string;
1425
+ summary: string;
1426
+ description: string;
1427
+ responses: {
1428
+ 200: {
1429
+ description: string;
1430
+ content: {
1431
+ "application/json": {
1432
+ schema: {
1433
+ type: "object";
1434
+ properties: {
1435
+ user: {
1436
+ $ref: string;
1437
+ };
1438
+ };
1439
+ };
1440
+ };
1441
+ };
1442
+ };
1443
+ };
1444
+ };
1445
+ $Infer: {
1446
+ body: {
1447
+ userId: string;
1448
+ role: "user" | "admin" | ("user" | "admin")[];
1449
+ };
1450
+ };
1451
+ };
1452
+ }, {
1453
+ user: import("better-auth/plugins").UserWithRole;
1454
+ }>;
1455
+ getUser: import("better-auth").StrictEndpoint<"/admin/get-user", {
1456
+ method: "GET";
1457
+ query: import("better-auth").ZodObject<{
1458
+ id: import("better-auth").ZodString;
1459
+ }, import("better-auth").$strip>;
1460
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1461
+ session: {
1462
+ user: import("better-auth/plugins").UserWithRole;
1463
+ session: {
1464
+ id: string;
1465
+ createdAt: Date;
1466
+ updatedAt: Date;
1467
+ userId: string;
1468
+ expiresAt: Date;
1469
+ token: string;
1470
+ ipAddress?: string | null | undefined;
1471
+ userAgent?: string | null | undefined;
1472
+ };
1473
+ };
1474
+ }>)[];
1475
+ metadata: {
1476
+ openapi: {
1477
+ operationId: string;
1478
+ summary: string;
1479
+ description: string;
1480
+ responses: {
1481
+ 200: {
1482
+ description: string;
1483
+ content: {
1484
+ "application/json": {
1485
+ schema: {
1486
+ type: "object";
1487
+ properties: {
1488
+ user: {
1489
+ $ref: string;
1490
+ };
1491
+ };
1492
+ };
1493
+ };
1494
+ };
1495
+ };
1496
+ };
1497
+ };
1498
+ };
1499
+ }, import("better-auth/plugins").UserWithRole>;
1500
+ createUser: import("better-auth").StrictEndpoint<"/admin/create-user", {
1501
+ method: "POST";
1502
+ body: import("better-auth").ZodObject<{
1503
+ email: import("better-auth").ZodString;
1504
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1505
+ name: import("better-auth").ZodString;
1506
+ role: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [
1507
+ import("better-auth").ZodString,
1508
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1509
+ ]>>;
1510
+ data: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
1511
+ }, import("better-auth").$strip>;
1512
+ metadata: {
1513
+ openapi: {
1514
+ operationId: string;
1515
+ summary: string;
1516
+ description: string;
1517
+ responses: {
1518
+ 200: {
1519
+ description: string;
1520
+ content: {
1521
+ "application/json": {
1522
+ schema: {
1523
+ type: "object";
1524
+ properties: {
1525
+ user: {
1526
+ $ref: string;
1527
+ };
1528
+ };
1529
+ };
1530
+ };
1531
+ };
1532
+ };
1533
+ };
1534
+ };
1535
+ $Infer: {
1536
+ body: {
1537
+ email: string;
1538
+ password?: string | undefined;
1539
+ name: string;
1540
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1541
+ data?: Record<string, any> | undefined;
1542
+ };
1543
+ };
1544
+ };
1545
+ }, {
1546
+ user: import("better-auth/plugins").UserWithRole;
1547
+ }>;
1548
+ adminUpdateUser: import("better-auth").StrictEndpoint<"/admin/update-user", {
1549
+ method: "POST";
1550
+ body: import("better-auth").ZodObject<{
1551
+ userId: import("better-auth").ZodCoercedString<unknown>;
1552
+ data: import("better-auth").ZodRecord<import("better-auth").ZodAny, import("better-auth").ZodAny>;
1553
+ }, import("better-auth").$strip>;
1554
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1555
+ session: {
1556
+ user: import("better-auth/plugins").UserWithRole;
1557
+ session: {
1558
+ id: string;
1559
+ createdAt: Date;
1560
+ updatedAt: Date;
1561
+ userId: string;
1562
+ expiresAt: Date;
1563
+ token: string;
1564
+ ipAddress?: string | null | undefined;
1565
+ userAgent?: string | null | undefined;
1566
+ };
1567
+ };
1568
+ }>)[];
1569
+ metadata: {
1570
+ openapi: {
1571
+ operationId: string;
1572
+ summary: string;
1573
+ description: string;
1574
+ responses: {
1575
+ 200: {
1576
+ description: string;
1577
+ content: {
1578
+ "application/json": {
1579
+ schema: {
1580
+ type: "object";
1581
+ properties: {
1582
+ user: {
1583
+ $ref: string;
1584
+ };
1585
+ };
1586
+ };
1587
+ };
1588
+ };
1589
+ };
1590
+ };
1591
+ };
1592
+ };
1593
+ }, import("better-auth/plugins").UserWithRole>;
1594
+ listUsers: import("better-auth").StrictEndpoint<"/admin/list-users", {
1595
+ method: "GET";
1596
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1597
+ session: {
1598
+ user: import("better-auth/plugins").UserWithRole;
1599
+ session: {
1600
+ id: string;
1601
+ createdAt: Date;
1602
+ updatedAt: Date;
1603
+ userId: string;
1604
+ expiresAt: Date;
1605
+ token: string;
1606
+ ipAddress?: string | null | undefined;
1607
+ userAgent?: string | null | undefined;
1608
+ };
1609
+ };
1610
+ }>)[];
1611
+ query: import("better-auth").ZodObject<{
1612
+ searchValue: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1613
+ searchField: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1614
+ name: "name";
1615
+ email: "email";
1616
+ }>>;
1617
+ searchOperator: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1618
+ contains: "contains";
1619
+ starts_with: "starts_with";
1620
+ ends_with: "ends_with";
1621
+ }>>;
1622
+ limit: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1623
+ import("better-auth").ZodString,
1624
+ import("better-auth").ZodNumber
1625
+ ]>>;
1626
+ offset: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1627
+ import("better-auth").ZodString,
1628
+ import("better-auth").ZodNumber
1629
+ ]>>;
1630
+ sortBy: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1631
+ sortDirection: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1632
+ asc: "asc";
1633
+ desc: "desc";
1634
+ }>>;
1635
+ filterField: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1636
+ filterValue: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1637
+ import("better-auth").ZodUnion<[
1638
+ import("better-auth").ZodUnion<[
1639
+ import("better-auth").ZodUnion<[
1640
+ import("better-auth").ZodString,
1641
+ import("better-auth").ZodNumber
1642
+ ]>,
1643
+ import("better-auth").ZodBoolean
1644
+ ]>,
1645
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1646
+ ]>,
1647
+ import("better-auth").ZodArray<import("better-auth").ZodNumber>
1648
+ ]>>;
1649
+ filterOperator: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1650
+ eq: "eq";
1651
+ ne: "ne";
1652
+ gt: "gt";
1653
+ gte: "gte";
1654
+ lt: "lt";
1655
+ lte: "lte";
1656
+ in: "in";
1657
+ not_in: "not_in";
1658
+ contains: "contains";
1659
+ starts_with: "starts_with";
1660
+ ends_with: "ends_with";
1661
+ }>>;
1662
+ }, import("better-auth").$strip>;
1663
+ metadata: {
1664
+ openapi: {
1665
+ operationId: string;
1666
+ summary: string;
1667
+ description: string;
1668
+ responses: {
1669
+ 200: {
1670
+ description: string;
1671
+ content: {
1672
+ "application/json": {
1673
+ schema: {
1674
+ type: "object";
1675
+ properties: {
1676
+ users: {
1677
+ type: string;
1678
+ items: {
1679
+ $ref: string;
1680
+ };
1681
+ };
1682
+ total: {
1683
+ type: string;
1684
+ };
1685
+ limit: {
1686
+ type: string;
1687
+ };
1688
+ offset: {
1689
+ type: string;
1690
+ };
1691
+ };
1692
+ required: string[];
1693
+ };
1694
+ };
1695
+ };
1696
+ };
1697
+ };
1698
+ };
1699
+ };
1700
+ }, {
1701
+ users: import("better-auth/plugins").UserWithRole[];
1702
+ total: number;
1703
+ }>;
1704
+ listUserSessions: import("better-auth").StrictEndpoint<"/admin/list-user-sessions", {
1705
+ method: "POST";
1706
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1707
+ session: {
1708
+ user: import("better-auth/plugins").UserWithRole;
1709
+ session: {
1710
+ id: string;
1711
+ createdAt: Date;
1712
+ updatedAt: Date;
1713
+ userId: string;
1714
+ expiresAt: Date;
1715
+ token: string;
1716
+ ipAddress?: string | null | undefined;
1717
+ userAgent?: string | null | undefined;
1718
+ };
1719
+ };
1720
+ }>)[];
1721
+ body: import("better-auth").ZodObject<{
1722
+ userId: import("better-auth").ZodCoercedString<unknown>;
1723
+ }, import("better-auth").$strip>;
1724
+ metadata: {
1725
+ openapi: {
1726
+ operationId: string;
1727
+ summary: string;
1728
+ description: string;
1729
+ responses: {
1730
+ 200: {
1731
+ description: string;
1732
+ content: {
1733
+ "application/json": {
1734
+ schema: {
1735
+ type: "object";
1736
+ properties: {
1737
+ sessions: {
1738
+ type: string;
1739
+ items: {
1740
+ $ref: string;
1741
+ };
1742
+ };
1743
+ };
1744
+ };
1745
+ };
1746
+ };
1747
+ };
1748
+ };
1749
+ };
1750
+ };
1751
+ }, {
1752
+ sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
1753
+ }>;
1754
+ unbanUser: import("better-auth").StrictEndpoint<"/admin/unban-user", {
1755
+ method: "POST";
1756
+ body: import("better-auth").ZodObject<{
1757
+ userId: import("better-auth").ZodCoercedString<unknown>;
1758
+ }, import("better-auth").$strip>;
1759
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1760
+ session: {
1761
+ user: import("better-auth/plugins").UserWithRole;
1762
+ session: {
1763
+ id: string;
1764
+ createdAt: Date;
1765
+ updatedAt: Date;
1766
+ userId: string;
1767
+ expiresAt: Date;
1768
+ token: string;
1769
+ ipAddress?: string | null | undefined;
1770
+ userAgent?: string | null | undefined;
1771
+ };
1772
+ };
1773
+ }>)[];
1774
+ metadata: {
1775
+ openapi: {
1776
+ operationId: string;
1777
+ summary: string;
1778
+ description: string;
1779
+ responses: {
1780
+ 200: {
1781
+ description: string;
1782
+ content: {
1783
+ "application/json": {
1784
+ schema: {
1785
+ type: "object";
1786
+ properties: {
1787
+ user: {
1788
+ $ref: string;
1789
+ };
1790
+ };
1791
+ };
1792
+ };
1793
+ };
1794
+ };
1795
+ };
1796
+ };
1797
+ };
1798
+ }, {
1799
+ user: import("better-auth/plugins").UserWithRole;
1800
+ }>;
1801
+ banUser: import("better-auth").StrictEndpoint<"/admin/ban-user", {
1802
+ method: "POST";
1803
+ body: import("better-auth").ZodObject<{
1804
+ userId: import("better-auth").ZodCoercedString<unknown>;
1805
+ banReason: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1806
+ banExpiresIn: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1807
+ }, import("better-auth").$strip>;
1808
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1809
+ session: {
1810
+ user: import("better-auth/plugins").UserWithRole;
1811
+ session: {
1812
+ id: string;
1813
+ createdAt: Date;
1814
+ updatedAt: Date;
1815
+ userId: string;
1816
+ expiresAt: Date;
1817
+ token: string;
1818
+ ipAddress?: string | null | undefined;
1819
+ userAgent?: string | null | undefined;
1820
+ };
1821
+ };
1822
+ }>)[];
1823
+ metadata: {
1824
+ openapi: {
1825
+ operationId: string;
1826
+ summary: string;
1827
+ description: string;
1828
+ responses: {
1829
+ 200: {
1830
+ description: string;
1831
+ content: {
1832
+ "application/json": {
1833
+ schema: {
1834
+ type: "object";
1835
+ properties: {
1836
+ user: {
1837
+ $ref: string;
1838
+ };
1839
+ };
1840
+ };
1841
+ };
1842
+ };
1843
+ };
1844
+ };
1845
+ };
1846
+ };
1847
+ }, {
1848
+ user: import("better-auth/plugins").UserWithRole;
1849
+ }>;
1850
+ impersonateUser: import("better-auth").StrictEndpoint<"/admin/impersonate-user", {
1851
+ method: "POST";
1852
+ body: import("better-auth").ZodObject<{
1853
+ userId: import("better-auth").ZodCoercedString<unknown>;
1854
+ }, import("better-auth").$strip>;
1855
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1856
+ session: {
1857
+ user: import("better-auth/plugins").UserWithRole;
1858
+ session: {
1859
+ id: string;
1860
+ createdAt: Date;
1861
+ updatedAt: Date;
1862
+ userId: string;
1863
+ expiresAt: Date;
1864
+ token: string;
1865
+ ipAddress?: string | null | undefined;
1866
+ userAgent?: string | null | undefined;
1867
+ };
1868
+ };
1869
+ }>)[];
1870
+ metadata: {
1871
+ openapi: {
1872
+ operationId: string;
1873
+ summary: string;
1874
+ description: string;
1875
+ responses: {
1876
+ 200: {
1877
+ description: string;
1878
+ content: {
1879
+ "application/json": {
1880
+ schema: {
1881
+ type: "object";
1882
+ properties: {
1883
+ session: {
1884
+ $ref: string;
1885
+ };
1886
+ user: {
1887
+ $ref: string;
1888
+ };
1889
+ };
1890
+ };
1891
+ };
1892
+ };
1893
+ };
1894
+ };
1895
+ };
1896
+ };
1897
+ }, {
1898
+ session: {
1899
+ id: string;
1900
+ createdAt: Date;
1901
+ updatedAt: Date;
1902
+ userId: string;
1903
+ expiresAt: Date;
1904
+ token: string;
1905
+ ipAddress?: string | null | undefined;
1906
+ userAgent?: string | null | undefined;
1907
+ };
1908
+ user: import("better-auth/plugins").UserWithRole;
1909
+ }>;
1910
+ stopImpersonating: import("better-auth").StrictEndpoint<"/admin/stop-impersonating", {
1911
+ method: "POST";
1912
+ requireHeaders: true;
1913
+ }, {
1914
+ session: {
1915
+ id: string;
1916
+ createdAt: Date;
1917
+ updatedAt: Date;
1918
+ userId: string;
1919
+ expiresAt: Date;
1920
+ token: string;
1921
+ ipAddress?: string | null | undefined;
1922
+ userAgent?: string | null | undefined;
1923
+ } & Record<string, any>;
1924
+ user: {
1925
+ id: string;
1926
+ createdAt: Date;
1927
+ updatedAt: Date;
1928
+ email: string;
1929
+ emailVerified: boolean;
1930
+ name: string;
1931
+ image?: string | null | undefined;
1932
+ } & Record<string, any>;
1933
+ }>;
1934
+ revokeUserSession: import("better-auth").StrictEndpoint<"/admin/revoke-user-session", {
1935
+ method: "POST";
1936
+ body: import("better-auth").ZodObject<{
1937
+ sessionToken: import("better-auth").ZodString;
1938
+ }, import("better-auth").$strip>;
1939
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1940
+ session: {
1941
+ user: import("better-auth/plugins").UserWithRole;
1942
+ session: {
1943
+ id: string;
1944
+ createdAt: Date;
1945
+ updatedAt: Date;
1946
+ userId: string;
1947
+ expiresAt: Date;
1948
+ token: string;
1949
+ ipAddress?: string | null | undefined;
1950
+ userAgent?: string | null | undefined;
1951
+ };
1952
+ };
1953
+ }>)[];
1954
+ metadata: {
1955
+ openapi: {
1956
+ operationId: string;
1957
+ summary: string;
1958
+ description: string;
1959
+ responses: {
1960
+ 200: {
1961
+ description: string;
1962
+ content: {
1963
+ "application/json": {
1964
+ schema: {
1965
+ type: "object";
1966
+ properties: {
1967
+ success: {
1968
+ type: string;
1969
+ };
1970
+ };
1971
+ };
1972
+ };
1973
+ };
1974
+ };
1975
+ };
1976
+ };
1977
+ };
1978
+ }, {
1979
+ success: boolean;
1980
+ }>;
1981
+ revokeUserSessions: import("better-auth").StrictEndpoint<"/admin/revoke-user-sessions", {
1982
+ method: "POST";
1983
+ body: import("better-auth").ZodObject<{
1984
+ userId: import("better-auth").ZodCoercedString<unknown>;
1985
+ }, import("better-auth").$strip>;
1986
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1987
+ session: {
1988
+ user: import("better-auth/plugins").UserWithRole;
1989
+ session: {
1990
+ id: string;
1991
+ createdAt: Date;
1992
+ updatedAt: Date;
1993
+ userId: string;
1994
+ expiresAt: Date;
1995
+ token: string;
1996
+ ipAddress?: string | null | undefined;
1997
+ userAgent?: string | null | undefined;
1998
+ };
1999
+ };
2000
+ }>)[];
2001
+ metadata: {
2002
+ openapi: {
2003
+ operationId: string;
2004
+ summary: string;
2005
+ description: string;
2006
+ responses: {
2007
+ 200: {
2008
+ description: string;
2009
+ content: {
2010
+ "application/json": {
2011
+ schema: {
2012
+ type: "object";
2013
+ properties: {
2014
+ success: {
2015
+ type: string;
2016
+ };
2017
+ };
2018
+ };
2019
+ };
2020
+ };
2021
+ };
2022
+ };
2023
+ };
2024
+ };
2025
+ }, {
2026
+ success: boolean;
2027
+ }>;
2028
+ removeUser: import("better-auth").StrictEndpoint<"/admin/remove-user", {
2029
+ method: "POST";
2030
+ body: import("better-auth").ZodObject<{
2031
+ userId: import("better-auth").ZodCoercedString<unknown>;
2032
+ }, import("better-auth").$strip>;
2033
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2034
+ session: {
2035
+ user: import("better-auth/plugins").UserWithRole;
2036
+ session: {
2037
+ id: string;
2038
+ createdAt: Date;
2039
+ updatedAt: Date;
2040
+ userId: string;
2041
+ expiresAt: Date;
2042
+ token: string;
2043
+ ipAddress?: string | null | undefined;
2044
+ userAgent?: string | null | undefined;
2045
+ };
2046
+ };
2047
+ }>)[];
2048
+ metadata: {
2049
+ openapi: {
2050
+ operationId: string;
2051
+ summary: string;
2052
+ description: string;
2053
+ responses: {
2054
+ 200: {
2055
+ description: string;
2056
+ content: {
2057
+ "application/json": {
2058
+ schema: {
2059
+ type: "object";
2060
+ properties: {
2061
+ success: {
2062
+ type: string;
2063
+ };
2064
+ };
2065
+ };
2066
+ };
2067
+ };
2068
+ };
2069
+ };
2070
+ };
2071
+ };
2072
+ }, {
2073
+ success: boolean;
2074
+ }>;
2075
+ setUserPassword: import("better-auth").StrictEndpoint<"/admin/set-user-password", {
2076
+ method: "POST";
2077
+ body: import("better-auth").ZodObject<{
2078
+ newPassword: import("better-auth").ZodString;
2079
+ userId: import("better-auth").ZodCoercedString<unknown>;
2080
+ }, import("better-auth").$strip>;
2081
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2082
+ session: {
2083
+ user: import("better-auth/plugins").UserWithRole;
2084
+ session: {
2085
+ id: string;
2086
+ createdAt: Date;
2087
+ updatedAt: Date;
2088
+ userId: string;
2089
+ expiresAt: Date;
2090
+ token: string;
2091
+ ipAddress?: string | null | undefined;
2092
+ userAgent?: string | null | undefined;
2093
+ };
2094
+ };
2095
+ }>)[];
2096
+ metadata: {
2097
+ openapi: {
2098
+ operationId: string;
2099
+ summary: string;
2100
+ description: string;
2101
+ responses: {
2102
+ 200: {
2103
+ description: string;
2104
+ content: {
2105
+ "application/json": {
2106
+ schema: {
2107
+ type: "object";
2108
+ properties: {
2109
+ status: {
2110
+ type: string;
2111
+ };
2112
+ };
2113
+ };
2114
+ };
2115
+ };
2116
+ };
2117
+ };
2118
+ };
2119
+ };
2120
+ }, {
2121
+ status: boolean;
2122
+ }>;
2123
+ userHasPermission: import("better-auth").StrictEndpoint<"/admin/has-permission", {
2124
+ method: "POST";
2125
+ body: import("better-auth").ZodIntersection<import("better-auth").ZodObject<{
2126
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
2127
+ role: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2128
+ }, import("better-auth").$strip>, import("better-auth").ZodUnion<readonly [
2129
+ import("better-auth").ZodObject<{
2130
+ permission: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>;
2131
+ permissions: import("better-auth").ZodUndefined;
2132
+ }, import("better-auth").$strip>,
2133
+ import("better-auth").ZodObject<{
2134
+ permission: import("better-auth").ZodUndefined;
2135
+ permissions: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>;
2136
+ }, import("better-auth").$strip>
2137
+ ]>>;
2138
+ metadata: {
2139
+ openapi: {
2140
+ description: string;
2141
+ requestBody: {
2142
+ content: {
2143
+ "application/json": {
2144
+ schema: {
2145
+ type: "object";
2146
+ properties: {
2147
+ permissions: {
2148
+ type: string;
2149
+ description: string;
2150
+ };
2151
+ };
2152
+ required: string[];
2153
+ };
2154
+ };
2155
+ };
2156
+ };
2157
+ responses: {
2158
+ "200": {
2159
+ description: string;
2160
+ content: {
2161
+ "application/json": {
2162
+ schema: {
2163
+ type: "object";
2164
+ properties: {
2165
+ error: {
2166
+ type: string;
2167
+ };
2168
+ success: {
2169
+ type: string;
2170
+ };
2171
+ };
2172
+ required: string[];
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ };
2178
+ };
2179
+ $Infer: {
2180
+ body: {
2181
+ permissions: {
2182
+ readonly user?: ("set-role" | "create" | "update" | "delete" | "get" | "list" | "ban" | "impersonate" | "impersonate-admins" | "set-password")[] | undefined;
2183
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2184
+ };
2185
+ } & {
2186
+ userId?: string | undefined;
2187
+ role?: "user" | "admin" | undefined;
2188
+ };
2189
+ };
2190
+ };
2191
+ }, {
2192
+ error: null;
2193
+ success: boolean;
2194
+ }>;
2195
+ };
2196
+ $ERROR_CODES: {
2197
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2198
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
2199
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
2200
+ YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
2201
+ YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
2202
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
2203
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
2204
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
2205
+ YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
2206
+ YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
2207
+ YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
2208
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
2209
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
2210
+ BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
2211
+ YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
2212
+ NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
2213
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
2214
+ YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
2215
+ YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
2216
+ YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
2217
+ INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
2218
+ };
2219
+ schema: {
2220
+ user: {
2221
+ fields: {
2222
+ role: {
2223
+ type: "string";
2224
+ required: false;
2225
+ input: false;
2226
+ };
2227
+ banned: {
2228
+ type: "boolean";
2229
+ defaultValue: false;
2230
+ required: false;
2231
+ input: false;
2232
+ };
2233
+ banReason: {
2234
+ type: "string";
2235
+ required: false;
2236
+ input: false;
2237
+ };
2238
+ banExpires: {
2239
+ type: "date";
2240
+ required: false;
2241
+ input: false;
2242
+ };
2243
+ };
2244
+ };
2245
+ session: {
2246
+ fields: {
2247
+ impersonatedBy: {
2248
+ type: "string";
2249
+ required: false;
2250
+ };
2251
+ };
2252
+ };
2253
+ };
2254
+ options: NoInfer<{
2255
+ defaultRole: string;
2256
+ }>;
2257
+ },
2258
+ {
2259
+ id: "custom-session";
2260
+ hooks: {
2261
+ after: {
2262
+ matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
2263
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2264
+ user: {
2265
+ id: string;
2266
+ createdAt: Date;
2267
+ updatedAt: Date;
2268
+ email: string;
2269
+ emailVerified: boolean;
2270
+ name: string;
2271
+ image?: string | null | undefined;
2272
+ role?: import("@prisma/client").$Enums.Role;
2273
+ banned?: boolean | null;
2274
+ };
2275
+ session: {
2276
+ id: string;
2277
+ createdAt: Date;
2278
+ updatedAt: Date;
2279
+ userId: string;
2280
+ expiresAt: Date;
2281
+ token: string;
2282
+ ipAddress?: string | null | undefined;
2283
+ userAgent?: string | null | undefined;
2284
+ };
2285
+ }[] | undefined>;
2286
+ }[];
2287
+ };
2288
+ endpoints: {
2289
+ getSession: import("better-auth").StrictEndpoint<"/get-session", {
2290
+ method: "GET";
2291
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2292
+ disableCookieCache: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
2293
+ import("better-auth").ZodBoolean,
2294
+ import("better-auth").ZodPipe<import("better-auth").ZodString, import("better-auth").ZodTransform<boolean, string>>
2295
+ ]>>;
2296
+ disableRefresh: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2297
+ }, import("better-auth").$strip>>;
2298
+ metadata: {
2299
+ CUSTOM_SESSION: boolean;
2300
+ openapi: {
2301
+ description: string;
2302
+ responses: {
2303
+ "200": {
2304
+ description: string;
2305
+ content: {
2306
+ "application/json": {
2307
+ schema: {
2308
+ type: "array";
2309
+ nullable: boolean;
2310
+ items: {
2311
+ $ref: string;
2312
+ };
2313
+ };
2314
+ };
2315
+ };
2316
+ };
2317
+ };
2318
+ };
2319
+ };
2320
+ requireHeaders: true;
2321
+ }, {
2322
+ user: {
2323
+ id: string;
2324
+ createdAt: Date;
2325
+ updatedAt: Date;
2326
+ email: string;
2327
+ emailVerified: boolean;
2328
+ name: string;
2329
+ image?: string | null | undefined;
2330
+ role?: import("@prisma/client").$Enums.Role;
2331
+ banned?: boolean | null;
2332
+ };
2333
+ session: {
2334
+ id: string;
2335
+ createdAt: Date;
2336
+ updatedAt: Date;
2337
+ userId: string;
2338
+ expiresAt: Date;
2339
+ token: string;
2340
+ ipAddress?: string | null | undefined;
2341
+ userAgent?: string | null | undefined;
2342
+ };
2343
+ } | null>;
2344
+ };
2345
+ $Infer: {
2346
+ Session: {
2347
+ user: {
2348
+ id: string;
2349
+ createdAt: Date;
2350
+ updatedAt: Date;
2351
+ email: string;
2352
+ emailVerified: boolean;
2353
+ name: string;
2354
+ image?: string | null | undefined;
2355
+ role?: import("@prisma/client").$Enums.Role;
2356
+ banned?: boolean | null;
2357
+ };
2358
+ session: {
2359
+ id: string;
2360
+ createdAt: Date;
2361
+ updatedAt: Date;
2362
+ userId: string;
2363
+ expiresAt: Date;
2364
+ token: string;
2365
+ ipAddress?: string | null | undefined;
2366
+ userAgent?: string | null | undefined;
2367
+ };
2368
+ };
2369
+ };
2370
+ options: import("better-auth/plugins").CustomSessionPluginOptions | undefined;
2371
+ }
2372
+ ];
2373
+ rateLimit: {
2374
+ enabled: boolean;
2375
+ window: number;
2376
+ max: number;
2377
+ };
2378
+ emailVerification: {
2379
+ sendVerificationEmail: ({ user, url, token }: {
2380
+ user: import("better-auth").User;
2381
+ url: string;
2382
+ token: string;
2383
+ }, request: Request | undefined) => Promise<void>;
2384
+ sendOnSignUp: true;
2385
+ sendOnSignIn: true;
2386
+ autoSignInAfterVerification: true;
2387
+ };
2388
+ emailAndPassword: {
2389
+ enabled: true;
2390
+ requireEmailVerification: true;
2391
+ sendResetPassword: ({ user, url, token }: {
2392
+ user: import("better-auth").User;
2393
+ url: string;
2394
+ token: string;
2395
+ }, request: Request | undefined) => Promise<void>;
2396
+ };
2397
+ }>;
2398
+ export type Auth = typeof auth;
2399
+ declare const ourFileRouter: {
2400
+ courseImage: import("node_modules/uploadthing/dist/types-Bs3w2d_3.js").FileRoute<{
2401
+ input: undefined;
2402
+ output: {
2403
+ uploadedBy: string;
2404
+ publicUrl: string;
2405
+ name: string;
2406
+ key: string;
2407
+ type: string;
2408
+ };
2409
+ errorShape: import("@uploadthing/shared").Json;
2410
+ }>;
2411
+ };
2412
+ export type OurFileRouter = typeof ourFileRouter;
2413
+
2414
+ export {};