@gphone/sdk
Preparing search index...
useContacts
Function useContacts
useContacts
()
:
{
addContact
:
(
firstname
:
string
,
phone
:
string
,
lastname
?:
string
,
avatar
?:
string
,
favorite
?:
boolean
,
)
=>
Promise
<
Contact
>
;
contactsStore
:
{
add
:
(
draft
:
TDraft
)
=>
Promise
<
Contact
>
;
delete
:
(
id
:
number
)
=>
Promise
<
void
>
;
load
:
()
=>
Promise
<
void
>
;
loaded
:
{
subscribe
:
(
this
:
void
,
run
:
Subscriber
<
boolean
>
,
invalidate
?:
()
=>
void
,
)
=>
Unsubscriber
;
}
;
patch
:
(
id
:
number
,
changes
:
Partial
<
T
>
)
=>
void
;
set
:
(
rows
:
Contact
[]
)
=>
void
;
share
:
(
payload
:
Partial
<
Contact
>
&
{
name
?:
string
;
phone
:
string
}
,
)
=>
Promise
<
void
>
;
subscribe
:
(
this
:
void
,
run
:
Subscriber
<
Contact
[]
>
,
invalidate
?:
()
=>
void
,
)
=>
Unsubscriber
;
update
:
(
row
:
Contact
)
=>
Promise
<
void
>
;
}
;
favoriteContacts
:
Readable
<
Contact
[]
>
;
shareContact
:
(
firstname
:
string
,
phone
:
string
,
lastname
?:
string
,
)
=>
Promise
<
void
>
;
}
OS Service Hook for accessing address book contacts and sharing contacts.
Returns
{
addContact
:
(
firstname
:
string
,
phone
:
string
,
lastname
?:
string
,
avatar
?:
string
,
favorite
?:
boolean
,
)
=>
Promise
<
Contact
>
;
contactsStore
:
{
add
:
(
draft
:
TDraft
)
=>
Promise
<
Contact
>
;
delete
:
(
id
:
number
)
=>
Promise
<
void
>
;
load
:
()
=>
Promise
<
void
>
;
loaded
:
{
subscribe
:
(
this
:
void
,
run
:
Subscriber
<
boolean
>
,
invalidate
?:
()
=>
void
,
)
=>
Unsubscriber
;
}
;
patch
:
(
id
:
number
,
changes
:
Partial
<
T
>
)
=>
void
;
set
:
(
rows
:
Contact
[]
)
=>
void
;
share
:
(
payload
:
Partial
<
Contact
>
&
{
name
?:
string
;
phone
:
string
}
,
)
=>
Promise
<
void
>
;
subscribe
:
(
this
:
void
,
run
:
Subscriber
<
Contact
[]
>
,
invalidate
?:
()
=>
void
,
)
=>
Unsubscriber
;
update
:
(
row
:
Contact
)
=>
Promise
<
void
>
;
}
;
favoriteContacts
:
Readable
<
Contact
[]
>
;
shareContact
:
(
firstname
:
string
,
phone
:
string
,
lastname
?:
string
,
)
=>
Promise
<
void
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
@gphone/sdk
Loading...
OS Service Hook for accessing address book contacts and sharing contacts.