@upscopeio/sdk 0.0.0 → 1.0.2
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.
- package/package.json +3 -2
- package/index.d.ts +0 -145
- /package/{index.js → sdk.js} +0 -0
package/package.json
CHANGED
package/index.d.ts
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
export type SubmitRating = {
|
|
2
|
-
userSessionRating?: number;
|
|
3
|
-
userAgentRating?: number;
|
|
4
|
-
userAgentFeedback?: string;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type CobrowsingSdkConfiguration = {
|
|
8
|
-
jsConfiguration?: boolean;
|
|
9
|
-
uniqueId?: null | string;
|
|
10
|
-
identities?: null | string | string[];
|
|
11
|
-
tags?: null | string | string[];
|
|
12
|
-
integrationIds?: null | string | string[];
|
|
13
|
-
agentPrompt?: string;
|
|
14
|
-
callName?: string;
|
|
15
|
-
|
|
16
|
-
// Automatic
|
|
17
|
-
version: string;
|
|
18
|
-
apiKey: string;
|
|
19
|
-
beta: boolean;
|
|
20
|
-
region: string | null;
|
|
21
|
-
readonly regionWhitelist: string[] | null;
|
|
22
|
-
dataEndpoint: string;
|
|
23
|
-
pageviewsEndpoint: string;
|
|
24
|
-
phoneEndpoint: string;
|
|
25
|
-
javascriptEndpoint: string;
|
|
26
|
-
storageImplementation: null | Storage;
|
|
27
|
-
proxyRedirectEndpoint: string;
|
|
28
|
-
requireAuthorizationForSession: boolean;
|
|
29
|
-
integrateWithLivechat: boolean;
|
|
30
|
-
liveChatRewrite: boolean;
|
|
31
|
-
grabIdentityFromLivechat: boolean;
|
|
32
|
-
showUpscopeLink: boolean;
|
|
33
|
-
cursorColor: string;
|
|
34
|
-
enlargeCursor: boolean;
|
|
35
|
-
showTerminateButton: boolean;
|
|
36
|
-
useFingerprinting: boolean;
|
|
37
|
-
autoconnect: boolean;
|
|
38
|
-
trackConsole: boolean;
|
|
39
|
-
allowRemoteConsole: boolean;
|
|
40
|
-
allowRemoteClick: boolean;
|
|
41
|
-
allowRemoteScroll: boolean;
|
|
42
|
-
allowRemoteType: boolean;
|
|
43
|
-
allowAgentRedirect: boolean;
|
|
44
|
-
rewriteExternalLinks: boolean;
|
|
45
|
-
collectHistory: boolean;
|
|
46
|
-
consoleAllowed: boolean;
|
|
47
|
-
drawingsTtlMs: number;
|
|
48
|
-
enableLookupCodeOnKey: boolean;
|
|
49
|
-
lookupCodeKey: number;
|
|
50
|
-
lookupCodeKeyRepetitions: number;
|
|
51
|
-
lookupCodeKeyTitle: string;
|
|
52
|
-
lookupCodeKeyMessage: string;
|
|
53
|
-
lookupCodeElement: null | HTMLElement | string;
|
|
54
|
-
injectLookupCodeButton: boolean;
|
|
55
|
-
lookupCodeButtonPages: string[];
|
|
56
|
-
lookupCodeButtonStyle: string;
|
|
57
|
-
disconnectAfterSeconds: number;
|
|
58
|
-
proxyAssets: string[];
|
|
59
|
-
maskedElements: string[];
|
|
60
|
-
domChangesDelay: number;
|
|
61
|
-
ignoreBrowserSupport: boolean;
|
|
62
|
-
enableCanvases: boolean;
|
|
63
|
-
customCallController: null | ((callback: (accepted: boolean) => void) => void);
|
|
64
|
-
callPromptText: string;
|
|
65
|
-
callRingtone: string;
|
|
66
|
-
authorizationPromptTitle: string;
|
|
67
|
-
authorizationPromptMessage: string;
|
|
68
|
-
endOfScreenshareMessage: null | string;
|
|
69
|
-
callWaitMessage: string;
|
|
70
|
-
translationsYes: string;
|
|
71
|
-
translationsNo: string;
|
|
72
|
-
translationsOk: string;
|
|
73
|
-
translationsStopSession: string;
|
|
74
|
-
agentRequestButtonStyle: string;
|
|
75
|
-
agentRequestButtonTitle: string;
|
|
76
|
-
agentRequestButtonSubtitle: string;
|
|
77
|
-
agentRequestButtonRequestingTitle: string;
|
|
78
|
-
agentRequestButtonRequestingSubtitle: string;
|
|
79
|
-
agentRequestResultTitle: string;
|
|
80
|
-
agentRequestNotAvailableText: string;
|
|
81
|
-
agentRequestAcceptedText: string;
|
|
82
|
-
showAgentRequestButton: "always" | "when_available" | "never"; // One of: always / when_available / never
|
|
83
|
-
agentRequestButtonPages: string[];
|
|
84
|
-
callPopupFailedTitle: string;
|
|
85
|
-
callPopupFailedMessage: string;
|
|
86
|
-
unavailableAgentRequestRedirectImmediately: boolean;
|
|
87
|
-
unavailableAgentRequestRedirectTo: null | string;
|
|
88
|
-
fromProxy: boolean;
|
|
89
|
-
sfdcFieldLabel: string;
|
|
90
|
-
sfdcFieldId: string;
|
|
91
|
-
baseProxyUrl: string;
|
|
92
|
-
proxyDomain: string;
|
|
93
|
-
needsProxy: (url: string) => boolean;
|
|
94
|
-
onSessionRequest: (cb: (accepted: boolean) => void, requestingAgent: string | null) => void;
|
|
95
|
-
onSessionStart: () => void;
|
|
96
|
-
onSessionEnd: () => void;
|
|
97
|
-
onWaitingForCall: () => void;
|
|
98
|
-
onSessionContinue: () => void;
|
|
99
|
-
onConnection: null | (() => void);
|
|
100
|
-
maskElementMiddleware: (element: HTMLElement) => boolean;
|
|
101
|
-
noRemoteElements: string[];
|
|
102
|
-
allowRemoteMiddleware: (element: HTMLElement) => boolean;
|
|
103
|
-
styleSheetContentFromRules: (stylesheet: HTMLLinkElement | HTMLStyleElement) => boolean;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export type Instruction =
|
|
107
|
-
| ["init", Partial<CobrowsingSdkConfiguration>]
|
|
108
|
-
| ["reset"]
|
|
109
|
-
| ["connect"]
|
|
110
|
-
| ["cancelRequestAgent"]
|
|
111
|
-
| ["getShortId", (shortId: string) => void]
|
|
112
|
-
| ["getUserId", (shortId: string) => void] // Legacy version of getShortId
|
|
113
|
-
| ["getLookupCode", (code: string) => void]
|
|
114
|
-
| ["getWatchLink", (link: string) => void]
|
|
115
|
-
| ["logEvent", 'success' | 'error' | 'info' | 'warn' | 'contact', string]
|
|
116
|
-
| ["newPageview"]
|
|
117
|
-
| ["on", ...string[], (event: any) => void]
|
|
118
|
-
| ["requestAgent"]
|
|
119
|
-
| ["reset", boolean]
|
|
120
|
-
| ["redirect", string]
|
|
121
|
-
| ["saveHistory"]
|
|
122
|
-
| ["stopSession"]
|
|
123
|
-
| ["submitRating", SubmitRating]
|
|
124
|
-
| ["updateConnection", Partial<CobrowsingSdkConfiguration>];
|
|
125
|
-
|
|
126
|
-
export type Upscope = {
|
|
127
|
-
_config?: CobrowsingSdkConfiguration;
|
|
128
|
-
__defaultConfiguration?: CobrowsingSdkConfiguration;
|
|
129
|
-
__defaultRegion?: string;
|
|
130
|
-
_version?: string;
|
|
131
|
-
_integrations?: string[];
|
|
132
|
-
q: Instruction[];
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
declare global {
|
|
136
|
-
interface Window {
|
|
137
|
-
Upscope: Upscope;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
declare global {
|
|
142
|
-
function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): number;
|
|
143
|
-
function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): number;
|
|
144
|
-
}
|
|
145
|
-
export = Upscope;
|
/package/{index.js → sdk.js}
RENAMED
|
File without changes
|