comprodls-sdk 2.90.3-development → 2.92.0-thor

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.
Files changed (42) hide show
  1. package/README.md +1 -137
  2. package/dist/comprodls-sdk.js +2834 -6201
  3. package/dist/comprodls-sdk.min.js +1 -1
  4. package/lib/comprodls.js +39 -57
  5. package/lib/config/index.js +173 -198
  6. package/lib/helpers/index.js +3 -2
  7. package/lib/helpers/lib/api/converter.js +1 -2
  8. package/lib/helpers/lib/api/index.js +19 -94
  9. package/lib/helpers/lib/errors.js +75 -80
  10. package/lib/helpers/lib/requestLayer.js +154 -0
  11. package/lib/helpers/lib/validator.js +65 -52
  12. package/lib/open_access/index.js +48 -53
  13. package/lib/services/analytics/index.js +286 -1014
  14. package/lib/services/attempts/index.js +38 -88
  15. package/lib/services/auth/index.js +324 -806
  16. package/lib/services/authextn/index.js +85 -247
  17. package/lib/services/datasyncmanager/index.js +10 -45
  18. package/lib/services/drive/index.js +20 -83
  19. package/lib/services/integrations/index.js +51 -126
  20. package/lib/services/invitations/index.js +20 -61
  21. package/lib/services/product/index.js +82 -85
  22. package/lib/services/pub/index.js +167 -235
  23. package/lib/services/pushX/index.js +195 -142
  24. package/lib/services/pushX/pubnubClientWrapper.js +399 -172
  25. package/lib/services/rules/index.js +14 -67
  26. package/lib/services/spaces/index.js +141 -318
  27. package/lib/services/spacesextn/index.js +44 -20
  28. package/lib/services/superuser/index.js +21 -36
  29. package/lib/services/taxonomy/index.js +27 -57
  30. package/lib/services/workflows/index.js +38 -97
  31. package/lib/services/xapi/index.js +7 -168
  32. package/lib/token/index.js +73 -67
  33. package/lib/token/validations.js +45 -48
  34. package/package.json +2 -3
  35. package/lib/helpers/lib/api/validations.js +0 -73
  36. package/lib/helpers/lib/utils.js +0 -24
  37. package/lib/services/activity/activity.js +0 -209
  38. package/lib/services/activity/attempt.js +0 -431
  39. package/lib/services/activity/index.js +0 -28
  40. package/lib/services/auth/classProduct.js +0 -37
  41. package/lib/services/collab/index.js +0 -468
  42. package/test.js +0 -38
@@ -23,10 +23,6 @@
23
23
  * Functions for calling attempts.
24
24
  ************************************************************/
25
25
 
26
- /*********************************
27
- * Setting Up Module Entry Point
28
- **********************************/
29
-
30
26
  var q = require('q');
31
27
  var request = require('superagent');
32
28
 
@@ -35,9 +31,7 @@ var DLSError = helpers.errors.DLSError;
35
31
 
36
32
  module.exports = attempts;
37
33
 
