@laboratoria/sdk-js 5.2.0-beta.2 → 5.3.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -8,7 +8,6 @@ import {
8
8
  } from 'firebase/auth';
9
9
  import { createAPI as createCoreAPI } from './lib/core';
10
10
  import { createAPI as createCurriculumAPI } from './lib/curriculum';
11
- import { createAPI as createJobsAPI } from './lib/jobs';
12
11
 
13
12
  export * from './lib/util';
14
13
 
@@ -16,7 +15,6 @@ export const createApp = ({
16
15
  firebaseApiKey = 'AIzaSyAXbaEbpq8NOfn0r8mIrcoHvoGRkJThwdc',
17
16
  firebaseProject = 'laboratoria-la',
18
17
  coreApiUrl = 'https://us-central1-outpost-272720.cloudfunctions.net/core-api',
19
- jobsApiUrl = 'https://us-central1-outpost-272720.cloudfunctions.net/jobs-api',
20
18
  } = {}) => {
21
19
  const firebaseApp = initializeApp({
22
20
  apiKey: firebaseApiKey,
@@ -28,7 +26,6 @@ export const createApp = ({
28
26
  const firebaseAuth = getAuth(firebaseApp);
29
27
  const state = { authUser: undefined, user: undefined };
30
28
  const coreAPI = createCoreAPI(coreApiUrl, state);
31
- const jobsAPI = createJobsAPI(jobsApiUrl, state);
32
29
  const curriculumAPI = createCurriculumAPI();
33
30
 
34
31
  const authAPI = {
@@ -59,7 +56,6 @@ export const createApp = ({
59
56
  };
60
57
 
61
58
  return {
62
- ...jobsAPI,
63
59
  ...curriculumAPI,
64
60
  ...coreAPI,
65
61
  auth: authAPI,
package/lib/core.js CHANGED
@@ -348,6 +348,15 @@ const extended = {
348
348
  plural: 'universities',
349
349
  searchProps: ['name'],
350
350
  },
351
+ Job: {
352
+ // inputProps: [],
353
+ // properties: {},
354
+ },
355
+ Company: {
356
+ plural: 'companies',
357
+ // inputProps: [],
358
+ // properties: {},
359
+ },
351
360
  };
352
361
 
353
362
  export const createAPI = (url, state) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laboratoria/sdk-js",
3
- "version": "5.2.0-beta.2",
3
+ "version": "5.3.0-beta.0",
4
4
  "description": "Laboratoria JavaScript (browser) SDK",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -11,26 +11,26 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "blueimp-md5": "^2.19.0",
14
- "firebase": "^9.22.2"
14
+ "firebase": "^9.23.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@babel/core": "^7.22.5",
17
+ "@babel/core": "^7.22.6",
18
18
  "@babel/plugin-transform-modules-commonjs": "^7.22.5",
19
- "babel-jest": "^29.5.0",
20
- "jest": "^29.5.0",
21
- "jest-environment-jsdom": "^29.5.0",
22
- "webpack": "^5.86.0",
19
+ "babel-jest": "^29.6.0",
20
+ "jest": "^29.6.0",
21
+ "jest-environment-jsdom": "^29.6.0",
22
+ "webpack": "^5.88.1",
23
23
  "webpack-cli": "^5.1.4"
24
24
  },
25
25
  "jest": {
26
26
  "testEnvironment": "jsdom",
27
27
  "coverageThreshold": {
28
28
  "global": {
29
- "statements": 97,
30
- "branches": 94,
29
+ "statements": 98,
30
+ "branches": 95,
31
31
  "functions": 100,
32
- "lines": 97
32
+ "lines": 98
33
33
  }
34
34
  }
35
35
  }
36
- }
36
+ }
package/schemas/core.json CHANGED
@@ -83,6 +83,18 @@
83
83
  "items": {
84
84
  "$ref": "#/definitions/University"
85
85
  }
86
+ },
87
+ "companies": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "#/definitions/Company"
91
+ }
92
+ },
93
+ "jobs": {
94
+ "type": "array",
95
+ "items": {
96
+ "$ref": "#/definitions/Job"
97
+ }
86
98
  }
87
99
  }
88
100
  },
@@ -297,6 +309,18 @@
297
309
  "items": {
298
310
  "$ref": "#/definitions/ActivityLogEntry"
299
311
  }
312
+ },
313
+ "jobValidityReviews": {
314
+ "type": "array",
315
+ "items": {
316
+ "$ref": "#/definitions/JobValidityReview"
317
+ }
318
+ },
319
+ "jobApplications": {
320
+ "type": "array",
321
+ "items": {
322
+ "$ref": "#/definitions/JobApplication"
323
+ }
300
324
  }
