Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
phisakel committed Dec 11, 2023
1 parent 62c7185 commit 61a6998
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 38 deletions.
7 changes: 6 additions & 1 deletion Documentation/Reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

## Structs

- [ConferenceBadgeModel](structs/ConferenceBadgeModel.md)
- [ConnectionMethodHttp](structs/ConnectionMethodHttp.md)
- [Cose](structs/Cose.md)
- [CoseKey](structs/CoseKey.md)
Expand Down Expand Up @@ -38,6 +39,7 @@
- [IssuerSignedItem](structs/IssuerSignedItem.md)
- [ItemsRequest](structs/ItemsRequest.md)
- [MobileSecurityObject](structs/MobileSecurityObject.md)
- [NameImage](structs/NameImage.md)
- [NameValue](structs/NameValue.md)
- [OriginInfoWebsite](structs/OriginInfoWebsite.md)
- [RequestDataElements](structs/RequestDataElements.md)
Expand All @@ -55,6 +57,7 @@

## Enums

- [ConferenceBadgeModel.CodingKeys](enums/ConferenceBadgeModel.CodingKeys.md)
- [Cose.CoseType](enums/Cose.CoseType.md)
- [Cose.MacAlgorithm](enums/Cose.MacAlgorithm.md)
- [Cose.VerifyAlgorithm](enums/Cose.VerifyAlgorithm.md)
Expand All @@ -73,6 +76,7 @@
- [CBOR.Tag](extensions/CBOR.Tag.md)
- [CBORDecodable](extensions/CBORDecodable.md)
- [CBOREncodable](extensions/CBOREncodable.md)
- [ConferenceBadgeModel](extensions/ConferenceBadgeModel.md)
- [ConnectionMethodHttp](extensions/ConnectionMethodHttp.md)
- [Cose](extensions/Cose.md)
- [CoseKey](extensions/CoseKey.md)
Expand All @@ -87,6 +91,7 @@
- [DeviceRetrievalMethod](extensions/DeviceRetrievalMethod.md)
- [DeviceSigned](extensions/DeviceSigned.md)
- [DeviceSignedItems](extensions/DeviceSignedItems.md)
- [Dictionary](extensions/Dictionary.md)
- [DigestIDs](extensions/DigestIDs.md)
- [DocRequest](extensions/DocRequest.md)
- [Document](extensions/Document.md)
Expand Down Expand Up @@ -128,4 +133,4 @@
- [NameSpace](typealiases/NameSpace.md)
- [UInt8.Byte](typealiases/UInt8.Byte.md)

This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2023-11-15 07:32:12 +0000
This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2023-12-11 08:50:42 +0000
54 changes: 54 additions & 0 deletions Documentation/Reference/enums/ConferenceBadgeModel.CodingKeys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
**ENUM**

# `ConferenceBadgeModel.CodingKeys`

**Contents**

