Skip to content

Commit 9f2124c

Browse files
authored
Merge branch 'trunk' into woomob-1679-offlinebannerview-on-dashboard
2 parents 7662fa5 + f029712 commit 9f2124c

29 files changed

+858
-211
lines changed

Gemfile.lock

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ GEM
55
base64
66
nkf
77
rexml
8-
activesupport (8.0.3)
8+
activesupport (8.1.1)
99
base64
10-
benchmark (>= 0.3)
1110
bigdecimal
1211
concurrent-ruby (~> 1.0, >= 1.3.1)
1312
connection_pool (>= 2.2.5)
1413
drb
1514
i18n (>= 1.6, < 2)
15+
json
1616
logger (>= 1.4.2)
1717
minitest (>= 5.1)
1818
securerandom (>= 0.3)
@@ -21,31 +21,30 @@ GEM
2121
addressable (2.8.7)
2222
public_suffix (>= 2.0.2, < 7.0)
2323
artifactory (3.0.17)
24-
ast (2.4.2)
24+
ast (2.4.3)
2525
atomos (0.1.3)
2626
aws-eventstream (1.4.0)
27-
aws-partitions (1.1169.0)
28-
aws-sdk-core (3.233.0)
27+
aws-partitions (1.1181.0)
28+
aws-sdk-core (3.237.0)
2929
aws-eventstream (~> 1, >= 1.3.0)
3030
aws-partitions (~> 1, >= 1.992.0)
3131
aws-sigv4 (~> 1.9)
3232
base64
3333
bigdecimal
3434
jmespath (~> 1, >= 1.6.1)
3535
logger
36-
aws-sdk-kms (1.113.0)
37-
aws-sdk-core (~> 3, >= 3.231.0)
36+
aws-sdk-kms (1.117.0)
37+
aws-sdk-core (~> 3, >= 3.234.0)
3838
aws-sigv4 (~> 1.5)
39-
aws-sdk-s3 (1.199.1)
40-
aws-sdk-core (~> 3, >= 3.231.0)
39+
aws-sdk-s3 (1.203.1)
40+
aws-sdk-core (~> 3, >= 3.234.0)
4141
aws-sdk-kms (~> 1)
4242
aws-sigv4 (~> 1.5)
4343
aws-sigv4 (1.12.1)
4444
aws-eventstream (~> 1, >= 1.0.2)
4545
babosa (1.0.4)
4646
base64 (0.3.0)
47-
benchmark (0.4.1)
48-
bigdecimal (3.3.0)
47+
bigdecimal (3.3.1)
4948
buildkit (1.6.1)
5049
sawyer (>= 0.6)
5150
chroma (0.2.0)
@@ -62,21 +61,21 @@ GEM
6261
connection_pool (2.5.4)
6362
cork (0.3.0)
6463
colored2 (~> 3.1)
65-
danger (9.5.1)
64+
danger (9.5.3)
6665
base64 (~> 0.2)
6766
claide (~> 1.0)
6867
claide-plugins (>= 0.9.2)
69-
colored2 (~> 3.1)
68+
colored2 (>= 3.1, < 5)
7069
cork (~> 0.1)
7170
faraday (>= 0.9.0, < 3.0)
7271
faraday-http-cache (~> 2.0)
73-
git (~> 1.13)
74-
kramdown (~> 2.3)
72+
git (>= 1.13, < 3.0)
73+
kramdown (>= 2.5.1, < 3.0)
7574
kramdown-parser-gfm (~> 1.0)
7675
octokit (>= 4.0)
7776
pstore (~> 0.1)
78-
terminal-table (>= 1, < 4)
79-
danger-dangermattic (1.2.1)
77+
terminal-table (>= 1, < 5)
78+
danger-dangermattic (1.2.4)
8079
danger (~> 9.4)
8180
danger-plugin-api (~> 1.0)
8281
danger-rubocop (~> 0.13)
@@ -168,12 +167,12 @@ GEM
168167
xcodeproj (>= 1.13.0, < 2.0.0)
169168
xcpretty (~> 0.4.1)
170169
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
171-
fastlane-plugin-firebase_app_distribution (0.10.0)
170+
fastlane-plugin-firebase_app_distribution (0.10.1)
172171
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
173172
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
174-
fastlane-plugin-sentry (1.25.1)
173+
fastlane-plugin-sentry (1.35.0)
175174
os (~> 1.1, >= 1.1.4)
176-
fastlane-plugin-wpmreleasetoolkit (13.5.1)
175+
fastlane-plugin-wpmreleasetoolkit (13.7.0)
177176
activesupport (>= 6.1.7.1)
178177
buildkit (~> 1.5)
179178
chroma (= 0.2.0)
@@ -245,19 +244,20 @@ GEM
245244
concurrent-ruby (~> 1.0)
246245
java-properties (0.3.0)
247246
jmespath (1.6.2)
248-
json (2.15.1)
247+
json (2.16.0)
249248
jwt (2.10.2)
250249
base64
251250
kramdown (2.5.1)
252251
rexml (>= 3.3.9)
253252
kramdown-parser-gfm (1.1.0)
254253
kramdown (~> 2.0)
255-
language_server-protocol (3.17.0.3)
254+
language_server-protocol (3.17.0.5)
255+
lint_roller (1.1.0)
256256
logger (1.7.0)
257257
mini_magick (4.13.2)
258258
mini_mime (1.1.5)
259259
mini_portile2 (2.8.9)
260-
minitest (5.26.0)
260+
minitest (5.26.1)
261261
multi_json (1.17.0)
262262
multipart-post (2.4.1)
263263
mutex_m (0.3.0)
@@ -273,25 +273,26 @@ GEM
273273
sawyer (~> 0.9)
274274
open4 (1.3.4)
275275
options (2.3.2)
276-
optparse (0.6.0)
276+
optparse (0.8.0)
277277
os (1.1.4)
278278
parallel (1.27.0)
279-
parser (3.3.6.0)
279+
parser (3.3.10.0)
280280
ast (~> 2.4.1)
281281
racc
282282
plist (3.7.2)
283+
prism (1.6.0)
283284
progress_bar (1.3.4)
284285
highline (>= 1.6)
285286
options (~> 2.3.0)
286-
pstore (0.1.3)
287+
pstore (0.2.0)
287288
public_suffix (6.0.2)
288289
racc (1.8.1)
289290
rainbow (3.1.1)
290291
rake (12.3.3)
291292
rake-compiler (1.3.0)
292293
rake
293294
rchardet (1.10.0)
294-
regexp_parser (2.9.2)
295+
regexp_parser (2.11.3)
295296
representable (3.2.0)
296297
declarative (< 0.1.0)
297298
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -300,24 +301,27 @@ GEM
300301
rexml (3.4.4)
301302
rmagick (4.3.0)
302303
rouge (3.28.0)
303-
rubocop (1.68.0)
304+
rubocop (1.81.7)
304305
json (~> 2.3)
305-
language_server-protocol (>= 3.17.0)
306+
language_server-protocol (~> 3.17.0.2)
307+
lint_roller (~> 1.1.0)
306308
parallel (~> 1.10)
307309
parser (>= 3.3.0.2)
308310
rainbow (>= 2.2.2, < 4.0)
309-
regexp_parser (>= 2.4, < 3.0)
310-
rubocop-ast (>= 1.32.2, < 2.0)
311+
regexp_parser (>= 2.9.3, < 3.0)
312+
rubocop-ast (>= 1.47.1, < 2.0)
311313
ruby-progressbar (~> 1.7)
312-
unicode-display_width (>= 2.4.0, < 3.0)
313-
rubocop-ast (1.36.1)
314-
parser (>= 3.3.1.0)
315-
rubocop-rake (0.6.0)
316-
rubocop (~> 1.0)
314+
unicode-display_width (>= 2.4.0, < 4.0)
315+
rubocop-ast (1.48.0)
316+
parser (>= 3.3.7.2)
317+
prism (~> 1.4)
318+
rubocop-rake (0.7.1)
319+
lint_roller (~> 1.1)
320+
rubocop (>= 1.72.1)
317321
ruby-progressbar (1.13.0)
318322
ruby2_keywords (0.0.5)
319323
rubyzip (2.4.1)
320-
sawyer (0.9.2)
324+
sawyer (0.9.3)
321325
addressable (>= 2.3.5)
322326
faraday (>= 0.17.3, < 3)
323327
securerandom (0.4.1)
@@ -343,7 +347,7 @@ GEM
343347
concurrent-ruby (~> 1.0)
344348
uber (0.1.0)
345349
unicode-display_width (2.6.0)
346-
uri (1.0.4)
350+
uri (1.1.1)
347351
word_wrap (1.0.0)
348352
xcode-install (2.8.1)
349353
claide (>= 0.9.1)

