@rtsdk/topia 0.2.2 → 0.2.4

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 (58) hide show
  1. package/dist/index.cjs +1179 -41168
  2. package/dist/index.d.ts +1251 -0
  3. package/dist/index.js +194 -101
  4. package/package.json +5 -2
  5. package/dist/types/example.d.ts +0 -6
  6. package/dist/types/src/__mocks__/assets.d.ts +0 -99
  7. package/dist/types/src/__mocks__/index.d.ts +0 -4
  8. package/dist/types/src/__mocks__/scenes.d.ts +0 -79
  9. package/dist/types/src/__mocks__/visitors.d.ts +0 -83
  10. package/dist/types/src/__mocks__/worlds.d.ts +0 -73
  11. package/dist/types/src/controllers/Asset.d.ts +0 -20
  12. package/dist/types/src/controllers/DroppedAsset.d.ts +0 -285
  13. package/dist/types/src/controllers/SDKController.d.ts +0 -48
  14. package/dist/types/src/controllers/Scene.d.ts +0 -19
  15. package/dist/types/src/controllers/Topia.d.ts +0 -33
  16. package/dist/types/src/controllers/User.d.ts +0 -112
  17. package/dist/types/src/controllers/Visitor.d.ts +0 -102
  18. package/dist/types/src/controllers/World.d.ts +0 -143
  19. package/dist/types/src/controllers/WorldActivity.d.ts +0 -83
  20. package/dist/types/src/controllers/__tests__/asset.test.d.ts +0 -1
  21. package/dist/types/src/controllers/__tests__/droppedAsset.test.d.ts +0 -1
  22. package/dist/types/src/controllers/__tests__/scene.test.d.ts +0 -1
  23. package/dist/types/src/controllers/__tests__/user.test.d.ts +0 -1
  24. package/dist/types/src/controllers/__tests__/visitor.test.d.ts +0 -1
  25. package/dist/types/src/controllers/__tests__/world.test.d.ts +0 -1
  26. package/dist/types/src/controllers/__tests__/worldActivity.test.d.ts +0 -1
  27. package/dist/types/src/controllers/index.d.ts +0 -9
  28. package/dist/types/src/factories/AssetFactory.d.ts +0 -8
  29. package/dist/types/src/factories/DroppedAssetFactory.d.ts +0 -16
  30. package/dist/types/src/factories/SceneFactory.d.ts +0 -9
  31. package/dist/types/src/factories/UserFactory.d.ts +0 -8
  32. package/dist/types/src/factories/VisitorFactory.d.ts +0 -9
  33. package/dist/types/src/factories/WorldActivityFactory.d.ts +0 -8
  34. package/dist/types/src/factories/WorldFactory.d.ts +0 -8
  35. package/dist/types/src/factories/index.d.ts +0 -7
  36. package/dist/types/src/index.d.ts +0 -4
  37. package/dist/types/src/interfaces/AssetInterfaces.d.ts +0 -26
  38. package/dist/types/src/interfaces/DroppedAssetInterfaces.d.ts +0 -104
  39. package/dist/types/src/interfaces/SDKInterfaces.d.ts +0 -8
  40. package/dist/types/src/interfaces/SceneInterfaces.d.ts +0 -27
  41. package/dist/types/src/interfaces/TopiaInterfaces.d.ts +0 -10
  42. package/dist/types/src/interfaces/UserInterfaces.d.ts +0 -7
  43. package/dist/types/src/interfaces/VisitorInterfaces.d.ts +0 -37
  44. package/dist/types/src/interfaces/WorldActivityInterfaces.d.ts +0 -11
  45. package/dist/types/src/interfaces/WorldInterfaces.d.ts +0 -32
  46. package/dist/types/src/interfaces/index.d.ts +0 -9
  47. package/dist/types/src/types/DroppedAssetTypes.d.ts +0 -10
  48. package/dist/types/src/types/InteractiveCredentialsTypes.d.ts +0 -9
  49. package/dist/types/src/types/OptionsTypes.d.ts +0 -21
  50. package/dist/types/src/types/ResponseTypes.d.ts +0 -4
  51. package/dist/types/src/types/VisitorTypes.d.ts +0 -33
  52. package/dist/types/src/types/index.d.ts +0 -5
  53. package/dist/types/src/utils/__tests__/removeUndefined.test.d.ts +0 -1
  54. package/dist/types/src/utils/__tests__/scatterVisitors.test.d.ts +0 -1
  55. package/dist/types/src/utils/getBrowserWarning.d.ts +0 -1
  56. package/dist/types/src/utils/index.d.ts +0 -3
  57. package/dist/types/src/utils/removeUndefined.d.ts +0 -8
  58. package/dist/types/src/utils/scatterVisitors.d.ts +0 -4
