(Created target blank page For Version: HTCC:9.0.0DRAFT) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <!-- | + | = System Namespace= |
+ | {{NoteFormat|The content on this page is no longer updated. To find the latest content, go to [https://all.docs.genesys.com/PEC-Developer/Current/SCAPI/SystemNamespace System namespace].}} | ||
+ | __TOC__-- | ||
+ | ==Methods== | ||
+ | The System namespace includes the following methods: | ||
+ | * [[SystemNamespace#getAllowedServices|getAllowedServices]] | ||
+ | * [[SystemNamespace#triggerActivity|triggerActivity]] | ||
+ | * [[SystemNamespace#closeToast|closeToast]] | ||
+ | * [[SystemNamespace#popupToast|popupToast]] | ||
+ | * [[SystemNamespace#updateToast|updateToast]] | ||
+ | * [[SystemNamespace#isFrameLeading|isFrameLeading]] | ||
+ | * [[SystemNamespace#isFrameFollowing|isFrameFollowing]] | ||
+ | * [[SystemNamespace#isFrameNegotiating|isFrameNegotiating]] | ||
+ | * [[SystemNamespace#isFrameLeadingOrNegotiating|isFrameLeadingOrNegotiating]] | ||
+ | * [[SystemNamespace#isLastActiveFrame|isLastActiveFrame]] | ||
+ | |||
+ | ===getAllowedServices=== | ||
+ | {| | ||
+ | ! Signature | ||
+ | | <static> getAllowedServices() → {Array.<string>} | ||
+ | |- | ||
+ | ! Description | ||
+ | | Gets the list of allowed services, as determined by the [[ServiceClientAPI#Security_Configuration|Security Configuration]]. If the domain of the web application that calls this method isn't listed in the [[Documentation:HTCC:IWWDep:ServiceClientAPI#service-client-api.accepted-web-content-origins|service-client-api.accepted-web-content-origins]] option, then this method fails. | ||
+ | |- | ||
+ | ! Returns | ||
+ | | Array.<string> | ||
+ | |} | ||
+ | |||
+ | ===triggerActivity=== | ||
+ | {| | ||
+ | ! Signature | ||
+ | | <static> triggerActivity() | ||
+ | |- | ||
+ | ! Description | ||
+ | | Triggers a fake activity to prevent the [[Documentation:HTCC:IWWDep:Security#security.inactivity-timeout|inactivity timer]] from closing the agent session. | ||
+ | |} | ||
+ | |||
+ | ===popupToast=== | ||
+ | |||
+ | {| | ||
+ | ! Signature | ||
+ | | <static> popupToast(parameters) → {string} | ||
+ | |- | ||
+ | ! Description | ||
+ | | Pops up a new custom toast. | ||
+ | |- | ||
+ | ! Parameters | ||
+ | | | ||
+ | {| | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | title | ||
+ | | string | ||
+ | | The title | ||
+ | |- | ||
+ | | iconUrl | ||
+ | | string | ||
+ | | The URL of the icon you want to display in the title bar of the custom toast popup. | ||
+ | |- | ||
+ | | subject | ||
+ | | string | ||
+ | | Optional. The subject | ||
+ | |- | ||
+ | | message | ||
+ | | string | ||
+ | | Optional. The message | ||
+ | |- | ||
+ | | keyValues | ||
+ | | string | ||
+ | | Optional. JSON object used to fill the key value pair list. For example: <tt>{"key1" ; "value one","key2" ; "value two","key3" ; "value three"}</tt>. | ||
+ | |- | ||
+ | | buttons | ||
+ | | Array.<string> | ||
+ | | Optional. Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1]. | ||
+ | |- | ||
+ | | buttonShowDismiss | ||
+ | | boolean | ||
+ | | Optional. If set to <tt>true</tt>, displays the '''Show''' and '''Dismiss''' buttons and pops up the current iframe if the '''Show''' button is pushed. If set to <tt>false</tt> , displays '"OK"' or custom buttons based on the parameter's buttons. | ||
+ | |- | ||
+ | | autoCloseTimeout | ||
+ | | object | ||
+ | | Optional. If set to greater than <tt>0</tt>, the popup is automatically closed after the specified milliseconds. | ||
+ | |- | ||
+ | | sendToMyMessage | ||
+ | | object | ||
+ | | Optional. If set to <tt>true</tt>, sends the '''subject''', '''iconUrl''', '''title''', '''keyValues''', and '''message''' parameters to the '''MyMessage''' panel. | ||
+ | |} | ||
+ | |- | ||
+ | ! Returns | ||
+ | | A unique identifier | ||
+ | |} | ||
+ | |||
+ | ===updateToast=== | ||
+ | |||
+ | {| | ||
+ | ! Signature | ||
+ | | <static> updateToast(id, parameters) → {boolean} | ||
+ | |- | ||
+ | ! Description | ||
+ | | Updates the specified toast. | ||
+ | |- | ||
+ | ! Parameters | ||
+ | | | ||
+ | {| | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | id | ||
+ | | string | ||
+ | | The identifier of the toast to update. The identifier is returned by the [[SystemNamespace#popupToast|popupToast]] method. | ||
+ | |- | ||
+ | | parameters | ||
+ | | object | ||
+ | | | ||
+ | {| border="1" | ||
+ | |- | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | title | ||
+ | | string | ||
+ | | The title | ||
+ | |- | ||
+ | | iconURL | ||
+ | | string | ||
+ | | The URL of the icon you want to display in the title bar of the custom toast popup. | ||
+ | |- | ||
+ | | subject | ||
+ | | string | ||
+ | | Optional. The subject. | ||
+ | |- | ||
+ | | message | ||
+ | | string | ||
+ | | Optional. The message. | ||
+ | |- | ||
+ | | keyValues | ||
+ | | object | ||
+ | | Optional. JSON object used to fill the key value pair list. For example: <tt>{"key1" : "value one","key2" : "value two","key3" : "value three"}</tt>. | ||
+ | |- | ||
+ | | buttons | ||
+ | | Array.<string> | ||
+ | | Each character string in this array becomes a button. All buttons are displayed as buttons, not hyperlinks, in the following order: [Button 2] [Button 3] ... [Button N] [Button 1]. | ||
+ | |- | ||
+ | | buttonShowDismiss | ||
+ | | boolean | ||
+ | | If set to <tt>true</tt>, displays '''Show''' and '''Dismiss''' buttons and pops up the current iframe if the '''Show''' button is pushed. If set to <tt>false</tt>, displays '"OK"' or custom buttons based on the parameter's buttons. | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | | <tt>true</tt> if the toast has been updated; <tt>false</tt> if the toast identifier has not been found. | ||
+ | |} | ||
+ | |||
+ | ===closeToast=== | ||
+ | |||
+ | {| | ||
+ | ! Signature | ||
+ | | <static> closeToast(id) → {boolean} | ||
+ | |- | ||
+ | ! Description | ||
+ | | Closes the specified toast. | ||
+ | |- | ||
+ | ! Parameters | ||
+ | | | ||
+ | {| | ||
+ | ! Name | ||
+ | ! Type | ||
+ | ! Description | ||
+ | |- | ||
+ | | id | ||
+ | | string | ||
+ | | The identifier of the toast to close. The identifier is returned by the [[SystemNamespace#popupToast|popupToast]] method. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | | <tt>true</tt> if the toast has been updated; <tt>false</tt> if the toast identifier has not been found. | ||
+ | |} | ||
+ | |||
+ | ===isFrameLeading=== | ||
+ | |||
+ | {| | ||
+ | !Signature | ||
+ | |<static> isFrameLeading(succeeded, failed) → {boolean} | ||
+ | |- | ||
+ | !Description | ||
+ | |Find out if the browser tab is leading. | ||
+ | |- | ||
+ | !Parameters | ||
+ | | | ||
+ | {| | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | |- | ||
+ | |succeeded | ||
+ | |string | ||
+ | |The callback function to use if the operation succeeded. | ||
+ | |- | ||
+ | |failed | ||
+ | |string | ||
+ | |The callback function to use if the operation failed. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | |<tt>true</tt> if the browser tab is the leader. | ||
+ | |} | ||
+ | |||
+ | ===isFrameFollowing=== | ||
+ | |||
+ | {| | ||
+ | !Signature | ||
+ | |<static> isFrameFollowing(succeeded, failed) → {boolean} | ||
+ | |- | ||
+ | !Description | ||
+ | |Find out if the browser tab is following. | ||
+ | |- | ||
+ | !Parameters | ||
+ | | | ||
+ | {| | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | |- | ||
+ | |succeeded | ||
+ | |string | ||
+ | |The callback function to use if the operation succeeded. | ||
+ | |- | ||
+ | |failed | ||
+ | |string | ||
+ | |The callback function to use if the operation failed. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | |<tt>true</tt> if this browser tab is following. | ||
+ | |} | ||
+ | |||
+ | ===isFrameNegotiating=== | ||
+ | |||
+ | {| | ||
+ | !Signature | ||
+ | |<static> isFrameNegotiating(succeeded, failed) → {boolean} | ||
+ | |- | ||
+ | !Description | ||
+ | |Find out if there is an election in progress and the browser tab state is not yet set to leading or following (the tab is "negotiating.") | ||
+ | |- | ||
+ | !Parameters | ||
+ | | | ||
+ | {| | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | |- | ||
+ | |succeeded | ||
+ | |string | ||
+ | |The callback function to use if the operation succeeded. | ||
+ | |- | ||
+ | |failed | ||
+ | |string | ||
+ | |The callback function to use if the operation failed. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | |<tt>true</tt> if the tab is negotiating. | ||
+ | |} | ||
+ | |||
+ | ===isFrameLeadingOrNegotiating=== | ||
+ | |||
+ | {| | ||
+ | !Signature | ||
+ | |<static> isFrameLeadingOrNegotiating(succeeded, failed) → {boolean} | ||
+ | |- | ||
+ | !Description | ||
+ | |Find out if the browser tab is leading or there is an election in progress and the tab state is not yet set to leading or following (the tab is "negotiating."). | ||
+ | |- | ||
+ | !Parameters | ||
+ | | | ||
+ | {| | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | |- | ||
+ | |succeeded | ||
+ | |string | ||
+ | |The callback function to use if the operation succeeded. | ||
+ | |- | ||
+ | |failed | ||
+ | |string | ||
+ | |The callback function to use if the operation failed. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | |<tt>true</tt> if the browser tab is leading or negotiating. | ||
+ | |} | ||
+ | |||
+ | ===isLastActiveFrame=== | ||
+ | |||
+ | {| | ||
+ | !Signature | ||
+ | |<static> isLastActiveFrame(succeeded, failed) → {boolean} | ||
+ | |- | ||
+ | !Description | ||
+ | |Find out if this is the last active browser tab. | ||
+ | |- | ||
+ | !Parameters | ||
+ | | | ||
+ | {| | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | |- | ||
+ | |succeeded | ||
+ | |string | ||
+ | |The callback function to use if the operation succeeded. | ||
+ | |- | ||
+ | |failed | ||
+ | |string | ||
+ | |The callback function to use if the operation failed. | ||
+ | |} | ||
+ | |- | ||
+ | !Returns | ||
+ | |<tt>true</tt> if this is the last active browser tab. | ||
+ | |} | ||
+ | |||
+ | [[Category:V:HTCC:9.0.0DRAFT]] |
Latest revision as of 17:02, February 1, 2022
System Namespace
Important
The content on this page is no longer updated. To find the latest content, go to System namespace.Contents
--
Methods
The System namespace includes the following methods:
- getAllowedServices
- triggerActivity
- closeToast
- popupToast
- updateToast
- isFrameLeading
- isFrameFollowing
- isFrameNegotiating
- isFrameLeadingOrNegotiating
- isLastActiveFrame
getAllowedServices
Signature | <static> getAllowedServices() → {Array.<string>} |
---|---|
Description | Gets the list of allowed services, as determined by the Security Configuration. If the domain of the web application that calls this method isn't listed in the service-client-api.accepted-web-content-origins option, then this method fails. |
Returns | Array.<string> |
triggerActivity
Signature | <static> triggerActivity() |
---|---|
Description | Triggers a fake activity to prevent the inactivity timer from closing the agent session. |
popupToast
Signature | <static> popupToast(parameters) → {string} | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Pops up a new custom toast. | ||||||||||||||||||||||||||||||
Parameters |
| ||||||||||||||||||||||||||||||
Returns | A unique identifier |
updateToast
Signature | <static> updateToast(id, parameters) → {boolean} | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Updates the specified toast. | |||||||||||||||||||||||||||||||||
Parameters |
| |||||||||||||||||||||||||||||||||
Returns | true if the toast has been updated; false if the toast identifier has not been found. |
closeToast
Signature | <static> closeToast(id) → {boolean} | ||||||
---|---|---|---|---|---|---|---|
Description | Closes the specified toast. | ||||||
Parameters |
| ||||||
Returns | true if the toast has been updated; false if the toast identifier has not been found. |
isFrameLeading
Signature | <static> isFrameLeading(succeeded, failed) → {boolean} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Find out if the browser tab is leading. | |||||||||
Parameters |
| |||||||||
Returns | true if the browser tab is the leader. |
isFrameFollowing
Signature | <static> isFrameFollowing(succeeded, failed) → {boolean} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Find out if the browser tab is following. | |||||||||
Parameters |
| |||||||||
Returns | true if this browser tab is following. |
isFrameNegotiating
Signature | <static> isFrameNegotiating(succeeded, failed) → {boolean} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Find out if there is an election in progress and the browser tab state is not yet set to leading or following (the tab is "negotiating.") | |||||||||
Parameters |
| |||||||||
Returns | true if the tab is negotiating. |
isFrameLeadingOrNegotiating
Signature | <static> isFrameLeadingOrNegotiating(succeeded, failed) → {boolean} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Find out if the browser tab is leading or there is an election in progress and the tab state is not yet set to leading or following (the tab is "negotiating."). | |||||||||
Parameters |
| |||||||||
Returns | true if the browser tab is leading or negotiating. |
isLastActiveFrame
Signature | <static> isLastActiveFrame(succeeded, failed) → {boolean} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Find out if this is the last active browser tab. | |||||||||
Parameters |
| |||||||||
Returns | true if this is the last active browser tab. |
This page was last edited on February 1, 2022, at 17:02.
Comments or questions about this documentation? Contact us for support!