o2g-node-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +10 -0
  2. package/dist/ErrorInfo.d.ts +87 -0
  3. package/dist/host.d.ts +17 -0
  4. package/dist/o2g-analytics.d.ts +66 -0
  5. package/dist/o2g-cc-agent.d.ts +247 -0
  6. package/dist/o2g-cc-mngt.d.ts +32 -0
  7. package/dist/o2g-cc-pilot.d.ts +42 -0
  8. package/dist/o2g-comlog.d.ts +173 -0
  9. package/dist/o2g-directory.d.ts +88 -0
  10. package/dist/o2g-eventSummary.d.ts +33 -0
  11. package/dist/o2g-maint.d.ts +48 -0
  12. package/dist/o2g-messaging.d.ts +115 -0
  13. package/dist/o2g-node-sdk.d.ts +159 -0
  14. package/dist/o2g-node-sdk.js +2 -0
  15. package/dist/o2g-node-sdk.js.map +1 -0
  16. package/dist/o2g-pbx-mngt.d.ts +146 -0
  17. package/dist/o2g-phone-set-prog.d.ts +29 -0
  18. package/dist/o2g-routing.d.ts +267 -0
  19. package/dist/o2g-rsi.d.ts +160 -0
  20. package/dist/o2g-telephony.d.ts +795 -0
  21. package/dist/o2g-user-mngt.d.ts +42 -0
  22. package/dist/o2g-users.d.ts +85 -0
  23. package/dist/subscription.d.ts +258 -0
  24. package/dist/types/analytics/call-type.d.ts +24 -0
  25. package/dist/types/analytics/charging-file.d.ts +27 -0
  26. package/dist/types/analytics/charging-result.d.ts +43 -0
  27. package/dist/types/analytics/charging.d.ts +105 -0
  28. package/dist/types/analytics/incident.d.ts +46 -0
  29. package/dist/types/analytics/tel-facility.d.ts +44 -0
  30. package/dist/types/analytics/time-range.d.ts +22 -0
  31. package/dist/types/cc-agent/cc-agent-events.d.ts +54 -0
  32. package/dist/types/cc-agent/cc-agent-types.d.ts +71 -0
  33. package/dist/types/cc-agent/intrusion-mode.d.ts +24 -0
  34. package/dist/types/cc-agent/operator-dyn-state.d.ts +56 -0
  35. package/dist/types/cc-agent/operator-main-state.d.ts +21 -0
  36. package/dist/types/cc-agent/operator-type.d.ts +16 -0
  37. package/dist/types/cc-mngt/calendar/abstract-calendar.d.ts +7 -0
  38. package/dist/types/cc-mngt/calendar/calendar.d.ts +19 -0
  39. package/dist/types/cc-mngt/calendar/day-of-week.d.ts +33 -0
  40. package/dist/types/cc-mngt/calendar/exception-calendar.d.ts +26 -0
  41. package/dist/types/cc-mngt/calendar/normal-calendar.d.ts +27 -0
  42. package/dist/types/cc-mngt/calendar/transition.d.ts +49 -0
  43. package/dist/types/cc-mngt/cc-mngt-types.d.ts +0 -0
  44. package/dist/types/cc-mngt/pilot-rule-set.d.ts +27 -0
  45. package/dist/types/cc-mngt/pilot-rule.d.ts +14 -0
  46. package/dist/types/cc-mngt/pilot.d.ts +56 -0
  47. package/dist/types/cc-pilot/cc-pilot-events.d.ts +111 -0
  48. package/dist/types/comlog/com-record.d.ts +51 -0
  49. package/dist/types/comlog/comlog-events.d.ts +74 -0
  50. package/dist/types/comlog/comlog-types.d.ts +131 -0
  51. package/dist/types/comlog/option.d.ts +23 -0
  52. package/dist/types/comlog/page.d.ts +33 -0
  53. package/dist/types/comlog/query-filter.d.ts +44 -0
  54. package/dist/types/comlog/query-result.d.ts +27 -0
  55. package/dist/types/comlog/reason.d.ts +61 -0
  56. package/dist/types/comlog/role.d.ts +17 -0
  57. package/dist/types/common/common-types.d.ts +78 -0
  58. package/dist/types/directory/criteria.d.ts +90 -0
  59. package/dist/types/directory/directory-types.d.ts +44 -0
  60. package/dist/types/directory/filter-item.d.ts +21 -0
  61. package/dist/types/directory/operation-filter.d.ts +21 -0
  62. package/dist/types/events/events.d.ts +54 -0
  63. package/dist/types/eventsummary/event-summary-counter.d.ts +44 -0
  64. package/dist/types/eventsummary/event-summary-events.d.ts +15 -0
  65. package/dist/types/maint/maint-events.d.ts +51 -0
  66. package/dist/types/maint/maint-types.d.ts +162 -0
  67. package/dist/types/messaging/messaging-types.d.ts +120 -0
  68. package/dist/types/pbxmngt/attribute-filter.d.ts +30 -0
  69. package/dist/types/pbxmngt/attribute-type.d.ts +34 -0
  70. package/dist/types/pbxmngt/filter.d.ts +46 -0
  71. package/dist/types/pbxmngt/model.d.ts +63 -0
  72. package/dist/types/pbxmngt/pbx-attr-map.d.ts +91 -0
  73. package/dist/types/pbxmngt/pbx-attribute.d.ts +87 -0
  74. package/dist/types/pbxmngt/pbx-object.d.ts +45 -0
  75. package/dist/types/pbxmngt/pbxmngt-events.d.ts +59 -0
  76. package/dist/types/pbxmngt/pbxmngt-types.d.ts +14 -0
  77. package/dist/types/phoneset/device-key.d.ts +27 -0
  78. package/dist/types/phoneset/phoneset-types.d.ts +17 -0
  79. package/dist/types/phoneset/pin-control.d.ts +21 -0
  80. package/dist/types/phoneset/pin.d.ts +50 -0
  81. package/dist/types/phoneset/programmable-key.d.ts +23 -0
  82. package/dist/types/phoneset/softkey.d.ts +17 -0
  83. package/dist/types/routing/destination.d.ts +19 -0
  84. package/dist/types/routing/forward.d.ts +51 -0
  85. package/dist/types/routing/overflow.d.ts +42 -0
  86. package/dist/types/routing/routing-capability.d.ts +31 -0
  87. package/dist/types/routing/routing-events.d.ts +15 -0
  88. package/dist/types/routing/routing-state.d.ts +67 -0
  89. package/dist/types/routing/routing-types.d.ts +10 -0
  90. package/dist/types/rsi/add-digit-coll-criteria.d.ts +16 -0
  91. package/dist/types/rsi/collection-cause.d.ts +21 -0
  92. package/dist/types/rsi/routing-caller-type.d.ts +17 -0
  93. package/dist/types/rsi/routing-reason.d.ts +25 -0
  94. package/dist/types/rsi/rsi-events.d.ts +76 -0
  95. package/dist/types/rsi/rsi-types.d.ts +49 -0
  96. package/dist/types/rsi/tones.d.ts +25 -0
  97. package/dist/types/telephony/RecordingAction.d.ts +6 -0
  98. package/dist/types/telephony/acr-skill.d.ts +29 -0
  99. package/dist/types/telephony/telephony-events.d.ts +292 -0
  100. package/dist/types/telephony/telephony-types.d.ts +587 -0
  101. package/dist/types/users/users-events.d.ts +33 -0
  102. package/dist/types/users/users-types.d.ts +129 -0
  103. package/package.json +33 -0
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # o2g-sdk-node
2
+
3
+ A Node.js SDK for the O2G platform, providing tools to interact with O2G telephony and call control features.
4
+
5
+ ## Installation
6
+
7
+ Install via npm:
8
+
9
+ ```bash
10
+ npm install o2g-sdk-node
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Represents an O2G host.
3
+ * <p>
4
+ * An O2G host can be reacheable from the local network, or from a wide area
5
+ * network. In this case, enterprise access can be secured by a reverse proxy
6
+ * border element.
7
+ */
8
+ export type ErrorInfo = {
9
+ httpStatus?: string;
10
+ code?: number;
11
+ helpMessage?: string;
12
+ type?: string;
13
+ innerMessage?: string;
14
+ canRetry?: boolean;
15
+ routing?: RoutingErrorInfo;
16
+ telephony?: TelephonyErrorInfo;
17
+ userPreferences?: UserPreferencesErrorInfo;
18
+ };
19
+ export interface RoutingErrorInfo {
20
+ errorType: RoutingErrorType;
21
+ errorCause: RoutingErrorCause;
22
+ message?: string;
23
+ }
24
+ export declare enum RoutingErrorType {
25
+ Unknown = "UNKNOWN",
26
+ BadParameterValue = "BAD_PARAMETER_VALUE",
27
+ Unauthorized = "UNAUTHORIZED",
28
+ InvalidOperation = "INVALID_OPERATION",
29
+ IncompletePhoneNumber = "INCOMPLETE_PHONE_NUMBER",
30
+ UnknownPhoneNumber = "UNKNOWN_PHONE_NUMBER"
31
+ }
32
+ export declare enum RoutingErrorCause {
33
+ Unknown = "UNKNOWN",
34
+ BadPhoneNumberFormat = "BAD_PHONE_NUMBER_FORMAT",
35
+ InvalidCurrentDevice = "INVALID_CURRENT_DEVICE",
36
+ InvalidForwardRoute = "INVALID_FORWARD_ROUTE",
37
+ InvalidOverflowRoute = "INVALID_OVERFLOW_ROUTE",
38
+ NullOrEmptyParameter = "NULL_OR_EMPTY_PARAMETER",
39
+ NullParameter = "NULL_PARAMETER",
40
+ UnauthorizedCancelOverflow = "UNAUTHORIZED_CANCEL_OVERFLOW",
41
+ UnauthorizedNotAUser = "UNAUTHORIZED_NOT_A_USER",
42
+ UnauthorizedOverflow = "UNAUTHORIZED_OVERFLOW",
43
+ UnauthorizedPhoneNumber = "UNAUTHORIZED_PHONE_NUMBER"
44
+ }
45
+ export interface TelephonyErrorInfo {
46
+ errorType: TelephonyErrorType;
47
+ errorCause: TelephonyErrorCause;
48
+ message?: string;
49
+ }
50
+ export declare enum TelephonyErrorType {
51
+ Unknown = "UNKNOWN",
52
+ CallReferenceNotFound = "CALL_REFERENCE_NOT_FOUND",
53
+ MegNotFound = "LEG_NOT_FOUND",
54
+ BasParameterValue = "BAD_PARAMETER_VALUE",
55
+ IncompatibleWithState = "INCOMPATIBLE_WITH_STATE",
56
+ ServiceNotProvided = "SERVICE_NOT_PROVIDED",
57
+ ServiceUnavailable = "SERVICE_UNAVAILABLE",
58
+ Initialization = "INITIALIZATION",
59
+ Unauthorized = "UNAUTHORIZED",
60
+ CallserverError = "CALL_SERVER_ERROR",
61
+ RequestTimeout = "REQUEST_TIMEOUT"
62
+ }
63
+ export declare enum TelephonyErrorCause {
64
+ Unknown = "UNKNOWN",
65
+ InvalidCalling = "INVALID_CALLING",
66
+ InvalidDestination = "INVALID_DESTINATION",
67
+ InvalidCallId = "INVALID_CALL_ID",
68
+ InvalidConnectionState = "INVALID_CONNECTION_STATE",
69
+ DeviceOutOfService = "DEVICE_OUT_OF_SERVICE",
70
+ InvalidDevice = "INVALID_DEVICE",
71
+ InvalidDeviceState = "INVALID_DEVICE_STATE",
72
+ InvalidData = "INVALID_DATA",
73
+ ResourceBusy = "RESOURCE_BUSY"
74
+ }
75
+ export interface UserPreferencesErrorInfo {
76
+ userPreferencesError: UserPreferencesErrorType;
77
+ userPreferencesParameter: UserPreferenceParameter;
78
+ }
79
+ export declare enum UserPreferencesErrorType {
80
+ Unknown = "UNKNOWN",
81
+ WrongValue = "WRONG_VALUE",
82
+ WrongNumberFormat = "WRONG_NUMBER_FORMAT"
83
+ }
84
+ export declare enum UserPreferenceParameter {
85
+ GuiLanguage = "GUI_LANGUAGE",
86
+ Unknown = "UNKNOWN"
87
+ }
package/dist/host.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Represents an O2G host.
3
+ * <p>
4
+ * An O2G host can be reacheable from the local network, or from a wide area
5
+ * network. In this case, enterprise access can be secured by a reverse proxy
6
+ * border element.
7
+ */
8
+ type Host = {
9
+ /**
10
+ * The private address for this host.
11
+ */
12
+ privateAddress: string;
13
+ /**
14
+ * The public address for this host.
15
+ */
16
+ publicAddress: string;
17
+ };
@@ -0,0 +1,66 @@
1
+ import AnalyticsRest from "./internal/rest/analytics-rest";
2
+ import { Incident } from "./types/analytics/incident";
3
+ import { ChargingFile } from "./types/analytics/charging-file";
4
+ import { ChargingResult } from "./types/analytics/charging-result";
5
+ import { TimeRange } from "./types/analytics/time-range";
6
+ /**
7
+ * The Analytics service allows to retrieve OmniPCX entreprise charging information and incidents.
8
+ * <p>Using this service requires having a <b>ANALYTICS</b> license. This service requires an administrative login.
9
+ * <p>
10
+ * O2G uses SSH to get the information from an OmniPCX Enterprise node. So
11
+ * <b>SSH must be enabled</b> on the OmniPCX Enterprise node to use this
12
+ * service.
13
+ */
14
+ export declare class Analytics {
15
+ private _analyticsRest;
16
+ /**
17
+ *
18
+ * @internal
19
+ */
20
+ constructor(analyticsRest: AnalyticsRest);
21
+ /**
22
+ * Returns a list of incidents from the specified OmniPCX Enterprise node.
23
+ * @param nodeId the OmniPCX Enterprise node id
24
+ * @param last the number of incidents to retrieve
25
+ */
26
+ getIncidents(nodeId: number, last?: number): Promise<Array<Incident> | null>;
27
+ /**
28
+ * Get the list of charging file from the specified node, using the time range filter.
29
+ * @param nodeId the OmniPCX Enterprise node id
30
+ * @param filter time range filter
31
+ * @see {@link getChargingsFromFiles}
32
+ */
33
+ getChargingFiles(nodeId: number, filter?: TimeRange | null): Promise<Array<ChargingFile> | null>;
34
+ /**
35
+ * Query the charging information for the specified node, using the specified options.
36
+ * <p>
37
+ * If 'all' is set to 'true', all the tickets are returned, including the zero cost ticket, and with the called party; If 'all' is
38
+ * set to 'false', the total of charging info is returned for each user, the call number giving the number of calls with non null charging cost.
39
+ * <p>
40
+ * The request processes charging files on the OmniPCX Enterprise. The processing is limited to a maximum of 100 files for performance reason. If
41
+ * the range filter is too large and the number of file to process is greater than 100, the method fails and returns 'null'. In this case, a smaller
42
+ * range must be specified.
43
+ *
44
+ * @param nodeId the OmniPCX Enterprise node id
45
+ * @param filter a time range filter
46
+ * @param topResults allows to return only the 'top N' tickets
47
+ * @param all 'true' to include tickets with a 0 cost
48
+ */
49
+ getChargingsFromFilter(nodeId: number, filter?: TimeRange | null, topResults?: number | null, all?: boolean): Promise<ChargingResult | null>;
50
+ /**
51
+ * Query the charging information for the specified node, using the specified charging files. The charging files can be retrieved with {@link getChargingFiles}.
52
+ * <p>
53
+ * If 'all' is set to 'true', all the tickets are returned, including the zero cost ticket, and with the called party; If 'all' is
54
+ * set to 'false', the total of charging info is returned for each user, the call number giving the number of calls with non null charging cost.
55
+ * <p>
56
+ * The request processes charging files on the OmniPCX Enterprise. The processing is limited to a maximum of 100 files for performance reason. If
57
+ * the range filter is too large and the number of file to process is greater than 100, the method fails and returns 'null'. In this case, a smaller
58
+ * range must be specified.
59
+ *
60
+ * @param nodeId the OmniPCX Enterprise node id
61
+ * @param files the list of file to process
62
+ * @param topResults allows to return only the 'top N' tickets
63
+ * @param all 'true' to include tickets with a 0 cost
64
+ */
65
+ getChargingsFromFiles(nodeId: number, files: Array<ChargingFile>, topResults?: number | null, all?: boolean): Promise<ChargingResult | null>;
66
+ }
@@ -0,0 +1,247 @@
1
+ import { IntrusionMode } from "./types/cc-agent/intrusion-mode";
2
+ import CallCenterAgentRest from "./internal/rest/ccAgent-rest";
3
+ import { OperatorConfig, OperatorState } from "./types/cc-agent/cc-agent-types";
4
+ import { WithdrawReason } from "./types/cc-agent/cc-agent-types";
5
+ import EventEmitter from "events";
6
+ import { EventRegistry } from "./internal/events/event-dispatcher";
7
+ /**
8
+ * CallCenterAgent provides services for CCD operators. Using this
9
+ * service requires having a <b>CONTACTCENTER_AGENT</b> license.
10
+ */
11
+ export declare class CallCenterAgent extends EventEmitter {
12
+ private readonly _ccAgentRest;
13
+ /**
14
+ * Occurs when an agent state has changed.
15
+ * @event
16
+ */
17
+ static readonly ON_AGENT_STATE_CHANGED = "OnAgentStateChanged";
18
+ /**
19
+ * Occurs when when CCD agent skills is modified: one or several skills has been activate or deactivate.
20
+ * @event
21
+ */
22
+ static readonly ON_AGENT_SKILL_CHANGED = "OnAgentSkillChanged";
23
+ /**
24
+ * Occurs when an agent request help from his supervisor.
25
+ * @see {@link requestPermanentListening}, {@link requestSupervisorHelp}
26
+ * @event
27
+ */
28
+ static readonly ON_SUPERVISOR_HELP_REQUESTED = "OnSupervisorHelpRequested";
29
+ /**
30
+ * Occurs when an agent has requested the assistance of his supervisor and when the request is canceled by the agent
31
+ * or when the request is rejected by the supervisor.
32
+ * @see {@link cancelSupervisorHelpRequest}, {@link rejectAgentHelpRequest}
33
+ * @event
34
+ */
35
+ static readonly ON_SUPERVISOR_HELP_CANCELLED = "OnSupervisorHelpCancelled";
36
+ /**
37
+ *
38
+ * @internal
39
+ */
40
+ constructor(_ccAgentRest: CallCenterAgentRest, eventRegistry: EventRegistry);
41
+ /**
42
+ * Gets the operator configuration.
43
+ * @param loginName the operator login name
44
+ * @returns
45
+ */
46
+ getConfiguration(loginName?: string | null): Promise<OperatorConfig | null>;
47
+ /**
48
+ * Gets the specified agent or supervisor state.
49
+ * <p>
50
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
51
+ * @param loginName the operator login name
52
+ */
53
+ getState(loginName?: string | null): Promise<OperatorState | null>;
54
+ /**
55
+ * Logon an agent or a supervisor.
56
+ * <p>
57
+ * For a Supervisor, if the 'pgNumber' is omitted, the supervisor is logged on out off group.
58
+ * <p>
59
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
60
+ *
61
+ * @param proAcdNumber the pro-acd device number
62
+ * @param pgNumber the agent processing group number
63
+ * @param headset activate the headset mode
64
+ * @param loginName the ccd operator login name.
65
+ */
66
+ logon(proAcdNumber: string, pgNumber?: string | null, headset?: boolean, loginName?: string | null): Promise<boolean>;
67
+ /**
68
+ * Logoff an agent or a supervisor.
69
+ * <p>This method does nothing an returns 'true" if the agent or the supervisor is already logged off.
70
+ *
71
+ * <p>
72
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
73
+ * @param loginName the ccd operator login name.
74
+ */
75
+ logoff(loginName?: string | null): Promise<boolean>;
76
+ /**
77
+ * Enters in a agent group. Only for a supervisor.
78
+ * <p>
79
+ * This method is used by a supervisor to enter an agent group when it is in
80
+ * pre-assigned state (logged but not in an agent group).
81
+ * <p>
82
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
83
+ * @param pgNumber the agent processing group number
84
+ * @param loginName the supervisor login name
85
+ */
86
+ enter(pgNumber: string, loginName?: string | null): Promise<boolean>;
87
+ /**
88
+ * Exits from an agent group. Only for a supervisor.
89
+ * <p>
90
+ * This method is used by a supervisor to leave an agent group an go back in
91
+ * pre-assigned state (logged but not in an agent group).
92
+ * <p>
93
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
94
+ * @param loginName the supervisor login name
95
+ */
96
+ exit(loginName?: string | null): Promise<boolean>;
97
+ /**
98
+ * Puts the specified agent in wrapup.
99
+ * <p>
100
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
101
+ * @param loginName the agent login name
102
+ */
103
+ setWrapup(loginName?: string | null): Promise<boolean>;
104
+ /**
105
+ * Puts the specified agent in ready state.
106
+ * <p>
107
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
108
+ * @param loginName the agent login name
109
+ */
110
+ setReady(loginName?: string | null): Promise<boolean>;
111
+ /**
112
+ * Puts the specified agent in pause.
113
+ * <p>
114
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
115
+ * @param loginName the agent login name
116
+ */
117
+ setPause(loginName?: string | null): Promise<boolean>;
118
+ /**
119
+ * Requests to listen to the agent by a supervisor.
120
+ * <p>
121
+ * On success, an {@link ON_SUPERVISOR_HELP_REQUESTED} event is raised. for both the agent and the supervisor.
122
+ * <p>
123
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
124
+ * @param agentNumber the listened agent number
125
+ * @param loginName the supervisor login name
126
+ */
127
+ requestPermanentListening(agentNumber: string, loginName?: string | null): Promise<boolean>;
128
+ /**
129
+ * Cancel a permanent listening by a supervisor.
130
+ * <p>
131
+ * On success, an {@link ON_SUPERVISOR_HELP_REQUESTED} event is raised. for both the agent and the supervisor.
132
+ * <p>
133
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
134
+ * @param loginName the supervisor login name
135
+ */
136
+ cancelPermanentListening(loginName?: string | null): Promise<boolean>;
137
+ /**
138
+ * Requests intrusion in a ccd call.
139
+ * <p>
140
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
141
+ *
142
+ * @param agentNumber the extension number of the ccd agent who answers the
143
+ * ccd call
144
+ * @param intrusionMode the intrusion mode
145
+ * @param loginName the supervisor login name
146
+ */
147
+ requestIntrusion(agentNumber: string, intrusionMode?: IntrusionMode, loginName?: string | null): Promise<boolean>;
148
+ /**
149
+ * Changes the intrusion mode.
150
+ * <p>
151
+ * Calling this method allows to change the intrusion mode, or to cancel an intrusion. To cancel an intrusion, the application must pass the current mode
152
+ * in the 'newIntrusionMode' parameter.
153
+ * <p>
154
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
155
+ *
156
+ * @param newIntrusionMode the new intrusion mode
157
+ * @param loginName the supervisor login name
158
+ */
159
+ changeIntrusionMode(newIntrusionMode: IntrusionMode, loginName?: string | null): Promise<boolean>;
160
+ /**
161
+ * Requests help of the supervisor.
162
+ * <p>
163
+ * On success, an {@link ON_SUPERVISOR_HELP_REQUESTED} event is raised for both the agent and supervisor.
164
+ * <p>
165
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
166
+ *
167
+ * @param loginName the agent login name
168
+ */
169
+ requestSupervisorHelp(loginName?: string | null): Promise<boolean>;
170
+ /**
171
+ * Rejects an help request from an agent.
172
+ * <p>
173
+ * This method is invoked by a supervisor when he reject an help request from an agent. On success, an {@link ON_SUPERVISOR_HELP_CANCELLED} event is raised.
174
+ * <p>
175
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
176
+ *
177
+ * @param agentNumber the extension number of the agent who has requested help
178
+ * @param loginName the supervisor login name
179
+ */
180
+ rejectAgentHelpRequest(agentNumber: string, loginName?: string | null): Promise<boolean>;
181
+ /**
182
+ * Cancels a supervisor help request.
183
+ * <p>
184
+ * This method is invoked by an agent when he want to cancel an help request. On success, an {@link ON_SUPERVISOR_HELP_CANCELLED} event is raised.
185
+ * <p>
186
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
187
+ *
188
+ * @param supervisorNumber the requested supervisor extension number
189
+ * @param loginName the agent login name
190
+ */
191
+ cancelSupervisorHelpRequest(supervisorNumber: string, loginName?: string | null): Promise<boolean>;
192
+ /**
193
+ * Asks a snapshot event to receive an {@link ON_AGENT_STATE_CHANGED} event.
194
+ * <p>
195
+ * The {@link ON_AGENT_STATE_CHANGED} event contain the operator {@link OperatorState} object. If a second
196
+ * request is asked since the previous one is still in progress, it has no effect.
197
+ * <p>
198
+ * If an administrator invokes this method with loginName=null, the snapshot event request is done for all the agents. The event processing can
199
+ * be long depending on the number of users.
200
+ *
201
+ * @param loginName the agent login name
202
+ */
203
+ requestSnapshot(loginName?: string | null): Promise<boolean>;
204
+ /**
205
+ * Activates the specified skills.
206
+ * <p>
207
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
208
+ * <p>
209
+ * This method doesn't control the skills number. If a skill number is invalid
210
+ * (not assigned to the operator), it is ignored and the method returns 'true'.
211
+ *
212
+ * @param skills the list of skills to activate.
213
+ * @param loginName the agent login name
214
+ */
215
+ activateSkills(skillNumbers: number[], loginName?: string | null): Promise<boolean>;
216
+ /**
217
+ * Deactivates the specified skills.
218
+ * <p>
219
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
220
+ * <p>
221
+ * This method doesn't control the skills number. If a skill number is invalid
222
+ * (not assigned to the operator), it is ignored and the method returns 'true'.
223
+ *
224
+ * @param skills the list of skills to activate.
225
+ * @param loginName the agent login name
226
+ */
227
+ deactivateSkills(skillNumbers: number[], loginName?: string | null): Promise<boolean>;
228
+ /**
229
+ * Returns the list of withdraw reason for the specified processing group.
230
+ * <p>
231
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
232
+ *
233
+ * @param pgNumber the agent processing group number
234
+ * @param loginName the agent login name
235
+ */
236
+ getWithdrawReasons(pgNumber: string, loginName?: string | null): Promise<WithdrawReason[] | null>;
237
+ /**
238
+ * Withdraws an agent with the specified reason.
239
+ * <p>
240
+ * If the session has been opened for a user, the 'loginName' parameter is ignored, but it is mandatory if the session has been opened by an administrator.
241
+ * @see {@link getWithdrawReasons}
242
+ *
243
+ * @param reason the withdraw reason
244
+ * @param loginName the agent login name
245
+ */
246
+ setWithdraw(reason: WithdrawReason, loginName?: string | null): Promise<boolean>;
247
+ }
@@ -0,0 +1,32 @@
1
+ import CallCenterManagementRest from "./internal/rest/ccMngt-rest";
2
+ import { Calendar } from "./types/cc-mngt/calendar/calendar";
3
+ import { DayOfWeek } from "./types/cc-mngt/calendar/day-of-week";
4
+ import { ExceptionCalendar } from "./types/cc-mngt/calendar/exception-calendar";
5
+ import { NormalCalendar } from "./types/cc-mngt/calendar/normal-calendar";
6
+ import { Transition } from "./types/cc-mngt/calendar/transition";
7
+ import { Pilot } from "./types/cc-mngt/pilot";
8
+ /**
9
+ * This service allows an administrator session to manage CCD pilot objects.
10
+ * service requires having a <b>CONTACTCENTER_SRV</b> license.
11
+ */
12
+ export declare class CallCenterManagement {
13
+ private readonly _ccManagementRest;
14
+ /**
15
+ *
16
+ * @internal
17
+ */
18
+ constructor(ccManagementRest: CallCenterManagementRest);
19
+ getPilots(nodeId: number): Promise<Pilot[] | null>;
20
+ getPilot(nodeId: number, pilotNumber: string): Promise<Pilot | null>;
21
+ getCalendar(nodeId: number, pilotNumber: string): Promise<Calendar | null>;
22
+ getExceptionCalendar(nodeId: number, pilotNumber: string): Promise<ExceptionCalendar | null>;
23
+ addExceptionTransition(nodeId: number, pilotNumber: string, dateTransition: Date, transition: Transition): Promise<boolean>;
24
+ deleteExceptionTransition(nodeId: number, pilotNumber: string, dateTransition: Date, index: number): Promise<boolean>;
25
+ setExceptionTransition(nodeId: number, pilotNumber: string, dateTransition: Date, index: number, transition: Transition): Promise<boolean>;
26
+ getNormalCalendar(nodeId: number, pilotNumber: string): Promise<NormalCalendar | null>;
27
+ addNormalTransition(nodeId: number, pilotNumber: string, day: DayOfWeek, transition: Transition): Promise<boolean>;
28
+ deleteNormalTransition(nodeId: number, pilotNumber: string, day: DayOfWeek, index: number): Promise<boolean>;
29
+ setNormalTransition(nodeId: number, pilotNumber: string, day: DayOfWeek, index: number, transition: Transition): Promise<boolean>;
30
+ openPilot(nodeId: number, pilotNumber: string): Promise<boolean>;
31
+ closePilot(nodeId: number, pilotNumber: string): Promise<boolean>;
32
+ }
@@ -0,0 +1,42 @@
1
+ import EventEmitter from "events";
2
+ import CallCenterPilotRest from "./internal/rest/ccPilot-rest";
3
+ import { EventRegistry } from "./internal/events/event-dispatcher";
4
+ /**
5
+ * CallCenterPilot allows an administrator to monitor the CCD pilots. Using this
6
+ * service requires having a <b>CONTACTCENTER_SRV</b> license.
7
+ */
8
+ export declare class CallCenterPilot extends EventEmitter {
9
+ private readonly _ccPilotRest;
10
+ /**
11
+ * Occurs when a new call arrives on a pilot.
12
+ * @event
13
+ */
14
+ static readonly ON_PILOT_CALL_CREATED = "OnPilotCallCreated";
15
+ /**
16
+ * Occurs when the call has been queued.
17
+ * @event
18
+ */
19
+ static readonly ON_PILOT_CALL_QUEUED = "OnPilotCallQueued";
20
+ /**
21
+ * Occurs when a the call has been removed from the pilot: cause distribution, cancel or overflow.
22
+ * @event
23
+ */
24
+ static readonly ON_PILOT_CALL_REMOVED = "OnPilotCallRemoved";
25
+ /**
26
+ *
27
+ * @internal
28
+ */
29
+ constructor(_ccPilotRest: CallCenterPilotRest, eventRegistry: EventRegistry);
30
+ /**
31
+ * Start the monitoring of a pilot.
32
+ * If the pilot is already monitored, no error is returned.
33
+ * @param pilotNumber the pilot number
34
+ */
35
+ monitorStart(pilotNumber: string): Promise<boolean>;
36
+ /**
37
+ * Stop the monitoring of a pilot.
38
+ * If the pilot is already monitored, no error is returned.
39
+ * @param pilotNumber the pilot number
40
+ */
41
+ monitorStop(pilotNumber: string): Promise<boolean>;
42
+ }