diff --git a/docs/plugins/urbanairship.md b/docs/plugins/urbanairship.md index 2447a5a87..6e4c69b82 100644 --- a/docs/plugins/urbanairship.md +++ b/docs/plugins/urbanairship.md @@ -7,12 +7,13 @@ $ npm install @awesome-cordova-plugins/urbanairship ## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/urbanairship/) -Plugin Repo: [https://www.npmjs.com/package/urbanairship-cordova](https://www.npmjs.com/package/urbanairship-cordova) +Plugin Repo: [https://github.com/urbanairship/urbanairship-cordova](https://github.com/urbanairship/urbanairship-cordova) + +Npm: [https://www.npmjs.com/package/urbanairship-cordova](https://www.npmjs.com/package/urbanairship-cordova) -This plugin does something ## Supported platforms * Android - * iOS +* iOS diff --git a/src/@awesome-cordova-plugins/plugins/urbanairship/index.ts b/src/@awesome-cordova-plugins/plugins/urbanairship/index.ts index 86e36eff2..b6d5d95f2 100644 --- a/src/@awesome-cordova-plugins/plugins/urbanairship/index.ts +++ b/src/@awesome-cordova-plugins/plugins/urbanairship/index.ts @@ -2,10 +2,22 @@ import { Injectable } from '@angular/core'; import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core'; import { Observable } from 'rxjs'; +/** + * Interface for UAirship Tag Editor + */ export interface TagGroupEditor { - addTags(): void; - removeTags(): void; - apply(): void; + addTags(tagGroup: string, tags: string[]): TagGroupEditor; + removeTags(tagGroup: string, tags: string[]): TagGroupEditor; + apply(success: () => void, failure: (message: string) => void): TagGroupEditor; +} + +/** + * Interface for UAirship Attributes Editor + */ +export interface AttributesEditor { + setAttribute(name: string, value: string | number | boolean | Date): AttributesEditor; + removeAttribute(name: string): AttributesEditor; + apply(success: () => void, failure: (message: string) => void): AttributesEditor; } /** @@ -214,6 +226,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin { * new config will not be used until the next app start. * * @param {object} config The Urban Airship config. + * @param {string} config.site Sets the cloud site, must be either EU or US. * @param {object} config.development The Urban Airship development config. * @param {string} config.development.appKey The development appKey. * @param {string} config.development.appSecret The development appSecret. @@ -538,24 +551,36 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin { /** * Creates an editor to modify the named user tag groups. - * - * @returns {TagGroupEditor} A tag group editor instance. */ - @Cordova() + @Cordova({ sync: true }) editNamedUserTagGroups(): TagGroupEditor { return; } /** * Creates an editor to modify the channel tag groups. - * - * @returns {TagGroupEditor} A tag group editor instance. */ - @Cordova() + @Cordova({ sync: true }) editChannelTagGroups(): TagGroupEditor { return; } + /** + * Creates an editor to modify the channel attributes. + */ + @Cordova({ sync: true }) + editChannelAttributes(): AttributesEditor { + return; + } + + /** + * Creates an editor to modify the named user attributes. + */ + @Cordova({ sync: true }) + editNamedUserAttributes(): AttributesEditor { + return; + } + /** * Sets an associated identifier for the Connect data stream. *