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

[INTER-708] Response transparency and webhook validation #104

Merged
merged 45 commits into from
Jun 13, 2024

Conversation

TheUnderScorer
Copy link
Collaborator

@TheUnderScorer TheUnderScorer commented May 29, 2024

  • Expose raw response in case of errors (in case of success it doesn't make sense, because customer can access all response data anyway since we don't transform the data in any way)
  • Sync with OpenAPI schema
  • Add utility function for validating webhook signature
  • Use inline snapshots (better compatibility with our actions with pull_request_target trigger)

Copy link

github-actions bot commented May 29, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
97.06% (-0.08% 🔻)
165/170
🟢 Branches
88.14% (-1.64% 🔻)
104/118
🟢 Functions 100% 39/39
🟢 Lines
97.04% (-0.08% 🔻)
164/169
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢 webhook.ts 100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 types.ts 100%
90.48% (-2.55% 🔻)
100% 100%
🟢 urlUtils.ts
97.14% (-2.86% 🔻)
85.71% (-14.29% 🔻)
100%
97.14% (-2.86% 🔻)

Test suite run success

81 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from 76b4e15

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 97.05 88.13 100 97.04
🟢  src 96.77 88.03 100 96.77
🟢   index.ts 100 100 100 100
🟢   sealedResults.ts 100 100 100 100
🟢   serverApiClient.ts 92.3 80 100 92.3 34,68,127,195
🟢   types.ts 100 90.47 100 100 78-90,117,120
🟢   urlUtils.ts 97.14 85.71 100 97.14 41
🟢   webhook.ts 100 100 100 100
🟢  src/errors 100 100 100 100
🟢   unsealError.ts 100 100 100 100

Orkuncakilkaya
Orkuncakilkaya previously approved these changes May 30, 2024
@JuroUhlar JuroUhlar self-requested a review May 31, 2024 10:17
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
src/serverApiClient.ts Show resolved Hide resolved
contributing.md Outdated Show resolved Hide resolved
src/serverApiClient.ts Outdated Show resolved Hide resolved
@TheUnderScorer TheUnderScorer force-pushed the feature/INTER-708-response-transparency branch from 4d0965c to d280d47 Compare June 10, 2024 10:01
src/webhook.ts Outdated Show resolved Hide resolved
src/webhook.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
example/sealedResults.mjs Outdated Show resolved Hide resolved
readme.md Show resolved Hide resolved
example/deleteVisitor.mjs Outdated Show resolved Hide resolved
Copy link
Contributor

@JuroUhlar JuroUhlar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

Copy link

This PR will create a minor release 🚀

4.1.0 (2024-06-13)

Features

  • add checkWebhookHeader function for validating webhook signature [INTER-731] (b4d7652)
  • add delete API (9f581ab)
  • add os Mismatch (c3ca8d7)
  • add revision string field to confidence object (a664c2d)
  • expose raw response in errors (79b2fc7)
  • make Options.region optional (673f7ad)
  • provide error as-is without serialization in getEvent method (aee3242)

Documentation

  • README: remove ipLocation field (ef69009)

src/serverApiClient.ts Show resolved Hide resolved
@TheUnderScorer TheUnderScorer merged commit 1dfe934 into test Jun 13, 2024
13 of 17 checks passed
@TheUnderScorer TheUnderScorer deleted the feature/INTER-708-response-transparency branch June 13, 2024 11:32
@fingerprint-dx-team
Copy link

🎉 This PR is included in version 4.1.0-test.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fingerprint-dx-team
Copy link

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants