Skip to content

Update the declaration types #11

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

Closed
stuft2 opened this issue Aug 11, 2020 · 1 comment
Closed

Update the declaration types #11

stuft2 opened this issue Aug 11, 2020 · 1 comment

Comments

@stuft2
Copy link

stuft2 commented Aug 11, 2020

The token() function returns the token object not a string:

export interface TokenClient {
    id: string
    byuId: string
    appName: string
}

export interface Token {
    bearer: string
    authorizationHeader: string
    expiresAt: Date
    client: TokenClient
    rawUserInfo: Record<string, unknown>
}

The user() function returns the user object which is safer than using any:

export interface UserNameObject {
    displayName: string
    familyName?: string
    displayNamePosition?: string
    givenName?: string
    sortName?: string
}

export interface User {
    email: string
    byuId: string
    netId: string
    personId: string
    name: UserNameObject
}
@stuft2
Copy link
Author

stuft2 commented Aug 12, 2020

#12

@stuft2 stuft2 closed this as completed Aug 12, 2020
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

No branches or pull requests

1 participant