77//
88// Permission is hereby granted, free of charge, to any person
99// obtaining a copy of this software and associated documentation
10- // files (the " Software" ), to deal in the Software without
10+ // files (the “ Software” ), to deal in the Software without
1111// restriction, including without limitation the rights to use,
1212// copy, modify, merge, publish, distribute, sublicense, and/or
1313// sell copies of the Software, and to permit persons to whom the
1717// The above copyright notice and this permission notice shall be
1818// included in all copies or substantial portions of the Software.
1919//
20- // THE SOFTWARE IS PROVIDED " AS IS" , WITHOUT WARRANTY OF ANY KIND,
20+ // THE SOFTWARE IS PROVIDED “ AS IS” , WITHOUT WARRANTY OF ANY KIND,
2121// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
2222// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2323// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
@@ -39,40 +39,40 @@ public import Foundation
3939///
4040/// Response format: `{ "singleFile": { "wrappingKey": ..., "fileChecksum": ..., "receipt": ..., etc. } }`
4141public struct AssetUploadResponse : Codable , Sendable {
42- /// The uploaded asset data containing checksums and receipt
43- public let singleFile : AssetData
42+ /// The uploaded asset data containing checksums and receipt
43+ public let singleFile : AssetData
4444
45- /// Asset metadata returned from CloudKit CDN
46- public struct AssetData : Codable , Sendable {
47- /// Wrapping key for encrypted assets
48- public let wrappingKey : String ?
49- /// SHA256 checksum of the uploaded file
50- public let fileChecksum : String ?
51- /// Receipt token proving successful upload
52- public let receipt : String ?
53- /// Reference checksum for asset verification
54- public let referenceChecksum : String ?
55- /// Size of the uploaded asset in bytes
56- public let size : Int64 ?
45+ /// Asset metadata returned from CloudKit CDN
46+ public struct AssetData : Codable , Sendable {
47+ /// Wrapping key for encrypted assets
48+ public let wrappingKey : String ?
49+ /// SHA256 checksum of the uploaded file
50+ public let fileChecksum : String ?
51+ /// Receipt token proving successful upload
52+ public let receipt : String ?
53+ /// Reference checksum for asset verification
54+ public let referenceChecksum : String ?
55+ /// Size of the uploaded asset in bytes
56+ public let size : Int64 ?
5757
58- /// Initialize asset data
59- public init (
60- wrappingKey: String ? ,
61- fileChecksum: String ? ,
62- receipt: String ? ,
63- referenceChecksum: String ? ,
64- size: Int64 ?
65- ) {
66- self . wrappingKey = wrappingKey
67- self . fileChecksum = fileChecksum
68- self . receipt = receipt
69- self . referenceChecksum = referenceChecksum
70- self . size = size
71- }
58+ /// Initialize asset data
59+ public init (
60+ wrappingKey: String ? ,
61+ fileChecksum: String ? ,
62+ receipt: String ? ,
63+ referenceChecksum: String ? ,
64+ size: Int64 ?
65+ ) {
66+ self . wrappingKey = wrappingKey
67+ self . fileChecksum = fileChecksum
68+ self . receipt = receipt
69+ self . referenceChecksum = referenceChecksum
70+ self . size = size
7271 }
72+ }
7373
74- /// Initialize asset upload response
75- public init ( singleFile: AssetData ) {
76- self . singleFile = singleFile
77- }
74+ /// Initialize asset upload response
75+ public init ( singleFile: AssetData ) {
76+ self . singleFile = singleFile
77+ }
7878}
0 commit comments