-
Notifications
You must be signed in to change notification settings - Fork 6
[Types] Made a simple type file #16
Copy link
Copy link
Open
Description
I have not searched the documentation and did not check the work too closely
and I did this more as a hacky fix to having untyped functions called in our repo. Would be great if an official TS type file was added.
For context we are only using configure and click.
everflow.d.ts
declare module '@everflow/everflow-sdk' {
class EverflowSDK {
configure(options: {
tracking_domain: string
tld?: string // Top level TLD without http(s)
organic?: {
offer_id: number
affiliate_id: number
}
}): void
getAdvertiserTransactionId(advertiserId): string
getTransactionId(offerId): string
impression(options: {
offer_id: number // Required. The offer id
affiliate_id: number //Required. The affiliate id
// Optional. Sub placement values.
sub1?: string
sub2?: string
sub3?: string
sub4?: string
sub5?: string
source_id?: string
fbclid?: string // Facebook unique click ID
gclid?: string // Google unique click ID
}): Promise<string>
click(options: {
offer_id: number // Required. The offer id
affiliate_id: number //Required. The affiliate id
uid?: number // Optional : Offer URL Id
creative_id?: number // Optional : Offer Creative ID
tracking_domain?: string
// Optional. Sub placement values.
sub1?: string
sub2?: string
sub3?: string
sub4?: string
sub5?: string
source_id?: string
coupon_code?: string // Optional Coupon Code at the click level
fbclid?: string // Facebook unique click ID
gclid?: string // Google unique click ID
ttclid?: string // TikTok unique click ID
}): Promise<string>
conversion(options: {
offer_id?: number // The offer id. Required if aid is not provided
aid?: number // The advertiser id. Required if offer_id is not provided
transaction_id?: string // Optional. The Everflow unique transaction id
amount?: number // Optional. Sale Amount -- relevant for RPS offers
event_id?: number // Optional. The event id
coupon_code?: string // Optional. Coupon code
adv_event_id?: number // Optional. If you use global advertiser events
order_id?: string // Optional
user_id?: string // Optional. User tracking
verification_token?: string // Required if the advertiser is configured to use verification tokens
email?: string // Optional
// Optional. Adv placement values.
adv1?: string
adv2?: string
adv3?: string
adv4?: string
adv5?: string
}): Promise<{ transaction_id: string; conversion_id: string }>
urlParameter(): string | null
}
export default new EverflowSDK()
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels