Skip to content

Commit 61b59e1

Browse files
committed
DEX-292 feat: added comments to this SDK
1 parent c025768 commit 61b59e1

26 files changed

Lines changed: 128 additions & 128 deletions

Sources/Skyflow/collect/CollectContainer.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
import Foundation
88
import UIKit
99

10-
/// Wraps all Collect Elements.
10+
/// This is the description for CollectContainer Class
1111
public class CollectContainer: ContainerProtocol {}
1212

1313
public extension Container {
1414

1515
/**
16-
Creates a Collect Element.
16+
This is the description for create method.
1717

1818
- Parameters:
19-
- input: Collect Element input.
20-
- options: Collect Element options.
19+
- input: This is the description for input parameter.
20+
- options: This is the description for options parameter.
2121

22-
- Returns: Returns the Collect Element.
22+
- Returns: This is the description of what method returns.
2323
*/
2424
func create(input: CollectElementInput, options: CollectElementOptions? = CollectElementOptions()) -> TextField where T: CollectContainer {
2525
var tempContextOptions = self.skyflow.contextOptions
@@ -34,11 +34,11 @@ public extension Container {
3434
}
3535

3636
/**
37-
Collects the data and sends it to the vault.
37+
This is the description for collect method.
3838

3939
- Parameters:
40-
- callback: Implementation of Skyflow.Callback.
41-
- options: Collects the data and sends it to the vault.
40+
- callback: This is the description for callback parameter.
41+
- options: This is the description for options parameter.
4242
*/
4343
func collect(callback: Callback, options: CollectOptions? = CollectOptions()) where T: CollectContainer {
4444
var tempContextOptions = self.skyflow.contextOptions

Sources/Skyflow/collect/CollectOptions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
import Foundation
88

9-
/// Options for a Collect Element.
9+
/// This is the description for CollectOptions Class
1010
public struct CollectOptions {
1111
var tokens: Bool
1212
var additionalFields: [String: Any]?
1313
var upsert: [[String: Any]]?
1414

1515
/**
16-
Initializes the Collect options.
16+
This is the description for container method.
1717

1818
- Parameters:
19-
- tokens: If `true`, returns tokens for the collected data. Defaults to `true`.
20-
- additionalFields: Additional, non-sensitive data to insert into the vault.
21-
- upsert: Upsert configuration for the element.
19+
- tokens: This is the description for tokens parameter.
20+
- additionalFields: This is the description for additionalFields parameter.
21+
- upsert: This is the description for upsert paramter.
2222
*/
2323
public init(tokens: Bool = true, additionalFields: [String: Any]? = nil, upsert: [[String: Any]]? = nil) {
2424
self.tokens = tokens

Sources/Skyflow/collect/InsertOptions.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
import Foundation
88

9-
/// Contains additional parameters for the insert method.
9+
/// This is the description for InsertOptions Class
1010
public struct InsertOptions {
1111
var tokens: Bool
1212
var upsert: [[String: Any]]?
1313

1414
/**
15-
Initializes the Insert options.
15+
This is the description for container method.
1616

1717
- Parameters:
18-
- tokens: If `true`, returns tokens for the collected data. Defaults to `false`.
19-
- upsert: If specified, upserts data. If not specified, inserts data.
18+
- tokens: This is the description for tokens parameter.
19+
- upsert: This is the description for upsert parameter.
2020
*/
2121
public init(tokens: Bool = true, upsert: [[String: Any]]? = nil) {
2222
self.tokens = tokens

Sources/Skyflow/core/Client.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public class Client {
1616
var elementLookup: [String: Any] = [:]
1717

1818
/**
19-
Initializes the Skyflow client.
19+
This is the description for init method.
2020

2121
- Parameters:
22-
- skyflowConfig: Configuration for the Skyflow client.
22+
- skyflowConfig: This is the description for skyflowConfig parameter.
2323
*/
2424
public init(_ skyflowConfig: Configuration) {
2525
self.vaultID = skyflowConfig.vaultID
@@ -30,12 +30,12 @@ public class Client {
3030
}
3131

3232
/**
33-
Inserts data into the vault.
33+
This is the description for insert method.
3434

3535
- Parameters:
36-
- records: Records to insert.
37-
- options: Options for the insertion.
38-
- callback: Implementation of Skyflow.Callback.
36+
- records: This is the description for records parameter.
37+
- options: This is the description for options parameter.
38+
- callback: This is the description for callback parameter.
3939
*/
4040
public func insert(records: [String: Any], options: InsertOptions = InsertOptions(), callback: Callback) {
4141
var tempContextOptions = self.contextOptions
@@ -111,13 +111,13 @@ public class Client {
111111
}
112112

113113
/**
114-
Creates a container.
114+
This is the description for container method.
115115

116116
- Parameters:
117-
- type: Type of the container.
118-
- options: Options for the container.
117+
- type: This is the description for type parameter.
118+
- options: This is the description for options parameter.
119119

120-
- Returns: Returns a container of the specified type.
120+
- Returns: This is the description of what method returns.
121121
*/
122122
public func container<T>(type: T.Type, options: ContainerOptions? = ContainerOptions()) -> Container<T>? {
123123
if options != nil {
@@ -138,12 +138,12 @@ public class Client {
138138
}
139139

140140
/**
141-
Returns values that correspond to the specified tokens.
141+
This is the description for detokenize method.
142142

143143
- Parameters:
144-
- records: Records to fetch.
145-
- options: Additional options for the reveal method.
146-
- callback: Implementation of Skyflow.Callback.
144+
- records: This is the description for records parameter.
145+
- options: This is the description for options parameter.
146+
- callback: This is the description for callback paramter.
147147
*/
148148
public func detokenize(records: [String: Any], options: RevealOptions? = RevealOptions(), callback: Callback) {
149149
var tempContextOptions = self.contextOptions
@@ -210,11 +210,11 @@ public class Client {
210210
}
211211

212212
/**
213-
Reveal records by Skyflow ID.
213+
This is the description for getById method.
214214

215215
- Parameters:
216216
- records: This is the description for records parameter.
217-
- callback: Implementation of Skyflow.Callback.
217+
- callback: This is the description for callback paramter.
218218
*/
219219
public func getById(records: [String: Any], callback: Callback) {
220220
var tempContextOptions = self.contextOptions

Sources/Skyflow/core/Configuration.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
/// Configuration for the Skyflow client.
9+
/// This is the description for Configuration method.
1010
public struct Configuration {
1111
var vaultID: String
1212
var vaultURL: String
@@ -17,10 +17,10 @@ public struct Configuration {
1717
This is the description for init method.
1818

1919
- Parameters:
20-
- vaultID: ID of the vault to connect to.
21-
- vaultURL: URL of the vault to connect to.
22-
- tokenProvider: An implementation of the token provider interface.
23-
- options: Additional options for configuration.
20+
- vaultID: This is the description for vaultID parameter.
21+
- vaultURL: This is the description for vaultURL parameter.
22+
- tokenProvider: This is the description for tokenProvider paramter.
23+
- options: This is the description for options parameter.
2424
*/
2525
public init(vaultID: String = "", vaultURL: String = "", tokenProvider: TokenProvider, options: Options? = Options()) {
2626
self.vaultID = vaultID

Sources/Skyflow/core/Env.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
/// Supported environments.
9+
/// This is the description for Env enum.
1010
public enum Env {
1111
case DEV
1212
case PROD

Sources/Skyflow/core/EventName.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
/// Supported event names.
9+
/// This is the description for EventName enum.
1010
public enum EventName: String {
1111
case CHANGE = "CHANGE"
1212
case READY = "READY"

Sources/Skyflow/core/Init.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
import Foundation
88

99
/**
10-
Initializes the Skyflow client.
10+
This is the description for initialize method.
1111

1212
- Parameters:
13-
- skyflowConfig: Configuration for the Skyflow client.
13+
- skyflowConfig: This is the description for skyflowConfig parameter.
1414

15-
- Returns: Returns an instance of the Skyflow client.
15+
- Returns: This is the description of what method returns.
1616
*/
1717
public func initialize(_ skyflowConfig: Configuration) -> Client {
1818
return Client(skyflowConfig)

Sources/Skyflow/core/LogLevel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import Foundation
88

9-
/// Supported log levels.
9+
/// This is the description for LogLevel enum.
1010
public enum LogLevel: Int {
1111
case DEBUG = 0
1212
case INFO = 1

Sources/Skyflow/core/Options.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
/// Object that describes the options parameter
66

77
public struct Options {
8-
/// Log level to apply.
8+
/// This is the description for logLevel property.
99
var logLevel: LogLevel
10-
/// Type of environment.
10+
/// This is the description for env property.
1111
var env: Env
1212

1313
/**
14-
Initializes the Skyflow client.
14+
This is the description for init method.
1515

1616
- Parameters:
17-
- logLevel: Log level to apply.
18-
- env: Type of environment.
17+
- logLevel: This is the description for logLevel parameter.
18+
- env: This is the description for env parameter.
1919
*/
2020
public init(logLevel: LogLevel = .ERROR, env: Env = .PROD) {
2121
self.logLevel = logLevel

0 commit comments

Comments
 (0)