File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed
packages/app-bridge-app/src Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @frontify/app-bridge-app " : patch
3+ ---
4+
5+ feat: add closeApp command and refactor previous command
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
1414
1515import { InitializationError } from './errors' ;
1616import { type ApiMethodRegistry } from './registries' ;
17- import { type UploadAssetFromUrlPayload } from './registries/command/uploadAssetFromUrl .ts' ;
17+ import { type UploadAssetToChooserPayload } from './registries/command/uploadAssetToChooser .ts' ;
1818import { openConnection } from './registries/commands.ts' ;
1919import {
2020 type PlatformAppApiHandlerParameter ,
@@ -43,11 +43,12 @@ export type PlatformAppApiMethod = PlatformAppApiMethodNameValidator<
4343
4444export type PlatformAppCommandRegistry = PlatformAppCommandNameValidator < {
4545 openConnection : { payload : void } ;
46- uploadAssetFromUrl : { payload : UploadAssetFromUrlPayload } ;
46+ closeApp : { payload : void } ;
47+ uploadAssetToChooser : { payload : UploadAssetToChooserPayload } ;
4748} > ;
4849
4950export type PlatformAppCommand = PlatformAppCommandNameValidator <
50- Pick < PlatformAppCommandRegistry , 'openConnection' | 'uploadAssetFromUrl ' >
51+ Pick < PlatformAppCommandRegistry , 'openConnection' | 'uploadAssetToChooser' | 'closeApp '>
5152> ;
5253
5354export type PlatformAppState = {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ /* (c) Copyright Frontify Ltd., all rights reserved. */
2+
3+ /**
4+ * Payload for the `uploadAssetToChooser` command.
5+ *
6+ * **Important:** This command only works when the user has the Asset Chooser open.
7+ * It relies on the Asset Chooser's events to place the asset at the location
8+ * where the Asset Chooser was opened.
9+ */
10+ export type UploadAssetToChooserPayload = { data : File | Blob | string ; filename : string } ;
You can’t perform that action at this time.
0 commit comments