Skip to content

Commit 226b293

Browse files
Update API Client
#### What's Changed --- ##### `GET` /events/transports/{uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ##### `PUT` /events/transports/{uuid}/ ###### Request: Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ##### `PATCH` /events/transports/{uuid}/ ###### Request: Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ##### `GET` /policies/geoip/{policy_uuid}/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `PUT` /policies/geoip/{policy_uuid}/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `PATCH` /policies/geoip/{policy_uuid}/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `countries` (array) ##### `POST` /events/transports/ ###### Request: Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ##### `GET` /events/transports/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > NotificationTransport Serializer * Added property `email_subject_prefix` (string) * Added property `email_template` (string) ##### `POST` /policies/geoip/ ###### Request: Changed content type : `application/json` * Changed property `countries` (array) ###### Return Type: Changed response : **201 Created** * Changed content type : `application/json` * Changed property `countries` (array) ##### `GET` /policies/geoip/ ###### Return Type: Changed response : **200 OK** * Changed content type : `application/json` * Changed property `results` (array) Changed items (object): > GeoIP Policy Serializer * Changed property `countries` (array)
1 parent e349860 commit 226b293

File tree

8 files changed

+52
-6
lines changed

8 files changed

+52
-6
lines changed

Sources/authentikClient/Models/NotificationTransport.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ public struct NotificationTransport: Sendable, Codable, ParameterConvertible, Ha
2020
public var webhookMappingBody: UUID?
2121
/** Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs */
2222
public var webhookMappingHeaders: UUID?
23+
public var emailSubjectPrefix: String?
24+
public var emailTemplate: String?
2325
/** Only send notification once, for example when sending a webhook into a chat channel. */
2426
public var sendOnce: Bool?
2527

26-
public init(pk: UUID, name: String, mode: NotificationTransportModeEnum? = nil, modeVerbose: String, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, sendOnce: Bool? = nil) {
28+
public init(pk: UUID, name: String, mode: NotificationTransportModeEnum? = nil, modeVerbose: String, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, emailSubjectPrefix: String? = nil, emailTemplate: String? = nil, sendOnce: Bool? = nil) {
2729
self.pk = pk
2830
self.name = name
2931
self.mode = mode
3032
self.modeVerbose = modeVerbose
3133
self.webhookUrl = webhookUrl
3234
self.webhookMappingBody = webhookMappingBody
3335
self.webhookMappingHeaders = webhookMappingHeaders
36+
self.emailSubjectPrefix = emailSubjectPrefix
37+
self.emailTemplate = emailTemplate
3438
self.sendOnce = sendOnce
3539
}
3640

@@ -42,6 +46,8 @@ public struct NotificationTransport: Sendable, Codable, ParameterConvertible, Ha
4246
case webhookUrl = "webhook_url"
4347
case webhookMappingBody = "webhook_mapping_body"
4448
case webhookMappingHeaders = "webhook_mapping_headers"
49+
case emailSubjectPrefix = "email_subject_prefix"
50+
case emailTemplate = "email_template"
4551
case sendOnce = "send_once"
4652
}
4753

@@ -56,6 +62,8 @@ public struct NotificationTransport: Sendable, Codable, ParameterConvertible, Ha
5662
try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl)
5763
try container.encodeIfPresent(webhookMappingBody, forKey: .webhookMappingBody)
5864
try container.encodeIfPresent(webhookMappingHeaders, forKey: .webhookMappingHeaders)
65+
try container.encodeIfPresent(emailSubjectPrefix, forKey: .emailSubjectPrefix)
66+
try container.encodeIfPresent(emailTemplate, forKey: .emailTemplate)
5967
try container.encodeIfPresent(sendOnce, forKey: .sendOnce)
6068
}
6169
}

