samva 0.28.1 → 0.29.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 (63) hide show
  1. package/AGENTS.md +8 -0
  2. package/dist/client/sdk.gen.d.ts +156 -1
  3. package/dist/client/sdk.gen.js +475 -1
  4. package/dist/client/types.gen.d.ts +1653 -183
  5. package/dist/effect/campaigns.d.ts +32 -0
  6. package/dist/effect/generated/agents.js +36 -36
  7. package/dist/effect/generated/analytics.js +24 -24
  8. package/dist/effect/generated/api-keys.js +29 -29
  9. package/dist/effect/generated/attachments.js +13 -13
  10. package/dist/effect/generated/brands.js +13 -13
  11. package/dist/effect/generated/campaigns.d.ts +178 -60
  12. package/dist/effect/generated/campaigns.js +92 -104
  13. package/dist/effect/generated/contact-events.js +5 -5
  14. package/dist/effect/generated/contact-groups.js +38 -38
  15. package/dist/effect/generated/contacts.js +93 -93
  16. package/dist/effect/generated/conversations.js +38 -38
  17. package/dist/effect/generated/custom-fields.js +15 -15
  18. package/dist/effect/generated/email.js +225 -225
  19. package/dist/effect/generated/events.js +5 -5
  20. package/dist/effect/generated/extension-installations.js +35 -35
  21. package/dist/effect/generated/extensions.js +24 -24
  22. package/dist/effect/generated/feedback.js +6 -6
  23. package/dist/effect/generated/index.d.ts +5 -1
  24. package/dist/effect/generated/journeys.js +67 -67
  25. package/dist/effect/generated/mailboxes.js +286 -286
  26. package/dist/effect/generated/media.js +16 -16
  27. package/dist/effect/generated/messages.js +65 -65
  28. package/dist/effect/generated/namespaces.js +27 -27
  29. package/dist/effect/generated/operations.js +6 -6
  30. package/dist/effect/generated/organizations.js +19 -19
  31. package/dist/effect/generated/publication-domains.d.ts +548 -0
  32. package/dist/effect/generated/publication-domains.js +163 -0
  33. package/dist/effect/generated/scheduled-messages.js +25 -25
  34. package/dist/effect/generated/shared.d.ts +142 -30
  35. package/dist/effect/generated/shared.js +356 -328
  36. package/dist/effect/generated/subscriptions.js +10 -10
  37. package/dist/effect/generated/templates.d.ts +172 -15
  38. package/dist/effect/generated/templates.js +207 -162
  39. package/dist/effect/generated/topic-forms.js +21 -21
  40. package/dist/effect/generated/topic-issues.d.ts +2995 -0
  41. package/dist/effect/generated/topic-issues.js +985 -0
  42. package/dist/effect/generated/topics.d.ts +61 -1
  43. package/dist/effect/generated/topics.js +39 -31
  44. package/dist/effect/generated/webhooks.js +50 -50
  45. package/dist/effect/generated/whoami.js +10 -10
  46. package/dist/effect/generated-metadata.d.ts +70 -0
  47. package/dist/effect/generated-metadata.js +57 -13
  48. package/dist/effect/index.d.ts +2 -0
  49. package/dist/effect/index.js +3 -1
  50. package/dist/effect/journeys.d.ts +112 -112
  51. package/dist/effect/mailboxes.d.ts +78 -78
  52. package/dist/effect/publication-domains.d.ts +14 -0
  53. package/dist/effect/publication-domains.js +17 -0
  54. package/dist/effect/topic-issues.d.ts +57 -0
  55. package/dist/effect/topic-issues.js +33 -0
  56. package/dist/effect/topics.d.ts +6 -2
  57. package/dist/package.js +1 -1
  58. package/dist/promises/index.d.ts +5 -1
  59. package/dist/promises/index.js +5 -1
  60. package/dist/promises/types.gen.d.ts +1 -1
  61. package/dist/service-map.d.ts +74 -0
  62. package/dist/service-map.js +56 -0
  63. package/package.json +11 -3
@@ -3,11 +3,11 @@ import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
4
  //#region src/effect/generated/shared.ts
5
5
  const JsonValue = Schema.suspend(() => __recursive_JsonValue);
6
- const Cursor = /* @__PURE__ */ Schema.String.annotate({ identifier: "Cursor" });
7
- const NamespaceId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
6
+ const Cursor = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "Cursor" }))();
7
+ const NamespaceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
8
8
  expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
9
9
  identifier: "NamespaceId"
10
- })).pipe(Schema.brand("NamespaceId"));
10
+ })).pipe(Schema.brand("NamespaceId")))();
11
11
  var UnauthorizedError = class extends Schema.TaggedError()("UnauthorizedError", Schema.Struct({ message: Schema.String })) {};
12
12
  var ForbiddenError = class extends Schema.TaggedError()("ForbiddenError", Schema.Struct({ message: Schema.String })) {};
13
13
  var ValidationError = class extends Schema.TaggedError()("ValidationError", Schema.Struct({
@@ -19,22 +19,22 @@ var GatewayTimeoutError = class extends Schema.TaggedError()("GatewayTimeoutErro
19
19
  message: Schema.String,
20
20
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
21
21
  })) {};
22
- const AgentName = /* @__PURE__ */ Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
22
+ const AgentName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
23
23
  expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
24
24
  identifier: "AgentName"
25
- })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" }));
26
- const MailboxEndpointId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
25
+ })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })))();
26
+ const MailboxEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
27
27
  expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
28
28
  identifier: "MailboxEndpointId"
29
- })).pipe(Schema.brand("MailboxEndpointId"));
30
- const AgentIntegrationReference = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z]{2,8}_[0-9a-z]{16}$", "u")).annotate({
29
+ })).pipe(Schema.brand("MailboxEndpointId")))();
30
+ const AgentIntegrationReference = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z]{2,8}_[0-9a-z]{16}$", "u")).annotate({
31
31
  expected: "a string matching the RegExp ^[a-z]{2,8}_[0-9a-z]{16}$",
32
32
  identifier: "AgentIntegrationReference"
33
- }));
34
- const AgentMode = /* @__PURE__ */ Schema.Union([Schema.Literal("live"), Schema.Literal("supervised")]).annotate({ identifier: "AgentMode" });
35
- const AgentModel = /* @__PURE__ */ Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" });
36
- const TimeZone = /* @__PURE__ */ Schema.String.annotate({ identifier: "TimeZone" });
37
- const Weekday = /* @__PURE__ */ Schema.Union([
33
+ })))();
34
+ const AgentMode = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("live"), Schema.Literal("supervised")]).annotate({ identifier: "AgentMode" }))();
35
+ const AgentModel = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" }))();
36
+ const TimeZone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "TimeZone" }))();
37
+ const Weekday = /* @__PURE__ */ (() => Schema.Union([
38
38
  Schema.Literal("monday"),
39
39
  Schema.Literal("tuesday"),
40
40
  Schema.Literal("wednesday"),
@@ -42,11 +42,11 @@ const Weekday = /* @__PURE__ */ Schema.Union([
42
42
  Schema.Literal("friday"),
43
43
  Schema.Literal("saturday"),
44
44
  Schema.Literal("sunday")
45
- ]).annotate({ identifier: "Weekday" });
46
- const ClockTime = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
45
+ ]).annotate({ identifier: "Weekday" }))();
46
+ const ClockTime = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
47
47
  expected: "a string matching the RegExp ^(?:[01]\\d|2[0-3]):[0-5]\\d$",
48
48
  identifier: "ClockTime"
49
- }));
49
+ })))();
50
50
  var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFoundError", Schema.Struct({
51
51
  resource: Schema.String,
52
52
  id: Schema.String,
@@ -57,9 +57,9 @@ var ConflictError = class extends Schema.TaggedError()("ConflictError", Schema.S
57
57
  resource: Schema.String,
58
58
  id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
59
59
  })) {};
60
- const VersionCursor = /* @__PURE__ */ Schema.String.annotate({ identifier: "VersionCursor" });
60
+ const VersionCursor = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "VersionCursor" }))();
61
61
  var AnalyticsQueryError = class extends Schema.TaggedError()("AnalyticsQueryError", Schema.Struct({ message: Schema.String })) {};
62
- const ApiKeyResourceAccess = /* @__PURE__ */ Schema.Struct({
62
+ const ApiKeyResourceAccess = /* @__PURE__ */ (() => Schema.Struct({
63
63
  messages: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
64
64
  email: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
65
65
  domains: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
@@ -73,15 +73,15 @@ const ApiKeyResourceAccess = /* @__PURE__ */ Schema.Struct({
73
73
  organization: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
74
74
  billing: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
75
75
  analytics: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null]))
76
- }).annotate({ identifier: "ApiKeyResourceAccess" });
77
- const MailboxId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
76
+ }).annotate({ identifier: "ApiKeyResourceAccess" }))();
77
+ const MailboxId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
78
78
  expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
79
79
  identifier: "MailboxId"
80
- })).pipe(Schema.brand("MailboxId"));
81
- const MailboxSendMode = /* @__PURE__ */ Schema.Union([Schema.Literal("send"), Schema.Literal("approval")]).annotate({
80
+ })).pipe(Schema.brand("MailboxId")))();
81
+ const MailboxSendMode = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("send"), Schema.Literal("approval")]).annotate({
82
82
  description: "How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it.",
83
83
  identifier: "MailboxSendMode"
84
- });
84
+ }))();
85
85
  var PaymentRequiredError = class extends Schema.TaggedError()("PaymentRequiredError", Schema.Struct({
86
86
  message: Schema.String,
87
87
  resource: Schema.String,
@@ -93,119 +93,155 @@ var RateLimitedError = class extends Schema.TaggedError()("RateLimitedError", Sc
93
93
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
94
94
  })) {};
95
95
  var BillingProviderError = class extends Schema.TaggedError()("BillingProviderError", Schema.Struct({ message: Schema.String })) {};
96
- const ApiKeyId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
96
+ const ApiKeyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
97
97
  expected: "a string matching the RegExp ^key_[0-9a-hjkmnp-tv-z]{16,24}$",
98
98
  identifier: "ApiKeyId"
99
- })).pipe(Schema.brand("ApiKeyId"));
100
- const SuccessResponse = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean }).annotate({ identifier: "SuccessResponse" });
101
- const MessageId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
99
+ })).pipe(Schema.brand("ApiKeyId")))();
100
+ const SuccessResponse = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }).annotate({ identifier: "SuccessResponse" }))();
101
+ const MessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
102
102
  expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
