@hermeticacomms/sdk-node 0.1.0 → 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 (43) hide show
  1. package/dist/contracts/auth.d.ts +10 -6
  2. package/dist/contracts/auth.js +14 -5
  3. package/dist/contracts/billing.d.ts +2 -0
  4. package/dist/contracts/billing.js +2 -1
  5. package/dist/contracts/campaigns.d.ts +6 -9
  6. package/dist/contracts/campaigns.js +9 -2
  7. package/dist/contracts/consent.d.ts +24 -0
  8. package/dist/contracts/consent.js +15 -1
  9. package/dist/contracts/content-blocks.d.ts +1 -0
  10. package/dist/contracts/content-blocks.js +5 -3
  11. package/dist/contracts/content-library.d.ts +8 -0
  12. package/dist/contracts/content-library.js +3 -1
  13. package/dist/contracts/content.d.ts +6 -0
  14. package/dist/contracts/content.js +5 -3
  15. package/dist/contracts/delivery.d.ts +3 -0
  16. package/dist/contracts/delivery.js +6 -0
  17. package/dist/contracts/events.d.ts +2 -1
  18. package/dist/contracts/events.js +4 -2
  19. package/dist/contracts/experiments.d.ts +4 -2
  20. package/dist/contracts/experiments.js +7 -3
  21. package/dist/contracts/identity.d.ts +6 -1
  22. package/dist/contracts/identity.js +5 -4
  23. package/dist/contracts/integrations.d.ts +66 -2
  24. package/dist/contracts/integrations.js +32 -5
  25. package/dist/contracts/metrics.d.ts +6 -1
  26. package/dist/contracts/metrics.js +8 -2
  27. package/dist/contracts/outbound.d.ts +25 -0
  28. package/dist/contracts/outbound.js +14 -5
  29. package/dist/contracts/pickers.d.ts +1 -1
  30. package/dist/contracts/pickers.js +1 -1
  31. package/dist/contracts/platform-admin.d.ts +14 -0
  32. package/dist/contracts/platform-admin.js +7 -0
  33. package/dist/contracts/segments.d.ts +5 -0
  34. package/dist/contracts/segments.js +8 -3
  35. package/dist/contracts/workflow-nodes.d.ts +12 -0
  36. package/dist/contracts/workflow-nodes.js +5 -0
  37. package/dist/contracts/workflows.d.ts +398 -0
  38. package/dist/contracts/workflows.js +11 -2
  39. package/dist/index.d.ts +126 -2
  40. package/dist/resources.d.ts +20 -0
  41. package/dist/x10.d.ts +1 -0
  42. package/dist/z10.d.ts +5 -0
  43. package/package.json +1 -1
@@ -300,10 +300,10 @@ export declare const FrequencySettingsBody: z.ZodObject<{
300
300
  skip: "skip";
301
301
  }>>;
302
302
  }, z.core.$strip>>>;
303
- crossPurpose: z.ZodOptional<z.ZodNullable<z.ZodObject<{
303
+ crossPurpose: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
304
304
  max: z.ZodNumber;
305
305
  windowHours: z.ZodNumber;
306
- }, z.core.$strip>>>;
306
+ }, z.core.$strip>, z.ZodLiteral<"off">]>>>;
307
307
  }, z.core.$strip>;
308
308
  export declare const FrequencySettingsDto: z.ZodObject<{
309
309
  id: z.ZodUUID;
@@ -313,6 +313,7 @@ export declare const FrequencySettingsList: z.ZodObject<{
313
313
  id: z.ZodUUID;
314
314
  }, z.core.$loose>>;
315
315
  }, z.core.$strip>;
316
+ /** `hour` is local to `timezone`: the profile's own zone, else the workspace's. */
316
317
  export declare const SendTimeRecommendation: z.ZodObject<{
317
318
  profileId: z.ZodUUID;
318
319
  hour: z.ZodNumber;
@@ -321,6 +322,7 @@ export declare const SendTimeRecommendation: z.ZodObject<{
321
322
  profile: "profile";
322
323
  workspace: "workspace";
323
324
  }>;
325
+ timezone: z.ZodOptional<z.ZodString>;
324
326
  at: z.ZodISODateTime;
325
327
  }, z.core.$strip>;
326
328
  /** `new_subscribers`: people in the audience now who were not sent the original; `non_purchasers`: recipients with no attributed order. */
@@ -96,12 +96,16 @@ export const FrequencySettingsBody = z.object({
96
96
  scopeId: Id.nullish(),
97
97
  caps: z.array(FrequencyCapInput).max(20).default([]),
98
98
  smartSending: SmartSending.nullish(),
99
- /** Workspace only, off by default: one cap over prospecting + marketing sends to the same person on a channel together. Omitted = keep the saved value; null = off. */
100
- crossPurpose: z.object({ max: z.number().int().min(1).max(1000), windowHours: z.number().int().min(1).max(24 * 30) }).nullish(),
99
+ /**
100
+ * One cap over prospecting + marketing sends to the same person on a channel together (workspace: off by default). Omitted = keep the saved value.
101
+ * Workspace row: null or `off` = off. Campaign/workflow override: null = follow the workspace, `off` = no cross-purpose cap for it, a cap = its own.
102
+ */
103
+ crossPurpose: z.union([z.object({ max: z.number().int().min(1).max(1000), windowHours: z.number().int().min(1).max(24 * 30) }), z.literal('off')]).nullish(),
101
104
  });
102
105
  export const FrequencySettingsDto = Row;
103
106
  export const FrequencySettingsList = z.object({ items: z.array(FrequencySettingsDto) });
104
- export const SendTimeRecommendation = z.object({ profileId: Id, hour: z.number().int().min(0).max(23), source: z.enum(['profile', 'workspace', 'default']), at: Timestamp });
107
+ /** `hour` is local to `timezone`: the profile's own zone, else the workspace's. */
108
+ export const SendTimeRecommendation = z.object({ profileId: Id, hour: z.number().int().min(0).max(23), source: z.enum(['profile', 'workspace', 'default']), timezone: z.string().optional(), at: Timestamp });
105
109
  /** `new_subscribers`: people in the audience now who were not sent the original; `non_purchasers`: recipients with no attributed order. */
