sls_adf 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +1 -0
- data/Rakefile +24 -0
- data/lib/sls_adf/schema/schema.json +135 -103
- data/lib/sls_adf/template/fragment.rb +2 -2
- data/lib/sls_adf/template/query.rb +2 -2
- data/lib/sls_adf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e475bc3589690b3f173f85c8b08177298fe4685f89157d77acec9b686ed89742
|
4
|
+
data.tar.gz: 07cb5a06a7470aa86e227f3414a673cdad38815b58ba271cffb9a136e9cb10dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 222bd21a3b7610a9bc043709119104d714adf40abb44030d0928f5683ccea892d002f1a5b6182bbee3cf582d2301877a358199fe411bfb57a30b2730834ff3ed
|
7
|
+
data.tar.gz: 13fdd11980fd207fcf4d7894057ec6c642e9b028beb9c10b0682e947b068fa1f4deeb352d232d82f45af8d0f9c6f8e9b9c9e95f7fa929777327ee51bd9a5652e
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sls_adf (0.0.
|
4
|
+
sls_adf (0.0.3)
|
5
5
|
graphql-client (~> 0.12)
|
6
6
|
typhoeus (~> 1.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (5.1.
|
11
|
+
activesupport (5.1.6)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (
|
13
|
+
i18n (>= 0.7, < 2)
|
14
14
|
minitest (~> 5.1)
|
15
15
|
tzinfo (~> 1.1)
|
16
16
|
addressable (2.5.2)
|
@@ -24,12 +24,12 @@ GEM
|
|
24
24
|
ethon (0.11.0)
|
25
25
|
ffi (>= 1.3.0)
|
26
26
|
ffi (1.9.23)
|
27
|
-
graphql (1.7.
|
28
|
-
graphql-client (0.12.
|
27
|
+
graphql (1.7.14)
|
28
|
+
graphql-client (0.12.3)
|
29
29
|
activesupport (>= 3.0, < 6.0)
|
30
30
|
graphql (~> 1.6)
|
31
31
|
hashdiff (0.3.7)
|
32
|
-
i18n (0.
|
32
|
+
i18n (1.0.1)
|
33
33
|
concurrent-ruby (~> 1.0)
|
34
34
|
json (2.1.0)
|
35
35
|
minitest (5.11.3)
|
data/README.md
CHANGED
@@ -85,6 +85,7 @@ Key Commands:
|
|
85
85
|
- `bin/setup`: Install dependencies and copy `.env` file.
|
86
86
|
- `bin/console`: Run an interactive prompt (requires configuration on .`env` file)
|
87
87
|
- `rake spec` or `bundle exec rspec`: Run tests.
|
88
|
+
- `rake sls_adf:update_schema`: Update the SLS ADF GraphQL schema.
|
88
89
|
|
89
90
|
## Contributing
|
90
91
|
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
|
3
5
|
require 'rspec/core/rake_task'
|
@@ -14,3 +16,25 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
14
16
|
rdoc.rdoc_files.include('README.md', 'LICENSE')
|
15
17
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
16
18
|
end
|
19
|
+
|
20
|
+
namespace :sls_adf do
|
21
|
+
desc 'Get latest ADF schema'
|
22
|
+
task :update_schema do
|
23
|
+
require 'dotenv'
|
24
|
+
require 'sls_adf/util'
|
25
|
+
require 'graphql/client'
|
26
|
+
require 'sls_adf/configuration'
|
27
|
+
|
28
|
+
Dotenv.load
|
29
|
+
SlsAdf.configure do |c|
|
30
|
+
c.graphql_url = ENV.fetch('GRAPHQL_URL')
|
31
|
+
c.get_token_url = ENV.fetch('GET_TOKEN_URL')
|
32
|
+
c.client_id = ENV.fetch('CLIENT_ID')
|
33
|
+
c.client_secret = ENV.fetch('CLIENT_SECRET')
|
34
|
+
end
|
35
|
+
|
36
|
+
schema_location = File.join(File.dirname(__FILE__), 'lib/sls_adf/schema/schema.json')
|
37
|
+
GraphQL::Client.dump_schema(SlsAdf::Util::Adapter.new, schema_location)
|
38
|
+
puts 'Schema Updated! Did you forget to bump the version?'
|
39
|
+
end
|
40
|
+
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"fields": [
|
17
17
|
{
|
18
18
|
"name": "context",
|
19
|
-
"description": "Retrieve context information via Context ID which provided by SLS
|
19
|
+
"description": "Retrieve context information via Context ID which is provided by SLS\nVarious Scenarios:\n1. LAUNCH_APP: Launch App from <Subject Group> page\n2. LAUNCH_ASSIGNMENT: Open <Assignment> page (from Assignment Listing page)\n3. LAUNCH_TASK: Open <Task> page (from either Dashboard or Notification)\n\nContext will expire in 10 seconds.\n\nErrors:\n1. Authorization header is invalid\n2. Context does not exist\n3. Context has expired\n",
|
20
20
|
"args": [
|
21
21
|
{
|
22
22
|
"name": "uuid",
|
@@ -43,17 +43,17 @@
|
|
43
43
|
},
|
44
44
|
{
|
45
45
|
"name": "user",
|
46
|
-
"description": "Retrieve user information via user ID.\n\nErrors:\
|
46
|
+
"description": "Retrieve user information via user ID.\n\nErrors:\n1. Authorization header is invalid\n2. User does not exist\n3. User is neither Teacher nor Student\n4. App is not installed for this User\n",
|
47
47
|
"args": [
|
48
48
|
{
|
49
|
-
"name": "
|
49
|
+
"name": "uuid",
|
50
50
|
"description": "",
|
51
51
|
"type": {
|
52
52
|
"kind": "NON_NULL",
|
53
53
|
"name": null,
|
54
54
|
"ofType": {
|
55
55
|
"kind": "SCALAR",
|
56
|
-
"name": "
|
56
|
+
"name": "UUID",
|
57
57
|
"ofType": null
|
58
58
|
}
|
59
59
|
},
|
@@ -70,7 +70,7 @@
|
|
70
70
|
},
|
71
71
|
{
|
72
72
|
"name": "subjectGroup",
|
73
|
-
"description": "Retrieve
|
73
|
+
"description": "Retrieve subject group information via subject group UUID.\n\nErrors:\n1. Authorization header is invalid\n2. Subject group does not exist\n3. App is not installed for this subject group\n",
|
74
74
|
"args": [
|
75
75
|
{
|
76
76
|
"name": "uuid",
|
@@ -97,7 +97,7 @@
|
|
97
97
|
},
|
98
98
|
{
|
99
99
|
"name": "assignment",
|
100
|
-
"description": "",
|
100
|
+
"description": "Retrieve assignment information via the assignment UUID.\n\nErrors:\n1. Authorization header is invalid\n2. Assignment does not exist\n",
|
101
101
|
"args": [
|
102
102
|
{
|
103
103
|
"name": "uuid",
|
@@ -124,7 +124,7 @@
|
|
124
124
|
},
|
125
125
|
{
|
126
126
|
"name": "task",
|
127
|
-
"description": "",
|
127
|
+
"description": "Retrieve task information via the task UUID.\n\nErrors:\n1. Authorization header is invalid\n2. Task does not exist\n",
|
128
128
|
"args": [
|
129
129
|
{
|
130
130
|
"name": "uuid",
|
@@ -167,16 +167,6 @@
|
|
167
167
|
"enumValues": null,
|
168
168
|
"possibleTypes": null
|
169
169
|
},
|
170
|
-
{
|
171
|
-
"kind": "SCALAR",
|
172
|
-
"name": "ID",
|
173
|
-
"description": "Built-in ID",
|
174
|
-
"fields": null,
|
175
|
-
"inputFields": null,
|
176
|
-
"interfaces": null,
|
177
|
-
"enumValues": null,
|
178
|
-
"possibleTypes": null
|
179
|
-
},
|
180
170
|
{
|
181
171
|
"kind": "OBJECT",
|
182
172
|
"name": "Mutation",
|
@@ -184,7 +174,7 @@
|
|
184
174
|
"fields": [
|
185
175
|
{
|
186
176
|
"name": "createAssignment",
|
187
|
-
"description": "
|
177
|
+
"description": "Creates an assignment for a subject group.\nTo assign the same quiz/activity/assessment to multiple Subject Groups, create an assignment for each subject group.\n\nErrors:\n1. App can only create assignments in subject groups it is installed to.",
|
188
178
|
"args": [
|
189
179
|
{
|
190
180
|
"name": "input",
|
@@ -211,7 +201,7 @@
|
|
211
201
|
},
|
212
202
|
{
|
213
203
|
"name": "updateAssignment",
|
214
|
-
"description": "
|
204
|
+
"description": "Updates the assignment: set fields to null if there are no changes to those assignment fields\nUse this mutation to add or remove tasks associated to this assignment.\n\nErrors:\n1. App can only update assignments that it has created.\n2. Once assignment has started, start and end dates cannot be changed.",
|
215
205
|
"args": [
|
216
206
|
{
|
217
207
|
"name": "uuid",
|
@@ -252,7 +242,7 @@
|
|
252
242
|
},
|
253
243
|
{
|
254
244
|
"name": "deleteAssignment",
|
255
|
-
"description": "Delete assignment:
|
245
|
+
"description": "Delete assignment: assignment UUID is returned on successful deletion.\n\nErrors:\n1. App can only delete assignments that it has created.",
|
256
246
|
"args": [
|
257
247
|
{
|
258
248
|
"name": "uuid",
|
@@ -279,7 +269,7 @@
|
|
279
269
|
},
|
280
270
|
{
|
281
271
|
"name": "updateTask",
|
282
|
-
"description": "Update task status to reflect the task progress",
|
272
|
+
"description": "Update task status to reflect the task progress.",
|
283
273
|
"args": [
|
284
274
|
{
|
285
275
|
"name": "uuid",
|
@@ -320,7 +310,7 @@
|
|
320
310
|
},
|
321
311
|
{
|
322
312
|
"name": "createNotification",
|
323
|
-
"description": "Create
|
313
|
+
"description": "Create notification for SLS user.",
|
324
314
|
"args": [
|
325
315
|
{
|
326
316
|
"name": "input",
|
@@ -356,11 +346,11 @@
|
|
356
346
|
{
|
357
347
|
"kind": "OBJECT",
|
358
348
|
"name": "Context",
|
359
|
-
"description": "
|
349
|
+
"description": "A context is provided to an App when a user launches the App from SLS.\nThe context provides information of the user who launches the App and from where it is launched.",
|
360
350
|
"fields": [
|
361
351
|
{
|
362
352
|
"name": "user",
|
363
|
-
"description": "user
|
353
|
+
"description": "Information of the user who launches the App",
|
364
354
|
"args": [
|
365
355
|
|
366
356
|
],
|
@@ -378,7 +368,7 @@
|
|
378
368
|
},
|
379
369
|
{
|
380
370
|
"name": "event",
|
381
|
-
"description": "
|
371
|
+
"description": "Information of where the App is launched",
|
382
372
|
"args": [
|
383
373
|
|
384
374
|
],
|
@@ -405,11 +395,11 @@
|
|
405
395
|
{
|
406
396
|
"kind": "OBJECT",
|
407
397
|
"name": "User",
|
408
|
-
"description": "
|
398
|
+
"description": "A user in the system, who is either a teacher or student.",
|
409
399
|
"fields": [
|
410
400
|
{
|
411
|
-
"name": "
|
412
|
-
"description": "
|
401
|
+
"name": "uuid",
|
402
|
+
"description": "UUId of user, unique identifier of user.",
|
413
403
|
"args": [
|
414
404
|
|
415
405
|
],
|
@@ -418,7 +408,7 @@
|
|
418
408
|
"name": null,
|
419
409
|
"ofType": {
|
420
410
|
"kind": "SCALAR",
|
421
|
-
"name": "
|
411
|
+
"name": "UUID",
|
422
412
|
"ofType": null
|
423
413
|
}
|
424
414
|
},
|
@@ -427,7 +417,7 @@
|
|
427
417
|
},
|
428
418
|
{
|
429
419
|
"name": "name",
|
430
|
-
"description": "
|
420
|
+
"description": "Name of user.",
|
431
421
|
"args": [
|
432
422
|
|
433
423
|
],
|
@@ -445,7 +435,7 @@
|
|
445
435
|
},
|
446
436
|
{
|
447
437
|
"name": "role",
|
448
|
-
"description": "
|
438
|
+
"description": "Role of user, either Teacher or Student.",
|
449
439
|
"args": [
|
450
440
|
|
451
441
|
],
|
@@ -463,7 +453,7 @@
|
|
463
453
|
},
|
464
454
|
{
|
465
455
|
"name": "level",
|
466
|
-
"description": "
|
456
|
+
"description": "Level that student is in, e.g. Secondary 1. Applicable to student only (Null for teacher).",
|
467
457
|
"args": [
|
468
458
|
|
469
459
|
],
|
@@ -477,7 +467,7 @@
|
|
477
467
|
},
|
478
468
|
{
|
479
469
|
"name": "classSerialNo",
|
480
|
-
"description": "The
|
470
|
+
"description": "The unique number issued to each student in his/her class. Applicable to student only (Null for teacher).",
|
481
471
|
"args": [
|
482
472
|
|
483
473
|
],
|
@@ -491,7 +481,7 @@
|
|
491
481
|
},
|
492
482
|
{
|
493
483
|
"name": "subjectGroups",
|
494
|
-
"description": "
|
484
|
+
"description": "Active (ie. current year) subject groups that user is in.\nOnly returns subject groups that have this app installed.\nFor Teacher, it is the SubjectGroups that this teacher is teaching\nFor Student, it is the SubjectGroups to which this student belongs\n\nfirst: returns the first N subject groups, default to 20 if not specified.",
|
495
485
|
"args": [
|
496
486
|
{
|
497
487
|
"name": "first",
|
@@ -519,6 +509,20 @@
|
|
519
509
|
},
|
520
510
|
"isDeprecated": false,
|
521
511
|
"deprecationReason": null
|
512
|
+
},
|
513
|
+
{
|
514
|
+
"name": "email",
|
515
|
+
"description": "Email of user",
|
516
|
+
"args": [
|
517
|
+
|
518
|
+
],
|
519
|
+
"type": {
|
520
|
+
"kind": "SCALAR",
|
521
|
+
"name": "String",
|
522
|
+
"ofType": null
|
523
|
+
},
|
524
|
+
"isDeprecated": false,
|
525
|
+
"deprecationReason": null
|
522
526
|
}
|
523
527
|
],
|
524
528
|
"inputFields": null,
|
@@ -551,11 +555,11 @@
|
|
551
555
|
{
|
552
556
|
"kind": "OBJECT",
|
553
557
|
"name": "SubjectGroup",
|
554
|
-
"description": "A group
|
558
|
+
"description": "A group of teachers and students from the same level and class taking a subject (e.g. Secondary 2-A Biology)",
|
555
559
|
"fields": [
|
556
560
|
{
|
557
561
|
"name": "uuid",
|
558
|
-
"description": "UUID of
|
562
|
+
"description": "UUID of the SubjectGroup.",
|
559
563
|
"args": [
|
560
564
|
|
561
565
|
],
|
@@ -573,7 +577,7 @@
|
|
573
577
|
},
|
574
578
|
{
|
575
579
|
"name": "code",
|
576
|
-
"description": "
|
580
|
+
"description": "Identifier of SubjectGroup for students and teachers, e.g. S1-A.",
|
577
581
|
"args": [
|
578
582
|
|
579
583
|
],
|
@@ -591,7 +595,7 @@
|
|
591
595
|
},
|
592
596
|
{
|
593
597
|
"name": "subject",
|
594
|
-
"description": "Subject of
|
598
|
+
"description": "Subject of the SubjectGroup: e.g. English Language.",
|
595
599
|
"args": [
|
596
600
|
|
597
601
|
],
|
@@ -609,7 +613,7 @@
|
|
609
613
|
},
|
610
614
|
{
|
611
615
|
"name": "level",
|
612
|
-
"description": "Level of
|
616
|
+
"description": "Level of the group: e.g. Secondary 1.",
|
613
617
|
"args": [
|
614
618
|
|
615
619
|
],
|
@@ -627,7 +631,7 @@
|
|
627
631
|
},
|
628
632
|
{
|
629
633
|
"name": "teachers",
|
630
|
-
"description": "
|
634
|
+
"description": "Teacher(s) who teaches this SubjectGroup.",
|
631
635
|
"args": [
|
632
636
|
{
|
633
637
|
"name": "first",
|
@@ -654,7 +658,7 @@
|
|
654
658
|
},
|
655
659
|
{
|
656
660
|
"name": "students",
|
657
|
-
"description": "Students
|
661
|
+
"description": "Students who belong to this SubjectGroup.\n\nfirst: returns the first N students, default to 0 if not specified.\nsortField: sorts students by the field, default to class serial no. if not specified.",
|
658
662
|
"args": [
|
659
663
|
{
|
660
664
|
"name": "first",
|
@@ -691,7 +695,7 @@
|
|
691
695
|
},
|
692
696
|
{
|
693
697
|
"name": "assignments",
|
694
|
-
"description": "
|
698
|
+
"description": "Assignments that have been assigned to this group.\n\nfirst: returns the first N assignments, default to 0 if not specified.",
|
695
699
|
"args": [
|
696
700
|
{
|
697
701
|
"name": "first",
|
@@ -727,11 +731,11 @@
|
|
727
731
|
{
|
728
732
|
"kind": "OBJECT",
|
729
733
|
"name": "Assignment",
|
730
|
-
"description": "",
|
734
|
+
"description": "A piece of work that a teacher allocates/assigns to one or more students in a SubjectGroup.\nEach assignment has a collection of tasks, each corresponding to a student in the assignment.\nIt is not mandatory for all students in the SubjectGroup to have a task for each assignment.",
|
731
735
|
"fields": [
|
732
736
|
{
|
733
737
|
"name": "uuid",
|
734
|
-
"description": "UUID
|
738
|
+
"description": "UUID of this assignment.",
|
735
739
|
"args": [
|
736
740
|
|
737
741
|
],
|
@@ -749,7 +753,7 @@
|
|
749
753
|
},
|
750
754
|
{
|
751
755
|
"name": "title",
|
752
|
-
"description": "
|
756
|
+
"description": "Title of assignment.",
|
753
757
|
"args": [
|
754
758
|
|
755
759
|
],
|
@@ -767,7 +771,7 @@
|
|
767
771
|
},
|
768
772
|
{
|
769
773
|
"name": "start",
|
770
|
-
"description": "start date and time, format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+01:00",
|
774
|
+
"description": "Assignment start date and time, format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+01:00.",
|
771
775
|
"args": [
|
772
776
|
|
773
777
|
],
|
@@ -785,7 +789,7 @@
|
|
785
789
|
},
|
786
790
|
{
|
787
791
|
"name": "end",
|
788
|
-
"description": "end date and time, format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+01:00",
|
792
|
+
"description": "Assignment end date and time, format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+01:00.",
|
789
793
|
"args": [
|
790
794
|
|
791
795
|
],
|
@@ -799,7 +803,7 @@
|
|
799
803
|
},
|
800
804
|
{
|
801
805
|
"name": "createdBy",
|
802
|
-
"description": "
|
806
|
+
"description": "User (ie. a teacher) who has created this assignment.",
|
803
807
|
"args": [
|
804
808
|
|
805
809
|
],
|
@@ -817,7 +821,7 @@
|
|
817
821
|
},
|
818
822
|
{
|
819
823
|
"name": "modifiedBy",
|
820
|
-
"description": "
|
824
|
+
"description": "User (ie. a teacher) who have made changes to this assignment.",
|
821
825
|
"args": [
|
822
826
|
|
823
827
|
],
|
@@ -831,7 +835,7 @@
|
|
831
835
|
},
|
832
836
|
{
|
833
837
|
"name": "type",
|
834
|
-
"description": "Type of the assignment",
|
838
|
+
"description": "Type of assignment, reflected in the SLS assignment page.",
|
835
839
|
"args": [
|
836
840
|
|
837
841
|
],
|
@@ -849,7 +853,7 @@
|
|
849
853
|
},
|
850
854
|
{
|
851
855
|
"name": "subjectGroup",
|
852
|
-
"description": "
|
856
|
+
"description": "Subject group that this resource has been assigned to.",
|
853
857
|
"args": [
|
854
858
|
|
855
859
|
],
|
@@ -867,7 +871,7 @@
|
|
867
871
|
},
|
868
872
|
{
|
869
873
|
"name": "tasks",
|
870
|
-
"description": "List of tasks been generated",
|
874
|
+
"description": "List of tasks that have been generated.\n\nfirst: returns the first N tasks, default to 0 if not specified.",
|
871
875
|
"args": [
|
872
876
|
{
|
873
877
|
"name": "first",
|
@@ -907,7 +911,7 @@
|
|
907
911
|
{
|
908
912
|
"kind": "SCALAR",
|
909
913
|
"name": "DateTime",
|
910
|
-
"description": "
|
914
|
+
"description": "Date and time format, format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+08:00",
|
911
915
|
"fields": null,
|
912
916
|
"inputFields": null,
|
913
917
|
"interfaces": null,
|
@@ -917,11 +921,11 @@
|
|
917
921
|
{
|
918
922
|
"kind": "OBJECT",
|
919
923
|
"name": "Task",
|
920
|
-
"description": "A basic unit of work
|
924
|
+
"description": "A basic unit of work for one student.\nEach task is part of an assignment, and tracks the progress of the student's work.",
|
921
925
|
"fields": [
|
922
926
|
{
|
923
927
|
"name": "uuid",
|
924
|
-
"description": "UUID
|
928
|
+
"description": "UUID of this task.",
|
925
929
|
"args": [
|
926
930
|
|
927
931
|
],
|
@@ -939,7 +943,7 @@
|
|
939
943
|
},
|
940
944
|
{
|
941
945
|
"name": "title",
|
942
|
-
"description": "
|
946
|
+
"description": "Title of assignment that this task is associated to.",
|
943
947
|
"args": [
|
944
948
|
|
945
949
|
],
|
@@ -957,7 +961,7 @@
|
|
957
961
|
},
|
958
962
|
{
|
959
963
|
"name": "start",
|
960
|
-
"description": "start date and time",
|
964
|
+
"description": "Task start date and time (same as assignment), format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+08:00.",
|
961
965
|
"args": [
|
962
966
|
|
963
967
|
],
|
@@ -975,7 +979,7 @@
|
|
975
979
|
},
|
976
980
|
{
|
977
981
|
"name": "end",
|
978
|
-
"description": "end date and time",
|
982
|
+
"description": "Task end date and time (same as assignment), format: ISO_OFFSET_DATE_TIME, e.g.,2007-12-03T10:15:30+08:00.",
|
979
983
|
"args": [
|
980
984
|
|
981
985
|
],
|
@@ -989,7 +993,7 @@
|
|
989
993
|
},
|
990
994
|
{
|
991
995
|
"name": "createdBy",
|
992
|
-
"description": "
|
996
|
+
"description": "User (ie. teacher) who has created this task.",
|
993
997
|
"args": [
|
994
998
|
|
995
999
|
],
|
@@ -1007,7 +1011,7 @@
|
|
1007
1011
|
},
|
1008
1012
|
{
|
1009
1013
|
"name": "assignee",
|
1010
|
-
"description": "student
|
1014
|
+
"description": "User (ie. student) assigned to this task.",
|
1011
1015
|
"args": [
|
1012
1016
|
|
1013
1017
|
],
|
@@ -1025,7 +1029,7 @@
|
|
1025
1029
|
},
|
1026
1030
|
{
|
1027
1031
|
"name": "subject",
|
1028
|
-
"description": "Subject
|
1032
|
+
"description": "Subject of the task assigned.",
|
1029
1033
|
"args": [
|
1030
1034
|
|
1031
1035
|
],
|
@@ -1043,7 +1047,7 @@
|
|
1043
1047
|
},
|
1044
1048
|
{
|
1045
1049
|
"name": "status",
|
1046
|
-
"description": "Status of this task, default is NEW",
|
1050
|
+
"description": "Status of this task, default is NEW.",
|
1047
1051
|
"args": [
|
1048
1052
|
|
1049
1053
|
],
|
@@ -1070,11 +1074,11 @@
|
|
1070
1074
|
{
|
1071
1075
|
"kind": "OBJECT",
|
1072
1076
|
"name": "Notification",
|
1073
|
-
"description": "",
|
1077
|
+
"description": "A notification is a message for a specific SLS user, with a message to provide information.\nThe notification can be clickable if the eventType and eventTypeId is provided.\nIf both eventType and eventTypeId are not provided, the notification is not clickable.",
|
1074
1078
|
"fields": [
|
1075
1079
|
{
|
1076
1080
|
"name": "uuid",
|
1077
|
-
"description": "
|
1081
|
+
"description": "UUID of the notification.",
|
1078
1082
|
"args": [
|
1079
1083
|
|
1080
1084
|
],
|
@@ -1092,7 +1096,7 @@
|
|
1092
1096
|
},
|
1093
1097
|
{
|
1094
1098
|
"name": "message",
|
1095
|
-
"description": "Notification message",
|
1099
|
+
"description": "Notification message.",
|
1096
1100
|
"args": [
|
1097
1101
|
|
1098
1102
|
],
|
@@ -1110,7 +1114,7 @@
|
|
1110
1114
|
},
|
1111
1115
|
{
|
1112
1116
|
"name": "scope",
|
1113
|
-
"description": "
|
1117
|
+
"description": "Scope in which notification is sent in the context from. Examples include global, school or subject group.\nThis is for future extensibility and SUBJECT_GROUP should be selected.",
|
1114
1118
|
"args": [
|
1115
1119
|
|
1116
1120
|
],
|
@@ -1128,7 +1132,7 @@
|
|
1128
1132
|
},
|
1129
1133
|
{
|
1130
1134
|
"name": "scopeId",
|
1131
|
-
"description": "
|
1135
|
+
"description": "Id of scope (for NotificationScope of SUBJECT_GROUP, this should be set to SubjectGroup UUID).",
|
1132
1136
|
"args": [
|
1133
1137
|
|
1134
1138
|
],
|
@@ -1146,7 +1150,7 @@
|
|
1146
1150
|
},
|
1147
1151
|
{
|
1148
1152
|
"name": "eventType",
|
1149
|
-
"description": "
|
1153
|
+
"description": "Context event type set in the Context when the user clicks and launches the notification.\neventType must be one of the enum values of EventType.",
|
1150
1154
|
"args": [
|
1151
1155
|
|
1152
1156
|
],
|
@@ -1160,7 +1164,7 @@
|
|
1160
1164
|
},
|
1161
1165
|
{
|
1162
1166
|
"name": "eventTypeId",
|
1163
|
-
"description": "
|
1167
|
+
"description": "Context event type id set in the Context when the user clicks and launches the notification",
|
1164
1168
|
"args": [
|
1165
1169
|
|
1166
1170
|
],
|
@@ -1174,7 +1178,7 @@
|
|
1174
1178
|
},
|
1175
1179
|
{
|
1176
1180
|
"name": "recipient",
|
1177
|
-
"description": "List of
|
1181
|
+
"description": "List of the recipient's (ie. SLS user) UUID.",
|
1178
1182
|
"args": [
|
1179
1183
|
|
1180
1184
|
],
|
@@ -1205,14 +1209,24 @@
|
|
1205
1209
|
"enumValues": null,
|
1206
1210
|
"possibleTypes": null
|
1207
1211
|
},
|
1212
|
+
{
|
1213
|
+
"kind": "SCALAR",
|
1214
|
+
"name": "ID",
|
1215
|
+
"description": "Built-in ID",
|
1216
|
+
"fields": null,
|
1217
|
+
"inputFields": null,
|
1218
|
+
"interfaces": null,
|
1219
|
+
"enumValues": null,
|
1220
|
+
"possibleTypes": null
|
1221
|
+
},
|
1208
1222
|
{
|
1209
1223
|
"kind": "OBJECT",
|
1210
1224
|
"name": "Event",
|
1211
|
-
"description": "Event information when App is launched.\
|
1225
|
+
"description": "Event information when App is launched.\nEvent is generated when:\n1. LAUNCH_APP: Launch App from <Subject Group> page\n2. LAUNCH_ASSIGNMENT: Open <Assignment> page (from Assignment Listing page)\n3. LAUNCH_TASK: Open <Task> page (from either Dashboard or Notification)",
|
1212
1226
|
"fields": [
|
1213
1227
|
{
|
1214
1228
|
"name": "type",
|
1215
|
-
"description": "
|
1229
|
+
"description": "The type of event associated with the context.",
|
1216
1230
|
"args": [
|
1217
1231
|
|
1218
1232
|
],
|
@@ -1230,7 +1244,7 @@
|
|
1230
1244
|
},
|
1231
1245
|
{
|
1232
1246
|
"name": "typeId",
|
1233
|
-
"description": "
|
1247
|
+
"description": "UUID associated with the EventType, ie. SubjectGroup / Assignment / Task",
|
1234
1248
|
"args": [
|
1235
1249
|
|
1236
1250
|
],
|
@@ -1245,6 +1259,20 @@
|
|
1245
1259
|
},
|
1246
1260
|
"isDeprecated": false,
|
1247
1261
|
"deprecationReason": null
|
1262
|
+
},
|
1263
|
+
{
|
1264
|
+
"name": "launchKey",
|
1265
|
+
"description": "The launchKey of event associated with the context.",
|
1266
|
+
"args": [
|
1267
|
+
|
1268
|
+
],
|
1269
|
+
"type": {
|
1270
|
+
"kind": "SCALAR",
|
1271
|
+
"name": "String",
|
1272
|
+
"ofType": null
|
1273
|
+
},
|
1274
|
+
"isDeprecated": false,
|
1275
|
+
"deprecationReason": null
|
1248
1276
|
}
|
1249
1277
|
],
|
1250
1278
|
"inputFields": null,
|
@@ -1257,12 +1285,12 @@
|
|
1257
1285
|
{
|
1258
1286
|
"kind": "INPUT_OBJECT",
|
1259
1287
|
"name": "AssignmentInput",
|
1260
|
-
"description": "",
|
1288
|
+
"description": "Input type for mutations associated with assignment.",
|
1261
1289
|
"fields": null,
|
1262
1290
|
"inputFields": [
|
1263
1291
|
{
|
1264
1292
|
"name": "title",
|
1265
|
-
"description": "
|
1293
|
+
"description": "Title of assignment.",
|
1266
1294
|
"type": {
|
1267
1295
|
"kind": "SCALAR",
|
1268
1296
|
"name": "String",
|
@@ -1292,27 +1320,27 @@
|
|
1292
1320
|
},
|
1293
1321
|
{
|
1294
1322
|
"name": "createdBy",
|
1295
|
-
"description": "",
|
1323
|
+
"description": "User UUID (ie. a teacher) who has created this assignment.",
|
1296
1324
|
"type": {
|
1297
1325
|
"kind": "SCALAR",
|
1298
|
-
"name": "
|
1326
|
+
"name": "UUID",
|
1299
1327
|
"ofType": null
|
1300
1328
|
},
|
1301
1329
|
"defaultValue": null
|
1302
1330
|
},
|
1303
1331
|
{
|
1304
1332
|
"name": "modifiedBy",
|
1305
|
-
"description": "",
|
1333
|
+
"description": "User UUID (ie. a teacher) who have made changes to this assignment.",
|
1306
1334
|
"type": {
|
1307
1335
|
"kind": "SCALAR",
|
1308
|
-
"name": "
|
1336
|
+
"name": "UUID",
|
1309
1337
|
"ofType": null
|
1310
1338
|
},
|
1311
1339
|
"defaultValue": null
|
1312
1340
|
},
|
1313
1341
|
{
|
1314
1342
|
"name": "type",
|
1315
|
-
"description": "",
|
1343
|
+
"description": "Type of assignment, reflected in the SLS assignment page.",
|
1316
1344
|
"type": {
|
1317
1345
|
"kind": "ENUM",
|
1318
1346
|
"name": "AssignmentResourceType",
|
@@ -1322,21 +1350,25 @@
|
|
1322
1350
|
},
|
1323
1351
|
{
|
1324
1352
|
"name": "assignees",
|
1325
|
-
"description": "",
|
1353
|
+
"description": "User UUIDs of students who are assigned to this assignment.\nOn successful creation of assignment, corresponding tasks for each user will be created.",
|
1326
1354
|
"type": {
|
1327
1355
|
"kind": "LIST",
|
1328
1356
|
"name": null,
|
1329
1357
|
"ofType": {
|
1330
|
-
"kind": "
|
1331
|
-
"name":
|
1332
|
-
"ofType":
|
1358
|
+
"kind": "NON_NULL",
|
1359
|
+
"name": null,
|
1360
|
+
"ofType": {
|
1361
|
+
"kind": "SCALAR",
|
1362
|
+
"name": "UUID",
|
1363
|
+
"ofType": null
|
1364
|
+
}
|
1333
1365
|
}
|
1334
1366
|
},
|
1335
1367
|
"defaultValue": null
|
1336
1368
|
},
|
1337
1369
|
{
|
1338
1370
|
"name": "subjectGroupUuid",
|
1339
|
-
"description": "",
|
1371
|
+
"description": "UUID of SubjectGroup that the assignment is assigned to.",
|
1340
1372
|
"type": {
|
1341
1373
|
"kind": "SCALAR",
|
1342
1374
|
"name": "UUID",
|
@@ -1352,12 +1384,12 @@
|
|
1352
1384
|
{
|
1353
1385
|
"kind": "INPUT_OBJECT",
|
1354
1386
|
"name": "NotificationInput",
|
1355
|
-
"description": "",
|
1387
|
+
"description": "Input type to create notification.",
|
1356
1388
|
"fields": null,
|
1357
1389
|
"inputFields": [
|
1358
1390
|
{
|
1359
1391
|
"name": "message",
|
1360
|
-
"description": "Notification message,
|
1392
|
+
"description": "Notification message, maximum length of 300 characters.",
|
1361
1393
|
"type": {
|
1362
1394
|
"kind": "NON_NULL",
|
1363
1395
|
"name": null,
|
@@ -1371,7 +1403,7 @@
|
|
1371
1403
|
},
|
1372
1404
|
{
|
1373
1405
|
"name": "scope",
|
1374
|
-
"description": "
|
1406
|
+
"description": "Scope in which notification is sent in the context from. Examples include global, school or subject group.\nThis is for future extensibility and SUBJECT_GROUP should be selected.",
|
1375
1407
|
"type": {
|
1376
1408
|
"kind": "NON_NULL",
|
1377
1409
|
"name": null,
|
@@ -1385,7 +1417,7 @@
|
|
1385
1417
|
},
|
1386
1418
|
{
|
1387
1419
|
"name": "scopeId",
|
1388
|
-
"description": "
|
1420
|
+
"description": "Id of scope (for NotificationScope of SUBJECT_GROUP, this should be set to SubjectGroup UUID).",
|
1389
1421
|
"type": {
|
1390
1422
|
"kind": "NON_NULL",
|
1391
1423
|
"name": null,
|
@@ -1399,7 +1431,7 @@
|
|
1399
1431
|
},
|
1400
1432
|
{
|
1401
1433
|
"name": "eventType",
|
1402
|
-
"description": "
|
1434
|
+
"description": "Context event type set in the Context when the user clicks and launches the notification.\neventType must be one of the enum values of EventType.",
|
1403
1435
|
"type": {
|
1404
1436
|
"kind": "SCALAR",
|
1405
1437
|
"name": "String",
|
@@ -1409,7 +1441,7 @@
|
|
1409
1441
|
},
|
1410
1442
|
{
|
1411
1443
|
"name": "eventTypeId",
|
1412
|
-
"description": "
|
1444
|
+
"description": "Context event type id set in the Context when the user clicks and launches the notification",
|
1413
1445
|
"type": {
|
1414
1446
|
"kind": "SCALAR",
|
1415
1447
|
"name": "UUID",
|
@@ -1419,7 +1451,7 @@
|
|
1419
1451
|
},
|
1420
1452
|
{
|
1421
1453
|
"name": "recipient",
|
1422
|
-
"description": "List of
|
1454
|
+
"description": "List of the recipient's (ie. SLS user) UUID.",
|
1423
1455
|
"type": {
|
1424
1456
|
"kind": "NON_NULL",
|
1425
1457
|
"name": null,
|
@@ -1431,7 +1463,7 @@
|
|
1431
1463
|
"name": null,
|
1432
1464
|
"ofType": {
|
1433
1465
|
"kind": "SCALAR",
|
1434
|
-
"name": "
|
1466
|
+
"name": "UUID"
|
1435
1467
|
}
|
1436
1468
|
}
|
1437
1469
|
}
|
@@ -1476,19 +1508,19 @@
|
|
1476
1508
|
"enumValues": [
|
1477
1509
|
{
|
1478
1510
|
"name": "NEW",
|
1479
|
-
"description": "
|
1511
|
+
"description": "Student has not started on the task.",
|
1480
1512
|
"isDeprecated": false,
|
1481
1513
|
"deprecationReason": null
|
1482
1514
|
},
|
1483
1515
|
{
|
1484
1516
|
"name": "IN_PROGRESS",
|
1485
|
-
"description": "
|
1517
|
+
"description": "Student has started, but not completed the task.",
|
1486
1518
|
"isDeprecated": false,
|
1487
1519
|
"deprecationReason": null
|
1488
1520
|
},
|
1489
1521
|
{
|
1490
1522
|
"name": "COMPLETED",
|
1491
|
-
"description": "
|
1523
|
+
"description": "Student has completed the task.",
|
1492
1524
|
"isDeprecated": false,
|
1493
1525
|
"deprecationReason": null
|
1494
1526
|
}
|
@@ -1652,13 +1684,13 @@
|
|
1652
1684
|
"enumValues": [
|
1653
1685
|
{
|
1654
1686
|
"name": "CLASS_SERIAL_NO",
|
1655
|
-
"description": "
|
1687
|
+
"description": "Sort students by class serial number",
|
1656
1688
|
"isDeprecated": false,
|
1657
1689
|
"deprecationReason": null
|
1658
1690
|
},
|
1659
1691
|
{
|
1660
1692
|
"name": "NAME",
|
1661
|
-
"description": "
|
1693
|
+
"description": "Sort students by name",
|
1662
1694
|
"isDeprecated": false,
|
1663
1695
|
"deprecationReason": null
|
1664
1696
|
}
|
@@ -1675,19 +1707,19 @@
|
|
1675
1707
|
"enumValues": [
|
1676
1708
|
{
|
1677
1709
|
"name": "LAUNCH_APP",
|
1678
|
-
"description": "Launch
|
1710
|
+
"description": "Launch application.",
|
1679
1711
|
"isDeprecated": false,
|
1680
1712
|
"deprecationReason": null
|
1681
1713
|
},
|
1682
1714
|
{
|
1683
1715
|
"name": "LAUNCH_ASSIGNMENT",
|
1684
|
-
"description": "Launch
|
1716
|
+
"description": "Launch assignment. E.g. Teacher open assignment.",
|
1685
1717
|
"isDeprecated": false,
|
1686
1718
|
"deprecationReason": null
|
1687
1719
|
},
|
1688
1720
|
{
|
1689
1721
|
"name": "LAUNCH_TASK",
|
1690
|
-
"description": "Launch
|
1722
|
+
"description": "Launch task. E.g. Student open task from dashboard.",
|
1691
1723
|
"isDeprecated": false,
|
1692
1724
|
"deprecationReason": null
|
1693
1725
|
}
|
@@ -2641,7 +2673,7 @@
|
|
2641
2673
|
},
|
2642
2674
|
"errors": [
|
2643
2675
|
{
|
2644
|
-
"message": "Exception while fetching data (/__schema/types[
|
2676
|
+
"message": "Exception while fetching data (/__schema/types[7]/fields[5]/args[1]/defaultValue) : Invalid input for Enum 'StudentSortBy'. Unknown value 'CLASS_SERIAL_NO'",
|
2645
2677
|
"locations": [
|
2646
2678
|
{
|
2647
2679
|
"line": 58,
|
@@ -2651,7 +2683,7 @@
|
|
2651
2683
|
"path": [
|
2652
2684
|
"__schema",
|
2653
2685
|
"types",
|
2654
|
-
|
2686
|
+
7,
|
2655
2687
|
"fields",
|
2656
2688
|
5,
|
2657
2689
|
"args",
|
@@ -6,8 +6,8 @@ module SlsAdf
|
|
6
6
|
module Template
|
7
7
|
module Query
|
8
8
|
User = SlsAdf.client.parse <<~'GRAPHQL'
|
9
|
-
query($
|
10
|
-
user(
|
9
|
+
query($uuid: UUID!, $first: Int = 2) {
|
10
|
+
user(uuid: $uuid) {
|
11
11
|
...SlsAdf::Template::Fragment::User::Fields
|
12
12
|
subjectGroups(first: $first) {
|
13
13
|
...SlsAdf::Template::Fragment::SubjectGroup::Fields
|
data/lib/sls_adf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sls_adf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toh Weiqing
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql-client
|