103
103
  identifier: "MessageId"
104
- })).pipe(Schema.brand("MessageId"));
105
- const AttachmentId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
104
+ })).pipe(Schema.brand("MessageId")))();
105
+ const AttachmentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
106
106
  expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
107
107
  identifier: "AttachmentId"
108
- })).pipe(Schema.brand("AttachmentId"));
109
- const OrganizationId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
108
+ })).pipe(Schema.brand("AttachmentId")))();
109
+ const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
110
110
  expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
111
111
  identifier: "OrganizationId"
112
- })).pipe(Schema.brand("OrganizationId"));
113
- const BrandAssets = /* @__PURE__ */ Schema.Struct({
112
+ })).pipe(Schema.brand("OrganizationId")))();
113
+ const BrandAssets = /* @__PURE__ */ (() => Schema.Struct({
114
114
  logoUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
115
115
  logoDarkUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
116
116
  iconUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
117
- }).annotate({ identifier: "BrandAssets" });
118
- const BrandAddress = /* @__PURE__ */ Schema.Struct({
117
+ }).annotate({ identifier: "BrandAssets" }))();
118
+ const BrandAddress = /* @__PURE__ */ (() => Schema.Struct({
119
119
  street1: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
120
120
  street2: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
121
121
  city: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
122
122
  region: Schema.String,
123
123
  postalCode: Schema.String,
124
124
  country: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
125
- }).annotate({ identifier: "BrandAddress" });
126
- const BrandSocialLink = /* @__PURE__ */ Schema.Struct({
125
+ }).annotate({ identifier: "BrandAddress" }))();
126
+ const BrandSocialLink = /* @__PURE__ */ (() => Schema.Struct({
127
127
  label: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })),
128
128
  url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))
129
- }).annotate({ identifier: "BrandSocialLink" });
130
- const CampaignId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
129
+ }).annotate({ identifier: "BrandSocialLink" }))();
130
+ const CampaignId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
131
131
  expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
132
132
  identifier: "CampaignId"
133
- })).pipe(Schema.brand("CampaignId"));
134
- const MediaId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
133
+ })).pipe(Schema.brand("CampaignId")))();
134
+ const MediaId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
135
135
  expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
136
136
  identifier: "MediaId"
137
- })).pipe(Schema.brand("MediaId"));
138
- const TemplatePublicationId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
137
+ })).pipe(Schema.brand("MediaId")))();
138
+ const TemplatePublicationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
139
139
  expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$",
140
140
  identifier: "TemplatePublicationId"
141
- })).pipe(Schema.brand("TemplatePublicationId"));
142
- const TemplateInputContractId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tcon_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
141
+ })).pipe(Schema.brand("TemplatePublicationId")))();
142
+ const TemplateInputContractId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tcon_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
143
143
  expected: "a string matching the RegExp ^tcon_[0-9a-hjkmnp-tv-z]{16,24}$",
144
144
  identifier: "TemplateInputContractId"
145
- })).pipe(Schema.brand("TemplateInputContractId"));
146
- const TemplateId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
145
+ })).pipe(Schema.brand("TemplateInputContractId")))();
146
+ const TemplateId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
147
147
  expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$",
148
148
  identifier: "TemplateId"
149
- })).pipe(Schema.brand("TemplateId"));
150
- const JsonObject = /* @__PURE__ */ Schema.Record(Schema.String, JsonValue).annotate({ identifier: "JsonObject" });
151
- const RenderLocale = /* @__PURE__ */ Schema.String.check(Schema.isMaxCodePoints(64).annotate({
149
+ })).pipe(Schema.brand("TemplateId")))();
150
+ const JsonObject = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "JsonObject" }))();
151
+ const RenderLocale = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(64).annotate({
152
152
  expected: "a string with at most 64 code points",
153
153
  identifier: "RenderLocale"
154
- })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" }));
155
- const RenderTimeZone = /* @__PURE__ */ Schema.String.check(Schema.isMaxCodePoints(64).annotate({
154
+ })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })))();
155
+ const RenderTimeZone = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(64).annotate({
156
156
  expected: "a string with at most 64 code points",
157
157
  identifier: "RenderTimeZone"
158
- })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" }));
159
- const ReplyToAddresses = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null]).annotate({ identifier: "ReplyToAddresses" });
160
- const TopicId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
158
+ })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })))();
159
+ const ReplyToAddresses = /* @__PURE__ */ (() => Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null]).annotate({ identifier: "ReplyToAddresses" }))();
160
+ const TopicId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
161
161
  expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
162
162
  identifier: "TopicId"
163
- })).pipe(Schema.brand("TopicId"));
164
- const EmailTrackingOverrideV1 = /* @__PURE__ */ Schema.Struct({
163
+ })).pipe(Schema.brand("TopicId")))();
164
+ const EmailTrackingOverrideV1 = /* @__PURE__ */ (() => Schema.Struct({
165
165
  opens: Schema.optionalKey(Schema.Boolean.annotate({ description: "Override open tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking." })),
166
166
  clicks: Schema.optionalKey(Schema.Boolean.annotate({ description: "Override click tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking." }))
167
167
  }).annotate({
168
168
  description: "Requested per-send engagement tracking policy. Recipient opt-out takes precedence, then explicit fields, organization defaults, and product defaults.",
169
169
  identifier: "EmailTrackingOverrideV1"
170
- });
171
- const EmailFooterOverride = /* @__PURE__ */ Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }).annotate({ identifier: "EmailFooterOverride" });
172
- const EmailCustomHeaders = /* @__PURE__ */ Schema.Record(Schema.String, Schema.String).annotate({ description: "Custom headers copied onto the outgoing message. Each name is an RFC 5322 field name and each value is one non-empty line of printable ASCII. Names Samva or the transport own are rejected." }).check(Schema.isMaxProperties(11).annotate({
170
+ }))();
171
+ const EmailFooterOverride = /* @__PURE__ */ (() => Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }).annotate({ identifier: "EmailFooterOverride" }))();
172
+ const EmailCustomHeaders = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.String).annotate({ description: "Custom headers copied onto the outgoing message. Each name is an RFC 5322 field name and each value is one non-empty line of printable ASCII. Names Samva or the transport own are rejected." }).check(Schema.isMaxProperties(11).annotate({
173
173
  expected: "a value with at most 11 entries",
174
174
  identifier: "EmailCustomHeaders"
175
- }));
176
- const CampaignFrom = /* @__PURE__ */ Schema.Union([Schema.Struct({
175
+ })))();
176
+ const CampaignFrom = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
177
177
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
178
178
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
179
- }), Schema.Null]).annotate({ identifier: "CampaignFrom" });
180
- const ConversationId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
179
+ }), Schema.Null]).annotate({ identifier: "CampaignFrom" }))();
180
+ const ConversationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
181
181
  expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$",
182
182
  identifier: "ConversationId"
183
- })).pipe(Schema.brand("ConversationId"));
184
- const CampaignContentMetadata = /* @__PURE__ */ Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "CampaignContentMetadata" });
185
- const ContactId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
183
+ })).pipe(Schema.brand("ConversationId")))();
184
+ const CampaignContentMetadata = /* @__PURE__ */ (() => Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "CampaignContentMetadata" }))();
185
+ const ContactId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
186
186
  expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
187
187
  identifier: "ContactId"
188
- })).pipe(Schema.brand("ContactId"));
189
- const ContactGroupId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
188
+ })).pipe(Schema.brand("ContactId")))();
189
+ const ContactGroupId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
190
190
  expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$",
191
191
  identifier: "ContactGroupId"
192
- })).pipe(Schema.brand("ContactGroupId"));
193
- const CampaignRunId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
192
+ })).pipe(Schema.brand("ContactGroupId")))();
193
+ const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
194
194
  expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
195
195
  identifier: "CampaignRunId"
196
- })).pipe(Schema.brand("CampaignRunId"));
197
- const SendsSeries = /* @__PURE__ */ Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
196
+ })).pipe(Schema.brand("CampaignRunId")))();
197
+ const SendsSeries = /* @__PURE__ */ (() => Schema.Array(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))).annotate({
198
198
  description: "Daily email sends for the last 14 calendar days in the organization's own timezone, oldest first and zero-filled. Always fourteen entries; an entity that has never sent reports fourteen zeroes.",
199
199
  identifier: "SendsSeries"
200
- });
200
+ }))();
201
201
  var FlagDisabledError = class extends Schema.TaggedError()("FlagDisabledError", Schema.Struct({
202
202
  flag: Schema.String,
203
203
  message: Schema.String
204
204
  })) {};
205
- const EmailDomainId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
205
+ const EmailDomainId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
206
206
  expected: "a string matching the RegExp ^dom_[0-9a-hjkmnp-tv-z]{16,24}$",
207
207
  identifier: "EmailDomainId"
208
- })).pipe(Schema.brand("EmailDomainId"));
208
+ })).pipe(Schema.brand("EmailDomainId")))();
209
+ var TemplateSourceError = class extends Schema.TaggedError()("TemplateSourceError", Schema.Struct({
210
+ message: Schema.String,
211
+ diagnostics: Schema.Array(Schema.Struct({
212
+ code: Schema.String,
213
+ severity: Schema.Union([
214
+ Schema.Literal("error"),
215
+ Schema.Literal("warning"),
216
+ Schema.Literal("info")
217
+ ]),
218
+ message: Schema.String,
219
+ origins: Schema.Array(Schema.Struct({
220
+ fileName: Schema.String,
221
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
222
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
223
+ })),
224
+ clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
225
+ notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
226
+ provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
227
+ fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
228
+ occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
229
+ fileName: Schema.String,
230
+ lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
231
+ columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
232
+ }))), Schema.Null])),
233
+ compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
234
+ assessment: Schema.Union([
235
+ Schema.Literal("risk"),
236
+ Schema.Literal("degradation"),
237
+ Schema.Literal("unverified"),
238
+ Schema.Literal("not-applicable")
239
+ ]),
240
+ title: Schema.String
241
+ }), Schema.Null]))
242
+ })),
243
+ revision: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
244
+ })) {};
209
245
  var FromAddressRequiredError = class extends Schema.TaggedError()("FromAddressRequiredError", Schema.Struct({
210
246
  message: Schema.String,
211
247
  verifiedDomains: Schema.Array(Schema.String)
@@ -257,14 +293,14 @@ var DeliveryUnavailableError = class extends Schema.TaggedError()("DeliveryUnava
257
293
  message: Schema.String,
258
294
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
259
295
  })) {};
260
- const ContactIdentityId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
296
+ const ContactIdentityId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
261
297
  expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
262
298
  identifier: "ContactIdentityId"
263
- })).pipe(Schema.brand("ContactIdentityId"));
264
- const WebhookEndpointId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
299
+ })).pipe(Schema.brand("ContactIdentityId")))();
300
+ const WebhookEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
265
301
  expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$",
