mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-20 01:22:52 +08:00
update the new plugin rewrite
This commit is contained in:
parent
654cef2377
commit
937138378b
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import {Plugin, Cordova, InstanceProperty, CordovaInstance} from './plugin';
|
||||||
|
|
||||||
export interface ContactProperties {
|
export interface ContactProperties {
|
||||||
/** A globally unique identifier. */
|
/** A globally unique identifier. */
|
||||||
@ -58,53 +58,61 @@ export class Contact {
|
|||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
get id(): string {
|
@InstanceProperty
|
||||||
return this._objectInstance.id;
|
get id() {return; }
|
||||||
}
|
|
||||||
set id(val: string) {
|
@InstanceProperty
|
||||||
this._objectInstance.id = val;
|
get displayName() {return; }
|
||||||
}
|
|
||||||
get displayName(): string {
|
@InstanceProperty
|
||||||
return this._objectInstance.displayName;
|
get nickname() {return; }
|
||||||
}
|
|
||||||
set displayName(val: string){
|
@InstanceProperty
|
||||||
this._objectInstance.displayName = val;
|
get phoneNumbers() {return; }
|
||||||
}
|
|
||||||
get name(): ContactName {
|
@InstanceProperty
|
||||||
return this._objectInstance.name;
|
get emails() {return; }
|
||||||
}
|
|
||||||
set name(val: ContactName){
|
@InstanceProperty
|
||||||
this._objectInstance.name = val;
|
get addresses() {return; }
|
||||||
}
|
|
||||||
get nickname(): string {
|
@InstanceProperty
|
||||||
return this._objectInstance.nickname;
|
get ims() {return; }
|
||||||
}
|
|
||||||
set nickname(val: string){
|
@InstanceProperty
|
||||||
this._objectInstance.nickname = val;
|
get organizations() {return; }
|
||||||
}
|
|
||||||
get phoneNumbers(): ContactField[] {
|
@InstanceProperty
|
||||||
return this._objectInstance.phoneNumbers;
|
get birthday() {return; }
|
||||||
}
|
|
||||||
set phoneNumbers(val: ContactField[]){
|
@InstanceProperty
|
||||||
this._objectInstance.phoneNumbers = val;
|
get note() {return; }
|
||||||
}
|
|
||||||
get emails(): ContactField[] {
|
@InstanceProperty
|
||||||
return this._objectInstance.emails;
|
get photos() {return; }
|
||||||
}
|
|
||||||
set emails(val: ContactField[]){
|
@InstanceProperty
|
||||||
this._objectInstance.emails = val;
|
get categories() {return; }
|
||||||
}
|
|
||||||
get addresses(): ContactAddress[] {
|
@InstanceProperty
|
||||||
return this._objectInstance.addresses;
|
get urls() {return; }
|
||||||
}
|
|
||||||
set addresses(val: ContactAddress[]){
|
|
||||||
this._objectInstance.addresses = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor () {
|
constructor () {
|
||||||
// creat eobj
|
this._objectInstance = navigator.contacts.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clone(): Contact {
|
||||||
|
// TODO manually clone the object
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@CordovaInstance()
|
||||||
|
remove(): Promise<any> {return; }
|
||||||
|
|
||||||
|
@CordovaInstance()
|
||||||
|
save(): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ContactError {
|
interface ContactError {
|
||||||
|
Loading…
Reference in New Issue
Block a user