-
Notifications
You must be signed in to change notification settings - Fork 177
add /sandbox/public_token/create #154
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
Conversation
| initialProducts: Array<string>, | ||
| options: Object, | ||
| cb: Callback<SandboxPublicTokenCreateResponse> | ||
| ): Promise<SandboxPublicTokenCreateResponse>; |
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.
we need to define two flavors of this function, one for the CPS style, and one for the promisified variant
// sandboxCreatePublicToken(String, Array<sring>,Object, Function)
sandboxPublicTokenCreate(
institutionId: string,
initialProducts: Array<string>,
options: Object,
cb: Callback<SandboxPublicTokenCreateResponse>,
): void;
// sandboxCreatePublicToken(String, Array<sring>,Object)
sandboxPublicTokenCreate(
institutionId: string,
initialProducts: Array<string>,
options?: Object,
): Promise<SandboxPublicTokenCreateResponse>;when they are both defined, typescript will pick the one that compiles.
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.
Thanks for the explanation and code @ntindall - should be ⚡️'d! :)
index.d.ts
Outdated
| // sandboxCreatePublicToken(String, Array<sring>,Object?, Function) | ||
| sandboxPublicTokenCreate(institutionId: string, | ||
| initialProducts: Array<string>, | ||
| options: Object, |
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.
nit: should we provide a typing for the options? we seem to be somewhat inconsistent about this... so maybe its "out of scope".
| institution_id: institution_id, | ||
| initial_products: initial_products, | ||
| }, | ||
| }, options, cb, true); |
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.
are there actuallyoptions for this route?
I'm realizing the fact that _authenticatedRequest injects options onto the request in this way is somewhat confusing...
pretty sure I devised this scheme to support the variadic arguments behavior when you use the callback style... I wonder if anyone is benefitting from that...
ignore the above. this LGTM (confirmed that there are options on the route).
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 after we fix the typings @michaelckelly ! |
ntindall
left a comment
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.
🌱
/sandbox/public_token/createendpoint