@carlosdiazz/lottodiz-shared 2.1.9 → 2.2.1

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.
@@ -104,6 +104,7 @@ export declare class MethodValid {
104
104
  static PLATFORM_DEVICE_REMOVE: string;
105
105
  static PLATFORM_MESSAGE_CREATE: string;
106
106
  static PLATFORM_MESSAGE_AUTO_CREATE: string;
107
+ static PLATFORM_MESSAGE_SEND: string;
107
108
  static PLATFORM_MESSAGE_FIND_ONE: string;
108
109
  static PLATFORM_MESSAGE_FIND_ALL: string;
109
110
  static PLATFORM_MESSAGE_UPDATE: string;
@@ -133,6 +133,7 @@ MethodValid.PLATFORM_DEVICE_REMOVE = "PLATFORM_DEVICE_REMOVE";
133
133
  //PLATFORM MESSAGE
134
134
  MethodValid.PLATFORM_MESSAGE_CREATE = "PLATFORM_MESSAGE_CREATE";
135
135
  MethodValid.PLATFORM_MESSAGE_AUTO_CREATE = "PLATFORM_MESSAGE_AUTO_CREATE";
136
+ MethodValid.PLATFORM_MESSAGE_SEND = "PLATFORM_MESSAGE_SEND";
136
137
  MethodValid.PLATFORM_MESSAGE_FIND_ONE = "PLATFORM_MESSAGE_FIND_ONE";
137
138
  MethodValid.PLATFORM_MESSAGE_FIND_ALL = "PLATFORM_MESSAGE_FIND_ALL";
138
139
  MethodValid.PLATFORM_MESSAGE_UPDATE = "PLATFORM_MESSAGE_UPDATE";
@@ -6,6 +6,7 @@ import { UpdatePlatformMessageInterface } from "./update-platform-message.base";
6
6
  import { ResponseInterface } from "../common";
7
7
  export interface PlatformMessageControllerInterface {
8
8
  autoCreate(dto: CreatePlatformMessageInterface): void;
9
+ sendMessage(id_message: number): Promise<ResponseInterface>;
9
10
  create(dto: CreatePlatformMessageInterface): Promise<PlatformMessageInterface>;
10
11
  findAll(pagination: ParamsPlatformMessageInterface): Promise<ResponsePlatformMessageInterface>;
11
12
  findOne(id: number): Promise<PlatformMessageInterface>;
@@ -11,4 +11,5 @@ export interface PlatformMessageResolverInterface {
11
11
  findOne(id: number, user?: UserInterface): Promise<PlatformMessageInterface>;
12
12
  update(dto: UpdatePlatformMessageInterface, user?: UserInterface): Promise<PlatformMessageInterface>;
13
13
  remove(id: number, user?: UserInterface): Promise<ResponseInterface>;
14
+ sendMessage(id_message: number): Promise<ResponseInterface>;
14
15
  }
@@ -6,6 +6,7 @@ import { UpdatePlatformMessageInterface } from "./update-platform-message.base";
6
6
  import { ResponseInterface } from "../common";
7
7
  export interface PlatformMessageServiceInterface {
8
8
  autoCreate(dto: CreatePlatformMessageInterface): void;
9
+ sendMessage(id_message: number): Promise<ResponseInterface>;
9
10
  create(dto: CreatePlatformMessageInterface): Promise<PlatformMessageInterface>;
10
11
  findAll(pagination: ParamsPlatformMessageInterface): Promise<ResponsePlatformMessageInterface>;
11
12
  findOne(id: number): Promise<PlatformMessageInterface>;
@@ -0,0 +1,2 @@
1
+ import { KeyValueInterface } from "../models";
2
+ export declare const convertArrayToRecord: (arr: KeyValueInterface[]) => Record<string, string>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertArrayToRecord = void 0;
4
+ const convertArrayToRecord = (arr) => {
5
+ return arr.reduce((acc, item) => {
6
+ acc[item.key] = item.value;
7
+ return acc;
8
+ }, {});
9
+ };
10
+ exports.convertArrayToRecord = convertArrayToRecord;
@@ -1,3 +1,4 @@
1
+ export * from "./convert-array-to-record";
1
2
  export * from "./convert-date-to-string";
2
3
  export * from "./convert-time-zone";
3
4
  export * from "./convert-to-number-array";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./convert-array-to-record"), exports);
17
18
  __exportStar(require("./convert-date-to-string"), exports);
18
19
  __exportStar(require("./convert-time-zone"), exports);
19
20
  __exportStar(require("./convert-to-number-array"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlosdiazz/lottodiz-shared",
3
- "version": "2.1.9",
3
+ "version": "2.2.1",
4
4
  "description": "Shared Dtos, models, constants and utils",
5
5
  "main": "dist/index.js",
6
6
  "private": false,