@sortsys/v2-client 0.1.39 → 0.1.40

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.
package/dist/index.d.ts CHANGED
@@ -191,10 +191,6 @@ interface ProcedureCallOptions<TContext> {
191
191
  path: string;
192
192
  type: ProcedureType;
193
193
  signal: AbortSignal | undefined;
194
- /**
195
- * The index of this call in a batch request.
196
- */
197
- batchIndex: number;
198
194
  }
199
195
  declare const procedureTypes: readonly [
200
196
  "query",
@@ -638,7 +634,6 @@ declare class TRPCClientError<TRouterOrProcedure extends InferrableClientTypes>
638
634
  });
639
635
  static from<TRouterOrProcedure extends InferrableClientTypes>(_cause: Error | TRPCErrorResponse<any> | object, opts?: {
640
636
  meta?: Record<string, unknown>;
641
- cause?: Error;
642
637
  }): TRPCClientError<TRouterOrProcedure>;
643
638
  }
644
639
  interface OperationContext extends Record<string, unknown> {
@@ -702,16 +697,16 @@ type TRPCClient<TRouter extends AnyRouter> = DecoratedProcedureRecord<{
702
697
  }, TRouter["_def"]["record"]> & {
703
698
  [untypedClientSymbol]: TRPCUntypedClient<TRouter>;
704
699
  };
705
- type TRPCResolverDef = {
700
+ type ResolverDef = {
706
701
  input: any;
707
702
  output: any;
708
703
  transformer: boolean;
709
704
  errorShape: any;
710
705
  };
711
706
  type coerceAsyncGeneratorToIterable<T> = T extends AsyncGenerator<infer $T, infer $Return, infer $Next> ? AsyncIterable<$T, $Return, $Next> : T;
712
- type Resolver<TDef extends TRPCResolverDef> = (input: TDef["input"], opts?: TRPCProcedureOptions) => Promise<coerceAsyncGeneratorToIterable<TDef["output"]>>;
713
- type SubscriptionResolver<TDef extends TRPCResolverDef> = (input: TDef["input"], opts: Partial<TRPCSubscriptionObserver<TDef["output"], TRPCClientError<TDef>>> & TRPCProcedureOptions) => Unsubscribable;
714
- type DecorateProcedure$1<TType extends ProcedureType, TDef extends TRPCResolverDef> = TType extends "query" ? {
707
+ type Resolver<TDef extends ResolverDef> = (input: TDef["input"], opts?: TRPCProcedureOptions) => Promise<coerceAsyncGeneratorToIterable<TDef["output"]>>;
708
+ type SubscriptionResolver<TDef extends ResolverDef> = (input: TDef["input"], opts: Partial<TRPCSubscriptionObserver<TDef["output"], TRPCClientError<TDef>>> & TRPCProcedureOptions) => Unsubscribable;
709
+ type DecorateProcedure$1<TType extends ProcedureType, TDef extends ResolverDef> = TType extends "query" ? {
715
710
  query: Resolver<TDef>;
716
711
  } : TType extends "mutation" ? {
717
712
  mutate: Resolver<TDef>;
@@ -776,7 +771,6 @@ declare namespace QueryString {
776
771
  allowEmptyArrays?: boolean | undefined;
777
772
  duplicates?: "combine" | "first" | "last" | undefined;
778
773
  strictDepth?: boolean | undefined;
779
- strictMerge?: boolean | undefined;
780
774
  throwOnLimitExceeded?: boolean | undefined;
781
775
  }
782
776
  type IParseDynamicOptions<AllowDots extends BooleanOptional> = AllowDots extends true ? {
@@ -832,11 +826,7 @@ interface NextFunction {
832
826
  (deferToNext: "route"): void;
833
827
  }
834
828
  interface ParamsDictionary {
835
- [key: string]: string | string[];
836
- [key: number]: string;
837
- }
838
- interface ParamsFlatDictionary {
839
- [key: string | number]: string;
829
+ [key: string]: string;
840
830
  }
841
831
  interface Locals extends Express.Locals {
842
832
  }
@@ -849,19 +839,21 @@ type PathParams = string | RegExp | Array<string | RegExp>;
849
839
  type RequestHandlerParams<P = ParamsDictionary, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>> = RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj> | ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj> | Array<RequestHandler<P> | ErrorRequestHandler<P>>;
850
840
  type RemoveTail<S extends string, Tail extends string> = S extends `${infer P}${Tail}` ? P : S;
851
841
  type GetRouteParameter<S extends string> = RemoveTail<RemoveTail<RemoveTail<S, `/${string}`>, `-${string}`>, `.${string}`>;
852
- type RouteParameters<Route extends string | RegExp> = Route extends string ? Route extends `${infer Required}{${infer Optional}}${infer Next}` ? ParseRouteParameters<Required> & Partial<ParseRouteParameters<Optional>> & RouteParameters<Next> : ParseRouteParameters<Route> : ParamsFlatDictionary;
853
- type ParseRouteParameters<Route extends string> = string extends Route ? ParamsDictionary : Route extends `${string}:${infer Rest}` ? (GetRouteParameter<Rest> extends never ? ParamsDictionary : {
842
+ type RouteParameters<Route extends string> = Route extends `${infer Required}{${infer Optional}}${infer Next}` ? ParseRouteParameters<Required> & Partial<ParseRouteParameters<Optional>> & RouteParameters<Next> : ParseRouteParameters<Route>;
843
+ type ParseRouteParameters<Route extends string> = string extends Route ? ParamsDictionary : Route extends `${string}(${string}` ? ParamsDictionary // TODO: handling for regex parameters
844
+ : Route extends `${string}:${infer Rest}` ? (GetRouteParameter<Rest> extends never ? ParamsDictionary : GetRouteParameter<Rest> extends `${infer ParamName}?` ? {
845
+ [P in ParamName]?: string;
846
+ } // TODO: Remove old `?` handling when Express 5 is promoted to "latest"
847
+ : {
854
848
  [P in GetRouteParameter<Rest>]: string;
855
- }) & (Rest extends `${GetRouteParameter<Rest>}${infer Next}` ? RouteParameters<Next> : unknown) : Route extends `${string}*${infer Rest}` ? (GetRouteParameter<Rest> extends never ? ParamsDictionary : {
856
- [P in GetRouteParameter<Rest>]: string[];
857
849
  }) & (Rest extends `${GetRouteParameter<Rest>}${infer Next}` ? RouteParameters<Next> : unknown) : {};
858
850
  interface IRouterMatcher<T, Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" = any> {
859
- <Route extends string | RegExp, P = RouteParameters<Route>, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>>(
851
+ <Route extends string, P = RouteParameters<Route>, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>>(
860
852
  // (it's used as the default type parameter for P)
861
853
  path: Route,
862
854
  // (This generic is meant to be passed explicitly.)
863
855
  ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, LocalsObj>>): T;
864
- <Path extends string | RegExp, P = RouteParameters<Path>, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>>(
856
+ <Path extends string, P = RouteParameters<Path>, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>>(
865
857
  // (it's used as the default type parameter for P)
866
858
  path: Path,
867
859
  // (This generic is meant to be passed explicitly.)
@@ -874,7 +866,7 @@ interface IRouterMatcher<T, Method extends "all" | "get" | "post" | "put" | "del
874
866
  ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>): T;
875
867
  (path: PathParams, subApplication: Application): T;
876
868
  }
877
- interface IRouterHandler<T, Route extends string | RegExp = string> {
869
+ interface IRouterHandler<T, Route extends string = string> {
878
870
  (...handlers: Array<RequestHandler<RouteParameters<Route>>>): T;
879
871
  (...handlers: Array<RequestHandlerParams<RouteParameters<Route>>>): T;
880
872
  <P = RouteParameters<Route>, ResBody = any, ReqBody = any, ReqQuery = QueryString.ParsedQs, LocalsObj extends Record<string, any> = Record<string, any>>(
@@ -956,7 +948,7 @@ interface IRouter extends RequestHandler {
956
948
  link: IRouterMatcher<this>;
957
949
  unlink: IRouterMatcher<this>;
958
950
  use: IRouterHandler<this> & IRouterMatcher<this>;
959
- route<T extends string | RegExp>(prefix: T): IRoute<T>;
951
+ route<T extends string>(prefix: T): IRoute<T>;
960
952
  route(prefix: PathParams): IRoute;
961
953
  /**
962
954
  * Stack of configured routes
@@ -973,7 +965,7 @@ interface ILayer {
973
965
  regexp: RegExp;
974
966
  handle: (req: Request$1, res: Response$1, next: NextFunction) => any;
975
967
  }
976
- interface IRoute<Route extends string | RegExp = string> {
968
+ interface IRoute<Route extends string = string> {
977
969
  path: string;
978
970
  stack: ILayer[];
979
971
  all: IRouterHandler<this, Route>;
@@ -2063,6 +2055,3009 @@ declare const appRouter: BuiltRouter<{
2063
2055
  output: string;
2064
2056
  meta: object;
2065
2057
  }>;
2058
+ auth: BuiltRouter<{
2059
+ ctx: TrpcContext;
2060
+ meta: object;
2061
+ errorShape: {
2062
+ message: string;
2063
+ data: {
2064
+ httpCode: error.http.StatusCodeCode;
2065
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2066
+ code: TRPC_ERROR_CODE_KEY;
2067
+ path?: string;
2068
+ stack?: string;
2069
+ };
2070
+ code: TRPC_ERROR_CODE_NUMBER;
2071
+ } | {
2072
+ data: {
2073
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2074
+ code: TRPC_ERROR_CODE_KEY;
2075
+ path?: string;
2076
+ stack?: string;
2077
+ };
2078
+ message: string;
2079
+ code: TRPC_ERROR_CODE_NUMBER;
2080
+ };
2081
+ transformer: true;
2082
+ }, DecorateCreateRouterOptions<{
2083
+ login: MutationProcedure<{
2084
+ input: {
2085
+ tenant: string;
2086
+ username: string;
2087
+ password: string;
2088
+ };
2089
+ output: {
2090
+ token: string;
2091
+ };
2092
+ meta: object;
2093
+ }>;
2094
+ logout: MutationProcedure<{
2095
+ input: void;
2096
+ output: {
2097
+ success: true;
2098
+ };
2099
+ meta: object;
2100
+ }>;
2101
+ check: QueryProcedure<{
2102
+ input: void;
2103
+ output: {
2104
+ success: true;
2105
+ };
2106
+ meta: object;
2107
+ }>;
2108
+ sessionInfo: QueryProcedure<{
2109
+ input: void;
2110
+ output: {
2111
+ user: {
2112
+ id: string;
2113
+ username: string;
2114
+ salutation: string | null;
2115
+ firstName: string;
2116
+ lastName: string | null;
2117
+ contractType: "internal" | "external" | "subcontractor";
2118
+ phone: string | null;
2119
+ email: string | null;
2120
+ };
2121
+ session: {
2122
+ id: string;
2123
+ inetAddr: string | null;
2124
+ userAgent: string | null;
2125
+ createdAt: Date;
2126
+ expiresAt: Date;
2127
+ };
2128
+ 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" | "view:contacts" | "manage:contacts" | "delete:contacts" | "view:dailyProjectReports" | "manage:dailyProjectReports" | "delete:dailyProjectReports" | "view:regieReports" | "manage:regieReports" | "delete:regieReports")[];
2129
+ tenant: {
2130
+ companyName: string | null;
2131
+ };
2132
+ };
2133
+ meta: object;
2134
+ }>;
2135
+ setPassword: MutationProcedure<{
2136
+ input: {
2137
+ username: string;
2138
+ password: string;
2139
+ };
2140
+ output: {
2141
+ success: true;
2142
+ };
2143
+ meta: object;
2144
+ }>;
2145
+ }>>;
2146
+ admin: BuiltRouter<{
2147
+ ctx: TrpcContext;
2148
+ meta: object;
2149
+ errorShape: {
2150
+ message: string;
2151
+ data: {
2152
+ httpCode: error.http.StatusCodeCode;
2153
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2154
+ code: TRPC_ERROR_CODE_KEY;
2155
+ path?: string;
2156
+ stack?: string;
2157
+ };
2158
+ code: TRPC_ERROR_CODE_NUMBER;
2159
+ } | {
2160
+ data: {
2161
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2162
+ code: TRPC_ERROR_CODE_KEY;
2163
+ path?: string;
2164
+ stack?: string;
2165
+ };
2166
+ message: string;
2167
+ code: TRPC_ERROR_CODE_NUMBER;
2168
+ };
2169
+ transformer: true;
2170
+ }, DecorateCreateRouterOptions<{
2171
+ login: MutationProcedure<{
2172
+ input: {
2173
+ password: string;
2174
+ tenant?: string | null | undefined;
2175
+ };
2176
+ output: {
2177
+ token: string;
2178
+ };
2179
+ meta: object;
2180
+ }>;
2181
+ tenants: BuiltRouter<{
2182
+ ctx: TrpcContext;
2183
+ meta: object;
2184
+ errorShape: {
2185
+ message: string;
2186
+ data: {
2187
+ httpCode: error.http.StatusCodeCode;
2188
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2189
+ code: TRPC_ERROR_CODE_KEY;
2190
+ path?: string;
2191
+ stack?: string;
2192
+ };
2193
+ code: TRPC_ERROR_CODE_NUMBER;
2194
+ } | {
2195
+ data: {
2196
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2197
+ code: TRPC_ERROR_CODE_KEY;
2198
+ path?: string;
2199
+ stack?: string;
2200
+ };
2201
+ message: string;
2202
+ code: TRPC_ERROR_CODE_NUMBER;
2203
+ };
2204
+ transformer: true;
2205
+ }, DecorateCreateRouterOptions<{
2206
+ list: QueryProcedure<{
2207
+ input: void;
2208
+ output: {
2209
+ name: string;
2210
+ locked_at: Date | null;
2211
+ deleted_at: Date | null;
2212
+ deactivated_at: Date | null;
2213
+ connection_details: {
2214
+ postgresDSN?: string | null | undefined;
2215
+ };
2216
+ contact_details: {
2217
+ email: string;
2218
+ companyName?: string | null | undefined;
2219
+ address?: {
2220
+ city?: string | null | undefined;
2221
+ zip?: string | null | undefined;
2222
+ country?: string | null | undefined;
2223
+ streetAddress?: string | null | undefined;
2224
+ } | null | undefined;
2225
+ };
2226
+ options: {
2227
+ sso: {
2228
+ "ms-entra-id": {
2229
+ enabled: boolean;
2230
+ importUserUsername: boolean;
2231
+ importUserName: boolean;
2232
+ importUserEmail: boolean;
2233
+ tenantId?: string | null | undefined;
2234
+ clientId?: string | null | undefined;
2235
+ objectId?: string | null | undefined;
2236
+ };
2237
+ };
2238
+ };
2239
+ }[];
2240
+ meta: object;
2241
+ }>;
2242
+ create: MutationProcedure<{
2243
+ input: {
2244
+ name: string;
2245
+ contact_details: {
2246
+ email: string;
2247
+ companyName?: string | null | undefined;
2248
+ address?: {
2249
+ city?: string | null | undefined;
2250
+ zip?: string | null | undefined;
2251
+ country?: string | null | undefined;
2252
+ streetAddress?: string | null | undefined;
2253
+ } | null | undefined;
2254
+ };
2255
+ options?: {
2256
+ sso: {
2257
+ "ms-entra-id": {
2258
+ enabled: boolean;
2259
+ importUserUsername: boolean;
2260
+ importUserName: boolean;
2261
+ importUserEmail: boolean;
2262
+ tenantId?: string | null | undefined;
2263
+ clientId?: string | null | undefined;
2264
+ objectId?: string | null | undefined;
2265
+ };
2266
+ };
2267
+ } | undefined;
2268
+ connection_details?: {
2269
+ postgresDSN?: string | null | undefined;
2270
+ } | undefined;
2271
+ };
2272
+ output: {
2273
+ adminPassword: string;
2274
+ };
2275
+ meta: object;
2276
+ }>;
2277
+ get: QueryProcedure<{
2278
+ input: {
2279
+ name: string;
2280
+ };
2281
+ output: {
2282
+ name: string;
2283
+ locked_at: Date | null;
2284
+ deleted_at: Date | null;
2285
+ deactivated_at: Date | null;
2286
+ connection_details: {
2287
+ postgresDSN?: string | null | undefined;
2288
+ };
2289
+ contact_details: {
2290
+ email: string;
2291
+ companyName?: string | null | undefined;
2292
+ address?: {
2293
+ city?: string | null | undefined;
2294
+ zip?: string | null | undefined;
2295
+ country?: string | null | undefined;
2296
+ streetAddress?: string | null | undefined;
2297
+ } | null | undefined;
2298
+ };
2299
+ options: {
2300
+ sso: {
2301
+ "ms-entra-id": {
2302
+ enabled: boolean;
2303
+ importUserUsername: boolean;
2304
+ importUserName: boolean;
2305
+ importUserEmail: boolean;
2306
+ tenantId?: string | null | undefined;
2307
+ clientId?: string | null | undefined;
2308
+ objectId?: string | null | undefined;
2309
+ };
2310
+ };
2311
+ };
2312
+ };
2313
+ meta: object;
2314
+ }>;
2315
+ update: MutationProcedure<{
2316
+ input: {
2317
+ name: string;
2318
+ data: {
2319
+ contact_details?: {
2320
+ email: string;
2321
+ companyName?: string | null | undefined;
2322
+ address?: {
2323
+ city?: string | null | undefined;
2324
+ zip?: string | null | undefined;
2325
+ country?: string | null | undefined;
2326
+ streetAddress?: string | null | undefined;
2327
+ } | null | undefined;
2328
+ } | undefined;
2329
+ connection_details?: {
2330
+ postgresDSN?: string | null | undefined;
2331
+ } | undefined;
2332
+ options?: {
2333
+ sso: {
2334
+ "ms-entra-id": {
2335
+ enabled: boolean;
2336
+ importUserUsername: boolean;
2337
+ importUserName: boolean;
2338
+ importUserEmail: boolean;
2339
+ tenantId?: string | null | undefined;
2340
+ clientId?: string | null | undefined;
2341
+ objectId?: string | null | undefined;
2342
+ };
2343
+ };
2344
+ } | undefined;
2345
+ };
2346
+ };
2347
+ output: {
2348
+ success: true;
2349
+ };
2350
+ meta: object;
2351
+ }>;
2352
+ activate: MutationProcedure<{
2353
+ input: {
2354
+ name: string;
2355
+ };
2356
+ output: {
2357
+ success: true;
2358
+ };
2359
+ meta: object;
2360
+ }>;
2361
+ deactivate: MutationProcedure<{
2362
+ input: {
2363
+ name: string;
2364
+ };
2365
+ output: {
2366
+ success: true;
2367
+ };
2368
+ meta: object;
2369
+ }>;
2370
+ delete: MutationProcedure<{
2371
+ input: {
2372
+ name: string;
2373
+ };
2374
+ output: {
2375
+ success: true;
2376
+ };
2377
+ meta: object;
2378
+ }>;
2379
+ deleteForever: MutationProcedure<{
2380
+ input: {
2381
+ name: string;
2382
+ };
2383
+ output: {
2384
+ success: true;
2385
+ };
2386
+ meta: object;
2387
+ }>;
2388
+ lock: MutationProcedure<{
2389
+ input: {
2390
+ name: string;
2391
+ };
2392
+ output: {
2393
+ success: true;
2394
+ };
2395
+ meta: object;
2396
+ }>;
2397
+ unlock: MutationProcedure<{
2398
+ input: {
2399
+ name: string;
2400
+ };
2401
+ output: {
2402
+ success: true;
2403
+ };
2404
+ meta: object;
2405
+ }>;
2406
+ undelete: MutationProcedure<{
2407
+ input: {
2408
+ name: string;
2409
+ };
2410
+ output: {
2411
+ success: true;
2412
+ };
2413
+ meta: object;
2414
+ }>;
2415
+ }>>;
2416
+ users: BuiltRouter<{
2417
+ ctx: TrpcContext;
2418
+ meta: object;
2419
+ errorShape: {
2420
+ message: string;
2421
+ data: {
2422
+ httpCode: error.http.StatusCodeCode;
2423
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2424
+ code: TRPC_ERROR_CODE_KEY;
2425
+ path?: string;
2426
+ stack?: string;
2427
+ };
2428
+ code: TRPC_ERROR_CODE_NUMBER;
2429
+ } | {
2430
+ data: {
2431
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2432
+ code: TRPC_ERROR_CODE_KEY;
2433
+ path?: string;
2434
+ stack?: string;
2435
+ };
2436
+ message: string;
2437
+ code: TRPC_ERROR_CODE_NUMBER;
2438
+ };
2439
+ transformer: true;
2440
+ }, DecorateCreateRouterOptions<{
2441
+ create: MutationProcedure<{
2442
+ input: {
2443
+ tenant: string;
2444
+ username: string;
2445
+ firstName: string;
2446
+ lastName?: string | null | undefined;
2447
+ email?: string | null | undefined;
2448
+ phone?: string | null | undefined;
2449
+ salutation?: string | null | undefined;
2450
+ contractType?: "internal" | "external" | "subcontractor" | null | undefined;
2451
+ password?: string | null | undefined;
2452
+ };
2453
+ output: {
2454
+ userId: string;
2455
+ password: string;
2456
+ };
2457
+ meta: object;
2458
+ }>;
2459
+ resetPassword: MutationProcedure<{
2460
+ input: {
2461
+ tenant: string;
2462
+ userId: string;
2463
+ password?: string | null | undefined;
2464
+ };
2465
+ output: {
2466
+ password: string;
2467
+ };
2468
+ meta: object;
2469
+ }>;
2470
+ }>>;
2471
+ }>>;
2472
+ customers: BuiltRouter<{
2473
+ ctx: TrpcContext;
2474
+ meta: object;
2475
+ errorShape: {
2476
+ message: string;
2477
+ data: {
2478
+ httpCode: error.http.StatusCodeCode;
2479
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2480
+ code: TRPC_ERROR_CODE_KEY;
2481
+ path?: string;
2482
+ stack?: string;
2483
+ };
2484
+ code: TRPC_ERROR_CODE_NUMBER;
2485
+ } | {
2486
+ data: {
2487
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2488
+ code: TRPC_ERROR_CODE_KEY;
2489
+ path?: string;
2490
+ stack?: string;
2491
+ };
2492
+ message: string;
2493
+ code: TRPC_ERROR_CODE_NUMBER;
2494
+ };
2495
+ transformer: true;
2496
+ }, DecorateCreateRouterOptions<{
2497
+ list: QueryProcedure<{
2498
+ input: {
2499
+ search?: string | null | undefined;
2500
+ };
2501
+ output: {
2502
+ id: string;
2503
+ salutation: string | null;
2504
+ name: string;
2505
+ address: {
2506
+ city: string;
2507
+ streetAddress: string;
2508
+ country?: string | null | undefined;
2509
+ zip?: string | null | undefined;
2510
+ } | null;
2511
+ createdByUserId: string | null;
2512
+ createdAt: Date;
2513
+ modifiedAt: Date;
2514
+ }[];
2515
+ meta: object;
2516
+ }>;
2517
+ get: QueryProcedure<{
2518
+ input: {
2519
+ id: string;
2520
+ };
2521
+ output: {
2522
+ id: string;
2523
+ salutation: string | null;
2524
+ name: string;
2525
+ address: {
2526
+ city: string;
2527
+ streetAddress: string;
2528
+ country?: string | null | undefined;
2529
+ zip?: string | null | undefined;
2530
+ } | null;
2531
+ createdByUserId: string | null;
2532
+ createdAt: Date;
2533
+ modifiedAt: Date;
2534
+ };
2535
+ meta: object;
2536
+ }>;
2537
+ create: MutationProcedure<{
2538
+ input: {
2539
+ name: string;
2540
+ salutation?: string | null | undefined;
2541
+ address?: {
2542
+ city: string;
2543
+ streetAddress: string;
2544
+ country?: string | null | undefined;
2545
+ zip?: string | null | undefined;
2546
+ } | null | undefined;
2547
+ };
2548
+ output: {
2549
+ id: string;
2550
+ };
2551
+ meta: object;
2552
+ }>;
2553
+ update: MutationProcedure<{
2554
+ input: {
2555
+ id: string;
2556
+ data: {
2557
+ salutation?: string | null | undefined;
2558
+ name?: string | undefined;
2559
+ address?: {
2560
+ city: string;
2561
+ streetAddress: string;
2562
+ country?: string | null | undefined;
2563
+ zip?: string | null | undefined;
2564
+ } | null | undefined;
2565
+ };
2566
+ };
2567
+ output: {
2568
+ success: true;
2569
+ };
2570
+ meta: object;
2571
+ }>;
2572
+ delete: MutationProcedure<{
2573
+ input: {
2574
+ id: string;
2575
+ };
2576
+ output: {
2577
+ success: true;
2578
+ };
2579
+ meta: object;
2580
+ }>;
2581
+ contacts: BuiltRouter<{
2582
+ ctx: TrpcContext;
2583
+ meta: object;
2584
+ errorShape: {
2585
+ message: string;
2586
+ data: {
2587
+ httpCode: error.http.StatusCodeCode;
2588
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2589
+ code: TRPC_ERROR_CODE_KEY;
2590
+ path?: string;
2591
+ stack?: string;
2592
+ };
2593
+ code: TRPC_ERROR_CODE_NUMBER;
2594
+ } | {
2595
+ data: {
2596
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2597
+ code: TRPC_ERROR_CODE_KEY;
2598
+ path?: string;
2599
+ stack?: string;
2600
+ };
2601
+ message: string;
2602
+ code: TRPC_ERROR_CODE_NUMBER;
2603
+ };
2604
+ transformer: true;
2605
+ }, DecorateCreateRouterOptions<{
2606
+ list: QueryProcedure<{
2607
+ input: {
2608
+ customerId: string;
2609
+ };
2610
+ output: {
2611
+ id: string;
2612
+ salutation: string | null;
2613
+ firstName: string;
2614
+ lastName: string | null;
2615
+ phoneNumbers: {
2616
+ number: string;
2617
+ name?: string | null | undefined;
2618
+ }[];
2619
+ emailAddresses: {
2620
+ email: string;
2621
+ name?: string | null | undefined;
2622
+ }[];
2623
+ createdAt: Date;
2624
+ modifiedAt: Date;
2625
+ }[];
2626
+ meta: object;
2627
+ }>;
2628
+ add: MutationProcedure<{
2629
+ input: {
2630
+ customerId: string;
2631
+ contactId: string;
2632
+ };
2633
+ output: {
2634
+ success: true;
2635
+ };
2636
+ meta: object;
2637
+ }>;
2638
+ set: MutationProcedure<{
2639
+ input: {
2640
+ customerId: string;
2641
+ contactIds: string[];
2642
+ };
2643
+ output: {
2644
+ success: true;
2645
+ };
2646
+ meta: object;
2647
+ }>;
2648
+ remove: MutationProcedure<{
2649
+ input: {
2650
+ customerId: string;
2651
+ contactId: string;
2652
+ };
2653
+ output: {
2654
+ success: true;
2655
+ };
2656
+ meta: object;
2657
+ }>;
2658
+ }>>;
2659
+ }>>;
2660
+ projects: BuiltRouter<{
2661
+ ctx: TrpcContext;
2662
+ meta: object;
2663
+ errorShape: {
2664
+ message: string;
2665
+ data: {
2666
+ httpCode: error.http.StatusCodeCode;
2667
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2668
+ code: TRPC_ERROR_CODE_KEY;
2669
+ path?: string;
2670
+ stack?: string;
2671
+ };
2672
+ code: TRPC_ERROR_CODE_NUMBER;
2673
+ } | {
2674
+ data: {
2675
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2676
+ code: TRPC_ERROR_CODE_KEY;
2677
+ path?: string;
2678
+ stack?: string;
2679
+ };
2680
+ message: string;
2681
+ code: TRPC_ERROR_CODE_NUMBER;
2682
+ };
2683
+ transformer: true;
2684
+ }, DecorateCreateRouterOptions<{
2685
+ list: QueryProcedure<{
2686
+ input: {
2687
+ search?: string | null | undefined;
2688
+ finished?: boolean | null | undefined;
2689
+ customerId?: string | null | undefined;
2690
+ };
2691
+ output: {
2692
+ id: string;
2693
+ title: string;
2694
+ address: {
2695
+ city: string;
2696
+ streetAddress: string;
2697
+ country?: string | null | undefined;
2698
+ zip?: string | null | undefined;
2699
+ } | null;
2700
+ customerId: string | null;
2701
+ createdByUserId: string | null;
2702
+ createdAt: Date;
2703
+ modifiedAt: Date;
2704
+ finishedAt: Date | null;
2705
+ }[];
2706
+ meta: object;
2707
+ }>;
2708
+ get: QueryProcedure<{
2709
+ input: {
2710
+ id: string;
2711
+ };
2712
+ output: {
2713
+ id: string;
2714
+ title: string;
2715
+ address: {
2716
+ city: string;
2717
+ streetAddress: string;
2718
+ country?: string | null | undefined;
2719
+ zip?: string | null | undefined;
2720
+ } | null;
2721
+ customerId: string | null;
2722
+ createdByUserId: string | null;
2723
+ createdAt: Date;
2724
+ modifiedAt: Date;
2725
+ finishedAt: Date | null;
2726
+ };
2727
+ meta: object;
2728
+ }>;
2729
+ create: MutationProcedure<{
2730
+ input: {
2731
+ title: string;
2732
+ address?: {
2733
+ city: string;
2734
+ streetAddress: string;
2735
+ country?: string | null | undefined;
2736
+ zip?: string | null | undefined;
2737
+ } | null | undefined;
2738
+ customerId?: string | null | undefined;
2739
+ };
2740
+ output: {
2741
+ id: string;
2742
+ };
2743
+ meta: object;
2744
+ }>;
2745
+ update: MutationProcedure<{
2746
+ input: {
2747
+ id: string;
2748
+ data: {
2749
+ title?: string | undefined;
2750
+ address?: {
2751
+ city: string;
2752
+ streetAddress: string;
2753
+ country?: string | null | undefined;
2754
+ zip?: string | null | undefined;
2755
+ } | null | undefined;
2756
+ customerId?: string | null | undefined;
2757
+ };
2758
+ };
2759
+ output: {
2760
+ success: true;
2761
+ };
2762
+ meta: object;
2763
+ }>;
2764
+ finish: MutationProcedure<{
2765
+ input: {
2766
+ id: string;
2767
+ };
2768
+ output: {
2769
+ success: true;
2770
+ };
2771
+ meta: object;
2772
+ }>;
2773
+ resume: MutationProcedure<{
2774
+ input: {
2775
+ id: string;
2776
+ };
2777
+ output: {
2778
+ success: true;
2779
+ };
2780
+ meta: object;
2781
+ }>;
2782
+ delete: MutationProcedure<{
2783
+ input: {
2784
+ id: string;
2785
+ };
2786
+ output: {
2787
+ success: true;
2788
+ };
2789
+ meta: object;
2790
+ }>;
2791
+ deployments: BuiltRouter<{
2792
+ ctx: TrpcContext;
2793
+ meta: object;
2794
+ errorShape: {
2795
+ message: string;
2796
+ data: {
2797
+ httpCode: error.http.StatusCodeCode;
2798
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2799
+ code: TRPC_ERROR_CODE_KEY;
2800
+ path?: string;
2801
+ stack?: string;
2802
+ };
2803
+ code: TRPC_ERROR_CODE_NUMBER;
2804
+ } | {
2805
+ data: {
2806
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2807
+ code: TRPC_ERROR_CODE_KEY;
2808
+ path?: string;
2809
+ stack?: string;
2810
+ };
2811
+ message: string;
2812
+ code: TRPC_ERROR_CODE_NUMBER;
2813
+ };
2814
+ transformer: true;
2815
+ }, DecorateCreateRouterOptions<{
2816
+ list: QueryProcedure<{
2817
+ input: {
2818
+ projectId?: string | null | undefined;
2819
+ userId?: string | null | undefined;
2820
+ active?: boolean | null | undefined;
2821
+ fromAfter?: unknown;
2822
+ fromBefore?: unknown;
2823
+ toAfter?: unknown;
2824
+ toBefore?: unknown;
2825
+ limit?: number | undefined;
2826
+ offset?: number | undefined;
2827
+ };
2828
+ output: {
2829
+ id: string;
2830
+ projectId: string;
2831
+ userId: string;
2832
+ from: Date;
2833
+ to: Date;
2834
+ note: string | null;
2835
+ createdAt: Date;
2836
+ }[];
2837
+ meta: object;
2838
+ }>;
2839
+ create: MutationProcedure<{
2840
+ input: {
2841
+ projectId: string;
2842
+ userId: string;
2843
+ from: unknown;
2844
+ to: unknown;
2845
+ note?: string | null | undefined;
2846
+ };
2847
+ output: {
2848
+ id: string;
2849
+ };
2850
+ meta: object;
2851
+ }>;
2852
+ update: MutationProcedure<{
2853
+ input: {
2854
+ id: string;
2855
+ data: {
2856
+ projectId?: string | null | undefined;
2857
+ userId?: string | null | undefined;
2858
+ from?: unknown;
2859
+ to?: unknown;
2860
+ note?: string | null | undefined;
2861
+ };
2862
+ };
2863
+ output: {
2864
+ success: true;
2865
+ };
2866
+ meta: object;
2867
+ }>;
2868
+ delete: MutationProcedure<{
2869
+ input: {
2870
+ id: string;
2871
+ };
2872
+ output: {
2873
+ success: true;
2874
+ };
2875
+ meta: object;
2876
+ }>;
2877
+ }>>;
2878
+ contacts: BuiltRouter<{
2879
+ ctx: TrpcContext;
2880
+ meta: object;
2881
+ errorShape: {
2882
+ message: string;
2883
+ data: {
2884
+ httpCode: error.http.StatusCodeCode;
2885
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2886
+ code: TRPC_ERROR_CODE_KEY;
2887
+ path?: string;
2888
+ stack?: string;
2889
+ };
2890
+ code: TRPC_ERROR_CODE_NUMBER;
2891
+ } | {
2892
+ data: {
2893
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2894
+ code: TRPC_ERROR_CODE_KEY;
2895
+ path?: string;
2896
+ stack?: string;
2897
+ };
2898
+ message: string;
2899
+ code: TRPC_ERROR_CODE_NUMBER;
2900
+ };
2901
+ transformer: true;
2902
+ }, DecorateCreateRouterOptions<{
2903
+ list: QueryProcedure<{
2904
+ input: {
2905
+ projectId: string;
2906
+ };
2907
+ output: {
2908
+ id: string;
2909
+ salutation: string | null;
2910
+ firstName: string;
2911
+ lastName: string | null;
2912
+ phoneNumbers: {
2913
+ number: string;
2914
+ name?: string | null | undefined;
2915
+ }[];
2916
+ emailAddresses: {
2917
+ email: string;
2918
+ name?: string | null | undefined;
2919
+ }[];
2920
+ createdAt: Date;
2921
+ modifiedAt: Date;
2922
+ }[];
2923
+ meta: object;
2924
+ }>;
2925
+ add: MutationProcedure<{
2926
+ input: {
2927
+ projectId: string;
2928
+ contactId: string;
2929
+ };
2930
+ output: {
2931
+ success: true;
2932
+ };
2933
+ meta: object;
2934
+ }>;
2935
+ set: MutationProcedure<{
2936
+ input: {
2937
+ projectId: string;
2938
+ contactIds: string[];
2939
+ };
2940
+ output: {
2941
+ success: true;
2942
+ };
2943
+ meta: object;
2944
+ }>;
2945
+ remove: MutationProcedure<{
2946
+ input: {
2947
+ projectId: string;
2948
+ contactId: string;
2949
+ };
2950
+ output: {
2951
+ success: true;
2952
+ };
2953
+ meta: object;
2954
+ }>;
2955
+ }>>;
2956
+ costs: BuiltRouter<{
2957
+ ctx: TrpcContext;
2958
+ meta: object;
2959
+ errorShape: {
2960
+ message: string;
2961
+ data: {
2962
+ httpCode: error.http.StatusCodeCode;
2963
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2964
+ code: TRPC_ERROR_CODE_KEY;
2965
+ path?: string;
2966
+ stack?: string;
2967
+ };
2968
+ code: TRPC_ERROR_CODE_NUMBER;
2969
+ } | {
2970
+ data: {
2971
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
2972
+ code: TRPC_ERROR_CODE_KEY;
2973
+ path?: string;
2974
+ stack?: string;
2975
+ };
2976
+ message: string;
2977
+ code: TRPC_ERROR_CODE_NUMBER;
2978
+ };
2979
+ transformer: true;
2980
+ }, DecorateCreateRouterOptions<{
2981
+ get: QueryProcedure<{
2982
+ input: {
2983
+ projectId: string;
2984
+ from?: unknown;
2985
+ to?: unknown;
2986
+ };
2987
+ output: {
2988
+ deliveryNotes: {
2989
+ noteId: string;
2990
+ autoId: number;
2991
+ effectiveTimestamp: Date;
2992
+ totalCost: number;
2993
+ }[];
2994
+ products: {
2995
+ productId: string;
2996
+ quantity: number;
2997
+ totalCost: number;
2998
+ priceRecord: {
2999
+ id: string;
3000
+ productId: string;
3001
+ vendorId: string | null;
3002
+ timestamp: Date;
3003
+ price: number;
3004
+ isRealPurchase: boolean;
3005
+ comment: string | null;
3006
+ } | null;
3007
+ }[];
3008
+ specialRecords: {
3009
+ id: string;
3010
+ noteId: string;
3011
+ noteAutoId: number;
3012
+ effectiveTimestamp: Date;
3013
+ name: string;
3014
+ unit: string;
3015
+ amount: number;
3016
+ pricePerUnit: number | null;
3017
+ comment: string | null;
3018
+ totalCost: number;
3019
+ }[];
3020
+ workHours: {
3021
+ id: string;
3022
+ userId: string | null;
3023
+ day: Date;
3024
+ hours: number;
3025
+ costPerHour: number | null;
3026
+ totalCost: number;
3027
+ }[];
3028
+ toolTrackings: {
3029
+ id: string;
3030
+ toolId: string;
3031
+ responsibleUserId: string | null;
3032
+ startedByUserId: string | null;
3033
+ endedByUserId: string | null;
3034
+ toolUsageCostPerDay: number | null;
3035
+ comment: string | null;
3036
+ startedAt: Date;
3037
+ endedAt: Date | null;
3038
+ deadlineAt: Date | null;
3039
+ totalCost: number;
3040
+ }[];
3041
+ commonCosts: {
3042
+ fgk: {
3043
+ baseCost: number;
3044
+ overheadCost: number;
3045
+ totalCost: number;
3046
+ };
3047
+ mgk: {
3048
+ baseCost: number;
3049
+ overheadCost: number;
3050
+ totalCost: number;
3051
+ };
3052
+ ngk: {
3053
+ baseCost: number;
3054
+ overheadCost: number;
3055
+ totalCost: number;
3056
+ };
3057
+ overallOverhead: number;
3058
+ };
3059
+ totalCosts: {
3060
+ deliveryNotes: number;
3061
+ products: number;
3062
+ specialRecords: number;
3063
+ workHours: number;
3064
+ toolTrackings: number;
3065
+ overall: number;
3066
+ };
3067
+ };
3068
+ meta: object;
3069
+ }>;
3070
+ }>>;
3071
+ dailyReports: BuiltRouter<{
3072
+ ctx: TrpcContext;
3073
+ meta: object;
3074
+ errorShape: {
3075
+ message: string;
3076
+ data: {
3077
+ httpCode: error.http.StatusCodeCode;
3078
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3079
+ code: TRPC_ERROR_CODE_KEY;
3080
+ path?: string;
3081
+ stack?: string;
3082
+ };
3083
+ code: TRPC_ERROR_CODE_NUMBER;
3084
+ } | {
3085
+ data: {
3086
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3087
+ code: TRPC_ERROR_CODE_KEY;
3088
+ path?: string;
3089
+ stack?: string;
3090
+ };
3091
+ message: string;
3092
+ code: TRPC_ERROR_CODE_NUMBER;
3093
+ };
3094
+ transformer: true;
3095
+ }, DecorateCreateRouterOptions<{
3096
+ list: QueryProcedure<{
3097
+ input: {
3098
+ projectId?: string | null | undefined;
3099
+ from?: unknown;
3100
+ to?: unknown;
3101
+ limit?: number | undefined;
3102
+ offset?: number | undefined;
3103
+ };
3104
+ output: {
3105
+ id: string;
3106
+ projectId: string;
3107
+ day: Date;
3108
+ summary: string;
3109
+ weather: {
3110
+ summary?: string | null | undefined;
3111
+ temperatureC?: number | null | undefined;
3112
+ precipitationMm?: number | null | undefined;
3113
+ windKph?: number | null | undefined;
3114
+ } | null;
3115
+ createdByUserId: string | null;
3116
+ createdAt: Date;
3117
+ workHours: {
3118
+ id: string;
3119
+ reportId: string;
3120
+ userId: string | null;
3121
+ hours: number;
3122
+ costPerHour: number | null;
3123
+ }[];
3124
+ }[];
3125
+ meta: object;
3126
+ }>;
3127
+ get: QueryProcedure<{
3128
+ input: {
3129
+ projectId: string;
3130
+ day: unknown;
3131
+ };
3132
+ output: {
3133
+ id: string;
3134
+ projectId: string;
3135
+ day: Date;
3136
+ summary: string;
3137
+ weather: {
3138
+ summary?: string | null | undefined;
3139
+ temperatureC?: number | null | undefined;
3140
+ precipitationMm?: number | null | undefined;
3141
+ windKph?: number | null | undefined;
3142
+ } | null;
3143
+ createdByUserId: string | null;
3144
+ createdAt: Date;
3145
+ workHours: {
3146
+ id: string;
3147
+ reportId: string;
3148
+ userId: string | null;
3149
+ hours: number;
3150
+ costPerHour: number | null;
3151
+ }[];
3152
+ };
3153
+ meta: object;
3154
+ }>;
3155
+ create: MutationProcedure<{
3156
+ input: {
3157
+ projectId: string;
3158
+ day: unknown;
3159
+ summary: string;
3160
+ weather?: {
3161
+ summary?: string | null | undefined;
3162
+ temperatureC?: number | null | undefined;
3163
+ precipitationMm?: number | null | undefined;
3164
+ windKph?: number | null | undefined;
3165
+ } | null | undefined;
3166
+ workHours?: {
3167
+ hours: number;
3168
+ costPerHour: number | null;
3169
+ userId?: string | null | undefined;
3170
+ }[] | undefined;
3171
+ };
3172
+ output: {
3173
+ success: true;
3174
+ };
3175
+ meta: object;
3176
+ }>;
3177
+ update: MutationProcedure<{
3178
+ input: {
3179
+ projectId: string;
3180
+ day: unknown;
3181
+ data: {
3182
+ summary?: string | null | undefined;
3183
+ weather?: {
3184
+ summary?: string | null | undefined;
3185
+ temperatureC?: number | null | undefined;
3186
+ precipitationMm?: number | null | undefined;
3187
+ windKph?: number | null | undefined;
3188
+ } | null | undefined;
3189
+ workHours?: {
3190
+ hours: number;
3191
+ costPerHour: number | null;
3192
+ userId?: string | null | undefined;
3193
+ }[] | null | undefined;
3194
+ };
3195
+ };
3196
+ output: {
3197
+ success: true;
3198
+ };
3199
+ meta: object;
3200
+ }>;
3201
+ delete: MutationProcedure<{
3202
+ input: {
3203
+ projectId: string;
3204
+ day: unknown;
3205
+ };
3206
+ output: {
3207
+ success: true;
3208
+ };
3209
+ meta: object;
3210
+ }>;
3211
+ }>>;
3212
+ }>>;
3213
+ contacts: BuiltRouter<{
3214
+ ctx: TrpcContext;
3215
+ meta: object;
3216
+ errorShape: {
3217
+ message: string;
3218
+ data: {
3219
+ httpCode: error.http.StatusCodeCode;
3220
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3221
+ code: TRPC_ERROR_CODE_KEY;
3222
+ path?: string;
3223
+ stack?: string;
3224
+ };
3225
+ code: TRPC_ERROR_CODE_NUMBER;
3226
+ } | {
3227
+ data: {
3228
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3229
+ code: TRPC_ERROR_CODE_KEY;
3230
+ path?: string;
3231
+ stack?: string;
3232
+ };
3233
+ message: string;
3234
+ code: TRPC_ERROR_CODE_NUMBER;
3235
+ };
3236
+ transformer: true;
3237
+ }, DecorateCreateRouterOptions<{
3238
+ list: QueryProcedure<{
3239
+ input: {
3240
+ search?: string | null | undefined;
3241
+ };
3242
+ output: {
3243
+ id: string;
3244
+ salutation: string | null;
3245
+ firstName: string;
3246
+ lastName: string | null;
3247
+ phoneNumbers: {
3248
+ number: string;
3249
+ name?: string | null | undefined;
3250
+ }[];
3251
+ emailAddresses: {
3252
+ email: string;
3253
+ name?: string | null | undefined;
3254
+ }[];
3255
+ createdAt: Date;
3256
+ modifiedAt: Date;
3257
+ }[];
3258
+ meta: object;
3259
+ }>;
3260
+ get: QueryProcedure<{
3261
+ input: {
3262
+ id: string;
3263
+ };
3264
+ output: {
3265
+ id: string;
3266
+ salutation: string | null;
3267
+ firstName: string;
3268
+ lastName: string | null;
3269
+ phoneNumbers: {
3270
+ number: string;
3271
+ name?: string | null | undefined;
3272
+ }[];
3273
+ emailAddresses: {
3274
+ email: string;
3275
+ name?: string | null | undefined;
3276
+ }[];
3277
+ createdAt: Date;
3278
+ modifiedAt: Date;
3279
+ };
3280
+ meta: object;
3281
+ }>;
3282
+ create: MutationProcedure<{
3283
+ input: {
3284
+ firstName: string;
3285
+ salutation?: string | null | undefined;
3286
+ lastName?: string | null | undefined;
3287
+ phoneNumbers?: {
3288
+ number: string;
3289
+ name?: string | null | undefined;
3290
+ }[] | undefined;
3291
+ emailAddresses?: {
3292
+ email: string;
3293
+ name?: string | null | undefined;
3294
+ }[] | undefined;
3295
+ };
3296
+ output: {
3297
+ id: string;
3298
+ };
3299
+ meta: object;
3300
+ }>;
3301
+ update: MutationProcedure<{
3302
+ input: {
3303
+ id: string;
3304
+ data: {
3305
+ salutation?: string | null | undefined;
3306
+ firstName?: string | undefined;
3307
+ lastName?: string | null | undefined;
3308
+ phoneNumbers?: {
3309
+ number: string;
3310
+ name?: string | null | undefined;
3311
+ }[] | undefined;
3312
+ emailAddresses?: {
3313
+ email: string;
3314
+ name?: string | null | undefined;
3315
+ }[] | undefined;
3316
+ };
3317
+ };
3318
+ output: {
3319
+ success: true;
3320
+ };
3321
+ meta: object;
3322
+ }>;
3323
+ delete: MutationProcedure<{
3324
+ input: {
3325
+ id: string;
3326
+ };
3327
+ output: {
3328
+ success: true;
3329
+ };
3330
+ meta: object;
3331
+ }>;
3332
+ projects: BuiltRouter<{
3333
+ ctx: TrpcContext;
3334
+ meta: object;
3335
+ errorShape: {
3336
+ message: string;
3337
+ data: {
3338
+ httpCode: error.http.StatusCodeCode;
3339
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3340
+ code: TRPC_ERROR_CODE_KEY;
3341
+ path?: string;
3342
+ stack?: string;
3343
+ };
3344
+ code: TRPC_ERROR_CODE_NUMBER;
3345
+ } | {
3346
+ data: {
3347
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3348
+ code: TRPC_ERROR_CODE_KEY;
3349
+ path?: string;
3350
+ stack?: string;
3351
+ };
3352
+ message: string;
3353
+ code: TRPC_ERROR_CODE_NUMBER;
3354
+ };
3355
+ transformer: true;
3356
+ }, DecorateCreateRouterOptions<{
3357
+ list: QueryProcedure<{
3358
+ input: {
3359
+ contactId: string;
3360
+ };
3361
+ output: {
3362
+ id: string;
3363
+ title: string;
3364
+ address: {
3365
+ city: string;
3366
+ streetAddress: string;
3367
+ country?: string | null | undefined;
3368
+ zip?: string | null | undefined;
3369
+ } | null;
3370
+ customerId: string | null;
3371
+ createdByUserId: string | null;
3372
+ createdAt: Date;
3373
+ modifiedAt: Date;
3374
+ finishedAt: Date | null;
3375
+ }[];
3376
+ meta: object;
3377
+ }>;
3378
+ }>>;
3379
+ customers: BuiltRouter<{
3380
+ ctx: TrpcContext;
3381
+ meta: object;
3382
+ errorShape: {
3383
+ message: string;
3384
+ data: {
3385
+ httpCode: error.http.StatusCodeCode;
3386
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3387
+ code: TRPC_ERROR_CODE_KEY;
3388
+ path?: string;
3389
+ stack?: string;
3390
+ };
3391
+ code: TRPC_ERROR_CODE_NUMBER;
3392
+ } | {
3393
+ data: {
3394
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3395
+ code: TRPC_ERROR_CODE_KEY;
3396
+ path?: string;
3397
+ stack?: string;
3398
+ };
3399
+ message: string;
3400
+ code: TRPC_ERROR_CODE_NUMBER;
3401
+ };
3402
+ transformer: true;
3403
+ }, DecorateCreateRouterOptions<{
3404
+ list: QueryProcedure<{
3405
+ input: {
3406
+ contactId: string;
3407
+ };
3408
+ output: {
3409
+ id: string;
3410
+ salutation: string | null;
3411
+ name: string;
3412
+ address: {
3413
+ city: string;
3414
+ streetAddress: string;
3415
+ country?: string | null | undefined;
3416
+ zip?: string | null | undefined;
3417
+ } | null;
3418
+ createdByUserId: string | null;
3419
+ createdAt: Date;
3420
+ modifiedAt: Date;
3421
+ }[];
3422
+ meta: object;
3423
+ }>;
3424
+ }>>;
3425
+ }>>;
3426
+ products: BuiltRouter<{
3427
+ ctx: TrpcContext;
3428
+ meta: object;
3429
+ errorShape: {
3430
+ message: string;
3431
+ data: {
3432
+ httpCode: error.http.StatusCodeCode;
3433
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3434
+ code: TRPC_ERROR_CODE_KEY;
3435
+ path?: string;
3436
+ stack?: string;
3437
+ };
3438
+ code: TRPC_ERROR_CODE_NUMBER;
3439
+ } | {
3440
+ data: {
3441
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3442
+ code: TRPC_ERROR_CODE_KEY;
3443
+ path?: string;
3444
+ stack?: string;
3445
+ };
3446
+ message: string;
3447
+ code: TRPC_ERROR_CODE_NUMBER;
3448
+ };
3449
+ transformer: true;
3450
+ }, DecorateCreateRouterOptions<{
3451
+ list: QueryProcedure<{
3452
+ input: {
3453
+ category?: string | null | undefined;
3454
+ search?: string | null | undefined;
3455
+ };
3456
+ output: {
3457
+ id: string;
3458
+ customId: number;
3459
+ name: string;
3460
+ description: string | null;
3461
+ brand: string | null;
3462
+ baseUnit: string;
3463
+ otherUnits: Record<string, number>;
3464
+ categories: string[];
3465
+ }[];
3466
+ meta: object;
3467
+ }>;
3468
+ get: QueryProcedure<{
3469
+ input: {
3470
+ id: string;
3471
+ };
3472
+ output: {
3473
+ id: string;
3474
+ customId: number;
3475
+ name: string;
3476
+ description: string | null;
3477
+ brand: string | null;
3478
+ baseUnit: string;
3479
+ otherUnits: Record<string, number>;
3480
+ categories: string[];
3481
+ };
3482
+ meta: object;
3483
+ }>;
3484
+ create: MutationProcedure<{
3485
+ input: {
3486
+ customId: number;
3487
+ name: string;
3488
+ baseUnit: string;
3489
+ brand?: string | null | undefined;
3490
+ description?: string | null | undefined;
3491
+ otherUnits?: Record<string, number> | undefined;
3492
+ };
3493
+ output: {
3494
+ id: string;
3495
+ };
3496
+ meta: object;
3497
+ }>;
3498
+ update: MutationProcedure<{
3499
+ input: {
3500
+ id: string;
3501
+ data: {
3502
+ customId?: number | undefined;
3503
+ name?: string | undefined;
3504
+ brand?: string | null | undefined;
3505
+ description?: string | null | undefined;
3506
+ baseUnit?: string | undefined;
3507
+ otherUnits?: Record<string, number> | undefined;
3508
+ };
3509
+ };
3510
+ output: {
3511
+ success: true;
3512
+ };
3513
+ meta: object;
3514
+ }>;
3515
+ delete: MutationProcedure<{
3516
+ input: {
3517
+ id: string;
3518
+ };
3519
+ output: {
3520
+ success: true;
3521
+ };
3522
+ meta: object;
3523
+ }>;
3524
+ categories: BuiltRouter<{
3525
+ ctx: TrpcContext;
3526
+ meta: object;
3527
+ errorShape: {
3528
+ message: string;
3529
+ data: {
3530
+ httpCode: error.http.StatusCodeCode;
3531
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3532
+ code: TRPC_ERROR_CODE_KEY;
3533
+ path?: string;
3534
+ stack?: string;
3535
+ };
3536
+ code: TRPC_ERROR_CODE_NUMBER;
3537
+ } | {
3538
+ data: {
3539
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3540
+ code: TRPC_ERROR_CODE_KEY;
3541
+ path?: string;
3542
+ stack?: string;
3543
+ };
3544
+ message: string;
3545
+ code: TRPC_ERROR_CODE_NUMBER;
3546
+ };
3547
+ transformer: true;
3548
+ }, DecorateCreateRouterOptions<{
3549
+ list: QueryProcedure<{
3550
+ input: void;
3551
+ output: string[];
3552
+ meta: object;
3553
+ }>;
3554
+ tag: MutationProcedure<{
3555
+ input: {
3556
+ id: string;
3557
+ category: string;
3558
+ };
3559
+ output: {
3560
+ success: true;
3561
+ };
3562
+ meta: object;
3563
+ }>;
3564
+ untag: MutationProcedure<{
3565
+ input: {
3566
+ id: string;
3567
+ category: string;
3568
+ };
3569
+ output: {
3570
+ success: true;
3571
+ };
3572
+ meta: object;
3573
+ }>;
3574
+ set: MutationProcedure<{
3575
+ input: {
3576
+ id: string;
3577
+ categories: string[];
3578
+ };
3579
+ output: {
3580
+ success: true;
3581
+ };
3582
+ meta: object;
3583
+ }>;
3584
+ }>>;
3585
+ units: BuiltRouter<{
3586
+ ctx: TrpcContext;
3587
+ meta: object;
3588
+ errorShape: {
3589
+ message: string;
3590
+ data: {
3591
+ httpCode: error.http.StatusCodeCode;
3592
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3593
+ code: TRPC_ERROR_CODE_KEY;
3594
+ path?: string;
3595
+ stack?: string;
3596
+ };
3597
+ code: TRPC_ERROR_CODE_NUMBER;
3598
+ } | {
3599
+ data: {
3600
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3601
+ code: TRPC_ERROR_CODE_KEY;
3602
+ path?: string;
3603
+ stack?: string;
3604
+ };
3605
+ message: string;
3606
+ code: TRPC_ERROR_CODE_NUMBER;
3607
+ };
3608
+ transformer: true;
3609
+ }, DecorateCreateRouterOptions<{
3610
+ list: QueryProcedure<{
3611
+ input: void;
3612
+ output: string[];
3613
+ meta: object;
3614
+ }>;
3615
+ }>>;
3616
+ brands: BuiltRouter<{
3617
+ ctx: TrpcContext;
3618
+ meta: object;
3619
+ errorShape: {
3620
+ message: string;
3621
+ data: {
3622
+ httpCode: error.http.StatusCodeCode;
3623
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3624
+ code: TRPC_ERROR_CODE_KEY;
3625
+ path?: string;
3626
+ stack?: string;
3627
+ };
3628
+ code: TRPC_ERROR_CODE_NUMBER;
3629
+ } | {
3630
+ data: {
3631
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3632
+ code: TRPC_ERROR_CODE_KEY;
3633
+ path?: string;
3634
+ stack?: string;
3635
+ };
3636
+ message: string;
3637
+ code: TRPC_ERROR_CODE_NUMBER;
3638
+ };
3639
+ transformer: true;
3640
+ }, DecorateCreateRouterOptions<{
3641
+ list: QueryProcedure<{
3642
+ input: void;
3643
+ output: string[];
3644
+ meta: object;
3645
+ }>;
3646
+ }>>;
3647
+ vendors: BuiltRouter<{
3648
+ ctx: TrpcContext;
3649
+ meta: object;
3650
+ errorShape: {
3651
+ message: string;
3652
+ data: {
3653
+ httpCode: error.http.StatusCodeCode;
3654
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3655
+ code: TRPC_ERROR_CODE_KEY;
3656
+ path?: string;
3657
+ stack?: string;
3658
+ };
3659
+ code: TRPC_ERROR_CODE_NUMBER;
3660
+ } | {
3661
+ data: {
3662
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3663
+ code: TRPC_ERROR_CODE_KEY;
3664
+ path?: string;
3665
+ stack?: string;
3666
+ };
3667
+ message: string;
3668
+ code: TRPC_ERROR_CODE_NUMBER;
3669
+ };
3670
+ transformer: true;
3671
+ }, DecorateCreateRouterOptions<{
3672
+ list: QueryProcedure<{
3673
+ input: {
3674
+ search?: string | null | undefined;
3675
+ };
3676
+ output: {
3677
+ id: string;
3678
+ name: string;
3679
+ description: string | null;
3680
+ createdAt: Date;
3681
+ modifiedAt: Date;
3682
+ }[];
3683
+ meta: object;
3684
+ }>;
3685
+ get: QueryProcedure<{
3686
+ input: {
3687
+ id: string;
3688
+ };
3689
+ output: {
3690
+ id: string;
3691
+ name: string;
3692
+ description: string | null;
3693
+ createdAt: Date;
3694
+ modifiedAt: Date;
3695
+ };
3696
+ meta: object;
3697
+ }>;
3698
+ create: MutationProcedure<{
3699
+ input: {
3700
+ name: string;
3701
+ description?: string | null | undefined;
3702
+ };
3703
+ output: {
3704
+ id: string;
3705
+ };
3706
+ meta: object;
3707
+ }>;
3708
+ update: MutationProcedure<{
3709
+ input: {
3710
+ id: string;
3711
+ data: {
3712
+ name?: string | undefined;
3713
+ description?: string | null | undefined;
3714
+ };
3715
+ };
3716
+ output: {
3717
+ success: true;
3718
+ };
3719
+ meta: object;
3720
+ }>;
3721
+ delete: MutationProcedure<{
3722
+ input: {
3723
+ id: string;
3724
+ };
3725
+ output: {
3726
+ success: true;
3727
+ };
3728
+ meta: object;
3729
+ }>;
3730
+ }>>;
3731
+ priceRecords: BuiltRouter<{
3732
+ ctx: TrpcContext;
3733
+ meta: object;
3734
+ errorShape: {
3735
+ message: string;
3736
+ data: {
3737
+ httpCode: error.http.StatusCodeCode;
3738
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3739
+ code: TRPC_ERROR_CODE_KEY;
3740
+ path?: string;
3741
+ stack?: string;
3742
+ };
3743
+ code: TRPC_ERROR_CODE_NUMBER;
3744
+ } | {
3745
+ data: {
3746
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3747
+ code: TRPC_ERROR_CODE_KEY;
3748
+ path?: string;
3749
+ stack?: string;
3750
+ };
3751
+ message: string;
3752
+ code: TRPC_ERROR_CODE_NUMBER;
3753
+ };
3754
+ transformer: true;
3755
+ }, DecorateCreateRouterOptions<{
3756
+ list: QueryProcedure<{
3757
+ input: {
3758
+ productId?: string | null | undefined;
3759
+ vendorId?: string | null | undefined;
3760
+ isRealPurchase?: boolean | null | undefined;
3761
+ };
3762
+ output: {
3763
+ id: string;
3764
+ productId: string;
3765
+ vendorId: string | null;
3766
+ timestamp: Date;
3767
+ price: number;
3768
+ isRealPurchase: boolean;
3769
+ comment: string | null;
3770
+ }[];
3771
+ meta: object;
3772
+ }>;
3773
+ create: MutationProcedure<{
3774
+ input: {
3775
+ productId: string;
3776
+ pricePerBaseUnit: number;
3777
+ timestamp: Date;
3778
+ isRealPurchase: boolean;
3779
+ vendorId?: string | null | undefined;
3780
+ comment?: string | null | undefined;
3781
+ };
3782
+ output: {
3783
+ id: string;
3784
+ };
3785
+ meta: object;
3786
+ }>;
3787
+ update: MutationProcedure<{
3788
+ input: {
3789
+ id: string;
3790
+ data: {
3791
+ productId?: string | undefined;
3792
+ vendorId?: string | null | undefined;
3793
+ pricePerBaseUnit?: number | undefined;
3794
+ timestamp?: Date | undefined;
3795
+ isRealPurchase?: boolean | undefined;
3796
+ comment?: string | null | undefined;
3797
+ };
3798
+ };
3799
+ output: {
3800
+ success: true;
3801
+ };
3802
+ meta: object;
3803
+ }>;
3804
+ delete: MutationProcedure<{
3805
+ input: {
3806
+ id: string;
3807
+ };
3808
+ output: {
3809
+ success: true;
3810
+ };
3811
+ meta: object;
3812
+ }>;
3813
+ }>>;
3814
+ suggestNextCustomId: QueryProcedure<{
3815
+ input: void;
3816
+ output: number;
3817
+ meta: object;
3818
+ }>;
3819
+ }>>;
3820
+ deliveryNotes: BuiltRouter<{
3821
+ ctx: TrpcContext;
3822
+ meta: object;
3823
+ errorShape: {
3824
+ message: string;
3825
+ data: {
3826
+ httpCode: error.http.StatusCodeCode;
3827
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3828
+ code: TRPC_ERROR_CODE_KEY;
3829
+ path?: string;
3830
+ stack?: string;
3831
+ };
3832
+ code: TRPC_ERROR_CODE_NUMBER;
3833
+ } | {
3834
+ data: {
3835
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3836
+ code: TRPC_ERROR_CODE_KEY;
3837
+ path?: string;
3838
+ stack?: string;
3839
+ };
3840
+ message: string;
3841
+ code: TRPC_ERROR_CODE_NUMBER;
3842
+ };
3843
+ transformer: true;
3844
+ }, DecorateCreateRouterOptions<{
3845
+ list: QueryProcedure<{
3846
+ input: {
3847
+ projectId?: string | null | undefined;
3848
+ createdByUserId?: string | null | undefined;
3849
+ };
3850
+ output: {
3851
+ id: string;
3852
+ autoId: number;
3853
+ projectId: string;
3854
+ comment: string | null;
3855
+ createdByUserId: string | null;
3856
+ createdAt: Date;
3857
+ effectiveTimestamp: Date;
3858
+ records: {
3859
+ id: string;
3860
+ noteId: string;
3861
+ productId: string;
3862
+ quantity: number;
3863
+ comment: string | null;
3864
+ }[];
3865
+ specialRecords: {
3866
+ id: string;
3867
+ noteId: string;
3868
+ name: string;
3869
+ unit: string;
3870
+ amount: number;
3871
+ pricePerUnit: number | null;
3872
+ comment: string | null;
3873
+ }[];
3874
+ }[];
3875
+ meta: object;
3876
+ }>;
3877
+ create: MutationProcedure<{
3878
+ input: {
3879
+ projectId: string;
3880
+ effectiveTimestamp?: Date | null | undefined;
3881
+ comment?: string | null | undefined;
3882
+ records?: {
3883
+ productId: string;
3884
+ quantity: number;
3885
+ comment?: string | null | undefined;
3886
+ }[] | undefined;
3887
+ specialRecords?: {
3888
+ name: string;
3889
+ unit: string;
3890
+ amount: number;
3891
+ pricePerUnit: number | null;
3892
+ comment?: string | null | undefined;
3893
+ }[] | undefined;
3894
+ };
3895
+ output: {
3896
+ id: string;
3897
+ };
3898
+ meta: object;
3899
+ }>;
3900
+ update: MutationProcedure<{
3901
+ input: {
3902
+ id: string;
3903
+ data: {
3904
+ projectId?: string | null | undefined;
3905
+ effectiveTimestamp?: Date | null | undefined;
3906
+ comment?: string | null | undefined;
3907
+ records?: {
3908
+ productId: string;
3909
+ quantity: number;
3910
+ comment?: string | null | undefined;
3911
+ }[] | null | undefined;
3912
+ specialRecords?: {
3913
+ name: string;
3914
+ unit: string;
3915
+ amount: number;
3916
+ pricePerUnit: number | null;
3917
+ comment?: string | null | undefined;
3918
+ }[] | null | undefined;
3919
+ };
3920
+ };
3921
+ output: {
3922
+ success: true;
3923
+ };
3924
+ meta: object;
3925
+ }>;
3926
+ get: QueryProcedure<{
3927
+ input: {
3928
+ id: string;
3929
+ } | {
3930
+ autoId: unknown;
3931
+ };
3932
+ output: {
3933
+ id: string;
3934
+ autoId: number;
3935
+ projectId: string;
3936
+ comment: string | null;
3937
+ createdByUserId: string | null;
3938
+ createdAt: Date;
3939
+ effectiveTimestamp: Date;
3940
+ records: {
3941
+ id: string;
3942
+ noteId: string;
3943
+ productId: string;
3944
+ quantity: number;
3945
+ comment: string | null;
3946
+ }[];
3947
+ specialRecords: {
3948
+ id: string;
3949
+ noteId: string;
3950
+ name: string;
3951
+ unit: string;
3952
+ amount: number;
3953
+ pricePerUnit: number | null;
3954
+ comment: string | null;
3955
+ }[];
3956
+ };
3957
+ meta: object;
3958
+ }>;
3959
+ delete: MutationProcedure<{
3960
+ input: {
3961
+ id: string;
3962
+ };
3963
+ output: {
3964
+ success: true;
3965
+ };
3966
+ meta: object;
3967
+ }>;
3968
+ costs: BuiltRouter<{
3969
+ ctx: TrpcContext;
3970
+ meta: object;
3971
+ errorShape: {
3972
+ message: string;
3973
+ data: {
3974
+ httpCode: error.http.StatusCodeCode;
3975
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3976
+ code: TRPC_ERROR_CODE_KEY;
3977
+ path?: string;
3978
+ stack?: string;
3979
+ };
3980
+ code: TRPC_ERROR_CODE_NUMBER;
3981
+ } | {
3982
+ data: {
3983
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
3984
+ code: TRPC_ERROR_CODE_KEY;
3985
+ path?: string;
3986
+ stack?: string;
3987
+ };
3988
+ message: string;
3989
+ code: TRPC_ERROR_CODE_NUMBER;
3990
+ };
3991
+ transformer: true;
3992
+ }, DecorateCreateRouterOptions<{
3993
+ get: QueryProcedure<{
3994
+ input: {
3995
+ id: string;
3996
+ };
3997
+ output: {
3998
+ noteId: string;
3999
+ totalCost: number;
4000
+ records: {
4001
+ recordId: string;
4002
+ productId: string;
4003
+ quantity: number;
4004
+ priceRecord: {
4005
+ id: string;
4006
+ productId: string;
4007
+ vendorId: string | null;
4008
+ timestamp: Date;
4009
+ price: number;
4010
+ isRealPurchase: boolean;
4011
+ comment: string | null;
4012
+ } | null;
4013
+ }[];
4014
+ specialRecords: {
4015
+ recordId: string;
4016
+ name: string;
4017
+ unit: string;
4018
+ amount: number;
4019
+ pricePerUnit: number | null;
4020
+ comment: string | null;
4021
+ totalCost: number;
4022
+ }[];
4023
+ };
4024
+ meta: object;
4025
+ }>;
4026
+ }>>;
4027
+ }>>;
4028
+ regieReports: BuiltRouter<{
4029
+ ctx: TrpcContext;
4030
+ meta: object;
4031
+ errorShape: {
4032
+ message: string;
4033
+ data: {
4034
+ httpCode: error.http.StatusCodeCode;
4035
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4036
+ code: TRPC_ERROR_CODE_KEY;
4037
+ path?: string;
4038
+ stack?: string;
4039
+ };
4040
+ code: TRPC_ERROR_CODE_NUMBER;
4041
+ } | {
4042
+ data: {
4043
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4044
+ code: TRPC_ERROR_CODE_KEY;
4045
+ path?: string;
4046
+ stack?: string;
4047
+ };
4048
+ message: string;
4049
+ code: TRPC_ERROR_CODE_NUMBER;
4050
+ };
4051
+ transformer: true;
4052
+ }, DecorateCreateRouterOptions<{
4053
+ list: QueryProcedure<{
4054
+ input: {
4055
+ projectId?: string | null | undefined;
4056
+ dayFrom?: unknown;
4057
+ dayTo?: unknown;
4058
+ limit?: number | undefined;
4059
+ offset?: number | undefined;
4060
+ };
4061
+ output: {
4062
+ id: string;
4063
+ projectId: string;
4064
+ day: Date;
4065
+ summary: string | null;
4066
+ createdByUserId: string;
4067
+ createdAt: Date;
4068
+ autoId: number;
4069
+ products: {
4070
+ id: string;
4071
+ reportId: string;
4072
+ productId: string;
4073
+ quantity: number;
4074
+ comment: string | null;
4075
+ }[];
4076
+ specialRecords: {
4077
+ id: string;
4078
+ reportId: string;
4079
+ name: string;
4080
+ unit: string;
4081
+ amount: number;
4082
+ pricePerUnit: number | null;
4083
+ comment: string | null;
4084
+ }[];
4085
+ workHours: {
4086
+ id: string;
4087
+ reportId: string;
4088
+ userId: string | null;
4089
+ hours: number;
4090
+ costPerHour: number | null;
4091
+ }[];
4092
+ }[];
4093
+ meta: object;
4094
+ }>;
4095
+ get: QueryProcedure<{
4096
+ input: {
4097
+ id: string;
4098
+ };
4099
+ output: {
4100
+ id: string;
4101
+ projectId: string;
4102
+ day: Date;
4103
+ summary: string | null;
4104
+ createdByUserId: string;
4105
+ createdAt: Date;
4106
+ autoId: number;
4107
+ products: {
4108
+ id: string;
4109
+ reportId: string;
4110
+ productId: string;
4111
+ quantity: number;
4112
+ comment: string | null;
4113
+ }[];
4114
+ specialRecords: {
4115
+ id: string;
4116
+ reportId: string;
4117
+ name: string;
4118
+ unit: string;
4119
+ amount: number;
4120
+ pricePerUnit: number | null;
4121
+ comment: string | null;
4122
+ }[];
4123
+ workHours: {
4124
+ id: string;
4125
+ reportId: string;
4126
+ userId: string | null;
4127
+ hours: number;
4128
+ costPerHour: number | null;
4129
+ }[];
4130
+ };
4131
+ meta: object;
4132
+ }>;
4133
+ create: MutationProcedure<{
4134
+ input: {
4135
+ projectId: string;
4136
+ day: unknown;
4137
+ summary?: string | null | undefined;
4138
+ products?: {
4139
+ productId: string;
4140
+ quantity: number;
4141
+ comment?: string | null | undefined;
4142
+ }[] | undefined;
4143
+ specialRecords?: {
4144
+ name: string;
4145
+ unit: string;
4146
+ amount: number;
4147
+ pricePerUnit: number | null;
4148
+ comment?: string | null | undefined;
4149
+ }[] | undefined;
4150
+ workHours?: {
4151
+ hours: number;
4152
+ costPerHour: number | null;
4153
+ userId?: string | null | undefined;
4154
+ }[] | undefined;
4155
+ };
4156
+ output: {
4157
+ id: string;
4158
+ };
4159
+ meta: object;
4160
+ }>;
4161
+ update: MutationProcedure<{
4162
+ input: {
4163
+ id: string;
4164
+ data: {
4165
+ day?: unknown;
4166
+ summary?: string | null | undefined;
4167
+ products?: {
4168
+ productId: string;
4169
+ quantity: number;
4170
+ comment?: string | null | undefined;
4171
+ }[] | null | undefined;
4172
+ specialRecords?: {
4173
+ name: string;
4174
+ unit: string;
4175
+ amount: number;
4176
+ pricePerUnit: number | null;
4177
+ comment?: string | null | undefined;
4178
+ }[] | null | undefined;
4179
+ workHours?: {
4180
+ hours: number;
4181
+ costPerHour: number | null;
4182
+ userId?: string | null | undefined;
4183
+ }[] | null | undefined;
4184
+ };
4185
+ };
4186
+ output: {
4187
+ success: true;
4188
+ };
4189
+ meta: object;
4190
+ }>;
4191
+ delete: MutationProcedure<{
4192
+ input: {
4193
+ id: string;
4194
+ };
4195
+ output: {
4196
+ success: true;
4197
+ };
4198
+ meta: object;
4199
+ }>;
4200
+ costs: BuiltRouter<{
4201
+ ctx: TrpcContext;
4202
+ meta: object;
4203
+ errorShape: {
4204
+ message: string;
4205
+ data: {
4206
+ httpCode: error.http.StatusCodeCode;
4207
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4208
+ code: TRPC_ERROR_CODE_KEY;
4209
+ path?: string;
4210
+ stack?: string;
4211
+ };
4212
+ code: TRPC_ERROR_CODE_NUMBER;
4213
+ } | {
4214
+ data: {
4215
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4216
+ code: TRPC_ERROR_CODE_KEY;
4217
+ path?: string;
4218
+ stack?: string;
4219
+ };
4220
+ message: string;
4221
+ code: TRPC_ERROR_CODE_NUMBER;
4222
+ };
4223
+ transformer: true;
4224
+ }, DecorateCreateRouterOptions<{
4225
+ get: QueryProcedure<{
4226
+ input: {
4227
+ id: string;
4228
+ };
4229
+ output: {
4230
+ reportId: string;
4231
+ totalCost: number;
4232
+ products: {
4233
+ recordId: string;
4234
+ productId: string;
4235
+ quantity: number;
4236
+ priceRecord: {
4237
+ id: string;
4238
+ productId: string;
4239
+ vendorId: string | null;
4240
+ timestamp: Date;
4241
+ price: number;
4242
+ isRealPurchase: boolean;
4243
+ comment: string | null;
4244
+ } | null;
4245
+ }[];
4246
+ specialRecords: {
4247
+ recordId: string;
4248
+ name: string;
4249
+ unit: string;
4250
+ amount: number;
4251
+ pricePerUnit: number | null;
4252
+ comment: string | null;
4253
+ totalCost: number;
4254
+ }[];
4255
+ workHours: {
4256
+ recordId: string;
4257
+ userId: string | null;
4258
+ hours: number;
4259
+ costPerHour: number | null;
4260
+ totalCost: number;
4261
+ }[];
4262
+ };
4263
+ meta: object;
4264
+ }>;
4265
+ }>>;
4266
+ }>>;
4267
+ users: BuiltRouter<{
4268
+ ctx: TrpcContext;
4269
+ meta: object;
4270
+ errorShape: {
4271
+ message: string;
4272
+ data: {
4273
+ httpCode: error.http.StatusCodeCode;
4274
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4275
+ code: TRPC_ERROR_CODE_KEY;
4276
+ path?: string;
4277
+ stack?: string;
4278
+ };
4279
+ code: TRPC_ERROR_CODE_NUMBER;
4280
+ } | {
4281
+ data: {
4282
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4283
+ code: TRPC_ERROR_CODE_KEY;
4284
+ path?: string;
4285
+ stack?: string;
4286
+ };
4287
+ message: string;
4288
+ code: TRPC_ERROR_CODE_NUMBER;
4289
+ };
4290
+ transformer: true;
4291
+ }, DecorateCreateRouterOptions<{
4292
+ list: QueryProcedure<{
4293
+ input: {
4294
+ search?: string | null | undefined;
4295
+ deactivated?: boolean | null | undefined;
4296
+ includeArchived?: boolean | undefined;
4297
+ };
4298
+ output: {
4299
+ id: string;
4300
+ salutation: string | null;
4301
+ firstName: string;
4302
+ lastName: string | null;
4303
+ username: string;
4304
+ email: string | null;
4305
+ phone: string | null;
4306
+ contractType: "internal" | "external" | "subcontractor";
4307
+ costPerHour: number | null;
4308
+ createdAt: Date;
4309
+ modifiedAt: Date;
4310
+ deactivatedAt: Date | null;
4311
+ archivedAt: Date | null;
4312
+ }[];
4313
+ meta: object;
4314
+ }>;
4315
+ get: QueryProcedure<{
4316
+ input: {
4317
+ id: string;
4318
+ };
4319
+ output: {
4320
+ id: string;
4321
+ salutation: string | null;
4322
+ firstName: string;
4323
+ lastName: string | null;
4324
+ username: string;
4325
+ email: string | null;
4326
+ phone: string | null;
4327
+ contractType: "internal" | "external" | "subcontractor";
4328
+ costPerHour: number | null;
4329
+ createdAt: Date;
4330
+ modifiedAt: Date;
4331
+ deactivatedAt: Date | null;
4332
+ archivedAt: Date | null;
4333
+ };
4334
+ meta: object;
4335
+ }>;
4336
+ create: MutationProcedure<{
4337
+ input: {
4338
+ username: string;
4339
+ firstName: string;
4340
+ lastName?: string | null | undefined;
4341
+ email?: string | null | undefined;
4342
+ phone?: string | null | undefined;
4343
+ contractType?: "internal" | "external" | "subcontractor" | undefined;
4344
+ costPerHour?: number | null | undefined;
4345
+ };
4346
+ output: {
4347
+ id: string;
4348
+ };
4349
+ meta: object;
4350
+ }>;
4351
+ update: MutationProcedure<{
4352
+ input: {
4353
+ id: string;
4354
+ data: {
4355
+ username?: string | undefined;
4356
+ firstName?: string | undefined;
4357
+ lastName?: string | null | undefined;
4358
+ email?: string | null | undefined;
4359
+ phone?: string | null | undefined;
4360
+ contractType?: "internal" | "external" | "subcontractor" | null | undefined;
4361
+ costPerHour?: number | null | undefined;
4362
+ };
4363
+ };
4364
+ output: {
4365
+ success: true;
4366
+ };
4367
+ meta: object;
4368
+ }>;
4369
+ delete: MutationProcedure<{
4370
+ input: {
4371
+ id: string;
4372
+ };
4373
+ output: {
4374
+ success: true;
4375
+ };
4376
+ meta: object;
4377
+ }>;
4378
+ archive: MutationProcedure<{
4379
+ input: {
4380
+ id: string;
4381
+ };
4382
+ output: {
4383
+ success: true;
4384
+ };
4385
+ meta: object;
4386
+ }>;
4387
+ unarchive: MutationProcedure<{
4388
+ input: {
4389
+ id: string;
4390
+ };
4391
+ output: {
4392
+ success: true;
4393
+ };
4394
+ meta: object;
4395
+ }>;
4396
+ activate: MutationProcedure<{
4397
+ input: {
4398
+ id: string;
4399
+ };
4400
+ output: {
4401
+ success: true;
4402
+ };
4403
+ meta: object;
4404
+ }>;
4405
+ deactivate: MutationProcedure<{
4406
+ input: {
4407
+ id: string;
4408
+ };
4409
+ output: {
4410
+ success: true;
4411
+ };
4412
+ meta: object;
4413
+ }>;
4414
+ roles: BuiltRouter<{
4415
+ ctx: TrpcContext;
4416
+ meta: object;
4417
+ errorShape: {
4418
+ message: string;
4419
+ data: {
4420
+ httpCode: error.http.StatusCodeCode;
4421
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4422
+ code: TRPC_ERROR_CODE_KEY;
4423
+ path?: string;
4424
+ stack?: string;
4425
+ };
4426
+ code: TRPC_ERROR_CODE_NUMBER;
4427
+ } | {
4428
+ data: {
4429
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4430
+ code: TRPC_ERROR_CODE_KEY;
4431
+ path?: string;
4432
+ stack?: string;
4433
+ };
4434
+ message: string;
4435
+ code: TRPC_ERROR_CODE_NUMBER;
4436
+ };
4437
+ transformer: true;
4438
+ }, DecorateCreateRouterOptions<{
4439
+ list: QueryProcedure<{
4440
+ input: void;
4441
+ 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" | "view:contacts" | "manage:contacts" | "delete:contacts" | "view:dailyProjectReports" | "manage:dailyProjectReports" | "delete:dailyProjectReports" | "view:regieReports" | "manage:regieReports" | "delete:regieReports")[];
4442
+ meta: object;
4443
+ }>;
4444
+ get: QueryProcedure<{
4445
+ input: {
4446
+ userId: string;
4447
+ };
4448
+ 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" | "view:contacts" | "manage:contacts" | "delete:contacts" | "view:dailyProjectReports" | "manage:dailyProjectReports" | "delete:dailyProjectReports" | "view:regieReports" | "manage:regieReports" | "delete:regieReports")[];
4449
+ meta: object;
4450
+ }>;
4451
+ set: MutationProcedure<{
4452
+ input: {
4453
+ userId: string;
4454
+ 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" | "view:contacts" | "manage:contacts" | "delete:contacts" | "view:dailyProjectReports" | "manage:dailyProjectReports" | "delete:dailyProjectReports" | "view:regieReports" | "manage:regieReports" | "delete:regieReports", boolean | null | undefined>;
4455
+ };
4456
+ output: {
4457
+ success: true;
4458
+ };
4459
+ meta: object;
4460
+ }>;
4461
+ }>>;
4462
+ }>>;
4463
+ tools: BuiltRouter<{
4464
+ ctx: TrpcContext;
4465
+ meta: object;
4466
+ errorShape: {
4467
+ message: string;
4468
+ data: {
4469
+ httpCode: error.http.StatusCodeCode;
4470
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4471
+ code: TRPC_ERROR_CODE_KEY;
4472
+ path?: string;
4473
+ stack?: string;
4474
+ };
4475
+ code: TRPC_ERROR_CODE_NUMBER;
4476
+ } | {
4477
+ data: {
4478
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4479
+ code: TRPC_ERROR_CODE_KEY;
4480
+ path?: string;
4481
+ stack?: string;
4482
+ };
4483
+ message: string;
4484
+ code: TRPC_ERROR_CODE_NUMBER;
4485
+ };
4486
+ transformer: true;
4487
+ }, DecorateCreateRouterOptions<{
4488
+ list: QueryProcedure<{
4489
+ input: {
4490
+ search?: string | null | undefined;
4491
+ status?: "lost" | "broken" | "available" | "unavailable" | null | undefined;
4492
+ brand?: string | null | undefined;
4493
+ category?: string | null | undefined;
4494
+ };
4495
+ output: {
4496
+ id: string;
4497
+ customId: number;
4498
+ brand: string;
4499
+ category: string;
4500
+ label: string | null;
4501
+ purchasePrice: number | null;
4502
+ usageCostPerDay: number | null;
4503
+ status: "lost" | "broken" | null;
4504
+ available: boolean;
4505
+ createdByUserId: string | null;
4506
+ createdAt: Date;
4507
+ modifiedAt: Date;
4508
+ archivedSince: Date | null;
4509
+ }[];
4510
+ meta: object;
4511
+ }>;
4512
+ get: QueryProcedure<{
4513
+ input: {
4514
+ id: string;
4515
+ };
4516
+ output: {
4517
+ id: string;
4518
+ customId: number;
4519
+ brand: string;
4520
+ category: string;
4521
+ label: string | null;
4522
+ purchasePrice: number | null;
4523
+ usageCostPerDay: number | null;
4524
+ status: "lost" | "broken" | null;
4525
+ available: boolean;
4526
+ createdByUserId: string | null;
4527
+ createdAt: Date;
4528
+ modifiedAt: Date;
4529
+ archivedSince: Date | null;
4530
+ };
4531
+ meta: object;
4532
+ }>;
4533
+ create: MutationProcedure<{
4534
+ input: {
4535
+ customId: number;
4536
+ brand: string;
4537
+ category: string;
4538
+ label?: string | null | undefined;
4539
+ purchasePrice?: number | null | undefined;
4540
+ usageCostPerDay?: number | null | undefined;
4541
+ status?: "lost" | "broken" | null | undefined;
4542
+ };
4543
+ output: {
4544
+ id: string;
4545
+ };
4546
+ meta: object;
4547
+ }>;
4548
+ update: MutationProcedure<{
4549
+ input: {
4550
+ id: string;
4551
+ data: {
4552
+ brand?: string | undefined;
4553
+ category?: string | undefined;
4554
+ label?: string | null | undefined;
4555
+ purchasePrice?: number | null | undefined;
4556
+ usageCostPerDay?: number | null | undefined;
4557
+ status?: "lost" | "broken" | null | undefined;
4558
+ };
4559
+ };
4560
+ output: {
4561
+ success: true;
4562
+ };
4563
+ meta: object;
4564
+ }>;
4565
+ delete: MutationProcedure<{
4566
+ input: {
4567
+ id: string;
4568
+ };
4569
+ output: {
4570
+ success: true;
4571
+ };
4572
+ meta: object;
4573
+ }>;
4574
+ archive: MutationProcedure<{
4575
+ input: {
4576
+ id: string;
4577
+ };
4578
+ output: {
4579
+ success: true;
4580
+ };
4581
+ meta: object;
4582
+ }>;
4583
+ unarchive: MutationProcedure<{
4584
+ input: {
4585
+ id: string;
4586
+ };
4587
+ output: {
4588
+ success: true;
4589
+ };
4590
+ meta: object;
4591
+ }>;
4592
+ track: MutationProcedure<{
4593
+ input: {
4594
+ id: string;
4595
+ data: {
4596
+ projectId?: string | null | undefined;
4597
+ responsibleUserId?: string | null | undefined;
4598
+ deadlineAt?: unknown;
4599
+ comment?: string | null | undefined;
4600
+ };
4601
+ };
4602
+ output: {
4603
+ trackingId: string;
4604
+ };
4605
+ meta: object;
4606
+ }>;
4607
+ untrack: MutationProcedure<{
4608
+ input: {
4609
+ id: string;
4610
+ };
4611
+ output: {
4612
+ success: true;
4613
+ };
4614
+ meta: object;
4615
+ }>;
4616
+ trackings: BuiltRouter<{
4617
+ ctx: TrpcContext;
4618
+ meta: object;
4619
+ errorShape: {
4620
+ message: string;
4621
+ data: {
4622
+ httpCode: error.http.StatusCodeCode;
4623
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4624
+ code: TRPC_ERROR_CODE_KEY;
4625
+ path?: string;
4626
+ stack?: string;
4627
+ };
4628
+ code: TRPC_ERROR_CODE_NUMBER;
4629
+ } | {
4630
+ data: {
4631
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4632
+ code: TRPC_ERROR_CODE_KEY;
4633
+ path?: string;
4634
+ stack?: string;
4635
+ };
4636
+ message: string;
4637
+ code: TRPC_ERROR_CODE_NUMBER;
4638
+ };
4639
+ transformer: true;
4640
+ }, DecorateCreateRouterOptions<{
4641
+ list: QueryProcedure<{
4642
+ input: {
4643
+ finished?: boolean | null | undefined;
4644
+ toolId?: string | null | undefined;
4645
+ projectId?: string | null | undefined;
4646
+ responsibleUserId?: string | null | undefined;
4647
+ startedByUserId?: string | null | undefined;
4648
+ endedByUserId?: string | null | undefined;
4649
+ startedBefore?: unknown;
4650
+ startedAfter?: unknown;
4651
+ endedBefore?: unknown;
4652
+ endedAfter?: unknown;
4653
+ limit?: number | undefined;
4654
+ offset?: number | undefined;
4655
+ };
4656
+ output: {
4657
+ id: string;
4658
+ toolId: string;
4659
+ projectId: string | null;
4660
+ responsibleUserId: string | null;
4661
+ startedByUserId: string | null;
4662
+ endedByUserId: string | null;
4663
+ toolUsageCostPerDay: number | null;
4664
+ comment: string | null;
4665
+ startedAt: Date;
4666
+ endedAt: Date | null;
4667
+ deadlineAt: Date | null;
4668
+ }[];
4669
+ meta: object;
4670
+ }>;
4671
+ transfers: BuiltRouter<{
4672
+ ctx: TrpcContext;
4673
+ meta: object;
4674
+ errorShape: {
4675
+ message: string;
4676
+ data: {
4677
+ httpCode: error.http.StatusCodeCode;
4678
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4679
+ code: TRPC_ERROR_CODE_KEY;
4680
+ path?: string;
4681
+ stack?: string;
4682
+ };
4683
+ code: TRPC_ERROR_CODE_NUMBER;
4684
+ } | {
4685
+ data: {
4686
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4687
+ code: TRPC_ERROR_CODE_KEY;
4688
+ path?: string;
4689
+ stack?: string;
4690
+ };
4691
+ message: string;
4692
+ code: TRPC_ERROR_CODE_NUMBER;
4693
+ };
4694
+ transformer: true;
4695
+ }, DecorateCreateRouterOptions<{
4696
+ list: QueryProcedure<{
4697
+ input: {
4698
+ toolId?: string | null | undefined;
4699
+ status?: "open" | "denied" | "accepted" | null | undefined;
4700
+ createdByUserId?: string | null | undefined;
4701
+ transferToUserId?: string | null | undefined;
4702
+ projectId?: string | null | undefined;
4703
+ limit?: number | undefined;
4704
+ offset?: number | undefined;
4705
+ };
4706
+ output: {
4707
+ id: string;
4708
+ toolTrackingId: string;
4709
+ toolId: string;
4710
+ transferToUserId: string;
4711
+ createdByUserId: string;
4712
+ projectId: string | null;
4713
+ status: "open" | "denied" | "accepted";
4714
+ notes: string | null;
4715
+ createdAt: Date;
4716
+ responsibleUserId: string | null;
4717
+ toolUsageCostPerDay: number | null;
4718
+ }[];
4719
+ meta: object;
4720
+ }>;
4721
+ request: MutationProcedure<{
4722
+ input: {
4723
+ toolTrackingId: string;
4724
+ transferToUserId?: string | null | undefined;
4725
+ projectId?: string | null | undefined;
4726
+ notes?: string | null | undefined;
4727
+ };
4728
+ output: {
4729
+ id: string;
4730
+ };
4731
+ meta: object;
4732
+ }>;
4733
+ accept: MutationProcedure<{
4734
+ input: {
4735
+ id: string;
4736
+ projectId?: string | null | undefined;
4737
+ };
4738
+ output: {
4739
+ success: true;
4740
+ };
4741
+ meta: object;
4742
+ }>;
4743
+ deny: MutationProcedure<{
4744
+ input: {
4745
+ id: string;
4746
+ };
4747
+ output: {
4748
+ success: true;
4749
+ };
4750
+ meta: object;
4751
+ }>;
4752
+ }>>;
4753
+ }>>;
4754
+ inventories: BuiltRouter<{
4755
+ ctx: TrpcContext;
4756
+ meta: object;
4757
+ errorShape: {
4758
+ message: string;
4759
+ data: {
4760
+ httpCode: error.http.StatusCodeCode;
4761
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4762
+ code: TRPC_ERROR_CODE_KEY;
4763
+ path?: string;
4764
+ stack?: string;
4765
+ };
4766
+ code: TRPC_ERROR_CODE_NUMBER;
4767
+ } | {
4768
+ data: {
4769
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4770
+ code: TRPC_ERROR_CODE_KEY;
4771
+ path?: string;
4772
+ stack?: string;
4773
+ };
4774
+ message: string;
4775
+ code: TRPC_ERROR_CODE_NUMBER;
4776
+ };
4777
+ transformer: true;
4778
+ }, DecorateCreateRouterOptions<{
4779
+ list: QueryProcedure<{
4780
+ input: {
4781
+ toolId?: string | null | undefined;
4782
+ };
4783
+ output: {
4784
+ id: string;
4785
+ toolId: string;
4786
+ comment: string | null;
4787
+ createdAt: Date;
4788
+ }[];
4789
+ meta: object;
4790
+ }>;
4791
+ create: MutationProcedure<{
4792
+ input: {
4793
+ toolId: string;
4794
+ comment?: string | null | undefined;
4795
+ };
4796
+ output: {
4797
+ id: string;
4798
+ };
4799
+ meta: object;
4800
+ }>;
4801
+ delete: MutationProcedure<{
4802
+ input: {
4803
+ id: string;
4804
+ };
4805
+ output: {
4806
+ success: true;
4807
+ };
4808
+ meta: object;
4809
+ }>;
4810
+ }>>;
4811
+ categories: QueryProcedure<{
4812
+ input: void;
4813
+ output: string[];
4814
+ meta: object;
4815
+ }>;
4816
+ brands: QueryProcedure<{
4817
+ input: void;
4818
+ output: string[];
4819
+ meta: object;
4820
+ }>;
4821
+ suggestNextCustomId: QueryProcedure<{
4822
+ input: void;
4823
+ output: number;
4824
+ meta: object;
4825
+ }>;
4826
+ }>>;
4827
+ settings: BuiltRouter<{
4828
+ ctx: TrpcContext;
4829
+ meta: object;
4830
+ errorShape: {
4831
+ message: string;
4832
+ data: {
4833
+ httpCode: error.http.StatusCodeCode;
4834
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4835
+ code: TRPC_ERROR_CODE_KEY;
4836
+ path?: string;
4837
+ stack?: string;
4838
+ };
4839
+ code: TRPC_ERROR_CODE_NUMBER;
4840
+ } | {
4841
+ data: {
4842
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4843
+ code: TRPC_ERROR_CODE_KEY;
4844
+ path?: string;
4845
+ stack?: string;
4846
+ };
4847
+ message: string;
4848
+ code: TRPC_ERROR_CODE_NUMBER;
4849
+ };
4850
+ transformer: true;
4851
+ }, DecorateCreateRouterOptions<{
4852
+ costs: BuiltRouter<{
4853
+ ctx: TrpcContext;
4854
+ meta: object;
4855
+ errorShape: {
4856
+ message: string;
4857
+ data: {
4858
+ httpCode: error.http.StatusCodeCode;
4859
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4860
+ code: TRPC_ERROR_CODE_KEY;
4861
+ path?: string;
4862
+ stack?: string;
4863
+ };
4864
+ code: TRPC_ERROR_CODE_NUMBER;
4865
+ } | {
4866
+ data: {
4867
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4868
+ code: TRPC_ERROR_CODE_KEY;
4869
+ path?: string;
4870
+ stack?: string;
4871
+ };
4872
+ message: string;
4873
+ code: TRPC_ERROR_CODE_NUMBER;
4874
+ };
4875
+ transformer: true;
4876
+ }, DecorateCreateRouterOptions<{
4877
+ get: QueryProcedure<{
4878
+ input: void;
4879
+ output: {
4880
+ fgk: {
4881
+ type: "fgk" | "mgk" | "ngk";
4882
+ effectiveAt: Date;
4883
+ relativeFactor: number;
4884
+ constant: number;
4885
+ };
4886
+ mgk: {
4887
+ type: "fgk" | "mgk" | "ngk";
4888
+ effectiveAt: Date;
4889
+ relativeFactor: number;
4890
+ constant: number;
4891
+ };
4892
+ ngk: {
4893
+ type: "fgk" | "mgk" | "ngk";
4894
+ effectiveAt: Date;
4895
+ relativeFactor: number;
4896
+ constant: number;
4897
+ };
4898
+ history: {
4899
+ id: string;
4900
+ type: "fgk" | "mgk" | "ngk";
4901
+ effectiveAt: Date;
4902
+ relativeFactor: number;
4903
+ constant: number;
4904
+ createdByUserId: string | null;
4905
+ createdAt: Date;
4906
+ modifiedAt: Date;
4907
+ }[];
4908
+ productOverheadFactor: number;
4909
+ workHourOverheadFactor: number;
4910
+ specialRecordOverheadFactor: number;
4911
+ toolOverheadFactor: number;
4912
+ };
4913
+ meta: object;
4914
+ }>;
4915
+ set: MutationProcedure<{
4916
+ input: {
4917
+ type: "fgk" | "mgk" | "ngk";
4918
+ effectiveAt: unknown;
4919
+ relativeFactor: number;
4920
+ constant: number;
4921
+ };
4922
+ output: {
4923
+ success: true;
4924
+ };
4925
+ meta: object;
4926
+ }>;
4927
+ update: MutationProcedure<{
4928
+ input: {
4929
+ productOverheadFactor?: number | undefined;
4930
+ workHourOverheadFactor?: number | undefined;
4931
+ specialRecordOverheadFactor?: number | undefined;
4932
+ toolOverheadFactor?: number | undefined;
4933
+ };
4934
+ output: {
4935
+ success: true;
4936
+ };
4937
+ meta: object;
4938
+ }>;
4939
+ delete: MutationProcedure<{
4940
+ input: {
4941
+ type: "fgk" | "mgk" | "ngk";
4942
+ effectiveAt: unknown;
4943
+ };
4944
+ output: {
4945
+ success: true;
4946
+ };
4947
+ meta: object;
4948
+ }>;
4949
+ }>>;
4950
+ global: BuiltRouter<{
4951
+ ctx: TrpcContext;
4952
+ meta: object;
4953
+ errorShape: {
4954
+ message: string;
4955
+ data: {
4956
+ httpCode: error.http.StatusCodeCode;
4957
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4958
+ code: TRPC_ERROR_CODE_KEY;
4959
+ path?: string;
4960
+ stack?: string;
4961
+ };
4962
+ code: TRPC_ERROR_CODE_NUMBER;
4963
+ } | {
4964
+ data: {
4965
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
4966
+ code: TRPC_ERROR_CODE_KEY;
4967
+ path?: string;
4968
+ stack?: string;
4969
+ };
4970
+ message: string;
4971
+ code: TRPC_ERROR_CODE_NUMBER;
4972
+ };
4973
+ transformer: true;
4974
+ }, DecorateCreateRouterOptions<{
4975
+ get: QueryProcedure<{
4976
+ input: {
4977
+ key: string;
4978
+ };
4979
+ output: {
4980
+ key: string;
4981
+ name: any;
4982
+ };
4983
+ meta: object;
4984
+ }>;
4985
+ set: MutationProcedure<{
4986
+ input: {
4987
+ key: string;
4988
+ name: any;
4989
+ };
4990
+ output: {
4991
+ success: true;
4992
+ };
4993
+ meta: object;
4994
+ }>;
4995
+ delete: MutationProcedure<{
4996
+ input: {
4997
+ key: string;
4998
+ };
4999
+ output: {
5000
+ success: true;
5001
+ };
5002
+ meta: object;
5003
+ }>;
5004
+ }>>;
5005
+ publicGlobal: BuiltRouter<{
5006
+ ctx: TrpcContext;
5007
+ meta: object;
5008
+ errorShape: {
5009
+ message: string;
5010
+ data: {
5011
+ httpCode: error.http.StatusCodeCode;
5012
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
5013
+ code: TRPC_ERROR_CODE_KEY;
5014
+ path?: string;
5015
+ stack?: string;
5016
+ };
5017
+ code: TRPC_ERROR_CODE_NUMBER;
5018
+ } | {
5019
+ data: {
5020
+ validationErrors: import("zod/v4/core").$ZodIssue[] | undefined;
5021
+ code: TRPC_ERROR_CODE_KEY;
5022
+ path?: string;
5023
+ stack?: string;
5024
+ };
5025
+ message: string;
5026
+ code: TRPC_ERROR_CODE_NUMBER;
5027
+ };
5028
+ transformer: true;
5029
+ }, DecorateCreateRouterOptions<{
5030
+ get: QueryProcedure<{
5031
+ input: {
5032
+ key: string;
5033
+ };
5034
+ output: {
5035
+ key: string;
5036
+ name: any;
5037
+ };
5038
+ meta: object;
5039
+ }>;
5040
+ set: MutationProcedure<{
5041
+ input: {
5042
+ key: string;
5043
+ name: any;
5044
+ };
5045
+ output: {
5046
+ success: true;
5047
+ };
5048
+ meta: object;
5049
+ }>;
5050
+ delete: MutationProcedure<{
5051
+ input: {
5052
+ key: string;
5053
+ };
5054
+ output: {
5055
+ success: true;
5056
+ };
5057
+ meta: object;
5058
+ }>;
5059
+ }>>;
5060
+ }>>;
2066
5061
  }>>;
2067
5062
  export type AppRouter = typeof appRouter;
2068
5063
  interface Cache$1 {