@camstack/addon-cloudflare-turn 0.1.6 → 0.1.9

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.
@@ -0,0 +1,34 @@
1
+ import { IScopedLogger, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
2
+
3
+ interface CloudflareTurnConfig {
4
+ readonly apiToken: string;
5
+ readonly accountId: string;
6
+ }
7
+ interface TurnCredentials {
8
+ readonly urls: readonly string[];
9
+ readonly username: string;
10
+ readonly credential: string;
11
+ readonly ttl: number;
12
+ }
13
+ declare class CloudflareTurnService {
14
+ private readonly config;
15
+ private readonly logger;
16
+ constructor(config: CloudflareTurnConfig, logger: IScopedLogger);
17
+ /** Get temporary TURN credentials from Cloudflare API */
18
+ getCredentials(): Promise<TurnCredentials>;
19
+ }
20
+
21
+ declare class CloudflareTurnAddon implements ICamstackAddon, IConfigurable {
22
+ readonly manifest: AddonManifest;
23
+ private service;
24
+ private currentConfig;
25
+ initialize(context: AddonContext): Promise<void>;
26
+ shutdown(): Promise<void>;
27
+ getService(): CloudflareTurnService;
28
+ getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
29
+ getConfigSchema(): ConfigUISchema;
30
+ getConfig(): Record<string, unknown>;
31
+ onConfigChange(config: Record<string, unknown>): Promise<void>;
32
+ }
33
+
34
+ export { type CloudflareTurnConfig as C, CloudflareTurnAddon, type TurnCredentials as T, CloudflareTurnService as a };
@@ -0,0 +1,34 @@
1
+ import { IScopedLogger, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
2
+
3
+ interface CloudflareTurnConfig {
4
+ readonly apiToken: string;
5
+ readonly accountId: string;
6
+ }
7
+ interface TurnCredentials {
8
+ readonly urls: readonly string[];
9
+ readonly username: string;
10
+ readonly credential: string;
11
+ readonly ttl: number;
12
+ }
13
+ declare class CloudflareTurnService {
14
+ private readonly config;
15
+ private readonly logger;
16
+ constructor(config: CloudflareTurnConfig, logger: IScopedLogger);
17
+ /** Get temporary TURN credentials from Cloudflare API */
18
+ getCredentials(): Promise<TurnCredentials>;
19
+ }
20
+
21
+ declare class CloudflareTurnAddon implements ICamstackAddon, IConfigurable {
22
+ readonly manifest: AddonManifest;
23
+ private service;
24
+ private currentConfig;
25
+ initialize(context: AddonContext): Promise<void>;
26
+ shutdown(): Promise<void>;
27
+ getService(): CloudflareTurnService;
28
+ getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
29
+ getConfigSchema(): ConfigUISchema;
30
+ getConfig(): Record<string, unknown>;
31
+ onConfigChange(config: Record<string, unknown>): Promise<void>;
32
+ }
33
+
34
+ export { type CloudflareTurnConfig as C, CloudflareTurnAddon, type TurnCredentials as T, CloudflareTurnService as a };
@@ -0,0 +1,2 @@
1
+ export { CloudflareTurnAddon, C as CloudflareTurnConfig, a as CloudflareTurnService, T as TurnCredentials } from './cloudflare-turn.addon.mjs';
2
+ import '@camstack/types';
@@ -0,0 +1,2 @@
1
+ export { CloudflareTurnAddon, C as CloudflareTurnConfig, a as CloudflareTurnService, T as TurnCredentials } from './cloudflare-turn.addon.js';
2
+ import '@camstack/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-cloudflare-turn",
3
- "version": "0.1.6",
3
+ "version": "0.1.9",
4
4
  "description": "Cloudflare TURN relay addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",
@@ -21,9 +21,9 @@
21
21
  "types": "./dist/index.d.ts",
22
22
  "exports": {
23
23
  ".": {
24
+ "types": "./dist/index.d.ts",
24
25
  "import": "./dist/index.mjs",
25
- "require": "./dist/index.js",
26
- "types": "./dist/index.d.ts"
26
+ "require": "./dist/index.js"
27
27
  },
28
28
  "./package.json": "./package.json"
29
29
  },