@talqui-oss/template-builder 0.0.0-stage → 0.1.0-beta.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.
@@ -0,0 +1,267 @@
1
+ /*
2
+ * Template Builder preview.
3
+ *
4
+ * One CSS pixel equals one iOS point. Every value below was measured on native
5
+ * 3x screenshots of an iPhone (440pt wide screen, default text size, light mode).
6
+ * Override the custom properties to adapt the look without touching the markup.
7
+ */
8
+
9
+ .tb-preview {
10
+ --tb-font:
11
+ -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial,
12
+ sans-serif;
13
+ --tb-wallpaper: #f8f6f2;
14
+ --tb-bubble-bg: #ffffff;
15
+ --tb-text: #0a0a0a;
16
+ --tb-muted: #666666;
17
+ --tb-action: #408559;
18
+ --tb-divider: #e5e5e5;
19
+
20
+ --tb-bubble-width: 335.67px;
21
+ --tb-bubble-radius: 10.67px;
22
+ /* Text starts closer to the left edge than it ends on the right one. */
23
+ --tb-padding-x: 9.17px;
24
+ --tb-padding-right: 10.5px;
25
+ --tb-padding-top: 6.5px;
26
+ --tb-header-gap: 12px;
27
+ --tb-media-gap: 4.2px;
28
+ --tb-footer-gap: 8.5px;
29
+ --tb-padding-bottom: 6.33px;
30
+ --tb-button-height: 44px;
31
+
32
+ box-sizing: border-box;
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: flex-start;
36
+ gap: 8px;
37
+ padding: 0 16.67px;
38
+ font-family: var(--tb-font);
39
+ color: var(--tb-text);
40
+ -webkit-font-smoothing: antialiased;
41
+ text-rendering: optimizeLegibility;
42
+ }
43
+
44
+ .tb-preview *,
45
+ .tb-preview *::before,
46
+ .tb-preview *::after {
47
+ box-sizing: inherit;
48
+ margin: 0;
49
+ }
50
+
51
+ /* Bubble: fixed width, four rounded corners; the tail hangs off the bottom-left one. */
52
+ .tb-bubble {
53
+ position: relative;
54
+ width: var(--tb-bubble-width);
55
+ background: var(--tb-bubble-bg);
56
+ border-radius: var(--tb-bubble-radius);
57
+ }
58
+
59
+ .tb-bubble__tail {
60
+ position: absolute;
61
+ bottom: 0;
62
+ left: -6.2px;
63
+ width: 12.4px;
64
+ height: 10.33px;
65
+ fill: var(--tb-bubble-bg);
66
+ }
67
+
68
+ .tb-bubble__content {
69
+ padding: var(--tb-padding-top) var(--tb-padding-right)
70
+ var(--tb-padding-bottom) var(--tb-padding-x);
71
+ overflow-wrap: anywhere;
72
+ }
73
+
74
+ /* Text */
75
+
76
+ .tb-header--text {
77
+ font-size: 17px;
78
+ line-height: 22px;
79
+ font-weight: 600;
80
+ margin-bottom: var(--tb-header-gap);
81
+ }
82
+
83
+ .tb-bubble__body {
84
+ font-size: 16px;
85
+ line-height: 21px;
86
+ }
87
+
88
+ /* Without a header the body starts 2pt closer to the top of the bubble. */
89
+ .tb-bubble__content > .tb-bubble__body:first-child {
90
+ margin-top: -2px;
91
+ }
92
+
93
+ .tb-line {
94
+ white-space: pre-wrap;
95
+ }
96
+
97
+ .tb-line--bullet,
98
+ .tb-line--numbered {
99
+ position: relative;
100
+ padding-left: 1.2em;
101
+ }
102
+
103
+ .tb-line--bullet::before,
104
+ .tb-line--numbered::before {
105
+ position: absolute;
106
+ left: 0;
107
+ }
108
+
109
+ .tb-line--bullet::before {
110
+ content: "•";
111
+ }
112
+
113
+ .tb-line--numbered::before {
114
+ content: attr(data-marker);
115
+ }
116
+
117
+ .tb-line--quote {
118
+ padding-left: 10px;
119
+ border-left: 3px solid var(--tb-divider);
120
+ }
121
+
122
+ .tb-line--code,
123
+ .tb-mono,
124
+ .tb-code {
125
+ font-family: ui-monospace, Menlo, monospace;
126
+ font-size: 0.92em;
127
+ }
128
+
129
+ .tb-line--code {
130
+ white-space: pre-wrap;
131
+ }
132
+
133
+ .tb-code {
134
+ padding: 0 3px;
135
+ border-radius: 4px;
136
+ background: rgba(0, 0, 0, 0.06);
137
+ }
138
+
139
+ .tb-bold {
140
+ font-weight: 600;
141
+ }
142
+
143
+ .tb-italic {
144
+ font-style: italic;
145
+ }
146
+
147
+ .tb-strike {
148
+ text-decoration: line-through;
149
+ }
150
+
151
+ /* Footer and time share the last row; the time sits right, slightly lower. */
152
+ .tb-bubble__meta {
153
+ display: flex;
154
+ align-items: flex-end;
155
+ gap: 8px;
156
+ margin-top: var(--tb-footer-gap);
157
+ color: var(--tb-muted);
158
+ }
159
+
160
+ .tb-bubble__footer {
161
+ flex: 1;
162
+ font-size: 14px;
163
+ line-height: 18px;
164
+ }
165
+
166
+ .tb-bubble__time {
167
+ font-size: 11px;
168
+ line-height: 13px;
169
+ letter-spacing: 1.2px;
170
+ margin-right: -1.2px;
171
+ margin-bottom: -1.17px;
172
+ white-space: nowrap;
173
+ }
174
+
175
+ /* Buttons: one 44pt row each, separated by a 1pt line. */
176
+ .tb-button {
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ gap: 8.67px;
181
+ height: var(--tb-button-height);
182
+ /* Labels sit 0.67pt above the row's center. */
183
+ padding: 0 var(--tb-padding-x) 1.33px;
184
+ border-top: 1px solid var(--tb-divider);
185
+ color: var(--tb-action);
186
+ font-size: 14px;
187
+ line-height: 18px;
188
+ }
189
+
190
+ /* The last row is 0.67pt shorter: the bubble's rounded bottom eats into it. */
191
+ .tb-button:last-of-type {
192
+ height: calc(var(--tb-button-height) - 0.67px);
193
+ }
194
+
195
+ .tb-button__icon {
196
+ flex: none;
197
+ overflow: visible;
198
+ fill: none;
199
+ stroke: currentColor;
200
+ stroke-width: 1.1;
201
+ stroke-linecap: round;
202
+ stroke-linejoin: round;
203
+ }
204
+
205
+ /* Media header and link preview: inset 3.33pt from the bubble edge, natural aspect ratio. */
206
+ .tb-header--media,
207
+ .tb-link {
208
+ display: block;
209
+ width: calc(100% + var(--tb-padding-x) + var(--tb-padding-right) - 6.67px);
210
+ margin: calc(3.33px - var(--tb-padding-top))
211
+ calc(3.33px - var(--tb-padding-right)) var(--tb-media-gap)
212
+ calc(3.33px - var(--tb-padding-x));
213
+ border-radius: calc(var(--tb-bubble-radius) - 3.33px);
214
+ }
215
+
216
+ .tb-header--media {
217
+ height: auto;
218
+ background: var(--tb-divider);
219
+ }
220
+
221
+ .tb-link {
222
+ display: flex;
223
+ align-items: flex-start;
224
+ gap: 9px;
225
+ height: 52px;
226
+ padding: 22.7px 0 0 8.67px;
227
+ background: #f6f5f5;
228
+ color: #393939;
229
+ font-size: 12px;
230
+ line-height: 16px;
231
+ }
232
+
233
+ .tb-link__icon {
234
+ flex: none;
235
+ width: 9px;
236
+ height: 9.33px;
237
+ margin-top: 2.97px;
238
+ fill: none;
239
+ stroke: var(--tb-text);
240
+ stroke-width: 1.1;
241
+ stroke-linecap: round;
242
+ }
243
+
244
+ .tb-header--document,
245
+ .tb-header--location,
246
+ .tb-header--product {
247
+ min-height: 56px;
248
+ margin-bottom: var(--tb-header-gap);
249
+ padding: 12px;
250
+ border-radius: 6px;
251
+ background: rgba(0, 0, 0, 0.04);
252
+ font-size: 14px;
253
+ }
254
+
255
+ /* Carousel cards scroll sideways under the bubble. */
256
+ .tb-card {
257
+ width: 260px;
258
+ background: var(--tb-bubble-bg);
259
+ border-radius: var(--tb-bubble-radius);
260
+ overflow: hidden;
261
+ }
262
+
263
+ .tb-offer {
264
+ margin-bottom: var(--tb-header-gap);
265
+ font-size: 15px;
266
+ font-weight: 600;
267
+ }
@@ -0,0 +1,194 @@
1
+ /**
2
+ * A WhatsApp message template. Field names follow Meta's template API in camelCase.
3
+ * Authentication templates have their own shape because Meta writes their body text.
4
+ */
5
+ type Template = StandardTemplate | AuthenticationTemplate;
6
+ type Category = "MARKETING" | "UTILITY" | "AUTHENTICATION";
7
+ /** Example values for the `{{name}}` placeholders used anywhere in the template. */
8
+ type Variables = Record<string, Variable>;
9
+ type Variable = {
10
+ /** Sample value shown in the preview and sent to the provider for review. */
11
+ example: string;
12
+ };
13
+ type TemplateBase = {
14
+ /** Optional JSON Schema URL, for editor autocomplete in `.json` files. */
15
+ $schema?: string;
16
+ /** Lowercase letters, numbers and underscores, e.g. `order_shipped`. */
17
+ name: string;
18
+ /** Locale code, e.g. `en_US` or `pt_BR`. */
19
+ language: string;
20
+ /** Seconds the provider keeps trying to deliver the message. */
21
+ messageSendTtlSeconds?: number;
22
+ };
23
+ type StandardTemplate = TemplateBase & {
24
+ category: "MARKETING" | "UTILITY";
25
+ header?: Header;
26
+ /** Text with optional `{{name}}` placeholders and WhatsApp formatting (`*bold*`, `_italic_`). */
27
+ body: {
28
+ text: string;
29
+ };
30
+ footer?: {
31
+ text: string;
32
+ };
33
+ buttons?: Button[];
34
+ /** Turns the template into a limited-time offer. */
35
+ limitedTimeOffer?: LimitedTimeOffer;
36
+ /** Turns the template into a carousel of 2 to 10 cards. */
37
+ carousel?: {
38
+ cards: CarouselCard[];
39
+ };
40
+ /** Asks the user for permission to call them. */
41
+ callPermissionRequest?: true;
42
+ /** Renders the template as an order details message. */
43
+ displayFormat?: "ORDER_DETAILS";
44
+ variables?: Variables;
45
+ };
46
+ type AuthenticationTemplate = TemplateBase & {
47
+ category: "AUTHENTICATION";
48
+ body?: {
49
+ /** Appends "For your security, do not share this code." */
50
+ addSecurityRecommendation?: boolean;
51
+ };
52
+ footer?: {
53
+ /** Appends "This code expires in N minutes." (1 to 90). */
54
+ codeExpirationMinutes?: number;
55
+ };
56
+ button: OtpButton;
57
+ };
58
+ type Header = TextHeader | MediaHeader | LocationHeader | ProductHeader;
59
+ type TextHeader = {
60
+ type: "TEXT";
61
+ /** Up to one `{{name}}` placeholder. */
62
+ text: string;
63
+ };
64
+ type MediaHeader = {
65
+ type: "IMAGE" | "VIDEO" | "DOCUMENT" | "GIF";
66
+ /** Public URL of a sample file, used for the preview and for review. */
67
+ url: string;
68
+ filename?: string;
69
+ };
70
+ type LocationHeader = {
71
+ type: "LOCATION";
72
+ };
73
+ type ProductHeader = {
74
+ type: "PRODUCT";
75
+ };
76
+ type Button = QuickReplyButton | UrlButton | PhoneNumberButton | VoiceCallButton | CopyCodeButton | FlowButton | CatalogButton | MultiProductButton | SingleProductButton | OrderDetailsButton | PaymentRequestButton;
77
+ type QuickReplyButton = {
78
+ type: "QUICK_REPLY";
79
+ text: string;
80
+ };
81
+ type UrlButton = {
82
+ type: "URL";
83
+ text: string;
84
+ /** A `{{name}}` placeholder at the end makes the URL dynamic. */
85
+ url: string;
86
+ };
87
+ type PhoneNumberButton = {
88
+ type: "PHONE_NUMBER";
89
+ text: string;
90
+ /** International format, e.g. `+15550100`. */
91
+ phoneNumber: string;
92
+ };
93
+ type VoiceCallButton = {
94
+ type: "VOICE_CALL";
95
+ text: string;
96
+ ttlMinutes?: number;
97
+ };
98
+ type CopyCodeButton = {
99
+ type: "COPY_CODE";
100
+ /** Sample coupon code, up to 20 characters. */
101
+ example: string;
102
+ };
103
+ type FlowButton = {
104
+ type: "FLOW";
105
+ text: string;
106
+ flowId?: string;
107
+ flowName?: string;
108
+ flowJson?: string;
109
+ flowAction?: "navigate" | "data_exchange";
110
+ navigateScreen?: string;
111
+ };
112
+ type CatalogButton = {
113
+ type: "CATALOG";
114
+ text: string;
115
+ };
116
+ type MultiProductButton = {
117
+ type: "MPM";
118
+ text: string;
119
+ };
120
+ type SingleProductButton = {
121
+ type: "SPM";
122
+ text: string;
123
+ };
124
+ type OrderDetailsButton = {
125
+ type: "ORDER_DETAILS";
126
+ text: string;
127
+ };
128
+ type PaymentRequestButton = {
129
+ type: "PAYMENT_REQUEST";
130
+ text?: string;
131
+ paymentSetting: "pix_dynamic_code" | "boleto" | "payment_link" | "offsite_card_pay";
132
+ };
133
+ type OtpButton = {
134
+ type: "OTP";
135
+ otpType: "COPY_CODE" | "ONE_TAP" | "ZERO_TAP";
136
+ /** Button label. Meta localizes it when omitted. */
137
+ text?: string;
138
+ /** One-tap and zero-tap only: label of the autofill button. */
139
+ autofillText?: string;
140
+ /** One-tap and zero-tap only: up to 5 Android apps. */
141
+ supportedApps?: SupportedApp[];
142
+ /** Zero-tap only: must be `true` to accept Meta's zero-tap terms. */
143
+ zeroTapTermsAccepted?: boolean;
144
+ };
145
+ type SupportedApp = {
146
+ packageName: string;
147
+ /** 11-character app signature hash. */
148
+ signatureHash: string;
149
+ };
150
+ type LimitedTimeOffer = {
151
+ /** Offer headline, e.g. "Expiring offer!". */
152
+ text: string;
153
+ /** Shows a countdown; the expiration time is set when sending. */
154
+ hasExpiration?: boolean;
155
+ };
156
+ type CarouselCard = {
157
+ header: {
158
+ type: "IMAGE" | "VIDEO";
159
+ url: string;
160
+ } | ProductHeader;
161
+ body?: {
162
+ text: string;
163
+ };
164
+ buttons?: Array<QuickReplyButton | UrlButton | PhoneNumberButton | SingleProductButton>;
165
+ };
166
+
167
+ type HttpRequest = {
168
+ method: "POST";
169
+ url: string;
170
+ headers: Record<string, string>;
171
+ body: unknown;
172
+ /** Printed as `#` comments above the request by `toCurl`. */
173
+ comments?: string[];
174
+ };
175
+ type Adapter = {
176
+ name: string;
177
+ toRequests(template: Template): HttpRequest[];
178
+ };
179
+ type AdapterDefinition<O> = {
180
+ name: string;
181
+ toRequests(template: Template, options: O): HttpRequest[];
182
+ };
183
+ /** Turns an adapter definition into a factory: `meta({ wabaId })` returns an `Adapter`. */
184
+ declare function defineAdapter<O extends object>(definition: AdapterDefinition<O>): (...[options]: Partial<O> extends O ? [O?] : [O]) => Adapter;
185
+ /** Thrown when a template uses a field the provider cannot create. */
186
+ declare class UnsupportedByProviderError extends Error {
187
+ readonly provider: string;
188
+ readonly path: string;
189
+ readonly code = "UNSUPPORTED_BY_PROVIDER";
190
+ constructor(provider: string, path: string, message: string);
191
+ }
192
+
193
+ export { UnsupportedByProviderError as U, defineAdapter as q };
194
+ export type { Adapter as A, Button as B, Category as C, FlowButton as F, HttpRequest as H, LimitedTimeOffer as L, MediaHeader as M, OrderDetailsButton as O, PaymentRequestButton as P, QuickReplyButton as Q, StandardTemplate as S, Template as T, Variables as V, AuthenticationTemplate as a, CarouselCard as b, CatalogButton as c, CopyCodeButton as d, Header as e, LocationHeader as f, MultiProductButton as g, OtpButton as h, PhoneNumberButton as i, ProductHeader as j, SingleProductButton as k, SupportedApp as l, TextHeader as m, UrlButton as n, Variable as o, VoiceCallButton as p };
@@ -0,0 +1,194 @@
1
+ /**
2
+ * A WhatsApp message template. Field names follow Meta's template API in camelCase.
3
+ * Authentication templates have their own shape because Meta writes their body text.
4
+ */
5
+ type Template = StandardTemplate | AuthenticationTemplate;
6
+ type Category = "MARKETING" | "UTILITY" | "AUTHENTICATION";
7
+ /** Example values for the `{{name}}` placeholders used anywhere in the template. */
8
+ type Variables = Record<string, Variable>;
9
+ type Variable = {
10
+ /** Sample value shown in the preview and sent to the provider for review. */
11
+ example: string;
12
+ };
13
+ type TemplateBase = {
14
+ /** Optional JSON Schema URL, for editor autocomplete in `.json` files. */
15
+ $schema?: string;
16
+ /** Lowercase letters, numbers and underscores, e.g. `order_shipped`. */
17
+ name: string;
18
+ /** Locale code, e.g. `en_US` or `pt_BR`. */
19
+ language: string;
20
+ /** Seconds the provider keeps trying to deliver the message. */
21
+ messageSendTtlSeconds?: number;
22
+ };
23
+ type StandardTemplate = TemplateBase & {
24
+ category: "MARKETING" | "UTILITY";
25
+ header?: Header;
26
+ /** Text with optional `{{name}}` placeholders and WhatsApp formatting (`*bold*`, `_italic_`). */
27
+ body: {
28
+ text: string;
29
+ };
30
+ footer?: {
31
+ text: string;
32
+ };
33
+ buttons?: Button[];
34
+ /** Turns the template into a limited-time offer. */
35
+ limitedTimeOffer?: LimitedTimeOffer;
36
+ /** Turns the template into a carousel of 2 to 10 cards. */
37
+ carousel?: {
38
+ cards: CarouselCard[];
39
+ };
40
+ /** Asks the user for permission to call them. */
41
+ callPermissionRequest?: true;
42
+ /** Renders the template as an order details message. */
43
+ displayFormat?: "ORDER_DETAILS";
44
+ variables?: Variables;
45
+ };
46
+ type AuthenticationTemplate = TemplateBase & {
47
+ category: "AUTHENTICATION";
48
+ body?: {
49
+ /** Appends "For your security, do not share this code." */
50
+ addSecurityRecommendation?: boolean;
51
+ };
52
+ footer?: {
53
+ /** Appends "This code expires in N minutes." (1 to 90). */
54
+ codeExpirationMinutes?: number;
55
+ };
56
+ button: OtpButton;
57
+ };
58
+ type Header = TextHeader | MediaHeader | LocationHeader | ProductHeader;
59
+ type TextHeader = {
60
+ type: "TEXT";
61
+ /** Up to one `{{name}}` placeholder. */
62
+ text: string;
63
+ };
64
+ type MediaHeader = {
65
+ type: "IMAGE" | "VIDEO" | "DOCUMENT" | "GIF";
66
+ /** Public URL of a sample file, used for the preview and for review. */
67
+ url: string;
68
+ filename?: string;
69
+ };
70
+ type LocationHeader = {
71
+ type: "LOCATION";
72
+ };
73
+ type ProductHeader = {
74
+ type: "PRODUCT";
75
+ };
76
+ type Button = QuickReplyButton | UrlButton | PhoneNumberButton | VoiceCallButton | CopyCodeButton | FlowButton | CatalogButton | MultiProductButton | SingleProductButton | OrderDetailsButton | PaymentRequestButton;
77
+ type QuickReplyButton = {
78
+ type: "QUICK_REPLY";
79
+ text: string;
80
+ };
81
+ type UrlButton = {
82
+ type: "URL";
83
+ text: string;
84
+ /** A `{{name}}` placeholder at the end makes the URL dynamic. */
85
+ url: string;
86
+ };
87
+ type PhoneNumberButton = {
88
+ type: "PHONE_NUMBER";
89
+ text: string;
90
+ /** International format, e.g. `+15550100`. */
91
+ phoneNumber: string;
92
+ };
93
+ type VoiceCallButton = {
94
+ type: "VOICE_CALL";
95
+ text: string;
96
+ ttlMinutes?: number;
97
+ };
98
+ type CopyCodeButton = {
99
+ type: "COPY_CODE";
100
+ /** Sample coupon code, up to 20 characters. */
101
+ example: string;
102
+ };
103
+ type FlowButton = {
104
+ type: "FLOW";
105
+ text: string;
106
+ flowId?: string;
107
+ flowName?: string;
108
+ flowJson?: string;
109
+ flowAction?: "navigate" | "data_exchange";
110
+ navigateScreen?: string;
111
+ };
112
+ type CatalogButton = {
113
+ type: "CATALOG";
114
+ text: string;
115
+ };
116
+ type MultiProductButton = {
117
+ type: "MPM";
118
+ text: string;
119
+ };
120
+ type SingleProductButton = {
121
+ type: "SPM";
122
+ text: string;
123
+ };
124
+ type OrderDetailsButton = {
125
+ type: "ORDER_DETAILS";
126
+ text: string;
127
+ };
128
+ type PaymentRequestButton = {
129
+ type: "PAYMENT_REQUEST";
130
+ text?: string;
131
+ paymentSetting: "pix_dynamic_code" | "boleto" | "payment_link" | "offsite_card_pay";
132
+ };
133
+ type OtpButton = {
134
+ type: "OTP";
135
+ otpType: "COPY_CODE" | "ONE_TAP" | "ZERO_TAP";
136
+ /** Button label. Meta localizes it when omitted. */
137
+ text?: string;
138
+ /** One-tap and zero-tap only: label of the autofill button. */
139
+ autofillText?: string;
140
+ /** One-tap and zero-tap only: up to 5 Android apps. */
141
+ supportedApps?: SupportedApp[];
142
+ /** Zero-tap only: must be `true` to accept Meta's zero-tap terms. */
143
+ zeroTapTermsAccepted?: boolean;
144
+ };
145
+ type SupportedApp = {
146
+ packageName: string;
147
+ /** 11-character app signature hash. */
148
+ signatureHash: string;
149
+ };
150
+ type LimitedTimeOffer = {
151
+ /** Offer headline, e.g. "Expiring offer!". */
152
+ text: string;
153
+ /** Shows a countdown; the expiration time is set when sending. */
154
+ hasExpiration?: boolean;
155
+ };
156
+ type CarouselCard = {
157
+ header: {
158
+ type: "IMAGE" | "VIDEO";
159
+ url: string;
160
+ } | ProductHeader;
161
+ body?: {
162
+ text: string;
163
+ };
164
+ buttons?: Array<QuickReplyButton | UrlButton | PhoneNumberButton | SingleProductButton>;
165
+ };
166
+
167
+ type HttpRequest = {
168
+ method: "POST";
169
+ url: string;
170
+ headers: Record<string, string>;
171
+ body: unknown;
172
+ /** Printed as `#` comments above the request by `toCurl`. */
173
+ comments?: string[];
174
+ };
175
+ type Adapter = {
176
+ name: string;
177
+ toRequests(template: Template): HttpRequest[];
178
+ };
179
+ type AdapterDefinition<O> = {
180
+ name: string;
181
+ toRequests(template: Template, options: O): HttpRequest[];
182
+ };
183
+ /** Turns an adapter definition into a factory: `meta({ wabaId })` returns an `Adapter`. */
184
+ declare function defineAdapter<O extends object>(definition: AdapterDefinition<O>): (...[options]: Partial<O> extends O ? [O?] : [O]) => Adapter;
185
+ /** Thrown when a template uses a field the provider cannot create. */
186
+ declare class UnsupportedByProviderError extends Error {
187
+ readonly provider: string;
188
+ readonly path: string;
189
+ readonly code = "UNSUPPORTED_BY_PROVIDER";
190
+ constructor(provider: string, path: string, message: string);
191
+ }
192
+
193
+ export { UnsupportedByProviderError as U, defineAdapter as q };
194
+ export type { Adapter as A, Button as B, Category as C, FlowButton as F, HttpRequest as H, LimitedTimeOffer as L, MediaHeader as M, OrderDetailsButton as O, PaymentRequestButton as P, QuickReplyButton as Q, StandardTemplate as S, Template as T, Variables as V, AuthenticationTemplate as a, CarouselCard as b, CatalogButton as c, CopyCodeButton as d, Header as e, LocationHeader as f, MultiProductButton as g, OtpButton as h, PhoneNumberButton as i, ProductHeader as j, SingleProductButton as k, SupportedApp as l, TextHeader as m, UrlButton as n, Variable as o, VoiceCallButton as p };