@navservice/usuario 1.57.0 → 1.59.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.
@@ -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/controller/type_controller_usuario").default.RefreshToken.Response>;
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 && ('function' == typeof FormData && thing instanceof FormData || isFunction(thing.append) && ('formdata' === (kind = kindOf(thing)) || 'object' === kind && isFunction(thing.toString) && '[object FormData]' === thing.toString()));
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 ("undefined" != typeof globalThis) return globalThis;
170
- return "undefined" != typeof self ? self : 'undefined' != typeof window ? window : global;
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[key] = bind(val, thisArg);
189
- else a[key] = val;
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 (0xFEFF === content.charCodeAt(0)) content = content.slice(1);
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.constructor = constructor;
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('Can not rewrite read-only method \'' + name + '\'');
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("message", ({ source, data })=>{
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
- function AxiosError(message, code, config, request, response) {
406
- Error.call(this);
407
- if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
408
- else this.stack = new Error().stack;
409
- this.message = message;
410
- this.name = 'AxiosError';
411
- code && (this.code = code);
412
- config && (this.config = config);
413
- request && (this.request = request);
414
- if (response) {
415
- this.response = response;
416
- this.status = response.status ? response.status : null;
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
- const AxiosError_prototype = AxiosError.prototype;
437
- const AxiosError_descriptors = {};
438
- [
439
- 'ERR_BAD_OPTION_VALUE',
440
- 'ERR_BAD_OPTION',
441
- 'ECONNABORTED',
442
- 'ETIMEDOUT',
443
- 'ERR_NETWORK',
444
- 'ERR_FR_TOO_MANY_REDIRECTS',
445
- 'ERR_DEPRECATED',
446
- 'ERR_BAD_RESPONSE',
447
- 'ERR_BAD_REQUEST',
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
- if (utils.isFunction(options)) options = {
624
+ const _options = utils.isFunction(options) ? {
608
625
  serialize: options
609
- };
610
- const serializeFn = options && options.serialize;
626
+ } : options;
627
+ const serializeFn = _options && _options.serialize;
611
628
  let serializedParams;
612
- serializedParams = serializeFn ? serializeFn(params, options) : utils.isURLSearchParams(params) ? params.toString() : new helpers_AxiosURLSearchParams(params, options).toString(_encode);
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("set-cookie") || [];
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
- function CanceledError(message, config, request) {
1097
- core_AxiosError.call(this, null == message ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
1098
- this.name = 'CanceledError';
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
- const merge = mergeMap[prop] || mergeDeepProperties;
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} of ms exceeded`, core_AxiosError.ETIMEDOUT));
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: "half"
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 && "credentials" in Request.prototype;
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: "half",
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.2] Transitional option '" + opt + '\'' + desc + (message ? '. ' + message : '');
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
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
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.2";
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"),
@@ -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;
@@ -8546,7 +8490,7 @@ function Profile({ isCollapsed = false }) {
8546
8490
  });
8547
8491
  }
8548
8492
  const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
8549
- className: " relative z-40 h-16 w-full shrink-0 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 shadow-sm ",
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",
@@ -8563,14 +8507,19 @@ const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
8563
8507
  const layout_NavBar = NavBar;
8564
8508
  function Layout() {
8565
8509
  return /*#__PURE__*/ jsxs("div", {
8566
- className: "flex flex-col w-full h-[100dvh] bg-theme-bg text-theme-text overflow-hidden",
8510
+ className: "w-full h-[100dvh] bg-theme-bg text-theme-text",
8567
8511
  children: [
8568
8512
  /*#__PURE__*/ jsx(layout_NavBar, {}),
8569
8513
  /*#__PURE__*/ jsx("main", {
8570
- className: "flex-1 overflow-y-auto overflow-x-hidden min-h-0 bg-theme-bg",
8571
- children: /*#__PURE__*/ jsx("div", {
8572
- className: "min-h-full w-full flex flex-col",
8573
- children: /*#__PURE__*/ jsx(Outlet, {})
8514
+ className: "h-full overflow-hidden",
8515
+ children: /*#__PURE__*/ jsxs("div", {
8516
+ className: "h-full overflow-y-auto overflow-x-hidden",
8517
+ children: [
8518
+ /*#__PURE__*/ jsx("div", {
8519
+ className: "h-16 shrink-0"
8520
+ }),
8521
+ /*#__PURE__*/ jsx(Outlet, {})
8522
+ ]
8574
8523
  })
8575
8524
  })
8576
8525
  ]
@@ -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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<t.Controller.Usuario.Register.Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 t from "..";
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 = AxiosResponse<t.Geral.Response.C.Output<Output>>;
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 "./controller/type_controller_usuario";
4
- import TypeControlerAutheticator from "./controller/type_controller_authenticator";
5
- import TypeControllerCodigoOtp from "./controller/type_codigo_verificacao_otp";
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/usuario",
3
- "version": "1.57.0",
3
+ "version": "1.59.0",
4
4
  "description": "Service de autenticação de usuários unificado",
5
5
  "type": "module",
6
6
  "main": "./build/lib/index.js",
@@ -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;