@vonage/client-sdk 1.3.0-alpha.2 → 1.3.0-alpha.4
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 +9 -6
- package/api_docs/ts/assets/navigation.js +1 -1
- package/api_docs/ts/assets/search.js +1 -1
- package/api_docs/ts/classes/ClientConfig.html +7 -205
- package/api_docs/ts/classes/ClientInitConfig.html +4 -148
- package/api_docs/ts/classes/VonageClient.html +232 -1102
- package/api_docs/ts/functions/setDefaultLoggingLevel.html +3 -76
- package/api_docs/ts/functions/setVonageClientLoggingLevel.html +3 -76
- package/api_docs/ts/index.html +2 -86
- package/api_docs/ts/interfaces/ConversationEvent.html +4 -108
- package/api_docs/ts/interfaces/ConversationState.html +122 -1125
- package/api_docs/ts/interfaces/CustomConversationEvent.html +12 -173
- package/api_docs/ts/interfaces/EmbeddedInfo.html +7 -125
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +10 -153
- package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +15 -0
- package/api_docs/ts/interfaces/From.html +3 -96
- package/api_docs/ts/interfaces/Location.html +5 -0
- package/api_docs/ts/interfaces/MemberInvitedEvent.html +11 -163
- package/api_docs/ts/interfaces/MemberJoinedEvent.html +11 -163
- package/api_docs/ts/interfaces/MemberLeftEvent.html +11 -163
- package/api_docs/ts/interfaces/MemberState.html +122 -1125
- package/api_docs/ts/interfaces/MessageAudioEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageCustomEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageFileEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageImageEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageLocationEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageTemplateEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageTextEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageVCardEvent.html +11 -163
- package/api_docs/ts/interfaces/MessageVideoEvent.html +11 -163
- package/api_docs/ts/interfaces/NonPersistentConversationEvent.html +5 -138
- package/api_docs/ts/interfaces/PersistentConversationEvent.html +4 -112
- package/api_docs/ts/interfaces/System.html +5 -133
- package/api_docs/ts/interfaces/Template.html +3 -0
- package/api_docs/ts/interfaces/Whatsapp.html +3 -0
- package/api_docs/ts/modules.html +9 -127
- package/api_docs/ts/types/CustomData.html +2 -64
- package/dist/client/VonageClient.d.ts +146 -17
- package/dist/client/index.cjs +20242 -18998
- package/dist/client/index.mjs +20242 -18998
- package/dist/kotlin/JsUnions.d.ts +17 -2
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +79 -77
- package/dist/utils/ConversationModels.d.ts +18 -1
- package/dist/utils/RequestParameterModels.d.ts +17 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vonageClientSDK.js +19935 -18726
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +19935 -18726
- package/package.json +3 -2
- package/scripts/replaceAllDoNotUseOrImplement.js +25 -0
- package/typedoc.json +40 -0
- package/api_docs/ts/functions/convertInitConfig.html +0 -70
- package/api_docs/ts/functions/createVonageLogger.html +0 -91
- package/api_docs/ts/interfaces/EventsPage.html +0 -109
- package/api_docs/ts/types/CallDisconnectReason.html +0 -61
- package/api_docs/ts/types/CallSayParams.html +0 -66
- package/api_docs/ts/types/CancelReason.html +0 -61
- package/api_docs/ts/types/ChannelType.html +0 -61
- package/api_docs/ts/types/ClientConfigObject.html +0 -61
- package/api_docs/ts/types/ClientInitConfigObject.html +0 -61
- package/api_docs/ts/types/ConfigRegion.html +0 -61
- package/api_docs/ts/types/Conversation.html +0 -68
- package/api_docs/ts/types/ConversationsPage.html +0 -66
- package/api_docs/ts/types/CreateConversationParameters.html +0 -68
- package/api_docs/ts/types/HangupReason.html +0 -61
- package/api_docs/ts/types/Json.html +0 -66
- package/api_docs/ts/types/JsonValue.html +0 -61
- package/api_docs/ts/types/Leg.html +0 -61
- package/api_docs/ts/types/LegStatus.html +0 -61
- package/api_docs/ts/types/LoggingLevel.html +0 -61
- package/api_docs/ts/types/Member.html +0 -66
- package/api_docs/ts/types/MembersPage.html +0 -66
- package/api_docs/ts/types/OrderBy.html +0 -61
- package/api_docs/ts/types/PresentingOrder.html +0 -61
- package/api_docs/ts/types/RTCQuality.html +0 -61
- package/api_docs/ts/types/RtcStats.html +0 -61
- package/api_docs/ts/types/SessionErrorReason.html +0 -61
- package/api_docs/ts/types/Topic.html +0 -61
- package/api_docs/ts/types/Topics.html +0 -61
- package/api_docs/ts/types/User.html +0 -61
- package/api_docs/ts/types/VonageError.html +0 -61
- package/api_docs/ts/types/VonageErrorType.html +0 -61
- package/api_docs/ts/types/VonageLogger.html +0 -61
- package/api_docs/ts/variables/CSErrorCodes.html +0 -82
- package/api_docs/ts/variables/CallDisconnectReason-1.html +0 -61
- package/api_docs/ts/variables/CancelReason-1.html +0 -61
- package/api_docs/ts/variables/ChannelType-1.html +0 -61
- package/api_docs/ts/variables/ConfigRegion-1.html +0 -61
- package/api_docs/ts/variables/HangupReason-1.html +0 -61
- package/api_docs/ts/variables/LegStatus-1.html +0 -61
- package/api_docs/ts/variables/LoggingLevel-1.html +0 -61
- package/api_docs/ts/variables/OrderBy-1.html +0 -61
- package/api_docs/ts/variables/PresentingOrder-1.html +0 -61
- package/api_docs/ts/variables/SessionErrorCodes.html +0 -96
- package/api_docs/ts/variables/SessionErrorReason-1.html +0 -61
- package/api_docs/ts/variables/Topic-1.html +0 -61
- package/api_docs/ts/variables/Topics-1.html +0 -61
- package/api_docs/ts/variables/VonageError-1.html +0 -61
- package/api_docs/ts/variables/VonageErrorType-1.html +0 -61
|
@@ -59,6 +59,21 @@ export type CustomConversationEvent = {
|
|
|
59
59
|
kind: 'custom';
|
|
60
60
|
from: From;
|
|
61
61
|
} & vonage.CustomConversationEventJS;
|
|
62
|
+
/**
|
|
63
|
+
* The EventDeleteConversationEvent type
|
|
64
|
+
*
|
|
65
|
+
* @property kind the kind property of the EventDeleteConversationEvent
|
|
66
|
+
* @property id the id property of the EventDeleteConversationEvent
|
|
67
|
+
* @property timestamp the timestamp property of the EventDeleteConversationEvent
|
|
68
|
+
* @property conversationId the conversationId property of the EventDeleteConversationEvent
|
|
69
|
+
* @property from the from property of the EventDeleteConversationEvent
|
|
70
|
+
* @property body the body property of the EventDeleteConversationEvent
|
|
71
|
+
* @interface
|
|
72
|
+
*/
|
|
73
|
+
export type EventDeleteConversationEvent = {
|
|
74
|
+
kind: 'event:delete';
|
|
75
|
+
from: From;
|
|
76
|
+
} & vonage.EventDeleteConversationEventJS;
|
|
62
77
|
/**
|
|
63
78
|
* The MemberInvitedEvent type
|
|
64
79
|
*
|
|
@@ -240,10 +255,10 @@ export type MessageVideoEvent = {
|
|
|
240
255
|
from: From;
|
|
241
256
|
} & vonage.MessageVideoEventJS;
|
|
242
257
|
/**
|
|
243
|
-
* A PersistentConversationEvent is a union of CustomConversationEvent, MemberInvitedEvent, MemberJoinedEvent, MemberLeftEvent, MessageAudioEvent, MessageCustomEvent, MessageFileEvent, MessageImageEvent, MessageLocationEvent, MessageTemplateEvent, MessageTextEvent, MessageVCardEvent, MessageVideoEvent
|
|
258
|
+
* A PersistentConversationEvent is a union of CustomConversationEvent, EventDeleteConversationEvent, MemberInvitedEvent, MemberJoinedEvent, MemberLeftEvent, MessageAudioEvent, MessageCustomEvent, MessageFileEvent, MessageImageEvent, MessageLocationEvent, MessageTemplateEvent, MessageTextEvent, MessageVCardEvent, MessageVideoEvent
|
|
244
259
|
* @interface
|
|
245
260
|
*/
|
|
246
|
-
export type PersistentConversationEvent = CustomConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageTemplateEvent | MessageTextEvent | MessageVCardEvent | MessageVideoEvent;
|
|
261
|
+
export type PersistentConversationEvent = CustomConversationEvent | EventDeleteConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageTemplateEvent | MessageTextEvent | MessageVCardEvent | MessageVideoEvent;
|
|
247
262
|
/**
|
|
248
263
|
* A ConversationEvent is a union of NonPersistentConversationEventJS, PersistentConversationEventJS
|
|
249
264
|
* @interface
|
|
@@ -31,20 +31,27 @@ export declare namespace vonage {
|
|
|
31
31
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
32
32
|
leaveConversation(cid: string): Promise<any>;
|
|
33
33
|
deleteConversation(cid: string): Promise<any>;
|
|
34
|
-
getConversations(
|
|
35
|
-
getConversationMembers(cid: string,
|
|
36
|
-
getConversationEvents(cid: string,
|
|
34
|
+
getConversations(parameters: Nullable<vonage.GetConversationsParametersJS>): Promise<vonage.ConversationsPageJS>;
|
|
35
|
+
getConversationMembers(cid: string, parameters: Nullable<vonage.GetConversationMembersParametersJS>): Promise<vonage.MembersPageJS>;
|
|
36
|
+
getConversationEvents(cid: string, parameters: Nullable<vonage.GetConversationEventsParametersJS>): Promise<vonage.EventsPageJS>;
|
|
37
37
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
38
38
|
sendMessageTextEvent(cid: string, text: string): Promise<string>;
|
|
39
39
|
sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
|
|
40
40
|
sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
|
|
41
|
+
sendMessageVideoEvent(cid: string, videoURL: URL): Promise<string>;
|
|
42
|
+
sendMessageFileEvent(cid: string, fileURL: URL): Promise<string>;
|
|
43
|
+
sendMessageAudioEvent(cid: string, audioURL: URL): Promise<string>;
|
|
44
|
+
sendMessageVCardEvent(cid: string, vCardURL: URL): Promise<string>;
|
|
45
|
+
sendMessageLocationEvent(cid: string, location: vonage.LocationJS): Promise<string>;
|
|
46
|
+
sendMessageTemplateEvent(cid: string, templateObject: vonage.TemplateObjectJS, whatsappObject: vonage.WhatsappObjectJS): Promise<string>;
|
|
41
47
|
sendEphemeralEvent(cid: string, customData: string): Promise<string>;
|
|
48
|
+
sendCustomEvent(cid: string, eventType: string, customData: string): Promise<string>;
|
|
42
49
|
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
43
50
|
setConfig(config: vonage.ConfigObjectJS): void;
|
|
44
51
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
45
52
|
deleteSession(): Promise<any>;
|
|
46
53
|
refreshSession(token: string): Promise<any>;
|
|
47
|
-
getConversation(
|
|
54
|
+
getConversation(conversationIdOrName: string): Promise<vonage.ConversationJS>;
|
|
48
55
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
49
56
|
getPeerConnection(id: string): any;
|
|
50
57
|
serverCall(context: Nullable<Json>): Promise<string>;
|
|
@@ -59,7 +66,6 @@ export declare namespace vonage {
|
|
|
59
66
|
enableEarmuff(callId: string): Promise<any>;
|
|
60
67
|
disableEarmuff(callId: string): Promise<any>;
|
|
61
68
|
sendDTMF(callId: string, digits: string): Promise<any>;
|
|
62
|
-
readonly __doNotUseOrImplementIt: vonage.IChatClientJS["__doNotUseOrImplementIt"] & vonage.IVoiceClientJS["__doNotUseOrImplementIt"];
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
export declare namespace vonage {
|
|
@@ -70,41 +76,30 @@ export declare namespace vonage {
|
|
|
70
76
|
get nextCursor(): Nullable<string>;
|
|
71
77
|
}
|
|
72
78
|
interface FromJS {
|
|
73
|
-
readonly __doNotUseOrImplementIt: {
|
|
74
|
-
readonly "vonage.FromJS": unique symbol;
|
|
75
|
-
};
|
|
76
79
|
}
|
|
77
80
|
class EmbeddedInfoJS implements vonage.FromJS {
|
|
78
81
|
private constructor();
|
|
79
82
|
get kind(): string;
|
|
80
83
|
get memberId(): Nullable<string>;
|
|
81
84
|
get user(): vonage.UserJS;
|
|
82
|
-
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
83
85
|
}
|
|
84
86
|
const SystemJS: {
|
|
85
87
|
get kind(): string;
|
|
86
88
|
toString(): string;
|
|
87
89
|
hashCode(): number;
|
|
88
90
|
equals(other: Nullable<any>): boolean;
|
|
89
|
-
readonly __doNotUseOrImplementIt: vonage.FromJS["__doNotUseOrImplementIt"];
|
|
90
91
|
} & vonage.FromJS;
|
|
91
92
|
interface ConversationEventJS {
|
|
92
93
|
readonly kind: string;
|
|
93
94
|
readonly timestamp: string;
|
|
94
95
|
readonly conversationId: string;
|
|
95
96
|
readonly from: vonage.FromJS;
|
|
96
|
-
readonly __doNotUseOrImplementIt: {
|
|
97
|
-
readonly "vonage.ConversationEventJS": unique symbol;
|
|
98
|
-
};
|
|
99
97
|
}
|
|
100
98
|
interface NonPersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
101
99
|
readonly kind: string;
|
|
102
100
|
readonly timestamp: string;
|
|
103
101
|
readonly conversationId: string;
|
|
104
102
|
readonly from: vonage.FromJS;
|
|
105
|
-
readonly __doNotUseOrImplementIt: {
|
|
106
|
-
readonly "vonage.NonPersistentConversationEventJS": unique symbol;
|
|
107
|
-
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
108
103
|
}
|
|
109
104
|
interface PersistentConversationEventJS extends vonage.ConversationEventJS {
|
|
110
105
|
readonly id: number;
|
|
@@ -112,15 +107,9 @@ export declare namespace vonage {
|
|
|
112
107
|
readonly timestamp: string;
|
|
113
108
|
readonly conversationId: string;
|
|
114
109
|
readonly from: vonage.FromJS;
|
|
115
|
-
readonly __doNotUseOrImplementIt: {
|
|
116
|
-
readonly "vonage.PersistentConversationEventJS": unique symbol;
|
|
117
|
-
} & vonage.ConversationEventJS["__doNotUseOrImplementIt"];
|
|
118
110
|
}
|
|
119
111
|
interface MemberEventJS {
|
|
120
112
|
readonly body: vonage.MemberEventBodyJS;
|
|
121
|
-
readonly __doNotUseOrImplementIt: {
|
|
122
|
-
readonly "vonage.MemberEventJS": unique symbol;
|
|
123
|
-
};
|
|
124
113
|
}
|
|
125
114
|
class MemberEventBodyJS {
|
|
126
115
|
private constructor();
|
|
@@ -135,7 +124,6 @@ export declare namespace vonage {
|
|
|
135
124
|
get conversationId(): string;
|
|
136
125
|
get from(): vonage.FromJS;
|
|
137
126
|
get body(): vonage.MemberEventBodyJS;
|
|
138
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
139
127
|
}
|
|
140
128
|
class MemberJoinedEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
|
|
141
129
|
private constructor();
|
|
@@ -145,7 +133,6 @@ export declare namespace vonage {
|
|
|
145
133
|
get conversationId(): string;
|
|
146
134
|
get from(): vonage.FromJS;
|
|
147
135
|
get body(): vonage.MemberEventBodyJS;
|
|
148
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
149
136
|
}
|
|
150
137
|
class MemberLeftEventJS implements vonage.MemberEventJS, vonage.PersistentConversationEventJS {
|
|
151
138
|
private constructor();
|
|
@@ -155,13 +142,9 @@ export declare namespace vonage {
|
|
|
155
142
|
get conversationId(): string;
|
|
156
143
|
get from(): vonage.FromJS;
|
|
157
144
|
get body(): vonage.MemberEventBodyJS;
|
|
158
|
-
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
159
145
|
}
|
|
160
146
|
interface JSONBodyEventJS {
|
|
161
147
|
readonly body: string;
|
|
162
|
-
readonly __doNotUseOrImplementIt: {
|
|
163
|
-
readonly "vonage.JSONBodyEventJS": unique symbol;
|
|
164
|
-
};
|
|
165
148
|
}
|
|
166
149
|
class CustomConversationEventJS implements vonage.PersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
167
150
|
private constructor();
|
|
@@ -172,7 +155,6 @@ export declare namespace vonage {
|
|
|
172
155
|
get from(): vonage.FromJS;
|
|
173
156
|
get eventType(): Nullable<string>;
|
|
174
157
|
get body(): string;
|
|
175
|
-
readonly __doNotUseOrImplementIt: vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"] & vonage.JSONBodyEventJS["__doNotUseOrImplementIt"];
|
|
176
158
|
}
|
|
177
159
|
class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
178
160
|
private constructor();
|
|
@@ -181,21 +163,39 @@ export declare namespace vonage {
|
|
|
181
163
|
get conversationId(): string;
|
|
182
164
|
get from(): vonage.FromJS;
|
|
183
165
|
get body(): string;
|
|
184
|
-
|
|
166
|
+
}
|
|
167
|
+
class EventDeleteConversationEventJS implements vonage.PersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
168
|
+
private constructor();
|
|
169
|
+
get kind(): string;
|
|
170
|
+
get id(): number;
|
|
171
|
+
get timestamp(): string;
|
|
172
|
+
get conversationId(): string;
|
|
173
|
+
get from(): vonage.FromJS;
|
|
174
|
+
get body(): string;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export declare namespace vonage {
|
|
178
|
+
interface TemplateObjectJS {
|
|
179
|
+
readonly name: string;
|
|
180
|
+
readonly parameters?: Nullable<Array<string>>;
|
|
181
|
+
}
|
|
182
|
+
interface WhatsappObjectJS {
|
|
183
|
+
readonly policy: string;
|
|
184
|
+
readonly locale: string;
|
|
185
|
+
}
|
|
186
|
+
interface LocationJS {
|
|
187
|
+
readonly longitude: string;
|
|
188
|
+
readonly latitude: string;
|
|
189
|
+
readonly name?: Nullable<string>;
|
|
190
|
+
readonly address?: Nullable<string>;
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
193
|
export declare namespace vonage {
|
|
188
194
|
interface MessageEventJS {
|
|
189
195
|
readonly body: vonage.MessageEventBodyJS;
|
|
190
|
-
readonly __doNotUseOrImplementIt: {
|
|
191
|
-
readonly "vonage.MessageEventJS": unique symbol;
|
|
192
|
-
};
|
|
193
196
|
}
|
|
194
197
|
interface MessageEventBodyJS {
|
|
195
198
|
readonly deleted: Nullable<string>;
|
|
196
|
-
readonly __doNotUseOrImplementIt: {
|
|
197
|
-
readonly "vonage.MessageEventBodyJS": unique symbol;
|
|
198
|
-
};
|
|
199
199
|
}
|
|
200
200
|
class MessageTextEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
201
201
|
private constructor();
|
|
@@ -205,14 +205,12 @@ export declare namespace vonage {
|
|
|
205
205
|
get conversationId(): string;
|
|
206
206
|
get from(): vonage.FromJS;
|
|
207
207
|
get body(): vonage.MessageTextEventJS.Body;
|
|
208
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
209
208
|
}
|
|
210
209
|
namespace MessageTextEventJS {
|
|
211
210
|
class Body implements vonage.MessageEventBodyJS {
|
|
212
211
|
private constructor();
|
|
213
212
|
get text(): string;
|
|
214
213
|
get deleted(): Nullable<string>;
|
|
215
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
class MessageCustomEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -223,14 +221,12 @@ export declare namespace vonage {
|
|
|
223
221
|
get conversationId(): string;
|
|
224
222
|
get from(): vonage.FromJS;
|
|
225
223
|
get body(): vonage.MessageCustomEventJS.Body;
|
|
226
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
227
224
|
}
|
|
228
225
|
namespace MessageCustomEventJS {
|
|
229
226
|
class Body implements vonage.MessageEventBodyJS {
|
|
230
227
|
private constructor();
|
|
231
228
|
get customData(): string;
|
|
232
229
|
get deleted(): Nullable<string>;
|
|
233
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
234
230
|
}
|
|
235
231
|
}
|
|
236
232
|
class MessageAudioEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -241,14 +237,12 @@ export declare namespace vonage {
|
|
|
241
237
|
get conversationId(): string;
|
|
242
238
|
get from(): vonage.FromJS;
|
|
243
239
|
get body(): vonage.MessageAudioEventJS.Body;
|
|
244
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
245
240
|
}
|
|
246
241
|
namespace MessageAudioEventJS {
|
|
247
242
|
class Body implements vonage.MessageEventBodyJS {
|
|
248
243
|
private constructor();
|
|
249
244
|
get audioUrl(): string;
|
|
250
245
|
get deleted(): Nullable<string>;
|
|
251
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
252
246
|
}
|
|
253
247
|
}
|
|
254
248
|
class MessageVideoEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -259,14 +253,12 @@ export declare namespace vonage {
|
|
|
259
253
|
get conversationId(): string;
|
|
260
254
|
get from(): vonage.FromJS;
|
|
261
255
|
get body(): vonage.MessageVideoEventJS.Body;
|
|
262
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
263
256
|
}
|
|
264
257
|
namespace MessageVideoEventJS {
|
|
265
258
|
class Body implements vonage.MessageEventBodyJS {
|
|
266
259
|
private constructor();
|
|
267
260
|
get videoUrl(): string;
|
|
268
261
|
get deleted(): Nullable<string>;
|
|
269
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
270
262
|
}
|
|
271
263
|
}
|
|
272
264
|
class MessageImageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -277,14 +269,12 @@ export declare namespace vonage {
|
|
|
277
269
|
get conversationId(): string;
|
|
278
270
|
get from(): vonage.FromJS;
|
|
279
271
|
get body(): vonage.MessageImageEventJS.Body;
|
|
280
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
281
272
|
}
|
|
282
273
|
namespace MessageImageEventJS {
|
|
283
274
|
class Body implements vonage.MessageEventBodyJS {
|
|
284
275
|
private constructor();
|
|
285
276
|
get imageUrl(): string;
|
|
286
277
|
get deleted(): Nullable<string>;
|
|
287
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
288
278
|
}
|
|
289
279
|
}
|
|
290
280
|
class MessageFileEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -295,14 +285,12 @@ export declare namespace vonage {
|
|
|
295
285
|
get conversationId(): string;
|
|
296
286
|
get from(): vonage.FromJS;
|
|
297
287
|
get body(): vonage.MessageFileEventJS.Body;
|
|
298
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
299
288
|
}
|
|
300
289
|
namespace MessageFileEventJS {
|
|
301
290
|
class Body implements vonage.MessageEventBodyJS {
|
|
302
291
|
private constructor();
|
|
303
292
|
get fileUrl(): string;
|
|
304
293
|
get deleted(): Nullable<string>;
|
|
305
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
306
294
|
}
|
|
307
295
|
}
|
|
308
296
|
class MessageVCardEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -313,14 +301,12 @@ export declare namespace vonage {
|
|
|
313
301
|
get conversationId(): string;
|
|
314
302
|
get from(): vonage.FromJS;
|
|
315
303
|
get body(): vonage.MessageVCardEventJS.Body;
|
|
316
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
317
304
|
}
|
|
318
305
|
namespace MessageVCardEventJS {
|
|
319
306
|
class Body implements vonage.MessageEventBodyJS {
|
|
320
307
|
private constructor();
|
|
321
308
|
get vcardUrl(): string;
|
|
322
309
|
get deleted(): Nullable<string>;
|
|
323
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
324
310
|
}
|
|
325
311
|
}
|
|
326
312
|
class MessageLocationEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
|
|
@@ -331,14 +317,12 @@ export declare namespace vonage {
|
|
|
331
317
|
get conversationId(): string;
|
|
332
318
|
get from(): vonage.FromJS;
|
|
333
319
|
get body(): vonage.MessageLocationEventJS.Body;
|
|
334
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
335
320
|
}
|
|
336
321
|
namespace MessageLocationEventJS {
|
|
337
322
|
class Body implements vonage.MessageEventBodyJS {
|
|
338
323
|
private constructor();
|
|
339
324
|
get location(): vonage.MessageLocationEventJS.Location;
|
|
340
325
|
get deleted(): Nullable<string>;
|
|
341
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
342
326
|
}
|
|
343
327
|
class Location {
|
|
344
328
|
private constructor();
|
|
@@ -356,7 +340,6 @@ export declare namespace vonage {
|
|
|
356
340
|
get conversationId(): string;
|
|
357
341
|
get from(): vonage.FromJS;
|
|
358
342
|
get body(): vonage.MessageTemplateEventJS.Body;
|
|
359
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
360
343
|
}
|
|
361
344
|
namespace MessageTemplateEventJS {
|
|
362
345
|
class Body implements vonage.MessageEventBodyJS {
|
|
@@ -369,7 +352,6 @@ export declare namespace vonage {
|
|
|
369
352
|
toString(): string;
|
|
370
353
|
hashCode(): number;
|
|
371
354
|
equals(other: Nullable<any>): boolean;
|
|
372
|
-
readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
|
|
373
355
|
}
|
|
374
356
|
class TemplateObject {
|
|
375
357
|
private constructor();
|
|
@@ -669,14 +651,6 @@ export declare namespace vonage {
|
|
|
669
651
|
reconnection(): void;
|
|
670
652
|
sessionError(reason: vonage.SessionErrorReasonJS): void;
|
|
671
653
|
}
|
|
672
|
-
interface CreateConversationParametersJS {
|
|
673
|
-
readonly name?: Nullable<string>;
|
|
674
|
-
readonly displayName?: Nullable<string>;
|
|
675
|
-
readonly imageUrl?: Nullable<string>;
|
|
676
|
-
readonly ttl?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
677
|
-
readonly customSortKey?: Nullable<string>;
|
|
678
|
-
readonly customData?: Nullable<string>;
|
|
679
|
-
}
|
|
680
654
|
}
|
|
681
655
|
export declare namespace vonage {
|
|
682
656
|
interface IChatClientJS extends vonage.ICoreClientJS {
|
|
@@ -686,24 +660,28 @@ export declare namespace vonage {
|
|
|
686
660
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
687
661
|
leaveConversation(cid: string): Promise<any>;
|
|
688
662
|
deleteConversation(cid: string): Promise<any>;
|
|
689
|
-
getConversations(
|
|
690
|
-
getConversationMembers(cid: string,
|
|
691
|
-
getConversationEvents(cid: string,
|
|
663
|
+
getConversations(parameters: Nullable<vonage.GetConversationsParametersJS>): Promise<vonage.ConversationsPageJS>;
|
|
664
|
+
getConversationMembers(cid: string, parameters: Nullable<vonage.GetConversationMembersParametersJS>): Promise<vonage.MembersPageJS>;
|
|
665
|
+
getConversationEvents(cid: string, parameters: Nullable<vonage.GetConversationEventsParametersJS>): Promise<vonage.EventsPageJS>;
|
|
692
666
|
getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
|
|
693
667
|
sendMessageTextEvent(cid: string, text: string): Promise<string>;
|
|
694
668
|
sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
|
|
695
669
|
sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
|
|
670
|
+
sendMessageVideoEvent(cid: string, videoURL: URL): Promise<string>;
|
|
671
|
+
sendMessageFileEvent(cid: string, fileURL: URL): Promise<string>;
|
|
672
|
+
sendMessageAudioEvent(cid: string, audioURL: URL): Promise<string>;
|
|
673
|
+
sendMessageVCardEvent(cid: string, vCardURL: URL): Promise<string>;
|
|
674
|
+
sendMessageLocationEvent(cid: string, location: vonage.LocationJS): Promise<string>;
|
|
675
|
+
sendMessageTemplateEvent(cid: string, templateObject: vonage.TemplateObjectJS, whatsappObject: vonage.WhatsappObjectJS): Promise<string>;
|
|
696
676
|
sendEphemeralEvent(cid: string, customData: string): Promise<string>;
|
|
677
|
+
sendCustomEvent(cid: string, eventType: string, customData: string): Promise<string>;
|
|
697
678
|
deleteEvent(id: number, conversationId: string): Promise<any>;
|
|
698
679
|
setConfig(config: vonage.ConfigObjectJS): void;
|
|
699
680
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
700
681
|
deleteSession(): Promise<any>;
|
|
701
682
|
refreshSession(token: string): Promise<any>;
|
|
702
|
-
getConversation(
|
|
683
|
+
getConversation(conversationIdOrName: string): Promise<vonage.ConversationJS>;
|
|
703
684
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
704
|
-
readonly __doNotUseOrImplementIt: {
|
|
705
|
-
readonly "vonage.IChatClientJS": unique symbol;
|
|
706
|
-
} & vonage.ICoreClientJS["__doNotUseOrImplementIt"];
|
|
707
685
|
}
|
|
708
686
|
}
|
|
709
687
|
export declare namespace vonage {
|
|
@@ -878,11 +856,8 @@ export declare namespace vonage {
|
|
|
878
856
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
879
857
|
deleteSession(): Promise<any>;
|
|
880
858
|
refreshSession(token: string): Promise<any>;
|
|
881
|
-
getConversation(
|
|
859
|
+
getConversation(conversationIdOrName: string): Promise<vonage.ConversationJS>;
|
|
882
860
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
883
|
-
readonly __doNotUseOrImplementIt: {
|
|
884
|
-
readonly "vonage.ICoreClientJS": unique symbol;
|
|
885
|
-
};
|
|
886
861
|
}
|
|
887
862
|
}
|
|
888
863
|
export declare namespace vonage {
|
|
@@ -990,11 +965,8 @@ export declare namespace vonage {
|
|
|
990
965
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
991
966
|
deleteSession(): Promise<any>;
|
|
992
967
|
refreshSession(token: string): Promise<any>;
|
|
993
|
-
getConversation(
|
|
968
|
+
getConversation(conversationIdOrName: string): Promise<vonage.ConversationJS>;
|
|
994
969
|
getUser(userIdOrName: string): Promise<vonage.UserJS>;
|
|
995
|
-
readonly __doNotUseOrImplementIt: {
|
|
996
|
-
readonly "vonage.IVoiceClientJS": unique symbol;
|
|
997
|
-
} & vonage.ICoreClientJS["__doNotUseOrImplementIt"];
|
|
998
970
|
}
|
|
999
971
|
class VoiceInviteFromInfoJS {
|
|
1000
972
|
constructor(id: Nullable<string>, type: string);
|
|
@@ -1123,4 +1095,34 @@ export declare namespace vonage {
|
|
|
1123
1095
|
};
|
|
1124
1096
|
}
|
|
1125
1097
|
}
|
|
1098
|
+
export declare namespace vonage {
|
|
1099
|
+
interface CreateConversationParametersJS {
|
|
1100
|
+
readonly name?: Nullable<string>;
|
|
1101
|
+
readonly displayName?: Nullable<string>;
|
|
1102
|
+
readonly imageUrl?: Nullable<string>;
|
|
1103
|
+
readonly ttl?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1104
|
+
readonly customSortKey?: Nullable<string>;
|
|
1105
|
+
readonly customData?: Nullable<string>;
|
|
1106
|
+
}
|
|
1107
|
+
interface GetConversationsParametersJS {
|
|
1108
|
+
readonly order?: Nullable<vonage.PresentingOrderJS>;
|
|
1109
|
+
readonly pageSize?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1110
|
+
readonly cursor?: Nullable<string>;
|
|
1111
|
+
readonly includeCustomData?: Nullable<boolean>;
|
|
1112
|
+
readonly orderBy?: Nullable<vonage.OrderByJS>;
|
|
1113
|
+
}
|
|
1114
|
+
interface GetConversationEventsParametersJS {
|
|
1115
|
+
readonly order?: Nullable<vonage.PresentingOrderJS>;
|
|
1116
|
+
readonly pageSize?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1117
|
+
readonly cursor?: Nullable<string>;
|
|
1118
|
+
readonly eventFilter?: Nullable<Array<string>>;
|
|
1119
|
+
readonly includeDeletedEvents?: Nullable<boolean>;
|
|
1120
|
+
readonly startId?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1121
|
+
}
|
|
1122
|
+
interface GetConversationMembersParametersJS {
|
|
1123
|
+
readonly order?: Nullable<vonage.PresentingOrderJS>;
|
|
1124
|
+
readonly pageSize?: Nullable<any>/* Nullable<kotlin.Number> */;
|
|
1125
|
+
readonly cursor?: Nullable<string>;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1126
1128
|
export as namespace clientsdk_clientcore_js;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
|
-
import { ConversationState, MemberState } from '../kotlin/JsUnions';
|
|
2
|
+
import { ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
3
3
|
export type Conversation = vonage.ConversationJS & {
|
|
4
4
|
memberState?: MemberState;
|
|
5
5
|
state?: ConversationState;
|
|
@@ -7,6 +7,9 @@ export type Conversation = vonage.ConversationJS & {
|
|
|
7
7
|
export type ConversationsPage = vonage.ConversationsPageJS & {
|
|
8
8
|
conversations: Conversation[];
|
|
9
9
|
};
|
|
10
|
+
export type EventsPage = vonage.EventsPageJS & {
|
|
11
|
+
events: PersistentConversationEvent[];
|
|
12
|
+
};
|
|
10
13
|
export type Member = vonage.MemberJS & {
|
|
11
14
|
state?: MemberState;
|
|
12
15
|
};
|
|
@@ -20,3 +23,17 @@ export type PresentingOrder = vonage.PresentingOrderJS;
|
|
|
20
23
|
export declare const PresentingOrder: typeof vonage.PresentingOrderJS;
|
|
21
24
|
export type OrderBy = vonage.OrderByJS;
|
|
22
25
|
export declare const OrderBy: typeof vonage.OrderByJS;
|
|
26
|
+
export interface Location {
|
|
27
|
+
name?: string | null;
|
|
28
|
+
address?: string | null;
|
|
29
|
+
latitude: string;
|
|
30
|
+
longitude: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Template {
|
|
33
|
+
name: string;
|
|
34
|
+
parameters?: string[] | null;
|
|
35
|
+
}
|
|
36
|
+
export interface Whatsapp {
|
|
37
|
+
policy: string;
|
|
38
|
+
locale: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import vonage from './vonage';
|
|
2
|
+
import { CustomData } from './JsonUtils';
|
|
3
|
+
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
4
|
+
export type CreateConversationParameters = Omit<vonage.CreateConversationParametersJS, 'ttl' | 'customData'> & {
|
|
5
|
+
ttl?: Nullable<number>;
|
|
6
|
+
customData?: Nullable<CustomData>;
|
|
7
|
+
};
|
|
8
|
+
export type GetConversationsParameters = Omit<vonage.GetConversationsParametersJS, 'pageSize'> & {
|
|
9
|
+
pageSize?: Nullable<number>;
|
|
10
|
+
};
|
|
11
|
+
export type GetConversationEventsParameters = Omit<vonage.GetConversationEventsParametersJS, 'pageSize' | 'startId'> & {
|
|
12
|
+
pageSize?: Nullable<number>;
|
|
13
|
+
startId?: Nullable<number>;
|
|
14
|
+
};
|
|
15
|
+
export type GetConversationMembersParameters = Omit<vonage.GetConversationMembersParametersJS, 'pageSize'> & {
|
|
16
|
+
pageSize?: Nullable<number>;
|
|
17
|
+
};
|
package/dist/utils/index.d.ts
CHANGED