@fayz-ai/plugin-clinical 0.3.3 → 0.4.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.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/settings/attendance-settings.d.ts +2 -0
- package/dist/settings/attendance-settings.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -22,6 +22,7 @@ export declare const MIGRATION_021_AGENDAMENTO_NASCIDO_NO_V2_TAMBEM_TEM_REGUA =
|
|
|
22
22
|
export declare const MIGRATION_022_A_VISTA_DO_QUE_EXECUTAR_RESPEITA_A_CERCA = "-- ============================================================================\n-- THE \"TO EXECUTE\" VIEW READS WITH THE CALLER'S PRIVILEGES\n--\n-- `v_clinical_to_execute` was created in 014 without `security_invoker`, so it\n-- ran with the privileges of the role that OWNS it, and a view owned by a\n-- privileged role does not apply the row policies of the tables beneath it.\n-- `plg_clinical_sessions`, `items` and `plg_financial_movements` are all\n-- tenant-scoped with RLS; read through this view, they were not.\n--\n-- Not theoretical: the view answers, per party, how much a patient has already\n-- PAID for procedures not yet performed. Without the fence that is every\n-- clinic's prepaid balance, to anyone holding any session.\n--\n-- \u2500\u2500 why nobody saw it \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n--\n-- N16 of the posture suite grades exactly this (\"every public view over a\n-- tenant_id table is security_invoker\"), and it stayed green throughout:\n-- plugin-clinical was never listed in `packages/db/chain.json`, so its objects\n-- were never built on the bench and never graded. The plugin reached a live\n-- pool on 2026-09-22 and no board at all. Putting it in the chain is what made\n-- the suite fail, on the first run, in the expected place.\n--\n-- \u2500\u2500 why a new file, and not an edit to 014 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n--\n-- 014 is in `public._migrations` on a live pool with checksum 6f04df24cdb2,\n-- and the ledger treats a changed checksum on an applied file as a HARD STOP\n-- (cli/src/lib/ledger.ts). Editing it in place would not fix the view \u2014 it\n-- would stop `fayz db apply` on every cluster that already ran it.\n--\n-- The body below is 014's, copied unchanged. `CREATE OR REPLACE VIEW` refuses\n-- a different column list, and the only thing that may differ here is who the\n-- row filter runs as.\n-- ============================================================================\n\nCREATE OR REPLACE VIEW public.v_clinical_to_execute WITH (security_invoker = true) AS\nWITH sessao AS (\n SELECT\n cs.tenant_id,\n cs.party_id,\n cs.order_item_id,\n cs.status,\n i.order_id,\n coalesce(i.total, 0) AS item_total\n FROM public.plg_clinical_sessions cs\n JOIN public.items i ON i.id = cs.order_item_id\n WHERE cs.party_id IS NOT NULL\n AND cs.status IN ('contracted', 'quoted', 'in_service', 'scheduled', 'pending')\n),\n-- Quanto do PEDIDO j\u00E1 foi recebido, em propor\u00E7\u00E3o: o pagamento \u00E9 por parcela e\n-- n\u00E3o por item, ent\u00E3o a fatia paga de cada item \u00E9 a fatia paga do pedido.\npago AS (\n SELECT m.invoice_id AS order_id,\n sum(coalesce(m.paid_amount, 0)) AS pago,\n nullif(sum(coalesce(m.amount, 0)), 0) AS total\n FROM public.plg_financial_movements m\n WHERE m.direction = 'credit'\n GROUP BY m.invoice_id\n)\nSELECT\n s.tenant_id,\n s.party_id,\n sum(s.item_total * coalesce(p.pago / p.total, 0))::numeric(14,2) AS paid_to_execute,\n sum(s.item_total * (1 - coalesce(p.pago / p.total, 0)))::numeric(14,2) AS open_to_execute,\n count(*)::int AS sessions_to_execute\nFROM sessao s\nLEFT JOIN pago p ON p.order_id = s.order_id\nGROUP BY s.tenant_id, s.party_id;\n";
|
|
23
23
|
export declare const MIGRATION_023_A_REVISAO_SE_ESCOLHE_AO_AGENDAR = "-- ============================================================================\n-- 023 \u2014 The revision is chosen when it is booked, not only during the visit.\n-- ============================================================================\n-- V1 asks \"De qual servi\u00E7o \u00E9 esta revis\u00E3o?\" the moment the reception picks the\n-- Revis\u00E3o service in Novo Agendamento (FAY-1613). 015 answered it only from an\n-- existing booking. This lists the same candidates for a PERSON, with the ordinal\n-- the next revision of each will take (V1 shows \"1\u00AA Revis\u00E3o\").\n--\n-- Also closes a gap in 015: `clinical_revision_candidates(p_booking)` is a\n-- definer function that read any booking id it was given, so a member of one\n-- tenant could list another tenant's patient history by guessing an id. Both\n-- now answer only inside the caller's tenant.\n--\n-- Idempotent.\n\nCREATE OR REPLACE FUNCTION public.clinical_revision_candidates_for_person(p_person uuid)\nRETURNS TABLE(session_id uuid, service_id uuid, service_name text, executed_on timestamp with time zone,\n deadline_days integer, days_since integer, within_deadline boolean, next_revision_number integer)\nLANGUAGE sql\nSTABLE SECURITY DEFINER\nSET search_path TO 'public', 'app'\nAS $function$\n SELECT\n cs.id,\n cs.service_id,\n p.name,\n coalesce(cs.ended_at, cs.scheduled_for) AS executed_on,\n rev.deadline_days,\n (current_date - coalesce(cs.ended_at, cs.scheduled_for)::date)::int AS days_since,\n CASE WHEN rev.deadline_days IS NULL THEN NULL\n ELSE (current_date - coalesce(cs.ended_at, cs.scheduled_for)::date) <= rev.deadline_days\n END AS within_deadline,\n coalesce((SELECT max(r.revision_number) FROM public.plg_clinical_sessions r\n WHERE r.tenant_id = cs.tenant_id AND r.parent_session_id = cs.id), 0) + 1\n FROM public.plg_clinical_sessions cs\n LEFT JOIN public.products p ON p.id = cs.service_id\n LEFT JOIN LATERAL (\n SELECT r.deadline_days FROM public.plg_clinical_service_revisions r\n WHERE r.tenant_id = cs.tenant_id AND r.service_id = cs.service_id\n ORDER BY r.revision_number LIMIT 1\n ) rev ON true\n WHERE cs.tenant_id = app.current_tenant_id()\n AND cs.party_id = p_person\n AND cs.status = 'executed'\n AND cs.parent_session_id IS NULL\n ORDER BY coalesce(cs.ended_at, cs.scheduled_for) DESC NULLS LAST\n LIMIT 50;\n$function$;\n\nREVOKE ALL ON FUNCTION public.clinical_revision_candidates_for_person(uuid) FROM PUBLIC, anon;\nGRANT EXECUTE ON FUNCTION public.clinical_revision_candidates_for_person(uuid) TO authenticated;\n\nCREATE OR REPLACE FUNCTION public.clinical_revision_candidates(p_booking uuid)\nRETURNS TABLE(session_id uuid, service_id uuid, service_name text, executed_on timestamp with time zone,\n deadline_days integer, days_since integer, within_deadline boolean)\nLANGUAGE sql\nSTABLE SECURITY DEFINER\nSET search_path TO 'public', 'app'\nAS $function$\n WITH alvo AS (\n SELECT ap.tenant_id, ap.party_id FROM public.appointments ap\n WHERE ap.id = p_booking AND ap.tenant_id = app.current_tenant_id()\n )\n SELECT\n cs.id,\n cs.service_id,\n p.name,\n coalesce(cs.ended_at, cs.scheduled_for) AS executed_on,\n rev.deadline_days,\n (current_date - coalesce(cs.ended_at, cs.scheduled_for)::date)::int AS days_since,\n CASE WHEN rev.deadline_days IS NULL THEN NULL\n ELSE (current_date - coalesce(cs.ended_at, cs.scheduled_for)::date) <= rev.deadline_days\n END AS within_deadline\n FROM public.plg_clinical_sessions cs\n JOIN alvo a ON a.tenant_id = cs.tenant_id AND a.party_id = cs.party_id\n LEFT JOIN public.products p ON p.id = cs.service_id\n LEFT JOIN LATERAL (\n SELECT r.deadline_days FROM public.plg_clinical_service_revisions r\n WHERE r.tenant_id = cs.tenant_id AND r.service_id = cs.service_id\n ORDER BY r.revision_number LIMIT 1\n ) rev ON true\n WHERE cs.status = 'executed'\n AND cs.booking_id IS DISTINCT FROM p_booking\n ORDER BY coalesce(cs.ended_at, cs.scheduled_for) DESC NULLS LAST\n LIMIT 50;\n$function$;\n";
|
|
24
24
|
export declare const MIGRATION_024_A_AVALIACAO_DESTA_VISITA_VALE_PARA_O_QUE_ELA_CONTRATOU = "-- The evaluation done in this attendance covers what was contracted in it.\n--\n-- FAY-1613 (Espa\u00E7o Facial, etapa 3): the professional fills the \"Avalia\u00E7\u00E3o\" form, indicates, the\n-- client contracts \u2014 and every contracted session came out with its own \"Avalia\u00E7\u00E3o\" step pending,\n-- because nothing in V2 points a contracted session at the evaluation that authorised it\n-- (`source_evaluation_id` is only set by the V1 import). V1 shows \"Avalia\u00E7\u00E3o conclu\u00EDda \u2014 o\n-- atendimento segue para a execu\u00E7\u00E3o\" at that point.\n--\n-- Same body as live, plus step 5c. Idempotent (CREATE OR REPLACE).\n\nCREATE OR REPLACE FUNCTION public.clinical_requirements_refresh(p_booking uuid, p_final boolean DEFAULT false)\n RETURNS jsonb\n LANGUAGE plpgsql\n SECURITY DEFINER\n SET search_path TO 'public'\nAS $function$\nDECLARE\n a record; v_mode text; v_now timestamptz := now(); v_eval jsonb;\n n_mat int := 0; n_reopen int := 0;\n -- `v_sessao`, n\u00E3o `r`: plpgsql resolve o nome da VARI\u00C1VEL antes do apelido da\n -- tabela, ent\u00E3o um `record r` declarado aqui sequestra todo `r.coluna` dos\n -- UPDATEs abaixo \u2014 e o erro que sai \u00E9 \"record r has no field booking_id\".\n v_sessao record;\nBEGIN\n SELECT ap.id, ap.tenant_id, ap.party_id, ap.status INTO a\n FROM public.appointments ap WHERE ap.id = p_booking;\n IF NOT FOUND THEN RETURN jsonb_build_object('ok', false, 'reason', 'not_found'); END IF;\n\n v_mode := public.clinical_requirements_mode(a.tenant_id);\n IF v_mode = 'off' THEN RETURN jsonb_build_object('ok', true, 'mode', v_mode, 'skipped', true); END IF;\n\n p_final := coalesce(p_final, false) AND a.status = 'completed';\n\n BEGIN\n PERFORM pg_advisory_xact_lock(hashtextextended('clinical_req:' || p_booking::text, 0));\n IF a.status = 'completed' AND NOT p_final THEN\n RETURN jsonb_build_object('ok', true, 'mode', v_mode, 'frozen', true);\n END IF;\n\n -- 1) Materializa o que falta (sess\u00E3o nova, ficha t\u00E9cnica criada depois).\n FOR v_sessao IN SELECT cs.id FROM public.plg_clinical_sessions cs WHERE cs.booking_id = p_booking\n LOOP\n n_mat := n_mat + public.clinical_requirements_materialize(v_sessao.id);\n END LOOP;\n\n v_eval := coalesce((SELECT t.settings -> 'evaluation_flow' FROM public.tenants t WHERE t.id = a.tenant_id), '{}'::jsonb);\n IF jsonb_typeof(v_eval) <> 'object' THEN v_eval := '{}'::jsonb; END IF;\n\n -- 1b) Regra que saiu da configura\u00E7\u00E3o para de bloquear (o upsert reabre se voltar).\n UPDATE public.plg_clinical_requirements r\n SET status = 'not_applicable', candidate_type = NULL, candidate_id = NULL, updated_at = v_now\n WHERE r.booking_id = p_booking AND r.status = 'pending' AND r.frozen_at IS NULL\n AND r.metadata -> 'migration' IS NULL\n AND ((r.kind = 'revision_link' AND NOT coalesce((v_eval ->> 'revision_link_required')::boolean, false))\n OR (r.kind = 'evaluation'\n AND r.rule_sources = '[\"evaluation_flow.require_evaluation_for_kind_service\"]'::jsonb\n AND NOT coalesce((v_eval ->> 'require_evaluation_for_kind_service')::boolean, false)));\n\n -- 2) Reabre o que perdeu a fonte. Linha congelada n\u00E3o se mexe.\n UPDATE public.plg_clinical_requirements r\n SET status = 'pending', subject_type = NULL, subject_id = NULL, resolved_via = NULL,\n resolved_at = NULL, valid_until = NULL, updated_at = v_now\n WHERE r.booking_id = p_booking AND r.status = 'resolved' AND r.frozen_at IS NULL\n AND ((r.subject_type = 'documents' AND NOT EXISTS (SELECT 1 FROM public.documents d WHERE d.id = r.subject_id))\n OR (r.subject_type = 'clinical_sessions' AND NOT EXISTS (SELECT 1 FROM public.plg_clinical_sessions x WHERE x.id = r.subject_id))\n OR (r.subject_type = 'items' AND NOT EXISTS (SELECT 1 FROM public.items oi WHERE oi.id = r.subject_id)));\n GET DIAGNOSTICS n_reopen = ROW_COUNT;\n\n -- 3) Formul\u00E1rio universal: a \u00FAltima resposta do cliente, em qualquer\n -- atendimento, ainda dentro da validade do modelo.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'documents', subject_id = x.id,\n resolved_via = CASE WHEN x.subject_id = p_booking THEN 'attendance' ELSE 'auto_client' END,\n resolved_at = v_now,\n valid_until = CASE WHEN x.validity_days IS NULL THEN NULL\n ELSE x.eff + make_interval(days => x.validity_days) END,\n updated_at = v_now\n FROM (SELECT DISTINCT ON (fd.template_id) d.id, fd.template_id, d.subject_id,\n coalesce(d.updated_at, d.created_at) AS eff, ft.validity_days\n FROM public.plg_forms_documents fd\n JOIN public.documents d ON d.id = fd.document_id\n JOIN public.plg_forms_templates ft ON ft.id = fd.template_id\n WHERE d.person_id = a.party_id AND d.tenant_id = a.tenant_id\n ORDER BY fd.template_id, coalesce(d.updated_at, d.created_at) DESC) x\n WHERE r.booking_id = p_booking AND r.status = 'pending' AND r.kind = 'form'\n AND r.scope = 'attendance' AND r.ref_id = x.template_id\n AND r.rule_sources @> '[\"forms_templates.required_on_attendance\"]'::jsonb\n AND (x.validity_days IS NULL OR x.eff + make_interval(days => x.validity_days) > v_now);\n\n -- 4) Demais formul\u00E1rios: qualquer resposta DESTE atendimento com o modelo.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'documents', subject_id = x.id,\n resolved_via = 'attendance', resolved_at = v_now, updated_at = v_now\n FROM (SELECT DISTINCT ON (fd.template_id, coalesce(fd.product_id, '00000000-0000-0000-0000-000000000000'::uuid))\n d.id, fd.template_id, fd.product_id\n FROM public.plg_forms_documents fd\n JOIN public.documents d ON d.id = fd.document_id\n WHERE d.subject_type = 'appointment' AND d.subject_id = p_booking\n ORDER BY fd.template_id, coalesce(fd.product_id, '00000000-0000-0000-0000-000000000000'::uuid),\n coalesce(d.updated_at, d.created_at) DESC) x\n WHERE r.booking_id = p_booking AND r.status = 'pending' AND r.kind = 'form'\n AND r.ref_id = x.template_id\n AND NOT (r.rule_sources @> '[\"forms_templates.required_on_attendance\"]'::jsonb)\n AND (x.product_id IS NULL OR r.scope = 'attendance' OR x.product_id = r.service_id);\n\n -- 5) Avalia\u00E7\u00E3o vinculada: a sess\u00E3o aponta a avalia\u00E7\u00E3o que a autorizou.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'clinical_sessions', subject_id = x.eval_id,\n resolved_via = CASE WHEN x.same_booking THEN 'attendance' ELSE 'auto_client' END,\n resolved_at = v_now, updated_at = v_now\n FROM (SELECT r2.id AS req_id, e.id AS eval_id, (e.booking_id = p_booking) AS same_booking\n FROM public.plg_clinical_requirements r2\n JOIN public.plg_clinical_sessions cs ON cs.id = r2.session_id\n JOIN public.plg_clinical_sessions e ON e.id = cs.source_evaluation_id\n WHERE r2.booking_id = p_booking AND r2.kind = 'evaluation' AND r2.frozen_at IS NULL\n AND (r2.status = 'pending' OR (r2.status = 'resolved' AND r2.resolved_via = 'legacy_grace'))) x\n WHERE r.id = x.req_id;\n\n -- 5b) Gra\u00E7a legada: o cliente j\u00E1 tem atendimento conclu\u00EDdo com servi\u00E7o de\n -- avalia\u00E7\u00E3o. \u00C9 a mesma concess\u00E3o do V1, e vai marcada como tal.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'appointments', subject_id = x.booking_id,\n resolved_via = 'legacy_grace', resolved_at = v_now, updated_at = v_now\n FROM (SELECT ap.id AS booking_id\n FROM public.appointments ap\n JOIN public.appointment_items ai ON ai.booking_id = ap.id\n JOIN public.products p ON p.id = ai.service_id AND p.service_kind = 'evaluation'\n WHERE ap.party_id = a.party_id AND ap.tenant_id = a.tenant_id AND ap.status = 'completed'\n ORDER BY ap.starts_at DESC NULLS LAST LIMIT 1) x\n WHERE r.booking_id = p_booking AND r.status = 'pending' AND r.kind = 'evaluation';\n\n -- 5c) Avalia\u00E7\u00E3o feita NESTE atendimento. Contratar depois de avaliar cria sess\u00F5es novas, e cada\n -- uma nascia com a pr\u00F3pria bola \"Avalia\u00E7\u00E3o\" pendente \u2014 o profissional acabou de avaliar.\n -- Indica\u00E7\u00E3o registrada aqui (o formul\u00E1rio de avalia\u00E7\u00E3o) ou sess\u00E3o de avalia\u00E7\u00E3o deste\n -- atendimento resolvem as sess\u00F5es contratadas na mesma visita.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'appointments', subject_id = p_booking,\n resolved_via = 'attendance', resolved_at = v_now, updated_at = v_now\n WHERE r.booking_id = p_booking AND r.status = 'pending' AND r.kind = 'evaluation'\n AND r.frozen_at IS NULL\n AND (EXISTS (SELECT 1 FROM public.plg_crm_deal_interest_appointments x WHERE x.appointment_id = p_booking)\n OR EXISTS (SELECT 1 FROM public.plg_clinical_sessions e\n JOIN public.products p ON p.id = e.service_id AND p.service_kind = 'evaluation'\n WHERE e.booking_id = p_booking));\n\n -- 6) Revis\u00E3o vinculada ao servi\u00E7o original.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'clinical_sessions', subject_id = cs.parent_session_id,\n resolved_via = 'attendance', resolved_at = v_now, updated_at = v_now\n FROM public.plg_clinical_sessions cs\n WHERE cs.id = r.session_id AND r.booking_id = p_booking\n AND r.status = 'pending' AND r.kind = 'revision_link'\n AND cs.parent_session_id IS NOT NULL\n AND EXISTS (SELECT 1 FROM public.plg_clinical_sessions p WHERE p.id = cs.parent_session_id);\n\n -- 7) Produtos: a sess\u00E3o declara que foram conferidos.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'clinical_sessions', subject_id = cs.id,\n resolved_via = 'attendance', resolved_at = v_now, updated_at = v_now\n FROM public.plg_clinical_sessions cs\n WHERE cs.id = r.session_id AND r.booking_id = p_booking\n AND r.status = 'pending' AND r.kind = 'products'\n AND coalesce(cs.products_initialized, false);\n\n -- 8) Item de pedido vinculado. A linha do pedido no V2 \u00E9 `public.items` \u2014\n -- n\u00E3o existe `order_items`; o pedido \u00E9 o documento e o item \u00E9 dele.\n UPDATE public.plg_clinical_requirements r\n SET status = 'resolved', subject_type = 'items', subject_id = oi.id,\n resolved_via = 'attendance', resolved_at = v_now, updated_at = v_now\n FROM public.plg_clinical_sessions cs\n JOIN public.items oi ON oi.id = cs.order_item_id\n WHERE cs.id = r.session_id AND r.booking_id = p_booking\n AND r.status = 'pending' AND r.kind = 'invoice_item';\n\n -- 9) Congelamento: s\u00F3 na \u00FAltima passada, com o atendimento conclu\u00EDdo.\n IF p_final THEN\n UPDATE public.plg_clinical_requirements\n SET frozen_at = coalesce(frozen_at, v_now), updated_at = v_now\n WHERE booking_id = p_booking;\n END IF;\n\n RETURN jsonb_build_object(\n 'ok', true, 'mode', v_mode, 'materialized', n_mat, 'reopened', n_reopen,\n 'pending', (SELECT count(*) FROM public.plg_clinical_requirements WHERE booking_id = p_booking AND status = 'pending'),\n 'resolved', (SELECT count(*) FROM public.plg_clinical_requirements WHERE booking_id = p_booking AND status = 'resolved'),\n 'frozen', p_final);\n EXCEPTION WHEN others THEN\n RAISE WARNING 'clinical_requirements_refresh(%): %', p_booking, sqlerrm;\n RETURN jsonb_build_object('ok', false, 'error', sqlerrm);\n END;\nEND $function$;\n";
|
|
25
|
+
export declare const MIGRATION_025_AS_REGRAS_DO_ATENDIMENTO_SAO_CONFIGURACAO = "-- The attendance rules 004 already reads, registered as setting keys so the\n-- settings screen can write them through tenant_setting_set (typed, permission\n-- checked). Same paths the V1 import wrote: tenants.settings.execution_requirements.mode\n-- and tenants.settings.evaluation_flow.*. Nested writes keep the sibling keys.\n--\n-- Idempotent.\nSELECT app.seed_setting_keys($$[\n { \"key\": \"execution_requirements.mode\", \"type\": \"string\", \"default\": \"off\", \"scope\": \"tenant\", \"reader\": \"plugin:clinical\",\n \"description\": \"Execution requirements: off, shadow (warn only) or on (block). V1: general_settings.execution_requirements.mode.\" },\n { \"key\": \"evaluation_flow.require_evaluation_for_kind_service\", \"type\": \"boolean\", \"default\": false, \"scope\": \"tenant\", \"reader\": \"plugin:clinical\",\n \"description\": \"A paid service needs a linked evaluation. V1: general_settings.evaluation_flow.\" },\n { \"key\": \"evaluation_flow.revision_link_required\", \"type\": \"boolean\", \"default\": false, \"scope\": \"tenant\", \"reader\": \"plugin:clinical\",\n \"description\": \"A revision must be linked to the original service; blocks start and finish. V1: general_settings.evaluation_flow.\" }\n]$$::jsonb);\n";
|
|
25
26
|
export declare const MIGRATIONS: Array<{
|
|
26
27
|
id: string;
|
|
27
28
|
sql: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kDAAkD,6yuCAiiB9D,CAAA;AAED,eAAO,MAAM,0CAA0C,g64CAwvBtD,CAAA;AAED,eAAO,MAAM,+DAA+D,s8HAsE3E,CAAA;AAED,eAAO,MAAM,yCAAyC,ilzBAqarD,CAAA;AAED,eAAO,MAAM,iDAAiD,woIAkF7D,CAAA;AAED,eAAO,MAAM,mCAAmC,86KAyG/C,CAAA;AAED,eAAO,MAAM,uCAAuC,20MAuHnD,CAAA;AAED,eAAO,MAAM,oCAAoC,6qGA+DhD,CAAA;AAED,eAAO,MAAM,qCAAqC,uwFAsDjD,CAAA;AAED,eAAO,MAAM,0CAA0C,olLAmGtD,CAAA;AAED,eAAO,MAAM,kDAAkD,miHA0E9D,CAAA;AAED,eAAO,MAAM,8CAA8C,8/HA2E1D,CAAA;AAED,eAAO,MAAM,+BAA+B,s7FAwD3C,CAAA;AAED,eAAO,MAAM,sDAAsD,i1FA2DlE,CAAA;AAED,eAAO,MAAM,2CAA2C,ukIAyFvD,CAAA;AAED,eAAO,MAAM,2DAA2D,g7IAoFvE,CAAA;AAED,eAAO,MAAM,oDAAoD,wlJAwGhE,CAAA;AAED,eAAO,MAAM,8CAA8C,s6NAqJ1D,CAAA;AAED,eAAO,MAAM,iCAAiC,2zMAuH7C,CAAA;AAED,eAAO,MAAM,+DAA+D,w6IA2F3E,CAAA;AAED,eAAO,MAAM,wDAAwD,0wLA4HpE,CAAA;AAED,eAAO,MAAM,sDAAsD,8mHAmElE,CAAA;AAED,eAAO,MAAM,6CAA6C,+iIAsFzD,CAAA;AAED,eAAO,MAAM,oEAAoE,q6XA+LhF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kDAAkD,6yuCAiiB9D,CAAA;AAED,eAAO,MAAM,0CAA0C,g64CAwvBtD,CAAA;AAED,eAAO,MAAM,+DAA+D,s8HAsE3E,CAAA;AAED,eAAO,MAAM,yCAAyC,ilzBAqarD,CAAA;AAED,eAAO,MAAM,iDAAiD,woIAkF7D,CAAA;AAED,eAAO,MAAM,mCAAmC,86KAyG/C,CAAA;AAED,eAAO,MAAM,uCAAuC,20MAuHnD,CAAA;AAED,eAAO,MAAM,oCAAoC,6qGA+DhD,CAAA;AAED,eAAO,MAAM,qCAAqC,uwFAsDjD,CAAA;AAED,eAAO,MAAM,0CAA0C,olLAmGtD,CAAA;AAED,eAAO,MAAM,kDAAkD,miHA0E9D,CAAA;AAED,eAAO,MAAM,8CAA8C,8/HA2E1D,CAAA;AAED,eAAO,MAAM,+BAA+B,s7FAwD3C,CAAA;AAED,eAAO,MAAM,sDAAsD,i1FA2DlE,CAAA;AAED,eAAO,MAAM,2CAA2C,ukIAyFvD,CAAA;AAED,eAAO,MAAM,2DAA2D,g7IAoFvE,CAAA;AAED,eAAO,MAAM,oDAAoD,wlJAwGhE,CAAA;AAED,eAAO,MAAM,8CAA8C,s6NAqJ1D,CAAA;AAED,eAAO,MAAM,iCAAiC,2zMAuH7C,CAAA;AAED,eAAO,MAAM,+DAA+D,w6IA2F3E,CAAA;AAED,eAAO,MAAM,wDAAwD,0wLA4HpE,CAAA;AAED,eAAO,MAAM,sDAAsD,8mHAmElE,CAAA;AAED,eAAO,MAAM,6CAA6C,+iIAsFzD,CAAA;AAED,eAAO,MAAM,oEAAoE,q6XA+LhF,CAAA;AAED,eAAO,MAAM,uDAAuD,uvCAcnE,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CA0BzD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-settings.d.ts","sourceRoot":"","sources":["../../src/settings/attendance-settings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,2CAyBhC,CAAA"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"agenda"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.4.0",
|
|
10
10
|
"description": "[preview] Fayz SDK — o atendimento clínico: anamnese com validade, avaliação, execução por sessão e consumo de produto",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"sideEffects": false,
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fayz-ai/core": "^0.
|
|
30
|
+
"@fayz-ai/core": "^0.48.0",
|
|
31
|
+
"@fayz-ai/admin": "^0.48.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/react": "^18.3.0",
|