@hermeticacomms/sdk-node 0.0.0-stage → 0.4.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 (73) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +12 -2
  3. package/dist/contracts/analytics.d.ts +405 -0
  4. package/dist/contracts/analytics.js +77 -0
  5. package/dist/contracts/auth.d.ts +363 -0
  6. package/dist/contracts/auth.js +130 -0
  7. package/dist/contracts/billing.d.ts +143 -0
  8. package/dist/contracts/billing.js +32 -0
  9. package/dist/contracts/campaigns.d.ts +915 -0
  10. package/dist/contracts/campaigns.js +276 -0
  11. package/dist/contracts/common.d.ts +57 -0
  12. package/dist/contracts/common.js +35 -0
  13. package/dist/contracts/connectors.d.ts +179 -0
  14. package/dist/contracts/connectors.js +46 -0
  15. package/dist/contracts/consent.d.ts +628 -0
  16. package/dist/contracts/consent.js +194 -0
  17. package/dist/contracts/content-blocks.d.ts +165 -0
  18. package/dist/contracts/content-blocks.js +62 -0
  19. package/dist/contracts/content-library.d.ts +347 -0
  20. package/dist/contracts/content-library.js +52 -0
  21. package/dist/contracts/content.d.ts +955 -0
  22. package/dist/contracts/content.js +194 -0
  23. package/dist/contracts/delivery.d.ts +602 -0
  24. package/dist/contracts/delivery.js +220 -0
  25. package/dist/contracts/events.d.ts +514 -0
  26. package/dist/contracts/events.js +180 -0
  27. package/dist/contracts/experiments.d.ts +378 -0
  28. package/dist/contracts/experiments.js +140 -0
  29. package/dist/contracts/identity.d.ts +761 -0
  30. package/dist/contracts/identity.js +226 -0
  31. package/dist/contracts/index.d.ts +15 -0
  32. package/dist/contracts/index.js +15 -0
  33. package/dist/contracts/integrations.d.ts +445 -0
  34. package/dist/contracts/integrations.js +139 -0
  35. package/dist/contracts/leads.d.ts +733 -0
  36. package/dist/contracts/leads.js +125 -0
  37. package/dist/contracts/metrics.d.ts +465 -0
  38. package/dist/contracts/metrics.js +96 -0
  39. package/dist/contracts/outbound.d.ts +15535 -0
  40. package/dist/contracts/outbound.js +432 -0
  41. package/dist/contracts/pickers.d.ts +12 -0
  42. package/dist/contracts/pickers.js +20 -0
  43. package/dist/contracts/platform-admin.d.ts +244 -0
  44. package/dist/contracts/platform-admin.js +98 -0
  45. package/dist/contracts/postcards.d.ts +79 -0
  46. package/dist/contracts/postcards.js +29 -0
  47. package/dist/contracts/push.d.ts +530 -0
  48. package/dist/contracts/push.js +102 -0
  49. package/dist/contracts/rcs.d.ts +39 -0
  50. package/dist/contracts/rcs.js +19 -0
  51. package/dist/contracts/segments.d.ts +3187 -0
  52. package/dist/contracts/segments.js +421 -0
  53. package/dist/contracts/workflow-nodes.d.ts +2130 -0
  54. package/dist/contracts/workflow-nodes.js +346 -0
  55. package/dist/contracts/workflows.d.ts +46811 -0
  56. package/dist/contracts/workflows.js +350 -0
  57. package/dist/contracts/x10-platform.d.ts +2603 -0
  58. package/dist/contracts/x10-platform.js +129 -0
  59. package/dist/http.d.ts +30 -0
  60. package/dist/http.js +65 -0
  61. package/dist/index.d.ts +11631 -0
  62. package/dist/index.js +63 -0
  63. package/dist/platform.d.ts +163 -0
  64. package/dist/platform.js +40 -0
  65. package/dist/resources.d.ts +1338 -0
  66. package/dist/resources.js +56 -0
  67. package/dist/signature.d.ts +5 -0
  68. package/dist/signature.js +19 -0
  69. package/dist/x10.d.ts +1608 -0
  70. package/dist/x10.js +66 -0
  71. package/dist/z10.d.ts +256 -0
  72. package/dist/z10.js +46 -0
  73. package/package.json +40 -4
