@volorio/sdk 0.1.0 → 0.2.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/LICENSE +16 -0
- package/README.md +35 -65
- package/dist/src/browser.d.ts +1 -53
- package/dist/src/browser.js +15 -94
- package/dist/src/browser.js.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/node.d.ts +1 -28
- package/dist/src/node.js +15 -47
- package/dist/src/node.js.map +1 -1
- package/dist/src/pricing.d.ts +1 -13
- package/dist/src/pricing.js +15 -25
- package/dist/src/pricing.js.map +1 -1
- package/package.json +23 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Volorio SDK Commercial License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Volorio. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission to install and use this SDK is granted only to an authorized Volorio
|
|
6
|
+
customer or evaluator, solely to integrate an application with Volorio services,
|
|
7
|
+
and subject to the Volorio Terms at https://volor.io/terms.
|
|
8
|
+
|
|
9
|
+
Except where the Volorio Terms expressly allow it, you may not redistribute,
|
|
10
|
+
sublicense, sell, publish, reverse engineer, or create a competing service from
|
|
11
|
+
this SDK or its source code. No ownership rights are transferred.
|
|
12
|
+
|
|
13
|
+
Third-party dependencies remain subject to their respective licenses.
|
|
14
|
+
|
|
15
|
+
THE SDK IS PROVIDED WITHOUT WARRANTIES EXCEPT TO THE EXTENT EXPRESSLY STATED IN
|
|
16
|
+
THE VOLORIO TERMS.
|
package/README.md
CHANGED
|
@@ -1,89 +1,59 @@
|
|
|
1
1
|
# @volorio/sdk
|
|
2
2
|
|
|
3
|
-
Volorio
|
|
3
|
+
Volorio RTC, chat, usage, billing, and media services SDK for Node.js and browsers.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @volorio/sdk
|
|
8
|
+
npm install @volorio/sdk@0.2.1
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Runtime and security
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- Runtime: Split server and client entry points
|
|
14
|
+
- Source version: `0.2.1`
|
|
15
|
+
- Registry status: published as 0.2.1
|
|
16
|
+
- API base URL for server calls: `https://api.volor.io`
|
|
17
|
+
- License: proprietary commercial SDK; see the included `LICENSE` and [Volorio Terms](https://volor.io/terms).
|
|
18
|
+
- Never expose a Volorio API key in browser, React Native, or Flutter code. Create short-lived sessions in your backend.
|
|
19
|
+
- Capability note: Requested products must be granted to the API key and accepted by the session endpoint.
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
## Public API
|
|
22
|
+
|
|
23
|
+
- `VolorioServerClient`
|
|
24
|
+
- `VolorioRoomClient`
|
|
25
|
+
- `createVolorioSessionProducts`
|
|
26
|
+
- `volorioPricingCatalog`
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const volorio = new VolorioServerClient({
|
|
23
|
-
apiBaseUrl: "https://api.volorio.com",
|
|
24
|
-
apiKey: process.env.VOLORIO_API_KEY!,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
app.post("/api/volorio/session", async (request, response) => {
|
|
28
|
-
const session = await volorio.createRoomSession({
|
|
29
|
-
projectId: request.body.projectId,
|
|
30
|
-
roomId: request.body.roomId,
|
|
31
|
-
identity: request.body.identity,
|
|
32
|
-
quality: request.body.quality ?? "hd",
|
|
33
|
-
ttlSeconds: 3600,
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
response.json(session);
|
|
37
|
-
});
|
|
28
|
+
```ts
|
|
29
|
+
import { VolorioRoomClient } from "@volorio/sdk";
|
|
38
30
|
```
|
|
39
31
|
|
|
40
|
-
##
|
|
32
|
+
## Quick start
|
|
41
33
|
|
|
42
|
-
|
|
43
|
-
import { VolorioRoomClient } from "@volorio/sdk/browser";
|
|
34
|
+
Backend:
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
headers: { "content-type": "application/json" },
|
|
48
|
-
body: JSON.stringify({
|
|
49
|
-
projectId: "proj_123",
|
|
50
|
-
roomId: "sales-demo",
|
|
51
|
-
identity: "visitor_42",
|
|
52
|
-
quality: "fullhd",
|
|
53
|
-
}),
|
|
54
|
-
}).then((response) => response.json());
|
|
55
|
-
|
|
56
|
-
const room = new VolorioRoomClient({
|
|
57
|
-
participantMinutePriceMicros: 590,
|
|
58
|
-
videoMinutePriceMicros: 890,
|
|
59
|
-
screenShareMinutePriceMicros: 120,
|
|
60
|
-
chatMinutePriceMicros: 80,
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
room.on("usageEstimateChanged", (estimate) => {
|
|
64
|
-
console.log("live participant minutes", estimate.participantMinutes);
|
|
65
|
-
console.log("estimated amount micros", estimate.estimatedAmountMicros);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
await room.join(session);
|
|
69
|
-
await room.enableCamera(true);
|
|
70
|
-
await room.enableMicrophone(true);
|
|
71
|
-
await room.sendMessage("hello");
|
|
36
|
+
```ts
|
|
37
|
+
import { VolorioServerClient } from "@volorio/sdk/node";
|
|
72
38
|
```
|
|
73
39
|
|
|
74
|
-
|
|
40
|
+
Browser:
|
|
75
41
|
|
|
76
42
|
```ts
|
|
77
|
-
import {
|
|
43
|
+
import { VolorioRoomClient } from "@volorio/sdk/browser";
|
|
78
44
|
|
|
79
|
-
|
|
45
|
+
const room = new VolorioRoomClient();
|
|
46
|
+
await room.join(sessionFromYourBackend);
|
|
80
47
|
```
|
|
81
48
|
|
|
82
|
-
|
|
49
|
+
## Dependencies
|
|
83
50
|
|
|
84
|
-
|
|
51
|
+
- `@volorio/core` `^0.2.0`
|
|
52
|
+
- `@volorio/rtc` `^0.2.0`
|
|
53
|
+
- `@volorio/server` `^0.2.0`
|
|
85
54
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
55
|
+
## Documentation
|
|
56
|
+
|
|
57
|
+
- [Volorio npm integration guide](https://volor.io/docs/packages/npm-overview)
|
|
58
|
+
- [REST and SDK documentation](https://volor.io/docs)
|
|
59
|
+
- [Volorio Console](https://app.volor.io)
|
package/dist/src/browser.d.ts
CHANGED
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
type Handler = (event: unknown) => void;
|
|
3
|
-
export interface VolorioBrowserSession {
|
|
4
|
-
livekitUrl: string;
|
|
5
|
-
token: string;
|
|
6
|
-
identity: string;
|
|
7
|
-
}
|
|
8
|
-
export interface VolorioUsageEstimate {
|
|
9
|
-
participantMinutes: number;
|
|
10
|
-
estimatedAmountMicros: number;
|
|
11
|
-
}
|
|
12
|
-
export interface VolorioRoomClientOptions {
|
|
13
|
-
roomFactory?: () => VolorioRoomLike;
|
|
14
|
-
now?: () => number;
|
|
15
|
-
participantMinutePriceMicros?: number;
|
|
16
|
-
videoMinutePriceMicros?: number;
|
|
17
|
-
screenShareMinutePriceMicros?: number;
|
|
18
|
-
chatMinutePriceMicros?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface VolorioRoomLike {
|
|
21
|
-
localParticipant: {
|
|
22
|
-
setCameraEnabled(enabled: boolean): Promise<void>;
|
|
23
|
-
setMicrophoneEnabled(enabled: boolean): Promise<void>;
|
|
24
|
-
setScreenShareEnabled(enabled: boolean): Promise<void>;
|
|
25
|
-
publishData(payload: Uint8Array, options?: {
|
|
26
|
-
reliable?: boolean;
|
|
27
|
-
}): Promise<void>;
|
|
28
|
-
};
|
|
29
|
-
on(event: string, handler: (...args: unknown[]) => void): void;
|
|
30
|
-
connect(url: string, token: string): Promise<void>;
|
|
31
|
-
disconnect(): void;
|
|
32
|
-
}
|
|
33
|
-
export declare class VolorioRoomClient {
|
|
34
|
-
private readonly handlers;
|
|
35
|
-
private readonly roomFactory;
|
|
36
|
-
private readonly now;
|
|
37
|
-
private readonly rates;
|
|
38
|
-
private room;
|
|
39
|
-
private joinedAt;
|
|
40
|
-
private featureState;
|
|
41
|
-
constructor(options?: VolorioRoomClientOptions);
|
|
42
|
-
on(event: EventName, handler: Handler): () => void;
|
|
43
|
-
join(session: VolorioBrowserSession): Promise<void>;
|
|
44
|
-
disconnect(): void;
|
|
45
|
-
enableCamera(enabled: boolean): Promise<void>;
|
|
46
|
-
enableMicrophone(enabled: boolean): Promise<void>;
|
|
47
|
-
enableScreenShare(enabled: boolean): Promise<void>;
|
|
48
|
-
sendMessage(message: string): Promise<void>;
|
|
49
|
-
updateUsageEstimate(): VolorioUsageEstimate;
|
|
50
|
-
private requireRoom;
|
|
51
|
-
private emit;
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
1
|
+
export * from "@volorio/rtc";
|
package/dist/src/browser.js
CHANGED
|
@@ -1,97 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
class VolorioRoomClient {
|
|
5
|
-
handlers = new Map();
|
|
6
|
-
roomFactory;
|
|
7
|
-
now;
|
|
8
|
-
rates;
|
|
9
|
-
room;
|
|
10
|
-
joinedAt = 0;
|
|
11
|
-
featureState = { camera: false, screenShare: false, chat: false };
|
|
12
|
-
constructor(options = {}) {
|
|
13
|
-
this.roomFactory = options.roomFactory ?? createLiveKitRoom;
|
|
14
|
-
this.now = options.now ?? Date.now;
|
|
15
|
-
this.rates = {
|
|
16
|
-
participantMinutePriceMicros: options.participantMinutePriceMicros ?? 590,
|
|
17
|
-
videoMinutePriceMicros: options.videoMinutePriceMicros ?? 250,
|
|
18
|
-
screenShareMinutePriceMicros: options.screenShareMinutePriceMicros ?? 120,
|
|
19
|
-
chatMinutePriceMicros: options.chatMinutePriceMicros ?? 80,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
on(event, handler) {
|
|
23
|
-
const handlers = this.handlers.get(event) ?? [];
|
|
24
|
-
handlers.push(handler);
|
|
25
|
-
this.handlers.set(event, handlers);
|
|
26
|
-
return () => this.handlers.set(event, handlers.filter((item) => item !== handler));
|
|
27
|
-
}
|
|
28
|
-
async join(session) {
|
|
29
|
-
this.room = this.roomFactory();
|
|
30
|
-
this.room.on("disconnected", () => this.emit("disconnected", undefined));
|
|
31
|
-
this.room.on("participantConnected", () => this.emit("participantsChanged", undefined));
|
|
32
|
-
this.room.on("participantDisconnected", () => this.emit("participantsChanged", undefined));
|
|
33
|
-
this.room.on("dataReceived", (payload, participant) => {
|
|
34
|
-
this.emit("messageReceived", { payload, participant });
|
|
35
|
-
});
|
|
36
|
-
await this.room.connect(session.livekitUrl, session.token);
|
|
37
|
-
this.joinedAt = this.now();
|
|
38
|
-
this.emit("connected", { identity: session.identity });
|
|
39
|
-
this.updateUsageEstimate();
|
|
40
|
-
}
|
|
41
|
-
disconnect() {
|
|
42
|
-
this.room?.disconnect();
|
|
43
|
-
this.room = undefined;
|
|
44
|
-
this.emit("disconnected", undefined);
|
|
45
|
-
}
|
|
46
|
-
async enableCamera(enabled) {
|
|
47
|
-
await this.requireRoom().localParticipant.setCameraEnabled(enabled);
|
|
48
|
-
this.featureState.camera = enabled;
|
|
49
|
-
this.updateUsageEstimate();
|
|
50
|
-
}
|
|
51
|
-
async enableMicrophone(enabled) {
|
|
52
|
-
await this.requireRoom().localParticipant.setMicrophoneEnabled(enabled);
|
|
53
|
-
}
|
|
54
|
-
async enableScreenShare(enabled) {
|
|
55
|
-
await this.requireRoom().localParticipant.setScreenShareEnabled(enabled);
|
|
56
|
-
this.featureState.screenShare = enabled;
|
|
57
|
-
this.updateUsageEstimate();
|
|
58
|
-
}
|
|
59
|
-
async sendMessage(message) {
|
|
60
|
-
await this.requireRoom().localParticipant.publishData(new TextEncoder().encode(message), { reliable: true });
|
|
61
|
-
this.featureState.chat = true;
|
|
62
|
-
this.updateUsageEstimate();
|
|
63
|
-
}
|
|
64
|
-
updateUsageEstimate() {
|
|
65
|
-
const elapsedMinutes = Math.max(0, (this.now() - this.joinedAt) / 60000);
|
|
66
|
-
const perMinute = this.rates.participantMinutePriceMicros +
|
|
67
|
-
(this.featureState.camera ? this.rates.videoMinutePriceMicros : 0) +
|
|
68
|
-
(this.featureState.screenShare ? this.rates.screenShareMinutePriceMicros : 0) +
|
|
69
|
-
(this.featureState.chat ? this.rates.chatMinutePriceMicros : 0);
|
|
70
|
-
const estimate = {
|
|
71
|
-
participantMinutes: elapsedMinutes,
|
|
72
|
-
estimatedAmountMicros: Math.round(elapsedMinutes * perMinute),
|
|
73
|
-
};
|
|
74
|
-
this.emit("usageEstimateChanged", estimate);
|
|
75
|
-
return estimate;
|
|
76
|
-
}
|
|
77
|
-
requireRoom() {
|
|
78
|
-
if (this.room === undefined) {
|
|
79
|
-
throw new Error("Volorio room is not connected");
|
|
80
|
-
}
|
|
81
|
-
return this.room;
|
|
82
|
-
}
|
|
83
|
-
emit(event, payload) {
|
|
84
|
-
for (const handler of this.handlers.get(event) ?? []) {
|
|
85
|
-
handler(payload);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.VolorioRoomClient = VolorioRoomClient;
|
|
90
|
-
function createLiveKitRoom() {
|
|
91
|
-
const livekit = globalThis.LivekitClient;
|
|
92
|
-
if (livekit === undefined) {
|
|
93
|
-
throw new Error("livekit-client is required. Pass roomFactory or load LivekitClient in the browser.");
|
|
94
|
-
}
|
|
95
|
-
return new livekit.Room();
|
|
96
|
-
}
|
|
17
|
+
__exportStar(require("@volorio/rtc"), exports);
|
|
97
18
|
//# sourceMappingURL=browser.js.map
|
package/dist/src/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "
|
|
3
|
-
export * from "
|
|
1
|
+
export * from "@volorio/core";
|
|
2
|
+
export * from "@volorio/server";
|
|
3
|
+
export * from "@volorio/rtc";
|
package/dist/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("@volorio/core"), exports);
|
|
18
|
+
__exportStar(require("@volorio/server"), exports);
|
|
19
|
+
__exportStar(require("@volorio/rtc"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,+CAA6B"}
|
package/dist/src/node.d.ts
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
apiBaseUrl: string;
|
|
3
|
-
apiKey: string;
|
|
4
|
-
fetch?: typeof fetch;
|
|
5
|
-
}
|
|
6
|
-
export interface CreateRoomSessionInput {
|
|
7
|
-
projectId: string;
|
|
8
|
-
roomId: string;
|
|
9
|
-
identity: string;
|
|
10
|
-
regionId?: string;
|
|
11
|
-
ttlSeconds?: number;
|
|
12
|
-
quality?: "voice" | "hd" | "fullhd" | "2k" | "4k";
|
|
13
|
-
}
|
|
14
|
-
export interface VolorioRoomSession {
|
|
15
|
-
projectId: string;
|
|
16
|
-
roomId: string;
|
|
17
|
-
identity: string;
|
|
18
|
-
token: string;
|
|
19
|
-
livekitUrl: string;
|
|
20
|
-
}
|
|
21
|
-
export declare class VolorioServerClient {
|
|
22
|
-
private readonly apiBaseUrl;
|
|
23
|
-
private readonly apiKey;
|
|
24
|
-
private readonly fetchImpl;
|
|
25
|
-
constructor(options: VolorioServerClientOptions);
|
|
26
|
-
createRoomSession(input: CreateRoomSessionInput): Promise<VolorioRoomSession>;
|
|
27
|
-
private post;
|
|
28
|
-
}
|
|
1
|
+
export * from "@volorio/server";
|
package/dist/src/node.js
CHANGED
|
@@ -1,50 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
fetchImpl;
|
|
8
|
-
constructor(options) {
|
|
9
|
-
this.apiBaseUrl = options.apiBaseUrl.replace(/\/+$/, "");
|
|
10
|
-
this.apiKey = options.apiKey;
|
|
11
|
-
this.fetchImpl = options.fetch ?? fetch;
|
|
12
|
-
}
|
|
13
|
-
async createRoomSession(input) {
|
|
14
|
-
await this.post("/v1/media-rooms", {
|
|
15
|
-
roomId: input.roomId,
|
|
16
|
-
regionId: input.regionId ?? "default",
|
|
17
|
-
metadata: JSON.stringify({ projectId: input.projectId, quality: input.quality ?? "hd" }),
|
|
18
|
-
});
|
|
19
|
-
const token = await this.post("/v1/tokens", {
|
|
20
|
-
projectId: input.projectId,
|
|
21
|
-
roomId: input.roomId,
|
|
22
|
-
identity: input.identity,
|
|
23
|
-
ttlSeconds: input.ttlSeconds ?? 3600,
|
|
24
|
-
quality: input.quality ?? "hd",
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
projectId: input.projectId,
|
|
28
|
-
roomId: input.roomId,
|
|
29
|
-
identity: input.identity,
|
|
30
|
-
token: token.token,
|
|
31
|
-
livekitUrl: token.livekitUrl ?? "",
|
|
32
|
-
};
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
7
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
throw new Error(`Volorio API ${path} returned ${response.status}: ${await response.text()}`);
|
|
45
|
-
}
|
|
46
|
-
return response.json();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.VolorioServerClient = VolorioServerClient;
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@volorio/server"), exports);
|
|
50
18
|
//# sourceMappingURL=node.js.map
|
package/dist/src/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
package/dist/src/pricing.d.ts
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export interface VolorioProductPrice {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
category: "core" | "media_service" | "ai_extension" | "addon" | "apaas";
|
|
6
|
-
unit: VolorioProductUnit;
|
|
7
|
-
unitPriceMicros: number;
|
|
8
|
-
freeAllowance?: {
|
|
9
|
-
quantity: number;
|
|
10
|
-
period: "month" | "one_time";
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const volorioPricingCatalog: readonly VolorioProductPrice[];
|
|
1
|
+
export * from "@volorio/core";
|
package/dist/src/pricing.js
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
exports.volorioPricingCatalog = [
|
|
5
|
-
{ id: "conversational_ai_platform", name: "Conversational AI Platform", category: "core", unit: "minute", unitPriceMicros: 100_000, freeAllowance: { quantity: 300, period: "one_time" } },
|
|
6
|
-
{ id: "rtc_voice", name: "RTC Voice", category: "core", unit: "participant_minute", unitPriceMicros: 590 },
|
|
7
|
-
{ id: "rtc_video_hd", name: "RTC Video HD", category: "core", unit: "participant_minute", unitPriceMicros: 590, freeAllowance: { quantity: 10_000, period: "month" } },
|
|
8
|
-
{ id: "rtc_video_fullhd", name: "RTC Video FullHD", category: "core", unit: "participant_minute", unitPriceMicros: 890 },
|
|
9
|
-
{ id: "rtc_video_2k", name: "RTC Video 2K", category: "core", unit: "participant_minute", unitPriceMicros: 1_490 },
|
|
10
|
-
{ id: "rtc_video_4k", name: "RTC Video 4K", category: "core", unit: "participant_minute", unitPriceMicros: 2_490 },
|
|
11
|
-
{ id: "live_streaming", name: "Live Streaming", category: "core", unit: "participant_minute", unitPriceMicros: 590 },
|
|
12
|
-
{ id: "screen_share", name: "Screen Share", category: "core", unit: "participant_minute", unitPriceMicros: 590 },
|
|
13
|
-
{ id: "signaling", name: "Signaling", category: "core", unit: "message", unitPriceMicros: 1_500, freeAllowance: { quantity: 1_000_000, period: "month" } },
|
|
14
|
-
{ id: "chat_mau", name: "Chat MAU", category: "core", unit: "monthly_active_user", unitPriceMicros: 50_000, freeAllowance: { quantity: 500, period: "month" } },
|
|
15
|
-
{ id: "speech_to_text", name: "Real-Time Speech to Text", category: "media_service", unit: "minute", unitPriceMicros: 16_990 },
|
|
16
|
-
{ id: "real_time_translation", name: "Real-Time Translation", category: "media_service", unit: "minute", unitPriceMicros: 8_990 },
|
|
17
|
-
{ id: "recording", name: "Recording", category: "media_service", unit: "minute", unitPriceMicros: 990 },
|
|
18
|
-
{ id: "media_gateway", name: "Media Gateway", category: "media_service", unit: "minute", unitPriceMicros: 990 },
|
|
19
|
-
{ id: "cloud_transcoding", name: "Cloud Transcoding", category: "media_service", unit: "minute", unitPriceMicros: 1_990 },
|
|
20
|
-
{ id: "media_push", name: "Media Push", category: "media_service", unit: "minute", unitPriceMicros: 1_990 },
|
|
21
|
-
{ id: "media_pull", name: "Media Pull", category: "media_service", unit: "minute", unitPriceMicros: 1_150 },
|
|
22
|
-
{ id: "ai_noise_suppression", name: "AI Noise Suppression", category: "ai_extension", unit: "minute", unitPriceMicros: 590, freeAllowance: { quantity: 10_000, period: "month" } },
|
|
23
|
-
{ id: "spatial_audio_3d", name: "3D Spatial Audio", category: "ai_extension", unit: "minute", unitPriceMicros: 990, freeAllowance: { quantity: 10_000, period: "month" } },
|
|
24
|
-
{ id: "interactive_whiteboard", name: "Interactive Whiteboard", category: "addon", unit: "minute", unitPriceMicros: 1_400, freeAllowance: { quantity: 10_000, period: "month" } },
|
|
25
|
-
{ id: "analytics", name: "Analytics", category: "addon", unit: "month", unitPriceMicros: 449_000_000 },
|
|
26
|
-
{ id: "flexible_classroom", name: "Flexible Classroom", category: "apaas", unit: "minute", unitPriceMicros: 2_190, freeAllowance: { quantity: 10_000, period: "month" } },
|
|
27
|
-
];
|
|
17
|
+
__exportStar(require("@volorio/core"), exports);
|
|
28
18
|
//# sourceMappingURL=pricing.js.map
|
package/dist/src/pricing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/pricing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/pricing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volorio/sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "Volorio RTC, chat, usage, and
|
|
5
|
+
"description": "Volorio RTC, chat, usage, billing, and media services SDK for Node.js and browsers.",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"types": "dist/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist/src",
|
|
28
|
-
"README.md"
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
29
30
|
],
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public",
|
|
@@ -36,12 +37,24 @@
|
|
|
36
37
|
"test": "tsc -p tsconfig.json && node --test dist/test/*.spec.js",
|
|
37
38
|
"pack:local": "pnpm build && npm pack --pack-destination dist"
|
|
38
39
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@volorio/core": "^0.2.0",
|
|
42
|
+
"@volorio/rtc": "^0.2.0",
|
|
43
|
+
"@volorio/server": "^0.2.0"
|
|
41
44
|
},
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
"homepage": "https://volor.io/docs/packages/npm-overview",
|
|
46
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
47
|
+
"keywords": [
|
|
48
|
+
"volorio",
|
|
49
|
+
"realtime",
|
|
50
|
+
"rtc",
|
|
51
|
+
"sdk",
|
|
52
|
+
"chat",
|
|
53
|
+
"usage",
|
|
54
|
+
"billing",
|
|
55
|
+
"media",
|
|
56
|
+
"services",
|
|
57
|
+
"node",
|
|
58
|
+
"browsers"
|
|
59
|
+
]
|
|
47
60
|
}
|