@mtna/pojo-social-ts 1.0.1

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/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/annotation/index';
2
+ export * from './lib/discussion/index';
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/annotation/index';
2
+ export * from './lib/discussion/index';
3
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { DescriptiveRole, OrganizationDetails } from '@mtna/core-user-ts';
2
+ import { Scope } from './scope.model';
3
+ import { Visibility } from './visibility.model';
4
+ /**
5
+ * Used to create a new {@link Annotation}. The properties that are set in this
6
+ * object will help describe how the {@link Annotation} should be stored so that
7
+ * it is available in the appropriate situation.
8
+ */
9
+ export interface AnnotationConfiguration {
10
+ /**
11
+ * If the annotating user can specify which organizations have access,
12
+ * this will have all the organizations to choose from.
13
+ */
14
+ organizations: OrganizationDetails[];
15
+ roles: DescriptiveRole[];
16
+ scopes: Scope[];
17
+ visibilities: Visibility[];
18
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=annotation-configuration.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation-configuration.model.js","sourceRoot":"","sources":["../../../../../src/lib/annotation/annotation-configuration.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { DescriptiveRole, OrganizationDetails } from '@mtna/core-user-ts';
2
+ import { User } from '@mtna/model-predefined-ts';
3
+ import { Scope } from './scope.model';
4
+ import { Visibility } from './visibility.model';
5
+ export interface Annotation {
6
+ author?: User;
7
+ created?: Date;
8
+ editable?: boolean;
9
+ lastEdited?: Date;
10
+ organizations?: OrganizationDetails[];
11
+ role?: DescriptiveRole;
12
+ scope: Scope;
13
+ text: string;
14
+ uri?: string;
15
+ visibility: Visibility;
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=annotation.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.model.js","sourceRoot":"","sources":["../../../../../src/lib/annotation/annotation.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './annotation-configuration.model';
2
+ export * from './annotation.model';
3
+ export * from './scope.model';
4
+ export * from './visibility.model';
@@ -0,0 +1,5 @@
1
+ export * from './annotation-configuration.model';
2
+ export * from './annotation.model';
3
+ export * from './scope.model';
4
+ export * from './visibility.model';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/annotation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Describes the scope of an annotation, does it apply only to a single instance
3
+ * or all instances.
4
+ */
5
+ export interface Scope {
6
+ description: string;
7
+ display: string;
8
+ enumValue: 'ALL' | 'INSTANCE';
9
+ instanceClass: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scope.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.model.js","sourceRoot":"","sources":["../../../../../src/lib/annotation/scope.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Describes how an {@link Annotation} should be stored and what level of
3
+ * visibility the properties should be set at. This will be used to determine
4
+ * the granularity with which {@link Annotation}s are stored.
5
+ */
6
+ export interface Visibility {
7
+ description: string;
8
+ display: string;
9
+ enumValue: 'PRIVATE' | 'PUBLIC' | 'CUSTOM' | 'ORGANIZATION';
10
+ instanceClass: string;
11
+ showRoles: boolean;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=visibility.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.model.js","sourceRoot":"","sources":["../../../../../src/lib/annotation/visibility.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { User } from '@mtna/model-predefined-ts';
2
+ import { Resource } from '@mtna/pojo-base-ts';
3
+ export interface Comment extends Resource {
4
+ author?: User;
5
+ created?: Date;
6
+ lastEdited?: Date;
7
+ text: string;
8
+ replies?: Array<Comment>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=comment.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.model.js","sourceRoot":"","sources":["../../../../../src/lib/discussion/comment.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './comment.model';
2
+ export * from './topic.model';
@@ -0,0 +1,3 @@
1
+ export * from './comment.model';
2
+ export * from './topic.model';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/discussion/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ResourceRole, Role } from '@mtna/core-user-ts';
2
+ import { User } from '@mtna/model-predefined-ts';
3
+ import { Resource } from '@mtna/pojo-base-ts';
4
+ import { Comment } from './comment.model';
5
+ export interface Topic extends Resource {
6
+ aboutReferences?: Array<string>;
7
+ author?: User;
8
+ commentResourceRole?: ResourceRole;
9
+ commentRoles?: Array<Role>;
10
+ comments?: Array<Comment>;
11
+ contextReference?: string;
12
+ created?: Date;
13
+ lastEdited?: Date;
14
+ locked?: boolean;
15
+ subject: string;
16
+ text: string;
17
+ visibilityResourceRole?: ResourceRole;
18
+ visibilityRoles?: Array<Role>;
19
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=topic.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic.model.js","sourceRoot":"","sources":["../../../../../src/lib/discussion/topic.model.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@mtna/pojo-social-ts",
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@mtna/core-user-ts": "^1.0.0",
6
+ "@mtna/model-predefined-ts": "^1.0.0",
7
+ "@mtna/pojo-base-ts": "^1.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "devDependencies": {
13
+ "@mtna/prettier-config-ui": "^1.0.1",
14
+ "prettier": "^2.3.1",
15
+ "typescript": "~4.3.5"
16
+ },
17
+ "engines": {
18
+ "node": ">= 14.16.0"
19
+ },
20
+ "prettier": "@mtna/prettier-config-ui",
21
+ "private": false,
22
+ "sideEffects": false
23
+ }