Skip to content

Commit 7fa07eb

Browse files
committed
Remove JSON definitions
1 parent 9a439f1 commit 7fa07eb

File tree

6 files changed

+0
-395
lines changed

6 files changed

+0
-395
lines changed

Sources/FluentOrders/DTOs/OrderJSON.swift

Lines changed: 0 additions & 106 deletions
This file was deleted.

Sources/FluentOrders/Models/OrderDataModel.swift

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,6 @@ public protocol OrderDataModel: Model {
99

1010
/// The foreign key to the order table.
1111
var order: OrderType { get set }
12-
13-
/// Encode the order into JSON.
14-
///
15-
/// This method should generate the entire order JSON.
16-
///
17-
/// - Parameter db: The SQL database to query against.
18-
///
19-
/// - Returns: An object that conforms to ``OrderJSON/Properties``.
20-
///
21-
/// > Tip: See the [`Order`](https://developer.apple.com/documentation/walletorders/order) object to understand the keys.
22-
func orderJSON(on db: any Database) async throws -> any OrderJSON.Properties
23-
24-
/// Should return a URL path which points to the template data for the order.
25-
///
26-
/// The path should point to a directory containing all the images and localizations for the generated `.order` archive
27-
/// but should *not* contain any of these items:
28-
/// - `manifest.json`
29-
/// - `order.json`
30-
/// - `signature`
31-
///
32-
/// - Parameter db: The SQL database to query against.
33-
///
34-
/// - Returns: A URL path which points to the template data for the order.
35-
func template(on db: any Database) async throws -> String
3612
}
3713

3814
extension OrderDataModel {

Sources/FluentPasses/DTOs/PassJSON.swift

Lines changed: 0 additions & 136 deletions
This file was deleted.

Sources/FluentPasses/DTOs/PersonalizationJSON.swift

Lines changed: 0 additions & 66 deletions
This file was deleted.

Sources/FluentPasses/Models/PassDataModel.swift

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,6 @@ public protocol PassDataModel: Model {
99

1010
/// The foreign key to the pass table.
1111
var pass: PassType { get set }
12-
13-
/// Encode the pass into JSON.
14-
///
15-
/// This method should generate the entire pass JSON.
16-
///
17-
/// - Parameter db: The SQL database to query against.
18-
///
19-
/// - Returns: An object that conforms to ``PassJSON/Properties``.
20-
///
21-
/// > Tip: See the [`Pass`](https://developer.apple.com/documentation/walletpasses/pass) object to understand the keys.
22-
func passJSON(on db: any Database) async throws -> any PassJSON.Properties
23-
24-
/// Should return a URL path which points to the template data for the pass.
25-
///
26-
/// The path should point to a directory containing all the images and localizations for the generated `.pkpass` archive
27-
/// but should *not* contain any of these items:
28-
/// - `manifest.json`
29-
/// - `pass.json`
30-
/// - `personalization.json`
31-
/// - `signature`
32-
///
33-
/// - Parameter db: The SQL database to query against.
34-
///
35-
/// - Returns: A URL path which points to the template data for the pass.
36-
func template(on db: any Database) async throws -> String
37-
38-
/// Create the personalization JSON struct.
39-
///
40-
/// This method should generate the entire personalization JSON struct.
41-
/// If the pass in question requires personalization, you should return a ``PersonalizationJSON``.
42-
/// If the pass does not require personalization, you should return `nil`.
43-
///
44-
/// The default implementation of this method returns `nil`.
45-
///
46-
/// - Parameter db: The SQL database to query against.
47-
///
48-
/// - Returns: A ``PersonalizationJSON`` or `nil` if the pass does not require personalization.
49-
func personalizationJSON(on db: any Database) async throws -> PersonalizationJSON?
5012
}
5113

5214
extension PassDataModel {
@@ -60,9 +22,3 @@ extension PassDataModel {
6022
return pass
6123
}
6224
}
63-
64-
extension PassDataModel {
65-
public func personalizationJSON(on db: any Database) async throws -> PersonalizationJSON? {
66-
nil
67-
}
68-
}

0 commit comments

Comments
 (0)