@tec.pet/tecpet-sdk 0.0.225 → 0.0.227

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.
@@ -16,4 +16,6 @@ export interface PaAiRequiredFieldJson {
16
16
  customFieldIsRequired?: boolean;
17
17
  enabled: boolean;
18
18
  order: number;
19
+ onlyWhenEmpty: boolean;
20
+ onlyWithTakeAndBring: boolean;
19
21
  }
@@ -4,6 +4,7 @@ export declare enum AiRequiredFieldStandardKeyEnum {
4
4
  CLIENT_EMAIL = "CLIENT_EMAIL",
5
5
  CLIENT_CPF = "CLIENT_CPF",
6
6
  CLIENT_EMERGENCY_CONTACT = "CLIENT_EMERGENCY_CONTACT",
7
+ CLIENT_ADDRESS = "CLIENT_ADDRESS",
7
8
  PET_NAME = "PET_NAME",
8
9
  PET_BIRTH_DATE = "PET_BIRTH_DATE",
9
10
  PET_SPECIE = "PET_SPECIE",
@@ -8,6 +8,7 @@ var AiRequiredFieldStandardKeyEnum;
8
8
  AiRequiredFieldStandardKeyEnum["CLIENT_EMAIL"] = "CLIENT_EMAIL";
9
9
  AiRequiredFieldStandardKeyEnum["CLIENT_CPF"] = "CLIENT_CPF";
10
10
  AiRequiredFieldStandardKeyEnum["CLIENT_EMERGENCY_CONTACT"] = "CLIENT_EMERGENCY_CONTACT";
11
+ AiRequiredFieldStandardKeyEnum["CLIENT_ADDRESS"] = "CLIENT_ADDRESS";
11
12
  AiRequiredFieldStandardKeyEnum["PET_NAME"] = "PET_NAME";
12
13
  AiRequiredFieldStandardKeyEnum["PET_BIRTH_DATE"] = "PET_BIRTH_DATE";
13
14
  AiRequiredFieldStandardKeyEnum["PET_SPECIE"] = "PET_SPECIE";
@@ -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: string;
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
- source?: string;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.225",
3
+ "version": "0.0.227",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",