38
- /*********************************
39
- * Public Function definitions
40
- **********************************/
34
+ // Attempts Adaptor Constructor
41
35
  function attempts() {
42
36
  return {
43
37
  getUserAllAttemptsForActivity: getUserAllAttemptsForActivity.bind(this),
@@ -51,19 +45,14 @@ function attempts() {
51
45
  };
52
46
  }
53
47
 
54
- /*
55
- options = {
56
- userid: 'string', //mandatory
57
- activityid: 'string', //mandatory
58
- allorgs: boolean, //default = false
59
- classid: 'string',
60
- assignmentid: 'string',
61
- productcode: 'string',
62
- cursor: 'string',
63
- limit: 'integer',
64
- sortOrder: 'string' //'asc' or 'desc'
65
- }
66
- */
48
+ /*********************************
49
+ * Public Function definitions
50
+ **********************************/
51
+
52
+ /**
53
+ * Wiki Link for SDK params
54
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuserallattemptsforactivityparams
55
+ */
67
56
  function getUserAllAttemptsForActivity(options) {
68
57
  var self = this;
69
58
  var dfd = q.defer();
@@ -107,20 +96,10 @@ function getUserAllAttemptsForActivity(options) {
107
96
  return dfd.promise;
108
97
  }
109
98
 
110
- /*
111
- options = {
112
- userid: 'string', //mandatory
113
- activityid: 'string', //mandatory
114
- "body": {
115
- "classid": "string",
116
- "assignmentid": "string",
117
- "itemcode":"string",
118
- "productcode": "string",
119
- "max_allowed":"string",
120
- "status": "string"
121
- }
122
- }
123
- */
99
+ /**
100
+ * Wiki Link for SDK params
101
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#createuserattemptforactivityparams
102
+ */
124
103
  function createUserAttemptForActivity(options) {
125
104
  var self = this;
126
105
  var dfd = q.defer();
@@ -154,15 +133,10 @@ function createUserAttemptForActivity(options) {
154
133
  return dfd.promise;
155
134
  }
156
135
 
157
- /*
158
- options = {
159
- userid: 'string', //mandatory
160
- activityid: 'string', //mandatory
161
- classid: 'string', //mandatory with assignmentid
162
- assignmentid: 'string',
163
- allorgs: boolean // default = false
164
- }
165
- */
136
+ /**
137
+ * Wiki Link for SDK params
138
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuserattemptstatsforactivityparams
139
+ */
166
140
  function getUserAttemptStatsForActivity(options) {
167
141
  var self = this;
168
142
  var dfd = q.defer();
@@ -202,14 +176,10 @@ function getUserAttemptStatsForActivity(options) {
202
176
  return dfd.promise;
203
177
  }
204
178
 
205
- /*
206
- options = {
207
- userid: 'string', //mandatory
208
- activityid: 'string', //mandatory
209
- attemptid: 'string', //mandatory
210
- details: boolean
211
- }
212
- */
179
+ /**
180
+ * Wiki Link for SDK params
181
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuserattemptforactivityparams
182
+ */
213
183
  function getUserAttemptForActivity(options) {
214
184
  var self = this;
215
185
  var dfd = q.defer();
@@ -248,15 +218,10 @@ function getUserAttemptForActivity(options) {
248
218
  return dfd.promise;
249
219
  }
250
220
 
251
- /*
252
- options = {
253
- userid: 'string', //mandatory
254
- activityid: 'string', //mandatory
255
- classid: 'string' //mandatory with assignmentid
256
- assignmentid: 'string'
257
- details: boolean
258
- }
259
- */
221
+ /**
222
+ * Wiki Link for SDK params
223
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuserfirstattemptforactivityparams
224
+ */
260
225
  function getUserFirstAttemptForActivity(options) {
261
226
  var self = this;
262
227
  var dfd = q.defer();
@@ -296,15 +261,10 @@ function getUserFirstAttemptForActivity(options) {
296
261
  return dfd.promise;
297
262
  }
298
263
 
299
- /*
300
- options = {
301
- userid: 'string', //mandatory
302
- activityid: 'string', //mandatory
303
- classid: 'string'//mandatory with assignmentid
304
- assignmentid: 'string'
305
- details: boolean
306
- }
307
- */
264
+ /**
265
+ * Wiki Link for SDK params
266
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuserlastattemptforactivityparams
267
+ */
308
268
  function getUserLastAttemptForActivity(options) {
309
269
  var self = this;
310
270
  var dfd = q.defer();
@@ -344,16 +304,10 @@ function getUserLastAttemptForActivity(options) {
344
304
  return dfd.promise;
345
305
  }
346
306
 
347
- /*
348
- options = {
349
- userid: 'string', //mandatory
350
- activityid: 'string', //mandatory
351
- attemptid: 'string', //mandatory
352
- body: { //mandatory
353
- status: 'string'
354
- }
355
- }
356
- */
307
+ /**
308
+ * Wiki Link for SDK params
309
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#updateuserattemptforactivityparams
310
+ */
357
311
  function updateUserAttemptForActivity(options) {
358
312
  var self = this;
359
313
  var dfd = q.defer();
@@ -392,14 +346,10 @@ function updateUserAttemptForActivity(options) {
392
346
  return dfd.promise;
393
347
  }
394
348
 
395
- /*
396
- options = {
397
- userid: 'string', //mandatory
398
- activityid: 'string', //mandatory
399
- classid: 'string', //mandatory with assignmentid
400
- assignmentid: 'string'
401
- }
402
- */
349
+ /**
350
+ * Wiki Link for SDK params
351
+ * https://github.com/comprodls/comprodls-sdk-js/wiki/23_Attempts-Adapter#getuseractivitymetaparams
352
+ */
403
353
  function getUserActivityMeta(options) {
404
354
  var self = this;
405
355
  var dfd = q.defer();
@@ -436,4 +386,4 @@ function getUserActivityMeta(options) {
436
386
  dfd.reject(err);
437
387
  }
438
388
  return dfd.promise;
439
- }
389
+ }