266
302
  identifier: "WebhookEndpointId"
267
- })).pipe(Schema.brand("WebhookEndpointId"));
303
+ })).pipe(Schema.brand("WebhookEndpointId")))();
268
304
  var EmailChannelError = class extends Schema.TaggedError()("EmailChannelError", Schema.Struct({
269
305
  reason: Schema.Union([
270
306
  Schema.Literal("transport"),
@@ -275,55 +311,55 @@ var EmailChannelError = class extends Schema.TaggedError()("EmailChannelError",
275
311
  message: Schema.String,
276
312
  statusCode: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
277
313
  })) {};
278
- const OperationId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
314
+ const OperationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
279
315
  expected: "a string matching the RegExp ^op_[0-9a-hjkmnp-tv-z]{16,24}$",
280
316
  identifier: "OperationId"
281
- })).pipe(Schema.brand("OperationId"));
282
- const EmailSenderId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
317
+ })).pipe(Schema.brand("OperationId")))();
318
+ const EmailSenderId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
283
319
  expected: "a string matching the RegExp ^sender_[0-9a-hjkmnp-tv-z]{16,24}$",
284
320
  identifier: "EmailSenderId"
285
- })).pipe(Schema.brand("EmailSenderId"));
286
- const ExtensionId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ext_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
321
+ })).pipe(Schema.brand("EmailSenderId")))();
322
+ const ExtensionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ext_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
287
323
  expected: "a string matching the RegExp ^ext_[0-9a-hjkmnp-tv-z]{16,24}$",
288
324
  identifier: "ExtensionId"
289
- })).pipe(Schema.brand("ExtensionId"));
290
- const ExtensionVersionId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^extver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
325
+ })).pipe(Schema.brand("ExtensionId")))();
326
+ const ExtensionVersionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^extver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
291
327
  expected: "a string matching the RegExp ^extver_[0-9a-hjkmnp-tv-z]{16,24}$",
292
328
  identifier: "ExtensionVersionId"
293
- })).pipe(Schema.brand("ExtensionVersionId"));
294
- const UserId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
329
+ })).pipe(Schema.brand("ExtensionVersionId")))();
330
+ const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
295
331
  expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
296
332
  identifier: "UserId"
297
- })).pipe(Schema.brand("UserId"));
298
- const FeedbackContext = /* @__PURE__ */ Schema.Struct({
333
+ })).pipe(Schema.brand("UserId")))();
334
+ const FeedbackContext = /* @__PURE__ */ (() => Schema.Struct({
299
335
  operation: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The operation the report is about, as an SDK method, MCP tool, CLI command, or `METHOD /path` (for example `POST /v1/messages`)." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
300
336
  resourceId: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The id of the resource involved, such as a message or domain id." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null]))
301
- }).annotate({ identifier: "FeedbackContext" });
302
- const JourneyName = /* @__PURE__ */ Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
337
+ }).annotate({ identifier: "FeedbackContext" }))();
338
+ const JourneyName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
303
339
  expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
304
340
  identifier: "JourneyName"
305
- })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" }));
306
- const JourneyCustomEventName = /* @__PURE__ */ Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({
341
+ })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })))();
342
+ const JourneyCustomEventName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({
307
343
  expected: "a string with at most 255 code points",
308
344
  identifier: "JourneyCustomEventName"
309
- })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" }));
310
- const JourneyContactCreatedTrigger = /* @__PURE__ */ Schema.Struct({ type: Schema.Literal("contact.created") }).annotate({ identifier: "JourneyContactCreatedTrigger" });
311
- const JourneyTagAddedTrigger = /* @__PURE__ */ Schema.Struct({
345
+ })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })))();
346
+ const JourneyContactCreatedTrigger = /* @__PURE__ */ (() => Schema.Struct({ type: Schema.Literal("contact.created") }).annotate({ identifier: "JourneyContactCreatedTrigger" }))();
347
+ const JourneyTagAddedTrigger = /* @__PURE__ */ (() => Schema.Struct({
312
348
  type: Schema.Literal("contact.tag_added"),
313
349
  tag: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
314
- }).annotate({ identifier: "JourneyTagAddedTrigger" });
315
- const JourneyNodeId = /* @__PURE__ */ Schema.String.check(Schema.isMinLength(1).annotate({
350
+ }).annotate({ identifier: "JourneyTagAddedTrigger" }))();
351
+ const JourneyNodeId = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({
316
352
  expected: "a value with a length of at least 1",
317
353
  identifier: "JourneyNodeId"
318
- }));
319
- const JourneyWaitConfig = /* @__PURE__ */ Schema.Struct({ durationSeconds: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(7776e3).annotate({ expected: "a value less than or equal to 7776000" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })) }).annotate({ identifier: "JourneyWaitConfig" });
320
- const JourneyEmptyConfig = /* @__PURE__ */ Schema.Record(Schema.String, Schema.Never).annotate({ identifier: "JourneyEmptyConfig" });
321
- const JourneyTagPredicate = /* @__PURE__ */ Schema.Struct({
354
+ })))();
355
+ const JourneyWaitConfig = /* @__PURE__ */ (() => Schema.Struct({ durationSeconds: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(7776e3).annotate({ expected: "a value less than or equal to 7776000" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })) }).annotate({ identifier: "JourneyWaitConfig" }))();
356
+ const JourneyEmptyConfig = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.Never).annotate({ identifier: "JourneyEmptyConfig" }))();
357
+ const JourneyTagPredicate = /* @__PURE__ */ (() => Schema.Struct({
322
358
  type: Schema.Literal("tag"),
323
359
  tag: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
324
360
  present: Schema.Boolean
325
- }).annotate({ identifier: "JourneyTagPredicate" });
326
- const JourneyContactProperty = /* @__PURE__ */ Schema.Union([
361
+ }).annotate({ identifier: "JourneyTagPredicate" }))();
362
+ const JourneyContactProperty = /* @__PURE__ */ (() => Schema.Union([
327
363
  Schema.Literal("name"),
328
364
  Schema.Literal("displayName"),
329
365
  Schema.Literal("externalId"),
@@ -337,8 +373,8 @@ const JourneyContactProperty = /* @__PURE__ */ Schema.Union([
337
373
  Schema.Literal("profile.location.state"),
338
374
  Schema.Literal("profile.location.city"),
339
375
  Schema.Literal("profile.location.timezone")
340
- ]).annotate({ identifier: "JourneyContactProperty" });
341
- const JourneyEqualityComparison = /* @__PURE__ */ Schema.Struct({
376
+ ]).annotate({ identifier: "JourneyContactProperty" }))();
377
+ const JourneyEqualityComparison = /* @__PURE__ */ (() => Schema.Struct({
342
378
  operator: Schema.Union([Schema.Literal("eq"), Schema.Literal("neq")]),
343
379
  value: Schema.Union([
344
380
  Schema.String,
@@ -346,8 +382,8 @@ const JourneyEqualityComparison = /* @__PURE__ */ Schema.Struct({
346
382
  Schema.Boolean,
347
383
  Schema.Null
348
384
  ])
349
- }).annotate({ identifier: "JourneyEqualityComparison" });
350
- const JourneyNumericComparison = /* @__PURE__ */ Schema.Struct({
385
+ }).annotate({ identifier: "JourneyEqualityComparison" }))();
386
+ const JourneyNumericComparison = /* @__PURE__ */ (() => Schema.Struct({
351
387
  operator: Schema.Union([
352
388
  Schema.Literal("gt"),
353
389
  Schema.Literal("gte"),
@@ -355,8 +391,8 @@ const JourneyNumericComparison = /* @__PURE__ */ Schema.Struct({
355
391
  Schema.Literal("lte")
356
392
  ]),
357
393
  value: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
358
- }).annotate({ identifier: "JourneyNumericComparison" });
359
- const JourneyStringComparison = /* @__PURE__ */ Schema.Struct({
394
+ }).annotate({ identifier: "JourneyNumericComparison" }))();
395
+ const JourneyStringComparison = /* @__PURE__ */ (() => Schema.Struct({
360
396
  operator: Schema.Union([
361
397
  Schema.Literal("contains"),
362
398
  Schema.Literal("not_contains"),
@@ -364,41 +400,41 @@ const JourneyStringComparison = /* @__PURE__ */ Schema.Struct({
364
400
  Schema.Literal("ends_with")
365
401
  ]),
366
402
  value: Schema.String
367
- }).annotate({ identifier: "JourneyStringComparison" });
368
- const JourneyPresenceComparison = /* @__PURE__ */ Schema.Struct({ operator: Schema.Union([Schema.Literal("exists"), Schema.Literal("not_exists")]) }).annotate({ identifier: "JourneyPresenceComparison" });
369
- const JourneyUpdateTagsConfig = /* @__PURE__ */ Schema.Struct({
403
+ }).annotate({ identifier: "JourneyStringComparison" }))();
404
+ const JourneyPresenceComparison = /* @__PURE__ */ (() => Schema.Struct({ operator: Schema.Union([Schema.Literal("exists"), Schema.Literal("not_exists")]) }).annotate({ identifier: "JourneyPresenceComparison" }))();
405
+ const JourneyUpdateTagsConfig = /* @__PURE__ */ (() => Schema.Struct({
370
406
  add: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
371
407
  remove: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })))
372
- }).annotate({ identifier: "JourneyUpdateTagsConfig" });
373
- const MailboxChannel = /* @__PURE__ */ Schema.Literal("email").annotate({
408
+ }).annotate({ identifier: "JourneyUpdateTagsConfig" }))();
409
+ const MailboxChannel = /* @__PURE__ */ (() => Schema.Literal("email").annotate({
374
410
  description: "The channel an endpoint, thread, or message belongs to.",
375
411
  identifier: "MailboxChannel"
376
- });
377
- const MailboxMetadata = /* @__PURE__ */ Schema.Record(Schema.String, Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
412
+ }))();
413
+ const MailboxMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" }))).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
378
414
  expected: "an object with property names matching the schema",
379
415
  identifier: "MailboxMetadata"
380
- }));
381
- const MailboxMetadataPatch = /* @__PURE__ */ Schema.Record(Schema.String, Schema.Union([Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null])).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
416
+ })))();
417
+ const MailboxMetadataPatch = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.Union([Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null])).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
382
418
  expected: "an object with property names matching the schema",
