@vonage/client-sdk 1.3.0-rc.0 → 1.3.0-rc.2
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.
- package/README.md +2 -2
- package/api_docs/ts/assets/navigation.js +1 -1
- package/api_docs/ts/assets/search.js +1 -1
- package/api_docs/ts/assets/style.css +11 -0
- package/api_docs/ts/classes/ClientConfig.html +4 -9
- package/api_docs/ts/classes/ClientInitConfig.html +5 -4
- package/api_docs/ts/classes/VonageClient.html +71 -71
- package/api_docs/ts/functions/none.html +2 -0
- package/api_docs/ts/functions/setDefaultLoggingLevel.html +3 -3
- package/api_docs/ts/functions/setVonageClientLoggingLevel.html +3 -3
- package/api_docs/ts/functions/some.html +3 -0
- package/api_docs/ts/index.html +4 -4
- package/api_docs/ts/interfaces/CallSayParams.html +8 -0
- package/api_docs/ts/interfaces/Channel.html +8 -0
- package/api_docs/ts/interfaces/ClientConfigObject.html +18 -0
- package/api_docs/ts/interfaces/ClientInitConfigObject.html +24 -0
- package/api_docs/ts/interfaces/Conversation.html +20 -0
- package/api_docs/ts/interfaces/ConversationProperties.html +8 -0
- package/api_docs/ts/interfaces/ConversationTimestamp.html +5 -0
- package/api_docs/ts/interfaces/ConversationsPage.html +8 -0
- package/api_docs/ts/interfaces/CreateConversationParameters.html +15 -0
- package/api_docs/ts/interfaces/CustomConversationEvent.html +9 -9
- package/api_docs/ts/interfaces/EmbeddedInfo.html +5 -5
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +7 -7
- package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +8 -8
- package/api_docs/ts/interfaces/EventsPage.html +8 -0
- package/api_docs/ts/interfaces/GetConversationEventsParameters.html +14 -0
- package/api_docs/ts/interfaces/GetConversationMembersParameters.html +8 -0
- package/api_docs/ts/interfaces/GetConversationsParameters.html +12 -0
- package/api_docs/ts/interfaces/Leg.html +20 -0
- package/api_docs/ts/interfaces/LegChannel.html +8 -0
- package/api_docs/ts/interfaces/Location.html +3 -2
- package/api_docs/ts/interfaces/Member.html +12 -0
- package/api_docs/ts/interfaces/MemberChannel.html +8 -0
- package/api_docs/ts/interfaces/MemberEventBody.html +6 -0
- package/api_docs/ts/interfaces/MemberInvitedEvent.html +4 -4
- package/api_docs/ts/interfaces/MemberJoinedEvent.html +8 -8
- package/api_docs/ts/interfaces/MemberLeftEvent.html +8 -8
- package/api_docs/ts/interfaces/MemberTimestamp.html +5 -0
- package/api_docs/ts/interfaces/MembersPage.html +8 -0
- package/api_docs/ts/interfaces/MessageAudioEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageAudioEventBody.html +6 -0
- package/api_docs/ts/interfaces/MessageCustomEvent.html +8 -8
- package/api_docs/ts/interfaces/MessageCustomEventBody.html +6 -0
- package/api_docs/ts/interfaces/MessageFileEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageFileEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageImageEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageImageEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageLocationEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageLocationEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageTemplateEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageTemplateEventBody.html +10 -0
- package/api_docs/ts/interfaces/MessageTextEvent.html +8 -8
- package/api_docs/ts/interfaces/MessageTextEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageVCardEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageVCardEventBody.html +7 -0
- package/api_docs/ts/interfaces/MessageVideoEvent.html +10 -10
- package/api_docs/ts/interfaces/MessageVideoEventBody.html +7 -0
- package/api_docs/ts/interfaces/RTCQuality.html +11 -0
- package/api_docs/ts/interfaces/RtcStats.html +11 -0
- package/api_docs/ts/interfaces/System.html +4 -3
- package/api_docs/ts/interfaces/Template.html +3 -2
- package/api_docs/ts/interfaces/UpdateConversationParameters.html +12 -2
- package/api_docs/ts/interfaces/User.html +16 -0
- package/api_docs/ts/interfaces/UserChannels.html +14 -0
- package/api_docs/ts/interfaces/UserTimestamp.html +5 -0
- package/api_docs/ts/interfaces/VonageEvent.html +2 -0
- package/api_docs/ts/interfaces/VonageLogger.html +10 -0
- package/api_docs/ts/interfaces/Whatsapp.html +3 -2
- package/api_docs/ts/modules.html +64 -16
- package/api_docs/ts/types/ChannelType.html +2 -0
- package/api_docs/ts/types/ConfigRegion.html +3 -0
- package/api_docs/ts/types/ConversationEvent.html +2 -0
- package/api_docs/ts/types/ConversationState.html +2 -0
- package/api_docs/ts/types/CustomData.html +2 -2
- package/api_docs/ts/types/From.html +2 -0
- package/api_docs/ts/types/Json.html +2 -0
- package/api_docs/ts/types/JsonValue.html +2 -0
- package/api_docs/ts/types/LoggingLevel.html +4 -0
- package/api_docs/ts/types/MemberState.html +2 -0
- package/api_docs/ts/types/NonPersistentConversationEvent.html +2 -0
- package/api_docs/ts/types/Option.html +3 -0
- package/api_docs/ts/types/OrderBy.html +2 -0
- package/api_docs/ts/types/PersistentConversationEvent.html +2 -0
- package/api_docs/ts/types/PresentingOrder.html +2 -0
- package/api_docs/ts/types/Topics.html +2 -0
- package/api_docs/ts/variables/Topics-1.html +2 -0
- package/dist/client/VonageClient.d.ts +74 -7
- package/dist/client/index.cjs +8539 -8166
- package/dist/client/index.mjs +8539 -8166
- package/dist/kotlin/JsUnions.d.ts +127 -101
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +23 -41
- package/dist/lib/MediaClient.d.ts +0 -1
- package/dist/utils/ClientConfig.d.ts +48 -11
- package/dist/utils/ConversationEventBodies.d.ts +134 -0
- package/dist/utils/ConversationModels.d.ts +133 -18
- package/dist/utils/JsonUtils.d.ts +6 -0
- package/dist/utils/Option.d.ts +14 -0
- package/dist/utils/RequestParameterModels.d.ts +82 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/logging.d.ts +26 -2
- package/dist/vonageClientSDK.js +8465 -8135
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +8465 -8135
- package/package.json +4 -2
- package/typedoc.json +6 -3
- package/api_docs/ts/interfaces/ConversationEvent.html +0 -8
- package/api_docs/ts/interfaces/ConversationState.html +0 -198
- package/api_docs/ts/interfaces/From.html +0 -4
- package/api_docs/ts/interfaces/MemberState.html +0 -198
- package/api_docs/ts/interfaces/NonPersistentConversationEvent.html +0 -8
- package/api_docs/ts/interfaces/PersistentConversationEvent.html +0 -9
- package/dist/lib/ConnectivityManager.d.ts +0 -11
|
@@ -1,11 +1,56 @@
|
|
|
1
1
|
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
2
2
|
import vonage from '../utils/vonage';
|
|
3
3
|
import { LoggingLevel, VonageLogger, VonageLoggerJS } from './logging';
|
|
4
|
+
/**
|
|
5
|
+
* The datacenter region for the Client.
|
|
6
|
+
*
|
|
7
|
+
* It can be set either via {@link ClientInitConfigObject} or {@link ClientConfigObject}.
|
|
8
|
+
*/
|
|
4
9
|
export type ConfigRegion = vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name;
|
|
5
10
|
export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
|
|
11
|
+
/**
|
|
12
|
+
* An convenience union for {@link ConfigObjectJS} allowing to pass strings for enum properties.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Represents the configuration object for the client.
|
|
16
|
+
*
|
|
17
|
+
* The `ClientConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
18
|
+
* These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings.
|
|
19
|
+
*
|
|
20
|
+
* @property region The Vonage datacenter to use
|
|
21
|
+
* @property apiUrl The API URL of your chosen datacenter, if set overrides default from region
|
|
22
|
+
* @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region
|
|
23
|
+
* @property websocketPath The Path component appended to the Websocket URL
|
|
24
|
+
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
25
|
+
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
26
|
+
* @interface
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* [[include:snippet_SetClientConfig.txt]]
|
|
30
|
+
*/
|
|
6
31
|
export type ClientConfigObject = ConfigObjectJS | ({
|
|
7
32
|
region?: ConfigRegion;
|
|
8
33
|
} & Omit<ConfigObjectJS, 'region'>);
|
|
34
|
+
/**
|
|
35
|
+
* Represents the configuration object used to initialize the client.
|
|
36
|
+
*
|
|
37
|
+
* The `ClientInitConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
38
|
+
* These properties include all the ones in {@link ClientConfigObject} plus {@link loggingLevel}, {@link customLoggers} and {@link disableInternalLogger}.
|
|
39
|
+
*
|
|
40
|
+
* @property loggingLevel The Logging Level to use
|
|
41
|
+
* @property customLoggers A List of custom loggers
|
|
42
|
+
* @property disableInternalLogger Whether to enable the SDK internal logger
|
|
43
|
+
* @property region The Vonage datacenter to use
|
|
44
|
+
* @property apiUrl The API URL of your chosen datacenter, if set overrides default from region
|
|
45
|
+
* @property websocketUrl The WebSocket URL of your chosen datacenter, if set overrides default from region
|
|
46
|
+
* @property websocketPath The Path component appended to the Websocket URL
|
|
47
|
+
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
48
|
+
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
49
|
+
* @interface
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* [[include:snippet_Logging.txt]]
|
|
53
|
+
*/
|
|
9
54
|
export type ClientInitConfigObject = InitConfigObjectJS | ({
|
|
10
55
|
region?: ConfigRegion;
|
|
11
56
|
loggingLevel?: LoggingLevel;
|
|
@@ -16,23 +61,14 @@ export interface ConfigObjectJS {
|
|
|
16
61
|
apiUrl?: Nullable<string>;
|
|
17
62
|
websocketUrl?: Nullable<string>;
|
|
18
63
|
websocketPath?: Nullable<string>;
|
|
19
|
-
autoMediaReoffer?: Nullable<boolean>;
|
|
20
64
|
rtcStatsTelemetry?: Nullable<boolean>;
|
|
65
|
+
autoReconnectMedia?: Nullable<boolean>;
|
|
21
66
|
}
|
|
22
67
|
export interface InitConfigObjectJS extends ConfigObjectJS {
|
|
23
68
|
loggingLevel?: Nullable<vonage.LoggingLevelJS>;
|
|
24
69
|
customLoggers?: Nullable<VonageLoggerJS[]>;
|
|
25
70
|
disableInternalLogger?: Nullable<boolean>;
|
|
26
71
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Represents the configuration object for the client.
|
|
29
|
-
*
|
|
30
|
-
* The `ClientConfig` class provides a convenient way to configure the client by specifying various properties.
|
|
31
|
-
* These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* [[include:snippet_setClientConfig.txt]]
|
|
35
|
-
*/
|
|
36
72
|
export declare class ClientConfig extends vonage.CoreClientConfigJS {
|
|
37
73
|
/**
|
|
38
74
|
* Constructs a new instance of the class.
|
|
@@ -52,7 +88,8 @@ export declare class ClientInitConfig implements InitConfigObjectJS {
|
|
|
52
88
|
apiUrl?: Nullable<string>;
|
|
53
89
|
websocketUrl?: Nullable<string>;
|
|
54
90
|
websocketPath?: Nullable<string>;
|
|
55
|
-
|
|
91
|
+
rtcStatsTelemetry?: Nullable<boolean>;
|
|
92
|
+
autoReconnectMedia?: Nullable<boolean>;
|
|
56
93
|
/**
|
|
57
94
|
* Constructs a new instance of the class.
|
|
58
95
|
*/
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import vonage from '../utils/vonage';
|
|
2
|
+
/**
|
|
3
|
+
* The {@link MessageAudioEvent} Body type
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
* @property audio The audio URL
|
|
7
|
+
* @property deleted The message deletion timestamp
|
|
8
|
+
* @interface
|
|
9
|
+
* @group Chat
|
|
10
|
+
*/
|
|
11
|
+
export type MessageAudioEventBody = vonage.MessageAudioEventJS.MessageAudioEventBody;
|
|
12
|
+
/**
|
|
13
|
+
* The {@link MessageCustomEvent} Body type
|
|
14
|
+
*
|
|
15
|
+
* @beta
|
|
16
|
+
* @property custom The message custom data
|
|
17
|
+
* @property deleted The message deletion timestamp
|
|
18
|
+
* @interface
|
|
19
|
+
* @group Chat
|
|
20
|
+
*/
|
|
21
|
+
export type MessageCustomEventBody = vonage.MessageCustomEventJS.MessageCustomEventBody;
|
|
22
|
+
/**
|
|
23
|
+
* The {@link MessageFileEvent} Body type
|
|
24
|
+
*
|
|
25
|
+
* @beta
|
|
26
|
+
* @property fileUrl The file URL
|
|
27
|
+
* @property deleted The message deletion timestamp
|
|
28
|
+
* @interface
|
|
29
|
+
* @group Chat
|
|
30
|
+
*/
|
|
31
|
+
export type MessageFileEventBody = vonage.MessageFileEventJS.MessageFileEventBody;
|
|
32
|
+
/**
|
|
33
|
+
* The {@link MessageImageEvent} Body type
|
|
34
|
+
*
|
|
35
|
+
* @beta
|
|
36
|
+
* @property imageUrl The image URL
|
|
37
|
+
* @property deleted The message deletion timestamp
|
|
38
|
+
* @interface
|
|
39
|
+
* @group Chat
|
|
40
|
+
*/
|
|
41
|
+
export type MessageImageEventBody = vonage.MessageImageEventJS.MessageImageEventBody;
|
|
42
|
+
/**
|
|
43
|
+
* The {@link MessageLocationEvent} Body type
|
|
44
|
+
*
|
|
45
|
+
* @beta
|
|
46
|
+
* @property location The {@link Location} object
|
|
47
|
+
* @property deleted The message deletion timestamp
|
|
48
|
+
* @interface
|
|
49
|
+
* @group Chat
|
|
50
|
+
*/
|
|
51
|
+
export type MessageLocationEventBody = vonage.MessageLocationEventJS.MessageLocationEventBody;
|
|
52
|
+
/**
|
|
53
|
+
* The {@link MessageTemplateEvent} Body type
|
|
54
|
+
*
|
|
55
|
+
* @beta
|
|
56
|
+
* @property template The {@link Template} object
|
|
57
|
+
* @property whatsapp The {@link Whatsapp} object
|
|
58
|
+
* @property deleted The message deletion timestamp
|
|
59
|
+
* @interface
|
|
60
|
+
* @group Chat
|
|
61
|
+
*/
|
|
62
|
+
export type MessageTemplateEventBody = vonage.MessageTemplateEventJS.MessageTemplateEventBody;
|
|
63
|
+
/**
|
|
64
|
+
* The {@link MessageVCardEvent} Body type
|
|
65
|
+
*
|
|
66
|
+
* @beta
|
|
67
|
+
* @property vcardUrl The VCard URL
|
|
68
|
+
* @property deleted The message deletion timestamp
|
|
69
|
+
* @interface
|
|
70
|
+
* @group Chat
|
|
71
|
+
*/
|
|
72
|
+
export type MessageVCardEventBody = vonage.MessageVCardEventJS.MessageVCardEventBody;
|
|
73
|
+
/**
|
|
74
|
+
* The {@link MessageVideoEvent} Body type
|
|
75
|
+
*
|
|
76
|
+
* @beta
|
|
77
|
+
* @property videoUrl The Video URL
|
|
78
|
+
* @property deleted The message deletion timestamp
|
|
79
|
+
* @interface
|
|
80
|
+
* @group Chat
|
|
81
|
+
*/
|
|
82
|
+
export type MessageVideoEventBody = vonage.MessageVideoEventJS.MessageVideoEventBody;
|
|
83
|
+
/**
|
|
84
|
+
* The {@link MessageTextEvent} Body type
|
|
85
|
+
*
|
|
86
|
+
* @beta
|
|
87
|
+
* @property text The message text
|
|
88
|
+
* @property deleted The message deletion timestamp
|
|
89
|
+
* @interface
|
|
90
|
+
* @group Chat
|
|
91
|
+
*/
|
|
92
|
+
export type MessageTextEventBody = vonage.MessageTextEventJS.MessageTextEventBody;
|
|
93
|
+
/**
|
|
94
|
+
* The {@link MemberInvitedEvent}, {@link MemberJoinedEvent} and {@link MemberLeftEvent} Body type
|
|
95
|
+
*
|
|
96
|
+
* @beta
|
|
97
|
+
* @property memberId The member id
|
|
98
|
+
* @property user The {@link User} associated to the member
|
|
99
|
+
* @interface
|
|
100
|
+
* @group Chat
|
|
101
|
+
*/
|
|
102
|
+
export type MemberEventBody = vonage.MemberEventBodyJS;
|
|
103
|
+
/**
|
|
104
|
+
* The Location object for a {@link MessageLocationEventBody}
|
|
105
|
+
*
|
|
106
|
+
* @beta
|
|
107
|
+
* @group Chat
|
|
108
|
+
*/
|
|
109
|
+
export interface Location {
|
|
110
|
+
name?: string | null;
|
|
111
|
+
address?: string | null;
|
|
112
|
+
latitude: string;
|
|
113
|
+
longitude: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The Template object for a {@link MessageTemplateEventBody}
|
|
117
|
+
*
|
|
118
|
+
* @beta
|
|
119
|
+
* @group Chat
|
|
120
|
+
*/
|
|
121
|
+
export interface Template {
|
|
122
|
+
name: string;
|
|
123
|
+
parameters?: string[] | null;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The Whatsapp object for a {@link MessageTemplateEventBody}
|
|
127
|
+
*
|
|
128
|
+
* @beta
|
|
129
|
+
* @group Chat
|
|
130
|
+
*/
|
|
131
|
+
export interface Whatsapp {
|
|
132
|
+
policy: string;
|
|
133
|
+
locale: string;
|
|
134
|
+
}
|
|
@@ -1,39 +1,154 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
2
|
import { ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a conversation
|
|
5
|
+
*
|
|
6
|
+
* @property id The conversation id
|
|
7
|
+
* @property name The conversation name
|
|
8
|
+
* @property timestamp The conversation timestamp
|
|
9
|
+
* @property memberId The user member id in the conversation
|
|
10
|
+
* @property memberState The user member state in the conversation
|
|
11
|
+
* @property displayName The conversation display name
|
|
12
|
+
* @property imageUrl The conversation image url
|
|
13
|
+
* @property state The conversation state
|
|
14
|
+
* @property properties The conversation properties
|
|
15
|
+
* @interface
|
|
16
|
+
*/
|
|
3
17
|
export type Conversation = vonage.ConversationJS & {
|
|
4
18
|
memberState?: MemberState;
|
|
5
19
|
state?: ConversationState;
|
|
6
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Represents a {@link Conversation} timestamps
|
|
23
|
+
*
|
|
24
|
+
* @interface
|
|
25
|
+
*/
|
|
26
|
+
export type ConversationTimestamp = vonage.ConversationTimestampJS;
|
|
27
|
+
/**
|
|
28
|
+
* Represents the properties for a {@link Conversation}
|
|
29
|
+
*
|
|
30
|
+
* @property ttl The time-to-live (TTL) for the conversation in seconds.
|
|
31
|
+
* @property customSortKey A string according to which Conversations will be ordered
|
|
32
|
+
* @property customData The Conversation custom data
|
|
33
|
+
* @interface
|
|
34
|
+
*/
|
|
35
|
+
export type ConversationProperties = vonage.ConversationJS.Properties;
|
|
36
|
+
/**
|
|
37
|
+
* Represents a page of conversations
|
|
38
|
+
*
|
|
39
|
+
* @beta
|
|
40
|
+
* @property conversations The conversations in the page
|
|
41
|
+
* @property previousCursor The cursor to fetch the previous page
|
|
42
|
+
* @property nextCursor The cursor to fetch the next page
|
|
43
|
+
* @interface
|
|
44
|
+
* @group Chat
|
|
45
|
+
*/
|
|
7
46
|
export type ConversationsPage = vonage.ConversationsPageJS & {
|
|
8
47
|
conversations: Conversation[];
|
|
9
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Represents a page of conversation events
|
|
51
|
+
*
|
|
52
|
+
* @beta
|
|
53
|
+
* @property events The events in the page
|
|
54
|
+
* @property previousCursor The cursor to fetch the previous page
|
|
55
|
+
* @property nextCursor The cursor to fetch the next page
|
|
56
|
+
* @interface
|
|
57
|
+
* @group Chat
|
|
58
|
+
*/
|
|
10
59
|
export type EventsPage = vonage.EventsPageJS & {
|
|
11
60
|
events: PersistentConversationEvent[];
|
|
12
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Represents the membership of a user in a conversation
|
|
64
|
+
*
|
|
65
|
+
* @property id The member id
|
|
66
|
+
* @property state The member state
|
|
67
|
+
* @property user The user associated to the member
|
|
68
|
+
* @property channel The member channel
|
|
69
|
+
* @property timestamp The member timestamp
|
|
70
|
+
* @interface
|
|
71
|
+
*/
|
|
13
72
|
export type Member = vonage.MemberJS & {
|
|
14
73
|
state?: MemberState;
|
|
15
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* Represents a {@link Member} timestamps
|
|
77
|
+
*
|
|
78
|
+
* @interface
|
|
79
|
+
*/
|
|
80
|
+
export type MemberTimestamp = vonage.MemberTimestampJS;
|
|
81
|
+
/**
|
|
82
|
+
* Represents a page of conversation members
|
|
83
|
+
*
|
|
84
|
+
* @beta
|
|
85
|
+
* @property members The members in the page
|
|
86
|
+
* @property previousCursor The cursor to fetch the previous page
|
|
87
|
+
* @property nextCursor The cursor to fetch the next page
|
|
88
|
+
* @interface
|
|
89
|
+
* @group Chat
|
|
90
|
+
*/
|
|
16
91
|
export type MembersPage = vonage.MembersPageJS & {
|
|
17
92
|
members: Member[];
|
|
18
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Represents an SDK user
|
|
96
|
+
*
|
|
97
|
+
* @property id The user id
|
|
98
|
+
* @property name The user name
|
|
99
|
+
* @property displayName The user display name
|
|
100
|
+
* @property channels The user channels
|
|
101
|
+
* @property timestamp The user timestamp
|
|
102
|
+
* @property imageUrl The user image url
|
|
103
|
+
* @property customData The user custom data
|
|
104
|
+
* @interface
|
|
105
|
+
*/
|
|
19
106
|
export type User = vonage.UserJS;
|
|
107
|
+
/**
|
|
108
|
+
* Represents an {@link User} timestamps
|
|
109
|
+
*
|
|
110
|
+
* @interface
|
|
111
|
+
*/
|
|
112
|
+
export type UserTimestamp = vonage.UserTimestampJS;
|
|
113
|
+
/**
|
|
114
|
+
* The type of a {@link MemberChannel}
|
|
115
|
+
*/
|
|
20
116
|
export type ChannelType = vonage.ChannelTypeJS;
|
|
21
117
|
export declare const ChannelType: typeof vonage.ChannelTypeJS;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Represents a Member Channel
|
|
120
|
+
*
|
|
121
|
+
* @property type The {@link ChannelType}
|
|
122
|
+
* @property from The from {@link Channel}
|
|
123
|
+
* @property to The to {@link Channel}
|
|
124
|
+
* @interface
|
|
125
|
+
*/
|
|
126
|
+
export type MemberChannel = vonage.MemberChannelJS;
|
|
127
|
+
/**
|
|
128
|
+
* Represents a Channel.
|
|
129
|
+
* It will hold either an id or a number, depending on the Channel,
|
|
130
|
+
* but never both of them.
|
|
131
|
+
*
|
|
132
|
+
* @property id The Channel id
|
|
133
|
+
* @property number The Channel number
|
|
134
|
+
* @interface
|
|
135
|
+
*/
|
|
136
|
+
export type Channel = vonage.ChannelJS;
|
|
137
|
+
/**
|
|
138
|
+
* Represents all the Channels of a certain {@link User}.
|
|
139
|
+
* For each type of Channel, it will hold an array of {@link Channel}
|
|
140
|
+
*
|
|
141
|
+
* @property app
|
|
142
|
+
* @property phone
|
|
143
|
+
* @property pstn
|
|
144
|
+
* @property sip
|
|
145
|
+
* @property vbc
|
|
146
|
+
* @property websocket
|
|
147
|
+
* @property sms
|
|
148
|
+
* @property mms
|
|
149
|
+
* @property whatsapp
|
|
150
|
+
* @property viber
|
|
151
|
+
* @property messenger
|
|
152
|
+
* @interface
|
|
153
|
+
*/
|
|
154
|
+
export type UserChannels = vonage.UserChannelsJS;
|
package/dist/utils/Option.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import vonage from './vonage';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an Either monad for optional properties.
|
|
4
|
+
*
|
|
5
|
+
* @beta
|
|
6
|
+
* It can be also set via the helper functions {@link some} and {@link none}.
|
|
7
|
+
*/
|
|
2
8
|
export type Option<T> = vonage.utils.OptionJS<T>;
|
|
3
9
|
export declare const Option: typeof vonage.utils.OptionJS;
|
|
4
10
|
export declare const mapOption: <T>(value?: T | undefined) => Option<T | null>;
|
|
11
|
+
/**
|
|
12
|
+
* @param value The wrapped value
|
|
13
|
+
* @returns An {@link Option.Some}
|
|
14
|
+
*/
|
|
5
15
|
export declare const some: <T>(value: T) => Option<T>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @returns An {@link Option.None}
|
|
19
|
+
*/
|
|
6
20
|
export declare const none: <T>() => Option<T>;
|
|
@@ -2,20 +2,86 @@ import vonage from './vonage';
|
|
|
2
2
|
import { CustomData } from './JsonUtils';
|
|
3
3
|
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
4
4
|
import { Option } from './Option';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters object for {@link VonageClient.createConversation}
|
|
7
|
+
*
|
|
8
|
+
* @beta
|
|
9
|
+
* @property name The name to initialize the conversation with
|
|
10
|
+
* @property displayName The displayName to initialize the conversation with
|
|
11
|
+
* @property imageUrl The name to imageUrl the conversation with
|
|
12
|
+
* @property ttl The time-to-live (in seconds) to initialize the conversation with
|
|
13
|
+
* @property customSortKey The customSortKey to initialize the conversation with.
|
|
14
|
+
* When {@link GetConversationsParameters.orderBy} is set to {@link OrderBy.CUSTOM_SORT_KEY}, conversations will be sorted according to the value of this property.
|
|
15
|
+
* @property customData Custom data associated with the conversation
|
|
16
|
+
* @interface
|
|
17
|
+
* @group Chat
|
|
18
|
+
*/
|
|
5
19
|
export type CreateConversationParameters = Omit<vonage.CreateConversationParametersJS, 'ttl' | 'customData'> & {
|
|
6
20
|
ttl?: Nullable<number>;
|
|
7
21
|
customData?: Nullable<CustomData>;
|
|
8
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Parameters object for {@link VonageClient.getConversations}
|
|
25
|
+
*
|
|
26
|
+
* @beta
|
|
27
|
+
* @property order The order in which conversations are presented, default is {@link PresentingOrder.ASC}.
|
|
28
|
+
* @property pageSize The maximum number of conversations to retrieve per request, default is 10.
|
|
29
|
+
* @property cursor The cursor indicating the starting point for pagination, default is the first page.
|
|
30
|
+
* @property includeCustomData Indicates whether to include custom data in the results, default is false.
|
|
31
|
+
* @property orderBy The strategy for ordering the conversations, default is {@link OrderBy.CREATED}.
|
|
32
|
+
* @interface
|
|
33
|
+
* @group Chat
|
|
34
|
+
*/
|
|
9
35
|
export type GetConversationsParameters = Omit<vonage.GetConversationsParametersJS, 'pageSize'> & {
|
|
10
36
|
pageSize?: Nullable<number>;
|
|
11
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Parameters object for {@link VonageClient.getConversationEvents}
|
|
40
|
+
*
|
|
41
|
+
* @beta
|
|
42
|
+
* @property order The order in which conversation events are presented, default is {@link PresentingOrder.ASC}.
|
|
43
|
+
* @property pageSize The maximum number of conversation events to retrieve per request, default is 10.
|
|
44
|
+
* @property cursor The cursor indicating the starting point for pagination, default is the first page.
|
|
45
|
+
* @property eventFilter A list of strings containing the types of events to be fetched and should have maximum 5 elements, default includes all events.
|
|
46
|
+
* @property includeDeletedEvents Indicates whether to include deleted events in the list, default is false.
|
|
47
|
+
* @property startId Specify the starting id of the events to be returned, default includes all events.
|
|
48
|
+
* @interface
|
|
49
|
+
* @group Chat
|
|
50
|
+
*/
|
|
12
51
|
export type GetConversationEventsParameters = Omit<vonage.GetConversationEventsParametersJS, 'pageSize' | 'startId'> & {
|
|
13
52
|
pageSize?: Nullable<number>;
|
|
14
53
|
startId?: Nullable<number>;
|
|
15
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Parameters object for {@link VonageClient.getConversationMembers}
|
|
57
|
+
*
|
|
58
|
+
* @beta
|
|
59
|
+
* @property order The order in which conversation members are presented, default is {@link PresentingOrder.ASC}.
|
|
60
|
+
* @property pageSize The maximum number of conversation members to retrieve per request, default is 10.
|
|
61
|
+
* @property cursor The cursor indicating the starting point for pagination, default is the first page.
|
|
62
|
+
* @interface
|
|
63
|
+
* @group Chat
|
|
64
|
+
*/
|
|
16
65
|
export type GetConversationMembersParameters = Omit<vonage.GetConversationMembersParametersJS, 'pageSize'> & {
|
|
17
66
|
pageSize?: Nullable<number>;
|
|
18
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Parameters object for {@link VonageClient.updateConversation}.
|
|
70
|
+
*
|
|
71
|
+
* Every property is an {@link Option} monad.
|
|
72
|
+
* When set to {@link Option.Some} the property will be updated.
|
|
73
|
+
* When set to {@link Option.None} the property will remain unchanged.
|
|
74
|
+
*
|
|
75
|
+
* @beta
|
|
76
|
+
* @property name The name of the conversation.
|
|
77
|
+
* @property displayName A display name for the conversation.
|
|
78
|
+
* @property imageUrl The URL of an image associated with the conversation.
|
|
79
|
+
* @property ttl The time-to-live (TTL) for the conversation in seconds.
|
|
80
|
+
* @property customSortKey A custom sort key for the conversation.
|
|
81
|
+
* @property customData Custom data associated with the conversation.
|
|
82
|
+
* @interface
|
|
83
|
+
* @group Chat
|
|
84
|
+
*/
|
|
19
85
|
export interface UpdateConversationParameters {
|
|
20
86
|
name?: string | Option<string>;
|
|
21
87
|
displayName?: string | null | Option<string | null | undefined>;
|
|
@@ -24,3 +90,19 @@ export interface UpdateConversationParameters {
|
|
|
24
90
|
customSortKey?: string | null | Option<string | null | undefined>;
|
|
25
91
|
customData?: CustomData | null | Option<CustomData | null | undefined>;
|
|
26
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* The order in which paginated objects are presented.
|
|
95
|
+
*
|
|
96
|
+
* @beta
|
|
97
|
+
* @group Chat
|
|
98
|
+
*/
|
|
99
|
+
export type PresentingOrder = vonage.PresentingOrderJS;
|
|
100
|
+
export declare const PresentingOrder: typeof vonage.PresentingOrderJS;
|
|
101
|
+
/**
|
|
102
|
+
* The sorting strategy used for paginated objects.
|
|
103
|
+
*
|
|
104
|
+
* @beta
|
|
105
|
+
* @group Chat
|
|
106
|
+
*/
|
|
107
|
+
export type OrderBy = vonage.OrderByJS;
|
|
108
|
+
export declare const OrderBy: typeof vonage.OrderByJS;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/logging.d.ts
CHANGED
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
2
2
|
import vonage from '../utils/vonage';
|
|
3
|
+
/**
|
|
4
|
+
* A group of Topics that a {@link VonageLogger} can subscribe to
|
|
5
|
+
*/
|
|
3
6
|
export type Topics = vonage.Topics | typeof Topics.prototype.name;
|
|
7
|
+
/**
|
|
8
|
+
* A group of Topics that a {@link VonageLogger} can subscribe to
|
|
9
|
+
*/
|
|
4
10
|
export declare const Topics: typeof vonage.Topics;
|
|
5
11
|
export type Topic = vonage.TopicJS;
|
|
6
12
|
export declare const Topic: typeof vonage.TopicJS;
|
|
7
13
|
export type LoggingLevelName = typeof vonage.LoggingLevelJS.prototype.name;
|
|
14
|
+
/**
|
|
15
|
+
* The Client Logging Level.
|
|
16
|
+
*
|
|
17
|
+
* It can be set for the internal logger via {@link ClientInitConfigObject.loggingLevel}
|
|
18
|
+
* as well as for a custom logger via {@link VonageLogger.minLogLevel}.
|
|
19
|
+
*/
|
|
8
20
|
export type LoggingLevel = vonage.LoggingLevelJS | LoggingLevelName;
|
|
9
21
|
export declare const LoggingLevel: typeof vonage.LoggingLevelJS;
|
|
10
22
|
/**
|
|
11
|
-
* @deprecated Use {@link
|
|
23
|
+
* @deprecated Use {@link ClientInitConfigObject.loggingLevel} instead.
|
|
12
24
|
* @param level - The logging level to set.
|
|
13
25
|
*/
|
|
14
26
|
export declare const setDefaultLoggingLevel: (level: LoggingLevel) => void;
|
|
15
27
|
/**
|
|
16
|
-
* @deprecated Use {@link
|
|
28
|
+
* @deprecated Use {@link ClientInitConfigObject.loggingLevel} instead.
|
|
17
29
|
* @param level - The logging level to set.
|
|
18
30
|
*/
|
|
19
31
|
export declare const setVonageClientLoggingLevel: (level: LoggingLevel) => void;
|
|
32
|
+
/**
|
|
33
|
+
* An interface representing a client logger to be set via {@link ClientInitConfigObject.customLoggers}
|
|
34
|
+
*
|
|
35
|
+
* @property name The name of the logger.
|
|
36
|
+
* @property minLogLevel The minimum log level of the logger.
|
|
37
|
+
* @property topics The topics that the logger is subscribed to.
|
|
38
|
+
* @property onLog The callback to be invoked when a log is emitted.
|
|
39
|
+
* @interface
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* [[include: snippet_Logging.txt]]
|
|
43
|
+
*/
|
|
20
44
|
export type VonageLogger = VonageLoggerJS | ({
|
|
21
45
|
minLogLevel?: LoggingLevel;
|
|
22
46
|
topics?: Topics[];
|