triangle-types 1.0.12 → 1.0.14

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.
@@ -39,6 +39,12 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
39
39
  export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
40
40
  export * from "./types/federal_rules/FederalRuleTitle.js";
41
41
  export * from "./types/federal_rules/FederalRuleSection.js";
42
+ export * from "./types/scout/Scout.js";
43
+ export * from "./types/scout/ScoutDocument.js";
44
+ export * from "./types/scout/ScoutTag.js";
45
+ export * from "./types/scout/UserScout.js";
46
+ export * from "./types/scout/UserScoutConversation.js";
47
+ export * from "./types/scout/UserScoutConversationMessage.js";
42
48
  export * from "./types/state_permits/StateFacility.js";
43
49
  export * from "./types/state_permits/StatePermit.js";
44
50
  export * from "./types/state_permits/StatePermitDocument.js";
package/dist/src/index.js CHANGED
@@ -39,6 +39,12 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
39
39
  export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
40
40
  export * from "./types/federal_rules/FederalRuleTitle.js";
41
41
  export * from "./types/federal_rules/FederalRuleSection.js";
42
+ export * from "./types/scout/Scout.js";
43
+ export * from "./types/scout/ScoutDocument.js";
44
+ export * from "./types/scout/ScoutTag.js";
45
+ export * from "./types/scout/UserScout.js";
46
+ export * from "./types/scout/UserScoutConversation.js";
47
+ export * from "./types/scout/UserScoutConversationMessage.js";
42
48
  export * from "./types/state_permits/StateFacility.js";
43
49
  export * from "./types/state_permits/StatePermit.js";
44
50
  export * from "./types/state_permits/StatePermitDocument.js";
@@ -1,4 +1,4 @@
1
- declare const scout_type_ids: readonly ["C", "O"];
1
+ declare const scout_type_ids: readonly ["I", "O"];
2
2
  export type ScoutTypeID = typeof scout_type_ids[number];
3
3
  export declare function is_scout_type_id(scout_type_id: any): scout_type_id is ScoutTypeID;
4
4
  export declare class Scout {
@@ -1,4 +1,4 @@
1
- const scout_type_ids = ["C", "O"];
1
+ const scout_type_ids = ["I", "O"];
2
2
  export function is_scout_type_id(scout_type_id) {
3
3
  return scout_type_ids.includes(scout_type_id);
4
4
  }
@@ -0,0 +1,7 @@
1
+ export declare class ScoutTag {
2
+ readonly scout_id: string;
3
+ readonly tag_id: string;
4
+ readonly [x: string]: any;
5
+ constructor(scout_tag: ScoutTag);
6
+ static is(scout_tag: any): scout_tag is ScoutTag;
7
+ }
@@ -0,0 +1,16 @@
1
+ export class ScoutTag {
2
+ scout_id;
3
+ tag_id;
4
+ constructor(scout_tag) {
5
+ if (!ScoutTag.is(scout_tag)) {
6
+ throw Error("Invalid input.");
7
+ }
8
+ this.scout_id = scout_tag.scout_id;
9
+ this.tag_id = scout_tag.tag_id;
10
+ }
11
+ static is(scout_tag) {
12
+ return (scout_tag !== undefined &&
13
+ typeof scout_tag.scout_id === "string" &&
14
+ typeof scout_tag.tag_id === "string");
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -47,6 +47,13 @@ export * from "./types/federal_dockets/FederalDocketCommentAttachment"
47
47
  export * from "./types/federal_rules/FederalRuleTitle"
48
48
  export * from "./types/federal_rules/FederalRuleSection"
49
49
 
50
+ export * from "./types/scout/Scout"
51
+ export * from "./types/scout/ScoutDocument"
52
+ export * from "./types/scout/ScoutTag"
53
+ export * from "./types/scout/UserScout"
54
+ export * from "./types/scout/UserScoutConversation"
55
+ export * from "./types/scout/UserScoutConversationMessage"
56
+
50
57
  export * from "./types/state_permits/StateFacility"
51
58
  export * from "./types/state_permits/StatePermit"
52
59
  export * from "./types/state_permits/StatePermitDocument"
@@ -1,4 +1,4 @@
1
- const scout_type_ids = ["C", "O"] as const
1
+ const scout_type_ids = ["I", "O"] as const
2
2
 
3
3
  export type ScoutTypeID = typeof scout_type_ids[number]
4
4
 
@@ -0,0 +1,21 @@
1
+ export class ScoutTag {
2
+ readonly scout_id : string
3
+ readonly tag_id : string
4
+ readonly [x : string] : any
5
+
6
+ constructor(scout_tag : ScoutTag) {
7
+ if (!ScoutTag.is(scout_tag)) {
8
+ throw Error("Invalid input.")
9
+ }
10
+ this.scout_id = scout_tag.scout_id
11
+ this.tag_id = scout_tag.tag_id
12
+ }
13
+
14
+ static is(scout_tag : any) : scout_tag is ScoutTag {
15
+ return (
16
+ scout_tag !== undefined &&
17
+ typeof scout_tag.scout_id === "string" &&
18
+ typeof scout_tag.tag_id === "string"
19
+ )
20
+ }
21
+ }