kommo-aiatende-api 1.0.1 → 1.1.0
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/README.md +76 -57
- package/dist/index.d.mts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +150 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +146 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Kommo API SDK (V4) 🚀
|
|
2
2
|
|
|
3
|
-
SDK moderno, resiliente e **totalmente tipado** em TypeScript para a API V4 da [Kommo CRM](https://kommo.com).
|
|
4
|
-
|
|
3
|
+
SDK moderno, robusto, resiliente e **totalmente tipado** em TypeScript para a API V4 da [Kommo CRM](https://kommo.com). Desenhado para remover o atrito na comunicação com a API da Kommo, encapsulando vulnerabilidades e oferecendo uma experiência de desenvolvedor (DX) premium com IntelliSense nativo.
|
|
5
4
|
|
|
6
5
|
## 📦 Instalação
|
|
7
6
|
|
|
@@ -13,100 +12,118 @@ yarn add kommo-aiatende-api
|
|
|
13
12
|
pnpm add kommo-aiatende-api
|
|
14
13
|
```
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Esta biblioteca foi desenhada com alto nível de rigor às complexidades da documentação da Kommo, encapsulando vulnerabilidades e garantindo auto-complete puro via Typescript (IntelliSense) em centenas de propriedades:
|
|
15
|
+
---
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
## 🛠 Funcionalidades e Mapeamento
|
|
18
|
+
Um dos grandes diferenciais desta biblioteca é a padronização das inconsistências da Documentação da Kommo.
|
|
19
|
+
Abaixo está o **Escopo Padrão de 100% de Cobertura** implementado no cliente:
|
|
20
|
+
|
|
21
|
+
- [x] **Leads**, **Contatos** e **Empresas**: CRUD completo.
|
|
22
|
+
- [x] **Unsorted (Caixa de Entrada)**: Aceitação, recusa e linkagem para pipelines.
|
|
23
|
+
- [x] **Pipelines e Status (Estágios)**: Gestão de funis incluindo cores RGB validadas.
|
|
24
|
+
- [x] **Campos Personalizados (Custom Fields & Groups)**: Tratamento tipado para Enum types e Multitexts.
|
|
25
|
+
- [x] **Usuários e Funções (Roles)**: Suporte a Rights Limits estruturados.
|
|
26
|
+
- [x] **Tarefas (Tasks)** e **Anotações (Notes)**: Automação completa do CRM interno com tratamento de `result` textuais da V4.
|
|
27
|
+
- [x] **Eventos (Events)**: Log System com `value_after` e `value_before` tipados via polimorfismo.
|
|
28
|
+
- [x] **Catálogos / Elements (Lists)**.
|
|
29
|
+
- [x] **Vínculos (Links)**: Associações entre leads/contacts e validações pre-flight no backend para evitar BadRequests de Filtros cruzados falhos.
|
|
30
|
+
- [x] **Tags (Etiquetas)**: Validadores de Hex-colors forçados apenas para Entidades suportadas (Leads).
|
|
31
|
+
- [x] **Modelos (Chat Templates / WABA)**: Gestão global do WABA (Meta API), submissão de Reviews, Modificações de status com proteções (templates WABA só alteram em caso de "draft").
|
|
32
|
+
- [x] **Webhooks**: Gerenciamento completo com a particularidade do Delete HTTP baseado em URL `destination`, ao invés de ID.
|
|
33
|
+
- [x] **Fontes (Sources) & WebButtons**: Divisão arquitetural correta, para gestão robusta dos fluxos Frontend x Backend da sua I.A.
|
|
34
|
+
- [x] **Salesbots**: Pre-flight de rate Limits bloqueando envio massivo maior que `100 bots` por fila e aviso em botões longos no DOM Mobile.
|
|
35
|
+
- [x] **Files API & CDN**: Gerenciamento binário multi-part estruturado e fallback nativo na resposta inconsistente dos "Arrays brutos e Embedded JSONs". Separação do uso da infra `v1.0` de Drive, e da Infra `api/v4` de anexos de entidade.
|
|
32
36
|
|
|
37
|
+
---
|
|
33
38
|
|
|
34
|
-
## 🚀 Configuração Básica
|
|
39
|
+
## 🚀 Configuração Básica e Autenticação
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
A biblioteca gerencia toda a serialização do Body JSON e QueryStrings, bastando que você cuide do seu Token Bearer.
|
|
37
42
|
|
|
38
43
|
```typescript
|
|
39
44
|
import { KommoClient } from 'kommo-aiatende-api';
|
|
40
45
|
|
|
41
46
|
const client = new KommoClient({
|
|
42
|
-
domain: 'meudominio', // Não inclua ".kommo.com", apenas o subdomínio!
|
|
47
|
+
domain: 'meudominio', // Não inclua ".kommo.com", apenas o subdomínio base!
|
|
43
48
|
accessToken: 'SEU_BEARER_TOKEN_AQUI'
|
|
44
49
|
});
|
|
50
|
+
|
|
51
|
+
// Acessando as entidades - Exemplo de GET simples com Paginação
|
|
52
|
+
const { _embedded: { leads }, _page } = await client.leads.list({
|
|
53
|
+
limit: 50,
|
|
54
|
+
page: 2,
|
|
55
|
+
with: 'contacts' // O Auto-complete trará quais parâmetros `with` a SDK suporta.
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
console.log(`Buscando a pagina ${ _page }. Total de leads recebidos: ${leads?.length}`);
|
|
45
59
|
```
|
|
46
60
|
|
|
47
|
-
*Nota: Todos os métodos assumem que seus
|
|
61
|
+
*Nota Cautelar: Todos os métodos assumem que seus Access Tokens estão sendo refrescados por sua infraestrutura OAuth 2.0 externa.*
|
|
48
62
|
|
|
49
63
|
---
|
|
50
64
|
|
|
51
|
-
## 📖 Exemplos
|
|
65
|
+
## 📖 Exemplos Práticos de Uso Avançado
|
|
52
66
|
|
|
53
|
-
### 1. Criando Entidades com Proteção
|
|
67
|
+
### 1. Criando Entidades com Proteção Tipada
|
|
54
68
|
```typescript
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const client = new KommoClient({ domain: 'meudominio', accessToken: 'TOKEN' });
|
|
58
|
-
|
|
59
|
-
async function criarLead() {
|
|
69
|
+
async function criarNegocioEstrategico() {
|
|
60
70
|
const result = await client.leads.create({
|
|
61
|
-
name: '
|
|
71
|
+
name: 'Lead Inteligência Artificial',
|
|
62
72
|
price: 15400,
|
|
73
|
+
pipeline_id: 8887,
|
|
63
74
|
tags_to_add: [
|
|
64
75
|
{ name: 'VIP' }
|
|
65
76
|
]
|
|
66
77
|
});
|
|
67
78
|
|
|
68
|
-
console.log('Lead
|
|
79
|
+
console.log('Lead ID: ', result._embedded?.leads?.[0].id);
|
|
69
80
|
}
|
|
70
81
|
```
|
|
71
82
|
|
|
72
|
-
### 2. Vínculos
|
|
73
|
-
|
|
74
|
-
Conecte um contato diretamente ao seu Lead recém-criado em Lote (Batch).
|
|
83
|
+
### 2. Vínculos e Lotes (Links Batch)
|
|
84
|
+
Exemplo vinculando um Contato a um Lead recém-criado, utilizando normalização automática das strings de metadados:
|
|
75
85
|
```typescript
|
|
76
86
|
await client.links.link('leads', 15591, [
|
|
77
87
|
{
|
|
78
88
|
to_entity_type: 'contacts',
|
|
79
89
|
to_entity_id: 11069775,
|
|
80
90
|
metadata: {
|
|
81
|
-
is_main: true //
|
|
91
|
+
is_main: true // A SDK serializa e aceita "is_main" ao invés do confuso "main_contact" de Payload cruzado
|
|
82
92
|
}
|
|
83
93
|
}
|
|
84
94
|
]);
|
|
85
95
|
```
|
|
86
96
|
|
|
87
|
-
### 3.
|
|
88
|
-
|
|
89
|
-
Esqueça o Erro "403 Limit Exceeded" da Kommo por não conhecer os limites. A própria SDK bloqueia antes do tráfego:
|
|
97
|
+
### 3. Rate Limits e Pre-Flight Blockers (Ex: SalesBots)
|
|
98
|
+
Esqueça o Erro "403 Limit Exceeded" silencioso na Kommo. A própria SDK bloqueia ações fisicamente antes delas atingirem os cabos de rede:
|
|
90
99
|
```typescript
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
try {
|
|
101
|
+
await client.salesbots.runMany([...105 itens...]);
|
|
102
|
+
} catch (e) {
|
|
103
|
+
// ERRO PRÉVIO GERADO NO NODE:
|
|
104
|
+
// "A API da Kommo limita o 'runMany' a no máximo 100 salesbots por requisição."
|
|
105
|
+
}
|
|
95
106
|
```
|
|
96
107
|
|
|
97
|
-
### 4. Gestão
|
|
108
|
+
### 4. Gestão de Arquivos e Binários (Files API)
|
|
109
|
+
A SDK se encarrega de instruir o HTTP Client a setar os Data-Types de _octet-stream_. É só dar o Buffer Node para ele:
|
|
110
|
+
|
|
98
111
|
```typescript
|
|
99
|
-
const
|
|
112
|
+
const { session_token } = await client.files.service.createUploadSession({
|
|
113
|
+
file_name: "Contrato.pdf",
|
|
114
|
+
file_size: 150000
|
|
115
|
+
});
|
|
100
116
|
|
|
101
|
-
|
|
102
|
-
console.log('Funil Principal: ', funilAtivo?.name);
|
|
117
|
+
await client.files.service.uploadPart(session_token, myPdfBufferData);
|
|
103
118
|
```
|
|
104
119
|
|
|
105
120
|
---
|
|
106
121
|
|
|
107
|
-
## 🛡️ Tratamento de Erros
|
|
122
|
+
## 🛡️ Tratamento de Erros e `KommoApiError`
|
|
108
123
|
|
|
109
|
-
|
|
124
|
+
Para uma excelente depuração no seu console ou Grafana, qualquer rota do Server falha lançará a classe empacotada abstrata `KommoApiError`. Tratamentos assíncronos não resolvidos (204 e 202) são traduzidos polidamente em promessas `void`.
|
|
125
|
+
|
|
126
|
+
Você mapeia o rastro do servidor nativo assim:
|
|
110
127
|
|
|
111
128
|
```typescript
|
|
112
129
|
import { KommoApiError } from 'kommo-aiatende-api/errors';
|
|
@@ -115,22 +132,24 @@ try {
|
|
|
115
132
|
await client.leads.getById(99999999);
|
|
116
133
|
} catch (error) {
|
|
117
134
|
if (error instanceof KommoApiError) {
|
|
118
|
-
console.error(
|
|
119
|
-
console.error(
|
|
120
|
-
console.error(
|
|
135
|
+
console.error(`[ KOMMO API ERROR ] - HTTP ${error.status}`); // ex: 404
|
|
136
|
+
console.error(`=> Título: ${error.title}`);
|
|
137
|
+
console.error(`=> Detalhe: ${error.detail}`);
|
|
121
138
|
|
|
122
|
-
// Payload
|
|
139
|
+
// Payload JSON completo devolvido pela web
|
|
123
140
|
console.log(error.raw);
|
|
141
|
+
} else {
|
|
142
|
+
// Erros padões de Syntax NodeJS ou da engine V8
|
|
143
|
+
console.error(error);
|
|
124
144
|
}
|
|
125
145
|
}
|
|
126
146
|
```
|
|
127
147
|
|
|
128
|
-
## 🏗️ Padrões Internos (Architecture)
|
|
129
|
-
A
|
|
130
|
-
|
|
131
|
-
2. **Query String Normalization:** Usamos o `qs` com a instrução `{ arrayFormat: 'brackets' }` para evitar que seus arrays nos filtros de `GET` quebrem a formatação em backend na Rússia.
|
|
132
|
-
|
|
148
|
+
## 🏗️ Padrões Internos & Arquitetura (Architecture)
|
|
149
|
+
- **Raw Body Conversions:** Rotas da Kommo v4 exigem arrays brutos (`[ {...} ]`) injetados diretamente no Corpo do Payload. A SDK faz a normalização e envelopamento se você enviou Arrays ou Objetos Únicos num request que exija coleção no Backend da Rússia.
|
|
150
|
+
- **Query String Normalization (`qs`)**: O Typescript utiliza o pacote `qs` formatado para `brackets`, convertendo arrays lógicos Node em arrays compreensivos pela V4 (Ex: `{ filter_id: [1,2] }` vira `?filter[id][]=1&filter[id][]=2`) sem fricção pro desenvolvedor.
|
|
133
151
|
|
|
134
152
|
---
|
|
135
153
|
## 📄 Licença
|
|
136
|
-
Licenciado sob
|
|
154
|
+
Licenciado livremente sob os termos da licença MIT.
|
|
155
|
+
Sinta-se à vontade para "Forkar" e ramificar customizações em sua infraestrutura!
|
package/dist/index.d.mts
CHANGED
|
@@ -2655,6 +2655,96 @@ declare class WebhooksResource extends BaseResource {
|
|
|
2655
2655
|
delete(payload: DeleteWebhookInput): Promise<void>;
|
|
2656
2656
|
}
|
|
2657
2657
|
|
|
2658
|
+
type FileRecord = Record<string, unknown>;
|
|
2659
|
+
type FileVersionRecord = Record<string, unknown>;
|
|
2660
|
+
type EntityAttachedFileRecord = Record<string, unknown>;
|
|
2661
|
+
type FileLinkedEntityRecord = Record<string, unknown>;
|
|
2662
|
+
interface ListFilesParams {
|
|
2663
|
+
filter_uuid?: string[];
|
|
2664
|
+
filter_name?: string;
|
|
2665
|
+
filter_extensions?: string[];
|
|
2666
|
+
filter_term?: string;
|
|
2667
|
+
filter_source_id?: number;
|
|
2668
|
+
filter_deleted?: boolean;
|
|
2669
|
+
filter_size_unit?: number;
|
|
2670
|
+
filter_size_from?: number;
|
|
2671
|
+
filter_size_to?: number;
|
|
2672
|
+
filter_date_type?: 'created_at' | 'updated_at';
|
|
2673
|
+
filter_date_preset?: string;
|
|
2674
|
+
filter_date_from?: number;
|
|
2675
|
+
filter_date_to?: number;
|
|
2676
|
+
filter_created_by?: number[];
|
|
2677
|
+
filter_updated_by?: number[];
|
|
2678
|
+
}
|
|
2679
|
+
interface ListFilesResponse {
|
|
2680
|
+
items?: FileRecord[];
|
|
2681
|
+
raw?: unknown;
|
|
2682
|
+
}
|
|
2683
|
+
interface CreateFileUploadSessionInput {
|
|
2684
|
+
file_name: string;
|
|
2685
|
+
file_size: number;
|
|
2686
|
+
file_uuid?: string;
|
|
2687
|
+
content_type?: string;
|
|
2688
|
+
with_preview?: boolean;
|
|
2689
|
+
}
|
|
2690
|
+
type UploadSessionResponse = Record<string, unknown>;
|
|
2691
|
+
type UploadFilePartInput = ArrayBuffer | Uint8Array | any;
|
|
2692
|
+
type UploadFilePartResponse = Record<string, unknown>;
|
|
2693
|
+
type UpdateFileInput = {
|
|
2694
|
+
name: string;
|
|
2695
|
+
version_uuid?: never;
|
|
2696
|
+
} | {
|
|
2697
|
+
version_uuid: string;
|
|
2698
|
+
name?: never;
|
|
2699
|
+
};
|
|
2700
|
+
type DeleteFilesItem = Record<string, unknown>;
|
|
2701
|
+
type RestoreFilesItem = Record<string, unknown>;
|
|
2702
|
+
interface ListFileVersionsResponse {
|
|
2703
|
+
items?: FileVersionRecord[];
|
|
2704
|
+
raw?: unknown;
|
|
2705
|
+
}
|
|
2706
|
+
type FileAttachEntityType = 'leads' | 'contacts' | 'companies' | 'contatos' | 'empresas' | string;
|
|
2707
|
+
interface ListEntityAttachedFilesParams {
|
|
2708
|
+
limit?: number;
|
|
2709
|
+
before_id?: number;
|
|
2710
|
+
}
|
|
2711
|
+
interface ListEntityAttachedFilesResponse {
|
|
2712
|
+
items?: EntityAttachedFileRecord[];
|
|
2713
|
+
raw?: unknown;
|
|
2714
|
+
}
|
|
2715
|
+
type AttachFilesToEntityItem = Record<string, unknown>;
|
|
2716
|
+
type DetachFilesFromEntityItem = Record<string, unknown>;
|
|
2717
|
+
interface ListFileLinkedEntitiesResponse {
|
|
2718
|
+
items?: FileLinkedEntityRecord[];
|
|
2719
|
+
raw?: unknown;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
declare class FilesServiceResource extends BaseResource {
|
|
2723
|
+
getByUuid(fileUuid: string): Promise<FileRecord | null>;
|
|
2724
|
+
list(params?: ListFilesParams): Promise<ListFilesResponse>;
|
|
2725
|
+
createUploadSession(payload: CreateFileUploadSessionInput): Promise<UploadSessionResponse>;
|
|
2726
|
+
uploadPart(sessionToken: string, filePart: UploadFilePartInput): Promise<UploadFilePartResponse>;
|
|
2727
|
+
update(fileUuid: string, payload: UpdateFileInput): Promise<FileRecord>;
|
|
2728
|
+
delete(items: DeleteFilesItem | DeleteFilesItem[]): Promise<Record<string, unknown>>;
|
|
2729
|
+
restore(items: RestoreFilesItem | RestoreFilesItem[]): Promise<Record<string, unknown>>;
|
|
2730
|
+
listVersions(fileUuid: string): Promise<ListFileVersionsResponse>;
|
|
2731
|
+
}
|
|
2732
|
+
declare class EntityFilesResource extends BaseResource {
|
|
2733
|
+
private normalizeEntity;
|
|
2734
|
+
listAttachedToEntity(entity: FileAttachEntityType, entityId: number, params?: ListEntityAttachedFilesParams): Promise<ListEntityAttachedFilesResponse>;
|
|
2735
|
+
attachToEntity(entity: FileAttachEntityType, entityId: number, items: AttachFilesToEntityItem | AttachFilesToEntityItem[]): Promise<Record<string, unknown>>;
|
|
2736
|
+
detachFromEntity(entity: FileAttachEntityType, entityId: number, items: DetachFilesFromEntityItem | DetachFilesFromEntityItem[]): Promise<void>;
|
|
2737
|
+
}
|
|
2738
|
+
declare class FileLinksResource extends BaseResource {
|
|
2739
|
+
listLinkedEntities(fileUuid: string): Promise<ListFileLinkedEntitiesResponse>;
|
|
2740
|
+
}
|
|
2741
|
+
declare class FilesResource extends BaseResource {
|
|
2742
|
+
service: FilesServiceResource;
|
|
2743
|
+
entities: EntityFilesResource;
|
|
2744
|
+
links: FileLinksResource;
|
|
2745
|
+
constructor(httpClient: any);
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2658
2748
|
declare class KommoClient {
|
|
2659
2749
|
config: KommoConfig;
|
|
2660
2750
|
auth: AuthManager;
|
|
@@ -2679,6 +2769,7 @@ declare class KommoClient {
|
|
|
2679
2769
|
websiteButtons: WebsiteButtonsResource;
|
|
2680
2770
|
chatTemplates: ChatTemplatesResource;
|
|
2681
2771
|
webhooks: WebhooksResource;
|
|
2772
|
+
files: FilesResource;
|
|
2682
2773
|
constructor(config: KommoConfig);
|
|
2683
2774
|
setAccessToken(token: string): void;
|
|
2684
2775
|
}
|
|
@@ -2692,4 +2783,4 @@ declare class KommoApiError extends Error {
|
|
|
2692
2783
|
constructor(message: string, info?: Partial<KommoApiError>);
|
|
2693
2784
|
}
|
|
2694
2785
|
|
|
2695
|
-
export { type AccessTokenResponse, type AttachmentNoteParams, AuthManager, type BaseCreateUnsortedItem, type BaseCustomField, type BaseEntity, type CallNoteParams, type Catalog, type CatalogElement, type CatalogElementCustomFieldValue, CatalogsResource, type ChatTemplate, type ChatTemplateAttachment, type ChatTemplateButton, type ChatTemplateButtonType, type ChatTemplateReview, type ChatTemplateType, ChatTemplatesResource, type CollectionResponse, type CommonNoteParams, CompaniesResource, type Company, type CompanyCatalogElementRef, type CompanyContactRef, type CompanyLeadRef, type CompanyTag, type CompanyTagRef, type CompanyWithParam, type Contact, type ContactCatalogElementRef, type ContactCompanyRef, type ContactCustomerRef, type ContactLeadRef, type ContactTag, type ContactTagRef, type ContactWithParam, ContactsResource, type CreateCatalogElementInput, type CreateCatalogElementsResponse, type CreateCatalogInput, type CreateCatalogsResponse, type CreateChatTemplateInput, type CreateChatTemplatesResponse, type CreateCompaniesResponse, type CreateCompanyInput, type CreateComplexLeadInput, type CreateComplexLeadsResponse, type CreateComplexLeadsResponseItem, type CreateContactInput, type CreateContactsResponse, type CreateCustomFieldGroupInput, type CreateEntityCustomFieldInput, type CreateEntityLinkInput, type CreateEntityLinksResponse, type CreateFormUnsortedLeadInput, type CreateLeadInput, type CreateLeadsResponse, type CreateListCustomFieldInput, type CreateNoteInput, type CreateNotesResponse, type CreatePipelineInput, type CreatePipelineStatusInput, type CreatePipelinesResponse, type CreateRoleInput, type CreateSipUnsortedLeadInput, type CreateSourceInput, type CreateSourcesResponse, type CreateStatusInput, type CreateStatusesResponse, type CreateTagInput, type CreateTagRef, type CreateTagsResponse, type CreateTaskInput, type CreateTasksResponse, type CreateUnsortedCompany, type CreateUnsortedContact, type CreateUnsortedLead, type CreateUnsortedLeadsResponse, type CreateUserInput, type CreateWebhookInput, type CreateWebsiteButtonInput, type CreateWebsiteButtonResponse, type CustomField, type CustomFieldEnum, type CustomFieldGroup, CustomFieldGroupsResource, type CustomFieldNestedValue, type CustomFieldRequiredStatus, type CustomFieldType, type CustomFieldValue, CustomFieldsResource, type DeleteChatTemplateInput, type DeleteEntityLinkInput, type DeleteSourceBatchInput, type DeleteWebhookInput, type Embedded, type EntityCustomField, type EntityLink, type EntityLinkMetadata, type EntityLinkWithSource, type EntityRights, type EntityType, type EntityUpdateResult, type Event, type EventTypeDefinition, type EventValueChange, type EventValueFilters, type EventWithParam, EventsResource, type FormMetadata, type GeolocationNoteParams, KNOWN_WEBHOOK_EVENTS, KOMMO_PIPELINE_STAGE_COLORS, KOMMO_TAG_COLORS, type KnownEventType, KommoApiError, KommoClient, type KommoConfig, type KommoPipelineStageColor, type Lead, type LeadCatalogElementRef, type LeadCompanyRef, type LeadContactRef, type LeadTag, type LeadTagRef, type LeadWithParam, LeadsResource, type LinkMetadataInput, type LinkSourceEntityType, type LinkTargetEntityType, type LinkUnsortedLeadResponse, LinksResource, type ListCatalogElementsParams, type ListCatalogElementsResponse, type ListCatalogsParams, type ListCatalogsResponse, type ListChatTemplatesParams, type ListChatTemplatesResponse, type ListCompaniesParams, type ListCompaniesResponse, type ListContactsParams, type ListContactsResponse, type ListCustomField, type ListCustomFieldGroupsResponse, type ListEntityCustomFieldsResponse, type ListEntityLinksParams, type ListEntityLinksResponse, type ListEntityNotesParams, type ListEventTypesParams, type ListEventTypesResponse, type ListEventsParams, type ListEventsResponse, type ListLeadsParams, type ListLeadsResponse, type ListListCustomFieldsResponse, type ListLossReasonsResponse, type ListNotesResponse, type ListPipelineStatusesResponse, type ListPipelinesResponse, type ListRolesParams, type ListRolesResponse, type ListSalesbotsParams, type ListSalesbotsResponse, type ListSourcesResponse, type ListTagsParams, type ListTagsResponse, type ListTasksParams, type ListTasksResponse, type ListUnsortedLeadsParams, type ListUnsortedLeadsResponse, type ListUsersParams, type ListUsersResponse, type ListWebhooksParams, type ListWebhooksResponse, type ListWebsiteButtonsParams, type ListWebsiteButtonsResponse, type LossReason, type Note, type NoteEntityType, type NoteParams, type NoteType, NotesResource, type PermissionLevel, type Pipeline, type PipelineStatus, PipelinesResource, type Role, type RoleWithParam, RolesResource, type RunManySalesbotsItem, type RunSalesbotInput, type Salesbot, type SalesbotContinueBotType, type SalesbotContinueInput, type SalesbotExecuteHandler, type SalesbotFunctionalityType, SalesbotsResource, type ServiceMessageNoteParams, type SipMetadata, type SmsNoteParams, type Source, type SourceService, type SourceServicePage, SourcesResource, type StatusDescription, type StatusRight, type StopSalesbotInput, type SubmitWhatsAppTemplateReviewResponse, type Tag, type TagColor, type TagEntityType, type TagRefInput, TagsResource, type Task, TasksResource, type UnsortedDecisionResponse, type UnsortedLead, UnsortedResource, type UnsortedSummaryParams, type UnsortedSummaryResponse, type UpdateCatalogElementInput, type UpdateCatalogElementsResponse, type UpdateCatalogInput, type UpdateCatalogsResponse, type UpdateChatTemplateInput, type UpdateChatTemplatesResponse, type UpdateCompaniesResponse, type UpdateCompanyInput, type UpdateContactInput, type UpdateContactsResponse, type UpdateCustomFieldGroupInput, type UpdateEntityCustomFieldInput, type UpdateEntityTagsBatchResponse, type UpdateEntityTagsInput, type UpdateEntityTagsSingleResponse, type UpdateLeadInput, type UpdateLeadsResponse, type UpdateListCustomFieldInput, type UpdateNoteInput, type UpdateNotesResponse, type UpdatePipelineInput, type UpdateRoleInput, type UpdateSingleCatalogElementInput, type UpdateSingleCatalogInput, type UpdateSingleCompanyInput, type UpdateSingleContactInput, type UpdateSingleEntityCustomFieldInput, type UpdateSingleEntityTagsInput, type UpdateSingleLeadInput, type UpdateSingleListCustomFieldInput, type UpdateSingleNoteInput, type UpdateSingleTaskInput, type UpdateSourceBatchInput, type UpdateSourceInput, type UpdateSourcesResponse, type UpdateStatusInput, type UpdateTaskInput, type UpdateTasksResponse, type UpdateWebsiteButtonInput, type UpdateWhatsAppTemplateReviewStatusInput, type UpdateWhatsAppTemplateReviewStatusResponse, type User, type UserWithParam, UsersResource, type WabaCategory, type WabaHeaderType, type WabaReviewStatus, type Webhook, type WebhookEvent, WebhooksResource, type WebsiteButton, type WebsiteButtonCreationStatus, WebsiteButtonsResource, type WhatsAppTemplateModerationStatus, eventUtils };
|
|
2786
|
+
export { type AccessTokenResponse, type AttachFilesToEntityItem, type AttachmentNoteParams, AuthManager, type BaseCreateUnsortedItem, type BaseCustomField, type BaseEntity, type CallNoteParams, type Catalog, type CatalogElement, type CatalogElementCustomFieldValue, CatalogsResource, type ChatTemplate, type ChatTemplateAttachment, type ChatTemplateButton, type ChatTemplateButtonType, type ChatTemplateReview, type ChatTemplateType, ChatTemplatesResource, type CollectionResponse, type CommonNoteParams, CompaniesResource, type Company, type CompanyCatalogElementRef, type CompanyContactRef, type CompanyLeadRef, type CompanyTag, type CompanyTagRef, type CompanyWithParam, type Contact, type ContactCatalogElementRef, type ContactCompanyRef, type ContactCustomerRef, type ContactLeadRef, type ContactTag, type ContactTagRef, type ContactWithParam, ContactsResource, type CreateCatalogElementInput, type CreateCatalogElementsResponse, type CreateCatalogInput, type CreateCatalogsResponse, type CreateChatTemplateInput, type CreateChatTemplatesResponse, type CreateCompaniesResponse, type CreateCompanyInput, type CreateComplexLeadInput, type CreateComplexLeadsResponse, type CreateComplexLeadsResponseItem, type CreateContactInput, type CreateContactsResponse, type CreateCustomFieldGroupInput, type CreateEntityCustomFieldInput, type CreateEntityLinkInput, type CreateEntityLinksResponse, type CreateFileUploadSessionInput, type CreateFormUnsortedLeadInput, type CreateLeadInput, type CreateLeadsResponse, type CreateListCustomFieldInput, type CreateNoteInput, type CreateNotesResponse, type CreatePipelineInput, type CreatePipelineStatusInput, type CreatePipelinesResponse, type CreateRoleInput, type CreateSipUnsortedLeadInput, type CreateSourceInput, type CreateSourcesResponse, type CreateStatusInput, type CreateStatusesResponse, type CreateTagInput, type CreateTagRef, type CreateTagsResponse, type CreateTaskInput, type CreateTasksResponse, type CreateUnsortedCompany, type CreateUnsortedContact, type CreateUnsortedLead, type CreateUnsortedLeadsResponse, type CreateUserInput, type CreateWebhookInput, type CreateWebsiteButtonInput, type CreateWebsiteButtonResponse, type CustomField, type CustomFieldEnum, type CustomFieldGroup, CustomFieldGroupsResource, type CustomFieldNestedValue, type CustomFieldRequiredStatus, type CustomFieldType, type CustomFieldValue, CustomFieldsResource, type DeleteChatTemplateInput, type DeleteEntityLinkInput, type DeleteFilesItem, type DeleteSourceBatchInput, type DeleteWebhookInput, type DetachFilesFromEntityItem, type Embedded, type EntityAttachedFileRecord, type EntityCustomField, EntityFilesResource, type EntityLink, type EntityLinkMetadata, type EntityLinkWithSource, type EntityRights, type EntityType, type EntityUpdateResult, type Event, type EventTypeDefinition, type EventValueChange, type EventValueFilters, type EventWithParam, EventsResource, type FileAttachEntityType, type FileLinkedEntityRecord, FileLinksResource, type FileRecord, type FileVersionRecord, FilesResource, FilesServiceResource, type FormMetadata, type GeolocationNoteParams, KNOWN_WEBHOOK_EVENTS, KOMMO_PIPELINE_STAGE_COLORS, KOMMO_TAG_COLORS, type KnownEventType, KommoApiError, KommoClient, type KommoConfig, type KommoPipelineStageColor, type Lead, type LeadCatalogElementRef, type LeadCompanyRef, type LeadContactRef, type LeadTag, type LeadTagRef, type LeadWithParam, LeadsResource, type LinkMetadataInput, type LinkSourceEntityType, type LinkTargetEntityType, type LinkUnsortedLeadResponse, LinksResource, type ListCatalogElementsParams, type ListCatalogElementsResponse, type ListCatalogsParams, type ListCatalogsResponse, type ListChatTemplatesParams, type ListChatTemplatesResponse, type ListCompaniesParams, type ListCompaniesResponse, type ListContactsParams, type ListContactsResponse, type ListCustomField, type ListCustomFieldGroupsResponse, type ListEntityAttachedFilesParams, type ListEntityAttachedFilesResponse, type ListEntityCustomFieldsResponse, type ListEntityLinksParams, type ListEntityLinksResponse, type ListEntityNotesParams, type ListEventTypesParams, type ListEventTypesResponse, type ListEventsParams, type ListEventsResponse, type ListFileLinkedEntitiesResponse, type ListFileVersionsResponse, type ListFilesParams, type ListFilesResponse, type ListLeadsParams, type ListLeadsResponse, type ListListCustomFieldsResponse, type ListLossReasonsResponse, type ListNotesResponse, type ListPipelineStatusesResponse, type ListPipelinesResponse, type ListRolesParams, type ListRolesResponse, type ListSalesbotsParams, type ListSalesbotsResponse, type ListSourcesResponse, type ListTagsParams, type ListTagsResponse, type ListTasksParams, type ListTasksResponse, type ListUnsortedLeadsParams, type ListUnsortedLeadsResponse, type ListUsersParams, type ListUsersResponse, type ListWebhooksParams, type ListWebhooksResponse, type ListWebsiteButtonsParams, type ListWebsiteButtonsResponse, type LossReason, type Note, type NoteEntityType, type NoteParams, type NoteType, NotesResource, type PermissionLevel, type Pipeline, type PipelineStatus, PipelinesResource, type RestoreFilesItem, type Role, type RoleWithParam, RolesResource, type RunManySalesbotsItem, type RunSalesbotInput, type Salesbot, type SalesbotContinueBotType, type SalesbotContinueInput, type SalesbotExecuteHandler, type SalesbotFunctionalityType, SalesbotsResource, type ServiceMessageNoteParams, type SipMetadata, type SmsNoteParams, type Source, type SourceService, type SourceServicePage, SourcesResource, type StatusDescription, type StatusRight, type StopSalesbotInput, type SubmitWhatsAppTemplateReviewResponse, type Tag, type TagColor, type TagEntityType, type TagRefInput, TagsResource, type Task, TasksResource, type UnsortedDecisionResponse, type UnsortedLead, UnsortedResource, type UnsortedSummaryParams, type UnsortedSummaryResponse, type UpdateCatalogElementInput, type UpdateCatalogElementsResponse, type UpdateCatalogInput, type UpdateCatalogsResponse, type UpdateChatTemplateInput, type UpdateChatTemplatesResponse, type UpdateCompaniesResponse, type UpdateCompanyInput, type UpdateContactInput, type UpdateContactsResponse, type UpdateCustomFieldGroupInput, type UpdateEntityCustomFieldInput, type UpdateEntityTagsBatchResponse, type UpdateEntityTagsInput, type UpdateEntityTagsSingleResponse, type UpdateFileInput, type UpdateLeadInput, type UpdateLeadsResponse, type UpdateListCustomFieldInput, type UpdateNoteInput, type UpdateNotesResponse, type UpdatePipelineInput, type UpdateRoleInput, type UpdateSingleCatalogElementInput, type UpdateSingleCatalogInput, type UpdateSingleCompanyInput, type UpdateSingleContactInput, type UpdateSingleEntityCustomFieldInput, type UpdateSingleEntityTagsInput, type UpdateSingleLeadInput, type UpdateSingleListCustomFieldInput, type UpdateSingleNoteInput, type UpdateSingleTaskInput, type UpdateSourceBatchInput, type UpdateSourceInput, type UpdateSourcesResponse, type UpdateStatusInput, type UpdateTaskInput, type UpdateTasksResponse, type UpdateWebsiteButtonInput, type UpdateWhatsAppTemplateReviewStatusInput, type UpdateWhatsAppTemplateReviewStatusResponse, type UploadFilePartInput, type UploadFilePartResponse, type UploadSessionResponse, type User, type UserWithParam, UsersResource, type WabaCategory, type WabaHeaderType, type WabaReviewStatus, type Webhook, type WebhookEvent, WebhooksResource, type WebsiteButton, type WebsiteButtonCreationStatus, WebsiteButtonsResource, type WhatsAppTemplateModerationStatus, eventUtils };
|
package/dist/index.d.ts
CHANGED
|
@@ -2655,6 +2655,96 @@ declare class WebhooksResource extends BaseResource {
|
|
|
2655
2655
|
delete(payload: DeleteWebhookInput): Promise<void>;
|
|
2656
2656
|
}
|
|
2657
2657
|
|
|
2658
|
+
type FileRecord = Record<string, unknown>;
|
|
2659
|
+
type FileVersionRecord = Record<string, unknown>;
|
|
2660
|
+
type EntityAttachedFileRecord = Record<string, unknown>;
|
|
2661
|
+
type FileLinkedEntityRecord = Record<string, unknown>;
|
|
2662
|
+
interface ListFilesParams {
|
|
2663
|
+
filter_uuid?: string[];
|
|
2664
|
+
filter_name?: string;
|
|
2665
|
+
filter_extensions?: string[];
|
|
2666
|
+
filter_term?: string;
|
|
2667
|
+
filter_source_id?: number;
|
|
2668
|
+
filter_deleted?: boolean;
|
|
2669
|
+
filter_size_unit?: number;
|
|
2670
|
+
filter_size_from?: number;
|
|
2671
|
+
filter_size_to?: number;
|
|
2672
|
+
filter_date_type?: 'created_at' | 'updated_at';
|
|
2673
|
+
filter_date_preset?: string;
|
|
2674
|
+
filter_date_from?: number;
|
|
2675
|
+
filter_date_to?: number;
|
|
2676
|
+
filter_created_by?: number[];
|
|
2677
|
+
filter_updated_by?: number[];
|
|
2678
|
+
}
|
|
2679
|
+
interface ListFilesResponse {
|
|
2680
|
+
items?: FileRecord[];
|
|
2681
|
+
raw?: unknown;
|
|
2682
|
+
}
|
|
2683
|
+
interface CreateFileUploadSessionInput {
|
|
2684
|
+
file_name: string;
|
|
2685
|
+
file_size: number;
|
|
2686
|
+
file_uuid?: string;
|
|
2687
|
+
content_type?: string;
|
|
2688
|
+
with_preview?: boolean;
|
|
2689
|
+
}
|
|
2690
|
+
type UploadSessionResponse = Record<string, unknown>;
|
|
2691
|
+
type UploadFilePartInput = ArrayBuffer | Uint8Array | any;
|
|
2692
|
+
type UploadFilePartResponse = Record<string, unknown>;
|
|
2693
|
+
type UpdateFileInput = {
|
|
2694
|
+
name: string;
|
|
2695
|
+
version_uuid?: never;
|
|
2696
|
+
} | {
|
|
2697
|
+
version_uuid: string;
|
|
2698
|
+
name?: never;
|
|
2699
|
+
};
|
|
2700
|
+
type DeleteFilesItem = Record<string, unknown>;
|
|
2701
|
+
type RestoreFilesItem = Record<string, unknown>;
|
|
2702
|
+
interface ListFileVersionsResponse {
|
|
2703
|
+
items?: FileVersionRecord[];
|
|
2704
|
+
raw?: unknown;
|
|
2705
|
+
}
|
|
2706
|
+
type FileAttachEntityType = 'leads' | 'contacts' | 'companies' | 'contatos' | 'empresas' | string;
|
|
2707
|
+
interface ListEntityAttachedFilesParams {
|
|
2708
|
+
limit?: number;
|
|
2709
|
+
before_id?: number;
|
|
2710
|
+
}
|
|
2711
|
+
interface ListEntityAttachedFilesResponse {
|
|
2712
|
+
items?: EntityAttachedFileRecord[];
|
|
2713
|
+
raw?: unknown;
|
|
2714
|
+
}
|
|
2715
|
+
type AttachFilesToEntityItem = Record<string, unknown>;
|
|
2716
|
+
type DetachFilesFromEntityItem = Record<string, unknown>;
|
|
2717
|
+
interface ListFileLinkedEntitiesResponse {
|
|
2718
|
+
items?: FileLinkedEntityRecord[];
|
|
2719
|
+
raw?: unknown;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
declare class FilesServiceResource extends BaseResource {
|
|
2723
|
+
getByUuid(fileUuid: string): Promise<FileRecord | null>;
|
|
2724
|
+
list(params?: ListFilesParams): Promise<ListFilesResponse>;
|
|
2725
|
+
createUploadSession(payload: CreateFileUploadSessionInput): Promise<UploadSessionResponse>;
|
|
2726
|
+
uploadPart(sessionToken: string, filePart: UploadFilePartInput): Promise<UploadFilePartResponse>;
|
|
2727
|
+
update(fileUuid: string, payload: UpdateFileInput): Promise<FileRecord>;
|
|
2728
|
+
delete(items: DeleteFilesItem | DeleteFilesItem[]): Promise<Record<string, unknown>>;
|
|
2729
|
+
restore(items: RestoreFilesItem | RestoreFilesItem[]): Promise<Record<string, unknown>>;
|
|
2730
|
+
listVersions(fileUuid: string): Promise<ListFileVersionsResponse>;
|
|
2731
|
+
}
|
|
2732
|
+
declare class EntityFilesResource extends BaseResource {
|
|
2733
|
+
private normalizeEntity;
|
|
2734
|
+
listAttachedToEntity(entity: FileAttachEntityType, entityId: number, params?: ListEntityAttachedFilesParams): Promise<ListEntityAttachedFilesResponse>;
|
|
2735
|
+
attachToEntity(entity: FileAttachEntityType, entityId: number, items: AttachFilesToEntityItem | AttachFilesToEntityItem[]): Promise<Record<string, unknown>>;
|
|
2736
|
+
detachFromEntity(entity: FileAttachEntityType, entityId: number, items: DetachFilesFromEntityItem | DetachFilesFromEntityItem[]): Promise<void>;
|
|
2737
|
+
}
|
|
2738
|
+
declare class FileLinksResource extends BaseResource {
|
|
2739
|
+
listLinkedEntities(fileUuid: string): Promise<ListFileLinkedEntitiesResponse>;
|
|
2740
|
+
}
|
|
2741
|
+
declare class FilesResource extends BaseResource {
|
|
2742
|
+
service: FilesServiceResource;
|
|
2743
|
+
entities: EntityFilesResource;
|
|
2744
|
+
links: FileLinksResource;
|
|
2745
|
+
constructor(httpClient: any);
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2658
2748
|
declare class KommoClient {
|
|
2659
2749
|
config: KommoConfig;
|
|
2660
2750
|
auth: AuthManager;
|
|
@@ -2679,6 +2769,7 @@ declare class KommoClient {
|
|
|
2679
2769
|
websiteButtons: WebsiteButtonsResource;
|
|
2680
2770
|
chatTemplates: ChatTemplatesResource;
|
|
2681
2771
|
webhooks: WebhooksResource;
|
|
2772
|
+
files: FilesResource;
|
|
2682
2773
|
constructor(config: KommoConfig);
|
|
2683
2774
|
setAccessToken(token: string): void;
|
|
2684
2775
|
}
|
|
@@ -2692,4 +2783,4 @@ declare class KommoApiError extends Error {
|
|
|
2692
2783
|
constructor(message: string, info?: Partial<KommoApiError>);
|
|
2693
2784
|
}
|
|
2694
2785
|
|
|
2695
|
-
export { type AccessTokenResponse, type AttachmentNoteParams, AuthManager, type BaseCreateUnsortedItem, type BaseCustomField, type BaseEntity, type CallNoteParams, type Catalog, type CatalogElement, type CatalogElementCustomFieldValue, CatalogsResource, type ChatTemplate, type ChatTemplateAttachment, type ChatTemplateButton, type ChatTemplateButtonType, type ChatTemplateReview, type ChatTemplateType, ChatTemplatesResource, type CollectionResponse, type CommonNoteParams, CompaniesResource, type Company, type CompanyCatalogElementRef, type CompanyContactRef, type CompanyLeadRef, type CompanyTag, type CompanyTagRef, type CompanyWithParam, type Contact, type ContactCatalogElementRef, type ContactCompanyRef, type ContactCustomerRef, type ContactLeadRef, type ContactTag, type ContactTagRef, type ContactWithParam, ContactsResource, type CreateCatalogElementInput, type CreateCatalogElementsResponse, type CreateCatalogInput, type CreateCatalogsResponse, type CreateChatTemplateInput, type CreateChatTemplatesResponse, type CreateCompaniesResponse, type CreateCompanyInput, type CreateComplexLeadInput, type CreateComplexLeadsResponse, type CreateComplexLeadsResponseItem, type CreateContactInput, type CreateContactsResponse, type CreateCustomFieldGroupInput, type CreateEntityCustomFieldInput, type CreateEntityLinkInput, type CreateEntityLinksResponse, type CreateFormUnsortedLeadInput, type CreateLeadInput, type CreateLeadsResponse, type CreateListCustomFieldInput, type CreateNoteInput, type CreateNotesResponse, type CreatePipelineInput, type CreatePipelineStatusInput, type CreatePipelinesResponse, type CreateRoleInput, type CreateSipUnsortedLeadInput, type CreateSourceInput, type CreateSourcesResponse, type CreateStatusInput, type CreateStatusesResponse, type CreateTagInput, type CreateTagRef, type CreateTagsResponse, type CreateTaskInput, type CreateTasksResponse, type CreateUnsortedCompany, type CreateUnsortedContact, type CreateUnsortedLead, type CreateUnsortedLeadsResponse, type CreateUserInput, type CreateWebhookInput, type CreateWebsiteButtonInput, type CreateWebsiteButtonResponse, type CustomField, type CustomFieldEnum, type CustomFieldGroup, CustomFieldGroupsResource, type CustomFieldNestedValue, type CustomFieldRequiredStatus, type CustomFieldType, type CustomFieldValue, CustomFieldsResource, type DeleteChatTemplateInput, type DeleteEntityLinkInput, type DeleteSourceBatchInput, type DeleteWebhookInput, type Embedded, type EntityCustomField, type EntityLink, type EntityLinkMetadata, type EntityLinkWithSource, type EntityRights, type EntityType, type EntityUpdateResult, type Event, type EventTypeDefinition, type EventValueChange, type EventValueFilters, type EventWithParam, EventsResource, type FormMetadata, type GeolocationNoteParams, KNOWN_WEBHOOK_EVENTS, KOMMO_PIPELINE_STAGE_COLORS, KOMMO_TAG_COLORS, type KnownEventType, KommoApiError, KommoClient, type KommoConfig, type KommoPipelineStageColor, type Lead, type LeadCatalogElementRef, type LeadCompanyRef, type LeadContactRef, type LeadTag, type LeadTagRef, type LeadWithParam, LeadsResource, type LinkMetadataInput, type LinkSourceEntityType, type LinkTargetEntityType, type LinkUnsortedLeadResponse, LinksResource, type ListCatalogElementsParams, type ListCatalogElementsResponse, type ListCatalogsParams, type ListCatalogsResponse, type ListChatTemplatesParams, type ListChatTemplatesResponse, type ListCompaniesParams, type ListCompaniesResponse, type ListContactsParams, type ListContactsResponse, type ListCustomField, type ListCustomFieldGroupsResponse, type ListEntityCustomFieldsResponse, type ListEntityLinksParams, type ListEntityLinksResponse, type ListEntityNotesParams, type ListEventTypesParams, type ListEventTypesResponse, type ListEventsParams, type ListEventsResponse, type ListLeadsParams, type ListLeadsResponse, type ListListCustomFieldsResponse, type ListLossReasonsResponse, type ListNotesResponse, type ListPipelineStatusesResponse, type ListPipelinesResponse, type ListRolesParams, type ListRolesResponse, type ListSalesbotsParams, type ListSalesbotsResponse, type ListSourcesResponse, type ListTagsParams, type ListTagsResponse, type ListTasksParams, type ListTasksResponse, type ListUnsortedLeadsParams, type ListUnsortedLeadsResponse, type ListUsersParams, type ListUsersResponse, type ListWebhooksParams, type ListWebhooksResponse, type ListWebsiteButtonsParams, type ListWebsiteButtonsResponse, type LossReason, type Note, type NoteEntityType, type NoteParams, type NoteType, NotesResource, type PermissionLevel, type Pipeline, type PipelineStatus, PipelinesResource, type Role, type RoleWithParam, RolesResource, type RunManySalesbotsItem, type RunSalesbotInput, type Salesbot, type SalesbotContinueBotType, type SalesbotContinueInput, type SalesbotExecuteHandler, type SalesbotFunctionalityType, SalesbotsResource, type ServiceMessageNoteParams, type SipMetadata, type SmsNoteParams, type Source, type SourceService, type SourceServicePage, SourcesResource, type StatusDescription, type StatusRight, type StopSalesbotInput, type SubmitWhatsAppTemplateReviewResponse, type Tag, type TagColor, type TagEntityType, type TagRefInput, TagsResource, type Task, TasksResource, type UnsortedDecisionResponse, type UnsortedLead, UnsortedResource, type UnsortedSummaryParams, type UnsortedSummaryResponse, type UpdateCatalogElementInput, type UpdateCatalogElementsResponse, type UpdateCatalogInput, type UpdateCatalogsResponse, type UpdateChatTemplateInput, type UpdateChatTemplatesResponse, type UpdateCompaniesResponse, type UpdateCompanyInput, type UpdateContactInput, type UpdateContactsResponse, type UpdateCustomFieldGroupInput, type UpdateEntityCustomFieldInput, type UpdateEntityTagsBatchResponse, type UpdateEntityTagsInput, type UpdateEntityTagsSingleResponse, type UpdateLeadInput, type UpdateLeadsResponse, type UpdateListCustomFieldInput, type UpdateNoteInput, type UpdateNotesResponse, type UpdatePipelineInput, type UpdateRoleInput, type UpdateSingleCatalogElementInput, type UpdateSingleCatalogInput, type UpdateSingleCompanyInput, type UpdateSingleContactInput, type UpdateSingleEntityCustomFieldInput, type UpdateSingleEntityTagsInput, type UpdateSingleLeadInput, type UpdateSingleListCustomFieldInput, type UpdateSingleNoteInput, type UpdateSingleTaskInput, type UpdateSourceBatchInput, type UpdateSourceInput, type UpdateSourcesResponse, type UpdateStatusInput, type UpdateTaskInput, type UpdateTasksResponse, type UpdateWebsiteButtonInput, type UpdateWhatsAppTemplateReviewStatusInput, type UpdateWhatsAppTemplateReviewStatusResponse, type User, type UserWithParam, UsersResource, type WabaCategory, type WabaHeaderType, type WabaReviewStatus, type Webhook, type WebhookEvent, WebhooksResource, type WebsiteButton, type WebsiteButtonCreationStatus, WebsiteButtonsResource, type WhatsAppTemplateModerationStatus, eventUtils };
|
|
2786
|
+
export { type AccessTokenResponse, type AttachFilesToEntityItem, type AttachmentNoteParams, AuthManager, type BaseCreateUnsortedItem, type BaseCustomField, type BaseEntity, type CallNoteParams, type Catalog, type CatalogElement, type CatalogElementCustomFieldValue, CatalogsResource, type ChatTemplate, type ChatTemplateAttachment, type ChatTemplateButton, type ChatTemplateButtonType, type ChatTemplateReview, type ChatTemplateType, ChatTemplatesResource, type CollectionResponse, type CommonNoteParams, CompaniesResource, type Company, type CompanyCatalogElementRef, type CompanyContactRef, type CompanyLeadRef, type CompanyTag, type CompanyTagRef, type CompanyWithParam, type Contact, type ContactCatalogElementRef, type ContactCompanyRef, type ContactCustomerRef, type ContactLeadRef, type ContactTag, type ContactTagRef, type ContactWithParam, ContactsResource, type CreateCatalogElementInput, type CreateCatalogElementsResponse, type CreateCatalogInput, type CreateCatalogsResponse, type CreateChatTemplateInput, type CreateChatTemplatesResponse, type CreateCompaniesResponse, type CreateCompanyInput, type CreateComplexLeadInput, type CreateComplexLeadsResponse, type CreateComplexLeadsResponseItem, type CreateContactInput, type CreateContactsResponse, type CreateCustomFieldGroupInput, type CreateEntityCustomFieldInput, type CreateEntityLinkInput, type CreateEntityLinksResponse, type CreateFileUploadSessionInput, type CreateFormUnsortedLeadInput, type CreateLeadInput, type CreateLeadsResponse, type CreateListCustomFieldInput, type CreateNoteInput, type CreateNotesResponse, type CreatePipelineInput, type CreatePipelineStatusInput, type CreatePipelinesResponse, type CreateRoleInput, type CreateSipUnsortedLeadInput, type CreateSourceInput, type CreateSourcesResponse, type CreateStatusInput, type CreateStatusesResponse, type CreateTagInput, type CreateTagRef, type CreateTagsResponse, type CreateTaskInput, type CreateTasksResponse, type CreateUnsortedCompany, type CreateUnsortedContact, type CreateUnsortedLead, type CreateUnsortedLeadsResponse, type CreateUserInput, type CreateWebhookInput, type CreateWebsiteButtonInput, type CreateWebsiteButtonResponse, type CustomField, type CustomFieldEnum, type CustomFieldGroup, CustomFieldGroupsResource, type CustomFieldNestedValue, type CustomFieldRequiredStatus, type CustomFieldType, type CustomFieldValue, CustomFieldsResource, type DeleteChatTemplateInput, type DeleteEntityLinkInput, type DeleteFilesItem, type DeleteSourceBatchInput, type DeleteWebhookInput, type DetachFilesFromEntityItem, type Embedded, type EntityAttachedFileRecord, type EntityCustomField, EntityFilesResource, type EntityLink, type EntityLinkMetadata, type EntityLinkWithSource, type EntityRights, type EntityType, type EntityUpdateResult, type Event, type EventTypeDefinition, type EventValueChange, type EventValueFilters, type EventWithParam, EventsResource, type FileAttachEntityType, type FileLinkedEntityRecord, FileLinksResource, type FileRecord, type FileVersionRecord, FilesResource, FilesServiceResource, type FormMetadata, type GeolocationNoteParams, KNOWN_WEBHOOK_EVENTS, KOMMO_PIPELINE_STAGE_COLORS, KOMMO_TAG_COLORS, type KnownEventType, KommoApiError, KommoClient, type KommoConfig, type KommoPipelineStageColor, type Lead, type LeadCatalogElementRef, type LeadCompanyRef, type LeadContactRef, type LeadTag, type LeadTagRef, type LeadWithParam, LeadsResource, type LinkMetadataInput, type LinkSourceEntityType, type LinkTargetEntityType, type LinkUnsortedLeadResponse, LinksResource, type ListCatalogElementsParams, type ListCatalogElementsResponse, type ListCatalogsParams, type ListCatalogsResponse, type ListChatTemplatesParams, type ListChatTemplatesResponse, type ListCompaniesParams, type ListCompaniesResponse, type ListContactsParams, type ListContactsResponse, type ListCustomField, type ListCustomFieldGroupsResponse, type ListEntityAttachedFilesParams, type ListEntityAttachedFilesResponse, type ListEntityCustomFieldsResponse, type ListEntityLinksParams, type ListEntityLinksResponse, type ListEntityNotesParams, type ListEventTypesParams, type ListEventTypesResponse, type ListEventsParams, type ListEventsResponse, type ListFileLinkedEntitiesResponse, type ListFileVersionsResponse, type ListFilesParams, type ListFilesResponse, type ListLeadsParams, type ListLeadsResponse, type ListListCustomFieldsResponse, type ListLossReasonsResponse, type ListNotesResponse, type ListPipelineStatusesResponse, type ListPipelinesResponse, type ListRolesParams, type ListRolesResponse, type ListSalesbotsParams, type ListSalesbotsResponse, type ListSourcesResponse, type ListTagsParams, type ListTagsResponse, type ListTasksParams, type ListTasksResponse, type ListUnsortedLeadsParams, type ListUnsortedLeadsResponse, type ListUsersParams, type ListUsersResponse, type ListWebhooksParams, type ListWebhooksResponse, type ListWebsiteButtonsParams, type ListWebsiteButtonsResponse, type LossReason, type Note, type NoteEntityType, type NoteParams, type NoteType, NotesResource, type PermissionLevel, type Pipeline, type PipelineStatus, PipelinesResource, type RestoreFilesItem, type Role, type RoleWithParam, RolesResource, type RunManySalesbotsItem, type RunSalesbotInput, type Salesbot, type SalesbotContinueBotType, type SalesbotContinueInput, type SalesbotExecuteHandler, type SalesbotFunctionalityType, SalesbotsResource, type ServiceMessageNoteParams, type SipMetadata, type SmsNoteParams, type Source, type SourceService, type SourceServicePage, SourcesResource, type StatusDescription, type StatusRight, type StopSalesbotInput, type SubmitWhatsAppTemplateReviewResponse, type Tag, type TagColor, type TagEntityType, type TagRefInput, TagsResource, type Task, TasksResource, type UnsortedDecisionResponse, type UnsortedLead, UnsortedResource, type UnsortedSummaryParams, type UnsortedSummaryResponse, type UpdateCatalogElementInput, type UpdateCatalogElementsResponse, type UpdateCatalogInput, type UpdateCatalogsResponse, type UpdateChatTemplateInput, type UpdateChatTemplatesResponse, type UpdateCompaniesResponse, type UpdateCompanyInput, type UpdateContactInput, type UpdateContactsResponse, type UpdateCustomFieldGroupInput, type UpdateEntityCustomFieldInput, type UpdateEntityTagsBatchResponse, type UpdateEntityTagsInput, type UpdateEntityTagsSingleResponse, type UpdateFileInput, type UpdateLeadInput, type UpdateLeadsResponse, type UpdateListCustomFieldInput, type UpdateNoteInput, type UpdateNotesResponse, type UpdatePipelineInput, type UpdateRoleInput, type UpdateSingleCatalogElementInput, type UpdateSingleCatalogInput, type UpdateSingleCompanyInput, type UpdateSingleContactInput, type UpdateSingleEntityCustomFieldInput, type UpdateSingleEntityTagsInput, type UpdateSingleLeadInput, type UpdateSingleListCustomFieldInput, type UpdateSingleNoteInput, type UpdateSingleTaskInput, type UpdateSourceBatchInput, type UpdateSourceInput, type UpdateSourcesResponse, type UpdateStatusInput, type UpdateTaskInput, type UpdateTasksResponse, type UpdateWebsiteButtonInput, type UpdateWhatsAppTemplateReviewStatusInput, type UpdateWhatsAppTemplateReviewStatusResponse, type UploadFilePartInput, type UploadFilePartResponse, type UploadSessionResponse, type User, type UserWithParam, UsersResource, type WabaCategory, type WabaHeaderType, type WabaReviewStatus, type Webhook, type WebhookEvent, WebhooksResource, type WebsiteButton, type WebsiteButtonCreationStatus, WebsiteButtonsResource, type WhatsAppTemplateModerationStatus, eventUtils };
|