@vonage/client-sdk 1.2.1-alpha.0 → 1.2.1-beta.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.
@@ -2,11 +2,21 @@ import './kotlin/clientsdk-clientcore_js';
2
2
  declare module './kotlin/clientsdk-clientcore_js' {
3
3
  namespace vonage {
4
4
  interface CombinedClientJS {
5
+ /**
6
+ * Set a configuration for the client SDK
7
+ *
8
+ * @example
9
+ * [[include: snippet_SetClientConfig.txt]]
10
+ *
11
+ * @param config - A configuration object
12
+ * @returns void
13
+ */
14
+ setConfig(config: ConfigObjectJS): void;
5
15
  /**
6
16
  * Mute your leg of a call
7
17
  *
8
18
  * @example
9
- * [[include:call_mute.txt]]
19
+ * [[include: snippet_CallMute.txt]]
10
20
  *
11
21
  * @param callId - Call ID
12
22
  * @returns void
@@ -24,7 +34,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
24
34
  * Earmuff your leg of a call
25
35
  *
26
36
  * @example
27
- * [[include:earmuff_event.txt]]
37
+ * [[include: snippet_EarmuffEvent.txt]]
28
38
  *
29
39
  * @param callId - Call ID
30
40
  * @returns void
@@ -42,7 +52,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
42
52
  * Send a string of digits to a call via DTMF
43
53
  *
44
54
  * @example
45
- * [[include:send_dtmf_digits.txt]]
55
+ * [[include: snippet_SendDtmfDigits.txt]]
46
56
  *
47
57
  * @param callId - Call ID
48
58
  * @param digits - DTMF digits
@@ -54,7 +64,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
54
64
  * Answer a call
55
65
  *
56
66
  * @example
57
- * [[include:answer_call.txt]]
67
+ * [[include: snippet_AnswerCall.txt]]
58
68
  *
59
69
  * @param callId - Call ID
60
70
  * @returns void
@@ -65,7 +75,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
65
75
  * Reject a call
66
76
  *
67
77
  * @example
68
- * [[include:reject_call.txt]]
78
+ * [[include: snippet_RejectCall.txt]]
69
79
  *
70
80
  * @param callId - Call ID
71
81
  * @returns void
@@ -76,7 +86,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
76
86
  * Reconnect a call
77
87
  *
78
88
  * @example
79
- * [[include:reconnect_call.txt]]
89
+ * [[include: snippet_ReconnectCall.txt]]
80
90
  *
81
91
  * @param callId - Call ID
82
92
  * @returns void
@@ -32,13 +32,13 @@ export declare namespace vonage {
32
32
  deleteConversation(cid: string): Promise<any>;
33
33
  getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData: boolean, orderBy: Nullable<vonage.OrderByJS>): Promise<vonage.ConversationsPageJS>;
34
34
  getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
35
- getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
35
+ getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>, includeDeletedEvents: boolean): Promise<vonage.EventsPageJS>;
36
36
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
37
37
  sendMessageTextEvent(cid: string, text: string): Promise<string>;
38
38
  sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
39
39
  sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
40
40
  deleteEvent(id: number, conversationId: string): Promise<any>;
41
- setConfig(config: vonage.CoreClientConfigJS): void;
41
+ setConfig(config: vonage.ConfigObjectJS): void;
42
42
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
43
43
  deleteSession(): Promise<any>;
44
44
  refreshSession(token: string): Promise<any>;
@@ -182,6 +182,12 @@ export declare namespace vonage {
182
182
  readonly "vonage.MessageEventJS": unique symbol;
183
183
  };
184
184
  }
185
+ interface MessageEventBodyJS {
186
+ readonly deleted: Nullable<string>;
187
+ readonly __doNotUseOrImplementIt: {
188
+ readonly "vonage.MessageEventBodyJS": unique symbol;
189
+ };
190
+ }
185
191
  class MessageTextEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
186
192
  private constructor();
187
193
  get kind(): string;
@@ -193,9 +199,11 @@ export declare namespace vonage {
193
199
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
194
200
  }
195
201
  namespace MessageTextEventJS {
196
- class Body {
202
+ class Body implements vonage.MessageEventBodyJS {
197
203
  private constructor();
198
204
  get text(): string;
205
+ get deleted(): Nullable<string>;
206
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
199
207
  }
200
208
  }
201
209
  class MessageCustomEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -209,9 +217,11 @@ export declare namespace vonage {
209
217
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
210
218
  }
211
219
  namespace MessageCustomEventJS {
212
- class Body {
220
+ class Body implements vonage.MessageEventBodyJS {
213
221
  private constructor();
214
222
  get customData(): string;
223
+ get deleted(): Nullable<string>;
224
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
215
225
  }
216
226
  }
217
227
  class MessageAudioEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -225,9 +235,11 @@ export declare namespace vonage {
225
235
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
226
236
  }
227
237
  namespace MessageAudioEventJS {
228
- class Body {
238
+ class Body implements vonage.MessageEventBodyJS {
229
239
  private constructor();
230
240
  get audioUrl(): string;
241
+ get deleted(): Nullable<string>;
242
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
231
243
  }
232
244
  }
233
245
  class MessageVideoEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -241,9 +253,11 @@ export declare namespace vonage {
241
253
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
242
254
  }
243
255
  namespace MessageVideoEventJS {
244
- class Body {
256
+ class Body implements vonage.MessageEventBodyJS {
245
257
  private constructor();
246
258
  get videoUrl(): string;
259
+ get deleted(): Nullable<string>;
260
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
247
261
  }
248
262
  }
249
263
  class MessageImageEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -257,9 +271,11 @@ export declare namespace vonage {
257
271
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
258
272
  }
259
273
  namespace MessageImageEventJS {
260
- class Body {
274
+ class Body implements vonage.MessageEventBodyJS {
261
275
  private constructor();
262
276
  get imageUrl(): string;
277
+ get deleted(): Nullable<string>;
278
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
263
279
  }
264
280
  }
265
281
  class MessageFileEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -273,9 +289,11 @@ export declare namespace vonage {
273
289
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
274
290
  }
275
291
  namespace MessageFileEventJS {
276
- class Body {
292
+ class Body implements vonage.MessageEventBodyJS {
277
293
  private constructor();
278
294
  get fileUrl(): string;
295
+ get deleted(): Nullable<string>;
296
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
279
297
  }
280
298
  }
281
299
  class MessageVCardEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -289,9 +307,11 @@ export declare namespace vonage {
289
307
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
290
308
  }
291
309
  namespace MessageVCardEventJS {
292
- class Body {
310
+ class Body implements vonage.MessageEventBodyJS {
293
311
  private constructor();
294
312
  get vcardUrl(): string;
313
+ get deleted(): Nullable<string>;
314
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
295
315
  }
296
316
  }
297
317
  class MessageLocationEventJS implements vonage.MessageEventJS, vonage.PersistentConversationEventJS {
@@ -305,9 +325,11 @@ export declare namespace vonage {
305
325
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
306
326
  }
307
327
  namespace MessageLocationEventJS {
308
- class Body {
328
+ class Body implements vonage.MessageEventBodyJS {
309
329
  private constructor();
310
330
  get location(): vonage.MessageLocationEventJS.Location;
331
+ get deleted(): Nullable<string>;
332
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
311
333
  }
312
334
  class Location {
313
335
  private constructor();
@@ -328,15 +350,17 @@ export declare namespace vonage {
328
350
  readonly __doNotUseOrImplementIt: vonage.MessageEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
329
351
  }
330
352
  namespace MessageTemplateEventJS {
331
- class Body {
353
+ class Body implements vonage.MessageEventBodyJS {
332
354
  private constructor();
333
355
  get body(): any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */;
334
356
  get template(): vonage.MessageTemplateEventJS.TemplateObject;
335
357
  get whatsapp(): vonage.MessageTemplateEventJS.WhatsappObject;
358
+ get deleted(): Nullable<string>;
336
359
  copy(body?: any/* com.vonage.clientcore.core.api.models.MessageTemplateEvent.Body */): vonage.MessageTemplateEventJS.Body;
337
360
  toString(): string;
338
361
  hashCode(): number;
339
362
  equals(other: Nullable<any>): boolean;
363
+ readonly __doNotUseOrImplementIt: vonage.MessageEventBodyJS["__doNotUseOrImplementIt"];
340
364
  }
341
365
  class TemplateObject {
342
366
  private constructor();
@@ -665,13 +689,13 @@ export declare namespace vonage {
665
689
  deleteConversation(cid: string): Promise<any>;
666
690
  getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, includeCustomData?: boolean, orderBy?: Nullable<vonage.OrderByJS>): Promise<vonage.ConversationsPageJS>;
667
691
  getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
668
- getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>): Promise<vonage.EventsPageJS>;
692
+ getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>, eventFilter: Nullable<Array<string>>, includeDeletedEvents?: boolean): Promise<vonage.EventsPageJS>;
669
693
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
670
694
  sendMessageTextEvent(cid: string, text: string): Promise<string>;
671
695
  sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
672
696
  sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
673
697
  deleteEvent(id: number, conversationId: string): Promise<any>;
674
- setConfig(config: vonage.CoreClientConfigJS): void;
698
+ setConfig(config: vonage.ConfigObjectJS): void;
675
699
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
676
700
  deleteSession(): Promise<any>;
677
701
  refreshSession(token: string): Promise<any>;
@@ -688,6 +712,21 @@ export declare namespace vonage {
688
712
  reconnection(): void;
689
713
  sessionError(reason: vonage.SessionErrorReasonJS): void;
690
714
  }
715
+ interface ConfigObjectJS {
716
+ readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
717
+ readonly apiUrl?: Nullable<string>;
718
+ readonly websocketUrl?: Nullable<string>;
719
+ readonly websocketPath?: Nullable<string>;
720
+ readonly autoMediaReoffer?: Nullable<boolean>;
721
+ }
722
+ interface InitConfigObjectJS extends vonage.ConfigObjectJS {
723
+ readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
724
+ readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
725
+ readonly apiUrl?: Nullable<string>;
726
+ readonly websocketUrl?: Nullable<string>;
727
+ readonly websocketPath?: Nullable<string>;
728
+ readonly autoMediaReoffer?: Nullable<boolean>;
729
+ }
691
730
  }
