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
@@ -0,0 +1,173 @@
1
+ import EventEmitter from "events";
2
+ import CommunicationLogRest from "./internal/rest/comlog-rest";
3
+ import { ComRecord } from "./types/comlog/com-record";
4
+ import { Page } from "./types/comlog/page";
5
+ import { QueryFilter } from "./types/comlog/query-filter";
6
+ import { QueryResult } from "./types/comlog/query-result";
7
+ import { EventRegistry } from "./internal/events/event-dispatcher";
8
+ /**
9
+ * The CommunicationLog service allows a user to retrieve his last communication history records and to manage them. Using this service requires
10
+ * having a <b>TELEPHONY_ADVANCED</b> license.
11
+ */
12
+ export declare class CommunicationLog extends EventEmitter {
13
+ private readonly _comLogRest;
14
+ /**
15
+ * Occurs when a new comlog entry has been created.
16
+ * @event
17
+ */
18
+ static readonly ON_COM_RECORD_CREATED = "OnComRecordCreated";
19
+ /**
20
+ * Occurs when one or more records have been modified.
21
+ * @event
22
+ */
23
+ static readonly ON_COM_RECORD_MODIFIED = "OnComRecordModified";
24
+ /**
25
+ * Occurs when one or more call log records have been deleted.
26
+ * @see {@link deleteComRecords}, {@link deleteComRecord}, {@link deleteComRecordsById}.
27
+ * @event
28
+ */
29
+ static readonly ON_COM_RECORDS_DELETED = "OnComRecordsDeleted";
30
+ /**
31
+ * Occurs when one or more unanswered comlog records have been acknowledged.
32
+ * @see {@link acknowledgeComRecords}, {@link acknowledgeComRecord}
33
+ * @event
34
+ */
35
+ static readonly ON_COM_RECORDS_ACK = "OnComRecordsAck";
36
+ /**
37
+ * Occurs when one or more unanswered comlog records have been unacknowledged.
38
+ * @see {@link unacknowledgeComRecords}, {@link unacknowledgeComRecord}
39
+ * @event
40
+ */
41
+ static readonly ON_COM_RECORDS_UNACK = "OnComRecordsUnAck";
42
+ /**
43
+ *
44
+ * @internal
45
+ */
46
+ constructor(_comLogRest: CommunicationLogRest, eventRegistry: EventRegistry);
47
+ /**
48
+ * Gets the com records corresponding to the specified filter, using the
49
+ * specified page, with a possible optimization.
50
+ * <p>
51
+ * If 'optimized' is used and set to 'true' the query returns the
52
+ * full identity of a participant only the first time it occurs, when the same
53
+ * participant appears in several records. When omitted this query returns the
54
+ * records with no optimization.
55
+ * <p>
56
+ * 'page' parameter allows to query the communication log by page. The
57
+ * {@link QueryResult} result contains the same parameters and the total number
58
+ * of records retrieved by the query.
59
+ * <p>
60
+ * If the session has been opened for a user, the 'loginName' parameter is
61
+ * ignored, but it is mandatory if the session has been opened by an
62
+ * administrator.
63
+ *
64
+ * @param filter the filter describing the query criterias
65
+ * @param page the page description
66
+ * @param optimized 'true' to activate optimization.
67
+ * @param loginName the user login name
68
+ */
69
+ getComRecords(filter?: QueryFilter | null, page?: Page | null, optimized?: boolean, loginName?: string | null): Promise<QueryResult | null>;
70
+ /**
71
+ * Gets the specified com record.
72
+ * <p>
73
+ * If the session has been opened for a user, the 'loginName' parameter is
74
+ * ignored, but it is mandatory if the session has been opened by an
75
+ * administrator.
76
+ *
77
+ * @param recordId the com record identifier
78
+ * @param loginName the user login name
79
+ */
80
+ getComRecord(recordId: string, loginName?: string | null): Promise<ComRecord | null>;
81
+ /**
82
+ * Deletes the specified com record.
83
+ * <p>
84
+ * If the session has been opened for a user, the 'loginName' parameter is
85
+ * ignored, but it is mandatory if the session has been opened by an
86
+ * administrator.
87
+ *
88
+ * @param recordId the com record identifier
89
+ * @param loginName the user login name
90
+ */
91
+ deleteComRecord(recordId: string, loginName?: string | null): Promise<boolean>;
92
+ /**
93
+ * Deletes the specified list of com records.
94
+ * <p>
95
+ * An {@link ON_COM_RECORDS_DELETED} event is raised containing the list of the com records that have been deleted.
96
+ * <p>
97
+ * If the session has been opened for a user, the 'loginName' parameter is
98
+ * ignored, but it is mandatory if the session has been opened by an
99
+ * administrator.
100
+ *
101
+ * @param recordIds the list of com records
102
+ * @param loginName the user login name
103
+ */
104
+ deleteComRecordsById(recordIds: string[], loginName?: string | null): Promise<boolean>;
105
+ /**
106
+ * Deletes the com records corresponding to the given filter.
107
+ * <p>
108
+ * When used, the 'filter' parameter defines the search criteria for the delete operation.
109
+ * <p>
110
+ * An {@link ON_COM_RECORDS_DELETED} event is raised
111
+ * containing the list of the com records that have been deleted.
112
+ * <p>
113
+ * If the session has been opened for a user, the 'loginName' parameter is
114
+ * ignored, but it is mandatory if the session has been opened by an
115
+ * administrator.
116
+ *
117
+ * @param filter the filter describing the query criterias
118
+ * @param loginName the user login name
119
+ */
120
+ deleteComRecords(filter?: QueryFilter | null, loginName?: string | null): Promise<boolean>;
121
+ /**
122
+ * Acknowledge the specified list of com records.
123
+ * <p>
124
+ * An {@link ON_COM_RECORDS_ACK} event is raised containing the list of the com records that have been acknowledged.
125
+ * <p>
126
+ * If the session has been opened for a user, the 'loginName" parameter is
127
+ * ignored, but it is mandatory if the session has been opened by an
128
+ * administrator.
129
+ *
130
+ * @param recordIds the list of com records
131
+ * @param loginName the user login name
132
+ */
133
+ acknowledgeComRecords(recordIds: string[], loginName?: string | null): Promise<boolean>;
134
+ /**
135
+ * Acknowledge the specified com record.
136
+ * <p>
137
+ * An {@link ON_COM_RECORDS_ACK} event is raised containing the list of the com records that have been acknowledged.
138
+ * <p>
139
+ * If the session has been opened for a user, the 'loginName' parameter is
140
+ * ignored, but it is mandatory if the session has been opened by an
141
+ * administrator.
142
+ *
143
+ * @param recordId the com record identifier
144
+ * @param loginName the user login name
145
+ */
146
+ acknowledgeComRecord(recordId: string, loginName?: string | null): Promise<boolean>;
147
+ /**
148
+ * Unacknowledge the specified list of com records.
149
+ * <p>
150
+ * An {@link ON_COM_RECORDS_UNACK} event is raised containing the list of the com records that have been acknowledged.
151
+ * <p>
152
+ * If the session has been opened for a user, the 'loginName" parameter is
153
+ * ignored, but it is mandatory if the session has been opened by an
154
+ * administrator.
155
+ *
156
+ * @param recordIds the list of com records
157
+ * @param loginName the user login name
158
+ */
159
+ unacknowledgeComRecords(recordIds: string[], loginName?: string | null): Promise<boolean>;
160
+ /**
161
+ * Unacknowledge the specified com record.
162
+ * <p>
163
+ * An {@link ON_COM_RECORDS_UNACK} event is raised containing the list of the com records that have been acknowledged.
164
+ * <p>
165
+ * If the session has been opened for a user, the 'loginName' parameter is
166
+ * ignored, but it is mandatory if the session has been opened by an
167
+ * administrator.
168
+ *
169
+ * @param recordId the com record identifier
170
+ * @param loginName the user login name
171
+ */
172
+ unacknowledgeComRecord(recordId: string, loginName?: string | null): Promise<boolean>;
173
+ }
@@ -0,0 +1,88 @@
1
+ import DirectoryRest from "./internal/rest/directory-rest";
2
+ import { Criteria } from "./types/directory/criteria";
3
+ import { SearchResult } from "./types/directory/directory-types";
4
+ /**
5
+ * The DirectoryService is used to search contacts in the OmniPCX
6
+ * Enterprise phone book. Using this service requires having a
7
+ * <b>TELEPHONY_ADVANCED</b> license.
8
+ * <p>
9
+ * A directory search is a set of 2 or more sequential operations:
10
+ * <ol>
11
+ * <li>The first operation initiate the search with a set of criteria</li>
12
+ * <li>The second and next operations retrieve results</li>
13
+ * </ol>
14
+ * <p>
15
+ * Note: For each session (user or administrator), only 5 concurrent searches
16
+ * are authorized. An unused search context is freed after 1 minute.
17
+ *
18
+ * <p>
19
+ * @example
20
+ * ```typescript
21
+ *
22
+ * await o2g.directory.search(myCriteria);
23
+ * while (!finished) {
24
+ *
25
+ * let result = await o2g.directory.getResults();
26
+ * if (result.getResultCode() == SearchResult.ResultCode.NOK) {
27
+ * // Wait the results
28
+ * }
29
+ * else if ((result.getResultCode() == SearchResult.ResultCode.FINISH) ||
30
+ * (result.getResultCode() == SearchResult.ResultCode.TIMEOUT)) {
31
+ * // Exit the loop
32
+ * finished = true;
33
+ * }
34
+ * else {
35
+ * // Process results
36
+ * }
37
+ * }
38
+ * ```
39
+ */
40
+ export declare class Directory {
41
+ private _directoryRest;
42
+ /**
43
+ * @internal
44
+ */
45
+ constructor(directoryRest: DirectoryRest);
46
+ /**
47
+ * Initiates a search for the specified user with the specified filter. The
48
+ * search will be limited to the specified number of results.
49
+ * <p>
50
+ * If the session has been opened for a user, the 'loginName' parameter is
51
+ * ignored, but it is mandatory if the session has been opened by an
52
+ * administrator.
53
+ *
54
+ * @param filter the search filter
55
+ * @param limit maximum number of results. The range of supported values is[1 .. 100]
56
+ * @param loginName the user login name
57
+ */
58
+ search(filter: Criteria, limit?: number | null, loginName?: string | null): Promise<boolean>;
59
+ /**
60
+ * Cancel a search query for the specified user.
61
+ * <p>
62
+ * If the session has been opened for a user, the 'loginName' parameter is
63
+ * ignored, but it is mandatory if the session has been opened by an
64
+ * administrator.
65
+ *
66
+ * @param loginName the user login name
67
+ */
68
+ cancel(loginName?: string | null): Promise<boolean>;
69
+ /**
70
+ * Gets the next available results for the current search.
71
+ * 'getResults' is generally called in a loop and for each iteration
72
+ * <ul>
73
+ * <li>if the status result code is 'NOK', the search is in progress but no result is
74
+ * available : it is recommended to wait before the next iteration (500ms for
75
+ * example)</li>
76
+ * <li>if the status result code is 'OK', results are available and can be processed</li>
77
+ * <li>if the status result code is 'FINISH' or 'TIMEOUT', search is ended, exit from the
78
+ * loop</li>
79
+ * </ul>
80
+ * <p>
81
+ * If the session has been opened for a user, the 'loginName' parameter is
82
+ * ignored, but it is mandatory if the session has been opened by an
83
+ * administrator.
84
+ *
85
+ * @param loginName the user login name
86
+ */
87
+ getResults(loginName?: string | null): Promise<SearchResult | null>;
88
+ }
@@ -0,0 +1,33 @@
1
+ import { EventRegistry } from "./internal/events/event-dispatcher";
2
+ import EventSumaryRest from "./internal/rest/eventSummary-rest";
3
+ import { EventSummaryCounters } from "./types/eventsummary/event-summary-counter";
4
+ import { EventEmitter } from 'events';
5
+ /**
6
+ * The Event summary service allows a user to get its new message
7
+ * indicators (missed call, voice mails, callback request, fax).
8
+ * <p>Using this service requires having a <b>TELEPHONY_ADVANCED</b> license,
9
+ */
10
+ export declare class EventSummary extends EventEmitter {
11
+ private readonly _eventSummaryRest;
12
+ /**
13
+ * Event raised each time the user's counters have changed.
14
+ * @event
15
+ */
16
+ static readonly ON_EVENT_SUMMARY_UPDATED = "OnEventSummaryUpdated";
17
+ /**
18
+ *
19
+ * @internal
20
+ */
21
+ constructor(_eventSummaryRest: EventSumaryRest, eventRegistry: EventRegistry);
22
+ /**
23
+ * Retrieves main counters for the specified user.
24
+ * <p>
25
+ * If the session has been opened for a user, the loginName parameter is
26
+ * ignored, but it is mandatory if the session has been opened by an
27
+ * administrator.
28
+ *
29
+ * @param loginName the user login name
30
+ * @return the {@link EventSummaryCounters}
31
+ */
32
+ get(loginName?: string | null): Promise<EventSummaryCounters | null>;
33
+ }
@@ -0,0 +1,48 @@
1
+ import EventEmitter from "events";
2
+ import MaintenanceRest from "./internal/rest/maint-rest";
3
+ import { SystemStatus } from "./types/maint/maint-types";
4
+ import { EventRegistry } from "./internal/events/event-dispatcher";
5
+ /**
6
+ * The MaintenanceService allows to retrieve information about the
7
+ * system state, in particular information on the pbx nodes and their connection
8
+ * state. Informations about license are also provided per item: total allocated
9
+ * licenses, numbers of current used and expiration date.
10
+ */
11
+ export declare class Maintenance extends EventEmitter {
12
+ private readonly _maintenanceRest;
13
+ /**
14
+ * Occurs when a CTI link is down.
15
+ * @event
16
+ */
17
+ static readonly ON_CTI_LINK_DOWN = "OnCtiLinkDown";
18
+ /**
19
+ * Occurs when a CTI link is up.
20
+ * @event
21
+ */
22
+ static readonly ON_CTI_LINK_UP = "OnCtiLinkUp";
23
+ /**
24
+ * Occurs when datas are fully loaded from an OmniPCX Enterprise node.
25
+ * @event
26
+ */
27
+ static readonly ON_PBX_LOADED = "OnPbxLoaded";
28
+ /**
29
+ * Occurs when when the license file will soon expire or has recently expired.
30
+ * @event
31
+ */
32
+ static readonly ON_LICENSE_EXPIRATION = "OnLicenseExpiration";
33
+ /**
34
+ * Occurs when O2G is ready (all oxe nodes are connected and loaded).
35
+ * @event
36
+ */
37
+ static readonly ON_SERVER_STARTED = "OnServerStart";
38
+ /**
39
+ * @internal
40
+ */
41
+ constructor(_maintenanceRest: MaintenanceRest, eventRegistry: EventRegistry);
42
+ /**
43
+ * This operation provides information about the system state , and the total
44
+ * number of each license type available for the system. This operation is
45
+ * restricted to an admin session only.
46
+ */
47
+ getSystemStatus(): Promise<SystemStatus | null>;
48
+ }
@@ -0,0 +1,115 @@
1
+ import MessagingRest from "./internal/rest/messaging-rest";
2
+ import { MailBox } from "./types/messaging/messaging-types";
3
+ import { MailBoxInfo } from "./types/messaging/messaging-types";
4
+ import { VoiceMessage } from "./types/messaging/messaging-types";
5
+ /**
6
+ * Messaging service provides access to user's voice mail box.
7
+ * It's possible using this service to connect to the voice mail box, retrieve
8
+ * the information and the list of voice mails and manage the mail box. Using
9
+ * this service requires having a <b>TELEPHONY_ADVANCED</b> license. <br>It's
10
+ * possible to download the voice mail as a wav file and to delete an existing
11
+ * messages.
12
+ */
13
+ export declare class Messaging {
14
+ private _messagingRest;
15
+ /**
16
+ * @internal
17
+ */
18
+ constructor(messagingRest: MessagingRest);
19
+ /**
20
+ * Get the specified user's mailboxes. This is the logical first step to access
21
+ * further operation on voice mail feature.
22
+ * <p>
23
+ * If the session has been opened for a user, the 'loginName' parameter is
24
+ * ignored, but it is mandatory if the session has been opened by an
25
+ * administrator.
26
+ *
27
+ * @param loginName the user login name
28
+ */
29
+ getMailboxes(loginName?: string | null): Promise<MailBox[] | null>;
30
+ /**
31
+ * Get the information on the specified mail box.
32
+ * <p>
33
+ * The 'password' is optional. if not set, the user password is used to
34
+ * connect on the voicemail. This is only possible if the OmniPCX Enterprise
35
+ * administrator has managed the same pasword for the user and his mailbox.
36
+ * <p>
37
+ * If the session has been opened for a user, the 'loginName' parameter is
38
+ * ignored, but it is mandatory if the session has been opened by an
39
+ * administrator.
40
+ *
41
+ * @param mailBoxId the mail box identifier given in a {@link MailBox}
42
+ * @param password the mail box password
43
+ * @param loginName the user login name
44
+ *
45
+ */
46
+ getMailboxInfo(mailBoxId: string, password?: string | null, loginName?: string | null): Promise<MailBoxInfo | null>;
47
+ /**
48
+ * Get the list of voice messages in the specified mail box.
49
+ * <p>
50
+ * If the session has been opened for a user, the 'loginName' parameter is
51
+ * ignored, but it is mandatory if the session has been opened by an
52
+ * administrator.
53
+ *
54
+ * @param mailboxId the mail box identifier given in a {@link MailBox}
55
+ * object
56
+ * @param newOnly filter only unread voicemail if set to 'true'
57
+ * @param offset the offset from which to start retrieving the voicemail list
58
+ * @param limit the maximum number of items to return
59
+ * @param loginName the user login name
60
+ */
61
+ getVoiceMessages(mailboxId: string, newOnly?: boolean, offset?: number | null, limit?: number | null, loginName?: string | null): Promise<VoiceMessage[] | null>;
62
+ /**
63
+ * Delete the specified voice message.
64
+ * <p>
65
+ * If the session has been opened for a user, the 'loginName' parameter is
66
+ * ignored, but it is mandatory if the session has been opened by an
67
+ * administrator.
68
+ *
69
+ * @param mailboxId the mail box identifier given in a {@link MailBox}
70
+ * object
71
+ * @param voicemailId the voice mail identifier given in a {@link VoiceMessage}
72
+ * @param loginName the user login name
73
+ */
74
+ deleteVoiceMessage(mailboxId: string, voicemailId: string, loginName?: string | null): Promise<boolean>;
75
+ /**
76
+ * Acknowledge the specified voice message.
77
+ * <p>
78
+ * If the session has been opened for a user, the 'loginName' parameter is
79
+ * ignored, but it is mandatory if the session has been opened by an
80
+ * administrator.
81
+ *
82
+ * @param mailboxId the mail box identifier given in a {@link MailBox}
83
+ * object
84
+ * @param voicemailId the voice mail identifier given in a {@link VoiceMessage}
85
+ * @param loginName the user login name
86
+ */
87
+ acknowledgeVoiceMessage(mailboxId: string, voicemailId: string, loginName?: string | null): Promise<boolean>;
88
+ /**
89
+ * Delete the specified list of voice messages.
90
+ * <p>
91
+ * If the session has been opened for a user, the 'loginName' parameter is
92
+ * ignored, but it is mandatory if the session has been opened by an
93
+ * administrator.
94
+ *
95
+ * @param mailboxId the mail box identifier given in a {@link MailBox}
96
+ * object
97
+ * @param msgIds the voicemail identifiers given in a {@link VoiceMessage}
98
+ * @param loginName the user login name
99
+ */
100
+ deleteVoiceMessages(mailboxId: string, msgIds: string[], loginName?: string | null): Promise<boolean>;
101
+ /**
102
+ * Download a voice mail as a wav file.
103
+ * <p>
104
+ * If the session has been opened for a user, the 'loginName' parameter is
105
+ * ignored, but it is mandatory if the session has been opened by an
106
+ * administrator.
107
+ *
108
+ * @param mailboxId the mail box identifier given in a {@link MailBox}
109
+ * object
110
+ * @param voicemailId the voice mail identifier given in a {@link VoiceMessage}
111
+ * @param wavPath an optional destination file name
112
+ * @param loginName the user login name
113
+ */
114
+ downloadVoiceMessage(mailboxId: string, voicemailId: string, wavPath: string | null, loginName?: string | null): Promise<string | null>;
115
+ }
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Copyright 2025 ALE International
3
+ *
4
+ * Licensed under the MIT License. You may obtain a copy of the License at:
5
+ * https://opensource.org/licenses/MIT
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
8
+ * software and associated documentation files (the "Software"), to deal in the Software
9
+ * without restriction, including without limitation the rights to use, copy, modify, merge,
10
+ * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
11
+ * to whom the Software is furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all copies or
14
+ * substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
17
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+ */
22
+ import { Routing } from "./o2g-routing";
23
+ import { EventSummary } from "./o2g-eventSummary";
24
+ import { Directory } from "./o2g-directory";
25
+ import { Users } from "./o2g-users";
26
+ import { Telephony } from "./o2g-telephony";
27
+ import { CommunicationLog } from "./o2g-comlog";
28
+ import { Analytics } from "./o2g-analytics";
29
+ import { CallCenterAgent } from "./o2g-cc-agent";
30
+ import { CallCenterPilot } from "./o2g-cc-pilot";
31
+ import { Maintenance } from "./o2g-maint";
32
+ import { PbxManagement } from "./o2g-pbx-mngt";
33
+ import { PhoneSetProgramming } from "./o2g-phone-set-prog";
34
+ import { Messaging } from "./o2g-messaging";
35
+ import { Subscription } from "./subscription";
36
+ import { TimeRange } from "./types/analytics/time-range";
37
+ import { TelFacility } from "./types/analytics/tel-facility";
38
+ import { CallType } from "./types/analytics/call-type";
39
+ import { IntrusionMode } from "./types/cc-agent/intrusion-mode";
40
+ import { OperatorType } from "./types/cc-agent/operator-type";
41
+ import { OperatorMainState } from "./types/cc-agent/operator-main-state";
42
+ import { Page } from "./types/comlog/page";
43
+ import { QueryFilter } from "./types/comlog/query-filter";
44
+ import { Reason } from "./types/comlog/reason";
45
+ import { Role } from "./types/comlog/role";
46
+ import { Criteria } from "./types/directory/criteria";
47
+ import { FilterItem } from "./types/directory/filter-item";
48
+ import { OperationFilter } from "./types/directory/operation-filter";
49
+ import { AttributeFilter } from "./types/pbxmngt/attribute-filter";
50
+ import { AttributeType } from "./types/pbxmngt/attribute-type";
51
+ import { Filter } from "./types/pbxmngt/filter";
52
+ import { Option } from './types/comlog/option';
53
+ import { PbxAttributeMap } from "./types/pbxmngt/pbx-attr-map";
54
+ import { PbxAttribute } from "./types/pbxmngt/pbx-attribute";
55
+ import { Pin } from "./types/phoneset/pin";
56
+ import { PinControl } from "./types/phoneset/pin-control";
57
+ import { ProgrammableKey } from "./types/phoneset/programmable-key";
58
+ import { SoftKey } from "./types/phoneset/softkey";
59
+ import { Destination } from "./types/routing/destination";
60
+ import { ForwardCondition } from "./types/routing/forward";
61
+ import { OverflowCondition } from "./types/routing/overflow";
62
+ import { AcrSkill } from "./types/telephony/acr-skill";
63
+ import { RecordingAction } from "./types/telephony/RecordingAction";
64
+ import { UserManagement } from "./o2g-user-mngt";
65
+ import { CallCenterManagement } from "./o2g-cc-mngt";
66
+ import { Pilot } from "./types/cc-mngt/pilot";
67
+ import { PilotRule } from "./types/cc-mngt/pilot-rule";
68
+ export declare class O2G {
69
+ static get O2G_ONCHANNEL_INFORMATION(): string;
70
+ private static _application;
71
+ private static _logger;
72
+ private static _routing;
73
+ private static _eventSummary;
74
+ private static _users;
75
+ private static _userManagement;
76
+ private static _telephony;
77
+ private static _directory;
78
+ private static _comlog;
79
+ private static _analytics;
80
+ private static _callCenterAgent;
81
+ private static _callCenterPilot;
82
+ private static _callCenterManagement;
83
+ private static _maintenance;
84
+ private static _pbxManagement;
85
+ private static _phoneSetProgramming;
86
+ private static _messaging;
87
+ static initialize(appName: string, host: Host, apiVersion?: string): void;
88
+ static login(loginName: string, password: string): Promise<boolean>;
89
+ static subscribe(subscription: Subscription): Promise<void>;
90
+ static shutdown(): Promise<void>;
91
+ static on(event: string, listener: (...args: any[]) => void): void;
92
+ static off(event: string, listener: (...args: any[]) => void): void;
93
+ static get routing(): Routing;
94
+ static get eventSummary(): EventSummary;
95
+ static get users(): Users;
96
+ static get userManagement(): UserManagement;
97
+ static get telephony(): Telephony;
98
+ static get directory(): Directory;
99
+ static get comlog(): CommunicationLog;
100
+ static get analytics(): Analytics;
101
+ static get callCenterAgent(): CallCenterAgent;
102
+ static get callCenterPilot(): CallCenterPilot;
103
+ static get callCenterManagement(): CallCenterManagement;
104
+ static get maintenance(): Maintenance;
105
+ static get pbxManagement(): PbxManagement;
106
+ static get phoneSetProgramming(): PhoneSetProgramming;
107
+ static get messaging(): Messaging;
108
+ static readonly types: {
109
+ Subscription: typeof Subscription;
110
+ analytics: {
111
+ TimeRange: typeof TimeRange;
112
+ CallType: typeof CallType;
113
+ TelFacility: typeof TelFacility;
114
+ };
115
+ ccAgent: {
116
+ IntrusionMode: typeof IntrusionMode;
117
+ OperatorType: typeof OperatorType;
118
+ OperatorMainState: typeof OperatorMainState;
119
+ };
120
+ comlog: {
121
+ Page: typeof Page;
122
+ QueryFilter: typeof QueryFilter;
123
+ Role: typeof Role;
124
+ Option: typeof Option;
125
+ Reason: typeof Reason;
126
+ };
127
+ ccManagement: {
128
+ Pilot: typeof Pilot;
129
+ PilotRule: typeof PilotRule;
130
+ };
131
+ directory: {
132
+ Criteria: typeof Criteria;
133
+ FilterItem: typeof FilterItem;
134
+ OperationFilter: typeof OperationFilter;
135
+ };
136
+ pbxmngt: {
137
+ PbxAttribute: typeof PbxAttribute;
138
+ PbxAttributeMap: typeof PbxAttributeMap;
139
+ AttributeType: typeof AttributeType;
140
+ AttributeFilter: typeof AttributeFilter;
141
+ Filter: typeof Filter;
142
+ };
143
+ phoneset: {
144
+ PinControl: typeof PinControl;
145
+ Pin: typeof Pin;
146
+ ProgrammableKey: typeof ProgrammableKey;
147
+ SoftKey: typeof SoftKey;
148
+ };
149
+ routing: {
150
+ Destination: typeof Destination;
151
+ ForwardCondition: typeof ForwardCondition;
152
+ OverflowCondition: typeof OverflowCondition;
153
+ };
154
+ telephony: {
155
+ AcrSkill: typeof AcrSkill;
156
+ RecordingAction: typeof RecordingAction;
157
+ };
158
+ };
159
+ }