@escapenavigator/services 2.1.14 → 2.1.16

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.
@@ -0,0 +1,9 @@
1
+ import { EmailRO } from '@escapenavigator/types/dist/emails/email.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ identificator: string;
5
+ text: string;
6
+ };
7
+ type ResponseData = EmailRO;
8
+ export declare const addComment: ApiMethodDeclaration<ParamsData, ResponseData>;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addComment = void 0;
4
+ var addComment = function (_a) {
5
+ var identificator = _a.identificator, text = _a.text;
6
+ return ({
7
+ url: "/emails/comment/".concat(identificator),
8
+ method: 'POST',
9
+ data: { text: text },
10
+ });
11
+ };
12
+ exports.addComment = addComment;
@@ -0,0 +1,6 @@
1
+ import { EmailAssigneeOptionRO } from '@escapenavigator/types/dist/emails/email-comment.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = void;
4
+ type ResponseData = EmailAssigneeOptionRO[];
5
+ export declare const getAssignees: ApiMethodDeclaration<ParamsData, ResponseData>;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAssignees = void 0;
4
+ var getAssignees = function () { return ({
5
+ url: '/emails/assignees',
6
+ method: 'GET',
7
+ }); };
8
+ exports.getAssignees = getAssignees;
@@ -1,12 +1,16 @@
1
+ import { addComment } from './add-comment';
1
2
  import { bulkRemove } from './bulk-remove';
2
3
  import { create } from './create';
4
+ import { getAssignees } from './get-assignees';
3
5
  import { getById } from './get-by-id';
4
6
  import { getProfileEmails } from './get-profile-emails';
5
7
  import { linkToProfile } from './link-to-profile';
8
+ import { markRead } from './mark-read';
6
9
  import { query } from './query';
7
10
  import { remove } from './remove';
8
11
  import { resend } from './resend';
9
12
  import { resync } from './resync';
13
+ import { setAssignee } from './set-assignee';
10
14
  import { setCategory } from './set-category';
11
15
  type ApiDeclaration = {
12
16
  resync: typeof resync;
@@ -19,6 +23,10 @@ type ApiDeclaration = {
19
23
  bulkRemove: typeof bulkRemove;
20
24
  setCategory: typeof setCategory;
21
25
  resend: typeof resend;
26
+ markRead: typeof markRead;
27
+ setAssignee: typeof setAssignee;
28
+ addComment: typeof addComment;
29
+ getAssignees: typeof getAssignees;
22
30
  };
23
31
  export declare const emailsApiDeclaration: ApiDeclaration;
24
32
  export {};
@@ -1,15 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emailsApiDeclaration = void 0;
4
+ var add_comment_1 = require("./add-comment");
4
5
  var bulk_remove_1 = require("./bulk-remove");
5
6
  var create_1 = require("./create");
7
+ var get_assignees_1 = require("./get-assignees");
6
8
  var get_by_id_1 = require("./get-by-id");
7
9
  var get_profile_emails_1 = require("./get-profile-emails");
8
10
  var link_to_profile_1 = require("./link-to-profile");
11
+ var mark_read_1 = require("./mark-read");
9
12
  var query_1 = require("./query");
10
13
  var remove_1 = require("./remove");
11
14
  var resend_1 = require("./resend");
12
15
  var resync_1 = require("./resync");
16
+ var set_assignee_1 = require("./set-assignee");
13
17
  var set_category_1 = require("./set-category");
14
18
  exports.emailsApiDeclaration = {
15
19
  resync: resync_1.resync,
@@ -22,4 +26,8 @@ exports.emailsApiDeclaration = {
22
26
  remove: remove_1.remove,
23
27
  bulkRemove: bulk_remove_1.bulkRemove,
24
28
  setCategory: set_category_1.setCategory,
29
+ markRead: mark_read_1.markRead,
30
+ setAssignee: set_assignee_1.setAssignee,
31
+ addComment: add_comment_1.addComment,
32
+ getAssignees: get_assignees_1.getAssignees,
25
33
  };
@@ -0,0 +1,8 @@
1
+ import { EmailRO } from '@escapenavigator/types/dist/emails/email.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ identificator: string;
5
+ };
6
+ type ResponseData = EmailRO;
7
+ export declare const markRead: ApiMethodDeclaration<ParamsData, ResponseData>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.markRead = void 0;
4
+ var markRead = function (_a) {
5
+ var identificator = _a.identificator;
6
+ return ({
7
+ url: "/emails/read/".concat(identificator),
8
+ method: 'POST',
9
+ });
10
+ };
11
+ exports.markRead = markRead;
@@ -0,0 +1,9 @@
1
+ import { EmailRO } from '@escapenavigator/types/dist/emails/email.ro';
2
+ import { ApiMethodDeclaration } from '..';
3
+ type ParamsData = {
4
+ identificator: string;
5
+ assigneeId: number | null;
6
+ };
7
+ type ResponseData = EmailRO;
8
+ export declare const setAssignee: ApiMethodDeclaration<ParamsData, ResponseData>;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setAssignee = void 0;
4
+ var setAssignee = function (_a) {
5
+ var identificator = _a.identificator, assigneeId = _a.assigneeId;
6
+ return ({
7
+ url: "/emails/assignee/".concat(identificator),
8
+ method: 'POST',
9
+ data: { assigneeId: assigneeId },
10
+ });
11
+ };
12
+ exports.setAssignee = setAssignee;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/services",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
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": "c43b309381f1541293a3c5cf74f4ac11ae14cdf8",
15
+ "gitHead": "bbd3f23f805eac92aa95815794fdcc27b3384811",
16
16
  "dependencies": {
17
- "@escapenavigator/types": "^2.1.13",
18
- "@escapenavigator/utils": "^2.1.14",
17
+ "@escapenavigator/types": "^2.1.15",
18
+ "@escapenavigator/utils": "^2.1.16",
19
19
  "axios": "^0.21.4",
20
20
  "class-transformer": "^0.5.1",
21
21
  "class-validator": "^0.13.2",