-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathStytchB2BClient.SCIM.rotateStart+AsyncVariants.generated.swift
37 lines (35 loc) · 1.5 KB
/
StytchB2BClient.SCIM.rotateStart+AsyncVariants.generated.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Generated using Sourcery 2.0.2 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
import Combine
import Foundation
public extension StytchB2BClient.SCIM {
/// Starts the SCIM bearer token rotation process.
/// This method wraps the start-rotation endpoint (https://stytch.com/docs/b2b/api/scim-rotate-token-start).
/// The caller must have permission to modify SCIM via the project's RBAC policy & their role assignments.
func rotateStart(parameters: RotateParameters, completion: @escaping Completion<SCIMRotateStartResponse>) {
Task {
do {
completion(.success(try await rotateStart(parameters: parameters)))
} catch {
completion(.failure(error))
}
}
}
/// Starts the SCIM bearer token rotation process.
/// This method wraps the start-rotation endpoint (https://stytch.com/docs/b2b/api/scim-rotate-token-start).
/// The caller must have permission to modify SCIM via the project's RBAC policy & their role assignments.
func rotateStart(parameters: RotateParameters) -> AnyPublisher<SCIMRotateStartResponse, Error> {
return Deferred {
Future({ promise in
Task {
do {
promise(.success(try await rotateStart(parameters: parameters)))
} catch {
promise(.failure(error))
}
}
})
}
.eraseToAnyPublisher()
}
}