samva 0.36.0 → 0.38.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.
@@ -182,6 +182,7 @@ const Contact = /* @__PURE__ */ (() => Schema.Struct({
182
182
  ]),
183
183
  importedAt: Schema.String,
184
184
  summary: Schema.optionalKey(Schema.Union([Schema.Struct({
185
+ permissionAssumed: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
185
186
  signupAt: Schema.Union([Schema.Struct({
186
187
  value: Schema.String.check(Schema.isMaxCodePoints(160).annotate({ expected: "a string with at most 160 code points" })).check(Schema.isMaxLength(160).annotate({ expected: "a value with a length of at most 160" })),
187
188
  kind: Schema.Union([Schema.Literal("time"), Schema.Literal("text")])
@@ -192,16 +193,21 @@ const Contact = /* @__PURE__ */ (() => Schema.Struct({
192
193
  evidence: Schema.Array(Schema.Struct({
193
194
  file: Schema.String,
194
195
  row: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
195
- declared: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
196
- kind: Schema.Literal("export_scope"),
197
- scope: Schema.Union([
198
- Schema.Literal("subscribed"),
199
- Schema.Literal("unsubscribed"),
200
- Schema.Literal("suppressed"),
201
- Schema.Literal("cleaned/bounced")
202
- ])
203
- })]),
204
- suppressionFree: Schema.Boolean,
196
+ declared: Schema.optionalKey(Schema.Union([
197
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
198
+ Schema.Struct({
199
+ kind: Schema.Literal("export_scope"),
200
+ scope: Schema.Union([
201
+ Schema.Literal("subscribed"),
202
+ Schema.Literal("unsubscribed"),
203
+ Schema.Literal("suppressed"),
204
+ Schema.Literal("cleaned/bounced")
205
+ ])
206
+ }),
207
+ Schema.Null
208
+ ])),
209
+ suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
210
+ permissionBasis: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("assumed"), Schema.Literal("exported")]), Schema.Null])),
205
211
  sourceStatus: Schema.Union([Schema.String, Schema.Null]),
206
212
  signupAt: Schema.Union([Schema.String, Schema.Null]),
207
213
  source: Schema.Union([Schema.String, Schema.Null])
@@ -218,6 +224,7 @@ const Contact = /* @__PURE__ */ (() => Schema.Struct({
218
224
  ]),
219
225
  importedAt: Schema.String,
220
226
  summary: Schema.optionalKey(Schema.Union([Schema.Struct({
227
+ permissionAssumed: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
221
228
  signupAt: Schema.Union([Schema.Struct({
222
229
  value: Schema.String.check(Schema.isMaxCodePoints(160).annotate({ expected: "a string with at most 160 code points" })).check(Schema.isMaxLength(160).annotate({ expected: "a value with a length of at most 160" })),
223
230
  kind: Schema.Union([Schema.Literal("time"), Schema.Literal("text")])
@@ -228,22 +235,28 @@ const Contact = /* @__PURE__ */ (() => Schema.Struct({
228
235
  evidence: Schema.Array(Schema.Struct({
229
236
  file: Schema.String,
230
237
  row: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
231
- declared: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
232
- kind: Schema.Literal("export_scope"),
233
- scope: Schema.Union([
234
- Schema.Literal("subscribed"),
235
- Schema.Literal("unsubscribed"),
236
- Schema.Literal("suppressed"),
237
- Schema.Literal("cleaned/bounced")
238
- ])
239
- })]),
240
- suppressionFree: Schema.Boolean,
238
+ declared: Schema.optionalKey(Schema.Union([
239
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
240
+ Schema.Struct({
241
+ kind: Schema.Literal("export_scope"),
242
+ scope: Schema.Union([
243
+ Schema.Literal("subscribed"),
244
+ Schema.Literal("unsubscribed"),
245
+ Schema.Literal("suppressed"),
246
+ Schema.Literal("cleaned/bounced")
247
+ ])
248
+ }),
249
+ Schema.Null
250
+ ])),
251
+ suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
252
+ permissionBasis: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("assumed"), Schema.Literal("exported")]), Schema.Null])),
241
253
  sourceStatus: Schema.Union([Schema.String, Schema.Null]),
242
254
  signupAt: Schema.Union([Schema.String, Schema.Null]),
243
255
  source: Schema.Union([Schema.String, Schema.Null])
244
256
  }))
245
257
  })
246
258
  }), Schema.Null]),
259
+ addedAt: Schema.Union([Schema.String, Schema.Null]),
247
260
  createdAt: Schema.String,
248
261
  updatedAt: Schema.String
249
262
  }).annotate({ identifier: "Contact" }))();
@@ -591,29 +604,35 @@ const ContactsStartImportRequestJson = /* @__PURE__ */ (() => Schema.Union([Sche
591
604
  files: Schema.TupleWithRest(Schema.Tuple([Schema.Struct({
592
605
  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.isBetweenLength(1, 255).annotate({ expected: "a value with a length between 1 and 255" })),
593
606
  csv: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
594
- evidence: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
595
- kind: Schema.Literal("export_scope"),
596
- scope: Schema.Union([
597
- Schema.Literal("subscribed"),
598
- Schema.Literal("unsubscribed"),
599
- Schema.Literal("suppressed"),
600
- Schema.Literal("cleaned/bounced")
601
- ])
602
- })]),
603
- suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
607
+ evidence: Schema.optionalKey(Schema.Union([
608
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
609
+ Schema.Struct({
610
+ kind: Schema.Literal("export_scope"),
611
+ scope: Schema.Union([
612
+ Schema.Literal("subscribed"),
613
+ Schema.Literal("unsubscribed"),
614
+ Schema.Literal("suppressed"),
615
+ Schema.Literal("cleaned/bounced")
616
+ ])
617
+ }),
618
+ Schema.Null
619
+ ]))
604
620
  })]), [Schema.Struct({
605
621
  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.isBetweenLength(1, 255).annotate({ expected: "a value with a length between 1 and 255" })),
606
622
  csv: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
607
- evidence: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
608
- kind: Schema.Literal("export_scope"),
609
- scope: Schema.Union([
610
- Schema.Literal("subscribed"),
611
- Schema.Literal("unsubscribed"),
612
- Schema.Literal("suppressed"),
613
- Schema.Literal("cleaned/bounced")
614
- ])
615
- })]),
616
- suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
623
+ evidence: Schema.optionalKey(Schema.Union([
624
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
625
+ Schema.Struct({
626
+ kind: Schema.Literal("export_scope"),
627
+ scope: Schema.Union([
628
+ Schema.Literal("subscribed"),
629
+ Schema.Literal("unsubscribed"),
630
+ Schema.Literal("suppressed"),
631
+ Schema.Literal("cleaned/bounced")
632
+ ])
633
+ }),
634
+ Schema.Null
635
+ ]))
617
636
  })]).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" }))
