@up-im/medotvet_sdk 0.0.18 → 0.0.19

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.
@@ -35,7 +35,10 @@ export declare class ApiSurvey extends ApiAbstract {
35
35
  */
36
36
  getOne({ id }: {
37
37
  id: number;
38
- }): Promise<iSurvey>;
38
+ }): Promise<{
39
+ item: iSurvey;
40
+ userSurvey: iUserSurvey | null;
41
+ }>;
39
42
  /**
40
43
  * Начать прохождение опроса
41
44
  * @param {number} surveyId - id опроса
@@ -46,10 +46,10 @@ class ApiSurvey extends abstract_1.ApiAbstract {
46
46
  * @param {number} id - id опроса
47
47
  */
48
48
  async getOne({ id }) {
49
- return (await this.fetcher({
49
+ return await this.fetcher({
50
50
  route: (0, apiRoute_1.apiRouteSurveyItem)(id),
51
51
  options: { addToken: true }
52
- })).item;
52
+ });
53
53
  }
54
54
  /**
55
55
  * Начать прохождение опроса
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up-im/medotvet_sdk",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/api/survey.ts CHANGED
@@ -73,10 +73,10 @@ export class ApiSurvey extends ApiAbstract {
73
73
  * @param {number} id - id опроса
74
74
  */
75
75
  async getOne({ id }: { id: number }) {
76
- return (await this.fetcher<{ item: iSurvey }>({
76
+ return await this.fetcher<{ item: iSurvey, userSurvey: iUserSurvey | null }>({
77
77
  route: apiRouteSurveyItem(id),
78
78
  options: { addToken: true }
79
- })).item
79
+ })
80
80
  }
81
81
 
82
82
  /**