apacuana-sdk-core 0.9.0 → 0.11.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.
Files changed (56) hide show
  1. package/README.md +320 -236
  2. package/coverage/clover.xml +341 -212
  3. package/coverage/coverage-final.json +9 -7
  4. package/coverage/lcov-report/index.html +34 -19
  5. package/coverage/lcov-report/src/api/certs.js.html +493 -37
  6. package/coverage/lcov-report/src/api/faceLiveness.js.html +496 -0
  7. package/coverage/lcov-report/src/api/index.html +43 -28
  8. package/coverage/lcov-report/src/api/revocations.js.html +103 -106
  9. package/coverage/lcov-report/src/api/signatures.js.html +25 -253
  10. package/coverage/lcov-report/src/api/users.js.html +7 -13
  11. package/coverage/lcov-report/src/config/index.html +1 -1
  12. package/coverage/lcov-report/src/config/index.js.html +1 -1
  13. package/coverage/lcov-report/src/errors/index.html +1 -1
  14. package/coverage/lcov-report/src/errors/index.js.html +8 -8
  15. package/coverage/lcov-report/src/index.html +1 -1
  16. package/coverage/lcov-report/src/index.js.html +48 -3
  17. package/coverage/lcov-report/src/success/index.html +116 -0
  18. package/coverage/lcov-report/src/success/index.js.html +106 -0
  19. package/coverage/lcov-report/src/utils/constant.js.html +4 -4
  20. package/coverage/lcov-report/src/utils/helpers.js.html +1 -1
  21. package/coverage/lcov-report/src/utils/httpClient.js.html +1 -1
  22. package/coverage/lcov-report/src/utils/index.html +1 -1
  23. package/coverage/lcov.info +591 -352
  24. package/dist/api/certs.d.ts +13 -30
  25. package/dist/api/faceLiveness.d.ts +6 -0
  26. package/dist/api/revocations.d.ts +3 -42
  27. package/dist/api/signatures.d.ts +11 -153
  28. package/dist/index.d.ts +10 -0
  29. package/dist/index.js +630 -214
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +630 -214
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/success/index.d.ts +7 -0
  34. package/dist/types/certs.d.ts +97 -0
  35. package/dist/types/faceLiveness.d.ts +10 -0
  36. package/dist/types/revocations.d.ts +40 -0
  37. package/dist/types/signatures.d.ts +152 -0
  38. package/dist/types/users.d.ts +260 -0
  39. package/package.json +1 -1
  40. package/src/api/certs.js +175 -23
  41. package/src/api/faceLiveness.js +137 -0
  42. package/src/api/revocations.js +66 -67
  43. package/src/api/signatures.js +21 -97
  44. package/src/api/users.js +4 -6
  45. package/src/index.js +16 -1
  46. package/src/success/index.js +8 -0
  47. package/src/types/certs.js +56 -0
  48. package/src/types/faceLiveness.js +7 -0
  49. package/src/types/revocations.js +25 -0
  50. package/src/types/signatures.js +77 -0
  51. package/src/types/users.js +73 -0
  52. package/tests/api/certs.test.js +209 -4
  53. package/tests/api/faceLiveness.test.js +172 -0
  54. package/tests/api/revocations.test.js +37 -37
  55. package/tests/api/signatures.test.js +11 -5
  56. package/tests/api/users.test.js +3 -2
@@ -2,72 +2,20 @@
2
2
  import { getConfig } from "../config/index";
3
3
  import { httpRequest } from "../utils/httpClient";
4
4
  import { ApacuanaAPIError } from "../errors";
5
+ import ApacuanaSuccess from "../success";
5
6
  import helpers from "../utils/helpers";
6
7
  import { INTEGRATION_TYPE } from "../utils/constant";
7
8
 