618
637
  }),
619
638
  planHash: Schema.String
@@ -736,29 +755,35 @@ const ContactsPlanImportRequestJson = /* @__PURE__ */ (() => Schema.Struct({
736
755
  files: Schema.TupleWithRest(Schema.Tuple([Schema.Struct({
737
756
  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.isBetweenLength(1, 255).annotate({ expected: "a value with a length between 1 and 255" })),
738
757
  csv: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
739
- evidence: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
740
- kind: Schema.Literal("export_scope"),
741
- scope: Schema.Union([
742
- Schema.Literal("subscribed"),
743
- Schema.Literal("unsubscribed"),
744
- Schema.Literal("suppressed"),
745
- Schema.Literal("cleaned/bounced")
746
- ])
747
- })]),
748
- suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
758
+ evidence: Schema.optionalKey(Schema.Union([
759
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
760
+ Schema.Struct({
761
+ kind: Schema.Literal("export_scope"),
762
+ scope: Schema.Union([
763
+ Schema.Literal("subscribed"),
764
+ Schema.Literal("unsubscribed"),
765
+ Schema.Literal("suppressed"),
766
+ Schema.Literal("cleaned/bounced")
767
+ ])
768
+ }),
769
+ Schema.Null
770
+ ]))
749
771
  })]), [Schema.Struct({
750
772
  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.isBetweenLength(1, 255).annotate({ expected: "a value with a length between 1 and 255" })),
751
773
  csv: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
752
- evidence: Schema.Union([Schema.Struct({ kind: Schema.Literal("status_column") }), Schema.Struct({
753
- kind: Schema.Literal("export_scope"),
754
- scope: Schema.Union([
755
- Schema.Literal("subscribed"),
756
- Schema.Literal("unsubscribed"),
757
- Schema.Literal("suppressed"),
758
- Schema.Literal("cleaned/bounced")
759
- ])
760
- })]),
761
- suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
774
+ evidence: Schema.optionalKey(Schema.Union([
775
+ Schema.Struct({ kind: Schema.Literal("status_column") }),
776
+ Schema.Struct({
777
+ kind: Schema.Literal("export_scope"),
778
+ scope: Schema.Union([
779
+ Schema.Literal("subscribed"),
780
+ Schema.Literal("unsubscribed"),
781
+ Schema.Literal("suppressed"),
782
+ Schema.Literal("cleaned/bounced")
783
+ ])
784
+ }),
785
+ Schema.Null
786
+ ]))
762
787
  })]).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" }))
763
788
  }))();
