mcp-supabase-crm-biancode 1.0.0 → 1.0.1
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/client.d.ts +4 -0
- package/dist/schemas/inputs.d.ts +7 -4
- package/dist/schemas/inputs.js +4 -3
- package/dist/tools/sales.js +1 -0
- package/package.json +1 -1
- package/src/client.ts +4 -0
- package/src/schemas/inputs.ts +4 -3
- package/src/tools/sales.ts +1 -0
package/dist/client.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface CreateSaleBody {
|
|
|
24
24
|
installment_start_date?: string;
|
|
25
25
|
status?: string;
|
|
26
26
|
goal_id?: string;
|
|
27
|
+
payment_method?: string;
|
|
27
28
|
tax_percentage?: number;
|
|
28
29
|
gateway_fee_percentage?: number;
|
|
29
30
|
sellers?: Array<{
|
|
@@ -34,9 +35,12 @@ export interface CreateSaleBody {
|
|
|
34
35
|
export interface CreateSaleResponse {
|
|
35
36
|
success: boolean;
|
|
36
37
|
sale_id: string;
|
|
38
|
+
goal_id: string | null;
|
|
37
39
|
installments_created: number;
|
|
38
40
|
receivables_created: number;
|
|
39
41
|
sellers_linked: number;
|
|
42
|
+
tax_percentage_applied: number;
|
|
43
|
+
gateway_fee_percentage_applied: number;
|
|
40
44
|
}
|
|
41
45
|
export declare function getSellers(): Promise<ListSellersResponse>;
|
|
42
46
|
export declare function createSale(body: CreateSaleBody): Promise<CreateSaleResponse>;
|
package/dist/schemas/inputs.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export declare const createSaleSchema: z.ZodObject<{
|
|
|
21
21
|
installment_start_date: z.ZodOptional<z.ZodString>;
|
|
22
22
|
status: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
23
23
|
goal_id: z.ZodOptional<z.ZodString>;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
payment_method: z.ZodDefault<z.ZodOptional<z.ZodEnum<["pix", "cartao_parcelado", "pix_parcelado"]>>>;
|
|
25
|
+
tax_percentage: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
gateway_fee_percentage: z.ZodOptional<z.ZodNumber>;
|
|
26
27
|
sellers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
28
|
seller_id: z.ZodString;
|
|
28
29
|
commission_amount: z.ZodNumber;
|
|
@@ -41,11 +42,12 @@ export declare const createSaleSchema: z.ZodObject<{
|
|
|
41
42
|
sale_date: string;
|
|
42
43
|
installments: number;
|
|
43
44
|
due_day: number;
|
|
44
|
-
|
|
45
|
-
gateway_fee_percentage: number;
|
|
45
|
+
payment_method: "pix" | "cartao_parcelado" | "pix_parcelado";
|
|
46
46
|
description?: string | undefined;
|
|
47
47
|
installment_start_date?: string | undefined;
|
|
48
48
|
goal_id?: string | undefined;
|
|
49
|
+
tax_percentage?: number | undefined;
|
|
50
|
+
gateway_fee_percentage?: number | undefined;
|
|
49
51
|
sellers?: {
|
|
50
52
|
seller_id: string;
|
|
51
53
|
commission_amount: number;
|
|
@@ -61,6 +63,7 @@ export declare const createSaleSchema: z.ZodObject<{
|
|
|
61
63
|
due_day?: number | undefined;
|
|
62
64
|
installment_start_date?: string | undefined;
|
|
63
65
|
goal_id?: string | undefined;
|
|
66
|
+
payment_method?: "pix" | "cartao_parcelado" | "pix_parcelado" | undefined;
|
|
64
67
|
tax_percentage?: number | undefined;
|
|
65
68
|
gateway_fee_percentage?: number | undefined;
|
|
66
69
|
sellers?: {
|
package/dist/schemas/inputs.js
CHANGED
|
@@ -15,9 +15,10 @@ export const createSaleSchema = z.object({
|
|
|
15
15
|
due_day: z.number().int().min(1).max(28).optional().default(15).describe("Dia do vencimento de cada parcela"),
|
|
16
16
|
installment_start_date: dateStr.optional().describe("Data da primeira parcela (YYYY-MM-DD)"),
|
|
17
17
|
status: z.string().optional().default("pending").describe("Status da venda"),
|
|
18
|
-
goal_id: z.string().uuid().optional().describe("UUID da meta associada"),
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
goal_id: z.string().uuid().optional().describe("UUID da meta associada (se omitido, usa Meta Anual automaticamente)"),
|
|
19
|
+
payment_method: z.enum(["pix", "cartao_parcelado", "pix_parcelado"]).optional().default("pix").describe("Metodo de pagamento: pix, cartao_parcelado ou pix_parcelado"),
|
|
20
|
+
tax_percentage: z.number().min(0).max(100).optional().describe("Percentual de imposto (se omitido, busca do banco)"),
|
|
21
|
+
gateway_fee_percentage: z.number().min(0).max(100).optional().describe("Percentual de taxa gateway (se omitido, busca do banco)"),
|
|
21
22
|
sellers: z
|
|
22
23
|
.array(sellerEntrySchema)
|
|
23
24
|
.optional()
|
package/dist/tools/sales.js
CHANGED
|
@@ -14,6 +14,7 @@ export async function createSaleTool(args) {
|
|
|
14
14
|
installment_start_date: args.installment_start_date,
|
|
15
15
|
status: args.status,
|
|
16
16
|
goal_id: args.goal_id,
|
|
17
|
+
payment_method: args.payment_method,
|
|
17
18
|
tax_percentage: args.tax_percentage,
|
|
18
19
|
gateway_fee_percentage: args.gateway_fee_percentage,
|
|
19
20
|
sellers: args.sellers,
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -87,6 +87,7 @@ export interface CreateSaleBody {
|
|
|
87
87
|
installment_start_date?: string;
|
|
88
88
|
status?: string;
|
|
89
89
|
goal_id?: string;
|
|
90
|
+
payment_method?: string;
|
|
90
91
|
tax_percentage?: number;
|
|
91
92
|
gateway_fee_percentage?: number;
|
|
92
93
|
sellers?: Array<{ seller_id: string; commission_amount: number }>;
|
|
@@ -95,9 +96,12 @@ export interface CreateSaleBody {
|
|
|
95
96
|
export interface CreateSaleResponse {
|
|
96
97
|
success: boolean;
|
|
97
98
|
sale_id: string;
|
|
99
|
+
goal_id: string | null;
|
|
98
100
|
installments_created: number;
|
|
99
101
|
receivables_created: number;
|
|
100
102
|
sellers_linked: number;
|
|
103
|
+
tax_percentage_applied: number;
|
|
104
|
+
gateway_fee_percentage_applied: number;
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
export async function getSellers(): Promise<ListSellersResponse> {
|
package/src/schemas/inputs.ts
CHANGED
|
@@ -19,9 +19,10 @@ export const createSaleSchema = z.object({
|
|
|
19
19
|
due_day: z.number().int().min(1).max(28).optional().default(15).describe("Dia do vencimento de cada parcela"),
|
|
20
20
|
installment_start_date: dateStr.optional().describe("Data da primeira parcela (YYYY-MM-DD)"),
|
|
21
21
|
status: z.string().optional().default("pending").describe("Status da venda"),
|
|
22
|
-
goal_id: z.string().uuid().optional().describe("UUID da meta associada"),
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
goal_id: z.string().uuid().optional().describe("UUID da meta associada (se omitido, usa Meta Anual automaticamente)"),
|
|
23
|
+
payment_method: z.enum(["pix", "cartao_parcelado", "pix_parcelado"]).optional().default("pix").describe("Metodo de pagamento: pix, cartao_parcelado ou pix_parcelado"),
|
|
24
|
+
tax_percentage: z.number().min(0).max(100).optional().describe("Percentual de imposto (se omitido, busca do banco)"),
|
|
25
|
+
gateway_fee_percentage: z.number().min(0).max(100).optional().describe("Percentual de taxa gateway (se omitido, busca do banco)"),
|
|
25
26
|
sellers: z
|
|
26
27
|
.array(sellerEntrySchema)
|
|
27
28
|
.optional()
|
package/src/tools/sales.ts
CHANGED
|
@@ -22,6 +22,7 @@ export async function createSaleTool(
|
|
|
22
22
|
installment_start_date: args.installment_start_date,
|
|
23
23
|
status: args.status,
|
|
24
24
|
goal_id: args.goal_id,
|
|
25
|
+
payment_method: args.payment_method,
|
|
25
26
|
tax_percentage: args.tax_percentage,
|
|
26
27
|
gateway_fee_percentage: args.gateway_fee_percentage,
|
|
27
28
|
sellers: args.sellers,
|