@vonage/client-sdk 1.3.0-alpha.3 → 1.3.0-alpha.5

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 (47) hide show
  1. package/api_docs/ts/assets/navigation.js +1 -1
  2. package/api_docs/ts/assets/search.js +1 -1
  3. package/api_docs/ts/classes/ClientConfig.html +7 -209
  4. package/api_docs/ts/classes/ClientInitConfig.html +4 -152
  5. package/api_docs/ts/classes/VonageClient.html +249 -1103
  6. package/api_docs/ts/functions/setDefaultLoggingLevel.html +3 -80
  7. package/api_docs/ts/functions/setVonageClientLoggingLevel.html +3 -80
  8. package/api_docs/ts/index.html +2 -90
  9. package/api_docs/ts/interfaces/ConversationEvent.html +4 -112
  10. package/api_docs/ts/interfaces/ConversationState.html +122 -1129
  11. package/api_docs/ts/interfaces/CustomConversationEvent.html +12 -177
  12. package/api_docs/ts/interfaces/EmbeddedInfo.html +7 -129
  13. package/api_docs/ts/interfaces/EphemeralConversationEvent.html +10 -157
  14. package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +11 -167
  15. package/api_docs/ts/interfaces/From.html +3 -100
  16. package/api_docs/ts/interfaces/Location.html +5 -0
  17. package/api_docs/ts/interfaces/MemberInvitedEvent.html +11 -167
  18. package/api_docs/ts/interfaces/MemberJoinedEvent.html +11 -167
  19. package/api_docs/ts/interfaces/MemberLeftEvent.html +11 -167
  20. package/api_docs/ts/interfaces/MemberState.html +122 -1129
  21. package/api_docs/ts/interfaces/MessageAudioEvent.html +11 -167
  22. package/api_docs/ts/interfaces/MessageCustomEvent.html +11 -167
  23. package/api_docs/ts/interfaces/MessageFileEvent.html +11 -167
  24. package/api_docs/ts/interfaces/MessageImageEvent.html +11 -167
  25. package/api_docs/ts/interfaces/MessageLocationEvent.html +11 -167
  26. package/api_docs/ts/interfaces/MessageTemplateEvent.html +11 -167
  27. package/api_docs/ts/interfaces/MessageTextEvent.html +11 -167
  28. package/api_docs/ts/interfaces/MessageVCardEvent.html +11 -167
  29. package/api_docs/ts/interfaces/MessageVideoEvent.html +11 -167
  30. package/api_docs/ts/interfaces/NonPersistentConversationEvent.html +5 -142
  31. package/api_docs/ts/interfaces/PersistentConversationEvent.html +4 -116
  32. package/api_docs/ts/interfaces/System.html +5 -116
  33. package/api_docs/ts/interfaces/Template.html +3 -0
  34. package/api_docs/ts/interfaces/Whatsapp.html +3 -0
  35. package/api_docs/ts/modules.html +8 -80
  36. package/api_docs/ts/types/CustomData.html +2 -68
  37. package/dist/client/VonageClient.d.ts +121 -1
  38. package/dist/client/index.cjs +13544 -12009
  39. package/dist/client/index.mjs +13544 -12009
  40. package/dist/kotlin/clientsdk-clientcore_js.d.ts +59 -1
  41. package/dist/utils/ConversationModels.d.ts +14 -0
  42. package/dist/utils/RequestParameterModels.d.ts +8 -0
  43. package/dist/vonageClientSDK.js +13103 -11617
  44. package/dist/vonageClientSDK.min.js +1 -1
  45. package/dist/vonageClientSDK.min.mjs +1 -1
  46. package/dist/vonageClientSDK.mjs +13103 -11617
  47. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import vonage from '../utils/vonage';
2
- import { Conversation, ConversationsPage, EventsPage, Member, MembersPage, PresentingOrder, ClientInitConfigObject, ClientConfigObject, Json, CustomData, CreateConversationParameters, GetConversationsParameters, OrderBy, GetConversationEventsParameters, GetConversationMembersParameters } from '../utils';
2
+ import { Conversation, ConversationsPage, EventsPage, Member, MembersPage, PresentingOrder, ClientInitConfigObject, ClientConfigObject, Json, CustomData, Location, Template, Whatsapp, CreateConversationParameters, GetConversationsParameters, OrderBy, GetConversationEventsParameters, GetConversationMembersParameters, UpdateConversationParameters, ResetConversationParameters } from '../utils';
3
3
  import { Nullable } from '../kotlin/clientsdk-clientcore_js';
4
4
  import { ConversationEvent } from '../kotlin/JsUnions';
5
5
  /**
@@ -291,6 +291,33 @@ export declare class VonageClient extends vonage.CombinedClientJS {
291
291
  * @returns the `Conversation`
292
292
  */
293
293
  getConversation(conversationIdOrName: string): Promise<Conversation>;
