@sinch/conversation 0.0.2 → 0.0.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.
Files changed (111) hide show
  1. package/README.md +28 -13
  2. package/dist/models/v1/agent/agent.d.ts +3 -3
  3. package/dist/models/v1/agent-joined-event/agent-joined-event.d.ts +1 -1
  4. package/dist/models/v1/agent-left-event/agent-left-event.d.ts +1 -1
  5. package/dist/models/v1/app-event/app-event.d.ts +44 -1
  6. package/dist/models/v1/app-message/app-message.d.ts +198 -30
  7. package/dist/models/v1/app-message-message/app-message-message.d.ts +92 -1
  8. package/dist/models/v1/choice/choice.d.ts +17 -5
  9. package/dist/models/v1/comment-reply-event/comment-reply-event.d.ts +1 -1
  10. package/dist/models/v1/composing-end-event/composing-end-event.d.ts +1 -1
  11. package/dist/models/v1/composing-event/composing-event.d.ts +1 -1
  12. package/dist/models/v1/contact-event/contact-event.d.ts +32 -1
  13. package/dist/models/v1/contact-id/contact-id.d.ts +2 -1
  14. package/dist/models/v1/contact-info-message/contact-info-message.d.ts +1 -1
  15. package/dist/models/v1/contact-message/contact-message.d.ts +36 -6
  16. package/dist/models/v1/conversation-channel-credential/conversation-channel-credential.d.ts +3 -10
  17. package/dist/models/v1/conversation-channel-credential/index.d.ts +1 -1
  18. package/dist/models/v1/conversation-event/conversation-event.d.ts +6 -0
  19. package/dist/models/v1/conversation-message/conversation-message.d.ts +4 -2
  20. package/dist/models/v1/generic-event/generic-event.d.ts +1 -1
  21. package/dist/models/v1/get-channel-profile-request/get-channel-profile-request.d.ts +2 -2
  22. package/dist/models/v1/helper.d.ts +17 -9
  23. package/dist/models/v1/helper.js +26 -9
  24. package/dist/models/v1/helper.js.map +1 -1
  25. package/dist/models/v1/identified-by/identified-by.d.ts +1 -0
  26. package/dist/models/v1/index.d.ts +2 -3
  27. package/dist/models/v1/index.js +2 -3
  28. package/dist/models/v1/index.js.map +1 -1
  29. package/dist/models/v1/inject-conversation-event-request/inject-conversation-event-request.d.ts +12 -1
  30. package/dist/models/v1/inject-message-request/inject-message-request.d.ts +4 -2
  31. package/dist/models/v1/list-message/index.d.ts +1 -1
  32. package/dist/models/v1/list-message/list-message.d.ts +8 -3
  33. package/dist/models/v1/list-section/list-section.d.ts +1 -1
  34. package/dist/models/v1/lookup-capability-request/index.d.ts +1 -0
  35. package/dist/models/v1/lookup-capability-request/index.js.map +1 -0
  36. package/dist/models/v1/{lookup-capability/lookup-capability.d.ts → lookup-capability-request/lookup-capability-request.d.ts} +2 -2
  37. package/dist/models/v1/{query-capability-response/index.js → lookup-capability-request/lookup-capability-request.js} +1 -1
  38. package/dist/models/v1/lookup-capability-request/lookup-capability-request.js.map +1 -0
  39. package/dist/models/v1/lookup-capability-response/index.d.ts +1 -0
  40. package/dist/models/v1/lookup-capability-response/index.js.map +1 -0
  41. package/dist/models/v1/{query-capability-response/query-capability-response.d.ts → lookup-capability-response/lookup-capability-response.d.ts} +1 -1
  42. package/dist/models/v1/{lookup-capability/lookup-capability.js → lookup-capability-response/lookup-capability-response.js} +1 -1
  43. package/dist/models/v1/lookup-capability-response/lookup-capability-response.js.map +1 -0
  44. package/dist/models/v1/mod-callback-events/capability-event/capability-event.d.ts +2 -14
  45. package/dist/models/v1/mod-callback-events/channel-event/channel-event.d.ts +4 -15
  46. package/dist/models/v1/mod-callback-events/contact-create-event/contact-create-event.d.ts +2 -14
  47. package/dist/models/v1/mod-callback-events/contact-delete-event/contact-delete-event.d.ts +2 -14
  48. package/dist/models/v1/mod-callback-events/contact-identities-duplication-event/contact-identities-duplication-event.d.ts +2 -14
  49. package/dist/models/v1/mod-callback-events/contact-merge-event/contact-merge-event.d.ts +2 -14
  50. package/dist/models/v1/mod-callback-events/contact-update-event/contact-update-event.d.ts +2 -14
  51. package/dist/models/v1/mod-callback-events/conversation-callback-event/conversation-callback-event.d.ts +13 -0
  52. package/dist/models/v1/mod-callback-events/conversation-delete-event/conversation-delete-event.d.ts +2 -14
  53. package/dist/models/v1/mod-callback-events/conversation-start-event/conversation-start-event.d.ts +2 -14
  54. package/dist/models/v1/mod-callback-events/conversation-stop-event/conversation-stop-event.d.ts +2 -14
  55. package/dist/models/v1/mod-callback-events/event-delivery/event-delivery.d.ts +2 -14
  56. package/dist/models/v1/mod-callback-events/event-inbound/event-inbound.d.ts +2 -14
  57. package/dist/models/v1/mod-callback-events/message-delivery-receipt-event/message-delivery-receipt-event.d.ts +2 -14
  58. package/dist/models/v1/mod-callback-events/message-inbound-event/message-inbound-event.d.ts +2 -14
  59. package/dist/models/v1/mod-callback-events/message-inbound-event-item/message-inbound-event-item.d.ts +3 -3
  60. package/dist/models/v1/mod-callback-events/message-inbound-smart-conversation-redaction-event/message-inbound-smart-conversation-redaction-event.d.ts +2 -14
  61. package/dist/models/v1/mod-callback-events/message-submit-event/message-submit-event.d.ts +2 -14
  62. package/dist/models/v1/mod-callback-events/opt-in-event/opt-in-event.d.ts +2 -14
  63. package/dist/models/v1/mod-callback-events/opt-out-event/opt-out-event.d.ts +2 -14
  64. package/dist/models/v1/mod-callback-events/record-notification/record-notification.d.ts +2 -14
  65. package/dist/models/v1/mod-callback-events/smart-conversations-event/smart-conversations-event.d.ts +2 -14
  66. package/dist/models/v1/mod-callback-events/unsupported-callback-event/unsupported-callback-event.d.ts +2 -14
  67. package/dist/models/v1/send-event-request/index.d.ts +1 -1
  68. package/dist/models/v1/send-event-request/send-event-request.d.ts +37 -5
  69. package/dist/models/v1/send-message-request/index.d.ts +1 -1
  70. package/dist/models/v1/send-message-request/send-message-request.d.ts +53 -6
  71. package/dist/models/v1/transcode-message-response/transcode-message-response.d.ts +2 -1
  72. package/dist/models/v1/v2-template-translation/index.d.ts +1 -1
  73. package/dist/models/v1/v2-template-translation/v2-template-translation.d.ts +94 -10
  74. package/dist/rest/v1/capability/capability-api.d.ts +5 -5
  75. package/dist/rest/v1/capability/capability-api.jest.fixture.d.ts +5 -3
  76. package/dist/rest/v1/capability/capability-api.jest.fixture.js +1 -1
  77. package/dist/rest/v1/capability/capability-api.jest.fixture.js.map +1 -1
  78. package/dist/rest/v1/capability/capability-api.js +1 -1
  79. package/dist/rest/v1/capability/capability-api.js.map +1 -1
  80. package/dist/rest/v1/contact/contact-api.d.ts +7 -6
  81. package/dist/rest/v1/contact/contact-api.jest.fixture.d.ts +4 -2
  82. package/dist/rest/v1/contact/contact-api.jest.fixture.js.map +1 -1
  83. package/dist/rest/v1/contact/contact-api.js +3 -2
  84. package/dist/rest/v1/contact/contact-api.js.map +1 -1
  85. package/dist/rest/v1/events/events-api.d.ts +66 -5
  86. package/dist/rest/v1/events/events-api.jest.fixture.d.ts +39 -3
  87. package/dist/rest/v1/events/events-api.jest.fixture.js +24 -0
  88. package/dist/rest/v1/events/events-api.jest.fixture.js.map +1 -1
  89. package/dist/rest/v1/events/events-api.js +56 -3
  90. package/dist/rest/v1/events/events-api.js.map +1 -1
  91. package/dist/rest/v1/messages/messages-api.d.ts +96 -5
  92. package/dist/rest/v1/messages/messages-api.jest.fixture.d.ts +59 -3
  93. package/dist/rest/v1/messages/messages-api.jest.fixture.js +36 -0
  94. package/dist/rest/v1/messages/messages-api.jest.fixture.js.map +1 -1
  95. package/dist/rest/v1/messages/messages-api.js +80 -3
  96. package/dist/rest/v1/messages/messages-api.js.map +1 -1
  97. package/package.json +2 -2
  98. package/dist/models/v1/list-message-message-properties/index.d.ts +0 -1
  99. package/dist/models/v1/list-message-message-properties/index.js.map +0 -1
  100. package/dist/models/v1/list-message-message-properties/list-message-message-properties.d.ts +0 -9
  101. package/dist/models/v1/list-message-message-properties/list-message-message-properties.js +0 -3
  102. package/dist/models/v1/list-message-message-properties/list-message-message-properties.js.map +0 -1
  103. package/dist/models/v1/lookup-capability/index.d.ts +0 -1
  104. package/dist/models/v1/lookup-capability/index.js.map +0 -1
  105. package/dist/models/v1/lookup-capability/lookup-capability.js.map +0 -1
  106. package/dist/models/v1/query-capability-response/index.d.ts +0 -1
  107. package/dist/models/v1/query-capability-response/index.js.map +0 -1
  108. package/dist/models/v1/query-capability-response/query-capability-response.js +0 -3
  109. package/dist/models/v1/query-capability-response/query-capability-response.js.map +0 -1
  110. /package/dist/models/v1/{list-message-message-properties → lookup-capability-request}/index.js +0 -0
  111. /package/dist/models/v1/{lookup-capability → lookup-capability-response}/index.js +0 -0
