@laboratoria/sdk-js 1.5.1 → 2.0.0-alpha.1

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/core.js CHANGED
@@ -19,6 +19,11 @@ const extended = {
19
19
  'github',
20
20
  'linkedin',
21
21
  'bio',
22
+ 'countryOfResidence',
23
+ 'countryOfOrigin',
24
+ 'workStatus',
25
+ 'educationStatus',
26
+ 'phone',
22
27
  'role',
23
28
  'signupCohort',
24
29
  'disabled',
@@ -66,7 +71,9 @@ const extended = {
66
71
  'name',
67
72
  'start',
68
73
  'end',
69
- 'legacySlug',
74
+ 'vacancies',
75
+ 'placementStart',
76
+ 'placementDuration',
70
77
  ],
71
78
  searchProps: ['name'],
72
79
  getOptionLabel: ({ id, name, stage }) => (
@@ -75,7 +82,7 @@ const extended = {
75
82
  properties: {},
76
83
  parse: (props) => {
77
84
  const now = Date.now();
78
- // TODO: Handle case where start and/or end have not been selected in query
85
+ // TODO: Handle case where start and/or end have not been selected in query
79
86
  const status = (
80
87
  props.start > now
81
88
  ? 'upcoming'
@@ -151,6 +158,11 @@ const extended = {
151
158
  'end',
152
159
  ],
153
160
  },
161
+ Application: {
162
+ inputProps: [
163
+ // ...
164
+ ],
165
+ },
154
166
  };
155
167
 
156
168
  export const createAPI = (url, state) => createModels(url, state, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laboratoria/sdk-js",
3
- "version": "1.5.1",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Laboratoria JavaScript (browser) SDK",
5
5
  "scripts": {
6
6
  "test": "jest --verbose --coverage",
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "dependencies": {
11
11
  "blueimp-md5": "^2.19.0",
12
- "firebase": "^9.6.9"
12
+ "firebase": "^9.6.10"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@babel/core": "^7.17.8",
package/schemas/core.json CHANGED
@@ -15,6 +15,24 @@
15
15
  "items": {
16
16
  "$ref": "#/definitions/Contract"
17
17
  }
18
+ },
19
+ "usersResidence": {
20
+ "type": "array",
21
+ "items": {
22
+ "$ref": "#/definitions/User"
23
+ }
24
+ },
25
+ "usersOrigin": {
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "#/definitions/User"
29
+ }
30
+ },
31
+ "applications": {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "#/definitions/Application"
35
+ }
18
36
  }
19
37
  }
20
38
  },
@@ -95,6 +113,44 @@
95
113
  "type": "boolean",
96
114
  "default": false
97
115
  },
116
+ "workStatus": {
117
+ "type": [
118
+ "string",
119
+ "null"
120
+ ],
121
+ "enum": [
122
+ "student",
123
+ "intern",
124
+ "unemployed",
125
+ "fulltime",
126
+ "partime",
127
+ "freelance",
128
+ "selfemployed"
129
+ ]
130
+ },
131
+ "educationStatus": {
132
+ "type": [
133
+ "string",
134
+ "null"
135
+ ],
136
+ "enum": [
137
+ "ISCED_0",
138
+ "ISCED_1",
139
+ "ISCED_2",
140
+ "ISCED_3",
141
+ "ISCED_4",
142
+ "ISCED_5",
143
+ "ISCED_6",
144
+ "ISCED_7",
145
+ "ISCED_8"
146
+ ]
147
+ },
148
+ "phone": {
149
+ "type": [
150
+ "string",
151
+ "null"
152
+ ]
153
+ },
98
154
  "students": {
99
155
  "type": "array",
100
156
  "items": {
@@ -134,6 +190,32 @@
134
190
  "items": {
135
191
  "$ref": "#/definitions/Gig"
136
192
  }
193
+ },
194
+ "applications": {
195
+ "type": "array",
196
+ "items": {
197
+ "$ref": "#/definitions/Application"
198
+ }
199
+ },
200
+ "countryOfResidence": {
201
+ "anyOf": [
202
+ {
203
+ "$ref": "#/definitions/Country"
204
+ },
205
+ {
206
+ "type": "null"
207
+ }
208
+ ]
209
+ },
210
+ "countryOfOrigin": {
211
+ "anyOf": [
212
+ {
213
+ "$ref": "#/definitions/Country"
214
+ },
215
+ {
216
+ "type": "null"
217
+ }
218
+ ]
137
219
  }
138
220
  }
