From 7f0975803f2e84ed536922dde542e4d50549f919 Mon Sep 17 00:00:00 2001 From: Keenan Hawekotte <46231388+hawekotte@users.noreply.github.com> Date: Thu, 11 Jun 2020 09:00:11 -0700 Subject: [PATCH] feat(firebase-dynamic-links): Update plugin for parity (#3437) * Include other methods from cordova-firebase-dynamiclinks plugin * Remove unnecessary dependency * Run update to reset package lockfile --- .../plugins/firebase-dynamic-links/index.ts | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/src/@ionic-native/plugins/firebase-dynamic-links/index.ts b/src/@ionic-native/plugins/firebase-dynamic-links/index.ts index 2fee7c876..7a69ec89b 100644 --- a/src/@ionic-native/plugins/firebase-dynamic-links/index.ts +++ b/src/@ionic-native/plugins/firebase-dynamic-links/index.ts @@ -7,6 +7,49 @@ export interface IDynamicLink { deepLink: string; } +export interface ICreatedDynamicLink { + url: string; +} + +export interface ILinkOptions { + domainUriPrefix?: string; + link?: string; + androidInfo?: { + androidPackageName?: string; + androidFallbackLink?: string; + androidMinPackageVersionCode?: number; + }; + iosInfo?: { + iosBundleId?: string; + iosFallbackLink?: string; + iosIpadFallbackLink?: string; + iosIpadBundleId?: string; + iosAppStoreId?: string; + }; + navigationInfo?: { + enableForcedRedirect?: boolean; + }; + analyticsInfo?: { + googlePlayAnalytics?: { + utmSource?: string; + utmMedium?: string; + utmCampaign?: string; + utmTerm?: string; + utmContent?: string; + }; + itunesConnectAnalytics?: { + at?: string; + ct?: string; + pt?: string; + }; + }; + socialMetaTagInfo?: { + socialTitle?: string; + socialDescription?: string; + socialImageLink?: string; + }; +} + /** * @beta * @name Firebase Dynamic Links @@ -69,4 +112,40 @@ export class FirebaseDynamicLinks extends IonicNativePlugin { onDynamicLink(): Observable { return; } + + /** + * Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url. + * @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters) + * @return {Promise} Returns a promise with the url + */ + @Cordova({ + otherPromise: true, + }) + createDynamicLink(opts: ILinkOptions): Promise { + return; + } + + /** + * Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed. + * @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters) + * @return {Promise} Returns a promise with the url + */ + @Cordova({ + otherPromise: true, + }) + createShortDynamicLink(opts: ILinkOptions): Promise { + return; + } + + /** + * Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information. + * @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters) + * @return {Promise} Returns a promise with the url + */ + @Cordova({ + otherPromise: true, + }) + createUnguessableDynamicLink(opts: ILinkOptions): Promise { + return; + } }