@@ -0,0 +1,347 @@
1
+ import { z } from 'zod';
2
+ import { Block } from './content-blocks.ts';
3
+ export declare const LintIssue: z.ZodObject<{
4
+ code: z.ZodString;
5
+ message: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const LintResult: z.ZodObject<{
8
+ errors: z.ZodArray<z.ZodObject<{
9
+ code: z.ZodString;
10
+ message: z.ZodString;
11
+ }, z.core.$strip>>;
12
+ warnings: z.ZodArray<z.ZodObject<{
13
+ code: z.ZodString;
14
+ message: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>;
17
+ export type LintResult = z.infer<typeof LintResult>;
18
+ export declare const ReviewBody: z.ZodObject<{
19
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ }, z.core.$strip>;
21
+ /** Why this version is transactional although it contains offer wording; kept in the audit log. */
22
+ export declare const TransactionalReviewBody: z.ZodObject<{
23
+ note: z.ZodString;
24
+ }, z.core.$strip>;
25
+ export declare const CloneTemplateBody: z.ZodObject<{
26
+ name: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ export declare const UploadTypeGroup: z.ZodEnum<{
29
+ archive: "archive";
30
+ audio: "audio";
31
+ document: "document";
32
+ image: "image";
33
+ pdf: "pdf";
34
+ text: "text";
35
+ video: "video";
36
+ }>;
37
+ export declare const AssetAccess: z.ZodEnum<{
38
+ private: "private";
39
+ public_indexable: "public_indexable";
40
+ public_not_indexable: "public_not_indexable";
41
+ }>;
42
+ export declare const ContentSettingsDto: z.ZodObject<{
43
+ approvalRequired: z.ZodBoolean;
44
+ campaignApprovalRequired: z.ZodDefault<z.ZodBoolean>;
45
+ transactionalPromo: z.ZodDefault<z.ZodEnum<{
46
+ block: "block";
47
+ warn: "warn";
48
+ }>>;
49
+ uploadTypes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
50
+ archive: "archive";
51
+ audio: "audio";
52
+ document: "document";
53
+ image: "image";
54
+ pdf: "pdf";
55
+ text: "text";
56
+ video: "video";
57
+ }>>>;
58
+ defaultAssetAccess: z.ZodDefault<z.ZodEnum<{
59
+ private: "private";
60
+ public_indexable: "public_indexable";
61
+ public_not_indexable: "public_not_indexable";
62
+ }>>;
63
+ }, z.core.$strip>;
64
+ export declare const ContentSettingsPatch: z.ZodObject<{
65
+ approvalRequired: z.ZodOptional<z.ZodBoolean>;
66
+ campaignApprovalRequired: z.ZodOptional<z.ZodBoolean>;
67
+ transactionalPromo: z.ZodOptional<z.ZodEnum<{
68
+ block: "block";
69
+ warn: "warn";
70
+ }>>;
71
+ uploadTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
72
+ archive: "archive";
73
+ audio: "audio";
74
+ document: "document";
75
+ image: "image";
76
+ pdf: "pdf";
77
+ text: "text";
78
+ video: "video";
79
+ }>>>;
80
+ defaultAssetAccess: z.ZodOptional<z.ZodEnum<{
81
+ private: "private";
82
+ public_indexable: "public_indexable";
83
+ public_not_indexable: "public_not_indexable";
84
+ }>>;
85
+ }, z.core.$strip>;
86
+ export declare const AssetDto: z.ZodObject<{
87
+ id: z.ZodUUID;
88
+ filename: z.ZodString;
89
+ contentType: z.ZodString;
90
+ bytes: z.ZodNumber;
91
+ width: z.ZodNumber;
92
+ height: z.ZodNumber;
93
+ url: z.ZodString;
94
+ thumbUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
95
+ altText: z.ZodNullable<z.ZodString>;
96
+ folderId: z.ZodNullable<z.ZodUUID>;
97
+ language: z.ZodNullable<z.ZodString>;
98
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
99
+ scanStatus: z.ZodDefault<z.ZodEnum<{
100
+ clean: "clean";
101
+ error: "error";
102
+ infected: "infected";
103
+ pending: "pending";
104
+ quarantined: "quarantined";
105
+ unscanned: "unscanned";
106
+ }>>;
107
+ access: z.ZodDefault<z.ZodEnum<{
108
+ private: "private";
109
+ public_indexable: "public_indexable";
110
+ public_not_indexable: "public_not_indexable";
111
+ }>>;
112
+ createdAt: z.ZodISODateTime;
113
+ }, z.core.$strip>;
114
+ export declare const FolderDto: z.ZodObject<{
115
+ id: z.ZodUUID;
116
+ kind: z.ZodEnum<{
117
+ asset: "asset";
118
+ template: "template";
119
+ }>;
120
+ name: z.ZodString;
121
+ parentId: z.ZodNullable<z.ZodUUID>;
122
+ itemCount: z.ZodNumber;
123
+ createdAt: z.ZodISODateTime;
124
+ }, z.core.$strip>;
125
+ export declare const FolderInput: z.ZodObject<{
126
+ name: z.ZodString;
127
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
128
+ }, z.core.$strip>;
129
+ export declare const UpdateFolderBody: z.ZodObject<{
130
+ name: z.ZodOptional<z.ZodString>;
131
+ parentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
132
+ }, z.core.$strip>;
133
+ export declare const UpdateAssetBody: z.ZodObject<{
134
+ filename: z.ZodOptional<z.ZodString>;
135
+ altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
137
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
+ access: z.ZodOptional<z.ZodEnum<{
140
+ private: "private";
141
+ public_indexable: "public_indexable";
142
+ public_not_indexable: "public_not_indexable";
143
+ }>>;
144
+ }, z.core.$strip>;
145
+ export declare const ImportAssetBody: z.ZodObject<{
146
+ url: z.ZodURL;
147
+ filename: z.ZodOptional<z.ZodString>;
148
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
149
+ }, z.core.$strip>;
150
+ export declare const ListAssetsQuery: z.ZodObject<{
151
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
152
+ cursor: z.ZodOptional<z.ZodUUID>;
153
+ q: z.ZodOptional<z.ZodString>;
154
+ folderId: z.ZodOptional<z.ZodUUID>;
155
+ tag: z.ZodOptional<z.ZodString>;
156
+ language: z.ZodOptional<z.ZodString>;
157
+ type: z.ZodOptional<z.ZodEnum<{
158
+ archive: "archive";
159
+ audio: "audio";
160
+ document: "document";
161
+ image: "image";
162
+ pdf: "pdf";
163
+ text: "text";
164
+ video: "video";
165
+ }>>;
166
+ access: z.ZodOptional<z.ZodEnum<{
167
+ private: "private";
168
+ public_indexable: "public_indexable";
169
+ public_not_indexable: "public_not_indexable";
170
+ }>>;
171
+ after: z.ZodOptional<z.ZodISODateTime>;
172
+ before: z.ZodOptional<z.ZodISODateTime>;
173
+ }, z.core.$strip>;
174
+ export declare const AssetPage: z.ZodObject<{
175
+ items: z.ZodArray<z.ZodObject<{
176
+ id: z.ZodUUID;
177
+ filename: z.ZodString;
178
+ contentType: z.ZodString;
179
+ bytes: z.ZodNumber;
180
+ width: z.ZodNumber;
181
+ height: z.ZodNumber;
182
+ url: z.ZodString;
183
+ thumbUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
184
+ altText: z.ZodNullable<z.ZodString>;
185
+ folderId: z.ZodNullable<z.ZodUUID>;
186
+ language: z.ZodNullable<z.ZodString>;
187
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
188
+ scanStatus: z.ZodDefault<z.ZodEnum<{
189
+ clean: "clean";
190
+ error: "error";
191
+ infected: "infected";
192
+ pending: "pending";
193
+ quarantined: "quarantined";
194
+ unscanned: "unscanned";
195
+ }>>;
196
+ access: z.ZodDefault<z.ZodEnum<{
197
+ private: "private";
198
+ public_indexable: "public_indexable";
199
+ public_not_indexable: "public_not_indexable";
200
+ }>>;
201
+ createdAt: z.ZodISODateTime;
202
+ }, z.core.$strip>>;
203
+ nextCursor: z.ZodNullable<z.ZodUUID>;
204
+ }, z.core.$strip>;
205
+ export declare const TrackingDomainInput: z.ZodObject<{
206
+ domain: z.ZodString;
207
+ }, z.core.$strip>;
208
+ export declare const TrackingDomainDto: z.ZodObject<{
209
+ id: z.ZodUUID;
210
+ domain: z.ZodString;
211
+ status: z.ZodEnum<{
212
+ failed: "failed";
213
+ pending: "pending";
214
+ verified: "verified";
215
+ }>;
216
+ cnameTarget: z.ZodString;
217
+ verifiedAt: z.ZodNullable<z.ZodISODateTime>;
218
+ lastCheckedAt: z.ZodNullable<z.ZodISODateTime>;
219
+ lastError: z.ZodNullable<z.ZodString>;
220
+ createdAt: z.ZodISODateTime;
221
+ certStatus: z.ZodEnum<{
222
+ failed: "failed";
223
+ issued: "issued";
224
+ pending: "pending";
225
+ }>;
226
+ certCheckedAt: z.ZodNullable<z.ZodISODateTime>;
227
+ certError: z.ZodNullable<z.ZodString>;
228
+ certExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
229
+ }, z.core.$strip>;
230
+ export declare const TrackingDomainPage: z.ZodObject<{
231
+ items: z.ZodArray<z.ZodObject<{
232
+ id: z.ZodUUID;
233
+ domain: z.ZodString;
234
+ status: z.ZodEnum<{
235
+ failed: "failed";
236
+ pending: "pending";
237
+ verified: "verified";
238
+ }>;
239
+ cnameTarget: z.ZodString;
240
+ verifiedAt: z.ZodNullable<z.ZodISODateTime>;
241
+ lastCheckedAt: z.ZodNullable<z.ZodISODateTime>;
242
+ lastError: z.ZodNullable<z.ZodString>;
243
+ createdAt: z.ZodISODateTime;
244
+ certStatus: z.ZodEnum<{
245
+ failed: "failed";
246
+ issued: "issued";
247
+ pending: "pending";
248
+ }>;
249
+ certCheckedAt: z.ZodNullable<z.ZodISODateTime>;
250
+ certError: z.ZodNullable<z.ZodString>;
251
+ certExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
252
+ }, z.core.$strip>>;
253
+ nextCursor: z.ZodNullable<z.ZodUUID>;
254
+ }, z.core.$strip>;
255
+ export declare const LinkCheckDto: z.ZodObject<{
256
+ url: z.ZodString;
257
+ status: z.ZodNullable<z.ZodNumber>;
258
+ error: z.ZodNullable<z.ZodString>;
259
+ checkedAt: z.ZodISODateTime;
260
+ }, z.core.$strip>;
261
+ export declare const LinkCheckResult: z.ZodObject<{
262
+ pending: z.ZodBoolean;
263
+ items: z.ZodArray<z.ZodObject<{
264
+ url: z.ZodString;
265
+ status: z.ZodNullable<z.ZodNumber>;
266
+ error: z.ZodNullable<z.ZodString>;
267
+ checkedAt: z.ZodISODateTime;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>;
270
+ /** `category` is the flow purpose; `industry` groups industry starters; `flow` is the matching flow blueprint key. */
271
+ export declare const GalleryItem: z.ZodObject<{
272
+ key: z.ZodString;
273
+ name: z.ZodString;
274
+ category: z.ZodString;
275
+ description: z.ZodString;
276
+ kind: z.ZodEnum<{
277
+ blocks: "blocks";
278
+ html: "html";
279
+ sms: "sms";
280
+ text: "text";
281
+ }>;
282
+ industry: z.ZodOptional<z.ZodString>;
283
+ flow: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strip>;
285
+ export declare const InstantiateGalleryBody: z.ZodObject<{
286
+ name: z.ZodOptional<z.ZodString>;
287
+ folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
+ }, z.core.$strip>;
289
+ export declare const FolderList: z.ZodObject<{
290
+ folders: z.ZodArray<z.ZodString>;
291
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
292
+ id: z.ZodUUID;
293
+ kind: z.ZodEnum<{
294
+ asset: "asset";
295
+ template: "template";
296
+ }>;
297
+ name: z.ZodString;
298
+ parentId: z.ZodNullable<z.ZodUUID>;
299
+ itemCount: z.ZodNumber;
300
+ createdAt: z.ZodISODateTime;
301
+ }, z.core.$strip>>>;
302
+ }, z.core.$strip>;
303
+ /** Reusable block group; templates reference it by id (`saved` block), so editing it updates every template that uses it. */
304
+ export declare const SavedSectionInput: z.ZodObject<{
305
+ name: z.ZodString;
306
+ blocks: z.ZodArray<z.ZodType<Block, unknown, z.core.$ZodTypeInternals<Block, unknown>>>;
307
+ }, z.core.$strip>;
308
+ export declare const SavedSectionDto: z.ZodObject<{
309
+ name: z.ZodString;
310
+ blocks: z.ZodArray<z.ZodType<Block, unknown, z.core.$ZodTypeInternals<Block, unknown>>>;
311
+ id: z.ZodUUID;
312
+ workspaceId: z.ZodUUID;
313
+ createdAt: z.ZodISODateTime;
314
+ updatedAt: z.ZodISODateTime;
315
+ }, z.core.$strip>;
316
+ export declare const SavedSectionPage: z.ZodObject<{
317
+ items: z.ZodArray<z.ZodObject<{
318
+ name: z.ZodString;
319
+ blocks: z.ZodArray<z.ZodType<Block, unknown, z.core.$ZodTypeInternals<Block, unknown>>>;
320
+ id: z.ZodUUID;
321
+ workspaceId: z.ZodUUID;
322
+ createdAt: z.ZodISODateTime;
323
+ updatedAt: z.ZodISODateTime;
324
+ }, z.core.$strip>>;
325
+ nextCursor: z.ZodNullable<z.ZodUUID>;
326
+ }, z.core.$strip>;
327
+ export declare const UpdateSavedSectionBody: z.ZodObject<{
328
+ name: z.ZodOptional<z.ZodString>;
329
+ blocks: z.ZodOptional<z.ZodArray<z.ZodType<Block, unknown, z.core.$ZodTypeInternals<Block, unknown>>>>;
330
+ }, z.core.$strip>;
331
+ /** `type`: sections with a top-level block of that type (e.g. `button`). Dates bound created / updated; sort keys page by keyset. */
332
+ export declare const ListSavedSectionsQuery: z.ZodObject<{
333
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
334
+ cursor: z.ZodOptional<z.ZodUUID>;
335
+ q: z.ZodOptional<z.ZodString>;
336
+ type: z.ZodOptional<z.ZodString>;
337
+ createdAfter: z.ZodOptional<z.ZodISODateTime>;
338
+ createdBefore: z.ZodOptional<z.ZodISODateTime>;
339
+ updatedAfter: z.ZodOptional<z.ZodISODateTime>;
340
+ updatedBefore: z.ZodOptional<z.ZodISODateTime>;
341
+ sort: z.ZodDefault<z.ZodEnum<{
342
+ name: "name";
343
+ newest: "newest";
344
+ oldest: "oldest";
345
+ updated: "updated";
346
+ }>>;
347
+ }, z.core.$strip>;
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ import { Id, PageQuery, Timestamp, pageResult } from './common.js';
3
+ import { Block } from './content-blocks.js';
4
+ export const LintIssue = z.object({ code: z.string(), message: z.string() });
5
+ export const LintResult = z.object({ errors: z.array(LintIssue), warnings: z.array(LintIssue) });
6
+ export const ReviewBody = z.object({ comment: z.string().max(2000).nullish() });
7
+ /** Why this version is transactional although it contains offer wording; kept in the audit log. */
8
+ export const TransactionalReviewBody = z.object({ note: z.string().trim().min(3).max(500) });
9
+ export const CloneTemplateBody = z.object({ name: z.string().trim().min(1).max(200).optional() });
10
+ export const UploadTypeGroup = z.enum(['image', 'pdf', 'video', 'audio', 'document', 'text', 'archive']);
11
+ export const AssetAccess = z.enum(['public_indexable', 'public_not_indexable', 'private']);
12
+ export const ContentSettingsDto = z.object({ approvalRequired: z.boolean(), campaignApprovalRequired: z.boolean().default(false), transactionalPromo: z.enum(['warn', 'block']).default('warn'), uploadTypes: z.array(UploadTypeGroup).max(7).default(['image', 'pdf', 'video']), defaultAssetAccess: AssetAccess.default('public_indexable') });
13
+ export const ContentSettingsPatch = z.object({ approvalRequired: z.boolean(), campaignApprovalRequired: z.boolean(), transactionalPromo: z.enum(['warn', 'block']), uploadTypes: z.array(UploadTypeGroup).max(7), defaultAssetAccess: AssetAccess }).partial();
14
+ export const AssetDto = z.object({
15
+ id: Id, filename: z.string(), contentType: z.string(), bytes: z.number(), width: z.number(), height: z.number(), url: z.string(), thumbUrl: z.string().nullable().default(null), altText: z.string().nullable(), folderId: Id.nullable(), language: z.string().nullable(), tags: z.array(z.string()).default([]), scanStatus: z.enum(['unscanned', 'clean', 'quarantined', 'pending', 'infected', 'error']).default('unscanned'), access: AssetAccess.default('public_indexable'), createdAt: Timestamp,
16
+ });
17
+ export const FolderDto = z.object({ id: Id, kind: z.enum(['template', 'asset']), name: z.string(), parentId: Id.nullable(), itemCount: z.number(), createdAt: Timestamp });
18
+ export const FolderInput = z.object({ name: z.string().trim().min(1).max(200), parentId: Id.nullable().optional() });
19
+ export const UpdateFolderBody = FolderInput.partial();
20
+ export const UpdateAssetBody = z.object({
21
+ filename: z.string().trim().min(1).max(200).optional(), altText: z.string().max(500).nullable().optional(), folderId: Id.nullable().optional(), language: z.string().trim().min(2).max(35).nullable().optional(), tags: z.array(z.string().max(64)).max(50).optional(), access: AssetAccess.optional(),
22
+ });
23
+ export const ImportAssetBody = z.object({ url: z.url().max(2048), filename: z.string().trim().min(1).max(200).optional(), folderId: Id.nullable().optional() });
24
+ export const ListAssetsQuery = PageQuery.extend({ q: z.string().max(200).optional(), folderId: Id.optional(), tag: z.string().max(64).optional(), language: z.string().max(35).optional(), type: UploadTypeGroup.optional(), access: AssetAccess.optional(), after: Timestamp.optional(), before: Timestamp.optional() });
25
+ export const AssetPage = pageResult(AssetDto);
26
+ export const TrackingDomainInput = z.object({ domain: z.string().trim().toLowerCase().max(253).regex(/^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/) });
27
+ export const TrackingDomainDto = z.object({
28
+ id: Id, domain: z.string(), status: z.enum(['pending', 'verified', 'failed']), cnameTarget: z.string(), verifiedAt: Timestamp.nullable(),
29
+ lastCheckedAt: Timestamp.nullable(), lastError: z.string().nullable(), createdAt: Timestamp,
30
+ /** HTTPS certificate on the host. Links use https only once `issued`; until then they go out over http. */
31
+ certStatus: z.enum(['pending', 'issued', 'failed']), certCheckedAt: Timestamp.nullable(), certError: z.string().nullable(),
32
+ /** Expiry of the certificate the last successful probe saw (the proxy renews it automatically). */
33
+ certExpiresAt: Timestamp.nullable().optional(),
34
+ });
35
+ export const TrackingDomainPage = pageResult(TrackingDomainDto);
36
+ export const LinkCheckDto = z.object({ url: z.string(), status: z.number().nullable(), error: z.string().nullable(), checkedAt: Timestamp });
37
+ export const LinkCheckResult = z.object({ pending: z.boolean(), items: z.array(LinkCheckDto) });
38
+ /** `category` is the flow purpose; `industry` groups industry starters; `flow` is the matching flow blueprint key. */
39
+ export const GalleryItem = z.object({ key: z.string(), name: z.string(), category: z.string(), description: z.string(), kind: z.enum(['blocks', 'html', 'text', 'sms']), industry: z.string().optional(), flow: z.string().optional() });
40
+ export const InstantiateGalleryBody = z.object({ name: z.string().trim().min(1).max(200).optional(), folder: z.string().max(200).nullable().optional() });
41
+ export const FolderList = z.object({ folders: z.array(z.string()), items: z.array(FolderDto).default([]) });
42
+ /** Reusable block group; templates reference it by id (`saved` block), so editing it updates every template that uses it. */
43
+ export const SavedSectionInput = z.object({ name: z.string().trim().min(1).max(200), blocks: z.array(Block).min(1).max(50) });
44
+ export const SavedSectionDto = SavedSectionInput.extend({ id: Id, workspaceId: Id, createdAt: Timestamp, updatedAt: Timestamp });
45
+ export const SavedSectionPage = pageResult(SavedSectionDto);
46
+ export const UpdateSavedSectionBody = SavedSectionInput.partial();
47
+ /** `type`: sections with a top-level block of that type (e.g. `button`). Dates bound created / updated; sort keys page by keyset. */
48
+ export const ListSavedSectionsQuery = PageQuery.extend({
49
+ q: z.string().max(200).optional(), type: z.string().regex(/^[a-z]{2,20}$/).optional(),
50
+ createdAfter: Timestamp.optional(), createdBefore: Timestamp.optional(), updatedAfter: Timestamp.optional(), updatedBefore: Timestamp.optional(),
51
+ sort: z.enum(['newest', 'oldest', 'name', 'updated']).default('newest'),
52
+ });