764
789
  const ContactsPlanImport200 = /* @__PURE__ */ (() => Schema.Struct({
@@ -1078,7 +1103,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
1078
1103
  ContactsPlanImport500,
1079
1104
  ContactsPlanImport504.pipe(HttpApiSchema.status(504))
1080
1105
  ]
1081
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.planImport").annotate(OpenApi.Summary, "Preview a list migration").annotate(OpenApi.Description, "The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple declared export files without changing contacts. Restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission. Missing required columns refuse the file; unknown status values are conflicts and never subscribe a reader.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
1106
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.planImport").annotate(OpenApi.Summary, "Preview a list migration").annotate(OpenApi.Description, "The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple export files without changing contacts. Readers are assumed opted in where permission evidence is absent or blank. Explicit restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission. Missing email columns refuse the file; unrecognized nonblank status values are conflicts and never subscribe a reader.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
1082
1107
  export { BulkUpdateResult, Contact, ContactActivityPage, ContactCustomFields, ContactGroupMembershipPage, ContactIdentityInput, ContactImportJobId, ContactListMembership, ContactLocation, ContactLookup, ContactPage, ContactPreferences, ContactProfile, ContactProfileUpdate, ContactSummary, ContactsAddIdentity200, ContactsAddIdentity400, ContactsAddIdentity401, ContactsAddIdentity403, ContactsAddIdentity404, ContactsAddIdentity409, ContactsAddIdentity422, ContactsAddIdentity500, ContactsAddIdentity504, ContactsAddIdentityPathParams, ContactsAddIdentityRequestJson, ContactsAddTags200, ContactsAddTags400, ContactsAddTags401, ContactsAddTags403, ContactsAddTags404, ContactsAddTags422, ContactsAddTags500, ContactsAddTags504, ContactsAddTagsPathParams, ContactsAddTagsRequestJson, ContactsBulkDelete200, ContactsBulkDelete400, ContactsBulkDelete401, ContactsBulkDelete403, ContactsBulkDelete422, ContactsBulkDelete500, ContactsBulkDelete502, ContactsBulkDelete504, ContactsBulkDeleteRequestJson, ContactsBulkUpdateStatus200, ContactsBulkUpdateStatus400, ContactsBulkUpdateStatus401, ContactsBulkUpdateStatus402, ContactsBulkUpdateStatus403, ContactsBulkUpdateStatus422, ContactsBulkUpdateStatus500, ContactsBulkUpdateStatus502, ContactsBulkUpdateStatus504, ContactsBulkUpdateStatusRequestJson, ContactsBulkUpdateTags200, ContactsBulkUpdateTags400, ContactsBulkUpdateTags401, ContactsBulkUpdateTags403, ContactsBulkUpdateTags422, ContactsBulkUpdateTags500, ContactsBulkUpdateTags504, ContactsBulkUpdateTagsRequestJson, ContactsCreate201, ContactsCreate400, ContactsCreate401, ContactsCreate402, ContactsCreate403, ContactsCreate404, ContactsCreate409, ContactsCreate422, ContactsCreate500, ContactsCreate502, ContactsCreate504, ContactsCreateRequestJson, ContactsExport200, ContactsExport400, ContactsExport401, ContactsExport403, ContactsExport422, ContactsExport500, ContactsExport504, ContactsExportRequestJson, ContactsFind200, ContactsFind400, ContactsFind401, ContactsFind403, ContactsFind404, ContactsFind409, ContactsFind422, ContactsFind500, ContactsFind504, ContactsFindOrCreate200, ContactsFindOrCreate400, ContactsFindOrCreate401, ContactsFindOrCreate402, ContactsFindOrCreate403, ContactsFindOrCreate404, ContactsFindOrCreate409, ContactsFindOrCreate422, ContactsFindOrCreate500, ContactsFindOrCreate502, ContactsFindOrCreate504, ContactsFindOrCreateRequestJson, ContactsFindRequestJson, ContactsGet200, ContactsGet400, ContactsGet401, ContactsGet403, ContactsGet404, ContactsGet422, ContactsGet500, ContactsGet504, ContactsGetActivityTimeline200, ContactsGetActivityTimeline400, ContactsGetActivityTimeline401, ContactsGetActivityTimeline403, ContactsGetActivityTimeline404, ContactsGetActivityTimeline422, ContactsGetActivityTimeline500, ContactsGetActivityTimeline504, ContactsGetActivityTimelinePathParams, ContactsGetActivityTimelineQuery, ContactsGetEngagement200, ContactsGetEngagement400, ContactsGetEngagement401, ContactsGetEngagement403, ContactsGetEngagement404, ContactsGetEngagement422, ContactsGetEngagement500, ContactsGetEngagement504, ContactsGetEngagementPathParams, ContactsGetGroupMemberships200, ContactsGetGroupMemberships400, ContactsGetGroupMemberships401, ContactsGetGroupMemberships403, ContactsGetGroupMemberships404, ContactsGetGroupMemberships422, ContactsGetGroupMemberships500, ContactsGetGroupMemberships504, ContactsGetGroupMembershipsPathParams, ContactsGetGroupMembershipsQuery, ContactsGetImportJob200, ContactsGetImportJob400, ContactsGetImportJob401, ContactsGetImportJob403, ContactsGetImportJob404, ContactsGetImportJob422, ContactsGetImportJob500, ContactsGetImportJob504, ContactsGetImportJobPathParams, ContactsGetPathParams, ContactsGroup, ContactsList200, ContactsList400, ContactsList401, ContactsList403, ContactsList422, ContactsList500, ContactsList504, ContactsListQuery, ContactsPlanImport200, ContactsPlanImport400, ContactsPlanImport401, ContactsPlanImport403, ContactsPlanImport404, ContactsPlanImport422, ContactsPlanImport500, ContactsPlanImport504, ContactsPlanImportRequestJson, ContactsRemove200, ContactsRemove400, ContactsRemove401, ContactsRemove403, ContactsRemove404, ContactsRemove422, ContactsRemove500, ContactsRemove502, ContactsRemove504, ContactsRemoveIdentity200, ContactsRemoveIdentity400, ContactsRemoveIdentity401, ContactsRemoveIdentity403, ContactsRemoveIdentity404, ContactsRemoveIdentity422, ContactsRemoveIdentity500, ContactsRemoveIdentity504, ContactsRemoveIdentityPathParams, ContactsRemovePathParams, ContactsRemoveTags200, ContactsRemoveTags400, ContactsRemoveTags401, ContactsRemoveTags403, ContactsRemoveTags404, ContactsRemoveTags422, ContactsRemoveTags500, ContactsRemoveTags504, ContactsRemoveTagsPathParams, ContactsRemoveTagsRequestJson, ContactsSetConsent200, ContactsSetConsent400, ContactsSetConsent401, ContactsSetConsent403, ContactsSetConsent404, ContactsSetConsent422, ContactsSetConsent500, ContactsSetConsent504, ContactsSetConsentPathParams, ContactsSetConsentRequestJson, ContactsStartImport202, ContactsStartImport400, ContactsStartImport401, ContactsStartImport402, ContactsStartImport403, ContactsStartImport404, ContactsStartImport409, ContactsStartImport422, ContactsStartImport500, ContactsStartImport502, ContactsStartImport504, ContactsStartImportHeaders, ContactsStartImportRequestJson, ContactsUpdate200, ContactsUpdate400, ContactsUpdate401, ContactsUpdate402, ContactsUpdate403, ContactsUpdate404, ContactsUpdate422, ContactsUpdate500, ContactsUpdate502, ContactsUpdate504, ContactsUpdatePathParams, ContactsUpdateRequestJson };
1083
1108
 
1084
1109
  //# sourceMappingURL=contacts.js.map
@@ -166,8 +166,8 @@ const EmailTrackingDefaults = /* @__PURE__ */ (() => Schema.Struct({
166
166
  opens: Schema.Boolean,
167
167
  clicks: Schema.Boolean
168
168
  }).annotate({ identifier: "EmailTrackingDefaults" }))();
169
- const TrackingRecipientEmail = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({
170
- expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
169
+ const TrackingRecipientEmail = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$", "u")).annotate({
170
+ expected: "a string matching the RegExp ^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$",
171
171
  identifier: "TrackingRecipientEmail"
172
172
  })))();
