o2g-node-sdk 1.0.1 → 2.4.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 (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +230 -5
  3. package/dist/o2g-node-sdk.js +41601 -1
  4. package/dist/o2g-node-sdk.js.map +1 -1
  5. package/package.json +40 -8
  6. package/dist/ErrorInfo.d.ts +0 -87
  7. package/dist/host.d.ts +0 -17
  8. package/dist/o2g-analytics.d.ts +0 -66
  9. package/dist/o2g-cc-agent.d.ts +0 -247
  10. package/dist/o2g-cc-mngt.d.ts +0 -32
  11. package/dist/o2g-cc-pilot.d.ts +0 -42
  12. package/dist/o2g-comlog.d.ts +0 -173
  13. package/dist/o2g-directory.d.ts +0 -88
  14. package/dist/o2g-eventSummary.d.ts +0 -33
  15. package/dist/o2g-maint.d.ts +0 -48
  16. package/dist/o2g-messaging.d.ts +0 -115
  17. package/dist/o2g-node-sdk.d.ts +0 -159
  18. package/dist/o2g-pbx-mngt.d.ts +0 -146
  19. package/dist/o2g-phone-set-prog.d.ts +0 -29
  20. package/dist/o2g-routing.d.ts +0 -267
  21. package/dist/o2g-rsi.d.ts +0 -160
  22. package/dist/o2g-telephony.d.ts +0 -795
  23. package/dist/o2g-user-mngt.d.ts +0 -42
  24. package/dist/o2g-users.d.ts +0 -85
  25. package/dist/subscription.d.ts +0 -258
  26. package/dist/types/analytics/call-type.d.ts +0 -24
  27. package/dist/types/analytics/charging-file.d.ts +0 -27
  28. package/dist/types/analytics/charging-result.d.ts +0 -43
  29. package/dist/types/analytics/charging.d.ts +0 -105
  30. package/dist/types/analytics/incident.d.ts +0 -46
  31. package/dist/types/analytics/tel-facility.d.ts +0 -44
  32. package/dist/types/analytics/time-range.d.ts +0 -22
  33. package/dist/types/cc-agent/cc-agent-events.d.ts +0 -54
  34. package/dist/types/cc-agent/cc-agent-types.d.ts +0 -71
  35. package/dist/types/cc-agent/intrusion-mode.d.ts +0 -24
  36. package/dist/types/cc-agent/operator-dyn-state.d.ts +0 -56
  37. package/dist/types/cc-agent/operator-main-state.d.ts +0 -21
  38. package/dist/types/cc-agent/operator-type.d.ts +0 -16
  39. package/dist/types/cc-mngt/calendar/abstract-calendar.d.ts +0 -7
  40. package/dist/types/cc-mngt/calendar/calendar.d.ts +0 -19
  41. package/dist/types/cc-mngt/calendar/day-of-week.d.ts +0 -33
  42. package/dist/types/cc-mngt/calendar/exception-calendar.d.ts +0 -26
  43. package/dist/types/cc-mngt/calendar/normal-calendar.d.ts +0 -27
  44. package/dist/types/cc-mngt/calendar/transition.d.ts +0 -49
  45. package/dist/types/cc-mngt/cc-mngt-types.d.ts +0 -0
  46. package/dist/types/cc-mngt/pilot-rule-set.d.ts +0 -27
  47. package/dist/types/cc-mngt/pilot-rule.d.ts +0 -14
  48. package/dist/types/cc-mngt/pilot.d.ts +0 -56
  49. package/dist/types/cc-pilot/cc-pilot-events.d.ts +0 -111
  50. package/dist/types/comlog/com-record.d.ts +0 -51
  51. package/dist/types/comlog/comlog-events.d.ts +0 -74
  52. package/dist/types/comlog/comlog-types.d.ts +0 -131
  53. package/dist/types/comlog/option.d.ts +0 -23
  54. package/dist/types/comlog/page.d.ts +0 -33
  55. package/dist/types/comlog/query-filter.d.ts +0 -44
  56. package/dist/types/comlog/query-result.d.ts +0 -27
  57. package/dist/types/comlog/reason.d.ts +0 -61
  58. package/dist/types/comlog/role.d.ts +0 -17
  59. package/dist/types/common/common-types.d.ts +0 -78
  60. package/dist/types/directory/criteria.d.ts +0 -90
  61. package/dist/types/directory/directory-types.d.ts +0 -44
  62. package/dist/types/directory/filter-item.d.ts +0 -21
  63. package/dist/types/directory/operation-filter.d.ts +0 -21
  64. package/dist/types/events/events.d.ts +0 -54
  65. package/dist/types/events/o2g-event.d.ts +0 -3
  66. package/dist/types/eventsummary/event-summary-counter.d.ts +0 -44
  67. package/dist/types/eventsummary/event-summary-events.d.ts +0 -15
  68. package/dist/types/maint/maint-events.d.ts +0 -51
  69. package/dist/types/maint/maint-types.d.ts +0 -162
  70. package/dist/types/messaging/messaging-types.d.ts +0 -120
  71. package/dist/types/pbxmngt/attribute-filter.d.ts +0 -30
  72. package/dist/types/pbxmngt/attribute-type.d.ts +0 -34
  73. package/dist/types/pbxmngt/filter.d.ts +0 -46
  74. package/dist/types/pbxmngt/model.d.ts +0 -63
  75. package/dist/types/pbxmngt/pbx-attr-map.d.ts +0 -91
  76. package/dist/types/pbxmngt/pbx-attribute.d.ts +0 -87
  77. package/dist/types/pbxmngt/pbx-object.d.ts +0 -45
  78. package/dist/types/pbxmngt/pbxmngt-events.d.ts +0 -59
  79. package/dist/types/pbxmngt/pbxmngt-types.d.ts +0 -14
  80. package/dist/types/phoneset/device-key.d.ts +0 -27
  81. package/dist/types/phoneset/phoneset-types.d.ts +0 -17
  82. package/dist/types/phoneset/pin-control.d.ts +0 -21
  83. package/dist/types/phoneset/pin.d.ts +0 -50
  84. package/dist/types/phoneset/programmable-key.d.ts +0 -23
  85. package/dist/types/phoneset/softkey.d.ts +0 -17
  86. package/dist/types/routing/destination.d.ts +0 -19
  87. package/dist/types/routing/forward.d.ts +0 -51
  88. package/dist/types/routing/overflow.d.ts +0 -42
  89. package/dist/types/routing/routing-capability.d.ts +0 -31
  90. package/dist/types/routing/routing-events.d.ts +0 -15
  91. package/dist/types/routing/routing-state.d.ts +0 -67
  92. package/dist/types/routing/routing-types.d.ts +0 -10
  93. package/dist/types/rsi/add-digit-coll-criteria.d.ts +0 -16
  94. package/dist/types/rsi/collection-cause.d.ts +0 -21
  95. package/dist/types/rsi/routing-caller-type.d.ts +0 -17
  96. package/dist/types/rsi/routing-reason.d.ts +0 -25
  97. package/dist/types/rsi/rsi-events.d.ts +0 -76
  98. package/dist/types/rsi/rsi-types.d.ts +0 -49
  99. package/dist/types/rsi/tones.d.ts +0 -25
  100. package/dist/types/telephony/RecordingAction.d.ts +0 -6
  101. package/dist/types/telephony/acr-skill.d.ts +0 -29
  102. package/dist/types/telephony/telephony-events.d.ts +0 -292
  103. package/dist/types/telephony/telephony-types.d.ts +0 -587
  104. package/dist/types/users/users-events.d.ts +0 -33
  105. package/dist/types/users/users-types.d.ts +0 -129
@@ -1,146 +0,0 @@
1
- import PbxManagementRest from "./internal/rest/pbx-mngt-rest";
2
- import { Model } from "./types/pbxmngt/model";
3
- import { PbxAttribute } from "./types/pbxmngt/pbx-attribute";
4
- import { PbxObject } from "./types/pbxmngt/pbx-object";
5
- import { Pbx } from "./types/pbxmngt/pbxmngt-types";
6
- import { Filter } from "./types/pbxmngt/filter";
7
- import EventEmitter from "events";
8
- import { EventRegistry } from "./internal/events/event-dispatcher";
9
- /**
10
- * PbxManagement service allows an administrator to manage an OmniPcx
11
- * Enterprise, that is to create/modify/delete any object or sub-object in the
12
- * OmniPcx Enterprise object model. Using this service requires having a
13
- * <b>MANAGEMENT</b> license.
14
- * <p>
15
- * <b>WARNING:</b> Using this service requires to have a good knowledge of the
16
- * OmniPCX Enterprise object model.
17
- * <p>
18
- * The service uses two kinds of resource: the object model resource and the
19
- * object instance resource.
20
- * <p><b><u>The object model</u></b>: The object model can be retrieved for the whole Pbx
21
- * or for a particular object. It provides the detail of object attributes:
22
- * whether the attribute is mandatory/optional in the object creation, what
23
- * range of value is authorized, what are the possible enumeration value.
24
- * <p><b><u>The object instance</u></b>: It is used to create, modify, retrieve or remove
25
- * any instances of any object, giving the reference of this object. For the
26
- * creation or the modification of an object, the body must be compliant with
27
- * the object model.
28
- * <p>
29
- * The list of sub-objects which are returned by a get instance of an object
30
- * corresponds to the relative path of the first instanciable objects in the
31
- * hierarchy in order to be able by recursion to build the path to access to any
32
- * object and sub-object.
33
- * <p>
34
- * When access to an object which is a sub-object, the full path must be given :
35
- * {object1Name}/{object1Id}/{object2Name}/{object2Id}/..../{objectxName}/{objectxId}.
36
- */
37
- export declare class PbxManagement extends EventEmitter {
38
- private readonly _pbxMngtRest;
39
- /**
40
- * Occurs when a PBX object instance is created.
41
- * Only Object Subscriber is concerned by this event.
42
- * @event
43
- */
44
- static readonly ON_PBX_OBJECT_INSTANCE_CREATED = "OnPbxObjectInstanceCreated";
45
- /**
46
- * Occurs when a PBX object instance is deleted.
47
- * Only Object Subscriber is concerned by this event.
48
- * @event
49
- */
50
- static readonly ON_PBX_OBJECT_INSTANCE_DELETED = "OnPbxObjectInstanceDeleted";
51
- /**
52
- * Occurs when a PBX object instance is modified.
53
- * Only Object Subscriber is concerned by this event.
54
- * @event
55
- */
56
- static readonly ON_PBX_OBJECT_INSTANCE_MODIFIED = "OnPbxObjectInstanceModified";
57
- /**
58
- *
59
- * @internal
60
- */
61
- constructor(_pbxMngtRest: PbxManagementRest, eventRegistry: EventRegistry);
62
- /**
63
- * Gets the list of OmniPCX Enterprise nodes connected on this O2G server.
64
- */
65
- getPbxs(): Promise<number[] | null>;
66
- /**
67
- * Gets the OmniPCX Enterprise specified by its node id.
68
- *
69
- * @param nodeId the PCX Enterprise node id
70
- */
71
- getPbx(nodeId: number): Promise<Pbx | null>;
72
- /**
73
- * Get the description of the data model for the specified object on the
74
- * specified OmniPCX Enterprise node.
75
- * <p>
76
- * If 'objectName' is 'null', the global object model of the OmniPCX Enterprise node is returned.
77
- *
78
- * @param nodeId the OmniPCX Enterprise node id
79
- * @param objectName the object name
80
- */
81
- getObjectModel(nodeId: number, objectName?: string | null): Promise<Model | null>;
82
- /**
83
- * Gets the node(root) object.
84
- *
85
- * @param nodeId the OmniPCX Enterprise node id
86
- */
87
- getNodeObject(nodeId: number): Promise<PbxObject | null>;
88
- /**
89
- * Gets the object specified by its instance definition and its instance id.
90
- *
91
- * @param nodeId the OmniPCX Enterprise node id
92
- * @param objectInstanceDefinition the object instance definition
93
- * @param objectId the object instance id
94
- * @param attributes the optional attributes to retrieve. It can be a string with a comma separated attribute name, or an array of PbxAtribute objects.
95
- */
96
- getObject(nodeId: number, objectInstanceDefinition: string, objectId: string, attributes?: string | PbxAttribute[] | null): Promise<PbxObject | null>;
97
- /**
98
- * Queries the list of object instances that match the specified filter.
99
- * A filter can be built using the {@link Filter} class, or it can be a string object.
100
- * @example
101
- * ```typescript
102
- * // Using a Filter object
103
- * let filter = o2g.types.pbxmngt.Filter.create(
104
- * "StationType",
105
- * o2g.types.pbxmngt.AttributeFilter.Equals,
106
- * "ANALOG");
107
- * let objectInstances = await o2g.pbxManagement.getObjectInstances(5, "Subscriber", filter);
108
- *
109
- * // Using a string as a filter
110
- * objectInstances = await o2g.pbxManagement.getObjectInstances(5, "Subscriber", "StationType==ANALOG");
111
- *
112
- * ```
113
- *
114
- * @param nodeId the OmniPCX Enterprise node id
115
- * @param objectInstanceDefinition the object instance definition
116
- * @param filter a filter to query the instances ({@link Filter} object or string)
117
- */
118
- getObjectInstances(nodeId: number, objectInstanceDefinition: string, filter?: string | Filter | null): Promise<string[] | null>;
119
- /**
120
- * Changes one or several attribute values of the specified object.
121
- * @param nodeId the OmniPCX Enterprise node id
122
- * @param objectInstanceDefinition the object instance definition
123
- * @param objectId the object instance id
124
- * @param attributes the array of attributes to change
125
- */
126
- setObject(nodeId: number, objectInstanceDefinition: string, objectId: string, attributes: PbxAttribute[]): Promise<boolean>;
127
- /**
128
- * Deletes the specified instance of object.
129
- * <p>
130
- * The "<i>FORCED_DELETE</i>" action is not available for all object.
131
- * Check the availability in the {@link Model} model corresponding to this object.
132
- * This option can be used, for exemple, to delete a {@code Subscriber} having voice mails in his mail box.
133
- * @param nodeId the OmniPCX Enterprise node id
134
- * @param objectInstanceDefinition the object instance definition
135
- * @param objectId the object instance id
136
- * @param forceDelete Use the "<i>FORCED_DELETE</i>" action to delete the object.
137
- */
138
- deleteObject(nodeId: number, objectInstanceDefinition: string, objectId: string, forceDelete?: boolean): Promise<boolean>;
139
- /**
140
- * Creates a new object with the specified collection of attributes
141
- * @param nodeId the OmniPCX Enterprise node id
142
- * @param objectInstanceDefinition the object instance definition
143
- * @param attributes the array of attributes to set at this object creation.
144
- */
145
- createObject(nodeId: number, objectInstanceDefinition: string, attributes: PbxAttribute[]): Promise<boolean>;
146
- }
@@ -1,29 +0,0 @@
1
- import PhoneSetProgrammingRest from "./internal/rest/phone-set-prog-rest";
2
- import { Device } from "./types/users/users-types";
3
- import { DynamicState } from "./types/phoneset/phoneset-types";
4
- import { Pin } from "./types/phoneset/pin";
5
- import { ProgrammableKey } from "./types/phoneset/programmable-key";
6
- import { SoftKey } from "./types/phoneset/softkey";
7
- export declare class PhoneSetProgramming {
8
- private _phoneSetProgrRest;
9
- constructor(phoneSetProgrRest: PhoneSetProgrammingRest);
10
- getDevices(loginName: string | null): Promise<Device[] | null>;
11
- getDevice(loginName: string | null, deviceId: string): Promise<Device | null>;
12
- getProgrammableKeys(loginName: string | null, deviceId: string): Promise<ProgrammableKey[] | null>;
13
- getProgrammedKeys(loginName: string | null, deviceId: string): Promise<ProgrammableKey[] | null>;
14
- setProgrammableKey(loginName: string | null, deviceId: string, key: ProgrammableKey): Promise<boolean>;
15
- deleteProgrammableKey(loginName: string | null, deviceId: string, position: number): Promise<boolean>;
16
- getSoftKeys(loginName: string | null, deviceId: string): Promise<SoftKey[] | null>;
17
- setSoftKey(loginName: string | null, deviceId: string, key: SoftKey): Promise<boolean>;
18
- deleteSoftKey(loginName: string | null, deviceId: string, position: number): Promise<boolean>;
19
- lockDevice(loginName: string | null, deviceId: string): Promise<boolean>;
20
- unlockDevice(loginName: string | null, deviceId: string): Promise<boolean>;
21
- enableCampon(loginName: string | null, deviceId: string): Promise<boolean>;
22
- disableCampon(loginName: string | null, deviceId: string): Promise<boolean>;
23
- getPinCode(loginName: string | null, deviceId: string): Promise<Pin | null>;
24
- setPinCode(loginName: string | null, deviceId: string, code: Pin): Promise<boolean>;
25
- getDynamicState(loginName: string | null, deviceId: string): Promise<DynamicState | null>;
26
- setAssociate(loginName: string | null, deviceId: string, associate: string): Promise<boolean>;
27
- activateRemoteExtension(loginName: string | null, deviceId: string): Promise<boolean>;
28
- deactivateRemoteExtension(loginName: string | null, deviceId: string): Promise<boolean>;
29
- }
@@ -1,267 +0,0 @@
1
- import EventEmitter from "events";
2
- import RoutingRest from "./internal/rest/routing-rest";
3
- import { Forward, ForwardCondition } from "./types/routing/forward";
4
- import { Overflow, OverflowCondition } from "./types/routing/overflow";
5
- import { RoutingCapabilities } from "./types/routing/routing-capability";
6
- import { RoutingState } from "./types/routing/routing-state";
7
- import { DndState } from "./types/routing/routing-types";
8
- import { EventRegistry } from "./internal/events/event-dispatcher";
9
- /**
10
- * The Routing service allows a user to manage forward, overflow, DoNotDisturb
11
- * and activation of his remote extension device (if any). Using this service
12
- * requires having a <b>TELEPHONY_ADVANCED</b> license.
13
- * <h2>Forward:</h2>A forward can be activated on the voice mail or on any
14
- * number as far as this number is authorized by the OmniPCX Enterprise
15
- * numbering policy. Use one of the methods:
16
- * {@link forwardOnNumber} or {@link forwardOnVoiceMail} to activate a forward. <br>
17
- * A {@link ForwardCondition} can be associated to the forward:
18
- * <table>
19
- * <caption>Forward conditions</caption>
20
- * <tr>
21
- * <td>IMMEDIATE
22
- * <td>
23
- * <td>Incoming calls are immediately forwarded on the target.</td>
24
- * <tr>
25
- * <tr>
26
- * <td>BUSY
27
- * <td>
28
- * <td>Incoming calls are forwarded on the target if the user is busy.</td>
29
- * <tr>
30
- * <tr>
31
- * <td>NO_ANSWER
32
- * <td>
33
- * <td>Incoming calls are forwarded on the target if the user does not answer
34
- * the call</td>
35
- * <tr>
36
- * <tr>
37
- * <td>BUSY_NO_ANSWER
38
- * <td>
39
- * <td>One of the two last conditions</td>
40
- * <tr>
41
- * </table>
42
- * <h2>Overflow:</h2>An overflow can be activated on the voice mail (if any).
43
- * Use method:
44
- * {@link overflowOnVoiceMail} to activate an overflow. <br>
45
- * A {@link OverflowCondition Condition} can be associated to the overflow:
46
- * <table>
47
- * <caption>Overflow conditions</caption>
48
- * <tr>
49
- * <td>BUSY
50
- * <td>
51
- * <td>Incoming calls are redirected on the target if the user is busy.</td>
52
- * <tr>
53
- * <tr>
54
- * <td>NO_ANSWER
55
- * <td>
56
- * <td>Incoming calls are redirected on the target if the user does not answer
57
- * the call</td>
58
- * <tr>
59
- * <tr>
60
- * <td>BUSY_NO_ANSWER
61
- * <td>
62
- * <td>One of the two last conditions</td>
63
- * <tr>
64
- * </table>
65
- * <h2>Do Not Disturb:</h2> When the Do Not Disturb (DND) is activated, the user
66
- * does not receive any call. The DND is activated using method
67
- * {@link activateDnd}.
68
- * <h2>Remote extension activation:</h2> When a remote extension is not
69
- * activated, it does not ring on incoming call. Use the method
70
- * {@link setRemoteExtensionActivation} to activate the remote extension. <br>
71
- * <h2>Eventing:</h2> For each routing modification, a
72
- * {@link ON_ROUTING_STATE_CHANGED} event is raised.
73
- */
74
- export declare class Routing extends EventEmitter {
75
- private readonly _routingRest;
76
- /**
77
- * Raised for each routing modification.
78
- * @event
79
- */
80
- static readonly ON_ROUTING_STATE_CHANGED = "OnRoutingStateChanged";
81
- /**
82
- *
83
- * @internal
84
- */
85
- constructor(_routingRest: RoutingRest, eventRegistry: EventRegistry);
86
- /**
87
- * Activate the Do Not Disturb for the specified user.
88
- * <p>
89
- * This method does nothing and return 'true' if the Do Not Disturb is
90
- * already activated.
91
- * <p>
92
- * If the session has been opened for a user, the 'loginName' parameter is
93
- * ignored, but it is mandatory if the session has been opened by an
94
- * administrator.
95
- *
96
- * @param loginName the user login name
97
- */
98
- activateDnd(loginName?: string | null): Promise<boolean>;
99
- /**
100
- * Cancel the Do Not Disturb for the specified user.
101
- * <p>
102
- * This method does nothing and return 'true' if the Do Not Disturb was
103
- * not activated.
104
- * <p>
105
- * If the session has been opened for a user, the 'loginName' parameter is
106
- * ignored, but it is mandatory if the session has been opened by an
107
- * administrator.
108
- *
109
- * @param loginName the user login name
110
- */
111
- cancelDnd(loginName?: string | null): Promise<boolean>;
112
- /**
113
- * Get the Do Not Disturb state of the specified user.
114
- * <p>
115
- * If the session has been opened for a user, the 'loginName' parameter is
116
- * ignored, but it is mandatory if the session has been opened by an
117
- * administrator.
118
- *
119
- * @param loginName the user login name
120
- */
121
- getDndState(loginName?: string | null): Promise<DndState | null>;
122
- /**
123
- * Allows to know what the specified user is allowed to do.
124
- * <p>
125
- * If the session has been opened for a user, the 'logiName' parameter is
126
- * ignored, but it is mandatory if the session has been opened by an
127
- * administrator.
128
- *
129
- * @param loginName the user login name
130
- */
131
- getCapabilities(loginName?: string | null): Promise<RoutingCapabilities | null>;
132
- /**
133
- * Activate the remote extension device for the specified user.
134
- * <p>
135
- * When the remote extension is activated, it rings on incoming call on the user
136
- * company phone.
137
- * <p>
138
- * If the session has been opened for a user, the 'loginName' parameter is
139
- * ignored, but it is mandatory if the session has been opened by an
140
- * administrator.
141
- *
142
- * @param loginName the user login name
143
- */
144
- activateRemoteExtension(loginName?: string | null): Promise<boolean>;
145
- /**
146
- * Deactivate the remote extension device for the specified user.
147
- * <p>
148
- * When it is deactivated, it never rings, but it can be used to
149
- * place an outgoing call.
150
- * <p>
151
- * If the session has been opened for a user, the 'loginName' parameter is
152
- * ignored, but it is mandatory if the session has been opened by an
153
- * administrator.
154
- *
155
- * @param loginName the user login name
156
- */
157
- deactivateRemoteExtension(loginName?: string | null): Promise<boolean>;
158
- /**
159
- * Get the forward state of the specified user.
160
- * <p>
161
- * If the session has been opened for a user, the 'loginName' parameter is
162
- * ignored, but it is mandatory if the session has been opened by an
163
- * administrator.
164
- *
165
- * @param loginName the user login name
166
- */
167
- getForward(loginName?: string | null): Promise<Forward | null>;
168
- /**
169
- * Cancel the forward for the specified user.
170
- * <p>
171
- * This method does nothing and return 'true' if there is no forward
172
- * activated.
173
- * <p>
174
- * If the session has been opened for a user, the 'loginName' parameter is
175
- * ignored, but it is mandatory if the session has been opened by an
176
- * administrator.
177
- *
178
- * @param loginName the user login name
179
- */
180
- cancelForward(loginName?: string | null): Promise<boolean>;
181
- /**
182
- * Set a forward on voice mail with the specified condition, for the specified
183
- * user.
184
- * <p>
185
- * This method will fail and return 'false' if the user does not have a voice mail.
186
- * <p>
187
- * If the session has been opened for a user, the 'loginName' parameter is
188
- * ignored, but it is mandatory if the session has been opened by an
189
- * administrator.
190
- *
191
- * @param condition the forward condition
192
- * @param loginName the user login name
193
- */
194
- forwardOnVoiceMail(condition: ForwardCondition, loginName?: string | null): Promise<boolean>;
195
- /**
196
- * Set a forward on the specified number, with the specified condition, for the
197
- * specified user.
198
- * <p>
199
- * If the session has been opened for a user, the 'loginName' parameter is
200
- * ignored, but it is mandatory if the session has been opened by an
201
- * administrator.
202
- *
203
- * @param number the phone number on which the forward is activated
204
- * @param condition the forward condition
205
- * @param loginName the user login name
206
- */
207
- forwardOnNumber(number: string, condition: ForwardCondition, loginName?: string | null): Promise<boolean>;
208
- /**
209
- * Cancel the overflow for the specified user.
210
- * <p>
211
- * This method does nothing and return 'true' if there is no overflow activated.
212
- * <p>
213
- * If the session has been opened for a user, the 'loginName' parameter is
214
- * ignored, but it is mandatory if the session has been opened by an
215
- * administrator.
216
- *
217
- * @param loginName the user login name
218
- */
219
- cancelOverflow(loginName?: string | null): Promise<boolean>;
220
- /**
221
- * Get the overflow state for the specified user.
222
- * <p>
223
- * If the session has been opened for a user, the 'loginName' parameter is
224
- * ignored, but it is mandatory if the session has been opened by an
225
- * administrator.
226
- *
227
- * @param loginName the user login name
228
- */
229
- getOverflow(loginName?: string | null): Promise<Overflow | null>;
230
- /**
231
- * Activate an overflow on voice mail with the specified condition, for the
232
- * specified user.
233
- * <p>
234
- * This method will fail and return 'false' if the user does not have a voice mail.
235
- * <p>
236
- * If the session has been opened for a user, the 'loginName' parameter is
237
- * ignored, but it is mandatory if the session has been opened by an
238
- * administrator.
239
- *
240
- * @param condition the overflow condition
241
- * @param loginName the user login name
242
- */
243
- overflowOnVoiceMail(condition: OverflowCondition, loginName?: string | null): Promise<boolean>;
244
- /**
245
- * Get the routing state of the specified user.
246
- * <p>
247
- * If the session has been opened for a user, the 'loginName' parameter is
248
- * ignored, but it is mandatory if the session has been opened by an
249
- * administrator.
250
- *
251
- * @param loginName the user login name
252
- */
253
- getRoutingState(loginName?: string | null): Promise<RoutingState | null>;
254
- /**
255
- * Asks a snapshot event on the specified user.
256
- * <p>
257
- * The event OnRoutingStateChanged will contain the DynamicState
258
- * (forward/overflow/dnd state). If a second request is asked since the previous
259
- * one is still in progress, it has no effect.
260
- * <p>
261
- * If the session has been opened for a user, the 'loginName' parameter is
262
- * ignored.
263
- *
264
- * @param loginName the login name
265
- */
266
- requestSnapshot(loginName?: string | null): Promise<boolean>;
267
- }
package/dist/o2g-rsi.d.ts DELETED
@@ -1,160 +0,0 @@
1
- import EventEmitter from "events";
2
- import RsiRest from "./internal/rest/rsi-rest";
3
- import { AdditionalDigitCollectionCriteria } from "./types/rsi/add-digit-coll-criteria";
4
- import { RouteSession, RsiPoint } from "./types/rsi/rsi-types";
5
- import { Tones } from "./types/rsi/tones";
6
- import { EventRegistry } from "./internal/events/event-dispatcher";
7
- /**
8
- * RsiService provides access to th RSI (Routing Service Intelligence)
9
- * points features:
10
- * <ul>
11
- * <li>Makes route selection.</li>
12
- * <li>Makes digits collection.</li>
13
- * <li>Plays voice guides or tones.</li>
14
- * <li>Plays announcements (prompts and/or digits).</li>
15
- * </ul>
16
- * <p>
17
- * To be able to receive the RouteRequest from the OmniPCX Enterprise, the first
18
- * action is subscribe to rsi events and the second action is to enable the RSI
19
- * point.
20
- * <p>
21
- * Using this service requires having a <b>CONTACTCENTER_RSI</b> license.
22
- */
23
- export declare class Rsi extends EventEmitter {
24
- private readonly _rsiRest;
25
- /**
26
- * Occurs when a data collection has ended.
27
- * @event
28
- */
29
- static readonly ON_DIGIT_COLLECTED = "OnDigitCollected";
30
- /**
31
- * Raised from a RSI point when a tone generation is started.
32
- * @event
33
- */
34
- static readonly ON_TONE_GENERATED_START = "OnToneGeneratedStart";
35
- /**
36
- * Raised from a RSI point when a tone generation is stopped.
37
- * @event
38
- */
39
- static readonly ON_TONE_GENERATED_STOP = "OnToneGeneratedStop";
40
- /**
41
- * Raised from a Routing point to close a route session (routing crid is no longer valid).
42
- * @event
43
- */
44
- static readonly ON_ROUTE_END = "OnRouteEnd";
45
- /**
46
- * Raised from a Routing point to request a route.
47
- * @event
48
- */
49
- static readonly ON_ROUTE_REQUEST = "OnRouteRequest";
50
- /**
51
- *
52
- * @internal
53
- */
54
- constructor(_rsiRest: RsiRest, eventRegistry: EventRegistry);
55
- /**
56
- * Gets the configured Rsi points.
57
- */
58
- getRsiPoints(): Promise<RsiPoint[] | null>;
59
- /**
60
- * Enables the specified rsi point.
61
- *
62
- * @param rsiNumber the rsi point extension number
63
- */
64
- enableRsiPoint(rsiNumber: string): Promise<boolean>;
65
- /**
66
- * Disables the specified rsi point.
67
- *
68
- * @param rsiNumber the rsi point extension number.
69
- */
70
- disableRsiPoint(rsiNumber: string): Promise<boolean>;
71
- /**
72
- * Starts a digits collection for the specified rsi, on the specified call.
73
- *
74
- * @param rsiNumber the rsi point extension number
75
- * @param callRef the call reference
76
- * @param numChars the optionnal number of digits to collect. The
77
- * digit collection is stopped when this number is
78
- * reached
79
- * @param flushChar the optional character used to stop the digit
80
- * collection when pressed.
81
- * @param timeout optional timeout in second. Stop the digit
82
- * collection after this time elapses.
83
- * @param additionalCriteria extension criteria used to collect digits
84
- * @see {@link ON_DIGIT_COLLECTED} event
85
- * @see {@link stopCollectDigits}
86
- */
87
- startCollectDigits(rsiNumber: string, callRef: string, numChars: number, flushChar?: string | null, timeout?: number | null, additionalCriteria?: AdditionalDigitCollectionCriteria | null): Promise<boolean | null>;
88
- /**
89
- * Stops the specified digits collection.
90
- *
91
- * @param rsiNumber the rsi point extension number
92
- * @param callCrid the digit collection identifier
93
- * @see {@link startCollectDigits}.
94
- */
95
- stopCollectDigits(rsiNumber: string, collCrid: string): Promise<boolean>;
96
- /**
97
- * Plays the specified tone on the specified call.
98
- *
99
- * @param rsiNumber the rsi point extension number
100
- * @param callRef the call reference
101
- * @param tone the tone to play
102
- * @param duration the duration the tone is played (in second)
103
- * @see {@link ON_TONE_GENERATED_START} event.
104
- * @see {@link cancelTone}.
105
- */
106
- playTone(rsiNumber: string, callRef: string, tone: Tones, duration: number): Promise<boolean>;
107
- /**
108
- * Cancels playing a tone on the specified call.
109
- *
110
- * @param rsiNumber the rsi point extension number
111
- * @param callRef the call reference
112
- * @see {@link ON_TONE_GENERATED_STOP} event.
113
- * @see {@link playTone}
114
- */
115
- cancelTone(rsiNumber: string, callRef: string): Promise<boolean>;
116
- /**
117
- * Plays the specified voice guide on the specified call.
118
- *
119
- * @param rsiNumber the rsi point extension number
120
- * @param callRef the call reference
121
- * @param guideNumber the voice guide number as defined in the OmniPcx
122
- * Enterprise
123
- * @param duration an optional duration for the voice guide in second.
124
- * @see {@link ON_TONE_GENERATED_START}
125
- */
126
- playVoiceGuide(rsiNumber: string, callRef: string, guideNumber: number, duration?: number | null): Promise<boolean>;
127
- /**
128
- * Ends a route session.
129
- *
130
- * @param rsiNumber the rsi point extension number
131
- * @param routeCrid the routing session unique identifier
132
- * @see {@link ON_ROUTE_REQUEST} event.
133
- */
134
- routeEnd(rsiNumber: string, routeCrid: string): Promise<boolean>;
135
- /**
136
- * Selects a route for the specified route session.
137
- * @param rsiNumber the rsi point extension number
138
- * @param routeCrid the routing session unique identifier
139
- * @param selectedRoute the selected route number
140
- * @param callingLine an optional calling line value that will be presented
141
- * to the selected route
142
- * @param associatedData the optional associated data to attach to the call
143
- * @param routeToVoiceMail 'true' if the selected route is the voice mail; 'false' otherwise
144
- * @see {@link ON_ROUTE_REQUEST} event.
145
- */
146
- routeSelect(rsiNumber: string, routeCrid: string, selectedRoute: string, callingLine?: string | null, associatedData?: string | null, routeToVoiceMail?: boolean | null): Promise<boolean>;
147
- /**
148
- * Gets the list of existing route sessions for the specified rsi point.
149
- *
150
- * @param rsiNumber the rsi point extension number
151
- */
152
- getRouteSessions(rsiNumber: string): Promise<RouteSession[] | null>;
153
- /**
154
- * Return the specified route session.
155
- *
156
- * @param rsiNumber the rsi point extension number
157
- * @param routeCrid the routing session unique identifier
158
- */
159
- getRouteSession(rsiNumber: string, routeCrid: string): Promise<RouteSession | null>;
160
- }