apacuana-sdk-core 1.0.0 → 1.2.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 (92) hide show
  1. package/.eslintrc.cjs +22 -0
  2. package/CHANGELOG.md +1 -0
  3. package/README.md +794 -0
  4. package/babel.config.cjs +11 -0
  5. package/coverage/clover.xml +628 -0
  6. package/coverage/coverage-final.json +13 -0
  7. package/coverage/lcov-report/api/index.html +131 -0
  8. package/coverage/lcov-report/api/signatures.js.html +1093 -0
  9. package/coverage/lcov-report/api/users.js.html +292 -0
  10. package/coverage/lcov-report/base.css +224 -0
  11. package/coverage/lcov-report/block-navigation.js +87 -0
  12. package/coverage/lcov-report/certs.js.html +175 -0
  13. package/coverage/lcov-report/config/index.html +116 -0
  14. package/coverage/lcov-report/config/index.js.html +208 -0
  15. package/coverage/lcov-report/errors/index.html +116 -0
  16. package/coverage/lcov-report/errors/index.js.html +148 -0
  17. package/coverage/lcov-report/favicon.png +0 -0
  18. package/coverage/lcov-report/index.html +191 -0
  19. package/coverage/lcov-report/prettify.css +1 -0
  20. package/coverage/lcov-report/prettify.js +2 -0
  21. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  22. package/coverage/lcov-report/sorter.js +210 -0
  23. package/coverage/lcov-report/src/api/certs.js.html +856 -0
  24. package/coverage/lcov-report/src/api/faceLiveness.js.html +523 -0
  25. package/coverage/lcov-report/src/api/index.html +176 -0
  26. package/coverage/lcov-report/src/api/revocations.js.html +412 -0
  27. package/coverage/lcov-report/src/api/signatures.js.html +1420 -0
  28. package/coverage/lcov-report/src/api/users.js.html +466 -0
  29. package/coverage/lcov-report/src/config/index.html +116 -0
  30. package/coverage/lcov-report/src/config/index.js.html +256 -0
  31. package/coverage/lcov-report/src/errors/index.html +116 -0
  32. package/coverage/lcov-report/src/errors/index.js.html +148 -0
  33. package/coverage/lcov-report/src/index.html +116 -0
  34. package/coverage/lcov-report/src/index.js.html +592 -0
  35. package/coverage/lcov-report/src/success/index.html +116 -0
  36. package/coverage/lcov-report/src/success/index.js.html +106 -0
  37. package/coverage/lcov-report/src/utils/constant.js.html +256 -0
  38. package/coverage/lcov-report/src/utils/helpers.js.html +1195 -0
  39. package/coverage/lcov-report/src/utils/httpClient.js.html +622 -0
  40. package/coverage/lcov-report/src/utils/index.html +146 -0
  41. package/coverage/lcov-report/utils/constant.js.html +145 -0
  42. package/coverage/lcov-report/utils/httpClient.js.html +646 -0
  43. package/coverage/lcov-report/utils/index.html +131 -0
  44. package/coverage/lcov.info +1259 -0
  45. package/dist/api/certs.d.ts +15 -0
  46. package/dist/api/faceLiveness.d.ts +6 -0
  47. package/dist/api/revocations.d.ts +6 -0
  48. package/dist/api/signatures.d.ts +19 -0
  49. package/dist/api/users.d.ts +47 -0
  50. package/dist/config/index.d.ts +22 -0
  51. package/dist/errors/index.d.ts +10 -0
  52. package/dist/index.d.ts +25 -0
  53. package/dist/index.js +34493 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/index.mjs +34491 -0
  56. package/dist/index.mjs.map +1 -0
  57. package/dist/success/index.d.ts +7 -0
  58. package/dist/types/certs.d.ts +83 -0
  59. package/dist/types/faceLiveness.d.ts +11 -0
  60. package/dist/types/revocations.d.ts +51 -0
  61. package/dist/types/signatures.d.ts +162 -0
  62. package/dist/types/users.d.ts +260 -0
  63. package/dist/utils/constant.d.ts +49 -0
  64. package/dist/utils/helpers.d.ts +25 -0
  65. package/dist/utils/httpClient.d.ts +3 -0
  66. package/jest.config.cjs +12 -0
  67. package/package.json +51 -9
  68. package/rollup.config.js +32 -0
  69. package/src/api/certs.js +257 -0
  70. package/src/api/faceLiveness.js +146 -0
  71. package/src/api/revocations.js +109 -0
  72. package/src/api/signatures.js +445 -0
  73. package/src/api/users.js +127 -0
  74. package/src/config/index.js +57 -0
  75. package/src/errors/index.js +21 -0
  76. package/src/index.js +169 -0
  77. package/src/success/index.js +8 -0
  78. package/src/types/certs.js +67 -0
  79. package/src/types/faceLiveness.js +16 -0
  80. package/src/types/revocations.js +45 -0
  81. package/src/types/signatures.js +96 -0
  82. package/src/types/users.js +73 -0
  83. package/src/utils/constant.js +57 -0
  84. package/src/utils/helpers.js +370 -0
  85. package/src/utils/httpClient.js +179 -0
  86. package/tests/api/certs.test.js +311 -0
  87. package/tests/api/faceLiveness.test.js +170 -0
  88. package/tests/api/revocations.test.js +119 -0
  89. package/tests/api/signatures.test.js +530 -0
  90. package/tests/api/users.test.js +117 -0
  91. package/tests/index.test.js +131 -0
  92. package/tsconfig.json +16 -0