139
221
  },
@@ -270,10 +352,6 @@
270
352
  "null"
271
353
  ]
272
354
  },
273
- "publicAdmission": {
274
- "type": "boolean",
275
- "default": false
276
- },
277
355
  "placementStart": {
278
356
  "type": [
279
357
  "string",
@@ -293,28 +371,34 @@
293
371
  "stage": {
294
372
  "$ref": "#/definitions/Stage"
295
373
  },
296
- "students": {
374
+ "gigs": {
297
375
  "type": "array",
298
376
  "items": {
299
- "$ref": "#/definitions/Student"
377
+ "$ref": "#/definitions/Gig"
300
378
  }
301
379
  },
302
- "dropouts": {
380
+ "links": {
303
381
  "type": "array",
304
382
  "items": {
305
- "$ref": "#/definitions/Dropout"
383
+ "$ref": "#/definitions/CohortLink"
306
384
  }
307
385
  },
308
- "gigs": {
386
+ "students": {
309
387
  "type": "array",
310
388
  "items": {
311
- "$ref": "#/definitions/Gig"
389
+ "$ref": "#/definitions/Student"
312
390
  }
313
391
  },
314
- "links": {
392
+ "dropouts": {
315
393
  "type": "array",
316
394
  "items": {
317
- "$ref": "#/definitions/CohortLink"
395
+ "$ref": "#/definitions/Dropout"
396
+ }
397
+ },
398
+ "applications": {
399
+ "type": "array",
400
+ "items": {
401
+ "$ref": "#/definitions/Application"
318
402
  }
319
403
  },
320
404
  "signupUsers": {
@@ -457,6 +541,94 @@
457
541
  }
458
542
  }
459
543
  },
544
+ "Application": {
545
+ "type": "object",
546
+ "properties": {
547
+ "id": {
548
+ "type": "integer"
549
+ },
550
+ "createdAt": {
551
+ "type": "string",
552
+ "format": "date-time"
553
+ },
554
+ "updatedAt": {
555
+ "type": "string",
556
+ "format": "date-time"
557
+ },
558
+ "createdBy": {
559
+ "type": [
560
+ "string",
561
+ "null"
562
+ ]
563
+ },
564
+ "status": {
565
+ "type": "string",
566
+ "enum": [
567
+ "started",
568
+ "exercisesCompleted",
569
+ "projectCompleted",
570
+ "interviewScheduled",
571
+ "interviewed",
572
+ "admitted",
573
+ "rejected"
574
+ ]
575
+ },
576
+ "workStatus": {
577
+ "type": [
578
+ "string",
579
+ "null"
580
+ ],
581
+ "enum": [
582
+ "student",
583
+ "intern",
584
+ "unemployed",
585
+ "fulltime",
586
+ "partime",
587
+ "freelance",
588
+ "selfemployed"
589
+ ]
590
+ },
591
+ "educationStatus": {
592
+ "type": [
593
+ "string",
594
+ "null"
595
+ ],
596
+ "enum": [
597
+ "ISCED_0",
598
+ "ISCED_1",
599
+ "ISCED_2",
600
+ "ISCED_3",
601
+ "ISCED_4",
602
+ "ISCED_5",
603
+ "ISCED_6",
604
+ "ISCED_7",
605
+ "ISCED_8"
606
+ ]
607
+ },
608
+ "phone": {
609
+ "type": [
610
+ "string",
611
+ "null"
612
+ ]
613
+ },
614
+ "user": {
615
+ "$ref": "#/definitions/User"
616
+ },
617
+ "cohort": {
618
+ "$ref": "#/definitions/Cohort"
619
+ },
620
+ "countryOfResidence": {
621
+ "anyOf": [
622
+ {
623
+ "$ref": "#/definitions/Country"
624
+ },
625
+ {
626
+ "type": "null"
627
+ }
628
+ ]
629
+ }
630
+ }
631
+ },
460
632
  "Contract": {
461
633
  "type": "object",
462
634
  "properties": {
@@ -617,6 +789,9 @@
617
789
  "dropout": {
618
790
  "$ref": "#/definitions/Dropout"
619
791
  },
792
+ "application": {
793
+ "$ref": "#/definitions/Application"
794
+ },
620
795
  "contract": {
621
796
  "$ref": "#/definitions/Contract"
622
797
  },