@upscopeio/sdk 2024.11.0 → 2024.11.10

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.
Files changed (2) hide show
  1. package/index.d.ts +16 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -42,6 +42,7 @@ type CobrowsingSdkConfiguration = {
42
42
  allowRemoteScroll: boolean;
43
43
  allowRemoteType: boolean;
44
44
  allowAgentRedirect: boolean;
45
+ allowFullScreen: boolean;
45
46
  requireControlRequest: boolean;
46
47
  rewriteExternalLinks: boolean;
47
48
  collectHistory: boolean;
@@ -62,10 +63,13 @@ type CobrowsingSdkConfiguration = {
62
63
  domChangesDelay: number;
63
64
  ignoreBrowserSupport: boolean;
64
65
  enableCanvases: boolean;
65
- customCallController: null | ((callback: (accepted: boolean) => void) => void);
66
- customControlRequestController: null | ((callback: (accepted: boolean) => void) => void);
66
+ customCallController: null | ((callback: (accepted: boolean) => void) => void | (() => void));
67
+ customControlRequestController: null | ((callback: (accepted: boolean) => void) => void | (() => void));
68
+ customFullScreenRequestController: null | ((callback: (accepted: boolean) => void) => void | (() => void));
67
69
  controlRequestTitle: string;
68
70
  controlRequestMessage: string;
71
+ fullScreenRequestTitle: string;
72
+ fullScreenRequestMessage: string;
69
73
  callPromptText: string;
70
74
  callRingtone: string;
71
75
  authorizationPromptTitle: string;
@@ -100,7 +104,7 @@ type CobrowsingSdkConfiguration = {
100
104
  sfdcFieldLabel: string;
101
105
  sfdcFieldId: string;
102
106
  needsProxy: (url: string) => boolean;
103
- onSessionRequest: (cb: (accepted: boolean) => void, requestingAgent: string | null) => void;
107
+ onSessionRequest: (cb: (accepted: boolean) => void, requestingAgent: string | null) => void | (() => void);
104
108
  onSessionStart: () => void;
105
109
  onSessionEnd: () => void;
106
110
  onWaitingForCall: () => void;
@@ -119,8 +123,9 @@ type SDKEvents = {
119
123
  callStart: undefined;
120
124
  callAccepted: undefined;
121
125
  agentRequestUpdate: ["pending" | "unavailable" | "canceled" | "accepted"];
122
- newObserver: [string];
126
+ newObserver: [string, Observer];
123
127
  observerGone: [string];
128
+ observersCount: [number];
124
129
  agentsAvailable: undefined;
125
130
  sessionContinue: undefined;
126
131
  sessionEnd: undefined;
@@ -130,6 +135,13 @@ type SDKEvents = {
130
135
  customMessage: [{ observer: string } | { visitor: string }, Record<string, any>];
131
136
  };
132
137
 
138
+ type Observer = {
139
+ name: string | null;
140
+ id: string;
141
+ screenWidth: number;
142
+ screenHeight: number;
143
+ };
144
+
133
145
  type Instruction =
134
146
  | ["init", Partial<Omit<CobrowsingSdkConfiguration, "apiKey">> & { apiKey: string }]
135
147
  | ["reset"]
package/package.json CHANGED
@@ -3,5 +3,5 @@
3
3
  "main": "index.js",
4
4
  "type": "module",
5
5
  "dependencies": {},
6
- "version": "2024.11.0"
6
+ "version": "2024.11.10"
7
7
  }