- [Cases](#cases)
- `family_name`
- `given_name`
- `expiry_date`
- `registration_id`
- `room_number`
- `seat_number`

```swift
public enum CodingKeys: String, CodingKey, CaseIterable
```

## Cases
### `family_name`

```swift
case family_name
```

### `given_name`

```swift
case given_name
```

### `expiry_date`

```swift
case expiry_date
```

### `registration_id`

```swift
case registration_id
```

### `room_number`

```swift
case room_number
```

### `seat_number`

```swift
case seat_number
```
7 changes: 0 additions & 7 deletions Documentation/Reference/enums/EuPidModel.CodingKeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- `family_name`
- `given_name`
- `birth_date`
- `unique_id`
- `family_name_birth`
- `given_name_birth`
- `birth_place`
Expand Down Expand Up @@ -57,12 +56,6 @@ case given_name
case birth_date
```

### `unique_id`

```swift
case unique_id
```

### `family_name_birth`

```swift
Expand Down
6 changes: 6 additions & 0 deletions Documentation/Reference/extensions/Array.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ public func findMap(name: String) -> [CBOR:CBOR]?
```swift
public func findArray(name: String) -> [CBOR]?
```

### `toJson()`

```swift
public func toJson() -> [String: Any]
```
14 changes: 10 additions & 4 deletions Documentation/Reference/extensions/CBOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ public func asBytes() -> [UInt8]?
public func asData() -> Data
```

### `asDateString(_:_:)`

```swift
public static func asDateString(_ tag: Tag, _ value: CBOR) -> Any
```

### `asCose()`

```swift
Expand All @@ -100,14 +106,14 @@ public func asCose() -> (CBOR.Tag, [CBOR])?
public func decodeBytestring() -> CBOR?
```

### `decodeList(_:unwrap:)`
### `decodeList(_:unwrap:base64:)`

```swift
public static func decodeList(_ list: [CBOR], unwrap: Bool = true) -> [Any]
public static func decodeList(_ list: [CBOR], unwrap: Bool = true, base64: Bool = false) -> [Any]
```

### `decodeDictionary(_:unwrap:)`
### `decodeDictionary(_:unwrap:base64:)`

```swift
public static func decodeDictionary(_ dictionary: [CBOR:CBOR], unwrap: Bool = true) -> [String: Any]
public static func decodeDictionary(_ dictionary: [CBOR:CBOR], unwrap: Bool = true, base64: Bool = false) -> [String: Any]
```
13 changes: 13 additions & 0 deletions Documentation/Reference/extensions/ConferenceBadgeModel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**EXTENSION**

# `ConferenceBadgeModel`
```swift
extension ConferenceBadgeModel
```

## Methods
### `init(response:devicePrivateKey:)`

```swift
public init?(response: DeviceResponse, devicePrivateKey: CoseKeyPrivate)
```
12 changes: 12 additions & 0 deletions Documentation/Reference/extensions/CoseKeyPrivate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ extension CoseKeyPrivate
public init(crv: ECCurveType)
```

### `init(privateKeyx963Data:crv:)`

```swift
public init(privateKeyx963Data: Data, crv: ECCurveType = .p256)
```

### `init(publicKeyx963Data:secureEnclaveData:)`

```swift
public init(publicKeyx963Data: Data, secureEnclaveData: Data)
```

### `init(base64:)`

```swift
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Reference/extensions/Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ init from local file
### `decodeJSON(type:)`

```swift
public func decodeJSON<T: Decodable>(type: T.Type) -> T?
public func decodeJSON<T: Decodable>(type: T.Type = T.self) -> T?
```

### `init(base64URLEncoded:options:)`
Expand Down
13 changes: 13 additions & 0 deletions Documentation/Reference/extensions/Dictionary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**EXTENSION**

# `Dictionary`
```swift
extension Dictionary where Key == String, Value == Any
```

## Methods
### `decodeJSON(type:)`

```swift
public func decodeJSON<T: Decodable>(type: T.Type = T.self) -> T?
```
12 changes: 6 additions & 6 deletions Documentation/Reference/extensions/MdocDecodable.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ public func getItemValue<T>(_ s: String) -> T?
public static func getSignedItems(_ response: DeviceResponse, _ docType: String, _ ns: [NameSpace]? = nil) -> [String: [IssuerSignedItem]]?
```

### `extractAgeOverValues(_:_:)`
### `toJson()`

```swift
public static func extractAgeOverValues(_ nameSpaces: [NameSpace: [IssuerSignedItem]], _ ageOverXX: inout [Int: Bool])
public func toJson() -> [String: Any]
```

### `moreThan2AgeOverElementIdentifiers(_:_:_:_:)`
### `extractAgeOverValues(_:_:)`

```swift
public static func moreThan2AgeOverElementIdentifiers(_ reqDocType: DocType, _ reqNamespace: NameSpace, _ ageAttest: any AgeAttesting, _ reqElementIdentifiers: [DataElementIdentifier]) -> Set<String>
public static func extractAgeOverValues(_ nameSpaces: [NameSpace: [IssuerSignedItem]], _ ageOverXX: inout [Int: Bool])
```

### `extractDisplayStrings(_:_:)`
### `moreThan2AgeOverElementIdentifiers(_:_:_:_:)`

```swift
public static func extractDisplayStrings(_ nameSpaces: [NameSpace: [IssuerSignedItem]], _ displayStrings: inout [NameValue])
public static func moreThan2AgeOverElementIdentifiers(_ reqDocType: DocType, _ reqNamespace: NameSpace, _ ageAttest: any AgeAttesting, _ reqElementIdentifiers: [DataElementIdentifier]) -> Set<String>
```
4 changes: 2 additions & 2 deletions Documentation/Reference/extensions/String.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Converts a base64 encoded string to a base64-url encoded string.

https://tools.ietf.org/html/rfc4648#page-7

### `usPosixDate()`
### `usPosixDate(useIsoFormat:)`

```swift
public func usPosixDate() -> String
public func usPosixDate(useIsoFormat: Bool = true) -> String
```

### `toBytes()`
Expand Down
19 changes: 19 additions & 0 deletions Documentation/Reference/protocols/MdocDecodable.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,27 @@ var nameSpaces: [NameSpace]?
var title: String
```

### `mandatoryElementKeys`

```swift
var mandatoryElementKeys: [DataElementIdentifier]
```

### `displayStrings`

```swift
var displayStrings: [NameValue]
```

### `displayImages`

```swift
var displayImages: [NameImage]
```

## Methods
### `toJson()`

```swift
func toJson() -> [String: Any]
```
Loading

0 comments on commit 61a6998

Please sign in to comment.