301
325
  }
302
326
  },
@@ -545,6 +569,12 @@
545
569
  "items": {
546
570
  "$ref": "#/definitions/ActivityLogEntry"
547
571
  }
572
+ },
573
+ "jobApplications": {
574
+ "type": "array",
575
+ "items": {
576
+ "$ref": "#/definitions/JobApplication"
577
+ }
548
578
  }
549
579
  }
550
580
  },
@@ -1362,6 +1392,461 @@
1362
1392
  "$ref": "#/definitions/Message"
1363
1393
  }
1364
1394
  }
1395
+ },
1396
+ "Industry": {
1397
+ "type": "object",
1398
+ "properties": {
1399
+ "id": {
1400
+ "type": "integer"
1401
+ },
1402
+ "createdAt": {
1403
+ "type": "string",
1404
+ "format": "date-time"
1405
+ },
1406
+ "updatedAt": {
1407
+ "type": "string",
1408
+ "format": "date-time"
1409
+ },
1410
+ "createdBy": {
1411
+ "type": [
1412
+ "string",
1413
+ "null"
1414
+ ]
1415
+ },
1416
+ "name": {
1417
+ "type": "string"
1418
+ },
1419
+ "companies": {
1420
+ "type": "array",
1421
+ "items": {
1422
+ "$ref": "#/definitions/Company"
1423
+ }
1424
+ }
1425
+ }
1426
+ },
1427
+ "Company": {
1428
+ "type": "object",
1429
+ "properties": {
1430
+ "id": {
1431
+ "type": "integer"
1432
+ },
1433
+ "createdAt": {
1434
+ "type": "string",
1435
+ "format": "date-time"
1436
+ },
1437
+ "updatedAt": {
1438
+ "type": "string",
1439
+ "format": "date-time"
1440
+ },
1441
+ "createdBy": {
1442
+ "type": [
1443
+ "string",
1444
+ "null"
1445
+ ]
1446
+ },
1447
+ "source": {
1448
+ "type": "string"
1449
+ },
1450
+ "sourceId": {
1451
+ "type": "string"
1452
+ },
1453
+ "name": {
1454
+ "type": "string"
1455
+ },
1456
+ "size": {
1457
+ "type": [
1458
+ "string",
1459
+ "null"
1460
+ ],
1461
+ "enum": [
1462
+ "A_2_10",
1463
+ "B_11_50",
1464
+ "C_51_200",
1465
+ "D_201_500",
1466
+ "E_501_1000",
1467
+ "F_1001_5000",
1468
+ "G_5001_10000",
1469
+ "H_10001_plus"
1470
+ ]
1471
+ },
1472
+ "data": {
1473
+ "type": [
1474
+ "number",
1475
+ "string",
1476
+ "boolean",
1477
+ "object",
1478
+ "array",
1479
+ "null"
1480
+ ]
1481
+ },
1482
+ "web": {
1483
+ "type": [
1484
+ "string",
1485
+ "null"
1486
+ ]
1487
+ },
1488
+ "twitter": {
1489
+ "type": [
1490
+ "string",
1491
+ "null"
1492
+ ]
1493
+ },
1494
+ "github": {
1495
+ "type": [
1496
+ "string",
1497
+ "null"
1498
+ ]
1499
+ },
1500
+ "facebook": {
1501
+ "type": [
1502
+ "string",
1503
+ "null"
1504
+ ]
1505
+ },
1506
+ "country": {
1507
+ "anyOf": [
1508
+ {
1509
+ "$ref": "#/definitions/Country"
1510
+ },
1511
+ {
1512
+ "type": "null"
1513
+ }
1514
+ ]
1515
+ },
1516
+ "industry": {
1517
+ "anyOf": [
1518
+ {
1519
+ "$ref": "#/definitions/Industry"
1520
+ },
1521
+ {
1522
+ "type": "null"
1523
+ }
1524
+ ]
1525
+ },
1526
+ "jobs": {
1527
+ "type": "array",
1528
+ "items": {
1529
+ "$ref": "#/definitions/Job"
1530
+ }
1531
+ },
1532
+ "categories": {
1533
+ "type": "array",
1534
+ "enum": [
1535
+ "Tech_Consultancy",
1536
+ "Digital_Transformation",
1537
+ "Agency",
1538
+ "Startups",
1539
+ "High_tech",
1540
+ "Traditional_Consulting"
1541
+ ]
1542
+ }
1543
+ }
1544
+ },
1545
+ "Job": {
1546
+ "type": "object",
1547
+ "properties": {
1548
+ "id": {
1549
+ "type": "integer"
1550
+ },
1551
+ "createdAt": {
1552
+ "type": "string",
1553
+ "format": "date-time"
1554
+ },
1555
+ "updatedAt": {
1556
+ "type": "string",
1557
+ "format": "date-time"
1558
+ },
1559
+ "createdBy": {
1560
+ "type": [
1561
+ "string",
1562
+ "null"
1563
+ ]
1564
+ },
1565
+ "source": {
1566
+ "type": "string"
1567
+ },
1568
+ "sourceId": {
1569
+ "type": "string"
1570
+ },
1571
+ "title": {
1572
+ "type": "string"
1573
+ },
1574
+ "publishedAt": {
1575
+ "type": "string",
1576
+ "format": "date-time"
1577
+ },
1578
+ "modality": {
1579
+ "type": "string"
1580
+ },
1581
+ "publicUrl": {
1582
+ "type": [
1583
+ "string",
1584
+ "null"
1585
+ ]
1586
+ },
1587
+ "location": {
1588
+ "type": [
1589
+ "string",
1590
+ "null"
1591
+ ]
1592
+ },
1593
+ "data": {
1594
+ "type": [
1595
+ "number",
1596
+ "string",
1597
+ "boolean",
1598
+ "object",
1599
+ "array",
1600
+ "null"
1601
+ ]
1602
+ },
1603
+ "description": {
1604
+ "type": [
1605
+ "string",
1606
+ "null"
1607
+ ]
1608
+ },
1609
+ "descriptionHTML": {
1610
+ "type": [
1611
+ "string",
1612
+ "null"
1613
+ ]
1614
+ },
1615
+ "functions": {
1616
+ "type": [
1617
+ "string",
1618
+ "null"
1619
+ ]
1620
+ },
1621
+ "functionsHTML": {
1622
+ "type": [
1623
+ "string",
1624
+ "null"
1625
+ ]
1626
+ },
1627
+ "seniority": {
1628
+ "type": [
1629
+ "string",
1630
+ "null"
1631
+ ]
1632
+ },
1633
+ "remote": {
1634
+ "type": [
1635
+ "boolean",
1636
+ "null"
1637
+ ]
1638
+ },
1639
+ "remoteOption": {
1640
+ "type": [
1641
+ "string",
1642
+ "null"
1643
+ ],
1644
+ "enum": [
1645
+ "remote_for_now",
1646
+ "locally_remote",
1647
+ "fully_remote",
1648
+ "no_remote",
1649
+ "mixed"
1650
+ ]
1651
+ },
1652
+ "lang": {
1653
+ "type": [
1654
+ "string",
1655
+ "null"
1656
+ ],
1657
+ "enum": [
1658
+ "en",
1659
+ "es",
1660
+ "pt"
1661
+ ]
1662
+ },
1663
+ "maxSalary": {
1664
+ "type": [
1665
+ "integer",
1666
+ "null"
1667
+ ]
1668
+ },
1669
+ "minSalary": {
1670
+ "type": [
1671
+ "integer",
1672
+ "null"
1673
+ ]
1674
+ },
1675
+ "tags": {
1676
+ "type": "array",
1677
+ "items": {
1678
+ "type": "string"
1679
+ }
1680
+ },
1681
+ "company": {
1682
+ "$ref": "#/definitions/Company"
1683
+ },
1684
+ "country": {
1685
+ "anyOf": [
1686
+ {
1687
+ "$ref": "#/definitions/Country"
1688
+ },
1689
+ {
1690
+ "type": "null"
1691
+ }
1692
+ ]
1693
+ },
1694
+ "validityReviews": {
1695
+ "type": "array",
1696
+ "items": {
1697
+ "$ref": "#/definitions/JobValidityReview"
1698
+ }
1699
+ },
1700
+ "applications": {
1701
+ "type": "array",
1702
+ "items": {
1703
+ "$ref": "#/definitions/JobApplication"
1704
+ }
1705
+ }
1706
+ }
1707
+ },
1708
+ "JobValidityReview": {
1709
+ "type": "object",
1710
+ "properties": {
1711
+ "id": {
1712
+ "type": "integer"
1713
+ },
1714
+ "createdAt": {
1715
+ "type": "string",
1716
+ "format": "date-time"
1717
+ },
1718
+ "updatedAt": {
1719
+ "type": "string",
1720
+ "format": "date-time"
1721
+ },
1722
+ "isValid": {
1723
+ "type": "boolean"
1724
+ },
1725
+ "profileType": {
1726
+ "type": [
1727
+ "string",
1728
+ "null"
1729
+ ],
1730
+ "enum": [
1731
+ "design",
1732
+ "front_end",
1733
+ "angular",
1734
+ "react",
1735
+ "vue",
1736
+ "back_end",
1737
+ "full_stack",
1738
+ "ux",
1739
+ "other"
1740
+ ]
1741
+ },
1742
+ "invalidReason": {
1743
+ "type": [
1744
+ "string",
1745
+ "null"
1746
+ ],
1747
+ "enum": [
1748
+ "unrelated",
1749
+ "experience",
1750
+ "qualifications",
1751
+ "other"
1752
+ ]
1753
+ },
1754
+ "comment": {
1755
+ "type": [
1756
+ "string",
1757
+ "null"
1758
+ ]
1759
+ },
1760
+ "author": {
1761
+ "$ref": "#/definitions/User"
1762
+ },
1763
+ "job": {
1764
+ "$ref": "#/definitions/Job"
1765
+ }
1766
+ }
1767
+ },
1768
+ "JobApplication": {
1769
+ "type": "object",
1770
+ "properties": {
1771
+ "id": {
1772
+ "type": "integer"
1773
+ },
1774
+ "createdAt": {
1775
+ "type": "string",
1776
+ "format": "date-time"
1777
+ },
1778
+ "updatedAt": {
1779
+ "type": "string",
1780
+ "format": "date-time"
1781
+ },
1782
+ "createdBy": {
1783
+ "type": [
1784
+ "string",
1785
+ "null"
1786
+ ]
1787
+ },
1788
+ "status": {
1789
+ "type": "string",
1790
+ "default": "pending",
1791
+ "enum": [
1792
+ "pending",
1793
+ "applied",
1794
+ "interview",
1795
+ "challenge",
1796
+ "followup",
1797
+ "hired",
1798
+ "not_hired"
1799
+ ]
1800
+ },
1801
+ "hireDate": {
1802
+ "type": [
1803
+ "string",
1804
+ "null"
1805
+ ],
1806
+ "format": "date-time"
1807
+ },
1808
+ "jobStartDate": {
1809
+ "type": [
1810
+ "string",
1811
+ "null"
1812
+ ],
1813
+ "format": "date-time"
1814
+ },
1815
+ "netSalary": {
1816
+ "type": [
1817
+ "integer",
1818
+ "null"
1819
+ ]
1820
+ },
1821
+ "grossSalary": {
1822
+ "type": [
1823
+ "integer",
1824
+ "null"
1825
+ ]
1826
+ },
1827
+ "currency": {
1828
+ "type": [
1829
+ "string",
1830
+ "null"
1831
+ ]
1832
+ },
1833
+ "job": {
1834
+ "$ref": "#/definitions/Job"
1835
+ },
1836
+ "user": {
1837
+ "$ref": "#/definitions/User"
1838
+ },
1839
+ "cohort": {
1840
+ "anyOf": [
1841
+ {
1842
+ "$ref": "#/definitions/Cohort"
1843
+ },
1844
+ {
1845
+ "type": "null"
1846
+ }
1847
+ ]
1848
+ }
1849
+ }
1365
1850
  }
