triangle-types 1.0.260 → 1.0.262

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.
Files changed (47) hide show
  1. package/dist/src/index.d.ts +2 -7
  2. package/dist/src/index.js +2 -7
  3. package/dist/src/types/label/Label.d.ts +7 -0
  4. package/dist/src/types/label/Label.js +19 -0
  5. package/dist/src/types/scout/UserScout.d.ts +1 -16
  6. package/dist/src/types/scout/UserScout.js +46 -40
  7. package/dist/src/types/scout/UserScoutConversation.d.ts +1 -16
  8. package/dist/src/types/scout/UserScoutConversation.js +46 -40
  9. package/dist/src/types/scout/UserScoutConversationMessage.d.ts +0 -25
  10. package/dist/src/types/scout/UserScoutConversationMessage.js +69 -62
  11. package/dist/src/types/twitter/TwitterUserTag.d.ts +1 -0
  12. package/dist/src/types/twitter/TwitterUserTag.js +3 -0
  13. package/dist/src/types/user/TenantDocument.d.ts +1 -2
  14. package/dist/src/types/user/TenantDocument.js +1 -2
  15. package/dist/src/types/user/TenantDocumentFragment.d.ts +1 -2
  16. package/dist/src/types/user/TenantDocumentFragment.js +2 -2
  17. package/dist/src/types/user/TenantProvision.d.ts +1 -1
  18. package/dist/src/types/user/TenantProvision.js +1 -1
  19. package/dist/src/types/user/TenantResourceTag.d.ts +11 -0
  20. package/dist/src/types/user/TenantResourceTag.js +26 -0
  21. package/dist/src/types/web/WebDocumentFragment.d.ts +4 -1
  22. package/dist/src/types/web/WebDocumentFragment.js +4 -1
  23. package/dist/src/types/web/WebDocumentTag.d.ts +1 -0
  24. package/dist/src/types/web/WebDocumentTag.js +3 -0
  25. package/dist/src/types/youtube/YoutubeVideoTag.d.ts +1 -0
  26. package/dist/src/types/youtube/YoutubeVideoTag.js +3 -0
  27. package/package.json +1 -1
  28. package/src/index.ts +2 -8
  29. package/src/types/label/Label.ts +23 -0
  30. package/src/types/scout/UserScout.ts +45 -45
  31. package/src/types/scout/UserScoutConversation.ts +45 -45
  32. package/src/types/scout/UserScoutConversationMessage.ts +68 -68
  33. package/src/types/twitter/TwitterUserTag.ts +3 -0
  34. package/src/types/user/TenantDocument.ts +2 -4
  35. package/src/types/user/TenantDocumentFragment.ts +3 -3
  36. package/src/types/user/TenantProvision.ts +1 -1
  37. package/src/types/user/TenantResourceTag.ts +32 -0
  38. package/src/types/web/WebDocumentFragment.ts +7 -1
  39. package/src/types/web/WebDocumentTag.ts +3 -0
  40. package/src/types/youtube/YoutubeVideoTag.ts +3 -0
  41. package/src/types/fragments/Fragment.ts +0 -262
  42. package/src/types/fragments/FragmentVector.ts +0 -44
  43. package/src/types/scout/ScoutDocument.ts +0 -47
  44. package/src/types/scout/ScoutSubScout.ts +0 -21
  45. package/src/types/scout/ScoutTag.ts +0 -21
  46. package/src/types/tag/Tag.ts +0 -23
  47. package/src/types/user/TenantDocumentTag.ts +0 -24
