@contrail/extensions-sdk 1.0.30 → 1.0.32

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.
@@ -72,6 +72,36 @@ export interface ComposeContentRequest {
72
72
  /** Defaults to transparent, which is usually what a composed pack shot wants. */
73
73
  backgroundColor?: string;
74
74
  fileName?: string;
75
+ /**
76
+ * Also make the composition the holder's primary viewable, so it is the image the entity shows
77
+ * everywhere - grids, cards, choosers.
78
+ *
79
+ * Off by default: composing an image and deciding it is the entity's main picture are separate
80
+ * intentions, and a caller adding one image among several should not silently repoint the item.
81
+ * A newly created set item, by contrast, has no image at all and wants this.
82
+ */
83
+ assignAsPrimaryViewable?: boolean;
84
+ /**
85
+ * Also drop an item component for the holder onto the board, showing the composition.
86
+ *
87
+ * Done here rather than through a separate command because only this call holds all three
88
+ * things the component needs at once - the item, the new content, and its URLs. Adding the
89
+ * component afterwards would mean re-reading the item and racing the server's denormalisation
90
+ * of the viewable URLs onto it, which is what leaves a component rendering an empty frame.
91
+ *
92
+ * Only meaningful for an `item:` holder.
93
+ */
94
+ addComponentToBoard?: {
95
+ /** Board coordinates for the component. The board places it in view when omitted. */
96
+ position?: {
97
+ x: number;
98
+ y: number;
99
+ };
100
+ size?: {
101
+ width: number;
102
+ height: number;
103
+ };
104
+ };
75
105
  }
76
106
  export interface ComposeContentResult {
77
107
  contentId: string;
@@ -81,6 +111,10 @@ export interface ComposeContentResult {
81
111
  width: number;
82
112
  height: number;
83
113
  };
114
+ /** Whether the holder was repointed at this content, when it was asked for. */
115
+ assignedAsPrimaryViewable?: boolean;
116
+ /** The id of the component added to the board, when one was asked for. */
117
+ componentElementId?: string;
84
118
  }
85
119
  export interface BoardDocumentElement extends DocumentElement {
86
120
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/extensions-sdk",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Client library for interfacing with VibeIQ's services and apps from an extension.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",