@@ -0,0 +1,7 @@
1
+ export default class ApacuanaSuccess {
2
+ constructor(data: any, statusCode?: number);
3
+ success: boolean;
4
+ statusCode: number;
5
+ name: string;
6
+ data: any;
7
+ }
@@ -0,0 +1,83 @@
1
+ export type ApacuanaSuccess = import("../success").ApacuanaSuccess;
2
+ export type GenerateCertResponseData = {
3
+ /**
4
+ * - El certificado generado en formato string.
5
+ */
6
+ cert: string;
7
+ /**
8
+ * - El ID del certificado generado.
9
+ */
10
+ certifiedid: string;
11
+ };
12
+ export type GetCertStatusResponseData = {
13
+ /**
14
+ * - El estado actual del certificado del usuario.
15
+ */
16
+ status: string;
17
+ };
18
+ export type CertType = {
19
+ /**
20
+ * - The ID of the certificate type.
21
+ */
22
+ id: string;
23
+ /**
24
+ * - The name of the certificate type.
25
+ */
26
+ name: string;
27
+ };
28
+ export type GetCertTypesResponseData = {
29
+ /**
30
+ * - A list of available certificate types.
31
+ */
32
+ types: Array<CertType>;
33
+ };
34
+ export type Requirement = {
35
+ /**
36
+ * - The ID of the requirement.
37
+ */
38
+ id: string;
39
+ /**
40
+ * - The description of the requirement.
41
+ */
42
+ description: string;
43
+ };
44
+ export type GetRequirementsResponseData = {
45
+ /**
46
+ * - A list of requirements for the user type.
47
+ */
48
+ requirements: Array<Requirement>;
49
+ };
50
+ export type RequestCertificateResponseData = {
51
+ /**
52
+ * - A message confirming the request.
53
+ */
54
+ message: string;
55
+ };
56
+ export type GenerateCertResponse = GenerateCertResponseData & ApacuanaSuccess;
57
+ export type GetCertStatusResponse = GetCertStatusResponseData & ApacuanaSuccess;
58
+ export type GetCertTypesResponse = GetCertTypesResponseData & ApacuanaSuccess;
59
+ export type GetRequirementsResponse = GetRequirementsResponseData & ApacuanaSuccess;
60
+ export type RequestCertificateResponse = RequestCertificateResponseData & ApacuanaSuccess;
61
+ export type EncryptedCSRObject = {
62
+ /**
63
+ * - The encrypted Certificate Signing Request.
64
+ */
65
+ csr: string;
66
+ };
67
+ export type CertificateRequestParams = {
68
+ /**
69
+ * - The user type to get requirements for.
70
+ */
71
+ type: number;
72
+ /**
73
+ * - An optional observation for the certificate request.
74
+ */
75
+ observation?: string | undefined;
76
+ /**
77
+ * - The documents required for the certificate.
78
+ */
79
+ documents: Array<{
80
+ id: string;
81
+ file: string;
82
+ }>;
83
+ };
@@ -0,0 +1,11 @@
1
+ export type ApacuanaSuccess = import("../success").ApacuanaSuccess;
2
+ export type CreateFaceLivenessSessionData = {
3
+ /**
4
+ * - The session ID for the face liveness check.
5
+ */
6
+ sessionId: string;
7
+ };
8
+ export type CreateFaceLivenessSessionResponse = {
9
+ success: true;
10
+ data: CreateFaceLivenessSessionData;
11
+ };
@@ -0,0 +1,51 @@
1
+ export type ApacuanaSuccess = import("../success").ApacuanaSuccess;
2
+ export type RevocationReason = {
3
+ /**
4
+ * - The code for the revocation reason.
5
+ */
6
+ code: string;
7
+ /**
8
+ * - The description of the revocation reason.
9
+ */
10
+ description: string;
11
+ };
12
+ export type RequestRevocationData = {
13
+ /**
14
+ * - A message providing details about the outcome.
15
+ */
16
+ message: string;
17
+ };
18
+ export type RequestRevocationResponse = {
19
+ success: true;
20
+ data: RequestRevocationData;
21
+ };
22
+ export type GetRevocationReasonsData = {
23
+ /**
24
+ * - A list of revocation reasons.
25
+ */
26
+ reasons: RevocationReason[];
27
+ };
28
+ export type GetRevocationReasonsResponse = {
29
+ success: true;
30
+ data: GetRevocationReasonsData;
31
+ };
32
+ export type RevocationResponse = {
33
+ /**
34
+ * - Indicates if the revocation request was successful.
35
+ */
36
+ success: boolean;
37
+ /**
38
+ * - A message providing details about the outcome.
39
+ */
40
+ message?: string | undefined;
41
+ };
42
+ export type RevocationReasonsResponse = {
43
+ /**
44
+ * - Indicates if the request was successful.
45
+ */
46
+ success: boolean;
47
+ /**
48
+ * - A list of revocation reasons.
49
+ */
50
+ reasons: RevocationReason[];
51
+ };
@@ -0,0 +1,162 @@
1
+ export type ApacuanaSuccess = import("../success").ApacuanaSuccess;
2
+ /**
3
+ * Define la estructura de un objeto Firmante.
4
+ */
5
+ export type Signer = {
6
+ /**
7
+ * - Nombre completo del firmante.
8
+ */
9
+ name: string;
10
+ /**
11
+ * - Correo electrónico del firmante.
12
+ */
13
+ email: string;
14
+ /**
15
+ * - Documento de identidad del firmante.
16
+ */
17
+ document: string;
18
+ };
19
+ export type AddSignerData = {
20
+ /**
21
+ * - Identificador de confirmación del firmante añadido.
22
+ */
23
+ signer: string;
24
+ };
25
+ /**
26
+ * Define la estructura de la respuesta al añadir un firmante.
27
+ */
28
+ export type AddSignerResponse = {
29
+ success: true;
30
+ data: AddSignerData;
31
+ };
32
+ /**
33
+ * Define la estructura de datos para obtener el digest de un documento.
34
+ */
35
+ export type GetDigestData = {
36
+ /**
37
+ * - Certificado del firmante en formato base64.
38
+ */
39
+ cert: string;
40
+ /**
41
+ * - Identificador único de la firma.
42
+ */
43
+ signatureId: string;
44
+ /**
45
+ * - Documento a firmar en formato de archivo. Este campo es opcional.
46
+ */
47
+ document?: File | undefined;
48
+ };
49
+ export type SignaturePlacement = {
50
+ /**
51
+ * - Página donde se estampará la firma.
52
+ */
53
+ page: number;
54
+ /**
55
+ * - Coordenada X de la firma.
56
+ */
57
+ x: number;
58
+ /**
59
+ * - Coordenada Y de la firma.
60
+ */
61
+ y: number;
62
+ };
63
+ /**
64
+ * Define la estructura de datos para añadir un firmante.
65
+ */
66
+ export type SignerData = {
67
+ /**
68
+ * - Nombre del firmante.
69
+ */
70
+ name: string;
71
+ /**
72
+ * - Tipo de documento de identidad del firmante.
73
+ */
74
+ typedoc: string;
75
+ /**
76
+ * - Número de documento de identidad del firmante.
77
+ */
78
+ doc: string;
79
+ /**
80
+ * - Array con las coordenadas donde se estampará la firma.
81
+ */
82
+ signature: Array<SignaturePlacement>;
83
+ /**
84
+ * - Referencia a un documento pre-cargado. Se debe proporcionar 'reference' o 'file', pero no ambos.
85
+ */
86
+ reference?: string | undefined;
87
+ /**
88
+ * - Archivo del documento a firmar. Se debe proporcionar 'reference' o 'file', pero no ambos.
89
+ */
90
+ file?: File | undefined;
91
+ };
92
+ /**
93
+ * Define la estructura de datos para la respuesta de la creación de una firma.
94
+ */
95
+ export type GetDigestResponseData = {
96
+ /**
97
+ * - El digest del documento que se va a firmar.
98
+ */
99
+ digest: string;
100
+ };
101
+ /**
102
+ * Define la estructura de la respuesta al obtener el digest.
103
+ */
104
+ export type GetDigestResponse = {
105
+ success: true;
106
+ data: GetDigestResponseData;
107
+ };
108
+ /**
109
+ * Define la estructura de los parámetros para obtener documentos.
110
+ */
111
+ export type GetDocsParams = {
112
+ /**
113
+ * - Número de página para la paginación.
114
+ */
115
+ page: number;
116
+ /**
117
+ * - Cantidad de registros por página.
118
+ */
119
+ size: number;
120
+ /**
121
+ * - (Opcional) Estado para filtrar los documentos.
122
+ */
123
+ status?: string | undefined;
124
+ };
125
+ export type GetDocsResponseData = {
126
+ /**
127
+ * - El número total de registros encontrados.
128
+ */
129
+ totalRecords: number;
130
+ /**
131
+ * - Un arreglo con los registros de los documentos.
132
+ */
133
+ records: Array<object>;
134
+ };
135
+ /**
136
+ * Define la estructura de la respuesta al obtener documentos.
137
+ */
138
+ export type GetDocsResponse = {
139
+ success: true;
140
+ data: GetDocsResponseData;
141
+ };
142
+ export type SignDocumentData = {
143
+ /**
144
+ * - Objeto con información de la firma.
145
+ */
146
+ signature: {
147
+ id: string;
148
+ positions: Array<object>;
149
+ };
150
+ /**
151
+ * - Certificado en base64.
152
+ */
153
+ cert: string;
154
+ /**
155
+ * - Digest firmado.
156
+ */
157
+ signedDigest: string;
158
+ /**
159
+ * - Documento a firmar en formato de archivo. Este campo es opcional.
160
+ */
161
+ document?: File | undefined;
162
+ };
@@ -0,0 +1,260 @@
1
+ export type UserData = {
2
+ /**
3
+ * - Correo electrónico. No puede contener espacios y tiene un máximo de 128 caracteres.
4
+ */
5
+ email: string;
6
+ /**
7
+ * - Tipo de usuario. Debe ser un ID valido.
8
+ */
9
+ typeuser: number;
10
+ /**
11
+ * - Nombre de la persona.
12
+ */
13
+ name: string;
14
+ /**
15
+ * - Apellido de la persona.
16
+ */
17
+ lastname: string;
18
+ /**
19
+ * - Tipo de documento de identidad. Puede ser 'V' (Venezolano), 'P' (Pasaporte) o 'E' (Extranjero).
20
+ */
21
+ kinddoc: "V" | "P" | "E";
22
+ /**
23
+ * - Número de documento de identidad. Debe ser un número entero.
24
+ */
25
+ doc: number;
26
+ /**
27
+ * - Fecha de nacimiento. Debe ser una fecha válida en formato ISO y no puede ser una fecha futura.
28
+ */
29
+ birthdate: string;
30
+ /**
31
+ * - Tipo de RIF (Registro de Información Fiscal). Puede ser 'J', 'G', 'V', 'P' o 'E'.
32
+ */
33
+ kindrif: "J" | "G" | "V" | "P" | "E";
34
+ /**
35
+ * - Género. Puede ser 'M' (Masculino), 'F' (Femenino) o 'Sin especificar'.
36
+ */
37
+ gender: "M" | "F" | "Sin especificar";
38
+ /**
39
+ * - Número de RIF. Debe ser un número entero.
40
+ */
41
+ rif: number;
42
+ /**
43
+ * - Número de teléfono. Debe ser un número entero.
44
+ */
45
+ phone: number;
46
+ /**
47
+ * - Código de área del teléfono. Ej. 0424.
48
+ */
49
+ kindphone: string;
50
+ /**
51
+ * - Nombre del estado.
52
+ */
53
+ state: string;
54
+ /**
55
+ * - Nombre del municipio.
56
+ */
57
+ municipality: string;
58
+ /**
59
+ * - Nombre de la parroquia.
60
+ */
61
+ parish: string;
62
+ /**
63
+ * - Código postal.
64
+ */
65
+ postalcode: string;
66
+ /**
67
+ * - Dirección.
68
+ */
69
+ address: string;
70
+ /**
71
+ * - Dirección fiscal.
72
+ */
73
+ fiscaladdress: string;
74
+ /**
75
+ * - Código de área del teléfono fiscal. Ej. 0424.
76
+ */
77
+ fiscalkindphone: string;
78
+ /**
79
+ * - Número de teléfono fiscal. Debe ser un número entero.
80
+ */
81
+ fiscalphone: number;
82
+ /**
83
+ * - Ocupacion de la persona.
84
+ */
85
+ occupation: string;
86
+ /**
87
+ * - Título universitario.
88
+ */
89
+ degree: string;
90
+ /**
91
+ * - Universidad.
92
+ */
93
+ university: string;
94
+ /**
95
+ * - Año de graduación.
96
+ */
97
+ graduationyear: string;
98
+ /**
99
+ * - Número de colegiado.
100
+ */
101
+ collegiatenumber: string;
102
+ /**
103
+ * - Año de colegiatura.
104
+ */
105
+ collegiateyear: string;
106
+ /**
107
+ * - Nombre de la empresa.
108
+ */
109
+ companyname: string;
110
+ /**
111
+ * - Tipo de RIF de la empresa. Puede ser 'J', 'G', 'V', 'P' o 'E'.
112
+ */
113
+ companykindrif: "J" | "G" | "V" | "P" | "E";
114
+ /**
115
+ * - Número de RIF de la empresa.
116
+ */
117
+ companyrif: string;
118
+ /**
119
+ * - Estado de la empresa.
120
+ */
121
+ companystate: string;
122
+ /**
123
+ * - Municipio de la empresa.
124
+ */
125
+ companymunicipality: string;
126
+ /**
127
+ * - Parroquia de la empresa.
128
+ */
129
+ companyparish: string;
130
+ /**
131
+ * - Dirección de la empresa.
132
+ */
133
+ companyaddress: string;
134
+ /**
135
+ * - Código de área del teléfono de la empresa. Ej. 0212.
136
+ */
137
+ companykindphone: string;
138
+ /**
139
+ * - Número de teléfono de la empresa.
140
+ */
141
+ companyphone: string;
142
+ /**
143
+ * - Código postal de la empresa.
144
+ */
145
+ companypostalcode: string;
146
+ /**
147
+ * - Página web de la empresa.
148
+ */
149
+ companywebpage: string;
150
+ /**
151
+ * - Registro comercial de la empresa.
152
+ */
153
+ companycommercialregister: string;
154
+ /**
155
+ * - Fecha de registro de la empresa en formato ISO.
156
+ */
157
+ companyregisterdate: string;
158
+ /**
159
+ * - Número de registro de la empresa.
160
+ */
161
+ companyregisternumber: string;
162
+ /**
163
+ * - Fecha de constitución de la empresa en formato ISO.
164
+ */
165
+ companyconstitutiondate: string;
166
+ /**
167
+ * - 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.
168
+ */
169
+ companypublishdate: string;
170
+ /**
171
+ * - Decreto de constitución de la empresa. Máximo 32 caracteres.
172
+ */
173
+ companyconstitutiondecree: string;
174
+ /**
175
+ * - Número de decreto de la empresa. Máximo 16 caracteres.
176
+ */
177
+ companynumberdecree: string;
178
+ /**
179
+ * - Cargo empleado empresa privada.
180
+ */
181
+ positionprivate: string;
182
+ /**
183
+ * - Departamento empleado empresa privada.
184
+ */
185
+ departmentprivate: string;
186
+ /**
187
+ * - Autorizado de por empleado empresa privada.
188
+ */
189
+ authorizedprivate: string;
190
+ /**
191
+ * - Funciones empleado empresa privada.
192
+ */
193
+ functionsprivate: string;
194
+ /**
195
+ * - Fecha de publicación de la gaceta de la empresa privada.
196
+ */
197
+ publishprivate: string;
198
+ /**
199
+ * - Fecha de registro de la empresa privada. Debe ser una fecha válida en formato ISO.
200
+ */
201
+ issuedateprivate: string;
202
+ /**
203
+ * - Código de área del teléfono de la empresa privada. ej. 0424.
204
+ */
205
+ kindphoneprivate: string;
206
+ /**
207
+ * - Número de teléfono privado. Debe ser un número entero.
208
+ */
209
+ phoneprivate: number;
210
+ /**
211
+ * - Cargo empleado empresa publica.
212
+ */
213
+ positionpublic: string;
214
+ /**
215
+ * - Departamento empleado empresa publica.
216
+ */
217
+ departmentpublic: string;
218
+ /**
219
+ * - Autorizado empleado empresa publica.
220
+ */
221
+ authorizedpublic: string;
222
+ /**
223
+ * - Funciones de empleado empresa publica.
224
+ */
225
+ functionspublic: string;
226
+ /**
227
+ * - Fecha de publicación de la gaceta de la empresa pública.
228
+ */
229
+ publishpublic: string;
230
+ /**
231
+ * - Fecha de registro de la empresa pública. Debe ser una fecha válida en formato ISO.
232
+ */
233
+ issuedatepublic: string;
234
+ /**
235
+ * - Código de área del teléfono de la empresa publica. ej 0424.
236
+ */
237
+ kindphonepublic: string;
238
+ /**
239
+ * - Número de teléfono público. Debe ser un número entero.
240
+ */
241
+ phonepublic: number;
242
+ /**
243
+ * - ID de la empresa. Debe ser un UUID para la creacion de empleados.
244
+ */
245
+ companyid: string;
246
+ };
247
+ export type GetCustomerResponse = {
248
+ /**
249
+ * - El token de sesión del usuario.
250
+ */
251
+ token: string;
252
+ /**
253
+ * - Los datos del usuario obtenidos.
254
+ */
255
+ userData: UserData;
256
+ /**
257
+ * - Indica si la operación fue exitosa.
258
+ */
259
+ success: boolean;
260
+ };
@@ -0,0 +1,49 @@
1
+ export namespace STATUS_CERTIFICATE {
2
+ let request: string;
3
+ let generate: string;
4
+ let current: string;
5
+ let revoque: string;
6
+ let expire: string;
7
+ let request_revoque: string;
8
+ let certificate_another_device: string;
9
+ let sign_pending: string;
10
+ }
11
+ export const PARSE_STATUS: {
12
+ [STATUS_CERTIFICATE.certificate_another_device]: {
13
+ text: string;
14
+ descriptionText: undefined;
15
+ };
16
+ [STATUS_CERTIFICATE.request]: {
17
+ text: string;
18
+ descriptionText: string;
19
+ };
20
+ [STATUS_CERTIFICATE.generate]: {
21
+ text: string;
22
+ descriptionText: string;
23
+ };
24
+ [STATUS_CERTIFICATE.current]: {
25
+ text: string;
26
+ descriptionText: undefined;
27
+ };
28
+ [STATUS_CERTIFICATE.expire]: string;
29
+ [STATUS_CERTIFICATE.request_revoque]: {
30
+ text: string;
31
+ descriptionText: string;
32
+ };
33
+ [STATUS_CERTIFICATE.revoque]: {
34
+ text: string;
35
+ descriptionText: string;
36
+ };
37
+ [STATUS_CERTIFICATE.request_cert]: {
38
+ text: string;
39
+ descriptionText: string;
40
+ };
41
+ };
42
+ export namespace VERIFICATION_STATUS {
43
+ let IN_REGISTER: number;
44
+ let APPROVED: number;
45
+ }
46
+ export namespace INTEGRATION_TYPE {
47
+ let ONBOARDING: string;
48
+ let ONPREMISE: string;
49
+ }
@@ -0,0 +1,25 @@
1
+ declare namespace _default {
2
+ export { getCertificateStatus };
3
+ export { exportPrivateKey };
4
+ export { arrayBufferToBase64 };
5
+ export { encryptedCsr };
6
+ export { validateOnBoardingSignerData };
7
+ export { validateCsr };
8
+ export { validateGetDocsData };
9
+ export { validateGetDigestData };
10
+ export { validateOnBoardingSignDocumentData };
11
+ export { createPayloadGetDigest };
12
+ }
13
+ export default _default;
14
+ declare function getCertificateStatus(userData: any, certificateInDevice: any, integrationType: any): string;
15
+ declare function exportPrivateKey(key: any): Promise<string>;
16
+ declare function arrayBufferToBase64(buffer: any): string;
17
+ declare function encryptedCsr(csr: any, encryptKey?: string): {
18
+ csr: any;
19
+ };
20
+ declare function validateOnBoardingSignerData(signerData: any): FormData;
21
+ declare function validateCsr(encryptedCSR: any): void;
22
+ declare function validateGetDocsData(data: any): void;
23
+ declare function validateGetDigestData(signData: any): void;
24
+ declare function validateOnBoardingSignDocumentData(signData: any): FormData;
25
+ declare function createPayloadGetDigest(signData: any): FormData;
@@ -0,0 +1,3 @@
1
+ export function initHttpClient(): void;
2
+ export function setAuthToken(token: string): void;
3
+ export function httpRequest(path: string, data?: object, method?: string): Promise<object>;
@@ -0,0 +1,12 @@
1
+ // jest.config.js
2
+ module.exports = {
3
+ testEnvironment: "node", // Para tests de backend, si tu SDK es universal
4
+ collectCoverage: true,
5
+ coverageDirectory: "coverage",
6
+ transformIgnorePatterns: [
7
+ "/node_modules/(?!react-native-get-random-values/)",
8
+ ],
9
+ transform: {
10
+ "^.+\\.jsx?$": "babel-jest",
11
+ },
12
+ };