@sortsys/v2-client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3063 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { AnyRouter } from '@trpc/server';
4
+ import { Request as Request$1, Response as Response$1 } from 'express-serve-static-core';
5
+
6
+ declare const ROLES: readonly [
7
+ ":admin",
8
+ "view:users",
9
+ "manage:users",
10
+ "delete:users",
11
+ "view:projects",
12
+ "manage:projects",
13
+ "delete:projects",
14
+ "view:projectDeployments",
15
+ "manage:projectDeployments",
16
+ "delete:projectDeployments",
17
+ "view:tools",
18
+ "manage:tools",
19
+ "delete:tools",
20
+ "view:toolTrackings",
21
+ "manage:toolTrackings",
22
+ "delete:toolTrackings",
23
+ "view:toolInventories",
24
+ "manage:toolInventories",
25
+ "delete:toolInventories",
26
+ "view:products",
27
+ "manage:products",
28
+ "delete:products",
29
+ "view:deliveryNotes",
30
+ "manage:deliveryNotes",
31
+ "delete:deliveryNotes",
32
+ "view:productVendors",
33
+ "manage:productVendors",
34
+ "delete:productVendors",
35
+ "view:productPriceRecords",
36
+ "manage:productPriceRecords",
37
+ "delete:productPriceRecords",
38
+ "view:customers",
39
+ "manage:customers",
40
+ "delete:customers"
41
+ ];
42
+ export type Role = (typeof ROLES)[number];
43
+ declare namespace auth {
44
+ const JWT_ALG: "HS512";
45
+ class AuthResult {
46
+ readonly tenant: string;
47
+ readonly user: {
48
+ readonly id: string;
49
+ readonly username: string;
50
+ readonly salutation: string | null;
51
+ readonly first_name: string;
52
+ readonly last_name: string | null;
53
+ readonly phone: string | null;
54
+ readonly email: string | null;
55
+ readonly contract_type: "internal" | "external" | "subcontractor";
56
+ };
57
+ readonly session: {
58
+ readonly id: string;
59
+ readonly user_id: string;
60
+ readonly inet_addr: string | null;
61
+ readonly user_agent: string | null;
62
+ readonly created_at: Date;
63
+ readonly expires_at: Date;
64
+ };
65
+ readonly roles: readonly Role[];
66
+ constructor(props: {
67
+ tenant: AuthResult["tenant"];
68
+ user: AuthResult["user"];
69
+ session: AuthResult["session"];
70
+ roles: AuthResult["roles"];
71
+ });
72
+ /**
73
+ * @returns Whether the user is an admin.
74
+ */
75
+ isAdmin(): boolean;
76
+ /**
77
+ * @returns Whether the user is an admin or has the given role.
78
+ */
79
+ canDo(role: Role): boolean;
80
+ /**
81
+ * Ends the associated user session immeadiatly.
82
+ */
83
+ logout(): Promise<void>;
84
+ }
85
+ /**
86
+ * Login using the given credentials and meta data.
87
+ *
88
+ * @returns a signed, valid JWT on success, null on error
89
+ *
90
+ * Note: 'Logging in' means creating a new session for that user and issuing a valid JWT along the way.
91
+ * The JWT will be valid for 30 days and is signed using the secret defined in the config.
92
+ * If this function fails while issuing the JWT, the session creation is NOT rolled back.
93
+ */
94
+ function login({ tenant, username, password, userAgent, inetAddr }: {
95
+ tenant: string;
96
+ username: string;
97
+ password: string;
98
+ userAgent?: string | null;
99
+ inetAddr?: string | null;
100
+ }): Promise<string | null>;
101
+ function loginAdmin(password: string, tenant?: string | null): Promise<string | null>;
102
+ /**
103
+ * @throws on authentication failure
104
+ * @returns the tenant the admin is administrating or '+all' for all tenants
105
+ */
106
+ function authenticateAdmin<RequestT extends Request$1<any, any, any, any, any>>(req: RequestT): Promise<"+all" | string>;
107
+ function authenticate<RequestT extends Request$1<any, any, any, any, any>>(req: RequestT): Promise<AuthResult>;
108
+ }
109
+ declare namespace error {
110
+ class HTTPError extends Error {
111
+ readonly code: http.StatusCodeCode;
112
+ readonly message: string;
113
+ constructor(statusCode: http.StatusCode, message?: string);
114
+ }
115
+ function http(status: http.StatusCode, message?: string): HTTPError;
116
+ namespace http {
117
+ const statusCodes: {
118
+ readonly Continue: 100;
119
+ readonly SwitchingProtocols: 101;
120
+ readonly Processing: 102;
121
+ readonly EarlyHints: 103;
122
+ readonly OK: 200;
123
+ readonly Created: 201;
124
+ readonly Accepted: 202;
125
+ readonly NonAuthoritativeInfo: 203;
126
+ readonly NoContent: 204;
127
+ readonly ResetContent: 205;
128
+ readonly PartialContent: 206;
129
+ readonly MultiStatus: 207;
130
+ readonly AlreadyReported: 208;
131
+ readonly IMUsed: 226;
132
+ readonly MultipleChoices: 300;
133
+ readonly MovedPermanently: 301;
134
+ readonly Found: 302;
135
+ readonly SeeOther: 303;
136
+ readonly NotModified: 304;
137
+ readonly UseProxy: 305;
138
+ readonly TemporaryRedirect: 307;
139
+ readonly PermanentRedirect: 308;
140
+ readonly BadRequest: 400;
141
+ readonly Unauthorized: 401;
142
+ readonly PaymentRequired: 402;
143
+ readonly Forbidden: 403;
144
+ readonly NotFound: 404;
145
+ readonly MethodNotAllowed: 405;
146
+ readonly NotAcceptable: 406;
147
+ readonly ProxyAuthRequired: 407;
148
+ readonly RequestTimeout: 408;
149
+ readonly Conflict: 409;
150
+ readonly Gone: 410;
151
+ readonly LengthRequired: 411;
152
+ readonly PreconditionFailed: 412;
153
+ readonly RequestEntityTooLarge: 413;
154
+ readonly RequestURITooLong: 414;
155
+ readonly UnsupportedMediaType: 415;
156
+ readonly RequestedRangeNotSatisfiable: 416;
157
+ readonly ExpectationFailed: 417;
158
+ readonly Teapot: 418;
159
+ readonly MisdirectedRequest: 421;
160
+ readonly UnprocessableEntity: 422;
161
+ readonly Locked: 423;
162
+ readonly FailedDependency: 424;
163
+ readonly TooEarly: 425;
164
+ readonly UpgradeRequired: 426;
165
+ readonly PreconditionRequired: 428;
166
+ readonly TooManyRequests: 429;
167
+ readonly RequestHeaderFieldsTooLarge: 431;
168
+ readonly UnavailableForLegalReasons: 451;
169
+ readonly InternalServerError: 500;
170
+ readonly NotImplemented: 501;
171
+ readonly BadGateway: 502;
172
+ readonly ServiceUnavailable: 503;
173
+ readonly GatewayTimeout: 504;
174
+ readonly HTTPVersionNotSupported: 505;
175
+ readonly VariantAlsoNegotiates: 506;
176
+ readonly InsufficientStorage: 507;
177
+ readonly LoopDetected: 508;
178
+ readonly NotExtended: 510;
179
+ readonly NetworkAuthenticationRequired: 511;
180
+ };
181
+ type StatusCodeString = keyof typeof statusCodes;
182
+ type StatusCodeCode = (typeof statusCodes)[keyof typeof statusCodes];
183
+ type StatusCode = StatusCodeString | StatusCodeCode;
184
+ const statusCodeTexts: {
185
+ readonly 100: "Continue";
186
+ readonly 101: "Switching Protocols";
187
+ readonly 102: "Processing";
188
+ readonly 103: "Early Hints";
189
+ readonly 200: "OK";
190
+ readonly 201: "Created";
191
+ readonly 202: "Accepted";
192
+ readonly 203: "Non-Authoritative Information";
193
+ readonly 204: "No Content";
194
+ readonly 205: "Reset Content";
195
+ readonly 206: "Partial Content";
196
+ readonly 207: "Multi-Status";
197
+ readonly 208: "Already Reported";
198
+ readonly 226: "IM Used";
199
+ readonly 300: "Multiple Choices";
200
+ readonly 301: "Moved Permanently";
201
+ readonly 302: "Found";
202
+ readonly 303: "See Other";
203
+ readonly 304: "Not Modified";
204
+ readonly 305: "Use Proxy";
205
+ readonly 307: "Temporary Redirect";
206
+ readonly 308: "Permanent Redirect";
207
+ readonly 400: "Bad Request";
208
+ readonly 401: "Unauthorized";
209
+ readonly 402: "Payment Required";
210
+ readonly 403: "Forbidden";
211
+ readonly 404: "Not Found";
212
+ readonly 405: "Method Not Allowed";
213
+ readonly 406: "Not Acceptable";
214
+ readonly 407: "Proxy Authentication Required";
215
+ readonly 408: "Request Timeout";
216
+ readonly 409: "Conflict";
217
+ readonly 410: "Gone";
218
+ readonly 411: "Length Required";
219
+ readonly 412: "Precondition Failed";
220
+ readonly 413: "Request Entity Too Large";
221
+ readonly 414: "Request URI Too Long";
222
+ readonly 415: "Unsupported Media Type";
223
+ readonly 416: "Requested Range Not Satisfiable";
224
+ readonly 417: "Expectation Failed";
225
+ readonly 418: "I'm a teapot";
226
+ readonly 421: "Misdirected Request";
227
+ readonly 422: "Unprocessable Entity";
228
+ readonly 423: "Locked";
229
+ readonly 424: "Failed Dependency";
230
+ readonly 425: "Too Early";
231
+ readonly 426: "Upgrade Required";
232
+ readonly 428: "Precondition Required";
233
+ readonly 429: "Too Many Requests";
234
+ readonly 431: "Request Header Fields Too Large";
235
+ readonly 451: "Unavailable For Legal Reasons";
236
+ readonly 500: "Internal Server Error";
237
+ readonly 501: "Not Implemented";
238
+ readonly 502: "Bad Gateway";
239
+ readonly 503: "Service Unavailable";
240
+ readonly 504: "Gateway Timeout";
241
+ readonly 505: "HTTP Version Not Supported";
242
+ readonly 506: "Variant Also Negotiates";
243
+ readonly 507: "Insufficient Storage";
244
+ readonly 508: "Loop Detected";
245
+ readonly 510: "Not Extended";
246
+ readonly 511: "Network Authentication Required";
247
+ };
248
+ function statusCodeToCode(statusCode: StatusCode): StatusCodeCode;
249
+ function statusCodeText(statusCode: StatusCode): string;
250
+ }
251
+ }
252
+ export type TrpcContext = {
253
+ req: Request$1;
254
+ res: Response$1;
255
+ authResult?: auth.AuthResult;
256
+ adminFor?: "+all" | string;
257
+ };
258
+ export type HandlerDefinition<PathT extends string, RouterT extends AnyRouter, TestsT extends readonly (() => void)[] | undefined = undefined> = {
259
+ path: PathT;
260
+ router: RouterT;
261
+ tests?: TestsT;
262
+ };
263
+ declare const HANDLERS: readonly [
264
+ HandlerDefinition<"auth", import("@trpc/server").TRPCBuiltRouter<{
265
+ ctx: TrpcContext;
266
+ meta: object;
267
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
268
+ message: string;
269
+ data: {
270
+ httpCode: error.http.StatusCodeCode;
271
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
272
+ httpStatus: number;
273
+ path?: string;
274
+ stack?: string;
275
+ };
276
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
277
+ };
278
+ transformer: true;
279
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
280
+ login: import("@trpc/server").TRPCMutationProcedure<{
281
+ input: {
282
+ tenant: string;
283
+ username: string;
284
+ password: string;
285
+ };
286
+ output: {
287
+ token: string;
288
+ };
289
+ meta: object;
290
+ }>;
291
+ logout: import("@trpc/server").TRPCMutationProcedure<{
292
+ input: void;
293
+ output: {
294
+ success: true;
295
+ };
296
+ meta: object;
297
+ }>;
298
+ check: import("@trpc/server").TRPCQueryProcedure<{
299
+ input: void;
300
+ output: {
301
+ success: true;
302
+ };
303
+ meta: object;
304
+ }>;
305
+ sessionInfo: import("@trpc/server").TRPCQueryProcedure<{
306
+ input: void;
307
+ output: {
308
+ user: {
309
+ id: string;
310
+ username: string;
311
+ salutation: string | null;
312
+ firstName: string;
313
+ lastName: string | null;
314
+ contractType: "internal" | "external" | "subcontractor";
315
+ phone: string | null;
316
+ email: string | null;
317
+ };
318
+ session: {
319
+ id: string;
320
+ inetAddr: string | null;
321
+ userAgent: string | null;
322
+ createdAt: Date;
323
+ expiresAt: Date;
324
+ };
325
+ roles: (":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers")[];
326
+ };
327
+ meta: object;
328
+ }>;
329
+ setPassword: import("@trpc/server").TRPCMutationProcedure<{
330
+ input: {
331
+ username: string;
332
+ password: string;
333
+ };
334
+ output: {
335
+ success: true;
336
+ };
337
+ meta: object;
338
+ }>;
339
+ }>>, readonly [
340
+ () => void,
341
+ () => void,
342
+ () => void,
343
+ () => void
344
+ ]>,
345
+ HandlerDefinition<"admin", import("@trpc/server").TRPCBuiltRouter<{
346
+ ctx: TrpcContext;
347
+ meta: object;
348
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
349
+ message: string;
350
+ data: {
351
+ httpCode: error.http.StatusCodeCode;
352
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
353
+ httpStatus: number;
354
+ path?: string;
355
+ stack?: string;
356
+ };
357
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
358
+ };
359
+ transformer: true;
360
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
361
+ login: import("@trpc/server").TRPCMutationProcedure<{
362
+ input: {
363
+ password: string;
364
+ tenant?: string | null | undefined;
365
+ };
366
+ output: {
367
+ token: string;
368
+ };
369
+ meta: object;
370
+ }>;
371
+ tenants: import("@trpc/server").TRPCBuiltRouter<{
372
+ ctx: TrpcContext;
373
+ meta: object;
374
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
375
+ message: string;
376
+ data: {
377
+ httpCode: error.http.StatusCodeCode;
378
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
379
+ httpStatus: number;
380
+ path?: string;
381
+ stack?: string;
382
+ };
383
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
384
+ };
385
+ transformer: true;
386
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
387
+ list: import("@trpc/server").TRPCQueryProcedure<{
388
+ input: void;
389
+ output: {
390
+ name: string;
391
+ locked_at: Date | null;
392
+ deleted_at: Date | null;
393
+ deactivated_at: Date | null;
394
+ connection_details: {
395
+ postgresDSN?: string | null | undefined;
396
+ };
397
+ contact_details: {
398
+ email: string;
399
+ companyName?: string | null | undefined;
400
+ address?: {
401
+ city?: string | null | undefined;
402
+ zip?: string | null | undefined;
403
+ country?: string | null | undefined;
404
+ streetAddress?: string | null | undefined;
405
+ } | null | undefined;
406
+ };
407
+ options: {
408
+ sso: {
409
+ "ms-entra-id": {
410
+ enabled: boolean;
411
+ importUserUsername: boolean;
412
+ importUserName: boolean;
413
+ importUserEmail: boolean;
414
+ tenantId?: string | null | undefined;
415
+ clientId?: string | null | undefined;
416
+ objectId?: string | null | undefined;
417
+ };
418
+ };
419
+ };
420
+ }[];
421
+ meta: object;
422
+ }>;
423
+ create: import("@trpc/server").TRPCMutationProcedure<{
424
+ input: {
425
+ name: string;
426
+ contact_details: {
427
+ email: string;
428
+ companyName?: string | null | undefined;
429
+ address?: {
430
+ city?: string | null | undefined;
431
+ zip?: string | null | undefined;
432
+ country?: string | null | undefined;
433
+ streetAddress?: string | null | undefined;
434
+ } | null | undefined;
435
+ };
436
+ options?: {
437
+ sso: {
438
+ "ms-entra-id": {
439
+ enabled: boolean;
440
+ importUserUsername: boolean;
441
+ importUserName: boolean;
442
+ importUserEmail: boolean;
443
+ tenantId?: string | null | undefined;
444
+ clientId?: string | null | undefined;
445
+ objectId?: string | null | undefined;
446
+ };
447
+ };
448
+ } | undefined;
449
+ connection_details?: {
450
+ postgresDSN?: string | null | undefined;
451
+ } | undefined;
452
+ };
453
+ output: {
454
+ adminPassword: string;
455
+ };
456
+ meta: object;
457
+ }>;
458
+ get: import("@trpc/server").TRPCQueryProcedure<{
459
+ input: {
460
+ name: string;
461
+ };
462
+ output: {
463
+ name: string;
464
+ locked_at: Date | null;
465
+ deleted_at: Date | null;
466
+ deactivated_at: Date | null;
467
+ connection_details: {
468
+ postgresDSN?: string | null | undefined;
469
+ };
470
+ contact_details: {
471
+ email: string;
472
+ companyName?: string | null | undefined;
473
+ address?: {
474
+ city?: string | null | undefined;
475
+ zip?: string | null | undefined;
476
+ country?: string | null | undefined;
477
+ streetAddress?: string | null | undefined;
478
+ } | null | undefined;
479
+ };
480
+ options: {
481
+ sso: {
482
+ "ms-entra-id": {
483
+ enabled: boolean;
484
+ importUserUsername: boolean;
485
+ importUserName: boolean;
486
+ importUserEmail: boolean;
487
+ tenantId?: string | null | undefined;
488
+ clientId?: string | null | undefined;
489
+ objectId?: string | null | undefined;
490
+ };
491
+ };
492
+ };
493
+ };
494
+ meta: object;
495
+ }>;
496
+ update: import("@trpc/server").TRPCMutationProcedure<{
497
+ input: {
498
+ name: string;
499
+ data: {
500
+ contact_details?: {
501
+ email: string;
502
+ companyName?: string | null | undefined;
503
+ address?: {
504
+ city?: string | null | undefined;
505
+ zip?: string | null | undefined;
506
+ country?: string | null | undefined;
507
+ streetAddress?: string | null | undefined;
508
+ } | null | undefined;
509
+ } | undefined;
510
+ connection_details?: {
511
+ postgresDSN?: string | null | undefined;
512
+ } | undefined;
513
+ options?: {
514
+ sso: {
515
+ "ms-entra-id": {
516
+ enabled: boolean;
517
+ importUserUsername: boolean;
518
+ importUserName: boolean;
519
+ importUserEmail: boolean;
520
+ tenantId?: string | null | undefined;
521
+ clientId?: string | null | undefined;
522
+ objectId?: string | null | undefined;
523
+ };
524
+ };
525
+ } | undefined;
526
+ };
527
+ };
528
+ output: {
529
+ success: true;
530
+ };
531
+ meta: object;
532
+ }>;
533
+ activate: import("@trpc/server").TRPCMutationProcedure<{
534
+ input: {
535
+ name: string;
536
+ };
537
+ output: {
538
+ success: true;
539
+ };
540
+ meta: object;
541
+ }>;
542
+ deactivate: import("@trpc/server").TRPCMutationProcedure<{
543
+ input: {
544
+ name: string;
545
+ };
546
+ output: {
547
+ success: true;
548
+ };
549
+ meta: object;
550
+ }>;
551
+ delete: import("@trpc/server").TRPCMutationProcedure<{
552
+ input: {
553
+ name: string;
554
+ };
555
+ output: {
556
+ success: true;
557
+ };
558
+ meta: object;
559
+ }>;
560
+ deleteForever: import("@trpc/server").TRPCMutationProcedure<{
561
+ input: {
562
+ name: string;
563
+ };
564
+ output: {
565
+ success: true;
566
+ };
567
+ meta: object;
568
+ }>;
569
+ lock: import("@trpc/server").TRPCMutationProcedure<{
570
+ input: {
571
+ name: string;
572
+ };
573
+ output: {
574
+ success: true;
575
+ };
576
+ meta: object;
577
+ }>;
578
+ unlock: import("@trpc/server").TRPCMutationProcedure<{
579
+ input: {
580
+ name: string;
581
+ };
582
+ output: {
583
+ success: true;
584
+ };
585
+ meta: object;
586
+ }>;
587
+ undelete: import("@trpc/server").TRPCMutationProcedure<{
588
+ input: {
589
+ name: string;
590
+ };
591
+ output: {
592
+ success: true;
593
+ };
594
+ meta: object;
595
+ }>;
596
+ }>>;
597
+ }>>, readonly [
598
+ () => void,
599
+ () => void,
600
+ () => void,
601
+ () => void,
602
+ () => void,
603
+ () => void,
604
+ () => void,
605
+ () => void,
606
+ () => void,
607
+ () => void,
608
+ () => void,
609
+ () => void
610
+ ]>,
611
+ HandlerDefinition<"customers", import("@trpc/server").TRPCBuiltRouter<{
612
+ ctx: TrpcContext;
613
+ meta: object;
614
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
615
+ message: string;
616
+ data: {
617
+ httpCode: error.http.StatusCodeCode;
618
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
619
+ httpStatus: number;
620
+ path?: string;
621
+ stack?: string;
622
+ };
623
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
624
+ };
625
+ transformer: true;
626
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
627
+ list: import("@trpc/server").TRPCQueryProcedure<{
628
+ input: {
629
+ search?: string | null | undefined;
630
+ };
631
+ output: {
632
+ id: string;
633
+ salutation: string | null;
634
+ name: string;
635
+ address: {
636
+ city: string;
637
+ streetAddress: string;
638
+ country?: string | null | undefined;
639
+ zip?: string | null | undefined;
640
+ } | null;
641
+ createdAt: Date;
642
+ modifiedAt: Date;
643
+ }[];
644
+ meta: object;
645
+ }>;
646
+ get: import("@trpc/server").TRPCQueryProcedure<{
647
+ input: {
648
+ id: string;
649
+ };
650
+ output: {
651
+ id: string;
652
+ salutation: string | null;
653
+ name: string;
654
+ address: {
655
+ city: string;
656
+ streetAddress: string;
657
+ country?: string | null | undefined;
658
+ zip?: string | null | undefined;
659
+ } | null;
660
+ createdAt: Date;
661
+ modifiedAt: Date;
662
+ };
663
+ meta: object;
664
+ }>;
665
+ create: import("@trpc/server").TRPCMutationProcedure<{
666
+ input: {
667
+ name: string;
668
+ salutation?: string | null | undefined;
669
+ address?: {
670
+ city: string;
671
+ streetAddress: string;
672
+ country?: string | null | undefined;
673
+ zip?: string | null | undefined;
674
+ } | null | undefined;
675
+ };
676
+ output: {
677
+ id: string;
678
+ };
679
+ meta: object;
680
+ }>;
681
+ update: import("@trpc/server").TRPCMutationProcedure<{
682
+ input: {
683
+ id: string;
684
+ data: {
685
+ salutation?: string | null | undefined;
686
+ name?: string | undefined;
687
+ address?: {
688
+ city: string;
689
+ streetAddress: string;
690
+ country?: string | null | undefined;
691
+ zip?: string | null | undefined;
692
+ } | null | undefined;
693
+ };
694
+ };
695
+ output: {
696
+ success: true;
697
+ };
698
+ meta: object;
699
+ }>;
700
+ delete: import("@trpc/server").TRPCMutationProcedure<{
701
+ input: {
702
+ id: string;
703
+ };
704
+ output: {
705
+ success: true;
706
+ };
707
+ meta: object;
708
+ }>;
709
+ }>>, readonly [
710
+ () => void,
711
+ () => void,
712
+ () => void,
713
+ () => void,
714
+ () => void
715
+ ]>,
716
+ HandlerDefinition<"projects", import("@trpc/server").TRPCBuiltRouter<{
717
+ ctx: TrpcContext;
718
+ meta: object;
719
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
720
+ message: string;
721
+ data: {
722
+ httpCode: error.http.StatusCodeCode;
723
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
724
+ httpStatus: number;
725
+ path?: string;
726
+ stack?: string;
727
+ };
728
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
729
+ };
730
+ transformer: true;
731
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
732
+ list: import("@trpc/server").TRPCQueryProcedure<{
733
+ input: {
734
+ search?: string | null | undefined;
735
+ finished?: boolean | null | undefined;
736
+ };
737
+ output: {
738
+ id: string;
739
+ title: string;
740
+ address: {
741
+ city: string;
742
+ streetAddress: string;
743
+ country?: string | null | undefined;
744
+ zip?: string | null | undefined;
745
+ } | null;
746
+ customerId: string | null;
747
+ createdAt: Date;
748
+ modifiedAt: Date;
749
+ finishedAt: Date | null;
750
+ }[];
751
+ meta: object;
752
+ }>;
753
+ get: import("@trpc/server").TRPCQueryProcedure<{
754
+ input: {
755
+ id: string;
756
+ };
757
+ output: {
758
+ id: string;
759
+ title: string;
760
+ address: {
761
+ city: string;
762
+ streetAddress: string;
763
+ country?: string | null | undefined;
764
+ zip?: string | null | undefined;
765
+ } | null;
766
+ customerId: string | null;
767
+ createdAt: Date;
768
+ modifiedAt: Date;
769
+ finishedAt: Date | null;
770
+ };
771
+ meta: object;
772
+ }>;
773
+ create: import("@trpc/server").TRPCMutationProcedure<{
774
+ input: {
775
+ title: string;
776
+ address?: {
777
+ city: string;
778
+ streetAddress: string;
779
+ country?: string | null | undefined;
780
+ zip?: string | null | undefined;
781
+ } | null | undefined;
782
+ customerId?: string | null | undefined;
783
+ };
784
+ output: {
785
+ id: string;
786
+ };
787
+ meta: object;
788
+ }>;
789
+ update: import("@trpc/server").TRPCMutationProcedure<{
790
+ input: {
791
+ id: string;
792
+ data: {
793
+ title?: string | undefined;
794
+ address?: {
795
+ city: string;
796
+ streetAddress: string;
797
+ country?: string | null | undefined;
798
+ zip?: string | null | undefined;
799
+ } | null | undefined;
800
+ customerId?: string | null | undefined;
801
+ };
802
+ };
803
+ output: {
804
+ success: true;
805
+ };
806
+ meta: object;
807
+ }>;
808
+ finish: import("@trpc/server").TRPCMutationProcedure<{
809
+ input: {
810
+ id: string;
811
+ };
812
+ output: {
813
+ success: true;
814
+ };
815
+ meta: object;
816
+ }>;
817
+ resume: import("@trpc/server").TRPCMutationProcedure<{
818
+ input: {
819
+ id: string;
820
+ };
821
+ output: {
822
+ success: true;
823
+ };
824
+ meta: object;
825
+ }>;
826
+ delete: import("@trpc/server").TRPCMutationProcedure<{
827
+ input: {
828
+ id: string;
829
+ };
830
+ output: {
831
+ success: true;
832
+ };
833
+ meta: object;
834
+ }>;
835
+ deployments: import("@trpc/server").TRPCBuiltRouter<{
836
+ ctx: TrpcContext;
837
+ meta: object;
838
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
839
+ message: string;
840
+ data: {
841
+ httpCode: error.http.StatusCodeCode;
842
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
843
+ httpStatus: number;
844
+ path?: string;
845
+ stack?: string;
846
+ };
847
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
848
+ };
849
+ transformer: true;
850
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
851
+ list: import("@trpc/server").TRPCQueryProcedure<{
852
+ input: {
853
+ projectId?: string | null | undefined;
854
+ userId?: string | null | undefined;
855
+ active?: boolean | null | undefined;
856
+ fromAfter?: unknown;
857
+ fromBefore?: unknown;
858
+ toAfter?: unknown;
859
+ toBefore?: unknown;
860
+ limit?: number | undefined;
861
+ offset?: number | undefined;
862
+ };
863
+ output: {
864
+ id: string;
865
+ projectId: string;
866
+ userId: string;
867
+ from: Date;
868
+ to: Date;
869
+ note: string | null;
870
+ createdAt: Date;
871
+ }[];
872
+ meta: object;
873
+ }>;
874
+ create: import("@trpc/server").TRPCMutationProcedure<{
875
+ input: {
876
+ projectId: string;
877
+ userId: string;
878
+ from: unknown;
879
+ to: unknown;
880
+ note?: string | null | undefined;
881
+ };
882
+ output: {
883
+ id: string;
884
+ };
885
+ meta: object;
886
+ }>;
887
+ update: import("@trpc/server").TRPCMutationProcedure<{
888
+ input: {
889
+ id: string;
890
+ data: {
891
+ projectId?: string | null | undefined;
892
+ userId?: string | null | undefined;
893
+ from?: unknown;
894
+ to?: unknown;
895
+ note?: string | null | undefined;
896
+ };
897
+ };
898
+ output: {
899
+ success: true;
900
+ };
901
+ meta: object;
902
+ }>;
903
+ delete: import("@trpc/server").TRPCMutationProcedure<{
904
+ input: {
905
+ id: string;
906
+ };
907
+ output: {
908
+ success: true;
909
+ };
910
+ meta: object;
911
+ }>;
912
+ }>>;
913
+ }>>, readonly [
914
+ () => void,
915
+ () => void,
916
+ () => void,
917
+ () => void,
918
+ () => void,
919
+ () => void,
920
+ () => void,
921
+ () => void,
922
+ () => void,
923
+ () => void,
924
+ () => void
925
+ ]>,
926
+ HandlerDefinition<"products", import("@trpc/server").TRPCBuiltRouter<{
927
+ ctx: TrpcContext;
928
+ meta: object;
929
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
930
+ message: string;
931
+ data: {
932
+ httpCode: error.http.StatusCodeCode;
933
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
934
+ httpStatus: number;
935
+ path?: string;
936
+ stack?: string;
937
+ };
938
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
939
+ };
940
+ transformer: true;
941
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
942
+ list: import("@trpc/server").TRPCQueryProcedure<{
943
+ input: {
944
+ category?: string | null | undefined;
945
+ search?: string | null | undefined;
946
+ };
947
+ output: {
948
+ id: string;
949
+ customId: number;
950
+ name: string;
951
+ description: string | null;
952
+ brand: string | null;
953
+ baseUnit: string;
954
+ otherUnits: Record<string, number>;
955
+ categories: string[];
956
+ }[];
957
+ meta: object;
958
+ }>;
959
+ get: import("@trpc/server").TRPCQueryProcedure<{
960
+ input: {
961
+ id: string;
962
+ };
963
+ output: {
964
+ id: string;
965
+ customId: number;
966
+ name: string;
967
+ description: string | null;
968
+ brand: string | null;
969
+ baseUnit: string;
970
+ otherUnits: Record<string, number>;
971
+ categories: string[];
972
+ };
973
+ meta: object;
974
+ }>;
975
+ create: import("@trpc/server").TRPCMutationProcedure<{
976
+ input: {
977
+ customId: number;
978
+ name: string;
979
+ baseUnit: string;
980
+ brand?: string | null | undefined;
981
+ description?: string | null | undefined;
982
+ otherUnits?: Record<string, number> | undefined;
983
+ };
984
+ output: {
985
+ id: string;
986
+ };
987
+ meta: object;
988
+ }>;
989
+ update: import("@trpc/server").TRPCMutationProcedure<{
990
+ input: {
991
+ id: string;
992
+ data: {
993
+ customId?: number | undefined;
994
+ name?: string | undefined;
995
+ brand?: string | null | undefined;
996
+ description?: string | null | undefined;
997
+ baseUnit?: string | undefined;
998
+ otherUnits?: Record<string, number> | undefined;
999
+ };
1000
+ };
1001
+ output: {
1002
+ success: true;
1003
+ };
1004
+ meta: object;
1005
+ }>;
1006
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1007
+ input: {
1008
+ id: string;
1009
+ };
1010
+ output: {
1011
+ success: true;
1012
+ };
1013
+ meta: object;
1014
+ }>;
1015
+ categories: import("@trpc/server").TRPCBuiltRouter<{
1016
+ ctx: TrpcContext;
1017
+ meta: object;
1018
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1019
+ message: string;
1020
+ data: {
1021
+ httpCode: error.http.StatusCodeCode;
1022
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1023
+ httpStatus: number;
1024
+ path?: string;
1025
+ stack?: string;
1026
+ };
1027
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1028
+ };
1029
+ transformer: true;
1030
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1031
+ list: import("@trpc/server").TRPCQueryProcedure<{
1032
+ input: void;
1033
+ output: string[];
1034
+ meta: object;
1035
+ }>;
1036
+ tag: import("@trpc/server").TRPCMutationProcedure<{
1037
+ input: {
1038
+ id: string;
1039
+ category: string;
1040
+ };
1041
+ output: {
1042
+ success: true;
1043
+ };
1044
+ meta: object;
1045
+ }>;
1046
+ untag: import("@trpc/server").TRPCMutationProcedure<{
1047
+ input: {
1048
+ id: string;
1049
+ category: string;
1050
+ };
1051
+ output: {
1052
+ success: true;
1053
+ };
1054
+ meta: object;
1055
+ }>;
1056
+ }>>;
1057
+ units: import("@trpc/server").TRPCBuiltRouter<{
1058
+ ctx: TrpcContext;
1059
+ meta: object;
1060
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1061
+ message: string;
1062
+ data: {
1063
+ httpCode: error.http.StatusCodeCode;
1064
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1065
+ httpStatus: number;
1066
+ path?: string;
1067
+ stack?: string;
1068
+ };
1069
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1070
+ };
1071
+ transformer: true;
1072
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1073
+ list: import("@trpc/server").TRPCQueryProcedure<{
1074
+ input: void;
1075
+ output: string[];
1076
+ meta: object;
1077
+ }>;
1078
+ }>>;
1079
+ vendors: import("@trpc/server").TRPCBuiltRouter<{
1080
+ ctx: TrpcContext;
1081
+ meta: object;
1082
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1083
+ message: string;
1084
+ data: {
1085
+ httpCode: error.http.StatusCodeCode;
1086
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1087
+ httpStatus: number;
1088
+ path?: string;
1089
+ stack?: string;
1090
+ };
1091
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1092
+ };
1093
+ transformer: true;
1094
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1095
+ list: import("@trpc/server").TRPCQueryProcedure<{
1096
+ input: {
1097
+ search?: string | null | undefined;
1098
+ };
1099
+ output: {
1100
+ id: string;
1101
+ name: string;
1102
+ description: string | null;
1103
+ createdAt: Date;
1104
+ modifiedAt: Date;
1105
+ }[];
1106
+ meta: object;
1107
+ }>;
1108
+ get: import("@trpc/server").TRPCQueryProcedure<{
1109
+ input: {
1110
+ id: string;
1111
+ };
1112
+ output: {
1113
+ id: string;
1114
+ name: string;
1115
+ description: string | null;
1116
+ createdAt: Date;
1117
+ modifiedAt: Date;
1118
+ };
1119
+ meta: object;
1120
+ }>;
1121
+ create: import("@trpc/server").TRPCMutationProcedure<{
1122
+ input: {
1123
+ name: string;
1124
+ description?: string | null | undefined;
1125
+ };
1126
+ output: {
1127
+ id: string;
1128
+ };
1129
+ meta: object;
1130
+ }>;
1131
+ update: import("@trpc/server").TRPCMutationProcedure<{
1132
+ input: {
1133
+ id: string;
1134
+ data: {
1135
+ name?: string | undefined;
1136
+ description?: string | null | undefined;
1137
+ };
1138
+ };
1139
+ output: {
1140
+ success: true;
1141
+ };
1142
+ meta: object;
1143
+ }>;
1144
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1145
+ input: {
1146
+ id: string;
1147
+ };
1148
+ output: {
1149
+ success: true;
1150
+ };
1151
+ meta: object;
1152
+ }>;
1153
+ }>>;
1154
+ priceRecords: import("@trpc/server").TRPCBuiltRouter<{
1155
+ ctx: TrpcContext;
1156
+ meta: object;
1157
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1158
+ message: string;
1159
+ data: {
1160
+ httpCode: error.http.StatusCodeCode;
1161
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1162
+ httpStatus: number;
1163
+ path?: string;
1164
+ stack?: string;
1165
+ };
1166
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1167
+ };
1168
+ transformer: true;
1169
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1170
+ list: import("@trpc/server").TRPCQueryProcedure<{
1171
+ input: {
1172
+ productId?: string | null | undefined;
1173
+ vendorId?: string | null | undefined;
1174
+ isRealPurchase?: boolean | null | undefined;
1175
+ };
1176
+ output: {
1177
+ id: string;
1178
+ productId: string;
1179
+ vendorId: string | null;
1180
+ timestamp: Date;
1181
+ price: number;
1182
+ isRealPurchase: boolean;
1183
+ comment: string | null;
1184
+ }[];
1185
+ meta: object;
1186
+ }>;
1187
+ create: import("@trpc/server").TRPCMutationProcedure<{
1188
+ input: {
1189
+ productId: string;
1190
+ price: number;
1191
+ isRealPurchase: boolean;
1192
+ vendorId?: string | null | undefined;
1193
+ comment?: string | null | undefined;
1194
+ };
1195
+ output: {
1196
+ id: string;
1197
+ };
1198
+ meta: object;
1199
+ }>;
1200
+ update: import("@trpc/server").TRPCMutationProcedure<{
1201
+ input: {
1202
+ id: string;
1203
+ data: {
1204
+ productId?: string | undefined;
1205
+ vendorId?: string | null | undefined;
1206
+ price?: number | undefined;
1207
+ isRealPurchase?: boolean | undefined;
1208
+ comment?: string | null | undefined;
1209
+ };
1210
+ };
1211
+ output: {
1212
+ success: true;
1213
+ };
1214
+ meta: object;
1215
+ }>;
1216
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1217
+ input: {
1218
+ id: string;
1219
+ };
1220
+ output: {
1221
+ success: true;
1222
+ };
1223
+ meta: object;
1224
+ }>;
1225
+ }>>;
1226
+ deliveryNotes: import("@trpc/server").TRPCBuiltRouter<{
1227
+ ctx: TrpcContext;
1228
+ meta: object;
1229
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1230
+ message: string;
1231
+ data: {
1232
+ httpCode: error.http.StatusCodeCode;
1233
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1234
+ httpStatus: number;
1235
+ path?: string;
1236
+ stack?: string;
1237
+ };
1238
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1239
+ };
1240
+ transformer: true;
1241
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1242
+ list: import("@trpc/server").TRPCQueryProcedure<{
1243
+ input: {
1244
+ projectId?: string | null | undefined;
1245
+ createdByUserId?: string | null | undefined;
1246
+ };
1247
+ output: {
1248
+ id: string;
1249
+ projectId: string;
1250
+ comment: string | null;
1251
+ createdByUserId: string | null;
1252
+ records: {
1253
+ id: string;
1254
+ noteId: string;
1255
+ productId: string;
1256
+ quantity: number;
1257
+ comment: string | null;
1258
+ }[];
1259
+ }[];
1260
+ meta: object;
1261
+ }>;
1262
+ create: import("@trpc/server").TRPCMutationProcedure<{
1263
+ input: {
1264
+ projectId: string;
1265
+ records: {
1266
+ productId: string;
1267
+ quantity: number;
1268
+ comment?: string | null | undefined;
1269
+ }[];
1270
+ comment?: string | null | undefined;
1271
+ };
1272
+ output: {
1273
+ id: string;
1274
+ };
1275
+ meta: object;
1276
+ }>;
1277
+ get: import("@trpc/server").TRPCQueryProcedure<{
1278
+ input: {
1279
+ id: string;
1280
+ };
1281
+ output: {
1282
+ id: string;
1283
+ projectId: string;
1284
+ comment: string | null;
1285
+ createdByUserId: string | null;
1286
+ records: {
1287
+ id: string;
1288
+ noteId: string;
1289
+ productId: string;
1290
+ quantity: number;
1291
+ comment: string | null;
1292
+ }[];
1293
+ };
1294
+ meta: object;
1295
+ }>;
1296
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1297
+ input: {
1298
+ id: string;
1299
+ };
1300
+ output: {
1301
+ success: true;
1302
+ };
1303
+ meta: object;
1304
+ }>;
1305
+ }>>;
1306
+ suggestNextCustomId: import("@trpc/server").TRPCQueryProcedure<{
1307
+ input: void;
1308
+ output: number;
1309
+ meta: object;
1310
+ }>;
1311
+ }>>, (() => void)[]>,
1312
+ HandlerDefinition<"users", import("@trpc/server").TRPCBuiltRouter<{
1313
+ ctx: TrpcContext;
1314
+ meta: object;
1315
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1316
+ message: string;
1317
+ data: {
1318
+ httpCode: error.http.StatusCodeCode;
1319
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1320
+ httpStatus: number;
1321
+ path?: string;
1322
+ stack?: string;
1323
+ };
1324
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1325
+ };
1326
+ transformer: true;
1327
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1328
+ list: import("@trpc/server").TRPCQueryProcedure<{
1329
+ input: {
1330
+ search?: string | null | undefined;
1331
+ deactivated?: boolean | undefined;
1332
+ };
1333
+ output: {
1334
+ id: string;
1335
+ salutation: string | null;
1336
+ firstName: string;
1337
+ lastName: string | null;
1338
+ username: string;
1339
+ email: string | null;
1340
+ phone: string | null;
1341
+ createdAt: Date;
1342
+ modifiedAt: Date;
1343
+ deactivatedAt: Date | null;
1344
+ }[];
1345
+ meta: object;
1346
+ }>;
1347
+ get: import("@trpc/server").TRPCQueryProcedure<{
1348
+ input: {
1349
+ id: string;
1350
+ };
1351
+ output: {
1352
+ id: string;
1353
+ salutation: string | null;
1354
+ firstName: string;
1355
+ lastName: string | null;
1356
+ username: string;
1357
+ email: string | null;
1358
+ phone: string | null;
1359
+ createdAt: Date;
1360
+ modifiedAt: Date;
1361
+ deactivatedAt: Date | null;
1362
+ };
1363
+ meta: object;
1364
+ }>;
1365
+ create: import("@trpc/server").TRPCMutationProcedure<{
1366
+ input: {
1367
+ username: string;
1368
+ firstName: string;
1369
+ lastName?: string | null | undefined;
1370
+ email?: string | null | undefined;
1371
+ phone?: string | null | undefined;
1372
+ contractType?: "internal" | "external" | "subcontractor" | undefined;
1373
+ };
1374
+ output: {
1375
+ id: string;
1376
+ };
1377
+ meta: object;
1378
+ }>;
1379
+ update: import("@trpc/server").TRPCMutationProcedure<{
1380
+ input: {
1381
+ id: string;
1382
+ data: {
1383
+ username?: string | undefined;
1384
+ firstName?: string | undefined;
1385
+ lastName?: string | null | undefined;
1386
+ email?: string | null | undefined;
1387
+ phone?: string | null | undefined;
1388
+ contractType?: "internal" | "external" | "subcontractor" | null | undefined;
1389
+ };
1390
+ };
1391
+ output: {
1392
+ success: true;
1393
+ };
1394
+ meta: object;
1395
+ }>;
1396
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1397
+ input: {
1398
+ id: string;
1399
+ };
1400
+ output: {
1401
+ success: true;
1402
+ };
1403
+ meta: object;
1404
+ }>;
1405
+ activate: import("@trpc/server").TRPCMutationProcedure<{
1406
+ input: {
1407
+ id: string;
1408
+ };
1409
+ output: {
1410
+ success: true;
1411
+ };
1412
+ meta: object;
1413
+ }>;
1414
+ deactivate: import("@trpc/server").TRPCMutationProcedure<{
1415
+ input: {
1416
+ id: string;
1417
+ };
1418
+ output: {
1419
+ success: true;
1420
+ };
1421
+ meta: object;
1422
+ }>;
1423
+ roles: import("@trpc/server").TRPCQueryProcedure<{
1424
+ input: void;
1425
+ output: (":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers")[];
1426
+ meta: object;
1427
+ }>;
1428
+ setRoles: import("@trpc/server").TRPCMutationProcedure<{
1429
+ input: {
1430
+ userId: string;
1431
+ assignments: Record<":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers", boolean | null | undefined>;
1432
+ };
1433
+ output: {
1434
+ success: true;
1435
+ };
1436
+ meta: object;
1437
+ }>;
1438
+ }>>, (() => void)[]>,
1439
+ HandlerDefinition<"tools", import("@trpc/server").TRPCBuiltRouter<{
1440
+ ctx: TrpcContext;
1441
+ meta: object;
1442
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1443
+ message: string;
1444
+ data: {
1445
+ httpCode: error.http.StatusCodeCode;
1446
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1447
+ httpStatus: number;
1448
+ path?: string;
1449
+ stack?: string;
1450
+ };
1451
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1452
+ };
1453
+ transformer: true;
1454
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1455
+ list: import("@trpc/server").TRPCQueryProcedure<{
1456
+ input: {
1457
+ search?: string | null | undefined;
1458
+ status?: "lost" | "broken" | "available" | "unavailable" | null | undefined;
1459
+ brand?: string | null | undefined;
1460
+ category?: string | null | undefined;
1461
+ };
1462
+ output: {
1463
+ id: string;
1464
+ customId: number;
1465
+ brand: string;
1466
+ category: string;
1467
+ label: string | null;
1468
+ status: "lost" | "broken" | null;
1469
+ available: boolean;
1470
+ createdAt: Date;
1471
+ modifiedAt: Date;
1472
+ archivedSince: Date | null;
1473
+ }[];
1474
+ meta: object;
1475
+ }>;
1476
+ get: import("@trpc/server").TRPCQueryProcedure<{
1477
+ input: {
1478
+ id: string;
1479
+ };
1480
+ output: {
1481
+ id: string;
1482
+ customId: number;
1483
+ brand: string;
1484
+ category: string;
1485
+ label: string | null;
1486
+ status: "lost" | "broken" | null;
1487
+ available: boolean;
1488
+ createdAt: Date;
1489
+ modifiedAt: Date;
1490
+ archivedSince: Date | null;
1491
+ };
1492
+ meta: object;
1493
+ }>;
1494
+ create: import("@trpc/server").TRPCMutationProcedure<{
1495
+ input: {
1496
+ customId: number;
1497
+ brand: string;
1498
+ category: string;
1499
+ label: string | null;
1500
+ status: "lost" | "broken" | null;
1501
+ };
1502
+ output: {
1503
+ id: string;
1504
+ };
1505
+ meta: object;
1506
+ }>;
1507
+ update: import("@trpc/server").TRPCMutationProcedure<{
1508
+ input: {
1509
+ id: string;
1510
+ data: {
1511
+ brand?: string | null | undefined;
1512
+ category?: string | null | undefined;
1513
+ label?: string | null | undefined;
1514
+ };
1515
+ };
1516
+ output: {
1517
+ success: true;
1518
+ };
1519
+ meta: object;
1520
+ }>;
1521
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1522
+ input: {
1523
+ id: string;
1524
+ };
1525
+ output: {
1526
+ success: true;
1527
+ };
1528
+ meta: object;
1529
+ }>;
1530
+ track: import("@trpc/server").TRPCMutationProcedure<{
1531
+ input: {
1532
+ id: string;
1533
+ data: {
1534
+ projectId?: string | null | undefined;
1535
+ responsibleUserId?: string | null | undefined;
1536
+ deadlineAt?: unknown;
1537
+ comment?: string | null | undefined;
1538
+ };
1539
+ };
1540
+ output: {
1541
+ trackingId: string;
1542
+ };
1543
+ meta: object;
1544
+ }>;
1545
+ untrack: import("@trpc/server").TRPCMutationProcedure<{
1546
+ input: {
1547
+ id: string;
1548
+ };
1549
+ output: {
1550
+ success: true;
1551
+ };
1552
+ meta: object;
1553
+ }>;
1554
+ trackings: import("@trpc/server").TRPCBuiltRouter<{
1555
+ ctx: TrpcContext;
1556
+ meta: object;
1557
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1558
+ message: string;
1559
+ data: {
1560
+ httpCode: error.http.StatusCodeCode;
1561
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1562
+ httpStatus: number;
1563
+ path?: string;
1564
+ stack?: string;
1565
+ };
1566
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1567
+ };
1568
+ transformer: true;
1569
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1570
+ list: import("@trpc/server").TRPCQueryProcedure<{
1571
+ input: {
1572
+ finished?: boolean | null | undefined;
1573
+ toolId?: string | null | undefined;
1574
+ projectId?: string | null | undefined;
1575
+ responsibleUserId?: string | null | undefined;
1576
+ startedByUserId?: string | null | undefined;
1577
+ endedByUserId?: string | null | undefined;
1578
+ startedBefore?: unknown;
1579
+ startedAfter?: unknown;
1580
+ endedBefore?: unknown;
1581
+ endedAfter?: unknown;
1582
+ limit?: number | undefined;
1583
+ offset?: number | undefined;
1584
+ };
1585
+ output: {
1586
+ id: string;
1587
+ toolId: string;
1588
+ projectId: string | null;
1589
+ responsibleUserId: string | null;
1590
+ startedByUserId: string | null;
1591
+ endedByUserId: string | null;
1592
+ startedAt: Date;
1593
+ endedAt: Date | null;
1594
+ }[];
1595
+ meta: object;
1596
+ }>;
1597
+ }>>;
1598
+ inventories: import("@trpc/server").TRPCBuiltRouter<{
1599
+ ctx: TrpcContext;
1600
+ meta: object;
1601
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1602
+ message: string;
1603
+ data: {
1604
+ httpCode: error.http.StatusCodeCode;
1605
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1606
+ httpStatus: number;
1607
+ path?: string;
1608
+ stack?: string;
1609
+ };
1610
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1611
+ };
1612
+ transformer: true;
1613
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1614
+ list: import("@trpc/server").TRPCQueryProcedure<{
1615
+ input: {
1616
+ toolId?: string | null | undefined;
1617
+ };
1618
+ output: {
1619
+ id: string;
1620
+ toolId: string;
1621
+ comment: string | null;
1622
+ createdAt: Date;
1623
+ }[];
1624
+ meta: object;
1625
+ }>;
1626
+ create: import("@trpc/server").TRPCMutationProcedure<{
1627
+ input: {
1628
+ toolId: string;
1629
+ comment?: string | null | undefined;
1630
+ };
1631
+ output: {
1632
+ id: string;
1633
+ };
1634
+ meta: object;
1635
+ }>;
1636
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1637
+ input: {
1638
+ id: string;
1639
+ };
1640
+ output: {
1641
+ success: true;
1642
+ };
1643
+ meta: object;
1644
+ }>;
1645
+ }>>;
1646
+ categories: import("@trpc/server").TRPCQueryProcedure<{
1647
+ input: void;
1648
+ output: string[];
1649
+ meta: object;
1650
+ }>;
1651
+ brands: import("@trpc/server").TRPCQueryProcedure<{
1652
+ input: void;
1653
+ output: string[];
1654
+ meta: object;
1655
+ }>;
1656
+ suggestNextCustomId: import("@trpc/server").TRPCQueryProcedure<{
1657
+ input: void;
1658
+ output: number;
1659
+ meta: object;
1660
+ }>;
1661
+ }>>, (() => void)[]>
1662
+ ];
1663
+ export type HandlerMap = {
1664
+ [Handler in (typeof HANDLERS)[number] as Handler["path"]]: Handler["router"];
1665
+ };
1666
+ declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1667
+ ctx: TrpcContext;
1668
+ meta: object;
1669
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1670
+ message: string;
1671
+ data: {
1672
+ httpCode: error.http.StatusCodeCode;
1673
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1674
+ httpStatus: number;
1675
+ path?: string;
1676
+ stack?: string;
1677
+ };
1678
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1679
+ };
1680
+ transformer: true;
1681
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<HandlerMap>>;
1682
+ export type AppRouter = typeof appRouter;
1683
+ export declare function createClient(endpoint: string): import("@trpc/client").TRPCClient<import("@trpc/server").TRPCBuiltRouter<{
1684
+ ctx: TrpcContext;
1685
+ meta: object;
1686
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1687
+ message: string;
1688
+ data: {
1689
+ httpCode: error.http.StatusCodeCode;
1690
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1691
+ httpStatus: number;
1692
+ path?: string;
1693
+ stack?: string;
1694
+ };
1695
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1696
+ };
1697
+ transformer: true;
1698
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1699
+ auth: import("@trpc/server").TRPCBuiltRouter<{
1700
+ ctx: TrpcContext;
1701
+ meta: object;
1702
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1703
+ message: string;
1704
+ data: {
1705
+ httpCode: error.http.StatusCodeCode;
1706
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1707
+ httpStatus: number;
1708
+ path?: string;
1709
+ stack?: string;
1710
+ };
1711
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1712
+ };
1713
+ transformer: true;
1714
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1715
+ login: import("@trpc/server").TRPCMutationProcedure<{
1716
+ input: {
1717
+ tenant: string;
1718
+ username: string;
1719
+ password: string;
1720
+ };
1721
+ output: {
1722
+ token: string;
1723
+ };
1724
+ meta: object;
1725
+ }>;
1726
+ logout: import("@trpc/server").TRPCMutationProcedure<{
1727
+ input: void;
1728
+ output: {
1729
+ success: true;
1730
+ };
1731
+ meta: object;
1732
+ }>;
1733
+ check: import("@trpc/server").TRPCQueryProcedure<{
1734
+ input: void;
1735
+ output: {
1736
+ success: true;
1737
+ };
1738
+ meta: object;
1739
+ }>;
1740
+ sessionInfo: import("@trpc/server").TRPCQueryProcedure<{
1741
+ input: void;
1742
+ output: {
1743
+ user: {
1744
+ id: string;
1745
+ username: string;
1746
+ salutation: string | null;
1747
+ firstName: string;
1748
+ lastName: string | null;
1749
+ contractType: "internal" | "external" | "subcontractor";
1750
+ phone: string | null;
1751
+ email: string | null;
1752
+ };
1753
+ session: {
1754
+ id: string;
1755
+ inetAddr: string | null;
1756
+ userAgent: string | null;
1757
+ createdAt: Date;
1758
+ expiresAt: Date;
1759
+ };
1760
+ roles: (":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers")[];
1761
+ };
1762
+ meta: object;
1763
+ }>;
1764
+ setPassword: import("@trpc/server").TRPCMutationProcedure<{
1765
+ input: {
1766
+ username: string;
1767
+ password: string;
1768
+ };
1769
+ output: {
1770
+ success: true;
1771
+ };
1772
+ meta: object;
1773
+ }>;
1774
+ }>>;
1775
+ admin: import("@trpc/server").TRPCBuiltRouter<{
1776
+ ctx: TrpcContext;
1777
+ meta: object;
1778
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1779
+ message: string;
1780
+ data: {
1781
+ httpCode: error.http.StatusCodeCode;
1782
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1783
+ httpStatus: number;
1784
+ path?: string;
1785
+ stack?: string;
1786
+ };
1787
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1788
+ };
1789
+ transformer: true;
1790
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1791
+ login: import("@trpc/server").TRPCMutationProcedure<{
1792
+ input: {
1793
+ password: string;
1794
+ tenant?: string | null | undefined;
1795
+ };
1796
+ output: {
1797
+ token: string;
1798
+ };
1799
+ meta: object;
1800
+ }>;
1801
+ tenants: import("@trpc/server").TRPCBuiltRouter<{
1802
+ ctx: TrpcContext;
1803
+ meta: object;
1804
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
1805
+ message: string;
1806
+ data: {
1807
+ httpCode: error.http.StatusCodeCode;
1808
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1809
+ httpStatus: number;
1810
+ path?: string;
1811
+ stack?: string;
1812
+ };
1813
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1814
+ };
1815
+ transformer: true;
1816
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1817
+ list: import("@trpc/server").TRPCQueryProcedure<{
1818
+ input: void;
1819
+ output: {
1820
+ name: string;
1821
+ locked_at: Date | null;
1822
+ deleted_at: Date | null;
1823
+ deactivated_at: Date | null;
1824
+ connection_details: {
1825
+ postgresDSN?: string | null | undefined;
1826
+ };
1827
+ contact_details: {
1828
+ email: string;
1829
+ companyName?: string | null | undefined;
1830
+ address?: {
1831
+ city?: string | null | undefined;
1832
+ zip?: string | null | undefined;
1833
+ country?: string | null | undefined;
1834
+ streetAddress?: string | null | undefined;
1835
+ } | null | undefined;
1836
+ };
1837
+ options: {
1838
+ sso: {
1839
+ "ms-entra-id": {
1840
+ enabled: boolean;
1841
+ importUserUsername: boolean;
1842
+ importUserName: boolean;
1843
+ importUserEmail: boolean;
1844
+ tenantId?: string | null | undefined;
1845
+ clientId?: string | null | undefined;
1846
+ objectId?: string | null | undefined;
1847
+ };
1848
+ };
1849
+ };
1850
+ }[];
1851
+ meta: object;
1852
+ }>;
1853
+ create: import("@trpc/server").TRPCMutationProcedure<{
1854
+ input: {
1855
+ name: string;
1856
+ contact_details: {
1857
+ email: string;
1858
+ companyName?: string | null | undefined;
1859
+ address?: {
1860
+ city?: string | null | undefined;
1861
+ zip?: string | null | undefined;
1862
+ country?: string | null | undefined;
1863
+ streetAddress?: string | null | undefined;
1864
+ } | null | undefined;
1865
+ };
1866
+ options?: {
1867
+ sso: {
1868
+ "ms-entra-id": {
1869
+ enabled: boolean;
1870
+ importUserUsername: boolean;
1871
+ importUserName: boolean;
1872
+ importUserEmail: boolean;
1873
+ tenantId?: string | null | undefined;
1874
+ clientId?: string | null | undefined;
1875
+ objectId?: string | null | undefined;
1876
+ };
1877
+ };
1878
+ } | undefined;
1879
+ connection_details?: {
1880
+ postgresDSN?: string | null | undefined;
1881
+ } | undefined;
1882
+ };
1883
+ output: {
1884
+ adminPassword: string;
1885
+ };
1886
+ meta: object;
1887
+ }>;
1888
+ get: import("@trpc/server").TRPCQueryProcedure<{
1889
+ input: {
1890
+ name: string;
1891
+ };
1892
+ output: {
1893
+ name: string;
1894
+ locked_at: Date | null;
1895
+ deleted_at: Date | null;
1896
+ deactivated_at: Date | null;
1897
+ connection_details: {
1898
+ postgresDSN?: string | null | undefined;
1899
+ };
1900
+ contact_details: {
1901
+ email: string;
1902
+ companyName?: string | null | undefined;
1903
+ address?: {
1904
+ city?: string | null | undefined;
1905
+ zip?: string | null | undefined;
1906
+ country?: string | null | undefined;
1907
+ streetAddress?: string | null | undefined;
1908
+ } | null | undefined;
1909
+ };
1910
+ options: {
1911
+ sso: {
1912
+ "ms-entra-id": {
1913
+ enabled: boolean;
1914
+ importUserUsername: boolean;
1915
+ importUserName: boolean;
1916
+ importUserEmail: boolean;
1917
+ tenantId?: string | null | undefined;
1918
+ clientId?: string | null | undefined;
1919
+ objectId?: string | null | undefined;
1920
+ };
1921
+ };
1922
+ };
1923
+ };
1924
+ meta: object;
1925
+ }>;
1926
+ update: import("@trpc/server").TRPCMutationProcedure<{
1927
+ input: {
1928
+ name: string;
1929
+ data: {
1930
+ contact_details?: {
1931
+ email: string;
1932
+ companyName?: string | null | undefined;
1933
+ address?: {
1934
+ city?: string | null | undefined;
1935
+ zip?: string | null | undefined;
1936
+ country?: string | null | undefined;
1937
+ streetAddress?: string | null | undefined;
1938
+ } | null | undefined;
1939
+ } | undefined;
1940
+ connection_details?: {
1941
+ postgresDSN?: string | null | undefined;
1942
+ } | undefined;
1943
+ options?: {
1944
+ sso: {
1945
+ "ms-entra-id": {
1946
+ enabled: boolean;
1947
+ importUserUsername: boolean;
1948
+ importUserName: boolean;
1949
+ importUserEmail: boolean;
1950
+ tenantId?: string | null | undefined;
1951
+ clientId?: string | null | undefined;
1952
+ objectId?: string | null | undefined;
1953
+ };
1954
+ };
1955
+ } | undefined;
1956
+ };
1957
+ };
1958
+ output: {
1959
+ success: true;
1960
+ };
1961
+ meta: object;
1962
+ }>;
1963
+ activate: import("@trpc/server").TRPCMutationProcedure<{
1964
+ input: {
1965
+ name: string;
1966
+ };
1967
+ output: {
1968
+ success: true;
1969
+ };
1970
+ meta: object;
1971
+ }>;
1972
+ deactivate: import("@trpc/server").TRPCMutationProcedure<{
1973
+ input: {
1974
+ name: string;
1975
+ };
1976
+ output: {
1977
+ success: true;
1978
+ };
1979
+ meta: object;
1980
+ }>;
1981
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1982
+ input: {
1983
+ name: string;
1984
+ };
1985
+ output: {
1986
+ success: true;
1987
+ };
1988
+ meta: object;
1989
+ }>;
1990
+ deleteForever: import("@trpc/server").TRPCMutationProcedure<{
1991
+ input: {
1992
+ name: string;
1993
+ };
1994
+ output: {
1995
+ success: true;
1996
+ };
1997
+ meta: object;
1998
+ }>;
1999
+ lock: import("@trpc/server").TRPCMutationProcedure<{
2000
+ input: {
2001
+ name: string;
2002
+ };
2003
+ output: {
2004
+ success: true;
2005
+ };
2006
+ meta: object;
2007
+ }>;
2008
+ unlock: import("@trpc/server").TRPCMutationProcedure<{
2009
+ input: {
2010
+ name: string;
2011
+ };
2012
+ output: {
2013
+ success: true;
2014
+ };
2015
+ meta: object;
2016
+ }>;
2017
+ undelete: import("@trpc/server").TRPCMutationProcedure<{
2018
+ input: {
2019
+ name: string;
2020
+ };
2021
+ output: {
2022
+ success: true;
2023
+ };
2024
+ meta: object;
2025
+ }>;
2026
+ }>>;
2027
+ }>>;
2028
+ customers: import("@trpc/server").TRPCBuiltRouter<{
2029
+ ctx: TrpcContext;
2030
+ meta: object;
2031
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2032
+ message: string;
2033
+ data: {
2034
+ httpCode: error.http.StatusCodeCode;
2035
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2036
+ httpStatus: number;
2037
+ path?: string;
2038
+ stack?: string;
2039
+ };
2040
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2041
+ };
2042
+ transformer: true;
2043
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2044
+ list: import("@trpc/server").TRPCQueryProcedure<{
2045
+ input: {
2046
+ search?: string | null | undefined;
2047
+ };
2048
+ output: {
2049
+ id: string;
2050
+ salutation: string | null;
2051
+ name: string;
2052
+ address: {
2053
+ city: string;
2054
+ streetAddress: string;
2055
+ country?: string | null | undefined;
2056
+ zip?: string | null | undefined;
2057
+ } | null;
2058
+ createdAt: Date;
2059
+ modifiedAt: Date;
2060
+ }[];
2061
+ meta: object;
2062
+ }>;
2063
+ get: import("@trpc/server").TRPCQueryProcedure<{
2064
+ input: {
2065
+ id: string;
2066
+ };
2067
+ output: {
2068
+ id: string;
2069
+ salutation: string | null;
2070
+ name: string;
2071
+ address: {
2072
+ city: string;
2073
+ streetAddress: string;
2074
+ country?: string | null | undefined;
2075
+ zip?: string | null | undefined;
2076
+ } | null;
2077
+ createdAt: Date;
2078
+ modifiedAt: Date;
2079
+ };
2080
+ meta: object;
2081
+ }>;
2082
+ create: import("@trpc/server").TRPCMutationProcedure<{
2083
+ input: {
2084
+ name: string;
2085
+ salutation?: string | null | undefined;
2086
+ address?: {
2087
+ city: string;
2088
+ streetAddress: string;
2089
+ country?: string | null | undefined;
2090
+ zip?: string | null | undefined;
2091
+ } | null | undefined;
2092
+ };
2093
+ output: {
2094
+ id: string;
2095
+ };
2096
+ meta: object;
2097
+ }>;
2098
+ update: import("@trpc/server").TRPCMutationProcedure<{
2099
+ input: {
2100
+ id: string;
2101
+ data: {
2102
+ salutation?: string | null | undefined;
2103
+ name?: string | undefined;
2104
+ address?: {
2105
+ city: string;
2106
+ streetAddress: string;
2107
+ country?: string | null | undefined;
2108
+ zip?: string | null | undefined;
2109
+ } | null | undefined;
2110
+ };
2111
+ };
2112
+ output: {
2113
+ success: true;
2114
+ };
2115
+ meta: object;
2116
+ }>;
2117
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2118
+ input: {
2119
+ id: string;
2120
+ };
2121
+ output: {
2122
+ success: true;
2123
+ };
2124
+ meta: object;
2125
+ }>;
2126
+ }>>;
2127
+ projects: import("@trpc/server").TRPCBuiltRouter<{
2128
+ ctx: TrpcContext;
2129
+ meta: object;
2130
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2131
+ message: string;
2132
+ data: {
2133
+ httpCode: error.http.StatusCodeCode;
2134
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2135
+ httpStatus: number;
2136
+ path?: string;
2137
+ stack?: string;
2138
+ };
2139
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2140
+ };
2141
+ transformer: true;
2142
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2143
+ list: import("@trpc/server").TRPCQueryProcedure<{
2144
+ input: {
2145
+ search?: string | null | undefined;
2146
+ finished?: boolean | null | undefined;
2147
+ };
2148
+ output: {
2149
+ id: string;
2150
+ title: string;
2151
+ address: {
2152
+ city: string;
2153
+ streetAddress: string;
2154
+ country?: string | null | undefined;
2155
+ zip?: string | null | undefined;
2156
+ } | null;
2157
+ customerId: string | null;
2158
+ createdAt: Date;
2159
+ modifiedAt: Date;
2160
+ finishedAt: Date | null;
2161
+ }[];
2162
+ meta: object;
2163
+ }>;
2164
+ get: import("@trpc/server").TRPCQueryProcedure<{
2165
+ input: {
2166
+ id: string;
2167
+ };
2168
+ output: {
2169
+ id: string;
2170
+ title: string;
2171
+ address: {
2172
+ city: string;
2173
+ streetAddress: string;
2174
+ country?: string | null | undefined;
2175
+ zip?: string | null | undefined;
2176
+ } | null;
2177
+ customerId: string | null;
2178
+ createdAt: Date;
2179
+ modifiedAt: Date;
2180
+ finishedAt: Date | null;
2181
+ };
2182
+ meta: object;
2183
+ }>;
2184
+ create: import("@trpc/server").TRPCMutationProcedure<{
2185
+ input: {
2186
+ title: string;
2187
+ address?: {
2188
+ city: string;
2189
+ streetAddress: string;
2190
+ country?: string | null | undefined;
2191
+ zip?: string | null | undefined;
2192
+ } | null | undefined;
2193
+ customerId?: string | null | undefined;
2194
+ };
2195
+ output: {
2196
+ id: string;
2197
+ };
2198
+ meta: object;
2199
+ }>;
2200
+ update: import("@trpc/server").TRPCMutationProcedure<{
2201
+ input: {
2202
+ id: string;
2203
+ data: {
2204
+ title?: string | undefined;
2205
+ address?: {
2206
+ city: string;
2207
+ streetAddress: string;
2208
+ country?: string | null | undefined;
2209
+ zip?: string | null | undefined;
2210
+ } | null | undefined;
2211
+ customerId?: string | null | undefined;
2212
+ };
2213
+ };
2214
+ output: {
2215
+ success: true;
2216
+ };
2217
+ meta: object;
2218
+ }>;
2219
+ finish: import("@trpc/server").TRPCMutationProcedure<{
2220
+ input: {
2221
+ id: string;
2222
+ };
2223
+ output: {
2224
+ success: true;
2225
+ };
2226
+ meta: object;
2227
+ }>;
2228
+ resume: import("@trpc/server").TRPCMutationProcedure<{
2229
+ input: {
2230
+ id: string;
2231
+ };
2232
+ output: {
2233
+ success: true;
2234
+ };
2235
+ meta: object;
2236
+ }>;
2237
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2238
+ input: {
2239
+ id: string;
2240
+ };
2241
+ output: {
2242
+ success: true;
2243
+ };
2244
+ meta: object;
2245
+ }>;
2246
+ deployments: import("@trpc/server").TRPCBuiltRouter<{
2247
+ ctx: TrpcContext;
2248
+ meta: object;
2249
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2250
+ message: string;
2251
+ data: {
2252
+ httpCode: error.http.StatusCodeCode;
2253
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2254
+ httpStatus: number;
2255
+ path?: string;
2256
+ stack?: string;
2257
+ };
2258
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2259
+ };
2260
+ transformer: true;
2261
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2262
+ list: import("@trpc/server").TRPCQueryProcedure<{
2263
+ input: {
2264
+ projectId?: string | null | undefined;
2265
+ userId?: string | null | undefined;
2266
+ active?: boolean | null | undefined;
2267
+ fromAfter?: unknown;
2268
+ fromBefore?: unknown;
2269
+ toAfter?: unknown;
2270
+ toBefore?: unknown;
2271
+ limit?: number | undefined;
2272
+ offset?: number | undefined;
2273
+ };
2274
+ output: {
2275
+ id: string;
2276
+ projectId: string;
2277
+ userId: string;
2278
+ from: Date;
2279
+ to: Date;
2280
+ note: string | null;
2281
+ createdAt: Date;
2282
+ }[];
2283
+ meta: object;
2284
+ }>;
2285
+ create: import("@trpc/server").TRPCMutationProcedure<{
2286
+ input: {
2287
+ projectId: string;
2288
+ userId: string;
2289
+ from: unknown;
2290
+ to: unknown;
2291
+ note?: string | null | undefined;
2292
+ };
2293
+ output: {
2294
+ id: string;
2295
+ };
2296
+ meta: object;
2297
+ }>;
2298
+ update: import("@trpc/server").TRPCMutationProcedure<{
2299
+ input: {
2300
+ id: string;
2301
+ data: {
2302
+ projectId?: string | null | undefined;
2303
+ userId?: string | null | undefined;
2304
+ from?: unknown;
2305
+ to?: unknown;
2306
+ note?: string | null | undefined;
2307
+ };
2308
+ };
2309
+ output: {
2310
+ success: true;
2311
+ };
2312
+ meta: object;
2313
+ }>;
2314
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2315
+ input: {
2316
+ id: string;
2317
+ };
2318
+ output: {
2319
+ success: true;
2320
+ };
2321
+ meta: object;
2322
+ }>;
2323
+ }>>;
2324
+ }>>;
2325
+ products: import("@trpc/server").TRPCBuiltRouter<{
2326
+ ctx: TrpcContext;
2327
+ meta: object;
2328
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2329
+ message: string;
2330
+ data: {
2331
+ httpCode: error.http.StatusCodeCode;
2332
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2333
+ httpStatus: number;
2334
+ path?: string;
2335
+ stack?: string;
2336
+ };
2337
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2338
+ };
2339
+ transformer: true;
2340
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2341
+ list: import("@trpc/server").TRPCQueryProcedure<{
2342
+ input: {
2343
+ category?: string | null | undefined;
2344
+ search?: string | null | undefined;
2345
+ };
2346
+ output: {
2347
+ id: string;
2348
+ customId: number;
2349
+ name: string;
2350
+ description: string | null;
2351
+ brand: string | null;
2352
+ baseUnit: string;
2353
+ otherUnits: Record<string, number>;
2354
+ categories: string[];
2355
+ }[];
2356
+ meta: object;
2357
+ }>;
2358
+ get: import("@trpc/server").TRPCQueryProcedure<{
2359
+ input: {
2360
+ id: string;
2361
+ };
2362
+ output: {
2363
+ id: string;
2364
+ customId: number;
2365
+ name: string;
2366
+ description: string | null;
2367
+ brand: string | null;
2368
+ baseUnit: string;
2369
+ otherUnits: Record<string, number>;
2370
+ categories: string[];
2371
+ };
2372
+ meta: object;
2373
+ }>;
2374
+ create: import("@trpc/server").TRPCMutationProcedure<{
2375
+ input: {
2376
+ customId: number;
2377
+ name: string;
2378
+ baseUnit: string;
2379
+ brand?: string | null | undefined;
2380
+ description?: string | null | undefined;
2381
+ otherUnits?: Record<string, number> | undefined;
2382
+ };
2383
+ output: {
2384
+ id: string;
2385
+ };
2386
+ meta: object;
2387
+ }>;
2388
+ update: import("@trpc/server").TRPCMutationProcedure<{
2389
+ input: {
2390
+ id: string;
2391
+ data: {
2392
+ customId?: number | undefined;
2393
+ name?: string | undefined;
2394
+ brand?: string | null | undefined;
2395
+ description?: string | null | undefined;
2396
+ baseUnit?: string | undefined;
2397
+ otherUnits?: Record<string, number> | undefined;
2398
+ };
2399
+ };
2400
+ output: {
2401
+ success: true;
2402
+ };
2403
+ meta: object;
2404
+ }>;
2405
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2406
+ input: {
2407
+ id: string;
2408
+ };
2409
+ output: {
2410
+ success: true;
2411
+ };
2412
+ meta: object;
2413
+ }>;
2414
+ categories: import("@trpc/server").TRPCBuiltRouter<{
2415
+ ctx: TrpcContext;
2416
+ meta: object;
2417
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2418
+ message: string;
2419
+ data: {
2420
+ httpCode: error.http.StatusCodeCode;
2421
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2422
+ httpStatus: number;
2423
+ path?: string;
2424
+ stack?: string;
2425
+ };
2426
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2427
+ };
2428
+ transformer: true;
2429
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2430
+ list: import("@trpc/server").TRPCQueryProcedure<{
2431
+ input: void;
2432
+ output: string[];
2433
+ meta: object;
2434
+ }>;
2435
+ tag: import("@trpc/server").TRPCMutationProcedure<{
2436
+ input: {
2437
+ id: string;
2438
+ category: string;
2439
+ };
2440
+ output: {
2441
+ success: true;
2442
+ };
2443
+ meta: object;
2444
+ }>;
2445
+ untag: import("@trpc/server").TRPCMutationProcedure<{
2446
+ input: {
2447
+ id: string;
2448
+ category: string;
2449
+ };
2450
+ output: {
2451
+ success: true;
2452
+ };
2453
+ meta: object;
2454
+ }>;
2455
+ }>>;
2456
+ units: import("@trpc/server").TRPCBuiltRouter<{
2457
+ ctx: TrpcContext;
2458
+ meta: object;
2459
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2460
+ message: string;
2461
+ data: {
2462
+ httpCode: error.http.StatusCodeCode;
2463
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2464
+ httpStatus: number;
2465
+ path?: string;
2466
+ stack?: string;
2467
+ };
2468
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2469
+ };
2470
+ transformer: true;
2471
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2472
+ list: import("@trpc/server").TRPCQueryProcedure<{
2473
+ input: void;
2474
+ output: string[];
2475
+ meta: object;
2476
+ }>;
2477
+ }>>;
2478
+ vendors: import("@trpc/server").TRPCBuiltRouter<{
2479
+ ctx: TrpcContext;
2480
+ meta: object;
2481
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2482
+ message: string;
2483
+ data: {
2484
+ httpCode: error.http.StatusCodeCode;
2485
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2486
+ httpStatus: number;
2487
+ path?: string;
2488
+ stack?: string;
2489
+ };
2490
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2491
+ };
2492
+ transformer: true;
2493
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2494
+ list: import("@trpc/server").TRPCQueryProcedure<{
2495
+ input: {
2496
+ search?: string | null | undefined;
2497
+ };
2498
+ output: {
2499
+ id: string;
2500
+ name: string;
2501
+ description: string | null;
2502
+ createdAt: Date;
2503
+ modifiedAt: Date;
2504
+ }[];
2505
+ meta: object;
2506
+ }>;
2507
+ get: import("@trpc/server").TRPCQueryProcedure<{
2508
+ input: {
2509
+ id: string;
2510
+ };
2511
+ output: {
2512
+ id: string;
2513
+ name: string;
2514
+ description: string | null;
2515
+ createdAt: Date;
2516
+ modifiedAt: Date;
2517
+ };
2518
+ meta: object;
2519
+ }>;
2520
+ create: import("@trpc/server").TRPCMutationProcedure<{
2521
+ input: {
2522
+ name: string;
2523
+ description?: string | null | undefined;
2524
+ };
2525
+ output: {
2526
+ id: string;
2527
+ };
2528
+ meta: object;
2529
+ }>;
2530
+ update: import("@trpc/server").TRPCMutationProcedure<{
2531
+ input: {
2532
+ id: string;
2533
+ data: {
2534
+ name?: string | undefined;
2535
+ description?: string | null | undefined;
2536
+ };
2537
+ };
2538
+ output: {
2539
+ success: true;
2540
+ };
2541
+ meta: object;
2542
+ }>;
2543
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2544
+ input: {
2545
+ id: string;
2546
+ };
2547
+ output: {
2548
+ success: true;
2549
+ };
2550
+ meta: object;
2551
+ }>;
2552
+ }>>;
2553
+ priceRecords: import("@trpc/server").TRPCBuiltRouter<{
2554
+ ctx: TrpcContext;
2555
+ meta: object;
2556
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2557
+ message: string;
2558
+ data: {
2559
+ httpCode: error.http.StatusCodeCode;
2560
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2561
+ httpStatus: number;
2562
+ path?: string;
2563
+ stack?: string;
2564
+ };
2565
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2566
+ };
2567
+ transformer: true;
2568
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2569
+ list: import("@trpc/server").TRPCQueryProcedure<{
2570
+ input: {
2571
+ productId?: string | null | undefined;
2572
+ vendorId?: string | null | undefined;
2573
+ isRealPurchase?: boolean | null | undefined;
2574
+ };
2575
+ output: {
2576
+ id: string;
2577
+ productId: string;
2578
+ vendorId: string | null;
2579
+ timestamp: Date;
2580
+ price: number;
2581
+ isRealPurchase: boolean;
2582
+ comment: string | null;
2583
+ }[];
2584
+ meta: object;
2585
+ }>;
2586
+ create: import("@trpc/server").TRPCMutationProcedure<{
2587
+ input: {
2588
+ productId: string;
2589
+ price: number;
2590
+ isRealPurchase: boolean;
2591
+ vendorId?: string | null | undefined;
2592
+ comment?: string | null | undefined;
2593
+ };
2594
+ output: {
2595
+ id: string;
2596
+ };
2597
+ meta: object;
2598
+ }>;
2599
+ update: import("@trpc/server").TRPCMutationProcedure<{
2600
+ input: {
2601
+ id: string;
2602
+ data: {
2603
+ productId?: string | undefined;
2604
+ vendorId?: string | null | undefined;
2605
+ price?: number | undefined;
2606
+ isRealPurchase?: boolean | undefined;
2607
+ comment?: string | null | undefined;
2608
+ };
2609
+ };
2610
+ output: {
2611
+ success: true;
2612
+ };
2613
+ meta: object;
2614
+ }>;
2615
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2616
+ input: {
2617
+ id: string;
2618
+ };
2619
+ output: {
2620
+ success: true;
2621
+ };
2622
+ meta: object;
2623
+ }>;
2624
+ }>>;
2625
+ deliveryNotes: import("@trpc/server").TRPCBuiltRouter<{
2626
+ ctx: TrpcContext;
2627
+ meta: object;
2628
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2629
+ message: string;
2630
+ data: {
2631
+ httpCode: error.http.StatusCodeCode;
2632
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2633
+ httpStatus: number;
2634
+ path?: string;
2635
+ stack?: string;
2636
+ };
2637
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2638
+ };
2639
+ transformer: true;
2640
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2641
+ list: import("@trpc/server").TRPCQueryProcedure<{
2642
+ input: {
2643
+ projectId?: string | null | undefined;
2644
+ createdByUserId?: string | null | undefined;
2645
+ };
2646
+ output: {
2647
+ id: string;
2648
+ projectId: string;
2649
+ comment: string | null;
2650
+ createdByUserId: string | null;
2651
+ records: {
2652
+ id: string;
2653
+ noteId: string;
2654
+ productId: string;
2655
+ quantity: number;
2656
+ comment: string | null;
2657
+ }[];
2658
+ }[];
2659
+ meta: object;
2660
+ }>;
2661
+ create: import("@trpc/server").TRPCMutationProcedure<{
2662
+ input: {
2663
+ projectId: string;
2664
+ records: {
2665
+ productId: string;
2666
+ quantity: number;
2667
+ comment?: string | null | undefined;
2668
+ }[];
2669
+ comment?: string | null | undefined;
2670
+ };
2671
+ output: {
2672
+ id: string;
2673
+ };
2674
+ meta: object;
2675
+ }>;
2676
+ get: import("@trpc/server").TRPCQueryProcedure<{
2677
+ input: {
2678
+ id: string;
2679
+ };
2680
+ output: {
2681
+ id: string;
2682
+ projectId: string;
2683
+ comment: string | null;
2684
+ createdByUserId: string | null;
2685
+ records: {
2686
+ id: string;
2687
+ noteId: string;
2688
+ productId: string;
2689
+ quantity: number;
2690
+ comment: string | null;
2691
+ }[];
2692
+ };
2693
+ meta: object;
2694
+ }>;
2695
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2696
+ input: {
2697
+ id: string;
2698
+ };
2699
+ output: {
2700
+ success: true;
2701
+ };
2702
+ meta: object;
2703
+ }>;
2704
+ }>>;
2705
+ suggestNextCustomId: import("@trpc/server").TRPCQueryProcedure<{
2706
+ input: void;
2707
+ output: number;
2708
+ meta: object;
2709
+ }>;
2710
+ }>>;
2711
+ users: import("@trpc/server").TRPCBuiltRouter<{
2712
+ ctx: TrpcContext;
2713
+ meta: object;
2714
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2715
+ message: string;
2716
+ data: {
2717
+ httpCode: error.http.StatusCodeCode;
2718
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2719
+ httpStatus: number;
2720
+ path?: string;
2721
+ stack?: string;
2722
+ };
2723
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2724
+ };
2725
+ transformer: true;
2726
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2727
+ list: import("@trpc/server").TRPCQueryProcedure<{
2728
+ input: {
2729
+ search?: string | null | undefined;
2730
+ deactivated?: boolean | undefined;
2731
+ };
2732
+ output: {
2733
+ id: string;
2734
+ salutation: string | null;
2735
+ firstName: string;
2736
+ lastName: string | null;
2737
+ username: string;
2738
+ email: string | null;
2739
+ phone: string | null;
2740
+ createdAt: Date;
2741
+ modifiedAt: Date;
2742
+ deactivatedAt: Date | null;
2743
+ }[];
2744
+ meta: object;
2745
+ }>;
2746
+ get: import("@trpc/server").TRPCQueryProcedure<{
2747
+ input: {
2748
+ id: string;
2749
+ };
2750
+ output: {
2751
+ id: string;
2752
+ salutation: string | null;
2753
+ firstName: string;
2754
+ lastName: string | null;
2755
+ username: string;
2756
+ email: string | null;
2757
+ phone: string | null;
2758
+ createdAt: Date;
2759
+ modifiedAt: Date;
2760
+ deactivatedAt: Date | null;
2761
+ };
2762
+ meta: object;
2763
+ }>;
2764
+ create: import("@trpc/server").TRPCMutationProcedure<{
2765
+ input: {
2766
+ username: string;
2767
+ firstName: string;
2768
+ lastName?: string | null | undefined;
2769
+ email?: string | null | undefined;
2770
+ phone?: string | null | undefined;
2771
+ contractType?: "internal" | "external" | "subcontractor" | undefined;
2772
+ };
2773
+ output: {
2774
+ id: string;
2775
+ };
2776
+ meta: object;
2777
+ }>;
2778
+ update: import("@trpc/server").TRPCMutationProcedure<{
2779
+ input: {
2780
+ id: string;
2781
+ data: {
2782
+ username?: string | undefined;
2783
+ firstName?: string | undefined;
2784
+ lastName?: string | null | undefined;
2785
+ email?: string | null | undefined;
2786
+ phone?: string | null | undefined;
2787
+ contractType?: "internal" | "external" | "subcontractor" | null | undefined;
2788
+ };
2789
+ };
2790
+ output: {
2791
+ success: true;
2792
+ };
2793
+ meta: object;
2794
+ }>;
2795
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2796
+ input: {
2797
+ id: string;
2798
+ };
2799
+ output: {
2800
+ success: true;
2801
+ };
2802
+ meta: object;
2803
+ }>;
2804
+ activate: import("@trpc/server").TRPCMutationProcedure<{
2805
+ input: {
2806
+ id: string;
2807
+ };
2808
+ output: {
2809
+ success: true;
2810
+ };
2811
+ meta: object;
2812
+ }>;
2813
+ deactivate: import("@trpc/server").TRPCMutationProcedure<{
2814
+ input: {
2815
+ id: string;
2816
+ };
2817
+ output: {
2818
+ success: true;
2819
+ };
2820
+ meta: object;
2821
+ }>;
2822
+ roles: import("@trpc/server").TRPCQueryProcedure<{
2823
+ input: void;
2824
+ output: (":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers")[];
2825
+ meta: object;
2826
+ }>;
2827
+ setRoles: import("@trpc/server").TRPCMutationProcedure<{
2828
+ input: {
2829
+ userId: string;
2830
+ assignments: Record<":admin" | "view:users" | "manage:users" | "delete:users" | "view:projects" | "manage:projects" | "delete:projects" | "view:projectDeployments" | "manage:projectDeployments" | "delete:projectDeployments" | "view:tools" | "manage:tools" | "delete:tools" | "view:toolTrackings" | "manage:toolTrackings" | "delete:toolTrackings" | "view:toolInventories" | "manage:toolInventories" | "delete:toolInventories" | "view:products" | "manage:products" | "delete:products" | "view:deliveryNotes" | "manage:deliveryNotes" | "delete:deliveryNotes" | "view:productVendors" | "manage:productVendors" | "delete:productVendors" | "view:productPriceRecords" | "manage:productPriceRecords" | "delete:productPriceRecords" | "view:customers" | "manage:customers" | "delete:customers", boolean | null | undefined>;
2831
+ };
2832
+ output: {
2833
+ success: true;
2834
+ };
2835
+ meta: object;
2836
+ }>;
2837
+ }>>;
2838
+ tools: import("@trpc/server").TRPCBuiltRouter<{
2839
+ ctx: TrpcContext;
2840
+ meta: object;
2841
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2842
+ message: string;
2843
+ data: {
2844
+ httpCode: error.http.StatusCodeCode;
2845
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2846
+ httpStatus: number;
2847
+ path?: string;
2848
+ stack?: string;
2849
+ };
2850
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2851
+ };
2852
+ transformer: true;
2853
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2854
+ list: import("@trpc/server").TRPCQueryProcedure<{
2855
+ input: {
2856
+ search?: string | null | undefined;
2857
+ status?: "lost" | "broken" | "available" | "unavailable" | null | undefined;
2858
+ brand?: string | null | undefined;
2859
+ category?: string | null | undefined;
2860
+ };
2861
+ output: {
2862
+ id: string;
2863
+ customId: number;
2864
+ brand: string;
2865
+ category: string;
2866
+ label: string | null;
2867
+ status: "lost" | "broken" | null;
2868
+ available: boolean;
2869
+ createdAt: Date;
2870
+ modifiedAt: Date;
2871
+ archivedSince: Date | null;
2872
+ }[];
2873
+ meta: object;
2874
+ }>;
2875
+ get: import("@trpc/server").TRPCQueryProcedure<{
2876
+ input: {
2877
+ id: string;
2878
+ };
2879
+ output: {
2880
+ id: string;
2881
+ customId: number;
2882
+ brand: string;
2883
+ category: string;
2884
+ label: string | null;
2885
+ status: "lost" | "broken" | null;
2886
+ available: boolean;
2887
+ createdAt: Date;
2888
+ modifiedAt: Date;
2889
+ archivedSince: Date | null;
2890
+ };
2891
+ meta: object;
2892
+ }>;
2893
+ create: import("@trpc/server").TRPCMutationProcedure<{
2894
+ input: {
2895
+ customId: number;
2896
+ brand: string;
2897
+ category: string;
2898
+ label: string | null;
2899
+ status: "lost" | "broken" | null;
2900
+ };
2901
+ output: {
2902
+ id: string;
2903
+ };
2904
+ meta: object;
2905
+ }>;
2906
+ update: import("@trpc/server").TRPCMutationProcedure<{
2907
+ input: {
2908
+ id: string;
2909
+ data: {
2910
+ brand?: string | null | undefined;
2911
+ category?: string | null | undefined;
2912
+ label?: string | null | undefined;
2913
+ };
2914
+ };
2915
+ output: {
2916
+ success: true;
2917
+ };
2918
+ meta: object;
2919
+ }>;
2920
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2921
+ input: {
2922
+ id: string;
2923
+ };
2924
+ output: {
2925
+ success: true;
2926
+ };
2927
+ meta: object;
2928
+ }>;
2929
+ track: import("@trpc/server").TRPCMutationProcedure<{
2930
+ input: {
2931
+ id: string;
2932
+ data: {
2933
+ projectId?: string | null | undefined;
2934
+ responsibleUserId?: string | null | undefined;
2935
+ deadlineAt?: unknown;
2936
+ comment?: string | null | undefined;
2937
+ };
2938
+ };
2939
+ output: {
2940
+ trackingId: string;
2941
+ };
2942
+ meta: object;
2943
+ }>;
2944
+ untrack: import("@trpc/server").TRPCMutationProcedure<{
2945
+ input: {
2946
+ id: string;
2947
+ };
2948
+ output: {
2949
+ success: true;
2950
+ };
2951
+ meta: object;
2952
+ }>;
2953
+ trackings: import("@trpc/server").TRPCBuiltRouter<{
2954
+ ctx: TrpcContext;
2955
+ meta: object;
2956
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
2957
+ message: string;
2958
+ data: {
2959
+ httpCode: error.http.StatusCodeCode;
2960
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2961
+ httpStatus: number;
2962
+ path?: string;
2963
+ stack?: string;
2964
+ };
2965
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2966
+ };
2967
+ transformer: true;
2968
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2969
+ list: import("@trpc/server").TRPCQueryProcedure<{
2970
+ input: {
2971
+ finished?: boolean | null | undefined;
2972
+ toolId?: string | null | undefined;
2973
+ projectId?: string | null | undefined;
2974
+ responsibleUserId?: string | null | undefined;
2975
+ startedByUserId?: string | null | undefined;
2976
+ endedByUserId?: string | null | undefined;
2977
+ startedBefore?: unknown;
2978
+ startedAfter?: unknown;
2979
+ endedBefore?: unknown;
2980
+ endedAfter?: unknown;
2981
+ limit?: number | undefined;
2982
+ offset?: number | undefined;
2983
+ };
2984
+ output: {
2985
+ id: string;
2986
+ toolId: string;
2987
+ projectId: string | null;
2988
+ responsibleUserId: string | null;
2989
+ startedByUserId: string | null;
2990
+ endedByUserId: string | null;
2991
+ startedAt: Date;
2992
+ endedAt: Date | null;
2993
+ }[];
2994
+ meta: object;
2995
+ }>;
2996
+ }>>;
2997
+ inventories: import("@trpc/server").TRPCBuiltRouter<{
2998
+ ctx: TrpcContext;
2999
+ meta: object;
3000
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape | {
3001
+ message: string;
3002
+ data: {
3003
+ httpCode: error.http.StatusCodeCode;
3004
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
3005
+ httpStatus: number;
3006
+ path?: string;
3007
+ stack?: string;
3008
+ };
3009
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
3010
+ };
3011
+ transformer: true;
3012
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
3013
+ list: import("@trpc/server").TRPCQueryProcedure<{
3014
+ input: {
3015
+ toolId?: string | null | undefined;
3016
+ };
3017
+ output: {
3018
+ id: string;
3019
+ toolId: string;
3020
+ comment: string | null;
3021
+ createdAt: Date;
3022
+ }[];
3023
+ meta: object;
3024
+ }>;
3025
+ create: import("@trpc/server").TRPCMutationProcedure<{
3026
+ input: {
3027
+ toolId: string;
3028
+ comment?: string | null | undefined;
3029
+ };
3030
+ output: {
3031
+ id: string;
3032
+ };
3033
+ meta: object;
3034
+ }>;
3035
+ delete: import("@trpc/server").TRPCMutationProcedure<{
3036
+ input: {
3037
+ id: string;
3038
+ };
3039
+ output: {
3040
+ success: true;
3041
+ };
3042
+ meta: object;
3043
+ }>;
3044
+ }>>;
3045
+ categories: import("@trpc/server").TRPCQueryProcedure<{
3046
+ input: void;
3047
+ output: string[];
3048
+ meta: object;
3049
+ }>;
3050
+ brands: import("@trpc/server").TRPCQueryProcedure<{
3051
+ input: void;
3052
+ output: string[];
3053
+ meta: object;
3054
+ }>;
3055
+ suggestNextCustomId: import("@trpc/server").TRPCQueryProcedure<{
3056
+ input: void;
3057
+ output: number;
3058
+ meta: object;
3059
+ }>;
3060
+ }>>;
3061
+ }>>>;
3062
+
3063
+ export {};