@rtsdk/topia 0.4.0 → 0.5.1
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/README.md +4 -4
- package/dist/index.cjs +205 -85
- package/dist/index.d.ts +53 -1
- package/dist/index.js +205 -85
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -358,6 +358,24 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
358
358
|
isInteractive?: boolean;
|
|
359
359
|
interactivePublicKey: string;
|
|
360
360
|
}): Promise<void | ResponseType>;
|
|
361
|
+
/**
|
|
362
|
+
* @summary
|
|
363
|
+
* Retrieve analytics for a dropped asset by day, week, month, quarter, or year
|
|
364
|
+
*
|
|
365
|
+
* @usage
|
|
366
|
+
* ```ts
|
|
367
|
+
* const analytics = await droppedAsset.fetchDroppedAssetAnalytics({
|
|
368
|
+
* periodType: "quarter",
|
|
369
|
+
* dateValue: 3,
|
|
370
|
+
* year: 2023,
|
|
371
|
+
* });
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
fetchDroppedAssetAnalytics({ periodType, dateValue, year, }: {
|
|
375
|
+
periodType: "week" | "month" | "quarter" | "year";
|
|
376
|
+
dateValue: number;
|
|
377
|
+
year: number;
|
|
378
|
+
}): Promise<void | ResponseType>;
|
|
361
379
|
}
|
|
362
380
|
|
|
363
381
|
/**
|
|
@@ -650,6 +668,24 @@ declare class World extends SDKController implements WorldInterface {
|
|
|
650
668
|
* ```
|
|
651
669
|
*/
|
|
652
670
|
fetchWebhooks(): Promise<void | ResponseType>;
|
|
671
|
+
/**
|
|
672
|
+
* @summary
|
|
673
|
+
* Retrieve world analytics by day, week, month, quarter, or year
|
|
674
|
+
*
|
|
675
|
+
* @usage
|
|
676
|
+
* ```ts
|
|
677
|
+
* const analytics = await world.fetchWorldAnalytics({
|
|
678
|
+
* periodType: "week",
|
|
679
|
+
* dateValue: 40,
|
|
680
|
+
* year: 2023,
|
|
681
|
+
* });
|
|
682
|
+
* ```
|
|
683
|
+
*/
|
|
684
|
+
fetchWorldAnalytics({ periodType, dateValue, year, }: {
|
|
685
|
+
periodType: "week" | "month" | "quarter" | "year";
|
|
686
|
+
dateValue: number;
|
|
687
|
+
year: number;
|
|
688
|
+
}): Promise<void | ResponseType>;
|
|
653
689
|
}
|
|
654
690
|
|
|
655
691
|
/**
|
|
@@ -883,6 +919,19 @@ declare class Visitor extends User implements VisitorInterface {
|
|
|
883
919
|
* ```
|
|
884
920
|
*/
|
|
885
921
|
turnAVOff(): Promise<void | ResponseType>;
|
|
922
|
+
/**
|
|
923
|
+
* @summary
|
|
924
|
+
* Grant expression to a visitor by id or name.
|
|
925
|
+
*
|
|
926
|
+
* @usage
|
|
927
|
+
* ```ts
|
|
928
|
+
* await visitor.grantExpression({ name: "Eyes" });
|
|
929
|
+
* ```
|
|
930
|
+
*/
|
|
931
|
+
grantExpression({ id, name }: {
|
|
932
|
+
id?: string;
|
|
933
|
+
name?: string;
|
|
934
|
+
}): Promise<object | ResponseType>;
|
|
886
935
|
/**
|
|
887
936
|
* @summary
|
|
888
937
|
* Retrieves the data object for a visitor.
|
|
@@ -1399,13 +1448,15 @@ declare class SDKController implements SDKInterface {
|
|
|
1399
1448
|
topia: Topia;
|
|
1400
1449
|
constructor(topia: Topia, credentials?: InteractiveCredentials);
|
|
1401
1450
|
topiaPublicApi(): axios.AxiosInstance;
|
|
1402
|
-
errorHandler({ error, message, }: {
|
|
1451
|
+
errorHandler({ error, message, params, }: {
|
|
1403
1452
|
error?: Error | AxiosError | unknown;
|
|
1404
1453
|
message?: string;
|
|
1454
|
+
params?: object;
|
|
1405
1455
|
}): {
|
|
1406
1456
|
data: {};
|
|
1407
1457
|
message: string;
|
|
1408
1458
|
method: string;
|
|
1459
|
+
params: object | undefined;
|
|
1409
1460
|
stack: string;
|
|
1410
1461
|
stackTrace: Error;
|
|
1411
1462
|
status: number;
|
|
@@ -1517,6 +1568,7 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
1517
1568
|
constructor(topia: Topia);
|
|
1518
1569
|
create(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): DroppedAsset;
|
|
1519
1570
|
get(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): Promise<DroppedAsset>;
|
|
1571
|
+
getWithUniqueName(uniqueName: string, urlSlug: string, interactivePublicKey: string, interactiveSecret: string): Promise<DroppedAsset>;
|
|
1520
1572
|
drop(asset: Asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
1521
1573
|
interactivePublicKey?: string;
|
|
1522
1574
|
position: {
|