@laboratoria/sdk-js 2.0.0 → 2.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.
package/schemas/core.json CHANGED
@@ -50,17 +50,6 @@
50
50
  "null"
51
51
  ]
52
52
  },
53
- "lang": {
54
- "type": [
55
- "string",
56
- "null"
57
- ],
58
- "enum": [
59
- "en",
60
- "es",
61
- "pt"
62
- ]
63
- },
64
53
  "github": {
65
54
  "type": [
66
55
  "string",
@@ -95,17 +84,16 @@
95
84
  "type": "boolean",
96
85
  "default": false
97
86
  },
98
- "students": {
99
- "type": "array",
100
- "items": {
101
- "$ref": "#/definitions/Student"
102
- }
103
- },
104
- "dropouts": {
105
- "type": "array",
106
- "items": {
107
- "$ref": "#/definitions/Dropout"
108
- }
87
+ "lang": {
88
+ "type": [
89
+ "string",
90
+ "null"
91
+ ],
92
+ "enum": [
93
+ "en",
94
+ "es",
95
+ "pt"
96
+ ]
109
97
  },
110
98
  "signupCohort": {
111
99
  "anyOf": [
@@ -117,10 +105,10 @@
117
105
  }
118
106
  ]
119
107
  },
120
- "contracts": {
108
+ "applications": {
121
109
  "type": "array",
122
110
  "items": {
123
- "$ref": "#/definitions/Contract"
111
+ "$ref": "#/definitions/Application"
124
112
  }
125
113
  },
126
114
  "contractsAsCheckPilot": {
@@ -129,16 +117,34 @@
129
117
  "$ref": "#/definitions/Contract"
130
118
  }
131
119
  },
120
+ "contracts": {
121
+ "type": "array",
122
+ "items": {
123
+ "$ref": "#/definitions/Contract"
124
+ }
125
+ },
126
+ "dropouts": {
127
+ "type": "array",
128
+ "items": {
129
+ "$ref": "#/definitions/Dropout"
130
+ }
131
+ },
132
132
  "gigs": {
133
133
  "type": "array",
134
134
  "items": {
135
135
  "$ref": "#/definitions/Gig"
136
136
  }
137
137
  },
138
- "applications": {
138
+ "messages": {
139
139
  "type": "array",
140
140
  "items": {
141
- "$ref": "#/definitions/Application"
141
+ "$ref": "#/definitions/Message"
142
+ }
143
+ },
144
+ "students": {
145
+ "type": "array",
146
+ "items": {
147
+ "$ref": "#/definitions/Student"
142
148
  }
143
149
  }
144
150
  }
@@ -194,16 +200,16 @@
194
200
  "track": {
195
201
  "$ref": "#/definitions/Track"
196
202
  },
197
- "stages": {
203
+ "cohorts": {
198
204
  "type": "array",
199
205
  "items": {
200
- "$ref": "#/definitions/Stage"
206
+ "$ref": "#/definitions/Cohort"
201
207
  }
202
208
  },
203
- "cohorts": {
209
+ "stages": {
204
210
  "type": "array",
205
211
  "items": {
206
- "$ref": "#/definitions/Cohort"
212
+ "$ref": "#/definitions/Stage"
207
213
  }
208
214
  }
209
215
  }
@@ -259,17 +265,6 @@
259
265
  "null"
260
266
  ]
261
267
  },
262
- "lang": {
263
- "type": [
264
- "string",
265
- "null"
266
- ],
267
- "enum": [
268
- "en",
269
- "es",
270
- "pt"
271
- ]
272
- },
273
268
  "name": {
274
269
  "type": "string"
275
270
  },
@@ -281,12 +276,21 @@
281
276
  "type": "string",
282
277
  "format": "date-time"
283
278
  },
279
+ "legacySlug": {
280
+ "type": "string"
281
+ },
284
282
  "vacancies": {
285
283
  "type": [
286
284
  "integer",
287
285
  "null"
288
286
  ]
289
287
  },
288
+ "placementDuration": {
289
+ "type": [
290
+ "integer",
291
+ "null"
292
+ ]
293
+ },
290
294
  "placementStart": {
291
295
  "type": [
292
296
  "string",
@@ -294,10 +298,15 @@
294
298
  ],
295
299
  "format": "date-time"
296
300
  },