383
419
  identifier: "MailboxMetadataPatch"
384
- }));
385
- const MailboxThreadId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
420
+ })))();
421
+ const MailboxThreadId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
386
422
  expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
387
423
  identifier: "MailboxThreadId"
388
- })).pipe(Schema.brand("MailboxThreadId"));
389
- const MailboxActionId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
424
+ })).pipe(Schema.brand("MailboxThreadId")))();
425
+ const MailboxActionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
390
426
  expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
391
427
  identifier: "MailboxActionId"
392
- })).pipe(Schema.brand("MailboxActionId"));
393
- const MailboxDraftId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
428
+ })).pipe(Schema.brand("MailboxActionId")))();
429
+ const MailboxDraftId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
394
430
  expected: "a string matching the RegExp ^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$",
395
431
  identifier: "MailboxDraftId"
396
- })).pipe(Schema.brand("MailboxDraftId"));
397
- const MailboxPolicyId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
432
+ })).pipe(Schema.brand("MailboxDraftId")))();
433
+ const MailboxPolicyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
398
434
  expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
399
435
  identifier: "MailboxPolicyId"
400
- })).pipe(Schema.brand("MailboxPolicyId"));
401
- const MailboxSendError = /* @__PURE__ */ Schema.Union([
436
+ })).pipe(Schema.brand("MailboxPolicyId")))();
437
+ const MailboxSendError = /* @__PURE__ */ (() => Schema.Union([
402
438
  Schema.TaggedStruct("SenderNotReadyError", {
403
439
  message: Schema.String,
404
440
  sender: Schema.String,
@@ -456,99 +492,67 @@ const MailboxSendError = /* @__PURE__ */ Schema.Union([
456
492
  id: Schema.String,
457
493
  message: Schema.String
458
494
  })
459
- ]).annotate({ identifier: "MailboxSendError" });
460
- const MailboxThreadFolder = /* @__PURE__ */ Schema.Union([
495
+ ]).annotate({ identifier: "MailboxSendError" }))();
496
+ const MailboxThreadFolder = /* @__PURE__ */ (() => Schema.Union([
461
497
  Schema.Literal("inbox"),
462
498
  Schema.Literal("assigned"),
463
499
  Schema.Literal("pending"),
464
500
  Schema.Literal("sent"),
465
501
  Schema.Literal("archived"),
466
502
  Schema.Literal("trash")
467
- ]).annotate({ identifier: "MailboxThreadFolder" });
468
- const MailboxGrantRole = /* @__PURE__ */ Schema.Union([
503
+ ]).annotate({ identifier: "MailboxThreadFolder" }))();
504
+ const MailboxGrantRole = /* @__PURE__ */ (() => Schema.Union([
469
505
  Schema.Literal("admin"),
470
506
  Schema.Literal("collaborator"),
471
507
  Schema.Literal("viewer")
472
- ]).annotate({ identifier: "MailboxGrantRole" });
473
- const MailboxLabelId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^label_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
508
+ ]).annotate({ identifier: "MailboxGrantRole" }))();
509
+ const MailboxLabelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^label_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
474
510
  expected: "a string matching the RegExp ^label_[0-9a-hjkmnp-tv-z]{16,24}$",
475
511
  identifier: "MailboxLabelId"
476
- })).pipe(Schema.brand("MailboxLabelId"));
477
- const MailboxPolicyOutcomeKind = /* @__PURE__ */ Schema.Union([Schema.Literal("requireApproval"), Schema.Literal("deny")]).annotate({ identifier: "MailboxPolicyOutcomeKind" });
478
- const MailboxThreadPriority = /* @__PURE__ */ Schema.Union([
512
+ })).pipe(Schema.brand("MailboxLabelId")))();
513
+ const MailboxPolicyOutcomeKind = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("requireApproval"), Schema.Literal("deny")]).annotate({ identifier: "MailboxPolicyOutcomeKind" }))();
514
+ const MailboxThreadPriority = /* @__PURE__ */ (() => Schema.Union([
479
515
  Schema.Literal("low"),
480
516
  Schema.Literal("normal"),
481
517
  Schema.Literal("high"),
482
518
  Schema.Literal("urgent")
483
- ]).annotate({ identifier: "MailboxThreadPriority" });
484
- const MessageMetadata = /* @__PURE__ */ Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "MessageMetadata" });
485
- const EmailSender = /* @__PURE__ */ Schema.Union([Schema.Struct({
519
+ ]).annotate({ identifier: "MailboxThreadPriority" }))();
520
+ const MessageMetadata = /* @__PURE__ */ (() => Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "MessageMetadata" }))();
521
+ const EmailSender = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
486
522
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
487
523
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
488
- }), Schema.Null]).annotate({ identifier: "EmailSender" });
489
- const IanaTimezone = /* @__PURE__ */ Schema.String.annotate({ identifier: "IanaTimezone" });
490
- const NamespaceMetadata = /* @__PURE__ */ Schema.Record(Schema.String, Schema.String).annotate({
524
+ }), Schema.Null]).annotate({ identifier: "EmailSender" }))();
525
+ const IanaTimezone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "IanaTimezone" }))();
526
+ const NamespaceMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.String).annotate({
491
527
  description: "Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.",
492
528
  identifier: "NamespaceMetadata"
493
- });
494
- const NamespaceResourceType = /* @__PURE__ */ Schema.Union([
529
+ }))();
530
+ const NamespaceResourceType = /* @__PURE__ */ (() => Schema.Union([
495
531
  Schema.Literal("domain"),
496
532
  Schema.Literal("sender"),
497
533
  Schema.Literal("contact"),
498
534
  Schema.Literal("template")
499
- ]).annotate({ identifier: "NamespaceResourceType" });
500
- const OperationResource = /* @__PURE__ */ Schema.Struct({
535
+ ]).annotate({ identifier: "NamespaceResourceType" }))();
536
+ const OperationResource = /* @__PURE__ */ (() => Schema.Struct({
501
537
  type: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
502
538
  id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
503
- }).annotate({ identifier: "OperationResource" });
504
- const TemplateFromDefault = /* @__PURE__ */ Schema.Struct({
539
+ }).annotate({ identifier: "OperationResource" }))();
540
+ const TemplateProjectId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
541
+ expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
542
+ identifier: "TemplateProjectId"
543
+ })).pipe(Schema.brand("TemplateProjectId")))();
544
+ const TemplateFromDefault = /* @__PURE__ */ (() => Schema.Struct({
505
545
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
506
546
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
507
- }).annotate({ identifier: "TemplateFromDefault" });
508
- const TemplateTrackingDefault = /* @__PURE__ */ Schema.Struct({
547
+ }).annotate({ identifier: "TemplateFromDefault" }))();
548
+ const TemplateTrackingDefault = /* @__PURE__ */ (() => Schema.Struct({
509
549
  opens: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
510
550
  clicks: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
511
- }).annotate({ identifier: "TemplateTrackingDefault" });
512
- var TemplateSourceError = class extends Schema.TaggedError()("TemplateSourceError", Schema.Struct({
513
- message: Schema.String,
514
- diagnostics: Schema.Array(Schema.Struct({
515
- code: Schema.String,
516
- severity: Schema.Union([
517
- Schema.Literal("error"),
518
- Schema.Literal("warning"),
519
- Schema.Literal("info")
520
- ]),
521
- message: Schema.String,
522
- origins: Schema.Array(Schema.Struct({
523
- fileName: Schema.String,
524
- lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
525
- columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
526
- })),
527
- clients: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
528
- notes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
529
- provenance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
530
- fixtures: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
531
- occurrences: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Array(Schema.Struct({
532
- fileName: Schema.String,
533
- lineNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
534
- columnNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
535
- }))), Schema.Null])),
536
- compatibility: Schema.optionalKey(Schema.Union([Schema.Struct({
537
- assessment: Schema.Union([
538
- Schema.Literal("risk"),
539
- Schema.Literal("degradation"),
540
- Schema.Literal("unverified"),
541
- Schema.Literal("not-applicable")
542
- ]),
543
- title: Schema.String
544
- }), Schema.Null]))
545
- })),
546
- revision: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
547
- })) {};
548
- const TopicContactByEmail = /* @__PURE__ */ Schema.Struct({ email: Schema.String }).annotate({ identifier: "TopicContactByEmail" });
549
- const TopicContactByPhone = /* @__PURE__ */ Schema.Struct({ phone: Schema.String }).annotate({ identifier: "TopicContactByPhone" });
550
- const TestWebhookPayload = /* @__PURE__ */ Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" });
551
- const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
551
+ }).annotate({ identifier: "TemplateTrackingDefault" }))();
552
+ const TopicContactByEmail = /* @__PURE__ */ (() => Schema.Struct({ email: Schema.String }).annotate({ identifier: "TopicContactByEmail" }))();
553
+ const TopicContactByPhone = /* @__PURE__ */ (() => Schema.Struct({ phone: Schema.String }).annotate({ identifier: "TopicContactByPhone" }))();
554
+ const TestWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" }))();
555
+ const CreateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({
552
556
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
553
557
  projectName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
554
558
  slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
@@ -568,17 +572,17 @@ const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
568
572
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace." })),
569
573
  shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with `namespaceId`, and not from a namespace-scoped key." })),
570
574
  idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
571
- }).annotate({ identifier: "CreateTemplatePayload" });
572
- const WorkingHoursRange = /* @__PURE__ */ Schema.Struct({
575
+ }).annotate({ identifier: "CreateTemplatePayload" }))();
576
+ const WorkingHoursRange = /* @__PURE__ */ (() => Schema.Struct({
573
577
  day: Weekday,
574
578
  opens: ClockTime,
575
579
  closes: ClockTime
576
- }).annotate({ identifier: "WorkingHoursRange" });
577
- const CampaignReplyMailbox = /* @__PURE__ */ Schema.Union([Schema.Union([MailboxId, Schema.Null]), Schema.Null]).annotate({
580
+ }).annotate({ identifier: "WorkingHoursRange" }))();
581
+ const CampaignReplyMailbox = /* @__PURE__ */ (() => Schema.Union([Schema.Union([MailboxId, Schema.Null]), Schema.Null]).annotate({
578
582
  description: "Omit to inherit the topic mailbox; null disables mailbox inheritance. An explicit email.replyTo overrides an inherited mailbox.",
579
583
  identifier: "CampaignReplyMailbox"
580
- });
581
- const CreateWebhookPayload = /* @__PURE__ */ Schema.Struct({
584
+ }))();
585
+ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
582
586
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ expected: "a string with at most 100 code points" })).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })),
583
587
  url: Schema.String,
