Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/app-elements/src/providers/TokenProvider/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TokenProviderInternalState {
isLoading: boolean
isTokenError: boolean
rolePermissions: TokenProviderRolePermissions
accessibleApps: TokenProviderClAppSlug[]
accessibleApps: (TokenProviderClAppSlug | "metrics")[]
settings: TokenProviderAuthSettings
user: TokenProviderAuthUser | null
role: TokenProviderRole | null
Expand Down Expand Up @@ -44,7 +44,7 @@ type Action =
settings: TokenProviderAuthSettings
user: TokenProviderAuthUser | null
rolePermissions: TokenProviderRolePermissions
accessibleApps: TokenProviderClAppSlug[]
accessibleApps: (TokenProviderClAppSlug | "metrics")[]
role: TokenProviderRole | null
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/app-elements/src/providers/TokenProvider/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export type TokenProviderClAppSlug =
* TokenProviderAllowedApp is a type that contains all the possible kinds of the app that you can create inside the dashboard.
* As a convention Commerce Layer official apps have a slug that matches the kind of the app.
*/
export type TokenProviderAllowedAppKind = TokenProviderClAppSlug | "generic"
export type TokenProviderAllowedAppKind =
| TokenProviderClAppSlug
| "generic"
| "metrics"

/**
* @deprecated Use `TokenProviderAllowedAppKind` instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface ValidToken {
mode: Mode
organizationSlug: string
permissions?: TokenProviderRolePermissions
accessibleApps?: TokenProviderClAppSlug[]
accessibleApps?: (TokenProviderClAppSlug | "metrics")[]
user: TokenProviderAuthUser | null
scopes?: ParsedScopes
role: TokenProviderRole | null
Expand Down
Loading