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