@@ -1,11 +1,20 @@
1
1
  import { ConversationChannel } from '../conversation-channel';
2
2
  import { Recipient } from '../recipient';
3
- import { AppMessageMessage } from '../app-message-message';
4
3
  import { ConversationMetadataUpdateStrategy, MessageQueue, ProcessingStrategy } from '../enums';
4
+ import { CardMessage } from '../card-message';
5
+ import { CarouselMessage } from '../carousel-message';
6
+ import { ChoiceMessage } from '../choice-message';
7
+ import { LocationMessage } from '../location-message';
8
+ import { MediaMessage } from '../media-message';
9
+ import { TemplateMessage } from '../template-message';
10
+ import { TextMessage } from '../text-message';
11
+ import { ListMessage } from '../list-message';
12
+ import { ContactInfoMessage } from '../contact-info-message';
13
+ import { AppMessageMessage } from '../app-message-message';
5
14
  /**
6
15
  * This is the request body for sending a message. `app_id`, `recipient`, and `message` are all required fields.
7
16
  */
8
- export interface SendMessageRequest {
17
+ export interface SendMessageRequestBase<T extends Recipient> {
9
18
  /** The ID of the app sending the message. */
10
19
  app_id: string;
11
20
  /** Overwrites the default callback url for delivery receipts for this message The REST URL should be of the form: `http://host[:port]/path` */
@@ -16,8 +25,6 @@ export interface SendMessageRequest {
16
25
  channel_properties?: {
17
26
  [K in ChannelPropertyKey]?: string;
18
27
  };
19
- /** @see AppMessage */
20
- message: AppMessageMessage;
21
28
  /** Metadata that should be associated with the message. Returned in the `metadata` field of a [Message Delivery Receipt](https://developers.sinch.com/docs/conversation/callbacks/#message-delivery-receipt). Up to 1024 characters long. */
22
29
  message_metadata?: string;
23
30
  /** Metadata that should be associated with the conversation. This metadata will be propagated on MO callbacks associated with this conversation. Up to 1024 characters long. Note that the MO callback will always use the last metadata available in the conversation. Important notes: - If you send a message with the `conversation_metadata` field populated, and then send another message without populating the `conversation_metadata` field, the original metadata will continue be propagated on the related MO callbacks. - If you send a message with the `conversation_metadata` field populated, and then send another message with a different value for `conversation_metadata` in the same conversation, the latest metadata value overwrites the existing one. So, future MO callbacks will include the new metadata. - The `conversation_metadata` only accepts json objects. Currently only returned in the `message_metadata` field of an [Inbound Message](/docs/conversation/callbacks/#inbound-message) callback. */
@@ -25,7 +32,7 @@ export interface SendMessageRequest {
25
32
  /** @see MessageQueue */
26
33
  queue?: MessageQueue;
27
34
  /** @see Recipient */
28
- recipient: Recipient;
35
+ recipient: T;
29
36
  /** The timeout allotted for sending the message, expressed in seconds. Passed to channels which support it and emulated by the Conversation API for channels without ttl support but with message retract/unsend functionality. Channel failover will not be performed for messages with an expired TTL. The format is an integer with the suffix `s` (for seconds). Valid integer range is 3 to 315,576,000,000 (inclusive). Example values include `10s` (10 seconds) and `86400s` (24 hours). */
30
37
  ttl?: string;
31
38
  /** Overrides the app\'s [Processing Mode](../../../../../conversation/processing-modes/). Default value is `DEFAULT`. */
@@ -35,4 +42,44 @@ export interface SendMessageRequest {
35
42
  /** Update strategy for the `conversation_metadata` field. */
36
43
  conversation_metadata_update_strategy?: ConversationMetadataUpdateStrategy;
37
44
  }
38
- export type ChannelPropertyKey = 'MESSENGER_MESSAGING_TYPE' | 'MESSENGER_MESSAGE_TAG' | 'MESSENGER_NOTIFICATION_TYPE' | 'VIBER_SENDER_NAME' | 'VIBER_SENDER_AVATAR' | 'SMS_FLASH_MESSAGE' | 'MMS_SENDER' | 'TELEGRAM_DISABLE_LINK_PREVIEW' | 'SMS_SENDER' | 'INSTAGRAM_MESSAGE_TAG' | 'MMS_STRICT_VALIDATION' | 'KAKAOTALK_AUTHENTICATION' | 'LINE_VIDEO_TRACKING_ID' | 'SMS_MAX_NUMBER_OF_MESSAGE_PARTS';
45
+ export type ChannelPropertyKey = 'MESSENGER_MESSAGING_TYPE' | 'MESSENGER_MESSAGE_TAG' | 'MESSENGER_NOTIFICATION_TYPE' | 'VIBER_SENDER_NAME' | 'VIBER_SENDER_AVATAR' | 'SMS_FLASH_MESSAGE' | 'MMS_SENDER' | 'TELEGRAM_DISABLE_LINK_PREVIEW' | 'SMS_SENDER' | 'INSTAGRAM_MESSAGE_TAG' | 'MMS_STRICT_VALIDATION' | 'KAKAOTALK_AUTHENTICATION' | 'LINE_VIDEO_TRACKING_ID' | 'SMS_MAX_NUMBER_OF_MESSAGE_PARTS' | string;
46
+ export interface SendMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
47
+ /** @see AppMessageMessage */
48
+ message: AppMessageMessage;
49
+ }
50
+ export interface SendCardMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
51
+ /** @see CardMessage */
52
+ message: CardMessage;
53
+ }
54
+ export interface SendCarouselMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
55
+ /** @see CarouselMessage */
56
+ message: CarouselMessage;
57
+ }
58
+ export interface SendChoiceMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
59
+ /** @see CarouselMessage */
60
+ message: ChoiceMessage;
61
+ }
62
+ export interface SendLocationMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
63
+ /** @see LocationMessage */
64
+ message: LocationMessage;
65
+ }
66
+ export interface SendMediaMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
67
+ /** @see MediaMessage */
68
+ message: MediaMessage;
69
+ }
70
+ export interface SendTemplateMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
71
+ /** @see TemplateMessage */
72
+ message: TemplateMessage;
73
+ }
74
+ export interface SendTextMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
75
+ /** @see TextMessage */
76
+ message: TextMessage;
77
+ }
78
+ export interface SendListMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
79
+ /** @see ListMessage */
80
+ message: ListMessage;
81
+ }
82
+ export interface SendContactInfoMessageRequest<T extends Recipient> extends SendMessageRequestBase<T> {
83
+ /** @see ContactInfoMessage */
84
+ message: ContactInfoMessage;
85
+ }
@@ -1,6 +1,7 @@
1
+ import { ConversationChannel } from '../conversation-channel';
1
2
  export interface TranscodeMessageResponse {
2
3
  /** The transcoded message for the different channels. The keys in the map correspond to channel names, as defined by the type ConversationChannel. */
3
4
  transcoded_message?: {
4
- [key: string]: string;
5
+ [key in ConversationChannel]?: string;
5
6
  };
6
7
  }