584
588
  eventTypes: Schema.Array(Schema.Union([
@@ -627,8 +631,8 @@ const CreateWebhookPayload = /* @__PURE__ */ Schema.Struct({
627
631
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
628
632
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
629
633
  status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
630
- }).annotate({ identifier: "CreateWebhookPayload" });
631
- const UpdateWebhookPayload = /* @__PURE__ */ Schema.Struct({
634
+ }).annotate({ identifier: "CreateWebhookPayload" }))();
635
+ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
632
636
  name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ expected: "a string with at most 100 code points" })).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })), Schema.Null])),
633
637
  url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
634
638
  eventTypes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
@@ -677,8 +681,8 @@ const UpdateWebhookPayload = /* @__PURE__ */ Schema.Struct({
677
681
  namespaceId: Schema.optionalKey(Schema.Union([Schema.Union([NamespaceId, Schema.Null]), Schema.Null])),
678
682
  headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
679
683
  status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
680
- }).annotate({ identifier: "UpdateWebhookPayload" });
681
- const ApiKeyMailboxAccess = /* @__PURE__ */ Schema.Struct({
684
+ }).annotate({ identifier: "UpdateWebhookPayload" }))();
685
+ const ApiKeyMailboxAccess = /* @__PURE__ */ (() => Schema.Struct({
682
686
  permissions: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
683
687
  Schema.Literal("read"),
684
688
  Schema.Literal("update"),
@@ -692,29 +696,29 @@ const ApiKeyMailboxAccess = /* @__PURE__ */ Schema.Struct({
692
696
  ])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail." }),
693
697
  mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
694
698
  sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
695
- }).annotate({ identifier: "ApiKeyMailboxAccess" });
696
- const BrandFooter = /* @__PURE__ */ Schema.Struct({
699
+ }).annotate({ identifier: "ApiKeyMailboxAccess" }))();
700
+ const BrandFooter = /* @__PURE__ */ (() => Schema.Struct({
697
701
  companyName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null])),
698
702
  websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
699
703
  address: Schema.optionalKey(Schema.Union([BrandAddress, Schema.Null])),
700
704
  socialLinks: Schema.optionalKey(Schema.Union([Schema.Array(BrandSocialLink).check(Schema.isMaxLength(12).annotate({ expected: "a value with a length of at most 12" })), Schema.Null]))
701
- }).annotate({ identifier: "BrandFooter" });
702
- const EmailAttachment = /* @__PURE__ */ Schema.Struct({
705
+ }).annotate({ identifier: "BrandFooter" }))();
706
+ const EmailAttachment = /* @__PURE__ */ (() => Schema.Struct({
703
707
  filename: Schema.String,
704
708
  content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
705
709
  mediaId: Schema.optionalKey(Schema.Union([MediaId, Schema.Null])),
706
710
  contentType: Schema.String,
707
711
  size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(26214400).annotate({ expected: "a value less than or equal to 26214400" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
708
- }).annotate({ identifier: "EmailAttachment" });
709
- const TemplateData = /* @__PURE__ */ Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "TemplateData" });
710
- const ContactConsent = /* @__PURE__ */ Schema.Struct({
712
+ }).annotate({ identifier: "EmailAttachment" }))();
713
+ const TemplateData = /* @__PURE__ */ (() => Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "TemplateData" }))();
714
+ const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
711
715
  status: Schema.Union([Schema.Literal("opted_in"), Schema.Literal("opted_out")]),
712
716
  source: Schema.String,
713
717
  capturedAt: Schema.String,
714
718
  proof: Schema.Union([JsonObject, Schema.Null])
715
- }).annotate({ identifier: "ContactConsent" });
716
- const JourneyWebhookConfig = /* @__PURE__ */ Schema.Struct({ data: Schema.optionalKey(JsonObject) }).annotate({ identifier: "JourneyWebhookConfig" });
717
- const SkippedRecipient = /* @__PURE__ */ Schema.Struct({
719
+ }).annotate({ identifier: "ContactConsent" }))();
720
+ const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(JsonObject) }).annotate({ identifier: "JourneyWebhookConfig" }))();
721
+ const SkippedRecipient = /* @__PURE__ */ (() => Schema.Struct({
718
722
  address: Schema.String,
719
723
  reason: Schema.Union([
720
724
  Schema.Literal("bounce"),
@@ -724,9 +728,9 @@ const SkippedRecipient = /* @__PURE__ */ Schema.Struct({
724
728
  Schema.Literal("topic-unsubscribe")
725
729
  ]),
726
730
  topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null]))
727
- }).annotate({ identifier: "SkippedRecipient" });
728
- const CampaignConversationRef = /* @__PURE__ */ Schema.Union([Schema.Union([ConversationId, Schema.Null]), Schema.Null]).annotate({ identifier: "CampaignConversationRef" });
729
- const ContactEvent = /* @__PURE__ */ Schema.Struct({
731
+ }).annotate({ identifier: "SkippedRecipient" }))();
732
+ const CampaignConversationRef = /* @__PURE__ */ (() => Schema.Union([Schema.Union([ConversationId, Schema.Null]), Schema.Null]).annotate({ identifier: "CampaignConversationRef" }))();
733
+ const ContactEvent = /* @__PURE__ */ (() => Schema.Struct({
730
734
  id: Schema.String,
731
735
  contactId: ContactId,
732
736
  name: Schema.String,
@@ -734,8 +738,8 @@ const ContactEvent = /* @__PURE__ */ Schema.Struct({
734
738
  properties: JsonObject,
735
739
  occurredAt: Schema.String,
736
740
  recordedAt: Schema.String
737
- }).annotate({ identifier: "ContactEvent" });
738
- const ContactEventReference = /* @__PURE__ */ Schema.Union([
741
+ }).annotate({ identifier: "ContactEvent" }))();
742
+ const ContactEventReference = /* @__PURE__ */ (() => Schema.Union([
739
743
  Schema.Struct({
740
744
  id: ContactId,
741
745
  externalId: Schema.optionalKey(Schema.Never),
@@ -751,25 +755,45 @@ const ContactEventReference = /* @__PURE__ */ Schema.Union([
751
755
  id: Schema.optionalKey(Schema.Never),
752
756
  externalId: Schema.optionalKey(Schema.Never)
753
757
  })
754
- ]).annotate({ identifier: "ContactEventReference" });
755
- const EmailRecipient = /* @__PURE__ */ Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
758
+ ]).annotate({ identifier: "ContactEventReference" }))();
759
+ const EmailRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
756
760
  email: Schema.String,
757
761
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
758
762
  displayName: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
759
- })]).annotate({ identifier: "EmailRecipient" });
760
- const TopicContactById = /* @__PURE__ */ Schema.Struct({ contactId: ContactId }).annotate({ identifier: "TopicContactById" });
761
- const CampaignAudience = /* @__PURE__ */ Schema.Struct({
763
+ })]).annotate({ identifier: "EmailRecipient" }))();
764
+ const TopicContactById = /* @__PURE__ */ (() => Schema.Struct({ contactId: ContactId }).annotate({ identifier: "TopicContactById" }))();
765
+ const CampaignAudience = /* @__PURE__ */ (() => Schema.Struct({
762
766
  topicId: TopicId,
763
767
  includeTags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
764
768
  excludeTags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
765
769
  contactIds: Schema.optionalKey(Schema.Union([Schema.Array(ContactId).check(Schema.isMaxLength(25e3).annotate({ expected: "a value with a length of at most 25000" })), Schema.Null])),
766
770
  groupIds: Schema.optionalKey(Schema.Union([Schema.Array(ContactGroupId).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })), Schema.Null]))