297
- "placementDuration": {
301
+ "lang": {
298
302
  "type": [
299
- "integer",
303
+ "string",
300
304
  "null"
305
+ ],
306
+ "enum": [
307
+ "en",
308
+ "es",
309
+ "pt"
301
310
  ]
302
311
  },
303
312
  "program": {
@@ -306,10 +315,10 @@
306
315
  "stage": {
307
316
  "$ref": "#/definitions/Stage"
308
317
  },
309
- "gigs": {
318
+ "applications": {
310
319
  "type": "array",
311
320
  "items": {
312
- "$ref": "#/definitions/Gig"
321
+ "$ref": "#/definitions/Application"
313
322
  }
314
323
  },
315
324
  "links": {
@@ -318,22 +327,22 @@
318
327
  "$ref": "#/definitions/CohortLink"
319
328
  }
320
329
  },
321
- "students": {
330
+ "dropouts": {
322
331
  "type": "array",
323
332
  "items": {
324
- "$ref": "#/definitions/Student"
333
+ "$ref": "#/definitions/Dropout"
325
334
  }
326
335
  },
327
- "dropouts": {
336
+ "gigs": {
328
337
  "type": "array",
329
338
  "items": {
330
- "$ref": "#/definitions/Dropout"
339
+ "$ref": "#/definitions/Gig"
331
340
  }
332
341
  },
333
- "applications": {
342
+ "students": {
334
343
  "type": "array",
335
344
  "items": {
336
- "$ref": "#/definitions/Application"
345
+ "$ref": "#/definitions/Student"
337
346
  }
338
347
  },
339
348
  "signupUsers": {
@@ -341,9 +350,6 @@
341
350
  "items": {
342
351
  "$ref": "#/definitions/User"
343
352
  }
344
- },
345
- "legacySlug": {
346
- "type": "string"
347
353
  }
348
354
  }
349
355
  },
@@ -429,30 +435,12 @@
429
435
  "type": "string",
430
436
  "format": "date-time"
431
437
  },
432
- "reason": {
433
- "type": "string",
434
- "enum": [
435
- "dropout",
436
- "noShow",
437
- "invitedToLeave",
438
- "changeCohort"
439
- ]
440
- },
441
438
  "reasonDetail": {
442
439
  "type": [
443
440
  "string",
444
441
  "null"
445
442
  ]
446
443
  },
447
- "lastProject": {
448
- "type": [
449
- "string",
450
- "null"
451
- ]
452
- },
453
- "completedProjects": {
454
- "type": "integer"
455
- },
456
444
  "notes": {
457
445
  "type": [
458
446
  "string",
@@ -468,6 +456,24 @@
468
456
  "null"
469
457
  ]
470
458
  },
459
+ "reason": {
460
+ "type": "string",
461
+ "enum": [
462
+ "dropout",
463
+ "noShow",
464
+ "invitedToLeave",
465
+ "changeCohort"
466
+ ]
467
+ },
468
+ "completedProjects": {
469
+ "type": "integer"
470
+ },
471
+ "lastProject": {
472
+ "type": [
473
+ "string",
474
+ "null"
475
+ ]
476
+ },
471
477
  "cohort": {
472
478
  "$ref": "#/definitions/Cohort"
473
479
  },
@@ -496,11 +502,11 @@
496
502
  "null"
497
503
  ]
498
504
  },
499
- "user": {
500
- "$ref": "#/definitions/User"
501
- },
502
505
  "cohort": {
503
506
  "$ref": "#/definitions/Cohort"
507
+ },
508
+ "user": {
509
+ "$ref": "#/definitions/User"
504
510
  }
505
511
  }
506
512
  },
@@ -521,6 +527,15 @@
521
527
  "createdBy": {
522
528
  "type": "string"
523
529
  },
530
+ "isEmployment": {
531
+ "type": "boolean"
532
+ },
533
+ "feeAmount": {
534
+ "type": "integer"
535
+ },
536
+ "hoursPerWeek": {
537
+ "type": "integer"
538
+ },
524
539
  "start": {
525
540
  "type": "string",
526
541
  "format": "date-time"
@@ -532,15 +547,6 @@
532
547
  ],
533
548
  "format": "date-time"
534
549
  },
535
- "hoursPerWeek": {
536
- "type": "integer"
537
- },
538
- "isEmployment": {
539
- "type": "boolean"
540
- },
541
- "feeAmount": {
542
- "type": "integer"
543
- },
544
550
  "isTrial": {
545
551
  "type": "boolean",
546
552
  "default": false
@@ -559,9 +565,6 @@
559
565
  "other"
560
566
  ]
561
567
  },
