samva 0.34.0 → 0.36.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.
Files changed (129) hide show
  1. package/AGENTS.md +17 -0
  2. package/README.md +2 -1
  3. package/dist/client/sdk.gen.d.ts +325 -331
  4. package/dist/client/sdk.gen.js +406 -454
  5. package/dist/client/types.gen.d.ts +3465 -750
  6. package/dist/effect/agents.d.ts +222 -17
  7. package/dist/effect/agents.js +7 -1
  8. package/dist/effect/analytics.d.ts +21 -15
  9. package/dist/effect/api-keys.d.ts +30 -24
  10. package/dist/effect/campaigns.d.ts +695 -39
  11. package/dist/effect/categories.d.ts +3 -3
  12. package/dist/effect/contact-groups.d.ts +15 -15
  13. package/dist/effect/contacts.d.ts +56 -52
  14. package/dist/effect/conversations.d.ts +51 -45
  15. package/dist/effect/email.d.ts +82 -82
  16. package/dist/effect/errors.d.ts +1 -1
  17. package/dist/effect/errors.js +2 -2
  18. package/dist/effect/extension-installations.d.ts +64 -12
  19. package/dist/effect/extensions.d.ts +16 -16
  20. package/dist/effect/generated/agents.d.ts +2902 -150
  21. package/dist/effect/generated/agents.js +219 -31
  22. package/dist/effect/generated/analytics.d.ts +127 -136
  23. package/dist/effect/generated/analytics.js +72 -37
  24. package/dist/effect/generated/api-keys.d.ts +243 -47
  25. package/dist/effect/generated/api-keys.js +27 -12
  26. package/dist/effect/generated/attachments.d.ts +89 -1
  27. package/dist/effect/generated/attachments.js +10 -2
  28. package/dist/effect/generated/brands.d.ts +133 -1
  29. package/dist/effect/generated/brands.js +22 -10
  30. package/dist/effect/generated/campaigns.d.ts +1467 -143
  31. package/dist/effect/generated/campaigns.js +84 -20
  32. package/dist/effect/generated/contact-events.d.ts +26 -4
  33. package/dist/effect/generated/contact-events.js +5 -3
  34. package/dist/effect/generated/contact-groups.d.ts +233 -13
  35. package/dist/effect/generated/contact-groups.js +33 -17
  36. package/dist/effect/generated/contacts.d.ts +634 -96
  37. package/dist/effect/generated/contacts.js +82 -20
  38. package/dist/effect/generated/conversations.d.ts +501 -108
  39. package/dist/effect/generated/conversations.js +106 -22
  40. package/dist/effect/generated/custom-fields.d.ts +89 -1
  41. package/dist/effect/generated/custom-fields.js +11 -3
  42. package/dist/effect/generated/email.d.ts +1447 -83
  43. package/dist/effect/generated/email.js +167 -43
  44. package/dist/effect/generated/events.d.ts +51 -7
  45. package/dist/effect/generated/events.js +9 -5
  46. package/dist/effect/generated/extension-installations.d.ts +1052 -77
  47. package/dist/effect/generated/extension-installations.js +45 -31
  48. package/dist/effect/generated/extensions.d.ts +123 -13
  49. package/dist/effect/generated/extensions.js +20 -10
  50. package/dist/effect/generated/feedback.d.ts +23 -1
  51. package/dist/effect/generated/feedback.js +6 -4
  52. package/dist/effect/generated/index.d.ts +3 -1
  53. package/dist/effect/generated/journeys.d.ts +684 -16
  54. package/dist/effect/generated/journeys.js +37 -9
  55. package/dist/effect/generated/mailboxes.d.ts +6169 -1734
  56. package/dist/effect/generated/mailboxes.js +549 -344
  57. package/dist/effect/generated/media.d.ts +125 -15
  58. package/dist/effect/generated/media.js +15 -2
  59. package/dist/effect/generated/messages.d.ts +2036 -117
  60. package/dist/effect/generated/messages.js +286 -54
  61. package/dist/effect/generated/namespaces.d.ts +215 -55
  62. package/dist/effect/generated/namespaces.js +30 -12
  63. package/dist/effect/generated/newsletter-domains.d.ts +98 -12
  64. package/dist/effect/generated/newsletter-domains.js +20 -13
  65. package/dist/effect/generated/newsletter-issues.d.ts +354 -19
  66. package/dist/effect/generated/newsletter-issues.js +162 -98
  67. package/dist/effect/generated/newsletters.d.ts +123 -13
  68. package/dist/effect/generated/newsletters.js +19 -9
  69. package/dist/effect/generated/operations.d.ts +76 -10
  70. package/dist/effect/generated/operations.js +12 -6
  71. package/dist/effect/generated/organizations.d.ts +287 -7
  72. package/dist/effect/generated/organizations.js +33 -5
  73. package/dist/effect/generated/policies.d.ts +953 -0
  74. package/dist/effect/generated/policies.js +116 -0
  75. package/dist/effect/generated/scheduled-messages.d.ts +4418 -49
  76. package/dist/effect/generated/scheduled-messages.js +77 -13
  77. package/dist/effect/generated/shared.d.ts +3213 -521
  78. package/dist/effect/generated/shared.js +713 -128
  79. package/dist/effect/generated/subscriptions.d.ts +23 -1
  80. package/dist/effect/generated/subscriptions.js +6 -4
  81. package/dist/effect/generated/templates.d.ts +2081 -693
  82. package/dist/effect/generated/templates.js +482 -267
  83. package/dist/effect/generated/topic-forms.d.ts +111 -1
  84. package/dist/effect/generated/topic-forms.js +23 -13
  85. package/dist/effect/generated/topics.d.ts +353 -43
  86. package/dist/effect/generated/topics.js +67 -19
  87. package/dist/effect/generated/webhooks.d.ts +318 -57
  88. package/dist/effect/generated/webhooks.js +68 -17
  89. package/dist/effect/generated/whoami.d.ts +35 -5
  90. package/dist/effect/generated/whoami.js +4 -2
  91. package/dist/effect/generated-metadata.d.ts +56 -32
  92. package/dist/effect/generated-metadata.js +137 -105
  93. package/dist/effect/index.d.ts +1 -0
  94. package/dist/effect/index.js +3 -2
  95. package/dist/effect/internal/client.js +1 -1
  96. package/dist/effect/internal/email-sender.d.ts +1 -1
  97. package/dist/effect/internal/operation.js +5 -32
  98. package/dist/effect/internal/send.d.ts +1 -1
  99. package/dist/effect/journeys.d.ts +169 -83
  100. package/dist/effect/mailboxes.d.ts +978 -301
  101. package/dist/effect/mailboxes.js +1 -11
  102. package/dist/effect/media.d.ts +1 -1
  103. package/dist/effect/messages.d.ts +40 -40
  104. package/dist/effect/namespaces.d.ts +15 -15
  105. package/dist/effect/newsletter-domains.d.ts +5 -5
  106. package/dist/effect/newsletters.d.ts +1 -1
  107. package/dist/effect/operations.d.ts +11 -11
  108. package/dist/effect/organizations.d.ts +2 -2
  109. package/dist/effect/policies.d.ts +65 -0
  110. package/dist/effect/policies.js +16 -0
  111. package/dist/effect/scheduled-messages.d.ts +869 -8
  112. package/dist/effect/templates.d.ts +43 -45
  113. package/dist/effect/templates.js +5 -3
  114. package/dist/effect/topics.d.ts +23 -23
  115. package/dist/effect/webhooks.d.ts +29 -26
  116. package/dist/index.js +2 -2
  117. package/dist/mailbox/test.js +11 -4
  118. package/dist/mailbox/types.d.ts +39 -3
  119. package/dist/normalize.js +13 -1
  120. package/dist/package.js +1 -1
  121. package/dist/promises/client.d.ts +4 -2
  122. package/dist/promises/client.js +5 -3
  123. package/dist/promises/errors.gen.d.ts +38 -2
  124. package/dist/promises/errors.gen.js +394 -34
  125. package/dist/promises/index.js +2 -2
  126. package/dist/promises/types.gen.d.ts +1 -1
  127. package/dist/service-map.d.ts +39 -28
  128. package/dist/service-map.js +220 -782
  129. package/package.json +13 -8
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BrandAssets, BrandFooter, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, NamespaceId, OrganizationId, RenderLocale, RenderTimeZone, ResourceNotFoundError, ServiceUnavailableError, SuccessResponse, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, UnauthorizedError, UserId, ValidationError, VersionCursor } from "./shared";
4
+ import { ApiKeySecurityMiddleware, BrandAssets, BrandFooter, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MalformedRequestError, NamespaceId, OrganizationId, RenderLocale, RenderTimeZone, ResourceNotFoundError, ServiceUnavailableError, SuccessResponse, TemplateFromDefault, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, UnauthorizedError, UserId, ValidationError } from "./shared";
5
5
  export type TemplatePublicationBrand = {
6
6
  readonly slug: string;
7
7
  readonly digest: string;
@@ -14,6 +14,50 @@ export declare const TemplatePublicationBrand: Schema.Struct<{
14
14
  }>;
15
15
  export type TemplateFamilyId = string & EffectBrand.Brand<"TemplateFamilyId">;
16
16
  export declare const TemplateFamilyId: Schema.brand<Schema.String, "TemplateFamilyId">;
17
+ export type WhatsAppTemplateButton = {
18
+ readonly type: "QUICK_REPLY";
19
+ readonly text: string;
20
+ } | {
21
+ readonly type: "URL";
22
+ readonly text: string;
23
+ readonly url: string;
24
+ readonly example?: ReadonlyArray<string>;
25
+ } | {
26
+ readonly type: "PHONE_NUMBER";
27
+ readonly text: string;
28
+ readonly phone_number: string;
29
+ } | {
30
+ readonly type: "COPY_CODE";
31
+ readonly example: string;
32
+ } | {
33
+ readonly type: "FLOW";
34
+ readonly text: string;
35
+ readonly flow: string;
36
+ readonly flow_action: "navigate" | "data_exchange";
37
+ readonly navigate_screen?: string;
38
+ };
39
+ export declare const WhatsAppTemplateButton: Schema.Union<readonly [Schema.Struct<{
40
+ readonly type: Schema.Literal<"QUICK_REPLY">;
41
+ readonly text: Schema.String;
42
+ }>, Schema.Struct<{
43
+ readonly type: Schema.Literal<"URL">;
44
+ readonly text: Schema.String;
45
+ readonly url: Schema.String;
46
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
47
+ }>, Schema.Struct<{
48
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
49
+ readonly text: Schema.String;
50
+ readonly phone_number: Schema.String;
51
+ }>, Schema.Struct<{
52
+ readonly type: Schema.Literal<"COPY_CODE">;
53
+ readonly example: Schema.String;
54
+ }>, Schema.Struct<{
55
+ readonly type: Schema.Literal<"FLOW">;
56
+ readonly text: Schema.String;
57
+ readonly flow: Schema.String;
58
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
59
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
60
+ }>]>;
17
61
  export type BrandRenderedFooter = {
18
62
  readonly html: string;
19
63
  readonly text: string;
@@ -66,9 +110,8 @@ export type TemplateFamilyMember = {
66
110
  readonly id: TemplateId;
67
111
  readonly name: string;
68
112
  readonly slug: string;
69
- readonly channel: "email";
113
+ readonly channel: "sms" | "whatsapp" | "email";
70
114
  readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
71
- readonly isActive: boolean;
72
115
  readonly createdAt: string;
73
116
  readonly updatedAt: string;
74
117
  };
@@ -76,9 +119,8 @@ export declare const TemplateFamilyMember: Schema.Struct<{
76
119
  readonly id: Schema.brand<Schema.String, "TemplateId">;
77
120
  readonly name: Schema.String;
78
121
  readonly slug: Schema.String;
79
- readonly channel: Schema.Literal<"email">;
122
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
80
123
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
81
- readonly isActive: Schema.Boolean;
82
124
  readonly createdAt: Schema.String;
83
125
  readonly updatedAt: Schema.String;
84
126
  }>;
@@ -86,13 +128,12 @@ export type TemplateSummary = {
86
128
  readonly id: TemplateId;
87
129
  readonly slug: string;
88
130
  readonly name: string;
89
- readonly channel: "email";
131
+ readonly channel: "sms" | "whatsapp" | "email";
90
132
  readonly projectId: TemplateProjectId;
91
133
  readonly namespaceId: NamespaceId | null;
92
134
  readonly shared: boolean;
93
135
  readonly entryPath: string;
94
136
  readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
95
- readonly isActive: boolean;
96
137
  readonly publishedAt: string | null;
97
138
  readonly brand: TemplatePublicationBrand | null;
98
139
  readonly fromDefault: TemplateFromDefault | null;
@@ -105,13 +146,12 @@ export declare const TemplateSummary: Schema.Struct<{
105
146
  readonly id: Schema.brand<Schema.String, "TemplateId">;
106
147
  readonly slug: Schema.String;
107
148
  readonly name: Schema.String;
108
- readonly channel: Schema.Literal<"email">;
149
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
109
150
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
110
151
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
111
152
  readonly shared: Schema.Boolean;
112
153
  readonly entryPath: Schema.String;
113
154
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
114
- readonly isActive: Schema.Boolean;
115
155
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
116
156
  readonly brand: Schema.Union<readonly [Schema.Struct<{
117
157
  readonly slug: Schema.String;
@@ -127,17 +167,131 @@ export declare const TemplateSummary: Schema.Struct<{
127
167
  readonly createdAt: Schema.String;
128
168
  readonly updatedAt: Schema.String;
129
169
  }>;
170
+ export type WhatsAppTemplateComponent = {
171
+ readonly type: "HEADER";
172
+ readonly format: "TEXT";
173
+ readonly text: string;
174
+ readonly example?: {
175
+ readonly header_text: ReadonlyArray<string>;
176
+ };
177
+ } | {
178
+ readonly type: "BODY";
179
+ readonly text: string;
180
+ readonly example?: {
181
+ readonly body_text: ReadonlyArray<ReadonlyArray<string>>;
182
+ };
183
+ } | {
184
+ readonly type: "FOOTER";
185
+ readonly text: string;
186
+ } | {
187
+ readonly type: "BUTTONS";
188
+ readonly buttons: ReadonlyArray<WhatsAppTemplateButton>;
189
+ };
190
+ export declare const WhatsAppTemplateComponent: Schema.Union<readonly [Schema.Struct<{
191
+ readonly type: Schema.Literal<"HEADER">;
192
+ readonly format: Schema.Literal<"TEXT">;
193
+ readonly text: Schema.String;
194
+ readonly example: Schema.optionalKey<Schema.Struct<{
195
+ readonly header_text: Schema.$Array<Schema.String>;
196
+ }>>;
197
+ }>, Schema.Struct<{
198
+ readonly type: Schema.Literal<"BODY">;
199
+ readonly text: Schema.String;
200
+ readonly example: Schema.optionalKey<Schema.Struct<{
201
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
202
+ }>>;
203
+ }>, Schema.Struct<{
204
+ readonly type: Schema.Literal<"FOOTER">;
205
+ readonly text: Schema.String;
206
+ }>, Schema.Struct<{
207
+ readonly type: Schema.Literal<"BUTTONS">;
208
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
209
+ readonly type: Schema.Literal<"QUICK_REPLY">;
210
+ readonly text: Schema.String;
211
+ }>, Schema.Struct<{
212
+ readonly type: Schema.Literal<"URL">;
213
+ readonly text: Schema.String;
214
+ readonly url: Schema.String;
215
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
216
+ }>, Schema.Struct<{
217
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
218
+ readonly text: Schema.String;
219
+ readonly phone_number: Schema.String;
220
+ }>, Schema.Struct<{
221
+ readonly type: Schema.Literal<"COPY_CODE">;
222
+ readonly example: Schema.String;
223
+ }>, Schema.Struct<{
224
+ readonly type: Schema.Literal<"FLOW">;
225
+ readonly text: Schema.String;
226
+ readonly flow: Schema.String;
227
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
228
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
229
+ }>]>>;
230
+ }>]>;
231
+ export type TemplateFamily = {
232
+ readonly id: TemplateFamilyId;
233
+ readonly name: string;
234
+ readonly members: ReadonlyArray<TemplateFamilyMember>;
235
+ readonly createdAt: string;
236
+ readonly updatedAt: string;
237
+ };
238
+ export declare const TemplateFamily: Schema.Struct<{
239
+ readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
240
+ readonly name: Schema.String;
241
+ readonly members: Schema.$Array<Schema.Struct<{
242
+ readonly id: Schema.brand<Schema.String, "TemplateId">;
243
+ readonly name: Schema.String;
244
+ readonly slug: Schema.String;
245
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
246
+ readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
247
+ readonly createdAt: Schema.String;
248
+ readonly updatedAt: Schema.String;
249
+ }>>;
250
+ readonly createdAt: Schema.String;
251
+ readonly updatedAt: Schema.String;
252
+ }>;
253
+ export type TemplatePage = {
254
+ readonly items: ReadonlyArray<TemplateSummary>;
255
+ readonly nextCursor: string | null;
256
+ };
257
+ export declare const TemplatePage: Schema.Struct<{
258
+ readonly items: Schema.$Array<Schema.Struct<{
259
+ readonly id: Schema.brand<Schema.String, "TemplateId">;
260
+ readonly slug: Schema.String;
261
+ readonly name: Schema.String;
262
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
263
+ readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
264
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
265
+ readonly shared: Schema.Boolean;
266
+ readonly entryPath: Schema.String;
267
+ readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
268
+ readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
269
+ readonly brand: Schema.Union<readonly [Schema.Struct<{
270
+ readonly slug: Schema.String;
271
+ readonly digest: Schema.String;
272
+ readonly stale: Schema.Boolean;
273
+ }>, Schema.Null]>;
274
+ readonly fromDefault: Schema.Union<readonly [Schema.Struct<{
275
+ readonly email: Schema.String;
276
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
277
+ }>, Schema.Null]>;
278
+ readonly usageCount: Schema.Finite;
279
+ readonly lastUsedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
280
+ readonly createdAt: Schema.String;
281
+ readonly updatedAt: Schema.String;
282
+ }>>;
283
+ readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
284
+ }>;
130
285
  export type Template = {
131
286
  readonly id: TemplateId;
132
287
  readonly slug: string;
133
288
  readonly name: string;
134
- readonly channel: "email";
289
+ readonly channel: "sms" | "whatsapp" | "email";
135
290
  readonly projectId: TemplateProjectId;
136
291
  readonly namespaceId: NamespaceId | null;
137
292
  readonly shared: boolean;
138
293
  readonly entryPath: string;
139
294
  readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
140
- readonly isActive: boolean;
141
295
  readonly publishedAt: string | null;
142
296
  readonly brand: TemplatePublicationBrand | null;
143
297
  readonly fromDefault: TemplateFromDefault | null;
@@ -157,6 +311,18 @@ export type Template = {
157
311
  readonly [x: string]: string;
158
312
  } | null;
159
313
  } | null;
314
+ readonly sms: {
315
+ readonly body: string;
316
+ readonly encoding: string | null;
317
+ readonly estimatedSegments: number | null;
318
+ readonly category: "transactional" | "promotional" | "service_implicit" | null;
319
+ } | null;
320
+ readonly whatsapp: {
321
+ readonly name: string;
322
+ readonly language: string;
323
+ readonly category: "marketing" | "utility" | "authentication";
324
+ readonly components: ReadonlyArray<WhatsAppTemplateComponent>;
325
+ } | null;
160
326
  readonly publicationId: TemplatePublicationId | null;
161
327
  readonly inputContractId: TemplateInputContractId | null;
162
328
  readonly inputSchema: {
@@ -167,13 +333,12 @@ export declare const Template: Schema.Struct<{
167
333
  readonly id: Schema.brand<Schema.String, "TemplateId">;
168
334
  readonly slug: Schema.String;
169
335
  readonly name: Schema.String;
170
- readonly channel: Schema.Literal<"email">;
336
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
171
337
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
172
338
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
173
339
  readonly shared: Schema.Boolean;
174
340
  readonly entryPath: Schema.String;
175
341
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
176
- readonly isActive: Schema.Boolean;
177
342
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
178
343
  readonly brand: Schema.Union<readonly [Schema.Struct<{
179
344
  readonly slug: Schema.String;
@@ -201,61 +366,79 @@ export declare const Template: Schema.Struct<{
201
366
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
202
367
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
203
368
  }>, Schema.Null]>;
369
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
370
+ readonly body: Schema.String;
371
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
372
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
373
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
374
+ }>, Schema.Null]>;
375
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
376
+ readonly name: Schema.String;
377
+ readonly language: Schema.String;
378
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
379
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
380
+ readonly type: Schema.Literal<"HEADER">;
381
+ readonly format: Schema.Literal<"TEXT">;
382
+ readonly text: Schema.String;
383
+ readonly example: Schema.optionalKey<Schema.Struct<{
384
+ readonly header_text: Schema.$Array<Schema.String>;
385
+ }>>;
386
+ }>, Schema.Struct<{
387
+ readonly type: Schema.Literal<"BODY">;
388
+ readonly text: Schema.String;
389
+ readonly example: Schema.optionalKey<Schema.Struct<{
390
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
391
+ }>>;
392
+ }>, Schema.Struct<{
393
+ readonly type: Schema.Literal<"FOOTER">;
394
+ readonly text: Schema.String;
395
+ }>, Schema.Struct<{
396
+ readonly type: Schema.Literal<"BUTTONS">;
397
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
398
+ readonly type: Schema.Literal<"QUICK_REPLY">;
399
+ readonly text: Schema.String;
400
+ }>, Schema.Struct<{
401
+ readonly type: Schema.Literal<"URL">;
402
+ readonly text: Schema.String;
403
+ readonly url: Schema.String;
404
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
405
+ }>, Schema.Struct<{
406
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
407
+ readonly text: Schema.String;
408
+ readonly phone_number: Schema.String;
409
+ }>, Schema.Struct<{
410
+ readonly type: Schema.Literal<"COPY_CODE">;
411
+ readonly example: Schema.String;
412
+ }>, Schema.Struct<{
413
+ readonly type: Schema.Literal<"FLOW">;
414
+ readonly text: Schema.String;
415
+ readonly flow: Schema.String;
416
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
417
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
418
+ }>]>>;
419
+ }>]>>;
420
+ }>, Schema.Null]>;
204
421
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
205
422
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
206
423
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
207
424
  }>;