767
- }).annotate({ identifier: "CampaignAudience" });
768
- const JourneyGroupJoinedTrigger = /* @__PURE__ */ Schema.Struct({
771
+ }).annotate({ identifier: "CampaignAudience" }))();
772
+ const JourneyGroupJoinedTrigger = /* @__PURE__ */ (() => Schema.Struct({
769
773
  type: Schema.Literal("contact.joined_group"),
770
774
  groupId: ContactGroupId
771
- }).annotate({ identifier: "JourneyGroupJoinedTrigger" });
772
- const MessageSummary = /* @__PURE__ */ Schema.Struct({
775
+ }).annotate({ identifier: "JourneyGroupJoinedTrigger" }))();
776
+ const CampaignLatestRun = /* @__PURE__ */ (() => Schema.Struct({
777
+ id: CampaignRunId,
778
+ status: Schema.Union([
779
+ Schema.Literal("scheduled"),
780
+ Schema.Literal("resolving"),
781
+ Schema.Literal("dispatching"),
782
+ Schema.Literal("paused"),
783
+ Schema.Literal("completed"),
784
+ Schema.Literal("cancelled"),
785
+ Schema.Literal("failed")
786
+ ]),
787
+ scheduledFor: Schema.String,
788
+ completedAt: Schema.Union([Schema.String, Schema.Null]),
789
+ totalRecipients: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
790
+ dispatchedCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
791
+ failedCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
792
+ skippedCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
793
+ pendingCount: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
794
+ estimatedCompletionAt: Schema.Union([Schema.String, Schema.Null])
795
+ }).annotate({ identifier: "CampaignLatestRun" }))();
796
+ const MessageSummary = /* @__PURE__ */ (() => Schema.Struct({
773
797
  id: MessageId,
774
798
  campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
775
799
  campaignId: CampaignId,
@@ -806,17 +830,17 @@ const MessageSummary = /* @__PURE__ */ Schema.Struct({
806
830
  Schema.Literal("screening-unavailable")
807
831
  ]), Schema.Null]),
808
832
  createdAt: Schema.String
809
- }).annotate({ identifier: "MessageSummary" });
810
- const JourneySendEmailConfig = /* @__PURE__ */ Schema.Struct({
833
+ }).annotate({ identifier: "MessageSummary" }))();
834
+ const JourneySendEmailConfig = /* @__PURE__ */ (() => Schema.Struct({
811
835
  template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
812
836
  senderId: Schema.optionalKey(EmailSenderId),
813
837
  templateData: Schema.optionalKey(JsonObject)
814
- }).annotate({ identifier: "JourneySendEmailConfig" });
815
- const ExtensionVersionRef = /* @__PURE__ */ Schema.Struct({
838
+ }).annotate({ identifier: "JourneySendEmailConfig" }))();
839
+ const ExtensionVersionRef = /* @__PURE__ */ (() => Schema.Struct({
816
840
  id: ExtensionVersionId,
817
841
  version: Schema.String
818
- }).annotate({ identifier: "ExtensionVersionRef" });
819
- const SendFeedback = /* @__PURE__ */ Schema.Struct({
842
+ }).annotate({ identifier: "ExtensionVersionRef" }))();
843
+ const SendFeedback = /* @__PURE__ */ (() => Schema.Struct({
820
844
  message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
821
845
  category: Schema.optionalKey(Schema.Union([Schema.Union([
822
846
  Schema.Literal("bug"),
@@ -825,38 +849,38 @@ const SendFeedback = /* @__PURE__ */ Schema.Struct({
825
849
  Schema.Literal("other")
826
850
  ]).annotate({ description: "`bug`: the API behaved wrongly. `confusing`: a response, error, or doc was hard to act on. `missing`: a capability or field you needed does not exist. `other`: anything else." }), Schema.Null])),
827
851
  context: Schema.optionalKey(Schema.Union([FeedbackContext, Schema.Null]))
828
- }).annotate({ identifier: "SendFeedback" });
829
- const JourneyCustomEventTrigger = /* @__PURE__ */ Schema.Struct({
852
+ }).annotate({ identifier: "SendFeedback" }))();
853
+ const JourneyCustomEventTrigger = /* @__PURE__ */ (() => Schema.Struct({
830
854
  type: Schema.Literal("event"),
831
855
  eventName: JourneyCustomEventName
832
- }).annotate({ identifier: "JourneyCustomEventTrigger" });
833
- const JourneyEventName = /* @__PURE__ */ Schema.Union([JourneyCustomEventName, Schema.Union([
856
+ }).annotate({ identifier: "JourneyCustomEventTrigger" }))();
857
+ const JourneyEventName = /* @__PURE__ */ (() => Schema.Union([JourneyCustomEventName, Schema.Union([
834
858
  Schema.Literal("contact.created"),
835
859
  Schema.Literal("contact.tag_added"),
836
860
  Schema.Literal("contact.joined_group")
837
- ])]).annotate({ identifier: "JourneyEventName" });
838
- const JourneyNextEdge = /* @__PURE__ */ Schema.Struct({ nodeId: JourneyNodeId }).annotate({ identifier: "JourneyNextEdge" });
839
- const JourneyWaitEventEdge = /* @__PURE__ */ Schema.Struct({
861
+ ])]).annotate({ identifier: "JourneyEventName" }))();
862
+ const JourneyNextEdge = /* @__PURE__ */ (() => Schema.Struct({ nodeId: JourneyNodeId }).annotate({ identifier: "JourneyNextEdge" }))();
863
+ const JourneyWaitEventEdge = /* @__PURE__ */ (() => Schema.Struct({
840
864
  nodeId: JourneyNodeId,
841
865
  outcome: Schema.Union([Schema.Literal("matched"), Schema.Literal("timed_out")])
842
- }).annotate({ identifier: "JourneyWaitEventEdge" });
843
- const JourneyExitNode = /* @__PURE__ */ Schema.Struct({
866
+ }).annotate({ identifier: "JourneyWaitEventEdge" }))();
867
+ const JourneyExitNode = /* @__PURE__ */ (() => Schema.Struct({
844
868
  type: Schema.Literal("exit"),
845
869
  config: JourneyEmptyConfig,
846
870
  next: Schema.Tuple([])
847
- }).annotate({ identifier: "JourneyExitNode" });
848
- const JourneyComparison = /* @__PURE__ */ Schema.Union([
871
+ }).annotate({ identifier: "JourneyExitNode" }))();
872
+ const JourneyComparison = /* @__PURE__ */ (() => Schema.Union([
849
873
  JourneyEqualityComparison,
850
874
  JourneyNumericComparison,
851
875
  JourneyStringComparison,
852
876
  JourneyPresenceComparison
853
- ]).annotate({ identifier: "JourneyComparison" });
854
- const CreateMailboxEndpointPayload = /* @__PURE__ */ Schema.Struct({
877
+ ]).annotate({ identifier: "JourneyComparison" }))();
878
+ const CreateMailboxEndpointPayload = /* @__PURE__ */ (() => Schema.Struct({
855
879
  channel: MailboxChannel,
856
880
  address: Schema.String,
857
881
  displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
858
- }).annotate({ identifier: "CreateMailboxEndpointPayload" });
859
- const MailboxActionDecision = /* @__PURE__ */ Schema.Struct({
882
+ }).annotate({ identifier: "CreateMailboxEndpointPayload" }))();
883
+ const MailboxActionDecision = /* @__PURE__ */ (() => Schema.Struct({
860
884
  outcome: Schema.Union([
861
885
  Schema.Literal("allow"),
862
886
  Schema.Literal("requireApproval"),
@@ -870,13 +894,13 @@ const MailboxActionDecision = /* @__PURE__ */ Schema.Struct({
870
894
  Schema.Literal("policy")
871
895
  ]), Schema.Null]),
872
896
  decidedAt: Schema.String
873
- }).annotate({ identifier: "MailboxActionDecision" });
874
- const MailboxSendOutcome = /* @__PURE__ */ Schema.Struct({
897
+ }).annotate({ identifier: "MailboxActionDecision" }))();
898
+ const MailboxSendOutcome = /* @__PURE__ */ (() => Schema.Struct({
875
899
  code: Schema.String,
876
900
  message: Schema.String,
877
901
  error: Schema.optionalKey(Schema.Union([MailboxSendError, Schema.Null]))
878
- }).annotate({ identifier: "MailboxSendOutcome" });
879
- const Operation = /* @__PURE__ */ Schema.Struct({
902
+ }).annotate({ identifier: "MailboxSendOutcome" }))();
903
+ const Operation = /* @__PURE__ */ (() => Schema.Struct({
880
904
  id: OperationId,
881
905
  organizationId: Schema.String,
882
906
  kind: Schema.Union([Schema.Literal("email-domain-provisioning"), Schema.Literal("organization-deletion")]),
@@ -919,12 +943,12 @@ const Operation = /* @__PURE__ */ Schema.Struct({
919
943
  updatedAt: Schema.String,
920
944
  startedAt: Schema.Union([Schema.String, Schema.Null]),
921
945
  completedAt: Schema.Union([Schema.String, Schema.Null])
922
- }).annotate({ identifier: "Operation" });
923
- const OperationResourceLink = /* @__PURE__ */ Schema.Struct({
946
+ }).annotate({ identifier: "Operation" }))();
947
+ const OperationResourceLink = /* @__PURE__ */ (() => Schema.Struct({
924
948
  resource: OperationResource,
925
949
  href: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" }))
926
- }).annotate({ identifier: "OperationResourceLink" });
927
- const UpdateTemplatePayload = /* @__PURE__ */ Schema.Struct({ data: Schema.Struct({
950
+ }).annotate({ identifier: "OperationResourceLink" }))();
951
+ const UpdateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Struct({
928
952
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
929
953
  slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
930
954
  entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })), Schema.Null])),
@@ -943,34 +967,34 @@ const UpdateTemplatePayload = /* @__PURE__ */ Schema.Struct({ data: Schema.Struc
943
967
  trackingDefault: Schema.optionalKey(Schema.Union([Schema.Union([TemplateTrackingDefault, Schema.Null]), Schema.Null]).annotate({ description: "Engagement tracking for sends of this template: `opens` and `clicks`, each inherited from the domain and organization defaults when omitted. A send request's own `tracking` still wins. Null clears the template's default." })),
944
968
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
945
969
  shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
946
- }) }).annotate({ identifier: "UpdateTemplatePayload" });
947
- const WorkingHours = /* @__PURE__ */ Schema.Struct({
970
+ }) }).annotate({ identifier: "UpdateTemplatePayload" }))();
971
+ const WorkingHours = /* @__PURE__ */ (() => Schema.Struct({
948
972
  timeZone: TimeZone,
949
973
  ranges: Schema.Array(WorkingHoursRange).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(28).annotate({ expected: "a value with a length of at most 28" }))
950
- }).annotate({ identifier: "WorkingHours" });
951
- const ApiKeyAccess = /* @__PURE__ */ Schema.Union([Schema.Struct({ mode: Schema.Literal("full") }), Schema.Struct({
974
+ }).annotate({ identifier: "WorkingHours" }))();
975
+ const ApiKeyAccess = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ mode: Schema.Literal("full") }), Schema.Struct({
952
976
  mode: Schema.Literal("restricted"),
953
977
  resources: ApiKeyResourceAccess,
954
978
  mailboxes: Schema.optionalKey(Schema.Union([ApiKeyMailboxAccess, Schema.Null])),
955
979
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only." }))
956
- })]).annotate({ identifier: "ApiKeyAccess" });
957
- const CreateBrand = /* @__PURE__ */ Schema.Struct({
980
+ })]).annotate({ identifier: "ApiKeyAccess" }))();
981
+ const CreateBrand = /* @__PURE__ */ (() => Schema.Struct({
958
982
  slug: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
959
983
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
960
984
  css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
961
985
  assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
962
986
  footer: Schema.optionalKey(Schema.Union([BrandFooter, Schema.Null])),
963
987
  isDefault: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
964
- }).annotate({ identifier: "CreateBrand" });
965
- const UpdateBrand = /* @__PURE__ */ Schema.Struct({
988
+ }).annotate({ identifier: "CreateBrand" }))();
989
+ const UpdateBrand = /* @__PURE__ */ (() => Schema.Struct({
966
990
  newSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Renames the brand. Projects importing `samva:brand/<old slug>` stop building until they import the new slug." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null])),
967
991
  name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
968
992
  css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
969
993
  assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
970
994
  footer: Schema.optionalKey(Schema.Union([BrandFooter, Schema.Null]))
971
- }).annotate({ identifier: "UpdateBrand" });
972
- const EmailAttachments = /* @__PURE__ */ Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]).annotate({ identifier: "EmailAttachments" });
973
- const ContactIdentityChannel = /* @__PURE__ */ Schema.Struct({
995
+ }).annotate({ identifier: "UpdateBrand" }))();
996
+ const EmailAttachments = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]).annotate({ identifier: "EmailAttachments" }))();
997
+ const ContactIdentityChannel = /* @__PURE__ */ (() => Schema.Struct({
974
998
  channel: Schema.Literal("email"),
975
999
  reachability: Schema.Union([
976
1000
  Schema.Literal("unknown"),
@@ -978,76 +1002,76 @@ const ContactIdentityChannel = /* @__PURE__ */ Schema.Struct({
978
1002
  Schema.Literal("unreachable")
979
1003
  ]),
980
1004
  consent: Schema.Union([ContactConsent, Schema.Null])
981
- }).annotate({ identifier: "ContactIdentityChannel" });
982
- const CreateEventPayload = /* @__PURE__ */ Schema.Struct({
1005
+ }).annotate({ identifier: "ContactIdentityChannel" }))();
1006
+ const CreateEventPayload = /* @__PURE__ */ (() => Schema.Struct({
983
1007
  contact: ContactEventReference,
984
1008
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })),
985
1009
  properties: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null])),