Modules/Sources/Networking/Model/Bookings/Booking.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,12 @@ public enum BookingAttendanceStatus: String, CaseIterable, Codable {
239239
case noShow = "no-show"
240240
case unknown
241241
}
242+
243+
/// Represents the payment status for a booking.
244+
/// To be decoded from booking response once available.
245+
public enum BookingPaymentStatus: String, CaseIterable, Codable {
246+
case paid
247+
case unpaid
248+
case refunded
249+
case unknown
250+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// periphery:ignore:all
2+
import Foundation
3+
4+
/// Protocol for handling background downloads with app suspension support.
5+
public protocol BackgroundDownloadProtocol {
6+
/// Downloads a file from the specified URL in the background.
7+
/// - Parameters:
8+
/// - url: The URL to download from.
9+
/// - sessionIdentifier: Unique identifier for the background session.
10+
/// - allowCellular: Whether cellular data should be allowed for this download.
11+
/// - Returns: Local file URL where the downloaded content is stored.
12+
func downloadFile(from url: URL, sessionIdentifier: String, allowCellular: Bool) async throws -> URL
13+
14+
/// Sets up background app suspension handling.
15+
/// - Parameter completionHandler: Handler to call when background download completes.
16+
func setBackgroundCompletionHandler(_ completionHandler: @escaping () -> Void)
17+
18+
/// Cancels all active downloads for the session.
19+
/// - Parameter sessionIdentifier: The session identifier to cancel.
20+
func cancelDownloads(for sessionIdentifier: String) async
21+
}
22+
23+
/// Progress and status information for background downloads.
24+
public struct BackgroundDownloadProgress {
25+
public let bytesDownloaded: Int64
26+
public let totalBytes: Int64
27+
public let progress: Double
28+
29+
public init(bytesDownloaded: Int64, totalBytes: Int64) {
30+
self.bytesDownloaded = bytesDownloaded
31+
self.totalBytes = totalBytes
32+
self.progress = totalBytes > 0 ? Double(bytesDownloaded) / Double(totalBytes) : 0.0
33+
}
34+
}
35+
36+
/// Errors that can occur during background downloads.
37+
public enum BackgroundDownloadError: Error, LocalizedError, Equatable {
38+
case invalidURL
39+
case sessionCreationFailed
40+
case downloadFailed(Error)
41+
case fileNotFound
42+
case cancelled
43+
44+
public var errorDescription: String? {
45+
switch self {
46+
case .invalidURL:
47+
return "The provided URL is invalid"
48+
case .sessionCreationFailed:
49+
return "Failed to create background download session"
50+
case .downloadFailed(let error):
51+
return "Download failed: \(error.localizedDescription)"
52+
case .fileNotFound:
53+
return "Downloaded file not found"
54+
case .cancelled:
55+
return "Download was cancelled"
56+
}
57+
}
58+
59+
public static func == (lhs: BackgroundDownloadError, rhs: BackgroundDownloadError) -> Bool {
60+
switch (lhs, rhs) {
61+
case (.invalidURL, .invalidURL):
62+
return true
63+
case (.sessionCreationFailed, .sessionCreationFailed):
64+
return true
65+
case (.downloadFailed(let lhsError), .downloadFailed(let rhsError)):
66+
return lhsError.localizedDescription == rhsError.localizedDescription
67+
case (.fileNotFound, .fileNotFound):
68+
return true
69+
case (.cancelled, .cancelled):
70+
return true
71+
default:
72+
return false
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)