692
731
  export declare namespace vonage {
693
732
  abstract class CoreClientConfigRegionJS {
@@ -710,8 +749,9 @@ export declare namespace vonage {
710
749
  get name(): "AP" | "EU" | "US";
711
750
  get ordinal(): 0 | 1 | 2;
712
751
  }
713
- class CoreClientConfigJS {
714
- constructor(region: vonage.CoreClientConfigRegionJS);
752
+ class CoreClientConfigJS implements vonage.ConfigObjectJS {
753
+ constructor(region?: vonage.CoreClientConfigRegionJS);
754
+ get region(): vonage.CoreClientConfigRegionJS;
715
755
  get apiUrl(): string;
716
756
  set apiUrl(value: string);
717
757
  get websocketUrl(): string;
@@ -720,8 +760,11 @@ export declare namespace vonage {
720
760
  set websocketPath(value: string);
721
761
  get autoMediaReoffer(): boolean;
722
762
  set autoMediaReoffer(value: boolean);
723
- get enableWebsocketInvites(): boolean;
724
- set enableWebsocketInvites(value: boolean);
763
+ }
764
+ class CoreClientInitConfigJS extends vonage.CoreClientConfigJS implements vonage.InitConfigObjectJS {
765
+ constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
766
+ get loggingLevel(): vonage.LoggingLevelJS;
767
+ set loggingLevel(value: vonage.LoggingLevelJS);
725
768
  }
726
769
  abstract class LoggingLevelJS /* implements com.vonage.clientcore.core.api.ILoggingLevel */ {
727
770
  private constructor();
@@ -780,7 +823,7 @@ export declare namespace vonage {
780
823
  function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void;
781
824
  interface ICoreClientJS {
782
825
  readonly core: any/* com.vonage.clientcore.core.CoreClient */;
783
- setConfig(config: vonage.CoreClientConfigJS): void;
826
+ setConfig(config: vonage.ConfigObjectJS): void;
784
827
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
785
828
  deleteSession(): Promise<any>;
786
829
  refreshSession(token: string): Promise<any>;
@@ -900,7 +943,7 @@ export declare namespace vonage {
900
943
  enableEarmuff(callId: string): Promise<any>;
901
944
  disableEarmuff(callId: string): Promise<any>;
902
945
  sendDTMF(callId: string, digits: string): Promise<any>;
903
- setConfig(config: vonage.CoreClientConfigJS): void;
946
+ setConfig(config: vonage.ConfigObjectJS): void;
904
947
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
905
948
  deleteSession(): Promise<any>;
906
949
  refreshSession(token: string): Promise<any>;
@@ -1,5 +1,18 @@
1
+ import { Nullable } from '../kotlin/clientsdk-clientcore_js';
1
2
  import vonage from '../utils/vonage';
2
3
  export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
4
+ export type ClientConfigObject = ConfigObjectJS;
5
+ export type ClientInitConfigObject = InitConfigObjectJS;
6
+ export interface ConfigObjectJS {
7
+ region?: Nullable<vonage.CoreClientConfigRegionJS>;
8
+ apiUrl?: Nullable<string>;
9
+ websocketUrl?: Nullable<string>;
10
+ websocketPath?: Nullable<string>;
11
+ autoMediaReoffer?: Nullable<boolean>;
12
+ }
13
+ export interface InitConfigObjectJS extends ConfigObjectJS {
14
+ loggingLevel?: Nullable<vonage.LoggingLevelJS>;
15
+ }
3
16
  /**
4
17
  * Represents the configuration object for the client.
5
18
  *
@@ -13,10 +26,22 @@ export declare class ClientConfig extends vonage.CoreClientConfigJS {
13
26
  /**
14
27
  * Constructs a new instance of the class.
15
28
  *
16
- * @param {string} region The region where the API and WebSocket URLs should be configured.
29
+ * @param region The region where the API and WebSocket URLs should be configured.
17
30
  * Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific).
18
31
  * The URLs will be automatically set based on the selected region.
19
32
  * Defaults to "US" if no region is specified.
20
33
  */
21
34
  constructor(region?: vonage.CoreClientConfigRegionJS);
22
35
  }
36
+ export declare class ClientInitConfig extends vonage.CoreClientInitConfigJS {
37
+ /**
38
+ * Constructs a new instance of the class.
39
+ *
40
+ * @param loggingLevel The logging level to set for the SDK. Default is Error.
41
+ * @param region The region where the API and WebSocket URLs should be configured.
42
+ * Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific).
43
+ * The URLs will be automatically set based on the selected region.
44
+ * Defaults to "US" if no region is specified.
45
+ */
46
+ constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
47
+ }
@@ -1,5 +1,5 @@
1
- export { ClientConfig, ConfigRegion } from './ClientConfig';
2
- export { LoggingLevel } from './logging';
1
+ export * from './ClientConfig';
2
+ export * from './logging';
3
3
  export * from './ConversationModels';
4
4
  export * from '../kotlin/JsUnions';
5
5
  export * from './ErrorModels';