pg-manipulator 1.0.59 → 1.0.60

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.
@@ -25,4 +25,5 @@ export type item_fields = {
25
25
  destaque?: boolean;
26
26
  tempo_base?: number;
27
27
  material_base?: number;
28
+ estoque?: number;
28
29
  };
@@ -25,4 +25,5 @@ export type item_order = {
25
25
  destaque?: 'desc' | 'asc';
26
26
  tempo_base?: 'desc' | 'asc';
27
27
  material_base?: 'desc' | 'asc';
28
+ estoque?: 'desc' | 'asc';
28
29
  };
@@ -27,6 +27,7 @@ export type item_select = {
27
27
  destaque?: boolean;
28
28
  tempo_base?: number;
29
29
  material_base?: number;
30
+ estoque?: number;
30
31
  where: item_where;
31
32
  order?: item_order;
32
33
  };
@@ -26,5 +26,6 @@ export type item_update = {
26
26
  destaque?: boolean;
27
27
  tempo_base?: number;
28
28
  material_base?: number;
29
+ estoque?: number;
29
30
  where: item_where;
30
31
  };
@@ -26,4 +26,5 @@ export type item_where = {
26
26
  destaque?: where_boolean | boolean;
27
27
  tempo_base?: where_number | number;
28
28
  material_base?: where_number | number;
29
+ estoque?: where_number | number;
29
30
  };
@@ -1,37 +1,37 @@
1
1
  import { PoolClient } from 'pg';
2
2
  import { pool_tsx } from '../../@types';
3
+ import marca from './marca';
4
+ import operacao from './operacao';
5
+ import atributo from './atributo';
6
+ import usuario from './usuario';
7
+ import item_variacao_imagem from './item_variacao_imagem';
3
8
  import entidade_endereco from './entidade_endereco';
4
- import item_variacao from './item_variacao';
5
- import entidade from './entidade';
9
+ import item_variacao_atributo from './item_variacao_atributo';
10
+ import empresa from './empresa';
6
11
  import operacao_pagamento from './operacao_pagamento';
7
- import item from './item';
12
+ import entidade from './entidade';
13
+ import entidade_cartao from './entidade_cartao';
14
+ import item_variacao from './item_variacao';
8
15
  import categoria from './categoria';
9
- import usuario from './usuario';
10
- import item_variacao_atributo from './item_variacao_atributo';
11
16
  import operacao_item from './operacao_item';
12
- import entidade_cartao from './entidade_cartao';
13
- import atributo from './atributo';
14
- import marca from './marca';
15
- import empresa from './empresa';
16
- import item_variacao_imagem from './item_variacao_imagem';
17
- import operacao from './operacao';
17
+ import item from './item';
18
18
  declare const _default: {
19
19
  query(query_string: string, query_params: Array<any>, transaction?: PoolClient | any): Promise<any>;
20
20
  transaction(callback: pool_tsx): Promise<void>;
21
+ marca: typeof marca;
22
+ operacao: typeof operacao;
23
+ atributo: typeof atributo;
24
+ usuario: typeof usuario;
25
+ item_variacao_imagem: typeof item_variacao_imagem;
21
26
  entidade_endereco: typeof entidade_endereco;
22
- item_variacao: typeof item_variacao;
23
- entidade: typeof entidade;
27
+ item_variacao_atributo: typeof item_variacao_atributo;
28
+ empresa: typeof empresa;
24
29
  operacao_pagamento: typeof operacao_pagamento;
25
- item: typeof item;
30
+ entidade: typeof entidade;
31
+ entidade_cartao: typeof entidade_cartao;
32
+ item_variacao: typeof item_variacao;
26
33
  categoria: typeof categoria;
27
- usuario: typeof usuario;
28
- item_variacao_atributo: typeof item_variacao_atributo;
29
34
  operacao_item: typeof operacao_item;
30
- entidade_cartao: typeof entidade_cartao;
31
- atributo: typeof atributo;
32
- marca: typeof marca;
33
- empresa: typeof empresa;
34
- item_variacao_imagem: typeof item_variacao_imagem;
35
- operacao: typeof operacao;
35
+ item: typeof item;
36
36
  };
37
37
  export default _default;
@@ -4,21 +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 marca_1 = __importDefault(require("./marca"));
8
+ const operacao_1 = __importDefault(require("./operacao"));
9
+ const atributo_1 = __importDefault(require("./atributo"));
10
+ const usuario_1 = __importDefault(require("./usuario"));
11
+ const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
7
12
  const entidade_endereco_1 = __importDefault(require("./entidade_endereco"));
8
- const item_variacao_1 = __importDefault(require("./item_variacao"));
9
- const entidade_1 = __importDefault(require("./entidade"));
13
+ const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
14
+ const empresa_1 = __importDefault(require("./empresa"));
10
15
  const operacao_pagamento_1 = __importDefault(require("./operacao_pagamento"));