208
- export type TemplateFamily = {
209
- readonly id: TemplateFamilyId;
210
- readonly name: string;
211
- readonly members: ReadonlyArray<TemplateFamilyMember>;
212
- readonly createdAt: string;
213
- readonly updatedAt: string;
214
- };
215
- export declare const TemplateFamily: Schema.Struct<{
216
- readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
217
- readonly name: Schema.String;
218
- readonly members: Schema.$Array<Schema.Struct<{
219
- readonly id: Schema.brand<Schema.String, "TemplateId">;
220
- readonly name: Schema.String;
221
- readonly slug: Schema.String;
222
- readonly channel: Schema.Literal<"email">;
223
- readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
224
- readonly isActive: Schema.Boolean;
225
- readonly createdAt: Schema.String;
226
- readonly updatedAt: Schema.String;
227
- }>>;
228
- readonly createdAt: Schema.String;
229
- readonly updatedAt: Schema.String;
230
- }>;
231
- export type TemplatePage = {
232
- readonly items: ReadonlyArray<TemplateSummary>;
425
+ export type TemplateFamilyPage = {
426
+ readonly items: ReadonlyArray<TemplateFamily>;
233
427
  readonly nextCursor: string | null;
234
428
  };
235
- export declare const TemplatePage: Schema.Struct<{
429
+ export declare const TemplateFamilyPage: Schema.Struct<{
236
430
  readonly items: Schema.$Array<Schema.Struct<{
237
- readonly id: Schema.brand<Schema.String, "TemplateId">;
238
- readonly slug: Schema.String;
431
+ readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
239
432
  readonly name: Schema.String;
240
- readonly channel: Schema.Literal<"email">;
241
- readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
242
- readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
243
- readonly shared: Schema.Boolean;
244
- readonly entryPath: Schema.String;
245
- readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
246
- readonly isActive: Schema.Boolean;
247
- readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
248
- readonly brand: Schema.Union<readonly [Schema.Struct<{
433
+ readonly members: Schema.$Array<Schema.Struct<{
434
+ readonly id: Schema.brand<Schema.String, "TemplateId">;
435
+ readonly name: Schema.String;
249
436
  readonly slug: Schema.String;
250
- readonly digest: Schema.String;
251
- readonly stale: Schema.Boolean;
252
- }>, Schema.Null]>;
253
- readonly fromDefault: Schema.Union<readonly [Schema.Struct<{
254
- readonly email: Schema.String;
255
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
256
- }>, Schema.Null]>;
257
- readonly usageCount: Schema.Finite;
258
- readonly lastUsedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
437
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
438
+ readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
439
+ readonly createdAt: Schema.String;
440
+ readonly updatedAt: Schema.String;
441
+ }>>;
259
442
  readonly createdAt: Schema.String;
260
443
  readonly updatedAt: Schema.String;
261
444
  }>>;
@@ -274,13 +457,12 @@ export declare const TemplateFromWebsite: Schema.Struct<{
274
457
  readonly id: Schema.brand<Schema.String, "TemplateId">;
275
458
  readonly slug: Schema.String;
276
459
  readonly name: Schema.String;
277
- readonly channel: Schema.Literal<"email">;
460
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
278
461
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
279
462
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
280
463
  readonly shared: Schema.Boolean;
281
464
  readonly entryPath: Schema.String;
282
465
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
283
- readonly isActive: Schema.Boolean;
284
466
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
285
467
  readonly brand: Schema.Union<readonly [Schema.Struct<{
286
468
  readonly slug: Schema.String;
@@ -308,6 +490,58 @@ export declare const TemplateFromWebsite: Schema.Struct<{
308
490
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
309
491
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
310
492
  }>, Schema.Null]>;
493
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
494
+ readonly body: Schema.String;
495
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
496
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
497
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
498
+ }>, Schema.Null]>;
499
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
500
+ readonly name: Schema.String;
501
+ readonly language: Schema.String;
502
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
503
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
504
+ readonly type: Schema.Literal<"HEADER">;
505
+ readonly format: Schema.Literal<"TEXT">;
506
+ readonly text: Schema.String;
507
+ readonly example: Schema.optionalKey<Schema.Struct<{
508
+ readonly header_text: Schema.$Array<Schema.String>;
509
+ }>>;
510
+ }>, Schema.Struct<{
511
+ readonly type: Schema.Literal<"BODY">;
512
+ readonly text: Schema.String;
513
+ readonly example: Schema.optionalKey<Schema.Struct<{
514
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
515
+ }>>;
516
+ }>, Schema.Struct<{
517
+ readonly type: Schema.Literal<"FOOTER">;
518
+ readonly text: Schema.String;
519
+ }>, Schema.Struct<{
520
+ readonly type: Schema.Literal<"BUTTONS">;
521
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
522
+ readonly type: Schema.Literal<"QUICK_REPLY">;
523
+ readonly text: Schema.String;
524
+ }>, Schema.Struct<{
525
+ readonly type: Schema.Literal<"URL">;
526
+ readonly text: Schema.String;
527
+ readonly url: Schema.String;
528
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
529
+ }>, Schema.Struct<{
530
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
531
+ readonly text: Schema.String;
532
+ readonly phone_number: Schema.String;
533
+ }>, Schema.Struct<{
534
+ readonly type: Schema.Literal<"COPY_CODE">;
535
+ readonly example: Schema.String;
536
+ }>, Schema.Struct<{
537
+ readonly type: Schema.Literal<"FLOW">;
538
+ readonly text: Schema.String;
539
+ readonly flow: Schema.String;
540
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
541
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
542
+ }>]>>;
543
+ }>]>>;
544
+ }>, Schema.Null]>;
311
545
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
312
546
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
313
547
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -318,49 +552,26 @@ export declare const TemplateFromWebsite: Schema.Struct<{
318
552
  }>;
319
553
  readonly ask: Schema.String;
320
554
  }>;
321
- export type TemplateFamilyPage = {
322
- readonly items: ReadonlyArray<TemplateFamily>;
323
- readonly nextCursor: string | null;
324
- };
325
- export declare const TemplateFamilyPage: Schema.Struct<{
326
- readonly items: Schema.$Array<Schema.Struct<{
327
- readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
328
- readonly name: Schema.String;
329
- readonly members: Schema.$Array<Schema.Struct<{
330
- readonly id: Schema.brand<Schema.String, "TemplateId">;
331
- readonly name: Schema.String;
332
- readonly slug: Schema.String;
333
- readonly channel: Schema.Literal<"email">;
334
- readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
335
- readonly isActive: Schema.Boolean;
336
- readonly createdAt: Schema.String;
337
- readonly updatedAt: Schema.String;
338
- }>>;
339
- readonly createdAt: Schema.String;
340
- readonly updatedAt: Schema.String;
341
- }>>;
342
- readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
343
- }>;
344
555
  export type TemplatesListQuery = {
345
556
  readonly limit?: number | null;
346
- readonly cursor?: Cursor | null;
347
- readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null;
348
- readonly channel?: "email" | null;
349
- readonly status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null;
350
- readonly search?: string | null;
351
- readonly projectId?: TemplateProjectId | null;
352
- readonly namespaceId?: NamespaceId | null;
557
+ readonly cursor?: string;
558
+ readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert";
559
+ readonly channel?: "sms" | "whatsapp" | "email";
560
+ readonly status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
561
+ readonly search?: string;
562
+ readonly projectId?: TemplateProjectId;
563
+ readonly namespaceId?: NamespaceId;
353
564
  readonly shared?: boolean | null;
354
565
  };
355
566
  export declare const TemplatesListQuery: Schema.Struct<{
356
567
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
357
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
358
- readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>>;
359
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
360
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>, Schema.Null]>>;
361
- readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
362
- readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
363
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
568
+ readonly cursor: Schema.optionalKey<Schema.String>;
569
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>>;
570
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
571
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>>;
572
+ readonly search: Schema.optionalKey<Schema.String>;
573
+ readonly projectId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateProjectId">>;
574
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">]>>;
364
575
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
365
576
  }>;
366
577
  export type TemplatesList200 = TemplatePage;
@@ -369,13 +580,12 @@ export declare const TemplatesList200: Schema.Struct<{
369
580
  readonly id: Schema.brand<Schema.String, "TemplateId">;
370
581
  readonly slug: Schema.String;
371
582
  readonly name: Schema.String;
372
- readonly channel: Schema.Literal<"email">;
583
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
373
584
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
374
585
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
375
586
  readonly shared: Schema.Boolean;
376
587
  readonly entryPath: Schema.String;
377
588
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
378
- readonly isActive: Schema.Boolean;
379
589
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
380
590
  readonly brand: Schema.Union<readonly [Schema.Struct<{
381
591
  readonly slug: Schema.String;
@@ -393,6 +603,8 @@ export declare const TemplatesList200: Schema.Struct<{
393
603
  }>>;
394
604
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
395
605
  }>;
606
+ export type TemplatesList400 = MalformedRequestError;
607
+ export declare const TemplatesList400: typeof MalformedRequestError;
396
608
  export type TemplatesList401 = UnauthorizedError;
397
609
  export declare const TemplatesList401: typeof UnauthorizedError;
398
610
  export type TemplatesList403 = ForbiddenError;
@@ -417,7 +629,6 @@ export type TemplatesCreateRequestJson = {
417
629
  readonly useBrand?: boolean | null;
418
630
  readonly description?: string | null;
419
631
  readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null;
420
- readonly isActive?: boolean | null;
421
632
  readonly namespaceId?: NamespaceId | null;
422
633
  readonly shared?: boolean | null;
423
634
  };
@@ -429,7 +640,6 @@ export declare const TemplatesCreateRequestJson: Schema.Struct<{
429
640
  readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
430
641
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
431
642
  readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>>;
432
- readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
433
643
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
434
644
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
435
645
  }>;
@@ -438,13 +648,12 @@ export declare const TemplatesCreate201: Schema.Struct<{
438
648
  readonly id: Schema.brand<Schema.String, "TemplateId">;
439
649
  readonly slug: Schema.String;
440
650
  readonly name: Schema.String;
441
- readonly channel: Schema.Literal<"email">;
651
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
442
652
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
443
653
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
444
654
  readonly shared: Schema.Boolean;
445
655
  readonly entryPath: Schema.String;
446
656
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
447
- readonly isActive: Schema.Boolean;
448
657
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
449
658
  readonly brand: Schema.Union<readonly [Schema.Struct<{
450
659
  readonly slug: Schema.String;
@@ -472,18 +681,72 @@ export declare const TemplatesCreate201: Schema.Struct<{
472
681
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
473
682
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
474
683
  }>, Schema.Null]>;
684
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
685
+ readonly body: Schema.String;
686
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
687
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
688
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
689
+ }>, Schema.Null]>;
690
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
691
+ readonly name: Schema.String;
692
+ readonly language: Schema.String;
693
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
694
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
695
+ readonly type: Schema.Literal<"HEADER">;
696
+ readonly format: Schema.Literal<"TEXT">;
697
+ readonly text: Schema.String;
698
+ readonly example: Schema.optionalKey<Schema.Struct<{
699
+ readonly header_text: Schema.$Array<Schema.String>;
700
+ }>>;
701
+ }>, Schema.Struct<{
702
+ readonly type: Schema.Literal<"BODY">;
703
+ readonly text: Schema.String;
704
+ readonly example: Schema.optionalKey<Schema.Struct<{
705
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
706
+ }>>;
707
+ }>, Schema.Struct<{
708
+ readonly type: Schema.Literal<"FOOTER">;
709
+ readonly text: Schema.String;
710
+ }>, Schema.Struct<{
711
+ readonly type: Schema.Literal<"BUTTONS">;
712
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
713
+ readonly type: Schema.Literal<"QUICK_REPLY">;
714
+ readonly text: Schema.String;
715
+ }>, Schema.Struct<{
716
+ readonly type: Schema.Literal<"URL">;
717
+ readonly text: Schema.String;
718
+ readonly url: Schema.String;
719
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
720
+ }>, Schema.Struct<{
721
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
722
+ readonly text: Schema.String;
723
+ readonly phone_number: Schema.String;
724
+ }>, Schema.Struct<{
725
+ readonly type: Schema.Literal<"COPY_CODE">;
726
+ readonly example: Schema.String;
727
+ }>, Schema.Struct<{
728
+ readonly type: Schema.Literal<"FLOW">;
729
+ readonly text: Schema.String;
730
+ readonly flow: Schema.String;
731
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
732
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
733
+ }>]>>;
734
+ }>]>>;
735
+ }>, Schema.Null]>;
475
736
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
476
737
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
477
738
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
478
739
  }>;
740
+ export type TemplatesCreate400 = MalformedRequestError;
741
+ export declare const TemplatesCreate400: typeof MalformedRequestError;
479
742
  export type TemplatesCreate401 = UnauthorizedError;
480
743
  export declare const TemplatesCreate401: typeof UnauthorizedError;
481
744
  export type TemplatesCreate403 = ForbiddenError;
482
745
  export declare const TemplatesCreate403: typeof ForbiddenError;
483
746
  export type TemplatesCreate404 = ResourceNotFoundError;
484
747
  export declare const TemplatesCreate404: typeof ResourceNotFoundError;
485
- export type TemplatesCreate409 = ConflictError;
486
- export declare const TemplatesCreate409: typeof ConflictError;
748
+ export type TemplatesCreate409 = ConflictError | TemplateInUseError;
749
+ export declare const TemplatesCreate409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
487
750
  export type TemplatesCreate422 = TemplateSourceError | ValidationError;
488
751
  export declare const TemplatesCreate422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
489
752
  export type TemplatesCreate500 = InternalError;
@@ -503,13 +766,12 @@ export declare const TemplatesGetById200: Schema.Struct<{
503
766
  readonly id: Schema.brand<Schema.String, "TemplateId">;
504
767
  readonly slug: Schema.String;
505
768
  readonly name: Schema.String;
506
- readonly channel: Schema.Literal<"email">;
769
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
507
770
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
508
771
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
509
772
  readonly shared: Schema.Boolean;
510
773
  readonly entryPath: Schema.String;
511
774
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
512
- readonly isActive: Schema.Boolean;
513
775
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
514
776
  readonly brand: Schema.Union<readonly [Schema.Struct<{
515
777
  readonly slug: Schema.String;
@@ -537,10 +799,64 @@ export declare const TemplatesGetById200: Schema.Struct<{
537
799
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
538
800
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
539
801
  }>, Schema.Null]>;
802
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
803
+ readonly body: Schema.String;
804
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
805
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
806
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
807
+ }>, Schema.Null]>;
808
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
809
+ readonly name: Schema.String;
810
+ readonly language: Schema.String;
811
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
812
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
813
+ readonly type: Schema.Literal<"HEADER">;
814
+ readonly format: Schema.Literal<"TEXT">;
815
+ readonly text: Schema.String;
816
+ readonly example: Schema.optionalKey<Schema.Struct<{
817
+ readonly header_text: Schema.$Array<Schema.String>;
818
+ }>>;
819
+ }>, Schema.Struct<{
820
+ readonly type: Schema.Literal<"BODY">;
821
+ readonly text: Schema.String;
822
+ readonly example: Schema.optionalKey<Schema.Struct<{
823
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
824
+ }>>;
825
+ }>, Schema.Struct<{
826
+ readonly type: Schema.Literal<"FOOTER">;
827
+ readonly text: Schema.String;
828
+ }>, Schema.Struct<{
829
+ readonly type: Schema.Literal<"BUTTONS">;
830
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
831
+ readonly type: Schema.Literal<"QUICK_REPLY">;
832
+ readonly text: Schema.String;
833
+ }>, Schema.Struct<{
834
+ readonly type: Schema.Literal<"URL">;
835
+ readonly text: Schema.String;
836
+ readonly url: Schema.String;
837
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
838
+ }>, Schema.Struct<{
839
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
840
+ readonly text: Schema.String;
841
+ readonly phone_number: Schema.String;
842
+ }>, Schema.Struct<{
843
+ readonly type: Schema.Literal<"COPY_CODE">;
844
+ readonly example: Schema.String;
845
+ }>, Schema.Struct<{
846
+ readonly type: Schema.Literal<"FLOW">;
847
+ readonly text: Schema.String;
848
+ readonly flow: Schema.String;
849
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
850
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
851
+ }>]>>;
852
+ }>]>>;
853
+ }>, Schema.Null]>;
540
854
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
541
855
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
542
856
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
543
857
  }>;
858
+ export type TemplatesGetById400 = MalformedRequestError;
859
+ export declare const TemplatesGetById400: typeof MalformedRequestError;
544
860
  export type TemplatesGetById401 = UnauthorizedError;
545
861
  export declare const TemplatesGetById401: typeof UnauthorizedError;
546
862
  export type TemplatesGetById403 = ForbiddenError;
@@ -553,28 +869,32 @@ export type TemplatesGetById500 = InternalError;
553
869
  export declare const TemplatesGetById500: typeof InternalError;
554
870
  export type TemplatesGetById504 = GatewayTimeoutError;
555
871
  export declare const TemplatesGetById504: typeof GatewayTimeoutError;
556
- export type TemplatesRemovePathParams = {
872
+ export type TemplatesDeletePathParams = {
557
873
  readonly id: TemplateId;
558
874
  };
559
- export declare const TemplatesRemovePathParams: Schema.Struct<{
875
+ export declare const TemplatesDeletePathParams: Schema.Struct<{
560
876
  readonly id: Schema.brand<Schema.String, "TemplateId">;
561
877
  }>;
562
- export type TemplatesRemove200 = SuccessResponse;
563
- export declare const TemplatesRemove200: Schema.Struct<{
878
+ export type TemplatesDelete200 = SuccessResponse;
879
+ export declare const TemplatesDelete200: Schema.Struct<{
564
880
  readonly success: Schema.Boolean;
565
881
  }>;
566
- export type TemplatesRemove401 = UnauthorizedError;
567
- export declare const TemplatesRemove401: typeof UnauthorizedError;
568
- export type TemplatesRemove403 = ForbiddenError;
569
- export declare const TemplatesRemove403: typeof ForbiddenError;
570
- export type TemplatesRemove404 = ResourceNotFoundError;
571
- export declare const TemplatesRemove404: typeof ResourceNotFoundError;
572
- export type TemplatesRemove422 = ValidationError;
573
- export declare const TemplatesRemove422: typeof ValidationError;
574
- export type TemplatesRemove500 = InternalError;
575
- export declare const TemplatesRemove500: typeof InternalError;
576
- export type TemplatesRemove504 = GatewayTimeoutError;
577
- export declare const TemplatesRemove504: typeof GatewayTimeoutError;
882
+ export type TemplatesDelete400 = MalformedRequestError;
883
+ export declare const TemplatesDelete400: typeof MalformedRequestError;
884
+ export type TemplatesDelete401 = UnauthorizedError;
885
+ export declare const TemplatesDelete401: typeof UnauthorizedError;
886
+ export type TemplatesDelete403 = ForbiddenError;
887
+ export declare const TemplatesDelete403: typeof ForbiddenError;
888
+ export type TemplatesDelete404 = ResourceNotFoundError;
889
+ export declare const TemplatesDelete404: typeof ResourceNotFoundError;
890
+ export type TemplatesDelete409 = TemplateInUseError;
891
+ export declare const TemplatesDelete409: typeof TemplateInUseError;
892
+ export type TemplatesDelete422 = ValidationError;
893
+ export declare const TemplatesDelete422: typeof ValidationError;
894
+ export type TemplatesDelete500 = InternalError;
895
+ export declare const TemplatesDelete500: typeof InternalError;
896
+ export type TemplatesDelete504 = GatewayTimeoutError;
897
+ export declare const TemplatesDelete504: typeof GatewayTimeoutError;
578
898
  export type TemplatesUpdatePathParams = {
579
899
  readonly id: TemplateId;
580
900
  };
@@ -591,7 +911,6 @@ export type TemplatesUpdateRequestJson = {
591
911
  readonly fromDefault?: TemplateFromDefault | null;
592
912
  readonly replyToDefault?: ReadonlyArray<string> | null;
593
913
  readonly trackingDefault?: TemplateTrackingDefault | null;
594
- readonly isActive?: boolean | null;
595
914
  readonly shared?: boolean | null;
596
915
  };
597
916
  };
@@ -611,7 +930,6 @@ export declare const TemplatesUpdateRequestJson: Schema.Struct<{
611
930
  readonly opens: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
612
931
  readonly clicks: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
613
932
  }>, Schema.Null]>>;
614
- readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
615
933
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
616
934
  }>;
617
935
  }>;
@@ -620,13 +938,12 @@ export declare const TemplatesUpdate200: Schema.Struct<{
620
938
  readonly id: Schema.brand<Schema.String, "TemplateId">;
621
939
  readonly slug: Schema.String;
622
940
  readonly name: Schema.String;
623
- readonly channel: Schema.Literal<"email">;
941
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
624
942
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
625
943
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
626
944
  readonly shared: Schema.Boolean;
627
945
  readonly entryPath: Schema.String;
628
946
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
629
- readonly isActive: Schema.Boolean;
630
947
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
631
948
  readonly brand: Schema.Union<readonly [Schema.Struct<{
632
949
  readonly slug: Schema.String;
@@ -654,20 +971,74 @@ export declare const TemplatesUpdate200: Schema.Struct<{
654
971
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
655
972
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
656
973
  }>, Schema.Null]>;
657
- readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
658
- readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
659
- readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
660
- }>;
661
- export type TemplatesUpdate401 = UnauthorizedError;
662
- export declare const TemplatesUpdate401: typeof UnauthorizedError;
663
- export type TemplatesUpdate403 = ForbiddenError;
664
- export declare const TemplatesUpdate403: typeof ForbiddenError;
665
- export type TemplatesUpdate404 = ResourceNotFoundError;
666
- export declare const TemplatesUpdate404: typeof ResourceNotFoundError;
667
- export type TemplatesUpdate409 = ConflictError;
668
- export declare const TemplatesUpdate409: typeof ConflictError;
669
- export type TemplatesUpdate422 = ValidationError;
670
- export declare const TemplatesUpdate422: typeof ValidationError;
974
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
975
+ readonly body: Schema.String;
976
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
977
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
978
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
979
+ }>, Schema.Null]>;
980
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
981
+ readonly name: Schema.String;
982
+ readonly language: Schema.String;
983
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
984
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
985
+ readonly type: Schema.Literal<"HEADER">;
986
+ readonly format: Schema.Literal<"TEXT">;
987
+ readonly text: Schema.String;
988
+ readonly example: Schema.optionalKey<Schema.Struct<{
989
+ readonly header_text: Schema.$Array<Schema.String>;
990
+ }>>;
991
+ }>, Schema.Struct<{
992
+ readonly type: Schema.Literal<"BODY">;
993
+ readonly text: Schema.String;
994
+ readonly example: Schema.optionalKey<Schema.Struct<{
995
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
996
+ }>>;
997
+ }>, Schema.Struct<{
998
+ readonly type: Schema.Literal<"FOOTER">;
999
+ readonly text: Schema.String;
1000
+ }>, Schema.Struct<{
1001
+ readonly type: Schema.Literal<"BUTTONS">;
1002
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
1003
+ readonly type: Schema.Literal<"QUICK_REPLY">;
1004
+ readonly text: Schema.String;
1005
+ }>, Schema.Struct<{
1006
+ readonly type: Schema.Literal<"URL">;
1007
+ readonly text: Schema.String;
1008
+ readonly url: Schema.String;
1009
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
1010
+ }>, Schema.Struct<{
1011
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
1012
+ readonly text: Schema.String;
1013
+ readonly phone_number: Schema.String;
1014
+ }>, Schema.Struct<{
1015
+ readonly type: Schema.Literal<"COPY_CODE">;
1016
+ readonly example: Schema.String;
1017
+ }>, Schema.Struct<{
1018
+ readonly type: Schema.Literal<"FLOW">;
1019
+ readonly text: Schema.String;
1020
+ readonly flow: Schema.String;
1021
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
1022
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
1023
+ }>]>>;
1024
+ }>]>>;
1025
+ }>, Schema.Null]>;
1026
+ readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
1027
+ readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
1028
+ readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
1029
+ }>;
1030
+ export type TemplatesUpdate400 = MalformedRequestError;
1031
+ export declare const TemplatesUpdate400: typeof MalformedRequestError;
1032
+ export type TemplatesUpdate401 = UnauthorizedError;
1033
+ export declare const TemplatesUpdate401: typeof UnauthorizedError;
1034
+ export type TemplatesUpdate403 = ForbiddenError;
1035
+ export declare const TemplatesUpdate403: typeof ForbiddenError;
1036
+ export type TemplatesUpdate404 = ResourceNotFoundError;
1037
+ export declare const TemplatesUpdate404: typeof ResourceNotFoundError;
1038
+ export type TemplatesUpdate409 = ConflictError;
1039
+ export declare const TemplatesUpdate409: typeof ConflictError;
1040
+ export type TemplatesUpdate422 = ValidationError;
1041
+ export declare const TemplatesUpdate422: typeof ValidationError;
671
1042
  export type TemplatesUpdate500 = InternalError;
