@smplrspace/smplr-loader 2.4.1-beta.10 → 2.4.1-beta.11

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.
@@ -7,6 +7,11 @@ declare interface BaseDataLayer<T, D extends UnknownData> {
7
7
 
8
8
  declare type CameraMode = '2d' | '3d'
9
9
 
10
+ declare interface ClientOptions {
11
+ organizationId: string;
12
+ clientToken: string;
13
+ }
14
+
10
15
  declare type DataLayer<D extends UnknownData = NoData> = PointDataLayer<D> | IconDataLayer<D> | PolygonDataLayer<D> | PolylineDataLayer<D> | FurnitureDataLayer<D>;
11
16
 
12
17
  declare interface DeprecatedPreviewProps {
@@ -218,6 +223,17 @@ declare interface PolylineDataLayer<D extends UnknownData = NoData> extends Base
218
223
  reshapeBoxColor?: string;
219
224
  }
220
225
 
226
+ export declare class QueryClient {
227
+ private options;
228
+ constructor(options: ClientOptions);
229
+ private checkOptions;
230
+ private fetchRaw;
231
+ private fetch;
232
+ checkApiConnection(): Promise<'OK'>;
233
+ getApiVersion(): Promise<string>;
234
+ getSpace(id: string): Promise<Space_2>;
235
+ }
236
+
221
237
  declare interface RenderOptions {
222
238
  compass?: boolean
223
239
  annotations?: boolean
@@ -275,6 +291,19 @@ export declare class Space {
275
291
  setCameraPlacement(placement: OrbitCameraPlacement): void;
276
292
  }
277
293
 
294
+ declare interface Space_2 {
295
+ id: string
296
+ created_at: string
297
+ modified_at: string
298
+ name: string
299
+ public_link_enabled: boolean
300
+ status: 'draft' | 'published' | 'archived' | 'deleted'
301
+ definition: object | null
302
+ embed_image: string | null
303
+ short_code: string | null
304
+ assetmap: object | null
305
+ }
306
+
278
307
  declare interface SpaceOptions {
279
308
  spaceId: string;
280
309
  clientToken: string;
@@ -292,7 +321,7 @@ declare interface Vector3Coord extends Vector2Coord {
292
321
  z: number;
293
322
  }
294
323
 
295
- export declare const version = "2.4.1-beta.10";
324
+ export declare const version = "2.4.1-beta.11";
296
325
 
297
326
  declare interface ViewerOptions {
298
327
  mode?: CameraMode;
package/dist/types.d.ts CHANGED
@@ -6,6 +6,7 @@ export {}
6
6
  export interface Smplr {
7
7
  version: typeof smplr.version
8
8
  Space: typeof smplr.Space
9
+ QueryClient: typeof smplr.QueryClient
9
10
  }
10
11
 
11
12
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smplrspace/smplr-loader",
3
- "version": "2.4.1-beta.10",
3
+ "version": "2.4.1-beta.11",
4
4
  "description": "NPM package to load a typed Smplr.js from CDN easily",
5
5
  "type": "module",
6
6
  "files": [