11
- const item_1 = __importDefault(require("./item"));
16
+ const entidade_1 = __importDefault(require("./entidade"));
17
+ const entidade_cartao_1 = __importDefault(require("./entidade_cartao"));
18
+ const item_variacao_1 = __importDefault(require("./item_variacao"));
12
19
  const categoria_1 = __importDefault(require("./categoria"));
13
- const usuario_1 = __importDefault(require("./usuario"));
14
- const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
15
20
  const operacao_item_1 = __importDefault(require("./operacao_item"));
16
- const entidade_cartao_1 = __importDefault(require("./entidade_cartao"));
17
- const atributo_1 = __importDefault(require("./atributo"));
18
- const marca_1 = __importDefault(require("./marca"));
19
- const empresa_1 = __importDefault(require("./empresa"));
20
- const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
21
- const operacao_1 = __importDefault(require("./operacao"));
21
+ const item_1 = __importDefault(require("./item"));
22
22
  exports.default = {
23
23
  async query(query_string, query_params, transaction = undefined) {
24
24
  return await database_1.default.query('admin', query_string, query_params, transaction);
@@ -26,19 +26,19 @@ exports.default = {
26
26
  async transaction(callback) {
27
27
  return await database_1.default.transaction('admin', callback);
28
28
  },
29
+ marca: marca_1.default,
30
+ operacao: operacao_1.default,
31
+ atributo: atributo_1.default,
32
+ usuario: usuario_1.default,
33
+ item_variacao_imagem: item_variacao_imagem_1.default,
29
34
  entidade_endereco: entidade_endereco_1.default,
30
- item_variacao: item_variacao_1.default,
31
- entidade: entidade_1.default,
35
+ item_variacao_atributo: item_variacao_atributo_1.default,
36
+ empresa: empresa_1.default,
32
37
  operacao_pagamento: operacao_pagamento_1.default,
33
- item: item_1.default,
38
+ entidade: entidade_1.default,
39
+ entidade_cartao: entidade_cartao_1.default,
40
+ item_variacao: item_variacao_1.default,
34
41
  categoria: categoria_1.default,
35
- usuario: usuario_1.default,
36
- item_variacao_atributo: item_variacao_atributo_1.default,
37
42
  operacao_item: operacao_item_1.default,
38
- entidade_cartao: entidade_cartao_1.default,
39
- atributo: atributo_1.default,
40
- marca: marca_1.default,
41
- empresa: empresa_1.default,
42
- item_variacao_imagem: item_variacao_imagem_1.default,
43
- operacao: operacao_1.default
43
+ item: item_1.default
44
44
  };
@@ -160,10 +160,10 @@ exports.default = {
160
160
  "pk": false
161
161
  },
162
162
  {
163
- "name": "transportadora",
163
+ "name": "id_entidade",
164
164
  "value": {
165
165
  "type": "integer",
166
- "is_null": "YES",
166
+ "is_null": "NO",
167
167
  "maxlength": null
168
168
  },
169
169
  "fk_table": "entidade",
@@ -171,10 +171,10 @@ exports.default = {
171
171
  "pk": false
172
172
  },
173
173
  {
174
- "name": "id_entidade",
174
+ "name": "transportadora",
175
175
  "value": {
176
176
  "type": "integer",
177
- "is_null": "NO",
177
+ "is_null": "YES",
178
178
  "maxlength": null
179
179
  },
180
180
  "fk_table": "entidade",
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- entidade_endereco: {
2
+ marca: {
3
3
  columns: ({
4
4
  name: string;
5
5
  value: {
@@ -21,17 +21,7 @@ declare const _default: {
21
21
  fk_reference: null;
22
22
  pk: boolean;
23
23
  })[];
24
- fathers: {
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
+ fathers: never[];
35
25
  childrens: {
36
26
  name: string;
37
27
  value: {
@@ -45,7 +35,7 @@ declare const _default: {
45
35
  }[];
46
36
  name: string;
47
37
  };
48
- item_variacao: {
38
+ operacao: {
49
39
  columns: ({
50
40
  name: string;
51
41
  value: {
@@ -91,7 +81,7 @@ declare const _default: {
91
81
  }[];
92
82
  name: string;
93
83
  };
94
- entidade: {
84
+ atributo: {
95
85
  columns: ({
96
86
  name: string;
97
87
  value: {
@@ -127,7 +117,33 @@ declare const _default: {
127
117
  }[];
128
118
  name: string;
129
119
  };
130
- operacao_pagamento: {
120
+ usuario: {
121
+ columns: ({
122
+ name: string;
123
+ value: {
124
+ type: string;
125
+ is_null: string;
126
+ maxlength: null;
127
+ };
128
+ fk_table: string;
129
+ fk_reference: string;
130
+ pk: boolean;
131
+ } | {
132
+ name: string;
133
+ value: {
134
+ type: string;
135
+ is_null: string;
136
+ maxlength: null;
137
+ };
138
+ fk_table: null;
139
+ fk_reference: null;
140
+ pk: boolean;
141
+ })[];
142
+ fathers: never[];
143
+ childrens: never[];
144
+ name: string;
145
+ };
146
+ item_variacao_imagem: {
131
147
  columns: ({
132
148
  name: string;
133
149
  value: {
@@ -163,7 +179,7 @@ declare const _default: {
163
179
  childrens: never[];
164
180
  name: string;
165
181
  };
166
- item: {
182
+ entidade_endereco: {
167
183
  columns: ({
168
184
  name: string;
169
185
  value: {
@@ -209,8 +225,8 @@ declare const _default: {
209
225
  }[];
210
226
  name: string;
211
227
  };
212
- categoria: {
213
- columns: ({
228
+ item_variacao_atributo: {
229
+ columns: {
214
230
  name: string;
215
231
  value: {
216
232
  type: string;
@@ -220,19 +236,8 @@ declare const _default: {
220
236
  fk_table: string;
221
237
  fk_reference: string;
222
238
  pk: boolean;
223
- } | {
224
- name: string;
225
- value: {
226
- type: string;
227
- is_null: string;
228
- maxlength: null;
229
- };
230
- fk_table: null;
231
- fk_reference: null;
232
- pk: boolean;
233
- })[];
234
- fathers: never[];
235
- childrens: {
239
+ }[];
240
+ fathers: {
236
241
  name: string;
237
242
  value: {
238
243
  type: string;
@@ -243,9 +248,10 @@ declare const _default: {
243
248
  fk_reference: string;
244
249
  pk: boolean;
245
250
  }[];
251
+ childrens: never[];
246
252
  name: string;
247
253
  };
248
- usuario: {
254
+ empresa: {
249
255
  columns: ({
250
256
  name: string;
251
257
  value: {
@@ -271,8 +277,8 @@ declare const _default: {
271
277
  childrens: never[];
272
278
  name: string;
273
279
  };
274
- item_variacao_atributo: {
275
- columns: {
280
+ operacao_pagamento: {
281
+ columns: ({
276
282
  name: string;
277
283
  value: {
278
284
  type: string;
@@ -282,7 +288,17 @@ declare const _default: {
282
288
  fk_table: string;
283
289
  fk_reference: string;
284
290
  pk: boolean;
285
- }[];
291
+ } | {
292
+ name: string;
293
+ value: {
294
+ type: string;
295
+ is_null: string;
296
+ maxlength: null;
297
+ };
298
+ fk_table: null;
299
+ fk_reference: null;
300
+ pk: boolean;
301
+ })[];
286
302
  fathers: {
287
303
  name: string;
288
304
  value: {
@@ -297,7 +313,7 @@ declare const _default: {
297
313
  childrens: never[];
298
314
  name: string;
299
315
  };
300
- operacao_item: {
316
+ entidade: {
301
317
  columns: ({
302
318
  name: string;
303
319
  value: {
@@ -319,7 +335,8 @@ declare const _default: {
319
335
  fk_reference: null;
320
336
  pk: boolean;
321
337
  })[];
322
- fathers: {
338
+ fathers: never[];
339
+ childrens: {
323
340
  name: string;
324
341
  value: {
325
342
  type: string;
@@ -330,7 +347,6 @@ declare const _default: {
330
347
  fk_reference: string;
331
348
  pk: boolean;
332
349
  }[];
333
- childrens: never[];
334
350
  name: string;
335
351
  };
336
352
  entidade_cartao: {
@@ -379,7 +395,7 @@ declare const _default: {
379
395
  }[];
380
396
  name: string;
381
397
  };
382
- atributo: {
398
+ item_variacao: {
383
399
  columns: ({
384
400
  name: string;
385
401
  value: {
@@ -401,7 +417,17 @@ declare const _default: {
401
417
  fk_reference: null;
402
418
  pk: boolean;
403
419
  })[];
404
- fathers: never[];
420
+ fathers: {
421
+ name: string;
422
+ value: {
423
+ type: string;
424
+ is_null: string;
425
+ maxlength: null;
426
+ };
427
+ fk_table: string;
428
+ fk_reference: string;
429
+ pk: boolean;
430
+ }[];
405
431
  childrens: {
406
432
  name: string;
407
433
  value: {
@@ -415,7 +441,7 @@ declare const _default: {
415
441
  }[];
416
442
  name: string;
417
443
  };
418
- marca: {
444
+ categoria: {
419
445
  columns: ({
420
446
  name: string;
421
447
  value: {
@@ -451,33 +477,7 @@ declare const _default: {
451
477
  }[];
452
478
  name: string;
453
479
  };
454
- empresa: {
455
- columns: ({
456
- name: string;
457
- value: {
458
- type: string;
459
- is_null: string;
460
- maxlength: null;
461
- };
462
- fk_table: string;
463
- fk_reference: string;
464
- pk: boolean;
465
- } | {
466
- name: string;
467
- value: {
468
- type: string;
469
- is_null: string;
470
- maxlength: null;
471
- };
472
- fk_table: null;
473
- fk_reference: null;
474
- pk: boolean;
475
- })[];
476
- fathers: never[];
477
- childrens: never[];
478
- name: string;
479
- };
480
- item_variacao_imagem: {
480
+ operacao_item: {
481
481
  columns: ({
482
482
  name: string;
483
483
  value: {
@@ -513,7 +513,7 @@ declare const _default: {
513
513
  childrens: never[];
514
514
  name: string;
515
515
  };
516
- operacao: {
516
+ item: {
517
517
  columns: ({
518
518
  name: string;
519
519
  value: {
@@ -3,35 +3,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const marca_1 = __importDefault(require("./marca"));
7
+ const operacao_1 = __importDefault(require("./operacao"));
8
+ const atributo_1 = __importDefault(require("./atributo"));
9
+ const usuario_1 = __importDefault(require("./usuario"));
10
+ const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
6
11
  const entidade_endereco_1 = __importDefault(require("./entidade_endereco"));
7
- const item_variacao_1 = __importDefault(require("./item_variacao"));
8
- const entidade_1 = __importDefault(require("./entidade"));
12
+ const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
13
+ const empresa_1 = __importDefault(require("./empresa"));
9
14
  const operacao_pagamento_1 = __importDefault(require("./operacao_pagamento"));
10
- const item_1 = __importDefault(require("./item"));
15
+ const entidade_1 = __importDefault(require("./entidade"));
16
+ const entidade_cartao_1 = __importDefault(require("./entidade_cartao"));
17
+ const item_variacao_1 = __importDefault(require("./item_variacao"));
11
18
  const categoria_1 = __importDefault(require("./categoria"));
12
- const usuario_1 = __importDefault(require("./usuario"));
13
- const item_variacao_atributo_1 = __importDefault(require("./item_variacao_atributo"));
14
19
  const operacao_item_1 = __importDefault(require("./operacao_item"));
15
- const entidade_cartao_1 = __importDefault(require("./entidade_cartao"));
16
- const atributo_1 = __importDefault(require("./atributo"));
17
- const marca_1 = __importDefault(require("./marca"));
18
- const empresa_1 = __importDefault(require("./empresa"));
19
- const item_variacao_imagem_1 = __importDefault(require("./item_variacao_imagem"));
20
- const operacao_1 = __importDefault(require("./operacao"));
20
+ const item_1 = __importDefault(require("./item"));
21
21
  exports.default = {
22
+ marca: marca_1.default,
23
+ operacao: operacao_1.default,
24
+ atributo: atributo_1.default,
25
+ usuario: usuario_1.default,
26
+ item_variacao_imagem: item_variacao_imagem_1.default,
22
27
  entidade_endereco: entidade_endereco_1.default,
23
- item_variacao: item_variacao_1.default,
24
- entidade: entidade_1.default,
28
+ item_variacao_atributo: item_variacao_atributo_1.default,
29
+ empresa: empresa_1.default,
25
30
  operacao_pagamento: operacao_pagamento_1.default,
26
- item: item_1.default,
31
+ entidade: entidade_1.default,
32
+ entidade_cartao: entidade_cartao_1.default,
33
+ item_variacao: item_variacao_1.default,
27
34
  categoria: categoria_1.default,
28
- usuario: usuario_1.default,
29
- item_variacao_atributo: item_variacao_atributo_1.default,
30
35
  operacao_item: operacao_item_1.default,
31
- entidade_cartao: entidade_cartao_1.default,
32
- atributo: atributo_1.default,
33
- marca: marca_1.default,
34
- empresa: empresa_1.default,
35
- item_variacao_imagem: item_variacao_imagem_1.default,
36
- operacao: operacao_1.default
36
+ item: item_1.default
37
37
  };
@@ -287,6 +287,17 @@ exports.default = {
287
287
  "fk_table": null,
288
288
  "fk_reference": null,
289
289
  "pk": false
290
+ },
291
+ {
292
+ "name": "estoque",
293
+ "value": {
294
+ "type": "integer",
295
+ "is_null": "YES",
296
+ "maxlength": null
297
+ },
298
+ "fk_table": null,
299
+ "fk_reference": null,
300
+ "pk": false
290
301
  }
291
302
  ],
292
303
  "fathers": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-manipulator",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "postgresql database handler",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",