672
1043
  export declare const TemplatesUpdate500: typeof InternalError;
673
1044
  export type TemplatesUpdate504 = GatewayTimeoutError;
@@ -680,11 +1051,11 @@ export declare const TemplatesListInputContractsPathParams: Schema.Struct<{
680
1051
  }>;
681
1052
  export type TemplatesListInputContractsQuery = {
682
1053
  readonly limit?: number | null;
683
- readonly cursor?: VersionCursor | null;
1054
+ readonly cursor?: string;
684
1055
  };
685
1056
  export declare const TemplatesListInputContractsQuery: Schema.Struct<{
686
1057
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
687
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1058
+ readonly cursor: Schema.optionalKey<Schema.String>;
688
1059
  }>;
689
1060
  export type TemplatesListInputContracts200 = TemplateInputContractPage;
690
1061
  export declare const TemplatesListInputContracts200: Schema.Struct<{
@@ -699,6 +1070,8 @@ export declare const TemplatesListInputContracts200: Schema.Struct<{
699
1070
  }>>;
700
1071
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
701
1072
  }>;
1073
+ export type TemplatesListInputContracts400 = MalformedRequestError;
1074
+ export declare const TemplatesListInputContracts400: typeof MalformedRequestError;
702
1075
  export type TemplatesListInputContracts401 = UnauthorizedError;
703
1076
  export declare const TemplatesListInputContracts401: typeof UnauthorizedError;
704
1077
  export type TemplatesListInputContracts403 = ForbiddenError;
@@ -739,6 +1112,8 @@ export declare const TemplatesGetInputContract200: Schema.Struct<{
739
1112
  readonly schema: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
740
1113
  readonly createdAt: Schema.String;
741
1114
  }>;
1115
+ export type TemplatesGetInputContract400 = MalformedRequestError;
1116
+ export declare const TemplatesGetInputContract400: typeof MalformedRequestError;
742
1117
  export type TemplatesGetInputContract401 = UnauthorizedError;
743
1118
  export declare const TemplatesGetInputContract401: typeof UnauthorizedError;
744
1119
  export type TemplatesGetInputContract403 = ForbiddenError;
@@ -1018,14 +1393,16 @@ export declare const TemplatesPublish201: Schema.Struct<{
1018
1393
  readonly publishedBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
1019
1394
  readonly createdAt: Schema.String;
1020
1395
  }>;
1396
+ export type TemplatesPublish400 = MalformedRequestError;
1397
+ export declare const TemplatesPublish400: typeof MalformedRequestError;
1021
1398
  export type TemplatesPublish401 = UnauthorizedError;
1022
1399
  export declare const TemplatesPublish401: typeof UnauthorizedError;
1023
1400
  export type TemplatesPublish403 = ForbiddenError;
1024
1401
  export declare const TemplatesPublish403: typeof ForbiddenError;
1025
1402
  export type TemplatesPublish404 = ResourceNotFoundError;
1026
1403
  export declare const TemplatesPublish404: typeof ResourceNotFoundError;
1027
- export type TemplatesPublish409 = ConflictError;
1028
- export declare const TemplatesPublish409: typeof ConflictError;
1404
+ export type TemplatesPublish409 = ConflictError | TemplateInUseError;
1405
+ export declare const TemplatesPublish409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1029
1406
  export type TemplatesPublish422 = TemplateSourceError | ValidationError;
1030
1407
  export declare const TemplatesPublish422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1031
1408
  export type TemplatesPublish500 = InternalError;
@@ -1289,6 +1666,8 @@ export declare const TemplatesGetPublication200: Schema.Struct<{
1289
1666
  readonly publishedBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
1290
1667
  readonly createdAt: Schema.String;
1291
1668
  }>;
1669
+ export type TemplatesGetPublication400 = MalformedRequestError;
1670
+ export declare const TemplatesGetPublication400: typeof MalformedRequestError;
1292
1671
  export type TemplatesGetPublication401 = UnauthorizedError;
1293
1672
  export declare const TemplatesGetPublication401: typeof UnauthorizedError;
1294
1673
  export type TemplatesGetPublication403 = ForbiddenError;
@@ -1328,6 +1707,8 @@ export declare const TemplatesRenderPublication200: Schema.Struct<{
1328
1707
  readonly html: Schema.String;
1329
1708
  readonly text: Schema.String;
1330
1709
  }>;
1710
+ export type TemplatesRenderPublication400 = MalformedRequestError;
1711
+ export declare const TemplatesRenderPublication400: typeof MalformedRequestError;
1331
1712
  export type TemplatesRenderPublication401 = UnauthorizedError;
1332
1713
  export declare const TemplatesRenderPublication401: typeof UnauthorizedError;
1333
1714
  export type TemplatesRenderPublication403 = ForbiddenError;
@@ -1356,14 +1737,16 @@ export declare const TemplatesGetGitRepository200: Schema.Struct<{
1356
1737
  readonly remote: Schema.String;
1357
1738
  readonly defaultBranch: Schema.String;
1358
1739
  }>;
1740
+ export type TemplatesGetGitRepository400 = MalformedRequestError;
1741
+ export declare const TemplatesGetGitRepository400: typeof MalformedRequestError;
1359
1742
  export type TemplatesGetGitRepository401 = UnauthorizedError;
1360
1743
  export declare const TemplatesGetGitRepository401: typeof UnauthorizedError;
1361
1744
  export type TemplatesGetGitRepository403 = ForbiddenError;
1362
1745
  export declare const TemplatesGetGitRepository403: typeof ForbiddenError;
1363
1746
  export type TemplatesGetGitRepository404 = ResourceNotFoundError;
1364
1747
  export declare const TemplatesGetGitRepository404: typeof ResourceNotFoundError;
1365
- export type TemplatesGetGitRepository409 = ConflictError;
1366
- export declare const TemplatesGetGitRepository409: typeof ConflictError;
1748
+ export type TemplatesGetGitRepository409 = ConflictError | TemplateInUseError;
1749
+ export declare const TemplatesGetGitRepository409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1367
1750
  export type TemplatesGetGitRepository422 = TemplateSourceError | ValidationError;
1368
1751
  export declare const TemplatesGetGitRepository422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1369
1752
  export type TemplatesGetGitRepository500 = InternalError;
@@ -1396,14 +1779,16 @@ export declare const TemplatesIssueGitCredential200: Schema.Struct<{
1396
1779
  readonly password: Schema.String;
1397
1780
  readonly expiresAt: Schema.String;
1398
1781
  }>;
1782
+ export type TemplatesIssueGitCredential400 = MalformedRequestError;
1783
+ export declare const TemplatesIssueGitCredential400: typeof MalformedRequestError;
1399
1784
  export type TemplatesIssueGitCredential401 = UnauthorizedError;
1400
1785
  export declare const TemplatesIssueGitCredential401: typeof UnauthorizedError;
1401
1786
  export type TemplatesIssueGitCredential403 = ForbiddenError;
1402
1787
  export declare const TemplatesIssueGitCredential403: typeof ForbiddenError;
1403
1788
  export type TemplatesIssueGitCredential404 = ResourceNotFoundError;
1404
1789
  export declare const TemplatesIssueGitCredential404: typeof ResourceNotFoundError;
1405
- export type TemplatesIssueGitCredential409 = ConflictError;
1406
- export declare const TemplatesIssueGitCredential409: typeof ConflictError;
1790
+ export type TemplatesIssueGitCredential409 = ConflictError | TemplateInUseError;
1791
+ export declare const TemplatesIssueGitCredential409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1407
1792
  export type TemplatesIssueGitCredential422 = TemplateSourceError | ValidationError;
1408
1793
  export declare const TemplatesIssueGitCredential422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1409
1794
  export type TemplatesIssueGitCredential500 = InternalError;
@@ -1576,14 +1961,16 @@ export declare const TemplatesOpenWorkspace200: Schema.Struct<{
1576
1961
  }>;
1577
1962
  readonly files: Schema.$Record<Schema.String, Schema.String>;
1578
1963
  }>;
1964
+ export type TemplatesOpenWorkspace400 = MalformedRequestError;
1965
+ export declare const TemplatesOpenWorkspace400: typeof MalformedRequestError;
1579
1966
  export type TemplatesOpenWorkspace401 = UnauthorizedError;
1580
1967
  export declare const TemplatesOpenWorkspace401: typeof UnauthorizedError;
1581
1968
  export type TemplatesOpenWorkspace403 = ForbiddenError;
1582
1969
  export declare const TemplatesOpenWorkspace403: typeof ForbiddenError;
1583
1970
  export type TemplatesOpenWorkspace404 = ResourceNotFoundError;
1584
1971
  export declare const TemplatesOpenWorkspace404: typeof ResourceNotFoundError;
1585
- export type TemplatesOpenWorkspace409 = ConflictError;
1586
- export declare const TemplatesOpenWorkspace409: typeof ConflictError;
1972
+ export type TemplatesOpenWorkspace409 = ConflictError | TemplateInUseError;
1973
+ export declare const TemplatesOpenWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1587
1974
  export type TemplatesOpenWorkspace422 = TemplateSourceError | ValidationError;
1588
1975
  export declare const TemplatesOpenWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1589
1976
  export type TemplatesOpenWorkspace500 = InternalError;
@@ -1776,14 +2163,16 @@ export declare const TemplatesPatchWorkspace200: Schema.Struct<{
1776
2163
  }>;
1777
2164
  readonly files: Schema.$Record<Schema.String, Schema.String>;
1778
2165
  }>;
2166
+ export type TemplatesPatchWorkspace400 = MalformedRequestError;
2167
+ export declare const TemplatesPatchWorkspace400: typeof MalformedRequestError;
1779
2168
  export type TemplatesPatchWorkspace401 = UnauthorizedError;
1780
2169
  export declare const TemplatesPatchWorkspace401: typeof UnauthorizedError;
1781
2170
  export type TemplatesPatchWorkspace403 = ForbiddenError;
1782
2171
  export declare const TemplatesPatchWorkspace403: typeof ForbiddenError;
1783
2172
  export type TemplatesPatchWorkspace404 = ResourceNotFoundError;
1784
2173
  export declare const TemplatesPatchWorkspace404: typeof ResourceNotFoundError;
1785
- export type TemplatesPatchWorkspace409 = ConflictError;
1786
- export declare const TemplatesPatchWorkspace409: typeof ConflictError;
2174
+ export type TemplatesPatchWorkspace409 = ConflictError | TemplateInUseError;
2175
+ export declare const TemplatesPatchWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1787
2176
  export type TemplatesPatchWorkspace422 = TemplateSourceError | ValidationError;
1788
2177
  export declare const TemplatesPatchWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1789
2178
  export type TemplatesPatchWorkspace500 = InternalError;
@@ -1974,14 +2363,16 @@ export declare const TemplatesPutWorkspaceAsset200: Schema.Struct<{
1974
2363
  }>;
1975
2364
  readonly files: Schema.$Record<Schema.String, Schema.String>;
1976
2365
  }>;
2366
+ export type TemplatesPutWorkspaceAsset400 = MalformedRequestError;
2367
+ export declare const TemplatesPutWorkspaceAsset400: typeof MalformedRequestError;
1977
2368
  export type TemplatesPutWorkspaceAsset401 = UnauthorizedError;
1978
2369
  export declare const TemplatesPutWorkspaceAsset401: typeof UnauthorizedError;
1979
2370
  export type TemplatesPutWorkspaceAsset403 = ForbiddenError;
1980
2371
  export declare const TemplatesPutWorkspaceAsset403: typeof ForbiddenError;
1981
2372
  export type TemplatesPutWorkspaceAsset404 = ResourceNotFoundError;
1982
2373
  export declare const TemplatesPutWorkspaceAsset404: typeof ResourceNotFoundError;
1983
- export type TemplatesPutWorkspaceAsset409 = ConflictError;
1984
- export declare const TemplatesPutWorkspaceAsset409: typeof ConflictError;
2374
+ export type TemplatesPutWorkspaceAsset409 = ConflictError | TemplateInUseError;
2375
+ export declare const TemplatesPutWorkspaceAsset409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
1985
2376
  export type TemplatesPutWorkspaceAsset422 = TemplateSourceError | ValidationError;
1986
2377
  export declare const TemplatesPutWorkspaceAsset422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
1987
2378
  export type TemplatesPutWorkspaceAsset500 = InternalError;
@@ -2162,14 +2553,16 @@ export declare const TemplatesCheckWorkspace200: Schema.Struct<{
2162
2553
  }>, Schema.Null]>>;
2163
2554
  }>>;
2164
2555
  }>;
2556
+ export type TemplatesCheckWorkspace400 = MalformedRequestError;
2557
+ export declare const TemplatesCheckWorkspace400: typeof MalformedRequestError;
2165
2558
  export type TemplatesCheckWorkspace401 = UnauthorizedError;
2166
2559
  export declare const TemplatesCheckWorkspace401: typeof UnauthorizedError;
2167
2560
  export type TemplatesCheckWorkspace403 = ForbiddenError;
2168
2561
  export declare const TemplatesCheckWorkspace403: typeof ForbiddenError;
2169
2562
  export type TemplatesCheckWorkspace404 = ResourceNotFoundError;
2170
2563
  export declare const TemplatesCheckWorkspace404: typeof ResourceNotFoundError;
2171
- export type TemplatesCheckWorkspace409 = ConflictError;
2172
- export declare const TemplatesCheckWorkspace409: typeof ConflictError;
2564
+ export type TemplatesCheckWorkspace409 = ConflictError | TemplateInUseError;
2565
+ export declare const TemplatesCheckWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2173
2566
  export type TemplatesCheckWorkspace422 = TemplateSourceError | ValidationError;
2174
2567
  export declare const TemplatesCheckWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2175
2568
  export type TemplatesCheckWorkspace500 = InternalError;
@@ -2362,14 +2755,16 @@ export declare const TemplatesResolveWorkspaceConflict200: Schema.Struct<{
2362
2755
  }>;
2363
2756
  readonly files: Schema.$Record<Schema.String, Schema.String>;
2364
2757
  }>;
2758
+ export type TemplatesResolveWorkspaceConflict400 = MalformedRequestError;
2759
+ export declare const TemplatesResolveWorkspaceConflict400: typeof MalformedRequestError;
2365
2760
  export type TemplatesResolveWorkspaceConflict401 = UnauthorizedError;
2366
2761
  export declare const TemplatesResolveWorkspaceConflict401: typeof UnauthorizedError;
2367
2762
  export type TemplatesResolveWorkspaceConflict403 = ForbiddenError;
2368
2763
  export declare const TemplatesResolveWorkspaceConflict403: typeof ForbiddenError;
2369
2764
  export type TemplatesResolveWorkspaceConflict404 = ResourceNotFoundError;
2370
2765
  export declare const TemplatesResolveWorkspaceConflict404: typeof ResourceNotFoundError;
2371
- export type TemplatesResolveWorkspaceConflict409 = ConflictError;
2372
- export declare const TemplatesResolveWorkspaceConflict409: typeof ConflictError;
2766
+ export type TemplatesResolveWorkspaceConflict409 = ConflictError | TemplateInUseError;
2767
+ export declare const TemplatesResolveWorkspaceConflict409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2373
2768
  export type TemplatesResolveWorkspaceConflict422 = TemplateSourceError | ValidationError;
2374
2769
  export declare const TemplatesResolveWorkspaceConflict422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2375
2770
  export type TemplatesResolveWorkspaceConflict500 = InternalError;
@@ -2422,14 +2817,16 @@ export declare const TemplatesDiffWorkspace200: Schema.Struct<{
2422
2817
  readonly digest: Schema.Union<readonly [Schema.String, Schema.Null]>;
2423
2818
  }>>;
2424
2819
  }>;
2820
+ export type TemplatesDiffWorkspace400 = MalformedRequestError;
2821
+ export declare const TemplatesDiffWorkspace400: typeof MalformedRequestError;
2425
2822
  export type TemplatesDiffWorkspace401 = UnauthorizedError;
2426
2823
  export declare const TemplatesDiffWorkspace401: typeof UnauthorizedError;
2427
2824
  export type TemplatesDiffWorkspace403 = ForbiddenError;
2428
2825
  export declare const TemplatesDiffWorkspace403: typeof ForbiddenError;
2429
2826
  export type TemplatesDiffWorkspace404 = ResourceNotFoundError;
2430
2827
  export declare const TemplatesDiffWorkspace404: typeof ResourceNotFoundError;
2431
- export type TemplatesDiffWorkspace409 = ConflictError;
2432
- export declare const TemplatesDiffWorkspace409: typeof ConflictError;
2828
+ export type TemplatesDiffWorkspace409 = ConflictError | TemplateInUseError;
2829
+ export declare const TemplatesDiffWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2433
2830
  export type TemplatesDiffWorkspace422 = TemplateSourceError | ValidationError;
2434
2831
  export declare const TemplatesDiffWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2435
2832
  export type TemplatesDiffWorkspace500 = InternalError;
@@ -2556,6 +2953,37 @@ export type TemplatesRenderWorkspaceFixture200 = {
2556
2953
  readonly sentBytes: number;
2557
2954
  readonly previewBytes: number;
2558
2955
  } | null;
2956
+ readonly whatsapp: {
2957
+ readonly language: string;
2958
+ readonly category: string;
2959
+ readonly header?: {
2960
+ readonly type: "text" | "image" | "video" | "document";
2961
+ readonly text: string;
2962
+ };
2963
+ readonly body: string;
2964
+ readonly footer?: string;
2965
+ readonly buttons: ReadonlyArray<{
2966
+ readonly type: "quick-reply";
2967
+ readonly text: string;
2968
+ } | {
2969
+ readonly type: "url";
2970
+ readonly text: string;
2971
+ readonly url: string;
2972
+ } | {
2973
+ readonly type: "phone";
2974
+ readonly text: string;
2975
+ readonly phone: string;
2976
+ } | {
2977
+ readonly type: "copy-code";
2978
+ readonly code: string;
2979
+ } | {
2980
+ readonly type: "flow";
2981
+ readonly text: string;
2982
+ readonly flow: string;
2983
+ readonly action: "navigate" | "data_exchange";
2984
+ readonly screen?: string;
2985
+ }>;
2986
+ } | null;
2559
2987
  readonly page?: {
2560
2988
  readonly kind: "page";
2561
2989
  readonly html: string;
@@ -2678,6 +3106,37 @@ export declare const TemplatesRenderWorkspaceFixture200: Schema.Struct<{
2678
3106
  readonly sentBytes: Schema.Finite;
2679
3107
  readonly previewBytes: Schema.Finite;
2680
3108
  }>, Schema.Null]>;
3109
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
3110
+ readonly language: Schema.String;
3111
+ readonly category: Schema.String;
3112
+ readonly header: Schema.optionalKey<Schema.Struct<{
3113
+ readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"image">, Schema.Literal<"video">, Schema.Literal<"document">]>;
3114
+ readonly text: Schema.String;
3115
+ }>>;
3116
+ readonly body: Schema.String;
3117
+ readonly footer: Schema.optionalKey<Schema.String>;
3118
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
3119
+ readonly type: Schema.Literal<"quick-reply">;
3120
+ readonly text: Schema.String;
3121
+ }>, Schema.Struct<{
3122
+ readonly type: Schema.Literal<"url">;
3123
+ readonly text: Schema.String;
3124
+ readonly url: Schema.String;
3125
+ }>, Schema.Struct<{
3126
+ readonly type: Schema.Literal<"phone">;
3127
+ readonly text: Schema.String;
3128
+ readonly phone: Schema.String;
3129
+ }>, Schema.Struct<{
3130
+ readonly type: Schema.Literal<"copy-code">;
3131
+ readonly code: Schema.String;
3132
+ }>, Schema.Struct<{
3133
+ readonly type: Schema.Literal<"flow">;
3134
+ readonly text: Schema.String;
3135
+ readonly flow: Schema.String;
3136
+ readonly action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
3137
+ readonly screen: Schema.optionalKey<Schema.String>;
3138
+ }>]>>;
3139
+ }>, Schema.Null]>;
2681
3140
  readonly page: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
2682
3141
  readonly kind: Schema.Literal<"page">;
2683
3142
  readonly html: Schema.String;
@@ -2698,14 +3157,16 @@ export declare const TemplatesRenderWorkspaceFixture200: Schema.Struct<{
2698
3157
  }>>;
2699
3158
  }>, Schema.Null]>>;
2700
3159
  }>;
3160
+ export type TemplatesRenderWorkspaceFixture400 = MalformedRequestError;
3161
+ export declare const TemplatesRenderWorkspaceFixture400: typeof MalformedRequestError;
2701
3162
  export type TemplatesRenderWorkspaceFixture401 = UnauthorizedError;
2702
3163
  export declare const TemplatesRenderWorkspaceFixture401: typeof UnauthorizedError;
2703
3164
  export type TemplatesRenderWorkspaceFixture403 = ForbiddenError;
2704
3165
  export declare const TemplatesRenderWorkspaceFixture403: typeof ForbiddenError;
2705
3166
  export type TemplatesRenderWorkspaceFixture404 = ResourceNotFoundError;
2706
3167
  export declare const TemplatesRenderWorkspaceFixture404: typeof ResourceNotFoundError;
2707
- export type TemplatesRenderWorkspaceFixture409 = ConflictError;
2708
- export declare const TemplatesRenderWorkspaceFixture409: typeof ConflictError;
3168
+ export type TemplatesRenderWorkspaceFixture409 = ConflictError | TemplateInUseError;
3169
+ export declare const TemplatesRenderWorkspaceFixture409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2709
3170
  export type TemplatesRenderWorkspaceFixture422 = TemplateSourceError | ValidationError;
2710
3171
  export declare const TemplatesRenderWorkspaceFixture422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2711
3172
  export type TemplatesRenderWorkspaceFixture500 = InternalError;
@@ -2756,14 +3217,16 @@ export declare const TemplatesWorkspaceHistory200: Schema.Struct<{
2756
3217
  readonly commit: Schema.String;
2757
3218
  }>, Schema.Null]>;
2758
3219
  }>;
3220
+ export type TemplatesWorkspaceHistory400 = MalformedRequestError;
3221
+ export declare const TemplatesWorkspaceHistory400: typeof MalformedRequestError;
2759
3222
  export type TemplatesWorkspaceHistory401 = UnauthorizedError;
2760
3223
  export declare const TemplatesWorkspaceHistory401: typeof UnauthorizedError;
2761
3224
  export type TemplatesWorkspaceHistory403 = ForbiddenError;
2762
3225
  export declare const TemplatesWorkspaceHistory403: typeof ForbiddenError;
2763
3226
  export type TemplatesWorkspaceHistory404 = ResourceNotFoundError;
2764
3227
  export declare const TemplatesWorkspaceHistory404: typeof ResourceNotFoundError;
2765
- export type TemplatesWorkspaceHistory409 = ConflictError;
2766
- export declare const TemplatesWorkspaceHistory409: typeof ConflictError;
3228
+ export type TemplatesWorkspaceHistory409 = ConflictError | TemplateInUseError;
3229
+ export declare const TemplatesWorkspaceHistory409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2767
3230
  export type TemplatesWorkspaceHistory422 = TemplateSourceError | ValidationError;
2768
3231
  export declare const TemplatesWorkspaceHistory422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2769
