lucid-extension-sdk 0.0.381 → 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.
|
@@ -100,6 +100,7 @@ export type ItemsPatch = {
|
|
|
100
100
|
* Constraints that can be defined on a per-item basis to conditionally lock fields for a specific item.
|
|
101
101
|
* The key for this map is the primary key of an item, and the value is a map from the name a field on that item to the constraints that should be applied to that field.
|
|
102
102
|
*
|
|
103
|
+
* If defined, the constraints will overwrite any existing per-item constraints for the item/field.
|
|
103
104
|
* If you have a composite key, ensure that you serialize it to a string before using it as a key in this map.
|
|
104
105
|
*/
|
|
105
106
|
fieldConstraintsPerItem?: Map<string, Map<string, FieldConstraintDefinition[]>>;
|
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';
|