@navservice/usuario 1.58.0 → 1.61.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/biblioteca/src/contexto/contexto_usuario.d.ts +1 -1
- package/build/es/index.js +135 -191
- package/build/es/shared/types/{controller → entidades}/type_codigo_verificacao_otp.d.ts +4 -5
- package/build/es/shared/types/{controller → entidades}/type_controller_authenticator.d.ts +5 -6
- package/build/es/shared/types/{controller → entidades}/type_controller_usuario.d.ts +8 -9
- package/build/es/shared/types/index.d.ts +7 -7
- package/package.json +47 -47
- package/build/es/shared/types/geral/type_response.d.ts +0 -54
|
@@ -8,7 +8,7 @@ declare const contexto_usuario: {
|
|
|
8
8
|
login(props: t.Controller.Usuario.Login.Input): Promise<AxiosResponse>;
|
|
9
9
|
entrar_com_codigo_otp(props: t.Controller.CodigoOtp.EntrarComCodigoOtp.Input): Promise<t.Controller.CodigoOtp.EntrarComCodigoOtp.Response>;
|
|
10
10
|
login_register_google(props: t.Controller.Usuario.RegisterLoginGoogle.Input): Promise<AxiosResponse<any, any, {}>>;
|
|
11
|
-
refresh_token(props: t.Controller.Usuario.RefreshToken.Input): Promise<void | import("../../../shared/types/
|
|
11
|
+
refresh_token(props: t.Controller.Usuario.RefreshToken.Input): Promise<void | import("../../../shared/types/entidades/type_controller_usuario").default.RefreshToken.Response>;
|
|
12
12
|
};
|
|
13
13
|
contexto: {
|
|
14
14
|
new (): {};
|
package/build/es/index.js
CHANGED
|
@@ -119,12 +119,23 @@ const isEmptyObject = (val)=>{
|
|
|
119
119
|
};
|
|
120
120
|
const isDate = kindOfTest('Date');
|
|
121
121
|
const isFile = kindOfTest('File');
|
|
122
|
+
const isReactNativeBlob = (value1)=>!!(value1 && void 0 !== value1.uri);
|
|
123
|
+
const isReactNative = (formData)=>formData && void 0 !== formData.getParts;
|
|
122
124
|
const isBlob = kindOfTest('Blob');
|
|
123
125
|
const utils_isFileList = kindOfTest('FileList');
|
|
124
126
|
const isStream = (val)=>isObject(val) && isFunction(val.pipe);
|
|
127
|
+
function getGlobal() {
|
|
128
|
+
if ('undefined' != typeof globalThis) return globalThis;
|
|
129
|
+
if ('undefined' != typeof self) return self;
|
|
130
|
+
if ('undefined' != typeof window) return window;
|
|
131
|
+
if ('undefined' != typeof global) return global;
|
|
132
|
+
return {};
|
|
133
|
+
}
|
|
134
|
+
const G = getGlobal();
|
|
135
|
+
const FormDataCtor = void 0 !== G.FormData ? G.FormData : void 0;
|
|
125
136
|
const utils_isFormData = (thing)=>{
|
|
126
137
|
let kind;
|
|
127
|
-
return thing && (
|
|
138
|
+
return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ('formdata' === (kind = kindOf(thing)) || 'object' === kind && isFunction(thing.toString) && '[object FormData]' === thing.toString()));
|
|
128
139
|
};
|
|
129
140
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
130
141
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
@@ -166,14 +177,15 @@ function findKey(obj, key) {
|
|
|
166
177
|
return null;
|
|
167
178
|
}
|
|
168
179
|
const _global = (()=>{
|
|
169
|
-
if (
|
|
170
|
-
return
|
|
180
|
+
if ('undefined' != typeof globalThis) return globalThis;
|
|
181
|
+
return 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : global;
|
|
171
182
|
})();
|
|
172
183
|
const isContextDefined = (context)=>!isUndefined(context) && context !== _global;
|
|
173
184
|
function utils_merge() {
|
|
174
185
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
175
186
|
const result = {};
|
|
176
187
|
const assignValue = (val, key)=>{
|
|
188
|
+
if ('__proto__' === key || 'constructor' === key || 'prototype' === key) return;
|
|
177
189
|
const targetKey = caseless && findKey(result, key) || key;
|
|
178
190
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = utils_merge(result[targetKey], val);
|
|
179
191
|
else if (isPlainObject(val)) result[targetKey] = utils_merge({}, val);
|
|
@@ -185,20 +197,35 @@ function utils_merge() {
|
|
|
185
197
|
}
|
|
186
198
|
const extend = (a, b, thisArg, { allOwnKeys } = {})=>{
|
|
187
199
|
forEach(b, (val, key)=>{
|
|
188
|
-
if (thisArg && isFunction(val)) a
|
|
189
|
-
|
|
200
|
+
if (thisArg && isFunction(val)) Object.defineProperty(a, key, {
|
|
201
|
+
value: bind(val, thisArg),
|
|
202
|
+
writable: true,
|
|
203
|
+
enumerable: true,
|
|
204
|
+
configurable: true
|
|
205
|
+
});
|
|
206
|
+
else Object.defineProperty(a, key, {
|
|
207
|
+
value: val,
|
|
208
|
+
writable: true,
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true
|
|
211
|
+
});
|
|
190
212
|
}, {
|
|
191
213
|
allOwnKeys
|
|
192
214
|
});
|
|
193
215
|
return a;
|
|
194
216
|
};
|
|
195
217
|
const stripBOM = (content)=>{
|
|
196
|
-
if (
|
|
218
|
+
if (0xfeff === content.charCodeAt(0)) content = content.slice(1);
|
|
197
219
|
return content;
|
|
198
220
|
};
|
|
199
221
|
const inherits = (constructor, superConstructor, props, descriptors)=>{
|
|
200
222
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
201
|
-
constructor.prototype
|
|
223
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
224
|
+
value: constructor,
|
|
225
|
+
writable: true,
|
|
226
|
+
enumerable: false,
|
|
227
|
+
configurable: true
|
|
228
|
+
});
|
|
202
229
|
Object.defineProperty(constructor, 'super', {
|
|
203
230
|
value: superConstructor.prototype
|
|
204
231
|
});
|
|
@@ -287,7 +314,7 @@ const freezeMethods = (obj)=>{
|
|
|
287
314
|
return;
|
|
288
315
|
}
|
|
289
316
|
if (!descriptor.set) descriptor.set = ()=>{
|
|
290
|
-
throw Error(
|
|
317
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
291
318
|
};
|
|
292
319
|
});
|
|
293
320
|
};
|
|
@@ -332,12 +359,12 @@ const isThenable = (thing)=>thing && (isObject(thing) || isFunction(thing)) && i
|
|
|
332
359
|
const _setImmediate = ((setImmediateSupported, postMessageSupported)=>{
|
|
333
360
|
if (setImmediateSupported) return setImmediate;
|
|
334
361
|
return postMessageSupported ? ((token, callbacks)=>{
|
|
335
|
-
_global.addEventListener(
|
|
362
|
+
_global.addEventListener('message', ({ source, data })=>{
|
|
336
363
|
if (source === _global && data === token) callbacks.length && callbacks.shift()();
|
|
337
364
|
}, false);
|
|
338
365
|
return (cb)=>{
|
|
339
366
|
callbacks.push(cb);
|
|
340
|
-
_global.postMessage(token,
|
|
367
|
+
_global.postMessage(token, '*');
|
|
341
368
|
};
|
|
342
369
|
})(`axios@${Math.random()}`, []) : (cb)=>setTimeout(cb);
|
|
343
370
|
})('function' == typeof setImmediate, isFunction(_global.postMessage));
|
|
@@ -362,6 +389,8 @@ const utils = {
|
|
|
362
389
|
isUndefined,
|
|
363
390
|
isDate,
|
|
364
391
|
isFile,
|
|
392
|
+
isReactNativeBlob,
|
|
393
|
+
isReactNative,
|
|
365
394
|
isBlob,
|
|
366
395
|
isRegExp,
|
|
367
396
|
isFunction,
|
|
@@ -402,22 +431,34 @@ const utils = {
|
|
|
402
431
|
asap,
|
|
403
432
|
isIterable
|
|
404
433
|
};
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
this
|
|
434
|
+
class AxiosError extends Error {
|
|
435
|
+
static from(error, code, config, request, response, customProps) {
|
|
436
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
437
|
+
axiosError.cause = error;
|
|
438
|
+
axiosError.name = error.name;
|
|
439
|
+
if (null != error.status && null == axiosError.status) axiosError.status = error.status;
|
|
440
|
+
customProps && Object.assign(axiosError, customProps);
|
|
441
|
+
return axiosError;
|
|
442
|
+
}
|
|
443
|
+
constructor(message, code, config, request, response){
|
|
444
|
+
super(message);
|
|
445
|
+
Object.defineProperty(this, 'message', {
|
|
446
|
+
value: message,
|
|
447
|
+
enumerable: true,
|
|
448
|
+
writable: true,
|
|
449
|
+
configurable: true
|
|
450
|
+
});
|
|
451
|
+
this.name = 'AxiosError';
|
|
452
|
+
this.isAxiosError = true;
|
|
453
|
+
code && (this.code = code);
|
|
454
|
+
config && (this.config = config);
|
|
455
|
+
request && (this.request = request);
|
|
456
|
+
if (response) {
|
|
457
|
+
this.response = response;
|
|
458
|
+
this.status = response.status;
|
|
459
|
+
}
|
|
417
460
|
}
|
|
418
|
-
|
|
419
|
-
utils.inherits(AxiosError, Error, {
|
|
420
|
-
toJSON: function() {
|
|
461
|
+
toJSON() {
|
|
421
462
|
return {
|
|
422
463
|
message: this.message,
|
|
423
464
|
name: this.name,
|
|
@@ -432,47 +473,19 @@ utils.inherits(AxiosError, Error, {
|
|
|
432
473
|
status: this.status
|
|
433
474
|
};
|
|
434
475
|
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
'ERR_CANCELED',
|
|
449
|
-
'ERR_NOT_SUPPORT',
|
|
450
|
-
'ERR_INVALID_URL'
|
|
451
|
-
].forEach((code)=>{
|
|
452
|
-
AxiosError_descriptors[code] = {
|
|
453
|
-
value: code
|
|
454
|
-
};
|
|
455
|
-
});
|
|
456
|
-
Object.defineProperties(AxiosError, AxiosError_descriptors);
|
|
457
|
-
Object.defineProperty(AxiosError_prototype, 'isAxiosError', {
|
|
458
|
-
value: true
|
|
459
|
-
});
|
|
460
|
-
AxiosError.from = (error, code, config, request, response, customProps)=>{
|
|
461
|
-
const axiosError = Object.create(AxiosError_prototype);
|
|
462
|
-
utils.toFlatObject(error, axiosError, function(obj) {
|
|
463
|
-
return obj !== Error.prototype;
|
|
464
|
-
}, (prop)=>'isAxiosError' !== prop);
|
|
465
|
-
const msg = error && error.message ? error.message : 'Error';
|
|
466
|
-
const errCode = null == code && error ? error.code : code;
|
|
467
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
468
|
-
if (error && null == axiosError.cause) Object.defineProperty(axiosError, 'cause', {
|
|
469
|
-
value: error,
|
|
470
|
-
configurable: true
|
|
471
|
-
});
|
|
472
|
-
axiosError.name = error && error.name || 'Error';
|
|
473
|
-
customProps && Object.assign(axiosError, customProps);
|
|
474
|
-
return axiosError;
|
|
475
|
-
};
|
|
476
|
+
}
|
|
477
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
478
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
479
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
480
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
481
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
482
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
483
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
484
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
485
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
486
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
487
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
488
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
476
489
|
const core_AxiosError = AxiosError;
|
|
477
490
|
const helpers_null = null;
|
|
478
491
|
function isVisitable(thing) {
|
|
@@ -523,6 +536,10 @@ function toFormData(obj, formData, options) {
|
|
|
523
536
|
}
|
|
524
537
|
function defaultVisitor(value1, key, path) {
|
|
525
538
|
let arr = value1;
|
|
539
|
+
if (utils.isReactNative(formData) && utils.isReactNativeBlob(value1)) {
|
|
540
|
+
formData.append(renderKey(path, key, dots), convertValue(value1));
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
526
543
|
if (value1 && !path && 'object' == typeof value1) {
|
|
527
544
|
if (utils.endsWith(key, '{}')) {
|
|
528
545
|
key = metaTokens ? key : key.slice(0, -2);
|
|
@@ -604,14 +621,14 @@ function buildURL_encode(val) {
|
|
|
604
621
|
function buildURL(url, params, options) {
|
|
605
622
|
if (!params) return url;
|
|
606
623
|
const _encode = options && options.encode || buildURL_encode;
|
|
607
|
-
|
|
624
|
+
const _options = utils.isFunction(options) ? {
|
|
608
625
|
serialize: options
|
|
609
|
-
};
|
|
610
|
-
const serializeFn =
|
|
626
|
+
} : options;
|
|
627
|
+
const serializeFn = _options && _options.serialize;
|
|
611
628
|
let serializedParams;
|
|
612
|
-
serializedParams = serializeFn ? serializeFn(params,
|
|
629
|
+
serializedParams = serializeFn ? serializeFn(params, _options) : utils.isURLSearchParams(params) ? params.toString() : new helpers_AxiosURLSearchParams(params, _options).toString(_encode);
|
|
613
630
|
if (serializedParams) {
|
|
614
|
-
const hashmarkIndex = url.indexOf(
|
|
631
|
+
const hashmarkIndex = url.indexOf('#');
|
|
615
632
|
if (-1 !== hashmarkIndex) url = url.slice(0, hashmarkIndex);
|
|
616
633
|
url += (-1 === url.indexOf('?') ? '?' : '&') + serializedParams;
|
|
617
634
|
}
|
|
@@ -646,7 +663,8 @@ const core_InterceptorManager = InterceptorManager;
|
|
|
646
663
|
const defaults_transitional = {
|
|
647
664
|
silentJSONParsing: true,
|
|
648
665
|
forcedJSONParsing: true,
|
|
649
|
-
clarifyTimeoutError: false
|
|
666
|
+
clarifyTimeoutError: false,
|
|
667
|
+
legacyInterceptorReqResOrdering: true
|
|
650
668
|
};
|
|
651
669
|
const classes_URLSearchParams = 'undefined' != typeof URLSearchParams ? URLSearchParams : helpers_AxiosURLSearchParams;
|
|
652
670
|
const classes_FormData = 'undefined' != typeof FormData ? FormData : null;
|
|
@@ -1030,7 +1048,7 @@ class AxiosHeaders {
|
|
|
1030
1048
|
return Object.entries(this.toJSON()).map(([header, value1])=>header + ': ' + value1).join('\n');
|
|
1031
1049
|
}
|
|
1032
1050
|
getSetCookie() {
|
|
1033
|
-
return this.get(
|
|
1051
|
+
return this.get('set-cookie') || [];
|
|
1034
1052
|
}
|
|
1035
1053
|
get [Symbol.toStringTag]() {
|
|
1036
1054
|
return 'AxiosHeaders';
|
|
@@ -1093,13 +1111,13 @@ function transformData(fns, response) {
|
|
|
1093
1111
|
function isCancel(value1) {
|
|
1094
1112
|
return !!(value1 && value1.__CANCEL__);
|
|
1095
1113
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1114
|
+
class CanceledError extends core_AxiosError {
|
|
1115
|
+
constructor(message, config, request){
|
|
1116
|
+
super(null == message ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
|
|
1117
|
+
this.name = 'CanceledError';
|
|
1118
|
+
this.__CANCEL__ = true;
|
|
1119
|
+
}
|
|
1099
1120
|
}
|
|
1100
|
-
utils.inherits(CanceledError, core_AxiosError, {
|
|
1101
|
-
__CANCEL__: true
|
|
1102
|
-
});
|
|
1103
1121
|
const cancel_CanceledError = CanceledError;
|
|
1104
1122
|
function settle(resolve, reject, response) {
|
|
1105
1123
|
const validateStatus = response.config.validateStatus;
|
|
@@ -1243,6 +1261,7 @@ const cookies = platform.hasStandardBrowserEnv ? {
|
|
|
1243
1261
|
remove () {}
|
|
1244
1262
|
};
|
|
1245
1263
|
function isAbsoluteURL(url) {
|
|
1264
|
+
if ('string' != typeof url) return false;
|
|
1246
1265
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
1247
1266
|
}
|
|
1248
1267
|
function combineURLs(baseURL, relativeURL) {
|
|
@@ -1317,7 +1336,8 @@ function mergeConfig(config1, config2) {
|
|
|
1317
1336
|
...config1,
|
|
1318
1337
|
...config2
|
|
1319
1338
|
}), function(prop) {
|
|
1320
|
-
|
|
1339
|
+
if ('__proto__' === prop || 'constructor' === prop || 'prototype' === prop) return;
|
|
1340
|
+
const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
1321
1341
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
1322
1342
|
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
1323
1343
|
});
|
|
@@ -1461,7 +1481,7 @@ const composeSignals = (signals, timeout)=>{
|
|
|
1461
1481
|
};
|
|
1462
1482
|
let timer = timeout && setTimeout(()=>{
|
|
1463
1483
|
timer = null;
|
|
1464
|
-
onabort(new core_AxiosError(`timeout ${timeout}
|
|
1484
|
+
onabort(new core_AxiosError(`timeout of ${timeout}ms exceeded`, core_AxiosError.ETIMEDOUT));
|
|
1465
1485
|
}, timeout);
|
|
1466
1486
|
const unsubscribe = ()=>{
|
|
1467
1487
|
if (signals) {
|
|
@@ -1637,7 +1657,7 @@ const factory = (env)=>{
|
|
|
1637
1657
|
let _request = new Request(url, {
|
|
1638
1658
|
method: 'POST',
|
|
1639
1659
|
body: data,
|
|
1640
|
-
duplex:
|
|
1660
|
+
duplex: 'half'
|
|
1641
1661
|
});
|
|
1642
1662
|
let contentTypeHeader;
|
|
1643
1663
|
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) headers.setContentType(contentTypeHeader);
|
|
@@ -1647,14 +1667,14 @@ const factory = (env)=>{
|
|
|
1647
1667
|
}
|
|
1648
1668
|
}
|
|
1649
1669
|
if (!utils.isString(withCredentials)) withCredentials = withCredentials ? 'include' : 'omit';
|
|
1650
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
1670
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
1651
1671
|
const resolvedOptions = {
|
|
1652
1672
|
...fetchOptions,
|
|
1653
1673
|
signal: composedSignal,
|
|
1654
1674
|
method: method.toUpperCase(),
|
|
1655
1675
|
headers: headers.normalize().toJSON(),
|
|
1656
1676
|
body: data,
|
|
1657
|
-
duplex:
|
|
1677
|
+
duplex: 'half',
|
|
1658
1678
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
1659
1679
|
};
|
|
1660
1680
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
@@ -1691,10 +1711,10 @@ const factory = (env)=>{
|
|
|
1691
1711
|
});
|
|
1692
1712
|
} catch (err) {
|
|
1693
1713
|
unsubscribe && unsubscribe();
|
|
1694
|
-
if (err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request), {
|
|
1714
|
+
if (err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request, err && err.response), {
|
|
1695
1715
|
cause: err.cause || err
|
|
1696
1716
|
});
|
|
1697
|
-
throw core_AxiosError.from(err, err && err.code, config, request);
|
|
1717
|
+
throw core_AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
1698
1718
|
}
|
|
1699
1719
|
};
|
|
1700
1720
|
};
|
|
@@ -1814,7 +1834,7 @@ const validators = {};
|
|
|
1814
1834
|
const deprecatedWarnings = {};
|
|
1815
1835
|
validators.transitional = function(validator, version, message) {
|
|
1816
1836
|
function formatMessage(opt, desc) {
|
|
1817
|
-
return "[Axios v1.13.
|
|
1837
|
+
return "[Axios v1.13.6] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : '');
|
|
1818
1838
|
}
|
|
1819
1839
|
return (value1, opt, opts)=>{
|
|
1820
1840
|
if (false === validator) throw new core_AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), core_AxiosError.ERR_DEPRECATED);
|
|
@@ -1887,7 +1907,8 @@ class Axios {
|
|
|
1887
1907
|
if (void 0 !== transitional) helpers_validator.assertOptions(transitional, {
|
|
1888
1908
|
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
1889
1909
|
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
1890
|
-
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
|
|
1910
|
+
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean),
|
|
1911
|
+
legacyInterceptorReqResOrdering: Axios_validators.transitional(Axios_validators.boolean)
|
|
1891
1912
|
}, false);
|
|
1892
1913
|
if (null != paramsSerializer) if (utils.isFunction(paramsSerializer)) config.paramsSerializer = {
|
|
1893
1914
|
serialize: paramsSerializer
|
|
@@ -1922,7 +1943,10 @@ class Axios {
|
|
|
1922
1943
|
this.interceptors.request.forEach(function(interceptor) {
|
|
1923
1944
|
if ('function' == typeof interceptor.runWhen && false === interceptor.runWhen(config)) return;
|
|
1924
1945
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
1925
|
-
|
|
1946
|
+
const transitional = config.transitional || defaults_transitional;
|
|
1947
|
+
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
|
|
1948
|
+
if (legacyInterceptorReqResOrdering) requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
1949
|
+
else requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
1926
1950
|
});
|
|
1927
1951
|
const responseInterceptorChain = [];
|
|
1928
1952
|
this.interceptors.response.forEach(function(interceptor) {
|
|
@@ -2175,7 +2199,7 @@ axios.Axios = core_Axios;
|
|
|
2175
2199
|
axios.CanceledError = cancel_CanceledError;
|
|
2176
2200
|
axios.CancelToken = cancel_CancelToken;
|
|
2177
2201
|
axios.isCancel = isCancel;
|
|
2178
|
-
axios.VERSION = "1.13.
|
|
2202
|
+
axios.VERSION = "1.13.6";
|
|
2179
2203
|
axios.toFormData = helpers_toFormData;
|
|
2180
2204
|
axios.AxiosError = core_AxiosError;
|
|
2181
2205
|
axios.Cancel = axios.CanceledError;
|
|
@@ -2272,6 +2296,7 @@ var _usuario_TypeControllerUsuario;
|
|
|
2272
2296
|
v4.literal("ACTION_REQUIRED"),
|
|
2273
2297
|
v4.literal("CREATED"),
|
|
2274
2298
|
v4.literal("WARNING"),
|
|
2299
|
+
v4.literal("ERROR"),
|
|
2275
2300
|
v4.literal("AUTHORIZATION_ERROR"),
|
|
2276
2301
|
v4.literal("SCHEMA_VALIDATION"),
|
|
2277
2302
|
v4.literal("SERVER_ERROR"),
|
|
@@ -2364,7 +2389,7 @@ const _session_storage = new class {
|
|
|
2364
2389
|
}
|
|
2365
2390
|
get_item_session_storage(chave) {
|
|
2366
2391
|
try {
|
|
2367
|
-
if ("
|
|
2392
|
+
if ("u" > typeof window) {
|
|
2368
2393
|
const valorAtual = window.sessionStorage.getItem(chave);
|
|
2369
2394
|
return valorAtual ? JSON.parse(valorAtual) : valorAtual;
|
|
2370
2395
|
}
|
|
@@ -2723,7 +2748,7 @@ const _local_storage = new class {
|
|
|
2723
2748
|
}
|
|
2724
2749
|
get_item_local_storage(chave) {
|
|
2725
2750
|
try {
|
|
2726
|
-
if ("
|
|
2751
|
+
if ("u" > typeof window) {
|
|
2727
2752
|
const valorAtual = window.localStorage.getItem(chave);
|
|
2728
2753
|
return valorAtual ? JSON.parse(valorAtual) : valorAtual;
|
|
2729
2754
|
}
|
|
@@ -2951,7 +2976,9 @@ const es_utils = {
|
|
|
2951
2976
|
session_sorage: utils_session_storage,
|
|
2952
2977
|
sistema: utils_sistema,
|
|
2953
2978
|
hooks: utils_hooks,
|
|
2954
|
-
environment: utils_environment
|
|
2979
|
+
environment: utils_environment,
|
|
2980
|
+
axios: lib_axios,
|
|
2981
|
+
zod: v4
|
|
2955
2982
|
};
|
|
2956
2983
|
const src_utils = es_utils;
|
|
2957
2984
|
const type_controller_usuario_input = (meta)=>JSON.stringify(meta);
|
|
@@ -3267,95 +3294,12 @@ var type_controller_authenticator_TypeControlerAutheticator;
|
|
|
3267
3294
|
})(type_codigo_verificacao_otp_TypeControllerCodigoOtp || (type_codigo_verificacao_otp_TypeControllerCodigoOtp = {}));
|
|
3268
3295
|
const type_codigo_verificacao_otp = type_codigo_verificacao_otp_TypeControllerCodigoOtp;
|
|
3269
3296
|
var type_codigo_verificacao_otp_TypeControllerCodigoOtp;
|
|
3270
|
-
(function(TypeControllerResponse) {
|
|
3271
|
-
const StatusSchema = v4.union([
|
|
3272
|
-
v4.literal(200),
|
|
3273
|
-
v4.literal(201),
|
|
3274
|
-
v4.literal(202),
|
|
3275
|
-
v4.literal(204),
|
|
3276
|
-
v4.literal(400),
|
|
3277
|
-
v4.literal(401),
|
|
3278
|
-
v4.literal(403),
|
|
3279
|
-
v4.literal(404),
|
|
3280
|
-
v4.literal(409),
|
|
3281
|
-
v4.literal(422),
|
|
3282
|
-
v4.literal(500),
|
|
3283
|
-
v4.literal(428),
|
|
3284
|
-
v4.literal(405)
|
|
3285
|
-
]);
|
|
3286
|
-
const TypeSchema = v4.union([
|
|
3287
|
-
v4.literal("success"),
|
|
3288
|
-
v4.literal("warning"),
|
|
3289
|
-
v4.literal("error")
|
|
3290
|
-
]).default("success");
|
|
3291
|
-
const CodeSchema = v4.union([
|
|
3292
|
-
v4.literal("SUCCESS"),
|
|
3293
|
-
v4.literal("ACTION_REQUIRED"),
|
|
3294
|
-
v4.literal("CREATED"),
|
|
3295
|
-
v4.literal("WARNING"),
|
|
3296
|
-
v4.literal("AUTHORIZATION_ERROR"),
|
|
3297
|
-
v4.literal("SCHEMA_VALIDATION"),
|
|
3298
|
-
v4.literal("SERVER_ERROR"),
|
|
3299
|
-
v4.literal("UNAUTHORIZED"),
|
|
3300
|
-
v4.literal("INVALID_TOKEN"),
|
|
3301
|
-
v4.literal("NOT_FOUND"),
|
|
3302
|
-
v4.literal("SUCCESS_FILE"),
|
|
3303
|
-
v4.literal("DATABASE_ERROR")
|
|
3304
|
-
]);
|
|
3305
|
-
v4.object({
|
|
3306
|
-
status: StatusSchema,
|
|
3307
|
-
code: CodeSchema,
|
|
3308
|
-
type: TypeSchema,
|
|
3309
|
-
message: v4.string(),
|
|
3310
|
-
results: v4.unknown().optional(),
|
|
3311
|
-
error: v4.unknown().optional()
|
|
3312
|
-
});
|
|
3313
|
-
(function(C) {
|
|
3314
|
-
C.InputSchema = v4.object({
|
|
3315
|
-
status: StatusSchema,
|
|
3316
|
-
code: CodeSchema,
|
|
3317
|
-
type: TypeSchema.optional().default("success"),
|
|
3318
|
-
message: v4.string().optional(),
|
|
3319
|
-
results: v4.any(),
|
|
3320
|
-
c: v4.custom()
|
|
3321
|
-
});
|
|
3322
|
-
v4.object({
|
|
3323
|
-
status: StatusSchema,
|
|
3324
|
-
message: v4.string().optional(),
|
|
3325
|
-
file_buffer: v4.union([
|
|
3326
|
-
v4["instanceof"](Blob),
|
|
3327
|
-
v4["instanceof"](ArrayBuffer),
|
|
3328
|
-
v4["instanceof"](Uint8Array)
|
|
3329
|
-
]),
|
|
3330
|
-
content_type: v4.string(),
|
|
3331
|
-
filename: v4.string().optional(),
|
|
3332
|
-
c: v4.custom().optional()
|
|
3333
|
-
});
|
|
3334
|
-
})(TypeControllerResponse.C || (TypeControllerResponse.C = {}));
|
|
3335
|
-
(function(Error1) {
|
|
3336
|
-
Error1.InputSchema = v4.object({
|
|
3337
|
-
message: v4.string().optional(),
|
|
3338
|
-
results: v4.union([
|
|
3339
|
-
v4.array(v4.unknown()),
|
|
3340
|
-
v4.unknown()
|
|
3341
|
-
]).optional(),
|
|
3342
|
-
type: TypeSchema.optional().default("success"),
|
|
3343
|
-
code: CodeSchema,
|
|
3344
|
-
status: v4.number().optional().default(200)
|
|
3345
|
-
});
|
|
3346
|
-
})(TypeControllerResponse.Error || (TypeControllerResponse.Error = {}));
|
|
3347
|
-
})(type_response_TypeControllerResponse || (type_response_TypeControllerResponse = {}));
|
|
3348
|
-
const type_response = type_response_TypeControllerResponse;
|
|
3349
|
-
var type_response_TypeControllerResponse;
|
|
3350
3297
|
(function(t) {
|
|
3351
3298
|
(function(Controller) {
|
|
3352
3299
|
Controller.Usuario = type_controller_usuario;
|
|
3353
3300
|
Controller.Autheticator = type_controller_authenticator;
|
|
3354
3301
|
Controller.CodigoOtp = type_codigo_verificacao_otp;
|
|
3355
3302
|
})(t.Controller || (t.Controller = {}));
|
|
3356
|
-
(function(Geral) {
|
|
3357
|
-
Geral.Response = type_response;
|
|
3358
|
-
})(t.Geral || (t.Geral = {}));
|
|
3359
3303
|
})(shared_types_t || (shared_types_t = {}));
|
|
3360
3304
|
const shared_types = shared_types_t;
|
|
3361
3305
|
var shared_types_t;
|
|
@@ -4104,7 +4048,7 @@ const DrawerPadrao = /*#__PURE__*/ forwardRef(({ title, children, onClose }, ref
|
|
|
4104
4048
|
ref: closeBtnRef,
|
|
4105
4049
|
onClick: ()=>ref?.current?.fechar(),
|
|
4106
4050
|
"aria-label": "Fechar",
|
|
4107
|
-
className: "
|
|
4051
|
+
className: " inline-flex items-center justify-center h-9 w-9 rounded-full border border-theme-border bg-theme-bg text-basic-400 hover:bg-default-800 focus:outline-none focus:ring-2 focus:ring-primary-600 transition ",
|
|
4108
4052
|
children: /*#__PURE__*/ jsx(X, {
|
|
4109
4053
|
className: "h-4 w-4"
|
|
4110
4054
|
})
|
|
@@ -4570,7 +4514,7 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4570
4514
|
type: "button",
|
|
4571
4515
|
onClick: confirmarCodigo,
|
|
4572
4516
|
disabled: !otpCompleto,
|
|
4573
|
-
className: "
|
|
4517
|
+
className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:grayscale-[0.5] overflow-hidden ",
|
|
4574
4518
|
children: [
|
|
4575
4519
|
/*#__PURE__*/ jsx(CircleCheck, {
|
|
4576
4520
|
className: "w-4 h-4"
|
|
@@ -4926,7 +4870,7 @@ function AuthAtivarDesativarAuthenticatorButton() {
|
|
|
4926
4870
|
/*#__PURE__*/ jsxs("button", {
|
|
4927
4871
|
type: "button",
|
|
4928
4872
|
onClick: abrirDrawer,
|
|
4929
|
-
className: "
|
|
4873
|
+
className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
|
|
4930
4874
|
children: [
|
|
4931
4875
|
/*#__PURE__*/ jsxs("div", {
|
|
4932
4876
|
className: "flex items-center gap-2",
|
|
@@ -5238,7 +5182,7 @@ function RecuperarSenhaComCodigoOtpButton() {
|
|
|
5238
5182
|
/*#__PURE__*/ jsxs("button", {
|
|
5239
5183
|
type: "button",
|
|
5240
5184
|
onClick: ()=>drawerRef.current?.abrir(),
|
|
5241
|
-
className: "
|
|
5185
|
+
className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
|
|
5242
5186
|
children: [
|
|
5243
5187
|
/*#__PURE__*/ jsxs("div", {
|
|
5244
5188
|
className: "flex items-center gap-2",
|
|
@@ -5464,7 +5408,7 @@ function EsqueciMinhaSenha({ email: emailProp }) {
|
|
|
5464
5408
|
]
|
|
5465
5409
|
}),
|
|
5466
5410
|
/*#__PURE__*/ jsxs("div", {
|
|
5467
|
-
className: "
|
|
5411
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
5468
5412
|
children: [
|
|
5469
5413
|
/*#__PURE__*/ jsxs("div", {
|
|
5470
5414
|
className: "flex flex-col gap-1.5",
|
|
@@ -7272,7 +7216,7 @@ function AuthLogin() {
|
|
|
7272
7216
|
}),
|
|
7273
7217
|
/*#__PURE__*/ jsxs(motion.form, {
|
|
7274
7218
|
onSubmit: handleSubmit(onSubmit),
|
|
7275
|
-
className: "
|
|
7219
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
7276
7220
|
children: [
|
|
7277
7221
|
/*#__PURE__*/ jsxs("div", {
|
|
7278
7222
|
className: "flex flex-col gap-5",
|
|
@@ -7352,7 +7296,7 @@ function AuthLogin() {
|
|
|
7352
7296
|
},
|
|
7353
7297
|
type: "submit",
|
|
7354
7298
|
disabled: loading_auth,
|
|
7355
|
-
className: "
|
|
7299
|
+
className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-70 disabled:cursor-not-allowed overflow-hidden ",
|
|
7356
7300
|
children: [
|
|
7357
7301
|
loading_auth && /*#__PURE__*/ jsx(LoaderCircle, {
|
|
7358
7302
|
className: "w-4 h-4 animate-spin"
|
|
@@ -7531,7 +7475,7 @@ function AuthRegister() {
|
|
|
7531
7475
|
}),
|
|
7532
7476
|
/*#__PURE__*/ jsxs(motion.form, {
|
|
7533
7477
|
onSubmit: handleSubmit(onSubmit),
|
|
7534
|
-
className: "
|
|
7478
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-5 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
7535
7479
|
children: [
|
|
7536
7480
|
/*#__PURE__*/ jsxs("div", {
|
|
7537
7481
|
className: "flex flex-col gap-4",
|
|
@@ -7637,7 +7581,7 @@ function AuthRegister() {
|
|
|
7637
7581
|
},
|
|
7638
7582
|
type: "submit",
|
|
7639
7583
|
disabled: loading_auth,
|
|
7640
|
-
className: "
|
|
7584
|
+
className: " w-full mt-2 inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
|
|
7641
7585
|
children: [
|
|
7642
7586
|
loading_auth ? /*#__PURE__*/ jsx(LoaderCircle, {
|
|
7643
7587
|
className: "h-4 w-4 animate-spin"
|
|
@@ -7913,7 +7857,7 @@ const VerificarAuthenticator = ()=>{
|
|
|
7913
7857
|
},
|
|
7914
7858
|
onClick: handleConfirm,
|
|
7915
7859
|
disabled: !isCodeComplete || isLoading,
|
|
7916
|
-
className: "
|
|
7860
|
+
className: " w-full inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
|
|
7917
7861
|
children: [
|
|
7918
7862
|
isLoading ? /*#__PURE__*/ jsx(LoaderCircle, {
|
|
7919
7863
|
className: "h-4 w-4 animate-spin"
|
|
@@ -8353,7 +8297,7 @@ function DarkMode() {
|
|
|
8353
8297
|
]);
|
|
8354
8298
|
return /*#__PURE__*/ jsx("button", {
|
|
8355
8299
|
onClick: ()=>setDark(!dark),
|
|
8356
|
-
className: "
|
|
8300
|
+
className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
|
|
8357
8301
|
children: /*#__PURE__*/ jsxs("div", {
|
|
8358
8302
|
className: "flex items-center gap-3",
|
|
8359
8303
|
children: [
|
|
@@ -8492,7 +8436,7 @@ function Profile({ isCollapsed = false }) {
|
|
|
8492
8436
|
children: [
|
|
8493
8437
|
menuItems.map((item, idx)=>/*#__PURE__*/ jsx("button", {
|
|
8494
8438
|
onClick: item.action,
|
|
8495
|
-
className: "
|
|
8439
|
+
className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
|
|
8496
8440
|
children: /*#__PURE__*/ jsxs("div", {
|
|
8497
8441
|
className: "flex items-center gap-3",
|
|
8498
8442
|
children: [
|
|
@@ -8508,7 +8452,7 @@ function Profile({ isCollapsed = false }) {
|
|
|
8508
8452
|
/*#__PURE__*/ jsx(DarkMode, {}),
|
|
8509
8453
|
/*#__PURE__*/ jsx("button", {
|
|
8510
8454
|
onClick: ()=>contexto_contexto_usuario.contexto.state.set_signout(),
|
|
8511
|
-
className: "
|
|
8455
|
+
className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-error-600 font-semibold hover:bg-error-50/10 hover:translate-x-[2px] transition-all ",
|
|
8512
8456
|
children: /*#__PURE__*/ jsxs("div", {
|
|
8513
8457
|
className: "flex items-center gap-3",
|
|
8514
8458
|
children: [
|
|
@@ -8546,7 +8490,7 @@ function Profile({ isCollapsed = false }) {
|
|
|
8546
8490
|
});
|
|
8547
8491
|
}
|
|
8548
8492
|
const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
|
|
8549
|
-
className: "
|
|
8493
|
+
className: " fixed inset-x-0 top-0 z-40 h-16 flex items-center justify-between px-4 md:px-6 bg-theme-card/80 text-theme-text border-b border-theme-border backdrop-blur-xl supports-[backdrop-filter]:bg-theme-card/70 shadow-sm will-change-transform ",
|
|
8550
8494
|
children: [
|
|
8551
8495
|
/*#__PURE__*/ jsx("div", {
|
|
8552
8496
|
className: "flex items-center gap-3",
|
|
@@ -8624,7 +8568,7 @@ function Header(props) {
|
|
|
8624
8568
|
scale: 0.98
|
|
8625
8569
|
},
|
|
8626
8570
|
onClick: ()=>navigate("/auth/register"),
|
|
8627
|
-
className: "
|
|
8571
|
+
className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
|
|
8628
8572
|
children: /*#__PURE__*/ jsx("span", {
|
|
8629
8573
|
className: "relative z-10",
|
|
8630
8574
|
children: "Registrar"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import z4 from "zod/v4";
|
|
2
|
-
import { AxiosResponse } from "axios";
|
|
3
2
|
import t from "..";
|
|
4
3
|
import { TypesCore } from "@navservice/core";
|
|
5
4
|
declare namespace TypeControllerCodigoOtp {
|
|
@@ -32,7 +31,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
32
31
|
};
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
type Response =
|
|
34
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
36
35
|
}
|
|
37
36
|
namespace EntrarComCodigoOtp {
|
|
38
37
|
const route: "/api/usuario/auth/entrar_com_codigo_otp";
|
|
@@ -57,7 +56,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
57
56
|
}, z4.core.$strip>;
|
|
58
57
|
type Input = z4.infer<typeof InputSchema>;
|
|
59
58
|
type Output = t.Controller.Usuario.Register.Output;
|
|
60
|
-
type Response =
|
|
59
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<t.Controller.Usuario.Register.Output>;
|
|
61
60
|
}
|
|
62
61
|
namespace RecuperarSenhaPeloApp {
|
|
63
62
|
const route: "/api/usuario/auth/recuperar_senha_pelo_app";
|
|
@@ -71,7 +70,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
71
70
|
}, z4.core.$strip>;
|
|
72
71
|
type Input = z4.infer<typeof InputSchema>;
|
|
73
72
|
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
74
|
-
type Response =
|
|
73
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
75
74
|
}
|
|
76
75
|
namespace RecuperarSenhaPeloAppComCodigoOtp {
|
|
77
76
|
const route: "/api/usuario/auth/alterar_senha";
|
|
@@ -85,7 +84,7 @@ declare namespace TypeControllerCodigoOtp {
|
|
|
85
84
|
}, z4.core.$strip>;
|
|
86
85
|
type Input = z4.infer<typeof InputSchema>;
|
|
87
86
|
type Output = TypesCore.Controller.Usuario.TokenPayload;
|
|
88
|
-
type Response =
|
|
87
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
export default TypeControllerCodigoOtp;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
2
1
|
import z4 from "zod/v4";
|
|
3
|
-
import
|
|
2
|
+
import { TypesCore } from "@navservice/core";
|
|
4
3
|
declare namespace TypeControlerAutheticator {
|
|
5
4
|
const AutheticatorBaseSchema: z4.ZodObject<{
|
|
6
5
|
_id: z4.ZodString;
|
|
@@ -31,7 +30,7 @@ declare namespace TypeControlerAutheticator {
|
|
|
31
30
|
};
|
|
32
31
|
};
|
|
33
32
|
};
|
|
34
|
-
type Response =
|
|
33
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
35
34
|
}
|
|
36
35
|
namespace AtivarAutheticatorCode {
|
|
37
36
|
const route: "/api/usuario/auth/ativar_autheticator_code";
|
|
@@ -48,7 +47,7 @@ declare namespace TypeControlerAutheticator {
|
|
|
48
47
|
autheticator: {};
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
|
-
type Response =
|
|
50
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
52
51
|
}
|
|
53
52
|
namespace DesativarAuthenticatorCode {
|
|
54
53
|
const route = "/api/usuario/auth/desativar_authenticator_code";
|
|
@@ -65,7 +64,7 @@ declare namespace TypeControlerAutheticator {
|
|
|
65
64
|
autheticator: {};
|
|
66
65
|
};
|
|
67
66
|
};
|
|
68
|
-
type Response =
|
|
67
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
69
68
|
}
|
|
70
69
|
namespace BuscarAuthenticatorPeloId {
|
|
71
70
|
const route: "/api/usuario/auth/authenticator";
|
|
@@ -82,7 +81,7 @@ declare namespace TypeControlerAutheticator {
|
|
|
82
81
|
};
|
|
83
82
|
};
|
|
84
83
|
};
|
|
85
|
-
type Response =
|
|
84
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
export default TypeControlerAutheticator;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
2
1
|
import z4 from "zod/v4";
|
|
3
2
|
import t from "..";
|
|
4
3
|
export declare const input: (meta: t.Geral.FormularioZod.Describe) => string;
|
|
@@ -44,7 +43,7 @@ declare namespace TypeControllerUsuario {
|
|
|
44
43
|
}, z4.core.$strip>;
|
|
45
44
|
type Input = z4.infer<typeof InputSchema>;
|
|
46
45
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
47
|
-
type Response =
|
|
46
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
48
47
|
}
|
|
49
48
|
export namespace RegisterLoginGoogle {
|
|
50
49
|
const route: "/api/usuario/auth/google";
|
|
@@ -69,7 +68,7 @@ declare namespace TypeControllerUsuario {
|
|
|
69
68
|
}, z4.core.$strip>;
|
|
70
69
|
type Input = z4.infer<typeof InputSchema>;
|
|
71
70
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
72
|
-
type Response =
|
|
71
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
73
72
|
}
|
|
74
73
|
export namespace Login {
|
|
75
74
|
const route: "/api/usuario/auth/login";
|
|
@@ -95,7 +94,7 @@ declare namespace TypeControllerUsuario {
|
|
|
95
94
|
}, z4.core.$strip>;
|
|
96
95
|
type Input = z4.infer<typeof InputSchema>;
|
|
97
96
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
98
|
-
type Response =
|
|
97
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
99
98
|
}
|
|
100
99
|
export namespace RefreshToken {
|
|
101
100
|
const route: "/api/usuario/auth/refresh_token";
|
|
@@ -119,7 +118,7 @@ declare namespace TypeControllerUsuario {
|
|
|
119
118
|
}, z4.core.$strip>;
|
|
120
119
|
type Input = z4.infer<typeof InputSchema>;
|
|
121
120
|
type Output = TypesCore.Controller.Usuario.Auth;
|
|
122
|
-
type Response =
|
|
121
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
123
122
|
}
|
|
124
123
|
export namespace BuscarPeloFiltro {
|
|
125
124
|
const route: "/api/usuario";
|
|
@@ -145,7 +144,7 @@ declare namespace TypeControllerUsuario {
|
|
|
145
144
|
usuario: UsuarioBase[];
|
|
146
145
|
};
|
|
147
146
|
};
|
|
148
|
-
type Response =
|
|
147
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
149
148
|
}
|
|
150
149
|
export namespace BuscarPeloId {
|
|
151
150
|
const route: "/api/usuario/:id";
|
|
@@ -160,7 +159,7 @@ declare namespace TypeControllerUsuario {
|
|
|
160
159
|
usuario: UsuarioBase;
|
|
161
160
|
};
|
|
162
161
|
};
|
|
163
|
-
type Response =
|
|
162
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
164
163
|
}
|
|
165
164
|
export namespace AtualizarPeloId {
|
|
166
165
|
const route: "/api/usuario/:id";
|
|
@@ -183,7 +182,7 @@ declare namespace TypeControllerUsuario {
|
|
|
183
182
|
usuario: UsuarioBase;
|
|
184
183
|
};
|
|
185
184
|
};
|
|
186
|
-
type Response =
|
|
185
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
187
186
|
}
|
|
188
187
|
export namespace DeletarPeloId {
|
|
189
188
|
const route: "/api/usuario/:id";
|
|
@@ -198,7 +197,7 @@ declare namespace TypeControllerUsuario {
|
|
|
198
197
|
usuario: {};
|
|
199
198
|
};
|
|
200
199
|
};
|
|
201
|
-
type Response =
|
|
200
|
+
type Response = TypesCore.Geral.Response.C.AxiosRes<Output>;
|
|
202
201
|
}
|
|
203
202
|
export type TController = {
|
|
204
203
|
Criar: {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Context as HonoContext } from "hono";
|
|
2
2
|
import type { D1Database, Fetcher } from "@cloudflare/workers-types";
|
|
3
|
-
import TypeControllerUsuario from "./
|
|
4
|
-
import TypeControlerAutheticator from "./
|
|
5
|
-
import TypeControllerCodigoOtp from "./
|
|
3
|
+
import TypeControllerUsuario from "./entidades/type_controller_usuario";
|
|
4
|
+
import TypeControlerAutheticator from "./entidades/type_controller_authenticator";
|
|
5
|
+
import TypeControllerCodigoOtp from "./entidades/type_codigo_verificacao_otp";
|
|
6
6
|
import { TypesCore } from "@navservice/core";
|
|
7
|
-
import TypeResponse from "./geral/type_response";
|
|
8
7
|
declare namespace t {
|
|
9
8
|
namespace Controller {
|
|
10
9
|
export import Usuario = TypeControllerUsuario;
|
|
@@ -12,7 +11,6 @@ declare namespace t {
|
|
|
12
11
|
export import CodigoOtp = TypeControllerCodigoOtp;
|
|
13
12
|
}
|
|
14
13
|
namespace Geral {
|
|
15
|
-
export import Response = TypeResponse;
|
|
16
14
|
namespace FormularioZod {
|
|
17
15
|
interface Describe {
|
|
18
16
|
label?: string;
|
|
@@ -35,10 +33,12 @@ declare namespace t {
|
|
|
35
33
|
PUBLIC_GOOGLE_CLIENT_ID_AUTH0?: string;
|
|
36
34
|
PUBLIC_BASE_URL_SERVICE_USUARIO?: string;
|
|
37
35
|
PUBLIC_BASE_URL_SERVICE_ASSINATURA?: string;
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
JSON_WEB_TOKEN_AUTH_USER: string;
|
|
37
|
+
JSON_WEB_TOKEN_AUTH_MICRO_SERVICO: string;
|
|
38
|
+
JSON_WEB_REFRESH_TOKEN_AUTH_USER: string;
|
|
40
39
|
GOOGLE_CLIENT_ID_AUTH0?: string;
|
|
41
40
|
RESEND_API_KEY?: string;
|
|
41
|
+
CORS_ORIGIN?: string;
|
|
42
42
|
DB_SERVICE_USUARIO?: D1Database;
|
|
43
43
|
ASSETS?: Fetcher;
|
|
44
44
|
};
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@navservice/usuario",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Service de autenticação de usuários unificado",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./build/lib/index.js",
|
|
7
|
-
"module": "./build/es/index.js",
|
|
8
|
-
"types": "./build/es/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./build/es/index.js",
|
|
12
|
-
"require": "./build/lib/index.js",
|
|
13
|
-
"types": "./build/es/biblioteca/src/index.d.ts"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"build"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "rslib build"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"react": "^19",
|
|
24
|
-
"react-dom": "^19",
|
|
25
|
-
"react-router-dom": "^7",
|
|
26
|
-
"@react-oauth/google": "^0.12",
|
|
27
|
-
"google-auth-library": "^10",
|
|
28
|
-
"framer-motion": "^12.31.0",
|
|
29
|
-
"qrcode.react": "^4",
|
|
30
|
-
"zod": "^4",
|
|
31
|
-
"zustand": "^5"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"framer-motion": "^12.31.0",
|
|
35
|
-
"typescript": "^5",
|
|
36
|
-
"react": "^19",
|
|
37
|
-
"react-dom": "^19",
|
|
38
|
-
"react-router-dom": "^7",
|
|
39
|
-
"zod": "^4",
|
|
40
|
-
"zustand": "^5",
|
|
41
|
-
"@react-oauth/google": "^0.12"
|
|
42
|
-
},
|
|
43
|
-
"publishConfig": {
|
|
44
|
-
"access": "public",
|
|
45
|
-
"provenance": false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@navservice/usuario",
|
|
3
|
+
"version": "1.61.0",
|
|
4
|
+
"description": "Service de autenticação de usuários unificado",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./build/lib/index.js",
|
|
7
|
+
"module": "./build/es/index.js",
|
|
8
|
+
"types": "./build/es/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./build/es/index.js",
|
|
12
|
+
"require": "./build/lib/index.js",
|
|
13
|
+
"types": "./build/es/biblioteca/src/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"build"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rslib build"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^19",
|
|
24
|
+
"react-dom": "^19",
|
|
25
|
+
"react-router-dom": "^7",
|
|
26
|
+
"@react-oauth/google": "^0.12",
|
|
27
|
+
"google-auth-library": "^10",
|
|
28
|
+
"framer-motion": "^12.31.0",
|
|
29
|
+
"qrcode.react": "^4",
|
|
30
|
+
"zod": "^4",
|
|
31
|
+
"zustand": "^5"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"framer-motion": "^12.31.0",
|
|
35
|
+
"typescript": "^5",
|
|
36
|
+
"react": "^19",
|
|
37
|
+
"react-dom": "^19",
|
|
38
|
+
"react-router-dom": "^7",
|
|
39
|
+
"zod": "^4",
|
|
40
|
+
"zustand": "^5",
|
|
41
|
+
"@react-oauth/google": "^0.12"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Context } from "hono";
|
|
2
|
-
import z4 from "zod/v4";
|
|
3
|
-
declare namespace TypeControllerResponse {
|
|
4
|
-
const BaseResponseSchema: z4.ZodObject<{
|
|
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">]>;
|
|
7
|
-
type: z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>;
|
|
8
|
-
message: z4.ZodString;
|
|
9
|
-
results: z4.ZodOptional<z4.ZodUnknown>;
|
|
10
|
-
error: z4.ZodOptional<z4.ZodUnknown>;
|
|
11
|
-
}, z4.core.$strip>;
|
|
12
|
-
type BaseResponse<T = unknown> = z4.infer<typeof BaseResponseSchema> & {
|
|
13
|
-
results?: T;
|
|
14
|
-
};
|
|
15
|
-
export namespace C {
|
|
16
|
-
export const InputSchema: z4.ZodObject<{
|
|
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">]>;
|
|
19
|
-
type: z4.ZodDefault<z4.ZodOptional<z4.ZodDefault<z4.ZodUnion<readonly [z4.ZodLiteral<"success">, z4.ZodLiteral<"warning">, z4.ZodLiteral<"error">]>>>>;
|
|
20
|
-
message: z4.ZodOptional<z4.ZodString>;
|
|
21
|
-
results: z4.ZodAny;
|
|
22
|
-
c: z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>;
|
|
23
|
-
}, z4.core.$strip>;
|
|
24
|
-
export type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
25
|
-
results?: T;
|
|
26
|
-
};
|
|
27
|
-
export type Output<T = unknown> = BaseResponse<T>;
|
|
28
|
-
const FileResponseParamsSchema: z4.ZodObject<{
|
|
29
|
-
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>]>;
|
|
30
|
-
message: z4.ZodOptional<z4.ZodString>;
|
|
31
|
-
file_buffer: z4.ZodUnion<readonly [z4.ZodCustom<Blob, Blob>, z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
32
|
-
content_type: z4.ZodString;
|
|
33
|
-
filename: z4.ZodOptional<z4.ZodString>;
|
|
34
|
-
c: z4.ZodOptional<z4.ZodCustom<Context<any, any, {}>, Context<any, any, {}>>>;
|
|
35
|
-
}, z4.core.$strip>;
|
|
36
|
-
export type FileResponseParams = z4.infer<typeof FileResponseParamsSchema>;
|
|
37
|
-
export {};
|
|
38
|
-
}
|
|
39
|
-
export namespace Error {
|
|
40
|
-
const InputSchema: z4.ZodObject<{
|
|
41
|
-
message: z4.ZodOptional<z4.ZodString>;
|
|
42
|
-
results: z4.ZodOptional<z4.ZodUnion<readonly [z4.ZodArray<z4.ZodUnknown>, z4.ZodUnknown]>>;
|
|
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">]>;
|
|
45
|
-
status: z4.ZodDefault<z4.ZodOptional<z4.ZodNumber>>;
|
|
46
|
-
}, z4.core.$strip>;
|
|
47
|
-
type Input<T = unknown> = z4.infer<typeof InputSchema> & {
|
|
48
|
-
results?: T;
|
|
49
|
-
};
|
|
50
|
-
type Output<T = unknown> = BaseResponse<T>;
|
|
51
|
-
}
|
|
52
|
-
export {};
|
|
53
|
-
}
|
|
54
|
-
export default TypeControllerResponse;
|