3232
  export type TemplatesWorkspaceHistory500 = InternalError;
@@ -2958,14 +3421,16 @@ export declare const TemplatesAttachWorkspaceResource200: Schema.Struct<{
2958
3421
  readonly via: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"mcp">, Schema.Literal<"agent">]>;
2959
3422
  }>;
2960
3423
  }>;
3424
+ export type TemplatesAttachWorkspaceResource400 = MalformedRequestError;
3425
+ export declare const TemplatesAttachWorkspaceResource400: typeof MalformedRequestError;
2961
3426
  export type TemplatesAttachWorkspaceResource401 = UnauthorizedError;
2962
3427
  export declare const TemplatesAttachWorkspaceResource401: typeof UnauthorizedError;
2963
3428
  export type TemplatesAttachWorkspaceResource403 = ForbiddenError;
2964
3429
  export declare const TemplatesAttachWorkspaceResource403: typeof ForbiddenError;
2965
3430
  export type TemplatesAttachWorkspaceResource404 = ResourceNotFoundError;
2966
3431
  export declare const TemplatesAttachWorkspaceResource404: typeof ResourceNotFoundError;
2967
- export type TemplatesAttachWorkspaceResource409 = ConflictError;
2968
- export declare const TemplatesAttachWorkspaceResource409: typeof ConflictError;
3432
+ export type TemplatesAttachWorkspaceResource409 = ConflictError | TemplateInUseError;
3433
+ export declare const TemplatesAttachWorkspaceResource409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
2969
3434
  export type TemplatesAttachWorkspaceResource422 = TemplateSourceError | ValidationError;
2970
3435
  export declare const TemplatesAttachWorkspaceResource422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
2971
3436
  export type TemplatesAttachWorkspaceResource500 = InternalError;
@@ -3144,14 +3609,16 @@ export declare const TemplatesRemoveWorkspaceResource200: Schema.Struct<{
3144
3609
  readonly via: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"mcp">, Schema.Literal<"agent">]>;
3145
3610
  }>;
3146
3611
  }>;
3612
+ export type TemplatesRemoveWorkspaceResource400 = MalformedRequestError;
3613
+ export declare const TemplatesRemoveWorkspaceResource400: typeof MalformedRequestError;
3147
3614
  export type TemplatesRemoveWorkspaceResource401 = UnauthorizedError;
3148
3615
  export declare const TemplatesRemoveWorkspaceResource401: typeof UnauthorizedError;
3149
3616
  export type TemplatesRemoveWorkspaceResource403 = ForbiddenError;
3150
3617
  export declare const TemplatesRemoveWorkspaceResource403: typeof ForbiddenError;
3151
3618
  export type TemplatesRemoveWorkspaceResource404 = ResourceNotFoundError;
3152
3619
  export declare const TemplatesRemoveWorkspaceResource404: typeof ResourceNotFoundError;
3153
- export type TemplatesRemoveWorkspaceResource409 = ConflictError;
3154
- export declare const TemplatesRemoveWorkspaceResource409: typeof ConflictError;
3620
+ export type TemplatesRemoveWorkspaceResource409 = ConflictError | TemplateInUseError;
3621
+ export declare const TemplatesRemoveWorkspaceResource409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
3155
3622
  export type TemplatesRemoveWorkspaceResource422 = TemplateSourceError | ValidationError;
3156
3623
  export declare const TemplatesRemoveWorkspaceResource422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
3157
3624
  export type TemplatesRemoveWorkspaceResource500 = InternalError;
@@ -3350,14 +3817,16 @@ export declare const TemplatesRestoreWorkspace200: Schema.Struct<{
3350
3817
  readonly content: Schema.String;
3351
3818
  }>;
3352
3819
  }>;
3820
+ export type TemplatesRestoreWorkspace400 = MalformedRequestError;
3821
+ export declare const TemplatesRestoreWorkspace400: typeof MalformedRequestError;
3353
3822
  export type TemplatesRestoreWorkspace401 = UnauthorizedError;
3354
3823
  export declare const TemplatesRestoreWorkspace401: typeof UnauthorizedError;
3355
3824
  export type TemplatesRestoreWorkspace403 = ForbiddenError;
3356
3825
  export declare const TemplatesRestoreWorkspace403: typeof ForbiddenError;
3357
3826
  export type TemplatesRestoreWorkspace404 = ResourceNotFoundError;
3358
3827
  export declare const TemplatesRestoreWorkspace404: typeof ResourceNotFoundError;
3359
- export type TemplatesRestoreWorkspace409 = ConflictError;
3360
- export declare const TemplatesRestoreWorkspace409: typeof ConflictError;
3828
+ export type TemplatesRestoreWorkspace409 = ConflictError | TemplateInUseError;
3829
+ export declare const TemplatesRestoreWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
3361
3830
  export type TemplatesRestoreWorkspace422 = TemplateSourceError | ValidationError;
3362
3831
  export declare const TemplatesRestoreWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
3363
3832
  export type TemplatesRestoreWorkspace500 = InternalError;
@@ -3498,14 +3967,16 @@ export declare const TemplatesSaveWorkspace200: Schema.Struct<{
3498
3967
  }>, Schema.Null]>>;
3499
3968
  }>>;
3500
3969
  }>;
3970
+ export type TemplatesSaveWorkspace400 = MalformedRequestError;
3971
+ export declare const TemplatesSaveWorkspace400: typeof MalformedRequestError;
3501
3972
  export type TemplatesSaveWorkspace401 = UnauthorizedError;
3502
3973
  export declare const TemplatesSaveWorkspace401: typeof UnauthorizedError;
3503
3974
  export type TemplatesSaveWorkspace403 = ForbiddenError;
3504
3975
  export declare const TemplatesSaveWorkspace403: typeof ForbiddenError;
3505
3976
  export type TemplatesSaveWorkspace404 = ResourceNotFoundError;
3506
3977
  export declare const TemplatesSaveWorkspace404: typeof ResourceNotFoundError;
3507
- export type TemplatesSaveWorkspace409 = ConflictError;
3508
- export declare const TemplatesSaveWorkspace409: typeof ConflictError;
3978
+ export type TemplatesSaveWorkspace409 = ConflictError | TemplateInUseError;
3979
+ export declare const TemplatesSaveWorkspace409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
3509
3980
  export type TemplatesSaveWorkspace422 = TemplateSourceError | ValidationError;
3510
3981
  export declare const TemplatesSaveWorkspace422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
3511
3982
  export type TemplatesSaveWorkspace500 = InternalError;
@@ -3516,11 +3987,11 @@ export type TemplatesSaveWorkspace504 = GatewayTimeoutError;
3516
3987
  export declare const TemplatesSaveWorkspace504: typeof GatewayTimeoutError;
3517
3988
  export type TemplatesListFamiliesQuery = {
3518
3989
  readonly limit?: number | null;
3519
- readonly cursor?: Cursor | null;
3990
+ readonly cursor?: string;
3520
3991
  };
3521
3992
  export declare const TemplatesListFamiliesQuery: Schema.Struct<{
3522
3993
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
3523
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
3994
+ readonly cursor: Schema.optionalKey<Schema.String>;
3524
3995
  }>;
3525
3996
  export type TemplatesListFamilies200 = TemplateFamilyPage;
3526
3997
  export declare const TemplatesListFamilies200: Schema.Struct<{
@@ -3531,9 +4002,8 @@ export declare const TemplatesListFamilies200: Schema.Struct<{
3531
4002
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3532
4003
  readonly name: Schema.String;
3533
4004
  readonly slug: Schema.String;
3534
- readonly channel: Schema.Literal<"email">;
4005
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3535
4006
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3536
- readonly isActive: Schema.Boolean;
3537
4007
  readonly createdAt: Schema.String;
3538
4008
  readonly updatedAt: Schema.String;
3539
4009
  }>>;
@@ -3542,6 +4012,8 @@ export declare const TemplatesListFamilies200: Schema.Struct<{
3542
4012
  }>>;
3543
4013
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
3544
4014
  }>;
4015
+ export type TemplatesListFamilies400 = MalformedRequestError;
4016
+ export declare const TemplatesListFamilies400: typeof MalformedRequestError;
3545
4017
  export type TemplatesListFamilies401 = UnauthorizedError;
3546
4018
  export declare const TemplatesListFamilies401: typeof UnauthorizedError;
3547
4019
  export type TemplatesListFamilies403 = ForbiddenError;
@@ -3566,15 +4038,16 @@ export declare const TemplatesCreateFamily201: Schema.Struct<{
3566
4038
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3567
4039
  readonly name: Schema.String;
3568
4040
  readonly slug: Schema.String;
3569
- readonly channel: Schema.Literal<"email">;
4041
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3570
4042
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3571
- readonly isActive: Schema.Boolean;
3572
4043
  readonly createdAt: Schema.String;
3573
4044
  readonly updatedAt: Schema.String;
3574
4045
  }>>;
3575
4046
  readonly createdAt: Schema.String;
3576
4047
  readonly updatedAt: Schema.String;
3577
4048
  }>;
4049
+ export type TemplatesCreateFamily400 = MalformedRequestError;
4050
+ export declare const TemplatesCreateFamily400: typeof MalformedRequestError;
3578
4051
  export type TemplatesCreateFamily401 = UnauthorizedError;
3579
4052
  export declare const TemplatesCreateFamily401: typeof UnauthorizedError;
3580
4053
  export type TemplatesCreateFamily403 = ForbiddenError;
@@ -3599,15 +4072,16 @@ export declare const TemplatesGetFamily200: Schema.Struct<{
3599
4072
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3600
4073
  readonly name: Schema.String;
3601
4074
  readonly slug: Schema.String;
3602
- readonly channel: Schema.Literal<"email">;
4075
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3603
4076
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3604
- readonly isActive: Schema.Boolean;
3605
4077
  readonly createdAt: Schema.String;
3606
4078
  readonly updatedAt: Schema.String;
3607
4079
  }>>;
3608
4080
  readonly createdAt: Schema.String;
3609
4081
  readonly updatedAt: Schema.String;
3610
4082
  }>;
4083
+ export type TemplatesGetFamily400 = MalformedRequestError;
4084
+ export declare const TemplatesGetFamily400: typeof MalformedRequestError;
3611
4085
  export type TemplatesGetFamily401 = UnauthorizedError;
3612
4086
  export declare const TemplatesGetFamily401: typeof UnauthorizedError;
3613
4087
  export type TemplatesGetFamily403 = ForbiddenError;
@@ -3630,6 +4104,8 @@ export type TemplatesDeleteFamily200 = SuccessResponse;
3630
4104
  export declare const TemplatesDeleteFamily200: Schema.Struct<{
3631
4105
  readonly success: Schema.Boolean;
3632
4106
  }>;
4107
+ export type TemplatesDeleteFamily400 = MalformedRequestError;
4108
+ export declare const TemplatesDeleteFamily400: typeof MalformedRequestError;
3633
4109
  export type TemplatesDeleteFamily401 = UnauthorizedError;
3634
4110
  export declare const TemplatesDeleteFamily401: typeof UnauthorizedError;
3635
4111
  export type TemplatesDeleteFamily403 = ForbiddenError;
@@ -3662,15 +4138,16 @@ export declare const TemplatesRenameFamily200: Schema.Struct<{
3662
4138
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3663
4139
  readonly name: Schema.String;
3664
4140
  readonly slug: Schema.String;
3665
- readonly channel: Schema.Literal<"email">;
4141
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3666
4142
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3667
- readonly isActive: Schema.Boolean;
3668
4143
  readonly createdAt: Schema.String;
3669
4144
  readonly updatedAt: Schema.String;
3670
4145
  }>>;
3671
4146
  readonly createdAt: Schema.String;
3672
4147
  readonly updatedAt: Schema.String;
3673
4148
  }>;
4149
+ export type TemplatesRenameFamily400 = MalformedRequestError;
4150
+ export declare const TemplatesRenameFamily400: typeof MalformedRequestError;
3674
4151
  export type TemplatesRenameFamily401 = UnauthorizedError;
3675
4152
  export declare const TemplatesRenameFamily401: typeof UnauthorizedError;
3676
4153
  export type TemplatesRenameFamily403 = ForbiddenError;
@@ -3699,15 +4176,16 @@ export declare const TemplatesAttachFamilyMember200: Schema.Struct<{
3699
4176
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3700
4177
  readonly name: Schema.String;
3701
4178
  readonly slug: Schema.String;
3702
- readonly channel: Schema.Literal<"email">;
4179
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3703
4180
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3704
- readonly isActive: Schema.Boolean;
3705
4181
  readonly createdAt: Schema.String;
3706
4182
  readonly updatedAt: Schema.String;
3707
4183
  }>>;
3708
4184
  readonly createdAt: Schema.String;
3709
4185
  readonly updatedAt: Schema.String;
3710
4186
  }>;
4187
+ export type TemplatesAttachFamilyMember400 = MalformedRequestError;
4188
+ export declare const TemplatesAttachFamilyMember400: typeof MalformedRequestError;
3711
4189
  export type TemplatesAttachFamilyMember401 = UnauthorizedError;
3712
4190
  export declare const TemplatesAttachFamilyMember401: typeof UnauthorizedError;
3713
4191
  export type TemplatesAttachFamilyMember403 = ForbiddenError;
@@ -3738,15 +4216,16 @@ export declare const TemplatesDetachFamilyMember200: Schema.Struct<{
3738
4216
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3739
4217
  readonly name: Schema.String;
3740
4218
  readonly slug: Schema.String;
3741
- readonly channel: Schema.Literal<"email">;
4219
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3742
4220
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3743
- readonly isActive: Schema.Boolean;
3744
4221
  readonly createdAt: Schema.String;
3745
4222
  readonly updatedAt: Schema.String;
3746
4223
  }>>;
3747
4224
  readonly createdAt: Schema.String;
3748
4225
  readonly updatedAt: Schema.String;
3749
4226
  }>;
4227
+ export type TemplatesDetachFamilyMember400 = MalformedRequestError;
4228
+ export declare const TemplatesDetachFamilyMember400: typeof MalformedRequestError;
3750
4229
  export type TemplatesDetachFamilyMember401 = UnauthorizedError;
3751
4230
  export declare const TemplatesDetachFamilyMember401: typeof UnauthorizedError;
3752
4231
  export type TemplatesDetachFamilyMember403 = ForbiddenError;
@@ -3781,15 +4260,16 @@ export declare const TemplatesCreateFamilyFromTemplate201: Schema.Struct<{
3781
4260
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3782
4261
  readonly name: Schema.String;
3783
4262
  readonly slug: Schema.String;
3784
- readonly channel: Schema.Literal<"email">;
4263
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3785
4264
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3786
- readonly isActive: Schema.Boolean;
3787
4265
  readonly createdAt: Schema.String;
3788
4266
  readonly updatedAt: Schema.String;
3789
4267
  }>>;
3790
4268
  readonly createdAt: Schema.String;
3791
4269
  readonly updatedAt: Schema.String;
3792
4270
  }>;
4271
+ export type TemplatesCreateFamilyFromTemplate400 = MalformedRequestError;
4272
+ export declare const TemplatesCreateFamilyFromTemplate400: typeof MalformedRequestError;
3793
4273
  export type TemplatesCreateFamilyFromTemplate401 = UnauthorizedError;
3794
4274
  export declare const TemplatesCreateFamilyFromTemplate401: typeof UnauthorizedError;
3795
4275
  export type TemplatesCreateFamilyFromTemplate403 = ForbiddenError;
@@ -3826,13 +4306,12 @@ export declare const TemplatesCreateFromWebsite201: Schema.Struct<{
3826
4306
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3827
4307
  readonly slug: Schema.String;
3828
4308
  readonly name: Schema.String;
3829
- readonly channel: Schema.Literal<"email">;
4309
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3830
4310
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
3831
4311
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3832
4312
  readonly shared: Schema.Boolean;
3833
4313
  readonly entryPath: Schema.String;
3834
4314
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3835
- readonly isActive: Schema.Boolean;
3836
4315
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3837
4316
  readonly brand: Schema.Union<readonly [Schema.Struct<{
3838
4317
  readonly slug: Schema.String;
@@ -3860,6 +4339,58 @@ export declare const TemplatesCreateFromWebsite201: Schema.Struct<{
3860
4339
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
3861
4340
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
3862
4341
  }>, Schema.Null]>;
4342
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
4343
+ readonly body: Schema.String;
4344
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
4345
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
4346
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
4347
+ }>, Schema.Null]>;
4348
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
4349
+ readonly name: Schema.String;
4350
+ readonly language: Schema.String;
4351
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
4352
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4353
+ readonly type: Schema.Literal<"HEADER">;
4354
+ readonly format: Schema.Literal<"TEXT">;
4355
+ readonly text: Schema.String;
4356
+ readonly example: Schema.optionalKey<Schema.Struct<{
4357
+ readonly header_text: Schema.$Array<Schema.String>;
4358
+ }>>;
4359
+ }>, Schema.Struct<{
4360
+ readonly type: Schema.Literal<"BODY">;
4361
+ readonly text: Schema.String;
4362
+ readonly example: Schema.optionalKey<Schema.Struct<{
4363
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
4364
+ }>>;
4365
+ }>, Schema.Struct<{
4366
+ readonly type: Schema.Literal<"FOOTER">;
4367
+ readonly text: Schema.String;
4368
+ }>, Schema.Struct<{
4369
+ readonly type: Schema.Literal<"BUTTONS">;
4370
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4371
+ readonly type: Schema.Literal<"QUICK_REPLY">;
4372
+ readonly text: Schema.String;
4373
+ }>, Schema.Struct<{
4374
+ readonly type: Schema.Literal<"URL">;
4375
+ readonly text: Schema.String;
4376
+ readonly url: Schema.String;
4377
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
4378
+ }>, Schema.Struct<{
4379
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
4380
+ readonly text: Schema.String;
4381
+ readonly phone_number: Schema.String;
4382
+ }>, Schema.Struct<{
4383
+ readonly type: Schema.Literal<"COPY_CODE">;
4384
+ readonly example: Schema.String;
4385
+ }>, Schema.Struct<{
4386
+ readonly type: Schema.Literal<"FLOW">;
4387
+ readonly text: Schema.String;
4388
+ readonly flow: Schema.String;
4389
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
4390
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
4391
+ }>]>>;
4392
+ }>]>>;
4393
+ }>, Schema.Null]>;
3863
4394
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
3864
4395
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
3865
4396
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -3870,14 +4401,16 @@ export declare const TemplatesCreateFromWebsite201: Schema.Struct<{
3870
4401
  }>;
3871
4402
  readonly ask: Schema.String;
3872
4403
  }>;
4404
+ export type TemplatesCreateFromWebsite400 = MalformedRequestError;
4405
+ export declare const TemplatesCreateFromWebsite400: typeof MalformedRequestError;
3873
4406
  export type TemplatesCreateFromWebsite401 = UnauthorizedError;
3874
4407
  export declare const TemplatesCreateFromWebsite401: typeof UnauthorizedError;
3875
4408
  export type TemplatesCreateFromWebsite403 = ForbiddenError;
3876
4409
  export declare const TemplatesCreateFromWebsite403: typeof ForbiddenError;
3877
4410
  export type TemplatesCreateFromWebsite404 = ResourceNotFoundError;
3878
4411
  export declare const TemplatesCreateFromWebsite404: typeof ResourceNotFoundError;
3879
- export type TemplatesCreateFromWebsite409 = ConflictError;
3880
- export declare const TemplatesCreateFromWebsite409: typeof ConflictError;
4412
+ export type TemplatesCreateFromWebsite409 = ConflictError | TemplateInUseError;
4413
+ export declare const TemplatesCreateFromWebsite409: Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]>;
3881
4414
  export type TemplatesCreateFromWebsite422 = TemplateSourceError | ValidationError;
3882
4415
  export declare const TemplatesCreateFromWebsite422: Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]>;
3883
4416
  export type TemplatesCreateFromWebsite500 = InternalError;
@@ -3886,6 +4419,32 @@ export type TemplatesCreateFromWebsite503 = ServiceUnavailableError;
3886
4419
  export declare const TemplatesCreateFromWebsite503: typeof ServiceUnavailableError;
3887
4420
  export type TemplatesCreateFromWebsite504 = GatewayTimeoutError;
3888
4421
  export declare const TemplatesCreateFromWebsite504: typeof GatewayTimeoutError;
4422
+ export type TemplatesDeleteProjectPathParams = {
4423
+ readonly id: TemplateProjectId;
4424
+ };
4425
+ export declare const TemplatesDeleteProjectPathParams: Schema.Struct<{
4426
+ readonly id: Schema.brand<Schema.String, "TemplateProjectId">;
4427
+ }>;
4428
+ export type TemplatesDeleteProject200 = SuccessResponse;
4429
+ export declare const TemplatesDeleteProject200: Schema.Struct<{
4430
+ readonly success: Schema.Boolean;
4431
+ }>;
4432
+ export type TemplatesDeleteProject400 = MalformedRequestError;
4433
+ export declare const TemplatesDeleteProject400: typeof MalformedRequestError;
4434
+ export type TemplatesDeleteProject401 = UnauthorizedError;
4435
+ export declare const TemplatesDeleteProject401: typeof UnauthorizedError;
4436
+ export type TemplatesDeleteProject403 = ForbiddenError;
4437
+ export declare const TemplatesDeleteProject403: typeof ForbiddenError;
4438
+ export type TemplatesDeleteProject404 = ResourceNotFoundError;
4439
+ export declare const TemplatesDeleteProject404: typeof ResourceNotFoundError;
4440
+ export type TemplatesDeleteProject409 = TemplateInUseError;
4441
+ export declare const TemplatesDeleteProject409: typeof TemplateInUseError;
4442
+ export type TemplatesDeleteProject422 = ValidationError;
4443
+ export declare const TemplatesDeleteProject422: typeof ValidationError;
4444
+ export type TemplatesDeleteProject500 = InternalError;
4445
+ export declare const TemplatesDeleteProject500: typeof InternalError;
4446
+ export type TemplatesDeleteProject504 = GatewayTimeoutError;
4447
+ export declare const TemplatesDeleteProject504: typeof GatewayTimeoutError;
3889
4448
  export type TemplatesAddEntryPathParams = {
3890
4449
  readonly id: TemplateProjectId;
3891
4450
  };
