-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { z } from 'zod' | ||
|
||
import { common_event } from './common.js' | ||
|
||
const connect_webview_event = common_event.extend({ | ||
connect_webview_id: z.string().uuid().describe(` | ||
--- | ||
title: Connect Webview ID | ||
--- | ||
ID of the connect webview. | ||
`), | ||
}) | ||
|
||
const connected_account_id = z.string().uuid().describe(` | ||
--- | ||
title: Connected Account ID | ||
--- | ||
ID of the connected account. | ||
`) | ||
|
||
export const connect_webview_login_succeeded_event = connect_webview_event | ||
.extend({ | ||
event_type: z.literal('connect_webview.login_succeeded'), | ||
connected_account_id, | ||
}) | ||
.describe('A connect webview had a successful login.') | ||
|
||
export type ConnectWebviewLoginSucceededEvent = z.infer< | ||
typeof connect_webview_login_succeeded_event | ||
> | ||
|
||
export const connect_webview_login_failed_event = connect_webview_event | ||
.extend({ | ||
event_type: z.literal('connect_webview.login_failed'), | ||
}) | ||
.describe('A connect webview had a failed login.') | ||
|
||
export type ConnectWebviewLoginFailedEvent = z.infer< | ||
typeof connect_webview_login_failed_event | ||
> | ||
|
||
export const connect_webview_events = [ | ||
connect_webview_login_succeeded_event, | ||
connect_webview_login_failed_event, | ||
] as const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters