@escapenavigator/services 1.4.16 → 1.4.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.
@@ -1,7 +1,7 @@
1
1
  import { AgregatorPostBySlugDTO } from '@escapenavigator/types/dist/agregator/dto/agregator-post-by-slug.dto';
2
- import { AgregatorPostCardRO } from '@escapenavigator/types/dist/agregator/agregator-post-card.ro';
2
+ import { AgregatorPostRO } from '@escapenavigator/types/dist/agregator/agregator-post.ro';
3
3
  import { ApiMethodDeclaration } from '..';
4
4
  declare type ParamsData = AgregatorPostBySlugDTO;
5
- declare type ResponseData = AgregatorPostCardRO[];
5
+ declare type ResponseData = AgregatorPostRO;
6
6
  export declare const findPostBySlug: ApiMethodDeclaration<ParamsData, ResponseData>;
7
7
  export {};
@@ -1,6 +1,6 @@
1
- import { WidgetOpenapiFindedCertificateResponseObject } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-finded-certificate.ro';
1
+ import { WidgetOpenapiFindedCertificateRO } from '@escapenavigator/types/dist/widget-openapi/widget-openapi-finded-certificate.ro';
2
2
  import { ApiMethodDeclaration } from '..';
3
3
  declare type ParamsData = string;
4
- declare type ResponseData = WidgetOpenapiFindedCertificateResponseObject;
4
+ declare type ResponseData = WidgetOpenapiFindedCertificateRO;
5
5
  export declare const findCertificate: ApiMethodDeclaration<ParamsData, ResponseData>;
6
6
  export {};
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToOptions = void 0;
4
+ var getContentByItemField = function (item) {
5
+ if (item.surname)
6
+ return "".concat(item.name, " ").concat(item.surname);
7
+ if (item.name)
8
+ return item.name;
9
+ return item.title;
10
+ };
4
11
  var convertToOptions = function (data) { return data.map(function (item) { return ({
5
12
  key: item.id,
6
- content: item.title || item.surname ? "".concat(item.name, " ").concat(item.surname) : item.name,
13
+ content: getContentByItemField(item),
7
14
  }); }); };
8
15
  exports.convertToOptions = convertToOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "1.4.16",
3
+ "version": "1.4.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,9 +12,9 @@
12
12
  "scripts": {
13
13
  "build": "rm -rf dist && tsc --project tsconfig.json"
14
14
  },
15
- "gitHead": "51739bc10f224d63b4440d62c6e5e1e48aa77ede",
15
+ "gitHead": "fe4b718c45d2a03bd9f603ce860290ef05c9cfd8",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^1.4.16",
17
+ "@escapenavigator/types": "^1.4.19",
18
18
  "axios": "^0.21.4",
19
19
  "class-transformer": "^0.5.1",
20
20
  "class-validator": "^0.13.1",