@webflow/designer-extension-typings 0.2.0-beta.16 → 0.2.0-beta.17

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/api.d.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  /// <reference path="./app-subscription.d.ts" />
10
10
  /// <reference path="./assets.d.ts" />
11
11
  /// <reference path="./app-modes-generated.d.ts" />
12
+ /// <reference path="./app-connections.d.ts" />
12
13
 
13
14
  interface WebflowApi {
14
15
  /**
@@ -450,7 +451,29 @@ interface WebflowApi {
450
451
  */
451
452
  canForAppMode(appModes: Array<AppMode>): Promise<{[key in AppMode]: boolean}>;
452
453
 
454
+ /**
455
+ * The list of App Modes that are available to be queried
456
+ * ```ts
457
+ * await canForAppMode([webflow.appModes.canDesign, webflow.appModes.canEdit]);
458
+ * ```
459
+ */
453
460
  appModes: {[key in AppMode]: AppMode};
461
+
462
+ /**
463
+ * Gets the current App connection
464
+ * ```ts
465
+ * const appConnection = await webflow.getCurrentAppConnection();
466
+ * ```
467
+ */
468
+ getCurrentAppConnection(): Promise<null | string>;
469
+
470
+ /**
471
+ * Gets the current App connection resource
472
+ * ```ts
473
+ * const appConnectionResource = await webflow.getCurrentAppConnectionResource();
474
+ * ```
475
+ */
476
+ getCurrentAppConnectionResource(): Promise<null | AppConnectionResource>;
454
477
  }
455
478
 
456
479
  type Unsubscribe = () => void;
@@ -0,0 +1,4 @@
1
+ type AppConnectionResource = {
2
+ type: 'Element';
3
+ value: AnyElement;
4
+ };