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.
- package/dist/src/index.d.ts +2 -7
- package/dist/src/index.js +2 -7
- package/dist/src/types/label/Label.d.ts +7 -0
- package/dist/src/types/label/Label.js +19 -0
- package/dist/src/types/scout/UserScout.d.ts +1 -16
- package/dist/src/types/scout/UserScout.js +46 -40
- package/dist/src/types/scout/UserScoutConversation.d.ts +1 -16
- package/dist/src/types/scout/UserScoutConversation.js +46 -40
- package/dist/src/types/scout/UserScoutConversationMessage.d.ts +0 -25
- package/dist/src/types/scout/UserScoutConversationMessage.js +69 -62
- package/dist/src/types/twitter/TwitterUserTag.d.ts +1 -0
- package/dist/src/types/twitter/TwitterUserTag.js +3 -0
- package/dist/src/types/user/TenantDocument.d.ts +1 -2
- package/dist/src/types/user/TenantDocument.js +1 -2
- package/dist/src/types/user/TenantDocumentFragment.d.ts +1 -2
- package/dist/src/types/user/TenantDocumentFragment.js +2 -2
- package/dist/src/types/user/TenantProvision.d.ts +1 -1
- package/dist/src/types/user/TenantProvision.js +1 -1
- package/dist/src/types/user/TenantResourceTag.d.ts +11 -0
- package/dist/src/types/user/TenantResourceTag.js +26 -0
- package/dist/src/types/web/WebDocumentFragment.d.ts +4 -1
- package/dist/src/types/web/WebDocumentFragment.js +4 -1
- package/dist/src/types/web/WebDocumentTag.d.ts +1 -0
- package/dist/src/types/web/WebDocumentTag.js +3 -0
- package/dist/src/types/youtube/YoutubeVideoTag.d.ts +1 -0
- package/dist/src/types/youtube/YoutubeVideoTag.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +2 -8
- package/src/types/label/Label.ts +23 -0
- package/src/types/scout/UserScout.ts +45 -45
- package/src/types/scout/UserScoutConversation.ts +45 -45
- package/src/types/scout/UserScoutConversationMessage.ts +68 -68
- package/src/types/twitter/TwitterUserTag.ts +3 -0
- package/src/types/user/TenantDocument.ts +2 -4
- package/src/types/user/TenantDocumentFragment.ts +3 -3
- package/src/types/user/TenantProvision.ts +1 -1
- package/src/types/user/TenantResourceTag.ts +32 -0
- package/src/types/web/WebDocumentFragment.ts +7 -1
- package/src/types/web/WebDocumentTag.ts +3 -0
- package/src/types/youtube/YoutubeVideoTag.ts +3 -0
- package/src/types/fragments/Fragment.ts +0 -262
- package/src/types/fragments/FragmentVector.ts +0 -44
- package/src/types/scout/ScoutDocument.ts +0 -47
- package/src/types/scout/ScoutSubScout.ts +0 -21
- package/src/types/scout/ScoutTag.ts +0 -21
- package/src/types/tag/Tag.ts +0 -23
- package/src/types/user/TenantDocumentTag.ts +0 -24
package/dist/src/index.d.ts
CHANGED
|
@@ -55,8 +55,7 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
|
|
|
55
55
|
export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
|
|
56
56
|
export * from "./types/federal_rules/FederalRuleTitle.js";
|
|
57
57
|
export * from "./types/federal_rules/FederalRuleSection.js";
|
|
58
|
-
export * from "./types/
|
|
59
|
-
export * from "./types/fragments/FragmentVector.js";
|
|
58
|
+
export * from "./types/label/Label.js";
|
|
60
59
|
export * from "./types/lal/LALFile.js";
|
|
61
60
|
export * from "./types/lal/LALFileVoter.js";
|
|
62
61
|
export * from "./types/legistar/LegistarAgency.js";
|
|
@@ -78,9 +77,6 @@ export * from "./types/regions/County.js";
|
|
|
78
77
|
export * from "./types/regions/SchoolDistrict.js";
|
|
79
78
|
export * from "./types/regions/State.js";
|
|
80
79
|
export * from "./types/scout/Scout.js";
|
|
81
|
-
export * from "./types/scout/ScoutDocument.js";
|
|
82
|
-
export * from "./types/scout/ScoutSubScout.js";
|
|
83
|
-
export * from "./types/scout/ScoutTag.js";
|
|
84
80
|
export * from "./types/scout/UserScout.js";
|
|
85
81
|
export * from "./types/scout/UserScoutConversation.js";
|
|
86
82
|
export * from "./types/scout/UserScoutConversationMessage.js";
|
|
@@ -104,11 +100,10 @@ export * from "./types/state_permits/TN/TNStatePermit.js";
|
|
|
104
100
|
export * from "./types/state_permits/TN/TNStatePermitDocument.js";
|
|
105
101
|
export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
106
102
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
107
|
-
export * from "./types/tag/Tag.js";
|
|
108
103
|
export * from "./types/user/Tenant.js";
|
|
109
104
|
export * from "./types/user/TenantDocument.js";
|
|
110
105
|
export * from "./types/user/TenantDocumentFragment.js";
|
|
111
|
-
export * from "./types/user/
|
|
106
|
+
export * from "./types/user/TenantResourceTag.js";
|
|
112
107
|
export * from "./types/user/TenantProvision.js";
|
|
113
108
|
export * from "./types/user/TenantRole.js";
|
|
114
109
|
export * from "./types/user/TenantRoleProvision.js";
|
package/dist/src/index.js
CHANGED
|
@@ -55,8 +55,7 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
|
|
|
55
55
|
export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
|
|
56
56
|
export * from "./types/federal_rules/FederalRuleTitle.js";
|
|
57
57
|
export * from "./types/federal_rules/FederalRuleSection.js";
|
|
58
|
-
export * from "./types/
|
|
59
|
-
export * from "./types/fragments/FragmentVector.js";
|
|
58
|
+
export * from "./types/label/Label.js";
|
|
60
59
|
export * from "./types/lal/LALFile.js";
|
|
61
60
|
export * from "./types/lal/LALFileVoter.js";
|
|
62
61
|
export * from "./types/legistar/LegistarAgency.js";
|
|
@@ -78,9 +77,6 @@ export * from "./types/regions/County.js";
|
|
|
78
77
|
export * from "./types/regions/SchoolDistrict.js";
|
|
79
78
|
export * from "./types/regions/State.js";
|
|
80
79
|
export * from "./types/scout/Scout.js";
|
|
81
|
-
export * from "./types/scout/ScoutDocument.js";
|
|
82
|
-
export * from "./types/scout/ScoutSubScout.js";
|
|
83
|
-
export * from "./types/scout/ScoutTag.js";
|
|
84
80
|
export * from "./types/scout/UserScout.js";
|
|
85
81
|
export * from "./types/scout/UserScoutConversation.js";
|
|
86
82
|
export * from "./types/scout/UserScoutConversationMessage.js";
|
|
@@ -104,11 +100,10 @@ export * from "./types/state_permits/TN/TNStatePermit.js";
|
|
|
104
100
|
export * from "./types/state_permits/TN/TNStatePermitDocument.js";
|
|
105
101
|
export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
106
102
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
107
|
-
export * from "./types/tag/Tag.js";
|
|
108
103
|
export * from "./types/user/Tenant.js";
|
|
109
104
|
export * from "./types/user/TenantDocument.js";
|
|
110
105
|
export * from "./types/user/TenantDocumentFragment.js";
|
|
111
|
-
export * from "./types/user/
|
|
106
|
+
export * from "./types/user/TenantResourceTag.js";
|
|
112
107
|
export * from "./types/user/TenantProvision.js";
|
|
113
108
|
export * from "./types/user/TenantRole.js";
|
|
114
109
|
export * from "./types/user/TenantRoleProvision.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class Label {
|
|
2
|
+
label_id;
|
|
3
|
+
resource_type_id;
|
|
4
|
+
name;
|
|
5
|
+
constructor(label) {
|
|
6
|
+
if (!Label.is(label)) {
|
|
7
|
+
throw Error("Invalid input.");
|
|
8
|
+
}
|
|
9
|
+
this.label_id = label.label_id;
|
|
10
|
+
this.resource_type_id = label.resource_type_id;
|
|
11
|
+
this.name = label.name;
|
|
12
|
+
}
|
|
13
|
+
static is(label) {
|
|
14
|
+
return (label !== undefined &&
|
|
15
|
+
typeof label.label_id === "string" &&
|
|
16
|
+
typeof label.resource_type_id === "string" &&
|
|
17
|
+
(label.name === undefined || typeof label.voter_id === "string"));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class UserScout {
|
|
3
|
-
readonly user_scout_id: string;
|
|
4
|
-
readonly user_id: string;
|
|
5
|
-
readonly scout_id: string;
|
|
6
|
-
readonly is_conversation_allowed: boolean;
|
|
7
|
-
readonly is_search_allowed: boolean;
|
|
8
|
-
readonly [x: string]: any;
|
|
9
|
-
constructor(user_scout: any);
|
|
10
|
-
static is(user_scout: any): user_scout is UserScout;
|
|
11
|
-
}
|
|
12
|
-
export declare class UserScoutAux extends UserScout {
|
|
13
|
-
readonly scout: ScoutAux;
|
|
14
|
-
constructor(user_scout: any);
|
|
15
|
-
static is(user_scout: any): user_scout is UserScoutAux;
|
|
16
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { ScoutAux } from "./Scout.js"
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
// import { Scout, ScoutAux } from "./Scout.js"
|
|
2
|
+
export {};
|
|
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
|
+
// constructor(user_scout : any) {
|
|
11
|
+
// if (!UserScout.is(user_scout)) {
|
|
12
|
+
// throw Error("Invalid input.")
|
|
13
|
+
// }
|
|
14
|
+
// this.user_scout_id = user_scout.user_scout_id
|
|
15
|
+
// this.user_id = user_scout.user_id
|
|
16
|
+
// this.scout_id = user_scout.scout_id
|
|
17
|
+
// this.is_conversation_allowed = user_scout.is_conversation_allowed
|
|
18
|
+
// this.is_search_allowed = user_scout.is_search_allowed
|
|
19
|
+
// }
|
|
20
|
+
// static is(user_scout : any) : user_scout is UserScout {
|
|
21
|
+
// return (
|
|
22
|
+
// user_scout !== undefined &&
|
|
23
|
+
// typeof user_scout.user_scout_id === "string" &&
|
|
24
|
+
// typeof user_scout.user_id === "string" &&
|
|
25
|
+
// typeof user_scout.scout_id === "string" &&
|
|
26
|
+
// typeof user_scout.is_conversation_allowed === "boolean" &&
|
|
27
|
+
// typeof user_scout.is_search_allowed === "boolean"
|
|
28
|
+
// )
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
31
|
+
// export class UserScoutAux extends UserScout {
|
|
32
|
+
// readonly scout : ScoutAux
|
|
33
|
+
// constructor(user_scout : any) {
|
|
34
|
+
// if (!UserScoutAux.is(user_scout)) {
|
|
35
|
+
// throw Error("Invalid input.")
|
|
36
|
+
// }
|
|
37
|
+
// super(user_scout)
|
|
38
|
+
// this.scout = user_scout.scout
|
|
39
|
+
// }
|
|
40
|
+
// static is(user_scout : any) : user_scout is UserScoutAux {
|
|
41
|
+
// return (
|
|
42
|
+
// UserScout.is(user_scout) &&
|
|
43
|
+
// ScoutAux.is(user_scout.scout)
|
|
44
|
+
// )
|
|
45
|
+
// }
|
|
46
|
+
// }
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class UserScoutConversation {
|
|
3
|
-
readonly user_scout_conversation_id: string;
|
|
4
|
-
readonly user_id: string;
|
|
5
|
-
readonly scout_id: string;
|
|
6
|
-
readonly conversation_id: string;
|
|
7
|
-
readonly user_scout_id: string;
|
|
8
|
-
readonly [x: string]: any;
|
|
9
|
-
constructor(user_scout_conversation: any);
|
|
10
|
-
static is(user_scout_conversation: any): user_scout_conversation is UserScoutConversation;
|
|
11
|
-
}
|
|
12
|
-
export declare class UserScoutConversationAux extends UserScoutConversation {
|
|
13
|
-
readonly messages: UserScoutConversationMessage[];
|
|
14
|
-
constructor(user_scout_conversation: any);
|
|
15
|
-
static is(user_scout_conversation: any): user_scout_conversation is UserScoutConversationAux;
|
|
16
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { UserScoutConversationMessage } from "./UserScoutConversationMessage.js"
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
// import { UserScoutConversationMessage } from "./UserScoutConversationMessage.js"
|
|
2
|
+
export {};
|
|
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
|
+
// constructor(user_scout_conversation : any) {
|
|
11
|
+
// if (!UserScoutConversation.is(user_scout_conversation)) {
|
|
12
|
+
// throw Error("Invalid input.")
|
|
13
|
+
// }
|
|
14
|
+
// this.user_scout_conversation_id = user_scout_conversation.user_scout_conversation_id
|
|
15
|
+
// this.user_id = user_scout_conversation.user_id
|
|
16
|
+
// this.scout_id = user_scout_conversation.scout_id
|
|
17
|
+
// this.conversation_id = user_scout_conversation.conversation_id
|
|
18
|
+
// this.user_scout_id = user_scout_conversation.user_scout_id
|
|
19
|
+
// }
|
|
20
|
+
// static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversation {
|
|
21
|
+
// return (
|
|
22
|
+
// user_scout_conversation !== undefined &&
|
|
23
|
+
// typeof user_scout_conversation.user_scout_conversation_id === "string" &&
|
|
24
|
+
// typeof user_scout_conversation.user_id === "string" &&
|
|
25
|
+
// typeof user_scout_conversation.scout_id === "string" &&
|
|
26
|
+
// typeof user_scout_conversation.conversation_id === "string" &&
|
|
27
|
+
// typeof user_scout_conversation.user_scout_id === "string"
|
|
28
|
+
// )
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
31
|
+
// export class UserScoutConversationAux extends UserScoutConversation {
|
|
32
|
+
// readonly messages : UserScoutConversationMessage[]
|
|
33
|
+
// constructor(user_scout_conversation : any) {
|
|
34
|
+
// if (!UserScoutConversationAux.is(user_scout_conversation)) {
|
|
35
|
+
// throw Error("Invalid input.")
|
|
36
|
+
// }
|
|
37
|
+
// super(user_scout_conversation)
|
|
38
|
+
// this.messages = user_scout_conversation.messages
|
|
39
|
+
// }
|
|
40
|
+
// static is(user_scout_conversation : any) : user_scout_conversation is UserScoutConversationAux {
|
|
41
|
+
// return (
|
|
42
|
+
// UserScoutConversation.is(user_scout_conversation) &&
|
|
43
|
+
// Array.isArray(user_scout_conversation.messages) && user_scout_conversation.messages.every(UserScoutConversationMessage.is)
|
|
44
|
+
// )
|
|
45
|
+
// }
|
|
46
|
+
// }
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
import { FragmentAux } from "../fragments/Fragment.js";
|
|
2
|
-
declare const user_scout_conversation_role_ids: readonly ["USER", "SCOUT"];
|
|
3
|
-
export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number];
|
|
4
|
-
export declare function is_user_scout_conversation_role_id(user_scout_conversation_role_id: any): user_scout_conversation_role_id is UserScoutConversationRoleID;
|
|
5
|
-
export declare class UserScoutConversationMessage {
|
|
6
|
-
readonly user_scout_conversation_message_id: string;
|
|
7
|
-
readonly user_id: string;
|
|
8
|
-
readonly scout_id: string;
|
|
9
|
-
readonly conversation_id: string;
|
|
10
|
-
readonly message_id: string;
|
|
11
|
-
readonly user_scout_id: string;
|
|
12
|
-
readonly user_scout_conversation_id: string;
|
|
13
|
-
readonly role_id: UserScoutConversationRoleID;
|
|
14
|
-
readonly system_prompt?: string;
|
|
15
|
-
readonly fragment_ids?: string[];
|
|
16
|
-
readonly text: string;
|
|
17
|
-
readonly [x: string]: any;
|
|
18
|
-
constructor(user_scout_conversation_message: any);
|
|
19
|
-
static is(user_scout_conversation_message: any): user_scout_conversation_message is UserScoutConversationMessage;
|
|
20
|
-
}
|
|
21
|
-
export declare class UserScoutConversationMessageAux extends UserScoutConversationMessage {
|
|
22
|
-
readonly fragments?: FragmentAux[];
|
|
23
|
-
constructor(user_scout_conversation_message: any);
|
|
24
|
-
static is(user_scout_conversation_message: any): user_scout_conversation_message is UserScoutConversationMessageAux;
|
|
25
|
-
}
|
|
26
1
|
export {};
|
|
@@ -1,62 +1,69 @@
|
|
|
1
|
-
import { FragmentAux } from "../fragments/Fragment.js"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
1
|
+
// import { FragmentAux } from "../fragments/Fragment.js"
|
|
2
|
+
export {};
|
|
3
|
+
// const user_scout_conversation_role_ids = ["USER", "SCOUT"] as const
|
|
4
|
+
// export type UserScoutConversationRoleID = typeof user_scout_conversation_role_ids[number]
|
|
5
|
+
// export function is_user_scout_conversation_role_id(user_scout_conversation_role_id : any) : user_scout_conversation_role_id is UserScoutConversationRoleID {
|
|
6
|
+
// return user_scout_conversation_role_ids.includes(user_scout_conversation_role_id)
|
|
7
|
+
// }
|
|
8
|
+
// export class UserScoutConversationMessage {
|
|
9
|
+
// readonly user_scout_conversation_message_id : string
|
|
10
|
+
// readonly user_id : string
|
|
11
|
+
// readonly scout_id : string
|
|
12
|
+
// readonly conversation_id : string
|
|
13
|
+
// readonly message_id : string
|
|
14
|
+
// readonly user_scout_id : string
|
|
15
|
+
// readonly user_scout_conversation_id : string
|
|
16
|
+
// readonly role_id : UserScoutConversationRoleID
|
|
17
|
+
// readonly system_prompt? : string
|
|
18
|
+
// readonly fragment_ids? : string[]
|
|
19
|
+
// readonly text : string
|
|
20
|
+
// readonly [x : string] : any
|
|
21
|
+
// constructor(user_scout_conversation_message : any) {
|
|
22
|
+
// if (!UserScoutConversationMessage.is(user_scout_conversation_message)) {
|
|
23
|
+
// throw Error("Invalid input.")
|
|
24
|
+
// }
|
|
25
|
+
// this.user_scout_conversation_message_id = user_scout_conversation_message.user_scout_conversation_message_id
|
|
26
|
+
// this.user_id = user_scout_conversation_message.user_id
|
|
27
|
+
// this.scout_id = user_scout_conversation_message.scout_id
|
|
28
|
+
// this.conversation_id = user_scout_conversation_message.conversation_id
|
|
29
|
+
// this.message_id = user_scout_conversation_message.message_id
|
|
30
|
+
// this.user_scout_id = user_scout_conversation_message.user_scout_id
|
|
31
|
+
// this.user_scout_conversation_id = user_scout_conversation_message.user_scout_conversation_id
|
|
32
|
+
// this.role_id = user_scout_conversation_message.role_id
|
|
33
|
+
// this.system_prompt = user_scout_conversation_message.system_prompt
|
|
34
|
+
// this.fragment_ids = user_scout_conversation_message.fragment_ids
|
|
35
|
+
// this.text = user_scout_conversation_message.text
|
|
36
|
+
// }
|
|
37
|
+
// static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessage {
|
|
38
|
+
// return (
|
|
39
|
+
// user_scout_conversation_message !== undefined &&
|
|
40
|
+
// typeof user_scout_conversation_message.user_scout_conversation_message_id === "string" &&
|
|
41
|
+
// typeof user_scout_conversation_message.user_id === "string" &&
|
|
42
|
+
// typeof user_scout_conversation_message.scout_id === "string" &&
|
|
43
|
+
// typeof user_scout_conversation_message.conversation_id === "string" &&
|
|
44
|
+
// typeof user_scout_conversation_message.message_id === "string" &&
|
|
45
|
+
// typeof user_scout_conversation_message.user_scout_id === "string" &&
|
|
46
|
+
// typeof user_scout_conversation_message.user_scout_conversation_id === "string" &&
|
|
47
|
+
// is_user_scout_conversation_role_id(user_scout_conversation_message.role_id) &&
|
|
48
|
+
// (user_scout_conversation_message.system_prompt === undefined || typeof user_scout_conversation_message.system_prompt === "string") &&
|
|
49
|
+
// (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")) &&
|
|
50
|
+
// typeof user_scout_conversation_message.text === "string"
|
|
51
|
+
// )
|
|
52
|
+
// }
|
|
53
|
+
// }
|
|
54
|
+
// export class UserScoutConversationMessageAux extends UserScoutConversationMessage {
|
|
55
|
+
// readonly fragments? : FragmentAux[]
|
|
56
|
+
// constructor(user_scout_conversation_message : any) {
|
|
57
|
+
// if (!UserScoutConversationMessageAux.is(user_scout_conversation_message)) {
|
|
58
|
+
// throw Error("Invalid input.")
|
|
59
|
+
// }
|
|
60
|
+
// super(user_scout_conversation_message)
|
|
61
|
+
// this.fragments = user_scout_conversation_message.fragments
|
|
62
|
+
// }
|
|
63
|
+
// static is(user_scout_conversation_message : any) : user_scout_conversation_message is UserScoutConversationMessageAux {
|
|
64
|
+
// return (
|
|
65
|
+
// UserScoutConversationMessage.is(user_scout_conversation_message) &&
|
|
66
|
+
// (user_scout_conversation_message.fragments === undefined || Array.isArray(user_scout_conversation_message.fragments) && user_scout_conversation_message.fragments.every(FragmentAux.is))
|
|
67
|
+
// )
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { TwitterUser } from "./TwitterUser.js";
|
|
2
2
|
export class TwitterUserTag {
|
|
3
3
|
twitter_user_id;
|
|
4
|
+
tag_type_id;
|
|
4
5
|
tag_id;
|
|
5
6
|
constructor(twitter_user_tag) {
|
|
6
7
|
if (!TwitterUserTag.is(twitter_user_tag)) {
|
|
7
8
|
throw Error("Invalid input.");
|
|
8
9
|
}
|
|
9
10
|
this.twitter_user_id = twitter_user_tag.twitter_user_id;
|
|
11
|
+
this.tag_type_id = twitter_user_tag.tag_type_id;
|
|
10
12
|
this.tag_id = twitter_user_tag.tag_id;
|
|
11
13
|
}
|
|
12
14
|
static is(twitter_user_tag) {
|
|
13
15
|
return (twitter_user_tag !== undefined &&
|
|
14
16
|
typeof twitter_user_tag.twitter_user_id === "string" &&
|
|
17
|
+
typeof twitter_user_tag.tag_type_id === "string" &&
|
|
15
18
|
typeof twitter_user_tag.tag_id === "string");
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FragmentTypeID } from "../fragments/Fragment.js";
|
|
2
1
|
export declare class TenantDocument {
|
|
3
2
|
readonly tenant_document_id: string;
|
|
4
3
|
readonly tenant_id: string;
|
|
5
4
|
readonly file_suffix_id: string;
|
|
6
5
|
readonly name: string;
|
|
7
|
-
readonly fragment_type_id?:
|
|
6
|
+
readonly fragment_type_id?: string;
|
|
8
7
|
readonly time: string;
|
|
9
8
|
readonly s3_id: string;
|
|
10
9
|
readonly s3_id_json?: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { is_fragment_type_id } from "../fragments/Fragment.js";
|
|
2
1
|
export class TenantDocument {
|
|
3
2
|
tenant_document_id;
|
|
4
3
|
tenant_id;
|
|
@@ -29,7 +28,7 @@ export class TenantDocument {
|
|
|
29
28
|
typeof tenant_document.tenant_id === "string" &&
|
|
30
29
|
typeof tenant_document.file_suffix_id === "string" &&
|
|
31
30
|
typeof tenant_document.name === "string" &&
|
|
32
|
-
|
|
31
|
+
typeof tenant_document.fragment_type_id === "string" &&
|
|
33
32
|
typeof tenant_document.time === "string" &&
|
|
34
33
|
typeof tenant_document.s3_id === "string" &&
|
|
35
34
|
(tenant_document.s3_id_json === undefined || typeof tenant_document.s3_id_json === "string") &&
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FragmentTypeID } from "../fragments/Fragment.js";
|
|
2
1
|
import { TenantDocument } from "./TenantDocument.js";
|
|
3
2
|
export declare class TenantDocumentFragment {
|
|
4
3
|
readonly tenant_document_id: string;
|
|
5
4
|
readonly tenant_id: string;
|
|
6
5
|
readonly fragment_id: string;
|
|
7
|
-
readonly fragment_type_id:
|
|
6
|
+
readonly fragment_type_id: string;
|
|
8
7
|
readonly max_size: number;
|
|
9
8
|
readonly min_index: number;
|
|
10
9
|
readonly max_index: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { is_fragment_type_id } from "../fragments/Fragment.js"
|
|
1
|
+
// import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment.js"
|
|
2
2
|
import { TenantDocument } from "./TenantDocument.js";
|
|
3
3
|
export class TenantDocumentFragment {
|
|
4
4
|
tenant_document_id;
|
|
@@ -31,7 +31,7 @@ export class TenantDocumentFragment {
|
|
|
31
31
|
typeof tenant_document_fragment.tenant_document_id === "string" &&
|
|
32
32
|
typeof tenant_document_fragment.tenant_id === "string" &&
|
|
33
33
|
typeof tenant_document_fragment.fragment_id === "string" &&
|
|
34
|
-
|
|
34
|
+
typeof tenant_document_fragment.fragment_type_id === "string" &&
|
|
35
35
|
typeof tenant_document_fragment.max_size === "number" &&
|
|
36
36
|
typeof tenant_document_fragment.min_index === "number" &&
|
|
37
37
|
typeof tenant_document_fragment.max_index === "number" &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const resource_type_ids: readonly ["twitter_tweet", "youtube_video", "document", "scout", "prism", "
|
|
1
|
+
declare const resource_type_ids: readonly ["twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
2
2
|
export type ResourceTypeID = typeof resource_type_ids[number];
|
|
3
3
|
export declare function is_resource_type_id(resource_type_id: any): resource_type_id is ResourceTypeID;
|
|
4
4
|
export declare class TenantProvision {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const resource_type_ids = ["twitter_tweet", "youtube_video", "document", "scout", "prism", "
|
|
1
|
+
const resource_type_ids = ["twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
2
2
|
export function is_resource_type_id(resource_type_id) {
|
|
3
3
|
return resource_type_ids.includes(resource_type_id);
|
|
4
4
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResourceTypeID } from "./TenantProvision.js";
|
|
2
|
+
export declare class TenantResourceTag {
|
|
3
|
+
readonly tenant_id: string;
|
|
4
|
+
readonly resource_type_id: ResourceTypeID;
|
|
5
|
+
readonly resource_id: string;
|
|
6
|
+
readonly tag_type_id: string;
|
|
7
|
+
readonly tag_id: string;
|
|
8
|
+
readonly [x: string]: any;
|
|
9
|
+
constructor(tenant_resource_tag: TenantResourceTag);
|
|
10
|
+
static is(tenant_resource_tag: any): tenant_resource_tag is TenantResourceTag;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { is_resource_type_id } from "./TenantProvision.js";
|
|
2
|
+
export class TenantResourceTag {
|
|
3
|
+
tenant_id;
|
|
4
|
+
resource_type_id;
|
|
5
|
+
resource_id;
|
|
6
|
+
tag_type_id;
|
|
7
|
+
tag_id;
|
|
8
|
+
constructor(tenant_resource_tag) {
|
|
9
|
+
if (!TenantResourceTag.is(tenant_resource_tag)) {
|
|
10
|
+
throw Error("Invalid input.");
|
|
11
|
+
}
|
|
12
|
+
this.tenant_id = tenant_resource_tag.tenant_id;
|
|
13
|
+
this.resource_type_id = tenant_resource_tag.resource_type_id;
|
|
14
|
+
this.resource_id = tenant_resource_tag.resource_id;
|
|
15
|
+
this.tag_type_id = tenant_resource_tag.tag_type_id;
|
|
16
|
+
this.tag_id = tenant_resource_tag.tag_id;
|
|
17
|
+
}
|
|
18
|
+
static is(tenant_resource_tag) {
|
|
19
|
+
return (tenant_resource_tag !== undefined &&
|
|
20
|
+
typeof tenant_resource_tag.tenant_id === "string" &&
|
|
21
|
+
is_resource_type_id(tenant_resource_tag.resource_type_id) &&
|
|
22
|
+
typeof tenant_resource_tag.resource_id === "string" &&
|
|
23
|
+
typeof tenant_resource_tag.tag_type_id === "string" &&
|
|
24
|
+
typeof tenant_resource_tag.tag_id === "string");
|
|
25
|
+
}
|
|
26
|
+
}
|