@navservice/core 1.114.0 → 1.116.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.
- package/build/es/helpers/_set_response.d.ts +12 -11
- package/build/es/helpers/_token.d.ts +2 -2
- package/build/es/helpers/index.d.ts +18 -13
- package/build/es/helpers.js +190 -43
- package/build/es/index.js +2 -1
- package/build/es/types/_type_response.d.ts +3 -3
- package/build/lib/helpers/_set_response.d.ts +12 -11
- package/build/lib/helpers/_token.d.ts +2 -2
- package/build/lib/helpers/index.d.ts +18 -13
- package/build/lib/helpers.cjs +201 -50
- package/build/lib/index.cjs +2 -1
- package/build/lib/types/_type_response.d.ts +3 -3
- package/package.json +1 -1
package/build/lib/helpers.cjs
CHANGED
|
@@ -57,9 +57,59 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
57
57
|
;// CONCATENATED MODULE: external "zod/v4"
|
|
58
58
|
const v4_namespaceObject = require("zod/v4");
|
|
59
59
|
var v4_default = /*#__PURE__*/__webpack_require__.n(v4_namespaceObject);
|
|
60
|
+
;// CONCATENATED MODULE: external "node:async_hooks"
|
|
61
|
+
const external_node_async_hooks_namespaceObject = require("node:async_hooks");
|
|
62
|
+
;// CONCATENATED MODULE: ./src/helpers/_logger.ts
|
|
63
|
+
|
|
64
|
+
class RequestLoggerClass {
|
|
65
|
+
storage = new external_node_async_hooks_namespaceObject.AsyncLocalStorage();
|
|
66
|
+
run(callback) {
|
|
67
|
+
return this.storage.run({
|
|
68
|
+
requestId: crypto.randomUUID(),
|
|
69
|
+
logs: [],
|
|
70
|
+
startedAt: Date.now()
|
|
71
|
+
}, callback);
|
|
72
|
+
}
|
|
73
|
+
add(entry) {
|
|
74
|
+
const store = this.storage.getStore();
|
|
75
|
+
if (!store) return;
|
|
76
|
+
store.logs.push({
|
|
77
|
+
...entry,
|
|
78
|
+
timestamp: Date.now()
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
build() {
|
|
82
|
+
const store = this.storage.getStore();
|
|
83
|
+
if (!store || store.logs.length === 0) return null;
|
|
84
|
+
const durationMs = Date.now() - store.startedAt;
|
|
85
|
+
const level = this.resolveLevel(store.logs);
|
|
86
|
+
const payload = {
|
|
87
|
+
requestId: store.requestId,
|
|
88
|
+
durationMs,
|
|
89
|
+
level,
|
|
90
|
+
logs: store.logs
|
|
91
|
+
};
|
|
92
|
+
const output = JSON.stringify(payload);
|
|
93
|
+
if (level === "error") {
|
|
94
|
+
console.error(output);
|
|
95
|
+
} else {
|
|
96
|
+
console.log(output);
|
|
97
|
+
}
|
|
98
|
+
return payload;
|
|
99
|
+
}
|
|
100
|
+
resolveLevel(logs) {
|
|
101
|
+
if (logs.some((l)=>l.level === "error")) return "error";
|
|
102
|
+
if (logs.some((l)=>l.level === "warn")) return "warn";
|
|
103
|
+
return "info";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const _logger = new RequestLoggerClass();
|
|
107
|
+
/* export default */ const helpers_logger = (_logger);
|
|
108
|
+
|
|
60
109
|
;// CONCATENATED MODULE: ./src/helpers/_set_response.ts
|
|
61
110
|
// TYPES
|
|
62
111
|
|
|
112
|
+
|
|
63
113
|
const set_response = new class set_response {
|
|
64
114
|
c = new class c {
|
|
65
115
|
SUCCESS({ message, results, c }) {
|
|
@@ -70,6 +120,12 @@ const set_response = new class set_response {
|
|
|
70
120
|
message: message || "Realizado com sucesso!",
|
|
71
121
|
results: results || []
|
|
72
122
|
};
|
|
123
|
+
helpers_logger.add({
|
|
124
|
+
fn: "SUCCESS",
|
|
125
|
+
level: "info",
|
|
126
|
+
message: payload?.message,
|
|
127
|
+
results: payload?.results
|
|
128
|
+
});
|
|
73
129
|
return c.json(payload, {
|
|
74
130
|
status: 200
|
|
75
131
|
});
|
|
@@ -82,6 +138,12 @@ const set_response = new class set_response {
|
|
|
82
138
|
message: message || "Ação adicional necessária!",
|
|
83
139
|
results: results || []
|
|
84
140
|
};
|
|
141
|
+
helpers_logger.add({
|
|
142
|
+
fn: "ACTION_REQUIRED",
|
|
143
|
+
level: "info",
|
|
144
|
+
message: payload?.message,
|
|
145
|
+
results: payload?.results
|
|
146
|
+
});
|
|
85
147
|
return c.json(payload, {
|
|
86
148
|
status: 428
|
|
87
149
|
});
|
|
@@ -94,6 +156,12 @@ const set_response = new class set_response {
|
|
|
94
156
|
message: message || "Criado com sucesso!",
|
|
95
157
|
results: results || []
|
|
96
158
|
};
|
|
159
|
+
helpers_logger.add({
|
|
160
|
+
fn: "CREATED",
|
|
161
|
+
level: "info",
|
|
162
|
+
message: payload?.message,
|
|
163
|
+
results: payload?.results
|
|
164
|
+
});
|
|
97
165
|
return c.json(payload, {
|
|
98
166
|
status: 201
|
|
99
167
|
});
|
|
@@ -106,6 +174,12 @@ const set_response = new class set_response {
|
|
|
106
174
|
message: message || "Aviso!",
|
|
107
175
|
results: results || []
|
|
108
176
|
};
|
|
177
|
+
helpers_logger.add({
|
|
178
|
+
fn: "WARNING",
|
|
179
|
+
level: "info",
|
|
180
|
+
message: payload?.message,
|
|
181
|
+
results: payload?.results
|
|
182
|
+
});
|
|
109
183
|
return c.json(payload, {
|
|
110
184
|
status: 400
|
|
111
185
|
});
|
|
@@ -118,6 +192,12 @@ const set_response = new class set_response {
|
|
|
118
192
|
message: message || "Aviso!",
|
|
119
193
|
results: results || []
|
|
120
194
|
};
|
|
195
|
+
helpers_logger.add({
|
|
196
|
+
fn: "AUTHORIZATION_ERROR",
|
|
197
|
+
level: "error",
|
|
198
|
+
message: payload?.message,
|
|
199
|
+
results: payload?.results
|
|
200
|
+
});
|
|
121
201
|
return c.json(payload, {
|
|
122
202
|
status: 405
|
|
123
203
|
});
|
|
@@ -131,6 +211,12 @@ const set_response = new class set_response {
|
|
|
131
211
|
message: "Erro ao validar dados!",
|
|
132
212
|
results: v4_default().treeifyError(error)
|
|
133
213
|
};
|
|
214
|
+
helpers_logger.add({
|
|
215
|
+
fn: "SCHEMA_VALIDATION",
|
|
216
|
+
level: "error",
|
|
217
|
+
message: payload?.message,
|
|
218
|
+
results: payload?.results
|
|
219
|
+
});
|
|
134
220
|
return c.json(payload, {
|
|
135
221
|
status: 500
|
|
136
222
|
});
|
|
@@ -142,6 +228,14 @@ const set_response = new class set_response {
|
|
|
142
228
|
message: error?.message || "Erro interno no servidor!",
|
|
143
229
|
results: error?.results || []
|
|
144
230
|
};
|
|
231
|
+
if (payload?.type === "error") {
|
|
232
|
+
helpers_logger.add({
|
|
233
|
+
fn: "SERVER_ERROR",
|
|
234
|
+
level: payload?.type,
|
|
235
|
+
message: payload?.message,
|
|
236
|
+
results: payload?.results
|
|
237
|
+
});
|
|
238
|
+
}
|
|
145
239
|
return c.json(payload, {
|
|
146
240
|
status: error?.status || error?.status || 500
|
|
147
241
|
});
|
|
@@ -154,6 +248,12 @@ const set_response = new class set_response {
|
|
|
154
248
|
message: message || "Não autorizado!",
|
|
155
249
|
results: []
|
|
156
250
|
};
|
|
251
|
+
helpers_logger.add({
|
|
252
|
+
fn: "UNAUTHORIZED",
|
|
253
|
+
level: "error",
|
|
254
|
+
message: payload?.message,
|
|
255
|
+
results: payload?.results
|
|
256
|
+
});
|
|
157
257
|
return c.json(payload, {
|
|
158
258
|
status: 401
|
|
159
259
|
});
|
|
@@ -166,6 +266,12 @@ const set_response = new class set_response {
|
|
|
166
266
|
message: message || "Token inválido!",
|
|
167
267
|
results: []
|
|
168
268
|
};
|
|
269
|
+
helpers_logger.add({
|
|
270
|
+
fn: "INVALID_TOKEN",
|
|
271
|
+
level: "error",
|
|
272
|
+
message: payload?.message,
|
|
273
|
+
results: payload?.results
|
|
274
|
+
});
|
|
169
275
|
return c.json(payload, {
|
|
170
276
|
status: 409
|
|
171
277
|
});
|
|
@@ -178,6 +284,12 @@ const set_response = new class set_response {
|
|
|
178
284
|
message: message || "Recurso não encontrado!",
|
|
179
285
|
results: []
|
|
180
286
|
};
|
|
287
|
+
helpers_logger.add({
|
|
288
|
+
fn: "NOT_FOUND",
|
|
289
|
+
level: "info",
|
|
290
|
+
message: payload?.message,
|
|
291
|
+
results: payload?.results
|
|
292
|
+
});
|
|
181
293
|
return c.json(payload, {
|
|
182
294
|
status: 404
|
|
183
295
|
});
|
|
@@ -188,6 +300,12 @@ const set_response = new class set_response {
|
|
|
188
300
|
"Content-Type": content_type,
|
|
189
301
|
"Content-Disposition": filename ? `inline; filename="${filename}"` : "inline"
|
|
190
302
|
};
|
|
303
|
+
helpers_logger.add({
|
|
304
|
+
fn: "SUCCESS_FILE",
|
|
305
|
+
level: "info",
|
|
306
|
+
message: "",
|
|
307
|
+
results: headers
|
|
308
|
+
});
|
|
191
309
|
return c.json(file_buffer, {
|
|
192
310
|
status: 200,
|
|
193
311
|
headers
|
|
@@ -200,6 +318,12 @@ const set_response = new class set_response {
|
|
|
200
318
|
message: message || "Erro ao retornar arquivo!",
|
|
201
319
|
results: []
|
|
202
320
|
};
|
|
321
|
+
helpers_logger.add({
|
|
322
|
+
fn: "SUCCESS_FILE",
|
|
323
|
+
level: "info",
|
|
324
|
+
message: payload?.message,
|
|
325
|
+
results: payload?.results
|
|
326
|
+
});
|
|
203
327
|
return c.json(payload, {
|
|
204
328
|
status: 200
|
|
205
329
|
});
|
|
@@ -214,6 +338,12 @@ const set_response = new class set_response {
|
|
|
214
338
|
message: message || "Ação adicional necessária!",
|
|
215
339
|
results: results || []
|
|
216
340
|
};
|
|
341
|
+
helpers_logger.add({
|
|
342
|
+
fn: "ACTION_REQUIRED",
|
|
343
|
+
level: "info",
|
|
344
|
+
message: payload?.message,
|
|
345
|
+
results: payload?.results
|
|
346
|
+
});
|
|
217
347
|
throw payload;
|
|
218
348
|
}
|
|
219
349
|
WARNING({ message, results }) {
|
|
@@ -224,6 +354,12 @@ const set_response = new class set_response {
|
|
|
224
354
|
message: message || "Aviso!",
|
|
225
355
|
results: results || []
|
|
226
356
|
};
|
|
357
|
+
helpers_logger.add({
|
|
358
|
+
fn: "WARNING",
|
|
359
|
+
level: "info",
|
|
360
|
+
message: payload?.message,
|
|
361
|
+
results: payload?.results
|
|
362
|
+
});
|
|
227
363
|
throw payload;
|
|
228
364
|
}
|
|
229
365
|
AUTHORIZATION_ERROR({ message, results }) {
|
|
@@ -234,9 +370,16 @@ const set_response = new class set_response {
|
|
|
234
370
|
message: message || "Aviso!",
|
|
235
371
|
results: results || []
|
|
236
372
|
};
|
|
373
|
+
helpers_logger.add({
|
|
374
|
+
fn: "AUTHORIZATION_ERROR",
|
|
375
|
+
level: "error",
|
|
376
|
+
message: payload?.message,
|
|
377
|
+
results: payload?.results
|
|
378
|
+
});
|
|
237
379
|
throw payload;
|
|
238
380
|
}
|
|
239
|
-
|
|
381
|
+
// CONTEM _LOGGER PARA FACILITAR OS LOGS DE TRACING DO SISTEMA
|
|
382
|
+
DATABASE_ERROR({ message, erro }) {
|
|
240
383
|
const errorCode = erro?.cause?.code || erro?.cause?.cause?.code || erro?.code || "";
|
|
241
384
|
const map = {
|
|
242
385
|
"SQLITE_CONSTRAINT_UNIQUE": {
|
|
@@ -279,6 +422,12 @@ const set_response = new class set_response {
|
|
|
279
422
|
message: mapped?.message || message || "Erro no banco de dados!",
|
|
280
423
|
results: []
|
|
281
424
|
};
|
|
425
|
+
helpers_logger.add({
|
|
426
|
+
fn: "DATABASE_ERROR",
|
|
427
|
+
level: "error",
|
|
428
|
+
message: payload?.message,
|
|
429
|
+
results: erro
|
|
430
|
+
});
|
|
282
431
|
throw payload;
|
|
283
432
|
}
|
|
284
433
|
SCHEMA_VALIDATION({ results }) {
|
|
@@ -289,6 +438,12 @@ const set_response = new class set_response {
|
|
|
289
438
|
message: "Erro ao validar dados!",
|
|
290
439
|
results: results || []
|
|
291
440
|
};
|
|
441
|
+
helpers_logger.add({
|
|
442
|
+
fn: "SCHEMA_VALIDATION",
|
|
443
|
+
level: "error",
|
|
444
|
+
message: payload?.message,
|
|
445
|
+
results: payload?.results
|
|
446
|
+
});
|
|
292
447
|
throw payload;
|
|
293
448
|
}
|
|
294
449
|
UNAUTHORIZED({ message }) {
|
|
@@ -298,6 +453,27 @@ const set_response = new class set_response {
|
|
|
298
453
|
type: "error",
|
|
299
454
|
message: message || "Não autorizado!"
|
|
300
455
|
};
|
|
456
|
+
helpers_logger.add({
|
|
457
|
+
fn: "UNAUTHORIZED",
|
|
458
|
+
level: "error",
|
|
459
|
+
message: payload?.message,
|
|
460
|
+
results: payload?.results
|
|
461
|
+
});
|
|
462
|
+
throw payload;
|
|
463
|
+
}
|
|
464
|
+
INTEGRATION_ERROR({ message }) {
|
|
465
|
+
const payload = {
|
|
466
|
+
status: 401,
|
|
467
|
+
code: "INTEGRATION_ERROR",
|
|
468
|
+
type: "error",
|
|
469
|
+
message: message || "Erro na camada de integração!"
|
|
470
|
+
};
|
|
471
|
+
helpers_logger.add({
|
|
472
|
+
fn: "INTEGRATION_ERROR",
|
|
473
|
+
level: "error",
|
|
474
|
+
message: payload?.message,
|
|
475
|
+
results: payload?.results
|
|
476
|
+
});
|
|
301
477
|
throw payload;
|
|
302
478
|
}
|
|
303
479
|
INVALID_TOKEN({ message }) {
|
|
@@ -308,6 +484,12 @@ const set_response = new class set_response {
|
|
|
308
484
|
message: message || "Token inválido!",
|
|
309
485
|
results: []
|
|
310
486
|
};
|
|
487
|
+
helpers_logger.add({
|
|
488
|
+
fn: "INVALID_TOKEN",
|
|
489
|
+
level: "error",
|
|
490
|
+
message: payload?.message,
|
|
491
|
+
results: payload?.results
|
|
492
|
+
});
|
|
311
493
|
throw payload;
|
|
312
494
|
}
|
|
313
495
|
NOT_FOUND({ message }) {
|
|
@@ -317,6 +499,12 @@ const set_response = new class set_response {
|
|
|
317
499
|
type: "error",
|
|
318
500
|
message: message || "Recurso não encontrado!"
|
|
319
501
|
};
|
|
502
|
+
helpers_logger.add({
|
|
503
|
+
fn: "NOT_FOUND",
|
|
504
|
+
level: "info",
|
|
505
|
+
message: payload?.message,
|
|
506
|
+
results: payload?.results
|
|
507
|
+
});
|
|
320
508
|
throw payload;
|
|
321
509
|
}
|
|
322
510
|
BUSINESS_RULE_VIOLATION({ message, results }) {
|
|
@@ -327,6 +515,12 @@ const set_response = new class set_response {
|
|
|
327
515
|
message: message || "Limite atingido ou regra de negócio violada!",
|
|
328
516
|
results: results || []
|
|
329
517
|
};
|
|
518
|
+
helpers_logger.add({
|
|
519
|
+
fn: "BUSINESS_RULE_VIOLATION",
|
|
520
|
+
level: "info",
|
|
521
|
+
message: payload?.message,
|
|
522
|
+
results: payload?.results
|
|
523
|
+
});
|
|
330
524
|
throw payload;
|
|
331
525
|
}
|
|
332
526
|
PLAN_FORBIDDEN({ message, results }) {
|
|
@@ -337,6 +531,12 @@ const set_response = new class set_response {
|
|
|
337
531
|
message: message || "Plano inativo ou sem permissão para esta ação!",
|
|
338
532
|
results: results || []
|
|
339
533
|
};
|
|
534
|
+
helpers_logger.add({
|
|
535
|
+
fn: "PLAN_FORBIDDEN",
|
|
536
|
+
level: "info",
|
|
537
|
+
message: payload?.message,
|
|
538
|
+
results: payload?.results
|
|
539
|
+
});
|
|
340
540
|
throw payload;
|
|
341
541
|
}
|
|
342
542
|
};
|
|
@@ -571,55 +771,6 @@ class _data {
|
|
|
571
771
|
}
|
|
572
772
|
/* export default */ const helpers_data = (new _data);
|
|
573
773
|
|
|
574
|
-
;// CONCATENATED MODULE: external "node:async_hooks"
|
|
575
|
-
const external_node_async_hooks_namespaceObject = require("node:async_hooks");
|
|
576
|
-
;// CONCATENATED MODULE: ./src/helpers/_logger.ts
|
|
577
|
-
|
|
578
|
-
class RequestLoggerClass {
|
|
579
|
-
storage = new external_node_async_hooks_namespaceObject.AsyncLocalStorage();
|
|
580
|
-
run(callback) {
|
|
581
|
-
return this.storage.run({
|
|
582
|
-
requestId: crypto.randomUUID(),
|
|
583
|
-
logs: [],
|
|
584
|
-
startedAt: Date.now()
|
|
585
|
-
}, callback);
|
|
586
|
-
}
|
|
587
|
-
add(entry) {
|
|
588
|
-
const store = this.storage.getStore();
|
|
589
|
-
if (!store) return;
|
|
590
|
-
store.logs.push({
|
|
591
|
-
...entry,
|
|
592
|
-
timestamp: Date.now()
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
build() {
|
|
596
|
-
const store = this.storage.getStore();
|
|
597
|
-
if (!store || store.logs.length === 0) return null;
|
|
598
|
-
const durationMs = Date.now() - store.startedAt;
|
|
599
|
-
const level = this.resolveLevel(store.logs);
|
|
600
|
-
const payload = {
|
|
601
|
-
requestId: store.requestId,
|
|
602
|
-
durationMs,
|
|
603
|
-
level,
|
|
604
|
-
logs: store.logs
|
|
605
|
-
};
|
|
606
|
-
const output = JSON.stringify(payload);
|
|
607
|
-
if (level === "error") {
|
|
608
|
-
console.error(output);
|
|
609
|
-
} else {
|
|
610
|
-
console.log(output);
|
|
611
|
-
}
|
|
612
|
-
return payload;
|
|
613
|
-
}
|
|
614
|
-
resolveLevel(logs) {
|
|
615
|
-
if (logs.some((l)=>l.level === "error")) return "error";
|
|
616
|
-
if (logs.some((l)=>l.level === "warn")) return "warn";
|
|
617
|
-
return "info";
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
const _logger = new RequestLoggerClass();
|
|
621
|
-
/* export default */ const helpers_logger = (_logger);
|
|
622
|
-
|
|
623
774
|
;// CONCATENATED MODULE: ./src/helpers/index.ts
|
|
624
775
|
//_HELPERS
|
|
625
776
|
|
package/build/lib/index.cjs
CHANGED
|
@@ -153,7 +153,8 @@ var _usuario_TypeControllerUsuario;
|
|
|
153
153
|
v4_default().literal("SUCCESS_FILE"),
|
|
154
154
|
v4_default().literal("DATABASE_ERROR"),
|
|
155
155
|
v4_default().literal("BUSINESS_RULE_VIOLATION"),
|
|
156
|
-
v4_default().literal("PLAN_FORBIDDEN")
|
|
156
|
+
v4_default().literal("PLAN_FORBIDDEN"),
|
|
157
|
+
v4_default().literal("INTEGRATION_ERROR")
|
|
157
158
|
]);
|
|
158
159
|
const BaseResponseSchema = v4_default().object({
|
|
159
160
|
status: StatusSchema,
|
|
@@ -3,7 +3,7 @@ import z4 from "zod/v4";
|
|
|
3
3
|
declare namespace TypeControllerResponse {
|
|
4
4
|
const BaseResponseSchema: z4.ZodObject<{
|
|
5
5
|
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
6
|
-
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">]>;
|
|
6
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">, z4.ZodLiteral<"INTEGRATION_ERROR">]>;
|
|
7
7
|
type: z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>;
|
|
8
8
|
message: z4.ZodString;
|
|
9
9
|
results: z4.ZodOptional<z4.ZodUnknown>;
|
|
@@ -15,7 +15,7 @@ declare namespace TypeControllerResponse {
|
|
|
15
15
|
export namespace C {
|
|
16
16
|
export const InputSchema: z4.ZodObject<{
|
|
17
17
|
status: z4.ZodUnion<readonly [z4.ZodLiteral<200>, z4.ZodLiteral<201>, z4.ZodLiteral<202>, z4.ZodLiteral<204>, z4.ZodLiteral<400>, z4.ZodLiteral<401>, z4.ZodLiteral<403>, z4.ZodLiteral<404>, z4.ZodLiteral<409>, z4.ZodLiteral<422>, z4.ZodLiteral<500>, z4.ZodLiteral<428>, z4.ZodLiteral<405>]>;
|
|
18
|
-
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">]>;
|
|
18
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">, z4.ZodLiteral<"INTEGRATION_ERROR">]>;
|
|
19
19
|
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
20
20
|
message: z4.ZodOptional<z4.ZodString>;
|
|
21
21
|
results: z4.ZodAny;
|
|
@@ -41,7 +41,7 @@ declare namespace TypeControllerResponse {
|
|
|
41
41
|
message: z4.ZodOptional<z4.ZodString>;
|
|
42
42
|
results: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodArray<z4.ZodUnknown>, z4.ZodUnknown]>>;
|
|
43
43
|
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
44
|
-
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">]>;
|
|
44
|
+
code: z4.ZodUnion<readonly [z4.ZodLiteral<"SUCCESS">, z4.ZodLiteral<"ACTION_REQUIRED">, z4.ZodLiteral<"CREATED">, z4.ZodLiteral<"WARNING">, z4.ZodLiteral<"AUTHORIZATION_ERROR">, z4.ZodLiteral<"SCHEMA_VALIDATION">, z4.ZodLiteral<"SERVER_ERROR">, z4.ZodLiteral<"UNAUTHORIZED">, z4.ZodLiteral<"INVALID_TOKEN">, z4.ZodLiteral<"NOT_FOUND">, z4.ZodLiteral<"SUCCESS_FILE">, z4.ZodLiteral<"DATABASE_ERROR">, z4.ZodLiteral<"BUSINESS_RULE_VIOLATION">, z4.ZodLiteral<"PLAN_FORBIDDEN">, z4.ZodLiteral<"INTEGRATION_ERROR">]>;
|
|
45
45
|
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
46
|
fn: z4.ZodOptional<z4.ZodString>;
|
|
47
47
|
}, z4.core.$strip>;
|