@izzai/n8n-nodes-izzone 0.0.20 → 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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LlmBehavior = exports.LlmBehaviorEnum = void 0;
4
- // Copy from apps/nexus-api/src/customTypes/chat.ts
4
+ // Copy from apps/one-api/src/customTypes/chat.ts
5
5
  var LlmBehaviorEnum;
6
6
  (function (LlmBehaviorEnum) {
7
7
  LlmBehaviorEnum["CONVERSATIONAL"] = "conversational";
@@ -1 +1 @@
1
- export declare const BASE_URL = "https://api.nexus.izz.ai";
1
+ export declare const BASE_URL = "https://api.one.izz.ai";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BASE_URL = void 0;
4
- exports.BASE_URL = 'https://api.nexus.izz.ai';
4
+ exports.BASE_URL = 'https://api.one.izz.ai';
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IzzOne = void 0;
4
+ const constants_1 = require("../constants");
4
5
  class IzzOne {
5
6
  name = 'IzzOneApi';
6
7
  displayName = 'izz.ONE API';
7
8
  icon = 'file:izz-one.png';
8
- documentationUrl = 'https://api.nexus.izz.ai/docs'; // TODO: Update URL later
9
+ documentationUrl = 'https://api.one.izz.ai/docs'; // TODO: Update URL later
9
10
  properties = [
10
11
  {
11
12
  displayName: 'Email ID',
@@ -34,6 +35,15 @@ class IzzOne {
34
35
  placeholder: 'Enter your instance ID',
35
36
  description: 'The unique identifier for your izz.ONE instance',
36
37
  },
38
+ {
39
+ displayName: 'API Base URL',
40
+ name: 'baseUrl',
41
+ type: 'string',
42
+ default: constants_1.BASE_URL,
43
+ placeholder: constants_1.BASE_URL,
44
+ description: `The base URL for the izz.ONE API. Default is ${constants_1.BASE_URL}.`,
45
+ hint: 'You can change this if you are using an enterprise version of izz.ONE',
46
+ },
37
47
  ];
38
48
  }
39
49
  exports.IzzOne = IzzOne;
@@ -182,7 +182,7 @@ class IzzOne {
182
182
  body: requestBody,
183
183
  url: new URL(
184
184
  // /v1/chat or /v1/chat/stream
185
- ['/v1/chat', streaming && 'stream'].filter(Boolean).join('/'), constants_1.BASE_URL).href,
185
+ ['/v1/chat', streaming && 'stream'].filter(Boolean).join('/'), (credentials.baseUrl || constants_1.BASE_URL)).href,
186
186
  json: true,
187
187
  };
188
188
  responseData = await this.helpers.httpRequest(requestOptions);
@@ -6,7 +6,7 @@
6
6
  "resources": {
7
7
  "primaryDocumentation": {
8
8
  "title": "Izz.ONE Documentation",
9
- "url": "https://api.nexus.izz.ai/docs"
9
+ "url": "https://api.one.izz.ai/docs"
10
10
  }
11
11
  }
12
12
  }
@@ -8,7 +8,7 @@ const generic_1 = require("./generic");
8
8
  async function getLlms() {
9
9
  const credentials = await this.getCredentials('IzzOneApi');
10
10
  const path = '/v1/model/available-models';
11
- const url = new URL(path, constants_1.BASE_URL);
11
+ const url = new URL(path, (credentials.baseUrl || constants_1.BASE_URL));
12
12
  url.searchParams.append('limit', Number.MAX_SAFE_INTEGER.toString());
13
13
  const response = await this.helpers.httpRequest({
14
14
  method: 'GET',
@@ -29,7 +29,7 @@ async function getLlms() {
29
29
  async function getAgents() {
30
30
  const credentials = await this.getCredentials('IzzOneApi');
31
31
  const path = '/v1/agent';
32
- const url = new URL(path, constants_1.BASE_URL);
32
+ const url = new URL(path, (credentials.baseUrl || constants_1.BASE_URL));
33
33
  url.searchParams.append('limit', Number.MAX_SAFE_INTEGER.toString());
34
34
  const response = await this.helpers.httpRequest({
35
35
  method: 'GET',
@@ -50,7 +50,7 @@ async function getAgents() {
50
50
  async function getDatasources() {
51
51
  const credentials = await this.getCredentials('IzzOneApi');
52
52
  const path = '/v1/datasource';
53
- const url = new URL(path, constants_1.BASE_URL);
53
+ const url = new URL(path, (credentials.baseUrl || constants_1.BASE_URL));
54
54
  url.searchParams.append('limit', Number.MAX_SAFE_INTEGER.toString());
55
55
  const response = await this.helpers.httpRequest({
56
56
  method: 'GET',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izzai/n8n-nodes-izzone",
3
- "version": "0.0.20",
3
+ "version": "0.1.2",
4
4
  "description": "n8n custom node for izz.ONE",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@eslint/js": "*",
62
- "@izzai/nexus-api": "workspace:*",
62
+ "@izzai/one-api": "workspace:*",
63
63
  "@izzai/tsconfig": "workspace:*",
64
64
  "@tsconfig/node22": "^22.0.0",
65
65
  "@types/eslint": "*",