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 notification (un-)registration endpoints #128

Merged
merged 4 commits into from
Aug 22, 2023
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Aug 17, 2023

This adds the device/Safe notification (un-)registration endpoints as per safe-global/safe-client-gateway#636:

  • /v1/register/notifications
  • /v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}
  • /v1/chains/{chainId}/notifications/devices/{uuid}

@iamacook iamacook self-assigned this Aug 17, 2023
@iamacook iamacook linked an issue Aug 17, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Aug 17, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@iamacook iamacook marked this pull request as ready for review August 17, 2023 12:35
src/types/notifications.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/endpoint.ts Outdated Show resolved Hide resolved
Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Looks good 👍

src/types/api.ts Outdated
path?: { [key: string]: Primitive }
}

interface GetParams extends DeleteParams {
Copy link
Member

Choose a reason for hiding this comment

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

This feels a little weird. I would define a common type that both GetParams and DeleteParams extend.

src/types/api.ts Outdated
interface PathRegistry {
[key: string]: GetEndpoint | PostEndpoint | (GetEndpoint & PostEndpoint)
[key: string]: DeleteEndpoint | GetEndpoint | PostEndpoint | (GetEndpoint & PostEndpoint)
Copy link
Member

Choose a reason for hiding this comment

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

Could you add it to the end of the list, not the beginning?

@iamacook iamacook merged commit 381e16d into main Aug 22, 2023
4 checks passed
@iamacook iamacook deleted the notifications branch August 22, 2023 09:52
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.

[Epic] Push notification
3 participants