@escapenavigator/services 1.10.153 → 1.10.155

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.
@@ -15,6 +15,12 @@ export type ApiErrorContext = {
15
15
  status?: number;
16
16
  /** Сетевой код axios: ECONNABORTED/ERR_CANCELED/... — для 0-status кейсов. */
17
17
  code?: string;
18
+ /**
19
+ * Сообщение axios-ошибки (`error.message`), например «timeout of 0ms
20
+ * exceeded». Нужно классификатору, чтобы отличить фантомный обрыв
21
+ * запроса от реального сконфигурированного таймаута.
22
+ */
23
+ message?: string;
18
24
  /** имя ApiMethodDeclaration, например `users.me` */
19
25
  apiKey: string;
20
26
  /**
package/dist/api/index.js CHANGED
@@ -96,6 +96,7 @@ function buildErrorContext(error, axiosConfig, apiKey) {
96
96
  url: (_c = axiosConfig === null || axiosConfig === void 0 ? void 0 : axiosConfig.url) !== null && _c !== void 0 ? _c : apiKey,
97
97
  status: (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.status,
98
98
  code: error === null || error === void 0 ? void 0 : error.code,
99
+ message: error === null || error === void 0 ? void 0 : error.message,
99
100
  errorCode: responseData === null || responseData === void 0 ? void 0 : responseData.errorCode,
100
101
  originalErrorCode: responseData === null || responseData === void 0 ? void 0 : responseData.originalErrorCode,
101
102
  backendMessage: responseData === null || responseData === void 0 ? void 0 : responseData.message,
@@ -89,6 +89,7 @@ import { queryOrderSmsLogs } from './profile-sms/query-order-sms-logs';
89
89
  import { querySmsLogsByClient } from './profile-sms/query-sms-logs-by-client';
90
90
  import { sendOrderClientEmail } from './profile-sms/send-order-client-email';
91
91
  import { sendOrderClientSms } from './profile-sms/send-order-client-sms';
92
+ import { sendTestSms } from './profile-sms/send-test-sms';
92
93
  import { updateSmsSettings } from './profile-sms/update-sms-settings';
93
94
  import { query } from './query';
94
95
  import { remove } from './remove';
@@ -234,6 +235,7 @@ type ApiDeclaration = {
234
235
  webHookApi: typeof webHookApi;
235
236
  getClientNotifications: typeof getClientNotifications;
236
237
  sendOrderClientSms: typeof sendOrderClientSms;
238
+ sendTestSms: typeof sendTestSms;
237
239
  sendOrderClientEmail: typeof sendOrderClientEmail;
238
240
  queryOrderSmsLogs: typeof queryOrderSmsLogs;
239
241
  querySmsLogsByClient: typeof querySmsLogsByClient;
@@ -92,6 +92,7 @@ var query_order_sms_logs_1 = require("./profile-sms/query-order-sms-logs");
92
92
  var query_sms_logs_by_client_1 = require("./profile-sms/query-sms-logs-by-client");
93
93
  var send_order_client_email_1 = require("./profile-sms/send-order-client-email");
94
94
  var send_order_client_sms_1 = require("./profile-sms/send-order-client-sms");
95
+ var send_test_sms_1 = require("./profile-sms/send-test-sms");
95
96
  var update_sms_settings_1 = require("./profile-sms/update-sms-settings");
96
97
  var query_3 = require("./query");
97
98
  var remove_2 = require("./remove");
@@ -132,6 +133,7 @@ exports.profilesApiDeclaration = {
132
133
  webHookApi: webhook_api_1.webHookApi,
133
134
  getClientNotifications: get_client_notofocations_1.getClientNotifications,
134
135
  sendOrderClientSms: send_order_client_sms_1.sendOrderClientSms,
136
+ sendTestSms: send_test_sms_1.sendTestSms,
135
137
  sendOrderClientEmail: send_order_client_email_1.sendOrderClientEmail,
136
138
  queryOrderSmsLogs: query_order_sms_logs_1.queryOrderSmsLogs,
137
139
  querySmsLogsByClient: query_sms_logs_by_client_1.querySmsLogsByClient,
@@ -0,0 +1,8 @@
1
+ import { SendTestSmsDto } from '@escapenavigator/types/dist/profile/profile-sms/dto/send-test-sms.dto';
2
+ import { SendTestSmsRO } from '@escapenavigator/types/dist/profile/profile-sms/ro/send-test-sms.ro';
3
+ import { ApiMethodDeclaration } from '../..';
4
+ type ParamsData = {
5
+ data: SendTestSmsDto;
6
+ };
7
+ export declare const sendTestSms: ApiMethodDeclaration<ParamsData, SendTestSmsRO>;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendTestSms = void 0;
4
+ var sendTestSms = function (_a) {
5
+ var data = _a.data;
6
+ return ({
7
+ url: '/profile-sms/send-test',
8
+ method: 'POST',
9
+ data: data,
10
+ });
11
+ };
12
+ exports.sendTestSms = sendTestSms;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "1.10.153",
3
+ "version": "1.10.155",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,10 +12,10 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc --project tsconfig.json"
14
14
  },
15
- "gitHead": "8903497c36ccfbfaea79ea7852b9d2c6e2b5a758",
15
+ "gitHead": "a544fe463f486e809bc002494b1260c6bb596aaf",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^1.10.144",
18
- "@escapenavigator/utils": "^1.10.148",
17
+ "@escapenavigator/types": "^1.10.145",
18
+ "@escapenavigator/utils": "^1.10.150",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",