@djaouad10/shared-types 1.0.3 → 1.0.5

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 +2428 -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,2428 @@
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
+ create: import("@trpc/server").TRPCMutationProcedure<{
1288
+ input: {
1289
+ trackingNumber: string;
1290
+ };
1291
+ output: {
1292
+ success: boolean;
1293
+ };
1294
+ meta: object;
1295
+ }>;
1296
+ createMany: import("@trpc/server").TRPCMutationProcedure<{
1297
+ input: void;
1298
+ output: void;
1299
+ meta: object;
1300
+ }>;
1301
+ }>>;
1302
+ }>>;
1303
+ statistics: import("@trpc/server").TRPCBuiltRouter<{
1304
+ ctx: {
1305
+ db: import("@prisma/client").PrismaClient<{
1306
+ log: ("error" | "query" | "warn")[];
1307
+ }, never, import("@prisma/client/runtime/library").DefaultArgs>;
1308
+ session: {
1309
+ id: string;
1310
+ createdAt: Date;
1311
+ updatedAt: Date;
1312
+ userId: string;
1313
+ expiresAt: Date;
1314
+ token: string;
1315
+ ipAddress?: string | null | undefined;
1316
+ userAgent?: string | null | undefined;
1317
+ } | null;
1318
+ user: {
1319
+ id: string;
1320
+ createdAt: Date;
1321
+ updatedAt: Date;
1322
+ email: string;
1323
+ emailVerified: boolean;
1324
+ name: string;
1325
+ image?: string | null | undefined;
1326
+ role?: import("@prisma/client").$Enums.Role;
1327
+ banned?: boolean | null;
1328
+ } | null;
1329
+ headers: Headers;
1330
+ };
1331
+ meta: object;
1332
+ errorShape: {
1333
+ data: {
1334
+ zodError: {
1335
+ errors: string[];
1336
+ } | null;
1337
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1338
+ httpStatus: number;
1339
+ path?: string;
1340
+ stack?: string;
1341
+ };
1342
+ message: string;
1343
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1344
+ };
1345
+ transformer: true;
1346
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1347
+ getPlatformStats: import("@trpc/server").TRPCQueryProcedure<{
1348
+ input: void;
1349
+ output: void;
1350
+ meta: object;
1351
+ }>;
1352
+ }>>;
1353
+ }>>;
1354
+ export type AppRouter = typeof appRouter;
1355
+ declare const auth: import("better-auth").Auth<{
1356
+ database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
1357
+ plugins: [
1358
+ {
1359
+ id: "admin";
1360
+ init(): {
1361
+ options: {
1362
+ databaseHooks: {
1363
+ user: {
1364
+ create: {
1365
+ before(user: {
1366
+ id: string;
1367
+ createdAt: Date;
1368
+ updatedAt: Date;
1369
+ email: string;
1370
+ emailVerified: boolean;
1371
+ name: string;
1372
+ image?: string | null | undefined;
1373
+ } & Record<string, unknown>): Promise<{
1374
+ data: {
1375
+ id: string;
1376
+ createdAt: Date;
1377
+ updatedAt: Date;
1378
+ email: string;
1379
+ emailVerified: boolean;
1380
+ name: string;
1381
+ image?: string | null | undefined;
1382
+ role: string;
1383
+ };
1384
+ }>;
1385
+ };
1386
+ };
1387
+ session: {
1388
+ create: {
1389
+ before(session: {
1390
+ id: string;
1391
+ createdAt: Date;
1392
+ updatedAt: Date;
1393
+ userId: string;
1394
+ expiresAt: Date;
1395
+ token: string;
1396
+ ipAddress?: string | null | undefined;
1397
+ userAgent?: string | null | undefined;
1398
+ } & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
1399
+ };
1400
+ };
1401
+ };
1402
+ };
1403
+ };
1404
+ hooks: {
1405
+ after: {
1406
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1407
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>;
1408
+ }[];
1409
+ };
1410
+ endpoints: {
1411
+ setRole: import("better-auth").StrictEndpoint<"/admin/set-role", {
1412
+ method: "POST";
1413
+ body: import("better-auth").ZodObject<{
1414
+ userId: import("better-auth").ZodCoercedString<unknown>;
1415
+ role: import("better-auth").ZodUnion<readonly [
1416
+ import("better-auth").ZodString,
1417
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1418
+ ]>;
1419
+ }, import("better-auth").$strip>;
1420
+ requireHeaders: true;
1421
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1422
+ session: {
1423
+ user: import("better-auth/plugins").UserWithRole;
1424
+ session: {
1425
+ id: string;
1426
+ createdAt: Date;
1427
+ updatedAt: Date;
1428
+ userId: string;
1429
+ expiresAt: Date;
1430
+ token: string;
1431
+ ipAddress?: string | null | undefined;
1432
+ userAgent?: string | null | undefined;
1433
+ };
1434
+ };
1435
+ }>)[];
1436
+ metadata: {
1437
+ openapi: {
1438
+ operationId: string;
1439
+ summary: string;
1440
+ description: string;
1441
+ responses: {
1442
+ 200: {
1443
+ description: string;
1444
+ content: {
1445
+ "application/json": {
1446
+ schema: {
1447
+ type: "object";
1448
+ properties: {
1449
+ user: {
1450
+ $ref: string;
1451
+ };
1452
+ };
1453
+ };
1454
+ };
1455
+ };
1456
+ };
1457
+ };
1458
+ };
1459
+ $Infer: {
1460
+ body: {
1461
+ userId: string;
1462
+ role: "user" | "admin" | ("user" | "admin")[];
1463
+ };
1464
+ };
1465
+ };
1466
+ }, {
1467
+ user: import("better-auth/plugins").UserWithRole;
1468
+ }>;
1469
+ getUser: import("better-auth").StrictEndpoint<"/admin/get-user", {
1470
+ method: "GET";
1471
+ query: import("better-auth").ZodObject<{
1472
+ id: import("better-auth").ZodString;
1473
+ }, import("better-auth").$strip>;
1474
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1475
+ session: {
1476
+ user: import("better-auth/plugins").UserWithRole;
1477
+ session: {
1478
+ id: string;
1479
+ createdAt: Date;
1480
+ updatedAt: Date;
1481
+ userId: string;
1482
+ expiresAt: Date;
1483
+ token: string;
1484
+ ipAddress?: string | null | undefined;
1485
+ userAgent?: string | null | undefined;
1486
+ };
1487
+ };
1488
+ }>)[];
1489
+ metadata: {
1490
+ openapi: {
1491
+ operationId: string;
1492
+ summary: string;
1493
+ description: string;
1494
+ responses: {
1495
+ 200: {
1496
+ description: string;
1497
+ content: {
1498
+ "application/json": {
1499
+ schema: {
1500
+ type: "object";
1501
+ properties: {
1502
+ user: {
1503
+ $ref: string;
1504
+ };
1505
+ };
1506
+ };
1507
+ };
1508
+ };
1509
+ };
1510
+ };
1511
+ };
1512
+ };
1513
+ }, import("better-auth/plugins").UserWithRole>;
1514
+ createUser: import("better-auth").StrictEndpoint<"/admin/create-user", {
1515
+ method: "POST";
1516
+ body: import("better-auth").ZodObject<{
1517
+ email: import("better-auth").ZodString;
1518
+ password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1519
+ name: import("better-auth").ZodString;
1520
+ role: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [
1521
+ import("better-auth").ZodString,
1522
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1523
+ ]>>;
1524
+ data: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
1525
+ }, import("better-auth").$strip>;
1526
+ metadata: {
1527
+ openapi: {
1528
+ operationId: string;
1529
+ summary: string;
1530
+ description: string;
1531
+ responses: {
1532
+ 200: {
1533
+ description: string;
1534
+ content: {
1535
+ "application/json": {
1536
+ schema: {
1537
+ type: "object";
1538
+ properties: {
1539
+ user: {
1540
+ $ref: string;
1541
+ };
1542
+ };
1543
+ };
1544
+ };
1545
+ };
1546
+ };
1547
+ };
1548
+ };
1549
+ $Infer: {
1550
+ body: {
1551
+ email: string;
1552
+ password?: string | undefined;
1553
+ name: string;
1554
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1555
+ data?: Record<string, any> | undefined;
1556
+ };
1557
+ };
1558
+ };
1559
+ }, {
1560
+ user: import("better-auth/plugins").UserWithRole;
1561
+ }>;
1562
+ adminUpdateUser: import("better-auth").StrictEndpoint<"/admin/update-user", {
1563
+ method: "POST";
1564
+ body: import("better-auth").ZodObject<{
1565
+ userId: import("better-auth").ZodCoercedString<unknown>;
1566
+ data: import("better-auth").ZodRecord<import("better-auth").ZodAny, import("better-auth").ZodAny>;
1567
+ }, import("better-auth").$strip>;
1568
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1569
+ session: {
1570
+ user: import("better-auth/plugins").UserWithRole;
1571
+ session: {
1572
+ id: string;
1573
+ createdAt: Date;
1574
+ updatedAt: Date;
1575
+ userId: string;
1576
+ expiresAt: Date;
1577
+ token: string;
1578
+ ipAddress?: string | null | undefined;
1579
+ userAgent?: string | null | undefined;
1580
+ };
1581
+ };
1582
+ }>)[];
1583
+ metadata: {
1584
+ openapi: {
1585
+ operationId: string;
1586
+ summary: string;
1587
+ description: string;
1588
+ responses: {
1589
+ 200: {
1590
+ description: string;
1591
+ content: {
1592
+ "application/json": {
1593
+ schema: {
1594
+ type: "object";
1595
+ properties: {
1596
+ user: {
1597
+ $ref: string;
1598
+ };
1599
+ };
1600
+ };
1601
+ };
1602
+ };
1603
+ };
1604
+ };
1605
+ };
1606
+ };
1607
+ }, import("better-auth/plugins").UserWithRole>;
1608
+ listUsers: import("better-auth").StrictEndpoint<"/admin/list-users", {
1609
+ method: "GET";
1610
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1611
+ session: {
1612
+ user: import("better-auth/plugins").UserWithRole;
1613
+ session: {
1614
+ id: string;
1615
+ createdAt: Date;
1616
+ updatedAt: Date;
1617
+ userId: string;
1618
+ expiresAt: Date;
1619
+ token: string;
1620
+ ipAddress?: string | null | undefined;
1621
+ userAgent?: string | null | undefined;
1622
+ };
1623
+ };
1624
+ }>)[];
1625
+ query: import("better-auth").ZodObject<{
1626
+ searchValue: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1627
+ searchField: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1628
+ name: "name";
1629
+ email: "email";
1630
+ }>>;
1631
+ searchOperator: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1632
+ contains: "contains";
1633
+ starts_with: "starts_with";
1634
+ ends_with: "ends_with";
1635
+ }>>;
1636
+ limit: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1637
+ import("better-auth").ZodString,
1638
+ import("better-auth").ZodNumber
1639
+ ]>>;
1640
+ offset: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1641
+ import("better-auth").ZodString,
1642
+ import("better-auth").ZodNumber
1643
+ ]>>;
1644
+ sortBy: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1645
+ sortDirection: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1646
+ asc: "asc";
1647
+ desc: "desc";
1648
+ }>>;
1649
+ filterField: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1650
+ filterValue: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
1651
+ import("better-auth").ZodUnion<[
1652
+ import("better-auth").ZodUnion<[
1653
+ import("better-auth").ZodUnion<[
1654
+ import("better-auth").ZodString,
1655
+ import("better-auth").ZodNumber
1656
+ ]>,
1657
+ import("better-auth").ZodBoolean
1658
+ ]>,
1659
+ import("better-auth").ZodArray<import("better-auth").ZodString>
1660
+ ]>,
1661
+ import("better-auth").ZodArray<import("better-auth").ZodNumber>
1662
+ ]>>;
1663
+ filterOperator: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1664
+ eq: "eq";
1665
+ ne: "ne";
1666
+ gt: "gt";
1667
+ gte: "gte";
1668
+ lt: "lt";
1669
+ lte: "lte";
1670
+ in: "in";
1671
+ not_in: "not_in";
1672
+ contains: "contains";
1673
+ starts_with: "starts_with";
1674
+ ends_with: "ends_with";
1675
+ }>>;
1676
+ }, import("better-auth").$strip>;
1677
+ metadata: {
1678
+ openapi: {
1679
+ operationId: string;
1680
+ summary: string;
1681
+ description: string;
1682
+ responses: {
1683
+ 200: {
1684
+ description: string;
1685
+ content: {
1686
+ "application/json": {
1687
+ schema: {
1688
+ type: "object";
1689
+ properties: {
1690
+ users: {
1691
+ type: string;
1692
+ items: {
1693
+ $ref: string;
1694
+ };
1695
+ };
1696
+ total: {
1697
+ type: string;
1698
+ };
1699
+ limit: {
1700
+ type: string;
1701
+ };
1702
+ offset: {
1703
+ type: string;
1704
+ };
1705
+ };
1706
+ required: string[];
1707
+ };
1708
+ };
1709
+ };
1710
+ };
1711
+ };
1712
+ };
1713
+ };
1714
+ }, {
1715
+ users: import("better-auth/plugins").UserWithRole[];
1716
+ total: number;
1717
+ }>;
1718
+ listUserSessions: import("better-auth").StrictEndpoint<"/admin/list-user-sessions", {
1719
+ method: "POST";
1720
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1721
+ session: {
1722
+ user: import("better-auth/plugins").UserWithRole;
1723
+ session: {
1724
+ id: string;
1725
+ createdAt: Date;
1726
+ updatedAt: Date;
1727
+ userId: string;
1728
+ expiresAt: Date;
1729
+ token: string;
1730
+ ipAddress?: string | null | undefined;
1731
+ userAgent?: string | null | undefined;
1732
+ };
1733
+ };
1734
+ }>)[];
1735
+ body: import("better-auth").ZodObject<{
1736
+ userId: import("better-auth").ZodCoercedString<unknown>;
1737
+ }, import("better-auth").$strip>;
1738
+ metadata: {
1739
+ openapi: {
1740
+ operationId: string;
1741
+ summary: string;
1742
+ description: string;
1743
+ responses: {
1744
+ 200: {
1745
+ description: string;
1746
+ content: {
1747
+ "application/json": {
1748
+ schema: {
1749
+ type: "object";
1750
+ properties: {
1751
+ sessions: {
1752
+ type: string;
1753
+ items: {
1754
+ $ref: string;
1755
+ };
1756
+ };
1757
+ };
1758
+ };
1759
+ };
1760
+ };
1761
+ };
1762
+ };
1763
+ };
1764
+ };
1765
+ }, {
1766
+ sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
1767
+ }>;
1768
+ unbanUser: import("better-auth").StrictEndpoint<"/admin/unban-user", {
1769
+ method: "POST";
1770
+ body: import("better-auth").ZodObject<{
1771
+ userId: import("better-auth").ZodCoercedString<unknown>;
1772
+ }, import("better-auth").$strip>;
1773
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1774
+ session: {
1775
+ user: import("better-auth/plugins").UserWithRole;
1776
+ session: {
1777
+ id: string;
1778
+ createdAt: Date;
1779
+ updatedAt: Date;
1780
+ userId: string;
1781
+ expiresAt: Date;
1782
+ token: string;
1783
+ ipAddress?: string | null | undefined;
1784
+ userAgent?: string | null | undefined;
1785
+ };
1786
+ };
1787
+ }>)[];
1788
+ metadata: {
1789
+ openapi: {
1790
+ operationId: string;
1791
+ summary: string;
1792
+ description: string;
1793
+ responses: {
1794
+ 200: {
1795
+ description: string;
1796
+ content: {
1797
+ "application/json": {
1798
+ schema: {
1799
+ type: "object";
1800
+ properties: {
1801
+ user: {
1802
+ $ref: string;
1803
+ };
1804
+ };
1805
+ };
1806
+ };
1807
+ };
1808
+ };
1809
+ };
1810
+ };
1811
+ };
1812
+ }, {
1813
+ user: import("better-auth/plugins").UserWithRole;
1814
+ }>;
1815
+ banUser: import("better-auth").StrictEndpoint<"/admin/ban-user", {
1816
+ method: "POST";
1817
+ body: import("better-auth").ZodObject<{
1818
+ userId: import("better-auth").ZodCoercedString<unknown>;
1819
+ banReason: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1820
+ banExpiresIn: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1821
+ }, import("better-auth").$strip>;
1822
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1823
+ session: {
1824
+ user: import("better-auth/plugins").UserWithRole;
1825
+ session: {
1826
+ id: string;
1827
+ createdAt: Date;
1828
+ updatedAt: Date;
1829
+ userId: string;
1830
+ expiresAt: Date;
1831
+ token: string;
1832
+ ipAddress?: string | null | undefined;
1833
+ userAgent?: string | null | undefined;
1834
+ };
1835
+ };
1836
+ }>)[];
1837
+ metadata: {
1838
+ openapi: {
1839
+ operationId: string;
1840
+ summary: string;
1841
+ description: string;
1842
+ responses: {
1843
+ 200: {
1844
+ description: string;
1845
+ content: {
1846
+ "application/json": {
1847
+ schema: {
1848
+ type: "object";
1849
+ properties: {
1850
+ user: {
1851
+ $ref: string;
1852
+ };
1853
+ };
1854
+ };
1855
+ };
1856
+ };
1857
+ };
1858
+ };
1859
+ };
1860
+ };
1861
+ }, {
1862
+ user: import("better-auth/plugins").UserWithRole;
1863
+ }>;
1864
+ impersonateUser: import("better-auth").StrictEndpoint<"/admin/impersonate-user", {
1865
+ method: "POST";
1866
+ body: import("better-auth").ZodObject<{
1867
+ userId: import("better-auth").ZodCoercedString<unknown>;
1868
+ }, import("better-auth").$strip>;
1869
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1870
+ session: {
1871
+ user: import("better-auth/plugins").UserWithRole;
1872
+ session: {
1873
+ id: string;
1874
+ createdAt: Date;
1875
+ updatedAt: Date;
1876
+ userId: string;
1877
+ expiresAt: Date;
1878
+ token: string;
1879
+ ipAddress?: string | null | undefined;
1880
+ userAgent?: string | null | undefined;
1881
+ };
1882
+ };
1883
+ }>)[];
1884
+ metadata: {
1885
+ openapi: {
1886
+ operationId: string;
1887
+ summary: string;
1888
+ description: string;
1889
+ responses: {
1890
+ 200: {
1891
+ description: string;
1892
+ content: {
1893
+ "application/json": {
1894
+ schema: {
1895
+ type: "object";
1896
+ properties: {
1897
+ session: {
1898
+ $ref: string;
1899
+ };
1900
+ user: {
1901
+ $ref: string;
1902
+ };
1903
+ };
1904
+ };
1905
+ };
1906
+ };
1907
+ };
1908
+ };
1909
+ };
1910
+ };
1911
+ }, {
1912
+ session: {
1913
+ id: string;
1914
+ createdAt: Date;
1915
+ updatedAt: Date;
1916
+ userId: string;
1917
+ expiresAt: Date;
1918
+ token: string;
1919
+ ipAddress?: string | null | undefined;
1920
+ userAgent?: string | null | undefined;
1921
+ };
1922
+ user: import("better-auth/plugins").UserWithRole;
1923
+ }>;
1924
+ stopImpersonating: import("better-auth").StrictEndpoint<"/admin/stop-impersonating", {
1925
+ method: "POST";
1926
+ requireHeaders: true;
1927
+ }, {
1928
+ session: {
1929
+ id: string;
1930
+ createdAt: Date;
1931
+ updatedAt: Date;
1932
+ userId: string;
1933
+ expiresAt: Date;
1934
+ token: string;
1935
+ ipAddress?: string | null | undefined;
1936
+ userAgent?: string | null | undefined;
1937
+ } & Record<string, any>;
1938
+ user: {
1939
+ id: string;
1940
+ createdAt: Date;
1941
+ updatedAt: Date;
1942
+ email: string;
1943
+ emailVerified: boolean;
1944
+ name: string;
1945
+ image?: string | null | undefined;
1946
+ } & Record<string, any>;
1947
+ }>;
1948
+ revokeUserSession: import("better-auth").StrictEndpoint<"/admin/revoke-user-session", {
1949
+ method: "POST";
1950
+ body: import("better-auth").ZodObject<{
1951
+ sessionToken: import("better-auth").ZodString;
1952
+ }, import("better-auth").$strip>;
1953
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1954
+ session: {
1955
+ user: import("better-auth/plugins").UserWithRole;
1956
+ session: {
1957
+ id: string;
1958
+ createdAt: Date;
1959
+ updatedAt: Date;
1960
+ userId: string;
1961
+ expiresAt: Date;
1962
+ token: string;
1963
+ ipAddress?: string | null | undefined;
1964
+ userAgent?: string | null | undefined;
1965
+ };
1966
+ };
1967
+ }>)[];
1968
+ metadata: {
1969
+ openapi: {
1970
+ operationId: string;
1971
+ summary: string;
1972
+ description: string;
1973
+ responses: {
1974
+ 200: {
1975
+ description: string;
1976
+ content: {
1977
+ "application/json": {
1978
+ schema: {
1979
+ type: "object";
1980
+ properties: {
1981
+ success: {
1982
+ type: string;
1983
+ };
1984
+ };
1985
+ };
1986
+ };
1987
+ };
1988
+ };
1989
+ };
1990
+ };
1991
+ };
1992
+ }, {
1993
+ success: boolean;
1994
+ }>;
1995
+ revokeUserSessions: import("better-auth").StrictEndpoint<"/admin/revoke-user-sessions", {
1996
+ method: "POST";
1997
+ body: import("better-auth").ZodObject<{
1998
+ userId: import("better-auth").ZodCoercedString<unknown>;
1999
+ }, import("better-auth").$strip>;
2000
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2001
+ session: {
2002
+ user: import("better-auth/plugins").UserWithRole;
2003
+ session: {
2004
+ id: string;
2005
+ createdAt: Date;
2006
+ updatedAt: Date;
2007
+ userId: string;
2008
+ expiresAt: Date;
2009
+ token: string;
2010
+ ipAddress?: string | null | undefined;
2011
+ userAgent?: string | null | undefined;
2012
+ };
2013
+ };
2014
+ }>)[];
2015
+ metadata: {
2016
+ openapi: {
2017
+ operationId: string;
2018
+ summary: string;
2019
+ description: string;
2020
+ responses: {
2021
+ 200: {
2022
+ description: string;
2023
+ content: {
2024
+ "application/json": {
2025
+ schema: {
2026
+ type: "object";
2027
+ properties: {
2028
+ success: {
2029
+ type: string;
2030
+ };
2031
+ };
2032
+ };
2033
+ };
2034
+ };
2035
+ };
2036
+ };
2037
+ };
2038
+ };
2039
+ }, {
2040
+ success: boolean;
2041
+ }>;
2042
+ removeUser: import("better-auth").StrictEndpoint<"/admin/remove-user", {
2043
+ method: "POST";
2044
+ body: import("better-auth").ZodObject<{
2045
+ userId: import("better-auth").ZodCoercedString<unknown>;
2046
+ }, import("better-auth").$strip>;
2047
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2048
+ session: {
2049
+ user: import("better-auth/plugins").UserWithRole;
2050
+ session: {
2051
+ id: string;
2052
+ createdAt: Date;
2053
+ updatedAt: Date;
2054
+ userId: string;
2055
+ expiresAt: Date;
2056
+ token: string;
2057
+ ipAddress?: string | null | undefined;
2058
+ userAgent?: string | null | undefined;
2059
+ };
2060
+ };
2061
+ }>)[];
2062
+ metadata: {
2063
+ openapi: {
2064
+ operationId: string;
2065
+ summary: string;
2066
+ description: string;
2067
+ responses: {
2068
+ 200: {
2069
+ description: string;
2070
+ content: {
2071
+ "application/json": {
2072
+ schema: {
2073
+ type: "object";
2074
+ properties: {
2075
+ success: {
2076
+ type: string;
2077
+ };
2078
+ };
2079
+ };
2080
+ };
2081
+ };
2082
+ };
2083
+ };
2084
+ };
2085
+ };
2086
+ }, {
2087
+ success: boolean;
2088
+ }>;
2089
+ setUserPassword: import("better-auth").StrictEndpoint<"/admin/set-user-password", {
2090
+ method: "POST";
2091
+ body: import("better-auth").ZodObject<{
2092
+ newPassword: import("better-auth").ZodString;
2093
+ userId: import("better-auth").ZodCoercedString<unknown>;
2094
+ }, import("better-auth").$strip>;
2095
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2096
+ session: {
2097
+ user: import("better-auth/plugins").UserWithRole;
2098
+ session: {
2099
+ id: string;
2100
+ createdAt: Date;
2101
+ updatedAt: Date;
2102
+ userId: string;
2103
+ expiresAt: Date;
2104
+ token: string;
2105
+ ipAddress?: string | null | undefined;
2106
+ userAgent?: string | null | undefined;
2107
+ };
2108
+ };
2109
+ }>)[];
2110
+ metadata: {
2111
+ openapi: {
2112
+ operationId: string;
2113
+ summary: string;
2114
+ description: string;
2115
+ responses: {
2116
+ 200: {
2117
+ description: string;
2118
+ content: {
2119
+ "application/json": {
2120
+ schema: {
2121
+ type: "object";
2122
+ properties: {
2123
+ status: {
2124
+ type: string;
2125
+ };
2126
+ };
2127
+ };
2128
+ };
2129
+ };
2130
+ };
2131
+ };
2132
+ };
2133
+ };
2134
+ }, {
2135
+ status: boolean;
2136
+ }>;
2137
+ userHasPermission: import("better-auth").StrictEndpoint<"/admin/has-permission", {
2138
+ method: "POST";
2139
+ body: import("better-auth").ZodIntersection<import("better-auth").ZodObject<{
2140
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
2141
+ role: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2142
+ }, import("better-auth").$strip>, import("better-auth").ZodUnion<readonly [
2143
+ import("better-auth").ZodObject<{
2144
+ permission: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>;
2145
+ permissions: import("better-auth").ZodUndefined;
2146
+ }, import("better-auth").$strip>,
2147
+ import("better-auth").ZodObject<{
2148
+ permission: import("better-auth").ZodUndefined;
2149
+ permissions: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>;
2150
+ }, import("better-auth").$strip>
2151
+ ]>>;
2152
+ metadata: {
2153
+ openapi: {
2154
+ description: string;
2155
+ requestBody: {
2156
+ content: {
2157
+ "application/json": {
2158
+ schema: {
2159
+ type: "object";
2160
+ properties: {
2161
+ permissions: {
2162
+ type: string;
2163
+ description: string;
2164
+ };
2165
+ };
2166
+ required: string[];
2167
+ };
2168
+ };
2169
+ };
2170
+ };
2171
+ responses: {
2172
+ "200": {
2173
+ description: string;
2174
+ content: {
2175
+ "application/json": {
2176
+ schema: {
2177
+ type: "object";
2178
+ properties: {
2179
+ error: {
2180
+ type: string;
2181
+ };
2182
+ success: {
2183
+ type: string;
2184
+ };
2185
+ };
2186
+ required: string[];
2187
+ };
2188
+ };
2189
+ };
2190
+ };
2191
+ };
2192
+ };
2193
+ $Infer: {
2194
+ body: {
2195
+ permissions: {
2196
+ readonly user?: ("set-role" | "create" | "update" | "delete" | "get" | "list" | "ban" | "impersonate" | "impersonate-admins" | "set-password")[] | undefined;
2197
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2198
+ };
2199
+ } & {
2200
+ userId?: string | undefined;
2201
+ role?: "user" | "admin" | undefined;
2202
+ };
2203
+ };
2204
+ };
2205
+ }, {
2206
+ error: null;
2207
+ success: boolean;
2208
+ }>;
2209
+ };
2210
+ $ERROR_CODES: {
2211
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2212
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
2213
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
2214
+ YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
2215
+ YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
2216
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
2217
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
2218
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
2219
+ YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
2220
+ YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
2221
+ YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
2222
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
2223
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
2224
+ BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
2225
+ YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
2226
+ NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
2227
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
2228
+ YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
2229
+ YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
2230
+ YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
2231
+ INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
2232
+ };
2233
+ schema: {
2234
+ user: {
2235
+ fields: {
2236
+ role: {
2237
+ type: "string";
2238
+ required: false;
2239
+ input: false;
2240
+ };
2241
+ banned: {
2242
+ type: "boolean";
2243
+ defaultValue: false;
2244
+ required: false;
2245
+ input: false;
2246
+ };
2247
+ banReason: {
2248
+ type: "string";
2249
+ required: false;
2250
+ input: false;
2251
+ };
2252
+ banExpires: {
2253
+ type: "date";
2254
+ required: false;
2255
+ input: false;
2256
+ };
2257
+ };
2258
+ };
2259
+ session: {
2260
+ fields: {
2261
+ impersonatedBy: {
2262
+ type: "string";
2263
+ required: false;
2264
+ };
2265
+ };
2266
+ };
2267
+ };
2268
+ options: NoInfer<{
2269
+ defaultRole: string;
2270
+ }>;
2271
+ },
2272
+ {
2273
+ id: "custom-session";
2274
+ hooks: {
2275
+ after: {
2276
+ matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
2277
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2278
+ user: {
2279
+ id: string;
2280
+ createdAt: Date;
2281
+ updatedAt: Date;
2282
+ email: string;
2283
+ emailVerified: boolean;
2284
+ name: string;
2285
+ image?: string | null | undefined;
2286
+ role?: import("@prisma/client").$Enums.Role;
2287
+ banned?: boolean | null;
2288
+ };
2289
+ session: {
2290
+ id: string;
2291
+ createdAt: Date;
2292
+ updatedAt: Date;
2293
+ userId: string;
2294
+ expiresAt: Date;
2295
+ token: string;
2296
+ ipAddress?: string | null | undefined;
2297
+ userAgent?: string | null | undefined;
2298
+ };
2299
+ }[] | undefined>;
2300
+ }[];
2301
+ };
2302
+ endpoints: {
2303
+ getSession: import("better-auth").StrictEndpoint<"/get-session", {
2304
+ method: "GET";
2305
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2306
+ disableCookieCache: import("better-auth").ZodOptional<import("better-auth").ZodUnion<[
2307
+ import("better-auth").ZodBoolean,
2308
+ import("better-auth").ZodPipe<import("better-auth").ZodString, import("better-auth").ZodTransform<boolean, string>>
2309
+ ]>>;
2310
+ disableRefresh: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2311
+ }, import("better-auth").$strip>>;
2312
+ metadata: {
2313
+ CUSTOM_SESSION: boolean;
2314
+ openapi: {
2315
+ description: string;
2316
+ responses: {
2317
+ "200": {
2318
+ description: string;
2319
+ content: {
2320
+ "application/json": {
2321
+ schema: {
2322
+ type: "array";
2323
+ nullable: boolean;
2324
+ items: {
2325
+ $ref: string;
2326
+ };
2327
+ };
2328
+ };
2329
+ };
2330
+ };
2331
+ };
2332
+ };
2333
+ };
2334
+ requireHeaders: true;
2335
+ }, {
2336
+ user: {
2337
+ id: string;
2338
+ createdAt: Date;
2339
+ updatedAt: Date;
2340
+ email: string;
2341
+ emailVerified: boolean;
2342
+ name: string;
2343
+ image?: string | null | undefined;
2344
+ role?: import("@prisma/client").$Enums.Role;
2345
+ banned?: boolean | null;
2346
+ };
2347
+ session: {
2348
+ id: string;
2349
+ createdAt: Date;
2350
+ updatedAt: Date;
2351
+ userId: string;
2352
+ expiresAt: Date;
2353
+ token: string;
2354
+ ipAddress?: string | null | undefined;
2355
+ userAgent?: string | null | undefined;
2356
+ };
2357
+ } | null>;
2358
+ };
2359
+ $Infer: {
2360
+ Session: {
2361
+ user: {
2362
+ id: string;
2363
+ createdAt: Date;
2364
+ updatedAt: Date;
2365
+ email: string;
2366
+ emailVerified: boolean;
2367
+ name: string;
2368
+ image?: string | null | undefined;
2369
+ role?: import("@prisma/client").$Enums.Role;
2370
+ banned?: boolean | null;
2371
+ };
2372
+ session: {
2373
+ id: string;
2374
+ createdAt: Date;
2375
+ updatedAt: Date;
2376
+ userId: string;
2377
+ expiresAt: Date;
2378
+ token: string;
2379
+ ipAddress?: string | null | undefined;
2380
+ userAgent?: string | null | undefined;
2381
+ };
2382
+ };
2383
+ };
2384
+ options: import("better-auth/plugins").CustomSessionPluginOptions | undefined;
2385
+ }
2386
+ ];
2387
+ rateLimit: {
2388
+ enabled: boolean;
2389
+ window: number;
2390
+ max: number;
2391
+ };
2392
+ emailVerification: {
2393
+ sendVerificationEmail: ({ user, url, token }: {
2394
+ user: import("better-auth").User;
2395
+ url: string;
2396
+ token: string;
2397
+ }, request: Request | undefined) => Promise<void>;
2398
+ sendOnSignUp: true;
2399
+ sendOnSignIn: true;
2400
+ autoSignInAfterVerification: true;
2401
+ };
2402
+ emailAndPassword: {
2403
+ enabled: true;
2404
+ requireEmailVerification: true;
2405
+ sendResetPassword: ({ user, url, token }: {
2406
+ user: import("better-auth").User;
2407
+ url: string;
2408
+ token: string;
2409
+ }, request: Request | undefined) => Promise<void>;
2410
+ };
2411
+ }>;
2412
+ export type Auth = typeof auth;
2413
+ declare const ourFileRouter: {
2414
+ courseImage: import("node_modules/uploadthing/dist/types-Bs3w2d_3.js").FileRoute<{
2415
+ input: undefined;
2416
+ output: {
2417
+ uploadedBy: string;
2418
+ publicUrl: string;
2419
+ name: string;
2420
+ key: string;
2421
+ type: string;
2422
+ };
2423
+ errorShape: import("@uploadthing/shared").Json;
2424
+ }>;
2425
+ };
2426
+ export type OurFileRouter = typeof ourFileRouter;
2427
+
2428
+ export {};