Skip to content

Commit f05ac62

Browse files
committed
Narrow OAuth provider type
1 parent 71fa51f commit f05ac62

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/routes/(console)/project-[region]-[project]/auth/updateOAuth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import { Dependencies } from '$lib/constants';
44
import { isValueOfStringEnum } from '$lib/helpers/types';
55
import { addNotification } from '$lib/stores/notifications';
66
import { sdk } from '$lib/stores/sdk';
7-
import { OAuthProvider } from '@appwrite.io/console';
7+
import { OAuthProvider, type Models } from '@appwrite.io/console';
88

9-
export type AuthProvider = {
10-
$id: string;
9+
type ProjectOAuthProvider = Models.OAuth2ProviderList['providers'][number];
10+
11+
export type AuthProvider = ProjectOAuthProvider & {
1112
key: string;
1213
name: string;
1314
appId: string;
1415
secret: string;
15-
enabled: boolean;
16-
} & Record<string, unknown>;
16+
};
1717

1818
type Args = {
1919
region: string;

0 commit comments

Comments
 (0)