173
173
  const EmailDkimRotation = /* @__PURE__ */ (() => Schema.Struct({
@@ -1030,7 +1030,7 @@ const EmailUpdateDomainConfigPathParams = /* @__PURE__ */ (() => Schema.Struct({
1030
1030
  const EmailUpdateDomainConfigRequestJson = /* @__PURE__ */ (() => Schema.Struct({
1031
1031
  openTracking: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1032
1032
  clickTracking: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1033
- replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1033
+ replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$", "u")).annotate({ expected: "a string matching the RegExp ^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$" }))), Schema.Null])),
1034
1034
  topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null])),
1035
1035
  footerEnabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1036
1036
  brandSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.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]))
@@ -1510,10 +1510,10 @@ const EmailListSenders500 = InternalError;
1510
1510
  const EmailListSenders504 = GatewayTimeoutError;
1511
1511
  const EmailAddSenderHeaders = /* @__PURE__ */ (() => Schema.Struct({ "idempotency-key": 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" })) }))();
1512
1512
  const EmailAddSenderRequestJson = /* @__PURE__ */ (() => Schema.Struct({
1513
- email: Schema.String,
1513
+ email: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$", "u")).annotate({ expected: "a string matching the RegExp ^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$" })),
1514
1514
  domainId: Schema.optionalKey(Schema.Union([EmailDomainId, Schema.Null])),
1515
- name: Schema.optionalKey(Schema.Union([Schema.String.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])),
1516
- replyToEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1515
+ name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[^\\p{Cc}]*$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\p{Cc}]*$" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
1516
+ replyToEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$", "u")).annotate({ expected: "a string matching the RegExp ^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$" }))), Schema.Null])),
1517
1517
  namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]))
1518
1518
  }))();
1519
1519
  const EmailAddSender201 = /* @__PURE__ */ (() => Schema.Struct({
@@ -2588,7 +2588,7 @@ var MailboxesGroup = class extends HttpApiGroup.make("Mailboxes").add(HttpApiEnd
2588
2588
  MailboxesReply503.pipe(HttpApiSchema.status(503)),
2589
2589
  MailboxesReply504.pipe(HttpApiSchema.status(504))
2590
2590
  ]
2591
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.reply").annotate(OpenApi.Summary, "Reply to a message").annotate(OpenApi.Description, "Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's `channel` must match the thread's. On a phone channel the reply goes to the number on the other side of the thread."), HttpApiEndpoint.post("mailboxesReplyAll", "/v1/mailboxes/:id/messages/:messageId/reply-all", {
2591
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "mailboxes.reply").annotate(OpenApi.Summary, "Reply to a message").annotate(OpenApi.Description, "Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's `channel` must match the thread's. On a phone channel the reply goes to the number on the other side of the thread. On WhatsApp, free-form `text` needs the customer's 24-hour service window to be open, and a closed window is refused (422, `WhatsAppServiceWindowClosedError`) rather than converted; send an approved template with `templateId` instead."), HttpApiEndpoint.post("mailboxesReplyAll", "/v1/mailboxes/:id/messages/:messageId/reply-all", {
2592
2592
  params: MailboxesReplyAllPathParams,
2593
2593
  headers: MailboxesReplyAllHeaders,
2594
2594
  payload: MailboxesReplyAllRequestJson,
@@ -808,7 +808,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
808
808
  MessagesSend503.pipe(HttpApiSchema.status(503)),
809
809
  MessagesSend504.pipe(HttpApiSchema.status(504))
810
810
  ]
811
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
811
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.send").annotate(OpenApi.Summary, "Send a message").annotate(OpenApi.Description, "Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. `channel` selects the payload variant. Email and WhatsApp sends are available. Repeating an identical request with the same optional `Idempotency-Key` header returns the original receipt; reusing the key for different content returns a conflict."), HttpApiEndpoint.get("messagesGet", "/v1/messages/:id", {
812
812
  params: MessagesGetPathParams,
813
813
  success: MessagesGet200,
814
814
  error: [
@@ -60,7 +60,7 @@ const OrganizationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
60
60
  timezone: Schema.optionalKey(Schema.Union([IanaTimezone, Schema.Null])),
61
61
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
62
62
  metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])),
63
- replyToDefault: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
63
+ replyToDefault: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$", "u")).annotate({ expected: "a string matching the RegExp ^(?=[^@]{1,64}@)[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[^\\s@/\\\\:#?%[\\]\\p{Cc}]+[.\\u3002\\uff0e\\uff61][^\\s@/\\\\:#?%[\\]\\p{Cc}]+$" }))), Schema.Null])),
64
64
  emailFooterEnabledDefault: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
65
65
  }))();
66
66
  const OrganizationsUpdate200 = Organization;
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients, __SamvaRuntimeAbsoluteInstant } from "./shared";
4
+ import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, StoredEmailAttachments, StoredReplyToAddresses, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients, __SamvaRuntimeAbsoluteInstant } from "./shared";
5
5
  export type ScheduledMessageId = string & EffectBrand.Brand<"ScheduledMessageId">;
