pg-manipulator 1.0.50 → 1.0.52

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.
Files changed (60) hide show
  1. package/dist/@types/admin/entidade_cartao_fields.d.ts +1 -1
  2. package/dist/@types/admin/entidade_cartao_order.d.ts +1 -1
  3. package/dist/@types/admin/entidade_cartao_select.d.ts +1 -1
  4. package/dist/@types/admin/entidade_cartao_update.d.ts +1 -1
  5. package/dist/@types/admin/entidade_cartao_where.d.ts +1 -1
  6. package/dist/@types/admin/operacao_fields.d.ts +14 -12
  7. package/dist/@types/admin/operacao_item_fields.d.ts +1 -1
  8. package/dist/@types/admin/operacao_item_order.d.ts +1 -1
  9. package/dist/@types/admin/operacao_item_select.d.ts +1 -1
  10. package/dist/@types/admin/operacao_item_update.d.ts +1 -1
  11. package/dist/@types/admin/operacao_item_where.d.ts +1 -1
  12. package/dist/@types/admin/operacao_order.d.ts +2 -0
  13. package/dist/@types/admin/operacao_pagamento_fields.d.ts +1 -2
  14. package/dist/@types/admin/operacao_pagamento_order.d.ts +1 -2
  15. package/dist/@types/admin/operacao_pagamento_select.d.ts +1 -2
  16. package/dist/@types/admin/operacao_pagamento_update.d.ts +1 -2
  17. package/dist/@types/admin/operacao_pagamento_where.d.ts +1 -2
  18. package/dist/@types/admin/operacao_select.d.ts +2 -0
  19. package/dist/@types/admin/operacao_update.d.ts +2 -0
  20. package/dist/@types/admin/operacao_where.d.ts +2 -0
  21. package/dist/class/admin/index.d.ts +20 -24
  22. package/dist/class/admin/index.js +20 -24
  23. package/dist/mapping/admin/empresa.d.ts +1 -11
  24. package/dist/mapping/admin/empresa.js +1 -13
  25. package/dist/mapping/admin/entidade_cartao.d.ts +11 -1
  26. package/dist/mapping/admin/entidade_cartao.js +15 -3
  27. package/dist/mapping/admin/index.d.ts +54 -126
  28. package/dist/mapping/admin/index.js +20 -24
  29. package/dist/mapping/admin/operacao.js +35 -13
  30. package/dist/mapping/admin/operacao_item.js +5 -5
  31. package/dist/mapping/admin/operacao_pagamento.js +16 -16
  32. package/package.json +1 -1
  33. package/dist/@types/admin/ecommerce_fields.d.ts +0 -18
  34. package/dist/@types/admin/ecommerce_fields.js +0 -2
  35. package/dist/@types/admin/ecommerce_item_fields.d.ts +0 -5
  36. package/dist/@types/admin/ecommerce_item_fields.js +0 -2
  37. package/dist/@types/admin/ecommerce_item_order.d.ts +0 -5
  38. package/dist/@types/admin/ecommerce_item_order.js +0 -2
  39. package/dist/@types/admin/ecommerce_item_select.d.ts +0 -9
  40. package/dist/@types/admin/ecommerce_item_select.js +0 -2
  41. package/dist/@types/admin/ecommerce_item_update.d.ts +0 -7
  42. package/dist/@types/admin/ecommerce_item_update.js +0 -2
  43. package/dist/@types/admin/ecommerce_item_where.d.ts +0 -6
  44. package/dist/@types/admin/ecommerce_item_where.js +0 -2
  45. package/dist/@types/admin/ecommerce_order.d.ts +0 -18
  46. package/dist/@types/admin/ecommerce_order.js +0 -2
  47. package/dist/@types/admin/ecommerce_select.d.ts +0 -22
  48. package/dist/@types/admin/ecommerce_select.js +0 -2
  49. package/dist/@types/admin/ecommerce_update.d.ts +0 -20
  50. package/dist/@types/admin/ecommerce_update.js +0 -2
  51. package/dist/@types/admin/ecommerce_where.d.ts +0 -19
  52. package/dist/@types/admin/ecommerce_where.js +0 -2
  53. package/dist/class/admin/ecommerce.d.ts +0 -13
  54. package/dist/class/admin/ecommerce.js +0 -24
  55. package/dist/class/admin/ecommerce_item.d.ts +0 -13
  56. package/dist/class/admin/ecommerce_item.js +0 -24
  57. package/dist/mapping/admin/ecommerce.d.ts +0 -47
  58. package/dist/mapping/admin/ecommerce.js +0 -209
  59. package/dist/mapping/admin/ecommerce_item.d.ts +0 -27
  60. package/dist/mapping/admin/ecommerce_item.js +0 -65
