triangle-types 1.0.217 → 1.0.219
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/user/TenantDocument.d.ts +1 -1
- package/dist/src/types/user/TenantDocument.js +3 -3
- package/dist/src/types/user/TenantDocumentFragment.d.ts +15 -0
- package/dist/src/types/user/TenantDocumentFragment.js +38 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/types/user/TenantDocument.ts +3 -3
- package/src/types/user/TenantDocumentFragment.ts +44 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
|
102
102
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
103
103
|
export * from "./types/user/Tenant.js";
|
|
104
104
|
export * from "./types/user/TenantDocument.js";
|
|
105
|
+
export * from "./types/user/TenantDocumentFragment.js";
|
|
105
106
|
export * from "./types/user/TenantProvision.js";
|
|
106
107
|
export * from "./types/user/User.js";
|
|
107
108
|
export * from "./types/user/UserComment.js";
|
package/dist/src/index.js
CHANGED
|
@@ -102,6 +102,7 @@ export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
|
102
102
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
103
103
|
export * from "./types/user/Tenant.js";
|
|
104
104
|
export * from "./types/user/TenantDocument.js";
|
|
105
|
+
export * from "./types/user/TenantDocumentFragment.js";
|
|
105
106
|
export * from "./types/user/TenantProvision.js";
|
|
106
107
|
export * from "./types/user/User.js";
|
|
107
108
|
export * from "./types/user/UserComment.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FragmentTypeID } from "../fragments/Fragment.js";
|
|
2
2
|
export declare class TenantDocument {
|
|
3
|
+
readonly tenant_document_id: string;
|
|
3
4
|
readonly tenant_id: string;
|
|
4
|
-
readonly document_id: string;
|
|
5
5
|
readonly file_suffix_id: string;
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly fragment_type_id?: FragmentTypeID;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { is_fragment_type_id } from "../fragments/Fragment.js";
|
|
2
2
|
export class TenantDocument {
|
|
3
|
+
tenant_document_id;
|
|
3
4
|
tenant_id;
|
|
4
|
-
document_id;
|
|
5
5
|
file_suffix_id;
|
|
6
6
|
name;
|
|
7
7
|
fragment_type_id;
|
|
@@ -13,8 +13,8 @@ export class TenantDocument {
|
|
|
13
13
|
if (!TenantDocument.is(tenant_document)) {
|
|
14
14
|
throw Error("Invalid input.");
|
|
15
15
|
}
|
|
16
|
+
this.tenant_document_id = tenant_document.tenant_document_id;
|
|
16
17
|
this.tenant_id = tenant_document.tenant_id;
|
|
17
|
-
this.document_id = tenant_document.document_id;
|
|
18
18
|
this.file_suffix_id = tenant_document.file_suffix_id;
|
|
19
19
|
this.name = tenant_document.name;
|
|
20
20
|
this.fragment_type_id = tenant_document.fragment_type_id;
|
|
@@ -25,8 +25,8 @@ export class TenantDocument {
|
|
|
25
25
|
}
|
|
26
26
|
static is(tenant_document) {
|
|
27
27
|
return (tenant_document !== undefined &&
|
|
28
|
+
typeof tenant_document.tenant_document_id === "string" &&
|
|
28
29
|
typeof tenant_document.tenant_id === "string" &&
|
|
29
|
-
typeof tenant_document.document_id === "string" &&
|
|
30
30
|
typeof tenant_document.file_suffix_id === "string" &&
|
|
31
31
|
typeof tenant_document.name === "string" &&
|
|
32
32
|
(tenant_document.fragment_type_id === undefined || is_fragment_type_id(tenant_document.fragment_type_id)) &&
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FragmentTypeID } from "../fragments/Fragment.js";
|
|
2
|
+
export declare class TenantDocumentFragment {
|
|
3
|
+
readonly tenant_document_id: string;
|
|
4
|
+
readonly fragment_id: string;
|
|
5
|
+
readonly fragment_type_id: FragmentTypeID;
|
|
6
|
+
readonly max_size: number;
|
|
7
|
+
readonly min_index: number;
|
|
8
|
+
readonly max_index: number;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly vector: number[];
|
|
12
|
+
readonly [x: string]: any;
|
|
13
|
+
constructor(tenant_document_fragment: TenantDocumentFragment);
|
|
14
|
+
static is(tenant_document_fragment: any): tenant_document_fragment is TenantDocumentFragment;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { is_fragment_type_id } from "../fragments/Fragment.js";
|
|
2
|
+
export class TenantDocumentFragment {
|
|
3
|
+
tenant_document_id;
|
|
4
|
+
fragment_id;
|
|
5
|
+
fragment_type_id;
|
|
6
|
+
max_size;
|
|
7
|
+
min_index;
|
|
8
|
+
max_index;
|
|
9
|
+
title;
|
|
10
|
+
text;
|
|
11
|
+
vector;
|
|
12
|
+
constructor(tenant_document_fragment) {
|
|
13
|
+
if (!TenantDocumentFragment.is(tenant_document_fragment)) {
|
|
14
|
+
throw Error("Invalid input.");
|
|
15
|
+
}
|
|
16
|
+
this.tenant_document_id = tenant_document_fragment.tenant_document_id;
|
|
17
|
+
this.fragment_id = tenant_document_fragment.fragment_id;
|
|
18
|
+
this.fragment_type_id = tenant_document_fragment.fragment_type_id;
|
|
19
|
+
this.max_size = tenant_document_fragment.max_size;
|
|
20
|
+
this.min_index = tenant_document_fragment.min_index;
|
|
21
|
+
this.max_index = tenant_document_fragment.max_index;
|
|
22
|
+
this.title = tenant_document_fragment.title;
|
|
23
|
+
this.text = tenant_document_fragment.text;
|
|
24
|
+
this.vector = tenant_document_fragment.vector;
|
|
25
|
+
}
|
|
26
|
+
static is(tenant_document_fragment) {
|
|
27
|
+
return (tenant_document_fragment !== undefined &&
|
|
28
|
+
typeof tenant_document_fragment.tenant_document_id === "string" &&
|
|
29
|
+
typeof tenant_document_fragment.fragment_id === "string" &&
|
|
30
|
+
is_fragment_type_id(tenant_document_fragment.fragment_type_id) &&
|
|
31
|
+
typeof tenant_document_fragment.max_size === "number" &&
|
|
32
|
+
typeof tenant_document_fragment.min_index === "number" &&
|
|
33
|
+
typeof tenant_document_fragment.max_index === "number" &&
|
|
34
|
+
typeof tenant_document_fragment.title === "string" &&
|
|
35
|
+
typeof tenant_document_fragment.text === "string" &&
|
|
36
|
+
Array.isArray(tenant_document_fragment.vector) && tenant_document_fragment.vector.every((coordinate) => typeof coordinate === "number"));
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -125,6 +125,7 @@ export * from "./types/state_permits/WI/WIStatePermitDocument"
|
|
|
125
125
|
|
|
126
126
|
export * from "./types/user/Tenant"
|
|
127
127
|
export * from "./types/user/TenantDocument"
|
|
128
|
+
export * from "./types/user/TenantDocumentFragment"
|
|
128
129
|
export * from "./types/user/TenantProvision"
|
|
129
130
|
export * from "./types/user/User"
|
|
130
131
|
export * from "./types/user/UserComment"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
|
|
2
2
|
|
|
3
3
|
export class TenantDocument {
|
|
4
|
+
readonly tenant_document_id : string
|
|
4
5
|
readonly tenant_id : string
|
|
5
|
-
readonly document_id : string
|
|
6
6
|
readonly file_suffix_id : string
|
|
7
7
|
readonly name : string
|
|
8
8
|
readonly fragment_type_id? : FragmentTypeID
|
|
@@ -16,8 +16,8 @@ export class TenantDocument {
|
|
|
16
16
|
if (!TenantDocument.is(tenant_document)) {
|
|
17
17
|
throw Error("Invalid input.")
|
|
18
18
|
}
|
|
19
|
+
this.tenant_document_id = tenant_document.tenant_document_id
|
|
19
20
|
this.tenant_id = tenant_document.tenant_id
|
|
20
|
-
this.document_id = tenant_document.document_id
|
|
21
21
|
this.file_suffix_id = tenant_document.file_suffix_id
|
|
22
22
|
this.name = tenant_document.name
|
|
23
23
|
this.fragment_type_id = tenant_document.fragment_type_id
|
|
@@ -30,8 +30,8 @@ export class TenantDocument {
|
|
|
30
30
|
static is(tenant_document : any) : tenant_document is TenantDocument {
|
|
31
31
|
return (
|
|
32
32
|
tenant_document !== undefined &&
|
|
33
|
+
typeof tenant_document.tenant_document_id === "string" &&
|
|
33
34
|
typeof tenant_document.tenant_id === "string" &&
|
|
34
|
-
typeof tenant_document.document_id === "string" &&
|
|
35
35
|
typeof tenant_document.file_suffix_id === "string" &&
|
|
36
36
|
typeof tenant_document.name === "string" &&
|
|
37
37
|
(tenant_document.fragment_type_id === undefined || is_fragment_type_id(tenant_document.fragment_type_id)) &&
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FragmentTypeID, is_fragment_type_id } from "../fragments/Fragment"
|
|
2
|
+
|
|
3
|
+
export class TenantDocumentFragment {
|
|
4
|
+
readonly tenant_document_id : string
|
|
5
|
+
readonly fragment_id : string
|
|
6
|
+
readonly fragment_type_id : FragmentTypeID
|
|
7
|
+
readonly max_size : number
|
|
8
|
+
readonly min_index : number
|
|
9
|
+
readonly max_index : number
|
|
10
|
+
readonly title : string
|
|
11
|
+
readonly text : string
|
|
12
|
+
readonly vector : number[]
|
|
13
|
+
readonly [x : string] : any
|
|
14
|
+
|
|
15
|
+
constructor(tenant_document_fragment : TenantDocumentFragment) {
|
|
16
|
+
if (!TenantDocumentFragment.is(tenant_document_fragment)) {
|
|
17
|
+
throw Error("Invalid input.")
|
|
18
|
+
}
|
|
19
|
+
this.tenant_document_id = tenant_document_fragment.tenant_document_id
|
|
20
|
+
this.fragment_id = tenant_document_fragment.fragment_id
|
|
21
|
+
this.fragment_type_id = tenant_document_fragment.fragment_type_id
|
|
22
|
+
this.max_size = tenant_document_fragment.max_size
|
|
23
|
+
this.min_index = tenant_document_fragment.min_index
|
|
24
|
+
this.max_index = tenant_document_fragment.max_index
|
|
25
|
+
this.title = tenant_document_fragment.title
|
|
26
|
+
this.text = tenant_document_fragment.text
|
|
27
|
+
this.vector = tenant_document_fragment.vector
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static is(tenant_document_fragment : any) : tenant_document_fragment is TenantDocumentFragment {
|
|
31
|
+
return (
|
|
32
|
+
tenant_document_fragment !== undefined &&
|
|
33
|
+
typeof tenant_document_fragment.tenant_document_id === "string" &&
|
|
34
|
+
typeof tenant_document_fragment.fragment_id === "string" &&
|
|
35
|
+
is_fragment_type_id(tenant_document_fragment.fragment_type_id) &&
|
|
36
|
+
typeof tenant_document_fragment.max_size === "number" &&
|
|
37
|
+
typeof tenant_document_fragment.min_index === "number" &&
|
|
38
|
+
typeof tenant_document_fragment.max_index === "number" &&
|
|
39
|
+
typeof tenant_document_fragment.title === "string" &&
|
|
40
|
+
typeof tenant_document_fragment.text === "string" &&
|
|
41
|
+
Array.isArray(tenant_document_fragment.vector) && tenant_document_fragment.vector.every((coordinate : any) => typeof coordinate === "number")
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
}
|