@papercups-io/storytime
Advanced tools
Comparing version 1.0.3 to 1.0.4-beta.0
import { Socket, Channel } from 'phoenix'; | ||
import { eventWithTime } from 'rrweb/typings/types'; | ||
declare global { | ||
interface Window { | ||
Storytime: any; | ||
} | ||
} | ||
export declare type CustomerMetadata = { | ||
name?: string; | ||
email?: string; | ||
external_id?: string; | ||
metadata?: { | ||
[key: string]: any; | ||
}; | ||
}; | ||
export declare const getWebsocketUrl: (baseUrl?: string) => string; | ||
export declare const createNewCustomer: (accountId: string, metadata?: CustomerMetadata, baseUrl?: string) => Promise<any>; | ||
export declare const updateCustomerMetadata: (customerId: string, metadata?: CustomerMetadata, baseUrl?: string) => Promise<any>; | ||
export declare const findCustomerByExternalId: (externalId: string, accountId: string, baseUrl?: string) => Promise<any>; | ||
declare type Config = { | ||
@@ -8,3 +24,4 @@ accountId: string; | ||
blocklist?: Array<string>; | ||
host?: string; | ||
baseUrl?: string; | ||
customer?: CustomerMetadata; | ||
publicKey?: string; | ||
@@ -14,17 +31,23 @@ }; | ||
accountId: string; | ||
customerId?: string | null; | ||
customer: CustomerMetadata; | ||
customerId: string | null; | ||
publicKey?: string; | ||
blocklist: Array<string>; | ||
host: string; | ||
baseUrl: string; | ||
version: string; | ||
socket: Socket; | ||
channel: Channel; | ||
sessionId?: string; | ||
sessionId: string | null; | ||
stop?: () => void; | ||
constructor(config: Config); | ||
static init(config: Config): Promise<Storytime>; | ||
static init(config: Config): Storytime; | ||
listen(): Promise<Storytime>; | ||
finish(): void; | ||
createBrowserSession: (accountId: string) => Promise<any>; | ||
cacheCustomerId: (customerId: string) => void; | ||
formatCustomerMetadata: (metadata: any) => {}; | ||
findOrCreateCustomerId: () => Promise<string>; | ||
checkForExistingCustomerId: () => Promise<string | null>; | ||
createBrowserSession: (accountId: string, customerId: string) => Promise<any>; | ||
isValidSessionId: (sessionId?: string | null | undefined) => Promise<any>; | ||
setBrowserSessionCustomer: (sessionId: string, customerId: string) => Promise<any>; | ||
restartBrowserSession: (sessionId: string) => void; | ||
@@ -36,5 +59,5 @@ finishBrowserSession: (sessionId: string) => void; | ||
shouldEmitEvent(pathName: string): boolean; | ||
getSessionId(): Promise<string>; | ||
getSessionId(accountId: string, customerId: string): Promise<string>; | ||
getChannelName(sessionId: string): string; | ||
} | ||
export default Storytime; |
{ | ||
"name": "@papercups-io/storytime", | ||
"version": "1.0.3", | ||
"version": "1.0.4-beta.0", | ||
"description": "Track and record user sessions", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1906734
12779
2