triangle-types 1.0.105 → 1.0.107
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 +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/types/application/ApplicationStage.d.ts +8 -0
- package/dist/src/types/application/ApplicationStage.js +26 -0
- package/dist/src/types/scout/ScoutDocument.d.ts +1 -0
- package/dist/src/types/scout/ScoutDocument.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/types/application/ApplicationStage.ts +35 -0
- package/src/types/scout/ScoutDocument.ts +3 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./types/APIError.js";
|
|
2
2
|
export * from "./types/State.js";
|
|
3
3
|
export * from "./types/User.js";
|
|
4
|
+
export * from "./types/application/ApplicationStage.js";
|
|
4
5
|
export * from "./types/press/PressArticle.js";
|
|
5
6
|
export * from "./types/press/PressArticleTag.js";
|
|
6
7
|
export * from "./types/twitter/TwitterTweet.js";
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./types/APIError.js";
|
|
2
2
|
export * from "./types/State.js";
|
|
3
3
|
export * from "./types/User.js";
|
|
4
|
+
export * from "./types/application/ApplicationStage.js";
|
|
4
5
|
export * from "./types/press/PressArticle.js";
|
|
5
6
|
export * from "./types/press/PressArticleTag.js";
|
|
6
7
|
export * from "./types/twitter/TwitterTweet.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const application_stage_ids: readonly ["DEV", "ALPHA", "BETA", "GAMMA", "PROD"];
|
|
2
|
+
export type ApplicationStageID = typeof application_stage_ids[number];
|
|
3
|
+
export declare function is_application_stage_id(application_stage_id: any): application_stage_id is ApplicationStageID;
|
|
4
|
+
export interface ApplicationStage {
|
|
5
|
+
application_stage_id: ApplicationStageID;
|
|
6
|
+
port: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const application_stages: Record<ApplicationStageID, ApplicationStage>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const application_stage_ids = ["DEV", "ALPHA", "BETA", "GAMMA", "PROD"];
|
|
2
|
+
export function is_application_stage_id(application_stage_id) {
|
|
3
|
+
return application_stage_ids.includes(application_stage_id);
|
|
4
|
+
}
|
|
5
|
+
export const application_stages = {
|
|
6
|
+
DEV: {
|
|
7
|
+
application_stage_id: "DEV",
|
|
8
|
+
port: 3000
|
|
9
|
+
},
|
|
10
|
+
ALPHA: {
|
|
11
|
+
application_stage_id: "ALPHA",
|
|
12
|
+
port: 3001
|
|
13
|
+
},
|
|
14
|
+
BETA: {
|
|
15
|
+
application_stage_id: "BETA",
|
|
16
|
+
port: 3002
|
|
17
|
+
},
|
|
18
|
+
GAMMA: {
|
|
19
|
+
application_stage_id: "GAMMA",
|
|
20
|
+
port: 3003
|
|
21
|
+
},
|
|
22
|
+
PROD: {
|
|
23
|
+
application_stage_id: "PROD",
|
|
24
|
+
port: 80
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -8,6 +8,7 @@ export declare class ScoutDocument {
|
|
|
8
8
|
readonly fragment_type_id?: FragmentTypeID;
|
|
9
9
|
readonly raw_s3_id: string;
|
|
10
10
|
readonly s3_id: string;
|
|
11
|
+
readonly s3_id_pdf?: string;
|
|
11
12
|
readonly s3_id_txt?: string;
|
|
12
13
|
readonly [x: string]: any;
|
|
13
14
|
constructor(scout_document: any);
|
|
@@ -8,6 +8,7 @@ export class ScoutDocument {
|
|
|
8
8
|
fragment_type_id;
|
|
9
9
|
raw_s3_id;
|
|
10
10
|
s3_id;
|
|
11
|
+
s3_id_pdf;
|
|
11
12
|
s3_id_txt;
|
|
12
13
|
constructor(scout_document) {
|
|
13
14
|
if (!ScoutDocument.is(scout_document)) {
|
|
@@ -21,6 +22,7 @@ export class ScoutDocument {
|
|
|
21
22
|
this.fragment_type_id = scout_document.fragment_type_id;
|
|
22
23
|
this.raw_s3_id = scout_document.raw_s3_id;
|
|
23
24
|
this.s3_id = scout_document.s3_id;
|
|
25
|
+
this.s3_id_pdf = scout_document.s3_id_pdf;
|
|
24
26
|
this.s3_id_txt = scout_document.s3_id_txt;
|
|
25
27
|
}
|
|
26
28
|
static is(scout_document) {
|
|
@@ -33,6 +35,7 @@ export class ScoutDocument {
|
|
|
33
35
|
(scout_document.fragment_type_id === undefined || is_fragment_type_id(scout_document.fragment_type_id)) &&
|
|
34
36
|
typeof scout_document.raw_s3_id === "string" &&
|
|
35
37
|
typeof scout_document.s3_id === "string" &&
|
|
38
|
+
(scout_document.s3_id_pdf === undefined || typeof scout_document.s3_id_pdf === "string") &&
|
|
36
39
|
(scout_document.s3_id_txt === undefined || typeof scout_document.s3_id_txt === "string"));
|
|
37
40
|
}
|
|
38
41
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,6 +2,8 @@ export * from "./types/APIError"
|
|
|
2
2
|
export * from "./types/State"
|
|
3
3
|
export * from "./types/User"
|
|
4
4
|
|
|
5
|
+
export * from "./types/application/ApplicationStage"
|
|
6
|
+
|
|
5
7
|
export * from "./types/press/PressArticle"
|
|
6
8
|
export * from "./types/press/PressArticleTag"
|
|
7
9
|
export * from "./types/twitter/TwitterTweet"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const application_stage_ids = ["DEV", "ALPHA", "BETA", "GAMMA", "PROD"] as const
|
|
2
|
+
|
|
3
|
+
export type ApplicationStageID = typeof application_stage_ids[number]
|
|
4
|
+
|
|
5
|
+
export function is_application_stage_id(application_stage_id : any) : application_stage_id is ApplicationStageID {
|
|
6
|
+
return application_stage_ids.includes(application_stage_id)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ApplicationStage {
|
|
10
|
+
application_stage_id : ApplicationStageID,
|
|
11
|
+
port : number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const application_stages : Record<ApplicationStageID, ApplicationStage> = {
|
|
15
|
+
DEV : {
|
|
16
|
+
application_stage_id : "DEV",
|
|
17
|
+
port : 3000
|
|
18
|
+
},
|
|
19
|
+
ALPHA : {
|
|
20
|
+
application_stage_id : "ALPHA",
|
|
21
|
+
port : 3001
|
|
22
|
+
},
|
|
23
|
+
BETA : {
|
|
24
|
+
application_stage_id : "BETA",
|
|
25
|
+
port : 3002
|
|
26
|
+
},
|
|
27
|
+
GAMMA : {
|
|
28
|
+
application_stage_id : "GAMMA",
|
|
29
|
+
port : 3003
|
|
30
|
+
},
|
|
31
|
+
PROD : {
|
|
32
|
+
application_stage_id : "PROD",
|
|
33
|
+
port : 80
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -9,6 +9,7 @@ export class ScoutDocument {
|
|
|
9
9
|
readonly fragment_type_id? : FragmentTypeID
|
|
10
10
|
readonly raw_s3_id : string
|
|
11
11
|
readonly s3_id : string
|
|
12
|
+
readonly s3_id_pdf? : string
|
|
12
13
|
readonly s3_id_txt? : string
|
|
13
14
|
readonly [x : string] : any
|
|
14
15
|
|
|
@@ -24,6 +25,7 @@ export class ScoutDocument {
|
|
|
24
25
|
this.fragment_type_id = scout_document.fragment_type_id
|
|
25
26
|
this.raw_s3_id = scout_document.raw_s3_id
|
|
26
27
|
this.s3_id = scout_document.s3_id
|
|
28
|
+
this.s3_id_pdf = scout_document.s3_id_pdf
|
|
27
29
|
this.s3_id_txt = scout_document.s3_id_txt
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -38,6 +40,7 @@ export class ScoutDocument {
|
|
|
38
40
|
(scout_document.fragment_type_id === undefined || is_fragment_type_id(scout_document.fragment_type_id)) &&
|
|
39
41
|
typeof scout_document.raw_s3_id === "string" &&
|
|
40
42
|
typeof scout_document.s3_id === "string" &&
|
|
43
|
+
(scout_document.s3_id_pdf === undefined || typeof scout_document.s3_id_pdf === "string") &&
|
|
41
44
|
(scout_document.s3_id_txt === undefined || typeof scout_document.s3_id_txt === "string")
|
|
42
45
|
)
|
|
43
46
|
}
|