986
1010
  occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
987
1011
  idempotencyKey: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null]))
988
- }).annotate({ identifier: "CreateEventPayload" });
989
- const EmailRecipients = /* @__PURE__ */ Schema.Array(EmailRecipient).check(Schema.isMinLength(1).annotate({
1012
+ }).annotate({ identifier: "CreateEventPayload" }))();
1013
+ const EmailRecipients = /* @__PURE__ */ (() => Schema.Array(EmailRecipient).check(Schema.isMinLength(1).annotate({
990
1014
  expected: "a value with a length of at least 1",
991
1015
  identifier: "EmailRecipients"
992
- }));
993
- const EmailCcRecipients = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailCcRecipients" });
994
- const EmailBccRecipients = /* @__PURE__ */ Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailBccRecipients" });
995
- const TopicContactRef = /* @__PURE__ */ Schema.Union([
1016
+ })))();
1017
+ const EmailCcRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailCcRecipients" }))();
1018
+ const EmailBccRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Union([Schema.Array(EmailRecipient), Schema.Null]), Schema.Null]).annotate({ identifier: "EmailBccRecipients" }))();
1019
+ const TopicContactRef = /* @__PURE__ */ (() => Schema.Union([
996
1020
  TopicContactById,
997
1021
  TopicContactByEmail,
998
1022
  TopicContactByPhone
999
- ]).annotate({ identifier: "TopicContactRef" });
1000
- const MessagePage = /* @__PURE__ */ Schema.Struct({
1023
+ ]).annotate({ identifier: "TopicContactRef" }))();
1024
+ const MessagePage = /* @__PURE__ */ (() => Schema.Struct({
1001
1025
  items: Schema.Array(MessageSummary),
1002
1026
  nextCursor: Schema.Union([Schema.String, Schema.Null])
1003
- }).annotate({ identifier: "MessagePage" });
1004
- const JourneyTrigger = /* @__PURE__ */ Schema.Union([
1027
+ }).annotate({ identifier: "MessagePage" }))();
1028
+ const JourneyTrigger = /* @__PURE__ */ (() => Schema.Union([
1005
1029
  JourneyCustomEventTrigger,
1006
1030
  JourneyContactCreatedTrigger,
1007
1031
  JourneyTagAddedTrigger,
1008
1032
  JourneyGroupJoinedTrigger
1009
- ]).annotate({ identifier: "JourneyTrigger" });
1010
- const JourneyWaitForEventConfig = /* @__PURE__ */ Schema.Struct({
1033
+ ]).annotate({ identifier: "JourneyTrigger" }))();
1034
+ const JourneyWaitForEventConfig = /* @__PURE__ */ (() => Schema.Struct({
1011
1035
  eventName: JourneyEventName,
1012
1036
  timeoutSeconds: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(7776e3).annotate({ expected: "a value less than or equal to 7776000" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
1013
- }).annotate({ identifier: "JourneyWaitForEventConfig" });
1014
- const JourneyEventPredicate = /* @__PURE__ */ Schema.Struct({
1037
+ }).annotate({ identifier: "JourneyWaitForEventConfig" }))();
1038
+ const JourneyEventPredicate = /* @__PURE__ */ (() => Schema.Struct({
1015
1039
  type: Schema.Literal("event"),
1016
1040
  eventName: JourneyEventName,
1017
1041
  occurred: Schema.Boolean
1018
- }).annotate({ identifier: "JourneyEventPredicate" });
1019
- const JourneyGoal = /* @__PURE__ */ Schema.Struct({ eventName: JourneyEventName }).annotate({ identifier: "JourneyGoal" });
1020
- const JourneySendEmailNode = /* @__PURE__ */ Schema.Struct({
1042
+ }).annotate({ identifier: "JourneyEventPredicate" }))();
1043
+ const JourneyGoal = /* @__PURE__ */ (() => Schema.Struct({ eventName: JourneyEventName }).annotate({ identifier: "JourneyGoal" }))();
1044
+ const JourneySendEmailNode = /* @__PURE__ */ (() => Schema.Struct({
1021
1045
  type: Schema.Literal("send_email"),
1022
1046
  config: JourneySendEmailConfig,
1023
1047
  next: Schema.Tuple([JourneyNextEdge])
1024
- }).annotate({ identifier: "JourneySendEmailNode" });
1025
- const JourneyWaitNode = /* @__PURE__ */ Schema.Struct({
1048
+ }).annotate({ identifier: "JourneySendEmailNode" }))();
1049
+ const JourneyWaitNode = /* @__PURE__ */ (() => Schema.Struct({
1026
1050
  type: Schema.Literal("wait"),
1027
1051
  config: JourneyWaitConfig,
1028
1052
  next: Schema.Tuple([JourneyNextEdge])
1029
- }).annotate({ identifier: "JourneyWaitNode" });
1030
- const JourneyUpdateTagsNode = /* @__PURE__ */ Schema.Struct({
1053
+ }).annotate({ identifier: "JourneyWaitNode" }))();
1054
+ const JourneyUpdateTagsNode = /* @__PURE__ */ (() => Schema.Struct({
1031
1055
  type: Schema.Literal("update_tags"),
1032
1056
  config: JourneyUpdateTagsConfig,
1033
1057
  next: Schema.Tuple([JourneyNextEdge])
1034
- }).annotate({ identifier: "JourneyUpdateTagsNode" });
1035
- const JourneyWebhookNode = /* @__PURE__ */ Schema.Struct({
1058
+ }).annotate({ identifier: "JourneyUpdateTagsNode" }))();
1059
+ const JourneyWebhookNode = /* @__PURE__ */ (() => Schema.Struct({
1036
1060
  type: Schema.Literal("webhook"),
1037
1061
  config: JourneyWebhookConfig,
1038
1062
  next: Schema.Tuple([JourneyNextEdge])
1039
- }).annotate({ identifier: "JourneyWebhookNode" });
1040
- const JourneyPropertyPredicate = /* @__PURE__ */ Schema.Struct({
1063
+ }).annotate({ identifier: "JourneyWebhookNode" }))();
1064
+ const JourneyPropertyPredicate = /* @__PURE__ */ (() => Schema.Struct({
1041
1065
  type: Schema.Literal("property"),
1042
1066
  field: JourneyContactProperty,
1043
1067
  comparison: JourneyComparison
1044
- }).annotate({ identifier: "JourneyPropertyPredicate" });
1045
- const JourneyCustomFieldPredicate = /* @__PURE__ */ Schema.Struct({
1068
+ }).annotate({ identifier: "JourneyPropertyPredicate" }))();
1069
+ const JourneyCustomFieldPredicate = /* @__PURE__ */ (() => Schema.Struct({
1046
1070
  type: Schema.Literal("custom_field"),
1047
1071
  key: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1048
1072
  comparison: JourneyComparison
1049
- }).annotate({ identifier: "JourneyCustomFieldPredicate" });
1050
- const MailboxSendReceipt = /* @__PURE__ */ Schema.Struct({
1073
+ }).annotate({ identifier: "JourneyCustomFieldPredicate" }))();
1074
+ const MailboxSendReceipt = /* @__PURE__ */ (() => Schema.Struct({
1051
1075
  actionId: MailboxActionId,
1052
1076
  draftId: Schema.Union([MailboxDraftId, Schema.Null]),
1053
1077
  messageId: Schema.Union([MessageId, Schema.Null]),
@@ -1083,15 +1107,15 @@ const MailboxSendReceipt = /* @__PURE__ */ Schema.Struct({
1083
1107
  decision: Schema.Union([MailboxActionDecision, Schema.Null]),
1084
1108
  createdAt: Schema.String,
1085
1109
  updatedAt: Schema.String
1086
- }).annotate({ identifier: "MailboxSendReceipt" });
1087
- const OperationAccepted = /* @__PURE__ */ Schema.Struct({
1110
+ }).annotate({ identifier: "MailboxSendReceipt" }))();
1111
+ const OperationAccepted = /* @__PURE__ */ (() => Schema.Struct({
1088
1112
  operation: Operation,
1089
1113
  links: Schema.Struct({
1090
1114
  self: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
1091
1115
  resource: OperationResourceLink
1092
1116
  })
1093
- }).annotate({ identifier: "OperationAccepted" });
1094
- const AgentDefinition = /* @__PURE__ */ Schema.Struct({
1117
+ }).annotate({ identifier: "OperationAccepted" }))();
1118
+ const AgentDefinition = /* @__PURE__ */ (() => Schema.Struct({
1095
1119
  instructions: Schema.String.check(Schema.isMaxCodePoints(2e4).annotate({ expected: "a string with at most 20000 code points" })).check(Schema.isMaxLength(2e4).annotate({ expected: "a value with a length of at most 20000" })),
1096
1120
  knowledge: Schema.String.check(Schema.isMaxCodePoints(1e5).annotate({ expected: "a string with at most 100000 code points" })).check(Schema.isMaxLength(1e5).annotate({ expected: "a value with a length of at most 100000" })),
1097
1121
  endpointIds: Schema.Array(MailboxEndpointId).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
@@ -1100,8 +1124,8 @@ const AgentDefinition = /* @__PURE__ */ Schema.Struct({
1100
1124
  model: AgentModel,
1101
1125
  workingHours: Schema.Union([WorkingHours, Schema.Null]),
1102
1126
  takeoverTimeoutMinutes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(10080).annotate({ expected: "a value less than or equal to 10080" }))
1103
- }).annotate({ identifier: "AgentDefinition" });
1104
- const CampaignEmailInput = /* @__PURE__ */ Schema.Struct({
1127
+ }).annotate({ identifier: "AgentDefinition" }))();
1128
+ const CampaignEmailInput = /* @__PURE__ */ (() => Schema.Struct({
1105
1129
  subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1106
1130
  html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1107
1131
  text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -1120,8 +1144,8 @@ const CampaignEmailInput = /* @__PURE__ */ Schema.Struct({
1120
1144
  footer: Schema.optionalKey(EmailFooterOverride),
1121
1145
  headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null])),
1122
1146
  preheader: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
1123
- }).annotate({ identifier: "CampaignEmailInput" });
1124
- const EmailContent = /* @__PURE__ */ Schema.Struct({
1147
+ }).annotate({ identifier: "CampaignEmailInput" }))();
1148
+ const EmailContent = /* @__PURE__ */ (() => Schema.Struct({
1125
1149
  subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1126
1150
  html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1127
1151
  text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -1139,25 +1163,25 @@ const EmailContent = /* @__PURE__ */ Schema.Struct({
1139
1163
  tracking: Schema.optionalKey(EmailTrackingOverrideV1),
1140
1164
  footer: Schema.optionalKey(EmailFooterOverride),
1141
1165
  headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
1142
- }).annotate({ identifier: "EmailContent" });
1143
- const ContactIdentity = /* @__PURE__ */ Schema.Struct({
1166
+ }).annotate({ identifier: "EmailContent" }))();
1167
+ const ContactIdentity = /* @__PURE__ */ (() => Schema.Struct({
1144
1168
  id: ContactIdentityId,
1145
1169
  type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
1146
1170
  identifier: Schema.String,
1147
1171
  verified: Schema.Boolean,
1148
1172
  channels: Schema.Array(ContactIdentityChannel)
1149
- }).annotate({ identifier: "ContactIdentity" });
1150
- const JourneyWaitForEventNode = /* @__PURE__ */ Schema.Struct({
1173
+ }).annotate({ identifier: "ContactIdentity" }))();
1174
+ const JourneyWaitForEventNode = /* @__PURE__ */ (() => Schema.Struct({
1151
1175
  type: Schema.Literal("wait_for_event"),
1152
1176
  config: JourneyWaitForEventConfig,
1153
1177
  next: Schema.Tuple([JourneyWaitEventEdge, JourneyWaitEventEdge])
1154
- }).annotate({ identifier: "JourneyWaitForEventNode" });
1155
- const JourneyPredicate = /* @__PURE__ */ Schema.Union([
1178
+ }).annotate({ identifier: "JourneyWaitForEventNode" }))();
1179
+ const JourneyPredicate = /* @__PURE__ */ (() => Schema.Union([
1156
1180
  JourneyTagPredicate,
1157
1181
  JourneyPropertyPredicate,
1158
1182
  JourneyCustomFieldPredicate,
1159
1183
  JourneyEventPredicate
1160
- ]).annotate({ identifier: "JourneyPredicate" });
1184
+ ]).annotate({ identifier: "JourneyPredicate" }))();
1161
1185
  var MailboxSendRefusedError = class extends Schema.TaggedError()("MailboxSendRefusedError", Schema.Struct({
1162
1186
  message: Schema.String,
1163
1187
  receipt: MailboxSendReceipt
@@ -1168,28 +1192,32 @@ var MailboxSendConflictError = class extends Schema.TaggedError()("MailboxSendCo
1168
1192
  id: MailboxActionId,
1169
1193
  receipt: MailboxSendReceipt
1170
1194
  })) {};
1171
- const CampaignContentInput = /* @__PURE__ */ Schema.Struct({
1195
+ const CampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
1172
1196
  channel: Schema.Literal("email"),
1173
1197
  email: CampaignEmailInput,
1198
+ issue: Schema.optionalKey(Schema.Union([Schema.Struct({
1199
+ path: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$", "u")).annotate({ expected: "a string matching the RegExp ^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
1200
+ commit: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" }))
1201
+ }), Schema.Null]).annotate({ description: "Render a saved Markdown issue from the audience topic's repository. Its saved title and preheader supply the email content; templateData supplies recipient fallbacks." })),
1174
1202
  from: Schema.optionalKey(CampaignFrom),
1175
1203
  replyMailboxId: Schema.optionalKey(CampaignReplyMailbox),
1176
1204
  conversationId: Schema.optionalKey(CampaignConversationRef),
1177
1205
  metadata: Schema.optionalKey(CampaignContentMetadata)
1178
- }).annotate({ identifier: "CampaignContentInput" });
1179
- const JourneyCondition = /* @__PURE__ */ Schema.Struct({
1206
+ }).annotate({ identifier: "CampaignContentInput" }))();
1207
+ const JourneyCondition = /* @__PURE__ */ (() => Schema.Struct({
1180
1208
  match: Schema.Union([Schema.Literal("all"), Schema.Literal("any")]),
1181
1209
  predicates: Schema.TupleWithRest(Schema.Tuple([JourneyPredicate]), [JourneyPredicate])
1182
- }).annotate({ identifier: "JourneyCondition" });
1183
- const JourneyBranchEdge = /* @__PURE__ */ Schema.Struct({
1210
+ }).annotate({ identifier: "JourneyCondition" }))();
1211
+ const JourneyBranchEdge = /* @__PURE__ */ (() => Schema.Struct({
1184
1212
  nodeId: JourneyNodeId,
1185
1213
  condition: Schema.optionalKey(JourneyCondition)
1186
- }).annotate({ identifier: "JourneyBranchEdge" });
1187
- const JourneyBranchNode = /* @__PURE__ */ Schema.Struct({
1214
+ }).annotate({ identifier: "JourneyBranchEdge" }))();
1215
+ const JourneyBranchNode = /* @__PURE__ */ (() => Schema.Struct({
1188
1216
  type: Schema.Literal("branch"),
1189
1217
  config: JourneyEmptyConfig,
1190
1218
  next: Schema.Array(JourneyBranchEdge).check(Schema.isMinLength(2).annotate({ expected: "a value with a length of at least 2" }))
1191
- }).annotate({ identifier: "JourneyBranchNode" });
1192
- const JourneyNode = /* @__PURE__ */ Schema.Union([
1219
+ }).annotate({ identifier: "JourneyBranchNode" }))();
1220
+ const JourneyNode = /* @__PURE__ */ (() => Schema.Union([
1193
1221
  JourneySendEmailNode,
1194
1222
  JourneyWaitNode,
1195
1223
  JourneyWaitForEventNode,
@@ -1197,14 +1225,14 @@ const JourneyNode = /* @__PURE__ */ Schema.Union([
1197
1225
  JourneyUpdateTagsNode,
1198
1226
  JourneyWebhookNode,
1199
1227
  JourneyExitNode
1200
- ]).annotate({ identifier: "JourneyNode" });
1201
- const JourneyDefinition = /* @__PURE__ */ Schema.Struct({
1228
+ ]).annotate({ identifier: "JourneyNode" }))();
1229
+ const JourneyDefinition = /* @__PURE__ */ (() => Schema.Struct({
1202
1230
  trigger: JourneyTrigger,
1203
1231
  rootNodeId: JourneyNodeId,
1204
1232
  nodes: Schema.Record(Schema.String, JourneyNode).check(Schema.isMinProperties(1).annotate({ expected: "a value with at least 1 entry" })).check(Schema.isMaxProperties(200).annotate({ expected: "a value with at most 200 entries" })),
1205
1233
  goal: Schema.optionalKey(JourneyGoal),
1206
1234
  reentry: Schema.optionalKey(Schema.Boolean)
1207
- }).annotate({ identifier: "JourneyDefinition" });
1235
+ }).annotate({ identifier: "JourneyDefinition" }))();
1208
1236
  const __recursive_JsonValue = Schema.Union([
1209
1237
  Schema.String,
1210
1238
  Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
@@ -1219,6 +1247,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
1219
1247
  });
1220
1248
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
1221
1249
  //#endregion
1222
- export { AgentDefinition, AgentIntegrationReference, AgentMode, AgentModel, AgentName, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFrom, CampaignId, CampaignReplyMailbox, CampaignRunId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, Weekday, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1250
+ export { AgentDefinition, AgentIntegrationReference, AgentMode, AgentModel, AgentName, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFrom, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, Weekday, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1223
1251
 
1224
1252
  //# sourceMappingURL=shared.js.map