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,51 @@
1
+ import { ComRecordParticipant } from "./comlog-types";
2
+ import { O2GComHistoryRecord } from "../../internal/types/comlog/o2gcomlog-types";
3
+ /**
4
+ * ComRecord class represents a communication record, that is an history
5
+ * call ticket stored by the O2G server for each conversation.
6
+ */
7
+ export declare class ComRecord {
8
+ private _id;
9
+ private _callRef;
10
+ private _acknowledged;
11
+ private _participants;
12
+ private _begin;
13
+ private _end;
14
+ private _beginConv;
15
+ /**
16
+ * @internal
17
+ */
18
+ private constructor();
19
+ /**
20
+ * Returns this communication record identifier.
21
+ */
22
+ get id(): number;
23
+ /**
24
+ * Returns the reference of the call that has created this communication record.
25
+ *
26
+ * @return the callRef the call reference.
27
+ */
28
+ get callRef(): string;
29
+ /**
30
+ * Returns whether this communication record has been acknowledged. This
31
+ * parameter can only be 'true' for a missed incoming call.
32
+ */
33
+ get acknowledged(): boolean;
34
+ /**
35
+ * Returns the start date of this call.
36
+ */
37
+ get begin(): Date;
38
+ /**
39
+ * Returns the end date of this call.
40
+ */
41
+ get end(): Date;
42
+ /**
43
+ * Return the participants
44
+ */
45
+ get participants(): ComRecordParticipant[];
46
+ get beginConversation(): Date;
47
+ /**
48
+ * @ignore
49
+ */
50
+ static build(record: O2GComHistoryRecord): ComRecord;
51
+ }
@@ -0,0 +1,74 @@
1
+ import { O2GEvent } from "../../internal/events/o2g-event";
2
+ import { ComRecord } from "./com-record";
3
+ /**
4
+ * Notification sent when a new comlog entry has been created.
5
+ */
6
+ export type OnComRecordCreated = O2GEvent<'OnComRecordCreated', {
7
+ /**
8
+ * Login name of the user (identifier which can be used for filtering).
9
+ */
10
+ loginName: string;
11
+ /**
12
+ * Contains all the fields of a call log record.
13
+ */
14
+ record: ComRecord;
15
+ }>;
16
+ /**
17
+ * Notification sent when one or more records have been modified.
18
+ * <p>
19
+ * Modification, could be trigerred by:
20
+ * <ul>
21
+ * <li>a change of state (e.g. from unanswered to answered)
22
+ * <li>a change of media list (e.g. IM and call in a conference).
23
+ * <li>a change of end date (e.g. when participants are dropped from a conference)
24
+ * </ul>
25
+ */
26
+ export type OnComRecordModified = O2GEvent<'OnComRecordModified', {
27
+ /**
28
+ * Login name of the user (identifier which can be used for filtering).
29
+ */
30
+ loginName: string;
31
+ /**
32
+ * Contains all or part of the modified fields of a modified com log record.(example: acknowledged).
33
+ */
34
+ record: ComRecord;
35
+ }>;
36
+ /**
37
+ * Notification sent when one or more unanswered comlog records have been acknowledged.
38
+ */
39
+ export type OnComRecordsAck = O2GEvent<'OnComRecordsAck', {
40
+ /**
41
+ * Login name of the user (identifier which can be used for filtering).
42
+ */
43
+ loginName: string;
44
+ /**
45
+ * A list of IDs of records which have been acknowledged.
46
+ */
47
+ recordIds: number[];
48
+ }>;
49
+ /**
50
+ * Notification sent when one or more unanswered comlog records have been acknowledged.
51
+ */
52
+ export type OnComRecordsDeleted = O2GEvent<'OnComRecordsDeleted', {
53
+ /**
54
+ * Login name of the user (identifier which can be used for filtering).
55
+ */
56
+ loginName: string;
57
+ /**
58
+ * A list of IDs of records which have been destroyed Remark : if element is not present it means that all user's records have been destroyed.
59
+ */
60
+ recordIds: number[];
61
+ }>;
62
+ /**
63
+ * Notification sent when one or more unanswered comlog records have been unacknowledged.
64
+ */
65
+ export type OnComRecordsUnAck = O2GEvent<'OnComRecordsUnAck', {
66
+ /**
67
+ * Login name of the user (identifier which can be used for filtering).
68
+ */
69
+ loginName: string;
70
+ /**
71
+ * A list of IDs of records which have been unacknowledged.
72
+ */
73
+ recordIds: number[];
74
+ }>;
@@ -0,0 +1,131 @@
1
+ import { Reason } from "./reason";
2
+ import { Role } from "./role";
3
+ import { PartyInfo } from "../common/common-types";
4
+ /**
5
+ * ComRecordParticipant represents a participant referenced in a com
6
+ * record.
7
+ * <p><b><u>Record content</u></b>: For a <b>simple call</b> (user A calls user B), the
8
+ * call record on each party will contain <u>both the participant A and the
9
+ * participant B</u>: (no guaranty on the order of the participants on 2
10
+ * successive responses).
11
+ * <table>
12
+ * <caption>Simple call</caption>
13
+ * <tr>
14
+ * <th>Side</th>
15
+ * <th>Com record content</th>
16
+ * </tr>
17
+ * <tr>
18
+ * <td>On A side</td>
19
+ * <td>
20
+ * <ul>
21
+ * <li>Participant A (the owner of the record) with role=Caller and the
22
+ * answered status (whether the call has been answered or not).</li>
23
+ * <li>Participant B : neither the role nor the state is provided.</li>
24
+ * </ul>
25
+ * </td>
26
+ * </tr>
27
+ * <tr>
28
+ * <td>On B side</td>
29
+ * <td>
30
+ * <ul>
31
+ * <li>Participant A : neither the role nor the state is provided.</li>
32
+ * <li>Participant B (the owner of the record) with role=Callee and the
33
+ * answered status (whether the call has been answered or not)</li>
34
+ * </ul>
35
+ * </td>
36
+ * </tr>
37
+ * </table>
38
+ * <p>
39
+ * For a <b>re-routed call</b> (user A calls user B, the call is re-routed on
40
+ * user C, caused by overflow, redirection or pickup), the record generated on
41
+ * each side including the user B side (the "victim" of the re-routing) will not
42
+ * contain as participant the user B itself because he was not the last
43
+ * destination of the call:
44
+ * <table>
45
+ * <caption>Re-routed call</caption>
46
+ * <tr>
47
+ * <th>Side</th>
48
+ * <th>Com record content</th>
49
+ * </tr>
50
+ * <tr>
51
+ * <td>On A side</td>
52
+ * <td>
53
+ * <ul>
54
+ * <li>Participant A : with role=Caller, the answered status,
55
+ * initialCalled=B.</li>
56
+ * <li>Participant C.</li>
57
+ * </ul>
58
+ * </td>
59
+ * </tr>
60
+ * <tr>
61
+ * <td>On B side</td>
62
+ * <td>
63
+ * <ul>
64
+ * <li>Participant A : neither the role nor the state is provided.</li>
65
+ * <li>Participant C with role=Callee, the answered status (whether the
66
+ * call has been answered or not) and initialCalled=B which tells B that he was
67
+ * called by A but the call has been rerouted to C(with a reason) which answered
68
+ * or not to the call</li>
69
+ * </ul>
70
+ * </td>
71
+ * </tr>
72
+ * <tr>
73
+ * <td>On C side</td>
74
+ * <td>
75
+ * <ul>
76
+ * <li>Participant A : neither the role nor the state is provided.</li>
77
+ * <li>Participant C with role=Callee, the answered status (whether the
78
+ * call has been answered or not) and initialCalled=B.</li>
79
+ * </ul>
80
+ * </td>
81
+ * </tr>
82
+ * </table>
83
+ * <p>
84
+ * Furthermore, for a multi-parties call using addParticipant, the already
85
+ * connected users in the call will also received a call record which will
86
+ * contain the answered status of the added participant: this information is
87
+ * provided to distinguish the added participants which have really answered and
88
+ * the other which decline the call.
89
+ * <p><b><u>Identification of the participant</u></b>: In the comlog notification events,
90
+ * the participant owner is identified only by its loginName (in order to reduce
91
+ * the event call flow), the other participants are identified with their full
92
+ * identity (loginName, phoneNumber).
93
+ * <p>
94
+ * In a {@link QueryResult} result:
95
+ * <ul>
96
+ * <li>if no optimization is asked, all the participants are identified with
97
+ * their full identity.</li>
98
+ * <li>If the 'optimized' parameter is set to 'true', only the first
99
+ * occurence of a participant (owner or other) is identified with its full
100
+ * identity. The following occurences are identified only with the
101
+ * phonenumber.</li>
102
+ * </ul>
103
+ *
104
+ */
105
+ export type ComRecordParticipant = {
106
+ /**
107
+ * The participant's role
108
+ */
109
+ role: Role;
110
+ /**
111
+ * Whether this participant has answered the call.
112
+ */
113
+ answered?: boolean;
114
+ /**
115
+ * Returns this participant's identity.
116
+ */
117
+ identity: PartyInfo;
118
+ /**
119
+ * Whether this participant is anonymous.
120
+ */
121
+ anonymous: boolean;
122
+ /**
123
+ * The number that has been initially called when this participant has
124
+ * been entered in the call.
125
+ */
126
+ initialCalled: PartyInfo;
127
+ /**
128
+ * The reason why the call has been established, rerouted, terminated ...
129
+ */
130
+ reason: Reason;
131
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Option enum defines the possible filter option when querying a communication log.
3
+ * It's possible to combine the options:
4
+ * @example
5
+ * ```typescript
6
+ * let options = Option.UNANSWERED | Option.UNACKNOWLEDGED
7
+ * ```
8
+ * @see {@link QueryFilter}
9
+ */
10
+ export declare enum Option {
11
+ /**
12
+ * The default value that represents no filtering.
13
+ */
14
+ ONE = 0,
15
+ /**
16
+ * Use this value to filter unanswered calls.
17
+ */
18
+ UNANSWERED = 1,
19
+ /**
20
+ * Use this value to filter unacknowledged calls.
21
+ */
22
+ UNACKNOWLEDGED = 2
23
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The Page class allows to define a paging mechanism to query the
3
+ * communication log.
4
+ * @see {@link CommunicationLog.getComRecords}
5
+ */
6
+ export declare class Page {
7
+ private _offset;
8
+ private _limit;
9
+ /**
10
+ * Constructs a new Page starting with the specified offset and with the
11
+ * specified length.
12
+ *
13
+ * @param offset the page offset
14
+ * @param length the page length
15
+ */
16
+ constructor(offset: number, limit: number);
17
+ /**
18
+ * Moves to the next page.
19
+ */
20
+ next(): void;
21
+ /**
22
+ * Moves to the previous page.
23
+ */
24
+ previous(): void;
25
+ /**
26
+ * Returns the offset of the page that is the offset of the first com record.
27
+ */
28
+ get offset(): number;
29
+ /**
30
+ * Returns the maximum number of record in this page.
31
+ */
32
+ get limit(): number;
33
+ }
@@ -0,0 +1,44 @@
1
+ import { Role } from "./role";
2
+ import { Option } from "./option";
3
+ /**
4
+ * QueryFilter class represents a communication log query filter. It is used to filter records in a
5
+ * {@link CommunicationLog.getComRecords} query.
6
+ */
7
+ export declare class QueryFilter {
8
+ /**
9
+ * The start date from which the query searches for matching the
10
+ * records. When used, the query returns the records not older than this date.
11
+ * When omitted the query searches for matching records starting from the
12
+ * oldest.
13
+ */
14
+ after?: Date;
15
+ /**
16
+ * The end date from which the query stop searching the records. When
17
+ * used the query returns the records older than this date. When omitted the
18
+ * query searches for matching records until the newest.
19
+ */
20
+ before?: Date;
21
+ /**
22
+ * The search options.
23
+ */
24
+ options?: Option;
25
+ /**
26
+ * The call reference used in this query filter. When used, the query
27
+ * will retrieve only the com record related to this call reference.
28
+ */
29
+ callRef: string;
30
+ /**
31
+ * The remote party. When used, filters on the records in which the user
32
+ * is engaged with this remote party.
33
+ */
34
+ remotePartyId: string;
35
+ /**
36
+ * The user's role in the communication. Allows to filter on the user's
37
+ * role in the communication.
38
+ */
39
+ role?: Role;
40
+ /**
41
+ * @internal
42
+ */
43
+ constructor();
44
+ }
@@ -0,0 +1,27 @@
1
+ import { ComRecord } from "./com-record";
2
+ import { Page } from "./page";
3
+ import { O2GComHistoryRecords } from "../../internal/types/comlog/o2gcomlog-types";
4
+ /**
5
+ * QueryResult class represents the result of a communication log query.
6
+ * The {@link CommunicationLog} service provides a paging mechanism that allows the application to query the result by pages.
7
+ */
8
+ export declare class QueryResult {
9
+ private _count;
10
+ private _page;
11
+ private _records;
12
+ /**
13
+ * @internal
14
+ */
15
+ private constructor();
16
+ /** Returns the number of records in this result. */
17
+ get count(): number;
18
+ /** Returns the page associated with this result. */
19
+ get page(): Page;
20
+ /** Gets the list of communication records returned by the query. */
21
+ get records(): ComRecord[];
22
+ /**
23
+ * @ignore
24
+ * Factory method to build a QueryResult from raw O2G records.
25
+ */
26
+ static build(o2gComRecords: O2GComHistoryRecords): QueryResult;
27
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Reason enum defines the why reason the communication has been released, established or rerouted.
3
+ */
4
+ export declare enum Reason {
5
+ /**
6
+ * The call was abandonned because there was no Available trunk.
7
+ */
8
+ ALL_TRUNK_BUSY = "ALL_TRUNK_BUSY",
9
+ /**
10
+ * The call was refused because the dialed number is not valid.
11
+ */
12
+ INVALID_NUMBER = "INVALID_NUMBER",
13
+ /**
14
+ * The call was canceled by the caller.
15
+ */
16
+ ABANDONED = "ABANDONED",
17
+ /**
18
+ * The call failed because the called party is busy.
19
+ */
20
+ BUSY = "BUSY",
21
+ /**
22
+ * The call was set to be a conference.
23
+ */
24
+ CONFERENCED = "CONFERENCED",
25
+ /**
26
+ * he call was picked up.
27
+ */
28
+ PICKUP = "PICKUP",
29
+ /**
30
+ * The call was forwarded to another destination.
31
+ */
32
+ FORWARDED = "FORWARDED",
33
+ /**
34
+ * The call was redirected to another destination.
35
+ */
36
+ REDIRECTED = "REDIRECTED",
37
+ /**
38
+ * The call was released since redirection to another destination fails.
39
+ */
40
+ RELEASED_ON_REDIRECT = "RELEASED_ON_REDIRECT",
41
+ /**
42
+ * The call was transferred.
43
+ */
44
+ TRANSFERRED = "TRANSFERRED",
45
+ /**
46
+ * The call was released since transfer to another destination fails.
47
+ */
48
+ RELEASED_ON_TRANSFER = "RELEASED_ON_TRANSFER",
49
+ /**
50
+ * The call ended on voicemail.
51
+ */
52
+ VOICEMAIL = "VOICEMAIL",
53
+ /**
54
+ * The call normally ended.
55
+ */
56
+ NORMAL = "NORMAL",
57
+ /**
58
+ * The reason is unknown.
59
+ */
60
+ UNKNOWN = "UNKNOWN"
61
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Role defines the roles a participant can have in a com record.
3
+ */
4
+ export declare enum Role {
5
+ /**
6
+ * The participant is a caller party.
7
+ */
8
+ CALLER = "CALLER",
9
+ /**
10
+ * The participant is a called party.
11
+ */
12
+ CALLEE = "CALLEE",
13
+ /**
14
+ * The role is unknown.
15
+ */
16
+ UNKNOWN = "UNKNOWN"
17
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * MainType represents the main type a participant can be.
3
+ */
4
+ export declare enum MainType {
5
+ /**
6
+ * The participant is a user of the system.
7
+ */
8
+ USER = "USER",
9
+ /**
10
+ * The participant is a device of the system.
11
+ */
12
+ DEVICE = "DEVICE",
13
+ /**
14
+ * The participant is a service of the system. For exemple the voice mail.
15
+ */
16
+ SERVICE = "SERVICE",
17
+ /**
18
+ * The participant is not a user of the system.
19
+ */
20
+ EXTERNAL = "EXTERNAL",
21
+ /**
22
+ * The participant type has not been identified.
23
+ */
24
+ UNKNOWN = "UNKNOWN"
25
+ }
26
+ /**
27
+ * Identifier represents the information used to uniquely identify a participant; either the login name or the phone number.
28
+ */
29
+ export type Identifier = {
30
+ /**
31
+ * Login name.
32
+ */
33
+ loginName: string;
34
+ /**
35
+ * Company phone number.
36
+ */
37
+ phoneNumber: string;
38
+ /**
39
+ * True is this phone number is part of a multi-device configuration.
40
+ * @since 2.7.3
41
+ */
42
+ multiLine: boolean;
43
+ };
44
+ /**
45
+ * PartyInfo represents a party involved in a call.
46
+ */
47
+ export type PartyInfo = {
48
+ /**
49
+ * This participant's identifier; Either the login name or the phone number.
50
+ */
51
+ id: Identifier;
52
+ /**
53
+ * This participant's first name.
54
+ */
55
+ firstName: string;
56
+ /**
57
+ * This participant's last name.
58
+ */
59
+ lastName: string;
60
+ /**
61
+ * This participant's display name.
62
+ * If 'firstName' and 'lastName' are filled, the 'displayName' is 'null'.
63
+ */
64
+ displayName: string;
65
+ /**
66
+ * This participant's type.
67
+ */
68
+ type: {
69
+ /**
70
+ * The main type.
71
+ */
72
+ main: MainType;
73
+ /**
74
+ * The sub-type.
75
+ */
76
+ subType: string;
77
+ };
78
+ };
@@ -0,0 +1,90 @@
1
+ import { FilterItem } from "./filter-item";
2
+ import { OperationFilter } from "./operation-filter";
3
+ /**
4
+ * Criteria allows to specifiy a filter to apply on a directory search.
5
+ * <p>
6
+ * A simple criteria is a tuple of the form: [Attribute, Operation, Value]. For example : [LAST_NAME, BEGINS_WITH, "fr"].
7
+ * <br>A Criteria can also be the logical OR or AND combination of the set of other Criteria's.
8
+ * <p>
9
+ * The acceptable values for the Attributes are:<br>
10
+ * <table>
11
+ * <caption>Attributes values</caption>
12
+ * <thead>
13
+ * <tr><th>Value</th><th>Description</th></tr>
14
+ * </thead>
15
+ * <tr><td>LAST_NAME</td><td>The last name.</td></tr>
16
+ * <tr><td>FIRST_NAME</td><td>The first name.</td></tr>
17
+ * <tr><td>LOGIN_NAME</td><td>The login name.</td></tr>
18
+ * <tr><td>PHONE_NUMBER</td><td>The phone number.</td></tr>
19
+ * </table>
20
+ * <p>
21
+ * The acceptable values for the Operands are<br>
22
+ * <table>
23
+ * <caption>Operands values</caption>
24
+ * <thead>
25
+ * <tr><th>Value</th><th>Description</th></tr>
26
+ * </thead>
27
+ * <tr><td>BEGINS_WITH</td><td>The attribute must begin with the given value.</td></tr>
28
+ * <tr><td>ENDS_WITH</td><td>The attribute must end with the given value.</td></tr>
29
+ * <tr><td>CONTAINS</td><td>The attribute must contain with the given value.</td></tr>
30
+ * <tr><td>EQUAL_IGNORE_CASE</td><td>The attribute is equal to the given value (case insensitive comparison).</td></tr>
31
+ * </table>
32
+ * <p><b><u>exemples</u></b>:
33
+ * @example
34
+ * ```typescript
35
+ * // Search users whom last name begins with 'b'
36
+ * let criteria = Criteria.create(
37
+ * FilterItem.LASTNAME,
38
+ * OperationFilter.BEGINS_WITH,
39
+ * 'b');
40
+ *
41
+ * // Search users whom last name begins with 'b' and first name contains 'ja'
42
+ * let criteria = Criteria.and(
43
+ * Criteria.create(
44
+ * FilterItem.LASTNAME,
45
+ * OperationFilter.BEGINS_WITH,
46
+ * 'b'
47
+ * ),
48
+ * Criteria.create(
49
+ * FilterItem.FIRSTNAME,
50
+ * OperationFilter.CONTAINS,
51
+ * 'ja'
52
+ * )
53
+ * );
54
+ * ```
55
+ *
56
+ */
57
+ export declare class Criteria {
58
+ private field;
59
+ private operation;
60
+ private operand;
61
+ private static _makeField;
62
+ private static _makeOperation;
63
+ /**
64
+ * @internal
65
+ */
66
+ constructor();
67
+ /**
68
+ * Create a new search Criteria with the specified attribute filter, operation
69
+ * filter and value.
70
+ *
71
+ * @param field the attribute filter
72
+ * @param operation the operation
73
+ * @param operand the value associated to this critera
74
+ */
75
+ static create(field: FilterItem, operation: OperationFilter, value: string): Criteria;
76
+ /**
77
+ * Create a search Criteria that is the OR combination of the given
78
+ * list of Criterias.
79
+ *
80
+ * @param criterias a list of Criteria objects.
81
+ */
82
+ static or(): Criteria;
83
+ /**
84
+ * Create a search Criteria that is the AND combination of the given
85
+ * list of Criterias.
86
+ *
87
+ * @param criterias a list of Criteria objects.
88
+ */
89
+ static and(): Criteria;
90
+ }
@@ -0,0 +1,44 @@
1
+ import { PartyInfo } from "../common/common-types";
2
+ /**
3
+ * Code represents the status of a directory search. Each time a call to
4
+ * {@link Directory.getResults} is done, the returned result code must be
5
+ * tested.
6
+ */
7
+ export declare enum Code {
8
+ /**
9
+ * Responses are provided this time. Continue to invoking
10
+ * {@linkplain Directory.getResults} periodically to get the next results.
11
+ */
12
+ OK = "OK",
13
+ /**
14
+ * No response received. Continue to invoking
15
+ * {@link Directory.getResults} to get more results.
16
+ */
17
+ NOK = "NOK",
18
+ /**
19
+ * Search is finished.
20
+ */
21
+ FINISH = "FINISH",
22
+ /**
23
+ * Search is ended for timeout reason.
24
+ */
25
+ TIMEOUT = "TIMEOUT"
26
+ }
27
+ /**
28
+ * SearchResult represents the result of a directory search.
29
+ */
30
+ export type SearchResult = {
31
+ /**
32
+ * The result code of this search result.
33
+ */
34
+ resultCode: Code;
35
+ /**
36
+ * The results.
37
+ */
38
+ resultElements: {
39
+ /**
40
+ * The contacts found.
41
+ */
42
+ contacts: PartyInfo[];
43
+ }[];
44
+ };