@coorpacademy/app-review 0.2.7 → 0.2.8

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.
@@ -1,10 +1,12 @@
1
1
  import { fetchCorrection } from './fetch-correction';
2
+ import { fetchRank } from './fetch-rank';
2
3
  import { fetchSkills } from './fetch-skills';
3
4
  import { fetchSlide } from './fetch-slide';
4
5
  import { postAnswer } from './post-answer';
5
6
  import { postProgression } from './post-progression';
6
7
  export const getServices = () => ({
7
8
  fetchCorrection,
9
+ fetchRank,
8
10
  fetchSkills,
9
11
  fetchSlide,
10
12
  postAnswer,
@@ -42,6 +42,9 @@ const fetchSkillsResponse = [
42
42
  custom: true
43
43
  }
44
44
  ];
45
+ const fetchRankResponse = {
46
+ rank: 93
47
+ };
45
48
  export const postProgressionResponse = {
46
49
  _id: '62b1d1087aa12f00253f40ee',
47
50
  content,
@@ -402,5 +405,6 @@ export const services = {
402
405
  const currentSlide = progression.state.nextContent.ref;
403
406
  return Promise.resolve(get(currentSlide, postAnswerResponses));
404
407
  },
405
- fetchCorrection: ref => Promise.resolve(getChoicesCorrection(ref))
408
+ fetchCorrection: ref => Promise.resolve(getChoicesCorrection(ref)),
409
+ fetchRank: () => Promise.resolve(fetchRankResponse)
406
410
  };
@@ -133,6 +133,7 @@ export declare type Services = {
133
133
  postProgression(skillRef: string, token: string): Promise<ProgressionFromAPI>;
134
134
  postAnswer(progression: ProgressionFromAPI, token: string, answer: string[]): Promise<ProgressionFromAPI>;
135
135
  fetchCorrection(slideRef: string, token: string, progressionId: string, answer: string[]): Promise<CorrectionFromAPI | void>;
136
+ fetchRank(token: string): Promise<Rank>;
136
137
  };
137
138
  export declare type Options = {
138
139
  services: Services;
@@ -1,10 +1,12 @@
1
1
  import { fetchCorrection } from './fetch-correction';
2
+ import { fetchRank } from './fetch-rank';
2
3
  import { fetchSkills } from './fetch-skills';
3
4
  import { fetchSlide } from './fetch-slide';
4
5
  import { postAnswer } from './post-answer';
5
6
  import { postProgression } from './post-progression';
6
7
  export var getServices = function () { return ({
7
8
  fetchCorrection: fetchCorrection,
9
+ fetchRank: fetchRank,
8
10
  fetchSkills: fetchSkills,
9
11
  fetchSlide: fetchSlide,
10
12
  postAnswer: postAnswer,
@@ -54,6 +54,9 @@ var fetchSkillsResponse = [
54
54
  custom: true
55
55
  }
56
56
  ];
57
+ var fetchRankResponse = {
58
+ rank: 93
59
+ };
57
60
  export var postProgressionResponse = {
58
61
  _id: '62b1d1087aa12f00253f40ee',
59
62
  content: content,
@@ -415,5 +418,6 @@ export var services = {
415
418
  var currentSlide = progression.state.nextContent.ref;
416
419
  return Promise.resolve(get(currentSlide, postAnswerResponses));
417
420
  },
418
- fetchCorrection: function (ref) { return Promise.resolve(getChoicesCorrection(ref)); }
421
+ fetchCorrection: function (ref) { return Promise.resolve(getChoicesCorrection(ref)); },
422
+ fetchRank: function () { return Promise.resolve(fetchRankResponse); }
419
423
  };
@@ -133,6 +133,7 @@ export declare type Services = {
133
133
  postProgression(skillRef: string, token: string): Promise<ProgressionFromAPI>;
134
134
  postAnswer(progression: ProgressionFromAPI, token: string, answer: string[]): Promise<ProgressionFromAPI>;
135
135
  fetchCorrection(slideRef: string, token: string, progressionId: string, answer: string[]): Promise<CorrectionFromAPI | void>;
136
+ fetchRank(token: string): Promise<Rank>;
136
137
  };
137
138
  export declare type Options = {
138
139
  services: Services;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/app-review",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "",
5
5
  "engines": {
6
6
  "node": ">=16.15.0"
@@ -41,7 +41,7 @@
41
41
  "./package.json": "./package.json"
42
42
  },
43
43
  "dependencies": {
44
- "@coorpacademy/components": "10.22.22",
44
+ "@coorpacademy/components": "10.22.23",
45
45
  "@coorpacademy/redux-task": "^1.1.5",
46
46
  "cross-fetch": "^3.1.5",
47
47
  "jwt-decode": "^3.1.2",
@@ -78,5 +78,5 @@
78
78
  "ts-node": "^10.9.1",
79
79
  "typescript": "^4.7.4"
80
80
  },
81
- "gitHead": "6eca157ba8c342a0d345a7d303166b43e4a9792a"
81
+ "gitHead": "31b40916b16bd71f9e2717ef10fdb00f4404f5c4"
82
82
  }
@@ -1,5 +1,6 @@
1
1
  import {Services} from '../types/common';
2
2
  import {fetchCorrection} from './fetch-correction';
3
+ import {fetchRank} from './fetch-rank';
3
4
  import {fetchSkills} from './fetch-skills';
4
5
  import {fetchSlide} from './fetch-slide';
5
6
  import {postAnswer} from './post-answer';
@@ -7,6 +8,7 @@ import {postProgression} from './post-progression';
7
8
 
8
9
  export const getServices = (): Services => ({
9
10
  fetchCorrection,
11
+ fetchRank,
10
12
  fetchSkills,
11
13
  fetchSlide,
12
14
  postAnswer,
@@ -55,6 +55,10 @@ const fetchSkillsResponse = [
55
55
  }
56
56
  ];
57
57
 
58
+ const fetchRankResponse = {
59
+ rank: 93
60
+ };
61
+
58
62
  export const postProgressionResponse: ProgressionFromAPI = {
59
63
  _id: '62b1d1087aa12f00253f40ee',
60
64
  content,
@@ -419,5 +423,6 @@ export const services: Services = {
419
423
  const currentSlide = progression.state.nextContent.ref;
420
424
  return Promise.resolve(get(currentSlide, postAnswerResponses));
421
425
  },
422
- fetchCorrection: ref => Promise.resolve(getChoicesCorrection(ref))
426
+ fetchCorrection: ref => Promise.resolve(getChoicesCorrection(ref)),
427
+ fetchRank: () => Promise.resolve(fetchRankResponse)
423
428
  };
@@ -167,6 +167,7 @@ export type Services = {
167
167
  progressionId: string,
168
168
  answer: string[]
169
169
  ): Promise<CorrectionFromAPI | void>;
170
+ fetchRank(token: string): Promise<Rank>;
170
171
  };
171
172
 
172
173
  export type Options = {