@@ -3911,13 +4470,12 @@ export declare const TemplatesAddEntry201: Schema.Struct<{
3911
4470
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3912
4471
  readonly slug: Schema.String;
3913
4472
  readonly name: Schema.String;
3914
- readonly channel: Schema.Literal<"email">;
4473
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3915
4474
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
3916
4475
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3917
4476
  readonly shared: Schema.Boolean;
3918
4477
  readonly entryPath: Schema.String;
3919
4478
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3920
- readonly isActive: Schema.Boolean;
3921
4479
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3922
4480
  readonly brand: Schema.Union<readonly [Schema.Struct<{
3923
4481
  readonly slug: Schema.String;
@@ -3945,10 +4503,64 @@ export declare const TemplatesAddEntry201: Schema.Struct<{
3945
4503
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
3946
4504
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
3947
4505
  }>, Schema.Null]>;
4506
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
4507
+ readonly body: Schema.String;
4508
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
4509
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
4510
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
4511
+ }>, Schema.Null]>;
4512
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
4513
+ readonly name: Schema.String;
4514
+ readonly language: Schema.String;
4515
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
4516
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4517
+ readonly type: Schema.Literal<"HEADER">;
4518
+ readonly format: Schema.Literal<"TEXT">;
4519
+ readonly text: Schema.String;
4520
+ readonly example: Schema.optionalKey<Schema.Struct<{
4521
+ readonly header_text: Schema.$Array<Schema.String>;
4522
+ }>>;
4523
+ }>, Schema.Struct<{
4524
+ readonly type: Schema.Literal<"BODY">;
4525
+ readonly text: Schema.String;
4526
+ readonly example: Schema.optionalKey<Schema.Struct<{
4527
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
4528
+ }>>;
4529
+ }>, Schema.Struct<{
4530
+ readonly type: Schema.Literal<"FOOTER">;
4531
+ readonly text: Schema.String;
4532
+ }>, Schema.Struct<{
4533
+ readonly type: Schema.Literal<"BUTTONS">;
4534
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4535
+ readonly type: Schema.Literal<"QUICK_REPLY">;
4536
+ readonly text: Schema.String;
4537
+ }>, Schema.Struct<{
4538
+ readonly type: Schema.Literal<"URL">;
4539
+ readonly text: Schema.String;
4540
+ readonly url: Schema.String;
4541
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
4542
+ }>, Schema.Struct<{
4543
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
4544
+ readonly text: Schema.String;
4545
+ readonly phone_number: Schema.String;
4546
+ }>, Schema.Struct<{
4547
+ readonly type: Schema.Literal<"COPY_CODE">;
4548
+ readonly example: Schema.String;
4549
+ }>, Schema.Struct<{
4550
+ readonly type: Schema.Literal<"FLOW">;
4551
+ readonly text: Schema.String;
4552
+ readonly flow: Schema.String;
4553
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
4554
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
4555
+ }>]>>;
4556
+ }>]>>;
4557
+ }>, Schema.Null]>;
3948
4558
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
3949
4559
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
3950
4560
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
3951
4561
  }>;
4562
+ export type TemplatesAddEntry400 = MalformedRequestError;
4563
+ export declare const TemplatesAddEntry400: typeof MalformedRequestError;
3952
4564
  export type TemplatesAddEntry401 = UnauthorizedError;
3953
4565
  export declare const TemplatesAddEntry401: typeof UnauthorizedError;
3954
4566
  export type TemplatesAddEntry403 = ForbiddenError;
@@ -3975,13 +4587,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
3975
4587
  readonly id: Schema.brand<Schema.String, "TemplateId">;
3976
4588
  readonly slug: Schema.String;
3977
4589
  readonly name: Schema.String;
3978
- readonly channel: Schema.Literal<"email">;
4590
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
3979
4591
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
3980
4592
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3981
4593
  readonly shared: Schema.Boolean;
3982
4594
  readonly entryPath: Schema.String;
3983
4595
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3984
- readonly isActive: Schema.Boolean;
3985
4596
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
3986
4597
  readonly brand: Schema.Union<readonly [Schema.Struct<{
3987
4598
  readonly slug: Schema.String;
@@ -4009,6 +4620,58 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4009
4620
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
4010
4621
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
4011
4622
  }>, Schema.Null]>;
4623
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
4624
+ readonly body: Schema.String;
4625
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
4626
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
4627
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
4628
+ }>, Schema.Null]>;
4629
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
4630
+ readonly name: Schema.String;
4631
+ readonly language: Schema.String;
4632
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
4633
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4634
+ readonly type: Schema.Literal<"HEADER">;
4635
+ readonly format: Schema.Literal<"TEXT">;
4636
+ readonly text: Schema.String;
4637
+ readonly example: Schema.optionalKey<Schema.Struct<{
4638
+ readonly header_text: Schema.$Array<Schema.String>;
4639
+ }>>;
4640
+ }>, Schema.Struct<{
4641
+ readonly type: Schema.Literal<"BODY">;
4642
+ readonly text: Schema.String;
4643
+ readonly example: Schema.optionalKey<Schema.Struct<{
4644
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
4645
+ }>>;
4646
+ }>, Schema.Struct<{
4647
+ readonly type: Schema.Literal<"FOOTER">;
4648
+ readonly text: Schema.String;
4649
+ }>, Schema.Struct<{
4650
+ readonly type: Schema.Literal<"BUTTONS">;
4651
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
4652
+ readonly type: Schema.Literal<"QUICK_REPLY">;
4653
+ readonly text: Schema.String;
4654
+ }>, Schema.Struct<{
4655
+ readonly type: Schema.Literal<"URL">;
4656
+ readonly text: Schema.String;
4657
+ readonly url: Schema.String;
4658
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
4659
+ }>, Schema.Struct<{
4660
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
4661
+ readonly text: Schema.String;
4662
+ readonly phone_number: Schema.String;
4663
+ }>, Schema.Struct<{
4664
+ readonly type: Schema.Literal<"COPY_CODE">;
4665
+ readonly example: Schema.String;
4666
+ }>, Schema.Struct<{
4667
+ readonly type: Schema.Literal<"FLOW">;
4668
+ readonly text: Schema.String;
4669
+ readonly flow: Schema.String;
4670
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
4671
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
4672
+ }>]>>;
4673
+ }>]>>;
4674
+ }>, Schema.Null]>;
4012
4675
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
4013
4676
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
4014
4677
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -4060,6 +4723,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4060
4723
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4061
4724
  readonly message: Schema.String;
4062
4725
  readonly retryAfterSeconds: Schema.Finite;
4726
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
4727
+ readonly _tag: "MalformedRequestError";
4728
+ readonly message: string;
4729
+ readonly fields: {
4730
+ readonly [x: string]: readonly string[];
4731
+ };
4732
+ }, readonly [Schema.Struct<{
4733
+ readonly _tag: Schema.tag<"MalformedRequestError">;
4734
+ readonly message: Schema.String;
4735
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4736
+ }>], {
4737
+ readonly _tag: "MalformedRequestError";
4738
+ readonly message: string;
4739
+ readonly fields: {
4740
+ readonly [x: string]: readonly string[];
4741
+ };
4742
+ }>, Schema.Struct<{
4743
+ readonly _tag: Schema.tag<"MalformedRequestError">;
4744
+ readonly message: Schema.String;
4745
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4063
4746
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4064
4747
  readonly _tag: "ResourceNotFoundError";
4065
4748
  readonly resource: string;
@@ -4122,9 +4805,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4122
4805
  readonly id: Schema.brand<Schema.String, "TemplateId">;
4123
4806
  readonly name: Schema.String;
4124
4807
  readonly slug: Schema.String;
4125
- readonly channel: Schema.Literal<"email">;
4808
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
4126
4809
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4127
- readonly isActive: Schema.Boolean;
4128
4810
  readonly createdAt: Schema.String;
4129
4811
  readonly updatedAt: Schema.String;
4130
4812
  }>>;
@@ -4178,6 +4860,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4178
4860
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4179
4861
  readonly message: Schema.String;
4180
4862
  readonly retryAfterSeconds: Schema.Finite;
4863
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
4864
+ readonly _tag: "MalformedRequestError";
4865
+ readonly message: string;
4866
+ readonly fields: {
4867
+ readonly [x: string]: readonly string[];
4868
+ };
4869
+ }, readonly [Schema.Struct<{
4870
+ readonly _tag: Schema.tag<"MalformedRequestError">;
4871
+ readonly message: Schema.String;
4872
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4873
+ }>], {
4874
+ readonly _tag: "MalformedRequestError";
4875
+ readonly message: string;
4876
+ readonly fields: {
4877
+ readonly [x: string]: readonly string[];
4878
+ };
4879
+ }>, Schema.Struct<{
4880
+ readonly _tag: Schema.tag<"MalformedRequestError">;
4881
+ readonly message: Schema.String;
4882
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4181
4883
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4182
4884
  readonly _tag: "ResourceNotFoundError";
4183
4885
  readonly resource: string;
@@ -4318,27 +5020,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4318
5020
  readonly userId: Schema.brand<Schema.String, "UserId">;
4319
5021
  readonly via: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"mcp">, Schema.Literal<"agent">]>;
4320
5022
  }>;
4321
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
4322
- readonly _tag: "ConflictError";
4323
- readonly message: string;
4324
- readonly resource: string;
4325
- readonly id?: string | null;
4326
- }, readonly [Schema.Struct<{
4327
- readonly _tag: Schema.tag<"ConflictError">;
4328
- readonly message: Schema.String;
4329
- readonly resource: Schema.String;
4330
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4331
- }>], {
4332
- readonly _tag: "ConflictError";
4333
- readonly message: string;
4334
- readonly resource: string;
4335
- readonly id?: string | null;
4336
- }>, Schema.Struct<{
4337
- readonly _tag: Schema.tag<"ConflictError">;
4338
- readonly message: Schema.String;
4339
- readonly resource: Schema.String;
4340
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4341
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5023
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
4342
5024
  readonly _tag: "ForbiddenError";
4343
5025
  readonly message: string;
4344
5026
  }, readonly [Schema.Struct<{
@@ -4366,6 +5048,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4366
5048
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4367
5049
  readonly message: Schema.String;
4368
5050
  readonly retryAfterSeconds: Schema.Finite;
5051
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5052
+ readonly _tag: "MalformedRequestError";
5053
+ readonly message: string;
5054
+ readonly fields: {
5055
+ readonly [x: string]: readonly string[];
5056
+ };
5057
+ }, readonly [Schema.Struct<{
5058
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5059
+ readonly message: Schema.String;
5060
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5061
+ }>], {
5062
+ readonly _tag: "MalformedRequestError";
5063
+ readonly message: string;
5064
+ readonly fields: {
5065
+ readonly [x: string]: readonly string[];
5066
+ };
5067
+ }>, Schema.Struct<{
5068
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5069
+ readonly message: Schema.String;
5070
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4369
5071
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4370
5072
  readonly _tag: "ResourceNotFoundError";
4371
5073
  readonly resource: string;
@@ -4496,27 +5198,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4496
5198
  readonly title: Schema.String;
4497
5199
  }>, Schema.Null]>>;
4498
5200
  }>>;
4499
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
4500
- readonly _tag: "ConflictError";
4501
- readonly message: string;
4502
- readonly resource: string;
4503
- readonly id?: string | null;
4504
- }, readonly [Schema.Struct<{
4505
- readonly _tag: Schema.tag<"ConflictError">;
4506
- readonly message: Schema.String;
4507
- readonly resource: Schema.String;
4508
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4509
- }>], {
4510
- readonly _tag: "ConflictError";
4511
- readonly message: string;
4512
- readonly resource: string;
4513
- readonly id?: string | null;
4514
- }>, Schema.Struct<{
4515
- readonly _tag: Schema.tag<"ConflictError">;
4516
- readonly message: Schema.String;
4517
- readonly resource: Schema.String;
4518
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4519
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5201
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
4520
5202
  readonly _tag: "ForbiddenError";
4521
5203
  readonly message: string;
4522
5204
  }, readonly [Schema.Struct<{
@@ -4544,6 +5226,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4544
5226
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4545
5227
  readonly message: Schema.String;
4546
5228
  readonly retryAfterSeconds: Schema.Finite;
5229
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5230
+ readonly _tag: "MalformedRequestError";
5231
+ readonly message: string;
5232
+ readonly fields: {
5233
+ readonly [x: string]: readonly string[];
5234
+ };
5235
+ }, readonly [Schema.Struct<{
5236
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5237
+ readonly message: Schema.String;
5238
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5239
+ }>], {
5240
+ readonly _tag: "MalformedRequestError";
5241
+ readonly message: string;
5242
+ readonly fields: {
5243
+ readonly [x: string]: readonly string[];
5244
+ };
5245
+ }>, Schema.Struct<{
5246
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5247
+ readonly message: Schema.String;
5248
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4547
5249
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4548
5250
  readonly _tag: "ResourceNotFoundError";
4549
5251
  readonly resource: string;
@@ -4600,7 +5302,6 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4600
5302
  readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4601
5303
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4602
5304
  readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>>;
4603
- readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4604
5305
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
4605
5306
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4606
5307
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -4609,13 +5310,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4609
5310
  readonly id: Schema.brand<Schema.String, "TemplateId">;
4610
5311
  readonly slug: Schema.String;
4611
5312
  readonly name: Schema.String;
4612
- readonly channel: Schema.Literal<"email">;
5313
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
4613
5314
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
4614
5315
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4615
5316
  readonly shared: Schema.Boolean;
4616
5317
  readonly entryPath: Schema.String;
4617
5318
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4618
- readonly isActive: Schema.Boolean;
4619
5319
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
4620
5320
  readonly brand: Schema.Union<readonly [Schema.Struct<{
4621
5321
  readonly slug: Schema.String;
@@ -4643,30 +5343,62 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4643
5343
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
4644
5344
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
4645
5345
  }>, Schema.Null]>;
5346
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
5347
+ readonly body: Schema.String;
5348
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
5349
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
5350
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
5351
+ }>, Schema.Null]>;
5352
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
5353
+ readonly name: Schema.String;
5354
+ readonly language: Schema.String;
5355
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
5356
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5357
+ readonly type: Schema.Literal<"HEADER">;
5358
+ readonly format: Schema.Literal<"TEXT">;
5359
+ readonly text: Schema.String;
5360
+ readonly example: Schema.optionalKey<Schema.Struct<{
5361
+ readonly header_text: Schema.$Array<Schema.String>;
5362
+ }>>;
5363
+ }>, Schema.Struct<{
5364
+ readonly type: Schema.Literal<"BODY">;
5365
+ readonly text: Schema.String;
5366
+ readonly example: Schema.optionalKey<Schema.Struct<{
5367
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
5368
+ }>>;
5369
+ }>, Schema.Struct<{
5370
+ readonly type: Schema.Literal<"FOOTER">;
5371
+ readonly text: Schema.String;
5372
+ }>, Schema.Struct<{
5373
+ readonly type: Schema.Literal<"BUTTONS">;
5374
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5375
+ readonly type: Schema.Literal<"QUICK_REPLY">;
5376
+ readonly text: Schema.String;
5377
+ }>, Schema.Struct<{
5378
+ readonly type: Schema.Literal<"URL">;
5379
+ readonly text: Schema.String;
5380
+ readonly url: Schema.String;
5381
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
5382
+ }>, Schema.Struct<{
5383
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
5384
+ readonly text: Schema.String;
5385
+ readonly phone_number: Schema.String;
5386
+ }>, Schema.Struct<{
5387
+ readonly type: Schema.Literal<"COPY_CODE">;
5388
+ readonly example: Schema.String;
5389
+ }>, Schema.Struct<{
5390
+ readonly type: Schema.Literal<"FLOW">;
5391
+ readonly text: Schema.String;
5392
+ readonly flow: Schema.String;
5393
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
5394
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
5395
+ }>]>>;
5396
+ }>]>>;
5397
+ }>, Schema.Null]>;
4646
5398
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
4647
5399
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
4648
5400
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
4649
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
4650
- readonly _tag: "ConflictError";
4651
- readonly message: string;
4652
- readonly resource: string;
4653
- readonly id?: string | null;
4654
- }, readonly [Schema.Struct<{
4655
- readonly _tag: Schema.tag<"ConflictError">;
4656
- readonly message: Schema.String;
4657
- readonly resource: Schema.String;
4658
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4659
- }>], {
4660
- readonly _tag: "ConflictError";
4661
- readonly message: string;
4662
- readonly resource: string;
4663
- readonly id?: string | null;
4664
- }>, Schema.Struct<{
4665
- readonly _tag: Schema.tag<"ConflictError">;
4666
- readonly message: Schema.String;
4667
- readonly resource: Schema.String;
4668
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
4669
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5401
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
4670
5402
  readonly _tag: "ForbiddenError";
4671
5403
  readonly message: string;
4672
5404
  }, readonly [Schema.Struct<{
@@ -4694,6 +5426,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4694
5426
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4695
5427
  readonly message: Schema.String;
4696
5428
  readonly retryAfterSeconds: Schema.Finite;
5429
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5430
+ readonly _tag: "MalformedRequestError";
5431
+ readonly message: string;
5432
+ readonly fields: {
5433
+ readonly [x: string]: readonly string[];
5434
+ };
5435
+ }, readonly [Schema.Struct<{
5436
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5437
+ readonly message: Schema.String;
5438
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5439
+ }>], {
5440
+ readonly _tag: "MalformedRequestError";
5441
+ readonly message: string;
5442
+ readonly fields: {
5443
+ readonly [x: string]: readonly string[];
5444
+ };
5445
+ }>, Schema.Struct<{
5446
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5447
+ readonly message: Schema.String;
5448
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4697
5449
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4698
5450
  readonly _tag: "ResourceNotFoundError";
4699
5451
  readonly resource: string;
@@ -4751,9 +5503,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4751
5503
  readonly id: Schema.brand<Schema.String, "TemplateId">;
4752
5504
  readonly name: Schema.String;
4753
5505
  readonly slug: Schema.String;
4754
- readonly channel: Schema.Literal<"email">;
5506
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
4755
5507
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4756
- readonly isActive: Schema.Boolean;
4757
5508
  readonly createdAt: Schema.String;
4758
5509
  readonly updatedAt: Schema.String;
4759
5510
  }>>;
@@ -4787,6 +5538,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4787
5538
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4788
5539
  readonly message: Schema.String;
4789
5540
  readonly retryAfterSeconds: Schema.Finite;
5541
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5542
+ readonly _tag: "MalformedRequestError";
5543
+ readonly message: string;
5544
+ readonly fields: {
5545
+ readonly [x: string]: readonly string[];
5546
+ };
5547
+ }, readonly [Schema.Struct<{
5548
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5549
+ readonly message: Schema.String;
5550
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5551
+ }>], {
5552
+ readonly _tag: "MalformedRequestError";
5553
+ readonly message: string;
5554
+ readonly fields: {
5555
+ readonly [x: string]: readonly string[];
5556
+ };
5557
+ }>, Schema.Struct<{
5558
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5559
+ readonly message: Schema.String;
5560
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4790
5561
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
4791
5562
  readonly _tag: "UnauthorizedError";
4792
5563
  readonly message: string;
@@ -4830,9 +5601,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4830
5601
  readonly id: Schema.brand<Schema.String, "TemplateId">;
4831
5602
  readonly name: Schema.String;
4832
5603
  readonly slug: Schema.String;
4833
- readonly channel: Schema.Literal<"email">;
5604
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
4834
5605
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4835
- readonly isActive: Schema.Boolean;
4836
5606
  readonly createdAt: Schema.String;
4837
5607
  readonly updatedAt: Schema.String;
4838
5608
  }>>;
@@ -4886,6 +5656,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4886
5656
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4887
5657
  readonly message: Schema.String;
4888
5658
  readonly retryAfterSeconds: Schema.Finite;
5659
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5660
+ readonly _tag: "MalformedRequestError";
5661
+ readonly message: string;
5662
+ readonly fields: {
5663
+ readonly [x: string]: readonly string[];
5664
+ };
5665
+ }, readonly [Schema.Struct<{
5666
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5667
+ readonly message: Schema.String;
5668
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5669
+ }>], {
5670
+ readonly _tag: "MalformedRequestError";
5671
+ readonly message: string;
5672
+ readonly fields: {
5673
+ readonly [x: string]: readonly string[];
5674
+ };
5675
+ }>, Schema.Struct<{
5676
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5677
+ readonly message: Schema.String;
5678
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
4889
5679
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4890
5680
  readonly _tag: "ResourceNotFoundError";
4891
5681
  readonly resource: string;
@@ -4949,13 +5739,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4949
5739
  readonly id: Schema.brand<Schema.String, "TemplateId">;
4950
5740
  readonly slug: Schema.String;
4951
5741
  readonly name: Schema.String;
4952
- readonly channel: Schema.Literal<"email">;
5742
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
4953
5743
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
4954
5744
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4955
5745
  readonly shared: Schema.Boolean;
4956
5746
  readonly entryPath: Schema.String;
4957
5747
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4958
- readonly isActive: Schema.Boolean;
4959
5748
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
4960
5749
  readonly brand: Schema.Union<readonly [Schema.Struct<{
4961
5750
  readonly slug: Schema.String;
@@ -4983,6 +5772,58 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4983
5772
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
4984
5773
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
4985
5774
  }>, Schema.Null]>;
5775
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
5776
+ readonly body: Schema.String;
5777
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
5778
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
5779
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
5780
+ }>, Schema.Null]>;
5781
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
5782
+ readonly name: Schema.String;
5783
+ readonly language: Schema.String;
5784
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
5785
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5786
+ readonly type: Schema.Literal<"HEADER">;
5787
+ readonly format: Schema.Literal<"TEXT">;
5788
+ readonly text: Schema.String;
5789
+ readonly example: Schema.optionalKey<Schema.Struct<{
5790
+ readonly header_text: Schema.$Array<Schema.String>;
5791
+ }>>;
5792
+ }>, Schema.Struct<{
5793
+ readonly type: Schema.Literal<"BODY">;
5794
+ readonly text: Schema.String;
5795
+ readonly example: Schema.optionalKey<Schema.Struct<{
5796
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
5797
+ }>>;
5798
+ }>, Schema.Struct<{
5799
+ readonly type: Schema.Literal<"FOOTER">;
5800
+ readonly text: Schema.String;
5801
+ }>, Schema.Struct<{
5802
+ readonly type: Schema.Literal<"BUTTONS">;
5803
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
5804
+ readonly type: Schema.Literal<"QUICK_REPLY">;
5805
+ readonly text: Schema.String;
5806
+ }>, Schema.Struct<{
5807
+ readonly type: Schema.Literal<"URL">;
5808
+ readonly text: Schema.String;
5809
+ readonly url: Schema.String;
5810
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
5811
+ }>, Schema.Struct<{
5812
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
5813
+ readonly text: Schema.String;
5814
+ readonly phone_number: Schema.String;
5815
+ }>, Schema.Struct<{
5816
+ readonly type: Schema.Literal<"COPY_CODE">;
5817
+ readonly example: Schema.String;
5818
+ }>, Schema.Struct<{
5819
+ readonly type: Schema.Literal<"FLOW">;
5820
+ readonly text: Schema.String;
5821
+ readonly flow: Schema.String;
5822
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
5823
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
5824
+ }>]>>;
5825
+ }>]>>;
5826
+ }>, Schema.Null]>;
4986
5827
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
4987
5828
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
4988
5829
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -4992,27 +5833,239 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4992
5833
  readonly host: Schema.String;
4993
5834
  }>;
4994
5835
  readonly ask: Schema.String;
4995
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
4996
- readonly _tag: "ConflictError";
5836
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5837
+ readonly _tag: "ForbiddenError";
4997
5838
  readonly message: string;
