mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9639a447cf |
@@ -36,6 +36,40 @@ export interface BranchIoProperties {
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface BranchIoQRCodeSettings {
|
||||
codeColor?: string;
|
||||
backgroundColor?: string;
|
||||
centerLogo?: string;
|
||||
width?: number;
|
||||
margin?: number;
|
||||
imageFormat?: 'PNG' | 'JPEG';
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface BranchIoStandardEvents {
|
||||
STANDARD_EVENT_ADD_TO_CART: string;
|
||||
STANDARD_EVENT_ADD_TO_WISHLIST: string;
|
||||
STANDARD_EVENT_VIEW_CART: string;
|
||||
STANDARD_EVENT_INITIATE_PURCHASE: string;
|
||||
STANDARD_EVENT_ADD_PAYMENT_INFO: string;
|
||||
STANDARD_EVENT_PURCHASE: string;
|
||||
STANDARD_EVENT_SEARCH: string;
|
||||
STANDARD_EVENT_VIEW_ITEM: string;
|
||||
STANDARD_EVENT_VIEW_ITEMS: string;
|
||||
STANDARD_EVENT_RATE: string;
|
||||
STANDARD_EVENT_SHARE: string;
|
||||
STANDARD_EVENT_INITIATE_STREAM: string;
|
||||
STANDARD_EVENT_COMPLETE_STREAM: string;
|
||||
STANDARD_EVENT_COMPLETE_REGISTRATION: string;
|
||||
STANDARD_EVENT_COMPLETE_TUTORIAL: string;
|
||||
STANDARD_EVENT_ACHIEVE_LEVEL: string;
|
||||
STANDARD_EVENT_UNLOCK_ACHIEVEMENT: string;
|
||||
STANDARD_EVENT_INVITE: string;
|
||||
STANDARD_EVENT_LOGIN: string;
|
||||
STANDARD_EVENT_SUBSCRIBE: string;
|
||||
STANDARD_EVENT_START_TRIAL: string;
|
||||
}
|
||||
|
||||
export interface BranchUniversalObject {
|
||||
generateShortUrl(analytics: BranchIoAnalytics, properties: BranchIoProperties): Promise<any>;
|
||||
registerView(): Promise<any>;
|
||||
@@ -63,6 +97,8 @@ export interface BranchUniversalObject {
|
||||
* BranchIoPromise
|
||||
* BranchIoAnalytics
|
||||
* BranchIoProperties
|
||||
* BranchIoQRCodeSettings
|
||||
* BranchIoStandardEvents
|
||||
* BranchUniversalObject
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -77,6 +113,7 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* for development and debugging only
|
||||
*
|
||||
* @deprecated since branch-cordova-sdk v6.1.0. Use setLogging instead.
|
||||
* @param {boolean} enable Enable debug
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -85,6 +122,27 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables debug logging in the native layer. Must be called before initSession.
|
||||
*
|
||||
* @param {boolean} enable Enable logging
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setLogging(enable: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables test mode. Must be called before initSession.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
enableTestMode(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable tracking
|
||||
*
|
||||
@@ -109,6 +167,7 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initializes Branch with callback
|
||||
*
|
||||
* @deprecated not present in branch-cordova-sdk (absent since at least v3.4.0, still absent in v6.6.1). Use initSession instead.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({ observable: true })
|
||||
@@ -119,10 +178,12 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Set Request Metadata
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} val
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setRequestMetadata(): Promise<any> {
|
||||
setRequestMetadata(key: string, val: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,6 +218,26 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cross platform and developer identity data most recently set
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
crossPlatformIds(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last attributed touch data
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
lastAttributedTouchData(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set identy of user
|
||||
*
|
||||
@@ -181,6 +262,7 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Registers a custom event
|
||||
*
|
||||
* @deprecated since branch-cordova-sdk v5.0.0. Use sendBranchEvent instead.
|
||||
* @param {string} eventName
|
||||
* @param {any} metaData
|
||||
* @returns {Promise<any>}
|
||||
@@ -215,6 +297,16 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the map of Branch standard event names
|
||||
*
|
||||
* @returns {Promise<BranchIoStandardEvents>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getStandardEvents(): Promise<BranchIoStandardEvents> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a branchUniversalObj variable to reference with other Branch methods
|
||||
*
|
||||
@@ -226,9 +318,29 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a Branch QR code as a base64 encoded image
|
||||
*
|
||||
* @param {BranchIoQRCodeSettings} qrCodeSettings
|
||||
* @param {BranchUniversalObject} branchUniversalObject
|
||||
* @param {BranchIoAnalytics} analytics
|
||||
* @param {BranchIoProperties} properties
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getBranchQRCode(
|
||||
qrCodeSettings: BranchIoQRCodeSettings,
|
||||
branchUniversalObject: BranchUniversalObject,
|
||||
analytics: BranchIoAnalytics,
|
||||
properties: BranchIoProperties
|
||||
): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load credits
|
||||
*
|
||||
* @deprecated since branch-cordova-sdk v5.0.0. Branch's Rewards/Credits feature was removed upstream.
|
||||
* @param {any} bucket
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -240,6 +352,7 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Redeem Rewards
|
||||
*
|
||||
* @deprecated since branch-cordova-sdk v5.0.0. Branch's Rewards/Credits feature was removed upstream.
|
||||
* @param {string} value
|
||||
* @param {any} bucket
|
||||
* @returns {Promise<any>}
|
||||
@@ -252,10 +365,73 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Show credit history
|
||||
*
|
||||
* @deprecated since branch-cordova-sdk v5.0.0. Branch's Rewards/Credits feature was removed upstream.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
creditHistory(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Digital Markets Act (DMA) consent parameters for users in the European Economic Area
|
||||
*
|
||||
* @param {boolean} eeaRegion whether the user is in the EEA
|
||||
* @param {boolean} adPersonalizationConsent whether the user has consented to ad personalization
|
||||
* @param {boolean} adUserDataUsageConsent whether the user has consented to ad user data usage
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setDMAParamsForEEA(
|
||||
eeaRegion: boolean,
|
||||
adPersonalizationConsent: boolean,
|
||||
adUserDataUsageConsent: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Consumer Protection Attribution (CPP) level
|
||||
*
|
||||
* @param {string} level one of 'FULL', 'REDUCED', 'MINIMAL', 'NONE'
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setConsumerProtectionAttributionLevel(level: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SDK wait time, in seconds, for third party API responses (Google On Device Measurement). iOS only.
|
||||
*
|
||||
* @param {number} waitTime
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true, platforms: ['iOS'] })
|
||||
setSDKWaitTimeForThirdPartyAPIs(waitTime: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom Meta anonymous ID for the current user. iOS only.
|
||||
*
|
||||
* @param {string} anonID
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true, platforms: ['iOS'] })
|
||||
setAnonID(anonID: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes Google On Device Measurement (ODM) event data and the app's first-open timestamp. iOS only.
|
||||
*
|
||||
* @param {string} odmInfo
|
||||
* @param {number} firstOpenTimeStamp
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true, platforms: ['iOS'] })
|
||||
setODMInfo(odmInfo: string, firstOpenTimeStamp: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ export interface CameraPreviewOptions {
|
||||
|
||||
/** Preview box drag across the screen, default 'false' */
|
||||
previewDrag?: boolean;
|
||||
|
||||
/** Capture images to a file and return back the file path instead of returning base64 encoded data. Defaults to false */
|
||||
storeToFile?: boolean;
|
||||
|
||||
/** Capture images to a file and return back the file path instead of returning base64 encoded data. */
|
||||
storeToFile: boolean;
|
||||
|
||||
/** Preview box to the back of the webview (true => back, false => front) , default false */
|
||||
toBack?: boolean;
|
||||
@@ -166,19 +166,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
CUSTOM: 'custom',
|
||||
};
|
||||
|
||||
WHITE_BALANCE_MODE = {
|
||||
LOCK: 'lock',
|
||||
AUTO: 'auto',
|
||||
CONTINUOUS: 'continuous',
|
||||
INCANDESCENT: 'incandescent',
|
||||
CLOUDY_DAYLIGHT: 'cloudy-daylight',
|
||||
DAYLIGHT: 'daylight',
|
||||
FLUORESCENT: 'fluorescent',
|
||||
SHADE: 'shade',
|
||||
TWILIGHT: 'twilight',
|
||||
WARM_FLUORESCENT: 'warm-fluorescent',
|
||||
};
|
||||
|
||||
FLASH_MODE = {
|
||||
OFF: 'off',
|
||||
ON: 'on',
|
||||
@@ -310,16 +297,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color effects supported by the camera device currently started. Android only.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedColorEffects(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set camera color effect.
|
||||
@@ -530,40 +507,6 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get white balance modes supported by the camera device currently started.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedWhiteBalanceModes(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current white balance mode of the camera device currently started.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getWhiteBalanceMode(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the white balance mode for the camera device currently started.
|
||||
*
|
||||
* @param {string} [whiteBalanceMode] 'lock', 'auto', 'continuous', 'incandescent', 'cloudy-daylight', 'daylight', 'fluorescent', 'shade', 'twilight' or 'warm-fluorescent'
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setWhiteBalanceMode(whiteBalanceMode?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set specific focus point. Note, this assumes the camera is full-screen.
|
||||
*
|
||||
@@ -605,18 +548,4 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
||||
getCameraCharacteristics(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a local file (e.g. a `file://` path returned by takePicture with storeToFile) into a Blob.
|
||||
*
|
||||
* @param {string} path the local url to convert
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
getBlob(path: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user