mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 22:38:16 +08:00
Moved everything out of cordova/plugins
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// Copyright (c) Microsoft Open Technologies, Inc.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference path="FileSystem.d.ts"/>
|
||||
/// <reference types="cordova-plugin-file" />
|
||||
|
||||
/**
|
||||
* The FileTransfer object provides a way to upload files using an HTTP multi-part POST request,
|
||||
70
cordova/plugins/Push.d.ts
vendored
70
cordova/plugins/Push.d.ts
vendored
@@ -1,70 +0,0 @@
|
||||
// Type definitions for Apache Cordova Push plugin.
|
||||
// Project: https://github.com/phonegap-build/PushPlugin
|
||||
// Definitions by: Microsoft Open Technologies, Inc. <http://msopentech.com>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies, Inc.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
interface Window {
|
||||
plugins: Plugins
|
||||
}
|
||||
|
||||
interface Plugins {
|
||||
/**
|
||||
* This plugin allows to receive push notifications. The Android implementation uses
|
||||
* Google's GCM (Google Cloud Messaging) service,
|
||||
* whereas the iOS version is based on Apple APNS Notifications
|
||||
*/
|
||||
pushNotification: PushNotification
|
||||
}
|
||||
|
||||
/**
|
||||
* This plugin allows to receive push notifications. The Android implementation uses
|
||||
* Google's GCM (Google Cloud Messaging) service,
|
||||
* whereas the iOS version is based on Apple APNS Notifications
|
||||
*/
|
||||
interface PushNotification {
|
||||
/**
|
||||
* Registers as push notification receiver.
|
||||
* @param successCallback Called when a plugin method returns without error.
|
||||
* @param errorCallback Called when the plugin returns an error.
|
||||
* @param registrationOptions Options for registration process.
|
||||
*/
|
||||
register(
|
||||
successCallback: (registrationId: string) => void,
|
||||
errorCallback: (error: any) => void,
|
||||
registrationOptions: RegistrationOptions): void;
|
||||
/**
|
||||
* Unregisters as push notification receiver.
|
||||
* @param successCallback Called when a plugin method returns without error.
|
||||
* @param errorCallback Called when the plugin returns an error.
|
||||
*/
|
||||
unregister(
|
||||
successCallback: (result: any) => void,
|
||||
errorCallback: (error: any) => void): void;
|
||||
/**
|
||||
* Sets the badge count visible when the app is not running. iOS only.
|
||||
* @param successCallback Called when a plugin method returns without error.
|
||||
* @param errorCallback Called when the plugin returns an error.
|
||||
* @param badgeCount An integer indicating what number should show up in the badge. Passing 0 will clear the badge.
|
||||
*/
|
||||
setApplicationIconBadgeNumber(
|
||||
successCallback: (result: any) => void,
|
||||
errorCallback: (error: any) => void,
|
||||
badgeCount: number): void;
|
||||
}
|
||||
|
||||
/** Options for registration process. */
|
||||
interface RegistrationOptions {
|
||||
/** This is the Google project ID you need to obtain by registering your application for GCM. Android only */
|
||||
senderID?: string;
|
||||
/** WP8 only */
|
||||
channelName?: string;
|
||||
/** Callback, that is fired when notification arrived */
|
||||
ecb?: string;
|
||||
badge?: boolean;
|
||||
sound?: boolean;
|
||||
alert?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user