@up-im/medotvet_sdk 0.0.15 → 0.0.17

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/README.md CHANGED
@@ -43,9 +43,9 @@ const client = createClient({
43
43
  - `onLogout` — подписка на событие выхода `client.user.onLogout(cb)`.
44
44
  - `delete()` — удалить аккаунт и связанные сущности, затем logout.
45
45
  - `getMyReferer()` — вернуть мой рефкод.
46
- - `uploadDiploma(formData)` — отправить файлы `diploma[]`, ответ:
47
- `{ success, diploma_files, diploma_status }`. Статусы экспортируются
48
- как `DiplomaStatus` (числовые значения).
46
+ - `uploadDiploma({ diploma: FileList | File[] })` — отправить файлы
47
+ диплома, ответ: `{ success, diploma_files, diploma_status }`.
48
+ Статусы экспортируются как `DiplomaStatus` (числовые значения).
49
49
  - `getDiplomaStatus()` — статус диплома (`DiplomaStatus`): 1 не
50
50
  загружен, 2 проверка, 3 принят, 4 отклонён + `diploma_reject_reason`.
51
51
 
@@ -171,9 +171,9 @@ interface iUser {
171
171
  city: iCity | null
172
172
  specialization: iSpecialization[] | null // специализации врача
173
173
  birthdate: string | null
174
- workplace_type: number | null // тип учреждения (ID)
174
+ workplace_type: { id: number, title: string } | null // тип учреждения
175
175
  workplace_name: string | null // название учреждения
176
- diploma_status: DiplomaStatusValue // 1-не загружен, 2-проверка, 3-принят, 4-отклонён
176
+ diploma_status: { id: DiplomaStatusValue, title: string } | null // 1-не загружен, 2-проверка, 3-принят, 4-отклонён
177
177
  diploma_files: string[] | null
178
178
  diploma_reject_reason: string | null
179
179
  test_status: number | null // 1-не пройден, 2-пройден (TestStatus)
@@ -174,7 +174,7 @@ class ApiContent extends abstract_1.ApiAbstract {
174
174
  route: (0, apiRoute_1.apiRouteList)({
175
175
  nodeCode: "workplace_type",
176
176
  select: ["id", "title"],
177
- sorters: ["sorter asc", "title asc"],
177
+ sorters: ["title asc"],
178
178
  perPage: 20,
179
179
  filters,
180
180
  page
@@ -25,9 +25,15 @@ export interface iUser {
25
25
  city: iCity | null;
26
26
  specialization: iSpecialization[] | null;
27
27
  birthdate: string | null;
28
- workplace_type: number | null;
28
+ workplace_type: {
29
+ id: number;
30
+ title: string;
31
+ } | null;
29
32
  workplace_name: string | null;
30
- diploma_status: DiplomaStatusValue;
33
+ diploma_status: {
34
+ id: DiplomaStatusValue;
35
+ title: string;
36
+ } | null;
31
37
  diploma_files: string[] | null;
32
38
  diploma_reject_reason: string | null;
33
39
  test_status: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up-im/medotvet_sdk",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -193,7 +193,7 @@ export class ApiContent extends ApiAbstract {
193
193
  route: apiRouteList({
194
194
  nodeCode: "workplace_type",
195
195
  select: ["id", "title"],
196
- sorters: ["sorter asc", "title asc"],
196
+ sorters: ["title asc"],
197
197
  perPage: 20,
198
198
  filters,
199
199
  page
@@ -27,9 +27,9 @@ export interface iUser {
27
27
  city: iCity | null
28
28
  specialization: iSpecialization[] | null // специализации врача (Medotvet)
29
29
  birthdate: string | null // дата рождения (Medotvet)
30
- workplace_type: number | null // тип учреждения (ID) (Medotvet)
30
+ workplace_type: { id: number, title: string } | null // тип учреждения (Medotvet)
31
31
  workplace_name: string | null // название учреждения (Medotvet)
32
- diploma_status: DiplomaStatusValue // 0-не загружен, 1-на проверке, 2-подтвержден, 3-отклонен (Medotvet)
32
+ diploma_status: { id: DiplomaStatusValue, title: string } | null // 1-не загружен, 2-на проверке, 3-верифицирован, 4-отклонен (Medotvet)
33
33
  diploma_files: string[] | null // массив путей к файлам диплома (Medotvet)
34
34
  diploma_reject_reason: string | null // причина отклонения диплома (Medotvet)
35
35
  test_status: number | null // 0-не пройден, 1-пройден (Medotvet)