@@ -1,5 +1,5 @@
1
1
  export type entidade_cartao_fields = {
2
- id_entidade_cartao?: number;
2
+ id?: number;
3
3
  last_numbers: string;
4
4
  brand: string;
5
5
  name: string;
@@ -1,5 +1,5 @@
1
1
  export type entidade_cartao_order = {
2
- id_entidade_cartao?: 'desc' | 'asc';
2
+ id?: 'desc' | 'asc';
3
3
  last_numbers?: 'desc' | 'asc';
4
4
  brand?: 'desc' | 'asc';
5
5
  name?: 'desc' | 'asc';
@@ -1,7 +1,7 @@
1
1
  import { entidade_cartao_where } from './entidade_cartao_where';
2
2
  import { entidade_cartao_order } from './entidade_cartao_order';
3
3
  export type entidade_cartao_select = {
4
- id_entidade_cartao?: number;
4
+ id?: number;
5
5
  last_numbers?: string;
6
6
  brand?: string;
7
7
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import { entidade_cartao_where } from './entidade_cartao_where';
2
2
  export type entidade_cartao_update = {
3
- id_entidade_cartao?: number;
3
+ id?: number;
4
4
  last_numbers?: string;
5
5
  brand?: string;
6
6
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import { where_number, where_string } from '../';
2
2
  export type entidade_cartao_where = {
3
- id_entidade_cartao?: where_number | number;
3
+ id?: where_number | number;
4
4
  last_numbers?: where_string | string;
5
5
  brand?: where_string | string;
6
6
  name?: where_string | string;
@@ -2,22 +2,24 @@ export type operacao_fields = {
2
2
  id?: number;
3
3
  txid?: string;
4
4
  situacao: string;
5
- cliente: number;
5
+ cliente?: number;
6
6
  transportadora?: number;
7
- valor_frete?: number;
8
- valor_seguro?: number;
9
- valor_outros?: number;
7
+ valor_frete: number;
8
+ valor_seguro: number;
9
+ valor_outros: number;
10
10
  is_frete_gratis?: boolean;
11
11
  is_consumidor_final?: boolean;
12
12
  data_hora_criacao?: Date;
13
13
  data_hora_contingencia?: Date;
14
14
  justificativa_contingencia?: string;
15
- serie: string;
16
- numero: number;
17
- natureza: string;
18
- tipo_operacao: string;
19
- destinacao: string;
20
- tipo_impressao: string;
21
- tipo_proposito: string;
22
- indicador_presenca: string;
15
+ serie?: string;
16
+ numero?: number;
17
+ natureza?: string;
18
+ tipo_operacao?: string;
19
+ destinacao?: string;
20
+ tipo_impressao?: string;
21
+ tipo_proposito?: string;
22
+ indicador_presenca?: string;
23
+ frete?: any;
24
+ etiquetas?: any;
23
25
  };
@@ -1,7 +1,7 @@
1
1
  export type operacao_item_fields = {
2
2
  id?: number;
3
3
  operacao: number;
4
- item: number;
4
+ item_variacao: number;
5
5
  quantidade: number;
6
6
  valor_unitario: number;
7
7
  valor_desconto_unitario?: number;
@@ -1,7 +1,7 @@
1
1
  export type operacao_item_order = {
2
2
  id?: 'desc' | 'asc';
3
3
  operacao?: 'desc' | 'asc';
4
- item?: 'desc' | 'asc';
4
+ item_variacao?: 'desc' | 'asc';
5
5
  quantidade?: 'desc' | 'asc';
6
6
  valor_unitario?: 'desc' | 'asc';
7
7
  valor_desconto_unitario?: 'desc' | 'asc';
@@ -3,7 +3,7 @@ import { operacao_item_order } from './operacao_item_order';
3
3
  export type operacao_item_select = {
4
4
  id?: number;
5
5
  operacao?: number;
6
- item?: number;
6
+ item_variacao?: number;
7
7
  quantidade?: number;
8
8
  valor_unitario?: number;
9
9
  valor_desconto_unitario?: number;
@@ -2,7 +2,7 @@ import { operacao_item_where } from './operacao_item_where';
2
2
  export type operacao_item_update = {
3
3
  id?: number;
4
4
  operacao?: number;
5
- item?: number;
5
+ item_variacao?: number;
6
6
  quantidade?: number;
7
7
  valor_unitario?: number;
8
8
  valor_desconto_unitario?: number;
@@ -2,7 +2,7 @@ import { where_number } from '../';
2
2
  export type operacao_item_where = {
3
3
  id?: where_number | number;
4
4
  operacao?: where_number | number;
5
- item?: where_number | number;
5
+ item_variacao?: where_number | number;
6
6
  quantidade?: where_number | number;
7
7
  valor_unitario?: where_number | number;
8
8
  valor_desconto_unitario?: where_number | number;
@@ -20,4 +20,6 @@ export type operacao_order = {
20
20
  tipo_impressao?: 'desc' | 'asc';
21
21
  tipo_proposito?: 'desc' | 'asc';
22
22
  indicador_presenca?: 'desc' | 'asc';
23
+ frete?: 'desc' | 'asc';
24
+ etiquetas?: 'desc' | 'asc';
23
25
  };
@@ -1,9 +1,8 @@
1
1
  export type operacao_pagamento_fields = {
2
2
  id?: number;
3
+ entidade_cartao?: number;
3
4
  operacao: number;
4
5
  tipo: string;
5
- bandeira: string;
6
6
  valor: number;
7
7
  txid?: string;
8
- integracao?: string;
9
8
  };
@@ -1,9 +1,8 @@
1
1
  export type operacao_pagamento_order = {
2
2
  id?: 'desc' | 'asc';
3
+ entidade_cartao?: 'desc' | 'asc';
3
4
  operacao?: 'desc' | 'asc';
4
5
  tipo?: 'desc' | 'asc';
5
- bandeira?: 'desc' | 'asc';
6
6
  valor?: 'desc' | 'asc';
7
7
  txid?: 'desc' | 'asc';
8
- integracao?: 'desc' | 'asc';
9
8
  };
@@ -2,12 +2,11 @@ import { operacao_pagamento_where } from './operacao_pagamento_where';
2
2
  import { operacao_pagamento_order } from './operacao_pagamento_order';
3
3
  export type operacao_pagamento_select = {
4
4
  id?: number;
5
+ entidade_cartao?: number;
5
6
  operacao?: number;
6
7
  tipo?: string;
7
- bandeira?: string;
8
8
  valor?: number;
9
9
  txid?: string;
10
- integracao?: string;
11
10
  where: operacao_pagamento_where;
12
11
  order?: operacao_pagamento_order;
13
12
  };
@@ -1,11 +1,10 @@
1
1
  import { operacao_pagamento_where } from './operacao_pagamento_where';
2
2
  export type operacao_pagamento_update = {
3
3
  id?: number;
4
+ entidade_cartao?: number;
4
5
  operacao?: number;
5
6
  tipo?: string;
6
- bandeira?: string;
7
7
  valor?: number;
8
8
  txid?: string;
9
- integracao?: string;
10
9
  where: operacao_pagamento_where;
11
10
  };
@@ -1,10 +1,9 @@
1
1
  import { where_number, where_string } from '../';
2
2
  export type operacao_pagamento_where = {
3
3
  id?: where_number | number;
4
+ entidade_cartao?: where_number | number;
4
5
  operacao?: where_number | number;
5
6
  tipo?: where_string | string;
6
- bandeira?: where_string | string;
7
7
  valor?: where_number | number;
8
8
  txid?: where_string | string;
9
- integracao?: where_string | string;
10
9
  };
@@ -22,6 +22,8 @@ export type operacao_select = {
22
22
  tipo_impressao?: string;
23
23
  tipo_proposito?: string;
24
24
  indicador_presenca?: string;
25
+ frete?: any;
26
+ etiquetas?: any;
25
27
  where: operacao_where;
26
28
  order?: operacao_order;
27
29
  };
@@ -21,5 +21,7 @@ export type operacao_update = {
21
21
  tipo_impressao?: string;
22
22
  tipo_proposito?: string;
23
23
  indicador_presenca?: string;
24
+ frete?: any;
25
+ etiquetas?: any;
24
26
  where: operacao_where;
25
27
  };
@@ -21,4 +21,6 @@ export type operacao_where = {
21
21
  tipo_impressao?: where_string | string;
22
22
  tipo_proposito?: where_string | string;
23
23
  indicador_presenca?: where_string | string;
24
+ frete?: any;
25
+ etiquetas?: any;
24
26
  };
@@ -1,41 +1,37 @@
1
1
  import { PoolClient } from 'pg';
2
2
  import { pool_tsx } from '../../@types';
3
- import atributo from './atributo';
3
+ import entidade from './entidade';
4
+ import item_variacao from './item_variacao';
4
5
  import operacao_pagamento from './operacao_pagamento';
6
+ import categoria from './categoria';
7
+ import operacao from './operacao';
8
+ import item_variacao_atributo from './item_variacao_atributo';
5
9
  import entidade_cartao from './entidade_cartao';
6
- import entidade_endereco from './entidade_endereco';
10
+ import atributo from './atributo';
7
11
  import operacao_item from './operacao_item';
8
- import item_variacao_atributo from './item_variacao_atributo';
12
+ import entidade_endereco from './entidade_endereco';
13
+ import item_variacao_imagem from './item_variacao_imagem';
14
+ import marca from './marca';
9
15
  import empresa from './empresa';
10
- import item from './item';
11
- import entidade from './entidade';
12
- import categoria from './categoria';
13
- import item_variacao from './item_variacao';
14
- import ecommerce from './ecommerce';
15
16
  import usuario from './usuario';
16
- import marca from './marca';
17
- import operacao from './operacao';
18
- import ecommerce_item from './ecommerce_item';
19
- import item_variacao_imagem from './item_variacao_imagem';
17
+ import item from './item';
20
18
  declare const _default: {
21
19
  query(query_string: string, query_params: Array<any>, transaction?: PoolClient | any): Promise<any>;
22
20
  transaction(callback: pool_tsx): Promise<void>;
23
- atributo: typeof atributo;
21
+ entidade: typeof entidade;
22
+ item_variacao: typeof item_variacao;
24
23
  operacao_pagamento: typeof operacao_pagamento;
24
+ categoria: typeof categoria;
25
+ operacao: typeof operacao;
26
+ item_variacao_atributo: typeof item_variacao_atributo;
25
27
  entidade_cartao: typeof entidade_cartao;
26
- entidade_endereco: typeof entidade_endereco;
28
+ atributo: typeof atributo;
27
29
  operacao_item: typeof operacao_item;
28
- item_variacao_atributo: typeof item_variacao_atributo;
30
+ entidade_endereco: typeof entidade_endereco;
31
+ item_variacao_imagem: typeof item_variacao_imagem;
32
+ marca: typeof marca;
29
33
  empresa: typeof empresa;
30
- item: typeof item;
31
- entidade: typeof entidade;
32
- categoria: typeof categoria;
33
- item_variacao: typeof item_variacao;
34
- ecommerce: typeof ecommerce;
35
34
  usuario: typeof usuario;
36
- marca: typeof marca;
37
- operacao: typeof operacao;
38
- ecommerce_item: typeof ecommerce_item;
39
- item_variacao_imagem: typeof item_variacao_imagem;
35
+ item: typeof item;
40
36
  };
41
37
  export default _default;
@@ -4,23 +4,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const database_1 = __importDefault(require("../../database"));
7
- const atributo_1 = __importDefault(require("./atributo"));
7
+ const entidade_1 = __importDefault(require("./entidade"));
8
+ const item_variacao_1 = __importDefault(require("./item_variacao"));
8
9
  const operacao_pagamento_1 = __importDefault(require("./operacao_pagamento"));
10
+ const categoria_1 = __importDefault(require("./categoria"));
11
+ const operacao_1 = __importDefault(require("./operacao"));
12
+ const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
9
13
  const entidade_cartao_1 = __importDefault(require("./entidade_cartao"));
10
- const entidade_endereco_1 = __importDefault(require("./entidade_endereco"));
14
+ const atributo_1 = __importDefault(require("./atributo"));
11
15
  const operacao_item_1 = __importDefault(require("./operacao_item"));
12
- const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
16
+ const entidade_endereco_1 = __importDefault(require("./entidade_endereco"));
17
+ const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
18
+ const marca_1 = __importDefault(require("./marca"));
13
19
  const empresa_1 = __importDefault(require("./empresa"));
14
- const item_1 = __importDefault(require("./item"));
15
- const entidade_1 = __importDefault(require("./entidade"));
16
- const categoria_1 = __importDefault(require("./categoria"));
17
- const item_variacao_1 = __importDefault(require("./item_variacao"));
18
- const ecommerce_1 = __importDefault(require("./ecommerce"));
19
20
  const usuario_1 = __importDefault(require("./usuario"));
20
- const marca_1 = __importDefault(require("./marca"));
21
- const operacao_1 = __importDefault(require("./operacao"));
22
- const ecommerce_item_1 = __importDefault(require("./ecommerce_item"));
23
- const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
21
+ const item_1 = __importDefault(require("./item"));
24
22
  exports.default = {
25
23
  async query(query_string, query_params, transaction = undefined) {
26
24
  return await database_1.default.query('admin', query_string, query_params, transaction);
@@ -28,21 +26,19 @@ exports.default = {
28
26
  async transaction(callback) {
29
27
  return await database_1.default.transaction('admin', callback);
30
28
  },
31
- atributo: atributo_1.default,
29
+ entidade: entidade_1.default,
30
+ item_variacao: item_variacao_1.default,
32
31
  operacao_pagamento: operacao_pagamento_1.default,
32
+ categoria: categoria_1.default,
33
+ operacao: operacao_1.default,
34
+ item_variacao_atributo: item_variacao_atributo_1.default,
33
35
  entidade_cartao: entidade_cartao_1.default,
34
- entidade_endereco: entidade_endereco_1.default,
36
+ atributo: atributo_1.default,
35
37
  operacao_item: operacao_item_1.default,
36
- item_variacao_atributo: item_variacao_atributo_1.default,
38
+ entidade_endereco: entidade_endereco_1.default,
39
+ item_variacao_imagem: item_variacao_imagem_1.default,
40
+ marca: marca_1.default,
37
41
  empresa: empresa_1.default,
38
- item: item_1.default,
39
- entidade: entidade_1.default,
40
- categoria: categoria_1.default,
41
- item_variacao: item_variacao_1.default,
42
- ecommerce: ecommerce_1.default,
43
42
  usuario: usuario_1.default,
44
- marca: marca_1.default,
45
- operacao: operacao_1.default,
46
- ecommerce_item: ecommerce_item_1.default,
47
- item_variacao_imagem: item_variacao_imagem_1.default
43
+ item: item_1.default
48
44
  };
@@ -21,17 +21,7 @@ declare const _default: {
21
21
  pk: boolean;
22
22
  })[];
23
23
  fathers: never[];
24
- childrens: {
25
- name: string;
26
- value: {
27
- type: string;
28
- is_null: string;
29
- maxlength: null;
30
- };
31
- fk_table: string;
32
- fk_reference: string;
33
- pk: boolean;
34
- }[];
24
+ childrens: never[];
35
25
  name: string;
36
26
  };
37
27
  export default _default;
@@ -433,18 +433,6 @@ exports.default = {
433
433
  }
434
434
  ],
435
435
  "fathers": [],
436
- "childrens": [
437
- {
438
- "name": "empresa",
439
- "value": {
440
- "type": "integer",
441
- "is_null": "NO",
442
- "maxlength": null
443
- },
444
- "fk_table": "empresa",
445
- "fk_reference": "id",
446
- "pk": false
447
- }
448
- ],
436
+ "childrens": [],
449
437
  "name": "empresa"
450
438
  };
@@ -31,7 +31,17 @@ declare const _default: {
31
31
  fk_reference: string;
32
32
  pk: boolean;
33
33
  }[];
34
- childrens: never[];
34
+ childrens: {
35
+ name: string;
36
+ value: {
37
+ type: string;
38
+ is_null: string;
39
+ maxlength: null;
40
+ };
41
+ fk_table: string;
42
+ fk_reference: string;
43
+ pk: boolean;
44
+ }[];
35
45
  name: string;
36
46
  };
37
47
  export default _default;
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  "columns": [
5
5
  {
6
- "name": "id_entidade_cartao",
6
+ "name": "id",
7
7
  "value": {
8
8
  "type": "integer",
9
9
  "is_null": "YES",
10
10
  "maxlength": null
11
11
  },
12
12
  "fk_table": "entidade_cartao",
13
- "fk_reference": "id_entidade_cartao",
13
+ "fk_reference": "id",
14
14
  "pk": true
15
15
  },
16
16
  {
@@ -82,6 +82,18 @@ exports.default = {
82
82
  "pk": false
83
83
  }
84
84
  ],
85
- "childrens": [],
85
+ "childrens": [
86
+ {
87
+ "name": "entidade_cartao",
88
+ "value": {
89
+ "type": "integer",
90
+ "is_null": "YES",
91
+ "maxlength": null
92
+ },
93
+ "fk_table": "entidade_cartao",
94
+ "fk_reference": "id",
95
+ "pk": false
96
+ }
97
+ ],
86
98
  "name": "entidade_cartao"
87
99
  };