@navservice/core 1.112.0 → 1.114.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/_logger.d.ts +28 -0
- package/build/es/helpers/index.d.ts +50 -0
- package/build/es/helpers.js +44 -1
- package/build/es/index.js +11 -2
- package/build/es/types/_type_response.d.ts +1 -0
- package/build/es/types/_usuario.d.ts +3 -1
- package/build/lib/helpers/_logger.d.ts +28 -0
- package/build/lib/helpers/index.d.ts +50 -0
- package/build/lib/helpers.cjs +52 -1
- package/build/lib/index.cjs +11 -2
- package/build/lib/types/_type_response.d.ts +1 -0
- package/build/lib/types/_usuario.d.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
type Level = "info" | "warn" | "error";
|
|
3
|
+
type LogEntry = {
|
|
4
|
+
level: Level;
|
|
5
|
+
fn: string;
|
|
6
|
+
message: string;
|
|
7
|
+
results: any;
|
|
8
|
+
timestamp?: number;
|
|
9
|
+
};
|
|
10
|
+
type RequestStore = {
|
|
11
|
+
requestId: string;
|
|
12
|
+
logs: LogEntry[];
|
|
13
|
+
startedAt: number;
|
|
14
|
+
};
|
|
15
|
+
declare class RequestLoggerClass {
|
|
16
|
+
storage: AsyncLocalStorage<RequestStore>;
|
|
17
|
+
run<T>(callback: () => Promise<T>): Promise<T>;
|
|
18
|
+
add(entry: Omit<LogEntry, "timestamp">): void;
|
|
19
|
+
build(): {
|
|
20
|
+
requestId: string;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
level: Level;
|
|
23
|
+
logs: LogEntry[];
|
|
24
|
+
} | null;
|
|
25
|
+
resolveLevel(logs: LogEntry[]): Level;
|
|
26
|
+
}
|
|
27
|
+
declare const _logger: RequestLoggerClass;
|
|
28
|
+
export default _logger;
|
|
@@ -164,44 +164,54 @@ declare const helpers: {
|
|
|
164
164
|
ACTION_REQUIRED({ message, results }: {
|
|
165
165
|
message?: string | undefined;
|
|
166
166
|
results?: unknown;
|
|
167
|
+
fn?: string | undefined;
|
|
167
168
|
}): void;
|
|
168
169
|
WARNING({ message, results }: {
|
|
169
170
|
message?: string | undefined;
|
|
170
171
|
results?: unknown;
|
|
172
|
+
fn?: string | undefined;
|
|
171
173
|
}): void;
|
|
172
174
|
AUTHORIZATION_ERROR({ message, results }: {
|
|
173
175
|
message?: string | undefined;
|
|
174
176
|
results?: unknown;
|
|
177
|
+
fn?: string | undefined;
|
|
175
178
|
}): void;
|
|
176
179
|
DATABASE_ERROR({ message, results, erro }: {
|
|
177
180
|
message?: string | undefined;
|
|
178
181
|
results?: unknown;
|
|
182
|
+
fn?: string | undefined;
|
|
179
183
|
} & {
|
|
180
184
|
erro: any;
|
|
181
185
|
}): void;
|
|
182
186
|
SCHEMA_VALIDATION({ results }: {
|
|
183
187
|
message?: string | undefined;
|
|
184
188
|
results?: unknown;
|
|
189
|
+
fn?: string | undefined;
|
|
185
190
|
}): void;
|
|
186
191
|
UNAUTHORIZED({ message }: {
|
|
187
192
|
message?: string | undefined;
|
|
188
193
|
results?: unknown;
|
|
194
|
+
fn?: string | undefined;
|
|
189
195
|
}): void;
|
|
190
196
|
INVALID_TOKEN({ message }: {
|
|
191
197
|
message?: string | undefined;
|
|
192
198
|
results?: unknown;
|
|
199
|
+
fn?: string | undefined;
|
|
193
200
|
}): void;
|
|
194
201
|
NOT_FOUND({ message }: {
|
|
195
202
|
message?: string | undefined;
|
|
196
203
|
results?: unknown;
|
|
204
|
+
fn?: string | undefined;
|
|
197
205
|
}): void;
|
|
198
206
|
BUSINESS_RULE_VIOLATION({ message, results }: {
|
|
199
207
|
message?: string | undefined;
|
|
200
208
|
results?: unknown;
|
|
209
|
+
fn?: string | undefined;
|
|
201
210
|
}): void;
|
|
202
211
|
PLAN_FORBIDDEN({ message, results }: {
|
|
203
212
|
message?: string | undefined;
|
|
204
213
|
results?: unknown;
|
|
214
|
+
fn?: string | undefined;
|
|
205
215
|
}): void;
|
|
206
216
|
};
|
|
207
217
|
};
|
|
@@ -248,5 +258,45 @@ declare const helpers: {
|
|
|
248
258
|
get get_now_format_number(): number;
|
|
249
259
|
verificar_data(value: number): number;
|
|
250
260
|
};
|
|
261
|
+
logger: {
|
|
262
|
+
storage: import("async_hooks").AsyncLocalStorage<{
|
|
263
|
+
requestId: string;
|
|
264
|
+
logs: {
|
|
265
|
+
level: "error" | "info" | "warn";
|
|
266
|
+
fn: string;
|
|
267
|
+
message: string;
|
|
268
|
+
results: any;
|
|
269
|
+
timestamp?: number;
|
|
270
|
+
}[];
|
|
271
|
+
startedAt: number;
|
|
272
|
+
}>;
|
|
273
|
+
run<T>(callback: () => Promise<T>): Promise<T>;
|
|
274
|
+
add(entry: Omit<{
|
|
275
|
+
level: "error" | "info" | "warn";
|
|
276
|
+
fn: string;
|
|
277
|
+
message: string;
|
|
278
|
+
results: any;
|
|
279
|
+
timestamp?: number;
|
|
280
|
+
}, "timestamp">): void;
|
|
281
|
+
build(): {
|
|
282
|
+
requestId: string;
|
|
283
|
+
durationMs: number;
|
|
284
|
+
level: "error" | "info" | "warn";
|
|
285
|
+
logs: {
|
|
286
|
+
level: "error" | "info" | "warn";
|
|
287
|
+
fn: string;
|
|
288
|
+
message: string;
|
|
289
|
+
results: any;
|
|
290
|
+
timestamp?: number;
|
|
291
|
+
}[];
|
|
292
|
+
} | null;
|
|
293
|
+
resolveLevel(logs: {
|
|
294
|
+
level: "error" | "info" | "warn";
|
|
295
|
+
fn: string;
|
|
296
|
+
message: string;
|
|
297
|
+
results: any;
|
|
298
|
+
timestamp?: number;
|
|
299
|
+
}[]): "error" | "info" | "warn";
|
|
300
|
+
};
|
|
251
301
|
};
|
|
252
302
|
export default helpers;
|
package/build/es/helpers.js
CHANGED
|
@@ -2,6 +2,7 @@ import v4 from "zod/v4";
|
|
|
2
2
|
import { SignJWT, jwtVerify } from "jose";
|
|
3
3
|
import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
6
|
const set_response = new class {
|
|
6
7
|
c = new class {
|
|
7
8
|
SUCCESS({ message, results, c }) {
|
|
@@ -476,11 +477,53 @@ class _data {
|
|
|
476
477
|
}
|
|
477
478
|
}
|
|
478
479
|
const helpers_data = new _data;
|
|
480
|
+
class RequestLoggerClass {
|
|
481
|
+
storage = new AsyncLocalStorage();
|
|
482
|
+
run(callback) {
|
|
483
|
+
return this.storage.run({
|
|
484
|
+
requestId: crypto.randomUUID(),
|
|
485
|
+
logs: [],
|
|
486
|
+
startedAt: Date.now()
|
|
487
|
+
}, callback);
|
|
488
|
+
}
|
|
489
|
+
add(entry) {
|
|
490
|
+
const store = this.storage.getStore();
|
|
491
|
+
if (!store) return;
|
|
492
|
+
store.logs.push({
|
|
493
|
+
...entry,
|
|
494
|
+
timestamp: Date.now()
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
build() {
|
|
498
|
+
const store = this.storage.getStore();
|
|
499
|
+
if (!store || 0 === store.logs.length) return null;
|
|
500
|
+
const durationMs = Date.now() - store.startedAt;
|
|
501
|
+
const level = this.resolveLevel(store.logs);
|
|
502
|
+
const payload = {
|
|
503
|
+
requestId: store.requestId,
|
|
504
|
+
durationMs,
|
|
505
|
+
level,
|
|
506
|
+
logs: store.logs
|
|
507
|
+
};
|
|
508
|
+
const output = JSON.stringify(payload);
|
|
509
|
+
if ("error" === level) console.error(output);
|
|
510
|
+
else console.log(output);
|
|
511
|
+
return payload;
|
|
512
|
+
}
|
|
513
|
+
resolveLevel(logs) {
|
|
514
|
+
if (logs.some((l)=>"error" === l.level)) return "error";
|
|
515
|
+
if (logs.some((l)=>"warn" === l.level)) return "warn";
|
|
516
|
+
return "info";
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
const _logger = new RequestLoggerClass();
|
|
520
|
+
const helpers_logger = _logger;
|
|
479
521
|
const helpers = {
|
|
480
522
|
set_response: _set_response,
|
|
481
523
|
token: helpers_token,
|
|
482
524
|
secret: helpers_secret,
|
|
483
|
-
data: helpers_data
|
|
525
|
+
data: helpers_data,
|
|
526
|
+
logger: helpers_logger
|
|
484
527
|
};
|
|
485
528
|
const src_helpers = helpers;
|
|
486
529
|
export { src_helpers as default };
|
package/build/es/index.js
CHANGED
|
@@ -12,7 +12,9 @@ import { useLayoutEffect, useState } from "react";
|
|
|
12
12
|
"service-usuario",
|
|
13
13
|
"service-pages",
|
|
14
14
|
"service-assinatura",
|
|
15
|
-
"service-bucket"
|
|
15
|
+
"service-bucket",
|
|
16
|
+
"service-galio",
|
|
17
|
+
"service-oraculo"
|
|
16
18
|
];
|
|
17
19
|
TypeControllerUsuario.AssinaturaStatusEnum = [
|
|
18
20
|
"active",
|
|
@@ -37,6 +39,12 @@ import { useLayoutEffect, useState } from "react";
|
|
|
37
39
|
"service-pages": [
|
|
38
40
|
"padrao"
|
|
39
41
|
],
|
|
42
|
+
"service-galio": [
|
|
43
|
+
"padrao"
|
|
44
|
+
],
|
|
45
|
+
"service-oraculo": [
|
|
46
|
+
"padrao"
|
|
47
|
+
],
|
|
40
48
|
"service-bucket": [
|
|
41
49
|
"padrao"
|
|
42
50
|
]
|
|
@@ -124,7 +132,8 @@ var _usuario_TypeControllerUsuario;
|
|
|
124
132
|
]).optional(),
|
|
125
133
|
type: TypeSchema.optional().default("success"),
|
|
126
134
|
code: CodeSchema,
|
|
127
|
-
status: v4.number().optional().default(200)
|
|
135
|
+
status: v4.number().optional().default(200),
|
|
136
|
+
fn: v4.string().optional()
|
|
128
137
|
});
|
|
129
138
|
})(TypeControllerResponse.Error || (TypeControllerResponse.Error = {}));
|
|
130
139
|
})(_type_response_TypeControllerResponse || (_type_response_TypeControllerResponse = {}));
|
|
@@ -43,6 +43,7 @@ declare namespace TypeControllerResponse {
|
|
|
43
43
|
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
44
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">]>;
|
|
45
45
|
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
|
+
fn: z4.ZodOptional<z4.ZodString>;
|
|
46
47
|
}, z4.core.$strip>;
|
|
47
48
|
type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
48
49
|
results?: T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z4 from "zod/v4";
|
|
2
2
|
declare namespace TypeControllerUsuario {
|
|
3
3
|
export const PlanNameEnum: readonly ["FREE", "ESSENTIAL", "BUSINESS", "ENTERPRISE"];
|
|
4
|
-
export const AppEnum: readonly ["service-usuario", "service-pages", "service-assinatura", "service-bucket"];
|
|
4
|
+
export const AppEnum: readonly ["service-usuario", "service-pages", "service-assinatura", "service-bucket", "service-galio", "service-oraculo"];
|
|
5
5
|
export const AssinaturaStatusEnum: readonly ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"];
|
|
6
6
|
export const UsuarioTipoEnum: readonly ["padrao"];
|
|
7
7
|
export const apps_permitidos_e_tipos_de_usuarios_de_cada_app: Record<App, UsuarioTipo[]>;
|
|
@@ -10,6 +10,8 @@ declare namespace TypeControllerUsuario {
|
|
|
10
10
|
"service-pages": "service-pages";
|
|
11
11
|
"service-assinatura": "service-assinatura";
|
|
12
12
|
"service-bucket": "service-bucket";
|
|
13
|
+
"service-galio": "service-galio";
|
|
14
|
+
"service-oraculo": "service-oraculo";
|
|
13
15
|
}>;
|
|
14
16
|
const UsuarioTipoEnumZod: z4.ZodEnum<{
|
|
15
17
|
padrao: "padrao";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
type Level = "info" | "warn" | "error";
|
|
3
|
+
type LogEntry = {
|
|
4
|
+
level: Level;
|
|
5
|
+
fn: string;
|
|
6
|
+
message: string;
|
|
7
|
+
results: any;
|
|
8
|
+
timestamp?: number;
|
|
9
|
+
};
|
|
10
|
+
type RequestStore = {
|
|
11
|
+
requestId: string;
|
|
12
|
+
logs: LogEntry[];
|
|
13
|
+
startedAt: number;
|
|
14
|
+
};
|
|
15
|
+
declare class RequestLoggerClass {
|
|
16
|
+
storage: AsyncLocalStorage<RequestStore>;
|
|
17
|
+
run<T>(callback: () => Promise<T>): Promise<T>;
|
|
18
|
+
add(entry: Omit<LogEntry, "timestamp">): void;
|
|
19
|
+
build(): {
|
|
20
|
+
requestId: string;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
level: Level;
|
|
23
|
+
logs: LogEntry[];
|
|
24
|
+
} | null;
|
|
25
|
+
resolveLevel(logs: LogEntry[]): Level;
|
|
26
|
+
}
|
|
27
|
+
declare const _logger: RequestLoggerClass;
|
|
28
|
+
export default _logger;
|
|
@@ -164,44 +164,54 @@ declare const helpers: {
|
|
|
164
164
|
ACTION_REQUIRED({ message, results }: {
|
|
165
165
|
message?: string | undefined;
|
|
166
166
|
results?: unknown;
|
|
167
|
+
fn?: string | undefined;
|
|
167
168
|
}): void;
|
|
168
169
|
WARNING({ message, results }: {
|
|
169
170
|
message?: string | undefined;
|
|
170
171
|
results?: unknown;
|
|
172
|
+
fn?: string | undefined;
|
|
171
173
|
}): void;
|
|
172
174
|
AUTHORIZATION_ERROR({ message, results }: {
|
|
173
175
|
message?: string | undefined;
|
|
174
176
|
results?: unknown;
|
|
177
|
+
fn?: string | undefined;
|
|
175
178
|
}): void;
|
|
176
179
|
DATABASE_ERROR({ message, results, erro }: {
|
|
177
180
|
message?: string | undefined;
|
|
178
181
|
results?: unknown;
|
|
182
|
+
fn?: string | undefined;
|
|
179
183
|
} & {
|
|
180
184
|
erro: any;
|
|
181
185
|
}): void;
|
|
182
186
|
SCHEMA_VALIDATION({ results }: {
|
|
183
187
|
message?: string | undefined;
|
|
184
188
|
results?: unknown;
|
|
189
|
+
fn?: string | undefined;
|
|
185
190
|
}): void;
|
|
186
191
|
UNAUTHORIZED({ message }: {
|
|
187
192
|
message?: string | undefined;
|
|
188
193
|
results?: unknown;
|
|
194
|
+
fn?: string | undefined;
|
|
189
195
|
}): void;
|
|
190
196
|
INVALID_TOKEN({ message }: {
|
|
191
197
|
message?: string | undefined;
|
|
192
198
|
results?: unknown;
|
|
199
|
+
fn?: string | undefined;
|
|
193
200
|
}): void;
|
|
194
201
|
NOT_FOUND({ message }: {
|
|
195
202
|
message?: string | undefined;
|
|
196
203
|
results?: unknown;
|
|
204
|
+
fn?: string | undefined;
|
|
197
205
|
}): void;
|
|
198
206
|
BUSINESS_RULE_VIOLATION({ message, results }: {
|
|
199
207
|
message?: string | undefined;
|
|
200
208
|
results?: unknown;
|
|
209
|
+
fn?: string | undefined;
|
|
201
210
|
}): void;
|
|
202
211
|
PLAN_FORBIDDEN({ message, results }: {
|
|
203
212
|
message?: string | undefined;
|
|
204
213
|
results?: unknown;
|
|
214
|
+
fn?: string | undefined;
|
|
205
215
|
}): void;
|
|
206
216
|
};
|
|
207
217
|
};
|
|
@@ -248,5 +258,45 @@ declare const helpers: {
|
|
|
248
258
|
get get_now_format_number(): number;
|
|
249
259
|
verificar_data(value: number): number;
|
|
250
260
|
};
|
|
261
|
+
logger: {
|
|
262
|
+
storage: import("async_hooks").AsyncLocalStorage<{
|
|
263
|
+
requestId: string;
|
|
264
|
+
logs: {
|
|
265
|
+
level: "error" | "info" | "warn";
|
|
266
|
+
fn: string;
|
|
267
|
+
message: string;
|
|
268
|
+
results: any;
|
|
269
|
+
timestamp?: number;
|
|
270
|
+
}[];
|
|
271
|
+
startedAt: number;
|
|
272
|
+
}>;
|
|
273
|
+
run<T>(callback: () => Promise<T>): Promise<T>;
|
|
274
|
+
add(entry: Omit<{
|
|
275
|
+
level: "error" | "info" | "warn";
|
|
276
|
+
fn: string;
|
|
277
|
+
message: string;
|
|
278
|
+
results: any;
|
|
279
|
+
timestamp?: number;
|
|
280
|
+
}, "timestamp">): void;
|
|
281
|
+
build(): {
|
|
282
|
+
requestId: string;
|
|
283
|
+
durationMs: number;
|
|
284
|
+
level: "error" | "info" | "warn";
|
|
285
|
+
logs: {
|
|
286
|
+
level: "error" | "info" | "warn";
|
|
287
|
+
fn: string;
|
|
288
|
+
message: string;
|
|
289
|
+
results: any;
|
|
290
|
+
timestamp?: number;
|
|
291
|
+
}[];
|
|
292
|
+
} | null;
|
|
293
|
+
resolveLevel(logs: {
|
|
294
|
+
level: "error" | "info" | "warn";
|
|
295
|
+
fn: string;
|
|
296
|
+
message: string;
|
|
297
|
+
results: any;
|
|
298
|
+
timestamp?: number;
|
|
299
|
+
}[]): "error" | "info" | "warn";
|
|
300
|
+
};
|
|
251
301
|
};
|
|
252
302
|
export default helpers;
|
package/build/lib/helpers.cjs
CHANGED
|
@@ -571,17 +571,68 @@ class _data {
|
|
|
571
571
|
}
|
|
572
572
|
/* export default */ const helpers_data = (new _data);
|
|
573
573
|
|
|
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
|
+
|
|
574
623
|
;// CONCATENATED MODULE: ./src/helpers/index.ts
|
|
575
624
|
//_HELPERS
|
|
576
625
|
|
|
577
626
|
|
|
578
627
|
|
|
579
628
|
|
|
629
|
+
|
|
580
630
|
const helpers = {
|
|
581
631
|
set_response: _set_response,
|
|
582
632
|
token: helpers_token,
|
|
583
633
|
secret: helpers_secret,
|
|
584
|
-
data: helpers_data
|
|
634
|
+
data: helpers_data,
|
|
635
|
+
logger: helpers_logger
|
|
585
636
|
};
|
|
586
637
|
/* export default */ const src_helpers = (helpers);
|
|
587
638
|
|
package/build/lib/index.cjs
CHANGED
|
@@ -71,7 +71,9 @@ var v4_default = /*#__PURE__*/__webpack_require__.n(v4_namespaceObject);
|
|
|
71
71
|
"service-usuario",
|
|
72
72
|
"service-pages",
|
|
73
73
|
"service-assinatura",
|
|
74
|
-
"service-bucket"
|
|
74
|
+
"service-bucket",
|
|
75
|
+
"service-galio",
|
|
76
|
+
"service-oraculo"
|
|
75
77
|
];
|
|
76
78
|
TypeControllerUsuario.AssinaturaStatusEnum = [
|
|
77
79
|
"active",
|
|
@@ -96,6 +98,12 @@ var v4_default = /*#__PURE__*/__webpack_require__.n(v4_namespaceObject);
|
|
|
96
98
|
"service-pages": [
|
|
97
99
|
"padrao"
|
|
98
100
|
],
|
|
101
|
+
"service-galio": [
|
|
102
|
+
"padrao"
|
|
103
|
+
],
|
|
104
|
+
"service-oraculo": [
|
|
105
|
+
"padrao"
|
|
106
|
+
],
|
|
99
107
|
"service-bucket": [
|
|
100
108
|
"padrao"
|
|
101
109
|
]
|
|
@@ -186,7 +194,8 @@ var _usuario_TypeControllerUsuario;
|
|
|
186
194
|
]).optional(),
|
|
187
195
|
type: TypeSchema.optional().default("success"),
|
|
188
196
|
code: CodeSchema,
|
|
189
|
-
status: v4_default().number().optional().default(200)
|
|
197
|
+
status: v4_default().number().optional().default(200),
|
|
198
|
+
fn: v4_default().string().optional()
|
|
190
199
|
});
|
|
191
200
|
})(TypeControllerResponse.Error || (TypeControllerResponse.Error = {}));
|
|
192
201
|
})(_type_response_TypeControllerResponse || (_type_response_TypeControllerResponse = {}));
|
|
@@ -43,6 +43,7 @@ declare namespace TypeControllerResponse {
|
|
|
43
43
|
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
44
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">]>;
|
|
45
45
|
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
|
+
fn: z4.ZodOptional<z4.ZodString>;
|
|
46
47
|
}, z4.core.$strip>;
|
|
47
48
|
type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
48
49
|
results?: T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z4 from "zod/v4";
|
|
2
2
|
declare namespace TypeControllerUsuario {
|
|
3
3
|
export const PlanNameEnum: readonly ["FREE", "ESSENTIAL", "BUSINESS", "ENTERPRISE"];
|
|
4
|
-
export const AppEnum: readonly ["service-usuario", "service-pages", "service-assinatura", "service-bucket"];
|
|
4
|
+
export const AppEnum: readonly ["service-usuario", "service-pages", "service-assinatura", "service-bucket", "service-galio", "service-oraculo"];
|
|
5
5
|
export const AssinaturaStatusEnum: readonly ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"];
|
|
6
6
|
export const UsuarioTipoEnum: readonly ["padrao"];
|
|
7
7
|
export const apps_permitidos_e_tipos_de_usuarios_de_cada_app: Record<App, UsuarioTipo[]>;
|
|
@@ -10,6 +10,8 @@ declare namespace TypeControllerUsuario {
|
|
|
10
10
|
"service-pages": "service-pages";
|
|
11
11
|
"service-assinatura": "service-assinatura";
|
|
12
12
|
"service-bucket": "service-bucket";
|
|
13
|
+
"service-galio": "service-galio";
|
|
14
|
+
"service-oraculo": "service-oraculo";
|
|
13
15
|
}>;
|
|
14
16
|
const UsuarioTipoEnumZod: z4.ZodEnum<{
|
|
15
17
|
padrao: "padrao";
|