ismx-nexo-node-app 0.3.49 → 0.3.51

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,6 +1,6 @@
1
1
  import { HttpRequest, HttpResponse } from "./Service";
2
2
  import ServiceRestFormal, { Wrapper } from "./ServiceRestFormal";
3
- import { Pagination } from "../repository/RepositoryDatabase";
3
+ import { Pagination } from "../repository/Repository";
4
4
  import RepositoryDatabase from "../repository/RepositoryDatabase";
5
5
  export default class ServiceRestFormalTemplate<Model = any> {
6
6
  readonly resource: string;
@@ -55,9 +55,11 @@ import _StringUtils from "./business/utils/StringUtils";
55
55
  export declare abstract class StringUtils extends _StringUtils {
56
56
  }
57
57
  /**************************************************************/
58
- import BaseRepository from "./repository/Repository";
58
+ import BaseRepository, { Pagination as _Pagination } from "./repository/Repository";
59
59
  export declare class Repository extends BaseRepository {
60
60
  }
61
+ export interface Pagination<T = any> extends _Pagination<T> {
62
+ }
61
63
  import _RepositoryDatabase from "./repository/RepositoryDatabase";
62
64
  export declare abstract class RepositoryDatabase extends _RepositoryDatabase {
63
65
  }
@@ -1,2 +1,6 @@
1
+ export interface Pagination<T> {
2
+ total: number;
3
+ elements: T[];
4
+ }
1
5
  export default class Repository {
2
6
  }
@@ -1,5 +1,4 @@
1
- import Repository from "./Repository";
2
- import { QueryResult } from "pg";
1
+ import Repository, { Pagination } from "./Repository";
3
2
  export interface QueryOptions {
4
3
  schema?: string;
5
4
  filters?: string;
@@ -11,10 +10,6 @@ export interface Chain {
11
10
  password: string;
12
11
  database: string;
13
12
  }
14
- export interface Pagination<T> {
15
- total: number;
16
- elements: T[];
17
- }
18
13
  export type Primitive = string | number | Date | null | undefined;
19
14
  export default abstract class RepositoryDatabase extends Repository {
20
15
  protected connected: boolean;
@@ -28,7 +23,7 @@ export default abstract class RepositoryDatabase extends Repository {
28
23
  protected readonly onQueryDidExecuteListeners: ((query: string) => void)[];
29
24
  addOnQueryDidExecuteListener(listener: (query: string) => void): void;
30
25
  abstract connect(connection: Chain): Promise<void>;
31
- abstract native(query: string, values: any[], options: QueryOptions): Promise<QueryResult>;
26
+ abstract native(query: string, values: any[], options: QueryOptions): Promise<any>;
32
27
  abstract query<E>(query: string, values: any[], options: QueryOptions): Promise<E[]>;
33
28
  abstract one<E>(tableName: string, id: string): Promise<E>;
34
29
  abstract any<E>(tableName: string, filters: {
@@ -1,5 +1,6 @@
1
1
  import pg, { QueryResult } from "pg";
2
- import RepositoryDatabase, { Chain, Pagination, Primitive, QueryOptions } from "./RepositoryDatabase";
2
+ import RepositoryDatabase, { Chain, Primitive, QueryOptions } from "./RepositoryDatabase";
3
+ import { Pagination } from "./Repository";
3
4
  export interface Column {
4
5
  name: string;
5
6
  schema: string;
@@ -1,6 +1,6 @@
1
1
  import { RestOptions } from "./RepositoryRest";
2
2
  import { HttpRequest } from "../api/Service";
3
- import { Pagination } from "./RepositoryDatabase";
3
+ import { Pagination } from "../repository/Repository";
4
4
  export default class RepositoryRestFormalTemplate<Model> {
5
5
  private readonly repository;
6
6
  constructor(baseUrl: string, options?: RestOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.3.49",
3
+ "version": "0.3.51",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -1,6 +1,6 @@
1
1
  import {HttpRequest, HttpResponse} from "./Service";
2
2
  import ServiceRestFormal, {Wrapper} from "./ServiceRestFormal";
3
- import {Pagination} from "../repository/RepositoryDatabase";
3
+ import {Pagination} from "../repository/Repository";
4
4
  import RepositoryDatabase from "../repository/RepositoryDatabase";
5
5
 
6
6
  export default class ServiceRestFormalTemplate<Model=any>
@@ -52,8 +52,9 @@ export abstract class StringUtils extends _StringUtils {}
52
52
 
53
53
  /**************************************************************/
54
54
 
55
- import BaseRepository from "./repository/Repository";
55
+ import BaseRepository, { Pagination as _Pagination } from "./repository/Repository";
56
56
  export class Repository extends BaseRepository {}
57
+ export interface Pagination<T=any> extends _Pagination<T> {}
57
58
 
58
59
  import _RepositoryDatabase from "./repository/RepositoryDatabase";
59
60
  export abstract class RepositoryDatabase extends _RepositoryDatabase {}
@@ -1,3 +1,8 @@
1
+ export interface Pagination<T> {
2
+ total: number;
3
+ elements: T[];
4
+ }
5
+
1
6
  export default class Repository {
2
7
 
3
8
  }
@@ -1,5 +1,4 @@
1
- import Repository from "./Repository";
2
- import {QueryResult} from "pg";
1
+ import Repository, {Pagination} from "./Repository";
3
2
 
4
3
  export interface QueryOptions {
5
4
  schema?: string;
@@ -14,11 +13,6 @@ export interface Chain {
14
13
  database: string;
15
14
  }
16
15
 
17
- export interface Pagination<T> {
18
- total: number;
19
- elements: T[];
20
- }
21
-
22
16
  export type Primitive = string | number | Date | null | undefined;
23
17
 
24
18
  export default abstract class RepositoryDatabase extends Repository
@@ -52,7 +46,7 @@ export default abstract class RepositoryDatabase extends Repository
52
46
 
53
47
  abstract connect(connection: Chain): Promise<void>;
54
48
 
55
- abstract native(query: string, values: any[], options: QueryOptions): Promise<QueryResult>;
49
+ abstract native(query: string, values: any[], options: QueryOptions): Promise<any>;
56
50
 
57
51
  abstract query<E>(query: string, values: any[], options: QueryOptions): Promise<E[]>;
58
52
 
@@ -1,6 +1,7 @@
1
1
  import pg, {ClientConfig, QueryResult, QueryResultRow} from "pg";
2
2
  import PostgresUtils from "./utils/PostgresUtils";
3
- import RepositoryDatabase, {Chain, Pagination, Primitive, QueryOptions} from "./RepositoryDatabase";
3
+ import RepositoryDatabase, {Chain, Primitive, QueryOptions} from "./RepositoryDatabase";
4
+ import {Pagination} from "./Repository";
4
5
 
5
6
  export interface Column {
6
7
  name: string
@@ -1,7 +1,7 @@
1
1
  import {RestOptions} from "./RepositoryRest";
2
2
  import RepositoryRestFormal from "./RepositoryRestFormal";
3
3
  import {HttpRequest} from "../api/Service";
4
- import {Pagination} from "./RepositoryDatabase";
4
+ import {Pagination} from "../repository/Repository";
5
5
 
6
6
  export default class RepositoryRestFormalTemplate<Model> {
7
7