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

Adds Start Checkout to Answers type definition, to allow importing. #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
Adds Start Checkout to Answers type definition, to allow importing.
VicFrolov committed Nov 30, 2018
commit a8dffef07ae89e18d4bc81ef7e129794d42f5857
24 changes: 19 additions & 5 deletions typings/react-native-fabric.d.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ declare module 'react-native-fabric' {
* API for interacting with the Crashlytics kit.
*
* https://docs.fabric.io/ios/crashlytics/index.html
*/
*/
Crashlytics: {
crash(): void;
throwException(): void;
@@ -26,7 +26,7 @@ declare module 'react-native-fabric' {
setNumber(key: string, value: number): void;
setString(key: string, value: string): void;
recordCustomExceptionName(name: string, reason: string, frameArray: Array<Object>): void;
}
}

/**
* API for interacting with the Answers kit.
@@ -130,7 +130,7 @@ declare module 'react-native-fabric' {
* @param attributes Any additional user-defined attributes to be logged.
*/
logInvite(method?: string, attributes?: Attributes): void;

/**
* Send the Content View tracking event.
*
@@ -144,15 +144,29 @@ declare module 'react-native-fabric' {
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
*/
logCustom(name: string, attributes?: Attributes): void;
}

/**
* Sends the Start Checkout tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#start-checkout
*
* @param totalPrice An optional total price of all items in cart in the currency specified.
* @param count An optional count of items in cart.
* @param currency An optional ISO4217 currency code.
* @param attributes Any additional user-defined attributes to be logged.
*/
logStartCheckout(totalPrice?: number, count?: number, currency?: string, attributes?: Object): void;
}
}

/**
* A key/value pair of strings.
*/
interface Attributes {
[index: string]: string | number;
}
}

var Fabric: Fabric;
export = Fabric;