@tec.pet/tecpet-sdk 0.0.225 → 0.0.226
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.
- package/dist/domain/integrationInvoice/dto/pa.edit-integration-invoice.dto.d.ts +13 -0
- package/dist/domain/integrationInvoice/dto/pa.get-integration-invoice.dto.d.ts +14 -1
- package/dist/domain/integrationShop/dto/pa.get-integration-shop-by-shop-id.dto.d.ts +8 -0
- package/dist/domain/integrationShop/dto/pa.get-integration-shop-by-shop-id.dto.js +7 -0
- package/dist/domain/invoice/dto/pa.reverse-invoice-receivable-payment.dto.d.ts +5 -1
- package/package.json +1 -1
|
@@ -40,6 +40,8 @@ export interface PaEditIntegrationInvoiceRequest {
|
|
|
40
40
|
status?: IntegrationInvoiceStatusType;
|
|
41
41
|
externId?: string;
|
|
42
42
|
externReference?: string;
|
|
43
|
+
/** Número do documento como o lojista vê no ERP. */
|
|
44
|
+
externNumber?: string;
|
|
43
45
|
nfId?: string;
|
|
44
46
|
reference?: number;
|
|
45
47
|
value?: number;
|
|
@@ -63,6 +65,14 @@ export interface IntegrationInvoiceSourceTransactionResponse {
|
|
|
63
65
|
paymentMethodType?: string;
|
|
64
66
|
installments?: number;
|
|
65
67
|
value?: number;
|
|
68
|
+
/** Data do pagamento. */
|
|
69
|
+
date?: string;
|
|
70
|
+
/** Chave do ERP gravada no pagamento (`externalPaymentId` do PDV ou id do contas a receber). */
|
|
71
|
+
externalId?: string | null;
|
|
72
|
+
/** Sempre `CONFIRMED`: a leitura só traz transações confirmadas e ativas. */
|
|
73
|
+
status?: 'CONFIRMED' | 'CANCELED';
|
|
74
|
+
type?: 'IN' | 'OUT';
|
|
75
|
+
/** @deprecated o server nunca devolveu este campo; usar `date`. */
|
|
66
76
|
createdAt?: string;
|
|
67
77
|
}
|
|
68
78
|
export interface IntegrationInvoiceSourceInvoiceResponse {
|
|
@@ -74,6 +84,8 @@ export interface IntegrationInvoiceSourceInvoiceResponse {
|
|
|
74
84
|
totalValue?: number;
|
|
75
85
|
paidValue?: number;
|
|
76
86
|
unpaidValue?: number;
|
|
87
|
+
/** Id do documento financeiro da fatura no ERP (ex.: título da Omie), gravado por `invoice.editExternId`. */
|
|
88
|
+
externId?: string | null;
|
|
77
89
|
booking?: {
|
|
78
90
|
id: number;
|
|
79
91
|
} | null;
|
|
@@ -112,6 +124,7 @@ export interface IntegrationInvoiceResponse {
|
|
|
112
124
|
closed: boolean;
|
|
113
125
|
externId?: string;
|
|
114
126
|
externReference?: string;
|
|
127
|
+
externNumber?: string;
|
|
115
128
|
nfId?: string;
|
|
116
129
|
value: number;
|
|
117
130
|
clientName?: string;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ApiIntegrationType } from '../../integrationShop/dto/pa.get-integration-shop-by-login.dto';
|
|
2
|
+
import { IntegrationInvoiceStatusType } from './pa.edit-integration-invoice.dto';
|
|
3
|
+
/**
|
|
4
|
+
* Com `invoice`: documentos da fatura. Sem `invoice`: documentos da loja do `x-shop`, exige `status` ou
|
|
5
|
+
* `updatedAfter`, do mais antigo para o mais novo por `updatedAt`. Página seguinte: `updatedAfter` = `updatedAt`
|
|
6
|
+
* e `afterId` = `id` do último documento recebido.
|
|
7
|
+
*/
|
|
2
8
|
export interface PaGetIntegrationInvoiceRequest {
|
|
3
|
-
invoice
|
|
9
|
+
invoice?: string;
|
|
4
10
|
type?: ApiIntegrationType;
|
|
5
11
|
integrationShopId?: number;
|
|
12
|
+
/** Lista separada por vírgula na query (ex.: `ISSUED,INTEGRATED`). */
|
|
13
|
+
status?: IntegrationInvoiceStatusType[] | string;
|
|
14
|
+
/** ISO 8601. */
|
|
15
|
+
updatedAfter?: string;
|
|
16
|
+
afterId?: string;
|
|
17
|
+
/** Padrão 100, máximo 200. */
|
|
18
|
+
limit?: number;
|
|
6
19
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ApiIntegrationType } from './pa.get-integration-shop-by-login.dto';
|
|
2
|
+
import { IntegrationInvoiceArchitecture, PaIntegrationShopFeatures } from './pa.edit-integration-shop.dto';
|
|
2
3
|
export declare class PaGetIntegrationShopByShopIdResponse {
|
|
3
4
|
shopId: number;
|
|
4
5
|
shopName: string;
|
|
5
6
|
integrationShopId: number;
|
|
6
7
|
integrationShopType: ApiIntegrationType;
|
|
7
8
|
chainId: string | null;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
mode?: 'WHITE_LABEL' | 'RESELLER' | 'DIRECT' | 'CHAIN';
|
|
11
|
+
invoiceArchitecture?: IntegrationInvoiceArchitecture;
|
|
12
|
+
pdvPayment?: boolean;
|
|
13
|
+
features?: PaIntegrationShopFeatures | null;
|
|
14
|
+
/** Só para o token interno da tecpet. */
|
|
15
|
+
customWebhookUrl?: string | null;
|
|
8
16
|
}
|
|
@@ -7,5 +7,12 @@ class PaGetIntegrationShopByShopIdResponse {
|
|
|
7
7
|
integrationShopId;
|
|
8
8
|
integrationShopType;
|
|
9
9
|
chainId;
|
|
10
|
+
enabled;
|
|
11
|
+
mode;
|
|
12
|
+
invoiceArchitecture;
|
|
13
|
+
pdvPayment;
|
|
14
|
+
features;
|
|
15
|
+
/** Só para o token interno da tecpet. */
|
|
16
|
+
customWebhookUrl;
|
|
10
17
|
}
|
|
11
18
|
exports.PaGetIntegrationShopByShopIdResponse = PaGetIntegrationShopByShopIdResponse;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface PaReverseInvoiceReceivablePaymentRequest {
|
|
2
2
|
currentAmount: number;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* ERP de origem, devolvido como `source` no webhook de nota (anti-loop). `OMIE` exige `shopId`, não refaz os
|
|
5
|
+
* documentos da fatura no ERP e põe "(Omie)" no histórico do cancelamento.
|
|
6
|
+
*/
|
|
7
|
+
source?: 'VHSYS_RECEIVABLE' | 'OMIE' | (string & {});
|
|
4
8
|
/** Loja da fatura: o server só procura a transação nessa loja (externalId não é único entre lojas). */
|
|
5
9
|
shopId?: number;
|
|
6
10
|
}
|