Skip to content

Commit

Permalink
feat: Add app parameter to cozy-intent's openApp method
Browse files Browse the repository at this point in the history
Sender can now send app data to the native host in order to open the
native app when available instead of its webview version
  • Loading branch information
Ldoppea committed Jan 20, 2022
1 parent 3bcb89d commit 58e0797
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions packages/cozy-intent/src/api/models/applications.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** App's description resulting of its manifest.webapp file */
export interface AppManifest {
/** The app's slug */
slug: string

/** The app's mobile information */
mobile: AppManifestMobileInfo
}

/** App's mobile information. Used to describe the app scheme and its store urls */
export interface AppManifestMobileInfo {
/** The app's URL scheme */
schema: string

/** The app's id on Google PlayStore */
id_playstore: string

/** The app's id on Apple AppStore */
id_appstore: string
}
4 changes: 3 additions & 1 deletion packages/cozy-intent/src/api/models/methods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { AppManifest } from './applications'

export type NativeMethodsRegister = {
logout: () => Promise<void>
openApp: (href: string) => Promise<void>
openApp: (href: string, app: AppManifest) => Promise<void>
}

0 comments on commit 58e0797

Please sign in to comment.