evo360-types 1.3.402 → 1.3.404
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/apps/evo-crm/dic/zod-schemas.d.ts +3 -3
- package/dist/apps/evo-crm/dic/zod-schemas.js +1 -1
- package/dist/apps/evo-crm/dic/zod-schemas.ts +1 -1
- package/dist/apps/evo-finops/zod-schemas.d.ts +116 -116
- package/dist/apps/evo-finops/zod-schemas.js +3 -1
- package/dist/apps/evo-finops/zod-schemas.ts +3 -1
- package/dist/types/evo-crm/dic/index.d.ts +1 -1
- package/dist/types/evo-crm/dic/index.ts +1 -1
- package/dist/types/evo-finops/providers/asaas/asaas_provider.d.ts +48 -0
- package/dist/types/evo-finops/providers/asaas/asaas_provider.ts +70 -0
- package/package.json +1 -1
|
@@ -172,7 +172,9 @@ exports.zAsaasWebhookConfigSchema = zod_1.z
|
|
|
172
172
|
secret_ref: zod_1.z.string().optional(),
|
|
173
173
|
secret_hash: zod_1.z.string().optional(),
|
|
174
174
|
token: zod_1.z.string().optional(),
|
|
175
|
-
|
|
175
|
+
// Assinamos INVOICE_*, PAYMENT_* e ACCOUNT_STATUS_*. O enum acima cobre só os INVOICE_*,
|
|
176
|
+
// enquanto o tipo (AsaasSubscribableWebhookEvent) sempre admitiu qualquer evento do Asaas.
|
|
177
|
+
events: zod_1.z.array(zod_1.z.string()),
|
|
176
178
|
remote_webhook_id: zod_1.z.string().optional(),
|
|
177
179
|
last_sync_at: zod_1.z.string().optional(),
|
|
178
180
|
last_validation: zod_1.z
|
|
@@ -181,7 +181,9 @@ export const zAsaasWebhookConfigSchema = z
|
|
|
181
181
|
secret_ref: z.string().optional(),
|
|
182
182
|
secret_hash: z.string().optional(),
|
|
183
183
|
token: z.string().optional(),
|
|
184
|
-
|
|
184
|
+
// Assinamos INVOICE_*, PAYMENT_* e ACCOUNT_STATUS_*. O enum acima cobre só os INVOICE_*,
|
|
185
|
+
// enquanto o tipo (AsaasSubscribableWebhookEvent) sempre admitiu qualquer evento do Asaas.
|
|
186
|
+
events: z.array(z.string()),
|
|
185
187
|
remote_webhook_id: z.string().optional(),
|
|
186
188
|
last_sync_at: z.string().optional(),
|
|
187
189
|
last_validation: z
|
|
@@ -29,7 +29,7 @@ export interface IDistChannelType extends IFireDoc {
|
|
|
29
29
|
export interface IDistChannel extends IFireDoc {
|
|
30
30
|
code: string;
|
|
31
31
|
name: string;
|
|
32
|
-
type_code?: string;
|
|
32
|
+
type_code?: string | null;
|
|
33
33
|
type_name?: string;
|
|
34
34
|
typeRef?: FirestoreDocumentReference;
|
|
35
35
|
tags?: ITag[] | null;
|
|
@@ -50,7 +50,7 @@ export interface IDistChannelType extends IFireDoc {
|
|
|
50
50
|
export interface IDistChannel extends IFireDoc {
|
|
51
51
|
code: string;
|
|
52
52
|
name: string;
|
|
53
|
-
type_code?: string;
|
|
53
|
+
type_code?: string | null;
|
|
54
54
|
type_name?: string;
|
|
55
55
|
typeRef?: FirestoreDocumentReference;
|
|
56
56
|
tags?: ITag[] | null;
|
|
@@ -96,6 +96,52 @@ export interface IAsaasSubaccountInput {
|
|
|
96
96
|
site?: string;
|
|
97
97
|
[key: string]: unknown;
|
|
98
98
|
}
|
|
99
|
+
/** Valores do status cadastral devolvidos pelo Asaas em GET /v3/myAccount/status. */
|
|
100
|
+
export type AsaasAccountStatusValue = "APPROVED" | "AWAITING_APPROVAL" | "PENDING" | "REJECTED" | "EXPIRING_SOON" | "EXPIRED";
|
|
101
|
+
/** O que originou a escrita do snapshot cadastral. */
|
|
102
|
+
export type AsaasOnboardingSource = "manual_refresh" | "webhook" | "provider_create" | "scheduled_refresh";
|
|
103
|
+
/** Próxima ação que o dono da conta precisa executar para destravar a subconta. */
|
|
104
|
+
export type AsaasOnboardingNextAction = "approved" | "rejected" | "awaiting_analysis" | "open_onboarding_link" | "send_documents_external" | "fix_commercial_info" | "pending_bank_account" | "unknown";
|
|
105
|
+
/** Snapshot de GET /v3/myAccount/status. Sobrescrito inteiro a cada leitura/evento. */
|
|
106
|
+
export interface IAsaasAccountStatusSnapshot {
|
|
107
|
+
fetched_at: string;
|
|
108
|
+
source: AsaasOnboardingSource;
|
|
109
|
+
asaas_status_id?: string;
|
|
110
|
+
commercialInfo?: AsaasAccountStatusValue;
|
|
111
|
+
bankAccountInfo?: AsaasAccountStatusValue;
|
|
112
|
+
documentation?: AsaasAccountStatusValue;
|
|
113
|
+
general?: AsaasAccountStatusValue;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Grupo de documento pendente no Asaas.
|
|
117
|
+
* LGPD: apenas metadado (tipo, título, status, link). Nunca binário nem conteúdo de documento.
|
|
118
|
+
*/
|
|
119
|
+
export interface IAsaasOnboardingDocumentGroup {
|
|
120
|
+
id: string;
|
|
121
|
+
/** IDENTIFICATION | IDENTIFICATION_SELFIE | MINUTES_OF_ELECTION | CUSTOM */
|
|
122
|
+
type?: string;
|
|
123
|
+
title?: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
/** NOT_SENT | PENDING | APPROVED | REJECTED (NOT_SENT ocorre em produção, fora do enum documentado). */
|
|
126
|
+
status?: string;
|
|
127
|
+
/** Asaas devolve `onboardingUrl`; persistimos em snake_case. Null quando o envio deve ser por outro caminho. */
|
|
128
|
+
onboarding_url?: string | null;
|
|
129
|
+
responsible?: {
|
|
130
|
+
name?: string | null;
|
|
131
|
+
type?: string | null;
|
|
132
|
+
};
|
|
133
|
+
documents?: Array<{
|
|
134
|
+
id?: string;
|
|
135
|
+
status?: string;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
138
|
+
/** Snapshot de GET /v3/myAccount/documents + próxima ação derivada. */
|
|
139
|
+
export interface IAsaasOnboardingSnapshot {
|
|
140
|
+
documents_fetched_at: string;
|
|
141
|
+
reject_reasons?: unknown;
|
|
142
|
+
document_groups: IAsaasOnboardingDocumentGroup[];
|
|
143
|
+
next_action: AsaasOnboardingNextAction;
|
|
144
|
+
}
|
|
99
145
|
export interface IAsaasEnvAuthConfig {
|
|
100
146
|
enabled: boolean;
|
|
101
147
|
base_url?: string;
|
|
@@ -104,6 +150,8 @@ export interface IAsaasEnvAuthConfig {
|
|
|
104
150
|
retry_policy?: IRetryPolicy;
|
|
105
151
|
webhook?: IAsaasWebhookConfig;
|
|
106
152
|
account_scope?: IAsaasAccountScope;
|
|
153
|
+
account_status?: IAsaasAccountStatusSnapshot;
|
|
154
|
+
onboarding?: IAsaasOnboardingSnapshot;
|
|
107
155
|
subaccount_input?: IAsaasSubaccountInput;
|
|
108
156
|
operational?: {
|
|
109
157
|
rate_limit_max_per_minute?: number;
|
|
@@ -131,6 +131,70 @@ export interface IAsaasSubaccountInput {
|
|
|
131
131
|
[key: string]: unknown;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/** Valores do status cadastral devolvidos pelo Asaas em GET /v3/myAccount/status. */
|
|
135
|
+
export type AsaasAccountStatusValue =
|
|
136
|
+
| "APPROVED"
|
|
137
|
+
| "AWAITING_APPROVAL"
|
|
138
|
+
| "PENDING"
|
|
139
|
+
| "REJECTED"
|
|
140
|
+
| "EXPIRING_SOON"
|
|
141
|
+
| "EXPIRED";
|
|
142
|
+
|
|
143
|
+
/** O que originou a escrita do snapshot cadastral. */
|
|
144
|
+
export type AsaasOnboardingSource =
|
|
145
|
+
| "manual_refresh"
|
|
146
|
+
| "webhook"
|
|
147
|
+
| "provider_create"
|
|
148
|
+
| "scheduled_refresh";
|
|
149
|
+
|
|
150
|
+
/** Próxima ação que o dono da conta precisa executar para destravar a subconta. */
|
|
151
|
+
export type AsaasOnboardingNextAction =
|
|
152
|
+
| "approved"
|
|
153
|
+
| "rejected"
|
|
154
|
+
| "awaiting_analysis"
|
|
155
|
+
| "open_onboarding_link"
|
|
156
|
+
| "send_documents_external"
|
|
157
|
+
| "fix_commercial_info"
|
|
158
|
+
| "pending_bank_account"
|
|
159
|
+
| "unknown";
|
|
160
|
+
|
|
161
|
+
/** Snapshot de GET /v3/myAccount/status. Sobrescrito inteiro a cada leitura/evento. */
|
|
162
|
+
export interface IAsaasAccountStatusSnapshot {
|
|
163
|
+
fetched_at: string;
|
|
164
|
+
source: AsaasOnboardingSource;
|
|
165
|
+
asaas_status_id?: string;
|
|
166
|
+
commercialInfo?: AsaasAccountStatusValue;
|
|
167
|
+
bankAccountInfo?: AsaasAccountStatusValue;
|
|
168
|
+
documentation?: AsaasAccountStatusValue;
|
|
169
|
+
general?: AsaasAccountStatusValue;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Grupo de documento pendente no Asaas.
|
|
174
|
+
* LGPD: apenas metadado (tipo, título, status, link). Nunca binário nem conteúdo de documento.
|
|
175
|
+
*/
|
|
176
|
+
export interface IAsaasOnboardingDocumentGroup {
|
|
177
|
+
id: string;
|
|
178
|
+
/** IDENTIFICATION | IDENTIFICATION_SELFIE | MINUTES_OF_ELECTION | CUSTOM */
|
|
179
|
+
type?: string;
|
|
180
|
+
title?: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
/** NOT_SENT | PENDING | APPROVED | REJECTED (NOT_SENT ocorre em produção, fora do enum documentado). */
|
|
183
|
+
status?: string;
|
|
184
|
+
/** Asaas devolve `onboardingUrl`; persistimos em snake_case. Null quando o envio deve ser por outro caminho. */
|
|
185
|
+
onboarding_url?: string | null;
|
|
186
|
+
responsible?: { name?: string | null; type?: string | null };
|
|
187
|
+
documents?: Array<{ id?: string; status?: string }>;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Snapshot de GET /v3/myAccount/documents + próxima ação derivada. */
|
|
191
|
+
export interface IAsaasOnboardingSnapshot {
|
|
192
|
+
documents_fetched_at: string;
|
|
193
|
+
reject_reasons?: unknown;
|
|
194
|
+
document_groups: IAsaasOnboardingDocumentGroup[];
|
|
195
|
+
next_action: AsaasOnboardingNextAction;
|
|
196
|
+
}
|
|
197
|
+
|
|
134
198
|
export interface IAsaasEnvAuthConfig {
|
|
135
199
|
enabled: boolean;
|
|
136
200
|
|
|
@@ -148,6 +212,12 @@ export interface IAsaasEnvAuthConfig {
|
|
|
148
212
|
// Account context for this environment (master/subaccount)
|
|
149
213
|
account_scope?: IAsaasAccountScope;
|
|
150
214
|
|
|
215
|
+
// Status cadastral da conta no Asaas (subconta ou conta própria).
|
|
216
|
+
account_status?: IAsaasAccountStatusSnapshot;
|
|
217
|
+
|
|
218
|
+
// Documentos pendentes e próxima ação de ativação.
|
|
219
|
+
onboarding?: IAsaasOnboardingSnapshot;
|
|
220
|
+
|
|
151
221
|
// Input data used only when creating subaccounts (not persisted).
|
|
152
222
|
subaccount_input?: IAsaasSubaccountInput;
|
|
153
223
|
|