lucid-extension-sdk 0.0.382 → 0.0.383
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/editorclient.d.ts +20 -0
- package/package.json +1 -1
package/editorclient.d.ts
CHANGED
|
@@ -139,6 +139,26 @@ export declare class EditorClient {
|
|
|
139
139
|
* @param request Settings for the request
|
|
140
140
|
* @returns A promise that will either resolve or reject with an XHRResponse. If the HTTP status
|
|
141
141
|
* code is not 2xx, the promise will reject.
|
|
142
|
+
*
|
|
143
|
+
* Note: Parallel calls to the same provider do not open multiple authorization modals.
|
|
144
|
+
* Sequential calls using await can open multiple modals if the first attempt fails to set access tokens.
|
|
145
|
+
* It's the caller's responsibility to handle this in extension code.
|
|
146
|
+
*
|
|
147
|
+
* Example:
|
|
148
|
+
*
|
|
149
|
+
* // Does not open two auth modals
|
|
150
|
+
* ```typescript
|
|
151
|
+
* const response1 = editor.sendOAuthRequest(...);
|
|
152
|
+
* const response2 = editor.sendOAuthRequest(...);
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* // Will open an second auth modals if the first request fails to populate access token. (notice the await)
|
|
156
|
+
* ```typescript
|
|
157
|
+
* try{
|
|
158
|
+
* const response1 = await editor.sendOAuthRequest(...);
|
|
159
|
+
* }catch{} // Since error responses are thrown, this catch block is necessary to execute the next line.
|
|
160
|
+
* const response2 = await editor.sendOAuthRequest(...);
|
|
161
|
+
* ```
|
|
142
162
|
*/
|
|
143
163
|
oauthXhr(providerName: string, request: OAuthXHRRequest & {
|
|
144
164
|
responseFormat: 'utf8';
|