5839
+ }, readonly [Schema.Struct<{
5840
+ readonly _tag: Schema.tag<"ForbiddenError">;
5841
+ readonly message: Schema.String;
5842
+ }>], {
5843
+ readonly _tag: "ForbiddenError";
5844
+ readonly message: string;
5845
+ }>, Schema.Struct<{
5846
+ readonly _tag: Schema.tag<"ForbiddenError">;
5847
+ readonly message: Schema.String;
5848
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
5849
+ readonly _tag: "GatewayTimeoutError";
5850
+ readonly message: string;
5851
+ readonly retryAfterSeconds: number;
5852
+ }, readonly [Schema.Struct<{
5853
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5854
+ readonly message: Schema.String;
5855
+ readonly retryAfterSeconds: Schema.Finite;
5856
+ }>], {
5857
+ readonly _tag: "GatewayTimeoutError";
5858
+ readonly message: string;
5859
+ readonly retryAfterSeconds: number;
5860
+ }>, Schema.Struct<{
5861
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5862
+ readonly message: Schema.String;
5863
+ readonly retryAfterSeconds: Schema.Finite;
5864
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5865
+ readonly _tag: "MalformedRequestError";
5866
+ readonly message: string;
5867
+ readonly fields: {
5868
+ readonly [x: string]: readonly string[];
5869
+ };
5870
+ }, readonly [Schema.Struct<{
5871
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5872
+ readonly message: Schema.String;
5873
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5874
+ }>], {
5875
+ readonly _tag: "MalformedRequestError";
5876
+ readonly message: string;
5877
+ readonly fields: {
5878
+ readonly [x: string]: readonly string[];
5879
+ };
5880
+ }>, Schema.Struct<{
5881
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5882
+ readonly message: Schema.String;
5883
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5884
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5885
+ readonly _tag: "ResourceNotFoundError";
4998
5886
  readonly resource: string;
4999
- readonly id?: string | null;
5887
+ readonly id: string;
5888
+ readonly message: string;
5889
+ }, readonly [Schema.Struct<{
5890
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
5891
+ readonly resource: Schema.String;
5892
+ readonly id: Schema.String;
5893
+ readonly message: Schema.String;
5894
+ }>], {
5895
+ readonly _tag: "ResourceNotFoundError";
5896
+ readonly resource: string;
5897
+ readonly id: string;
5898
+ readonly message: string;
5899
+ }>, Schema.Struct<{
5900
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
5901
+ readonly resource: Schema.String;
5902
+ readonly id: Schema.String;
5903
+ readonly message: Schema.String;
5904
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
5905
+ readonly _tag: "ServiceUnavailableError";
5906
+ readonly message: string;
5907
+ readonly retryAfterSeconds: number;
5908
+ }, readonly [Schema.Struct<{
5909
+ readonly _tag: Schema.tag<"ServiceUnavailableError">;
5910
+ readonly message: Schema.String;
5911
+ readonly retryAfterSeconds: Schema.Finite;
5912
+ }>], {
5913
+ readonly _tag: "ServiceUnavailableError";
5914
+ readonly message: string;
5915
+ readonly retryAfterSeconds: number;
5916
+ }>, Schema.Struct<{
5917
+ readonly _tag: Schema.tag<"ServiceUnavailableError">;
5918
+ readonly message: Schema.String;
5919
+ readonly retryAfterSeconds: Schema.Finite;
5920
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
5921
+ readonly _tag: "UnauthorizedError";
5922
+ readonly message: string;
5923
+ }, readonly [Schema.Struct<{
5924
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5925
+ readonly message: Schema.String;
5926
+ }>], {
5927
+ readonly _tag: "UnauthorizedError";
5928
+ readonly message: string;
5929
+ }>, Schema.Struct<{
5930
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5931
+ readonly message: Schema.String;
5932
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesDelete", "DELETE", "/v1/templates/:id", Schema.toCodecStringTree<Schema.Struct<{
5933
+ readonly id: Schema.brand<Schema.String, "TemplateId">;
5934
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
5935
+ readonly success: Schema.Boolean;
5936
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5937
+ readonly _tag: "ForbiddenError";
5938
+ readonly message: string;
5939
+ }, readonly [Schema.Struct<{
5940
+ readonly _tag: Schema.tag<"ForbiddenError">;
5941
+ readonly message: Schema.String;
5942
+ }>], {
5943
+ readonly _tag: "ForbiddenError";
5944
+ readonly message: string;
5945
+ }>, Schema.Struct<{
5946
+ readonly _tag: Schema.tag<"ForbiddenError">;
5947
+ readonly message: Schema.String;
5948
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
5949
+ readonly _tag: "GatewayTimeoutError";
5950
+ readonly message: string;
5951
+ readonly retryAfterSeconds: number;
5952
+ }, readonly [Schema.Struct<{
5953
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5954
+ readonly message: Schema.String;
5955
+ readonly retryAfterSeconds: Schema.Finite;
5956
+ }>], {
5957
+ readonly _tag: "GatewayTimeoutError";
5958
+ readonly message: string;
5959
+ readonly retryAfterSeconds: number;
5960
+ }>, Schema.Struct<{
5961
+ readonly _tag: Schema.tag<"GatewayTimeoutError">;
5962
+ readonly message: Schema.String;
5963
+ readonly retryAfterSeconds: Schema.Finite;
5964
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
5965
+ readonly _tag: "MalformedRequestError";
5966
+ readonly message: string;
5967
+ readonly fields: {
5968
+ readonly [x: string]: readonly string[];
5969
+ };
5970
+ }, readonly [Schema.Struct<{
5971
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5972
+ readonly message: Schema.String;
5973
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5974
+ }>], {
5975
+ readonly _tag: "MalformedRequestError";
5976
+ readonly message: string;
5977
+ readonly fields: {
5978
+ readonly [x: string]: readonly string[];
5979
+ };
5980
+ }>, Schema.Struct<{
5981
+ readonly _tag: Schema.tag<"MalformedRequestError">;
5982
+ readonly message: Schema.String;
5983
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5984
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5985
+ readonly _tag: "ResourceNotFoundError";
5986
+ readonly resource: string;
5987
+ readonly id: string;
5988
+ readonly message: string;
5989
+ }, readonly [Schema.Struct<{
5990
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
5991
+ readonly resource: Schema.String;
5992
+ readonly id: Schema.String;
5993
+ readonly message: Schema.String;
5994
+ }>], {
5995
+ readonly _tag: "ResourceNotFoundError";
5996
+ readonly resource: string;
5997
+ readonly id: string;
5998
+ readonly message: string;
5999
+ }>, Schema.Struct<{
6000
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
6001
+ readonly resource: Schema.String;
6002
+ readonly id: Schema.String;
6003
+ readonly message: Schema.String;
6004
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<TemplateInUseError, {
6005
+ readonly _tag: "TemplateInUseError";
6006
+ readonly message: string;
6007
+ readonly references: readonly {
6008
+ readonly kind: string;
6009
+ readonly id: string;
6010
+ }[];
6011
+ }, readonly [Schema.Struct<{
6012
+ readonly _tag: Schema.tag<"TemplateInUseError">;
6013
+ readonly message: Schema.String;
6014
+ readonly references: Schema.$Array<Schema.Struct<{
6015
+ readonly kind: Schema.String;
6016
+ readonly id: Schema.String;
6017
+ }>>;
6018
+ }>], {
6019
+ readonly _tag: "TemplateInUseError";
6020
+ readonly message: string;
6021
+ readonly references: readonly {
6022
+ readonly kind: string;
6023
+ readonly id: string;
6024
+ }[];
6025
+ }>, Schema.Struct<{
6026
+ readonly _tag: Schema.tag<"TemplateInUseError">;
6027
+ readonly message: Schema.String;
6028
+ readonly references: Schema.$Array<Schema.Struct<{
6029
+ readonly kind: Schema.String;
6030
+ readonly id: Schema.String;
6031
+ }>>;
6032
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
6033
+ readonly _tag: "UnauthorizedError";
6034
+ readonly message: string;
6035
+ }, readonly [Schema.Struct<{
6036
+ readonly _tag: Schema.tag<"UnauthorizedError">;
6037
+ readonly message: Schema.String;
6038
+ }>], {
6039
+ readonly _tag: "UnauthorizedError";
6040
+ readonly message: string;
6041
+ }>, Schema.Struct<{
6042
+ readonly _tag: Schema.tag<"UnauthorizedError">;
6043
+ readonly message: Schema.String;
6044
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
6045
+ readonly _tag: "ValidationError";
6046
+ readonly message: string;
6047
+ readonly fields?: {
6048
+ readonly [x: string]: readonly string[];
6049
+ } | null;
5000
6050
  }, readonly [Schema.Struct<{
5001
- readonly _tag: Schema.tag<"ConflictError">;
6051
+ readonly _tag: Schema.tag<"ValidationError">;
5002
6052
  readonly message: Schema.String;
5003
- readonly resource: Schema.String;
5004
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6053
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5005
6054
  }>], {
5006
- readonly _tag: "ConflictError";
6055
+ readonly _tag: "ValidationError";
5007
6056
  readonly message: string;
5008
- readonly resource: string;
5009
- readonly id?: string | null;
6057
+ readonly fields?: {
6058
+ readonly [x: string]: readonly string[];
6059
+ } | null;
5010
6060
  }>, Schema.Struct<{
5011
- readonly _tag: Schema.tag<"ConflictError">;
6061
+ readonly _tag: Schema.tag<"ValidationError">;
5012
6062
  readonly message: Schema.String;
5013
- readonly resource: Schema.String;
5014
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5015
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6063
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
6064
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesDeleteFamily", "DELETE", "/v1/templates/families/:id", Schema.toCodecStringTree<Schema.Struct<{
6065
+ readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
6066
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
6067
+ readonly success: Schema.Boolean;
6068
+ }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5016
6069
  readonly _tag: "ForbiddenError";
5017
6070
  readonly message: string;
5018
6071
  }, readonly [Schema.Struct<{
@@ -5040,6 +6093,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5040
6093
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5041
6094
  readonly message: Schema.String;
5042
6095
  readonly retryAfterSeconds: Schema.Finite;
6096
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6097
+ readonly _tag: "MalformedRequestError";
6098
+ readonly message: string;
6099
+ readonly fields: {
6100
+ readonly [x: string]: readonly string[];
6101
+ };
6102
+ }, readonly [Schema.Struct<{
6103
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6104
+ readonly message: Schema.String;
6105
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6106
+ }>], {
6107
+ readonly _tag: "MalformedRequestError";
6108
+ readonly message: string;
6109
+ readonly fields: {
6110
+ readonly [x: string]: readonly string[];
6111
+ };
6112
+ }>, Schema.Struct<{
6113
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6114
+ readonly message: Schema.String;
6115
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5043
6116
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5044
6117
  readonly _tag: "ResourceNotFoundError";
5045
6118
  readonly resource: string;
@@ -5060,36 +6133,40 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5060
6133
  readonly resource: Schema.String;
5061
6134
  readonly id: Schema.String;
5062
6135
  readonly message: Schema.String;
5063
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ServiceUnavailableError, {
5064
- readonly _tag: "ServiceUnavailableError";
6136
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
6137
+ readonly _tag: "UnauthorizedError";
5065
6138
  readonly message: string;
5066
- readonly retryAfterSeconds: number;
5067
6139
  }, readonly [Schema.Struct<{
5068
- readonly _tag: Schema.tag<"ServiceUnavailableError">;
6140
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5069
6141
  readonly message: Schema.String;
5070
- readonly retryAfterSeconds: Schema.Finite;
5071
6142
  }>], {
5072
- readonly _tag: "ServiceUnavailableError";
6143
+ readonly _tag: "UnauthorizedError";
5073
6144
  readonly message: string;
5074
- readonly retryAfterSeconds: number;
5075
6145
  }>, Schema.Struct<{
5076
- readonly _tag: Schema.tag<"ServiceUnavailableError">;
6146
+ readonly _tag: Schema.tag<"UnauthorizedError">;
5077
6147
  readonly message: Schema.String;
5078
- readonly retryAfterSeconds: Schema.Finite;
5079
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
5080
- readonly _tag: "UnauthorizedError";
6148
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
6149
+ readonly _tag: "ValidationError";
5081
6150
  readonly message: string;
6151
+ readonly fields?: {
6152
+ readonly [x: string]: readonly string[];
6153
+ } | null;
5082
6154
  }, readonly [Schema.Struct<{
5083
- readonly _tag: Schema.tag<"UnauthorizedError">;
6155
+ readonly _tag: Schema.tag<"ValidationError">;
5084
6156
  readonly message: Schema.String;
6157
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
5085
6158
  }>], {
5086
- readonly _tag: "UnauthorizedError";
6159
+ readonly _tag: "ValidationError";
5087
6160
  readonly message: string;
6161
+ readonly fields?: {
6162
+ readonly [x: string]: readonly string[];
6163
+ } | null;
5088
6164
  }>, Schema.Struct<{
5089
- readonly _tag: Schema.tag<"UnauthorizedError">;
6165
+ readonly _tag: Schema.tag<"ValidationError">;
5090
6166
  readonly message: Schema.String;
5091
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesDeleteFamily", "DELETE", "/v1/templates/families/:id", Schema.toCodecStringTree<Schema.Struct<{
5092
- readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
6167
+ readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
6168
+ }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesDeleteProject", "DELETE", "/v1/templates/projects/:id", Schema.toCodecStringTree<Schema.Struct<{
6169
+ readonly id: Schema.brand<Schema.String, "TemplateProjectId">;
5093
6170
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
5094
6171
  readonly success: Schema.Boolean;
5095
6172
  }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
@@ -5120,6 +6197,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5120
6197
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5121
6198
  readonly message: Schema.String;
5122
6199
  readonly retryAfterSeconds: Schema.Finite;
6200
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6201
+ readonly _tag: "MalformedRequestError";
6202
+ readonly message: string;
6203
+ readonly fields: {
6204
+ readonly [x: string]: readonly string[];
6205
+ };
6206
+ }, readonly [Schema.Struct<{
6207
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6208
+ readonly message: Schema.String;
6209
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6210
+ }>], {
6211
+ readonly _tag: "MalformedRequestError";
6212
+ readonly message: string;
6213
+ readonly fields: {
6214
+ readonly [x: string]: readonly string[];
6215
+ };
6216
+ }>, Schema.Struct<{
6217
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6218
+ readonly message: Schema.String;
6219
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5123
6220
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5124
6221
  readonly _tag: "ResourceNotFoundError";
5125
6222
  readonly resource: string;
@@ -5140,6 +6237,34 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5140
6237
  readonly resource: Schema.String;
5141
6238
  readonly id: Schema.String;
5142
6239
  readonly message: Schema.String;
6240
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<TemplateInUseError, {
6241
+ readonly _tag: "TemplateInUseError";
6242
+ readonly message: string;
6243
+ readonly references: readonly {
6244
+ readonly kind: string;
6245
+ readonly id: string;
6246
+ }[];
6247
+ }, readonly [Schema.Struct<{
6248
+ readonly _tag: Schema.tag<"TemplateInUseError">;
6249
+ readonly message: Schema.String;
6250
+ readonly references: Schema.$Array<Schema.Struct<{
6251
+ readonly kind: Schema.String;
6252
+ readonly id: Schema.String;
6253
+ }>>;
6254
+ }>], {
6255
+ readonly _tag: "TemplateInUseError";
6256
+ readonly message: string;
6257
+ readonly references: readonly {
6258
+ readonly kind: string;
6259
+ readonly id: string;
6260
+ }[];
6261
+ }>, Schema.Struct<{
6262
+ readonly _tag: Schema.tag<"TemplateInUseError">;
6263
+ readonly message: Schema.String;
6264
+ readonly references: Schema.$Array<Schema.Struct<{
6265
+ readonly kind: Schema.String;
6266
+ readonly id: Schema.String;
6267
+ }>>;
5143
6268
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
5144
6269
  readonly _tag: "UnauthorizedError";
5145
6270
  readonly message: string;
@@ -5182,9 +6307,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5182
6307
  readonly id: Schema.brand<Schema.String, "TemplateId">;
5183
6308
  readonly name: Schema.String;
5184
6309
  readonly slug: Schema.String;
5185
- readonly channel: Schema.Literal<"email">;
6310
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
5186
6311
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
5187
- readonly isActive: Schema.Boolean;
5188
6312
  readonly createdAt: Schema.String;
5189
6313
  readonly updatedAt: Schema.String;
5190
6314
  }>>;
@@ -5238,6 +6362,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5238
6362
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5239
6363
  readonly message: Schema.String;
5240
6364
  readonly retryAfterSeconds: Schema.Finite;
6365
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6366
+ readonly _tag: "MalformedRequestError";
6367
+ readonly message: string;
6368
+ readonly fields: {
6369
+ readonly [x: string]: readonly string[];
6370
+ };
6371
+ }, readonly [Schema.Struct<{
6372
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6373
+ readonly message: Schema.String;
6374
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6375
+ }>], {
6376
+ readonly _tag: "MalformedRequestError";
6377
+ readonly message: string;
6378
+ readonly fields: {
6379
+ readonly [x: string]: readonly string[];
6380
+ };
6381
+ }>, Schema.Struct<{
6382
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6383
+ readonly message: Schema.String;
6384
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5241
6385
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5242
6386
  readonly _tag: "ResourceNotFoundError";
5243
6387
  readonly resource: string;
@@ -5309,27 +6453,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5309
6453
  readonly status: Schema.Union<readonly [Schema.Literal<"added">, Schema.Literal<"modified">, Schema.Literal<"deleted">]>;
5310
6454
  readonly digest: Schema.Union<readonly [Schema.String, Schema.Null]>;
5311
6455
  }>>;
5312
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5313
- readonly _tag: "ConflictError";
5314
- readonly message: string;
5315
- readonly resource: string;
5316
- readonly id?: string | null;
5317
- }, readonly [Schema.Struct<{
5318
- readonly _tag: Schema.tag<"ConflictError">;
5319
- readonly message: Schema.String;
5320
- readonly resource: Schema.String;
5321
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5322
- }>], {
5323
- readonly _tag: "ConflictError";
5324
- readonly message: string;
5325
- readonly resource: string;
5326
- readonly id?: string | null;
5327
- }>, Schema.Struct<{
5328
- readonly _tag: Schema.tag<"ConflictError">;
5329
- readonly message: Schema.String;
5330
- readonly resource: Schema.String;
5331
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5332
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6456
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5333
6457
  readonly _tag: "ForbiddenError";
5334
6458
  readonly message: string;
5335
6459
  }, readonly [Schema.Struct<{
@@ -5357,6 +6481,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5357
6481
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5358
6482
  readonly message: Schema.String;
5359
6483
  readonly retryAfterSeconds: Schema.Finite;
6484
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6485
+ readonly _tag: "MalformedRequestError";
6486
+ readonly message: string;
6487
+ readonly fields: {
6488
+ readonly [x: string]: readonly string[];
6489
+ };
6490
+ }, readonly [Schema.Struct<{
6491
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6492
+ readonly message: Schema.String;
6493
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6494
+ }>], {
6495
+ readonly _tag: "MalformedRequestError";
6496
+ readonly message: string;
6497
+ readonly fields: {
6498
+ readonly [x: string]: readonly string[];
6499
+ };
6500
+ }>, Schema.Struct<{
6501
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6502
+ readonly message: Schema.String;
6503
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5360
6504
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5361
6505
  readonly _tag: "ResourceNotFoundError";
5362
6506
  readonly resource: string;
@@ -5411,13 +6555,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5411
6555
  readonly id: Schema.brand<Schema.String, "TemplateId">;
5412
6556
  readonly slug: Schema.String;
5413
6557
  readonly name: Schema.String;
5414
- readonly channel: Schema.Literal<"email">;
6558
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
5415
6559
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
5416
6560
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5417
6561
  readonly shared: Schema.Boolean;
5418
6562
  readonly entryPath: Schema.String;
5419
6563
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
5420
- readonly isActive: Schema.Boolean;
5421
6564
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
5422
6565
  readonly brand: Schema.Union<readonly [Schema.Struct<{
5423
6566
  readonly slug: Schema.String;
@@ -5445,6 +6588,58 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5445
6588
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
5446
6589
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
5447
6590
  }>, Schema.Null]>;
6591
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
6592
+ readonly body: Schema.String;
6593
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
6594
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
6595
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
6596
+ }>, Schema.Null]>;
6597
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
6598
+ readonly name: Schema.String;
6599
+ readonly language: Schema.String;
6600
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
6601
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
6602
+ readonly type: Schema.Literal<"HEADER">;
6603
+ readonly format: Schema.Literal<"TEXT">;
6604
+ readonly text: Schema.String;
6605
+ readonly example: Schema.optionalKey<Schema.Struct<{
6606
+ readonly header_text: Schema.$Array<Schema.String>;
6607
+ }>>;
6608
+ }>, Schema.Struct<{
6609
+ readonly type: Schema.Literal<"BODY">;
6610
+ readonly text: Schema.String;
6611
+ readonly example: Schema.optionalKey<Schema.Struct<{
6612
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
6613
+ }>>;
6614
+ }>, Schema.Struct<{
6615
+ readonly type: Schema.Literal<"FOOTER">;
6616
+ readonly text: Schema.String;
6617
+ }>, Schema.Struct<{
6618
+ readonly type: Schema.Literal<"BUTTONS">;
6619
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
6620
+ readonly type: Schema.Literal<"QUICK_REPLY">;
6621
+ readonly text: Schema.String;
6622
+ }>, Schema.Struct<{
6623
+ readonly type: Schema.Literal<"URL">;
6624
+ readonly text: Schema.String;
6625
+ readonly url: Schema.String;
6626
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
6627
+ }>, Schema.Struct<{
6628
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
6629
+ readonly text: Schema.String;
6630
+ readonly phone_number: Schema.String;
6631
+ }>, Schema.Struct<{
6632
+ readonly type: Schema.Literal<"COPY_CODE">;
6633
+ readonly example: Schema.String;
6634
+ }>, Schema.Struct<{
6635
+ readonly type: Schema.Literal<"FLOW">;
6636
+ readonly text: Schema.String;
6637
+ readonly flow: Schema.String;
6638
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
6639
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
6640
+ }>]>>;
6641
+ }>]>>;
6642
+ }>, Schema.Null]>;
5448
6643
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
5449
6644
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
5450
6645
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -5476,6 +6671,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5476
6671
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5477
6672
  readonly message: Schema.String;
5478
6673
  readonly retryAfterSeconds: Schema.Finite;
6674
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6675
+ readonly _tag: "MalformedRequestError";
6676
+ readonly message: string;
6677
+ readonly fields: {
6678
+ readonly [x: string]: readonly string[];
6679
+ };
6680
+ }, readonly [Schema.Struct<{
6681
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6682
+ readonly message: Schema.String;
6683
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6684
+ }>], {
6685
+ readonly _tag: "MalformedRequestError";
6686
+ readonly message: string;
6687
+ readonly fields: {
6688
+ readonly [x: string]: readonly string[];
6689
+ };
6690
+ }>, Schema.Struct<{
6691
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6692
+ readonly message: Schema.String;
6693
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5479
6694
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5480
6695
  readonly _tag: "ResourceNotFoundError";
5481
6696
  readonly resource: string;
@@ -5537,9 +6752,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5537
6752
  readonly id: Schema.brand<Schema.String, "TemplateId">;
5538
6753
  readonly name: Schema.String;
5539
6754
  readonly slug: Schema.String;
5540
- readonly channel: Schema.Literal<"email">;
6755
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
5541
6756
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
5542
- readonly isActive: Schema.Boolean;
5543
6757
  readonly createdAt: Schema.String;
5544
6758
  readonly updatedAt: Schema.String;
5545
6759
  }>>;
@@ -5573,6 +6787,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5573
6787
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5574
6788
  readonly message: Schema.String;
5575
6789
  readonly retryAfterSeconds: Schema.Finite;
6790
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6791
+ readonly _tag: "MalformedRequestError";
6792
+ readonly message: string;
6793
+ readonly fields: {
6794
+ readonly [x: string]: readonly string[];
6795
+ };
6796
+ }, readonly [Schema.Struct<{
6797
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6798
+ readonly message: Schema.String;
6799
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6800
+ }>], {
6801
+ readonly _tag: "MalformedRequestError";
6802
+ readonly message: string;
6803
+ readonly fields: {
6804
+ readonly [x: string]: readonly string[];
6805
+ };
6806
+ }>, Schema.Struct<{
6807
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6808
+ readonly message: Schema.String;
6809
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5576
6810
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5577
6811
  readonly _tag: "ResourceNotFoundError";
5578
6812
  readonly resource: string;
@@ -5630,27 +6864,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5630
6864
  }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