@@ -1,4 +1,6 @@
1
- import { FragmentTypeID } from "../fragments/Fragment.js";
1
+ declare const fragment_type_ids: readonly ["LINE", "CHAR"];
2
+ export type FragmentTypeID = typeof fragment_type_ids[number];
3
+ export declare function is_fragment_type_id(fragment_type_id: any): fragment_type_id is FragmentTypeID;
2
4
  export declare class WebDocumentFragment {
3
5
  readonly web_document_id: string;
4
6
  readonly fragment_id: string;
@@ -13,3 +15,4 @@ export declare class WebDocumentFragment {
13
15
  constructor(web_document_fragment: WebDocumentFragment);
14
16
  static is(web_document_fragment: any): web_document_fragment is WebDocumentFragment;
15
17
  }
18
+ export {};
@@ -1,4 +1,7 @@
1
- import { is_fragment_type_id } from "../fragments/Fragment.js";
1
+ const fragment_type_ids = ["LINE", "CHAR"];
2
+ export function is_fragment_type_id(fragment_type_id) {
3
+ return fragment_type_ids.includes(fragment_type_id);
4
+ }
2
5
  export class WebDocumentFragment {
3
6
  web_document_id;
4
7
  fragment_id;
@@ -1,6 +1,7 @@
1
1
  import { WebDocument } from "./WebDocument.js";
2
2
  export declare class WebDocumentTag {
3
3
  readonly web_document_id: string;
4
+ readonly tag_type_id: string;
4
5
  readonly tag_id: string;
5
6
  readonly time: string;
6
7
  readonly is_relevant?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { WebDocument } from "./WebDocument.js";
2
2
  export class WebDocumentTag {
3
3
  web_document_id;
4
+ tag_type_id;
4
5
  tag_id;
5
6
  time;
6
7
  is_relevant;
@@ -10,6 +11,7 @@ export class WebDocumentTag {
10
11
  throw Error("Invalid input.");
11
12
  }
12
13
  this.web_document_id = web_document_tag.web_document_id;
14
+ this.tag_type_id = web_document_tag.tag_type_id;
13
15
  this.tag_id = web_document_tag.tag_id;
14
16
  this.time = web_document_tag.time;
15
17
  this.is_relevant = web_document_tag.is_relevant;
@@ -18,6 +20,7 @@ export class WebDocumentTag {
18
20
  static is(web_document_tag) {
19
21
  return (web_document_tag !== undefined &&
20
22
  typeof web_document_tag.web_document_id === "string" &&
23
+ typeof web_document_tag.tag_type_id === "string" &&
21
24
  typeof web_document_tag.tag_id === "string" &&
22
25
  typeof web_document_tag.time === "string" &&
23
26
  (web_document_tag.is_relevant === undefined || typeof web_document_tag.is_relevant === "boolean") &&
@@ -1,6 +1,7 @@
1
1
  import { YoutubeVideoAux } from "./YoutubeVideo.js";
2
2
  export declare class YoutubeVideoTag {
3
3
  readonly youtube_video_id: string;
4
+ readonly tag_type_id: string;
4
5
  readonly tag_id: string;
5
6
  readonly time: string;
6
7
  readonly is_relevant?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { YoutubeVideoAux } from "./YoutubeVideo.js";
2
2
  export class YoutubeVideoTag {
3
3
  youtube_video_id;
4
+ tag_type_id;
4
5
  tag_id;
5
6
  time;
6
7
  is_relevant;
@@ -9,6 +10,7 @@ export class YoutubeVideoTag {
9
10
  throw Error("Invalid input.");
10
11
  }
11
12
  this.youtube_video_id = youtube_video_tag.youtube_video_id;
13
+ this.tag_type_id = youtube_video_tag.tag_type_id;
12
14
  this.tag_id = youtube_video_tag.tag_id;
13
15
  this.time = youtube_video_tag.time;
14
16
  this.is_relevant = youtube_video_tag.is_relevant;
@@ -16,6 +18,7 @@ export class YoutubeVideoTag {
16
18
  static is(youtube_video_tag) {
17
19
  return (youtube_video_tag !== undefined &&
18
20
  typeof youtube_video_tag.youtube_video_id === "string" &&
21
+ typeof youtube_video_tag.tag_type_id === "string" &&
19
22
  typeof youtube_video_tag.tag_id === "string" &&
20
23
  typeof youtube_video_tag.time === "string" &&
21
24
  (youtube_video_tag.is_relevant === undefined || typeof youtube_video_tag.is_relevant === "boolean"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.260",
3
+ "version": "1.0.262",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -66,8 +66,7 @@ export * from "./types/federal_dockets/FederalDocketCommentAttachment"
66
66
  export * from "./types/federal_rules/FederalRuleTitle"
67
67
  export * from "./types/federal_rules/FederalRuleSection"
68
68
 
69
- export * from "./types/fragments/Fragment"
70
- export * from "./types/fragments/FragmentVector"
69
+ export * from "./types/label/Label"
71
70
 
72
71
  export * from "./types/lal/LALFile"
73
72
  export * from "./types/lal/LALFileVoter"
@@ -94,9 +93,6 @@ export * from "./types/regions/SchoolDistrict"
94
93
  export * from "./types/regions/State"
95
94
 
96
95
  export * from "./types/scout/Scout"
97
- export * from "./types/scout/ScoutDocument"
98
- export * from "./types/scout/ScoutSubScout"
99
- export * from "./types/scout/ScoutTag"
100
96
  export * from "./types/scout/UserScout"
101
97
  export * from "./types/scout/UserScoutConversation"
102
98
  export * from "./types/scout/UserScoutConversationMessage"
@@ -128,12 +124,10 @@ export * from "./types/state_permits/TN/TNStatePermitDocument"
128
124
  export * from "./types/state_permits/WI/WIStatePermit"
129
125
  export * from "./types/state_permits/WI/WIStatePermitDocument"
130
126
 
131
- export * from "./types/tag/Tag"
132
-
133
127
  export * from "./types/user/Tenant"
134
128
  export * from "./types/user/TenantDocument"
135
129
  export * from "./types/user/TenantDocumentFragment"
136
- export * from "./types/user/TenantDocumentTag"
130
+ export * from "./types/user/TenantResourceTag"
137
131
  export * from "./types/user/TenantProvision"
138
132
  export * from "./types/user/TenantRole"
139
133
  export * from "./types/user/TenantRoleProvision"
@@ -0,0 +1,23 @@
1
+ export class Label {
2
+ readonly label_id : string
3
+ readonly resource_type_id : string
4
+ readonly name? : string
5
+
6
+ constructor(label : any) {
7
+ if (!Label.is(label)) {
8
+ throw Error("Invalid input.")
9
+ }
10
+ this.label_id = label.label_id
11
+ this.resource_type_id = label.resource_type_id
12
+ this.name = label.name
13
+ }
14
+
15
+ static is(label : any) : label is Label {
16
+ return (
17
+ label !== undefined &&
18
+ typeof label.label_id === "string" &&
19
+ typeof label.resource_type_id === "string" &&
20
+ (label.name === undefined || typeof label.voter_id === "string")
21
+ )
22
+ }
23
+ }
@@ -1,51 +1,51 @@
1
- import { Scout, ScoutAux } from "./Scout"
1
+ // import { Scout, ScoutAux } from "./Scout"
2
2
 
3
- export class UserScout {
4
- readonly user_scout_id : string
5
- readonly user_id : string
6
- readonly scout_id : string
7
- readonly is_conversation_allowed : boolean
8
- readonly is_search_allowed : boolean
9
- readonly [x : string] : any
3
+ // export class UserScout {
4
+ // readonly user_scout_id : string
5
+ // readonly user_id : string
6
+ // readonly scout_id : string
7
+ // readonly is_conversation_allowed : boolean
8
+ // readonly is_search_allowed : boolean
9
+ // readonly [x : string] : any
10
10
 
11
- constructor(user_scout : any) {
12
- if (!UserScout.is(user_scout)) {
13
- throw Error("Invalid input.")
14
- }
15
- this.user_scout_id = user_scout.user_scout_id
16
- this.user_id = user_scout.user_id
17
- this.scout_id = user_scout.scout_id
18
- this.is_conversation_allowed = user_scout.is_conversation_allowed
19
- this.is_search_allowed = user_scout.is_search_allowed
20
- }
11
+ // constructor(user_scout : any) {
12
+ // if (!UserScout.is(user_scout)) {
13
+ // throw Error("Invalid input.")
14
+ // }
15
+ // this.user_scout_id = user_scout.user_scout_id
16
+ // this.user_id = user_scout.user_id
17
+ // this.scout_id = user_scout.scout_id
18
+ // this.is_conversation_allowed = user_scout.is_conversation_allowed
19
+ // this.is_search_allowed = user_scout.is_search_allowed
20
+ // }
21
21
 
22
- static is(user_scout : any) : user_scout is UserScout {
23
- return (
24
- user_scout !== undefined &&
25
- typeof user_scout.user_scout_id === "string" &&
26
- typeof user_scout.user_id === "string" &&
27
- typeof user_scout.scout_id === "string" &&
28
- typeof user_scout.is_conversation_allowed === "boolean" &&
29
- typeof user_scout.is_search_allowed === "boolean"
30
- )
31
- }
32
- }
22
+ // static is(user_scout : any) : user_scout is UserScout {
23
+ // return (
24
+ // user_scout !== undefined &&
25
+ // typeof user_scout.user_scout_id === "string" &&
26
+ // typeof user_scout.user_id === "string" &&
27
+ // typeof user_scout.scout_id === "string" &&
28
+ // typeof user_scout.is_conversation_allowed === "boolean" &&
29
+ // typeof user_scout.is_search_allowed === "boolean"
30
+ // )
31
+ // }
32
+ // }
33
33
 
34
- export class UserScoutAux extends UserScout {
35
- readonly scout : ScoutAux
34
+ // export class UserScoutAux extends UserScout {
35
+ // readonly scout : ScoutAux
36
36
 
37
- constructor(user_scout : any) {
38
- if (!UserScoutAux.is(user_scout)) {
39
- throw Error("Invalid input.")
40
- }
41
- super(user_scout)
42
- this.scout = user_scout.scout
43
- }
37
+ // constructor(user_scout : any) {
38
+ // if (!UserScoutAux.is(user_scout)) {
39
+ // throw Error("Invalid input.")
40
+ // }
41
+ // super(user_scout)
42
+ // this.scout = user_scout.scout
43
+ // }
44
44
 
45
- static is(user_scout : any) : user_scout is UserScoutAux {
46
- return (
47
- UserScout.is(user_scout) &&
48
- ScoutAux.is(user_scout.scout)
49
- )
50
- }
51
- }
45
+ // static is(user_scout : any) : user_scout is UserScoutAux {
46
+ // return (
47
+ // UserScout.is(user_scout) &&
48
+ // ScoutAux.is(user_scout.scout)
49
+ // )
50
+ // }
51
+ // }
@@ -1,51 +1,51 @@
1
- import { UserScoutConversationMessage } from "./UserScoutConversationMessage"
1
+ // import { UserScoutConversationMessage } from "./UserScoutConversationMessage"
2
2
 
3
- export class UserScoutConversation {
4
- readonly user_scout_conversation_id : string
5
- readonly user_id : string
6
- readonly scout_id : string
7
- readonly conversation_id : string
8
- readonly user_scout_id : string
9
- readonly [x : string] : any
3
+ // export class UserScoutConversation {
4
+ // readonly user_scout_conversation_id : string
5
+ // readonly user_id : string
6
+ // readonly scout_id : string
7
+ // readonly conversation_id : string
8
+ // readonly user_scout_id : string
9
+ // readonly [x : string] : any
10
10
 
11
- constructor(user_scout_conversation : any) {
12
- if (!UserScoutConversation.is(user_scout_conversation)) {
13
- throw Error("Invalid input.")
14
- }
15
- this.user_scout_conversation_id = user_scout_conversation.user_scout_conversation_id
16
- this.user_id = user_scout_conversation.user_id
17
- this.scout_id = user_scout_conversation.scout_id
18
- this.conversation_id = user_scout_conversation.conversation_id
19
- this.user_scout_id = user_scout_conversation.user_scout_id
20
- }
11
+ // constructor(user_scout_conversation : any) {
12
+ // if (!UserScoutConversation.is(user_scout_conversation)) {
13
+ // throw Error("Invalid input.")
14
+ // }
15
+ // this.user_scout_conversation_id = user_scout_conversation.user_scout_conversation_id
16
+ // this.user_id = user_scout_conversation.user_id
17
+ // this.scout_id = user_scout_conversation.scout_id
18
+ // this.conversation_id = user_scout_conversation.conversation_id
19
+ // this.user_scout_id = user_scout_conversation.user_scout_id
20
+ // }
21
21
 
22
- static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversation {
23
- return (
24
- user_scout_conversation !== undefined &&
25
- typeof user_scout_conversation.user_scout_conversation_id === "string" &&
26
- typeof user_scout_conversation.user_id === "string" &&
27
- typeof user_scout_conversation.scout_id === "string" &&
28
- typeof user_scout_conversation.conversation_id === "string" &&
29
- typeof user_scout_conversation.user_scout_id === "string"
30
- )
31
- }
32
- }
22
+ // static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversation {
23
+ // return (
24
+ // user_scout_conversation !== undefined &&
25
+ // typeof user_scout_conversation.user_scout_conversation_id === "string" &&
26
+ // typeof user_scout_conversation.user_id === "string" &&
27
+ // typeof user_scout_conversation.scout_id === "string" &&
28
+ // typeof user_scout_conversation.conversation_id === "string" &&
29
+ // typeof user_scout_conversation.user_scout_id === "string"
30
+ // )
31
+ // }
32
+ // }
33
33
 
34
- export class UserScoutConversationAux extends UserScoutConversation {
35
- readonly messages : UserScoutConversationMessage[]
34
+ // export class UserScoutConversationAux extends UserScoutConversation {
35
+ // readonly messages : UserScoutConversationMessage[]
36
36
 
37
- constructor(user_scout_conversation : any) {
38
- if (!UserScoutConversationAux.is(user_scout_conversation)) {
39
- throw Error("Invalid input.")
40
- }
41
- super(user_scout_conversation)
42
- this.messages = user_scout_conversation.messages
43
- }
37
+ // constructor(user_scout_conversation : any) {
38
+ // if (!UserScoutConversationAux.is(user_scout_conversation)) {
39
+ // throw Error("Invalid input.")
40
+ // }
41
+ // super(user_scout_conversation)
42
+ // this.messages = user_scout_conversation.messages
43
+ // }
44
44
 
45
- static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversationAux {
46
- return (
47
- UserScoutConversation.is(user_scout_conversation) &&
48
- Array.isArray(user_scout_conversation.messages) && user_scout_conversation.messages.every(UserScoutConversationMessage.is)
49
- )
50
- }
51
- }
45
+ // static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversationAux {
46
+ // return (
47
+ // UserScoutConversation.is(user_scout_conversation) &&
48
+ // Array.isArray(user_scout_conversation.messages) && user_scout_conversation.messages.every(UserScoutConversationMessage.is)
49
+ // )
50
+ // }
51
+ // }
@@ -1,77 +1,77 @@
1
- import { FragmentAux } from "../fragments/Fragment"
1
+ // import { FragmentAux } from "../fragments/Fragment"
2
2
 
3
- const user_scout_conversation_role_ids = ["USER", "SCOUT"] as const
3
+ // const user_scout_conversation_role_ids = ["USER", "SCOUT"] as const
4
4
 
5
- export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number]
5
+ // export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number]
6
6
 
7
- export function is_user_scout_conversation_role_id(user_scout_conversation_role_id : any) : user_scout_conversation_role_id is UserScoutConversationRoleID {
8
- return user_scout_conversation_role_ids.includes(user_scout_conversation_role_id)
9
- }
7
+ // export function is_user_scout_conversation_role_id(user_scout_conversation_role_id : any) : user_scout_conversation_role_id is UserScoutConversationRoleID {
8
+ // return user_scout_conversation_role_ids.includes(user_scout_conversation_role_id)
9
+ // }
10
10
 
11
- export class UserScoutConversationMessage {
12
- readonly user_scout_conversation_message_id : string
13
- readonly user_id : string
14
- readonly scout_id : string
15
- readonly conversation_id : string
16
- readonly message_id : string
17
- readonly user_scout_id : string
18
- readonly user_scout_conversation_id : string
19
- readonly role_id : UserScoutConversationRoleID
20
- readonly system_prompt? : string
21
- readonly fragment_ids? : string[]
22
- readonly text : string
23
- readonly [x : string] : any
11
+ // export class UserScoutConversationMessage {
12
+ // readonly user_scout_conversation_message_id : string
13
+ // readonly user_id : string
14
+ // readonly scout_id : string
15
+ // readonly conversation_id : string
16
+ // readonly message_id : string
17
+ // readonly user_scout_id : string
18
+ // readonly user_scout_conversation_id : string
19
+ // readonly role_id : UserScoutConversationRoleID
20
+ // readonly system_prompt? : string
21
+ // readonly fragment_ids? : string[]
22
+ // readonly text : string
23
+ // readonly [x : string] : any
24
24
 
25
- constructor(user_scout_conversation_message : any) {
26
- if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
27
- throw Error("Invalid input.")
28
- }
29
- this.user_scout_conversation_message_id = user_scout_conversation_message.user_scout_conversation_message_id
30
- this.user_id = user_scout_conversation_message.user_id
31
- this.scout_id = user_scout_conversation_message.scout_id
32
- this.conversation_id = user_scout_conversation_message.conversation_id
33
- this.message_id = user_scout_conversation_message.message_id
34
- this.user_scout_id = user_scout_conversation_message.user_scout_id
35
- this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id
36
- this.role_id = user_scout_conversation_message.role_id
37
- this.system_prompt = user_scout_conversation_message.system_prompt
38
- this.fragment_ids = user_scout_conversation_message.fragment_ids
39
- this.text = user_scout_conversation_message.text
40
- }
25
+ // constructor(user_scout_conversation_message : any) {
26
+ // if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
27
+ // throw Error("Invalid input.")
28
+ // }
29
+ // this.user_scout_conversation_message_id = user_scout_conversation_message.user_scout_conversation_message_id
30
+ // this.user_id = user_scout_conversation_message.user_id
31
+ // this.scout_id = user_scout_conversation_message.scout_id
32
+ // this.conversation_id = user_scout_conversation_message.conversation_id
33
+ // this.message_id = user_scout_conversation_message.message_id
34
+ // this.user_scout_id = user_scout_conversation_message.user_scout_id
35
+ // this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id
36
+ // this.role_id = user_scout_conversation_message.role_id
37
+ // this.system_prompt = user_scout_conversation_message.system_prompt
38
+ // this.fragment_ids = user_scout_conversation_message.fragment_ids
39
+ // this.text = user_scout_conversation_message.text
40
+ // }
41
41
 
42
- static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessage {
43
- return (
44
- user_scout_conversation_message !== undefined &&
45
- typeof user_scout_conversation_message.user_scout_conversation_message_id === "string" &&
46
- typeof user_scout_conversation_message.user_id === "string" &&
47
- typeof user_scout_conversation_message.scout_id === "string" &&
48
- typeof user_scout_conversation_message.conversation_id === "string" &&
49
- typeof user_scout_conversation_message.message_id === "string" &&
50
- typeof user_scout_conversation_message.user_scout_id === "string" &&
51
- typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
52
- is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
53
- (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
54
- (user_scout_conversation_message.fragment_ids === undefined || Array.isArray(user_scout_conversation_message.fragment_ids) && user_scout_conversation_message.fragment_ids.every((fragment_id : any) => typeof fragment_id === "string")) &&
55
- typeof user_scout_conversation_message.text === "string"
56
- )
57
- }
58
- }
42
+ // static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessage {
43
+ // return (
44
+ // user_scout_conversation_message !== undefined &&
45
+ // typeof user_scout_conversation_message.user_scout_conversation_message_id === "string" &&
46
+ // typeof user_scout_conversation_message.user_id === "string" &&
47
+ // typeof user_scout_conversation_message.scout_id === "string" &&
48
+ // typeof user_scout_conversation_message.conversation_id === "string" &&
49
+ // typeof user_scout_conversation_message.message_id === "string" &&
50
+ // typeof user_scout_conversation_message.user_scout_id === "string" &&
51
+ // typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
52
+ // is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
53
+ // (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
54
+ // (user_scout_conversation_message.fragment_ids === undefined || Array.isArray(user_scout_conversation_message.fragment_ids) && user_scout_conversation_message.fragment_ids.every((fragment_id : any) => typeof fragment_id === "string")) &&
55
+ // typeof user_scout_conversation_message.text === "string"
56
+ // )
57
+ // }
58
+ // }
59
59
 
60
- export class UserScoutConversationMessageAux extends UserScoutConversationMessage {
61
- readonly fragments? : FragmentAux[]
60
+ // export class UserScoutConversationMessageAux extends UserScoutConversationMessage {
61
+ // readonly fragments? : FragmentAux[]
62
62
 
63
- constructor(user_scout_conversation_message : any) {
64
- if (!UserScoutConversationMessageAux.is(user_scout_conversation_message)) {
65
- throw Error("Invalid input.")
66
- }
67
- super(user_scout_conversation_message)
68
- this.fragments = user_scout_conversation_message.fragments
69
- }
63
+ // constructor(user_scout_conversation_message : any) {
64
+ // if (!UserScoutConversationMessageAux.is(user_scout_conversation_message)) {
65
+ // throw Error("Invalid input.")
66
+ // }
67
+ // super(user_scout_conversation_message)
68
+ // this.fragments = user_scout_conversation_message.fragments
69
+ // }
70
70
 
71
- static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessageAux {
72
- return (
73
- UserScoutConversationMessage.is(user_scout_conversation_message) &&
74
- (user_scout_conversation_message.fragments === undefined || Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is))
75
- )
76
- }
77
- }
71
+ // static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessageAux {
72
+ // return (
73
+ // UserScoutConversationMessage.is(user_scout_conversation_message) &&
74
+ // (user_scout_conversation_message.fragments === undefined || Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is))
75
+ // )
76
+ // }
77
+ // }
@@ -2,6 +2,7 @@ import { TwitterUser } from "./TwitterUser"
2
2
 
3
3
  export class TwitterUserTag {
4
4
  readonly twitter_user_id : string
5
+ readonly tag_type_id : string
5
6
  readonly tag_id : string
6
7
  readonly [x : string] : any
7
8
 
@@ -10,6 +11,7 @@ export class TwitterUserTag {
10
11
  throw Error("Invalid input.")
11
12
  }
12
13
  this.twitter_user_id = twitter_user_tag.twitter_user_id
14
+ this.tag_type_id = twitter_user_tag.tag_type_id
13
15
  this.tag_id = twitter_user_tag.tag_id
14
16
  }
15
17
 
@@ -17,6 +19,7 @@ export class TwitterUserTag {
17
19
  return (
18
20
  twitter_user_tag !== undefined &&
19
21
  typeof twitter_user_tag.twitter_user_id === "string" &&
22
+ typeof twitter_user_tag.tag_type_id === "string" &&
20
23
  typeof twitter_user_tag.tag_id === "string"
21
24
  )
22
25
  }
@@ -1,11 +1,9 @@
1
- import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
2
-
3
1
  export class TenantDocument {
4
2
  readonly tenant_document_id : string
5
3
  readonly tenant_id : string
6
4
  readonly file_suffix_id : string
7
5
  readonly name : string
8
- readonly fragment_type_id? : FragmentTypeID
6
+ readonly fragment_type_id? : string
9
7
  readonly time : string
10
8
  readonly s3_id : string
11
9
  readonly s3_id_json? : string
@@ -34,7 +32,7 @@ export class TenantDocument {
34
32
  typeof tenant_document.tenant_id === "string" &&
35
33
  typeof tenant_document.file_suffix_id === "string" &&
36
34
  typeof tenant_document.name === "string" &&
37
- (tenant_document.fragment_type_id === undefined || is_fragment_type_id(tenant_document.fragment_type_id)) &&
35
+ typeof tenant_document.fragment_type_id === "string" &&
38
36
  typeof tenant_document.time === "string" &&
39
37
  typeof tenant_document.s3_id === "string" &&
40
38
  (tenant_document.s3_id_json === undefined || typeof tenant_document.s3_id_json === "string") &&
@@ -1,11 +1,11 @@
1
- import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
1
+ // import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
2
2
  import { TenantDocument } from "./TenantDocument"
3
3
 
4
4
  export class TenantDocumentFragment {
5
5
  readonly tenant_document_id : string
6
6
  readonly tenant_id : string
7
7
  readonly fragment_id : string
8
- readonly fragment_type_id : FragmentTypeID
8
+ readonly fragment_type_id : string
9
9
  readonly max_size : number
10
10
  readonly min_index : number
11
11
  readonly max_index : number
@@ -36,7 +36,7 @@ export class TenantDocumentFragment {
36
36
  typeof tenant_document_fragment.tenant_document_id === "string" &&
37
37
  typeof tenant_document_fragment.tenant_id === "string" &&
38
38
  typeof tenant_document_fragment.fragment_id === "string" &&
39
- is_fragment_type_id(tenant_document_fragment.fragment_type_id) &&
39
+ typeof tenant_document_fragment.fragment_type_id === "string" &&
40
40
  typeof tenant_document_fragment.max_size === "number" &&
41
41
  typeof tenant_document_fragment.min_index === "number" &&
42
42
  typeof tenant_document_fragment.max_index === "number" &&
@@ -1,4 +1,4 @@
1
- const resource_type_ids = ["twitter_tweet", "youtube_video", "document", "scout", "prism", "tag", "target", "role", "user", "fragment_type", "palette"] as const
1
+ const resource_type_ids = ["twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"] as const
2
2
 
3
3
  export type ResourceTypeID = typeof resource_type_ids[number]
4
4
 
@@ -0,0 +1,32 @@
1
+ import { is_resource_type_id, ResourceTypeID } from "./TenantProvision"
2
+
3
+ export class TenantResourceTag {
4
+ readonly tenant_id : string
5
+ readonly resource_type_id : ResourceTypeID
6
+ readonly resource_id : string
7
+ readonly tag_type_id : string
8
+ readonly tag_id : string
9
+ readonly [x : string] : any
10
+
11
+ constructor(tenant_resource_tag : TenantResourceTag) {
12
+ if (!TenantResourceTag.is(tenant_resource_tag)) {
13
+ throw Error("Invalid input.")
14
+ }
15
+ this.tenant_id = tenant_resource_tag.tenant_id
16
+ this.resource_type_id = tenant_resource_tag.resource_type_id
17
+ this.resource_id = tenant_resource_tag.resource_id
18
+ this.tag_type_id = tenant_resource_tag.tag_type_id
19
+ this.tag_id = tenant_resource_tag.tag_id
20
+ }
21
+
22
+ static is(tenant_resource_tag : any) : tenant_resource_tag is TenantResourceTag {
23
+ return (
24
+ tenant_resource_tag !== undefined &&
25
+ typeof tenant_resource_tag.tenant_id === "string" &&
26
+ is_resource_type_id(tenant_resource_tag.resource_type_id) &&
27
+ typeof tenant_resource_tag.resource_id === "string" &&
28
+ typeof tenant_resource_tag.tag_type_id === "string" &&
29
+ typeof tenant_resource_tag.tag_id === "string"
30
+ )
31
+ }
32
+ }
@@ -1,4 +1,10 @@
1
- import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
1
+ const fragment_type_ids = ["LINE", "CHAR"] as const
2
+
3
+ export type FragmentTypeID = typeof fragment_type_ids[number]
4
+
5
+ export function is_fragment_type_id(fragment_type_id : any) : fragment_type_id is FragmentTypeID {
6
+ return fragment_type_ids.includes(fragment_type_id)
7
+ }
2
8
 
3
9
  export class WebDocumentFragment {
4
10
  readonly web_document_id : string