106
110
  export const ResendBody = z.object({
107
111
  to: z.enum(['non_openers', 'non_clickers', 'new_subscribers', 'non_purchasers']),
@@ -492,6 +492,7 @@ export declare const ListSettings: z.ZodObject<{
492
492
  defaultPoolId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"">]>>;
493
493
  }, z.core.$strip>;
494
494
  export type ListSettings = z.infer<typeof ListSettings>;
495
+ /** `app`: product that owns the list (null = shared), a label and filter only. */
495
496
  export declare const CreateListBody: z.ZodObject<{
496
497
  name: z.ZodString;
497
498
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -530,6 +531,7 @@ export declare const CreateListBody: z.ZodObject<{
530
531
  defaultPoolId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"">]>>;
531
532
  }, z.core.$strip>>;
532
533
  folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
534
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
535
  }, z.core.$strip>;
534
536
  export declare const UpdateListBody: z.ZodObject<{
535
537
  name: z.ZodOptional<z.ZodString>;
@@ -569,6 +571,7 @@ export declare const UpdateListBody: z.ZodObject<{
569
571
  defaultPoolId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"">]>>;
570
572
  }, z.core.$strip>>>;
571
573
  folderId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
574
+ app: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
572
575
  }, z.core.$strip>;
573
576
  export declare const ListDto: z.ZodObject<{
574
577
  id: z.ZodUUID;
@@ -611,6 +614,7 @@ export declare const ListDto: z.ZodObject<{
611
614
  }, z.core.$strip>;
612
615
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
613
616
  folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
617
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
614
618
  createdAt: z.ZodISODateTime;
615
619
  }, z.core.$strip>;
616
620
  /** Mailchimp-style list stats over the last 365 days of marketing sends (rates are 0..1 of delivered). */
@@ -663,6 +667,7 @@ export declare const ListWithCount: z.ZodObject<{
663
667
  }, z.core.$strip>;
664
668
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
665
669
  folderId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
670
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
666
671
  createdAt: z.ZodISODateTime;
667
672
  memberCount: z.ZodNumber;
