Skip to content

Commit

Permalink
fix(urbanairship): fix cordova and method wrapper options (#4221)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian von Rohr <christian.vonrohr@well.ch>
  • Loading branch information
chvonrohr and Christian von Rohr committed Jun 30, 2022
1 parent 4e183b1 commit 0442260
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/@awesome-cordova-plugins/plugins/urbanairship/index.ts
Expand Up @@ -29,12 +29,14 @@ export interface ChannelSubscriptionListEditor {
apply(success: () => void, failure: (message: string) => void): ChannelSubscriptionListEditor;
}

export type ContactSubscriptionScope = 'app' | 'email' | 'push' | 'sms';

/**
* Interface for UAirship ContactSubscriptionList Editor
*/
export interface ContactSubscriptionListEditor {
subscribe(subscriptionListID: string, contactScope: 'APP' | 'EMAIL'): ContactSubscriptionListEditor;
unsubscribe(subscriptionListID: string, contactScope: 'APP' | 'EMAIL'): ContactSubscriptionListEditor;
subscribe(subscriptionListID: string, contactScope: ContactSubscriptionScope): ContactSubscriptionListEditor;
unsubscribe(subscriptionListID: string, contactScope: ContactSubscriptionScope): ContactSubscriptionListEditor;
apply(success: () => void, failure: (message: string) => void): ContactSubscriptionListEditor;
}

Expand Down Expand Up @@ -630,10 +632,10 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
* @param {string} failure.message The error message.
*/
@Cordova({
successIndex: 1,
errorIndex: 2,
successIndex: 0,
errorIndex: 1,
})
getChannelSubscriptionLists(): Promise<any> {
getChannelSubscriptionLists(): Promise<string[]> {
return;
}

Expand All @@ -646,10 +648,10 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
* @param {string} failure.message The error message.
*/
@Cordova({
successIndex: 1,
errorIndex: 2,
successIndex: 0,
errorIndex: 1,
})
getContactSubscriptionLists(): Promise<any> {
getContactSubscriptionLists(): Promise<string[]> {
return;
}

Expand All @@ -663,7 +665,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
* @param {string} failure.message The error message.
*/
@Cordova()
setAssociatedIdentifier(key: string, identifier: string): Promise<any> {
setAssociatedIdentifier(key: string, identifier: string): Promise<void> {
return;
}

Expand Down

0 comments on commit 0442260

Please sign in to comment.