@laboratoria/sdk-js 2.0.0-alpha.2 → 2.0.0-alpha.5
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/lib/client.js +2 -1
- package/lib/core.js +7 -1
- package/package.json +8 -7
- package/schemas/core.json +20 -4
package/lib/client.js
CHANGED
@@ -14,8 +14,9 @@ export const createClient = (baseUrl, authUser) => async (url, opts = {}) => {
|
|
14
14
|
const body = await resp.json();
|
15
15
|
|
16
16
|
if (resp.status > 202) {
|
17
|
-
throw Object.assign(new Error(`HTTP Error ${resp.status}`), {
|
17
|
+
throw Object.assign(new Error(body?.message || `HTTP Error ${resp.status}`), {
|
18
18
|
status: resp.status,
|
19
|
+
code: body?.code,
|
19
20
|
body,
|
20
21
|
});
|
21
22
|
}
|
package/lib/core.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@laboratoria/sdk-js",
|
3
|
-
"version": "2.0.0-alpha.
|
3
|
+
"version": "2.0.0-alpha.5",
|
4
4
|
"description": "Laboratoria JavaScript (browser) SDK",
|
5
5
|
"scripts": {
|
6
6
|
"test": "jest --verbose --coverage",
|
@@ -9,14 +9,15 @@
|
|
9
9
|
"license": "MIT",
|
10
10
|
"dependencies": {
|
11
11
|
"blueimp-md5": "^2.19.0",
|
12
|
-
"firebase": "^9.
|
12
|
+
"firebase": "^9.8.2"
|
13
13
|
},
|
14
14
|
"devDependencies": {
|
15
|
-
"@babel/core": "^7.
|
16
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
17
|
-
"babel-jest": "^
|
18
|
-
"jest": "^
|
19
|
-
"
|
15
|
+
"@babel/core": "^7.18.2",
|
16
|
+
"@babel/plugin-transform-modules-commonjs": "^7.18.2",
|
17
|
+
"babel-jest": "^28.1.0",
|
18
|
+
"jest": "^28.1.0",
|
19
|
+
"jest-environment-jsdom": "^28.1.0",
|
20
|
+
"webpack": "^5.73.0",
|
20
21
|
"webpack-cli": "^4.9.2"
|
21
22
|
},
|
22
23
|
"jest": {
|
package/schemas/core.json
CHANGED
@@ -335,6 +335,17 @@
|
|
335
335
|
"null"
|
336
336
|
]
|
337
337
|
},
|
338
|
+
"lang": {
|
339
|
+
"type": [
|
340
|
+
"string",
|
341
|
+
"null"
|
342
|
+
],
|
343
|
+
"enum": [
|
344
|
+
"en",
|
345
|
+
"es",
|
346
|
+
"pt"
|
347
|
+
]
|
348
|
+
},
|
338
349
|
"name": {
|
339
350
|
"type": "string"
|
340
351
|
},
|
@@ -365,10 +376,6 @@
|
|
365
376
|
"null"
|
366
377
|
]
|
367
378
|
},
|
368
|
-
"publicAdmission": {
|
369
|
-
"type": "boolean",
|
370
|
-
"default": false
|
371
|
-
},
|
372
379
|
"program": {
|
373
380
|
"$ref": "#/definitions/Program"
|
374
381
|
},
|
@@ -633,6 +640,15 @@
|
|
633
640
|
"type": "null"
|
634
641
|
}
|
635
642
|
]
|
643
|
+
},
|
644
|
+
"income": {
|
645
|
+
"type": "integer"
|
646
|
+
},
|
647
|
+
"personalReason": {
|
648
|
+
"type": "string"
|
649
|
+
},
|
650
|
+
"returningApplicant": {
|
651
|
+
"type": "boolean"
|
636
652
|
}
|
637
653
|
}
|
638
654
|
},
|