@up-im/medotvet_sdk 0.0.22 → 0.0.23
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/dist/api/payment.d.ts +9 -0
- package/dist/api/payment.js +14 -0
- package/dist/http/apiRoute.d.ts +1 -0
- package/dist/http/apiRoute.js +3 -2
- package/package.json +1 -1
- package/src/api/payment.ts +18 -2
- package/src/http/apiRoute.ts +1 -0
package/dist/api/payment.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare class ApiPayment extends ApiAbstract {
|
|
|
42
42
|
verified: boolean;
|
|
43
43
|
status: "not_started" | "pending" | "active" | "blocked";
|
|
44
44
|
message: string;
|
|
45
|
+
innSet: boolean;
|
|
45
46
|
}>;
|
|
46
47
|
/**
|
|
47
48
|
* Шаг 1 привязки карты: запрос кода подтверждения.
|
|
@@ -73,4 +74,12 @@ export declare class ApiPayment extends ApiAbstract {
|
|
|
73
74
|
cards: iPaymentCard[];
|
|
74
75
|
cardBound: boolean;
|
|
75
76
|
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Указать ИНН фрилансера (12 цифр). Обязателен для всех исполнителей —
|
|
79
|
+
* без него SolarStaff не выполнит вывод средств на карту.
|
|
80
|
+
* @param {string} inn - ИНН (12 цифр)
|
|
81
|
+
*/
|
|
82
|
+
setInn(inn: string): Promise<{
|
|
83
|
+
success: boolean;
|
|
84
|
+
}>;
|
|
76
85
|
}
|
package/dist/api/payment.js
CHANGED
|
@@ -112,5 +112,19 @@ class ApiPayment extends abstract_1.ApiAbstract {
|
|
|
112
112
|
options: { addToken: true }
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Указать ИНН фрилансера (12 цифр). Обязателен для всех исполнителей —
|
|
117
|
+
* без него SolarStaff не выполнит вывод средств на карту.
|
|
118
|
+
* @param {string} inn - ИНН (12 цифр)
|
|
119
|
+
*/
|
|
120
|
+
async setInn(inn) {
|
|
121
|
+
if (!await this.userStorage.isAuth())
|
|
122
|
+
throw new apiError_1.ApiError(401, "Пользователь не авторизован");
|
|
123
|
+
return await this.fetcher({
|
|
124
|
+
route: apiRoute_1.apiRoutePaymentInn,
|
|
125
|
+
postBody: { inn },
|
|
126
|
+
options: { addToken: true }
|
|
127
|
+
});
|
|
128
|
+
}
|
|
115
129
|
}
|
|
116
130
|
exports.ApiPayment = ApiPayment;
|
package/dist/http/apiRoute.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare const apiRoutePaymentVerificationStatus = "/payment/verification_
|
|
|
77
77
|
export declare const apiRoutePaymentCardRequestCode = "/payment/card/request_code";
|
|
78
78
|
export declare const apiRoutePaymentCardAdd = "/payment/card/add";
|
|
79
79
|
export declare const apiRoutePaymentCards = "/payment/cards";
|
|
80
|
+
export declare const apiRoutePaymentInn = "/payment/inn";
|
|
80
81
|
export declare const apiRouteViewAdd = "/view/add";
|
|
81
82
|
export declare const apiRouteStatAdd = "/stat/add";
|
|
82
83
|
export declare const apiRouteStatGet = "/stat/get";
|
package/dist/http/apiRoute.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.apiRouteTestStatus = exports.apiRouteTestResults = exports.apiRouteTestSubmit = exports.apiRouteTestQuestions = exports.apiRoutePromocodeActivate = exports.apiRouteChatUnread = exports.apiRoutePushViewAll = exports.apiRoutePushView = exports.apiRoutePushIsSubscribed = exports.apiRoutePushUnsubscribe = exports.apiRoutePushRegister = exports.apiRoutePushCountNew = exports.apiRoutePushList = void 0;
|
|
3
|
+
exports.apiRouteBookmarksCount = exports.apiRouteBookmarksRemove = exports.apiRouteBookmarksAdd = exports.apiRouteBookmarksGet = exports.apiRouteStatGet = exports.apiRouteStatAdd = exports.apiRouteViewAdd = exports.apiRoutePaymentInn = exports.apiRoutePaymentCards = exports.apiRoutePaymentCardAdd = exports.apiRoutePaymentCardRequestCode = exports.apiRoutePaymentVerificationStatus = exports.apiRoutePaymentVerificationUrl = exports.apiRoutePaymentBalance = exports.apiRoutePaymentList = exports.apiRoutePaymentAdd = exports.apiRouteSurveyHistory = exports.apiRouteSurveyCancel = exports.apiRouteSurveySaveAnswer = exports.apiRouteSurveyStart = exports.apiRouteSurveyItem = exports.apiRouteSurveyList = exports.apiRouteUserDiplomaStatus = exports.apiRouteUserDiplomaUpload = exports.apiRouteUserSetRef = exports.apiRouteUserDelete = exports.apiRouteUserLogout = exports.apiRouteUserUploadPhoto = exports.apiRouteUserEdit = exports.apiRouteUserLoginWithCode = exports.apiRouteUserRefresh = exports.apiRouteUserGetMe = exports.apiRouteGeoDetect = exports.apiRouteBasketMoveToDraft = exports.apiRouteBasketMutate = exports.apiRouteBasketGet = exports.apiRouteBasketTotal = exports.apiRouteNodeGeneratedLinks = exports.apiRouteNodeById = exports.apiRouteNode = exports.apiRouteNodeList = exports.apiRouteNodeTreeContentByFilters = exports.apiRouteNodeTree = exports.apiRouteItemById = exports.apiRouteItem = exports.apiRouteFilters = exports.apiRouteList = exports.apiRouteGetCloudVersion = exports.apiRouteCheckAppVersion = exports.apiRouteEnv = void 0;
|
|
4
|
+
exports.apiRouteTestStatus = exports.apiRouteTestResults = exports.apiRouteTestSubmit = exports.apiRouteTestQuestions = exports.apiRoutePromocodeActivate = exports.apiRouteChatUnread = exports.apiRoutePushViewAll = exports.apiRoutePushView = exports.apiRoutePushIsSubscribed = exports.apiRoutePushUnsubscribe = exports.apiRoutePushRegister = exports.apiRoutePushCountNew = exports.apiRoutePushList = exports.apiRouteBannerGetRand = void 0;
|
|
5
5
|
const queryString_1 = require("../utils/queryString");
|
|
6
6
|
exports.apiRouteEnv = "/env";
|
|
7
7
|
const apiRouteCheckAppVersion = (appStore, appVersion) => `/env/check_app_version/${appStore}/${appVersion}`;
|
|
@@ -162,6 +162,7 @@ exports.apiRoutePaymentVerificationStatus = '/payment/verification_status';
|
|
|
162
162
|
exports.apiRoutePaymentCardRequestCode = '/payment/card/request_code';
|
|
163
163
|
exports.apiRoutePaymentCardAdd = '/payment/card/add';
|
|
164
164
|
exports.apiRoutePaymentCards = '/payment/cards';
|
|
165
|
+
exports.apiRoutePaymentInn = '/payment/inn';
|
|
165
166
|
//stat
|
|
166
167
|
exports.apiRouteViewAdd = '/view/add';
|
|
167
168
|
exports.apiRouteStatAdd = '/stat/add';
|
package/package.json
CHANGED
package/src/api/payment.ts
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
apiRoutePaymentVerificationStatus,
|
|
8
8
|
apiRoutePaymentCardRequestCode,
|
|
9
9
|
apiRoutePaymentCardAdd,
|
|
10
|
-
apiRoutePaymentCards
|
|
10
|
+
apiRoutePaymentCards,
|
|
11
|
+
apiRoutePaymentInn
|
|
11
12
|
} from "../http/apiRoute"
|
|
12
13
|
import { iPagingItems } from "../interfaces/iPagingItems"
|
|
13
14
|
import { iPayment } from "../interfaces/iPayment"
|
|
@@ -86,7 +87,8 @@ export class ApiPayment extends ApiAbstract {
|
|
|
86
87
|
return await this.fetcher<{
|
|
87
88
|
verified: boolean,
|
|
88
89
|
status: "not_started" | "pending" | "active" | "blocked",
|
|
89
|
-
message: string
|
|
90
|
+
message: string,
|
|
91
|
+
innSet: boolean
|
|
90
92
|
}>({
|
|
91
93
|
route: apiRoutePaymentVerificationStatus,
|
|
92
94
|
options: { addToken: true }
|
|
@@ -133,4 +135,18 @@ export class ApiPayment extends ApiAbstract {
|
|
|
133
135
|
options: { addToken: true }
|
|
134
136
|
})
|
|
135
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Указать ИНН фрилансера (12 цифр). Обязателен для всех исполнителей —
|
|
141
|
+
* без него SolarStaff не выполнит вывод средств на карту.
|
|
142
|
+
* @param {string} inn - ИНН (12 цифр)
|
|
143
|
+
*/
|
|
144
|
+
async setInn(inn: string) {
|
|
145
|
+
if (!await this.userStorage.isAuth()) throw new ApiError(401, "Пользователь не авторизован")
|
|
146
|
+
return await this.fetcher<{ success: boolean }>({
|
|
147
|
+
route: apiRoutePaymentInn,
|
|
148
|
+
postBody: { inn },
|
|
149
|
+
options: { addToken: true }
|
|
150
|
+
})
|
|
151
|
+
}
|
|
136
152
|
}
|
package/src/http/apiRoute.ts
CHANGED
|
@@ -192,6 +192,7 @@ export const apiRoutePaymentVerificationStatus = '/payment/verification_status'
|
|
|
192
192
|
export const apiRoutePaymentCardRequestCode = '/payment/card/request_code'
|
|
193
193
|
export const apiRoutePaymentCardAdd = '/payment/card/add'
|
|
194
194
|
export const apiRoutePaymentCards = '/payment/cards'
|
|
195
|
+
export const apiRoutePaymentInn = '/payment/inn'
|
|
195
196
|
//stat
|
|
196
197
|
export const apiRouteViewAdd = '/view/add'
|
|
197
198
|
export const apiRouteStatAdd = '/stat/add'
|