@characterxyz/web 0.5.0 → 0.6.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 +7 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -103,11 +103,15 @@ interface ChatMessage {
|
|
|
103
103
|
/** The contact card: which fields to ask, and the consent line to show. */
|
|
104
104
|
interface DetailsForm {
|
|
105
105
|
/** Always `name` and `email`; `phone` and `company` when the key asks for them. */
|
|
106
|
-
fields: ('name' | 'email' | 'phone' | 'company')[];
|
|
106
|
+
fields: ('name' | 'email' | 'phone' | 'company' | 'reason')[];
|
|
107
107
|
/** The brand's privacy policy, linked from the consent line. */
|
|
108
108
|
privacyUrl: string | null;
|
|
109
109
|
/** Shown under the card; sending is the consent. */
|
|
110
110
|
consent: string;
|
|
111
|
+
/** The card's reason field, when the author set a label. */
|
|
112
|
+
reasonLabel?: string | null;
|
|
113
|
+
/** Choices offered for the reason; the visitor may still pick Other. */
|
|
114
|
+
reasonOptions?: string[];
|
|
111
115
|
}
|
|
112
116
|
/** What a visitor leaves. */
|
|
113
117
|
interface ContactDetails {
|
|
@@ -115,6 +119,8 @@ interface ContactDetails {
|
|
|
115
119
|
email: string;
|
|
116
120
|
phone?: string;
|
|
117
121
|
company?: string;
|
|
122
|
+
/** Why they reached out, from the card's options or typed as Other. */
|
|
123
|
+
reason?: string;
|
|
118
124
|
}
|
|
119
125
|
/**
|
|
120
126
|
* How the agent opens the conversation on this site, written by the agent
|
package/package.json
CHANGED