5631
6865
  readonly remote: Schema.String;
5632
6866
  readonly defaultBranch: Schema.String;
5633
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5634
- readonly _tag: "ConflictError";
5635
- readonly message: string;
5636
- readonly resource: string;
5637
- readonly id?: string | null;
5638
- }, readonly [Schema.Struct<{
5639
- readonly _tag: Schema.tag<"ConflictError">;
5640
- readonly message: Schema.String;
5641
- readonly resource: Schema.String;
5642
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5643
- }>], {
5644
- readonly _tag: "ConflictError";
5645
- readonly message: string;
5646
- readonly resource: string;
5647
- readonly id?: string | null;
5648
- }>, Schema.Struct<{
5649
- readonly _tag: Schema.tag<"ConflictError">;
5650
- readonly message: Schema.String;
5651
- readonly resource: Schema.String;
5652
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5653
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6867
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5654
6868
  readonly _tag: "ForbiddenError";
5655
6869
  readonly message: string;
5656
6870
  }, readonly [Schema.Struct<{
@@ -5678,6 +6892,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5678
6892
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5679
6893
  readonly message: Schema.String;
5680
6894
  readonly retryAfterSeconds: Schema.Finite;
6895
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
6896
+ readonly _tag: "MalformedRequestError";
6897
+ readonly message: string;
6898
+ readonly fields: {
6899
+ readonly [x: string]: readonly string[];
6900
+ };
6901
+ }, readonly [Schema.Struct<{
6902
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6903
+ readonly message: Schema.String;
6904
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6905
+ }>], {
6906
+ readonly _tag: "MalformedRequestError";
6907
+ readonly message: string;
6908
+ readonly fields: {
6909
+ readonly [x: string]: readonly string[];
6910
+ };
6911
+ }>, Schema.Struct<{
6912
+ readonly _tag: Schema.tag<"MalformedRequestError">;
6913
+ readonly message: Schema.String;
6914
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5681
6915
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5682
6916
  readonly _tag: "ResourceNotFoundError";
5683
6917
  readonly resource: string;
@@ -5765,6 +6999,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5765
6999
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5766
7000
  readonly message: Schema.String;
5767
7001
  readonly retryAfterSeconds: Schema.Finite;
7002
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7003
+ readonly _tag: "MalformedRequestError";
7004
+ readonly message: string;
7005
+ readonly fields: {
7006
+ readonly [x: string]: readonly string[];
7007
+ };
7008
+ }, readonly [Schema.Struct<{
7009
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7010
+ readonly message: Schema.String;
7011
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7012
+ }>], {
7013
+ readonly _tag: "MalformedRequestError";
7014
+ readonly message: string;
7015
+ readonly fields: {
7016
+ readonly [x: string]: readonly string[];
7017
+ };
7018
+ }>, Schema.Struct<{
7019
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7020
+ readonly message: Schema.String;
7021
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5768
7022
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5769
7023
  readonly _tag: "ResourceNotFoundError";
5770
7024
  readonly resource: string;
@@ -5982,6 +7236,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5982
7236
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
5983
7237
  readonly message: Schema.String;
5984
7238
  readonly retryAfterSeconds: Schema.Finite;
7239
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7240
+ readonly _tag: "MalformedRequestError";
7241
+ readonly message: string;
7242
+ readonly fields: {
7243
+ readonly [x: string]: readonly string[];
7244
+ };
7245
+ }, readonly [Schema.Struct<{
7246
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7247
+ readonly message: Schema.String;
7248
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7249
+ }>], {
7250
+ readonly _tag: "MalformedRequestError";
7251
+ readonly message: string;
7252
+ readonly fields: {
7253
+ readonly [x: string]: readonly string[];
7254
+ };
7255
+ }>, Schema.Struct<{
7256
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7257
+ readonly message: Schema.String;
7258
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
5985
7259
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
5986
7260
  readonly _tag: "ResourceNotFoundError";
5987
7261
  readonly resource: string;
@@ -6035,35 +7309,15 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6035
7309
  readonly message: Schema.String;
6036
7310
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
6037
7311
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesIssueGitCredential", "POST", "/v1/templates/:id/repository/credentials", Schema.toCodecStringTree<Schema.Struct<{
6038
- readonly id: Schema.brand<Schema.String, "TemplateId">;
6039
- }>>, never, Schema.toCodecJson<Schema.Struct<{
6040
- readonly scope: Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>;
6041
- }>>, never, Schema.toCodecJson<Schema.Struct<{
6042
- readonly remote: Schema.String;
6043
- readonly username: Schema.Literal<"x-access-token">;
6044
- readonly password: Schema.String;
6045
- readonly expiresAt: Schema.String;
6046
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
6047
- readonly _tag: "ConflictError";
6048
- readonly message: string;
6049
- readonly resource: string;
6050
- readonly id?: string | null;
6051
- }, readonly [Schema.Struct<{
6052
- readonly _tag: Schema.tag<"ConflictError">;
6053
- readonly message: Schema.String;
6054
- readonly resource: Schema.String;
6055
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6056
- }>], {
6057
- readonly _tag: "ConflictError";
6058
- readonly message: string;
6059
- readonly resource: string;
6060
- readonly id?: string | null;
6061
- }>, Schema.Struct<{
6062
- readonly _tag: Schema.tag<"ConflictError">;
6063
- readonly message: Schema.String;
6064
- readonly resource: Schema.String;
6065
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6066
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7312
+ readonly id: Schema.brand<Schema.String, "TemplateId">;
7313
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
7314
+ readonly scope: Schema.Union<readonly [Schema.Literal<"read">, Schema.Literal<"write">]>;
7315
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
7316
+ readonly remote: Schema.String;
7317
+ readonly username: Schema.Literal<"x-access-token">;
7318
+ readonly password: Schema.String;
7319
+ readonly expiresAt: Schema.String;
7320
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6067
7321
  readonly _tag: "ForbiddenError";
6068
7322
  readonly message: string;
6069
7323
  }, readonly [Schema.Struct<{
@@ -6091,6 +7345,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6091
7345
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6092
7346
  readonly message: Schema.String;
6093
7347
  readonly retryAfterSeconds: Schema.Finite;
7348
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7349
+ readonly _tag: "MalformedRequestError";
7350
+ readonly message: string;
7351
+ readonly fields: {
7352
+ readonly [x: string]: readonly string[];
7353
+ };
7354
+ }, readonly [Schema.Struct<{
7355
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7356
+ readonly message: Schema.String;
7357
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7358
+ }>], {
7359
+ readonly _tag: "MalformedRequestError";
7360
+ readonly message: string;
7361
+ readonly fields: {
7362
+ readonly [x: string]: readonly string[];
7363
+ };
7364
+ }>, Schema.Struct<{
7365
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7366
+ readonly message: Schema.String;
7367
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6094
7368
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6095
7369
  readonly _tag: "ResourceNotFoundError";
6096
7370
  readonly resource: string;
@@ -6141,26 +7415,25 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6141
7415
  readonly message: Schema.String;
6142
7416
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesList", "GET", "/v1/templates", never, Schema.toCodecStringTree<Schema.Struct<{
6143
7417
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
6144
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6145
- readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>>;
6146
- readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
6147
- readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>, Schema.Null]>>;
6148
- readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6149
- readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
6150
- readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
7418
+ readonly cursor: Schema.optionalKey<Schema.String>;
7419
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>>;
7420
+ readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
7421
+ readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>>;
7422
+ readonly search: Schema.optionalKey<Schema.String>;
7423
+ readonly projectId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateProjectId">>;
7424
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">]>>;
6151
7425
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
6152
7426
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
6153
7427
  readonly items: Schema.$Array<Schema.Struct<{
6154
7428
  readonly id: Schema.brand<Schema.String, "TemplateId">;
6155
7429
  readonly slug: Schema.String;
6156
7430
  readonly name: Schema.String;
6157
- readonly channel: Schema.Literal<"email">;
7431
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
6158
7432
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
6159
7433
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
6160
7434
  readonly shared: Schema.Boolean;
6161
7435
  readonly entryPath: Schema.String;
6162
7436
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
6163
- readonly isActive: Schema.Boolean;
6164
7437
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
6165
7438
  readonly brand: Schema.Union<readonly [Schema.Struct<{
6166
7439
  readonly slug: Schema.String;
@@ -6205,6 +7478,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6205
7478
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6206
7479
  readonly message: Schema.String;
6207
7480
  readonly retryAfterSeconds: Schema.Finite;
7481
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7482
+ readonly _tag: "MalformedRequestError";
7483
+ readonly message: string;
7484
+ readonly fields: {
7485
+ readonly [x: string]: readonly string[];
7486
+ };
7487
+ }, readonly [Schema.Struct<{
7488
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7489
+ readonly message: Schema.String;
7490
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7491
+ }>], {
7492
+ readonly _tag: "MalformedRequestError";
7493
+ readonly message: string;
7494
+ readonly fields: {
7495
+ readonly [x: string]: readonly string[];
7496
+ };
7497
+ }>, Schema.Struct<{
7498
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7499
+ readonly message: Schema.String;
7500
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6208
7501
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
6209
7502
  readonly _tag: "UnauthorizedError";
6210
7503
  readonly message: string;
@@ -6239,7 +7532,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6239
7532
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
6240
7533
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesListFamilies", "GET", "/v1/templates/families", never, Schema.toCodecStringTree<Schema.Struct<{
6241
7534
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
6242
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7535
+ readonly cursor: Schema.optionalKey<Schema.String>;
6243
7536
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
6244
7537
  readonly items: Schema.$Array<Schema.Struct<{
6245
7538
  readonly id: Schema.brand<Schema.String, "TemplateFamilyId">;
@@ -6248,9 +7541,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6248
7541
  readonly id: Schema.brand<Schema.String, "TemplateId">;
6249
7542
  readonly name: Schema.String;
6250
7543
  readonly slug: Schema.String;
6251
- readonly channel: Schema.Literal<"email">;
7544
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
6252
7545
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
6253
- readonly isActive: Schema.Boolean;
6254
7546
  readonly createdAt: Schema.String;
6255
7547
  readonly updatedAt: Schema.String;
6256
7548
  }>>;
@@ -6286,6 +7578,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6286
7578
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6287
7579
  readonly message: Schema.String;
6288
7580
  readonly retryAfterSeconds: Schema.Finite;
7581
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7582
+ readonly _tag: "MalformedRequestError";
7583
+ readonly message: string;
7584
+ readonly fields: {
7585
+ readonly [x: string]: readonly string[];
7586
+ };
7587
+ }, readonly [Schema.Struct<{
7588
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7589
+ readonly message: Schema.String;
7590
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7591
+ }>], {
7592
+ readonly _tag: "MalformedRequestError";
7593
+ readonly message: string;
7594
+ readonly fields: {
7595
+ readonly [x: string]: readonly string[];
7596
+ };
7597
+ }>, Schema.Struct<{
7598
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7599
+ readonly message: Schema.String;
7600
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6289
7601
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
6290
7602
  readonly _tag: "UnauthorizedError";
6291
7603
  readonly message: string;
@@ -6322,7 +7634,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6322
7634
  readonly id: Schema.brand<Schema.String, "TemplateId">;
6323
7635
  }>>, Schema.toCodecStringTree<Schema.Struct<{
6324
7636
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
6325
- readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7637
+ readonly cursor: Schema.optionalKey<Schema.String>;
6326
7638
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
6327
7639
  readonly items: Schema.$Array<Schema.Struct<{
6328
7640
  readonly id: Schema.brand<Schema.String, "TemplateInputContractId">;
@@ -6362,6 +7674,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6362
7674
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6363
7675
  readonly message: Schema.String;
6364
7676
  readonly retryAfterSeconds: Schema.Finite;
7677
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7678
+ readonly _tag: "MalformedRequestError";
7679
+ readonly message: string;
7680
+ readonly fields: {
7681
+ readonly [x: string]: readonly string[];
7682
+ };
7683
+ }, readonly [Schema.Struct<{
7684
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7685
+ readonly message: Schema.String;
7686
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7687
+ }>], {
7688
+ readonly _tag: "MalformedRequestError";
7689
+ readonly message: string;
7690
+ readonly fields: {
7691
+ readonly [x: string]: readonly string[];
7692
+ };
7693
+ }>, Schema.Struct<{
7694
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7695
+ readonly message: Schema.String;
7696
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6365
7697
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6366
7698
  readonly _tag: "ResourceNotFoundError";
6367
7699
  readonly resource: string;
@@ -6492,27 +7824,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6492
7824
  }>;
6493
7825
  }>;
6494
7826
  readonly files: Schema.$Record<Schema.String, Schema.String>;
6495
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
6496
- readonly _tag: "ConflictError";
6497
- readonly message: string;
6498
- readonly resource: string;
6499
- readonly id?: string | null;
6500
- }, readonly [Schema.Struct<{
6501
- readonly _tag: Schema.tag<"ConflictError">;
6502
- readonly message: Schema.String;
6503
- readonly resource: Schema.String;
6504
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6505
- }>], {
6506
- readonly _tag: "ConflictError";
6507
- readonly message: string;
6508
- readonly resource: string;
6509
- readonly id?: string | null;
6510
- }>, Schema.Struct<{
6511
- readonly _tag: Schema.tag<"ConflictError">;
6512
- readonly message: Schema.String;
6513
- readonly resource: Schema.String;
6514
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6515
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7827
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6516
7828
  readonly _tag: "ForbiddenError";
6517
7829
  readonly message: string;
6518
7830
  }, readonly [Schema.Struct<{
@@ -6540,6 +7852,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6540
7852
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6541
7853
  readonly message: Schema.String;
6542
7854
  readonly retryAfterSeconds: Schema.Finite;
7855
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
7856
+ readonly _tag: "MalformedRequestError";
7857
+ readonly message: string;
7858
+ readonly fields: {
7859
+ readonly [x: string]: readonly string[];
7860
+ };
7861
+ }, readonly [Schema.Struct<{
7862
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7863
+ readonly message: Schema.String;
7864
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7865
+ }>], {
7866
+ readonly _tag: "MalformedRequestError";
7867
+ readonly message: string;
7868
+ readonly fields: {
7869
+ readonly [x: string]: readonly string[];
7870
+ };
7871
+ }>, Schema.Struct<{
7872
+ readonly _tag: Schema.tag<"MalformedRequestError">;
7873
+ readonly message: Schema.String;
7874
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6543
7875
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6544
7876
  readonly _tag: "ResourceNotFoundError";
6545
7877
  readonly resource: string;
@@ -6674,27 +8006,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6674
8006
  }>;
6675
8007
  }>;
6676
8008
  readonly files: Schema.$Record<Schema.String, Schema.String>;
6677
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
6678
- readonly _tag: "ConflictError";
6679
- readonly message: string;
6680
- readonly resource: string;
6681
- readonly id?: string | null;
6682
- }, readonly [Schema.Struct<{
6683
- readonly _tag: Schema.tag<"ConflictError">;
6684
- readonly message: Schema.String;
6685
- readonly resource: Schema.String;
6686
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6687
- }>], {
6688
- readonly _tag: "ConflictError";
6689
- readonly message: string;
6690
- readonly resource: string;
6691
- readonly id?: string | null;
6692
- }>, Schema.Struct<{
6693
- readonly _tag: Schema.tag<"ConflictError">;
6694
- readonly message: Schema.String;
6695
- readonly resource: Schema.String;
6696
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6697
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8009
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6698
8010
  readonly _tag: "ForbiddenError";
6699
8011
  readonly message: string;
6700
8012
  }, readonly [Schema.Struct<{
@@ -6722,6 +8034,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6722
8034
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6723
8035
  readonly message: Schema.String;
6724
8036
  readonly retryAfterSeconds: Schema.Finite;
8037
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8038
+ readonly _tag: "MalformedRequestError";
8039
+ readonly message: string;
8040
+ readonly fields: {
8041
+ readonly [x: string]: readonly string[];
8042
+ };
8043
+ }, readonly [Schema.Struct<{
8044
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8045
+ readonly message: Schema.String;
8046
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8047
+ }>], {
8048
+ readonly _tag: "MalformedRequestError";
8049
+ readonly message: string;
8050
+ readonly fields: {
8051
+ readonly [x: string]: readonly string[];
8052
+ };
8053
+ }>, Schema.Struct<{
8054
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8055
+ readonly message: Schema.String;
8056
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6725
8057
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6726
8058
  readonly _tag: "ResourceNotFoundError";
6727
8059
  readonly resource: string;
@@ -6912,27 +8244,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6912
8244
  readonly publishedAt: Schema.String;
6913
8245
  readonly publishedBy: Schema.Union<readonly [Schema.String, Schema.Null]>;
6914
8246
  readonly createdAt: Schema.String;
6915
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
6916
- readonly _tag: "ConflictError";
6917
- readonly message: string;
6918
- readonly resource: string;
6919
- readonly id?: string | null;
6920
- }, readonly [Schema.Struct<{
6921
- readonly _tag: Schema.tag<"ConflictError">;
6922
- readonly message: Schema.String;
6923
- readonly resource: Schema.String;
6924
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6925
- }>], {
6926
- readonly _tag: "ConflictError";
6927
- readonly message: string;
6928
- readonly resource: string;
6929
- readonly id?: string | null;
6930
- }>, Schema.Struct<{
6931
- readonly _tag: Schema.tag<"ConflictError">;
6932
- readonly message: Schema.String;
6933
- readonly resource: Schema.String;
6934
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6935
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8247
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
6936
8248
  readonly _tag: "ForbiddenError";
6937
8249
  readonly message: string;
6938
8250
  }, readonly [Schema.Struct<{
@@ -6960,6 +8272,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6960
8272
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
6961
8273
  readonly message: Schema.String;
6962
8274
  readonly retryAfterSeconds: Schema.Finite;
8275
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8276
+ readonly _tag: "MalformedRequestError";
8277
+ readonly message: string;
8278
+ readonly fields: {
8279
+ readonly [x: string]: readonly string[];
8280
+ };
8281
+ }, readonly [Schema.Struct<{
8282
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8283
+ readonly message: Schema.String;
8284
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8285
+ }>], {
8286
+ readonly _tag: "MalformedRequestError";
8287
+ readonly message: string;
8288
+ readonly fields: {
8289
+ readonly [x: string]: readonly string[];
8290
+ };
8291
+ }>, Schema.Struct<{
8292
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8293
+ readonly message: Schema.String;
8294
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
6963
8295
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
6964
8296
  readonly _tag: "ResourceNotFoundError";
6965
8297
  readonly resource: string;
@@ -7093,27 +8425,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7093
8425
  }>;
7094
8426
  }>;
7095
8427
  readonly files: Schema.$Record<Schema.String, Schema.String>;
7096
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
7097
- readonly _tag: "ConflictError";
7098
- readonly message: string;
7099
- readonly resource: string;
7100
- readonly id?: string | null;
7101
- }, readonly [Schema.Struct<{
7102
- readonly _tag: Schema.tag<"ConflictError">;
7103
- readonly message: Schema.String;
7104
- readonly resource: Schema.String;
7105
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7106
- }>], {
7107
- readonly _tag: "ConflictError";
7108
- readonly message: string;
7109
- readonly resource: string;
7110
- readonly id?: string | null;
7111
- }>, Schema.Struct<{
7112
- readonly _tag: Schema.tag<"ConflictError">;
7113
- readonly message: Schema.String;
7114
- readonly resource: Schema.String;
7115
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7116
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8428
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7117
8429
  readonly _tag: "ForbiddenError";
7118
8430
  readonly message: string;
7119
8431
  }, readonly [Schema.Struct<{
@@ -7141,6 +8453,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7141
8453
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
7142
8454
  readonly message: Schema.String;
7143
8455
  readonly retryAfterSeconds: Schema.Finite;
8456
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8457
+ readonly _tag: "MalformedRequestError";
8458
+ readonly message: string;
8459
+ readonly fields: {
8460
+ readonly [x: string]: readonly string[];
8461
+ };
8462
+ }, readonly [Schema.Struct<{
8463
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8464
+ readonly message: Schema.String;
8465
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8466
+ }>], {
8467
+ readonly _tag: "MalformedRequestError";
8468
+ readonly message: string;
8469
+ readonly fields: {
8470
+ readonly [x: string]: readonly string[];
8471
+ };
8472
+ }>, Schema.Struct<{
8473
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8474
+ readonly message: Schema.String;
8475
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7144
8476
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7145
8477
  readonly _tag: "ResourceNotFoundError";
7146
8478
  readonly resource: string;
@@ -7181,98 +8513,14 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7181
8513
  readonly _tag: "UnauthorizedError";
7182
8514
  readonly message: string;
7183
8515
  }, readonly [Schema.Struct<{
7184
- readonly _tag: Schema.tag<"UnauthorizedError">;
7185
- readonly message: Schema.String;
7186
- }>], {
7187
- readonly _tag: "UnauthorizedError";
7188
- readonly message: string;
7189
- }>, Schema.Struct<{
7190
- readonly _tag: Schema.tag<"UnauthorizedError">;
7191
- readonly message: Schema.String;
7192
- }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesRemove", "DELETE", "/v1/templates/:id", Schema.toCodecStringTree<Schema.Struct<{
7193
- readonly id: Schema.brand<Schema.String, "TemplateId">;
7194
- }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
7195
- readonly success: Schema.Boolean;
7196
- }>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7197
- readonly _tag: "ForbiddenError";
7198
- readonly message: string;
7199
- }, readonly [Schema.Struct<{
7200
- readonly _tag: Schema.tag<"ForbiddenError">;
7201
- readonly message: Schema.String;
7202
- }>], {
7203
- readonly _tag: "ForbiddenError";
7204
- readonly message: string;
7205
- }>, Schema.Struct<{
7206
- readonly _tag: Schema.tag<"ForbiddenError">;
7207
- readonly message: Schema.String;
7208
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
7209
- readonly _tag: "GatewayTimeoutError";
7210
- readonly message: string;
7211
- readonly retryAfterSeconds: number;
7212
- }, readonly [Schema.Struct<{
7213
- readonly _tag: Schema.tag<"GatewayTimeoutError">;
7214
- readonly message: Schema.String;
7215
- readonly retryAfterSeconds: Schema.Finite;
7216
- }>], {
7217
- readonly _tag: "GatewayTimeoutError";
7218
- readonly message: string;
7219
- readonly retryAfterSeconds: number;
7220
- }>, Schema.Struct<{
7221
- readonly _tag: Schema.tag<"GatewayTimeoutError">;
7222
- readonly message: Schema.String;
7223
- readonly retryAfterSeconds: Schema.Finite;
7224
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7225
- readonly _tag: "ResourceNotFoundError";
7226
- readonly resource: string;
7227
- readonly id: string;
7228
- readonly message: string;
7229
- }, readonly [Schema.Struct<{
7230
- readonly _tag: Schema.tag<"ResourceNotFoundError">;
7231
- readonly resource: Schema.String;
7232
- readonly id: Schema.String;
7233
- readonly message: Schema.String;
7234
- }>], {
7235
- readonly _tag: "ResourceNotFoundError";
7236
- readonly resource: string;
7237
- readonly id: string;
7238
- readonly message: string;
7239
- }>, Schema.Struct<{
7240
- readonly _tag: Schema.tag<"ResourceNotFoundError">;
7241
- readonly resource: Schema.String;
7242
- readonly id: Schema.String;
7243
- readonly message: Schema.String;
7244
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
7245
- readonly _tag: "UnauthorizedError";
7246
- readonly message: string;
7247
- }, readonly [Schema.Struct<{
7248
- readonly _tag: Schema.tag<"UnauthorizedError">;
7249
- readonly message: Schema.String;
7250
- }>], {
7251
- readonly _tag: "UnauthorizedError";
7252
- readonly message: string;
7253
- }>, Schema.Struct<{
7254
- readonly _tag: Schema.tag<"UnauthorizedError">;
7255
- readonly message: Schema.String;
7256
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
7257
- readonly _tag: "ValidationError";
7258
- readonly message: string;
7259
- readonly fields?: {
7260
- readonly [x: string]: readonly string[];
7261
- } | null;
7262
- }, readonly [Schema.Struct<{
7263
- readonly _tag: Schema.tag<"ValidationError">;
8516
+ readonly _tag: Schema.tag<"UnauthorizedError">;
7264
8517
  readonly message: Schema.String;
7265
- readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
7266
8518
  }>], {
7267
- readonly _tag: "ValidationError";
8519
+ readonly _tag: "UnauthorizedError";
7268
8520
  readonly message: string;
7269
- readonly fields?: {
7270
- readonly [x: string]: readonly string[];
7271
- } | null;
7272
8521
  }>, Schema.Struct<{
7273
- readonly _tag: Schema.tag<"ValidationError">;
8522
+ readonly _tag: Schema.tag<"UnauthorizedError">;
7274
8523
  readonly message: Schema.String;
7275
- readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
7276
8524
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"templatesRemoveWorkspaceResource", "POST", "/v1/templates/:id/workspace/resources/:resourceId/remove", Schema.toCodecStringTree<Schema.Struct<{
7277
8525
  readonly id: Schema.brand<Schema.String, "TemplateId">;
7278
8526
  readonly resourceId: Schema.String;
@@ -7353,27 +8601,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7353
8601
  readonly userId: Schema.brand<Schema.String, "UserId">;
7354
8602
  readonly via: Schema.Union<readonly [Schema.Literal<"api">, Schema.Literal<"mcp">, Schema.Literal<"agent">]>;
7355
8603
  }>;
7356
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
7357
- readonly _tag: "ConflictError";
7358
- readonly message: string;
7359
- readonly resource: string;
7360
- readonly id?: string | null;
7361
- }, readonly [Schema.Struct<{
7362
- readonly _tag: Schema.tag<"ConflictError">;
7363
- readonly message: Schema.String;
7364
- readonly resource: Schema.String;
7365
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7366
- }>], {
7367
- readonly _tag: "ConflictError";
7368
- readonly message: string;
7369
- readonly resource: string;
7370
- readonly id?: string | null;
7371
- }>, Schema.Struct<{
7372
- readonly _tag: Schema.tag<"ConflictError">;
7373
- readonly message: Schema.String;
7374
- readonly resource: Schema.String;
7375
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7376
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8604
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7377
8605
  readonly _tag: "ForbiddenError";
7378
8606
  readonly message: string;
7379
8607
  }, readonly [Schema.Struct<{
@@ -7401,6 +8629,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7401
8629
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
7402
8630
  readonly message: Schema.String;
7403
8631
  readonly retryAfterSeconds: Schema.Finite;
8632
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8633
+ readonly _tag: "MalformedRequestError";
8634
+ readonly message: string;
8635
+ readonly fields: {
8636
+ readonly [x: string]: readonly string[];
8637
+ };
8638
+ }, readonly [Schema.Struct<{
8639
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8640
+ readonly message: Schema.String;
8641
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8642
+ }>], {
8643
+ readonly _tag: "MalformedRequestError";
8644
+ readonly message: string;
8645
+ readonly fields: {
8646
+ readonly [x: string]: readonly string[];
8647
+ };
8648
+ }>, Schema.Struct<{
8649
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8650
+ readonly message: Schema.String;
8651
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7404
8652
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7405
8653
  readonly _tag: "ResourceNotFoundError";
7406
8654
  readonly resource: string;
@@ -7460,9 +8708,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7460
8708
  readonly id: Schema.brand<Schema.String, "TemplateId">;
7461
8709
  readonly name: Schema.String;
7462
8710
  readonly slug: Schema.String;
7463
- readonly channel: Schema.Literal<"email">;
8711
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
7464
8712
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
7465
- readonly isActive: Schema.Boolean;
7466
8713
  readonly createdAt: Schema.String;
7467
8714
  readonly updatedAt: Schema.String;
7468
8715
  }>>;
@@ -7496,6 +8743,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7496
8743
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
7497
8744
  readonly message: Schema.String;
7498
8745
  readonly retryAfterSeconds: Schema.Finite;
8746
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8747
+ readonly _tag: "MalformedRequestError";
8748
+ readonly message: string;
8749
+ readonly fields: {
8750
+ readonly [x: string]: readonly string[];
8751
+ };
8752
+ }, readonly [Schema.Struct<{
8753
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8754
+ readonly message: Schema.String;
8755
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8756
+ }>], {
8757
+ readonly _tag: "MalformedRequestError";
8758
+ readonly message: string;
8759
+ readonly fields: {
8760
+ readonly [x: string]: readonly string[];
8761
+ };
8762
+ }>, Schema.Struct<{
8763
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8764
+ readonly message: Schema.String;
8765
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7499
8766
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7500
8767
  readonly _tag: "ResourceNotFoundError";
7501
8768
  readonly resource: string;
@@ -7608,6 +8875,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7608
8875
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
7609
8876
  readonly message: Schema.String;
7610
8877
  readonly retryAfterSeconds: Schema.Finite;
8878
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
8879
+ readonly _tag: "MalformedRequestError";
8880
+ readonly message: string;
8881
+ readonly fields: {
8882
+ readonly [x: string]: readonly string[];
8883
+ };
8884
+ }, readonly [Schema.Struct<{
8885
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8886
+ readonly message: Schema.String;
8887
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8888
+ }>], {
8889
+ readonly _tag: "MalformedRequestError";
8890
+ readonly message: string;
8891
+ readonly fields: {
8892
+ readonly [x: string]: readonly string[];
8893
+ };
8894
+ }>, Schema.Struct<{
8895
+ readonly _tag: Schema.tag<"MalformedRequestError">;
8896
+ readonly message: Schema.String;
8897
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7611
8898
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7612
8899
  readonly _tag: "ResourceNotFoundError";
7613
8900
  readonly resource: string;
@@ -7767,6 +9054,37 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7767
9054
  readonly sentBytes: Schema.Finite;
7768
9055
  readonly previewBytes: Schema.Finite;
7769
9056
  }>, Schema.Null]>;
