@d-id/client-sdk 1.0.19-beta.9 → 1.0.19-beta.91

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 (37) hide show
  1. package/README.md +4 -0
  2. package/dist/index.js +647 -401
  3. package/dist/index.umd.cjs +1 -1
  4. package/dist/src/{lib/api → api}/agents.d.ts +5 -2
  5. package/dist/src/api/clipStream.d.ts +2 -0
  6. package/dist/src/{lib/api → api}/getClient.d.ts +2 -2
  7. package/dist/src/{lib/api → api}/knowledge.d.ts +3 -2
  8. package/dist/src/api/talkStream.d.ts +2 -0
  9. package/dist/src/auth/getAuthHeader.d.ts +4 -0
  10. package/dist/src/connectToSocket.d.ts +11 -0
  11. package/dist/src/{lib/createAgentManager.d.ts → createAgentManager.d.ts} +4 -5
  12. package/dist/src/createStreamingManager.d.ts +21 -0
  13. package/dist/src/{lib/environment.d.ts → environment.d.ts} +0 -1
  14. package/dist/src/index.d.ts +2 -8
  15. package/dist/src/services/mixpanel.d.ts +18 -0
  16. package/dist/src/types/StreamScript.d.ts +1 -1
  17. package/dist/src/types/auth.d.ts +0 -2
  18. package/dist/src/types/entities/agents/agent.d.ts +24 -1
  19. package/dist/src/types/entities/agents/chat.d.ts +13 -6
  20. package/dist/src/types/entities/agents/knowledge.d.ts +1 -0
  21. package/dist/src/types/entities/agents/manager.d.ts +56 -24
  22. package/dist/src/types/entities/agents/presenter.d.ts +3 -0
  23. package/dist/src/types/face-rect.d.ts +6 -0
  24. package/dist/src/types/index.d.ts +2 -3
  25. package/dist/src/types/stream/api/clip.d.ts +6 -0
  26. package/dist/src/types/stream/api/talk.d.ts +4 -0
  27. package/dist/src/types/stream/rtc.d.ts +3 -3
  28. package/dist/src/types/stream/stream.d.ts +21 -4
  29. package/dist/src/utils/analytics.d.ts +12 -0
  30. package/dist/src/{lib/utils → utils}/webrtc.d.ts +1 -1
  31. package/package.json +10 -11
  32. package/dist/src/lib/api/clipStream.d.ts +0 -2
  33. package/dist/src/lib/api/ratings.d.ts +0 -7
  34. package/dist/src/lib/api/talkStream.d.ts +0 -2
  35. package/dist/src/lib/auth/getAuthHeader.d.ts +0 -2
  36. package/dist/src/lib/connectToSocket.d.ts +0 -9
  37. package/dist/src/lib/createStreamingManager.d.ts +0 -27
@@ -0,0 +1,12 @@
1
+ import { Agent } from '../types/index';
2
+ export declare function getAnaliticsInfo(agent: Agent): {
3
+ $os: string;
4
+ isMobile: string;
5
+ browser: string;
6
+ origin: string;
7
+ agentType: "talk" | "clip";
8
+ agentVoice: {
9
+ voiceId: string | undefined;
10
+ provider: import('../types/tts').Providers | undefined;
11
+ };
12
+ };
@@ -1,2 +1,2 @@
1
- import { SlimRTCStatsReport } from "../../types";
1
+ import { SlimRTCStatsReport } from '../types';
2
2
  export declare function createVideoStatsReport(stats: SlimRTCStatsReport[], previousStats?: SlimRTCStatsReport): SlimRTCStatsReport[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d-id/client-sdk",
3
3
  "private": false,
4
- "version": "1.0.19-beta.9",
4
+ "version": "1.0.19-beta.91",
5
5
  "type": "module",
6
6
  "description": "d-id client sdk",
7
7
  "repository": {
@@ -20,29 +20,28 @@
20
20
  ],
21
21
  "main": "./dist/index.umd.cjs",
22
22
  "module": "./dist/index.js",
23
- "types": "./dist/src/types/index.d.ts",
23
+ "types": "./dist/src/index.d.ts",
24
24
  "scripts": {
25
25
  "dev": "vite",
26
26
  "build": "node ./infra/build.js -m production",
27
27
  "build:dev": "node ./infra/build.js -m development",
28
- "deploy:prod": "node ./infra/deploy.js --version patch",
28
+ "deploy:prod": "node ./infra/deploy.js --version beta",
29
29
  "preview": "vite preview",
30
30
  "test-build": "node .infra/build.js -m development",
31
31
  "build:docs": "typedoc"
32
32
  },
33
33
  "devDependencies": {
34
- "@preact/preset-vite": "^2.5.0",
34
+ "@preact/preset-vite": "^2.8.1",
35
35
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
36
+ "@types/node": "^20.11.24",
36
37
  "commander": "^11.1.0",
37
38
  "glob": "^10.3.10",
38
- "preact": "^10.5.13",
39
- "prettier": "^3.1.0",
39
+ "preact": "^10.19.6",
40
+ "prettier": "^3.2.5",
40
41
  "prettier-plugin-organize-imports": "^3.2.4",
41
- "serverless": "3.32.2",
42
42
  "typedoc": "^0.25.7",
43
- "typescript": "^5.3.2",
44
- "vite": "^4.4.5",
45
- "vite-plugin-dts": "^3.6.0",
46
- "vite-plugin-html-env": "^1.2.8"
43
+ "typescript": "^5.3.3",
44
+ "vite": "^5.1.4",
45
+ "vite-plugin-dts": "^3.7.3"
47
46
  }
48
47
  }
