@fishjam-cloud/js-server-sdk 0.25.1 → 0.25.2

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.
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  // package.json
34
34
  var package_default = {
35
35
  name: "@fishjam-cloud/js-server-sdk",
36
- version: "0.25.1",
36
+ version: "0.25.2",
37
37
  description: "Fishjam server SDK for JavaScript",
38
38
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
39
39
  author: "Fishjam Team",
@@ -57,8 +57,16 @@ var package_default = {
57
57
  "dist"
58
58
  ],
59
59
  exports: {
60
- ".": "./dist/index.js",
61
- "./gemini": "./dist/integrations/gemini.js"
60
+ ".": {
61
+ types: "./dist/index.d.ts",
62
+ import: "./dist/index.mjs",
63
+ require: "./dist/index.js"
64
+ },
65
+ "./gemini": {
66
+ types: "./dist/integrations/gemini.d.ts",
67
+ import: "./dist/integrations/gemini.mjs",
68
+ require: "./dist/integrations/gemini.js"
69
+ }
62
70
  },
63
71
  scripts: {
64
72
  build: "tsup --dts-resolve",
@@ -110,7 +118,7 @@ var package_default = {
110
118
  },
111
119
  "lint-staged": {
112
120
  "*.{js,ts,tsx,mjs,cjs}": [
113
- "eslint --fix --config packages/js-server-sdk/eslint.config.mjs"
121
+ "eslint --fix --config eslint.config.mjs"
114
122
  ]
115
123
  }
116
124
  };
package/dist/index.js CHANGED
@@ -20083,7 +20083,7 @@ var mapException = (error, entity) => {
20083
20083
  // package.json
20084
20084
  var package_default = {
20085
20085
  name: "@fishjam-cloud/js-server-sdk",
20086
- version: "0.25.1",
20086
+ version: "0.25.2",
20087
20087
  description: "Fishjam server SDK for JavaScript",
20088
20088
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
20089
20089
  author: "Fishjam Team",
@@ -20107,8 +20107,16 @@ var package_default = {
20107
20107
  "dist"
20108
20108
  ],
20109
20109
  exports: {
20110
- ".": "./dist/index.js",
20111
- "./gemini": "./dist/integrations/gemini.js"
20110
+ ".": {
20111
+ types: "./dist/index.d.ts",
20112
+ import: "./dist/index.mjs",
20113
+ require: "./dist/index.js"
20114
+ },
20115
+ "./gemini": {
20116
+ types: "./dist/integrations/gemini.d.ts",
20117
+ import: "./dist/integrations/gemini.mjs",
20118
+ require: "./dist/integrations/gemini.js"
20119
+ }
20112
20120
  },
20113
20121
  scripts: {
20114
20122
  build: "tsup --dts-resolve",
@@ -20160,7 +20168,7 @@ var package_default = {
20160
20168
  },
20161
20169
  "lint-staged": {
20162
20170
  "*.{js,ts,tsx,mjs,cjs}": [
20163
- "eslint --fix --config packages/js-server-sdk/eslint.config.mjs"
20171
+ "eslint --fix --config eslint.config.mjs"
20164
20172
  ]
20165
20173
  }
20166
20174
  };
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  package_default
6
- } from "./chunk-LWFSVLXM.mjs";
6
+ } from "./chunk-ZXWNCWEY.mjs";
7
7
 
8
8
  // ../fishjam-openapi/dist/index.js
9
9
  var require_dist = __commonJS({
@@ -1,39 +1,34 @@
1
1
  import { GoogleGenAIOptions, GoogleGenAI } from '@google/genai';
2
2
 
3
3
  /**
4
- * A collection of settings for Google Gemini integration.
4
+ * Creates a GoogleGenAI client.
5
+ * This function dynamically loads the "@google/genai" module,
6
+ * so it will only be loaded when this function is called.
7
+ *
8
+ * @param options Configuration for the GoogleGenAI client.
9
+ * @returns A GoogleGenAI instance.
5
10
  */
6
- declare const _default: {
7
- /**
8
- * Creates a GoogleGenAI client.
9
- * This function dynamically imports the "@google/genai" module,
10
- * so it will only be loaded when this function is called.
11
- *
12
- * @param options Configuration for the GoogleGenAI client.
13
- * @returns A GoogleGenAI instance.
14
- */
15
- createClient: (options: GoogleGenAIOptions) => GoogleGenAI;
16
- /**
17
- * Predefined audio settings for the agent's output track,
18
- * configured for Gemini's 24kHz audio output.
19
- */
20
- geminiOutputAudioSettings: {
21
- readonly encoding: "pcm16";
22
- readonly channels: 1;
23
- readonly sampleRate: 24000;
24
- };
25
- /**
26
- * Predefined audio settings for subscribing to room audio,
27
- * configured for Gemini's 16kHz audio input.
28
- */
29
- geminiInputAudioSettings: {
30
- readonly audioFormat: "pcm16";
31
- readonly audioSampleRate: 16000;
32
- };
33
- /**
34
- * The MIME type for the audio data sent to Gemini.
35
- */
36
- inputMimeType: "audio/pcm;rate=16000";
11
+ declare const createClient: (options: GoogleGenAIOptions) => GoogleGenAI;
12
+ /**
13
+ * Predefined audio settings for the agent's output track,
14
+ * configured for Gemini's 24kHz audio output.
15
+ */
16
+ declare const geminiOutputAudioSettings: {
17
+ readonly encoding: "pcm16";
18
+ readonly channels: 1;
19
+ readonly sampleRate: 24000;
37
20
  };
21
+ /**
22
+ * Predefined audio settings for subscribing to room audio,
23
+ * configured for Gemini's 16kHz audio input.
24
+ */
25
+ declare const geminiInputAudioSettings: {
26
+ readonly audioFormat: "pcm16";
27
+ readonly audioSampleRate: 16000;
28
+ };
29
+ /**
30
+ * The MIME type for the audio data sent to Gemini.
31
+ */
32
+ declare const inputMimeType: "audio/pcm;rate=16000";
38
33
 
39
- export { _default as default };
34
+ export { createClient, geminiInputAudioSettings, geminiOutputAudioSettings, inputMimeType };
@@ -1,39 +1,34 @@
1
1
  import { GoogleGenAIOptions, GoogleGenAI } from '@google/genai';
2
2
 
3
3
  /**
4
- * A collection of settings for Google Gemini integration.
4
+ * Creates a GoogleGenAI client.
5
+ * This function dynamically loads the "@google/genai" module,
6
+ * so it will only be loaded when this function is called.
7
+ *
8
+ * @param options Configuration for the GoogleGenAI client.
9
+ * @returns A GoogleGenAI instance.
5
10
  */
6
- declare const _default: {
7
- /**
8
- * Creates a GoogleGenAI client.
9
- * This function dynamically imports the "@google/genai" module,
10
- * so it will only be loaded when this function is called.
11
- *
12
- * @param options Configuration for the GoogleGenAI client.
13
- * @returns A GoogleGenAI instance.
14
- */
15
- createClient: (options: GoogleGenAIOptions) => GoogleGenAI;
16
- /**
17
- * Predefined audio settings for the agent's output track,
18
- * configured for Gemini's 24kHz audio output.
19
- */
20
- geminiOutputAudioSettings: {
21
- readonly encoding: "pcm16";
22
- readonly channels: 1;
23
- readonly sampleRate: 24000;
24
- };
25
- /**
26
- * Predefined audio settings for subscribing to room audio,
27
- * configured for Gemini's 16kHz audio input.
28
- */
29
- geminiInputAudioSettings: {
30
- readonly audioFormat: "pcm16";
31
- readonly audioSampleRate: 16000;
32
- };
33
- /**
34
- * The MIME type for the audio data sent to Gemini.
35
- */
36
- inputMimeType: "audio/pcm;rate=16000";
11
+ declare const createClient: (options: GoogleGenAIOptions) => GoogleGenAI;
12
+ /**
13
+ * Predefined audio settings for the agent's output track,
14
+ * configured for Gemini's 24kHz audio output.
15
+ */
16
+ declare const geminiOutputAudioSettings: {
17
+ readonly encoding: "pcm16";
18
+ readonly channels: 1;
19
+ readonly sampleRate: 24000;
37
20
  };
21
+ /**
22
+ * Predefined audio settings for subscribing to room audio,
23
+ * configured for Gemini's 16kHz audio input.
24
+ */
25
+ declare const geminiInputAudioSettings: {
26
+ readonly audioFormat: "pcm16";
27
+ readonly audioSampleRate: 16000;
28
+ };
29
+ /**
30
+ * The MIME type for the audio data sent to Gemini.
31
+ */
32
+ declare const inputMimeType: "audio/pcm;rate=16000";
38
33
 
39
- export { _default as default };
34
+ export { createClient, geminiInputAudioSettings, geminiOutputAudioSettings, inputMimeType };
@@ -20,14 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/integrations/gemini.ts
21
21
  var gemini_exports = {};
22
22
  __export(gemini_exports, {
23
- default: () => gemini_default
23
+ createClient: () => createClient,
24
+ geminiInputAudioSettings: () => geminiInputAudioSettings,
25
+ geminiOutputAudioSettings: () => geminiOutputAudioSettings,
26
+ inputMimeType: () => inputMimeType
24
27
  });
25
28
  module.exports = __toCommonJS(gemini_exports);
26
29
 
27
30
  // package.json
28
31
  var package_default = {
29
32
  name: "@fishjam-cloud/js-server-sdk",
30
- version: "0.25.1",
33
+ version: "0.25.2",
31
34
  description: "Fishjam server SDK for JavaScript",
32
35
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
33
36
  author: "Fishjam Team",
@@ -51,8 +54,16 @@ var package_default = {
51
54
  "dist"
52
55
  ],
53
56
  exports: {
54
- ".": "./dist/index.js",
55
- "./gemini": "./dist/integrations/gemini.js"
57
+ ".": {
58
+ types: "./dist/index.d.ts",
59
+ import: "./dist/index.mjs",
60
+ require: "./dist/index.js"
61
+ },
62
+ "./gemini": {
63
+ types: "./dist/integrations/gemini.d.ts",
64
+ import: "./dist/integrations/gemini.mjs",
65
+ require: "./dist/integrations/gemini.js"
66
+ }
56
67
  },
57
68
  scripts: {
58
69
  build: "tsup --dts-resolve",
@@ -104,56 +115,42 @@ var package_default = {
104
115
  },
105
116
  "lint-staged": {
106
117
  "*.{js,ts,tsx,mjs,cjs}": [
107
- "eslint --fix --config packages/js-server-sdk/eslint.config.mjs"
118
+ "eslint --fix --config eslint.config.mjs"
108
119
  ]
109
120
  }
110
121
  };
111
122
 
112
123
  // src/integrations/gemini.ts
113
124
  var SDK_NAME = "fishjam-js-server-sdk";
114
- var gemini_default = {
115
- /**
116
- * Creates a GoogleGenAI client.
117
- * This function dynamically imports the "@google/genai" module,
118
- * so it will only be loaded when this function is called.
119
- *
120
- * @param options Configuration for the GoogleGenAI client.
121
- * @returns A GoogleGenAI instance.
122
- */
123
- createClient: (options) => {
124
- const { GoogleGenAI } = require("@google/genai");
125
- const trackingHeader = { "X-Goog-Api-Client": `${SDK_NAME}/${package_default.version}` };
126
- const finalOptions = {
127
- ...options,
128
- httpOptions: {
129
- ...options.httpOptions,
130
- headers: {
131
- ...options.httpOptions?.headers,
132
- ...trackingHeader
133
- }
125
+ var createClient = (options) => {
126
+ const { GoogleGenAI } = require("@google/genai");
127
+ const trackingHeader = { "X-Goog-Api-Client": `${SDK_NAME}/${package_default.version}` };
128
+ const finalOptions = {
129
+ ...options,
130
+ httpOptions: {
131
+ ...options.httpOptions,
132
+ headers: {
133
+ ...options.httpOptions?.headers,
134
+ ...trackingHeader
134
135
  }
135
- };
136
- return new GoogleGenAI(finalOptions);
137
- },
138
- /**
139
- * Predefined audio settings for the agent's output track,
140
- * configured for Gemini's 24kHz audio output.
141
- */
142
- geminiOutputAudioSettings: {
143
- encoding: "pcm16",
144
- channels: 1,
145
- sampleRate: 24e3
146
- },
147
- /**
148
- * Predefined audio settings for subscribing to room audio,
149
- * configured for Gemini's 16kHz audio input.
150
- */
151
- geminiInputAudioSettings: {
152
- audioFormat: "pcm16",
153
- audioSampleRate: 16e3
154
- },
155
- /**
156
- * The MIME type for the audio data sent to Gemini.
157
- */
158
- inputMimeType: "audio/pcm;rate=16000"
136
+ }
137
+ };
138
+ return new GoogleGenAI(finalOptions);
139
+ };
140
+ var geminiOutputAudioSettings = {
141
+ encoding: "pcm16",
142
+ channels: 1,
143
+ sampleRate: 24e3
159
144
  };
145
+ var geminiInputAudioSettings = {
146
+ audioFormat: "pcm16",
147
+ audioSampleRate: 16e3
148
+ };
149
+ var inputMimeType = "audio/pcm;rate=16000";
150
+ // Annotate the CommonJS export names for ESM import in node:
151
+ 0 && (module.exports = {
152
+ createClient,
153
+ geminiInputAudioSettings,
154
+ geminiOutputAudioSettings,
155
+ inputMimeType
156
+ });
@@ -1,56 +1,38 @@
1
1
  import {
2
2
  __require,
3
3
  package_default
4
- } from "../chunk-LWFSVLXM.mjs";
4
+ } from "../chunk-ZXWNCWEY.mjs";
5
5
 
6
6
  // src/integrations/gemini.ts
7
7
  var SDK_NAME = "fishjam-js-server-sdk";
8
- var gemini_default = {
9
- /**
10
- * Creates a GoogleGenAI client.
11
- * This function dynamically imports the "@google/genai" module,
12
- * so it will only be loaded when this function is called.
13
- *
14
- * @param options Configuration for the GoogleGenAI client.
15
- * @returns A GoogleGenAI instance.
16
- */
17
- createClient: (options) => {
18
- const { GoogleGenAI } = __require("@google/genai");
19
- const trackingHeader = { "X-Goog-Api-Client": `${SDK_NAME}/${package_default.version}` };
20
- const finalOptions = {
21
- ...options,
22
- httpOptions: {
23
- ...options.httpOptions,
24
- headers: {
25
- ...options.httpOptions?.headers,
26
- ...trackingHeader
27
- }
8
+ var createClient = (options) => {
9
+ const { GoogleGenAI } = __require("@google/genai");
10
+ const trackingHeader = { "X-Goog-Api-Client": `${SDK_NAME}/${package_default.version}` };
11
+ const finalOptions = {
12
+ ...options,
13
+ httpOptions: {
14
+ ...options.httpOptions,
15
+ headers: {
16
+ ...options.httpOptions?.headers,
17
+ ...trackingHeader
28
18
  }
29
- };
30
- return new GoogleGenAI(finalOptions);
31
- },
32
- /**
33
- * Predefined audio settings for the agent's output track,
34
- * configured for Gemini's 24kHz audio output.
35
- */
36
- geminiOutputAudioSettings: {
37
- encoding: "pcm16",
38
- channels: 1,
39
- sampleRate: 24e3
40
- },
41
- /**
42
- * Predefined audio settings for subscribing to room audio,
43
- * configured for Gemini's 16kHz audio input.
44
- */
45
- geminiInputAudioSettings: {
46
- audioFormat: "pcm16",
47
- audioSampleRate: 16e3
48
- },
49
- /**
50
- * The MIME type for the audio data sent to Gemini.
51
- */
52
- inputMimeType: "audio/pcm;rate=16000"
19
+ }
20
+ };
21
+ return new GoogleGenAI(finalOptions);
53
22
  };
23
+ var geminiOutputAudioSettings = {
24
+ encoding: "pcm16",
25
+ channels: 1,
26
+ sampleRate: 24e3
27
+ };
28
+ var geminiInputAudioSettings = {
29
+ audioFormat: "pcm16",
30
+ audioSampleRate: 16e3
31
+ };
32
+ var inputMimeType = "audio/pcm;rate=16000";
54
33
  export {
55
- gemini_default as default
34
+ createClient,
35
+ geminiInputAudioSettings,
36
+ geminiOutputAudioSettings,
37
+ inputMimeType
56
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishjam-cloud/js-server-sdk",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "Fishjam server SDK for JavaScript",
5
5
  "homepage": "https://github.com/fishjam-cloud/js-server-sdk",
6
6
  "author": "Fishjam Team",
@@ -24,8 +24,16 @@
24
24
  "dist"
25
25
  ],
26
26
  "exports": {
27
- ".": "./dist/index.js",
28
- "./gemini": "./dist/integrations/gemini.js"
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.mjs",
30
+ "require": "./dist/index.js"
31
+ },
32
+ "./gemini": {
33
+ "types": "./dist/integrations/gemini.d.ts",
34
+ "import": "./dist/integrations/gemini.mjs",
35
+ "require": "./dist/integrations/gemini.js"
36
+ }
29
37
  },
30
38
  "scripts": {
31
39
  "build": "tsup --dts-resolve",
@@ -77,7 +85,7 @@
77
85
  },
78
86
  "lint-staged": {
79
87
  "*.{js,ts,tsx,mjs,cjs}": [
80
- "eslint --fix --config packages/js-server-sdk/eslint.config.mjs"
88
+ "eslint --fix --config eslint.config.mjs"
81
89
  ]
82
90
  }
83
91
  }