@alfadocs/ui-kit 1.68.0 → 1.69.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/_chunks/{alia-sidebar-B06ZSOaF.js → alia-sidebar-DEMMoefU.js} +3 -3
- package/dist/_chunks/{anamnesis-card-CsUBOG32.js → anamnesis-card-Bey9qQu4.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-CNK0fIJk.js → anamnesis-summary-rows-rNwSrNWZ.js} +2 -2
- package/dist/_chunks/{appointment-peek-D5XCfYKu.js → appointment-peek-CpcqB8oO.js} +2 -2
- package/dist/_chunks/{calendar-workspace-CYK1M83j.js → calendar-workspace-Ct8_454k.js} +3 -3
- package/dist/_chunks/{chat-message-Be-9vIIQ.js → chat-message-C2VXQMoB.js} +2 -2
- package/dist/_chunks/{code-block-vwEv1jEa.js → code-block-RSKdF3E-.js} +35 -35
- package/dist/_chunks/{connection-status--wYsgreh.js → connection-status-BOZC5QU5.js} +2 -2
- package/dist/_chunks/{description-list-Q8640NHu.js → description-list-DQQ2OA_t.js} +68 -66
- package/dist/_chunks/{optical-prescription-ulXnDbBe.js → optical-prescription-D5c7FBlT.js} +2 -2
- package/dist/_chunks/{patient-details-C4Dyo7Ck.js → patient-details-qWOsn1MX.js} +3 -3
- package/dist/_chunks/{patient-field-row-DROvUkFu.js → patient-field-row-CAl5ydtX.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CAimxbuI.js → patient-summary-card-BhuRh9AE.js} +2 -2
- package/dist/_chunks/{payment-request-card-0DjQgVgX.js → payment-request-card-bysjRZrP.js} +2 -2
- package/dist/_chunks/{reviews-panel-CosDZyow.js → reviews-panel-sbsVmmCA.js} +2 -2
- package/dist/_chunks/{streaming-text-zFViGexf.js → streaming-text-DbqKTsmj.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CUGfE0hV.js → use-appointment-details-read-1gjZuup4.js} +3 -3
- package/dist/_chunks/workflow-webhook-action-Ct8tFYi7.js +691 -0
- package/dist/agent-catalog.json +100 -1
- package/dist/agent-i18n/en.json +9 -0
- package/dist/components/_shared/code-block.d.ts +6 -0
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +55 -0
- package/dist/i18n/locales/ar.js +55 -0
- package/dist/i18n/locales/de.d.ts +55 -0
- package/dist/i18n/locales/de.js +55 -0
- package/dist/i18n/locales/el.d.ts +55 -0
- package/dist/i18n/locales/el.js +55 -0
- package/dist/i18n/locales/en.d.ts +55 -0
- package/dist/i18n/locales/en.js +55 -0
- package/dist/i18n/locales/es.d.ts +55 -0
- package/dist/i18n/locales/es.js +55 -0
- package/dist/i18n/locales/fr.d.ts +55 -0
- package/dist/i18n/locales/fr.js +55 -0
- package/dist/i18n/locales/hi.d.ts +55 -0
- package/dist/i18n/locales/hi.js +55 -0
- package/dist/i18n/locales/it.d.ts +55 -0
- package/dist/i18n/locales/it.js +55 -0
- package/dist/i18n/locales/ja.d.ts +55 -0
- package/dist/i18n/locales/ja.js +55 -0
- package/dist/i18n/locales/nl.d.ts +55 -0
- package/dist/i18n/locales/nl.js +55 -0
- package/dist/i18n/locales/pl.d.ts +55 -0
- package/dist/i18n/locales/pl.js +55 -0
- package/dist/i18n/locales/pt.d.ts +55 -0
- package/dist/i18n/locales/pt.js +55 -0
- package/dist/i18n/locales/ro.d.ts +55 -0
- package/dist/i18n/locales/ro.js +55 -0
- package/dist/i18n/locales/ru.d.ts +55 -0
- package/dist/i18n/locales/ru.js +55 -0
- package/dist/i18n/locales/sq.d.ts +55 -0
- package/dist/i18n/locales/sq.js +55 -0
- package/dist/i18n/locales/sv.d.ts +55 -0
- package/dist/i18n/locales/sv.js +55 -0
- package/dist/i18n/locales/tr.d.ts +55 -0
- package/dist/i18n/locales/tr.js +55 -0
- package/dist/i18n/locales/zh.d.ts +55 -0
- package/dist/i18n/locales/zh.js +55 -0
- package/dist/index.js +120 -117
- package/dist/locales/ar.json +55 -0
- package/dist/locales/de.json +55 -0
- package/dist/locales/el.json +55 -0
- package/dist/locales/en.json +55 -0
- package/dist/locales/es.json +55 -0
- package/dist/locales/fr.json +55 -0
- package/dist/locales/hi.json +55 -0
- package/dist/locales/it.json +55 -0
- package/dist/locales/ja.json +55 -0
- package/dist/locales/nl.json +55 -0
- package/dist/locales/pl.json +55 -0
- package/dist/locales/pt.json +55 -0
- package/dist/locales/ro.json +55 -0
- package/dist/locales/ru.json +55 -0
- package/dist/locales/sq.json +55 -0
- package/dist/locales/sv.json +55 -0
- package/dist/locales/tr.json +55 -0
- package/dist/locales/zh.json +55 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.d.ts +3 -0
- package/dist/patterns/workflow-webhook-action/index.js +6 -0
- package/dist/patterns/workflow-webhook-action/workflow-webhook-action.d.ts +93 -0
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/** The fields of the step, in the order they appear. */
|
|
3
|
+
export declare const WORKFLOW_WEBHOOK_ACTION_FIELDS: readonly ["url", "secret", "legalBasisConfirmed", "parameters"];
|
|
4
|
+
export type WorkflowWebhookActionField = (typeof WORKFLOW_WEBHOOK_ACTION_FIELDS)[number];
|
|
5
|
+
/** One parameter value as the platform stores it: a flat scalar. */
|
|
6
|
+
export type WorkflowWebhookParameterValue = string | number | boolean | null;
|
|
7
|
+
/** What the step holds now. Mirrors the platform's
|
|
8
|
+
* `SendHttpRequestWorkflowActionDto`. */
|
|
9
|
+
export interface WorkflowWebhookActionValues {
|
|
10
|
+
/** Where the message goes: platform `url`. */
|
|
11
|
+
url: string;
|
|
12
|
+
/**
|
|
13
|
+
* A new signing secret: platform `secret`, stored encrypted as
|
|
14
|
+
* `encryptedSecret`. Empty means "keep the saved one". The server never
|
|
15
|
+
* sends a saved secret back.
|
|
16
|
+
*/
|
|
17
|
+
secret: string;
|
|
18
|
+
/** The extra parameters: platform `parameters`, a flat map of scalars. */
|
|
19
|
+
parameters: Record<string, WorkflowWebhookParameterValue>;
|
|
20
|
+
/** The consent box: platform `legalBasisConfirmed`. */
|
|
21
|
+
legalBasisConfirmed: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Values to show when the fields open. There is no secret here, on
|
|
24
|
+
* purpose: a saved secret is never sent back to the browser. */
|
|
25
|
+
export type WorkflowWebhookActionInitialValues = Partial<Omit<WorkflowWebhookActionValues, 'secret'>>;
|
|
26
|
+
/** Messages from the server, already translated, one per field. */
|
|
27
|
+
export type WorkflowWebhookActionErrors = Partial<Record<WorkflowWebhookActionField, string>>;
|
|
28
|
+
/** The host's own form field names, for a native form post. */
|
|
29
|
+
export type WorkflowWebhookActionFieldNames = Record<WorkflowWebhookActionField, string>;
|
|
30
|
+
/** A patient detail the user can insert into a parameter value. */
|
|
31
|
+
export interface WorkflowWebhookActionPlaceholder {
|
|
32
|
+
/** The code the server replaces, such as `[[NOME]]`. */
|
|
33
|
+
value: string;
|
|
34
|
+
/** What the user reads, translated, such as "First name". */
|
|
35
|
+
label: string;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkflowWebhookActionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange'> {
|
|
38
|
+
/**
|
|
39
|
+
* Host content above the fields, such as the plan notice ("Included in
|
|
40
|
+
* the trial and the Elite plans"). Nothing in it is posted.
|
|
41
|
+
*/
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Values to show when the fields open. Read once. Parameters keep the
|
|
45
|
+
* order and the names they are given; a number beyond
|
|
46
|
+
* `Number.MAX_SAFE_INTEGER` has already lost precision by the time it
|
|
47
|
+
* arrives here.
|
|
48
|
+
*/
|
|
49
|
+
initialValues?: WorkflowWebhookActionInitialValues;
|
|
50
|
+
/**
|
|
51
|
+
* True when the step already has a secret. The secret field is then
|
|
52
|
+
* optional: left empty, the saved secret stays.
|
|
53
|
+
*/
|
|
54
|
+
hasSavedSecret?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Messages from the server, already translated. A field's message shows
|
|
57
|
+
* until the user changes that field; when the fields open with
|
|
58
|
+
* messages, focus goes to the first one. A message on `parameters`
|
|
59
|
+
* opens the Advanced section.
|
|
60
|
+
*
|
|
61
|
+
* A React host keeps `errors` in state: each new object is a new answer
|
|
62
|
+
* from the server, shown even when its words match the last one.
|
|
63
|
+
*/
|
|
64
|
+
errors?: WorkflowWebhookActionErrors;
|
|
65
|
+
/**
|
|
66
|
+
* For a native form post: the host's own field names. The parameters
|
|
67
|
+
* post as one JSON object, or an empty string when there are none. The
|
|
68
|
+
* consent box posts `1` when ticked and nothing when not. The fields
|
|
69
|
+
* must sit inside the host's `<form>`.
|
|
70
|
+
*/
|
|
71
|
+
fieldNames?: WorkflowWebhookActionFieldNames;
|
|
72
|
+
/**
|
|
73
|
+
* Patient details the user can insert into a parameter value. Without
|
|
74
|
+
* them, no insert menu shows.
|
|
75
|
+
*/
|
|
76
|
+
placeholders?: ReadonlyArray<WorkflowWebhookActionPlaceholder>;
|
|
77
|
+
/** For React hosts: called with the values after each change. */
|
|
78
|
+
onValueChange?: (values: WorkflowWebhookActionValues) => void;
|
|
79
|
+
/**
|
|
80
|
+
* How the "What Alfadocs sends" card lays out the message body and its
|
|
81
|
+
* headers. `two-column` (default): side by side once the fields are
|
|
82
|
+
* 720px wide; narrower, as on a phone, one above the other.
|
|
83
|
+
* `one-column`: always one above the other, for a narrow card or a side
|
|
84
|
+
* panel.
|
|
85
|
+
*/
|
|
86
|
+
layout?: 'two-column' | 'one-column';
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The fields of a workflow's webhook step. Mount it inside the host's
|
|
90
|
+
* form, between the page title and the Save button.
|
|
91
|
+
*/
|
|
92
|
+
export declare const WorkflowWebhookAction: import("react").ForwardRefExoticComponent<WorkflowWebhookActionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
93
|
+
//# sourceMappingURL=workflow-webhook-action.d.ts.map
|