@carlosdiazz/lottodiz-shared 1.8.4 → 1.8.6

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.
@@ -7,7 +7,7 @@ import { ResponsePageWebscrapingInterface } from "./response-page_webscraping";
7
7
  import { UpdatePageWebscrapingInterface } from "./update-page_webscraping.base";
8
8
  export interface PageWebscrapingResolverInterface {
9
9
  create(dto: CreatePageWebscrapingInterface, user?: UserInterface): Promise<PageWebscrapingInterface>;
10
- findAll(pagination: ParamsPageWebscrapingInterface): Promise<ResponsePageWebscrapingInterface>;
10
+ findAll(pagination: ParamsPageWebscrapingInterface, user?: UserInterface): Promise<ResponsePageWebscrapingInterface>;
11
11
  findOne(id: number, user?: UserInterface): Promise<PageWebscrapingInterface>;
12
12
  update(dto: UpdatePageWebscrapingInterface, user?: UserInterface): Promise<PageWebscrapingInterface>;
13
13
  remove(id: number, user?: UserInterface): Promise<ResponseInterface>;
@@ -1,4 +1,5 @@
1
1
  export * from "./create-template_draw_webscraping.base";
2
+ export * from "./paramas-template_draw_webscraping";
2
3
  export * from "./response-template_draw_webscraping.base";
3
4
  export * from "./template_draw_webscraping.base";
4
5
  export * from "./template_draw_webscraping.controller";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-template_draw_webscraping.base"), exports);
18
+ __exportStar(require("./paramas-template_draw_webscraping"), exports);
18
19
  __exportStar(require("./response-template_draw_webscraping.base"), exports);
19
20
  __exportStar(require("./template_draw_webscraping.base"), exports);
20
21
  __exportStar(require("./template_draw_webscraping.controller"), exports);
@@ -0,0 +1,9 @@
1
+ import { PaginationInterface } from "../common";
2
+ export interface ParamsTemplateDrawWebscrapingInterface extends PaginationInterface {
3
+ offset: number;
4
+ limit: number;
5
+ active: boolean;
6
+ id_lottery?: number | null;
7
+ id_country?: number | null;
8
+ id_platform?: number | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,10 @@
1
1
  import { ResponseTemplateDrawWebscrapingInterface, TemplateDrawWebscrapingInterface, UpdateTemplateDrawWebscrapingInterface } from ".";
2
- import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { ResponseInterface } from "../common";
3
3
  import { CreateTemplateDrawWebscrapingInterface } from "./create-template_draw_webscraping.base";
4
+ import { ParamsTemplateDrawWebscrapingInterface } from "./paramas-template_draw_webscraping";
4
5
  export interface TemplateDrawWebscrapingControllerInterface {
5
6
  create(dto: CreateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
6
- findAll(pagination: PaginationInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
+ findAll(pagination: ParamsTemplateDrawWebscrapingInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
8
  findOne(id: number): Promise<TemplateDrawWebscrapingInterface>;
8
9
  update(dto: UpdateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
9
10
  remove(id: number): Promise<ResponseInterface>;
@@ -1,9 +1,10 @@
1
1
  import { ResponseTemplateDrawWebscrapingInterface, TemplateDrawWebscrapingInterface, UpdateTemplateDrawWebscrapingInterface } from ".";
2
- import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { ResponseInterface } from "../common";
3
3
  import { CreateTemplateDrawWebscrapingInterface } from "./create-template_draw_webscraping.base";
4
+ import { ParamsTemplateDrawWebscrapingInterface } from "./paramas-template_draw_webscraping";
4
5
  export interface TemplateDrawWebscrapingDatasourceInterface {
5
6
  create(dto: CreateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
6
- findAll(pagination: PaginationInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
+ findAll(pagination: ParamsTemplateDrawWebscrapingInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
8
  findOne(id: number): Promise<TemplateDrawWebscrapingInterface>;
8
9
  update(dto: UpdateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
9
10
  remove(id: number): Promise<ResponseInterface>;
@@ -1,10 +1,11 @@
1
1
  import { ResponseTemplateDrawWebscrapingInterface, TemplateDrawWebscrapingInterface, UpdateTemplateDrawWebscrapingInterface } from ".";
2
- import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { ResponseInterface } from "../common";
3
3
  import { UserInterface } from "../user";
4
4
  import { CreateTemplateDrawWebscrapingInterface } from "./create-template_draw_webscraping.base";
5
+ import { ParamsTemplateDrawWebscrapingInterface } from "./paramas-template_draw_webscraping";
5
6
  export interface TemplateDrawWebscrapingResolverInterface {
6
7
  create(dto: CreateTemplateDrawWebscrapingInterface, user?: UserInterface): Promise<TemplateDrawWebscrapingInterface>;
7
- findAll(pagination: PaginationInterface, user?: UserInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
8
+ findAll(pagination: ParamsTemplateDrawWebscrapingInterface, user?: UserInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
8
9
  findOne(id: number, user?: UserInterface): Promise<TemplateDrawWebscrapingInterface>;
9
10
  update(dto: UpdateTemplateDrawWebscrapingInterface, user?: UserInterface): Promise<TemplateDrawWebscrapingInterface>;
10
11
  remove(id: number, user?: UserInterface): Promise<ResponseInterface>;
@@ -1,9 +1,10 @@
1
1
  import { ResponseTemplateDrawWebscrapingInterface, TemplateDrawWebscrapingInterface, UpdateTemplateDrawWebscrapingInterface } from ".";
2
- import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { ResponseInterface } from "../common";
3
3
  import { CreateTemplateDrawWebscrapingInterface } from "./create-template_draw_webscraping.base";
4
+ import { ParamsTemplateDrawWebscrapingInterface } from "./paramas-template_draw_webscraping";
4
5
  export interface TemplateDrawWebscrapingServiceInterface {
5
6
  create(dto: CreateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
6
- findAll(pagination: PaginationInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
+ findAll(pagination: ParamsTemplateDrawWebscrapingInterface): Promise<ResponseTemplateDrawWebscrapingInterface>;
7
8
  findOne(id: number): Promise<TemplateDrawWebscrapingInterface>;
8
9
  update(dto: UpdateTemplateDrawWebscrapingInterface): Promise<TemplateDrawWebscrapingInterface>;
9
10
  remove(id: number): Promise<ResponseInterface>;
@@ -6,7 +6,7 @@ const validateXpath = (total_item, createPageWebscrapingInterface) => {
6
6
  if (xpath_url.length !== total_item) {
7
7
  throw new Error(`xpath_url they do not have the same total elements`);
8
8
  }
9
- if (xpath_verify) {
9
+ if (xpath_verify && xpath_verify.length > 0) {
10
10
  if (xpath_verify.length !== total_item) {
11
11
  throw new Error(`xpath_verify they do not have the same total elements`);
12
12
  }
@@ -21,7 +21,7 @@ const validateXpathByTemplatePageWebscraping = (createTemplatePageWebscraping) =
21
21
  if (xpath_item.length !== total_item) {
22
22
  throw new Error(`xpath_item they do not have the same total elements`);
23
23
  }
24
- if (xpath_verify) {
24
+ if (xpath_verify && xpath_verify.length > 0) {
25
25
  if (xpath_verify.length !== total_item) {
26
26
  throw new Error(`xpath_verify they do not have the same total elements`);
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlosdiazz/lottodiz-shared",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "description": "Shared Dtos, models, constants and utils",
5
5
  "main": "dist/index.js",
6
6
  "private": false,