6
6
  export declare const ScheduledMessageId: Schema.brand<Schema.String, "ScheduledMessageId">;
7
7
  export type SavedEmailRecipient = {
@@ -32,6 +32,55 @@ export declare const SavedPhoneRecipient: Schema.Union<readonly [Schema.Struct<{
32
32
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
33
33
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
34
34
  }>]>;
35
+ export type StoredEmailContent = {
36
+ readonly subject?: string | null;
37
+ readonly html?: string | null;
38
+ readonly text?: string | null;
39
+ readonly attachments?: StoredEmailAttachments;
40
+ readonly publicationId?: TemplatePublicationId;
41
+ readonly inputContractId?: TemplateInputContractId;
42
+ readonly templateId?: TemplateId | null;
43
+ readonly templateSlug?: string | null;
44
+ readonly templateData?: TemplateData;
45
+ readonly locale?: RenderLocale;
46
+ readonly timeZone?: RenderTimeZone;
47
+ readonly inReplyToMessageId?: MessageId | null;
48
+ readonly replyTo?: StoredReplyToAddresses;
49
+ readonly topicId?: TopicId | null;
50
+ readonly tracking?: EmailTrackingOverrideV1;
51
+ readonly footer?: EmailFooterOverride;
52
+ readonly headers?: EmailCustomHeaders | null;
53
+ };
54
+ export declare const StoredEmailContent: Schema.Struct<{
55
+ readonly subject: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
56
+ readonly html: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
57
+ readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
58
+ readonly attachments: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Struct<{
59
+ readonly filename: Schema.String;
60
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
61
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
62
+ readonly contentType: Schema.String;
63
+ readonly size: Schema.Finite;
64
+ }>>, Schema.Null]>>;
65
+ readonly publicationId: Schema.optionalKey<Schema.brand<Schema.String, "TemplatePublicationId">>;
66
+ readonly inputContractId: Schema.optionalKey<Schema.brand<Schema.String, "TemplateInputContractId">>;
67
+ readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
68
+ readonly templateSlug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
69
+ readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared").JsonValue, import("./shared").JsonValue, never, never>>>, Schema.Null]>>;
70
+ readonly locale: Schema.optionalKey<Schema.String>;
71
+ readonly timeZone: Schema.optionalKey<Schema.String>;
72
+ readonly inReplyToMessageId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>>;
73
+ readonly replyTo: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
74
+ readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
75
+ readonly tracking: Schema.optionalKey<Schema.Struct<{
76
+ readonly opens: Schema.optionalKey<Schema.Boolean>;
77
+ readonly clicks: Schema.optionalKey<Schema.Boolean>;
78
+ }>>;
79
+ readonly footer: Schema.optionalKey<Schema.Struct<{
80
+ readonly enabled: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
81
+ }>>;
82
+ readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
83
+ }>;
35
84
  export type EmailDispatchContent = {
36
85
  readonly subject?: string | null;
37
86
  readonly html?: string | null;
@@ -142,7 +191,7 @@ export type StoredEmailSendMessage = {
142
191
  readonly email: string;
143
192
  readonly name?: string | null;
144
193
  } | null;
145
- readonly email: EmailContent;
194
+ readonly email: StoredEmailContent;
146
195
  };
