@carlosdiazz/lottodiz-shared 4.0.8 → 4.1.0

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,4 +1,5 @@
1
1
  import { ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CountryInterface } from "./country.base";
3
4
  import { CreateCountryInterface } from "./create-country.base";
4
5
  import { ParamsCountryInterface } from "./params-country.base";
@@ -6,7 +7,7 @@ import { ResponseCountryInterface } from "./response-country.base";
6
7
  import { UpdateCountryInterface } from "./update-country.base";
7
8
  export interface CountryServiceInterface {
8
9
  create(dto: CreateCountryInterface): Promise<CountryInterface>;
9
- findAll(pagination: ParamsCountryInterface): Promise<ResponseCountryInterface>;
10
+ findAll(pagination: ParamsCountryInterface, user?: UserInterface): Promise<ResponseCountryInterface>;
10
11
  findOne(id: number): Promise<CountryInterface>;
11
12
  update(dto: UpdateCountryInterface): Promise<CountryInterface>;
12
13
  remove(id: number): Promise<ResponseInterface>;
@@ -1,4 +1,5 @@
1
1
  import { ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CreateTimeDrawInternalInterface, CreateDrawInternalInterface, FindByApiAndDateInterface, FindByApiNameInterface } from "./create-draw.base";
3
4
  import { DrawInterface } from "./draw.base";
4
5
  import { ParamsDrawByDateInterface, ParamsDrawInterface } from "./params.draw";
@@ -6,7 +7,7 @@ import { ResponseDrawInterface } from "./response-draw";
6
7
  import { UpdateDrawInterface } from "./update-draw.base";
7
8
  export interface DrawServiceInterface {
8
9
  create(createDrawDto: CreateDrawInternalInterface, createTimeDrawInternalDto: CreateTimeDrawInternalInterface): Promise<DrawInterface>;
9
- findAll(pagination: ParamsDrawInterface): Promise<ResponseDrawInterface>;
10
+ findAll(pagination: ParamsDrawInterface, user?: UserInterface): Promise<ResponseDrawInterface>;
10
11
  findOne(id: number): Promise<DrawInterface>;
11
12
  update(dto: UpdateDrawInterface): Promise<DrawInterface>;
12
13
  remove(id: number): Promise<ResponseInterface>;
@@ -1,11 +1,12 @@
1
1
  import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CreateDrawNumberInterface } from "./create-draw_number.base";
3
4
  import { DrawNumberInterface } from "./draw_number.base";
4
5
  import { ResponseDrawNumberInterface } from "./response-draw_number";
5
6
  import { UpdateDrawNumberInterface } from "./update-draw_number.base";
6
7
  export interface DrawNumberServiceInterface {
7
8
  create(dto: CreateDrawNumberInterface): Promise<DrawNumberInterface>;
8
- findAll(pagination: PaginationInterface): Promise<ResponseDrawNumberInterface>;
9
+ findAll(pagination: PaginationInterface, user?: UserInterface): Promise<ResponseDrawNumberInterface>;
9
10
  findOne(id: number): Promise<DrawNumberInterface>;
10
11
  update(dto: UpdateDrawNumberInterface): Promise<DrawNumberInterface>;
11
12
  remove(id: number): Promise<ResponseInterface>;
@@ -1,4 +1,5 @@
1
1
  import { ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CreateLotteryInterface } from "./create-lottery.base";
3
4
  import { LotteryInterface } from "./lottery.base";
4
5
  import { ParamsLotteryInterface } from "./params-lottery";
@@ -6,7 +7,7 @@ import { ResponseLotteryInterface } from "./response-lottery";
6
7
  import { UpdateLotteryInterface } from "./update-lottery.base";
7
8
  export interface LotteryServiceInterface {
8
9
  create(dto: CreateLotteryInterface): Promise<LotteryInterface>;
9
- findAll(pagination: ParamsLotteryInterface): Promise<ResponseLotteryInterface>;
10
+ findAll(pagination: ParamsLotteryInterface, user?: UserInterface): Promise<ResponseLotteryInterface>;
10
11
  findOne(id: number): Promise<LotteryInterface>;
11
12
  update(dto: UpdateLotteryInterface): Promise<LotteryInterface>;
12
13
  remove(id: number): Promise<ResponseInterface>;
@@ -2,6 +2,7 @@ import { CountryInterface } from "../country";
2
2
  import { PlatformAdsInterface } from "../platform_ads";
3
3
  import { PlatformDeviceInterface } from "../platform_devices";
4
4
  import { PlatformMessageInterface } from "../platform_message";
5
+ import { UserInterface } from "../user";
5
6
  export interface PlatformInterface {
6
7
  id: number;
7
8
  name: string;
@@ -22,6 +23,7 @@ export interface PlatformInterface {
22
23
  platformDevice?: PlatformDeviceInterface[];
23
24
  platformMessage?: PlatformMessageInterface[];
24
25
  country?: CountryInterface[];
26
+ user?: UserInterface[];
25
27
  create_at: Date;
26
28
  update_at: Date;
27
29
  }
@@ -1,11 +1,12 @@
1
1
  import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CreatePlatformInterface } from "./create-platform.base";
3
4
  import { PlatformInterface } from "./platform.base";
4
5
  import { ResponsePlatformInterface } from "./response-platform.base";
5
6
  import { UpdatePlatformInterface } from "./update-platform.base";
6
7
  export interface PlatformServiceInterface {
7
8
  create(dto: CreatePlatformInterface): Promise<PlatformInterface>;
8
- findAll(pagination: PaginationInterface): Promise<ResponsePlatformInterface>;
9
+ findAll(pagination: PaginationInterface, user?: UserInterface): Promise<ResponsePlatformInterface>;
9
10
  findOne(id: number): Promise<PlatformInterface>;
10
11
  update(dto: UpdatePlatformInterface): Promise<PlatformInterface>;
11
12
  remove(id: number): Promise<ResponseInterface>;
@@ -4,9 +4,10 @@ import { PlatformAdsInterface } from "./platform-ads.base";
4
4
  import { ResponsePlatformAdsInterface } from "./response-platform-ads.base";
5
5
  import { UpdatePlatformAdsInterface } from "./update-platform-ads.base";
6
6
  import { ResponseInterface } from "../common";
7
+ import { UserInterface } from "../user";
7
8
  export interface PlatformAdsServiceInterface {
8
9
  create(dto: CreatePlatformAdsInterface): Promise<PlatformAdsInterface>;
9
- findAll(pagination: ParamsPlatformAdsInterface): Promise<ResponsePlatformAdsInterface>;
10
+ findAll(pagination: ParamsPlatformAdsInterface, user?: UserInterface): Promise<ResponsePlatformAdsInterface>;
10
11
  findOne(id: number): Promise<PlatformAdsInterface>;
11
12
  update(dto: UpdatePlatformAdsInterface): Promise<PlatformAdsInterface>;
12
13
  remove(id: number): Promise<ResponseInterface>;
@@ -4,9 +4,10 @@ import { ResponseTemplateDrawInterface } from "./response-template_draw";
4
4
  import { TemplateDrawInterface } from "./template_draw.base";
5
5
  import { UpdateTemplateDrawInterface } from "./update-template_draw.base";
6
6
  import { ResponseInterface } from "../common";
7
+ import { UserInterface } from "../user";
7
8
  export interface TemplateDrawServiceInterface {
8
9
  create(dto: CreateTemplateDrawInterface): Promise<TemplateDrawInterface>;
9
- findAll(pagination: ParamsTemplateDrawInterface): Promise<ResponseTemplateDrawInterface>;
10
+ findAll(pagination: ParamsTemplateDrawInterface, user?: UserInterface): Promise<ResponseTemplateDrawInterface>;
10
11
  findOne(id: number): Promise<TemplateDrawInterface>;
11
12
  update(dto: UpdateTemplateDrawInterface): Promise<TemplateDrawInterface>;
12
13
  findOneByIdDays(id: number, id_day: number): Promise<TemplateDrawInterface>;
@@ -3,4 +3,5 @@ export interface CreateTemplateResultInterface {
3
3
  active?: boolean;
4
4
  repetition?: boolean;
5
5
  is_text?: boolean;
6
+ view_position?: boolean;
6
7
  }
@@ -6,6 +6,7 @@ export interface TemplateResultInterface {
6
6
  active: boolean;
7
7
  repetition: boolean;
8
8
  is_text: boolean;
9
+ view_position: boolean;
9
10
  position_result?: PositionResultInterface[];
10
11
  template_draw?: TemplateDrawInterface[];
11
12
  create_at: Date;
@@ -1,11 +1,12 @@
1
1
  import { PaginationInterface, ResponseInterface } from "../common";
2
+ import { UserInterface } from "../user";
2
3
  import { CreateTemplateResultInterface } from "./create-template_result.base";
3
4
  import { ResponseTemplateResultInterface } from "./response-template_result.base";
4
5
  import { TemplateResultInterface } from "./template_result.base";
5
6
  import { UpdateTemplateResultInterface } from "./update-template_result.base";
6
7
  export interface TemplateResultServiceInterface {
7
8
  create(dto: CreateTemplateResultInterface): Promise<TemplateResultInterface>;
8
- findAll(pagination: PaginationInterface): Promise<ResponseTemplateResultInterface>;
9
+ findAll(pagination: PaginationInterface, user?: UserInterface): Promise<ResponseTemplateResultInterface>;
9
10
  findOne(id: number): Promise<TemplateResultInterface>;
10
11
  update(dto: UpdateTemplateResultInterface): Promise<TemplateResultInterface>;
11
12
  remove(id: number): Promise<ResponseInterface>;
@@ -4,4 +4,5 @@ export interface UpdateTemplateResultInterface {
4
4
  active?: boolean;
5
5
  repetition?: boolean;
6
6
  is_text?: boolean;
7
+ view_position?: boolean;
7
8
  }
@@ -2,4 +2,5 @@ export interface UpdateUserInterface {
2
2
  id: string;
3
3
  id_role?: string;
4
4
  name?: string;
5
+ id_platform?: string;
5
6
  }
@@ -1,4 +1,5 @@
1
1
  import { RoleInterface } from "../role";
2
+ import { PlatformInterface } from "../platform";
2
3
  export interface UserInterface {
3
4
  id: string;
4
5
  name: string;
@@ -8,6 +9,7 @@ export interface UserInterface {
8
9
  active: boolean;
9
10
  is_admin: boolean;
10
11
  role?: RoleInterface;
12
+ platform?: PlatformInterface;
11
13
  create_at: Date;
12
14
  update_at: Date;
13
15
  }
@@ -4,7 +4,7 @@ import { ResponseUserInterface } from "./response-user.base";
4
4
  import { UpdateUserInterface } from "./update-user.base";
5
5
  import { UserInterface } from "./user.interface";
6
6
  export interface UserServiceInterface {
7
- findAll(pagination: ParamsUserInterface): Promise<ResponseUserInterface>;
7
+ findAll(pagination: ParamsUserInterface, user: UserInterface): Promise<ResponseUserInterface>;
8
8
  findOne(id: string): Promise<UserInterface>;
9
9
  update(dto: UpdateUserInterface): Promise<UserInterface>;
10
10
  remove(id: string): Promise<ResponseInterface>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlosdiazz/lottodiz-shared",
3
- "version": "4.0.8",
3
+ "version": "4.1.0",
4
4
  "description": "Shared Dtos, models, constants and utils",
5
5
  "main": "dist/index.js",
6
6
  "private": false,