Sources/authentikClient/Models/NotificationTransportRequest.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,27 @@ import Foundation
1111
public struct NotificationTransportRequest: Sendable, Codable, ParameterConvertible, Hashable {
1212

1313
public static let nameRule = StringRule(minLength: 1, maxLength: nil, pattern: nil)
14+
public static let emailTemplateRule = StringRule(minLength: 1, maxLength: nil, pattern: nil)
1415
public var name: String
1516
public var mode: NotificationTransportModeEnum?
1617
public var webhookUrl: String?
1718
/** Customize the body of the request. Mapping should return data that is JSON-serializable. */
1819
public var webhookMappingBody: UUID?
1920
/** Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs */
2021
public var webhookMappingHeaders: UUID?
22+
public var emailSubjectPrefix: String?
23+
public var emailTemplate: String?
2124
/** Only send notification once, for example when sending a webhook into a chat channel. */
2225
public var sendOnce: Bool?
2326

24-
public init(name: String, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, sendOnce: Bool? = nil) {
27+
public init(name: String, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, emailSubjectPrefix: String? = nil, emailTemplate: String? = nil, sendOnce: Bool? = nil) {
2528
self.name = name
2629
self.mode = mode
2730
self.webhookUrl = webhookUrl
2831
self.webhookMappingBody = webhookMappingBody
2932
self.webhookMappingHeaders = webhookMappingHeaders
33+
self.emailSubjectPrefix = emailSubjectPrefix
34+
self.emailTemplate = emailTemplate
3035
self.sendOnce = sendOnce
3136
}
3237

@@ -36,6 +41,8 @@ public struct NotificationTransportRequest: Sendable, Codable, ParameterConverti
3641
case webhookUrl = "webhook_url"
3742
case webhookMappingBody = "webhook_mapping_body"
3843
case webhookMappingHeaders = "webhook_mapping_headers"
44+
case emailSubjectPrefix = "email_subject_prefix"
45+
case emailTemplate = "email_template"
3946
case sendOnce = "send_once"
4047
}
4148

@@ -48,6 +55,8 @@ public struct NotificationTransportRequest: Sendable, Codable, ParameterConverti
4855
try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl)
4956
try container.encodeIfPresent(webhookMappingBody, forKey: .webhookMappingBody)
5057
try container.encodeIfPresent(webhookMappingHeaders, forKey: .webhookMappingHeaders)
58+
try container.encodeIfPresent(emailSubjectPrefix, forKey: .emailSubjectPrefix)
59+
try container.encodeIfPresent(emailTemplate, forKey: .emailTemplate)
5160
try container.encodeIfPresent(sendOnce, forKey: .sendOnce)
5261
}
5362
}

Sources/authentikClient/Models/PatchedNotificationTransportRequest.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,27 @@ import Foundation
1111
public struct PatchedNotificationTransportRequest: Sendable, Codable, ParameterConvertible, Hashable {
1212

1313
public static let nameRule = StringRule(minLength: 1, maxLength: nil, pattern: nil)
14+
public static let emailTemplateRule = StringRule(minLength: 1, maxLength: nil, pattern: nil)
1415
public var name: String?
1516
public var mode: NotificationTransportModeEnum?
1617
public var webhookUrl: String?
1718
/** Customize the body of the request. Mapping should return data that is JSON-serializable. */
1819
public var webhookMappingBody: UUID?
1920
/** Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs */
2021
public var webhookMappingHeaders: UUID?
22+
public var emailSubjectPrefix: String?
23+
public var emailTemplate: String?
2124
/** Only send notification once, for example when sending a webhook into a chat channel. */
2225
public var sendOnce: Bool?
2326

24-
public init(name: String? = nil, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, sendOnce: Bool? = nil) {
27+
public init(name: String? = nil, mode: NotificationTransportModeEnum? = nil, webhookUrl: String? = nil, webhookMappingBody: UUID? = nil, webhookMappingHeaders: UUID? = nil, emailSubjectPrefix: String? = nil, emailTemplate: String? = nil, sendOnce: Bool? = nil) {
2528
self.name = name
2629
self.mode = mode
2730
self.webhookUrl = webhookUrl
2831
self.webhookMappingBody = webhookMappingBody
2932
self.webhookMappingHeaders = webhookMappingHeaders
33+
self.emailSubjectPrefix = emailSubjectPrefix
34+
self.emailTemplate = emailTemplate
3035
self.sendOnce = sendOnce
3136
}
3237

@@ -36,6 +41,8 @@ public struct PatchedNotificationTransportRequest: Sendable, Codable, ParameterC
3641
case webhookUrl = "webhook_url"
3742
case webhookMappingBody = "webhook_mapping_body"
3843
case webhookMappingHeaders = "webhook_mapping_headers"
44+
case emailSubjectPrefix = "email_subject_prefix"
45+
case emailTemplate = "email_template"
3946
case sendOnce = "send_once"
4047
}
4148

@@ -48,6 +55,8 @@ public struct PatchedNotificationTransportRequest: Sendable, Codable, ParameterC
4855
try container.encodeIfPresent(webhookUrl, forKey: .webhookUrl)
4956
try container.encodeIfPresent(webhookMappingBody, forKey: .webhookMappingBody)
5057
try container.encodeIfPresent(webhookMappingHeaders, forKey: .webhookMappingHeaders)
58+
try container.encodeIfPresent(emailSubjectPrefix, forKey: .emailSubjectPrefix)
59+
try container.encodeIfPresent(emailTemplate, forKey: .emailTemplate)
5160
try container.encodeIfPresent(sendOnce, forKey: .sendOnce)
5261
}
5362
}

docs/EventsAPI.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ NotificationTransport Viewset
12601260
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
12611261
import authentikClient
12621262

