triage-types 1.0.97 → 1.0.98

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,5 +1,3 @@
1
- export * from "./types/configs/ApplicationConfig.js";
2
- export * from "./types/configs/GlobalConfig.js";
3
1
  export * from "./types/APIError.js";
4
2
  export * from "./types/State.js";
5
3
  export * from "./types/federal_register/FederalRegisterAgency.js";
package/dist/src/index.js CHANGED
@@ -1,5 +1,3 @@
1
- export * from "./types/configs/ApplicationConfig.js";
2
- export * from "./types/configs/GlobalConfig.js";
3
1
  export * from "./types/APIError.js";
4
2
  export * from "./types/State.js";
5
3
  export * from "./types/federal_register/FederalRegisterAgency.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triage-types",
3
- "version": "1.0.97",
3
+ "version": "1.0.98",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/index.ts CHANGED
@@ -1,6 +1,3 @@
1
- export * from "./types/configs/ApplicationConfig"
2
- export * from "./types/configs/GlobalConfig"
3
-
4
1
  export * from "./types/APIError"
5
2
  export * from "./types/State"
6
3
 
@@ -1,43 +0,0 @@
1
-
2
- export class ApplicationConfig {
3
- readonly cognito_user_pool_id : string
4
- readonly cognito_client_id : string
5
- readonly cognito_client_secret : string
6
- readonly secret_key : string
7
- readonly client_url : string
8
- readonly client_dev_url : string
9
- readonly api_url : string
10
- readonly api_dev_url : string
11
- readonly auth_url : string
12
- readonly [x : string] : any
13
-
14
- constructor(application_config : ApplicationConfig) {
15
- if (!ApplicationConfig.is(application_config)) {
16
- throw Error("Invalid input.")
17
- }
18
- this.cognito_user_pool_id = application_config.cognito_user_pool_id
19
- this.cognito_client_id = application_config.cognito_client_id
20
- this.cognito_client_secret = application_config.cognito_client_secret
21
- this.secret_key = application_config.secret_key
22
- this.client_url = application_config.client_url
23
- this.client_dev_url = application_config.client_dev_url
24
- this.api_url = application_config.api_url
25
- this.api_dev_url = application_config.api_dev_url
26
- this.auth_url = application_config.auth_url
27
- }
28
-
29
- static is(application_config : any) : application_config is ApplicationConfig {
30
- return (
31
- application_config !== undefined &&
32
- typeof application_config.cognito_user_pool_id === "string" &&
33
- typeof application_config.cognito_client_id === "string" &&
34
- typeof application_config.cognito_client_secret === "string" &&
35
- typeof application_config.secret_key === "string" &&
36
- typeof application_config.client_url === "string" &&
37
- typeof application_config.client_dev_url === "string" &&
38
- typeof application_config.api_url === "string" &&
39
- typeof application_config.api_dev_url === "string" &&
40
- typeof application_config.auth_url === "string"
41
- )
42
- }
43
- }
@@ -1,51 +0,0 @@
1
- export class GlobalConfig {
2
- readonly region : string
3
- readonly s3_elections : string
4
- readonly s3_prism : string
5
- readonly s3_triage : string
6
- readonly super_federal_gov_api_keys : string
7
- readonly federal_gov_api_keys : string
8
- readonly federal_lobby_api_key : string
9
- readonly scraping_bee_api_key : string
10
- readonly twitter_api_key : string
11
- readonly youtube_api_key : string
12
- readonly anthropic_api_key : string
13
- readonly xai_api_key : string
14
- readonly [x : string] : any
15
-
16
- constructor(global_config : GlobalConfig) {
17
- if (!GlobalConfig.is(global_config)) {
18
- throw Error("Invalid input.")
19
- }
20
- this.region = global_config.region
21
- this.s3_elections = global_config.s3_elections
22
- this.s3_prism = global_config.s3_prism
23
- this.s3_triage = global_config.s3_triage
24
- this.super_federal_gov_api_keys = global_config.super_federal_gov_api_keys
25
- this.federal_gov_api_keys = global_config.federal_gov_api_keys
26
- this.federal_lobby_api_key = global_config.federal_lobby_api_key
27
- this.scraping_bee_api_key = global_config.scraping_bee_api_key
28
- this.twitter_api_key = global_config.twitter_api_key
29
- this.youtube_api_key = global_config.youtube_api_key
30
- this.anthropic_api_key = global_config.anthropic_api_key
31
- this.xai_api_key = global_config.xai_api_key
32
- }
33
-
34
- static is(global_config : any) : global_config is GlobalConfig {
35
- return (
36
- global_config !== undefined &&
37
- typeof global_config.region === "string" &&
38
- typeof global_config.s3_elections === "string" &&
39
- typeof global_config.s3_prism === "string" &&
40
- typeof global_config.s3_triage === "string" &&
41
- typeof global_config.super_federal_gov_api_keys === "string" &&
42
- typeof global_config.federal_gov_api_keys === "string" &&
43
- typeof global_config.federal_lobby_api_key === "string" &&
44
- typeof global_config.scraping_bee_api_key === "string" &&
45
- typeof global_config.twitter_api_key === "string" &&
46
- typeof global_config.youtube_api_key === "string" &&
47
- typeof global_config.anthropic_api_key === "string" &&
48
- typeof global_config.xai_api_key === "string"
49
- )
50
- }
51
- }