@@ -1,79 +0,0 @@
1
- export declare const scenes: ({
2
- description: string;
3
- height: number;
4
- name: string;
5
- urlSlug: string;
6
- purchasedDate: {
7
- _seconds: number;
8
- _nanoseconds: number;
9
- };
10
- background: string;
11
- spawnPosition: {
12
- radius: number;
13
- y: number;
14
- x: number;
15
- };
16
- worldCenteredAtZero: boolean;
17
- width: number;
18
- price: string;
19
- originalKit: string;
20
- isPublic: boolean;
21
- created: {
22
- _seconds: number;
23
- _nanoseconds: number;
24
- };
25
- id: string;
26
- timesGetFree?: undefined;
27
- timesUsed?: undefined;
28
- } | {
29
- background: null;
30
- description: string;
31
- price: number;
32
- height: number;
33
- urlSlug: string;
34
- originalKit: string;
35
- worldCenteredAtZero: boolean;
36
- spawnPosition: {
37
- x: number;
38
- radius: number;
39
- y: number;
40
- };
41
- timesGetFree: number;
42
- isPublic: boolean;
43
- timesUsed: number;
44
- created: {
45
- _seconds: number;
46
- _nanoseconds: number;
47
- };
48
- purchasedDate: {
49
- _seconds: number;
50
- _nanoseconds: number;
51
- };
52
- name: string;
53
- width: number;
54
- id: string;
55
- } | {
56
- background: string;
57
- name: string;
58
- timesUsed: number;
59
- height: number;
60
- spawnPosition: {
61
- x: number;
62
- y: number;
63
- radius: number;
64
- };
65
- price: number;
66
- urlSlug: string;
67
- created: {
68
- _seconds: number;
69
- _nanoseconds: number;
70
- };
71
- description: string;
72
- width: number;
73
- id: string;
74
- purchasedDate?: undefined;
75
- worldCenteredAtZero?: undefined;
76
- originalKit?: undefined;
77
- isPublic?: undefined;
78
- timesGetFree?: undefined;
79
- })[];
@@ -1,83 +0,0 @@
1
- export declare const visitor: {
2
- visitorId: number;
3
- color: string;
4
- moveTo: {
5
- x: number;
6
- y: number;
7
- };
8
- moveFrom: {};
9
- username: string;
10
- sitting: boolean;
11
- gestureType: number;
12
- performer: boolean;
13
- performerNear: boolean;
14
- shareScreen: boolean;
15
- isBackground: boolean;
16
- muted: boolean;
17
- hidden: boolean;
18
- newId: string;
19
- displayName: string;
20
- movedOn: number;
21
- lastUpdate: number;
22
- isMobile: boolean;
23
- token: string;
24
- isAdmin: boolean;
25
- isRecording: boolean;
26
- isRecordingBot: boolean;
27
- };
28
- export declare const visitors: {
29
- "1": {
30
- visitorId: number;
31
- color: string;
32
- moveTo: {
33
- x: number;
34
- y: number;
35
- };
36
- moveFrom: {};
37
- username: string;
38
- sitting: boolean;
39
- gestureType: number;
40
- performer: boolean;
41
- performerNear: boolean;
42
- shareScreen: boolean;
43
- isBackground: boolean;
44
- muted: boolean;
45
- hidden: boolean;
46
- newId: string;
47
- displayName: string;
48
- movedOn: number;
49
- lastUpdate: number;
50
- isMobile: boolean;
51
- token: string;
52
- isAdmin: boolean;
53
- isRecording: boolean;
54
- isRecordingBot: boolean;
55
- };
56
- "2": {
57
- visitorId: number;
58
- color: string;
59
- moveTo: {
60
- x: number;
61
- y: number;
62
- };
63
- moveFrom: {};
64
- username: string;
65
- sitting: boolean;
66
- gestureType: number;
67
- performer: boolean;
68
- performerNear: boolean;
69
- shareScreen: boolean;
70
- isBackground: boolean;
71
- muted: boolean;
72
- hidden: boolean;
73
- newId: string;
74
- displayName: string;
75
- movedOn: number;
76
- lastUpdate: number;
77
- isMobile: boolean;
78
- token: string;
79
- isAdmin: boolean;
80
- isRecording: boolean;
81
- isRecordingBot: boolean;
82
- };
83
- };
@@ -1,73 +0,0 @@
1
- export declare const worlds: ({
2
- description: string;
3
- name: string;
4
- heroImage: string;
5
- urlSlug: string;
6
- background?: undefined;
7
- created?: undefined;
8
- controls?: undefined;
9
- enforceWhitelistOnLogin?: undefined;
10
- forceAuthOnLogin?: undefined;
11
- height?: undefined;
12
- mapExists?: undefined;
13
- redirectTo?: undefined;
14
- spawnPosition?: undefined;
15
- tileBackgroundEverywhere?: undefined;
16
- useTopiaPassword?: undefined;
17
- width?: undefined;
18
- alt?: undefined;
19
- } | {
20
- background: null;
21
- created: {
22
- _seconds: number;
23
- _nanoseconds: number;
24
- };
25
- controls: {
26
- isShowingCurrentGuests: boolean;
27
- hideShareScreen: boolean;
28
- isZoneConversationHidden: boolean;
29
- allowUserToTurnOnNotifications: boolean;
30
- isPeerConversationHidden: boolean;
31
- disableHideVideo: boolean;
32
- isWorldConversationHidden: boolean;
33
- allowUsersToTurnOnNotifications: boolean;
34
- allowMuteAll: boolean;
35
- isMobileDisabled: boolean;
36
- };
37
- description: string;
38
- enforceWhitelistOnLogin: boolean;
39
- forceAuthOnLogin: boolean;
40
- height: number;
41
- heroImage: string;
42
- mapExists: boolean;
43
- name: string;
44
- redirectTo: null;
45
- spawnPosition: {
46
- radius: number;
47
- y: number;
48
- x: number;
49
- };
50
- tileBackgroundEverywhere: null;
51
- useTopiaPassword: boolean;
52
- urlSlug: string;
53
- width: number;
54
- alt?: undefined;
55
- } | {
56
- alt: string;
57
- description: string;
58
- name: string;
59
- heroImage: string;
60
- urlSlug: string;
61
- background?: undefined;
62
- created?: undefined;
63
- controls?: undefined;
64
- enforceWhitelistOnLogin?: undefined;
65
- forceAuthOnLogin?: undefined;
66
- height?: undefined;
67
- mapExists?: undefined;
68
- redirectTo?: undefined;
69
- spawnPosition?: undefined;
70
- tileBackgroundEverywhere?: undefined;
71
- useTopiaPassword?: undefined;
72
- width?: undefined;
73
- })[];
@@ -1,20 +0,0 @@
1
- import { SDKController } from "controllers/SDKController";
2
- import { Topia } from "controllers/Topia";
3
- import { AssetInterface, AssetOptionalInterface } from "interfaces";
4
- import { ResponseType } from "types";
5
- /**
6
- * @summary
7
- * Create an instance of Asset class with a given asset id and optional attributes and session credentials.
8
- *
9
- * @usage
10
- * ```ts
11
- * await new Asset(topia, "assetId", { attributes: { assetName: "My Asset", isPublic: false } });
12
- * ```
13
- */
14
- export declare class Asset extends SDKController implements AssetInterface {
15
- readonly id?: string;
16
- jwt?: string;
17
- constructor(topia: Topia, id: string, options?: AssetOptionalInterface);
18
- fetchPlatformAssets(): Promise<object | ResponseType>;
19
- }
20
- export default Asset;
@@ -1,285 +0,0 @@
1
- import { AxiosResponse } from "axios";
2
- import { Asset } from "controllers/Asset";
3
- import { Topia } from "controllers/Topia";
4
- import { DroppedAssetInterface, DroppedAssetOptionalInterface, UpdateBroadcastInterface, UpdateClickTypeInterface, UpdateMediaTypeInterface, UpdatePrivateZoneInterface } from "interfaces";
5
- import { ResponseType } from "types";
6
- /**
7
- * @summary
8
- * Create an instance of Dropped Asset class with a given dropped asset id, url slug, and optional attributes and session credentials.
9
- *
10
- * @usage
11
- * ```ts
12
- * await new DroppedAsset(topia, "1giFZb0sQ3X27L7uGyQX", "example", { attributes: { text: "" }, credentials: { assetId: "1giFZb0sQ3X27L7uGyQX" } } });
13
- * ```
14
- */
15
- export declare class DroppedAsset extends Asset implements DroppedAssetInterface {
16
- #private;
17
- dataObject?: object | null;
18
- readonly id?: string | undefined;
19
- text?: string | null | undefined;
20
- urlSlug: string;
21
- isInteractive?: boolean | null;
22
- interactivePublicKey?: string | null;
23
- constructor(topia: Topia, id: string, urlSlug: string, options?: DroppedAssetOptionalInterface);
24
- /**
25
- * @summary
26
- * Retrieves dropped asset details.
27
- *
28
- * @usage
29
- * ```ts
30
- * await droppedAsset.fetchDroppedAssetById();
31
- * const { assetName } = droppedAsset;
32
- * ```
33
- */
34
- fetchDroppedAssetById(): Promise<void | ResponseType>;
35
- /**
36
- * @summary
37
- * Delete dropped asset.
38
- *
39
- * @usage
40
- * ```ts
41
- * await droppedAsset.deleteDroppedAsset();
42
- * ```
43
- */
44
- deleteDroppedAsset(): Promise<void | ResponseType>;
45
- /**
46
- * @summary
47
- * Retrieves the data object for a dropped asset.
48
- *
49
- * @usage
50
- * ```ts
51
- * await droppedAsset.fetchDroppedAssetDataObject();
52
- * const { dataObject } = droppedAsset;
53
- * ```
54
- */
55
- fetchDroppedAssetDataObject(): Promise<void | ResponseType>;
56
- /**
57
- * @summary
58
- * Sets the data object for a dropped asset.
59
- *
60
- * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
61
- *
62
- * @usage
63
- * ```ts
64
- * await droppedAsset.setDroppedAssetDataObject({
65
- * "exampleKey": "exampleValue",
66
- * });
67
- * const { dataObject } = droppedAsset;
68
- * ```
69
- */
70
- setDroppedAssetDataObject(dataObject: object, options?: {
71
- lock?: {
72
- lockId: string;
73
- releaseLock?: boolean;
74
- };
75
- }): Promise<void | ResponseType>;
76
- /**
77
- * @summary
78
- * Updates the data object for a dropped asset.
79
- *
80
- * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
81
- *
82
- * @usage
83
- * ```ts
84
- * await droppedAsset.updateDroppedAssetDataObject({
85
- * "exampleKey": "exampleValue",
86
- * });
87
- * const { dataObject } = droppedAsset;
88
- * ```
89
- */
90
- updateDroppedAssetDataObject(dataObject: object, options?: {
91
- lock?: {
92
- lockId: string;
93
- releaseLock?: boolean;
94
- };
95
- }): Promise<void | ResponseType>;
96
- /**
97
- * @summary
98
- * Updates broadcast options for a dropped asset.
99
- *
100
- * @usage
101
- * ```ts
102
- * await droppedAsset.updateBroadcast({
103
- * assetBroadcast: true,
104
- * assetBroadcastAll: true,
105
- * broadcasterEmail: "example@email.com"
106
- * });
107
- * ```
108
- */
109
- updateBroadcast({ assetBroadcast, assetBroadcastAll, broadcasterEmail, }: UpdateBroadcastInterface): Promise<void | ResponseType>;
110
- /**
111
- * @summary
112
- * Updates click options for a dropped asset.
113
- *
114
- * @usage
115
- * ```ts
116
- * await droppedAsset.updateClickType({
117
- * "clickType": "portal",
118
- * "clickableLink": "https://topia.io",
119
- * "clickableLinkTitle": "My awesome link!",
120
- * "clickableDisplayTextDescription": "Description",
121
- * "clickableDisplayTextHeadline": "Title",
122
- * "position": {
123
- * "x": 0,
124
- * "y": 0
125
- * },
126
- * "portalName": "community"
127
- * });
128
- * ```
129
- */
130
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
131
- /**
132
- * @summary
133
- * Updates text and style of a dropped asset.
134
- *
135
- * @usage
136
- * ```ts
137
- * const style = {
138
- * "textColor": "#abc123",
139
- * "textFontFamily": "Arial",
140
- * "textSize": 40,
141
- * "textWeight": "normal",
142
- * "textWidth": 200
143
- * };
144
- * await droppedAsset.updateCustomTextAsset(style, "hello world");
145
- * ```
146
- */
147
- updateCustomTextAsset(style: object, text: string | null | undefined): Promise<void | ResponseType>;
148
- /**
149
- * @summary
150
- * Updates media options for a dropped asset.
151
- *
152
- * @usage
153
- * ```ts
154
- * await droppedAsset.updateMediaType({
155
- * "mediaType": "link",
156
- * "mediaLink": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
157
- * "isVideo": true,
158
- * "syncUserMedia": true,
159
- * "audioSliderVolume: 30"
160
- * "portalName": "community",
161
- * "audioRadius": 0,
162
- * "mediaName": "string"
163
- * });
164
- * ```
165
- */
166
- updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType>;
167
- /**
168
- * @summary
169
- * Updates mute zone options for a dropped asset.
170
- *
171
- * @usage
172
- * ```ts
173
- * await droppedAsset.updateMuteZone(true);
174
- * ```
175
- */
176
- updateMuteZone(isMutezone: boolean): Promise<void | ResponseType>;
177
- /**
178
- * @summary
179
- * Updates webhook zone options for a dropped asset.
180
- *
181
- * @usage
182
- * ```ts
183
- * await droppedAsset.updateWebhookZone(true);
184
- * ```
185
- */
186
- updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType>;
187
- /**
188
- * @summary
189
- * Moves a dropped asset to specified coordinates.
190
- *
191
- * @usage
192
- * ```ts
193
- * await droppedAsset.updatePosition(100,200);
194
- * ```
195
- */
196
- updatePosition(x: number, y: number): Promise<void | ResponseType>;
197
- /**
198
- * @summary
199
- * Updates private zone options for a dropped asset.
200
- *
201
- * @usage
202
- * ```ts
203
- * await droppedAsset.updatePrivateZone({
204
- * "isPrivateZone": false,
205
- * "isPrivateZoneChatDisabled": true,
206
- * "privateZoneUserCap": 10
207
- * });
208
- * ```
209
- */
210
- updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType>;
211
- /**
212
- * @summary
213
- * Updates the size of a dropped asset.
214
- *
215
- * @usage
216
- * ```ts
217
- * await droppedAsset.assetScale(.5);
218
- * ```
219
- */
220
- updateScale(assetScale: number): Promise<void | ResponseType>;
221
- /**
222
- * @summary
223
- * Change or remove media embedded in a dropped asset.
224
- *
225
- * @usage
226
- * ```ts
227
- * await droppedAsset.updateUploadedMediaSelected("LVWyxwNxI96eLjnXWwYO");
228
- * ```
229
- */
230
- updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType>;
231
- /**
232
- * @summary
233
- * Change or remove top and bottom layers of a dropped asset.
234
- *
235
- * @usage
236
- * ```ts
237
- * await droppedAsset.updateWebImageLayers("","https://www.shutterstock.com/image-vector/colorful-illustration-test-word-260nw-1438324490.jpg");
238
- * ```
239
- */
240
- updateWebImageLayers(bottom: string, top: string): Promise<void | ResponseType>;
241
- /**
242
- * @summary
243
- * Add a webhook to a dropped asset
244
- *
245
- * @usage
246
- * ```ts
247
- * await droppedAsset.addWebhook({
248
- * active: true,
249
- * dataObject: {},
250
- * description: "Webhook desc",
251
- * enteredBy: "you",
252
- * isUniqueOnly: false,
253
- * title: "title",
254
- * type: "type",
255
- * url: "https://url.com",
256
- * urlSlug: "world",
257
- * });
258
- * ```
259
- */
260
- addWebhook({ dataObject, description, isUniqueOnly, title, type, url, }: {
261
- dataObject: object;
262
- description: string;
263
- isUniqueOnly: boolean;
264
- title: string;
265
- type: string;
266
- url: string;
267
- }): Promise<void | AxiosResponse>;
268
- /**
269
- * @summary
270
- * Set the interactive settings on a dropped asset
271
- *
272
- * @usage
273
- * ```ts
274
- * await droppedAsset.setInteractiveSettings({
275
- * isInteractive: true,
276
- * interactivePublicKey: "xyz"
277
- * });
278
- * ```
279
- */
280
- setInteractiveSettings({ isInteractive, interactivePublicKey, }: {
281
- isInteractive?: boolean;
282
- interactivePublicKey: string;
283
- }): Promise<void | ResponseType>;
284
- }
285
- export default DroppedAsset;
@@ -1,48 +0,0 @@
1
- import { Topia } from "controllers/Topia";
2
- import { SDKInterface } from "interfaces";
3
- import { InteractiveCredentials } from "types";
4
- import { AxiosError } from "axios";
5
- /**
6
- * @summary
7
- * Create an instance of SDKController class with credentials.
8
- *
9
- * @usage
10
- * ```ts
11
- * const credentials = {
12
- * assetId: "exampleAsset",
13
- * interactiveNonce: "exampleNonce"
14
- * interactivePublicKey: "examplePublicKey",
15
- * visitorId: 1,
16
- * url: "https://topia.io",
17
- * }
18
- * const topia = await new Topia({
19
- * apiDomain: "api.topia.io",
20
- * apiKey: "exampleKey",
21
- * interactiveKey: "key",
22
- * interactiveSecret: "secret",
23
- * }
24
- * await new SDKController({ credentials, topia });
25
- * ```
26
- */
27
- export declare class SDKController implements SDKInterface {
28
- credentials: InteractiveCredentials | undefined;
29
- jwt?: string;
30
- requestOptions: object;
31
- topia: Topia;
32
- constructor(topia: Topia, credentials?: InteractiveCredentials);
33
- topiaPublicApi(): import("axios").AxiosInstance;
34
- errorHandler({ error, message, }: {
35
- error?: Error | AxiosError | unknown;
36
- message?: string;
37
- }): {
38
- data: {};
39
- message: string;
40
- method: string;
41
- stack: string;
42
- stackTrace: Error;
43
- status: number;
44
- success: boolean;
45
- url: string;
46
- };
47
- }
48
- export default SDKController;
@@ -1,19 +0,0 @@
1
- import { SDKController } from "controllers/SDKController";
2
- import { Topia } from "controllers/Topia";
3
- import { SceneInterface, SceneOptionalInterface } from "interfaces";
4
- import { ResponseType } from "types";
5
- /**
6
- * @summary
7
- * Create an instance of Scene class with a given scene id and optional attributes and session credentials.
8
- *
9
- * @usage
10
- * ```ts
11
- * await new Scene(topia, "sceneId", { attributes: { name: "My Scene" } });
12
- * ```
13
- */
14
- export declare class Scene extends SDKController implements SceneInterface {
15
- readonly id: string;
16
- constructor(topia: Topia, id: string, options?: SceneOptionalInterface);
17
- fetchSceneById(): Promise<void | ResponseType>;
18
- }
19
- export default Scene;
@@ -1,33 +0,0 @@
1
- import { AxiosInstance } from "axios";
2
- import { TopiaInterface } from "interfaces";
3
- import jwt from "jsonwebtoken";
4
- /**
5
- * @summary
6
- * Create a single instance of Topia axios used for all calls to the public API in all classes
7
- *
8
- * @usage
9
- * ```ts
10
- * const topia = await new Topia({
11
- * apiDomain: "api.topia.io",
12
- * apiKey: "exampleKey",
13
- * interactiveKey: "key",
14
- * interactiveSecret: "secret",
15
- * });
16
- * ```
17
- */
18
- export declare class Topia implements TopiaInterface {
19
- axios: AxiosInstance;
20
- apiDomain?: string;
21
- apiKey?: string;
22
- apiProtocol?: string;
23
- interactiveKey?: string;
24
- interactiveSecret?: jwt.Secret;
25
- constructor({ apiDomain, apiKey, apiProtocol, interactiveKey, interactiveSecret, }: {
26
- apiDomain?: string;
27
- apiKey?: string;
28
- apiProtocol?: string;
29
- interactiveKey?: string;
30
- interactiveSecret?: jwt.Secret;
31
- });
32
- }
33
- export default Topia;