147
196
  export declare const StoredEmailSendMessage: Schema.Struct<{
148
197
  readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
@@ -1,5 +1,5 @@
1
1
  import { AbsoluteInstant } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients } from "./shared.js";
2
+ import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailCustomHeaders, EmailFooterOverride, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MalformedRequestError, MessageId, MessageMetadata, NamespaceId, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SenderNotReadyError, SmsContent, SmsDispatchContent, SmsRecipients, StoredEmailAttachments, StoredReplyToAddresses, TemplateData, TemplateId, TemplateInputContractId, TemplatePublicationId, TopicId, UnauthorizedError, ValidationError, WhatsAppContent, WhatsAppRecipients } from "./shared.js";
3
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
4
  import * as Schema from "effect/Schema";
5
5
  // src/effect/generated/scheduled-messages.ts
@@ -17,10 +17,29 @@ const SavedPhoneRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
17
17
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18
18
  displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
19
19
  })]).annotate({ identifier: "SavedPhoneRecipient" }))();
20
- const EmailDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
20
+ const StoredEmailContent = /* @__PURE__ */ (() => Schema.Struct({
21
21
  subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22
22
  html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23
23
  text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24
+ attachments: Schema.optionalKey(StoredEmailAttachments),
25
+ publicationId: Schema.optionalKey(TemplatePublicationId),
26
+ inputContractId: Schema.optionalKey(TemplateInputContractId),
27
+ templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
28
+ templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.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])),
29
+ templateData: Schema.optionalKey(TemplateData),
30
+ locale: Schema.optionalKey(RenderLocale),
31
+ timeZone: Schema.optionalKey(RenderTimeZone),
32
+ inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null])),
33
+ replyTo: Schema.optionalKey(StoredReplyToAddresses),
34
+ topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null]).annotate({ description: "The topic for this send. Omit to inherit the template topic; null disables topic inheritance for a direct send. Campaigns require a topic." })),
35
+ tracking: Schema.optionalKey(EmailTrackingOverrideV1),
36
+ footer: Schema.optionalKey(EmailFooterOverride),
37
+ headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
38
+ }).annotate({ identifier: "StoredEmailContent" }))();
39
+ const EmailDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
40
+ subject: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[^\\p{Cc}]*$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\p{Cc}]*$" })), Schema.Null])),
41
+ html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
42
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24
43
  attachments: Schema.optionalKey(EmailAttachments),
25
44
  publicationId: Schema.optionalKey(TemplatePublicationId),
26
45
  inputContractId: Schema.optionalKey(TemplateInputContractId),
@@ -64,7 +83,7 @@ const StoredEmailSendMessage = /* @__PURE__ */ (() => Schema.Struct({
64
83
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
65
84
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
66
85
  }), Schema.Null])),
67
- email: EmailContent
86
+ email: StoredEmailContent
68
87
  }).annotate({ identifier: "StoredEmailSendMessage" }))();
69
88
  const EmailDispatchSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
70
89
  conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
@@ -90,7 +109,7 @@ const WhatsAppDispatchSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct(
90
109
  to: WhatsAppRecipients,
91
110
  whatsapp: WhatsAppContent
92
111
  }).annotate({
93
- description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
112
+ description: "Send WhatsApp messages from your connected business account.",
94
113
  identifier: "WhatsAppDispatchSendMessagePayload"
95
114
  }))();
96
115
  const StoredSendMessagePayload = /* @__PURE__ */ (() => Schema.Union([
@@ -234,7 +253,7 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
234
253
  ScheduledMessagesCreate502.pipe(HttpApiSchema.status(502)),
235
254
  ScheduledMessagesCreate504.pipe(HttpApiSchema.status(504))
236
255
  ]
237
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.create").annotate(OpenApi.Summary, "Schedule a message").annotate(OpenApi.Description, "Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. Optional timezone is validated IANA display metadata only and never changes the execution instant."), HttpApiEndpoint.get("scheduledMessagesGet", "/v1/messages/scheduled/:id", {
256
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.create").annotate(OpenApi.Summary, "Schedule a message").annotate(OpenApi.Description, "Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Requires `messages:create` or the send permission of the channel it sends on, such as `email:send`. The send payload is the same channel union the immediate send accepts, with each channel's content checked at schedule time so a send that could never render fails now rather than hours later: email and WhatsApp schedules are available. Optional timezone is validated IANA display metadata only and never changes the execution instant."), HttpApiEndpoint.get("scheduledMessagesGet", "/v1/messages/scheduled/:id", {
238
257
  params: ScheduledMessagesGetPathParams,
239
258
  success: ScheduledMessagesGet200,
240
259
  error: [
@@ -276,6 +295,6 @@ var ScheduledMessagesGroup = class extends HttpApiGroup.make("Scheduled Messages
276
295
  ScheduledMessagesResume504.pipe(HttpApiSchema.status(504))
277
296
  ]
278
297
  }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "scheduledMessages.resume").annotate(OpenApi.Summary, "Resume a review-paused scheduled message").annotate(OpenApi.Description, "Explicitly resumes a scheduled message after onboarding review clearance. An overdue message requires either send_now or a new future scheduledFor value.")).annotate(OpenApi.Description, "One-off scheduled message timers") {};
