parse-community / Parse-Swift

The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)
https://parseplatform.org
MIT License
308 stars 69 forks source link

feat: add support for ParseFile and beforeConnect triggers #376

Closed cbaker6 closed 2 years ago

cbaker6 commented 2 years ago

New Pull Request Checklist

Issue Description

In order to create a ParseFile trigger, the developer has to know to pass @File for className. Similarly, the developer also needs to pass @Connect for .beforeConnect.

Fixes some issues with decoding query properties from the server.

Related issue: #n/a

Approach

Add another initializer that can determine what className to create the trigger for based on the trigger type.

TODOs before merging

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this pull request!

codecov[bot] commented 2 years ago

Codecov Report

Merging #376 (2062ab3) into main (97885ce) will increase coverage by 0.01%. The diff coverage is 98.78%.

@@            Coverage Diff             @@
##             main     #376      +/-   ##
==========================================
+ Coverage   89.52%   89.54%   +0.01%     
==========================================
  Files         152      152              
  Lines       13885    13965      +80     
==========================================
+ Hits        12431    12505      +74     
- Misses       1454     1460       +6     
Impacted Files Coverage Δ
...es/ParseSwift/Types/ParseHookFunctionRequest.swift 100.00% <ø> (ø)
...ces/ParseSwift/Types/ParseHookTriggerRequest.swift 100.00% <ø> (ø)
Sources/ParseSwift/Types/Query.swift 95.14% <98.46%> (+0.27%) :arrow_up:
...rces/ParseSwift/LiveQuery/LiveQueryConstants.swift 50.00% <100.00%> (ø)
...es/ParseSwift/Protocols/ParseHookRequestable.swift 100.00% <100.00%> (ø)
...es/ParseSwift/Protocols/ParseHookTriggerable.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.09% <0.00%> (-0.59%) :arrow_down:
Sources/ParseSwift/Objects/ParseObject.swift 85.10% <0.00%> (-0.16%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 97885ce...2062ab3. Read the comment docs.