-
Notifications
You must be signed in to change notification settings - Fork 441
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(api): expose credentials in GET /integrations/:uniqueKey #3074
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tested it locally and it worked great too.
|
||
export type NullablePartial< | ||
TBase, | ||
NK extends keyof TBase = { [K in keyof TBase]: null extends TBase[K] ? K : never }[keyof TBase], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename NK
TNullableKey
to follow the same pattern and make it a bit more descriptive
TBase, | ||
NK extends keyof TBase = { [K in keyof TBase]: null extends TBase[K] ? K : never }[keyof TBase], | ||
NP = Partial<Pick<TBase, NK>> & Pick<TBase, Exclude<keyof TBase, NK>> | ||
> = { [K in keyof NP]: NP[K] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure you need NP. can we have
export type NullablePartial<
TBase,
TNullableKeys ...
> = Omit<TBase, TNullableKeys> & Partial<Pick<TBase, TNullableKeys>>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good but I am not sure I understand the purpose of exposing integration credentials to the users when they are the ones who are providing those credentials in the first place
Changes
GET /integrations/:uniqueKey
now expose credentials (optional)Some customers need the credentials for internal operations or oauth revoke. This expose optionally the credentials with some added security.
Try to fix IntegrationConfig type by creating a smaller scope for integration create
This type is annoying, it's used a bit everywhere and everything is marked as undefined except it's null not undefined. Anyway, first steps since I needed better types.