@ikatec/digisac-api-sdk 4.7.0 → 4.9.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.
@@ -47,6 +47,52 @@ export type ServiceConnectionStatus = {
47
47
  timestamp?: string
48
48
  }
49
49
 
50
+ /**
51
+ * `data.webchat` of a Webchat service. Every key is optional: the object only fills up once the
52
+ * service is set up, and older services lack the keys added later (e.g. `instagram`). The backend
53
+ * stores what the forms send without normalizing it, so `null` and `{}` show up where the web
54
+ * forms write them.
55
+ */
56
+ export type WebchatServiceData = {
57
+ /** Widget id in the webchat API; the page link is `${webchatUrl}/${id}`. Absent before setup. */
58
+ id?: string
59
+ name?: string | null
60
+ /** WhatsApp channel of the widget: DDI + number, without mask. `null` once cleared. */
61
+ phone?: string | null
62
+ /** Telegram channel of the widget, without `@`. `null` once cleared. */
63
+ telegram?: string | null
64
+ /** Instagram channel of the widget, without `@`. `null` once cleared. */
65
+ instagram?: string | null
66
+ isOpenForm?: boolean
67
+ isOpenChat?: boolean
68
+ /** `{}` when no picture was picked in the legacy form. */
69
+ file?: { base64Url?: string; mimetype?: string; fileName?: string }
70
+ googleId?: string | null
71
+ desktopChatOpen?: boolean
72
+ mobileChatOpen?: boolean
73
+ getClientData?: boolean
74
+ closeTicketByClient?: boolean
75
+ phoneClient?: boolean
76
+ phoneClientRequired?: boolean
77
+ clientName?: boolean
78
+ clientNameRequired?: boolean
79
+ /** `null` or `{}` when no custom field is asked for. */
80
+ customField?: { id?: string; name?: string } | null
81
+ customFieldRequired?: boolean
82
+ custom?: {
83
+ webchatBalloon?: boolean
84
+ webchatBalloonText?: string | null
85
+ webchatColor?: string
86
+ /** File id. */
87
+ logo?: string
88
+ /** File id. */
89
+ profilePhoto?: string
90
+ /** File id. */
91
+ webchatIcon?: string
92
+ typeIcon?: string
93
+ }
94
+ }
95
+
50
96
  export type ServiceData = {
51
97
  // ─── Common ───────────────────────────────────────────────────────────────
52
98
  token?: string
@@ -106,7 +152,7 @@ export type ServiceData = {
106
152
  mimetype: string
107
153
  fileName: string
108
154
  }
109
- webchat?: Record<string, unknown>
155
+ webchat?: WebchatServiceData
110
156
 
111
157
  // ─── Other ────────────────────────────────────────────────────────────────
112
158
  driverId?: string