@vitrina/api 15.18.0 → 15.19.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/dist/index.d.cts +187 -6
- package/dist/index.d.ts +187 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -87872,6 +87872,126 @@ interface paths {
|
|
|
87872
87872
|
patch?: never;
|
|
87873
87873
|
trace?: never;
|
|
87874
87874
|
};
|
|
87875
|
+
"/finanzas/alerts": {
|
|
87876
|
+
parameters: {
|
|
87877
|
+
query?: never;
|
|
87878
|
+
header?: never;
|
|
87879
|
+
path?: never;
|
|
87880
|
+
cookie?: never;
|
|
87881
|
+
};
|
|
87882
|
+
/**
|
|
87883
|
+
* Active Finanzas alerts
|
|
87884
|
+
* @description The alerts whose condition still holds: `cash_negative` (the Flujo de caja projection drops below zero in the next 30 days), `f29_due` (an F29 with something to pay is due within 5 days, unpaid) and `supplier_invoice_missing` (a Contraparte that invoiced each of the last 3 months has nothing this month, 3 days past its usual day). Evaluated hourly from 09:00 workspace time; each event is announced once to the owners and admins (bell and email by default; WhatsApp only on the opt-in `finanzas_whatsapp` rail) and leaves this list when its condition ends. Newest first. Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise) and `finanzas:read`; the cash alert is listed only with `finanzas_reports:read` too.
|
|
87885
|
+
*/
|
|
87886
|
+
get: {
|
|
87887
|
+
parameters: {
|
|
87888
|
+
query?: never;
|
|
87889
|
+
header?: never;
|
|
87890
|
+
path?: never;
|
|
87891
|
+
cookie?: never;
|
|
87892
|
+
};
|
|
87893
|
+
requestBody?: never;
|
|
87894
|
+
responses: {
|
|
87895
|
+
/** @description The active alerts */
|
|
87896
|
+
200: {
|
|
87897
|
+
headers: {
|
|
87898
|
+
[name: string]: unknown;
|
|
87899
|
+
};
|
|
87900
|
+
content: {
|
|
87901
|
+
/**
|
|
87902
|
+
* @example {
|
|
87903
|
+
* "data": [
|
|
87904
|
+
* {
|
|
87905
|
+
* "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8a01",
|
|
87906
|
+
* "kind": "f29_due",
|
|
87907
|
+
* "title": "El F29 de octubre vence el 20 de noviembre",
|
|
87908
|
+
* "body": "Hay que pagar $842.000 (monto estimado) al SII antes del 20 de noviembre. Cuando el pago aparezca en tus movimientos, el F29 queda como pagado.",
|
|
87909
|
+
* "cta_label": "Ver F29",
|
|
87910
|
+
* "path": "/finanzas/documentos?vista=f29",
|
|
87911
|
+
* "opened_on": "2026-11-15",
|
|
87912
|
+
* "notified_at": "2026-11-15T12:00:04.000Z",
|
|
87913
|
+
* "updated_at": "2026-11-16T12:00:03.000Z",
|
|
87914
|
+
* "data": {
|
|
87915
|
+
* "period": "2026-10",
|
|
87916
|
+
* "due_date": "2026-11-20",
|
|
87917
|
+
* "amount_clp": 842000,
|
|
87918
|
+
* "days_left": 4,
|
|
87919
|
+
* "amount_is_final": false,
|
|
87920
|
+
* "document_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7a01"
|
|
87921
|
+
* }
|
|
87922
|
+
* }
|
|
87923
|
+
* ]
|
|
87924
|
+
* }
|
|
87925
|
+
*/
|
|
87926
|
+
"application/json": {
|
|
87927
|
+
data: components["schemas"]["FinanzasAlertList"];
|
|
87928
|
+
};
|
|
87929
|
+
};
|
|
87930
|
+
};
|
|
87931
|
+
/** @description Validation error */
|
|
87932
|
+
400: {
|
|
87933
|
+
headers: {
|
|
87934
|
+
[name: string]: unknown;
|
|
87935
|
+
};
|
|
87936
|
+
content: {
|
|
87937
|
+
"application/json": components["schemas"]["Error"];
|
|
87938
|
+
};
|
|
87939
|
+
};
|
|
87940
|
+
/** @description Unauthorized */
|
|
87941
|
+
401: {
|
|
87942
|
+
headers: {
|
|
87943
|
+
[name: string]: unknown;
|
|
87944
|
+
};
|
|
87945
|
+
content: {
|
|
87946
|
+
"application/json": components["schemas"]["Error"];
|
|
87947
|
+
};
|
|
87948
|
+
};
|
|
87949
|
+
/** @description Forbidden */
|
|
87950
|
+
403: {
|
|
87951
|
+
headers: {
|
|
87952
|
+
[name: string]: unknown;
|
|
87953
|
+
};
|
|
87954
|
+
content: {
|
|
87955
|
+
"application/json": components["schemas"]["Error"];
|
|
87956
|
+
};
|
|
87957
|
+
};
|
|
87958
|
+
/** @description Not found */
|
|
87959
|
+
404: {
|
|
87960
|
+
headers: {
|
|
87961
|
+
[name: string]: unknown;
|
|
87962
|
+
};
|
|
87963
|
+
content: {
|
|
87964
|
+
"application/json": components["schemas"]["Error"];
|
|
87965
|
+
};
|
|
87966
|
+
};
|
|
87967
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
87968
|
+
409: {
|
|
87969
|
+
headers: {
|
|
87970
|
+
[name: string]: unknown;
|
|
87971
|
+
};
|
|
87972
|
+
content: {
|
|
87973
|
+
"application/json": components["schemas"]["Error"];
|
|
87974
|
+
};
|
|
87975
|
+
};
|
|
87976
|
+
/** @description Rate limited */
|
|
87977
|
+
429: {
|
|
87978
|
+
headers: {
|
|
87979
|
+
[name: string]: unknown;
|
|
87980
|
+
};
|
|
87981
|
+
content: {
|
|
87982
|
+
"application/json": components["schemas"]["Error"];
|
|
87983
|
+
};
|
|
87984
|
+
};
|
|
87985
|
+
};
|
|
87986
|
+
};
|
|
87987
|
+
put?: never;
|
|
87988
|
+
post?: never;
|
|
87989
|
+
delete?: never;
|
|
87990
|
+
options?: never;
|
|
87991
|
+
head?: never;
|
|
87992
|
+
patch?: never;
|
|
87993
|
+
trace?: never;
|
|
87994
|
+
};
|
|
87875
87995
|
"/finanzas/costos": {
|
|
87876
87996
|
parameters: {
|
|
87877
87997
|
query?: never;
|
|
@@ -254697,7 +254817,7 @@ interface components {
|
|
|
254697
254817
|
/** @enum {string} */
|
|
254698
254818
|
kind: "page";
|
|
254699
254819
|
/** @enum {string} */
|
|
254700
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254820
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254701
254821
|
params?: {
|
|
254702
254822
|
[key: string]: string | number | boolean;
|
|
254703
254823
|
};
|
|
@@ -254739,7 +254859,7 @@ interface components {
|
|
|
254739
254859
|
/** @enum {string} */
|
|
254740
254860
|
kind: "page";
|
|
254741
254861
|
/** @enum {string} */
|
|
254742
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254862
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254743
254863
|
params?: {
|
|
254744
254864
|
[key: string]: string | number | boolean;
|
|
254745
254865
|
};
|
|
@@ -254766,7 +254886,7 @@ interface components {
|
|
|
254766
254886
|
/** @enum {string} */
|
|
254767
254887
|
kind: "page";
|
|
254768
254888
|
/** @enum {string} */
|
|
254769
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254889
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254770
254890
|
params?: {
|
|
254771
254891
|
[key: string]: string | number | boolean;
|
|
254772
254892
|
};
|
|
@@ -254780,11 +254900,11 @@ interface components {
|
|
|
254780
254900
|
/** @enum {string} */
|
|
254781
254901
|
preset: "important" | "all" | "custom";
|
|
254782
254902
|
push_enabled: boolean;
|
|
254783
|
-
categories: ("inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "safety" | "account")[];
|
|
254903
|
+
categories: ("inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "finanzas" | "safety" | "account")[];
|
|
254784
254904
|
types: {
|
|
254785
254905
|
key: string;
|
|
254786
254906
|
/** @enum {string} */
|
|
254787
|
-
category: "inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "safety" | "account";
|
|
254907
|
+
category: "inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "finanzas" | "safety" | "account";
|
|
254788
254908
|
/** @description i18n slug: the UI renders `notif.<slug>.title` / `.when`. */
|
|
254789
254909
|
slug: string;
|
|
254790
254910
|
mandatory: boolean;
|
|
@@ -254864,7 +254984,7 @@ interface components {
|
|
|
254864
254984
|
perfect_battery_pct?: number;
|
|
254865
254985
|
currency?: string;
|
|
254866
254986
|
};
|
|
254867
|
-
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
|
|
254987
|
+
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_whatsapp`, `finanzas_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
|
|
254868
254988
|
notifications?: {
|
|
254869
254989
|
staff_whatsapp?: {
|
|
254870
254990
|
enabled?: boolean;
|
|
@@ -254899,6 +255019,13 @@ interface components {
|
|
|
254899
255019
|
template_language?: string;
|
|
254900
255020
|
change_template_name?: string;
|
|
254901
255021
|
};
|
|
255022
|
+
finanzas_whatsapp?: {
|
|
255023
|
+
enabled?: boolean;
|
|
255024
|
+
/** Format: uuid */
|
|
255025
|
+
account_id?: string;
|
|
255026
|
+
template_name?: string;
|
|
255027
|
+
template_language?: string;
|
|
255028
|
+
};
|
|
254902
255029
|
stock_alert?: {
|
|
254903
255030
|
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
254904
255031
|
stage_ids: string[];
|
|
@@ -254966,6 +255093,26 @@ interface components {
|
|
|
254966
255093
|
rejection_reason: string | null;
|
|
254967
255094
|
}[];
|
|
254968
255095
|
};
|
|
255096
|
+
finanzas_whatsapp: {
|
|
255097
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
255098
|
+
armed: boolean;
|
|
255099
|
+
/**
|
|
255100
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
255101
|
+
* @enum {string}
|
|
255102
|
+
*/
|
|
255103
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
255104
|
+
reason: string | null;
|
|
255105
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
255106
|
+
wired: boolean;
|
|
255107
|
+
templates: {
|
|
255108
|
+
key: string;
|
|
255109
|
+
name: string;
|
|
255110
|
+
language: string;
|
|
255111
|
+
/** @enum {string} */
|
|
255112
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
255113
|
+
rejection_reason: string | null;
|
|
255114
|
+
}[];
|
|
255115
|
+
};
|
|
254969
255116
|
reminder_whatsapp: {
|
|
254970
255117
|
/** @description The rail is switched on (`enabled: true`). */
|
|
254971
255118
|
armed: boolean;
|
|
@@ -255217,6 +255364,13 @@ interface components {
|
|
|
255217
255364
|
template_language?: string;
|
|
255218
255365
|
change_template_name?: string;
|
|
255219
255366
|
};
|
|
255367
|
+
finanzas_whatsapp?: {
|
|
255368
|
+
enabled?: boolean;
|
|
255369
|
+
/** Format: uuid */
|
|
255370
|
+
account_id?: string;
|
|
255371
|
+
template_name?: string;
|
|
255372
|
+
template_language?: string;
|
|
255373
|
+
};
|
|
255220
255374
|
stock_alert?: {
|
|
255221
255375
|
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
255222
255376
|
stage_ids: string[];
|
|
@@ -259132,6 +259286,33 @@ interface components {
|
|
|
259132
259286
|
/** @description The last day an occurrence may fall on. Default: today (the day before it starts, if it has not started). */
|
|
259133
259287
|
ends_on?: string | null;
|
|
259134
259288
|
};
|
|
259289
|
+
FinanzasAlert: {
|
|
259290
|
+
/** Format: uuid */
|
|
259291
|
+
id: string;
|
|
259292
|
+
/**
|
|
259293
|
+
* @description `cash_negative`: the Flujo de caja projection drops below zero in the next 30 days. `f29_due`: an F29 with something to pay is due within 5 days and is unpaid. `supplier_invoice_missing`: a Contraparte that invoiced each of the last 3 months has no invoice this month, 3 days past its usual day.
|
|
259294
|
+
* @enum {string}
|
|
259295
|
+
*/
|
|
259296
|
+
kind: "cash_negative" | "f29_due" | "supplier_invoice_missing";
|
|
259297
|
+
/** @description One line, Spanish. */
|
|
259298
|
+
title: string;
|
|
259299
|
+
/** @description What happened and what to do. */
|
|
259300
|
+
body: string;
|
|
259301
|
+
/** @description The button that fixes it. */
|
|
259302
|
+
cta_label: string;
|
|
259303
|
+
/** @description Workspace-relative screen that fixes it (`/finanzas/reportes/flujo-de-caja`, `/finanzas/documentos?vista=f29`, `/finanzas/contrapartes/<id>`). */
|
|
259304
|
+
path: string;
|
|
259305
|
+
/** @description Day first seen (YYYY-MM-DD, Santiago). */
|
|
259306
|
+
opened_on: string;
|
|
259307
|
+
/** @description When the members were told; null until then. */
|
|
259308
|
+
notified_at: string | null;
|
|
259309
|
+
updated_at: string;
|
|
259310
|
+
/** @description The facts, whole CLP. cash_negative: `lowest_date`, `lowest_balance_clp`, `today_balance_clp`, `cause_label`, `cause_amount_clp`, `horizon_days`. f29_due: `period`, `due_date`, `amount_clp`, `days_left`, `amount_is_final`, `document_id`. supplier_invoice_missing: `contraparte_id`, `contraparte_name`, `period`, `usual_day`, `typical_amount_clp`, `months_invoiced`. */
|
|
259311
|
+
data: {
|
|
259312
|
+
[key: string]: unknown;
|
|
259313
|
+
};
|
|
259314
|
+
};
|
|
259315
|
+
FinanzasAlertList: components["schemas"]["FinanzasAlert"][];
|
|
259135
259316
|
FinanzasCostos: {
|
|
259136
259317
|
from: string;
|
|
259137
259318
|
to: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -87872,6 +87872,126 @@ interface paths {
|
|
|
87872
87872
|
patch?: never;
|
|
87873
87873
|
trace?: never;
|
|
87874
87874
|
};
|
|
87875
|
+
"/finanzas/alerts": {
|
|
87876
|
+
parameters: {
|
|
87877
|
+
query?: never;
|
|
87878
|
+
header?: never;
|
|
87879
|
+
path?: never;
|
|
87880
|
+
cookie?: never;
|
|
87881
|
+
};
|
|
87882
|
+
/**
|
|
87883
|
+
* Active Finanzas alerts
|
|
87884
|
+
* @description The alerts whose condition still holds: `cash_negative` (the Flujo de caja projection drops below zero in the next 30 days), `f29_due` (an F29 with something to pay is due within 5 days, unpaid) and `supplier_invoice_missing` (a Contraparte that invoiced each of the last 3 months has nothing this month, 3 days past its usual day). Evaluated hourly from 09:00 workspace time; each event is announced once to the owners and admins (bell and email by default; WhatsApp only on the opt-in `finanzas_whatsapp` rail) and leaves this list when its condition ends. Newest first. Requires the `finanzas` add-on (402 `ENTITLEMENT_NOT_ACTIVE` otherwise) and `finanzas:read`; the cash alert is listed only with `finanzas_reports:read` too.
|
|
87885
|
+
*/
|
|
87886
|
+
get: {
|
|
87887
|
+
parameters: {
|
|
87888
|
+
query?: never;
|
|
87889
|
+
header?: never;
|
|
87890
|
+
path?: never;
|
|
87891
|
+
cookie?: never;
|
|
87892
|
+
};
|
|
87893
|
+
requestBody?: never;
|
|
87894
|
+
responses: {
|
|
87895
|
+
/** @description The active alerts */
|
|
87896
|
+
200: {
|
|
87897
|
+
headers: {
|
|
87898
|
+
[name: string]: unknown;
|
|
87899
|
+
};
|
|
87900
|
+
content: {
|
|
87901
|
+
/**
|
|
87902
|
+
* @example {
|
|
87903
|
+
* "data": [
|
|
87904
|
+
* {
|
|
87905
|
+
* "id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f8a01",
|
|
87906
|
+
* "kind": "f29_due",
|
|
87907
|
+
* "title": "El F29 de octubre vence el 20 de noviembre",
|
|
87908
|
+
* "body": "Hay que pagar $842.000 (monto estimado) al SII antes del 20 de noviembre. Cuando el pago aparezca en tus movimientos, el F29 queda como pagado.",
|
|
87909
|
+
* "cta_label": "Ver F29",
|
|
87910
|
+
* "path": "/finanzas/documentos?vista=f29",
|
|
87911
|
+
* "opened_on": "2026-11-15",
|
|
87912
|
+
* "notified_at": "2026-11-15T12:00:04.000Z",
|
|
87913
|
+
* "updated_at": "2026-11-16T12:00:03.000Z",
|
|
87914
|
+
* "data": {
|
|
87915
|
+
* "period": "2026-10",
|
|
87916
|
+
* "due_date": "2026-11-20",
|
|
87917
|
+
* "amount_clp": 842000,
|
|
87918
|
+
* "days_left": 4,
|
|
87919
|
+
* "amount_is_final": false,
|
|
87920
|
+
* "document_id": "0190a3c2-5d1e-7b6a-9f20-4c1d2e3f7a01"
|
|
87921
|
+
* }
|
|
87922
|
+
* }
|
|
87923
|
+
* ]
|
|
87924
|
+
* }
|
|
87925
|
+
*/
|
|
87926
|
+
"application/json": {
|
|
87927
|
+
data: components["schemas"]["FinanzasAlertList"];
|
|
87928
|
+
};
|
|
87929
|
+
};
|
|
87930
|
+
};
|
|
87931
|
+
/** @description Validation error */
|
|
87932
|
+
400: {
|
|
87933
|
+
headers: {
|
|
87934
|
+
[name: string]: unknown;
|
|
87935
|
+
};
|
|
87936
|
+
content: {
|
|
87937
|
+
"application/json": components["schemas"]["Error"];
|
|
87938
|
+
};
|
|
87939
|
+
};
|
|
87940
|
+
/** @description Unauthorized */
|
|
87941
|
+
401: {
|
|
87942
|
+
headers: {
|
|
87943
|
+
[name: string]: unknown;
|
|
87944
|
+
};
|
|
87945
|
+
content: {
|
|
87946
|
+
"application/json": components["schemas"]["Error"];
|
|
87947
|
+
};
|
|
87948
|
+
};
|
|
87949
|
+
/** @description Forbidden */
|
|
87950
|
+
403: {
|
|
87951
|
+
headers: {
|
|
87952
|
+
[name: string]: unknown;
|
|
87953
|
+
};
|
|
87954
|
+
content: {
|
|
87955
|
+
"application/json": components["schemas"]["Error"];
|
|
87956
|
+
};
|
|
87957
|
+
};
|
|
87958
|
+
/** @description Not found */
|
|
87959
|
+
404: {
|
|
87960
|
+
headers: {
|
|
87961
|
+
[name: string]: unknown;
|
|
87962
|
+
};
|
|
87963
|
+
content: {
|
|
87964
|
+
"application/json": components["schemas"]["Error"];
|
|
87965
|
+
};
|
|
87966
|
+
};
|
|
87967
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
87968
|
+
409: {
|
|
87969
|
+
headers: {
|
|
87970
|
+
[name: string]: unknown;
|
|
87971
|
+
};
|
|
87972
|
+
content: {
|
|
87973
|
+
"application/json": components["schemas"]["Error"];
|
|
87974
|
+
};
|
|
87975
|
+
};
|
|
87976
|
+
/** @description Rate limited */
|
|
87977
|
+
429: {
|
|
87978
|
+
headers: {
|
|
87979
|
+
[name: string]: unknown;
|
|
87980
|
+
};
|
|
87981
|
+
content: {
|
|
87982
|
+
"application/json": components["schemas"]["Error"];
|
|
87983
|
+
};
|
|
87984
|
+
};
|
|
87985
|
+
};
|
|
87986
|
+
};
|
|
87987
|
+
put?: never;
|
|
87988
|
+
post?: never;
|
|
87989
|
+
delete?: never;
|
|
87990
|
+
options?: never;
|
|
87991
|
+
head?: never;
|
|
87992
|
+
patch?: never;
|
|
87993
|
+
trace?: never;
|
|
87994
|
+
};
|
|
87875
87995
|
"/finanzas/costos": {
|
|
87876
87996
|
parameters: {
|
|
87877
87997
|
query?: never;
|
|
@@ -254697,7 +254817,7 @@ interface components {
|
|
|
254697
254817
|
/** @enum {string} */
|
|
254698
254818
|
kind: "page";
|
|
254699
254819
|
/** @enum {string} */
|
|
254700
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254820
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254701
254821
|
params?: {
|
|
254702
254822
|
[key: string]: string | number | boolean;
|
|
254703
254823
|
};
|
|
@@ -254739,7 +254859,7 @@ interface components {
|
|
|
254739
254859
|
/** @enum {string} */
|
|
254740
254860
|
kind: "page";
|
|
254741
254861
|
/** @enum {string} */
|
|
254742
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254862
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254743
254863
|
params?: {
|
|
254744
254864
|
[key: string]: string | number | boolean;
|
|
254745
254865
|
};
|
|
@@ -254766,7 +254886,7 @@ interface components {
|
|
|
254766
254886
|
/** @enum {string} */
|
|
254767
254887
|
kind: "page";
|
|
254768
254888
|
/** @enum {string} */
|
|
254769
|
-
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254889
|
+
page: "settings.channels" | "settings.channel" | "settings.webhooks" | "finanzas.bancos" | "finanzas.flujo_de_caja" | "finanzas.f29" | "finanzas.contraparte" | "settings.api_keys" | "settings.billing" | "settings.seguimientos" | "settings.templates" | "settings.marketplaces" | "settings.notifications" | "ai_agents" | "ads" | "onboarding" | "vehicles.marketplaces" | "calendar";
|
|
254770
254890
|
params?: {
|
|
254771
254891
|
[key: string]: string | number | boolean;
|
|
254772
254892
|
};
|
|
@@ -254780,11 +254900,11 @@ interface components {
|
|
|
254780
254900
|
/** @enum {string} */
|
|
254781
254901
|
preset: "important" | "all" | "custom";
|
|
254782
254902
|
push_enabled: boolean;
|
|
254783
|
-
categories: ("inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "safety" | "account")[];
|
|
254903
|
+
categories: ("inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "finanzas" | "safety" | "account")[];
|
|
254784
254904
|
types: {
|
|
254785
254905
|
key: string;
|
|
254786
254906
|
/** @enum {string} */
|
|
254787
|
-
category: "inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "safety" | "account";
|
|
254907
|
+
category: "inbox" | "agenda" | "sales" | "followups" | "approvals" | "payments" | "agents" | "integrations" | "finanzas" | "safety" | "account";
|
|
254788
254908
|
/** @description i18n slug: the UI renders `notif.<slug>.title` / `.when`. */
|
|
254789
254909
|
slug: string;
|
|
254790
254910
|
mandatory: boolean;
|
|
@@ -254864,7 +254984,7 @@ interface components {
|
|
|
254864
254984
|
perfect_battery_pct?: number;
|
|
254865
254985
|
currency?: string;
|
|
254866
254986
|
};
|
|
254867
|
-
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
|
|
254987
|
+
/** @description Workspace notification rails. The staff WhatsApp rails (`staff_whatsapp`, `unanswered_supervisor_whatsapp`, `booking_whatsapp`, `reminder_whatsapp`, `finanzas_whatsapp`) are opt-in: arming one (`enabled: true` with an `account_id`) submits its template to Meta on that number and wires it on approval. Each rail sent replaces that rail whole; rails not sent are kept. */
|
|
254868
254988
|
notifications?: {
|
|
254869
254989
|
staff_whatsapp?: {
|
|
254870
254990
|
enabled?: boolean;
|
|
@@ -254899,6 +255019,13 @@ interface components {
|
|
|
254899
255019
|
template_language?: string;
|
|
254900
255020
|
change_template_name?: string;
|
|
254901
255021
|
};
|
|
255022
|
+
finanzas_whatsapp?: {
|
|
255023
|
+
enabled?: boolean;
|
|
255024
|
+
/** Format: uuid */
|
|
255025
|
+
account_id?: string;
|
|
255026
|
+
template_name?: string;
|
|
255027
|
+
template_language?: string;
|
|
255028
|
+
};
|
|
254902
255029
|
stock_alert?: {
|
|
254903
255030
|
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
254904
255031
|
stage_ids: string[];
|
|
@@ -254966,6 +255093,26 @@ interface components {
|
|
|
254966
255093
|
rejection_reason: string | null;
|
|
254967
255094
|
}[];
|
|
254968
255095
|
};
|
|
255096
|
+
finanzas_whatsapp: {
|
|
255097
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
255098
|
+
armed: boolean;
|
|
255099
|
+
/**
|
|
255100
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
255101
|
+
* @enum {string}
|
|
255102
|
+
*/
|
|
255103
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
255104
|
+
reason: string | null;
|
|
255105
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
255106
|
+
wired: boolean;
|
|
255107
|
+
templates: {
|
|
255108
|
+
key: string;
|
|
255109
|
+
name: string;
|
|
255110
|
+
language: string;
|
|
255111
|
+
/** @enum {string} */
|
|
255112
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
255113
|
+
rejection_reason: string | null;
|
|
255114
|
+
}[];
|
|
255115
|
+
};
|
|
254969
255116
|
reminder_whatsapp: {
|
|
254970
255117
|
/** @description The rail is switched on (`enabled: true`). */
|
|
254971
255118
|
armed: boolean;
|
|
@@ -255217,6 +255364,13 @@ interface components {
|
|
|
255217
255364
|
template_language?: string;
|
|
255218
255365
|
change_template_name?: string;
|
|
255219
255366
|
};
|
|
255367
|
+
finanzas_whatsapp?: {
|
|
255368
|
+
enabled?: boolean;
|
|
255369
|
+
/** Format: uuid */
|
|
255370
|
+
account_id?: string;
|
|
255371
|
+
template_name?: string;
|
|
255372
|
+
template_language?: string;
|
|
255373
|
+
};
|
|
255220
255374
|
stock_alert?: {
|
|
255221
255375
|
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
255222
255376
|
stage_ids: string[];
|
|
@@ -259132,6 +259286,33 @@ interface components {
|
|
|
259132
259286
|
/** @description The last day an occurrence may fall on. Default: today (the day before it starts, if it has not started). */
|
|
259133
259287
|
ends_on?: string | null;
|
|
259134
259288
|
};
|
|
259289
|
+
FinanzasAlert: {
|
|
259290
|
+
/** Format: uuid */
|
|
259291
|
+
id: string;
|
|
259292
|
+
/**
|
|
259293
|
+
* @description `cash_negative`: the Flujo de caja projection drops below zero in the next 30 days. `f29_due`: an F29 with something to pay is due within 5 days and is unpaid. `supplier_invoice_missing`: a Contraparte that invoiced each of the last 3 months has no invoice this month, 3 days past its usual day.
|
|
259294
|
+
* @enum {string}
|
|
259295
|
+
*/
|
|
259296
|
+
kind: "cash_negative" | "f29_due" | "supplier_invoice_missing";
|
|
259297
|
+
/** @description One line, Spanish. */
|
|
259298
|
+
title: string;
|
|
259299
|
+
/** @description What happened and what to do. */
|
|
259300
|
+
body: string;
|
|
259301
|
+
/** @description The button that fixes it. */
|
|
259302
|
+
cta_label: string;
|
|
259303
|
+
/** @description Workspace-relative screen that fixes it (`/finanzas/reportes/flujo-de-caja`, `/finanzas/documentos?vista=f29`, `/finanzas/contrapartes/<id>`). */
|
|
259304
|
+
path: string;
|
|
259305
|
+
/** @description Day first seen (YYYY-MM-DD, Santiago). */
|
|
259306
|
+
opened_on: string;
|
|
259307
|
+
/** @description When the members were told; null until then. */
|
|
259308
|
+
notified_at: string | null;
|
|
259309
|
+
updated_at: string;
|
|
259310
|
+
/** @description The facts, whole CLP. cash_negative: `lowest_date`, `lowest_balance_clp`, `today_balance_clp`, `cause_label`, `cause_amount_clp`, `horizon_days`. f29_due: `period`, `due_date`, `amount_clp`, `days_left`, `amount_is_final`, `document_id`. supplier_invoice_missing: `contraparte_id`, `contraparte_name`, `period`, `usual_day`, `typical_amount_clp`, `months_invoiced`. */
|
|
259311
|
+
data: {
|
|
259312
|
+
[key: string]: unknown;
|
|
259313
|
+
};
|
|
259314
|
+
};
|
|
259315
|
+
FinanzasAlertList: components["schemas"]["FinanzasAlert"][];
|
|
259135
259316
|
FinanzasCostos: {
|
|
259136
259317
|
from: string;
|
|
259137
259318
|
to: string;
|
package/package.json
CHANGED