From 38f8013e608f8cf58bb6063107e2b798637fed9e Mon Sep 17 00:00:00 2001
From: Pierre Balzack <96387156+balzack@users.noreply.github.com>
Date: Wed, 9 Oct 2024 12:39:54 -0700
Subject: [PATCH] Update README.md
---
app/sdk/README.md | 135 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 134 insertions(+), 1 deletion(-)
diff --git a/app/sdk/README.md b/app/sdk/README.md
index 4e994c11..aa3efb98 100644
--- a/app/sdk/README.md
+++ b/app/sdk/README.md
@@ -82,7 +82,7 @@ Configure allocates the Node interface for the server
- Bot communication is provided through the Bot interface
+ Automated communication is provided through the Bot interface
Automate allocates the Bot interface for ia specific communication channel
@@ -246,6 +246,139 @@ Automate allocates the Bot interface for ia specific communication channel
+
+ Contact interface module manages contacts and the shared articles and channels
+
+
+
+ The current contacts can be access with a [Card](https://github.com/balzack/databag/blob/sdk/app/sdk/src/types.ts) listener
+
+ ```Contact::addCardListener(ev: (cards: Card[]) => void): void```
+
+ ```Contact::removeCardListener(ev: (cards: Card[]) => void): void```
+
+ A new contact can be added to the account through the addCard method, the id of the card is returned
+
+ ```Contact::addCard(server: string, guid: string): Promise```
+
+ A contact is removed the the account through the removeCard method
+
+ ```Contact::removeCard(cardId: string): Promise```
+
+ Get URL of contacts profile image with getCardImageUrl
+
+ ```Contact::getCardImageUrl(cardId: string): string```
+
+ Attempt synchronization of contact data if previously failed
+
+ ```Contact::resyncCard(cardId: string): Promise```
+
+ Initiate or accept a contact connection with connectCard to share data
+
+ ```Contact::connectCard(cardId: string): Promise```
+
+ Disconnect from a connected with diconnectCard to stop sharing with that contact
+
+ ```Contact::disconnectCard(cardId: string): Promise```
+
+ Deny a connection request from a contact with denyCard
+
+ ```Contact::denyCard(cardId: string): Promise```
+
+ Ignore a connection request from a contact with ignoreCard
+
+ ```Contact::ignoreCard(cardId: string): Promise```
+
+ Cancel your connection request to a contact with cancelCard
+
+ ```Contact::cancelCard(cardId: string): Promise```
+
+ Cancel your connection request to a contact with cancelCard
+
+ ```Contact::cancelCard(cardId: string): Promise```
+
+ The current articles can be access with an [Article](https://github.com/balzack/databag/blob/sdk/app/sdk/src/types.ts) listener
+
+ ```Contact::addArticleListener(id: string | null, ev: (arg: { cardId: string; articles: Article[] }) => void): void```
+
+ ```Contact::removeArticleListener(id: string | null, ev: (arg: { cardId: string; articles: Article[] }) => void): void```
+
+ Relinquish access to shared article
+
+ ```Contact::removeArticle(cardId: string): Promise```
+
+ The current channels can be access with a [Channel](https://github.com/balzack/databag/blob/sdk/app/sdk/src/types.ts) listener
+
+ ```Contact::addChannelListener(id: string | null, ev: (arg: { cardId: string; channels: Channel[] }) => void): void```
+
+ ```Contact::removeChannelListener(id: string | null, ev: (arg: { cardId: string; channels: Channel[] }) => void): void```
+
+ Relinquish access to shared channel
+
+ ```Contact::removeChannel(cardId: string): Promise```
+
+ Enable or disable push notification associated with specified contact channel
+
+ ```Contact::setChannelNotifications(cardId: string, channelId: string, enabled: boolean): Promise```
+
+ Get whether notifications are enabled on specified contact channel
+
+ ```Contact::getChannelNotifications(cardId: string, channelId: string): Promise```
+
+ Mark contact channel as read or unread with setUnreadChannel
+
+ ```Contact::setUnreadChannel(cardId: string, channelId: string, unread: boolean): Promise```
+
+ Get list of searchable accounts of specified server with getRegistry
+
+ ```Contact::getRegistry(server: string, secure: boolean): Promise```
+
+ Get URL of profile image for searchable contact on specified server
+
+ ```Contact::getRegistryImageUrl(server: string, secure: boolean, guid: string): string```
+
+ Block or unblock contact to hide locally with setBlockedCard
+
+ ```Contact::setBlockedCard(cardId: string, boolean: blocked): Promise```
+
+ Get list of all blocked contacts with getBlockedCards
+
+ ```Contact::getBlockedCards(): Promise```
+
+ Flag contact to node admin for review with flagCard
+
+ ```Contact::flagCard(cardId: string): Promise```
+
+ Block or unblock contact article to hide locallay with setBlockedArticle
+
+ ```Contact::setBlockedArticle(cardId: string, articleId: string, boolean: blocked): Promise```
+
+ Get list of all blocked contact articles with getBlockedArticles
+
+ ```Contact::getBlockedArticles(): Promise```
+
+ Flag article for review by admin with flagArticle
+
+ ```Contact::flagArticle(cardId: string, articleId: string): Promise```
+
+ Block or unblock contact channel with setBlockedChanenl
+
+ ```Contact::setBlockedChannel(cardId: string, channelId: string, boolean: blocked): Promise```
+
+ Get list of all blocked contact channels with getBlockedChannels
+
+ ```Contact::getBlockedChannels(): Promise```
+
+ Flag channel for review by admin with flagChannel
+
+ ```Contact::flagChannel(cardId: string, channelId: string): Promise```
+
+
+
+
+
+
+
## Admin Communication
## Bot Communication