279
- export { DispatchSendMessagePayload, EmailDispatchContent, EmailDispatchSendMessagePayload, SavedEmailRecipient, SavedPhoneRecipient, ScheduledMessage, ScheduledMessageId, ScheduledMessagePage, ScheduledMessagesCancel200, ScheduledMessagesCancel400, ScheduledMessagesCancel401, ScheduledMessagesCancel403, ScheduledMessagesCancel404, ScheduledMessagesCancel409, ScheduledMessagesCancel422, ScheduledMessagesCancel500, ScheduledMessagesCancel504, ScheduledMessagesCancelPathParams, ScheduledMessagesCreate201, ScheduledMessagesCreate400, ScheduledMessagesCreate401, ScheduledMessagesCreate403, ScheduledMessagesCreate404, ScheduledMessagesCreate409, ScheduledMessagesCreate422, ScheduledMessagesCreate500, ScheduledMessagesCreate502, ScheduledMessagesCreate504, ScheduledMessagesCreateHeaders, ScheduledMessagesCreateRequestJson, ScheduledMessagesGet200, ScheduledMessagesGet400, ScheduledMessagesGet401, ScheduledMessagesGet403, ScheduledMessagesGet404, ScheduledMessagesGet422, ScheduledMessagesGet500, ScheduledMessagesGet504, ScheduledMessagesGetPathParams, ScheduledMessagesGroup, ScheduledMessagesList200, ScheduledMessagesList400, ScheduledMessagesList401, ScheduledMessagesList403, ScheduledMessagesList422, ScheduledMessagesList500, ScheduledMessagesList504, ScheduledMessagesListQuery, ScheduledMessagesResume200, ScheduledMessagesResume400, ScheduledMessagesResume401, ScheduledMessagesResume403, ScheduledMessagesResume404, ScheduledMessagesResume409, ScheduledMessagesResume422, ScheduledMessagesResume500, ScheduledMessagesResume502, ScheduledMessagesResume503, ScheduledMessagesResume504, ScheduledMessagesResumePathParams, ScheduledMessagesResumeRequestJson, SmsDispatchSendMessagePayload, StoredEmailSendMessage, StoredSendMessagePayload, StoredSmsSendMessage, StoredWhatsAppSendMessage, WhatsAppDispatchSendMessagePayload };
298
+ export { DispatchSendMessagePayload, EmailDispatchContent, EmailDispatchSendMessagePayload, SavedEmailRecipient, SavedPhoneRecipient, ScheduledMessage, ScheduledMessageId, ScheduledMessagePage, ScheduledMessagesCancel200, ScheduledMessagesCancel400, ScheduledMessagesCancel401, ScheduledMessagesCancel403, ScheduledMessagesCancel404, ScheduledMessagesCancel409, ScheduledMessagesCancel422, ScheduledMessagesCancel500, ScheduledMessagesCancel504, ScheduledMessagesCancelPathParams, ScheduledMessagesCreate201, ScheduledMessagesCreate400, ScheduledMessagesCreate401, ScheduledMessagesCreate403, ScheduledMessagesCreate404, ScheduledMessagesCreate409, ScheduledMessagesCreate422, ScheduledMessagesCreate500, ScheduledMessagesCreate502, ScheduledMessagesCreate504, ScheduledMessagesCreateHeaders, ScheduledMessagesCreateRequestJson, ScheduledMessagesGet200, ScheduledMessagesGet400, ScheduledMessagesGet401, ScheduledMessagesGet403, ScheduledMessagesGet404, ScheduledMessagesGet422, ScheduledMessagesGet500, ScheduledMessagesGet504, ScheduledMessagesGetPathParams, ScheduledMessagesGroup, ScheduledMessagesList200, ScheduledMessagesList400, ScheduledMessagesList401, ScheduledMessagesList403, ScheduledMessagesList422, ScheduledMessagesList500, ScheduledMessagesList504, ScheduledMessagesListQuery, ScheduledMessagesResume200, ScheduledMessagesResume400, ScheduledMessagesResume401, ScheduledMessagesResume403, ScheduledMessagesResume404, ScheduledMessagesResume409, ScheduledMessagesResume422, ScheduledMessagesResume500, ScheduledMessagesResume502, ScheduledMessagesResume503, ScheduledMessagesResume504, ScheduledMessagesResumePathParams, ScheduledMessagesResumeRequestJson, SmsDispatchSendMessagePayload, StoredEmailContent, StoredEmailSendMessage, StoredSendMessagePayload, StoredSmsSendMessage, StoredWhatsAppSendMessage, WhatsAppDispatchSendMessagePayload };
280
299
 
281
300
  //# sourceMappingURL=scheduled-messages.js.map
@@ -10,6 +10,8 @@ export type NamespaceId = string & EffectBrand.Brand<"NamespaceId">;
10
10
  export declare const NamespaceId: Schema.brand<Schema.String, "NamespaceId">;
11
11
  export type AgentId = string & EffectBrand.Brand<"AgentId">;
12
12
  export declare const AgentId: Schema.brand<Schema.String, "AgentId">;
