@nomalism-com/types 0.34.3 → 0.34.5

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.
@@ -6,10 +6,6 @@ export const Route = 'schedule_print_job';
6
6
  export const UpperName = 'SchedulePrintJob';
7
7
  export const LowerName = UpperName[0].toLowerCase() + UpperName.substring(1);
8
8
 
9
- export interface IDispatchSchedulePrintJobRequest {
10
- computer_id: string;
11
- last_print_job_ids: string[];
12
- }
13
9
  export interface ICreateSchedulePrintJobRequest {
14
10
  printer_id: string;
15
11
  copies: number;
@@ -17,9 +13,16 @@ export interface ICreateSchedulePrintJobRequest {
17
13
  external_document_id?: string | undefined;
18
14
  external_url?: string | undefined;
19
15
  }
16
+
20
17
  export interface ICreateManySchedulePrintJobRequest {
21
18
  jobs: ICreateSchedulePrintJobRequest[];
22
19
  }
20
+
21
+ export interface IDispatchSchedulePrintJobRequest {
22
+ computer_id: string;
23
+ last_print_job_ids: string[];
24
+ }
25
+
23
26
  export interface IDispatchSchedulePrintJobResponse {
24
27
  npc_id: string;
25
28
  secret?: string | null;
@@ -42,4 +45,3 @@ export interface IRepository {
42
45
  deleteOne: (params: IShared.IFindByIdRequest) => Promise<void>;
43
46
  }
44
47
  export type IController = IShared.IEntityWithUserToken<IRepository>;
45
- export type IApi = IRepository;
@@ -11,6 +11,7 @@ import {
11
11
  import * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
12
12
  import { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces';
13
13
  import { IProductType } from '../../stock/productGoogleSheets/interface';
14
+ import type { IGetProductType, IGetProductGroup } from '../../integration/googleSheets/interfaces';
14
15
 
15
16
  export type Entity = DocumentLine;
16
17
  export const Route = 'documentLine';
@@ -45,13 +46,6 @@ export type IDataKeys =
45
46
  | 'Devolucao Cliente' // Parcela re-entrou por motivos de devolução de cliente, a nova linha tem esta chave para guardar informação da fatura de origem
46
47
  // recibo
47
48
  | 'Recibo do documento' // Usado por linhas de recibo para indicar a fatura relacionada
48
- // estado de linha
49
- | 'Cancelar' // Linha cancelada
50
- // wildcard provider
51
- | 'OriginalProductId' // Usado quando é associado um fornecedor a um artigo de fornecedor indefinido e caso seja necessário voltar atrás
52
- // sheets
53
- | 'imported_from_sheets' // Usado para indicar que linha foi importada do sheets
54
- | 'sheets_line_position' // Usado para indicar a posição da linha no sheets
55
49
  // moloni retry
56
50
  | 'Emitir' // Foi solicitada a emissão de documento externo manualmente
57
51
  | 'Backup PDF' // Foi solicitado o backup do PDF externo manualmente
@@ -75,6 +69,13 @@ export interface IDataPayload {
75
69
 
76
70
  export type IData = { [K in IDataKeys]?: IDataPayload };
77
71
 
72
+ export interface IImportedFromSheets {
73
+ type: IGetProductType;
74
+ group: IGetProductGroup;
75
+ index: number;
76
+ reference: string;
77
+ }
78
+
78
79
  export interface IDataDocumentoPago {
79
80
  name: string;
80
81
  dh_id: string;
@@ -169,6 +170,7 @@ export interface IUpdateManyRequest {
169
170
  provider_estimated_delivery_date?: Date | null;
170
171
  provider_purchase_discount?: number;
171
172
  consignacao?: boolean;
173
+ cancelled?: boolean;
172
174
  }
173
175
 
174
176
  export interface IUpdateManyByDocumentHeaderRequest {
@@ -82,6 +82,7 @@ const updateManyKeys: IShared.IRouteRequest<IUpdateManyRequest> = {
82
82
  provider_estimated_delivery_date: joi.date().allow(null, '').optional(),
83
83
  provider_purchase_discount: joi.number().positive().allow(0).max(100).optional(),
84
84
  consignacao: joi.boolean().optional(),
85
+ cancelled: joi.boolean().optional(),
85
86
  };
86
87
 
87
88
  export const updateManyBody = joi.object().keys(updateManyKeys).messages(messages);
@@ -12,6 +12,7 @@ import {
12
12
  IDataDocumentoPago,
13
13
  IDataPagamento,
14
14
  IPromotions,
15
+ type IImportedFromSheets,
15
16
  } from '../../modules/supply/documentLine/interfaces';
16
17
  import { IPhcDocumentType } from '../../modules/supply/clientCurrentAccount/interfaces';
17
18
  import { ISavedEmPickingData } from '../../modules/stock/savedEmPicking/interfaces';
@@ -369,6 +370,9 @@ export type DocumentLine = {
369
370
  document_line_group_id: string;
370
371
  index: number;
371
372
  data: IData;
373
+ cancelled: boolean;
374
+ original_product_id: string | null;
375
+ imported_from_sheets: IImportedFromSheets | {};
372
376
  quantity: number;
373
377
  preco_custo: number;
374
378
  provider_discount: number;
@@ -899,8 +903,6 @@ export type DocumentLineVirtuals = {
899
903
  stock_in: boolean;
900
904
  stock_out: boolean;
901
905
  conferir_encomenda: string | null;
902
- original_product_id: string | null;
903
- imported_from_sheets: boolean;
904
906
  // document flags
905
907
  purchased_from_provider: boolean;
906
908
  pending_return_to_provider: boolean;