@hapl/api-queries 0.1.90 → 0.1.91
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/CHANGELOG.md +12 -0
- package/dist/api-queries.cjs.development.js +2 -2
- package/dist/api-queries.cjs.development.js.map +1 -1
- package/dist/api-queries.cjs.production.min.js +1 -1
- package/dist/api-queries.cjs.production.min.js.map +1 -1
- package/dist/api-queries.esm.js +2 -2
- package/dist/api-queries.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/clients/v1/api/callCenter/finishOperatorWork/index.ts +11 -15
- package/src/clients/v1/api/callCenter/startOperatorWork/index.ts +11 -15
package/package.json
CHANGED
|
@@ -16,22 +16,18 @@ export function finishOperatorWorkRequest({
|
|
|
16
16
|
headers,
|
|
17
17
|
}: FinishOperatorWorkConfig) {
|
|
18
18
|
return axios
|
|
19
|
-
.post(
|
|
20
|
-
|
|
21
|
-
{},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
27
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
28
|
-
if (data.success) return null;
|
|
19
|
+
.post('/api/call/operator/finish', null, {
|
|
20
|
+
baseURL,
|
|
21
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
22
|
+
transformResponse: [
|
|
23
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
24
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
25
|
+
if (data.success) return null;
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
27
|
+
return data.data.error;
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
})
|
|
35
31
|
.then((res: FinishOperatorWorkData) => res)
|
|
36
32
|
.catch((err: FinishOperatorWorkError) => {
|
|
37
33
|
throw err;
|
|
@@ -17,22 +17,18 @@ export type StartOperatorWorkConfig = { baseURL?: string; headers: StartOperator
|
|
|
17
17
|
|
|
18
18
|
export function startOperatorWorkRequest({ baseURL = 'https://clients.homeapp.ru', headers }: StartOperatorWorkConfig) {
|
|
19
19
|
return axios
|
|
20
|
-
.post(
|
|
21
|
-
|
|
22
|
-
{},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
28
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
29
|
-
if (!data.success) return data.data.error;
|
|
20
|
+
.post('/api/call/operator/prolong', null, {
|
|
21
|
+
baseURL,
|
|
22
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
23
|
+
transformResponse: [
|
|
24
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
25
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
26
|
+
if (!data.success) return data.data.error;
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
28
|
+
return data.data;
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
})
|
|
36
32
|
.then((res: StartOperatorWorkData) => res)
|
|
37
33
|
.catch((err: StartOperatorWorkError) => {
|
|
38
34
|
throw err;
|