8
8
import Foundation
9
9
10
10
/// The format of the email body
11
- public enum EmailBodyFormat : String , Codable {
11
+ public enum EmailBodyFormat : String , Codable , Sendable {
12
12
/// The body format is a markdown text
13
13
case markdown
14
14
/// The body format is html text
15
15
case html
16
16
}
17
17
18
18
/// Represents a custom contact property.
19
- public enum CustomContactPropertyValue : Codable , Equatable {
19
+ public enum CustomContactPropertyValue : Codable , Equatable , Sendable {
20
20
/// A string property
21
21
case string( String )
22
22
/// A number property
@@ -78,7 +78,7 @@ public enum CustomContactPropertyValue: Codable, Equatable {
78
78
}
79
79
80
80
/// A contact in the mailing list
81
- public struct Contact : Codable {
81
+ public struct Contact : Codable , Sendable {
82
82
public init ( email: String , userId: String ? = nil , avatarUrl: String ? = nil , name: String ? = nil , hardBouncedAt: Date ? = nil , subscribedToLists: [ String ] , customProperties: [ String : CustomContactPropertyValue ] , languageCode: String ? = nil ) {
83
83
self . email = email
84
84
self . userId = userId
@@ -109,7 +109,7 @@ public struct Contact: Codable {
109
109
}
110
110
111
111
/// The payload to create a new contact
112
- public struct CreateContact : Codable {
112
+ public struct CreateContact : Codable , Sendable {
113
113
114
114
/// Initializer
115
115
/// - Parameters:
@@ -155,7 +155,7 @@ public struct CreateContact: Codable {
155
155
}
156
156
157
157
/// The payload to create multiple contacts using a single API call
158
- public struct CreateMultipleContacts : Codable {
158
+ public struct CreateMultipleContacts : Codable , Sendable {
159
159
160
160
/// Initializer
161
161
/// - Parameter contacts: The list of contacts to create
@@ -168,7 +168,7 @@ public struct CreateMultipleContacts: Codable {
168
168
}
169
169
170
170
/// The payload to update a contact in the mailing list. The email is required to identify the contact.
171
- public struct UpdateContact : Codable {
171
+ public struct UpdateContact : Codable , Sendable {
172
172
173
173
/// Initializer
174
174
/// - Parameters:
@@ -210,7 +210,7 @@ public struct UpdateContact: Codable {
210
210
}
211
211
212
212
/// Payload of send transactional email request.
213
- public struct SendEmail : Codable {
213
+ public struct SendEmail : Codable , Sendable {
214
214
215
215
/// Initializer
216
216
/// - Parameters:
@@ -239,7 +239,7 @@ public struct SendEmail: Codable {
239
239
}
240
240
241
241
/// Send an email to one of more registered contacts.
242
- public struct SendEmailToContact : Codable {
242
+ public struct SendEmailToContact : Codable , Sendable {
243
243
244
244
/// Initializer
245
245
/// - Parameters:
@@ -287,7 +287,7 @@ public struct SendEmailToContact: Codable {
287
287
public var delayUntilDate : Date ?
288
288
}
289
289
290
- public struct SendEmailToMailingList : Codable {
290
+ public struct SendEmailToMailingList : Codable , Sendable {
291
291
292
292
/// Initializer
293
293
/// - Parameters:
@@ -326,7 +326,7 @@ public struct SendEmailToMailingList: Codable {
326
326
}
327
327
328
328
/// Represents a mailing list contacts can subscribe to, such as `Monthly newsletter` or `Onboarding`.
329
- public struct MailingList : Codable {
329
+ public struct MailingList : Codable , Sendable {
330
330
331
331
public init ( name: String , title: String , numSubscribers: Int ) {
332
332
self . name = name
@@ -345,7 +345,7 @@ public struct MailingList: Codable {
345
345
}
346
346
347
347
/// A portal session that allows a contact to manage their email list subscriptions when redirected to returned `url`. A session is valid for 30 minutes.
348
- public struct MailingListPortalSession : Codable {
348
+ public struct MailingListPortalSession : Codable , Sendable {
349
349
public init ( url: URL , expiresAt: Date , returnURL: URL ) {
350
350
self . url = url
351
351
self . expiresAt = expiresAt
0 commit comments