1366
1851
  },
1367
1852
  "type": "object",
@@ -1428,6 +1913,21 @@
1428
1913
  },
1429
1914
  "messageLog": {
1430
1915
  "$ref": "#/definitions/MessageLog"
1916
+ },
1917
+ "industry": {
1918
+ "$ref": "#/definitions/Industry"
1919
+ },
1920
+ "company": {
1921
+ "$ref": "#/definitions/Company"
1922
+ },
1923
+ "job": {
1924
+ "$ref": "#/definitions/Job"
1925
+ },
1926
+ "jobValidityReview": {
1927
+ "$ref": "#/definitions/JobValidityReview"
1928
+ },
1929
+ "jobApplication": {
1930
+ "$ref": "#/definitions/JobApplication"
1431
1931
  }
1432
1932
  }
1433
1933
  }
package/lib/jobs.js DELETED
@@ -1,22 +0,0 @@
1
- import { createModels, extendSchemaDefinitions } from './model';
2
- import schema from '../schemas/jobs.json';
3
-
4
- const extended = {
5
- Country: {
6
- plural: 'countries',
7
- },
8
- Job: {
9
- // inputProps: [],
10
- // properties: {},
11
- },
12
- Company: {
13
- plural: 'companies',
14
- // inputProps: [],
15
- // properties: {},
16
- },
17
- };
18
-
19
- export const createAPI = (url, state) => createModels(url, state, {
20
- ...schema,
21
- definitions: extendSchemaDefinitions(schema, extended),
22
- });
package/schemas/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Schemas
2
-
3
- * `core-api`
4
- * `team-api`
5
- * `jobs-api`