@jokio/sdk 0.1.10 → 0.1.12
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/auth.service.d.ts +25 -0
- package/dist/common/playAudioFromBuffer.d.ts +1 -0
- package/dist/crypto.service.d.ts +9 -0
- package/dist/index.d.ts +19 -0
- package/dist/jokio.sdk.es.js +8534 -0
- package/dist/nats.service.d.ts +45 -0
- package/dist/tts.service.d.ts +13 -0
- package/dist/voicevoxTts.d.ts +11 -0
- package/package.json +7 -3
- package/.prettierrc +0 -12
- package/package-lock.json +0 -1062
- package/src/auth.service.ts +0 -152
- package/src/common/playAudioFromBuffer.ts +0 -15
- package/src/crypto.service.ts +0 -100
- package/src/index.ts +0 -39
- package/src/nats.service.ts +0 -348
- package/src/tts.service.ts +0 -153
- package/src/voicevoxTts.ts +0 -94
- package/tsconfig.json +0 -14
- package/vite.config.ts +0 -23
- /package/{test → dist}/index.html +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Config = {
|
|
2
|
+
authUrl: string;
|
|
3
|
+
};
|
|
4
|
+
export declare class AuthService {
|
|
5
|
+
private config;
|
|
6
|
+
constructor(config: Config);
|
|
7
|
+
requestEmailLogin(email: string, returnUrl?: string): Promise<boolean>;
|
|
8
|
+
completeEmailLogin(email: string, otpCode: string): Promise<IdentityUser>;
|
|
9
|
+
requestPasskeyLogin(opts?: {
|
|
10
|
+
displayName?: string;
|
|
11
|
+
isRegistration?: boolean;
|
|
12
|
+
addAsAdditionalDevice?: boolean;
|
|
13
|
+
}): Promise<IdentityUser>;
|
|
14
|
+
guestLogin(): Promise<IdentityUser>;
|
|
15
|
+
clearLoginData(): Promise<void>;
|
|
16
|
+
getLastLoginData(): any;
|
|
17
|
+
}
|
|
18
|
+
export type IdentityUser = {
|
|
19
|
+
name: string;
|
|
20
|
+
email: string;
|
|
21
|
+
userId: string;
|
|
22
|
+
sessionId: string;
|
|
23
|
+
verified: boolean;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function playAudioFromBuffer(buffer: ArrayBuffer): HTMLAudioElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class CryptoService {
|
|
2
|
+
createSessionKeyPair(): Promise<CryptoKeyPair>;
|
|
3
|
+
exportPublicKey(publicKey: CryptoKey): Promise<string>;
|
|
4
|
+
deriveAESKey(privateKey: CryptoKey, publicKeyString: string): Promise<CryptoKey>;
|
|
5
|
+
exportRawKey(key: CryptoKey): Promise<string>;
|
|
6
|
+
encrypt(text: string, key: CryptoKey): Promise<string>;
|
|
7
|
+
decrypt(encryptedText: string, key: CryptoKey): Promise<string>;
|
|
8
|
+
hashString(text: string): Promise<string>;
|
|
9
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AuthService } from './auth.service';
|
|
2
|
+
import { CryptoService } from './crypto.service';
|
|
3
|
+
import { NatsService } from './nats.service';
|
|
4
|
+
import { EdgeTtsService } from './tts.service';
|
|
5
|
+
export { type IdentityUser } from './auth.service';
|
|
6
|
+
export { NatsService } from './nats.service';
|
|
7
|
+
export { VoicevoxTtsService } from './voicevoxTts';
|
|
8
|
+
type Config = {
|
|
9
|
+
debug: boolean;
|
|
10
|
+
authUrl: string;
|
|
11
|
+
natsUrl: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const jok: {
|
|
14
|
+
setup(config: Partial<Config>): void;
|
|
15
|
+
auth: AuthService;
|
|
16
|
+
tts: EdgeTtsService;
|
|
17
|
+
nats: NatsService<unknown>;
|
|
18
|
+
crypto: CryptoService;
|
|
19
|
+
};
|