@vulog/aima-document 1.1.87 → 1.1.89
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/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/package.json +3 -3
- package/src/getUserDocuments.test.ts +124 -9
- package/src/types.ts +4 -3
package/dist/index.d.mts
CHANGED
|
@@ -33,9 +33,10 @@ type DocumentFull = {
|
|
|
33
33
|
status: DocumentStatus;
|
|
34
34
|
reviewer?: string;
|
|
35
35
|
issuingCountry?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';
|
|
36
|
-
issuingOffice
|
|
37
|
-
issuingDate
|
|
38
|
-
dlClass
|
|
36
|
+
issuingOffice?: string;
|
|
37
|
+
issuingDate?: string;
|
|
38
|
+
dlClass?: string;
|
|
39
|
+
issuingSubdivision?: string;
|
|
39
40
|
};
|
|
40
41
|
type DocumentBody = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'> | 'status' | 'reviewer'> & {
|
|
41
42
|
documentType: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -33,9 +33,10 @@ type DocumentFull = {
|
|
|
33
33
|
status: DocumentStatus;
|
|
34
34
|
reviewer?: string;
|
|
35
35
|
issuingCountry?: 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | 'AO' | 'AQ' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';
|
|
36
|
-
issuingOffice
|
|
37
|
-
issuingDate
|
|
38
|
-
dlClass
|
|
36
|
+
issuingOffice?: string;
|
|
37
|
+
issuingDate?: string;
|
|
38
|
+
dlClass?: string;
|
|
39
|
+
issuingSubdivision?: string;
|
|
39
40
|
};
|
|
40
41
|
type DocumentBody = Partial<Omit<DocumentFull, 'id' | 'fleetId' | 'documentType' | 'files' | 'uploadUrls'> | 'status' | 'reviewer'> & {
|
|
41
42
|
documentType: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulog/aima-document",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.89",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"author": "Vulog",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@vulog/aima-client": "1.1.
|
|
23
|
-
"@vulog/aima-core": "1.1.
|
|
22
|
+
"@vulog/aima-client": "1.1.89",
|
|
23
|
+
"@vulog/aima-core": "1.1.89"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"zod": "^3.25.76"
|
|
@@ -30,17 +30,35 @@ describe('getUserDocument', () => {
|
|
|
30
30
|
hasNumber: true,
|
|
31
31
|
hasExpirationDate: false,
|
|
32
32
|
numberUploadUrl: 2,
|
|
33
|
-
hasIssuingCountry:
|
|
33
|
+
hasIssuingCountry: true,
|
|
34
34
|
hasIssuingOffice: true,
|
|
35
35
|
hasIssuingDate: true,
|
|
36
|
-
hasDlClass:
|
|
36
|
+
hasDlClass: true,
|
|
37
|
+
hasIssuingSubdivision: true,
|
|
37
38
|
}
|
|
39
|
+
const docTypeSelfie = {
|
|
40
|
+
id: 460,
|
|
41
|
+
fleetId: FLEET_ID,
|
|
42
|
+
type: 'SELFIE',
|
|
43
|
+
name: 'Selfie',
|
|
44
|
+
mandatory: false,
|
|
45
|
+
hasNumber: false,
|
|
46
|
+
hasExpirationDate: false,
|
|
47
|
+
numberUploadUrl: 1,
|
|
48
|
+
hasIssuingCountry: false,
|
|
49
|
+
hasIssuingOffice: false,
|
|
50
|
+
hasIssuingDate: false,
|
|
51
|
+
hasDlClass: false,
|
|
52
|
+
hasIssuingSubdivision: false
|
|
53
|
+
};
|
|
38
54
|
const idDocId = 10892065;
|
|
39
55
|
const dlDocId = 10892077;
|
|
56
|
+
const selfieDocId = 10931811;
|
|
40
57
|
const documents = {
|
|
41
58
|
documentTypes: [
|
|
42
59
|
{ ...docTypeId },
|
|
43
|
-
{ ...docTypeDl}
|
|
60
|
+
{ ...docTypeDl },
|
|
61
|
+
{ ...docTypeSelfie },
|
|
44
62
|
],
|
|
45
63
|
documents: [
|
|
46
64
|
{
|
|
@@ -49,6 +67,7 @@ describe('getUserDocument', () => {
|
|
|
49
67
|
userId: USER_ID,
|
|
50
68
|
documentType: { ...docTypeId },
|
|
51
69
|
expirationDate: '1970-01-01',
|
|
70
|
+
approvalDate: null,
|
|
52
71
|
files: [
|
|
53
72
|
{
|
|
54
73
|
id: null,
|
|
@@ -69,6 +88,7 @@ describe('getUserDocument', () => {
|
|
|
69
88
|
issuingOffice: 'Nice, 06',
|
|
70
89
|
issuingDate: '2023-01-16',
|
|
71
90
|
dlClass: null,
|
|
91
|
+
issuingSubdivision: null,
|
|
72
92
|
documentNumber: null
|
|
73
93
|
},
|
|
74
94
|
{
|
|
@@ -77,6 +97,7 @@ describe('getUserDocument', () => {
|
|
|
77
97
|
userId: USER_ID,
|
|
78
98
|
documentType: { ...docTypeDl },
|
|
79
99
|
expirationDate: '1970-01-01',
|
|
100
|
+
approvalDate: null,
|
|
80
101
|
files: [
|
|
81
102
|
{
|
|
82
103
|
id: null,
|
|
@@ -103,12 +124,43 @@ describe('getUserDocument', () => {
|
|
|
103
124
|
],
|
|
104
125
|
status: 'VALID',
|
|
105
126
|
reviewer: '493a4d98-7437-42db-8d4e-bd722ac62caf',
|
|
106
|
-
issuingCountry:
|
|
127
|
+
issuingCountry: 'FR',
|
|
107
128
|
issuingOffice: 'Nice',
|
|
108
129
|
issuingDate: '1994-02-18',
|
|
130
|
+
dlClass: 'B',
|
|
131
|
+
issuingSubdivision: '06',
|
|
132
|
+
documentNumber: '123456'
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: selfieDocId,
|
|
136
|
+
fleetId: FLEET_ID,
|
|
137
|
+
userId: USER_ID,
|
|
138
|
+
documentType: { ...docTypeSelfie },
|
|
139
|
+
expirationDate: null,
|
|
140
|
+
approvalDate: null,
|
|
141
|
+
files: [
|
|
142
|
+
{
|
|
143
|
+
id: null,
|
|
144
|
+
url: 'https://java-eu01.vulog.com/upload/fleets/${FLEET_ID}/file?tk=sbSfJzSpv8xJ4FN7ETn5Zq5ykKoAmYKIpFjvVPzVpsCcAGmrMWNJ3h4NunQu***',
|
|
145
|
+
name: `${docTypeSelfie.type}_0`,
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
uploadUrls: [
|
|
149
|
+
{
|
|
150
|
+
id: null,
|
|
151
|
+
url: 'https://java-eu01.vulog.com/upload/fleets/${FLEET_ID}/documents/10931800/SELFIE_0?tk=sbSfJzSpv8xJ4FN7ETn5Zn1MGPxqzzDIvE1WJ***',
|
|
152
|
+
name: `${docTypeSelfie.type}_0`,
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
status: 'VALID',
|
|
156
|
+
reviewer: 'Registration',
|
|
157
|
+
issuingCountry: null,
|
|
158
|
+
issuingOffice: null,
|
|
159
|
+
issuingDate: null,
|
|
109
160
|
dlClass: null,
|
|
161
|
+
issuingSubdivision: null,
|
|
110
162
|
documentNumber: null
|
|
111
|
-
}
|
|
163
|
+
},
|
|
112
164
|
],
|
|
113
165
|
documentByService: [
|
|
114
166
|
{
|
|
@@ -179,6 +231,19 @@ describe('getUserDocument', () => {
|
|
|
179
231
|
config: {}
|
|
180
232
|
});
|
|
181
233
|
}
|
|
234
|
+
else if (url.startsWith(`/boapi/proxy/user/fleets/${FLEET_ID}/users/${USER_ID}/documents/${selfieDocId}/pi`)) {
|
|
235
|
+
return Promise.resolve({
|
|
236
|
+
data: {
|
|
237
|
+
fleetId: FLEET_ID,
|
|
238
|
+
userId: USER_ID,
|
|
239
|
+
documentId: selfieDocId
|
|
240
|
+
},
|
|
241
|
+
status: 200,
|
|
242
|
+
statusText: 'OK',
|
|
243
|
+
headers: {},
|
|
244
|
+
config: {}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
182
247
|
// Pour les autres URLs, rejetez la promesse
|
|
183
248
|
return Promise.reject(new Error('404 Not Found'));
|
|
184
249
|
});
|
|
@@ -197,17 +262,64 @@ describe('getUserDocument', () => {
|
|
|
197
262
|
expect(docs).toBeTruthy();
|
|
198
263
|
expect(docs.documents).toBeTruthy();
|
|
199
264
|
expect(docs.documents.length).toEqual(documents.documents.length);
|
|
200
|
-
expect(docs.documents.length).toEqual(
|
|
265
|
+
expect(docs.documents.length).toEqual(3);
|
|
201
266
|
expect(docs.documents[0].id).toEqual(documents.documents[0].id);
|
|
202
267
|
expect(docs.documents[0].documentNumber).toBeNull();
|
|
203
268
|
expect(docs.documents[1].id).toEqual(documents.documents[1].id);
|
|
204
|
-
expect(docs.documents[1].documentNumber).
|
|
269
|
+
expect(docs.documents[1].documentNumber).toEqual(documents.documents[1].documentNumber);
|
|
270
|
+
expect(docs.documents[2].id).toEqual(documents.documents[2].id);
|
|
271
|
+
expect(docs.documents[2].documentNumber).toBeNull();
|
|
272
|
+
|
|
273
|
+
expect(docs.documents[0].fleetId).toEqual(documents.documents[0].fleetId);
|
|
274
|
+
expect(docs.documents[0].userId).toEqual(documents.documents[0].userId);
|
|
275
|
+
expect(docs.documents[0].documentType).not.toBeNull();
|
|
276
|
+
expect(docs.documents[0].documentNumber).toEqual(documents.documents[0].documentNumber);
|
|
277
|
+
expect(docs.documents[0].expirationDate).toEqual(documents.documents[0].expirationDate);
|
|
278
|
+
expect(docs.documents[0].files).toEqual(documents.documents[0].files);
|
|
279
|
+
expect(docs.documents[0].uploadUrls).toEqual(documents.documents[0].uploadUrls);
|
|
280
|
+
expect(docs.documents[0].status).toEqual(documents.documents[0].status);
|
|
281
|
+
expect(docs.documents[0].reviewer).toEqual(documents.documents[0].reviewer);
|
|
282
|
+
expect(docs.documents[0].issuingCountry).toEqual(documents.documents[0].issuingCountry);
|
|
283
|
+
expect(docs.documents[0].issuingOffice).toEqual(documents.documents[0].issuingOffice);
|
|
284
|
+
expect(docs.documents[0].issuingDate).toEqual(documents.documents[0].issuingDate);
|
|
285
|
+
expect(docs.documents[0].dlClass).toEqual(documents.documents[0].dlClass);
|
|
286
|
+
expect(docs.documents[0].issuingSubdivision).toEqual(documents.documents[0].issuingSubdivision);
|
|
287
|
+
|
|
288
|
+
expect(docs.documents[1].fleetId).toEqual(documents.documents[1].fleetId);
|
|
289
|
+
expect(docs.documents[1].userId).toEqual(documents.documents[1].userId);
|
|
290
|
+
expect(docs.documents[1].documentType).not.toBeNull();
|
|
291
|
+
expect(docs.documents[1].documentNumber).toEqual(documents.documents[1].documentNumber);
|
|
292
|
+
expect(docs.documents[1].expirationDate).toEqual(documents.documents[1].expirationDate);
|
|
293
|
+
expect(docs.documents[1].files).toEqual(documents.documents[1].files);
|
|
294
|
+
expect(docs.documents[1].uploadUrls).toEqual(documents.documents[1].uploadUrls);
|
|
295
|
+
expect(docs.documents[1].status).toEqual(documents.documents[1].status);
|
|
296
|
+
expect(docs.documents[1].reviewer).toEqual(documents.documents[1].reviewer);
|
|
297
|
+
expect(docs.documents[1].issuingCountry).toEqual(documents.documents[1].issuingCountry);
|
|
298
|
+
expect(docs.documents[1].issuingOffice).toEqual(documents.documents[1].issuingOffice);
|
|
299
|
+
expect(docs.documents[1].issuingDate).toEqual(documents.documents[1].issuingDate);
|
|
300
|
+
expect(docs.documents[1].dlClass).toEqual(documents.documents[1].dlClass);
|
|
301
|
+
expect(docs.documents[1].issuingSubdivision).toEqual(documents.documents[1].issuingSubdivision);
|
|
302
|
+
|
|
303
|
+
expect(docs.documents[2].fleetId).toEqual(documents.documents[2].fleetId);
|
|
304
|
+
expect(docs.documents[2].userId).toEqual(documents.documents[2].userId);
|
|
305
|
+
expect(docs.documents[2].documentType).not.toBeNull();
|
|
306
|
+
expect(docs.documents[2].documentNumber).toEqual(documents.documents[2].documentNumber);
|
|
307
|
+
expect(docs.documents[2].expirationDate).toEqual(documents.documents[2].expirationDate);
|
|
308
|
+
expect(docs.documents[2].files).toEqual(documents.documents[2].files);
|
|
309
|
+
expect(docs.documents[2].uploadUrls).toEqual(documents.documents[2].uploadUrls);
|
|
310
|
+
expect(docs.documents[2].status).toEqual(documents.documents[2].status);
|
|
311
|
+
expect(docs.documents[2].reviewer).toEqual(documents.documents[2].reviewer);
|
|
312
|
+
expect(docs.documents[2].issuingCountry).toEqual(documents.documents[2].issuingCountry);
|
|
313
|
+
expect(docs.documents[2].issuingOffice).toEqual(documents.documents[2].issuingOffice);
|
|
314
|
+
expect(docs.documents[2].issuingDate).toEqual(documents.documents[2].issuingDate);
|
|
315
|
+
expect(docs.documents[2].dlClass).toEqual(documents.documents[2].dlClass);
|
|
316
|
+
expect(docs.documents[2].issuingSubdivision).toEqual(documents.documents[2].issuingSubdivision);
|
|
205
317
|
});
|
|
206
318
|
|
|
207
319
|
test('call with PI', async () => {
|
|
208
320
|
|
|
209
321
|
const docs = await getUserDocuments(client, USER_ID, ['DOCUMENT_NUMBER_1']);
|
|
210
|
-
expect(getMock).toHaveBeenCalledTimes(
|
|
322
|
+
expect(getMock).toHaveBeenCalledTimes(4);
|
|
211
323
|
expect(getMock).toBeCalledWith(`/boapi/proxy/user/fleets/${FLEET_ID}/users/${USER_ID}/documents`);
|
|
212
324
|
expect(getMock).toBeCalledWith(`/boapi/proxy/user/fleets/${FLEET_ID}/users/${USER_ID}/documents/${idDocId}/pi?types=DOCUMENT_NUMBER_1`);
|
|
213
325
|
expect(getMock).toBeCalledWith(`/boapi/proxy/user/fleets/${FLEET_ID}/users/${USER_ID}/documents/${dlDocId}/pi?types=DOCUMENT_NUMBER_1`);
|
|
@@ -215,11 +327,14 @@ describe('getUserDocument', () => {
|
|
|
215
327
|
expect(docs).toBeTruthy();
|
|
216
328
|
expect(docs.documents).toBeTruthy();
|
|
217
329
|
expect(docs.documents.length).toEqual(documents.documents.length);
|
|
218
|
-
expect(docs.documents.length).toEqual(
|
|
330
|
+
expect(docs.documents.length).toEqual(3);
|
|
219
331
|
expect(docs.documents[0].id).toEqual(documents.documents[0].id);
|
|
220
332
|
expect(docs.documents[0].documentNumber).toBeTruthy();
|
|
221
333
|
expect(docs.documents[1].id).toEqual(documents.documents[1].id);
|
|
222
334
|
expect(docs.documents[1].documentNumber).toBeTruthy();
|
|
335
|
+
expect(docs.documents[2].id).toEqual(documents.documents[2].id);
|
|
336
|
+
expect(docs.documents[2].documentNumber).toBeFalsy();
|
|
337
|
+
|
|
223
338
|
if(docs.documents[0].id === idDocId) {
|
|
224
339
|
expect(docs.documents[0].documentNumber).toEqual(piId.documentNumber1);
|
|
225
340
|
expect(docs.documents[1].documentNumber).toEqual(piDl.documentNumber1);
|
package/src/types.ts
CHANGED
|
@@ -285,9 +285,10 @@ export type DocumentFull = {
|
|
|
285
285
|
| 'ZA'
|
|
286
286
|
| 'ZM'
|
|
287
287
|
| 'ZW';
|
|
288
|
-
issuingOffice
|
|
289
|
-
issuingDate
|
|
290
|
-
dlClass
|
|
288
|
+
issuingOffice?: string;
|
|
289
|
+
issuingDate?: string;
|
|
290
|
+
dlClass?: string;
|
|
291
|
+
issuingSubdivision?: string;
|
|
291
292
|
};
|
|
292
293
|
|
|
293
294
|
export type DocumentBody = Partial<
|