@signalwire/realtime-api
Advanced tools
Comparing version 4.0.2-dev.202407081414.632ec5b.0 to 4.0.2-dev.202407111259.a268237.0
import { CallState, CallConnect, CallPlay, InternalVideoRoomSessionEntity, MapToPubSubShape, SwEvent, CallEnded, CallRecord, ToInternalVideoEvent, VideoMemberEvent, VideoLayoutEvent } from '..'; | ||
export interface PaginatedResponse<T> { | ||
data: Array<T> | []; | ||
links: { | ||
first?: string; | ||
self?: string; | ||
next?: string; | ||
prev?: string; | ||
}; | ||
} | ||
export interface PaginatedResult<T> { | ||
data: Array<T> | []; | ||
self(): Promise<PaginatedResult<T> | undefined>; | ||
nextPage(): Promise<PaginatedResult<T> | undefined>; | ||
prevPage(): Promise<PaginatedResult<T> | undefined>; | ||
firstPage(): Promise<PaginatedResult<T> | undefined>; | ||
hasNext: boolean; | ||
hasPrev: boolean; | ||
} | ||
/** | ||
* Addresses | ||
*/ | ||
export interface Address { | ||
id: string; | ||
display_name: string; | ||
name: string; | ||
preview_url?: string; | ||
cover_url?: string; | ||
resource_id: string; | ||
type: string; | ||
channels: { | ||
audio?: string; | ||
messaging?: string; | ||
video?: string; | ||
}; | ||
} | ||
export interface GetAddressesOptions { | ||
type?: string; | ||
displayName?: string; | ||
pageSize?: number; | ||
} | ||
export interface GetAddressOptions { | ||
id: string; | ||
} | ||
export interface GetAddressResponse extends Address { | ||
} | ||
export interface FetchAddressResponse extends PaginatedResponse<Address> { | ||
} | ||
/** | ||
* Conversations | ||
*/ | ||
export interface SendConversationMessageOptions { | ||
text: string; | ||
addressId: string; | ||
metadata?: Record<string, any>; | ||
details?: Record<string, any>; | ||
} | ||
export interface GetConversationsOptions { | ||
pageSize?: number; | ||
} | ||
export interface Conversation { | ||
created_at: number; | ||
id: string; | ||
last_message_at: number; | ||
metadata: Record<string, any>; | ||
name: string; | ||
sendMessage(options: { | ||
text: string; | ||
}): Promise<SendConversationMessageResponse>; | ||
getMessages(options: { | ||
pageSize?: number; | ||
}): Promise<PaginatedResult<ConversationMessage>>; | ||
} | ||
export interface SendConversationMessageResponse { | ||
table: { | ||
conversation_id: string; | ||
text: string; | ||
}; | ||
} | ||
export interface FetchConversationsResponse extends PaginatedResponse<Conversation> { | ||
} | ||
/** | ||
* Conversation Messages | ||
*/ | ||
export interface GetMessagesOptions { | ||
pageSize?: number; | ||
} | ||
export interface ConversationMessage { | ||
id: string; | ||
conversation_id: string; | ||
user_id: string; | ||
ts: number; | ||
details: Record<string, any>; | ||
type: string; | ||
subtype: string; | ||
kind?: string; | ||
text?: string; | ||
} | ||
export declare type ConversationChatMessage = Omit<ConversationMessage, 'kind'> & { | ||
text: string; | ||
}; | ||
export interface FetchConversationMessagesResponse extends PaginatedResponse<ConversationMessage> { | ||
} | ||
export interface GetConversationMessagesOptions { | ||
addressId: string; | ||
pageSize?: number; | ||
} | ||
/** | ||
* Subsriber info | ||
*/ | ||
export interface SubscriberInfoResponse { | ||
id: string; | ||
email: string; | ||
first_name?: string; | ||
last_name?: string; | ||
display_name?: string; | ||
job_title?: string; | ||
time_zone?: number; | ||
country?: string; | ||
region?: string; | ||
company_name?: string; | ||
push_notification_key: string; | ||
app_settings?: { | ||
display_name: string; | ||
scopes: string[]; | ||
}; | ||
} | ||
/** | ||
* Device registration | ||
*/ | ||
export declare type RegisterDeviceType = 'iOS' | 'Android' | 'Desktop'; | ||
export interface RegisterDeviceParams { | ||
deviceType: RegisterDeviceType; | ||
deviceToken: string; | ||
} | ||
export interface UnregisterDeviceParams { | ||
id: string; | ||
} | ||
export interface RegisterDeviceResponse { | ||
date_registered: Date; | ||
device_name?: string; | ||
device_token: string; | ||
device_type: RegisterDeviceType; | ||
id: string; | ||
push_notification_key: string; | ||
} | ||
export declare type CallJoined = 'call.joined'; | ||
@@ -148,0 +3,0 @@ export declare type CallStarted = 'call.started'; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.0.2-dev.202407081414.632ec5b.0", | ||
"version": "4.0.2-dev.202407111259.a268237.0", | ||
"main": "dist/index.node.js", | ||
@@ -42,3 +42,3 @@ "exports": { | ||
"dependencies": { | ||
"@signalwire/core": "4.2.0-dev.202407081414.632ec5b.0", | ||
"@signalwire/core": "4.2.0-dev.202407111259.a268237.0", | ||
"ws": "^8.17.1" | ||
@@ -45,0 +45,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2320819
36531
+ Added@signalwire/core@4.2.0-dev.202407111259.a268237.0(transitive)
- Removed@signalwire/core@4.2.0-dev.202407081414.632ec5b.0(transitive)