@mcma/core 0.16.16 → 0.16.18
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/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/lib/config-variables.d.ts +12 -12
- package/dist/lib/config-variables.js +49 -49
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/index.js +21 -21
- package/dist/lib/logging/console-logger-provider.d.ts +8 -8
- package/dist/lib/logging/console-logger-provider.js +14 -14
- package/dist/lib/logging/console-logger.d.ts +7 -7
- package/dist/lib/logging/console-logger.js +24 -24
- package/dist/lib/logging/index.d.ts +5 -5
- package/dist/lib/logging/index.js +21 -21
- package/dist/lib/logging/log-event.d.ts +15 -15
- package/dist/lib/logging/log-event.js +75 -75
- package/dist/lib/logging/logger-provider.d.ts +5 -5
- package/dist/lib/logging/logger-provider.js +2 -2
- package/dist/lib/logging/logger.d.ts +41 -41
- package/dist/lib/logging/logger.js +87 -87
- package/dist/lib/mcma-exception.d.ts +8 -8
- package/dist/lib/mcma-exception.js +44 -44
- package/dist/lib/model/index.d.ts +19 -19
- package/dist/lib/model/index.js +35 -35
- package/dist/lib/model/job-assignment.d.ts +14 -14
- package/dist/lib/model/job-assignment.js +26 -26
- package/dist/lib/model/job-base.d.ts +17 -17
- package/dist/lib/model/job-base.js +27 -27
- package/dist/lib/model/job-execution.d.ts +14 -14
- package/dist/lib/model/job-execution.js +21 -21
- package/dist/lib/model/job-parameter-bag.d.ts +10 -10
- package/dist/lib/model/job-parameter-bag.js +12 -12
- package/dist/lib/model/job-parameter.d.ts +10 -10
- package/dist/lib/model/job-parameter.js +17 -17
- package/dist/lib/model/job-profile.d.ts +15 -15
- package/dist/lib/model/job-profile.js +24 -24
- package/dist/lib/model/job-status.d.ts +11 -11
- package/dist/lib/model/job-status.js +15 -15
- package/dist/lib/model/jobs/ai-job.d.ts +4 -4
- package/dist/lib/model/jobs/ai-job.js +10 -10
- package/dist/lib/model/jobs/ame-job.d.ts +4 -4
- package/dist/lib/model/jobs/ame-job.js +10 -10
- package/dist/lib/model/jobs/capture-job.d.ts +4 -4
- package/dist/lib/model/jobs/capture-job.js +10 -10
- package/dist/lib/model/jobs/distribution-job.d.ts +4 -4
- package/dist/lib/model/jobs/distribution-job.js +10 -10
- package/dist/lib/model/jobs/index.d.ts +9 -9
- package/dist/lib/model/jobs/index.js +25 -25
- package/dist/lib/model/jobs/job.d.ts +23 -23
- package/dist/lib/model/jobs/job.js +38 -38
- package/dist/lib/model/jobs/qa-job.d.ts +4 -4
- package/dist/lib/model/jobs/qa-job.js +10 -10
- package/dist/lib/model/jobs/storage-job.d.ts +4 -4
- package/dist/lib/model/jobs/storage-job.js +10 -10
- package/dist/lib/model/jobs/transform-job.d.ts +4 -4
- package/dist/lib/model/jobs/transform-job.js +10 -10
- package/dist/lib/model/jobs/workflow-job.d.ts +4 -4
- package/dist/lib/model/jobs/workflow-job.js +10 -10
- package/dist/lib/model/locator-status.d.ts +6 -6
- package/dist/lib/model/locator-status.js +10 -10
- package/dist/lib/model/locator.d.ts +12 -12
- package/dist/lib/model/locator.js +21 -21
- package/dist/lib/model/mcma-object.d.ts +7 -7
- package/dist/lib/model/mcma-object.js +10 -10
- package/dist/lib/model/mcma-resource-type.d.ts +6 -6
- package/dist/lib/model/mcma-resource-type.js +2 -2
- package/dist/lib/model/mcma-resource.d.ts +20 -20
- package/dist/lib/model/mcma-resource.js +34 -34
- package/dist/lib/model/mcma-tracker.d.ts +16 -16
- package/dist/lib/model/mcma-tracker.js +22 -22
- package/dist/lib/model/notification-endpoint.d.ts +8 -8
- package/dist/lib/model/notification-endpoint.js +14 -14
- package/dist/lib/model/notification.d.ts +10 -10
- package/dist/lib/model/notification.js +17 -17
- package/dist/lib/model/problem-detail.d.ts +16 -16
- package/dist/lib/model/problem-detail.js +24 -24
- package/dist/lib/model/resource-endpoint.d.ts +12 -12
- package/dist/lib/model/resource-endpoint.js +20 -20
- package/dist/lib/model/service.d.ts +17 -17
- package/dist/lib/model/service.js +29 -29
- package/dist/lib/utils.d.ts +23 -23
- package/dist/lib/utils.js +128 -128
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job, JobProperties } from "./job";
|
|
2
|
-
export declare class QAJob extends Job {
|
|
3
|
-
constructor(properties: JobProperties);
|
|
4
|
-
}
|
|
1
|
+
import { Job, JobProperties } from "./job";
|
|
2
|
+
export declare class QAJob extends Job {
|
|
3
|
+
constructor(properties: JobProperties);
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QAJob = void 0;
|
|
4
|
-
const job_1 = require("./job");
|
|
5
|
-
class QAJob extends job_1.Job {
|
|
6
|
-
constructor(properties) {
|
|
7
|
-
super("QAJob", properties);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.QAJob = QAJob;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QAJob = void 0;
|
|
4
|
+
const job_1 = require("./job");
|
|
5
|
+
class QAJob extends job_1.Job {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super("QAJob", properties);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.QAJob = QAJob;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job, JobProperties } from "./job";
|
|
2
|
-
export declare class StorageJob extends Job {
|
|
3
|
-
constructor(properties: JobProperties);
|
|
4
|
-
}
|
|
1
|
+
import { Job, JobProperties } from "./job";
|
|
2
|
+
export declare class StorageJob extends Job {
|
|
3
|
+
constructor(properties: JobProperties);
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StorageJob = void 0;
|
|
4
|
-
const job_1 = require("./job");
|
|
5
|
-
class StorageJob extends job_1.Job {
|
|
6
|
-
constructor(properties) {
|
|
7
|
-
super("StorageJob", properties);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.StorageJob = StorageJob;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorageJob = void 0;
|
|
4
|
+
const job_1 = require("./job");
|
|
5
|
+
class StorageJob extends job_1.Job {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super("StorageJob", properties);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.StorageJob = StorageJob;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job, JobProperties } from "./job";
|
|
2
|
-
export declare class TransformJob extends Job {
|
|
3
|
-
constructor(properties: JobProperties);
|
|
4
|
-
}
|
|
1
|
+
import { Job, JobProperties } from "./job";
|
|
2
|
+
export declare class TransformJob extends Job {
|
|
3
|
+
constructor(properties: JobProperties);
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransformJob = void 0;
|
|
4
|
-
const job_1 = require("./job");
|
|
5
|
-
class TransformJob extends job_1.Job {
|
|
6
|
-
constructor(properties) {
|
|
7
|
-
super("TransformJob", properties);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.TransformJob = TransformJob;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransformJob = void 0;
|
|
4
|
+
const job_1 = require("./job");
|
|
5
|
+
class TransformJob extends job_1.Job {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super("TransformJob", properties);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.TransformJob = TransformJob;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Job, JobProperties } from "./job";
|
|
2
|
-
export declare class WorkflowJob extends Job {
|
|
3
|
-
constructor(properties: JobProperties);
|
|
4
|
-
}
|
|
1
|
+
import { Job, JobProperties } from "./job";
|
|
2
|
+
export declare class WorkflowJob extends Job {
|
|
3
|
+
constructor(properties: JobProperties);
|
|
4
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowJob = void 0;
|
|
4
|
-
const job_1 = require("./job");
|
|
5
|
-
class WorkflowJob extends job_1.Job {
|
|
6
|
-
constructor(properties) {
|
|
7
|
-
super("WorkflowJob", properties);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.WorkflowJob = WorkflowJob;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowJob = void 0;
|
|
4
|
+
const job_1 = require("./job");
|
|
5
|
+
class WorkflowJob extends job_1.Job {
|
|
6
|
+
constructor(properties) {
|
|
7
|
+
super("WorkflowJob", properties);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.WorkflowJob = WorkflowJob;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare enum LocatorStatus {
|
|
2
|
-
Processing = "Processing",
|
|
3
|
-
Ready = "Ready",
|
|
4
|
-
Archived = "Archived",
|
|
5
|
-
Deleted = "Deleted"
|
|
6
|
-
}
|
|
1
|
+
export declare enum LocatorStatus {
|
|
2
|
+
Processing = "Processing",
|
|
3
|
+
Ready = "Ready",
|
|
4
|
+
Archived = "Archived",
|
|
5
|
+
Deleted = "Deleted"
|
|
6
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocatorStatus = void 0;
|
|
4
|
-
var LocatorStatus;
|
|
5
|
-
(function (LocatorStatus) {
|
|
6
|
-
LocatorStatus["Processing"] = "Processing";
|
|
7
|
-
LocatorStatus["Ready"] = "Ready";
|
|
8
|
-
LocatorStatus["Archived"] = "Archived";
|
|
9
|
-
LocatorStatus["Deleted"] = "Deleted";
|
|
10
|
-
})(LocatorStatus
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocatorStatus = void 0;
|
|
4
|
+
var LocatorStatus;
|
|
5
|
+
(function (LocatorStatus) {
|
|
6
|
+
LocatorStatus["Processing"] = "Processing";
|
|
7
|
+
LocatorStatus["Ready"] = "Ready";
|
|
8
|
+
LocatorStatus["Archived"] = "Archived";
|
|
9
|
+
LocatorStatus["Deleted"] = "Deleted";
|
|
10
|
+
})(LocatorStatus || (exports.LocatorStatus = LocatorStatus = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { McmaResource, McmaResourceProperties } from "./mcma-resource";
|
|
2
|
-
import { LocatorStatus } from "./locator-status";
|
|
3
|
-
export interface LocatorProperties extends McmaResourceProperties {
|
|
4
|
-
url: string;
|
|
5
|
-
status?: LocatorStatus;
|
|
6
|
-
}
|
|
7
|
-
export declare class Locator extends McmaResource implements LocatorProperties {
|
|
8
|
-
url: string;
|
|
9
|
-
status?: LocatorStatus;
|
|
10
|
-
constructor(properties: LocatorProperties);
|
|
11
|
-
constructor(type: string, properties: LocatorProperties);
|
|
12
|
-
}
|
|
1
|
+
import { McmaResource, McmaResourceProperties } from "./mcma-resource";
|
|
2
|
+
import { LocatorStatus } from "./locator-status";
|
|
3
|
+
export interface LocatorProperties extends McmaResourceProperties {
|
|
4
|
+
url: string;
|
|
5
|
+
status?: LocatorStatus;
|
|
6
|
+
}
|
|
7
|
+
export declare class Locator extends McmaResource implements LocatorProperties {
|
|
8
|
+
url: string;
|
|
9
|
+
status?: LocatorStatus;
|
|
10
|
+
constructor(properties: LocatorProperties);
|
|
11
|
+
constructor(type: string, properties: LocatorProperties);
|
|
12
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Locator = void 0;
|
|
4
|
-
const mcma_resource_1 = require("./mcma-resource");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
class Locator extends mcma_resource_1.McmaResource {
|
|
7
|
-
url;
|
|
8
|
-
status;
|
|
9
|
-
constructor(typeOrProperties, properties) {
|
|
10
|
-
if (!properties && typeof typeOrProperties !== "string") {
|
|
11
|
-
properties = typeOrProperties;
|
|
12
|
-
typeOrProperties = "Locator";
|
|
13
|
-
}
|
|
14
|
-
super(typeOrProperties);
|
|
15
|
-
this.url = properties.url;
|
|
16
|
-
this.status = properties.status;
|
|
17
|
-
utils_1.Utils.checkProperty(this, "url", "string", true);
|
|
18
|
-
utils_1.Utils.checkProperty(this, "status", "string", false);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Locator = Locator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Locator = void 0;
|
|
4
|
+
const mcma_resource_1 = require("./mcma-resource");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class Locator extends mcma_resource_1.McmaResource {
|
|
7
|
+
url;
|
|
8
|
+
status;
|
|
9
|
+
constructor(typeOrProperties, properties) {
|
|
10
|
+
if (!properties && typeof typeOrProperties !== "string") {
|
|
11
|
+
properties = typeOrProperties;
|
|
12
|
+
typeOrProperties = "Locator";
|
|
13
|
+
}
|
|
14
|
+
super(typeOrProperties);
|
|
15
|
+
this.url = properties.url;
|
|
16
|
+
this.status = properties.status;
|
|
17
|
+
utils_1.Utils.checkProperty(this, "url", "string", true);
|
|
18
|
+
utils_1.Utils.checkProperty(this, "status", "string", false);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Locator = Locator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface McmaObjectProperties {
|
|
2
|
-
["@type"]?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class McmaObject implements McmaObjectProperties {
|
|
5
|
-
["@type"]: string;
|
|
6
|
-
constructor(type: string);
|
|
7
|
-
}
|
|
1
|
+
export interface McmaObjectProperties {
|
|
2
|
+
["@type"]?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class McmaObject implements McmaObjectProperties {
|
|
5
|
+
["@type"]: string;
|
|
6
|
+
constructor(type: string);
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.McmaObject = void 0;
|
|
4
|
-
class McmaObject {
|
|
5
|
-
["@type"];
|
|
6
|
-
constructor(type) {
|
|
7
|
-
this["@type"] = type;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.McmaObject = McmaObject;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McmaObject = void 0;
|
|
4
|
+
class McmaObject {
|
|
5
|
+
["@type"];
|
|
6
|
+
constructor(type) {
|
|
7
|
+
this["@type"] = type;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.McmaObject = McmaObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { McmaResource } from "./mcma-resource";
|
|
2
|
-
export interface McmaResourceConstructor<T extends McmaResource> {
|
|
3
|
-
new (...args: any[]): T;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
export type McmaResourceType<T extends McmaResource> = string | McmaResourceConstructor<T>;
|
|
1
|
+
import { McmaResource } from "./mcma-resource";
|
|
2
|
+
export interface McmaResourceConstructor<T extends McmaResource> {
|
|
3
|
+
new (...args: any[]): T;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export type McmaResourceType<T extends McmaResource> = string | McmaResourceConstructor<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
-
export interface McmaResourceProperties extends McmaObjectProperties {
|
|
3
|
-
id?: string;
|
|
4
|
-
dateCreated?: Date | string;
|
|
5
|
-
dateModified?: Date | string;
|
|
6
|
-
custom?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare function onResourceCreate(resource: McmaResourceProperties, id: string): void;
|
|
11
|
-
export declare function onResourceUpsert(resource: McmaResourceProperties, id: string): void;
|
|
12
|
-
export declare abstract class McmaResource extends McmaObject implements McmaResourceProperties {
|
|
13
|
-
id?: string;
|
|
14
|
-
dateCreated?: Date;
|
|
15
|
-
dateModified?: Date;
|
|
16
|
-
custom?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
protected constructor(type: string, properties?: McmaResourceProperties);
|
|
20
|
-
}
|
|
1
|
+
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
+
export interface McmaResourceProperties extends McmaObjectProperties {
|
|
3
|
+
id?: string;
|
|
4
|
+
dateCreated?: Date | string;
|
|
5
|
+
dateModified?: Date | string;
|
|
6
|
+
custom?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare function onResourceCreate(resource: McmaResourceProperties, id: string): void;
|
|
11
|
+
export declare function onResourceUpsert(resource: McmaResourceProperties, id: string): void;
|
|
12
|
+
export declare abstract class McmaResource extends McmaObject implements McmaResourceProperties {
|
|
13
|
+
id?: string;
|
|
14
|
+
dateCreated?: Date;
|
|
15
|
+
dateModified?: Date;
|
|
16
|
+
custom?: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
protected constructor(type: string, properties?: McmaResourceProperties);
|
|
20
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.McmaResource = exports.onResourceUpsert = exports.onResourceCreate = void 0;
|
|
4
|
-
const mcma_object_1 = require("./mcma-object");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
function onResourceCreate(resource, id) {
|
|
7
|
-
resource.id = id;
|
|
8
|
-
resource.dateModified = resource.dateCreated = new Date();
|
|
9
|
-
}
|
|
10
|
-
exports.onResourceCreate = onResourceCreate;
|
|
11
|
-
function onResourceUpsert(resource, id) {
|
|
12
|
-
resource.id = id;
|
|
13
|
-
resource.dateModified = new Date();
|
|
14
|
-
if (!resource.dateCreated) {
|
|
15
|
-
resource.dateCreated = resource.dateModified;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.onResourceUpsert = onResourceUpsert;
|
|
19
|
-
class McmaResource extends mcma_object_1.McmaObject {
|
|
20
|
-
id;
|
|
21
|
-
dateCreated;
|
|
22
|
-
dateModified;
|
|
23
|
-
custom;
|
|
24
|
-
constructor(type, properties) {
|
|
25
|
-
super(type);
|
|
26
|
-
this.id = properties?.id;
|
|
27
|
-
this.dateCreated = utils_1.Utils.ensureValidDateOrUndefined(properties?.dateCreated);
|
|
28
|
-
this.dateModified = utils_1.Utils.ensureValidDateOrUndefined(properties?.dateModified);
|
|
29
|
-
if (typeof properties?.custom === "object" && Object.keys(properties?.custom).length > 0) {
|
|
30
|
-
this.custom = Object.assign({}, properties.custom);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.McmaResource = McmaResource;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McmaResource = exports.onResourceUpsert = exports.onResourceCreate = void 0;
|
|
4
|
+
const mcma_object_1 = require("./mcma-object");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function onResourceCreate(resource, id) {
|
|
7
|
+
resource.id = id;
|
|
8
|
+
resource.dateModified = resource.dateCreated = new Date();
|
|
9
|
+
}
|
|
10
|
+
exports.onResourceCreate = onResourceCreate;
|
|
11
|
+
function onResourceUpsert(resource, id) {
|
|
12
|
+
resource.id = id;
|
|
13
|
+
resource.dateModified = new Date();
|
|
14
|
+
if (!resource.dateCreated) {
|
|
15
|
+
resource.dateCreated = resource.dateModified;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.onResourceUpsert = onResourceUpsert;
|
|
19
|
+
class McmaResource extends mcma_object_1.McmaObject {
|
|
20
|
+
id;
|
|
21
|
+
dateCreated;
|
|
22
|
+
dateModified;
|
|
23
|
+
custom;
|
|
24
|
+
constructor(type, properties) {
|
|
25
|
+
super(type);
|
|
26
|
+
this.id = properties?.id;
|
|
27
|
+
this.dateCreated = utils_1.Utils.ensureValidDateOrUndefined(properties?.dateCreated);
|
|
28
|
+
this.dateModified = utils_1.Utils.ensureValidDateOrUndefined(properties?.dateModified);
|
|
29
|
+
if (typeof properties?.custom === "object" && Object.keys(properties?.custom).length > 0) {
|
|
30
|
+
this.custom = Object.assign({}, properties.custom);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.McmaResource = McmaResource;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
-
export interface McmaTrackerProperties extends McmaObjectProperties {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
custom?: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export declare class McmaTracker extends McmaObject implements McmaTrackerProperties {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
custom?: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
constructor(properties: McmaTrackerProperties);
|
|
16
|
-
}
|
|
1
|
+
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
+
export interface McmaTrackerProperties extends McmaObjectProperties {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
custom?: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare class McmaTracker extends McmaObject implements McmaTrackerProperties {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
custom?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
constructor(properties: McmaTrackerProperties);
|
|
16
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.McmaTracker = void 0;
|
|
4
|
-
const mcma_object_1 = require("./mcma-object");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
class McmaTracker extends mcma_object_1.McmaObject {
|
|
7
|
-
id;
|
|
8
|
-
label;
|
|
9
|
-
custom;
|
|
10
|
-
constructor(properties) {
|
|
11
|
-
super("McmaTracker");
|
|
12
|
-
this.id = properties.id;
|
|
13
|
-
this.label = properties.label;
|
|
14
|
-
if (typeof properties.custom === "object" && Object.keys(properties.custom).length > 0) {
|
|
15
|
-
this.custom = Object.assign({}, properties.custom);
|
|
16
|
-
}
|
|
17
|
-
utils_1.Utils.checkProperty(this, "id", "string", true);
|
|
18
|
-
utils_1.Utils.checkProperty(this, "label", "string", true);
|
|
19
|
-
utils_1.Utils.checkProperty(this, "custom", "object", false);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.McmaTracker = McmaTracker;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McmaTracker = void 0;
|
|
4
|
+
const mcma_object_1 = require("./mcma-object");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class McmaTracker extends mcma_object_1.McmaObject {
|
|
7
|
+
id;
|
|
8
|
+
label;
|
|
9
|
+
custom;
|
|
10
|
+
constructor(properties) {
|
|
11
|
+
super("McmaTracker");
|
|
12
|
+
this.id = properties.id;
|
|
13
|
+
this.label = properties.label;
|
|
14
|
+
if (typeof properties.custom === "object" && Object.keys(properties.custom).length > 0) {
|
|
15
|
+
this.custom = Object.assign({}, properties.custom);
|
|
16
|
+
}
|
|
17
|
+
utils_1.Utils.checkProperty(this, "id", "string", true);
|
|
18
|
+
utils_1.Utils.checkProperty(this, "label", "string", true);
|
|
19
|
+
utils_1.Utils.checkProperty(this, "custom", "object", false);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.McmaTracker = McmaTracker;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
-
export interface NotificationEndpointProperties extends McmaObjectProperties {
|
|
3
|
-
httpEndpoint: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class NotificationEndpoint extends McmaObject implements NotificationEndpointProperties {
|
|
6
|
-
httpEndpoint: string;
|
|
7
|
-
constructor(properties: NotificationEndpointProperties);
|
|
8
|
-
}
|
|
1
|
+
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
+
export interface NotificationEndpointProperties extends McmaObjectProperties {
|
|
3
|
+
httpEndpoint: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class NotificationEndpoint extends McmaObject implements NotificationEndpointProperties {
|
|
6
|
+
httpEndpoint: string;
|
|
7
|
+
constructor(properties: NotificationEndpointProperties);
|
|
8
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationEndpoint = void 0;
|
|
4
|
-
const mcma_object_1 = require("./mcma-object");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
class NotificationEndpoint extends mcma_object_1.McmaObject {
|
|
7
|
-
httpEndpoint;
|
|
8
|
-
constructor(properties) {
|
|
9
|
-
super("NotificationEndpoint");
|
|
10
|
-
this.httpEndpoint = properties.httpEndpoint;
|
|
11
|
-
utils_1.Utils.checkProperty(this, "httpEndpoint", "url", true);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.NotificationEndpoint = NotificationEndpoint;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationEndpoint = void 0;
|
|
4
|
+
const mcma_object_1 = require("./mcma-object");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class NotificationEndpoint extends mcma_object_1.McmaObject {
|
|
7
|
+
httpEndpoint;
|
|
8
|
+
constructor(properties) {
|
|
9
|
+
super("NotificationEndpoint");
|
|
10
|
+
this.httpEndpoint = properties.httpEndpoint;
|
|
11
|
+
utils_1.Utils.checkProperty(this, "httpEndpoint", "url", true);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.NotificationEndpoint = NotificationEndpoint;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
-
export interface NotificationProperties extends McmaObjectProperties {
|
|
3
|
-
source?: string;
|
|
4
|
-
content: any;
|
|
5
|
-
}
|
|
6
|
-
export declare class Notification extends McmaObject implements NotificationProperties {
|
|
7
|
-
source?: string;
|
|
8
|
-
content: any;
|
|
9
|
-
constructor(properties: NotificationProperties);
|
|
10
|
-
}
|
|
1
|
+
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
+
export interface NotificationProperties extends McmaObjectProperties {
|
|
3
|
+
source?: string;
|
|
4
|
+
content: any;
|
|
5
|
+
}
|
|
6
|
+
export declare class Notification extends McmaObject implements NotificationProperties {
|
|
7
|
+
source?: string;
|
|
8
|
+
content: any;
|
|
9
|
+
constructor(properties: NotificationProperties);
|
|
10
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Notification = void 0;
|
|
4
|
-
const mcma_object_1 = require("./mcma-object");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
class Notification extends mcma_object_1.McmaObject {
|
|
7
|
-
source;
|
|
8
|
-
content;
|
|
9
|
-
constructor(properties) {
|
|
10
|
-
super("Notification");
|
|
11
|
-
this.source = properties.source;
|
|
12
|
-
this.content = properties.content;
|
|
13
|
-
utils_1.Utils.checkProperty(this, "source", "string", false);
|
|
14
|
-
utils_1.Utils.checkProperty(this, "content", "object", true);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Notification = Notification;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Notification = void 0;
|
|
4
|
+
const mcma_object_1 = require("./mcma-object");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class Notification extends mcma_object_1.McmaObject {
|
|
7
|
+
source;
|
|
8
|
+
content;
|
|
9
|
+
constructor(properties) {
|
|
10
|
+
super("Notification");
|
|
11
|
+
this.source = properties.source;
|
|
12
|
+
this.content = properties.content;
|
|
13
|
+
utils_1.Utils.checkProperty(this, "source", "string", false);
|
|
14
|
+
utils_1.Utils.checkProperty(this, "content", "object", true);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Notification = Notification;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
-
export interface ProblemDetailProperties extends McmaObjectProperties {
|
|
3
|
-
type: string;
|
|
4
|
-
title: string;
|
|
5
|
-
detail?: string;
|
|
6
|
-
instance?: string;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
export declare class ProblemDetail extends McmaObject implements ProblemDetailProperties {
|
|
10
|
-
type: string;
|
|
11
|
-
title: string;
|
|
12
|
-
detail?: string;
|
|
13
|
-
instance?: string;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
constructor(properties: ProblemDetailProperties);
|
|
16
|
-
}
|
|
1
|
+
import { McmaObject, McmaObjectProperties } from "./mcma-object";
|
|
2
|
+
export interface ProblemDetailProperties extends McmaObjectProperties {
|
|
3
|
+
type: string;
|
|
4
|
+
title: string;
|
|
5
|
+
detail?: string;
|
|
6
|
+
instance?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class ProblemDetail extends McmaObject implements ProblemDetailProperties {
|
|
10
|
+
type: string;
|
|
11
|
+
title: string;
|
|
12
|
+
detail?: string;
|
|
13
|
+
instance?: string;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
constructor(properties: ProblemDetailProperties);
|
|
16
|
+
}
|