13
+ export type AgentSetupJob = "support" | "store" | "booking";
14
+ export declare const AgentSetupJob: Schema.Union<readonly [Schema.Literal<"support">, Schema.Literal<"store">, Schema.Literal<"booking">]>;
13
15
  declare const MalformedRequestError_base: Schema.Class<MalformedRequestError, Schema.Struct<{
14
16
  readonly _tag: Schema.tag<"MalformedRequestError">;
15
17
  readonly message: Schema.String;
@@ -243,8 +245,8 @@ export type RenderLocale = string;
243
245
  export declare const RenderLocale: Schema.String;
244
246
  export type RenderTimeZone = string;
245
247
  export declare const RenderTimeZone: Schema.String;
246
- export type ReplyToAddresses = ReadonlyArray<string> | null;
247
- export declare const ReplyToAddresses: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
248
+ export type StoredReplyToAddresses = ReadonlyArray<string> | null;
249
+ export declare const StoredReplyToAddresses: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
248
250
  export type TopicId = string & EffectBrand.Brand<"TopicId">;
249
251
  export declare const TopicId: Schema.brand<Schema.String, "TopicId">;
250
252
  export type EmailTrackingOverrideV1 = {
@@ -297,6 +299,8 @@ export type CampaignRunId = string & EffectBrand.Brand<"CampaignRunId">;
297
299
  export declare const CampaignRunId: Schema.brand<Schema.String, "CampaignRunId">;
298
300
  export type SendsSeries = ReadonlyArray<number>;
299
301
  export declare const SendsSeries: Schema.$Array<Schema.Finite>;
302
+ export type ReplyToAddresses = ReadonlyArray<string> | null;
303
+ export declare const ReplyToAddresses: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>;
300
304
  export type CampaignFromInput = {
301
305
  readonly email: string;
302
306
  readonly name?: string | null;
@@ -849,14 +853,6 @@ export declare const OperationResource: Schema.Struct<{
849
853
  }>;
850
854
  export type PolicyVersion = number;
851
855
  export declare const PolicyVersion: Schema.Finite;
852
- export type TemplateFromDefault = {
853
- readonly email: string;
854
- readonly name?: string | null;
855
- };
856
- export declare const TemplateFromDefault: Schema.Struct<{
857
- readonly email: Schema.String;
858
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
859
- }>;
860
856
  export type TemplateTrackingDefault = {
861
857
  readonly opens?: boolean | null;
862
858
  readonly clicks?: boolean | null;
@@ -875,6 +871,14 @@ declare const TemplateInUseError_base: Schema.Class<TemplateInUseError, Schema.S
875
871
  }>, import("effect/Cause").YieldableError>;
876
872
  export declare class TemplateInUseError extends TemplateInUseError_base {
877
873
  }
874
+ export type TemplateFromDefaultInput = {
875
+ readonly email: string;
876
+ readonly name?: string | null;
877
+ };
878
+ export declare const TemplateFromDefaultInput: Schema.Struct<{
879
+ readonly email: Schema.String;
880
+ readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
881
+ }>;
878
882
  export type TopicContactByEmail = {
879
883
  readonly email: string;
880
884
  };
@@ -2282,7 +2286,7 @@ export type UpdateTemplatePayload = {
2282
2286
  readonly entryPath?: string | null;
2283
2287
  readonly description?: string | null;
2284
2288
  readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null;
2285
- readonly fromDefault?: TemplateFromDefault | null;
2289
+ readonly fromDefault?: TemplateFromDefaultInput | null;
2286
2290
  readonly replyToDefault?: ReadonlyArray<string> | null;
2287
2291
  readonly trackingDefault?: TemplateTrackingDefault | null;
2288
2292
  readonly shared?: boolean | null;
@@ -2460,6 +2464,14 @@ export declare const UpdateBrand: Schema.Struct<{
2460
2464
  }>>, Schema.Null]>>;
2461
2465
  }>, Schema.Null]>>;
2462
2466
  }>;
2467
+ export type StoredEmailAttachments = ReadonlyArray<EmailAttachment> | null;
2468
+ export declare const StoredEmailAttachments: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2469
+ readonly filename: Schema.String;
2470
+ readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2471
+ readonly mediaId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MediaId">, Schema.Null]>>;
2472
+ readonly contentType: Schema.String;
2473
+ readonly size: Schema.Finite;
2474
+ }>>, Schema.Null]>;
2463
2475
  export type EmailAttachments = ReadonlyArray<EmailAttachment> | null;
2464
2476
  export declare const EmailAttachments: Schema.Union<readonly [Schema.$Array<Schema.Struct<{
2465
2477
  readonly filename: Schema.String;
@@ -4739,11 +4751,13 @@ export declare const JourneyBranchEdge: Schema.Struct<{
4739
4751
  }>;
4740
4752
  export type CreateAgentPayload = {
4741
4753
  readonly name: AgentName;
4754
+ readonly setupJob?: AgentSetupJob | null;
4742
4755
  readonly namespaceId?: NamespaceId | null;
4743
4756
  readonly definition?: AgentDefinition | null;
4744
4757
  };
4745
4758
  export declare const CreateAgentPayload: Schema.Struct<{
4746
4759
  readonly name: Schema.String;
4760
+ readonly setupJob: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"support">, Schema.Literal<"store">, Schema.Literal<"booking">]>, Schema.Null]>>;
4747
4761
  readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
4748
4762
  readonly definition: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
4749
4763
  readonly instructions: Schema.String;