@super_studio/ecforce-ai-agent-server 0.1.1 → 0.1.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.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/sdk/index.ts +4 -3
package/dist/index.js
CHANGED
|
@@ -458,7 +458,7 @@ var Api = class extends HttpClient {
|
|
|
458
458
|
// src/sdk/index.ts
|
|
459
459
|
function createClient(params) {
|
|
460
460
|
var _a, _b, _c;
|
|
461
|
-
const baseUrl = (_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT
|
|
461
|
+
const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
|
|
462
462
|
const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
|
|
463
463
|
if (!apiKey) {
|
|
464
464
|
throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
|
package/dist/index.mjs
CHANGED
|
@@ -458,7 +458,7 @@ var Api = class extends HttpClient {
|
|
|
458
458
|
// src/sdk/index.ts
|
|
459
459
|
function createClient(params) {
|
|
460
460
|
var _a, _b, _c;
|
|
461
|
-
const baseUrl = (_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT
|
|
461
|
+
const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
|
|
462
462
|
const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
|
|
463
463
|
if (!apiKey) {
|
|
464
464
|
throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export type CreateClientParams = {
|
|
|
14
14
|
*/
|
|
15
15
|
baseUrl?: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type AgentApi = Api<unknown>;
|
|
18
|
+
export declare function createClient(params?: CreateClientParams): AgentApi;
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;AAE7B,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,QAAQ,CAwBlE"}
|
package/package.json
CHANGED
package/src/sdk/index.ts
CHANGED
|
@@ -18,9 +18,10 @@ export type CreateClientParams = {
|
|
|
18
18
|
baseUrl?: string;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
type AgentApi = Api<unknown>;
|
|
22
|
+
|
|
23
|
+
export function createClient(params?: CreateClientParams): AgentApi {
|
|
24
|
+
const baseUrl = `${params?.baseUrl ?? process.env.AI_AGENT_API_ENDPOINT ?? API_ENDPOINT}/api`;
|
|
24
25
|
const apiKey = params?.apiKey ?? process.env.AI_AGENT_API_KEY;
|
|
25
26
|
|
|
26
27
|
if (!apiKey) {
|