294
+ /**
295
+ * Reset a complete conversation object identified by its unique conversation ID.
296
+ *
297
+ * This method resets the conversation to its default, except for the provided parameters.
298
+ *
299
+ * @example
300
+ * [[include: snippet_replaceConversation.txt]]
301
+ *
302
+ * @param conversationId - the Conversation's id.
303
+ * @param parameters - The properties of the conversation. If specified, these will replace existing values,
304
+ * otherwise they will be reset to defaults or set to null.
305
+ * @returns `conversation`, this object will contain the updated conversation properties if the update is successful.
306
+ */
307
+ resetConversation(conversationId: string, parameters?: Nullable<ResetConversationParameters>): Promise<Conversation>;
308
+ /**
309
+ * Updates a conversation object identified by its unique conversation ID.
310
+ *
311
+ * This method overrides the conversation properties to the provided parameters and rest remains as it is.
312
+ *
313
+ * @example
314
+ * [[include: snippet_updateConversation.txt]]
315
+ *
316
+ * @param conversationId - the Conversation's id.
317
+ * @param parameters - The properties of the conversation. These will replace existing values to the provided ones, rest will remain as they are.
318
+ * @returns `conversation`, this object will contain the updated conversation properties if the update is successful.
319
+ */
320
+ updateConversation(conversationId: string, parameters: UpdateConversationParameters): Promise<Conversation>;
294
321
  /**
295
322
  * Leave a Conversation
296
323
  *
@@ -379,6 +406,85 @@ export declare class VonageClient extends vonage.CombinedClientJS {
379
406
  * @returns the `timestamp` of the message
380
407
  */
381
408
  sendMessageImageEvent(id: string, imageUrl: URL): Promise<string>;
409
+ /**
410
+ * Send a Vidoe message to a Conversation.
411
+ *
412
+ * @example
413
+ * [[include: snippet_SendVideoMessage.txt]]
414
+ *
415
+ * @group Chat
416
+ * @beta
417
+ * @param id - the Conversation's id
418
+ * @param videoUrl - the url of the video resource.
419
+ * @returns the `timestamp` of the message
420
+ */
421
+ sendMessageVideoEvent(id: string, videoUrl: URL): Promise<string>;
422
+ /**
423
+ * Send a file message to a Conversation.
424
+ *
425
+ * @example
426
+ * [[include: snippet_SendFileMessage.txt]]
427
+ *
428
+ * @group Chat
429
+ * @beta
430
+ * @param id - the Conversation's id
431
+ * @param fileUrl - the url of the file resource.
432
+ * @returns the `timestamp` of the message
433
+ */
434
+ sendMessageFileEvent(id: string, fileUrl: URL): Promise<string>;
435
+ /**
436
+ * Send a audio message to a Conversation.
437
+ *
438
+ * @example
439
+ * [[include: snippet_SendAudioMessage.txt]]
440
+ *
441
+ * @group Chat
442
+ * @beta
443
+ * @param id - the Conversation's id
444
+ * @param audioUrl - the url of the audio resource.
445
+ * @returns the `timestamp` of the message
446
+ */
447
+ sendMessageAudioEvent(id: string, audioUrl: URL): Promise<string>;
448
+ /**
449
+ * Send a vcard message to a Conversation.
450
+ *
451
+ * @example
452
+ * [[include: snippet_SendVCardMessage.txt]]
453
+ *
454
+ * @group Chat
455
+ * @beta
456
+ * @param id - the Conversation's id
457
+ * @param vCardUrl - the url of the vCardUrl resource.
458
+ * @returns the `timestamp` of the message
459
+ */
460
+ sendMessageVCardEvent(id: string, vCardUrl: URL): Promise<string>;
461
+ /**
462
+ * Send a Location message to a Conversation.
463
+ *
464
+ * @example
465
+ * [[include: snippet_SendLocationMessage.txt]]
466
+ *
467
+ * @group Chat
468
+ * @beta
469
+ * @param id - the Conversation's id
470
+ * @param location - the description of the location.
471
+ * @returns the `timestamp` of the message
472
+ */
473
+ sendMessageLocationEvent(id: string, location: Location): Promise<string>;
474
+ /**
475
+ * Send a template message to a Conversation.
476
+ *
477
+ * @example
478
+ * [[include: snippet_SendMessageTemplateEvent.txt]]
479
+ *
480
+ * @group Chat
481
+ * @beta
482
+ * @param id - the Conversation's id
483
+ * @param whatsappObject - the description(locale and policies of business account) of the location.
484
+ * @param templateObject - the description(name and paramters) of the template.
485
+ * @returns the `timestamp` of the message
486
+ */
487
+ sendMessageTemplateEvent(id: string, templateObject: Template, whatsappObject: Whatsapp): Promise<string>;
382
488
  /**
383
489
  * Send an ephemeral event to a Conversation
384
490
  *
@@ -392,6 +498,20 @@ export declare class VonageClient extends vonage.CombinedClientJS {
392
498
  * @returns the `timestamp` of the message
393
499
  */
394
500
  sendEphemeralEvent(id: string, customData: CustomData): Promise<string>;
501
+ /**
502
+ * Send a Custom event to a Conversation
503
+ *
504
+ * @example
505
+ * [[include: snippet_SendCustomEvent.txt]]
506
+ *
507
+ * @group Chat
508
+ * @beta
509
+ * @param id - the Conversation's id
510
+ * @param type - the type of the custom event. Type must start with `custom:<...>`
511
+ * @param customData - the body of the event
512
+ * @returns the `timestamp` of the message
513
+ */
514
+ sendCustomEvent(id: string, eventType: string, customData: CustomData): Promise<string>;
395
515
  /**
396
516
  * Delete an Event in a Conversation
397
517
  *