@imbricate/core 3.11.0 → 3.14.0
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/author/export.d.ts +6 -0
- package/author/export.js +22 -0
- package/database/base-class/essential-readonly.d.ts +18 -0
- package/database/base-class/essential-readonly.js +29 -0
- package/database/base-class/essential.d.ts +18 -0
- package/database/base-class/essential.js +36 -0
- package/database/base-class/exclude-annotation.d.ts +16 -0
- package/database/base-class/exclude-annotation.js +32 -0
- package/database/base-class/exclude-edit-records.d.ts +15 -0
- package/database/base-class/exclude-edit-records.js +31 -0
- package/database/base-class/full-feature-readonly.d.ts +21 -0
- package/database/base-class/full-feature-readonly.js +39 -0
- package/database/base-class/full-feature.d.ts +29 -0
- package/database/base-class/full-feature.js +24 -0
- package/database/export.d.ts +16 -0
- package/database/export.js +32 -0
- package/database/feature.d.ts +2 -7
- package/database/feature.js +3 -38
- package/database/interface.d.ts +41 -32
- package/database/outcome.d.ts +58 -0
- package/database/outcome.js +28 -0
- package/database-manager/base-class/full-feature.d.ts +17 -0
- package/database-manager/base-class/full-feature.js +19 -0
- package/database-manager/base-class/readonly.d.ts +16 -0
- package/database-manager/base-class/readonly.js +26 -0
- package/database-manager/database-manager.d.ts +52 -0
- package/{static/manager.js → database-manager/database-manager.js} +2 -2
- package/database-manager/export.d.ts +10 -0
- package/database-manager/export.js +26 -0
- package/database-manager/feature.d.ts +11 -0
- package/database-manager/feature.js +18 -0
- package/database-manager/outcome.d.ts +26 -0
- package/database-manager/outcome.js +16 -0
- package/document/base-class/essential-readonly.d.ts +17 -0
- package/document/base-class/essential-readonly.js +25 -0
- package/document/base-class/essential.d.ts +18 -0
- package/document/base-class/essential.js +33 -0
- package/document/base-class/exclude-annotation.d.ts +16 -0
- package/document/base-class/exclude-annotation.js +29 -0
- package/document/base-class/exclude-edit-records.d.ts +15 -0
- package/document/base-class/exclude-edit-records.js +28 -0
- package/document/base-class/full-feature-readonly.d.ts +19 -0
- package/document/base-class/full-feature-readonly.js +35 -0
- package/document/base-class/full-feature.d.ts +23 -0
- package/document/base-class/full-feature.js +21 -0
- package/document/export.d.ts +22 -0
- package/document/export.js +38 -0
- package/document/feature.d.ts +1 -5
- package/document/feature.js +2 -24
- package/document/interface.d.ts +23 -21
- package/document/outcome.d.ts +32 -0
- package/document/outcome.js +19 -0
- package/error/database/database-error.d.ts +9 -0
- package/error/database/database-error.js +16 -0
- package/error/database/feature-not-supported.d.ts +12 -0
- package/error/database/feature-not-supported.js +19 -0
- package/error/database-manager/database-manager-error.d.ts +9 -0
- package/error/database-manager/database-manager-error.js +16 -0
- package/error/database-manager/feature-not-supported.d.ts +12 -0
- package/error/database-manager/feature-not-supported.js +19 -0
- package/error/document/document-error.d.ts +9 -0
- package/error/document/document-error.js +16 -0
- package/error/document/feature-not-supported.d.ts +12 -0
- package/error/document/feature-not-supported.js +20 -0
- package/error/export.d.ts +22 -0
- package/error/export.js +38 -0
- package/error/imbricate-error.d.ts +14 -0
- package/error/imbricate-error.js +27 -0
- package/error/origin/feature-not-supported.d.ts +12 -0
- package/error/origin/feature-not-supported.js +20 -0
- package/error/origin/origin-error.d.ts +9 -0
- package/error/origin/origin-error.js +16 -0
- package/error/static/feature-not-supported.d.ts +12 -0
- package/error/static/feature-not-supported.js +19 -0
- package/error/static/static-error.d.ts +9 -0
- package/error/static/static-error.js +16 -0
- package/error/static-manager/feature-not-supported.d.ts +12 -0
- package/error/static-manager/feature-not-supported.js +19 -0
- package/error/static-manager/static-manager-error.d.ts +9 -0
- package/error/static-manager/static-manager-error.js +16 -0
- package/error/text/feature-not-supported.d.ts +12 -0
- package/error/text/feature-not-supported.js +19 -0
- package/error/text/text-error.d.ts +9 -0
- package/error/text/text-error.js +16 -0
- package/error/text-manager/feature-not-supported.d.ts +12 -0
- package/error/text-manager/feature-not-supported.js +19 -0
- package/error/text-manager/text-manager-error.d.ts +9 -0
- package/error/text-manager/text-manager-error.js +16 -0
- package/index.d.ts +11 -29
- package/index.js +11 -29
- package/loader/export.d.ts +8 -0
- package/loader/export.js +24 -0
- package/origin/base-class/essential.d.ts +15 -0
- package/origin/base-class/essential.js +27 -0
- package/origin/base-class/exclude-static.d.ts +13 -0
- package/origin/base-class/exclude-static.js +25 -0
- package/origin/base-class/full-feature.d.ts +21 -0
- package/origin/base-class/full-feature.js +20 -0
- package/origin/export.d.ts +12 -0
- package/origin/export.js +28 -0
- package/origin/feature.d.ts +12 -0
- package/origin/feature.js +19 -0
- package/origin/interface.d.ts +12 -5
- package/origin/outcome.d.ts +11 -0
- package/origin/outcome.js +10 -0
- package/origin/search.d.ts +0 -3
- package/package.json +1 -1
- package/static/base-class/author-only.d.ts +13 -0
- package/static/base-class/author-only.js +23 -0
- package/static/base-class/content-only.d.ts +12 -0
- package/static/base-class/content-only.js +23 -0
- package/static/base-class/full-feature.d.ts +15 -0
- package/static/base-class/full-feature.js +18 -0
- package/static/export.d.ts +12 -0
- package/static/export.js +28 -0
- package/static/feature.d.ts +10 -0
- package/static/feature.js +17 -0
- package/static/interface.d.ts +9 -2
- package/static/outcome.d.ts +10 -0
- package/static/outcome.js +10 -0
- package/static-manager/base-class/full-feature.d.ts +14 -0
- package/static-manager/base-class/full-feature.js +18 -0
- package/static-manager/base-class/readonly.d.ts +14 -0
- package/static-manager/base-class/readonly.js +23 -0
- package/static-manager/export.d.ts +10 -0
- package/static-manager/export.js +26 -0
- package/static-manager/feature.d.ts +10 -0
- package/static-manager/feature.js +17 -0
- package/static-manager/outcome.d.ts +16 -0
- package/static-manager/outcome.js +12 -0
- package/{static/manager.d.ts → static-manager/static-manager.d.ts} +8 -6
- package/{database/manager.js → static-manager/static-manager.js} +2 -2
- package/text/base-class/author-only.d.ts +13 -0
- package/text/base-class/author-only.js +23 -0
- package/text/base-class/content-only.d.ts +12 -0
- package/text/base-class/content-only.js +23 -0
- package/text/base-class/full-feature.d.ts +15 -0
- package/text/base-class/full-feature.js +18 -0
- package/text/export.d.ts +12 -0
- package/text/export.js +28 -0
- package/text/feature.d.ts +10 -0
- package/text/feature.js +17 -0
- package/text/interface.d.ts +9 -2
- package/text/outcome.d.ts +10 -0
- package/text/outcome.js +10 -0
- package/text-manager/base-class/full-feature.d.ts +14 -0
- package/text-manager/base-class/full-feature.js +18 -0
- package/text-manager/base-class/readonly.d.ts +14 -0
- package/text-manager/base-class/readonly.js +23 -0
- package/text-manager/export.d.ts +10 -0
- package/text-manager/export.js +26 -0
- package/text-manager/feature.d.ts +10 -0
- package/text-manager/feature.js +17 -0
- package/text-manager/outcome.d.ts +16 -0
- package/text-manager/outcome.js +12 -0
- package/{text/manager.d.ts → text-manager/text-manager.d.ts} +8 -6
- package/{text/manager.js → text-manager/text-manager.js} +2 -2
- package/database/manager.d.ts +0 -41
package/database/interface.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @namespace Database
|
|
4
4
|
* @description Interface
|
|
5
5
|
*/
|
|
6
|
-
import { IImbricateDocument } from "../document/interface";
|
|
7
6
|
import { DocumentProperties } from "../document/property";
|
|
8
7
|
import { DatabaseAnnotationValue, DatabaseAnnotations, DatabaseEditRecord, ImbricateDatabaseAuditOptions, ImbricateDocumentQuery } from "./definition";
|
|
9
8
|
import { IMBRICATE_DATABASE_FEATURE } from "./feature";
|
|
9
|
+
import { ImbricateDatabaseAddEditRecordsOutcome, ImbricateDatabaseCountDocumentsOutcome, ImbricateDatabaseCreateDocumentOutcome, ImbricateDatabaseDeleteAnnotationOutcome, ImbricateDatabaseGetDocumentOutcome, ImbricateDatabaseGetEditRecordsOutcome, ImbricateDatabasePutAnnotationOutcome, ImbricateDatabasePutSchemaOutcome, ImbricateDatabaseQueryDocumentsOutcome, ImbricateDatabaseRemoveDocumentOutcome } from "./outcome";
|
|
10
10
|
import { ImbricateDatabaseSchema } from "./schema";
|
|
11
11
|
export interface IImbricateDatabase {
|
|
12
12
|
/**
|
|
@@ -18,9 +18,9 @@ export interface IImbricateDatabase {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly databaseName: string;
|
|
20
20
|
/**
|
|
21
|
-
* Version of the database
|
|
21
|
+
* Version of the database
|
|
22
22
|
*/
|
|
23
|
-
readonly databaseVersion:
|
|
23
|
+
readonly databaseVersion: string;
|
|
24
24
|
/**
|
|
25
25
|
* Schema of the database
|
|
26
26
|
*/
|
|
@@ -42,11 +42,10 @@ export interface IImbricateDatabase {
|
|
|
42
42
|
* @param schema schema of the database
|
|
43
43
|
* @param auditOptions audit options of the database
|
|
44
44
|
*
|
|
45
|
-
* @returns a promise of the
|
|
46
|
-
*
|
|
47
|
-
* If you do not want to add the edit record, set `noEditRecord` to true
|
|
45
|
+
* @returns a promise of the outcome of the put schema
|
|
46
|
+
* Symbol: S_PutSchema_VersionConflict - if the version conflict
|
|
48
47
|
*/
|
|
49
|
-
putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
48
|
+
putSchema(schema: ImbricateDatabaseSchema, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutSchemaOutcome>;
|
|
50
49
|
/**
|
|
51
50
|
* Create a new document in the database
|
|
52
51
|
* If origin supports Document Edit Record, the edit record will be added by default
|
|
@@ -56,9 +55,10 @@ export interface IImbricateDatabase {
|
|
|
56
55
|
* @param properties properties of the document
|
|
57
56
|
* @param auditOptions audit options of the document
|
|
58
57
|
*
|
|
59
|
-
* @returns a promise of the
|
|
58
|
+
* @returns a promise of the outcome of the create document
|
|
59
|
+
* Symbol: S_CreateDocument_IdentifierDuplicated - if the identifier is duplicated
|
|
60
60
|
*/
|
|
61
|
-
createDocument(properties: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
61
|
+
createDocument(properties: DocumentProperties, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseCreateDocumentOutcome>;
|
|
62
62
|
/**
|
|
63
63
|
* Get one document from the database
|
|
64
64
|
*
|
|
@@ -66,9 +66,10 @@ export interface IImbricateDatabase {
|
|
|
66
66
|
*
|
|
67
67
|
* @param uniqueIdentifier unique identifier of the document
|
|
68
68
|
*
|
|
69
|
-
* @returns a promise of the
|
|
69
|
+
* @returns a promise of the outcome of the get document
|
|
70
|
+
* Symbol: S_GetDocument_NotFound - if the document is not found
|
|
70
71
|
*/
|
|
71
|
-
getDocument(uniqueIdentifier: string): PromiseLike<
|
|
72
|
+
getDocument(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseGetDocumentOutcome>;
|
|
72
73
|
/**
|
|
73
74
|
* Query documents from the database
|
|
74
75
|
*
|
|
@@ -76,9 +77,10 @@ export interface IImbricateDatabase {
|
|
|
76
77
|
*
|
|
77
78
|
* @param query query of the documents
|
|
78
79
|
*
|
|
79
|
-
* @returns a promise of the
|
|
80
|
+
* @returns a promise of the outcome of the query documents
|
|
81
|
+
* Symbol: S_QueryDocuments_Stale - if the documents are stale
|
|
80
82
|
*/
|
|
81
|
-
queryDocuments(query: ImbricateDocumentQuery): PromiseLike<
|
|
83
|
+
queryDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseQueryDocumentsOutcome>;
|
|
82
84
|
/**
|
|
83
85
|
* Count documents in the database
|
|
84
86
|
*
|
|
@@ -86,9 +88,10 @@ export interface IImbricateDatabase {
|
|
|
86
88
|
*
|
|
87
89
|
* @param query query of the documents
|
|
88
90
|
*
|
|
89
|
-
* @returns a promise of the
|
|
91
|
+
* @returns a promise of the outcome of the count documents
|
|
92
|
+
* Symbol: S_CountDocuments_Stale - if the documents are stale
|
|
90
93
|
*/
|
|
91
|
-
countDocuments(query: ImbricateDocumentQuery): PromiseLike<
|
|
94
|
+
countDocuments(query: ImbricateDocumentQuery): PromiseLike<ImbricateDatabaseCountDocumentsOutcome>;
|
|
92
95
|
/**
|
|
93
96
|
* Remove a document from the database
|
|
94
97
|
*
|
|
@@ -96,10 +99,13 @@ export interface IImbricateDatabase {
|
|
|
96
99
|
*
|
|
97
100
|
* @param uniqueIdentifier unique identifier of the document
|
|
98
101
|
* @param auditOptions audit options of the document
|
|
102
|
+
*
|
|
103
|
+
* @returns a promise of the outcome of the remove document
|
|
104
|
+
* Symbol: S_RemoveDocument_NotFound - if the document is not found
|
|
99
105
|
*/
|
|
100
|
-
removeDocument(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<
|
|
106
|
+
removeDocument(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseRemoveDocumentOutcome>;
|
|
101
107
|
/**
|
|
102
|
-
* Put annotation to the database
|
|
108
|
+
* Put annotation to the database
|
|
103
109
|
*
|
|
104
110
|
* RequireFeature: DATABASE_PUT_ANNOTATION
|
|
105
111
|
*
|
|
@@ -108,27 +114,26 @@ export interface IImbricateDatabase {
|
|
|
108
114
|
* @param value value of the annotation
|
|
109
115
|
* @param auditOptions audit options of the database
|
|
110
116
|
*
|
|
111
|
-
* @returns a promise of the
|
|
112
|
-
*
|
|
113
|
-
*
|
|
117
|
+
* @returns a promise of the outcome of the put annotation
|
|
118
|
+
* Symbol: S_PutAnnotation_InvalidNamespace - if the namespace is invalid
|
|
119
|
+
* Symbol: S_PutAnnotation_InvalidIdentifier - if the identifier is invalid
|
|
114
120
|
*/
|
|
115
|
-
putAnnotation
|
|
121
|
+
putAnnotation(namespace: string, identifier: string, value: DatabaseAnnotationValue, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabasePutAnnotationOutcome>;
|
|
116
122
|
/**
|
|
117
|
-
* Delete annotation from the database
|
|
123
|
+
* Delete annotation from the database
|
|
118
124
|
*
|
|
119
|
-
* RequireFeature:
|
|
125
|
+
* RequireFeature: DATABASE_DELETE_ANNOTATION
|
|
120
126
|
*
|
|
121
127
|
* @param namespace namespace of the annotation
|
|
122
128
|
* @param identifier identifier of the annotation
|
|
123
129
|
* @param auditOptions audit options of the database
|
|
124
130
|
*
|
|
125
|
-
* @returns a promise of the
|
|
126
|
-
*
|
|
127
|
-
* If you do not want to add the edit record, set `noEditRecord` to true in audit options
|
|
131
|
+
* @returns a promise of the outcome of the delete annotation
|
|
132
|
+
* Symbol: S_DeleteAnnotation_NotFound - if the annotation is not found
|
|
128
133
|
*/
|
|
129
|
-
deleteAnnotation
|
|
134
|
+
deleteAnnotation(namespace: string, identifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseDeleteAnnotationOutcome>;
|
|
130
135
|
/**
|
|
131
|
-
* Add edit records to the database
|
|
136
|
+
* Add edit records to the database
|
|
132
137
|
* This method is optional, if not implemented, means the origin
|
|
133
138
|
* 1. The origin does not support edit records
|
|
134
139
|
* 2. The origin force to add edit records when put properties
|
|
@@ -136,17 +141,21 @@ export interface IImbricateDatabase {
|
|
|
136
141
|
* RequireFeature: DATABASE_PUT_EDIT_RECORD
|
|
137
142
|
*
|
|
138
143
|
* @param records database edit records
|
|
144
|
+
*
|
|
145
|
+
* @returns a promise of the outcome of the add edit records
|
|
146
|
+
* Symbol: S_AddEditRecords_InvalidEditRecord - if the edit record is invalid
|
|
139
147
|
*/
|
|
140
|
-
addEditRecords
|
|
148
|
+
addEditRecords(records: DatabaseEditRecord[]): PromiseLike<ImbricateDatabaseAddEditRecordsOutcome>;
|
|
141
149
|
/**
|
|
142
|
-
* Get edit records of the database
|
|
150
|
+
* Get edit records of the database
|
|
143
151
|
* This method is optional, if not implemented, means the origin
|
|
144
152
|
* 1. The origin does not support edit records
|
|
145
153
|
* 2. The origin force to add edit records when put properties
|
|
146
154
|
*
|
|
147
155
|
* RequireFeature: DATABASE_GET_EDIT_RECORD
|
|
148
156
|
*
|
|
149
|
-
* @returns a promise of the
|
|
157
|
+
* @returns a promise of the outcome of the get edit records
|
|
158
|
+
* Symbol: S_GetEditRecords_NotFound - if the edit records are not found
|
|
150
159
|
*/
|
|
151
|
-
getEditRecords
|
|
160
|
+
getEditRecords(): PromiseLike<ImbricateDatabaseGetEditRecordsOutcome>;
|
|
152
161
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Database
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
import { IImbricateDocument } from "../document/interface";
|
|
7
|
+
import { DatabaseEditRecord } from "./definition";
|
|
8
|
+
export declare const S_Database_PutSchema_VersionConflict: unique symbol;
|
|
9
|
+
export type ImbricateDatabasePutSchemaOutcomeSymbol = typeof S_Database_PutSchema_VersionConflict;
|
|
10
|
+
export type ImbricateDatabasePutSchemaOutcome = {
|
|
11
|
+
readonly editRecords: DatabaseEditRecord[];
|
|
12
|
+
} | ImbricateDatabasePutSchemaOutcomeSymbol;
|
|
13
|
+
export declare const S_Database_CreateDocument_IdentifierDuplicated: unique symbol;
|
|
14
|
+
export type ImbricateDatabaseCreateDocumentOutcomeSymbol = typeof S_Database_CreateDocument_IdentifierDuplicated;
|
|
15
|
+
export type ImbricateDatabaseCreateDocumentOutcome = {
|
|
16
|
+
readonly document: IImbricateDocument;
|
|
17
|
+
} | ImbricateDatabaseCreateDocumentOutcomeSymbol;
|
|
18
|
+
export declare const S_Database_GetDocument_NotFound: unique symbol;
|
|
19
|
+
export type ImbricateDatabaseGetDocumentOutcomeSymbol = typeof S_Database_GetDocument_NotFound;
|
|
20
|
+
export type ImbricateDatabaseGetDocumentOutcome = {
|
|
21
|
+
readonly document: IImbricateDocument;
|
|
22
|
+
} | ImbricateDatabaseGetDocumentOutcomeSymbol;
|
|
23
|
+
export declare const S_Database_QueryDocuments_Stale: unique symbol;
|
|
24
|
+
export type ImbricateDatabaseQueryDocumentsOutcomeSymbol = typeof S_Database_QueryDocuments_Stale;
|
|
25
|
+
export type ImbricateDatabaseQueryDocumentsOutcome = {
|
|
26
|
+
readonly documents: IImbricateDocument[];
|
|
27
|
+
} | ImbricateDatabaseQueryDocumentsOutcomeSymbol;
|
|
28
|
+
export declare const S_Database_CountDocuments_Stale: unique symbol;
|
|
29
|
+
export type ImbricateDatabaseCountDocumentsOutcomeSymbol = typeof S_Database_CountDocuments_Stale;
|
|
30
|
+
export type ImbricateDatabaseCountDocumentsOutcome = {
|
|
31
|
+
readonly count: number;
|
|
32
|
+
} | ImbricateDatabaseCountDocumentsOutcomeSymbol;
|
|
33
|
+
export declare const S_Database_RemoveDocument_NotFound: unique symbol;
|
|
34
|
+
export type ImbricateDatabaseRemoveDocumentOutcomeSymbol = typeof S_Database_RemoveDocument_NotFound;
|
|
35
|
+
export type ImbricateDatabaseRemoveDocumentOutcome = {
|
|
36
|
+
readonly success: boolean;
|
|
37
|
+
} | ImbricateDatabaseRemoveDocumentOutcomeSymbol;
|
|
38
|
+
export declare const S_Database_PutAnnotation_InvalidNamespace: unique symbol;
|
|
39
|
+
export declare const S_Database_PutAnnotation_InvalidIdentifier: unique symbol;
|
|
40
|
+
export type ImbricateDatabasePutAnnotationOutcomeSymbol = typeof S_Database_PutAnnotation_InvalidNamespace | typeof S_Database_PutAnnotation_InvalidIdentifier;
|
|
41
|
+
export type ImbricateDatabasePutAnnotationOutcome = {
|
|
42
|
+
readonly editRecords: DatabaseEditRecord[];
|
|
43
|
+
} | ImbricateDatabasePutAnnotationOutcomeSymbol;
|
|
44
|
+
export declare const S_Database_DeleteAnnotation_NotFound: unique symbol;
|
|
45
|
+
export type ImbricateDatabaseDeleteAnnotationOutcomeSymbol = typeof S_Database_DeleteAnnotation_NotFound;
|
|
46
|
+
export type ImbricateDatabaseDeleteAnnotationOutcome = {
|
|
47
|
+
readonly editRecords: DatabaseEditRecord[];
|
|
48
|
+
} | ImbricateDatabaseDeleteAnnotationOutcomeSymbol;
|
|
49
|
+
export declare const S_Database_AddEditRecords_InvalidEditRecord: unique symbol;
|
|
50
|
+
export type ImbricateDatabaseAddEditRecordsOutcomeSymbol = typeof S_Database_AddEditRecords_InvalidEditRecord;
|
|
51
|
+
export type ImbricateDatabaseAddEditRecordsOutcome = {
|
|
52
|
+
readonly editRecords: DatabaseEditRecord[];
|
|
53
|
+
} | ImbricateDatabaseAddEditRecordsOutcomeSymbol;
|
|
54
|
+
export declare const S_Database_GetEditRecords_NotFound: unique symbol;
|
|
55
|
+
export type ImbricateDatabaseGetEditRecordsOutcomeSymbol = typeof S_Database_GetEditRecords_NotFound;
|
|
56
|
+
export type ImbricateDatabaseGetEditRecordsOutcome = {
|
|
57
|
+
readonly editRecords: DatabaseEditRecord[];
|
|
58
|
+
} | ImbricateDatabaseGetEditRecordsOutcomeSymbol;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Database
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_Database_GetEditRecords_NotFound = exports.S_Database_AddEditRecords_InvalidEditRecord = exports.S_Database_DeleteAnnotation_NotFound = exports.S_Database_PutAnnotation_InvalidIdentifier = exports.S_Database_PutAnnotation_InvalidNamespace = exports.S_Database_RemoveDocument_NotFound = exports.S_Database_CountDocuments_Stale = exports.S_Database_QueryDocuments_Stale = exports.S_Database_GetDocument_NotFound = exports.S_Database_CreateDocument_IdentifierDuplicated = exports.S_Database_PutSchema_VersionConflict = void 0;
|
|
9
|
+
// Put Schema
|
|
10
|
+
exports.S_Database_PutSchema_VersionConflict = Symbol("Database_PutSchema_VersionConflict");
|
|
11
|
+
// Create Document
|
|
12
|
+
exports.S_Database_CreateDocument_IdentifierDuplicated = Symbol("Database_CreateDocument_IdentifierDuplicated");
|
|
13
|
+
// Get Document
|
|
14
|
+
exports.S_Database_GetDocument_NotFound = Symbol("Database_GetDocument_NotFound");
|
|
15
|
+
// Query Documents
|
|
16
|
+
exports.S_Database_QueryDocuments_Stale = Symbol("Database_QueryDocuments_Stale");
|
|
17
|
+
exports.S_Database_CountDocuments_Stale = Symbol("Database_CountDocuments_Stale");
|
|
18
|
+
// Remove Document
|
|
19
|
+
exports.S_Database_RemoveDocument_NotFound = Symbol("Database_RemoveDocument_NotFound");
|
|
20
|
+
// Put Annotation
|
|
21
|
+
exports.S_Database_PutAnnotation_InvalidNamespace = Symbol("Database_PutAnnotation_InvalidNamespace");
|
|
22
|
+
exports.S_Database_PutAnnotation_InvalidIdentifier = Symbol("Database_PutAnnotation_InvalidIdentifier");
|
|
23
|
+
// Delete Annotation
|
|
24
|
+
exports.S_Database_DeleteAnnotation_NotFound = Symbol("Database_DeleteAnnotation_NotFound");
|
|
25
|
+
// Add Edit Records
|
|
26
|
+
exports.S_Database_AddEditRecords_InvalidEditRecord = Symbol("Database_AddEditRecords_InvalidEditRecord");
|
|
27
|
+
// Get Edit Records
|
|
28
|
+
exports.S_Database_GetEditRecords_NotFound = Symbol("Database_GetEditRecords_NotFound");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Full Feature
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateDatabaseAuditOptions } from "../../database/definition";
|
|
7
|
+
import { ImbricateDatabaseSchemaForCreation } from "../../database/schema";
|
|
8
|
+
import { IImbricateDatabaseManager } from "../database-manager";
|
|
9
|
+
import { IMBRICATE_DATABASE_MANAGER_FEATURE } from "../feature";
|
|
10
|
+
import { ImbricateDatabaseManagerCreateDatabaseOutcome, ImbricateDatabaseManagerGetDatabaseOutcome, ImbricateDatabaseManagerListDatabasesOutcome, ImbricateDatabaseManagerRemoveDatabaseOutcome } from "../outcome";
|
|
11
|
+
export declare abstract class ImbricateDatabaseManagerFullFeatureBase implements IImbricateDatabaseManager {
|
|
12
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_MANAGER_FEATURE[];
|
|
13
|
+
abstract listDatabases(): PromiseLike<ImbricateDatabaseManagerListDatabasesOutcome>;
|
|
14
|
+
abstract getDatabase(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseManagerGetDatabaseOutcome>;
|
|
15
|
+
abstract createDatabase(databaseName: string, schema: ImbricateDatabaseSchemaForCreation, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseManagerCreateDatabaseOutcome>;
|
|
16
|
+
abstract removeDatabase(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseManagerRemoveDatabaseOutcome>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace DatabaseManager
|
|
5
|
+
* @description Full Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseManagerFullFeatureBase = void 0;
|
|
9
|
+
const feature_1 = require("../feature");
|
|
10
|
+
class ImbricateDatabaseManagerFullFeatureBase {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.supportedFeatures = [
|
|
13
|
+
feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_GET_DATABASE,
|
|
14
|
+
feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_PUT_DATABASE,
|
|
15
|
+
feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_DELETE_DATABASE,
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ImbricateDatabaseManagerFullFeatureBase = ImbricateDatabaseManagerFullFeatureBase;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateDatabaseAuditOptions } from "../../database/definition";
|
|
7
|
+
import { ImbricateDatabaseSchemaForCreation } from "../../database/schema";
|
|
8
|
+
import { IImbricateDatabaseManager } from "../database-manager";
|
|
9
|
+
import { IMBRICATE_DATABASE_MANAGER_FEATURE } from "../feature";
|
|
10
|
+
import { ImbricateDatabaseManagerCreateDatabaseOutcome, ImbricateDatabaseManagerRemoveDatabaseOutcome } from "../outcome";
|
|
11
|
+
import { ImbricateDatabaseManagerFullFeatureBase } from "./full-feature";
|
|
12
|
+
export declare abstract class ImbricateDatabaseManagerReadonlyBase extends ImbricateDatabaseManagerFullFeatureBase implements IImbricateDatabaseManager {
|
|
13
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_MANAGER_FEATURE[];
|
|
14
|
+
createDatabase(_databaseName: string, _schema: ImbricateDatabaseSchemaForCreation, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseManagerCreateDatabaseOutcome>;
|
|
15
|
+
removeDatabase(_uniqueIdentifier: string, _auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseManagerRemoveDatabaseOutcome>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace DatabaseManager
|
|
5
|
+
* @description Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDatabaseManagerReadonlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/database-manager/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDatabaseManagerReadonlyBase extends full_feature_1.ImbricateDatabaseManagerFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.supportedFeatures = [
|
|
16
|
+
feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_GET_DATABASE,
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
createDatabase(_databaseName, _schema, _auditOptions) {
|
|
20
|
+
throw feature_not_supported_1.ImbricateDatabaseManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_PUT_DATABASE);
|
|
21
|
+
}
|
|
22
|
+
removeDatabase(_uniqueIdentifier, _auditOptions) {
|
|
23
|
+
throw feature_not_supported_1.ImbricateDatabaseManagerFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DATABASE_MANAGER_FEATURE.DATABASE_MANAGER_DELETE_DATABASE);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ImbricateDatabaseManagerReadonlyBase = ImbricateDatabaseManagerReadonlyBase;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Database Manager
|
|
5
|
+
*/
|
|
6
|
+
import { ImbricateDatabaseAuditOptions } from "../database/definition";
|
|
7
|
+
import { ImbricateDatabaseSchemaForCreation } from "../database/schema";
|
|
8
|
+
import { IMBRICATE_DATABASE_MANAGER_FEATURE } from "./feature";
|
|
9
|
+
import { ImbricateDatabaseManagerCreateDatabaseOutcome, ImbricateDatabaseManagerGetDatabaseOutcome, ImbricateDatabaseManagerListDatabasesOutcome, ImbricateDatabaseManagerRemoveDatabaseOutcome } from "./outcome";
|
|
10
|
+
export interface IImbricateDatabaseManager {
|
|
11
|
+
/**
|
|
12
|
+
* Supported features of the database manager
|
|
13
|
+
*/
|
|
14
|
+
readonly supportedFeatures: IMBRICATE_DATABASE_MANAGER_FEATURE[];
|
|
15
|
+
/**
|
|
16
|
+
* List all databases in the origin
|
|
17
|
+
*
|
|
18
|
+
* @returns a promise of the databases in the origin
|
|
19
|
+
* Symbol: S_DatabaseManager_ListDatabases_Stale - if the databases are stale
|
|
20
|
+
*/
|
|
21
|
+
listDatabases(): PromiseLike<ImbricateDatabaseManagerListDatabasesOutcome>;
|
|
22
|
+
/**
|
|
23
|
+
* Get one database from the origin
|
|
24
|
+
*
|
|
25
|
+
* @param uniqueIdentifier unique identifier of the database
|
|
26
|
+
*
|
|
27
|
+
* @returns a promise of the database
|
|
28
|
+
* Symbol: S_DatabaseManager_GetDatabase_NotFound - if the database is not found
|
|
29
|
+
*/
|
|
30
|
+
getDatabase(uniqueIdentifier: string): PromiseLike<ImbricateDatabaseManagerGetDatabaseOutcome>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new database
|
|
33
|
+
*
|
|
34
|
+
* @param databaseName name of the database
|
|
35
|
+
* @param schema schema of the database
|
|
36
|
+
* @param auditOptions audit options of the database
|
|
37
|
+
*
|
|
38
|
+
* @returns a promise of the created database
|
|
39
|
+
* Symbol: S_DatabaseManager_CreateDatabase_IdentifierDuplicated - if the identifier is duplicated
|
|
40
|
+
*/
|
|
41
|
+
createDatabase(databaseName: string, schema: ImbricateDatabaseSchemaForCreation, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseManagerCreateDatabaseOutcome>;
|
|
42
|
+
/**
|
|
43
|
+
* Remove a database from the origin
|
|
44
|
+
*
|
|
45
|
+
* @param uniqueIdentifier unique identifier of the database
|
|
46
|
+
* @param auditOptions audit options of deletion
|
|
47
|
+
*
|
|
48
|
+
* @returns a promise of the outcome of the removal
|
|
49
|
+
* Symbol: S_DatabaseManager_RemoveDatabase_NotFound - if the database is not found
|
|
50
|
+
*/
|
|
51
|
+
removeDatabase(uniqueIdentifier: string, auditOptions?: ImbricateDatabaseAuditOptions): PromiseLike<ImbricateDatabaseManagerRemoveDatabaseOutcome>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Export
|
|
5
|
+
*/
|
|
6
|
+
export * from "./base-class/full-feature";
|
|
7
|
+
export * from "./base-class/readonly";
|
|
8
|
+
export * from "./database-manager";
|
|
9
|
+
export * from "./feature";
|
|
10
|
+
export * from "./outcome";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace DatabaseManager
|
|
5
|
+
* @description Export
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./base-class/full-feature"), exports);
|
|
23
|
+
__exportStar(require("./base-class/readonly"), exports);
|
|
24
|
+
__exportStar(require("./database-manager"), exports);
|
|
25
|
+
__exportStar(require("./feature"), exports);
|
|
26
|
+
__exportStar(require("./outcome"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Feature
|
|
5
|
+
*/
|
|
6
|
+
export declare enum IMBRICATE_DATABASE_MANAGER_FEATURE {
|
|
7
|
+
DATABASE_MANAGER_GET_DATABASE = "DATABASE_MANAGER_GET_DATABASE",
|
|
8
|
+
DATABASE_MANAGER_PUT_DATABASE = "DATABASE_MANAGER_PUT_DATABASE",
|
|
9
|
+
DATABASE_MANAGER_DELETE_DATABASE = "DATABASE_MANAGER_DELETE_DATABASE"
|
|
10
|
+
}
|
|
11
|
+
export declare const checkImbricateDatabaseManagerFeatureSupported: (features: IMBRICATE_DATABASE_MANAGER_FEATURE[], feature: IMBRICATE_DATABASE_MANAGER_FEATURE) => boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace DatabaseManager
|
|
5
|
+
* @description Feature
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.checkImbricateDatabaseManagerFeatureSupported = exports.IMBRICATE_DATABASE_MANAGER_FEATURE = void 0;
|
|
9
|
+
var IMBRICATE_DATABASE_MANAGER_FEATURE;
|
|
10
|
+
(function (IMBRICATE_DATABASE_MANAGER_FEATURE) {
|
|
11
|
+
IMBRICATE_DATABASE_MANAGER_FEATURE["DATABASE_MANAGER_GET_DATABASE"] = "DATABASE_MANAGER_GET_DATABASE";
|
|
12
|
+
IMBRICATE_DATABASE_MANAGER_FEATURE["DATABASE_MANAGER_PUT_DATABASE"] = "DATABASE_MANAGER_PUT_DATABASE";
|
|
13
|
+
IMBRICATE_DATABASE_MANAGER_FEATURE["DATABASE_MANAGER_DELETE_DATABASE"] = "DATABASE_MANAGER_DELETE_DATABASE";
|
|
14
|
+
})(IMBRICATE_DATABASE_MANAGER_FEATURE || (exports.IMBRICATE_DATABASE_MANAGER_FEATURE = IMBRICATE_DATABASE_MANAGER_FEATURE = {}));
|
|
15
|
+
const checkImbricateDatabaseManagerFeatureSupported = (features, feature) => {
|
|
16
|
+
return features.includes(feature);
|
|
17
|
+
};
|
|
18
|
+
exports.checkImbricateDatabaseManagerFeatureSupported = checkImbricateDatabaseManagerFeatureSupported;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace DatabaseManager
|
|
4
|
+
* @description Outcome
|
|
5
|
+
*/
|
|
6
|
+
import { IImbricateDatabase } from "../database/interface";
|
|
7
|
+
export declare const S_DatabaseManager_ListDatabases_Stale: unique symbol;
|
|
8
|
+
export type ImbricateDatabaseManagerListDatabasesOutcomeSymbol = typeof S_DatabaseManager_ListDatabases_Stale;
|
|
9
|
+
export type ImbricateDatabaseManagerListDatabasesOutcome = {
|
|
10
|
+
readonly databases: IImbricateDatabase[];
|
|
11
|
+
} | ImbricateDatabaseManagerListDatabasesOutcomeSymbol;
|
|
12
|
+
export declare const S_DatabaseManager_GetDatabase_NotFound: unique symbol;
|
|
13
|
+
export type ImbricateDatabaseManagerGetDatabaseOutcomeSymbol = typeof S_DatabaseManager_GetDatabase_NotFound;
|
|
14
|
+
export type ImbricateDatabaseManagerGetDatabaseOutcome = {
|
|
15
|
+
readonly database: IImbricateDatabase;
|
|
16
|
+
} | ImbricateDatabaseManagerGetDatabaseOutcomeSymbol;
|
|
17
|
+
export declare const S_DatabaseManager_CreateDatabase_IdentifierDuplicated: unique symbol;
|
|
18
|
+
export type ImbricateDatabaseManagerCreateDatabaseOutcomeSymbol = typeof S_DatabaseManager_CreateDatabase_IdentifierDuplicated;
|
|
19
|
+
export type ImbricateDatabaseManagerCreateDatabaseOutcome = {
|
|
20
|
+
readonly database: IImbricateDatabase;
|
|
21
|
+
} | ImbricateDatabaseManagerCreateDatabaseOutcomeSymbol;
|
|
22
|
+
export declare const S_DatabaseManager_RemoveDatabase_NotFound: unique symbol;
|
|
23
|
+
export type ImbricateDatabaseManagerRemoveDatabaseOutcomeSymbol = typeof S_DatabaseManager_RemoveDatabase_NotFound;
|
|
24
|
+
export type ImbricateDatabaseManagerRemoveDatabaseOutcome = {
|
|
25
|
+
readonly success: boolean;
|
|
26
|
+
} | ImbricateDatabaseManagerRemoveDatabaseOutcomeSymbol;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace DatabaseManager
|
|
5
|
+
* @description Outcome
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.S_DatabaseManager_RemoveDatabase_NotFound = exports.S_DatabaseManager_CreateDatabase_IdentifierDuplicated = exports.S_DatabaseManager_GetDatabase_NotFound = exports.S_DatabaseManager_ListDatabases_Stale = void 0;
|
|
9
|
+
// Manager List Databases
|
|
10
|
+
exports.S_DatabaseManager_ListDatabases_Stale = Symbol("DatabaseManager_ListDatabases_Stale");
|
|
11
|
+
// Manager Get Database
|
|
12
|
+
exports.S_DatabaseManager_GetDatabase_NotFound = Symbol("DatabaseManager_GetDatabase_NotFound");
|
|
13
|
+
// Manager Create Database
|
|
14
|
+
exports.S_DatabaseManager_CreateDatabase_IdentifierDuplicated = Symbol("DatabaseManager_CreateDatabase_IdentifierDuplicated");
|
|
15
|
+
// Manager Remove Database
|
|
16
|
+
exports.S_DatabaseManager_RemoveDatabase_NotFound = Symbol("DatabaseManager_RemoveDatabase_NotFound");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Document
|
|
4
|
+
* @description Essential Readonly
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentAnnotations, ImbricateDocumentAuditOptions } from "../definition";
|
|
7
|
+
import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDocument } from "../interface";
|
|
9
|
+
import { ImbricateDocumentPutPropertyOutcome } from "../outcome";
|
|
10
|
+
import { DocumentProperties, DocumentPropertyKey, DocumentPropertyValue, IMBRICATE_PROPERTY_TYPE } from "../property";
|
|
11
|
+
import { ImbricateDocumentEssentialBase } from "./essential";
|
|
12
|
+
export declare abstract class ImbricateDocumentEssentialReadonlyBase extends ImbricateDocumentEssentialBase implements IImbricateDocument {
|
|
13
|
+
readonly annotations: DocumentAnnotations;
|
|
14
|
+
readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
|
|
15
|
+
putProperty(_key: DocumentPropertyKey, _value: DocumentPropertyValue<IMBRICATE_PROPERTY_TYPE>, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
|
|
16
|
+
putProperties(_properties: DocumentProperties, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutPropertyOutcome>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Document
|
|
5
|
+
* @description Essential Readonly
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDocumentEssentialReadonlyBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/document/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const essential_1 = require("./essential");
|
|
12
|
+
class ImbricateDocumentEssentialReadonlyBase extends essential_1.ImbricateDocumentEssentialBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.annotations = {};
|
|
16
|
+
this.supportedFeatures = [];
|
|
17
|
+
}
|
|
18
|
+
putProperty(_key, _value, _auditOptions) {
|
|
19
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
|
|
20
|
+
}
|
|
21
|
+
putProperties(_properties, _auditOptions) {
|
|
22
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.ImbricateDocumentEssentialReadonlyBase = ImbricateDocumentEssentialReadonlyBase;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Document
|
|
4
|
+
* @description Essential
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentAnnotationValue, DocumentAnnotations, DocumentEditRecord, ImbricateDocumentAuditOptions } from "../definition";
|
|
7
|
+
import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDocument } from "../interface";
|
|
9
|
+
import { ImbricateDocumentAddEditRecordsOutcome, ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentGetEditRecordsOutcome, ImbricateDocumentPutAnnotationOutcome } from "../outcome";
|
|
10
|
+
import { ImbricateDocumentFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateDocumentEssentialBase extends ImbricateDocumentFullFeatureBase implements IImbricateDocument {
|
|
12
|
+
readonly annotations: DocumentAnnotations;
|
|
13
|
+
readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
|
|
14
|
+
putAnnotation(_namespace: string, _identifier: string, _value: DocumentAnnotationValue, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
|
|
15
|
+
deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
|
|
16
|
+
addEditRecords(_records: DocumentEditRecord[]): Promise<ImbricateDocumentAddEditRecordsOutcome>;
|
|
17
|
+
getEditRecords(): Promise<ImbricateDocumentGetEditRecordsOutcome>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @author WMXPY
|
|
4
|
+
* @namespace Document
|
|
5
|
+
* @description Essential
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ImbricateDocumentEssentialBase = void 0;
|
|
9
|
+
const feature_not_supported_1 = require("../../error/document/feature-not-supported");
|
|
10
|
+
const feature_1 = require("../feature");
|
|
11
|
+
const full_feature_1 = require("./full-feature");
|
|
12
|
+
class ImbricateDocumentEssentialBase extends full_feature_1.ImbricateDocumentFullFeatureBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.annotations = {};
|
|
16
|
+
this.supportedFeatures = [
|
|
17
|
+
feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_PROPERTY,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
putAnnotation(_namespace, _identifier, _value, _auditOptions) {
|
|
21
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_ANNOTATION);
|
|
22
|
+
}
|
|
23
|
+
deleteAnnotation(_namespace, _identifier, _auditOptions) {
|
|
24
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_DELETE_ANNOTATION);
|
|
25
|
+
}
|
|
26
|
+
addEditRecords(_records) {
|
|
27
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_PUT_EDIT_RECORD);
|
|
28
|
+
}
|
|
29
|
+
getEditRecords() {
|
|
30
|
+
throw feature_not_supported_1.ImbricateDocumentFeatureNotSupportedError.withFeature(feature_1.IMBRICATE_DOCUMENT_FEATURE.DOCUMENT_GET_EDIT_RECORD);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ImbricateDocumentEssentialBase = ImbricateDocumentEssentialBase;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @namespace Document
|
|
4
|
+
* @description Exclude Annotation
|
|
5
|
+
*/
|
|
6
|
+
import { DocumentAnnotationValue, DocumentAnnotations, ImbricateDocumentAuditOptions } from "../definition";
|
|
7
|
+
import { IMBRICATE_DOCUMENT_FEATURE } from "../feature";
|
|
8
|
+
import { IImbricateDocument } from "../interface";
|
|
9
|
+
import { ImbricateDocumentDeleteAnnotationOutcome, ImbricateDocumentPutAnnotationOutcome } from "../outcome";
|
|
10
|
+
import { ImbricateDocumentFullFeatureBase } from "./full-feature";
|
|
11
|
+
export declare abstract class ImbricateDocumentExcludeAnnotationBase extends ImbricateDocumentFullFeatureBase implements IImbricateDocument {
|
|
12
|
+
readonly annotations: DocumentAnnotations;
|
|
13
|
+
readonly supportedFeatures: IMBRICATE_DOCUMENT_FEATURE[];
|
|
14
|
+
putAnnotation(_namespace: string, _identifier: string, _value: DocumentAnnotationValue, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentPutAnnotationOutcome>;
|
|
15
|
+
deleteAnnotation(_namespace: string, _identifier: string, _auditOptions?: ImbricateDocumentAuditOptions): Promise<ImbricateDocumentDeleteAnnotationOutcome>;
|
|
16
|
+
}
|