Skip to content

Commit

Permalink
feat(firebase-dynamic-links): Update plugin for parity (#3437)
Browse files Browse the repository at this point in the history
* Include other methods from cordova-firebase-dynamiclinks plugin

* Remove unnecessary dependency

* Run update to reset package lockfile
  • Loading branch information
hawekotte authored Jun 11, 2020
1 parent dc6e331 commit 7f09758
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions src/@ionic-native/plugins/firebase-dynamic-links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,4 +112,40 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
onDynamicLink(): Observable<IDynamicLink> {
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<ICreatedDynamicLink>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,
})
createDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
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<ICreatedDynamicLink>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,
})
createShortDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
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<ICreatedDynamicLink>} Returns a promise with the url
*/
@Cordova({
otherPromise: true,
})
createUnguessableDynamicLink(opts: ILinkOptions): Promise<ICreatedDynamicLink> {
return;
}
}

0 comments on commit 7f09758

Please sign in to comment.