@3dsource/metabox-modular-configurator-api 0.0.1-dev.4 → 0.0.1-dev.6

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 +78 -46
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -96,66 +96,89 @@ interface ToMetaBoxMessage {
96
96
  }
97
97
 
98
98
  /**
99
- * Represents a modular configurator object with its configuration, selected materials,
100
- * product identifier, and associated environment.
99
+ * Represents a modular configurator object with its configuration, current configuration tree,
100
+ * all components by active component type, component selected materials,
101
+ * and associated environment.
101
102
  */
102
103
  interface ModularConfiguratorEnvelope {
103
- /**
104
- * A reference to the universal configurator.
105
- */
106
- configurator: ModularConfigurator;
107
- /**
108
- * The unique product identifier.
109
- */
110
- productId: string;
111
- /**
112
- * A record mapping product material selections.
113
- */
114
- productMaterialsIds: SelectedIds;
115
- /**
116
- * The unique environment identifier.
117
- */
104
+ /** A reference to the modular configurator */
105
+ configurator: ModularConfiguratorApi;
106
+ /** The unique tree of components and parent and component type id */
107
+ configurationTree: ComponentWithParent[];
108
+ /** A record mapping all components by current component type */
109
+ componentsByComponentType: Record<string, string>;
110
+ /** A record mapping component material selections */
111
+ componentMaterialsIds: SelectedIds;
112
+ /** The unique environment identifier */
118
113
  environmentId: string;
119
- /**
120
- * A record mapping environment material selections.
121
- */
114
+ /** A record mapping environment material selections */
122
115
  environmentMaterialsIds: SelectedIds;
123
116
  }
