Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firebase-dynamic-links): Update plugin for parity #3437

Merged
merged 3 commits into from
Jun 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}