8
- // =================================================================
9
- // Type Definitions
10
- // =================================================================
11
-
12
- /**
13
- * Define la estructura de un objeto Firmante.
14
- * @typedef {object} Signer
15
- * @property {string} name - Nombre completo del firmante.
16
- * @property {string} email - Correo electrónico del firmante.
17
- * @property {string} document - Documento de identidad del firmante.
18
- */
19
-
20
- /**
21
- * Define la estructura de datos para añadir un firmante.
22
- * @typedef {object} SignerData
23
- * @property {string} docId - Identificador único del documento.
24
- */
25
-
26
- /**
27
- * Define la estructura de la respuesta al añadir un firmante.
28
- * @typedef {object} AddSignerResponse
29
- * @property {string} signer - Identificador de confirmación del firmante añadido.
30
- * @property {boolean} success - Indica si la operación fue exitosa.
31
- */
32
-
33
- /**
34
- * Define la estructura de datos para obtener el digest de un documento.
35
- * @typedef {object} GetDigestData
36
- * @property {string} cert - Certificado del firmante en formato base64.
37
- * @property {string} signatureId - Identificador único del proceso de firma.
38
- */
39
-
40
- /**
41
- * Define la estructura de la respuesta al obtener el digest.
42
- * @typedef {object} GetDigestResponse
43
- * @property {string} digest - El digest del documento que se va a firmar.
44
- * @property {boolean} success - Indica si la operación fue exitosa.
45
- */
46
-
47
- /**
48
- * Define la estructura de los parámetros para obtener documentos.
49
- * @typedef {object} GetDocsParams
50
- * @property {number} page - Número de página para la paginación.
51
- * @property {number} size - Cantidad de registros por página.
52
- * @property {string} [status] - (Opcional) Estado para filtrar los documentos.
53
- */
54
-
55
- /**
56
- * Define la estructura de la respuesta al obtener documentos.
57
- * @typedef {object} GetDocsResponse
58
- * @property {number} totalRecords - El número total de registros encontrados.
59
- * @property {Array<object>} records - Un arreglo con los registros de los documentos.
60
- * @property {boolean} success - Indica si la operación fue exitosa.
61
- */
62
-
63
- /**
64
- * @typedef {object} SignDocumentData
65
- * @property {object} signature - Objeto con información de la firma.
66
- * @property {string} signature.id - ID de la firma.
67
- * @property {Array<object>} signature.positions - Posiciones de la firma.
68
- * @property {string} cert - Certificado en base64.
69
- * @property {string} signedDigest - Digest firmado.
70
- */
9
+ /** @typedef {import("../types/signatures").Signer} Signer */
10
+ /** @typedef {import("../types/signatures").SignerData} SignerData */
11
+ /** @typedef {import("../types/signatures").AddSignerResponse} AddSignerResponse */
12
+ /** @typedef {import("../types/signatures").GetDigestData} GetDigestData */
13
+ /** @typedef {import("../types/signatures").GetDigestResponse} GetDigestResponse */
14
+ /** @typedef {import("../types/signatures").GetDocsParams} GetDocsParams */
15
+ /** @typedef {import("../types/signatures").GetDocsResponse} GetDocsResponse */
16
+ /** @typedef {import("../types/signatures").SignDocumentData} SignDocumentData */
17
+ /** @typedef {import("../types/signatures").SignaturePosition} SignaturePosition */
18
+ /** @typedef {import("../types/signatures").OnboardingSignerData} OnboardingSignerData */
71
19
 
72
20
  // =================================================================
73
21
  // Internal Functions
@@ -95,7 +43,7 @@ const signDocumentOnBoarding = async (signData) => {
95
43
  signBody,
96
44
  "PUT"
97
45
  );
