@vonage/client-sdk 1.1.0-alpha.0 → 1.1.0-alpha.3

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.
@@ -34,6 +34,7 @@ export namespace vonage {
34
34
  getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.EventsPageJS>;
35
35
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
36
36
  sendTextMessage(cid: string, text: string): Promise<string>;
37
+ sendCustomMessage(cid: string, customData: string): Promise<string>;
37
38
  setConfig(config: vonage.CoreClientConfigJS): void;
38
39
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
39
40
  deleteSession(): Promise<any>;
@@ -64,9 +65,10 @@ export namespace vonage {
64
65
  get nextCursor(): Nullable<string>;
65
66
  }
66
67
  interface ConversationEventJS {
68
+ readonly id: Nullable<number>;
67
69
  readonly timestamp: string;
68
70
  readonly conversationId: string;
69
- readonly from: string;
71
+ readonly from: Nullable<string>;
70
72
  readonly __doNotUseIt: __doNotImplementIt;
71
73
  }
72
74
  class MemberInvitedEventJS implements vonage.ConversationEventJS {
@@ -81,8 +83,8 @@ export namespace vonage {
81
83
  namespace MemberInvitedEventJS {
82
84
  class Body {
83
85
  private constructor();
84
- get invitee(): string;
85
- get invitedBy(): Nullable<string>;
86
+ get invitee(): vonage.UserJS;
87
+ get inviter(): Nullable<vonage.UserJS>;
86
88
  }
87
89
  }
88
90
  class MemberJoinedEventJS implements vonage.ConversationEventJS {
@@ -97,7 +99,7 @@ export namespace vonage {
97
99
  namespace MemberJoinedEventJS {
98
100
  class Body {
99
101
  private constructor();
100
- get username(): string;
102
+ get user(): vonage.UserJS;
101
103
  }
102
104
  }
103
105
  class MemberLeftEventJS implements vonage.ConversationEventJS {
@@ -112,7 +114,7 @@ export namespace vonage {
112
114
  namespace MemberLeftEventJS {
113
115
  class Body {
114
116
  private constructor();
115
- get username(): string;
117
+ get user(): vonage.UserJS;
116
118
  }
117
119
  }
118
120
  class UnknownEventJS implements vonage.ConversationEventJS {
@@ -121,7 +123,7 @@ export namespace vonage {
121
123
  get id(): Nullable<number>;
122
124
  get timestamp(): string;
123
125
  get conversationId(): string;
124
- get from(): string;
126
+ get from(): Nullable<string>;
125
127
  readonly __doNotUseIt: __doNotImplementIt;
126
128
  }
127
129
  }
@@ -131,11 +133,11 @@ export namespace vonage {
131
133
  readonly body: vonage.MessageEventBodyJS;
132
134
  readonly timestamp: string;
133
135
  readonly conversationId: string;
134
- readonly from: string;
136
+ readonly from: Nullable<string>;
135
137
  readonly __doNotUseIt: __doNotImplementIt;
136
138
  }
137
139
  interface MessageEventBodyJS {
138
- readonly sender: string;
140
+ readonly sender: vonage.UserJS;
139
141
  readonly __doNotUseIt: __doNotImplementIt;
140
142
  }
141
143
  class TextMessageEventJS implements vonage.MessageEventJS {
@@ -150,11 +152,28 @@ export namespace vonage {
150
152
  namespace TextMessageEventJS {
151
153
  class Body implements vonage.MessageEventBodyJS {
152
154
  private constructor();
153
- get sender(): string;
155
+ get sender(): vonage.UserJS;
154
156
  get text(): string;
155
157
  readonly __doNotUseIt: __doNotImplementIt;
156
158
  }
157
159
  }
160
+ class CustomMessageEventJS implements vonage.MessageEventJS {
161
+ private constructor();
162
+ get id(): number;
163
+ get timestamp(): string;
164
+ get conversationId(): string;
165
+ get from(): string;
166
+ get body(): vonage.CustomMessageEventJS.Body;
167
+ readonly __doNotUseIt: __doNotImplementIt;
168
+ }
169
+ namespace CustomMessageEventJS {
170
+ class Body implements vonage.MessageEventBodyJS {
171
+ private constructor();
172
+ get sender(): vonage.UserJS;
173
+ get customData(): string;
174
+ readonly __doNotUseIt: __doNotImplementIt;
175
+ }
176
+ }
158
177
  }
159
178
  export namespace vonage {
160
179
  abstract class PresentingOrderJS {
@@ -456,6 +475,7 @@ export namespace vonage {
456
475
  getConversationEvents(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.EventsPageJS>;
457
476
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
458
477
  sendTextMessage(cid: string, text: string): Promise<string>;
478
+ sendCustomMessage(cid: string, customData: string): Promise<string>;
459
479
  setConfig(config: vonage.CoreClientConfigJS): void;
460
480
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
461
481
  deleteSession(): Promise<any>;
@@ -1,3 +1,5 @@
1
1
  import vonage from '../utils/vonage';
2
2
  export type TextMessageEvent = vonage.TextMessageEventJS;
3
3
  export declare const TextMessageEvent: typeof vonage.TextMessageEventJS;
4
+ export type CustomMessageEvent = vonage.CustomMessageEventJS;
5
+ export declare const CustomMessageEvent: typeof vonage.CustomMessageEventJS;