evo360-types 1.3.202 → 1.3.205
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-finops/zod-schemas.d.ts +1703 -19
- package/dist/apps/evo-finops/zod-schemas.js +22 -3
- package/dist/apps/evo-finops/zod-schemas.ts +21 -2
- package/dist/types/evo-finops/providers/asaas/asaas_provider.d.ts +21 -1
- package/dist/types/evo-finops/providers/asaas/asaas_provider.ts +26 -1
- package/dist/types/evo-finops/providers/index.d.ts +3 -0
- package/dist/types/evo-finops/providers/index.js +3 -0
- package/dist/types/evo-finops/providers/index.ts +3 -0
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.zProviderPayloadSnapshotSchema = exports.zProviderTraceSchema = exports.zProviderInvoiceErrorSchema = exports.zProviderInvoiceIdentifiersSchema = exports.zProviderInvoiceLinksSchema = exports.zServiceTaxInfoSchema = exports.zServiceLineItemSchema = exports.zServiceInvoiceStateSchema = exports.zProviderServiceInvoiceStatusSchema = exports.zInvoiceSourceRefSchema = exports.zInvoiceSourceTypeSchema = exports.zInvoiceTakerRefSchema = exports.zInvoiceTakerSnapshotSchema = exports.zInvoiceTakerSnapshotAddressSchema = exports.zTakerDocumentSchema = exports.zTakerTaxProfileSchema = exports.zTakerProviderRefsSchema = exports.zTakerAddressSchema = exports.zInvoiceTakerTypeSchema = exports.zIssuerTaxProfileSchema = exports.zIssuerNfseConfigSchema = exports.zIssuerMunicipalCredentialsRefSchema = exports.zIssuerTaxRegimeSchema = exports.zIssuerCompanyIdentitySchema = exports.zIssuerCompanyAddressSchema = exports.zTaxProfileSyncStateSchema = exports.zAsaasProviderSchema = exports.zAsaasProviderAsaasBlockSchema = exports.zAsaasProviderCapabilitiesSchema = exports.zAsaasPaymentsCapabilitiesSchema = exports.zAsaasNfseCapabilitiesSchema = exports.zAsaasEnvAuthConfigSchema = exports.zAsaasSubaccountInputSchema = exports.zAsaasAccountScopeSchema = exports.zAsaasWebhookConfigSchema = exports.zRetryPolicySchema = exports.zAsaasWebhookEventSchema = exports.zAsaasAccountScopeModeSchema = exports.zProviderRemoteRefsSchema = exports.zProviderFiscalInfoPayloadSchema = exports.zProviderCredentialsInputSchema = exports.zProviderCredentialsSecretRefsSchema = exports.zProviderMunicipalOptionsSnapshotSchema = exports.zProviderOptionItemSchema = exports.zProviderMunicipalAuthTypeSchema = exports.zFinopsProviderBaseSchema = exports.zProviderStatusSchema = exports.zFinopsActionSchema = exports.zFinopsProviderTypeSchema = exports.zProviderEnvSchema = void 0;
|
|
4
|
+
exports.zServiceInvoiceSchema = void 0;
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
7
|
// ---- Provider enums and base ----
|
|
7
8
|
exports.zProviderEnvSchema = zod_1.z.enum(["Sandbox", "Production"]);
|
|
8
|
-
exports.zFinopsProviderTypeSchema = zod_1.z.enum(["asaas", "unknown"]);
|
|
9
|
+
exports.zFinopsProviderTypeSchema = zod_1.z.enum(["asaas", "asaas_subaccount", "unknown"]);
|
|
9
10
|
exports.zFinopsActionSchema = zod_1.z.enum([
|
|
10
11
|
"nfse.issue",
|
|
11
12
|
"nfse.cancel",
|
|
@@ -183,6 +184,23 @@ exports.zAsaasAccountScopeSchema = zod_1.z
|
|
|
183
184
|
mode: exports.zAsaasAccountScopeModeSchema,
|
|
184
185
|
asaas_account_id: zod_1.z.string().optional(),
|
|
185
186
|
owner_asaas_account_id: zod_1.z.string().optional(),
|
|
187
|
+
wallet_id: zod_1.z.string().optional(),
|
|
188
|
+
})
|
|
189
|
+
.passthrough();
|
|
190
|
+
exports.zAsaasSubaccountInputSchema = zod_1.z
|
|
191
|
+
.object({
|
|
192
|
+
name: zod_1.z.string().optional(),
|
|
193
|
+
email: zod_1.z.string().optional(),
|
|
194
|
+
cpfCnpj: zod_1.z.string().optional(),
|
|
195
|
+
birthDate: zod_1.z.string().optional(),
|
|
196
|
+
companyType: zod_1.z.string().optional(),
|
|
197
|
+
phone: zod_1.z.string().optional(),
|
|
198
|
+
mobilePhone: zod_1.z.string().optional(),
|
|
199
|
+
address: zod_1.z.string().optional(),
|
|
200
|
+
addressNumber: zod_1.z.string().optional(),
|
|
201
|
+
complement: zod_1.z.string().optional(),
|
|
202
|
+
province: zod_1.z.string().optional(),
|
|
203
|
+
postalCode: zod_1.z.string().optional(),
|
|
186
204
|
})
|
|
187
205
|
.passthrough();
|
|
188
206
|
exports.zAsaasEnvAuthConfigSchema = zod_1.z
|
|
@@ -194,6 +212,7 @@ exports.zAsaasEnvAuthConfigSchema = zod_1.z
|
|
|
194
212
|
retry_policy: exports.zRetryPolicySchema.optional(),
|
|
195
213
|
webhook: exports.zAsaasWebhookConfigSchema.optional(),
|
|
196
214
|
account_scope: exports.zAsaasAccountScopeSchema.optional(),
|
|
215
|
+
subaccount_input: exports.zAsaasSubaccountInputSchema.optional(),
|
|
197
216
|
operational: zod_1.z
|
|
198
217
|
.object({
|
|
199
218
|
rate_limit_max_per_minute: zod_1.z.number().optional(),
|
|
@@ -223,7 +242,7 @@ exports.zAsaasProviderAsaasBlockSchema = zod_1.z.object({
|
|
|
223
242
|
capabilities: exports.zAsaasProviderCapabilitiesSchema,
|
|
224
243
|
});
|
|
225
244
|
exports.zAsaasProviderSchema = exports.zFinopsProviderBaseSchema.extend({
|
|
226
|
-
type: zod_1.z.
|
|
245
|
+
type: zod_1.z.enum(["asaas", "asaas_subaccount"]),
|
|
227
246
|
asaas: exports.zAsaasProviderAsaasBlockSchema,
|
|
228
247
|
}).passthrough();
|
|
229
248
|
// ---- Issuer tax profile ----
|
|
@@ -3,7 +3,7 @@ import { zFireDocSchema, zFirestoreDateSchema } from "../shared/zod-schemas";
|
|
|
3
3
|
|
|
4
4
|
// ---- Provider enums and base ----
|
|
5
5
|
export const zProviderEnvSchema = z.enum(["Sandbox", "Production"]);
|
|
6
|
-
export const zFinopsProviderTypeSchema = z.enum(["asaas", "unknown"]);
|
|
6
|
+
export const zFinopsProviderTypeSchema = z.enum(["asaas", "asaas_subaccount", "unknown"]);
|
|
7
7
|
export const zFinopsActionSchema = z.enum([
|
|
8
8
|
"nfse.issue",
|
|
9
9
|
"nfse.cancel",
|
|
@@ -194,6 +194,24 @@ export const zAsaasAccountScopeSchema = z
|
|
|
194
194
|
mode: zAsaasAccountScopeModeSchema,
|
|
195
195
|
asaas_account_id: z.string().optional(),
|
|
196
196
|
owner_asaas_account_id: z.string().optional(),
|
|
197
|
+
wallet_id: z.string().optional(),
|
|
198
|
+
})
|
|
199
|
+
.passthrough();
|
|
200
|
+
|
|
201
|
+
export const zAsaasSubaccountInputSchema = z
|
|
202
|
+
.object({
|
|
203
|
+
name: z.string().optional(),
|
|
204
|
+
email: z.string().optional(),
|
|
205
|
+
cpfCnpj: z.string().optional(),
|
|
206
|
+
birthDate: z.string().optional(),
|
|
207
|
+
companyType: z.string().optional(),
|
|
208
|
+
phone: z.string().optional(),
|
|
209
|
+
mobilePhone: z.string().optional(),
|
|
210
|
+
address: z.string().optional(),
|
|
211
|
+
addressNumber: z.string().optional(),
|
|
212
|
+
complement: z.string().optional(),
|
|
213
|
+
province: z.string().optional(),
|
|
214
|
+
postalCode: z.string().optional(),
|
|
197
215
|
})
|
|
198
216
|
.passthrough();
|
|
199
217
|
|
|
@@ -206,6 +224,7 @@ export const zAsaasEnvAuthConfigSchema = z
|
|
|
206
224
|
retry_policy: zRetryPolicySchema.optional(),
|
|
207
225
|
webhook: zAsaasWebhookConfigSchema.optional(),
|
|
208
226
|
account_scope: zAsaasAccountScopeSchema.optional(),
|
|
227
|
+
subaccount_input: zAsaasSubaccountInputSchema.optional(),
|
|
209
228
|
operational: z
|
|
210
229
|
.object({
|
|
211
230
|
rate_limit_max_per_minute: z.number().optional(),
|
|
@@ -240,7 +259,7 @@ export const zAsaasProviderAsaasBlockSchema = z.object({
|
|
|
240
259
|
});
|
|
241
260
|
|
|
242
261
|
export const zAsaasProviderSchema = zFinopsProviderBaseSchema.extend({
|
|
243
|
-
type: z.
|
|
262
|
+
type: z.enum(["asaas", "asaas_subaccount"]),
|
|
244
263
|
asaas: zAsaasProviderAsaasBlockSchema,
|
|
245
264
|
}).passthrough();
|
|
246
265
|
|
|
@@ -42,6 +42,25 @@ export interface IAsaasAccountScope {
|
|
|
42
42
|
mode: AsaasAccountScopeMode;
|
|
43
43
|
asaas_account_id?: string;
|
|
44
44
|
owner_asaas_account_id?: string;
|
|
45
|
+
wallet_id?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IAsaasSubaccountInput {
|
|
48
|
+
name?: string;
|
|
49
|
+
email?: string;
|
|
50
|
+
cpfCnpj?: string;
|
|
51
|
+
birthDate?: string;
|
|
52
|
+
companyType?: string;
|
|
53
|
+
phone?: string;
|
|
54
|
+
mobilePhone?: string;
|
|
55
|
+
address?: string;
|
|
56
|
+
addressNumber?: string;
|
|
57
|
+
complement?: string;
|
|
58
|
+
province?: string;
|
|
59
|
+
postalCode?: string;
|
|
60
|
+
/** Renda/faturamento mensal em centavos. Obrigatório na API Asaas. */
|
|
61
|
+
incomeValue?: number;
|
|
62
|
+
site?: string;
|
|
63
|
+
[key: string]: unknown;
|
|
45
64
|
}
|
|
46
65
|
export interface IAsaasEnvAuthConfig {
|
|
47
66
|
enabled: boolean;
|
|
@@ -51,6 +70,7 @@ export interface IAsaasEnvAuthConfig {
|
|
|
51
70
|
retry_policy?: IRetryPolicy;
|
|
52
71
|
webhook?: IAsaasWebhookConfig;
|
|
53
72
|
account_scope?: IAsaasAccountScope;
|
|
73
|
+
subaccount_input?: IAsaasSubaccountInput;
|
|
54
74
|
operational?: {
|
|
55
75
|
rate_limit_max_per_minute?: number;
|
|
56
76
|
};
|
|
@@ -77,6 +97,6 @@ export interface IAsaasProviderAsaasBlock {
|
|
|
77
97
|
capabilities: IAsaasProviderCapabilities;
|
|
78
98
|
}
|
|
79
99
|
export interface AsaasProvider extends IFinopsProviderBase {
|
|
80
|
-
type: "asaas";
|
|
100
|
+
type: "asaas" | "asaas_subaccount";
|
|
81
101
|
asaas: IAsaasProviderAsaasBlock;
|
|
82
102
|
}
|
|
@@ -67,6 +67,28 @@ export interface IAsaasAccountScope {
|
|
|
67
67
|
|
|
68
68
|
// If you ever need to track which master owns a subaccount.
|
|
69
69
|
owner_asaas_account_id?: string;
|
|
70
|
+
|
|
71
|
+
// Useful for split operations in the future.
|
|
72
|
+
wallet_id?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface IAsaasSubaccountInput {
|
|
76
|
+
name?: string;
|
|
77
|
+
email?: string;
|
|
78
|
+
cpfCnpj?: string;
|
|
79
|
+
birthDate?: string;
|
|
80
|
+
companyType?: string;
|
|
81
|
+
phone?: string;
|
|
82
|
+
mobilePhone?: string;
|
|
83
|
+
address?: string;
|
|
84
|
+
addressNumber?: string;
|
|
85
|
+
complement?: string;
|
|
86
|
+
province?: string;
|
|
87
|
+
postalCode?: string;
|
|
88
|
+
/** Renda/faturamento mensal em centavos. Obrigatório na API Asaas. */
|
|
89
|
+
incomeValue?: number;
|
|
90
|
+
site?: string;
|
|
91
|
+
[key: string]: unknown;
|
|
70
92
|
}
|
|
71
93
|
|
|
72
94
|
export interface IAsaasEnvAuthConfig {
|
|
@@ -86,6 +108,9 @@ export interface IAsaasEnvAuthConfig {
|
|
|
86
108
|
// Account context for this environment (master/subaccount)
|
|
87
109
|
account_scope?: IAsaasAccountScope;
|
|
88
110
|
|
|
111
|
+
// Input data used only when creating subaccounts (not persisted).
|
|
112
|
+
subaccount_input?: IAsaasSubaccountInput;
|
|
113
|
+
|
|
89
114
|
// Operational knobs
|
|
90
115
|
operational?: {
|
|
91
116
|
rate_limit_max_per_minute?: number;
|
|
@@ -124,6 +149,6 @@ export interface IAsaasProviderAsaasBlock {
|
|
|
124
149
|
}
|
|
125
150
|
|
|
126
151
|
export interface AsaasProvider extends IFinopsProviderBase {
|
|
127
|
-
type: "asaas";
|
|
152
|
+
type: "asaas" | "asaas_subaccount";
|
|
128
153
|
asaas: IAsaasProviderAsaasBlock;
|
|
129
154
|
}
|
|
@@ -13,7 +13,10 @@ export declare enum ProviderEnvEnum {
|
|
|
13
13
|
}
|
|
14
14
|
export type ProviderEnv = `${ProviderEnvEnum}`;
|
|
15
15
|
export declare enum FinopsProviderTypeEnum {
|
|
16
|
+
/** Conta Asaas própria do cliente (token informado pelo cliente). */
|
|
16
17
|
Asaas = "asaas",
|
|
18
|
+
/** Subconta Asaas criada via conta master Hub Médica. */
|
|
19
|
+
AsaasSubaccount = "asaas_subaccount",
|
|
17
20
|
Unknown = "unknown"
|
|
18
21
|
}
|
|
19
22
|
export type FinopsProviderType = `${FinopsProviderTypeEnum}`;
|
|
@@ -16,7 +16,10 @@ var ProviderEnvEnum;
|
|
|
16
16
|
})(ProviderEnvEnum || (exports.ProviderEnvEnum = ProviderEnvEnum = {}));
|
|
17
17
|
var FinopsProviderTypeEnum;
|
|
18
18
|
(function (FinopsProviderTypeEnum) {
|
|
19
|
+
/** Conta Asaas própria do cliente (token informado pelo cliente). */
|
|
19
20
|
FinopsProviderTypeEnum["Asaas"] = "asaas";
|
|
21
|
+
/** Subconta Asaas criada via conta master Hub Médica. */
|
|
22
|
+
FinopsProviderTypeEnum["AsaasSubaccount"] = "asaas_subaccount";
|
|
20
23
|
FinopsProviderTypeEnum["Unknown"] = "unknown";
|
|
21
24
|
})(FinopsProviderTypeEnum || (exports.FinopsProviderTypeEnum = FinopsProviderTypeEnum = {}));
|
|
22
25
|
var FinopsActionEnum;
|
|
@@ -19,7 +19,10 @@ export enum ProviderEnvEnum {
|
|
|
19
19
|
export type ProviderEnv = `${ProviderEnvEnum}`;
|
|
20
20
|
|
|
21
21
|
export enum FinopsProviderTypeEnum {
|
|
22
|
+
/** Conta Asaas própria do cliente (token informado pelo cliente). */
|
|
22
23
|
Asaas = "asaas",
|
|
24
|
+
/** Subconta Asaas criada via conta master Hub Médica. */
|
|
25
|
+
AsaasSubaccount = "asaas_subaccount",
|
|
23
26
|
Unknown = "unknown",
|
|
24
27
|
}
|
|
25
28
|
export type FinopsProviderType = `${FinopsProviderTypeEnum}`;
|