668
673
  stats: z.ZodOptional<z.ZodObject<{
@@ -715,7 +720,7 @@ export declare const ListJoinOrderPage: z.ZodObject<{
715
720
  }, z.core.$strip>;
716
721
  export declare const IDENTITY_MATCH_TYPES: readonly ['external_id', 'email', 'phone', 'anonymous_id'];
717
722
  export declare const DUPLICATE_RULES: readonly ['email_alias', 'same_name_city'];
718
- /** Message rows on the profile timeline: every send status and engagement, engagement only (opens, clicks, replies, unsubscribes), or none. */
723
+ /** Message rows on the profile timeline: every send status and engagement, engagement only (opens, clicks, replies, unsubscribes), or none. Journey step rows are kept only with `all` (entries, exits and goals always). */
719
724
  export declare const TIMELINE_MESSAGE_MODES: readonly ['all', 'engagement', 'off'];
720
725
  /** Defaults are the behaviour before these became settings. */
721
726
  export declare const IdentitySettingsDto: z.ZodObject<{
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { Attributes, Channel, DateTimeIn, Id, ReplyToList, Timestamp, pageResult } from './common.js';
2
+ import { AppSlug, Attributes, Channel, DateTimeIn, Id, ReplyToList, Timestamp, pageResult } from './common.js';
3
3
  import { LegalBasis } from './consent.js';
4
4
  const str = z.string().max(256).nullable();
5
5
  export const StandardFieldsInput = z.object({
@@ -188,9 +188,10 @@ export const ListSettings = z.object({
188
188
  defaultConnectionId: z.union([z.uuid(), z.literal('')]).optional(),
189
189
  defaultPoolId: z.union([z.uuid(), z.literal('')]).optional(),
190
190
  });
191
- export const CreateListBody = z.object({ name: z.string().min(1).max(200), description: z.string().max(2000).nullable().optional(), settings: ListSettings.optional(), folderId: Id.nullable().optional() });
191
+ /** `app`: product that owns the list (null = shared), a label and filter only. */
192
+ export const CreateListBody = z.object({ name: z.string().min(1).max(200), description: z.string().max(2000).nullable().optional(), settings: ListSettings.optional(), folderId: Id.nullable().optional(), app: AppSlug.nullish() });
192
193
  export const UpdateListBody = CreateListBody.partial();
193
- export const ListDto = z.object({ id: Id, name: z.string(), description: z.string().nullable(), kind: z.string(), settings: ListSettings, tags: z.array(z.string()).optional(), folderId: Id.nullable().optional(), createdAt: Timestamp });
194
+ export const ListDto = z.object({ id: Id, name: z.string(), description: z.string().nullable(), kind: z.string(), settings: ListSettings, tags: z.array(z.string()).optional(), folderId: Id.nullable().optional(), app: z.string().nullable().optional(), createdAt: Timestamp });
194
195
  /** Mailchimp-style list stats over the last 365 days of marketing sends (rates are 0..1 of delivered). */
195
196
  export const ListStats = z.object({
196
197
  sent: z.number().int(), openRate: z.number(), clickRate: z.number(), unsubscribed: z.number().int(), cleaned: z.number().int(), lastSentAt: z.string().nullable(),
@@ -210,7 +211,7 @@ export const ListJoinOrderPage = z.object({ items: z.array(ListMemberMetaDto), n
210
211
  // ---- identity settings: match order, duplicate rules, timeline volume ---------------------------------------------
211
212
  export const IDENTITY_MATCH_TYPES = ['external_id', 'email', 'phone', 'anonymous_id'];
212
213
  export const DUPLICATE_RULES = ['email_alias', 'same_name_city'];
213
- /** Message rows on the profile timeline: every send status and engagement, engagement only (opens, clicks, replies, unsubscribes), or none. */
214
+ /** Message rows on the profile timeline: every send status and engagement, engagement only (opens, clicks, replies, unsubscribes), or none. Journey step rows are kept only with `all` (entries, exits and goals always). */
214
215
  export const TIMELINE_MESSAGE_MODES = ['all', 'engagement', 'off'];
215
216
  const distinct = (a) => new Set(a).size === a.length;
216
217
  /** Defaults are the behaviour before these became settings. */
@@ -22,9 +22,34 @@ export declare const WebhookAuthHeader: z.ZodObject<{
22
22
  secretName: z.ZodString;
23
23
  prefix: z.ZodOptional<z.ZodString>;
24
24
  }, z.core.$strip>;
25
+ /** A signing secret chosen by the caller (e.g. kept in a config file) instead of a generated one: unguessable, and never returned. */
26
+ export declare const WebhookSigningSecret: z.ZodString;
27
+ /** Watchtower's PagerDuty-compatible alert intake (hosted; a self-hosted Watchtower serves the same path on its edge). */
28
+ export declare const WATCHTOWER_ENQUEUE_URL = "https://edge.watchtowerops.net/v2/enqueue";
29
+ /** What a Watchtower endpoint is subscribed to unless you pick other topics: connection health (incl. pauses) and sending-domain verification. */
30
+ export declare const WATCHTOWER_TOPICS: string[];
31
+ /**
32
+ * A target preset. `watchtower`: each delivery is a Watchtower alert event (trigger on trouble, resolve on recovery) authenticated with the
33
+ * project's ingest key (scope `ingest:alerts`), which is kept sealed in place of a signing secret and never returned.
34
+ */
35
+ export declare const WebhookPresetInput: z.ZodObject<{
36
+ kind: z.ZodLiteral<"watchtower">;
37
+ ingestKey: z.ZodString;
38
+ environment: z.ZodString;
39
+ }, z.core.$strip>;
40
+ export declare const WebhookPreset: z.ZodObject<{
41
+ kind: z.ZodLiteral<"watchtower">;
42
+ environment: z.ZodString;
43
+ }, z.core.$strip>;
25
44
  export declare const CreateWebhookEndpoint: z.ZodObject<{
45
+ preset: z.ZodOptional<z.ZodObject<{
46
+ kind: z.ZodLiteral<"watchtower">;
47
+ ingestKey: z.ZodString;
48
+ environment: z.ZodString;
49
+ }, z.core.$strip>>;
26
50
  url: z.ZodURL;
27
51
  topics: z.ZodArray<z.ZodString>;
52
+ secret: z.ZodOptional<z.ZodString>;
28
53
  description: z.ZodOptional<z.ZodString>;
29
54
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
55
  id: z.ZodOptional<z.ZodString>;
@@ -53,6 +78,7 @@ export declare const CreateWebhookEndpoint: z.ZodObject<{
53
78
  throttleTopics: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
79
  autoDisableAfter: z.ZodOptional<z.ZodNumber>;
55
80
  retryWindowHours: z.ZodOptional<z.ZodNumber>;
81
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
82
  }, z.core.$strip>;
57
83
  export declare const UpdateWebhookEndpoint: z.ZodObject<{
58
84
  url: z.ZodOptional<z.ZodURL>;
@@ -89,6 +115,7 @@ export declare const UpdateWebhookEndpoint: z.ZodObject<{
89
115
  active: "active";
90
116
  disabled: "disabled";
91
117
  }>>;
118
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
119
  }, z.core.$strip>;
93
120
  export declare const WebhookEndpointDto: z.ZodObject<{
94
121
  id: z.ZodUUID;
@@ -126,11 +153,16 @@ export declare const WebhookEndpointDto: z.ZodObject<{
126
153
  active: "active";
127
154
  disabled: "disabled";
128
155
  }>;
156
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ preset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
158
+ kind: z.ZodLiteral<"watchtower">;
159
+ environment: z.ZodString;
160
+ }, z.core.$strip>>>;
129
161
  consecutiveFailures: z.ZodNumber;
130
162
  createdAt: z.ZodISODateTime;
131
163
  updatedAt: z.ZodISODateTime;
132
164
  }, z.core.$strip>;
133
- /** `secret` is shown exactly once (create / rotate). */
165
+ /** `secret` is shown exactly once (create / rotate); absent when the caller supplied its own. */
134
166
  export declare const WebhookEndpointCreated: z.ZodObject<{
135
167
  id: z.ZodUUID;
136
168
  url: z.ZodString;
@@ -167,13 +199,23 @@ export declare const WebhookEndpointCreated: z.ZodObject<{
167
199
  active: "active";
168
200
  disabled: "disabled";
169
201
  }>;
202
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
203
+ preset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
204
+ kind: z.ZodLiteral<"watchtower">;
205
+ environment: z.ZodString;
206
+ }, z.core.$strip>>>;
170
207
  consecutiveFailures: z.ZodNumber;
171
208
  createdAt: z.ZodISODateTime;
172
209
  updatedAt: z.ZodISODateTime;
173
- secret: z.ZodString;
210
+ secret: z.ZodOptional<z.ZodString>;
174
211
  }, z.core.$strip>;
175
212
  export declare const WebhookSecretResult: z.ZodObject<{
176
213
  secret: z.ZodString;
214
+ previousSecretExpiresAt: z.ZodNullable<z.ZodISODateTime>;
215
+ }, z.core.$strip>;
216
+ /** `graceHours`: how long the old secret keeps signing next to the new one (default 24; `0` stops it at once, e.g. after a leak). */
217
+ export declare const RotateWebhookSecretQuery: z.ZodObject<{
218
+ graceHours: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
177
219
  }, z.core.$strip>;
178
220
  export declare const WebhookEndpointPage: z.ZodObject<{
179
221
  items: z.ZodArray<z.ZodObject<{
@@ -212,12 +254,23 @@ export declare const WebhookEndpointPage: z.ZodObject<{
212
254
  active: "active";
213
255
  disabled: "disabled";
214
256
  }>;
257
+ app: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ preset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
259
+ kind: z.ZodLiteral<"watchtower">;
260
+ environment: z.ZodString;
261
+ }, z.core.$strip>>>;
215
262
  consecutiveFailures: z.ZodNumber;
216
263
  createdAt: z.ZodISODateTime;
217
264
  updatedAt: z.ZodISODateTime;
218
265
  }, z.core.$strip>>;
219
266
  nextCursor: z.ZodNullable<z.ZodUUID>;
220
267
  }, z.core.$strip>;
268
+ /** `app` lists one product's endpoints (an app-bound key always gets its own). */
269
+ export declare const WebhookEndpointQuery: z.ZodObject<{
270
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
271
+ cursor: z.ZodOptional<z.ZodUUID>;
272
+ app: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strip>;
221
274
  export declare const WebhookDeliveryStatus: z.ZodEnum<{
222
275
  failed: "failed";
223
276
  pending: "pending";
@@ -379,3 +432,14 @@ export declare const WebhookJournalExportBody: z.ZodObject<{
379
432
  endpointId: z.ZodOptional<z.ZodUUID>;
380
433
  topic: z.ZodOptional<z.ZodString>;
381
434
  }, z.core.$strip>;
435
+ /** `hermetica webhooks listen`: a short-lived session that streams the workspace's events so a local receiver can be tested. */
436
+ export declare const CreateWebhookListen: z.ZodObject<{
437
+ topics: z.ZodDefault<z.ZodArray<z.ZodString>>;
438
+ }, z.core.$strip>;
439
+ /** `secret` signs the forwarded events (same `Hermetica-Signature` format as real deliveries); shown once, never stored. */
440
+ export declare const WebhookListenSession: z.ZodObject<{
441
+ id: z.ZodUUID;
442
+ topics: z.ZodArray<z.ZodString>;
443
+ secret: z.ZodString;
444
+ expiresAt: z.ZodISODateTime;
445
+ }, z.core.$strip>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { Id, PageQuery, Timestamp, pageResult } from './common.js';
2
+ import { AppSlug, Id, PageQuery, Timestamp, pageResult } from './common.js';
3
3
  /** Exact topic (`profile.created`), prefix wildcard (`segment.*`) or everything (`*`). */
4
4
  export const WebhookTopicPattern = z.string().regex(/^(\*|[a-z_]+(\.[a-z_]+)*(\.\*)?)$/, 'Use an exact topic, "prefix.*" or "*"').max(100);
5
5
  const Url = z.url().max(2048);
@@ -33,7 +33,19 @@ const Delivery = {
33
33
  /** Hours one event is retried (doubling backoff, at most 6 h apart) before it is given up (default 24). */
34
34
  retryWindowHours: z.number().int().min(1).max(72),
35
35
  };
36
- export const CreateWebhookEndpoint = z.object({ url: Url, topics: Topics, description: z.string().max(500).optional(), filters: Scope.filters.optional(), listIds: Scope.listIds.optional(), sources: Scope.sources.optional(), sequenceIds: Scope.sequenceIds.optional(), bodyTemplate: Delivery.bodyTemplate.optional(), authHeaders: Delivery.authHeaders.optional(), throttleSeconds: Delivery.throttleSeconds.optional(), throttleTopics: Delivery.throttleTopics.optional(), autoDisableAfter: Delivery.autoDisableAfter.optional(), retryWindowHours: Delivery.retryWindowHours.optional() });
36
+ /** A signing secret chosen by the caller (e.g. kept in a config file) instead of a generated one: unguessable, and never returned. */
37
+ export const WebhookSigningSecret = z.string().min(32).max(256).refine((s) => new Set(s).size >= 12, 'Use a random secret: at least 32 characters, at least 12 of them different');
38
+ /** Watchtower's PagerDuty-compatible alert intake (hosted; a self-hosted Watchtower serves the same path on its edge). */
39
+ export const WATCHTOWER_ENQUEUE_URL = 'https://edge.watchtowerops.net/v2/enqueue';
40
+ /** What a Watchtower endpoint is subscribed to unless you pick other topics: connection health (incl. pauses) and sending-domain verification. */
41
+ export const WATCHTOWER_TOPICS = ['connection.health_changed', 'domain.verification_failed', 'domain.verified'];
42
+ /**
43
+ * A target preset. `watchtower`: each delivery is a Watchtower alert event (trigger on trouble, resolve on recovery) authenticated with the
44
+ * project's ingest key (scope `ingest:alerts`), which is kept sealed in place of a signing secret and never returned.
45
+ */
46
+ export const WebhookPresetInput = z.object({ kind: z.literal('watchtower'), ingestKey: z.string().trim().min(8).max(256), environment: z.string().trim().min(1).max(64) });
47
+ export const WebhookPreset = WebhookPresetInput.omit({ ingestKey: true });
48
+ export const CreateWebhookEndpoint = z.object({ preset: WebhookPresetInput.optional(), url: Url, topics: Topics, secret: WebhookSigningSecret.optional(), description: z.string().max(500).optional(), filters: Scope.filters.optional(), listIds: Scope.listIds.optional(), sources: Scope.sources.optional(), sequenceIds: Scope.sequenceIds.optional(), bodyTemplate: Delivery.bodyTemplate.optional(), authHeaders: Delivery.authHeaders.optional(), throttleSeconds: Delivery.throttleSeconds.optional(), throttleTopics: Delivery.throttleTopics.optional(), autoDisableAfter: Delivery.autoDisableAfter.optional(), retryWindowHours: Delivery.retryWindowHours.optional(), /** Product this endpoint belongs to: it only gets events attributed to that app (or not attributed to any). An app-bound key sets it for you. */ app: AppSlug.nullish() });
37
49
  export const UpdateWebhookEndpoint = z.object({
38
50
  url: Url.optional(),
39
51
  topics: Topics.optional(),
@@ -43,6 +55,7 @@ export const UpdateWebhookEndpoint = z.object({
43
55
  autoDisableAfter: Delivery.autoDisableAfter.optional(), retryWindowHours: Delivery.retryWindowHours.optional(),
44
56
  /** Re-enabling resets the failure counter. */
45
57
  status: z.enum(['active', 'disabled']).optional(),
58
+ app: AppSlug.nullable().optional(),
46
59
  });
47
60
  export const WebhookEndpointDto = z.object({
48
61
  id: Id,
@@ -56,14 +69,24 @@ export const WebhookEndpointDto = z.object({
56
69
  bodyTemplate: z.string().nullable(), authHeaders: Delivery.authHeaders, throttleSeconds: z.number().int(), throttleTopics: z.array(z.string()),
57
70
  autoDisableAfter: z.number().int().default(50), retryWindowHours: z.number().int().default(24),
58
71
  status: z.enum(['active', 'disabled']),
72
+ app: z.string().nullable().optional(),
73
+ preset: WebhookPreset.nullable().optional(),
59
74
  consecutiveFailures: z.number().int(),
60
75
  createdAt: Timestamp,
61
76
  updatedAt: Timestamp,
62
77
  });
63
- /** `secret` is shown exactly once (create / rotate). */
64
- export const WebhookEndpointCreated = WebhookEndpointDto.extend({ secret: z.string() });
65
- export const WebhookSecretResult = z.object({ secret: z.string() });
78
+ /** `secret` is shown exactly once (create / rotate); absent when the caller supplied its own. */
79
+ export const WebhookEndpointCreated = WebhookEndpointDto.extend({ secret: z.string().optional() });
80
+ export const WebhookSecretResult = z.object({
81
+ secret: z.string(),
82
+ /** Until then deliveries also carry the old secret's signature (a second `v1=`); null when it stopped at once. */
83
+ previousSecretExpiresAt: Timestamp.nullable(),
84
+ });
85
+ /** `graceHours`: how long the old secret keeps signing next to the new one (default 24; `0` stops it at once, e.g. after a leak). */
86
+ export const RotateWebhookSecretQuery = z.object({ graceHours: z.coerce.number().int().min(0).max(168).optional() });
66
87
  export const WebhookEndpointPage = pageResult(WebhookEndpointDto);
88
+ /** `app` lists one product's endpoints (an app-bound key always gets its own). */
89
+ export const WebhookEndpointQuery = PageQuery.extend({ app: AppSlug.optional() });
67
90
  export const WebhookDeliveryStatus = z.enum(['pending', 'succeeded', 'failed']);
68
91
  export const WebhookDeliveryDto = z.object({
69
92
  id: Id,
@@ -110,3 +133,7 @@ export const IntegrationSecretDto = z.object({ id: Id, name: z.string(), descrip
110
133
  export const IntegrationSecretList = z.object({ items: z.array(IntegrationSecretDto) });
111
134
  /** Async journal export job: same filters as the journal read; poll the job, then download the CSV. */
112
135
  export const WebhookJournalExportBody = z.object({ after: z.number().int().min(0).optional(), endpointId: Id.optional(), topic: WebhookTopicPattern.optional() });
136
+ /** `hermetica webhooks listen`: a short-lived session that streams the workspace's events so a local receiver can be tested. */
137
+ export const CreateWebhookListen = z.object({ topics: Topics.default(['*']) });
138
+ /** `secret` signs the forwarded events (same `Hermetica-Signature` format as real deliveries); shown once, never stored. */
139
+ export const WebhookListenSession = z.object({ id: Id, topics: z.array(z.string()), secret: z.string(), expiresAt: Timestamp });
@@ -37,6 +37,7 @@ export declare const EventExplorerQuery: z.ZodObject<{
37
37
  include: z.ZodOptional<z.ZodString>;
38
38
  journeyId: z.ZodOptional<z.ZodUUID>;
39
39
  broadcastId: z.ZodOptional<z.ZodUUID>;
40
+ app: z.ZodOptional<z.ZodString>;
40
41
  }, z.core.$strip>;
41
42
  export declare const EventExplorerPage: z.ZodObject<{
42
43
  items: z.ZodArray<z.ZodObject<{
@@ -161,7 +162,7 @@ export declare const MetricAggregateQuery: z.ZodObject<{
161
162
  by: z.ZodOptional<z.ZodString>;
162
163
  from: z.ZodCodec<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>, z.ZodISODateTime>;
163
164
  to: z.ZodCodec<z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>, z.ZodISODateTime>;
164
- timezone: z.ZodDefault<z.ZodString>;
165
+ timezone: z.ZodOptional<z.ZodString>;
165
166
  filter: z.ZodDefault<z.ZodArray<z.ZodObject<{
166
167
  property: z.ZodString;
167
168
  op: z.ZodDefault<z.ZodEnum<{
@@ -184,6 +185,10 @@ export declare const MetricAggregateQuery: z.ZodObject<{
184
185
  value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
185
186
  }, z.core.$strip>>>;
186
187
  topN: z.ZodDefault<z.ZodNumber>;
188
+ app: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strip>;
190
+ export declare const MetricListQuery: z.ZodObject<{
191
+ app: z.ZodOptional<z.ZodString>;
187
192
  }, z.core.$strip>;
188
193
  export type MetricAggregateQuery = z.input<typeof MetricAggregateQuery>;
189
194
  export declare const MetricAggregateResult: z.ZodObject<{
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { Id, PageQuery, Timestamp, TimestampIn, pageResult } from './common.js';
2
+ import { AppSlug, Id, PageQuery, Timestamp, TimestampIn, pageResult } from './common.js';
3
3
  import { EventRecord } from './events.js';
4
4
  // ---- property conditions (shared by filters and custom metrics) --------------------------------------------------------
5
5
  export const CONDITION_OPS = ['eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'contains', 'not_contains', 'starts_with', 'ends_with', 'exists', 'not_exists', 'in', 'not_in', 'between'];
@@ -24,6 +24,8 @@ export const EventExplorerQuery = PageQuery.extend({
24
24
  /** Only events from messages of this journey, or of this broadcast (campaign). */
25
25
  journeyId: Id.optional(),
26
26
  broadcastId: Id.optional(),
27
+ /** Only events sent with this `app` (product). */
28
+ app: AppSlug.optional(),
27
29
  });
28
30
  export const EventExplorerPage = pageResult(EventRecord);
29
31
  /** Matching events as CSV text (first 50,000). */
@@ -56,11 +58,15 @@ export const MetricAggregateQuery = z.object({
56
58
  by: z.string().min(1).max(128).optional(),
57
59
  from: TimestampIn,
58
60
  to: TimestampIn,
59
- timezone: z.string().min(1).max(64).default('UTC'),
61
+ /** IANA zone the buckets follow; defaults to the workspace's zone. */
62
+ timezone: z.string().min(1).max(64).optional(),
60
63
  filter: z.array(PropertyCondition).max(10).default([]),
61
64
  /** Largest number of breakdown values returned (the rest are dropped). */
62
65
  topN: z.number().int().min(1).max(25).default(10),
66
+ /** Only events sent with this `app` (product). */
67
+ app: AppSlug.optional(),
63
68
  });
69
+ export const MetricListQuery = z.object({ app: AppSlug.optional() });
64
70
  export const MetricAggregateResult = z.object({
65
71
  metric: z.string(), measurement: z.string(), interval: z.string(), timezone: z.string(), by: z.string().nullable(),
66
72
  /** Local bucket starts (ISO, no offset), oldest first; every series is aligned to them. */
@@ -10594,6 +10594,7 @@ export declare const AdoptProspectsBody: z.ZodObject<{
10594
10594
  export declare const ProspectListQuery: z.ZodObject<{
10595
10595
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10596
10596
  cursor: z.ZodOptional<z.ZodUUID>;
10597
+ app: z.ZodOptional<z.ZodString>;
10597
10598
  status: z.ZodOptional<z.ZodEnum<{
10598
10599
  bounced: "bounced";
10599
10600
  contacted: "contacted";
@@ -10733,6 +10734,7 @@ export declare const SequenceDto: z.ZodObject<{
10733
10734
  publishedVersionId: z.ZodNullable<z.ZodUUID>;
10734
10735
  folder: z.ZodNullable<z.ZodString>;
10735
10736
  tags: z.ZodArray<z.ZodString>;
10737
+ app: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10736
10738
  sequence: z.ZodObject<{
10737
10739
  steps: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
10738
10740
  waitDays: z.ZodDefault<z.ZodNumber>;
@@ -12780,6 +12782,7 @@ export declare const SequencePage: z.ZodObject<{
12780
12782
  publishedVersionId: z.ZodNullable<z.ZodUUID>;
12781
12783
  folder: z.ZodNullable<z.ZodString>;
12782
12784
  tags: z.ZodArray<z.ZodString>;
12785
+ app: z.ZodDefault<z.ZodNullable<z.ZodString>>;
12783
12786
  sequence: z.ZodObject<{
12784
12787
  steps: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
12785
12788
  waitDays: z.ZodDefault<z.ZodNumber>;
@@ -14812,6 +14815,7 @@ export declare const SequencePage: z.ZodObject<{
14812
14815
  export declare const TaskListQuery: z.ZodObject<{
14813
14816
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
14814
14817
  cursor: z.ZodOptional<z.ZodUUID>;
14818
+ app: z.ZodOptional<z.ZodString>;
14815
14819
  assigneeUserId: z.ZodOptional<z.ZodUUID>;
14816
14820
  status: z.ZodOptional<z.ZodEnum<{
14817
14821
  done: "done";
@@ -15053,6 +15057,7 @@ export declare const TaskPage: z.ZodObject<{
15053
15057
  export declare const InboxQuery: z.ZodObject<{
15054
15058
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
15055
15059
  cursor: z.ZodOptional<z.ZodUUID>;
15060
+ app: z.ZodOptional<z.ZodString>;
15056
15061
  category: z.ZodOptional<z.ZodEnum<{
15057
15062
  auto_reply: "auto_reply";
15058
15063
  bounce: "bounce";
@@ -15312,6 +15317,7 @@ export declare const ThreadItemDto: z.ZodObject<{
15312
15317
  connectionId: z.ZodNullable<z.ZodUUID>;
15313
15318
  stepKey: z.ZodNullable<z.ZodString>;
15314
15319
  classification: z.ZodNullable<z.ZodString>;
15320
+ channel: z.ZodOptional<z.ZodString>;
15315
15321
  }, z.core.$strip>;
15316
15322
  export declare const ThreadDto: z.ZodObject<{
15317
15323
  profileId: z.ZodNullable<z.ZodUUID>;
@@ -15328,6 +15334,7 @@ export declare const ThreadDto: z.ZodObject<{
15328
15334
  connectionId: z.ZodNullable<z.ZodUUID>;
15329
15335
  stepKey: z.ZodNullable<z.ZodString>;
15330
15336
  classification: z.ZodNullable<z.ZodString>;
15337
+ channel: z.ZodOptional<z.ZodString>;
15331
15338
  }, z.core.$strip>>;
15332
15339
  }, z.core.$strip>;
15333
15340
  export declare const ClassifierAccuracyRow: z.ZodObject<{
@@ -15374,6 +15381,7 @@ export declare const OutboundStatsQuery: z.ZodObject<{
15374
15381
  from: z.ZodOptional<z.ZodISODate>;
15375
15382
  to: z.ZodOptional<z.ZodISODate>;
15376
15383
  sequenceId: z.ZodOptional<z.ZodUUID>;
15384
+ app: z.ZodOptional<z.ZodString>;
15377
15385
  group: z.ZodDefault<z.ZodEnum<{
15378
15386
  mailbox: "mailbox";
15379
15387
  sequence: "sequence";
@@ -15454,6 +15462,7 @@ export declare const MailboxDay: z.ZodObject<{
15454
15462
  export declare const MailboxHealthDto: z.ZodObject<{
15455
15463
  connectionId: z.ZodUUID;
15456
15464
  name: z.ZodString;
15465
+ app: z.ZodNullable<z.ZodString>;
15457
15466
  status: z.ZodString;
15458
15467
  health: z.ZodString;
15459
15468
  dailyCap: z.ZodNullable<z.ZodNumber>;
@@ -15507,4 +15516,20 @@ export type EnrollProspectsResult = z.infer<typeof EnrollProspectsResult>;
15507
15516
  export type OutboundStatsRow = z.infer<typeof OutboundStatsRow>;
15508
15517
  export type CreateTaskBody = z.infer<typeof CreateTaskBody>;
15509
15518
  export type MailboxSettingsBody = z.infer<typeof MailboxSettingsBody>;
15519
+ /** Inbox "Send opt-in ask": the list defaults to the reply's sequence opt-in ask. */
15520
+ export declare const OptInAskBody: z.ZodObject<{
15521
+ listId: z.ZodOptional<z.ZodUUID>;
15522
+ }, z.core.$strip>;
15523
+ export declare const OptInAskResultDto: z.ZodObject<{
15524
+ result: z.ZodEnum<{
15525
+ already_subscribed: "already_subscribed";
15526
+ no_email: "no_email";
15527
+ no_list: "no_list";
15528
+ no_mailbox: "no_mailbox";
15529
+ opted_out: "opted_out";
15530
+ pending: "pending";
15531
+ sent: "sent";
15532
+ suppressed: "suppressed";
15533
+ }>;
15534
+ }, z.core.$strip>;
15510
15535
  export {};
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { DateTimeIn, Id, PageQuery, Purpose, Timestamp, pageResult } from './common.js';
2
+ import { AppSlug, DateTimeIn, Id, PageQuery, Purpose, Timestamp, pageResult } from './common.js';
3
3
  import { PostcardDesign } from './postcards.js';
4
4
  export const ProspectStatus = z.enum(['new', 'contacted', 'replied', 'interested', 'meeting_booked', 'won', 'lost', 'not_interested', 'bounced', 'unsubscribed', 'do_not_contact']);
5
5
  export const ReplyCategory = z.enum(['positive', 'negative', 'neutral', 'ooo', 'auto_reply', 'bounce', 'unsubscribe', 'meeting', 'wrong_person']);
@@ -106,7 +106,7 @@ export const SequenceSettings = z.object({
106
106
  sticky: z.boolean().default(true),
107
107
  /** Sticky mailbox became unavailable: pause the enrollment (default) or move it to another pool member (new thread). */
108
108
  onUnavailable: z.enum(['pause', 'reassign']).default('pause'),
109
- /** ESP matching (unset = on): a new prospect on Gmail/Google Workspace gets a Google mailbox, on Outlook/M365 a Microsoft one, when such a mailbox has room today. */
109
+ /** ESP matching (unset = the workspace default, delivery settings `matchRecipientProvider`, on unless turned off): a new prospect on Gmail/Google Workspace gets a Google mailbox, on Outlook/M365 a Microsoft one, when such a mailbox has room today. */
110
110
  matchProvider: z.boolean().optional(),
111
111
  }).default({ sticky: true, onUnavailable: 'pause' }),
112
112
  dailyNewLimit: z.number().int().min(1).max(100_000).optional(),
@@ -196,7 +196,7 @@ export const ImportProspectsResult = z.object({
196
196
  profileIds: z.array(Id),
197
197
  });
198
198
  export const AdoptProspectsBody = z.object({ profileIds: z.array(Id).min(1).max(1000) });
199
- export const ProspectListQuery = PageQuery.extend({ status: ProspectStatus.optional(), ownerUserId: Id.optional(), domain: z.string().optional() });
199
+ export const ProspectListQuery = PageQuery.extend({ app: AppSlug.optional(), status: ProspectStatus.optional(), ownerUserId: Id.optional(), domain: z.string().optional() });
200
200
  export const UpdateProspectBody = z.object({ status: ProspectStatus.optional(), ownerUserId: Id.nullable().optional(), dealValueCents: z.number().int().min(0).max(2_000_000_000).nullable().optional() });
201
201
  export const DncImportBody = z.object({ emails: z.array(z.email()).max(10_000).default([]), domains: z.array(z.string().min(3).max(253)).max(1000).default([]) });
202
202
  export const DncImportResult = z.object({ suppressed: z.number().int(), domainsBlocked: z.number().int() });
@@ -231,6 +231,7 @@ export const SequenceDto = z.object({
231
231
  publishedVersionId: Id.nullable(),
232
232
  folder: z.string().nullable(),
233
233
  tags: z.array(z.string()),
234
+ app: z.string().nullable().default(null),
234
235
  sequence: SequenceSettings,
235
236
  createdAt: Timestamp,
236
237
  updatedAt: Timestamp,
@@ -238,6 +239,7 @@ export const SequenceDto = z.object({
238
239
  export const SequencePage = pageResult(SequenceDto);
239
240
  // ---- tasks ----------------------------------------------------------------------------------------------------
240
241
  export const TaskListQuery = PageQuery.extend({
242
+ app: AppSlug.optional(),
241
243
  assigneeUserId: Id.optional(), status: z.enum(['open', 'done', 'skipped']).optional(),
242
244
  bucket: z.enum(['overdue', 'today', 'upcoming']).optional(), kind: TaskKind.optional(),
243
245
  profileId: Id.optional(), unassigned: z.coerce.boolean().optional(), dueBefore: DateTimeIn().optional(), dueAfter: DateTimeIn().optional(), outcome: z.string().max(40).optional(),
@@ -249,7 +251,7 @@ export const TaskFilterNode = z.lazy(() => z.union([
249
251
  TaskFilterLeaf,
250
252
  z.object({ op: z.enum(['and', 'or']), filters: z.array(TaskFilterNode).min(1).max(20) }),
251
253
  z.object({ op: z.literal('not'), filter: TaskFilterNode }),
252
- ]));
254
+ ])).meta({ id: 'TaskFilterNode' }); // recursive: one OpenAPI component
253
255
  export const TaskSearchBody = z.object({ filter: TaskFilterNode.optional(), limit: z.number().int().min(1).max(200).default(50), cursor: z.string().regex(/^\d{1,6}$/).optional() });
254
256
  const TaskLinks = {
255
257
  /** Team-defined task type (`/v1/outbound/task-types`). */
@@ -311,6 +313,7 @@ export const TaskDto = z.object({
311
313
  export const TaskPage = pageResult(TaskDto);
312
314
  // ---- inbox ----------------------------------------------------------------------------------------------------
313
315
  export const InboxQuery = PageQuery.extend({
316
+ app: AppSlug.optional(),
314
317
  category: ReplyCategory.optional(), connectionId: Id.optional(), assigneeUserId: Id.optional(), sequenceId: Id.optional(),
315
318
  unread: z.coerce.boolean().optional(), label: z.string().max(40).optional(), leadStatus: ProspectStatus.optional(), includeSnoozed: z.coerce.boolean().default(false),
316
319
  sourceKind: z.enum(['campaign', 'sequence', 'workflow']).optional(), campaignId: Id.optional(),
@@ -369,6 +372,8 @@ export const ThreadItemDto = z.object({
369
372
  connectionId: Id.nullable(),
370
373
  stepKey: z.string().nullable(),
371
374
  classification: z.string().nullable(),
375
+ /** Set by the one-inbox profile conversation: email, sms, whatsapp, linkedin, instagram, facebook. */
376
+ channel: z.string().optional(),
372
377
  });
373
378
  export const ThreadDto = z.object({ profileId: Id.nullable(), items: z.array(ThreadItemDto) });
374
379
  export const ClassifierAccuracyRow = z.object({ source: z.string(), total: z.number().int(), corrected: z.number().int(), accuracy: z.number() });
@@ -376,7 +381,7 @@ export const ReferralResult = z.object({ profileId: Id, enroll: EnrollProspectsR
376
381
  // ---- meetings & analytics -------------------------------------------------------------------------------------
377
382
  export const MeetingBody = z.object({ profileId: Id, at: DateTimeIn().optional(), ref: z.string().max(300).optional() });
378
383
  export const MeetingDto = z.object({ id: Id, profileId: Id, source: z.enum(['calendar_link', 'reply_detected', 'manual']), at: Timestamp, ref: z.string().nullable(), sequenceId: Id.nullable(), createdAt: Timestamp, completedAt: Timestamp.nullable().optional(), outcome: z.string().nullable().optional() });
379
- export const OutboundStatsQuery = z.object({ from: z.iso.date().optional(), to: z.iso.date().optional(), sequenceId: Id.optional(), group: z.enum(['sequence', 'step', 'mailbox']).default('sequence') });
384
+ export const OutboundStatsQuery = z.object({ from: z.iso.date().optional(), to: z.iso.date().optional(), sequenceId: Id.optional(), app: z.string().max(63).optional(), group: z.enum(['sequence', 'step', 'mailbox']).default('sequence') });
380
385
  export const OutboundStatsRow = z.object({
381
386
  key: z.string(), sent: z.number().int(), bounced: z.number().int(), replied: z.number().int(), positive: z.number().int(), negative: z.number().int(),
382
387
  optOuts: z.number().int(), meetings: z.number().int(), positiveRate: z.number(), replyRate: z.number(), bounceRate: z.number(),
@@ -401,6 +406,7 @@ export const MailboxDay = z.object({ day: z.string(), sent: z.number().int(), bo
401
406
  export const MailboxHealthDto = z.object({
402
407
  connectionId: Id,
403
408
  name: z.string(),
409
+ app: z.string().nullable(),
404
410
  status: z.string(),
405
411
  health: z.string(),
406
412
  dailyCap: z.number().int().nullable(),
@@ -421,3 +427,6 @@ export const MailboxHealthDto = z.object({
421
427
  pause: z.string().nullable(),
422
428
  history: z.array(MailboxDay),
423
429
  });
430
+ /** Inbox "Send opt-in ask": the list defaults to the reply's sequence opt-in ask. */
431
+ export const OptInAskBody = z.object({ listId: Id.optional() });
432
+ export const OptInAskResultDto = z.object({ result: z.enum(['sent', 'no_email', 'no_mailbox', 'no_list', 'already_subscribed', 'opted_out', 'suppressed', 'pending']) });
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  * What a config value refers to, so a form generated from the schema shows a live picker (lists, events seen, field registry...) instead
4
4
  * of a text box. Stored as `x-picker` metadata: a valid OpenAPI extension, so API clients see it too.
5
5
  */
6
- export declare const PICKER_KINDS: readonly ['template', 'list', 'segment', 'tag', 'topic', 'field', 'event', 'connection', 'sender', 'webhook_template', 'user', 'product', 'form', 'sequence', 'workflow', 'node', 'object_type', 'score', 'integration', 'company', 'collection', 'in_app', 'site_message', 'wa_flow', 'slack_install', 'slack_template', 'ad_account', 'timezone', 'lifecycle_stage', 'experiment', 'secret', 'message_event', 'reply_class', 'custom_trigger', 'custom_action', 'loyalty_program', 'sender_pool', 'route_policy', 'geofence', 'loyalty_tier', 'loyalty_reward', 'event_path', 'collection_column', 'field_value'];
6
+ export declare const PICKER_KINDS: readonly ['template', 'list', 'segment', 'tag', 'topic', 'field', 'event', 'connection', 'sender', 'webhook_template', 'user', 'product', 'form', 'sequence', 'workflow', 'node', 'object_type', 'score', 'integration', 'company', 'collection', 'in_app', 'site_message', 'wa_flow', 'slack_install', 'slack_template', 'ad_account', 'timezone', 'lifecycle_stage', 'experiment', 'secret', 'message_event', 'reply_class', 'custom_trigger', 'custom_action', 'loyalty_program', 'sender_pool', 'route_policy', 'geofence', 'loyalty_tier', 'loyalty_reward', 'event_path', 'collection_column', 'field_value', 'social_account'];
7
7
  export type PickerKind = (typeof PICKER_KINDS)[number];
8
8
  export declare const PICKER_KEY = "x-picker";
9
9
  /** Marks `schema` as a reference to `kind` (keeps any description already on it; never copies a registry `id`, which must stay unique). */
@@ -8,7 +8,7 @@ export const PICKER_KINDS = [
8
8
  'sequence', 'workflow', 'node', 'object_type', 'score', 'integration', 'company', 'collection', 'in_app', 'site_message', 'wa_flow',
9
9
  'slack_install', 'slack_template', 'ad_account', 'timezone', 'lifecycle_stage', 'experiment', 'secret', 'message_event', 'reply_class',
10
10
  'custom_trigger', 'custom_action', 'loyalty_program', 'sender_pool', 'route_policy', 'geofence',
11
- 'loyalty_tier', 'loyalty_reward', 'event_path', 'collection_column', 'field_value',
11
+ 'loyalty_tier', 'loyalty_reward', 'event_path', 'collection_column', 'field_value', 'social_account',
12
12
  ];
13
13
  export const PICKER_KEY = 'x-picker';
14
14
  /** Marks `schema` as a reference to `kind` (keeps any description already on it; never copies a registry `id`, which must stay unique). */
@@ -129,6 +129,20 @@ export declare const OAuthTokenResult: z.ZodObject<{
129
129
  refresh_token: z.ZodString;
130
130
  scope: z.ZodString;
131
131
  }, z.core.$strip>;
132
+ /** RFC 8414 authorization server metadata (`/.well-known/oauth-authorization-server`). */
133
+ export declare const OAuthServerMetadata: z.ZodObject<{
134
+ issuer: z.ZodString;
135
+ authorization_endpoint: z.ZodString;
136
+ token_endpoint: z.ZodString;
137
+ revocation_endpoint: z.ZodString;
138
+ scopes_supported: z.ZodArray<z.ZodString>;
139
+ response_types_supported: z.ZodArray<z.ZodString>;
140
+ grant_types_supported: z.ZodArray<z.ZodString>;
141
+ code_challenge_methods_supported: z.ZodArray<z.ZodString>;
142
+ token_endpoint_auth_methods_supported: z.ZodArray<z.ZodString>;
143
+ revocation_endpoint_auth_methods_supported: z.ZodArray<z.ZodString>;
144
+ service_documentation: z.ZodString;
145
+ }, z.core.$strip>;
132
146
  export declare const OAuthRevokeBody: z.ZodObject<{
133
147
  token: z.ZodString;
134
148
  client_id: z.ZodString;