Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a type for decoding Hook Triggers without Objects #53

Merged
merged 4 commits into from
Jan 24, 2023
Merged

Conversation

cbaker6
Copy link
Member

@cbaker6 cbaker6 commented Jan 24, 2023

New Pull Request Checklist

Issue Description

When using the SDK in CloudCode, a ParseObject is needed to decode trigger requests even at times when a trigger is not related to a ParseObject, like a trigger for a ParseFile.

Approach

ParseHookTriggerRequest has been renamed to ParseHookTriggerObjectRequest as it is used for decoding triggers related to ParseObject's. The new ParseHookTriggerRequest is similar but used for decoding requests not related to ParseObject's like ParseFile.

This decouples some of the properties in a request that are not related to each other.

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #53 (6f36b75) into main (de696cc) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   90.39%   90.44%   +0.05%     
==========================================
  Files         163      164       +1     
  Lines       16492    16506      +14     
==========================================
+ Hits        14908    14929      +21     
+ Misses       1584     1577       -7     
Impacted Files Coverage Δ
...es/ParseSwift/Protocols/ParseHookRequestable.swift 100.00% <ø> (ø)
...es/ParseSwift/Protocols/ParseHookTriggerable.swift 100.00% <ø> (ø)
...es/ParseSwift/Types/ParseHookFunctionRequest.swift 100.00% <ø> (ø)
...ces/ParseSwift/Types/ParseHookTriggerRequest.swift 92.85% <ø> (-7.15%) ⬇️
...rseSwift/Types/ParseHookTriggerObjectRequest.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/Coding/ParseEncoder.swift 78.03% <0.00%> (+0.34%) ⬆️
Sources/ParseSwift/Coding/ParseCoding.swift 97.40% <0.00%> (+6.49%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit 2494b3f into main Jan 24, 2023
@cbaker6 cbaker6 deleted the hookFile branch January 24, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant