Skip to content

Commit

Permalink
Stage dist
Browse files Browse the repository at this point in the history
  • Loading branch information
dukhovnyi committed Dec 5, 2024
1 parent 122402e commit b3789b0
Show file tree
Hide file tree
Showing 12 changed files with 426 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ GliaWidgets SDK is a simple and customisable framework built on top of GliaSDK.

## Installation

To install this package use:
To install version 1.0.0 of this package use:

```text
npm install git+https://github.com/salemove/widgets_sdk_ionic.git
npm install github:salemove/widgets_sdk_ionic#1.0.0
```

# How to use GliaSDK in Ionic environment
Expand Down
283 changes: 283 additions & 0 deletions dist/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
{
"api": {
"name": "GliaSdkPlugin",
"slug": "gliasdkplugin",
"docs": "",
"tags": [],
"methods": [
{
"name": "configure",
"signature": "(options: { siteId: string; apiKey: ApiKey; region: Region; companyName: string; overrideLocale?: string; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ siteId: string; apiKey: ApiKey; region: Region; companyName: string; overrideLocale?: string | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "configures GliaWidgets SDK with credentials.\n\nNB! To make plugin work properly, use `create-visitor` credentials for Site APIKey only.",
"complexTypes": [
"ApiKey",
"Region"
],
"slug": "configure"
},
{
"name": "startChat",
"signature": "(options: { queueIds?: string[]; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ queueIds?: string[] | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "Starts a new chat/text engagement with queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.",
"complexTypes": [],
"slug": "startchat"
},
{
"name": "startAudio",
"signature": "(options: { queueIds?: string[]; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ queueIds?: string[] | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "Starts a new audio engagement with queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.",
"complexTypes": [],
"slug": "startaudio"
},
{
"name": "startVideo",
"signature": "(options: { queueIds?: string[]; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ queueIds?: string[] | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "Starts a new video engagement for queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.",
"complexTypes": [],
"slug": "startvideo"
},
{
"name": "startSecureConversation",
"signature": "(options: { startScreen: SecureConversationStartScreen; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ startScreen: SecureConversationStartScreen; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "Starts Secure Conversation flow with passed `start screen`.\nSecure Conversation requires authentication/IdToken.",
"complexTypes": [
"SecureConversationStartScreen"
],
"slug": "startsecureconversation"
},
{
"name": "clearVisitorSession",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Recreates currently used visitor in SDK.",
"complexTypes": [],
"slug": "clearvisitorsession"
},
{
"name": "listQueues",
"signature": "() => Promise<any>",
"parameters": [],
"returns": "Promise<any>",
"tags": [],
"docs": "Fetches all queues with its info for current site.",
"complexTypes": [],
"slug": "listqueues"
},
{
"name": "showVisitorCodeViewController",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Presents GliaWidgets UI with visitor code for sharing with operator to start an engagement.",
"complexTypes": [],
"slug": "showvisitorcodeviewcontroller"
},
{
"name": "authenticate",
"signature": "(options: { behavior: AuthenticationBehavior; idToken: string; accessToken?: string; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "- Provides options for authentication such as behavior, idToken, and accessToken.",
"type": "{ behavior: AuthenticationBehavior; idToken: string; accessToken?: string | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "param",
"text": "options - Provides options for authentication such as behavior, idToken, and accessToken."
}
],
"docs": "Authenticates visitor.",
"complexTypes": [
"AuthenticationBehavior"
],
"slug": "authenticate"
},
{
"name": "deauthenticate",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Deauthenticates visitor. Be aware that deauthentication process relies on `AuthenticationBehavior`",
"complexTypes": [],
"slug": "deauthenticate"
},
{
"name": "isAuthenticated",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Provides current authentication state",
"complexTypes": [],
"slug": "isauthenticated"
},
{
"name": "refreshAuthentication",
"signature": "(options: { idToken: string; accessToken?: string; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ idToken: string; accessToken?: string | undefined; }"
}
],
"returns": "Promise<void>",
"tags": [],
"docs": "Refreshes authentication access properties.",
"complexTypes": [],
"slug": "refreshauthentication"
},
{
"name": "pauseLiveObservation",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Makes a pause for ongoing LiveObservation session.",
"complexTypes": [],
"slug": "pauseliveobservation"
},
{
"name": "resumeLiveObservation",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [],
"docs": "Resumes ongoing LiveObservation session.",
"complexTypes": [],
"slug": "resumeliveobservation"
}
],
"properties": []
},
"interfaces": [
{
"name": "ApiKey",
"slug": "apikey",
"docs": "",
"tags": [],
"methods": [],
"properties": [
{
"name": "id",
"tags": [],
"docs": "",
"complexTypes": [],
"type": "string"
},
{
"name": "secret",
"tags": [],
"docs": "",
"complexTypes": [],
"type": "string"
}
]
}
],
"enums": [],
"typeAliases": [
{
"name": "Region",
"slug": "region",
"docs": "Site's region.",
"types": [
{
"text": "'us'",
"complexTypes": []
},
{
"text": "'eu'",
"complexTypes": []
},
{
"text": "'beta'",
"complexTypes": []
}
]
},
{
"name": "SecureConversationStartScreen",
"slug": "secureconversationstartscreen",
"docs": "Start screen for Secure Conversation flow.",
"types": [
{
"text": "'welcome'",
"complexTypes": []
},
{
"text": "'chatTranscript'",
"complexTypes": []
}
]
},
{
"name": "AuthenticationBehavior",
"slug": "authenticationbehavior",
"docs": "Authentication (IdToken) behavior.\nforbiddenDuringEngagement - Prevent creation a new engagement if ongoing engagement exists. Default behavior.\nallowedDuringEngagement - Allows creation a new engagement if ongoing engagement exists. During this behavior original engagement will be ended and a new engagement engagement will be restarted with the same operator after authentication is succeded.",
"types": [
{
"text": "'forbiddenDuringEngagement'",
"complexTypes": []
},
{
"text": "'allowedDuringEngagement'",
"complexTypes": []
}
]
}
],
"pluginConfigs": []
}
101 changes: 101 additions & 0 deletions dist/esm/definitions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
export interface ApiKey {
id: string;
secret: string;
}
/**
* Site's region.
*/
export declare type Region = 'us' | 'eu' | 'beta';
/**
* Authentication (IdToken) behavior.
* forbiddenDuringEngagement - Prevent creation a new engagement if ongoing engagement exists. Default behavior.
* allowedDuringEngagement - Allows creation a new engagement if ongoing engagement exists. During this behavior original engagement will be ended and a new engagement engagement will be restarted with the same operator after authentication is succeded.
*/
export declare type AuthenticationBehavior = 'forbiddenDuringEngagement' | 'allowedDuringEngagement';
/**
* Start screen for Secure Conversation flow.
*/
export declare type SecureConversationStartScreen = 'welcome' | 'chatTranscript';
export interface GliaSdkPlugin {
/**
* configures GliaWidgets SDK with credentials.
*
* NB! To make plugin work properly, use `create-visitor` credentials for Site APIKey only.
*/
configure(options: {
siteId: string;
apiKey: ApiKey;
region: Region;
companyName: string;
overrideLocale?: string;
}): Promise<void>;
/**
* Starts a new chat/text engagement with queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.
*/
startChat(options: {
queueIds?: string[];
}): Promise<void>;
/**
* Starts a new audio engagement with queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.
*/
startAudio(options: {
queueIds?: string[];
}): Promise<void>;
/**
* Starts a new video engagement for queue identifiers. If `queueIds` is null or empty, creates engagement for default queue.
*/
startVideo(options: {
queueIds?: string[];
}): Promise<void>;
/**
* Starts Secure Conversation flow with passed `start screen`.
* Secure Conversation requires authentication/IdToken.
*/
startSecureConversation(options: {
startScreen: SecureConversationStartScreen;
}): Promise<void>;
/**
* Recreates currently used visitor in SDK.
*/
clearVisitorSession(): Promise<void>;
/**
* Fetches all queues with its info for current site.
*/
listQueues(): Promise<any>;
/**
* Presents GliaWidgets UI with visitor code for sharing with operator to start an engagement.
*/
showVisitorCodeViewController(): Promise<void>;
/**
* Authenticates visitor.
* @param options - Provides options for authentication such as behavior, idToken, and accessToken.
*/
authenticate(options: {
behavior: AuthenticationBehavior;
idToken: string;
accessToken?: string;
}): Promise<void>;
/**
* Deauthenticates visitor. Be aware that deauthentication process relies on `AuthenticationBehavior`
*/
deauthenticate(): Promise<void>;
/**
* Provides current authentication state
*/
isAuthenticated(): Promise<void>;
/**
* Refreshes authentication access properties.
*/
refreshAuthentication(options: {
idToken: string;
accessToken?: string;
}): Promise<void>;
/**
* Makes a pause for ongoing LiveObservation session.
*/
pauseLiveObservation(): Promise<void>;
/**
* Resumes ongoing LiveObservation session.
*/
resumeLiveObservation(): Promise<void>;
}
Loading

0 comments on commit b3789b0

Please sign in to comment.