@@ -1 +1 @@
1
- export type { V2TemplateTranslation, V2TemplateTranslationBase, V2TemplateTranslationCardMessage, V2TemplateTranslationCarouselMessage, V2TemplateTranslationChoiceMessage, V2TemplateTranslationListMessage, V2TemplateTranslationLocationMessage, V2TemplateTranslationMediaMessage, V2TemplateTranslationTemplateMessage, V2TemplateTranslationTextMessage, } from './v2-template-translation';
1
+ export type { V2TemplateTranslation } from './v2-template-translation';
@@ -8,8 +8,9 @@ import { LocationMessage } from '../location-message';
8
8
  import { MediaMessage } from '../media-message';
9
9
  import { TemplateMessage } from '../template-message';
10
10
  import { ListMessage } from '../list-message';
11
- export type V2TemplateTranslation = V2TemplateTranslationCardMessage | V2TemplateTranslationChoiceMessage | V2TemplateTranslationCarouselMessage | V2TemplateTranslationListMessage | V2TemplateTranslationLocationMessage | V2TemplateTranslationMediaMessage | V2TemplateTranslationTemplateMessage | V2TemplateTranslationTextMessage;
12
- export interface V2TemplateTranslationBase {
11
+ import { ContactInfoMessage } from '../contact-info-message';
12
+ export type V2TemplateTranslation = V2TemplateTranslationCardMessage | V2TemplateTranslationChoiceMessage | V2TemplateTranslationCarouselMessage | V2TemplateTranslationListMessage | V2TemplateTranslationLocationMessage | V2TemplateTranslationMediaMessage | V2TemplateTranslationTemplateMessage | V2TemplateTranslationTextMessage | V2TemplateTranslationContactInfoMessage;
13
+ interface V2TemplateTranslationBase {
13
14
  /** The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
14
15
  language_code: string;
15
16
  /** The version of the translation. */
@@ -23,11 +24,94 @@ export interface V2TemplateTranslationBase {
23
24
  /** Timestamp of when the translation was updated. */
24
25
  update_time?: Date;
25
26
  }
26
- export type V2TemplateTranslationTextMessage = V2TemplateTranslationBase & TextMessage;
27
- export type V2TemplateTranslationCardMessage = V2TemplateTranslationBase & CardMessage;
28
- export type V2TemplateTranslationCarouselMessage = V2TemplateTranslationBase & CarouselMessage;
29
- export type V2TemplateTranslationChoiceMessage = V2TemplateTranslationBase & ChoiceMessage;
30
- export type V2TemplateTranslationLocationMessage = V2TemplateTranslationBase & LocationMessage;
31
- export type V2TemplateTranslationMediaMessage = V2TemplateTranslationBase & MediaMessage;
32
- export type V2TemplateTranslationTemplateMessage = V2TemplateTranslationBase & TemplateMessage;
33
- export type V2TemplateTranslationListMessage = V2TemplateTranslationBase & ListMessage;
27
+ interface V2TemplateTranslationCardMessage extends V2TemplateTranslationBase, CardMessage {
28
+ carousel_message?: never;
29
+ choice_message?: never;
30
+ contact_info_message?: never;
31
+ list_message?: never;
32
+ location_message?: never;
33
+ media_message?: never;
34
+ template_message?: never;
35
+ text_message?: never;
36
+ }
37
+ interface V2TemplateTranslationCarouselMessage extends V2TemplateTranslationBase, CarouselMessage {
38
+ card_message?: never;
39
+ choice_message?: never;
40
+ contact_info_message?: never;
41
+ list_message?: never;
42
+ location_message?: never;
43
+ media_message?: never;
44
+ template_message?: never;
45
+ text_message?: never;
46
+ }
47
+ interface V2TemplateTranslationChoiceMessage extends V2TemplateTranslationBase, ChoiceMessage {
48
+ card_message?: never;
49
+ carousel_message?: never;
50
+ contact_info_message?: never;
51
+ list_message?: never;
52
+ location_message?: never;
53
+ media_message?: never;
54
+ template_message?: never;
55
+ text_message?: never;
56
+ }
57
+ interface V2TemplateTranslationContactInfoMessage extends V2TemplateTranslationBase, ContactInfoMessage {
58
+ card_message?: never;
59
+ carousel_message?: never;
60
+ choice_message?: never;
61
+ list_message?: never;
62
+ location_message?: never;
63
+ media_message?: never;
64
+ template_message?: never;
65
+ text_message?: never;
66
+ }
67
+ interface V2TemplateTranslationListMessage extends V2TemplateTranslationBase, ListMessage {
68
+ card_message?: never;
69
+ carousel_message?: never;
70
+ choice_message?: never;
71
+ contact_info_message?: never;
72
+ location_message?: never;
73
+ media_message?: never;
74
+ template_message?: never;
75
+ text_message?: never;
76
+ }
77
+ interface V2TemplateTranslationLocationMessage extends V2TemplateTranslationBase, LocationMessage {
78
+ card_message?: never;
79
+ carousel_message?: never;
80
+ choice_message?: never;
81
+ contact_info_message?: never;
82
+ list_message?: never;
83
+ media_message?: never;
84
+ template_message?: never;
85
+ text_message?: never;
86
+ }
87
+ interface V2TemplateTranslationMediaMessage extends V2TemplateTranslationBase, MediaMessage {
88
+ card_message?: never;
89
+ carousel_message?: never;
90
+ choice_message?: never;
91
+ contact_info_message?: never;
92
+ list_message?: never;
93
+ location_message?: never;
94
+ template_message?: never;
95
+ text_message?: never;
96
+ }
97
+ interface V2TemplateTranslationTemplateMessage extends V2TemplateTranslationBase, TemplateMessage {
98
+ card_message?: never;
99
+ carousel_message?: never;
100
+ choice_message?: never;
101
+ contact_info_message?: never;
102
+ list_message?: never;
103
+ location_message?: never;
104
+ media_message?: never;
105
+ text_message?: never;
106
+ }
107
+ interface V2TemplateTranslationTextMessage extends V2TemplateTranslationBase, TextMessage {
108
+ card_message?: never;
109
+ carousel_message?: never;
110
+ choice_message?: never;
111
+ contact_info_message?: never;
112
+ list_message?: never;
113
+ location_message?: never;
114
+ media_message?: never;
115
+ template_message?: never;
116
+ }
117
+ export {};
@@ -1,9 +1,9 @@
1
1
  import { SinchClientParameters } from '@sinch/sdk-client';
2
- import { LookupCapability, QueryCapabilityResponse } from '../../../models';
2
+ import { LookupCapabilityRequest, LookupCapabilityResponse, Recipient } from '../../../models';
3
3
  import { ConversationDomainApi } from '../conversation-domain-api';
4
- export interface LookupCapabilityRequestData {
4
+ export interface LookupCapabilityRequestData<T extends Recipient> {
5
5
  /** The lookup capability request. */
6
- 'lookupCapabilityRequestBody': LookupCapability;
6
+ 'lookupCapabilityRequestBody': LookupCapabilityRequest<T>;
7
7
  }
8
8
  export declare class CapabilityApi extends ConversationDomainApi {
9
9
  /**
@@ -15,7 +15,7 @@ export declare class CapabilityApi extends ConversationDomainApi {
15
15
  /**
16
16
  * Capability lookup
17
17
  * This method is asynchronous - it immediately returns the requested Capability registration. Capability check is then delivered as a callback to registered webhooks with trigger CAPABILITY for every reachable channel.
18
- * @param { LookupCapabilityRequestData } data - The data to provide to the API call.
18
+ * @param { LookupCapabilityRequestData<Recipient> } data - The data to provide to the API call.
19
19
  */
20
- lookup(data: LookupCapabilityRequestData): Promise<QueryCapabilityResponse>;
20
+ lookup(data: LookupCapabilityRequestData<Recipient>): Promise<LookupCapabilityResponse>;
21
21
  }
@@ -1,9 +1,11 @@
1
1
  /// <reference types="jest" />
2
- import { QueryCapabilityResponse } from '../../../models';
2
+ import { LookupCapabilityResponse, Recipient } from '../../../models';
3
3
  import { CapabilityApi, LookupCapabilityRequestData } from './capability-api';
4
4
  export declare class CapabilityApiFixture implements Partial<Readonly<CapabilityApi>> {
5
5
  /**
6
- * Fixture associated to function lookup
6
+ * Fixture associated to function lookupForContactId
7
7
  */
8
- lookup: jest.Mock<Promise<QueryCapabilityResponse>, [LookupCapabilityRequestData]>;
8
+ lookup: jest.Mock<Promise<LookupCapabilityResponse>, [
9
+ LookupCapabilityRequestData<Recipient>
10
+ ]>;
9
11
  }
@@ -4,7 +4,7 @@ exports.CapabilityApiFixture = void 0;
4
4
  class CapabilityApiFixture {
5
5
  constructor() {
6
6
  /**
7
- * Fixture associated to function lookup
7
+ * Fixture associated to function lookupForContactId
8
8
  */
9
9
  this.lookup = jest.fn();
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"capability-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/capability/capability-api.jest.fixture.ts"],"names":[],"mappings":";;;AAGA,MAAa,oBAAoB;IAAjC;QAEE;;WAEG;QACI,WAAM,GAA+E,IAAI,CAAC,EAAE,EAAE,CAAC;IACxG,CAAC;CAAA;AAND,oDAMC"}
1
+ {"version":3,"file":"capability-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/capability/capability-api.jest.fixture.ts"],"names":[],"mappings":";;;AAGA,MAAa,oBAAoB;IAAjC;QAEE;;WAEG;QACI,WAAM,GAGT,IAAI,CAAC,EAAE,EAAE,CAAC;IAEhB,CAAC;CAAA;AAVD,oDAUC"}
@@ -14,7 +14,7 @@ class CapabilityApi extends conversation_domain_api_1.ConversationDomainApi {
14
14
  /**
15
15
  * Capability lookup
16
16
  * This method is asynchronous - it immediately returns the requested Capability registration. Capability check is then delivered as a callback to registered webhooks with trigger CAPABILITY for every reachable channel.
17
- * @param { LookupCapabilityRequestData } data - The data to provide to the API call.
17
+ * @param { LookupCapabilityRequestData<Recipient> } data - The data to provide to the API call.
18
18
  */
19
19
  async lookup(data) {
20
20
  this.client = this.getSinchClient();
@@ -1 +1 @@
1
- {"version":3,"file":"capability-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/capability/capability-api.ts"],"names":[],"mappings":";;;AAQA,wEAAmE;AAOnE,MAAa,aAAc,SAAQ,+CAAqB;IAEtD;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;IAChD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,IAAiC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA8B,IAAI,EAAE,EAAa,CAAC,CAAC;QACnG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,6BAA6B,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YACrD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,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CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,mBAAmB,CAAC;QAEtI,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACpH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAA2B;YACvD,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,iBAAiB;SAC/B,CAAC,CAAC;IACL,CAAC;CAEF;AAzCD,sCAyCC"}
@@ -1,5 +1,5 @@
1
1
  import { ApiListPromise, SinchClientParameters } from '@sinch/sdk-client';
2
- import { Contact, ContactCreateRequest, ConversationChannel, GetChannelProfileRequest, GetChannelProfileResponse, MergeContactRequest } from '../../../models';
2
+ import { Contact, ContactCreateRequest, ConversationChannel, GetChannelProfileRequest, GetChannelProfileResponse, MergeContactRequest, Recipient } from '../../../models';
3
3
  import { ConversationDomainApi } from '../conversation-domain-api';
4
4
  export interface CreateContactRequestData {
5
5
  /** The contact to create. */
@@ -9,9 +9,9 @@ export interface DeleteContactRequestData {
9
9
  /** The unique ID of the contact. */
10
10
  'contact_id': string;
11
11
  }
12
- export interface GetChannelProfileRequestData {
12
+ export interface GetChannelProfileRequestData<T extends Recipient> {
13
13
  /** */
14
- 'getChannelProfileRequestBody': GetChannelProfileRequest;
14
+ 'getChannelProfileRequestBody': GetChannelProfileRequest<T>;
15
15
  }
16
16
  export interface GetContactRequestData {
17
17
  /** The unique ID of the contact. */
@@ -64,10 +64,11 @@ export declare class ContactApi extends ConversationDomainApi {
64
64
  delete(data: DeleteContactRequestData): Promise<any>;
65
65
  /**
66
66
  * Get Channel Profile
67
- * Get user profile from a specific channel. Only supported on &#x60;MESSENGER&#x60;, &#x60;INSTAGRAM&#x60;, &#x60;VIBER&#x60; and &#x60;LINE&#x60; channels. Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the &#x60;display_name&#x60; field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the &#x60;display_name&#x60; field has not been overwritten by the user).
68
- * @param { GetChannelProfileRequestData } data - The data to provide to the API call.
67
+ * Get user profile from a specific channel. Only supported on 'MESSENGER', 'INSTAGRAM', 'VIBER' and LINE' channels.
68
+ * Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the 'display_name' field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the 'display_name' field has not been overwritten by the user).
69
+ * @param { GetChannelProfileRequestData<Recipient> } data - The data to provide to the API call.
69
70
  */
70
- getChannelProfile(data: GetChannelProfileRequestData): Promise<GetChannelProfileResponse>;
71
+ getChannelProfile(data: GetChannelProfileRequestData<Recipient>): Promise<GetChannelProfileResponse>;
71
72
  /**
72
73
  * Get a Contact
73
74
  * Returns a specific contact as specified by the contact ID. Note that, if a WhatsApp contact is returned, the &#x60;display_name&#x60; field of that contact may be populated with the WhatsApp display name (if the name is already stored on the server and the &#x60;display_name&#x60; field has not been overwritten by the user).
@@ -1,5 +1,5 @@
1
1
  /// <reference types="jest" />
2
- import { Contact } from '../../../models';
2
+ import { Contact, Recipient } from '../../../models';
3
3
  import { GetChannelProfileResponse } from '../../../models';
4
4
  import { ContactApi, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, UpdateContactRequestData } from './contact-api';
5
5
  import { ApiListPromise } from '@sinch/sdk-client';
@@ -15,7 +15,9 @@ export declare class ContactApiFixture implements Partial<Readonly<ContactApi>>
15
15
  /**
16
16
  * Fixture associated to function getChannelProfile
17
17
  */
18
- getChannelProfile: jest.Mock<Promise<GetChannelProfileResponse>, [GetChannelProfileRequestData]>;
18
+ getChannelProfile: jest.Mock<Promise<GetChannelProfileResponse>, [
19
+ GetChannelProfileRequestData<Recipient>
20
+ ]>;
19
21
  /**
20
22
  * Fixture associated to function get
21
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;AAKA,MAAa,iBAAiB;IAA9B;QAEE;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;QACnF;;WAEG;QACI,WAAM,GAAwD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/E;;WAEG;QACI,sBAAiB,GAAkF,IAAI,CAAC,EAAE,EAAE,CAAC;QACpH;;WAEG;QACI,QAAG,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,SAAI,GAAkE,IAAI,CAAC,EAAE,EAAE,CAAC;QACvF;;WAEG;QACI,iBAAY,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QACxF;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;IACrF,CAAC;CAAA;AA9BD,8CA8BC"}
1
+ {"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;AAcA,MAAa,iBAAiB;IAA9B;QAEE;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;QACnF;;WAEG;QACI,WAAM,GAAwD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/E;;WAEG;QACI,sBAAiB,GAGpB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,QAAG,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,SAAI,GAAkE,IAAI,CAAC,EAAE,EAAE,CAAC;QACvF;;WAEG;QACI,iBAAY,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QACxF;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;IACrF,CAAC;CAAA;AAjCD,8CAiCC"}
@@ -60,8 +60,9 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
60
60
  }
61
61
  /**
62
62
  * Get Channel Profile
63
- * Get user profile from a specific channel. Only supported on &#x60;MESSENGER&#x60;, &#x60;INSTAGRAM&#x60;, &#x60;VIBER&#x60; and &#x60;LINE&#x60; channels. Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the &#x60;display_name&#x60; field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the &#x60;display_name&#x60; field has not been overwritten by the user).
64
- * @param { GetChannelProfileRequestData } data - The data to provide to the API call.
63
+ * Get user profile from a specific channel. Only supported on 'MESSENGER', 'INSTAGRAM', 'VIBER' and LINE' channels.
64
+ * Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the 'display_name' field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the 'display_name' field has not been overwritten by the user).
65
+ * @param { GetChannelProfileRequestData<Recipient> } data - The data to provide to the API call.
65
66
  */
66
67
  async getChannelProfile(data) {
67
68
  this.client = this.getSinchClient();
@@ -1 +1 @@
1
- {"version":3,"file":"contact-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.ts"],"names":[],"mappings":";;;AAAA,kDAQ2B;AAS3B,wEAAmE;AA6CnE,MAAa,UAAW,SAAQ,+CAAqB;IAEnD;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,IAA8B;QAChD,IAAI,CAAC,MAAM,GAAG,IAA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,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA2B,IAAI,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;QAClG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,0BAA0B,CAAC;YACxD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YAClD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,aAAa,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAEpJ,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAClG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAU;YACtC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;IACL,CAAC;CAEF;AAjOD,gCAiOC"}
@@ -1,5 +1,5 @@
1
1
  import { ApiListPromise, SinchClientParameters } from '@sinch/sdk-client';
2
- import { ConversationEvent, SendEventRequest, SendEventResponse } from '../../../models';
2
+ import { ConversationEvent, Recipient, SendAgentJoinedEventRequest, SendAgentLeftEventRequest, SendCommentReplyEventRequest, SendComposingEndEventRequest, SendComposingEventRequest, SendEventRequest, SendEventResponse, SendGenericEventRequest } from '../../../models';
3
3
  import { ConversationDomainApi } from '../conversation-domain-api';
4
4
  export interface DeleteEventRequestData {
5
5
  /** The unique ID of the event. */
@@ -19,9 +19,33 @@ export interface ListEventsRequestData {
19
19
  /** Next page token previously returned if any. When specifying this token, make sure to use the same values for the other parameters from the request that originated the token, otherwise the paged results may be inconsistent. */
20
20
  'page_token'?: string;
21
21
  }
22
- export interface SendEventRequestData {
22
+ export interface SendEventRequestData<T extends Recipient> {
23
23
  /** The event to be sent. */
24
- 'sendEventRequestBody': SendEventRequest;
24
+ 'sendEventRequestBody': SendEventRequest<T>;
25
+ }
26
+ export interface SendComposingEventRequestData<T extends Recipient> {
27
+ /** The event to be sent. */
28
+ 'sendEventRequestBody': SendComposingEventRequest<T>;
29
+ }
30
+ export interface SendComposingEndEventRequestData<T extends Recipient> {
31
+ /** The event to be sent. */
32
+ 'sendEventRequestBody': SendComposingEndEventRequest<T>;
33
+ }
34
+ export interface SendCommentReplyEventRequestData<T extends Recipient> {
35
+ /** The event to be sent. */
36
+ 'sendEventRequestBody': SendCommentReplyEventRequest<T>;
37
+ }
38
+ export interface SendAgentJoinedEventRequestData<T extends Recipient> {
39
+ /** The event to be sent. */
40
+ 'sendEventRequestBody': SendAgentJoinedEventRequest<T>;
41
+ }
42
+ export interface SendAgentLeftEventRequestData<T extends Recipient> {
43
+ /** The event to be sent. */
44
+ 'sendEventRequestBody': SendAgentLeftEventRequest<T>;
45
+ }
46
+ export interface SendGenericEventRequestData<T extends Recipient> {
47
+ /** The event to be sent. */
48
+ 'sendEventRequestBody': SendGenericEventRequest<T>;
25
49
  }
26
50
  export declare class EventsApi extends ConversationDomainApi {
27
51
  /**
@@ -52,7 +76,44 @@ export declare class EventsApi extends ConversationDomainApi {
52
76
  /**
53
77
  * Send an event
54
78
  * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
55
- * @param { SendEventRequestData } data - The data to provide to the API call.
79
+ * @param { SendEventRequestData<Recipient> } data - The data to provide to the API call.
80
+ */
81
+ send(data: SendEventRequestData<Recipient>): Promise<SendEventResponse>;
82
+ /**
83
+ * Send a composing event
84
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
85
+ * @param { SendComposingEventRequestData<Recipient> } data - The data to provide to the API call.
86
+ */
87
+ sendComposingEvent(data: SendComposingEventRequestData<Recipient>): Promise<SendEventResponse>;
88
+ /**
89
+ * Send a composing end event
90
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
91
+ * @param { SendComposingEndEventRequestData<Recipient> } data - The data to provide to the API call.
92
+ */
93
+ sendComposingEndEvent(data: SendComposingEndEventRequestData<Recipient>): Promise<SendEventResponse>;
94
+ /**
95
+ * Send a composing reply event
96
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
97
+ * @param {SendCommentReplyEventRequestData<Recipient>} data - The data to provide to the API call.
98
+ */
99
+ sendCommentReplyEvent(data: SendCommentReplyEventRequestData<Recipient>): Promise<SendEventResponse>;
100
+ /**
101
+ * Send an agent joined event
102
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
103
+ * @param {SendAgentJoinedEventRequestData} data - The data to provide to the API call.
104
+ */
105
+ sendAgentJoinedEvent(data: SendAgentJoinedEventRequestData<Recipient>): Promise<SendEventResponse>;
106
+ /**
107
+ * Send an agent left event
108
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
109
+ * @param {SendAgentLeftEventRequestData<Recipient>} data - The data to provide to the API call.
110
+ */
111
+ sendAgentLeftEvent(data: SendAgentLeftEventRequestData<Recipient>): Promise<SendEventResponse>;
112
+ /**
113
+ * Send a generic event
114
+ * Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.
115
+ * @param {SendGenericEventRequestData<Recipient>} data - The data to provide to the API call.
56
116
  */
57
- send(data: SendEventRequestData): Promise<SendEventResponse>;
117
+ sendGenericEvent(data: SendGenericEventRequestData<Recipient>): Promise<SendEventResponse>;
118
+ private sendEvent;
58
119
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
- import { ConversationEvent, SendEventResponse } from '../../../models';
3
- import { DeleteEventRequestData, EventsApi, GetEventRequestData, ListEventsRequestData, SendEventRequestData } from './events-api';
2
+ import { ConversationEvent, Recipient, SendEventResponse } from '../../../models';
3
+ import { DeleteEventRequestData, EventsApi, GetEventRequestData, ListEventsRequestData, SendAgentJoinedEventRequestData, SendAgentLeftEventRequestData, SendCommentReplyEventRequestData, SendComposingEndEventRequestData, SendComposingEventRequestData, SendEventRequestData, SendGenericEventRequestData } from './events-api';
4
4
  import { ApiListPromise } from '@sinch/sdk-client';
5
5
  export declare class EventsApiFixture implements Partial<Readonly<EventsApi>> {
6
6
  /**
@@ -18,5 +18,41 @@ export declare class EventsApiFixture implements Partial<Readonly<EventsApi>> {
18
18
  /**
19
19
  * Fixture associated to function send
20
20
  */
21
- send: jest.Mock<Promise<SendEventResponse>, [SendEventRequestData]>;
21
+ send: jest.Mock<Promise<SendEventResponse>, [SendEventRequestData<Recipient>]>;
22
+ /**
23
+ * Fixture associated to function sendComposingEvent
24
+ */
25
+ sendComposingEvent: jest.Mock<Promise<SendEventResponse>, [
26
+ SendComposingEventRequestData<Recipient>
27
+ ]>;
28
+ /**
29
+ * Fixture associated to function sendComposingEndEvent
30
+ */
31
+ sendComposingEndEvent: jest.Mock<Promise<SendEventResponse>, [
32
+ SendComposingEndEventRequestData<Recipient>
33
+ ]>;
34
+ /**
35
+ * Fixture associated to function sendCommentReplyEvent
36
+ */
37
+ sendCommentReplyEvent: jest.Mock<Promise<SendEventResponse>, [
38
+ SendCommentReplyEventRequestData<Recipient>
39
+ ]>;
40
+ /**
41
+ * Fixture associated to function sendAgentJoinedEvent
42
+ */
43
+ sendAgentJoinedEvent: jest.Mock<Promise<SendEventResponse>, [
44
+ SendAgentJoinedEventRequestData<Recipient>
45
+ ]>;
46
+ /**
47
+ * Fixture associated to function sendAgentLeftEvent
48
+ */
49
+ sendAgentLeftEvent: jest.Mock<Promise<SendEventResponse>, [
50
+ SendAgentLeftEventRequestData<Recipient>
51
+ ]>;
52
+ /**
53
+ * Fixture associated to function sendGenericEvent
54
+ */
55
+ sendGenericEvent: jest.Mock<Promise<SendEventResponse>, [
56
+ SendGenericEventRequestData<Recipient>
57
+ ]>;
22
58
  }
@@ -19,6 +19,30 @@ class EventsApiFixture {
19
19
  * Fixture associated to function send
20
20
  */
21
21
  this.send = jest.fn();
22
+ /**
23
+ * Fixture associated to function sendComposingEvent
24
+ */
25
+ this.sendComposingEvent = jest.fn();
26
+ /**
27
+ * Fixture associated to function sendComposingEndEvent
28
+ */
29
+ this.sendComposingEndEvent = jest.fn();
30
+ /**
31
+ * Fixture associated to function sendCommentReplyEvent
32
+ */
33
+ this.sendCommentReplyEvent = jest.fn();
34
+ /**
35
+ * Fixture associated to function sendAgentJoinedEvent
36
+ */
37
+ this.sendAgentJoinedEvent = jest.fn();
38
+ /**
39
+ * Fixture associated to function sendAgentLeftEvent
40
+ */
41
+ this.sendAgentLeftEvent = jest.fn();
42
+ /**
43
+ * Fixture associated to function sendGenericEvent
44
+ */
45
+ this.sendGenericEvent = jest.fn();
22
46
  }
23
47
  }
24
48
  exports.EventsApiFixture = EventsApiFixture;
@@ -1 +1 @@
1
- {"version":3,"file":"events-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/events/events-api.jest.fixture.ts"],"names":[],"mappings":";;;AAUA,MAAa,gBAAgB;IAA7B;QAEE;;WAEG;QACI,WAAM,GAAsD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,QAAG,GAAiE,IAAI,CAAC,EAAE,EAAE,CAAC;QACrF;;WAEG;QACI,SAAI,GAA0E,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/F;;WAEG;QACI,SAAI,GAAkE,IAAI,CAAC,EAAE,EAAE,CAAC;IACzF,CAAC;CAAA;AAlBD,4CAkBC"}
1
+ {"version":3,"file":"events-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/events/events-api.jest.fixture.ts"],"names":[],"mappings":";;;AAgBA,MAAa,gBAAgB;IAA7B;QAEE;;WAEG;QACI,WAAM,GAAsD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,QAAG,GAAiE,IAAI,CAAC,EAAE,EAAE,CAAC;QACrF;;WAEG;QACI,SAAI,GAA0E,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/F;;WAEG;QACI,SAAI,GAA6E,IAAI,CAAC,EAAE,EAAE,CAAC;QAClG;;WAEG;QACI,uBAAkB,GAGrB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,0BAAqB,GAGxB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,0BAAqB,GAGxB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,yBAAoB,GAGvB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,uBAAkB,GAGrB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,qBAAgB,GAGnB,IAAI,CAAC,EAAE,EAAE,CAAC;IAChB,CAAC;CAAA;AA5DD,4CA4DC"}