@@ -1,2 +0,0 @@
1
- import { Auth, RtcApi } from '../../types/index';
2
- export declare function createApi(auth: Auth, host: string): RtcApi;
@@ -1,7 +0,0 @@
1
- import { Auth, RatingEntity, RatingPayload } from '../../index';
2
- export declare function createRatingsApi(auth: Auth, host?: string): {
3
- create(payload: RatingPayload, options?: RequestInit): Promise<RatingEntity>;
4
- getByKnowledge(knowledgeId?: string, options?: RequestInit): Promise<RatingEntity[]>;
5
- update(id: string, payload: Partial<RatingPayload>, options?: RequestInit): Promise<RatingEntity>;
6
- delete(id: string, options?: RequestInit): Promise<RatingEntity>;
7
- };
@@ -1,2 +0,0 @@
1
- import { Auth, RtcApi } from '../../types/index';
2
- export declare function createApi(auth: Auth, host: string): RtcApi;
@@ -1,2 +0,0 @@
1
- import { Auth } from '../../types/auth';
2
- export declare function getAuthHeader(auth: Auth): string;
@@ -1,9 +0,0 @@
1
- import { Auth } from '../types/auth';
2
- import { ChatProgressCallback } from '..';
3
- interface SocketManager {
4
- socket?: WebSocket;
5
- terminate: () => void;
6
- subscribeToEvents: (data: any) => void;
7
- }
8
- export declare function SocketManager(auth: Auth, host: string, onMessage?: ChatProgressCallback): Promise<SocketManager>;
9
- export {};
@@ -1,27 +0,0 @@
1
- import { CreateStreamOptions, ManagerCallbacks, PayloadType, StreamingManagerOptions } from '../types/index';
2
- export declare function createStreamingManager<T extends CreateStreamOptions>(agent: T, { debug, callbacks, auth, baseURL }: StreamingManagerOptions): Promise<{
3
- /**
4
- * Method to send request to server to get clip or talk depend on you payload
5
- * @param payload
6
- */
7
- speak(payload: PayloadType<T>): Promise<import('../types/index').SendStreamPayloadResponse>;
8
- /**
9
- * Method to close RTC connection
10
- */
11
- terminate(): Promise<void>;
12
- /**
13
- * Session identifier information, should be returned in the body of all streaming requests
14
- */
15
- sessionId: string;
16
- /**
17
- * Id of current RTC stream
18
- */
19
- streamId: string;
20
- /**
21
- * Method to add callback that will be trigered on supported events
22
- * @param eventName
23
- * @param callback
24
- */
25
- onCallback<T_1 extends keyof ManagerCallbacks>(eventName: T_1, callback: ManagerCallbacks[T_1]): void;
26
- }>;
27
- export type StreamingManager<T extends CreateStreamOptions> = Awaited<ReturnType<typeof createStreamingManager<T>>>;