562
- "user": {
563
- "$ref": "#/definitions/User"
564
- },
565
568
  "checkPilot": {
566
569
  "anyOf": [
567
570
  {
@@ -575,6 +578,9 @@
575
578
  "country": {
576
579
  "$ref": "#/definitions/Country"
577
580
  },
581
+ "user": {
582
+ "$ref": "#/definitions/User"
583
+ },
578
584
  "gigs": {
579
585
  "type": "array",
580
586
  "items": {
@@ -600,6 +606,18 @@
600
606
  "createdBy": {
601
607
  "type": "string"
602
608
  },
609
+ "role": {
610
+ "type": "string",
611
+ "enum": [
612
+ "bm",
613
+ "pdc",
614
+ "js",
615
+ "ux"
616
+ ]
617
+ },
618
+ "hoursPerWeek": {
619
+ "type": "integer"
620
+ },
603
621
  "start": {
604
622
  "type": "string",
605
623
  "format": "date-time"
@@ -611,26 +629,118 @@
611
629
  ],
612
630
  "format": "date-time"
613
631
  },
614
- "hoursPerWeek": {
632
+ "cohort": {
633
+ "$ref": "#/definitions/Cohort"
634
+ },
635
+ "contract": {
636
+ "$ref": "#/definitions/Contract"
637
+ },
638
+ "user": {
639
+ "$ref": "#/definitions/User"
640
+ }
641
+ }
642
+ },
643
+ "Message": {
644
+ "type": "object",
645
+ "properties": {
646
+ "id": {
615
647
  "type": "integer"
616
648
  },
617
- "role": {
649
+ "createdAt": {
650
+ "type": "string",
651
+ "format": "date-time"
652
+ },
653
+ "updatedAt": {
654
+ "type": "string",
655
+ "format": "date-time"
656
+ },
657
+ "createdBy": {
658
+ "type": [
659
+ "string",
660
+ "null"
661
+ ]
662
+ },
663
+ "key": {
664
+ "type": "string"
665
+ },
666
+ "from": {
667
+ "type": "string"
668
+ },
669
+ "to": {
670
+ "type": "string"
671
+ },
672
+ "transport": {
618
673
  "type": "string",
619
674
  "enum": [
620
- "bm",
621
- "pdc",
622
- "js",
623
- "ux"
675
+ "mandrill"
676
+ ]
677
+ },
678
+ "status": {
679
+ "type": "string",
680
+ "default": "PENDING",
681
+ "enum": [
682
+ "PENDING",
683
+ "QUEUED",
684
+ "ERROR",
685
+ "SENT"
686
+ ]
687
+ },
688
+ "data": {
689
+ "type": [
690
+ "number",
691
+ "string",
692
+ "boolean",
693
+ "object",
694
+ "array",
695
+ "null"
696
+ ]
697
+ },
698
+ "taskInfo": {
699
+ "type": [
700
+ "number",
701
+ "string",
702
+ "boolean",
703
+ "object",
704
+ "array",
705
+ "null"
624
706
  ]
625
707
  },
626
708
  "user": {
627
- "$ref": "#/definitions/User"
709
+ "anyOf": [
710
+ {
711
+ "$ref": "#/definitions/User"
712
+ },
713
+ {
714
+ "type": "null"
715
+ }
716
+ ]
628
717
  },
629
- "contract": {
630
- "$ref": "#/definitions/Contract"
718
+ "logs": {
719
+ "type": "array",
720
+ "items": {
721
+ "$ref": "#/definitions/MessageLog"
722
+ }
723
+ }
724
+ }
725
+ },
726
+ "MessageLog": {
727
+ "type": "object",
728
+ "properties": {
729
+ "id": {
730
+ "type": "integer"
631
731
  },
632
- "cohort": {
633
- "$ref": "#/definitions/Cohort"
732
+ "createdAt": {
733
+ "type": "string",
734
+ "format": "date-time"
735
+ },
736
+ "statusText": {
737
+ "type": [
738
+ "string",
739
+ "null"
740
+ ]
741
+ },
742
+ "message": {
743
+ "$ref": "#/definitions/Message"
634
744
  }
635
745
  }
636
746
  }
@@ -672,6 +782,12 @@
672
782
  },
673
783
  "gig": {
674
784
  "$ref": "#/definitions/Gig"
785
+ },
786
+ "message": {
787
+ "$ref": "#/definitions/Message"
788
+ },
789
+ "messageLog": {
790
+ "$ref": "#/definitions/MessageLog"
675
791
  }
676
792
  }
677
793
  }
@@ -0,0 +1,28 @@
1
+ import path from 'path';
2
+
3
+ export default [
4
+ {
5
+ entry: './index.js',
6
+ output: {
7
+ path: path.resolve('./dist'),
8
+ filename: 'laboratoria-sdk-umd.js',
9
+ library: {
10
+ name: 'laboratoria',
11
+ type: 'umd',
12
+ },
13
+ },
14
+ },
15
+ {
16
+ entry: './index.js',
17
+ experiments: {
18
+ outputModule: true,
19
+ },
20
+ output: {
21
+ path: path.resolve('./dist'),
22
+ filename: 'laboratoria-sdk-esm.js',
23
+ library: {
24
+ type: 'module',
25
+ },
26
+ },
27
+ }
28
+ ];