1263-
let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, sendOnce: false) // NotificationTransportRequest |
1263+
let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, emailSubjectPrefix: "emailSubjectPrefix_example", emailTemplate: "emailTemplate_example", sendOnce: false) // NotificationTransportRequest |
12641264

12651265
EventsAPI.eventsTransportsCreate(notificationTransportRequest: notificationTransportRequest) { (response, error) in
12661266
guard error == nil else {
@@ -1422,7 +1422,7 @@ NotificationTransport Viewset
14221422
import authentikClient
14231423

14241424
let uuid = 987 // UUID | A UUID string identifying this Notification Transport.
1425-
let patchedNotificationTransportRequest = PatchedNotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, sendOnce: false) // PatchedNotificationTransportRequest | (optional)
1425+
let patchedNotificationTransportRequest = PatchedNotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, emailSubjectPrefix: "emailSubjectPrefix_example", emailTemplate: "emailTemplate_example", sendOnce: false) // PatchedNotificationTransportRequest | (optional)
14261426

14271427
EventsAPI.eventsTransportsPartialUpdate(uuid: uuid, patchedNotificationTransportRequest: patchedNotificationTransportRequest) { (response, error) in
14281428
guard error == nil else {
@@ -1571,7 +1571,7 @@ NotificationTransport Viewset
15711571
import authentikClient
15721572

15731573
let uuid = 987 // UUID | A UUID string identifying this Notification Transport.
1574-
let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, sendOnce: false) // NotificationTransportRequest |
1574+
let notificationTransportRequest = NotificationTransportRequest(name: "name_example", mode: NotificationTransportModeEnum(), webhookUrl: "webhookUrl_example", webhookMappingBody: 123, webhookMappingHeaders: 123, emailSubjectPrefix: "emailSubjectPrefix_example", emailTemplate: "emailTemplate_example", sendOnce: false) // NotificationTransportRequest |
15751575

15761576
EventsAPI.eventsTransportsUpdate(uuid: uuid, notificationTransportRequest: notificationTransportRequest) { (response, error) in
15771577
guard error == nil else {

docs/NotificationTransport.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
1010
**webhookUrl** | **String** | | [optional]
1111
**webhookMappingBody** | **UUID** | Customize the body of the request. Mapping should return data that is JSON-serializable. | [optional]
1212
**webhookMappingHeaders** | **UUID** | Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs | [optional]
13+
**emailSubjectPrefix** | **String** | | [optional]
14+
**emailTemplate** | **String** | | [optional]
1315
**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional]
1416

1517
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/NotificationTransportRequest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
88
**webhookUrl** | **String** | | [optional]
99
**webhookMappingBody** | **UUID** | Customize the body of the request. Mapping should return data that is JSON-serializable. | [optional]
1010
**webhookMappingHeaders** | **UUID** | Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs | [optional]
11+
**emailSubjectPrefix** | **String** | | [optional]
12+
**emailTemplate** | **String** | | [optional]
1113
**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional]
1214

1315
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/PatchedNotificationTransportRequest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
88
**webhookUrl** | **String** | | [optional]
99
**webhookMappingBody** | **UUID** | Customize the body of the request. Mapping should return data that is JSON-serializable. | [optional]
1010
**webhookMappingHeaders** | **UUID** | Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs | [optional]
11+
**emailSubjectPrefix** | **String** | | [optional]
12+
**emailTemplate** | **String** | | [optional]
1113
**sendOnce** | **Bool** | Only send notification once, for example when sending a webhook into a chat channel. | [optional]
1214

1315
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

schema.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49345,6 +49345,10 @@ components:
4934549345
nullable: true
4934649346
description: Configure additional headers to be sent. Mapping should return
4934749347
a dictionary of key-value pairs
49348+
email_subject_prefix:
49349+
type: string
49350+
email_template:
49351+
type: string
4934849352
send_once:
4934949353
type: boolean
4935049354
description: Only send notification once, for example when sending a webhook
@@ -49384,6 +49388,11 @@ components:
4938449388
nullable: true
4938549389
description: Configure additional headers to be sent. Mapping should return
4938649390
a dictionary of key-value pairs
49391+
email_subject_prefix:
49392+
type: string
49393+
email_template:
49394+
type: string
49395+
minLength: 1
4938749396
send_once:
4938849397
type: boolean
4938949398
description: Only send notification once, for example when sending a webhook
@@ -54481,6 +54490,11 @@ components:
5448154490
nullable: true
5448254491
description: Configure additional headers to be sent. Mapping should return
5448354492
a dictionary of key-value pairs
54493+
email_subject_prefix:
54494+
type: string
54495+
email_template:
54496+
type: string
54497+
minLength: 1
5448454498
send_once:
5448554499
type: boolean
5448654500
description: Only send notification once, for example when sending a webhook

0 commit comments

Comments
 (0)