124
- /**
125
- * Represents the universal configurator with its modular properties and components.
126
- */
127
- interface ModularConfigurator {
117
+ /** Represents the modular configurator api with its modular properties and components */
118
+ interface ModularConfiguratorApi {
128
119
  /** Unique identifier for the configurator. */
129
120
  id: string;
130
- /** Indicates if the configurator is active. */
131
- /** Label for the product collection. */
132
- productCollectionLabel: string;
121
+ /** Client information associated with the configurator. */
133
122
  /** The name of the configurator. */
134
123
  name: string;
135
- /** The camera settings used in the configurator. */
136
- /** Client information associated with the configurator. */
137
- /** A list of products for the configurator. */
138
- products: UniversalConfiguratorProduct[];
124
+ /** A list of components for the configurator. */
125
+ components: ModularConfiguratorComponent[];
139
126
  /** A list of available environments. */
140
- environments: UniversalConfiguratorEnvironment[];
141
- /** GraphQL typename for the configurator. */
142
- __typename: 'UniversalConfigurator';
127
+ environments: ModularConfiguratorEnvironment[];
128
+ /** A list of a component type for the configurator. */
129
+ componentTypes: ModularConfiguratorComponentType[];
130
+ /** The camera settings used in the configurator. */
131
+ /** Indicates if the configurator is active. */
132
+ connectors: ModularConfiguratorConnector[];
133
+ /** GraphQL typename for the Modular Configurator. */
134
+ __typename: 'ModularConfigurator';
143
135
  }
144
136
  /**
145
- * Represents a product within the universal configurator.
137
+ * Represents a configurator component within the modular configurator.
146
138
  */
147
- interface UniversalConfiguratorProduct {
148
- /** The product's unique identifier. */
149
- productId: string;
139
+ interface ModularConfiguratorComponent {
140
+ /** The id unique identifier. */
141
+ id: string;
142
+ /** The modular configurator component type identifier. */
143
+ componentType: ModularConfiguratorComponentType;
144
+ /** Display the name for the product. */
145
+ name: string;
150
146
  /** Position index of the product. */
151
147
  position: number;
152
- /** Display label for the product. */
153
- label: string;
148
+ /** The detailed product information. */
149
+ product: Product;
154
150
  /** Optional camera settings for the product. */
151
+ /** Connectors between connectors and virtual sockets. */
152
+ virtualSocketToConnectorsMap?: ModularConfiguratorVirtualSocketToConnector[];
153
+ __typename: 'ModularConfiguratorComponent';
154
+ }
155
+ /**
156
+ * Represents a component type within the modular configurator.
157
+ */
158
+ interface ModularConfiguratorComponentType {
159
+ /** The modular configurator component type identifier. */
160
+ componentType: ModularConfiguratorComponentType;
161
+ /** Display the name for the product. */
162
+ name: string;
163
+ /** Position index of the product. */
164
+ position: number;
155
165
  /** The detailed product information. */
156
166
  product: Product;
157
- /** GraphQL typename for the product. */
158
- __typename: 'UniversalConfiguratorProduct';
167
+ /** Optional camera settings for the product. */
168
+ /** Connectors between connectors and virtual sockets. */
169
+ virtualSocketToConnectorsMap?: ModularConfiguratorVirtualSocketToConnector[];
170
+ /** The id unique identifier. */
171
+ id: string;
172
+ __typename: 'ModularConfiguratorComponentType';
173
+ }
174
+ interface ModularConfiguratorVirtualSocketToConnector {
175
+ virtualSocketId: string;
176
+ connectorId: string;
177
+ }
178
+ interface ModularConfiguratorConnector {
179
+ id: string;
180
+ componentTypeId1: string;
181
+ componentTypeId2: string;
159
182
  }
160
183
  /**
161
184
  * Represents product details including visual assets and configuration.
@@ -236,9 +259,9 @@ interface Material {
236
259
  __typename: 'Material';
237
260
  }
238
261
  /**
239
- * Represents the environment settings for a universal configurator.
262
+ * Represents the environment settings for a modular configurator.
240
263
  */
241
- interface UniversalConfiguratorEnvironment {
264
+ interface ModularConfiguratorEnvironment {
242
265
  /** Unique identifier for the environment. */
243
266
  environmentId: string;
244
267
  /** Position index of the environment. */
@@ -248,7 +271,7 @@ interface UniversalConfiguratorEnvironment {
248
271
  /** Detailed environment configuration. */
249
272
  environment: Environment;
250
273
  /** GraphQL typename for the environment. */
251
- __typename: 'UniversalConfiguratorEnvironment';
274
+ __typename: 'ModularConfiguratorEnvironment';
252
275
  }
253
276
  /**
254
277
  * Represents an environment with associated media and configuration.
@@ -272,6 +295,14 @@ interface Environment {
272
295
  * Defines the structure for a mapping of selected materials.
273
296
  */
274
297
  type SelectedIds = Record<string, Record<string, string>>;
298
+ /**
299
+ * Defines the structure for a components tree.
300
+ */
301
+ interface ComponentWithParent {
302
+ id: string;
303
+ componentTypeId: string;
304
+ parentId: string | null;
305
+ }
275
306
  /**
276
307
  * Defines the structure for an available showcase status for the current product on a scene.
277
308
  */
@@ -286,6 +317,7 @@ interface FromMetaboxMessagePayloads {
286
317
  /**
287
318
  * Dispatches Every time when the configurator product showcase will be changed.
288
319
  */
320
+ showcaseStatus: ShowCaseStatus;
289
321
  /**
290
322
  * Dispatches Every time when the configurator connected/disconnected with Unreal Engine.
291
323
  */
@@ -925,4 +957,4 @@ declare class WatchCallbacks extends CommandBase {
925
957
  }
926
958
 
927
959
  export { ApplyZoom, CommandBase, Communicator, EventDispatcher, GetPdf, GetScreenshot, InitShowcase, MetaboxModularConfiguratorActions, PauseShowcase, PlayShowcase, ResetCamera, SetComponent, SetComponentMaterial, SetComponentType, SetEnvironment, SetEnvironmentMaterial, ShowEmbeddedMenu, ShowOverlayInterface, StopShowcase, UnrealCommand, WatchCallbacks, fromCommunicatorEvent, getUrlParams, integrateMetabox, saveImage, setUrlParams, sleep };
928
- export type { ApplicationDeviceTypes, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxMessagePayloads, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MimeType, ModularConfigurator, ModularConfiguratorEnvelope, Product, SelectedIds, ShowCaseStatus, Slot, Test, Thumbnail, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads, UniversalConfiguratorEnvironment, UniversalConfiguratorProduct };
960
+ export type { ApplicationDeviceTypes, ComponentWithParent, Environment, FromMetaBoxAPIEnvelope, FromMetaBoxApiEvents, FromMetaBoxMessage, FromMetaboxApiAction, FromMetaboxMessagePayloads, MCAppLoaded, Material, MetaBoxApiEnvelope, MetaProperty, MimeType, ModularConfiguratorApi, ModularConfiguratorComponent, ModularConfiguratorComponentType, ModularConfiguratorConnector, ModularConfiguratorEnvelope, ModularConfiguratorEnvironment, ModularConfiguratorVirtualSocketToConnector, Product, SelectedIds, ShowCaseStatus, Slot, Test, Thumbnail, ToMetaBoxActions, ToMetaBoxMessage, ToMetaBoxMessageEnvelope, ToMetaboxMessagePayload, ToMetaboxMessagePayloads };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dsource/metabox-modular-configurator-api",
3
- "version": "0.0.1-dev.4",
3
+ "version": "0.0.1-dev.6",
4
4
  "description": "API for Metabox MODULAR configurator",
5
5
  "keywords": [
6
6
  "metabox",