triangle-utils 1.4.75 → 1.4.76

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.
@@ -5,6 +5,7 @@ export declare class ApplicationConfig {
5
5
  readonly client_dev_url: string;
6
6
  readonly api_url: string;
7
7
  readonly api_dev_url: string;
8
+ readonly anthropic_api_key?: string;
8
9
  readonly [x: string]: any;
9
10
  constructor(application_config: ApplicationConfig);
10
11
  static is(application_config: any): application_config is ApplicationConfig;
@@ -5,6 +5,7 @@ export class ApplicationConfig {
5
5
  client_dev_url;
6
6
  api_url;
7
7
  api_dev_url;
8
+ anthropic_api_key;
8
9
  constructor(application_config) {
9
10
  if (!ApplicationConfig.is(application_config)) {
10
11
  throw Error("Invalid input.");
@@ -15,6 +16,7 @@ export class ApplicationConfig {
15
16
  this.client_dev_url = application_config.client_dev_url;
16
17
  this.api_url = application_config.api_url;
17
18
  this.api_dev_url = application_config.api_dev_url;
19
+ this.anthropic_api_key = application_config.anthropic_api_key;
18
20
  }
19
21
  static is(application_config) {
20
22
  return (application_config !== undefined &&
@@ -23,6 +25,7 @@ export class ApplicationConfig {
23
25
  typeof application_config.client_url === "string" &&
24
26
  typeof application_config.client_dev_url === "string" &&
25
27
  typeof application_config.api_url === "string" &&
26
- typeof application_config.api_dev_url === "string");
28
+ typeof application_config.api_dev_url === "string" &&
29
+ (application_config.anthropic_api_key === undefined || typeof application_config.anthropic_api_key === "string"));
27
30
  }
28
31
  }
@@ -12,7 +12,6 @@ export declare class GlobalConfig {
12
12
  readonly scraping_bee_api_key: string;
13
13
  readonly twitter_api_key: string;
14
14
  readonly youtube_api_key: string;
15
- readonly anthropic_api_key: string;
16
15
  readonly xai_api_key: string;
17
16
  readonly [x: string]: any;
18
17
  constructor(global_config: GlobalConfig);
@@ -12,7 +12,6 @@ export class GlobalConfig {
12
12
  scraping_bee_api_key;
13
13
  twitter_api_key;
14
14
  youtube_api_key;
15
- anthropic_api_key;
16
15
  xai_api_key;
17
16
  constructor(global_config) {
18
17
  if (!GlobalConfig.is(global_config)) {
@@ -31,7 +30,6 @@ export class GlobalConfig {
31
30
  this.scraping_bee_api_key = global_config.scraping_bee_api_key;
32
31
  this.twitter_api_key = global_config.twitter_api_key;
33
32
  this.youtube_api_key = global_config.youtube_api_key;
34
- this.anthropic_api_key = global_config.anthropic_api_key;
35
33
  this.xai_api_key = global_config.xai_api_key;
36
34
  }
37
35
  static is(global_config) {
@@ -49,7 +47,6 @@ export class GlobalConfig {
49
47
  typeof global_config.scraping_bee_api_key === "string" &&
50
48
  typeof global_config.twitter_api_key === "string" &&
51
49
  typeof global_config.youtube_api_key === "string" &&
52
- typeof global_config.anthropic_api_key === "string" &&
53
50
  typeof global_config.xai_api_key === "string");
54
51
  }
55
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.75",
3
+ "version": "1.4.76",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -6,6 +6,7 @@ export class ApplicationConfig {
6
6
  readonly client_dev_url : string
7
7
  readonly api_url : string
8
8
  readonly api_dev_url : string
9
+ readonly anthropic_api_key? : string
9
10
  readonly [x : string] : any
10
11
 
11
12
  constructor(application_config : ApplicationConfig) {
@@ -18,6 +19,7 @@ export class ApplicationConfig {
18
19
  this.client_dev_url = application_config.client_dev_url
19
20
  this.api_url = application_config.api_url
20
21
  this.api_dev_url = application_config.api_dev_url
22
+ this.anthropic_api_key = application_config.anthropic_api_key
21
23
  }
22
24
 
23
25
  static is(application_config : any) : application_config is ApplicationConfig {
@@ -28,7 +30,8 @@ export class ApplicationConfig {
28
30
  typeof application_config.client_url === "string" &&
29
31
  typeof application_config.client_dev_url === "string" &&
30
32
  typeof application_config.api_url === "string" &&
31
- typeof application_config.api_dev_url === "string"
33
+ typeof application_config.api_dev_url === "string" &&
34
+ (application_config.anthropic_api_key === undefined || typeof application_config.anthropic_api_key === "string")
32
35
  )
33
36
  }
34
37
  }
@@ -12,7 +12,6 @@ export class GlobalConfig {
12
12
  readonly scraping_bee_api_key : string
13
13
  readonly twitter_api_key : string
14
14
  readonly youtube_api_key : string
15
- readonly anthropic_api_key : string
16
15
  readonly xai_api_key : string
17
16
  readonly [x : string] : any
18
17
 
@@ -33,7 +32,6 @@ export class GlobalConfig {
33
32
  this.scraping_bee_api_key = global_config.scraping_bee_api_key
34
33
  this.twitter_api_key = global_config.twitter_api_key
35
34
  this.youtube_api_key = global_config.youtube_api_key
36
- this.anthropic_api_key = global_config.anthropic_api_key
37
35
  this.xai_api_key = global_config.xai_api_key
38
36
  }
39
37
 
@@ -53,7 +51,6 @@ export class GlobalConfig {
53
51
  typeof global_config.scraping_bee_api_key === "string" &&
54
52
  typeof global_config.twitter_api_key === "string" &&
55
53
  typeof global_config.youtube_api_key === "string" &&
56
- typeof global_config.anthropic_api_key === "string" &&
57
54
  typeof global_config.xai_api_key === "string"
58
55
  )
59
56
  }