@rtsdk/topia 0.19.2 → 0.19.3
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/dist/index.cjs +2 -1
- package/dist/index.d.ts +33 -25
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41039,7 +41039,7 @@ class UserInventoryItem extends InventoryItem {
|
|
|
41039
41039
|
super(topia, item_id, { attributes: options.attributes, credentials: options.credentials });
|
|
41040
41040
|
Object.assign(this, options.attributes);
|
|
41041
41041
|
this.userItemId = id;
|
|
41042
|
-
const { user_id = "", quantity = 0, grant_source = "unknown", type = "unknown", metadata = {}, created_at = new Date(), updated_at = new Date(), profile_id = null, } = options.attributes;
|
|
41042
|
+
const { user_id = "", quantity = 0, grant_source = "unknown", type = "unknown", metadata = {}, created_at = new Date(), updated_at = new Date(), profile_id = null, item = { id: "", name: "", description: "", type: "", metadata: null, image_url: "" }, } = options.attributes;
|
|
41043
41043
|
this.item_id = item_id;
|
|
41044
41044
|
this.quantity = quantity;
|
|
41045
41045
|
this.grant_source = grant_source;
|
|
@@ -41049,6 +41049,7 @@ class UserInventoryItem extends InventoryItem {
|
|
|
41049
41049
|
this.created_at = created_at;
|
|
41050
41050
|
this.updated_at = updated_at;
|
|
41051
41051
|
this.profile_id = profile_id;
|
|
41052
|
+
this.item = item;
|
|
41052
41053
|
}
|
|
41053
41054
|
/**
|
|
41054
41055
|
* Fetches the user inventory item details from the platform and assigns them to this instance.
|
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ type DroppedAssetLinkType = {
|
|
|
74
74
|
linkSamlQueryParams?: string;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
type InteractiveCredentials = {
|
|
77
|
+
type InteractiveCredentials$1 = {
|
|
78
78
|
apiKey?: string;
|
|
79
79
|
assetId?: string;
|
|
80
80
|
interactiveNonce?: string;
|
|
@@ -88,22 +88,22 @@ type InteractiveCredentials = {
|
|
|
88
88
|
|
|
89
89
|
type AssetOptions = {
|
|
90
90
|
attributes?: AssetInterface | undefined;
|
|
91
|
-
credentials?: InteractiveCredentials | undefined;
|
|
91
|
+
credentials?: InteractiveCredentials$1 | undefined;
|
|
92
92
|
};
|
|
93
93
|
type DroppedAssetOptions = {
|
|
94
94
|
attributes?: DroppedAssetInterface | undefined;
|
|
95
|
-
credentials?: InteractiveCredentials | undefined;
|
|
95
|
+
credentials?: InteractiveCredentials$1 | undefined;
|
|
96
96
|
};
|
|
97
97
|
type UserOptions = {
|
|
98
|
-
credentials?: InteractiveCredentials | undefined;
|
|
98
|
+
credentials?: InteractiveCredentials$1 | undefined;
|
|
99
99
|
};
|
|
100
100
|
type VisitorOptions = {
|
|
101
101
|
attributes?: VisitorInterface | undefined;
|
|
102
|
-
credentials?: InteractiveCredentials | undefined;
|
|
102
|
+
credentials?: InteractiveCredentials$1 | undefined;
|
|
103
103
|
};
|
|
104
104
|
type WorldOptions = {
|
|
105
105
|
attributes?: WorldDetailsInterface | undefined;
|
|
106
|
-
credentials?: InteractiveCredentials | undefined;
|
|
106
|
+
credentials?: InteractiveCredentials$1 | undefined;
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
type ResponseType$1 = {
|
|
@@ -1206,6 +1206,7 @@ declare class UserInventoryItem extends InventoryItem implements UserInventoryIt
|
|
|
1206
1206
|
grant_source: string;
|
|
1207
1207
|
type: string;
|
|
1208
1208
|
profile_id?: string | null;
|
|
1209
|
+
item: UserInventoryItemMetadataType;
|
|
1209
1210
|
constructor(topia: Topia, id: string, options?: UserInventoryItemOptionalInterface);
|
|
1210
1211
|
/**
|
|
1211
1212
|
* Fetches the user inventory item details from the platform and assigns them to this instance.
|
|
@@ -2218,7 +2219,7 @@ declare enum WorldActivityType {
|
|
|
2218
2219
|
}
|
|
2219
2220
|
|
|
2220
2221
|
interface SDKInterface {
|
|
2221
|
-
credentials?: InteractiveCredentials;
|
|
2222
|
+
credentials?: InteractiveCredentials$1;
|
|
2222
2223
|
jwt?: string;
|
|
2223
2224
|
requestOptions: object;
|
|
2224
2225
|
topia: Topia;
|
|
@@ -2255,7 +2256,7 @@ interface AssetInterface extends SDKInterface {
|
|
|
2255
2256
|
}
|
|
2256
2257
|
type AssetOptionalInterface = {
|
|
2257
2258
|
attributes?: AssetInterface | object;
|
|
2258
|
-
credentials?: InteractiveCredentials;
|
|
2259
|
+
credentials?: InteractiveCredentials$1;
|
|
2259
2260
|
};
|
|
2260
2261
|
|
|
2261
2262
|
interface DroppedAssetInterface extends AssetInterface {
|
|
@@ -2377,7 +2378,7 @@ interface DroppedAssetOptionalInterface {
|
|
|
2377
2378
|
text?: string;
|
|
2378
2379
|
urlSlug?: string;
|
|
2379
2380
|
};
|
|
2380
|
-
credentials?: InteractiveCredentials | object;
|
|
2381
|
+
credentials?: InteractiveCredentials$1 | object;
|
|
2381
2382
|
}
|
|
2382
2383
|
interface UpdateBroadcastInterface {
|
|
2383
2384
|
assetBroadcast?: boolean;
|
|
@@ -2469,7 +2470,7 @@ interface EcosystemInterface {
|
|
|
2469
2470
|
incrementDataObjectValue(path: string, amount: number, options: object): Promise<void | ResponseType$1>;
|
|
2470
2471
|
}
|
|
2471
2472
|
interface EcosystemOptionalInterface {
|
|
2472
|
-
credentials?: InteractiveCredentials;
|
|
2473
|
+
credentials?: InteractiveCredentials$1;
|
|
2473
2474
|
}
|
|
2474
2475
|
|
|
2475
2476
|
interface SceneInterface {
|
|
@@ -2497,7 +2498,7 @@ interface SceneInterface {
|
|
|
2497
2498
|
}
|
|
2498
2499
|
type SceneOptionalInterface = {
|
|
2499
2500
|
attributes?: SceneInterface | object;
|
|
2500
|
-
credentials?: InteractiveCredentials;
|
|
2501
|
+
credentials?: InteractiveCredentials$1;
|
|
2501
2502
|
};
|
|
2502
2503
|
|
|
2503
2504
|
interface FireToastInterface {
|
|
@@ -2545,7 +2546,7 @@ interface UserInterface {
|
|
|
2545
2546
|
dataObject?: object | null;
|
|
2546
2547
|
}
|
|
2547
2548
|
interface UserOptionalInterface {
|
|
2548
|
-
credentials?: InteractiveCredentials;
|
|
2549
|
+
credentials?: InteractiveCredentials$1;
|
|
2549
2550
|
profileId?: string | null;
|
|
2550
2551
|
visitorId?: number | null;
|
|
2551
2552
|
urlSlug?: string;
|
|
@@ -2621,7 +2622,7 @@ interface VisitorInterface extends SDKInterface {
|
|
|
2621
2622
|
}
|
|
2622
2623
|
interface VisitorOptionalInterface {
|
|
2623
2624
|
attributes?: VisitorInterface | object;
|
|
2624
|
-
credentials?: InteractiveCredentials;
|
|
2625
|
+
credentials?: InteractiveCredentials$1;
|
|
2625
2626
|
}
|
|
2626
2627
|
interface MoveVisitorInterface {
|
|
2627
2628
|
shouldTeleportVisitor: boolean;
|
|
@@ -2654,12 +2655,12 @@ interface WebRTCConnectorInterface {
|
|
|
2654
2655
|
getTwilioConfig(): Promise<void | ResponseType$1>;
|
|
2655
2656
|
}
|
|
2656
2657
|
interface WebRTCConnectorOptionalInterface {
|
|
2657
|
-
credentials?: InteractiveCredentials;
|
|
2658
|
+
credentials?: InteractiveCredentials$1;
|
|
2658
2659
|
twilioConfig?: object;
|
|
2659
2660
|
}
|
|
2660
2661
|
|
|
2661
2662
|
interface WorldActivityOptionalInterface {
|
|
2662
|
-
credentials?: InteractiveCredentials;
|
|
2663
|
+
credentials?: InteractiveCredentials$1;
|
|
2663
2664
|
}
|
|
2664
2665
|
interface MoveAllVisitorsInterface {
|
|
2665
2666
|
shouldFetchVisitors?: boolean;
|
|
@@ -2749,13 +2750,13 @@ interface WorldInterface extends SDKInterface, WorldDetailsInterface {
|
|
|
2749
2750
|
}
|
|
2750
2751
|
interface WorldOptionalInterface {
|
|
2751
2752
|
attributes?: WorldDetailsInterface | object;
|
|
2752
|
-
credentials?: InteractiveCredentials;
|
|
2753
|
+
credentials?: InteractiveCredentials$1;
|
|
2753
2754
|
}
|
|
2754
2755
|
interface WorldWebhooksInterface {
|
|
2755
2756
|
webhooks: Array<WebhookInterface>;
|
|
2756
2757
|
}
|
|
2757
2758
|
|
|
2758
|
-
type InteractiveCredentials
|
|
2759
|
+
type InteractiveCredentials = {
|
|
2759
2760
|
apiKey?: string;
|
|
2760
2761
|
assetId?: string;
|
|
2761
2762
|
interactiveNonce?: string;
|
|
@@ -2784,26 +2785,33 @@ interface InventoryItemInterface extends SDKInterface {
|
|
|
2784
2785
|
}
|
|
2785
2786
|
type InventoryItemOptionalInterface = {
|
|
2786
2787
|
attributes?: InventoryItemInterface | object;
|
|
2787
|
-
credentials?: InteractiveCredentials
|
|
2788
|
+
credentials?: InteractiveCredentials;
|
|
2788
2789
|
};
|
|
2789
2790
|
|
|
2790
2791
|
/**
|
|
2791
2792
|
* Interface for a user-owned inventory item.
|
|
2792
2793
|
*/
|
|
2793
2794
|
interface UserInventoryItemInterface extends InventoryItemInterface {
|
|
2794
|
-
userItemId: string;
|
|
2795
2795
|
user_id: string;
|
|
2796
2796
|
item_id: string;
|
|
2797
2797
|
quantity: number;
|
|
2798
2798
|
created_at?: Date;
|
|
2799
2799
|
updated_at?: Date;
|
|
2800
|
-
metadata?: object | null;
|
|
2801
2800
|
grant_source: string;
|
|
2802
2801
|
profile_id?: string | null;
|
|
2802
|
+
item: UserInventoryItemMetadataType;
|
|
2803
2803
|
}
|
|
2804
2804
|
type UserInventoryItemOptionalInterface = {
|
|
2805
2805
|
attributes?: UserInventoryItemInterface | object;
|
|
2806
|
-
credentials?: InteractiveCredentials
|
|
2806
|
+
credentials?: InteractiveCredentials;
|
|
2807
|
+
};
|
|
2808
|
+
type UserInventoryItemMetadataType = {
|
|
2809
|
+
id: string;
|
|
2810
|
+
name: string;
|
|
2811
|
+
description: string;
|
|
2812
|
+
type: string;
|
|
2813
|
+
metadata: object | null;
|
|
2814
|
+
image_url: string;
|
|
2807
2815
|
};
|
|
2808
2816
|
|
|
2809
2817
|
/**
|
|
@@ -2859,11 +2867,11 @@ declare class Topia implements TopiaInterface {
|
|
|
2859
2867
|
* ```
|
|
2860
2868
|
*/
|
|
2861
2869
|
declare abstract class SDKController implements SDKInterface {
|
|
2862
|
-
credentials: InteractiveCredentials | undefined;
|
|
2870
|
+
credentials: InteractiveCredentials$1 | undefined;
|
|
2863
2871
|
jwt?: string;
|
|
2864
2872
|
requestOptions: object;
|
|
2865
2873
|
topia: Topia;
|
|
2866
|
-
constructor(topia: Topia, credentials?: InteractiveCredentials);
|
|
2874
|
+
constructor(topia: Topia, credentials?: InteractiveCredentials$1);
|
|
2867
2875
|
topiaPublicApi(): axios.AxiosInstance;
|
|
2868
2876
|
errorHandler({ error, message, params, sdkMethod, }: {
|
|
2869
2877
|
error?: Error | AxiosError | unknown;
|
|
@@ -3443,7 +3451,7 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
3443
3451
|
*
|
|
3444
3452
|
* @returns {Promise<DroppedAsset>} Returns a new DroppedAsset object with all properties already fetched.
|
|
3445
3453
|
*/
|
|
3446
|
-
getWithUniqueName(uniqueName: string, urlSlug: string, interactiveSecret: string, credentials: InteractiveCredentials): Promise<DroppedAsset>;
|
|
3454
|
+
getWithUniqueName(uniqueName: string, urlSlug: string, interactiveSecret: string, credentials: InteractiveCredentials$1): Promise<DroppedAsset>;
|
|
3447
3455
|
/**
|
|
3448
3456
|
* Drops an asset in a world and returns a new instance of DroppedAsset class with all properties.
|
|
3449
3457
|
*
|
|
@@ -4025,4 +4033,4 @@ declare class WorldFactory extends SDKController {
|
|
|
4025
4033
|
}>;
|
|
4026
4034
|
}
|
|
4027
4035
|
|
|
4028
|
-
export { AnalyticType, AnimationMetaType, Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetLinkType, DroppedAssetMediaType, DroppedAssetMediaVolumeRadius, DroppedAssetOptionalInterface, DroppedAssetOptions, Ecosystem, EcosystemFactory, EcosystemInterface, EcosystemOptionalInterface, FireToastInterface, FrameType, InteractiveCredentials, InventoryItemInterface, InventoryItemOptionalInterface, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, RemoveClickableLinkInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, SetClickableLinkMultiInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateClickableLinkMultiInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserInventoryItemInterface, UserInventoryItemOptionalInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
|
|
4036
|
+
export { AnalyticType, AnimationMetaType, Asset, AssetFactory, AssetInterface, AssetOptionalInterface, AssetOptions, AssetType, DroppedAsset, DroppedAssetClickType, DroppedAssetFactory, DroppedAssetInterface, DroppedAssetLinkType, DroppedAssetMediaType, DroppedAssetMediaVolumeRadius, DroppedAssetOptionalInterface, DroppedAssetOptions, Ecosystem, EcosystemFactory, EcosystemInterface, EcosystemOptionalInterface, FireToastInterface, FrameType, InteractiveCredentials$1 as InteractiveCredentials, InventoryItemInterface, InventoryItemOptionalInterface, MoveAllVisitorsInterface, MoveVisitorInterface, OpenIframeInterface, RemoveClickableLinkInterface, ResponseType$1 as ResponseType, SDKController, SDKInterface, Scene, SceneFactory, SceneInterface, SceneOptionalInterface, SetClickableLinkMultiInterface, Topia, TopiaInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateClickableLinkMultiInterface, UpdateDroppedAssetInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface, User, UserFactory, UserInterface, UserInventoryItemInterface, UserInventoryItemMetadataType, UserInventoryItemOptionalInterface, UserOptionalInterface, UserOptions, Visitor, VisitorFactory, VisitorInterface, VisitorOptionalInterface, VisitorOptions, VisitorType, VisitorsToMoveArrayType, VisitorsToMoveType, WebRTCConnector, WebRTCConnectorFactory, WebRTCConnectorInterface, WebRTCConnectorOptionalInterface, WebhookInterface, World, WorldActivity, WorldActivityFactory, WorldActivityOptionalInterface, WorldActivityType, WorldDetailsInterface, WorldFactory, WorldInterface, WorldOptionalInterface, WorldOptions, WorldWebhooksInterface };
|
package/dist/index.js
CHANGED
|
@@ -41037,7 +41037,7 @@ class UserInventoryItem extends InventoryItem {
|
|
|
41037
41037
|
super(topia, item_id, { attributes: options.attributes, credentials: options.credentials });
|
|
41038
41038
|
Object.assign(this, options.attributes);
|
|
41039
41039
|
this.userItemId = id;
|
|
41040
|
-
const { user_id = "", quantity = 0, grant_source = "unknown", type = "unknown", metadata = {}, created_at = new Date(), updated_at = new Date(), profile_id = null, } = options.attributes;
|
|
41040
|
+
const { user_id = "", quantity = 0, grant_source = "unknown", type = "unknown", metadata = {}, created_at = new Date(), updated_at = new Date(), profile_id = null, item = { id: "", name: "", description: "", type: "", metadata: null, image_url: "" }, } = options.attributes;
|
|
41041
41041
|
this.item_id = item_id;
|
|
41042
41042
|
this.quantity = quantity;
|
|
41043
41043
|
this.grant_source = grant_source;
|
|
@@ -41047,6 +41047,7 @@ class UserInventoryItem extends InventoryItem {
|
|
|
41047
41047
|
this.created_at = created_at;
|
|
41048
41048
|
this.updated_at = updated_at;
|
|
41049
41049
|
this.profile_id = profile_id;
|
|
41050
|
+
this.item = item;
|
|
41050
41051
|
}
|
|
41051
41052
|
/**
|
|
41052
41053
|
* Fetches the user inventory item details from the platform and assigns them to this instance.
|
package/package.json
CHANGED