98
- return response;
46
+ return new ApacuanaSuccess(response);
99
47
  } catch (error) {
100
48
  if (error instanceof ApacuanaAPIError) {
101
49
  throw error;
@@ -132,7 +80,7 @@ const getDigestToSignOnBoarding = async (signData) => {
132
80
  );
133
81
  }
134
82
 
135
- return { digest, success: true };
83
+ return new ApacuanaSuccess({ digest });
136
84
  } catch (error) {
137
85
  if (error.name === "ApacuanaAPIError") {
138
86
  throw error;
@@ -155,7 +103,9 @@ const addSignerOnBoarding = async (signerData) => {
155
103
  helpers.validateOnBoardingSignerData(signerData);
156
104
  try {
157
105
  await httpRequest("services/api/documents/signing", signerData, "POST");
158
- return { signer: signerData.typedoc + signerData.doc, success: true };
106
+ return new ApacuanaSuccess({
107
+ signer: signerData.typedoc + signerData.doc,
108
+ });
159
109
  } catch (error) {
160
110
  if (error instanceof ApacuanaAPIError) {
161
111
  throw error;
@@ -203,11 +153,10 @@ const getDocsOnBoarding = async (data) => {
203
153
 
204
154
  const apiUrl = `services/api/documents/listcustomer?${params.toString()}`;
205
155
  const response = await httpRequest(apiUrl, {}, "GET");
206
- return {
156
+ return new ApacuanaSuccess({
207
157
  totalRecords: response.numofrecords,
208
158
  records: response.records,
209
- success: true,
210
- };
159
+ });
211
160
  } catch (error) {
212
161
  if (error.name === "ApacuanaAPIError") {
213
162
  throw error;
@@ -225,7 +174,7 @@ const uploadSignatureVariantOnBoarding = async ({ file }) => {
225
174
  { file },
226
175
  "POST"
227
176
  );
228
- return { ...response, success: true };
177
+ return new ApacuanaSuccess(response);
229
178
  } catch (error) {
230
179
  if (error instanceof ApacuanaAPIError) {
231
180
  throw error;
@@ -252,7 +201,7 @@ const getSignatureVariantOnBoarding = async () => {
252
201
  {},
253
202
  "GET"
254
203
  );
255
- return { ...response, success: true };
204
+ return new ApacuanaSuccess(response);
256
205
  } catch (error) {
257
206
  if (error instanceof ApacuanaAPIError) {
258
207
  throw error;
@@ -278,7 +227,7 @@ const deleteSignatureVariantOnBoarding = async () => {
278
227
  {},
279
228
  "DELETE"
280
229
  );
281
- return { ...response, success: true };
230
+ return new ApacuanaSuccess(response);
282
231
  } catch (error) {
283
232
  if (error instanceof ApacuanaAPIError) {
284
233
  throw error;
@@ -358,31 +307,6 @@ export const getDigest = async (signData) => {
358
307
  * @returns {Promise<AddSignerResponse>} Una promesa que resuelve a un objeto con el resultado de la operación.
359
308
  * @throws {ApacuanaAPIError} Si los datos del firmante son inválidos, la llamada a la API falla, o el tipo de integración no es soportado.
360
309
  */
361
- /**
362
- * @typedef {object} SignaturePosition
363
- * @property {number} page - The page number for the signature.
364
- * @property {number} x - The x-coordinate for the signature's position (from 0 to 1).
365
- * @property {number} y - The y-coordinate for the signature's position (from 0 to 1).
366
- */
367
-
368
- /**
369
- * @typedef {object} OnboardingSignerData
370
- * @property {string} name - The name of the document.
371
- * @property {string} reference - An external reference for the document.
372
- * @property {string} typedoc - The type of document of the signer (e.g., "V", "E", "J").
373
- * @property {string} doc - The document number of the signer.
374
- * @property {SignaturePosition[]} signature - An array of signature positions.
375
- */
376
-
377
- /**
378
- * Adds a new signer to the signature process.
379
- * This function acts as a dispatcher, delegating to the appropriate implementation
380
- * based on the configured integration type.
381
- *
382
- * @param {OnboardingSignerData | object} signerData - The signer's data. The structure depends on the integration type.
383
- * @returns {Promise<object>} The result from the API.
384
- * @throws {ApacuanaAPIError} If signerData is invalid or if the integration type is not supported.
385
- */
386
310
  export const addSigner = async (signerData) => {
387
311
  if (
388
312
  !signerData ||
package/src/api/users.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { httpRequest } from "../utils/httpClient";
2
2
  import { ApacuanaAPIError } from "../errors/index";
3
3
  import { getConfig } from "../config/index";
4
+ import ApacuanaSuccess from "../success";
4
5
 
5
6
  /**
6
7
  * @typedef {object} GetCustomerResponse
@@ -49,19 +50,16 @@ const getCustomer = async () => {
49
50
  );
50
51
  }
51
52
 
52
- return {
53
+ return new ApacuanaSuccess({
53
54
  token: response.sessionid,
54
55
  userData: response.entry,
55
- success: true,
56
- };
56
+ });
57
57
  } catch (error) {
58
58
  if (error instanceof ApacuanaAPIError) {
59
59
  throw error;
60
60
  }
61
61
  throw new ApacuanaAPIError(
62
- `Unexpected failure getting token: ${
63
- error.message || "Unknown error"
64
- }`
62
+ `Unexpected failure getting token: ${error.message || "Unknown error"}`
65
63
  );
66
64
  }
67
65
  };
package/src/index.js CHANGED
@@ -2,7 +2,13 @@ import { setConfig, getConfig, close } from "./config/index";
2
2
  import { initHttpClient, setAuthToken } from "./utils/httpClient";
3
3
  import getCustomer from "./api/users";
4
4
  import { requestRevocation, getRevocationReasons } from "./api/revocations";
5
- import { generateCert, getCertStatus } from "./api/certs";
5
+ import {
6
+ generateCert,
7
+ getCertStatus,
8
+ getCertTypes,
9
+ getRequerimentsByTypeUser,
10
+ requestCertificate,
11
+ } from "./api/certs";
6
12
  import {
7
13
  addSigner,
8
14
  deleteSignatureVariant,
@@ -12,6 +18,10 @@ import {
12
18
  signDocument,
13
19
  uploadSignatureVariant,
14
20
  } from "./api/signatures";
21
+ import {
22
+ createFaceLivenessSession,
23
+ validateFaceLiveness,
24
+ } from "./api/faceLiveness";
15
25
 
16
26
  const apacuana = {
17
27
  /**
@@ -61,6 +71,11 @@ const apacuana = {
61
71
  uploadSignatureVariant,
62
72
  getSignatureVariant,
63
73
  deleteSignatureVariant,
74
+ getCertTypes,
75
+ getRequerimentsByTypeUser,
76
+ createFaceLivenessSession,
77
+ validateFaceLiveness,
78
+ requestCertificate,
64
79
  };
65
80
 
66
81
  export default apacuana;
@@ -0,0 +1,8 @@
1
+ export default class ApacuanaSuccess {
2
+ constructor(data, statusCode = 200) {
3
+ this.success = true;
4
+ this.statusCode = statusCode;
5
+ this.name = "ApacuanaSuccess";
6
+ this.data = data;
7
+ }
8
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @typedef {object} GenerateCertResponse
3
+ * @property {string} cert - El certificado generado en formato string.
4
+ * @property {string} certifiedid - El ID del certificado generado.
5
+ * @property {boolean} success - Indica si la operación fue exitosa.
6
+ */
7
+
8
+ /**
9
+ * @typedef {object} GetCertStatusResponse
10
+ * @property {string} status - El estado actual del certificado del usuario.
11
+ * @property {boolean} success - Indica si la operación fue exitosa.
12
+ */
13
+
14
+ /**
15
+ * @typedef {object} EncryptedCSRObject
16
+ * @property {string} csr - The encrypted Certificate Signing Request.
17
+ */
18
+
19
+ /**
20
+ * @typedef {object} CertType
21
+ * @property {string} id - The ID of the certificate type.
22
+ * @property {string} name - The name of the certificate type.
23
+ */
24
+
25
+ /**
26
+ * @typedef {object} GetCertTypesResponse
27
+ * @property {Array<CertType>} types - A list of available certificate types.
28
+ * @property {boolean} success - Indicates if the operation was successful.
29
+ */
30
+
31
+ /**
32
+ * @typedef {object} Requirement
33
+ * @property {string} id - The ID of the requirement.
34
+ * @property {string} description - The description of the requirement.
35
+ */
36
+
37
+ /**
38
+ * @typedef {object} GetRequirementsResponse
39
+ * @property {Array<Requirement>} requirements - A list of requirements for the user type.
40
+ * @property {boolean} success - Indicates if the operation was successful.
41
+ */
42
+
43
+ /**
44
+ * @typedef {object} CertificateRequestParams
45
+ * @property {number} type - The user type to get requirements for.
46
+ * @property {string} [observation] - An optional observation for the certificate request.
47
+ * @property {Array<{id: string, file: string}>} documents - The documents required for the certificate.
48
+ */
49
+
50
+ /**
51
+ * @typedef {object} RequestCertificateResponse
52
+ * @property {string} message - A message confirming the request.
53
+ * @property {boolean} success - Indicates if the operation was successful.
54
+ */
55
+
56
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @typedef {object} CreateFaceLivenessSessionResponse
3
+ * @property {string} sessionId - The session ID for the face liveness check.
4
+ * @property {boolean} success - Indicates if the operation was successful.
5
+ */
6
+
7
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @typedef {object} RequestRevocationResponse
3
+ * @property {string} revocationStatus - El estado de la solicitud de revocación (e.g., "pending").
4
+ * @property {string|number} requestId - El ID de la solicitud de revocación.
5
+ */
6
+
7
+ /**
8
+ * @typedef {object} RevocationResponse
9
+ * @property {boolean} success - Indicates if the revocation request was successful.
10
+ * @property {string} [message] - A message providing details about the outcome.
11
+ */
12
+
13
+ /**
14
+ * @typedef {object} RevocationReason
15
+ * @property {string} code - The code for the revocation reason.
16
+ * @property {string} description - The description of the revocation reason.
17
+ */
18
+
19
+ /**
20
+ * @typedef {object} RevocationReasonsResponse
21
+ * @property {boolean} success - Indicates if the request was successful.
22
+ * @property {RevocationReason[]} reasons - A list of revocation reasons.
23
+ */
24
+
25
+ export {};
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Define la estructura de un objeto Firmante.
3
+ * @typedef {object} Signer
4
+ * @property {string} name - Nombre completo del firmante.
5
+ * @property {string} email - Correo electrónico del firmante.
6
+ * @property {string} document - Documento de identidad del firmante.
7
+ */
8
+
9
+ /**
10
+ * Define la estructura de datos para añadir un firmante.
11
+ * @typedef {object} SignerData
12
+ * @property {string} docId - Identificador único del documento.
13
+ */
14
+
15
+ /**
16
+ * Define la estructura de la respuesta al añadir un firmante.
17
+ * @typedef {object} AddSignerResponse
18
+ * @property {string} signer - Identificador de confirmación del firmante añadido.
19
+ * @property {boolean} success - Indica si la operación fue exitosa.
20
+ */
21
+
22
+ /**
23
+ * Define la estructura de datos para obtener el digest de un documento.
24
+ * @typedef {object} GetDigestData
25
+ * @property {string} cert - Certificado del firmante en formato base64.
26
+ * @property {string} signatureId - Identificador único del proceso de firma.
27
+ */
28
+
29
+ /**
30
+ * Define la estructura de la respuesta al obtener el digest.
31
+ * @typedef {object} GetDigestResponse
32
+ * @property {string} digest - El digest del documento que se va a firmar.
33
+ * @property {boolean} success - Indica si la operación fue exitosa.
34
+ */
35
+
36
+ /**
37
+ * Define la estructura de los parámetros para obtener documentos.
38
+ * @typedef {object} GetDocsParams
39
+ * @property {number} page - Número de página para la paginación.
40
+ * @property {number} size - Cantidad de registros por página.
41
+ * @property {string} [status] - (Opcional) Estado para filtrar los documentos.
42
+ */
43
+
44
+ /**
45
+ * Define la estructura de la respuesta al obtener documentos.
46
+ * @typedef {object} GetDocsResponse
47
+ * @property {number} totalRecords - El número total de registros encontrados.
48
+ * @property {Array<object>} records - Un arreglo con los registros de los documentos.
49
+ * @property {boolean} success - Indica si la operación fue exitosa.
50
+ */
51
+
52
+ /**
53
+ * @typedef {object} SignDocumentData
54
+ * @property {object} signature - Objeto con información de la firma.
55
+ * @property {string} signature.id - ID de la firma.
56
+ * @property {Array<object>} signature.positions - Posiciones de la firma.
57
+ * @property {string} cert - Certificado en base64.
58
+ * @property {string} signedDigest - Digest firmado.
59
+ */
60
+
61
+ /**
62
+ * @typedef {object} SignaturePosition
63
+ * @property {number} page - The page number for the signature.
64
+ * @property {number} x - The x-coordinate for the signature's position (from 0 to 1).
65
+ * @property {number} y - The y-coordinate for the signature's position (from 0 to 1).
66
+ */
67
+
68
+ /**
69
+ * @typedef {object} OnboardingSignerData
70
+ * @property {string} name - The name of the document.
71
+ * @property {string} reference - An external reference for the document.
72
+ * @property {string} typedoc - The type of document of the signer (e.g., "V", "E", "J").
73
+ * @property {string} doc - The document number of the signer.
74
+ * @property {SignaturePosition[]} signature - An array of signature positions.
75
+ */
76
+
77
+ export {};
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @typedef {object} UserData
3
+ * @property {string} email - Correo electrónico. No puede contener espacios y tiene un máximo de 128 caracteres.
4
+ * @property {number} typeuser - Tipo de usuario. Debe ser un ID valido.
5
+ * @property {string} name - Nombre de la persona.
6
+ * @property {string} lastname - Apellido de la persona.
7
+ * @property {'V' | 'P' | 'E'} kinddoc - Tipo de documento de identidad. Puede ser 'V' (Venezolano), 'P' (Pasaporte) o 'E' (Extranjero).
8
+ * @property {number} doc - Número de documento de identidad. Debe ser un número entero.
9
+ * @property {string} birthdate - Fecha de nacimiento. Debe ser una fecha válida en formato ISO y no puede ser una fecha futura.
10
+ * @property {'J' | 'G' | 'V' | 'P' | 'E'} kindrif - Tipo de RIF (Registro de Información Fiscal). Puede ser 'J', 'G', 'V', 'P' o 'E'.
11
+ * @property {'M' | 'F' | 'Sin especificar'} gender - Género. Puede ser 'M' (Masculino), 'F' (Femenino) o 'Sin especificar'.
12
+ * @property {number} rif - Número de RIF. Debe ser un número entero.
13
+ * @property {number} phone - Número de teléfono. Debe ser un número entero.
14
+ * @property {string} kindphone - Código de área del teléfono. Ej. 0424.
15
+ * @property {string} state - Nombre del estado.
16
+ * @property {string} municipality - Nombre del municipio.
17
+ * @property {string} parish - Nombre de la parroquia.
18
+ * @property {string} postalcode - Código postal.
19
+ * @property {string} address - Dirección.
20
+ * @property {string} fiscaladdress - Dirección fiscal.
21
+ * @property {string} fiscalkindphone - Código de área del teléfono fiscal. Ej. 0424.
22
+ * @property {number} fiscalphone - Número de teléfono fiscal. Debe ser un número entero.
23
+ * @property {string} occupation - Ocupacion de la persona.
24
+ * @property {string} degree - Título universitario.
25
+ * @property {string} university - Universidad.
26
+ * @property {string} graduationyear - Año de graduación.
27
+ * @property {string} collegiatenumber - Número de colegiado.
28
+ * @property {string} collegiateyear - Año de colegiatura.
29
+ * @property {string} companyname - Nombre de la empresa.
30
+ * @property {'J' | 'G' | 'V' | 'P' | 'E'} companykindrif - Tipo de RIF de la empresa. Puede ser 'J', 'G', 'V', 'P' o 'E'.
31
+ * @property {string} companyrif - Número de RIF de la empresa.
32
+ * @property {string} companystate - Estado de la empresa.
33
+ * @property {string} companymunicipality - Municipio de la empresa.
34
+ * @property {string} companyparish - Parroquia de la empresa.
35
+ * @property {string} companyaddress - Dirección de la empresa.
36
+ * @property {string} companykindphone - Código de área del teléfono de la empresa. Ej. 0212.
37
+ * @property {string} companyphone - Número de teléfono de la empresa.
38
+ * @property {string} companypostalcode - Código postal de la empresa.
39
+ * @property {string} companywebpage - Página web de la empresa.
40
+ * @property {string} companycommercialregister - Registro comercial de la empresa.
41
+ * @property {string} companyregisterdate - Fecha de registro de la empresa en formato ISO.
42
+ * @property {string} companyregisternumber - Número de registro de la empresa.
43
+ * @property {string} companyconstitutiondate - Fecha de constitución de la empresa en formato ISO.
44
+ * @property {string} companypublishdate - Fecha de publicación del decreto de constitución. Debe ser una fecha válida en formato ISO y no puede ser una fecha futura.
45
+ * @property {string} companyconstitutiondecree - Decreto de constitución de la empresa. Máximo 32 caracteres.
46
+ * @property {string} companynumberdecree - Número de decreto de la empresa. Máximo 16 caracteres.
47
+ * @property {string} positionprivate - Cargo empleado empresa privada.
48
+ * @property {string} departmentprivate - Departamento empleado empresa privada.
49
+ * @property {string} authorizedprivate - Autorizado de por empleado empresa privada.
50
+ * @property {string} functionsprivate - Funciones empleado empresa privada.
51
+ * @property {string} publishprivate - Fecha de publicación de la gaceta de la empresa privada.
52
+ * @property {string} issuedateprivate - Fecha de registro de la empresa privada. Debe ser una fecha válida en formato ISO.
53
+ * @property {string} kindphoneprivate - Código de área del teléfono de la empresa privada. ej. 0424.
54
+ * @property {number} phoneprivate - Número de teléfono privado. Debe ser un número entero.
55
+ * @property {string} positionpublic - Cargo empleado empresa publica.
56
+ * @property {string} departmentpublic - Departamento empleado empresa publica.
57
+ * @property {string} authorizedpublic - Autorizado empleado empresa publica.
58
+ * @property {string} functionspublic - Funciones de empleado empresa publica.
59
+ * @property {string} publishpublic - Fecha de publicación de la gaceta de la empresa pública.
60
+ * @property {string} issuedatepublic - Fecha de registro de la empresa pública. Debe ser una fecha válida en formato ISO.
61
+ * @property {string} kindphonepublic - Código de área del teléfono de la empresa publica. ej 0424.
62
+ * @property {number} phonepublic - Número de teléfono público. Debe ser un número entero.
63
+ * @property {string} companyid - ID de la empresa. Debe ser un UUID para la creacion de empleados.
64
+ */
65
+
66
+ /**
67
+ * @typedef {object} GetCustomerResponse
68
+ * @property {string} token - El token de sesión del usuario.
69
+ * @property {UserData} userData - Los datos del usuario obtenidos.
70
+ * @property {boolean} success - Indica si la operación fue exitosa.
71
+ */
72
+
73
+ export {};