@signalwire/core
Advanced tools
Comparing version 4.0.0-dev.202402151739.45dbb9d.1 to 4.0.0-dev.202402151831.c6e0dd2.1
@@ -43,2 +43,3 @@ import { uuid, setLogger, getLogger, isGlobalEvent, toExternalJSON, fromSnakeToCamelCase, toSnakeCaseKeys, toLocalEvent, toSyntheticEvent, extendComponent, validateEventsToSubscribe, toInternalEventName, toInternalAction, timeoutPromise, debounce, SWCloseEvent, isSATAuth, LOCAL_EVENT_PREFIX, stripNamespacePrefix, isJSONRPCRequest, isJSONRPCResponse } from './utils'; | ||
export * as testUtils from './testUtils'; | ||
export * from './utils/mapObject'; | ||
//# sourceMappingURL=index.d.ts.map |
export interface PaginatedResponse<T> { | ||
data: Array<T> | []; | ||
links: { | ||
first: string; | ||
self: string; | ||
first?: string; | ||
self?: string; | ||
next?: string; | ||
@@ -10,2 +10,10 @@ prev?: string; | ||
} | ||
/** | ||
* Addresses | ||
*/ | ||
export interface GetAddressesOptions { | ||
type?: string; | ||
displayName?: string; | ||
pageSize?: number; | ||
} | ||
export interface Address { | ||
@@ -26,17 +34,62 @@ display_name: string; | ||
} | ||
export interface GetAddressesOptions { | ||
type?: string; | ||
displayName?: string; | ||
pageSize?: number; | ||
/** | ||
* Conversations | ||
*/ | ||
export interface GetConversationsOptions { | ||
limit?: number; | ||
since?: number; | ||
until?: number; | ||
cursor?: string; | ||
} | ||
export interface ConversationHistory { | ||
export interface Conversation { | ||
created_at: number; | ||
id: string; | ||
last_message_at: number; | ||
metadata: Record<string, any>; | ||
name: string; | ||
} | ||
export interface FetchConversationsResponse extends PaginatedResponse<Conversation> { | ||
} | ||
/** | ||
* Messages | ||
*/ | ||
export interface GetMessagesOptions { | ||
limit?: number; | ||
since?: number; | ||
until?: number; | ||
cursor?: string; | ||
} | ||
export interface ConversationMessage { | ||
id: string; | ||
conversation_id: string; | ||
user_id: string; | ||
ts: number; | ||
details: Record<string, any>; | ||
type: string; | ||
subtype: string; | ||
kind: string; | ||
} | ||
export interface FetchConversationHistoryResponse extends PaginatedResponse<ConversationHistory> { | ||
export interface FetchConversationMessagesResponse extends PaginatedResponse<ConversationMessage> { | ||
} | ||
export interface GetConversationHistoriOption { | ||
subscriberId: string; | ||
export interface GetConversationMessagesOptions { | ||
addressId: string; | ||
limit?: number; | ||
since?: number; | ||
until?: number; | ||
cursor?: string; | ||
} | ||
export interface SubscriberInfoResponse { | ||
app_settings?: string; | ||
company_name?: string; | ||
country?: string; | ||
display_name?: string; | ||
email: string; | ||
first_name?: string; | ||
id: string; | ||
job_title?: string; | ||
last_name?: string; | ||
push_notification_key: string; | ||
region?: string; | ||
time_zone?: number; | ||
} | ||
//# sourceMappingURL=callfabric.d.ts.map |
@@ -9,2 +9,3 @@ import type { EventEmitter } from '../utils/EventEmitter'; | ||
import type { VoiceCallEvent } from './voice'; | ||
import { ConversationEvent } from '..'; | ||
export interface SwEvent { | ||
@@ -172,3 +173,3 @@ event_channel: string; | ||
} | ||
export declare type SwEventParams = VideoAPIEventParams | WebRTCMessageParams | VideoManagerEvent | ChatEvent | TaskEvent | MessagingEvent | VoiceCallEvent | SwAuthorizationStateParams; | ||
export declare type SwEventParams = VideoAPIEventParams | WebRTCMessageParams | VideoManagerEvent | ChatEvent | TaskEvent | MessagingEvent | VoiceCallEvent | SwAuthorizationStateParams | ConversationEvent; | ||
export declare type PubSubChannelEvents = InternalVideoEventNames | SessionEvents; | ||
@@ -185,2 +186,3 @@ export * from './video'; | ||
export * from './callfabric'; | ||
export * from './conversation'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -15,2 +15,3 @@ import { Authorization, JSONRPCRequest, JSONRPCResponse, SATAuthorization } from '..'; | ||
export * from './eventUtils'; | ||
export * from './mapObject'; | ||
export { LOCAL_EVENT_PREFIX }; | ||
@@ -17,0 +18,0 @@ export declare const mutateStorageKey: (key: string) => string; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.0.0-dev.202402151739.45dbb9d.1", | ||
"version": "4.0.0-dev.202402151831.c6e0dd2.1", | ||
"main": "dist/index.node.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/index.esm.js", |
@@ -22,3 +22,3 @@ import { | ||
isJSONRPCRequest, | ||
isJSONRPCResponse | ||
isJSONRPCResponse, | ||
} from './utils' | ||
@@ -119,1 +119,2 @@ import { WEBRTC_EVENT_TYPES, isWebrtcEventType } from './utils/common' | ||
export * as testUtils from './testUtils' | ||
export * from './utils/mapObject' |
export interface PaginatedResponse<T> { | ||
data: Array<T> | [] | ||
links: { | ||
first: string | ||
self: string | ||
first?: string | ||
self?: string | ||
next?: string | ||
@@ -11,2 +11,11 @@ prev?: string | ||
/** | ||
* Addresses | ||
*/ | ||
export interface GetAddressesOptions { | ||
type?: string | ||
displayName?: string | ||
pageSize?: number | ||
} | ||
export interface Address { | ||
@@ -25,22 +34,72 @@ display_name: string | ||
} | ||
export interface FetchAddressResponse extends PaginatedResponse<Address> {} | ||
export interface GetAddressesOptions { | ||
type?: string | ||
displayName?: string | ||
pageSize?: number | ||
/** | ||
* Conversations | ||
*/ | ||
export interface GetConversationsOptions { | ||
limit?: number | ||
since?: number | ||
until?: number | ||
cursor?: string | ||
} | ||
export interface ConversationHistory { | ||
export interface Conversation { | ||
created_at: number | ||
id: string | ||
last_message_at: number | ||
metadata: Record<string, any> | ||
name: string | ||
} | ||
export interface FetchConversationsResponse | ||
extends PaginatedResponse<Conversation> {} | ||
/** | ||
* Messages | ||
*/ | ||
export interface GetMessagesOptions { | ||
limit?: number | ||
since?: number | ||
until?: number | ||
cursor?: string | ||
} | ||
export interface ConversationMessage { | ||
id: string | ||
conversation_id: string | ||
user_id: string | ||
ts: number | ||
details: Record<string, any> | ||
type: string | ||
// FIXME needs to be completed | ||
subtype: string | ||
kind: string | ||
} | ||
export interface FetchConversationHistoryResponse | ||
extends PaginatedResponse<ConversationHistory> {} | ||
export interface FetchConversationMessagesResponse | ||
extends PaginatedResponse<ConversationMessage> {} | ||
export interface GetConversationHistoriOption { | ||
subscriberId: string | ||
export interface GetConversationMessagesOptions { | ||
addressId: string | ||
limit?: number | ||
since?: number | ||
until?: number | ||
cursor?: string | ||
} | ||
export interface SubscriberInfoResponse { | ||
app_settings?: string | ||
company_name?: string | ||
country?: string | ||
display_name?: string | ||
email: string | ||
first_name?: string | ||
id: string | ||
job_title?: string | ||
last_name?: string | ||
push_notification_key: string | ||
region?: string | ||
time_zone?: number | ||
} |
@@ -9,2 +9,3 @@ import type { EventEmitter } from '../utils/EventEmitter' | ||
import type { VoiceCallEvent } from './voice' | ||
import { ConversationEvent } from '..' | ||
@@ -226,2 +227,3 @@ export interface SwEvent { | ||
| SwAuthorizationStateParams | ||
| ConversationEvent | ||
@@ -243,1 +245,2 @@ // prettier-ignore | ||
export * from './callfabric' | ||
export * from './conversation' |
@@ -28,2 +28,3 @@ import { | ||
export * from './eventUtils' | ||
export * from './mapObject' | ||
export { LOCAL_EVENT_PREFIX } | ||
@@ -30,0 +31,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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 too big to display
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2838844
434
41247