Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@expressms/smartapp-sdk",
"version": "1.14.0-alpha.8",
"version": "1.14.0-alpha.9",
"description": "Smartapp SDK",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './lib/client'
export * from './lib/client/file'
export * from './lib/contacts'
export * from './lib/helpers/helpers'
export * from './lib/logging'
Expand Down
18 changes: 18 additions & 0 deletions src/lib/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from '../../types'
export * from './events'
export * from './storage'
export * from './file'

const openClientSettings = () => {
return bridge?.sendClientEvent({
Expand Down Expand Up @@ -247,6 +248,22 @@ const hideRecievedData = (): Promise<StatusResponse> => {
.then(event => event as StatusResponse)
}

/**
* Open contacts page on client
* @returns Promise that'll be fullfilled
*/
const openClientContacts = (): Promise<StatusResponse> => {
if (!bridge) return Promise.reject(ERROR_CODES.NO_BRIDGE)

return bridge
.sendClientEvent({
method: METHODS.OPEN_CLIENT_CONTACTS,
params: {},
})
.then(event => event as StatusResponse)
}


export {
openClientSettings,
getChats,
Expand All @@ -264,4 +281,5 @@ export {
getAppVisibility,
getSmartAppList,
hideRecievedData,
openClientContacts,
}
1 change: 1 addition & 0 deletions src/types/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export enum METHODS {
HIDE_RECV_DATA = 'hide_recv_data',
GET_EXPRESS_DISK_AUTH_CODE = 'get_express_disk_auth_code',
GET_NFC_STATUS = 'get_nfc_status',
OPEN_CLIENT_CONTACTS = 'open_client_contacts',
}

export enum STATUS {
Expand Down
Loading