Skip to content

Commit

Permalink
chore: Adds a new bridge for internal use only (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottlovegrove authored Sep 1, 2022
1 parent 3e70e58 commit 66f468c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ui-extensions-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@doist/ui-extensions-react",
"version": "6.0.0",
"version": "6.0.1",
"author": "Doist",
"license": "MIT",
"main": "dist/index.js",
Expand Down
9 changes: 7 additions & 2 deletions packages/ui-extensions-react/src/types/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {
DoistCard,
DoistCardAction,
DoistCardBridge,
DoistCardBridge as OriginalDoistCardBridge,
DoistCardBridgeActionType,
DoistCardContext,
DoistCardError,
Expand Down Expand Up @@ -30,6 +30,11 @@ export type DoistCardResult =
| { type: 'loaded'; card: ExtensionCard }
| { type: 'error'; error: ExtensionError }

type AllBridgeActionTypes = DoistCardBridgeActionType | 'consent.required'
export type DoistCardBridge = OriginalDoistCardBridge & {
scopes?: string
}

export type BridgeActionCallbacks = Partial<
Record<DoistCardBridgeActionType, (action: DoistCardBridge) => unknown>
Record<AllBridgeActionTypes, (action: DoistCardBridge) => unknown>
>

0 comments on commit 66f468c

Please sign in to comment.