9057
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
9058
+ readonly language: Schema.String;
9059
+ readonly category: Schema.String;
9060
+ readonly header: Schema.optionalKey<Schema.Struct<{
9061
+ readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"image">, Schema.Literal<"video">, Schema.Literal<"document">]>;
9062
+ readonly text: Schema.String;
9063
+ }>>;
9064
+ readonly body: Schema.String;
9065
+ readonly footer: Schema.optionalKey<Schema.String>;
9066
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
9067
+ readonly type: Schema.Literal<"quick-reply">;
9068
+ readonly text: Schema.String;
9069
+ }>, Schema.Struct<{
9070
+ readonly type: Schema.Literal<"url">;
9071
+ readonly text: Schema.String;
9072
+ readonly url: Schema.String;
9073
+ }>, Schema.Struct<{
9074
+ readonly type: Schema.Literal<"phone">;
9075
+ readonly text: Schema.String;
9076
+ readonly phone: Schema.String;
9077
+ }>, Schema.Struct<{
9078
+ readonly type: Schema.Literal<"copy-code">;
9079
+ readonly code: Schema.String;
9080
+ }>, Schema.Struct<{
9081
+ readonly type: Schema.Literal<"flow">;
9082
+ readonly text: Schema.String;
9083
+ readonly flow: Schema.String;
9084
+ readonly action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
9085
+ readonly screen: Schema.optionalKey<Schema.String>;
9086
+ }>]>>;
9087
+ }>, Schema.Null]>;
7770
9088
  readonly page: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
7771
9089
  readonly kind: Schema.Literal<"page">;
7772
9090
  readonly html: Schema.String;
@@ -7786,27 +9104,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7786
9104
  readonly end: Schema.Finite;
7787
9105
  }>>;
7788
9106
  }>, Schema.Null]>>;
7789
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
7790
- readonly _tag: "ConflictError";
7791
- readonly message: string;
7792
- readonly resource: string;
7793
- readonly id?: string | null;
7794
- }, readonly [Schema.Struct<{
7795
- readonly _tag: Schema.tag<"ConflictError">;
7796
- readonly message: Schema.String;
7797
- readonly resource: Schema.String;
7798
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7799
- }>], {
7800
- readonly _tag: "ConflictError";
7801
- readonly message: string;
7802
- readonly resource: string;
7803
- readonly id?: string | null;
7804
- }>, Schema.Struct<{
7805
- readonly _tag: Schema.tag<"ConflictError">;
7806
- readonly message: Schema.String;
7807
- readonly resource: Schema.String;
7808
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7809
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
9107
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7810
9108
  readonly _tag: "ForbiddenError";
7811
9109
  readonly message: string;
7812
9110
  }, readonly [Schema.Struct<{
@@ -7834,6 +9132,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7834
9132
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
7835
9133
  readonly message: Schema.String;
7836
9134
  readonly retryAfterSeconds: Schema.Finite;
9135
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
9136
+ readonly _tag: "MalformedRequestError";
9137
+ readonly message: string;
9138
+ readonly fields: {
9139
+ readonly [x: string]: readonly string[];
9140
+ };
9141
+ }, readonly [Schema.Struct<{
9142
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9143
+ readonly message: Schema.String;
9144
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
9145
+ }>], {
9146
+ readonly _tag: "MalformedRequestError";
9147
+ readonly message: string;
9148
+ readonly fields: {
9149
+ readonly [x: string]: readonly string[];
9150
+ };
9151
+ }>, Schema.Struct<{
9152
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9153
+ readonly message: Schema.String;
9154
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
7837
9155
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
7838
9156
  readonly _tag: "ResourceNotFoundError";
7839
9157
  readonly resource: string;
@@ -7968,27 +9286,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7968
9286
  }>;
7969
9287
  }>;
7970
9288
  readonly files: Schema.$Record<Schema.String, Schema.String>;
7971
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
7972
- readonly _tag: "ConflictError";
7973
- readonly message: string;
7974
- readonly resource: string;
7975
- readonly id?: string | null;
7976
- }, readonly [Schema.Struct<{
7977
- readonly _tag: Schema.tag<"ConflictError">;
7978
- readonly message: Schema.String;
7979
- readonly resource: Schema.String;
7980
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7981
- }>], {
7982
- readonly _tag: "ConflictError";
7983
- readonly message: string;
7984
- readonly resource: string;
7985
- readonly id?: string | null;
7986
- }>, Schema.Struct<{
7987
- readonly _tag: Schema.tag<"ConflictError">;
7988
- readonly message: Schema.String;
7989
- readonly resource: Schema.String;
7990
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
7991
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
9289
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
7992
9290
  readonly _tag: "ForbiddenError";
7993
9291
  readonly message: string;
7994
9292
  }, readonly [Schema.Struct<{
@@ -8016,6 +9314,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8016
9314
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
8017
9315
  readonly message: Schema.String;
8018
9316
  readonly retryAfterSeconds: Schema.Finite;
9317
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
9318
+ readonly _tag: "MalformedRequestError";
9319
+ readonly message: string;
9320
+ readonly fields: {
9321
+ readonly [x: string]: readonly string[];
9322
+ };
9323
+ }, readonly [Schema.Struct<{
9324
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9325
+ readonly message: Schema.String;
9326
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
9327
+ }>], {
9328
+ readonly _tag: "MalformedRequestError";
9329
+ readonly message: string;
9330
+ readonly fields: {
9331
+ readonly [x: string]: readonly string[];
9332
+ };
9333
+ }>, Schema.Struct<{
9334
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9335
+ readonly message: Schema.String;
9336
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8019
9337
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
8020
9338
  readonly _tag: "ResourceNotFoundError";
8021
9339
  readonly resource: string;
@@ -8153,27 +9471,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8153
9471
  readonly digest: Schema.String;
8154
9472
  readonly content: Schema.String;
8155
9473
  }>;
8156
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
8157
- readonly _tag: "ConflictError";
8158
- readonly message: string;
8159
- readonly resource: string;
8160
- readonly id?: string | null;
8161
- }, readonly [Schema.Struct<{
8162
- readonly _tag: Schema.tag<"ConflictError">;
8163
- readonly message: Schema.String;
8164
- readonly resource: Schema.String;
8165
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8166
- }>], {
8167
- readonly _tag: "ConflictError";
8168
- readonly message: string;
8169
- readonly resource: string;
8170
- readonly id?: string | null;
8171
- }>, Schema.Struct<{
8172
- readonly _tag: Schema.tag<"ConflictError">;
8173
- readonly message: Schema.String;
8174
- readonly resource: Schema.String;
8175
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8176
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
9474
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8177
9475
  readonly _tag: "ForbiddenError";
8178
9476
  readonly message: string;
8179
9477
  }, readonly [Schema.Struct<{
@@ -8201,6 +9499,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8201
9499
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
8202
9500
  readonly message: Schema.String;
8203
9501
  readonly retryAfterSeconds: Schema.Finite;
9502
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
9503
+ readonly _tag: "MalformedRequestError";
9504
+ readonly message: string;
9505
+ readonly fields: {
9506
+ readonly [x: string]: readonly string[];
9507
+ };
9508
+ }, readonly [Schema.Struct<{
9509
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9510
+ readonly message: Schema.String;
9511
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
9512
+ }>], {
9513
+ readonly _tag: "MalformedRequestError";
9514
+ readonly message: string;
9515
+ readonly fields: {
9516
+ readonly [x: string]: readonly string[];
9517
+ };
9518
+ }>, Schema.Struct<{
9519
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9520
+ readonly message: Schema.String;
9521
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8204
9522
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
8205
9523
  readonly _tag: "ResourceNotFoundError";
8206
9524
  readonly resource: string;
@@ -8311,27 +9629,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8311
9629
  readonly title: Schema.String;
8312
9630
  }>, Schema.Null]>>;
8313
9631
  }>>;
8314
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
8315
- readonly _tag: "ConflictError";
8316
- readonly message: string;
8317
- readonly resource: string;
8318
- readonly id?: string | null;
8319
- }, readonly [Schema.Struct<{
8320
- readonly _tag: Schema.tag<"ConflictError">;
8321
- readonly message: Schema.String;
8322
- readonly resource: Schema.String;
8323
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8324
- }>], {
8325
- readonly _tag: "ConflictError";
8326
- readonly message: string;
8327
- readonly resource: string;
8328
- readonly id?: string | null;
8329
- }>, Schema.Struct<{
8330
- readonly _tag: Schema.tag<"ConflictError">;
8331
- readonly message: Schema.String;
8332
- readonly resource: Schema.String;
8333
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8334
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
9632
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8335
9633
  readonly _tag: "ForbiddenError";
8336
9634
  readonly message: string;
8337
9635
  }, readonly [Schema.Struct<{
@@ -8359,6 +9657,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8359
9657
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
8360
9658
  readonly message: Schema.String;
8361
9659
  readonly retryAfterSeconds: Schema.Finite;
9660
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
9661
+ readonly _tag: "MalformedRequestError";
9662
+ readonly message: string;
9663
+ readonly fields: {
9664
+ readonly [x: string]: readonly string[];
9665
+ };
9666
+ }, readonly [Schema.Struct<{
9667
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9668
+ readonly message: Schema.String;
9669
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
9670
+ }>], {
9671
+ readonly _tag: "MalformedRequestError";
9672
+ readonly message: string;
9673
+ readonly fields: {
9674
+ readonly [x: string]: readonly string[];
9675
+ };
9676
+ }>, Schema.Struct<{
9677
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9678
+ readonly message: Schema.String;
9679
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8362
9680
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
8363
9681
  readonly _tag: "ResourceNotFoundError";
8364
9682
  readonly resource: string;
@@ -8425,20 +9743,18 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8425
9743
  readonly opens: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
8426
9744
  readonly clicks: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
8427
9745
  }>, Schema.Null]>>;
8428
- readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
8429
9746
  readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
8430
9747
  }>;
8431
9748
  }>>, never, Schema.toCodecJson<Schema.Struct<{
8432
9749
  readonly id: Schema.brand<Schema.String, "TemplateId">;
8433
9750
  readonly slug: Schema.String;
8434
9751
  readonly name: Schema.String;
8435
- readonly channel: Schema.Literal<"email">;
9752
+ readonly channel: Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>;
8436
9753
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
8437
9754
  readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
8438
9755
  readonly shared: Schema.Boolean;
8439
9756
  readonly entryPath: Schema.String;
8440
9757
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
8441
- readonly isActive: Schema.Boolean;
8442
9758
  readonly publishedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
8443
9759
  readonly brand: Schema.Union<readonly [Schema.Struct<{
8444
9760
  readonly slug: Schema.String;
@@ -8466,6 +9782,58 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8466
9782
  readonly preheader: Schema.Union<readonly [Schema.String, Schema.Null]>;
8467
9783
  readonly headers: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>;
8468
9784
  }>, Schema.Null]>;
9785
+ readonly sms: Schema.Union<readonly [Schema.Struct<{
9786
+ readonly body: Schema.String;
9787
+ readonly encoding: Schema.Union<readonly [Schema.String, Schema.Null]>;
9788
+ readonly estimatedSegments: Schema.Union<readonly [Schema.Finite, Schema.Null]>;
9789
+ readonly category: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"promotional">, Schema.Literal<"service_implicit">]>, Schema.Null]>;
9790
+ }>, Schema.Null]>;
9791
+ readonly whatsapp: Schema.Union<readonly [Schema.Struct<{
9792
+ readonly name: Schema.String;
9793
+ readonly language: Schema.String;
9794
+ readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">]>;
9795
+ readonly components: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
9796
+ readonly type: Schema.Literal<"HEADER">;
9797
+ readonly format: Schema.Literal<"TEXT">;
9798
+ readonly text: Schema.String;
9799
+ readonly example: Schema.optionalKey<Schema.Struct<{
9800
+ readonly header_text: Schema.$Array<Schema.String>;
9801
+ }>>;
9802
+ }>, Schema.Struct<{
9803
+ readonly type: Schema.Literal<"BODY">;
9804
+ readonly text: Schema.String;
9805
+ readonly example: Schema.optionalKey<Schema.Struct<{
9806
+ readonly body_text: Schema.$Array<Schema.$Array<Schema.String>>;
9807
+ }>>;
9808
+ }>, Schema.Struct<{
9809
+ readonly type: Schema.Literal<"FOOTER">;
9810
+ readonly text: Schema.String;
9811
+ }>, Schema.Struct<{
9812
+ readonly type: Schema.Literal<"BUTTONS">;
9813
+ readonly buttons: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
9814
+ readonly type: Schema.Literal<"QUICK_REPLY">;
9815
+ readonly text: Schema.String;
9816
+ }>, Schema.Struct<{
9817
+ readonly type: Schema.Literal<"URL">;
9818
+ readonly text: Schema.String;
9819
+ readonly url: Schema.String;
9820
+ readonly example: Schema.optionalKey<Schema.$Array<Schema.String>>;
9821
+ }>, Schema.Struct<{
9822
+ readonly type: Schema.Literal<"PHONE_NUMBER">;
9823
+ readonly text: Schema.String;
9824
+ readonly phone_number: Schema.String;
9825
+ }>, Schema.Struct<{
9826
+ readonly type: Schema.Literal<"COPY_CODE">;
9827
+ readonly example: Schema.String;
9828
+ }>, Schema.Struct<{
9829
+ readonly type: Schema.Literal<"FLOW">;
9830
+ readonly text: Schema.String;
9831
+ readonly flow: Schema.String;
9832
+ readonly flow_action: Schema.Union<readonly [Schema.Literal<"navigate">, Schema.Literal<"data_exchange">]>;
9833
+ readonly navigate_screen: Schema.optionalKey<Schema.String>;
9834
+ }>]>>;
9835
+ }>]>>;
9836
+ }>, Schema.Null]>;
8469
9837
  readonly publicationId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplatePublicationId">, Schema.Null]>;
8470
9838
  readonly inputContractId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateInputContractId">, Schema.Null]>;
8471
9839
  readonly inputSchema: Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>;
@@ -8517,6 +9885,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8517
9885
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
8518
9886
  readonly message: Schema.String;
8519
9887
  readonly retryAfterSeconds: Schema.Finite;
9888
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
9889
+ readonly _tag: "MalformedRequestError";
9890
+ readonly message: string;
9891
+ readonly fields: {
9892
+ readonly [x: string]: readonly string[];
9893
+ };
9894
+ }, readonly [Schema.Struct<{
9895
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9896
+ readonly message: Schema.String;
9897
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
9898
+ }>], {
9899
+ readonly _tag: "MalformedRequestError";
9900
+ readonly message: string;
9901
+ readonly fields: {
9902
+ readonly [x: string]: readonly string[];
9903
+ };
9904
+ }>, Schema.Struct<{
9905
+ readonly _tag: Schema.tag<"MalformedRequestError">;
9906
+ readonly message: Schema.String;
9907
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8520
9908
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
8521
9909
  readonly _tag: "ResourceNotFoundError";
8522
9910
  readonly resource: string;
@@ -8587,27 +9975,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8587
9975
  readonly id: Schema.brand<Schema.String, "TemplatePublicationId">;
8588
9976
  readonly commit: Schema.String;
8589
9977
  }>, Schema.Null]>;
8590
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
8591
- readonly _tag: "ConflictError";
8592
- readonly message: string;
8593
- readonly resource: string;
8594
- readonly id?: string | null;
8595
- }, readonly [Schema.Struct<{
8596
- readonly _tag: Schema.tag<"ConflictError">;
8597
- readonly message: Schema.String;
8598
- readonly resource: Schema.String;
8599
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8600
- }>], {
8601
- readonly _tag: "ConflictError";
8602
- readonly message: string;
8603
- readonly resource: string;
8604
- readonly id?: string | null;
8605
- }>, Schema.Struct<{
8606
- readonly _tag: Schema.tag<"ConflictError">;
8607
- readonly message: Schema.String;
8608
- readonly resource: Schema.String;
8609
- readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
8610
- }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
9978
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ConflictError, typeof TemplateInUseError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
8611
9979
  readonly _tag: "ForbiddenError";
8612
9980
  readonly message: string;
8613
9981
  }, readonly [Schema.Struct<{
@@ -8635,6 +10003,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
8635
10003
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
8636
10004
  readonly message: Schema.String;
8637
10005
  readonly retryAfterSeconds: Schema.Finite;
10006
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
10007
+ readonly _tag: "MalformedRequestError";
10008
+ readonly message: string;
10009
+ readonly fields: {
10010
+ readonly [x: string]: readonly string[];
10011
+ };
10012
+ }, readonly [Schema.Struct<{
10013
+ readonly _tag: Schema.tag<"MalformedRequestError">;
10014
+ readonly message: Schema.String;
10015
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
10016
+ }>], {
10017
+ readonly _tag: "MalformedRequestError";
10018
+ readonly message: string;
10019
+ readonly fields: {
10020
+ readonly [x: string]: readonly string[];
10021
+ };
10022
+ }>, Schema.Struct<{
10023
+ readonly _tag: Schema.tag<"MalformedRequestError">;
10024
+ readonly message: Schema.String;
10025
+ readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
8638
10026
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
8639
10027
  readonly _tag: "ResourceNotFoundError";
8640
10028
  readonly resource: string;