@kohost/api-client 3.9.7 → 3.9.9
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/cjs/Models/Log.js +35 -0
- package/dist/cjs/Models/index.js +2 -0
- package/dist/cjs/schemas/log.json +39 -0
- package/dist/cjs/utils/entityFactory.js +2 -0
- package/dist/esm/Models.js +85 -1
- package/dist/esm/Models.js.map +3 -3
- package/dist/esm/utils.js +87 -1
- package/dist/esm/utils.js.map +3 -3
- package/dist/types/Models/Log.d.ts +17 -0
- package/dist/types/Models/Log.d.ts.map +1 -0
- package/dist/types/Models/index.d.ts +2 -1
- package/dist/types/schemas/LogSchema.d.ts +65 -0
- package/dist/types/utils/entityFactory.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Create the Log Model
|
|
2
|
+
const schemas = require("../utils/schema");
|
|
3
|
+
const schema = require("../schemas/log.json");
|
|
4
|
+
const Entity = require("./Entity");
|
|
5
|
+
|
|
6
|
+
schemas.add(schema);
|
|
7
|
+
const validator = schemas.compile(schema);
|
|
8
|
+
|
|
9
|
+
class Log extends Entity {
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {import("../schemas/LogSchema").Log} LogType
|
|
12
|
+
* Create a Product instance.
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {Log} log - The log object of type Log.
|
|
15
|
+
*/
|
|
16
|
+
constructor(log) {
|
|
17
|
+
super(log);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Object.defineProperty(Log.prototype, "schema", {
|
|
22
|
+
value: schema,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(Log.prototype, "validator", {
|
|
26
|
+
get: function () {
|
|
27
|
+
return validator;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
Object.defineProperty(Log, "validProperties", {
|
|
32
|
+
value: Object.keys(schema.properties),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
module.exports = Log;
|
package/dist/cjs/Models/index.js
CHANGED
|
@@ -37,6 +37,7 @@ const Vendor = require("./Vendor");
|
|
|
37
37
|
|
|
38
38
|
const Property = require("./Property");
|
|
39
39
|
const Organization = require("./Organization");
|
|
40
|
+
const Log = require("./Log");
|
|
40
41
|
|
|
41
42
|
const Entity = require("./Entity");
|
|
42
43
|
|
|
@@ -80,4 +81,5 @@ module.exports = {
|
|
|
80
81
|
Policy,
|
|
81
82
|
Issue,
|
|
82
83
|
Vendor,
|
|
84
|
+
Log,
|
|
83
85
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "log.json",
|
|
4
|
+
"title": "Log",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "timestamp"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"$ref": "definitions.json#/definitions/id"
|
|
10
|
+
},
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"default": "log",
|
|
14
|
+
"enum": ["log"]
|
|
15
|
+
},
|
|
16
|
+
"timestamp": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"minimum": 1655907956593
|
|
19
|
+
},
|
|
20
|
+
"driver": {
|
|
21
|
+
"$ref": "definitions.json#/definitions/driver"
|
|
22
|
+
},
|
|
23
|
+
"message": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"field1": {
|
|
27
|
+
"type":"string"
|
|
28
|
+
},
|
|
29
|
+
"field2": {
|
|
30
|
+
"type":"string"
|
|
31
|
+
},
|
|
32
|
+
"field3": {
|
|
33
|
+
"type":"string"
|
|
34
|
+
},
|
|
35
|
+
"field4": {
|
|
36
|
+
"type":"string"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/dist/esm/Models.js
CHANGED
|
@@ -13847,6 +13847,88 @@ var require_Organization = __commonJS({
|
|
|
13847
13847
|
}
|
|
13848
13848
|
});
|
|
13849
13849
|
|
|
13850
|
+
// src/schemas/log.json
|
|
13851
|
+
var require_log = __commonJS({
|
|
13852
|
+
"src/schemas/log.json"(exports, module) {
|
|
13853
|
+
module.exports = {
|
|
13854
|
+
$schema: "http://json-schema.org/draft-07/schema",
|
|
13855
|
+
$id: "log.json",
|
|
13856
|
+
title: "Log",
|
|
13857
|
+
type: "object",
|
|
13858
|
+
required: ["id", "timestamp"],
|
|
13859
|
+
properties: {
|
|
13860
|
+
id: {
|
|
13861
|
+
$ref: "definitions.json#/definitions/id"
|
|
13862
|
+
},
|
|
13863
|
+
type: {
|
|
13864
|
+
type: "string",
|
|
13865
|
+
default: "log",
|
|
13866
|
+
enum: ["log"]
|
|
13867
|
+
},
|
|
13868
|
+
timestamp: {
|
|
13869
|
+
type: "number",
|
|
13870
|
+
minimum: 1655907956593
|
|
13871
|
+
},
|
|
13872
|
+
driver: {
|
|
13873
|
+
$ref: "definitions.json#/definitions/driver"
|
|
13874
|
+
},
|
|
13875
|
+
message: {
|
|
13876
|
+
type: "string"
|
|
13877
|
+
},
|
|
13878
|
+
field1: {
|
|
13879
|
+
type: "string"
|
|
13880
|
+
},
|
|
13881
|
+
field2: {
|
|
13882
|
+
type: "string"
|
|
13883
|
+
},
|
|
13884
|
+
field3: {
|
|
13885
|
+
type: "string"
|
|
13886
|
+
},
|
|
13887
|
+
field4: {
|
|
13888
|
+
type: "string"
|
|
13889
|
+
}
|
|
13890
|
+
}
|
|
13891
|
+
};
|
|
13892
|
+
}
|
|
13893
|
+
});
|
|
13894
|
+
|
|
13895
|
+
// src/Models/Log.js
|
|
13896
|
+
var require_Log = __commonJS({
|
|
13897
|
+
"src/Models/Log.js"(exports, module) {
|
|
13898
|
+
var schemas = require_schema();
|
|
13899
|
+
var schema = require_log();
|
|
13900
|
+
var Entity = require_Entity();
|
|
13901
|
+
schemas.add(schema);
|
|
13902
|
+
var validator = schemas.compile(schema);
|
|
13903
|
+
var Log = class extends Entity {
|
|
13904
|
+
static {
|
|
13905
|
+
__name(this, "Log");
|
|
13906
|
+
}
|
|
13907
|
+
/**
|
|
13908
|
+
* @typedef {import("../schemas/LogSchema").Log} LogType
|
|
13909
|
+
* Create a Product instance.
|
|
13910
|
+
* @constructor
|
|
13911
|
+
* @param {Log} log - The log object of type Log.
|
|
13912
|
+
*/
|
|
13913
|
+
constructor(log) {
|
|
13914
|
+
super(log);
|
|
13915
|
+
}
|
|
13916
|
+
};
|
|
13917
|
+
Object.defineProperty(Log.prototype, "schema", {
|
|
13918
|
+
value: schema
|
|
13919
|
+
});
|
|
13920
|
+
Object.defineProperty(Log.prototype, "validator", {
|
|
13921
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13922
|
+
return validator;
|
|
13923
|
+
}, "get")
|
|
13924
|
+
});
|
|
13925
|
+
Object.defineProperty(Log, "validProperties", {
|
|
13926
|
+
value: Object.keys(schema.properties)
|
|
13927
|
+
});
|
|
13928
|
+
module.exports = Log;
|
|
13929
|
+
}
|
|
13930
|
+
});
|
|
13931
|
+
|
|
13850
13932
|
// src/Models/index.js
|
|
13851
13933
|
var require_Models = __commonJS({
|
|
13852
13934
|
"src/Models/index.js"(exports, module) {
|
|
@@ -13888,6 +13970,7 @@ var require_Models = __commonJS({
|
|
|
13888
13970
|
var Vendor = require_Vendor();
|
|
13889
13971
|
var Property = require_Property();
|
|
13890
13972
|
var Organization = require_Organization();
|
|
13973
|
+
var Log = require_Log();
|
|
13891
13974
|
var Entity = require_Entity();
|
|
13892
13975
|
module.exports = {
|
|
13893
13976
|
Entity,
|
|
@@ -13928,7 +14011,8 @@ var require_Models = __commonJS({
|
|
|
13928
14011
|
TimeSheet,
|
|
13929
14012
|
Policy,
|
|
13930
14013
|
Issue,
|
|
13931
|
-
Vendor
|
|
14014
|
+
Vendor,
|
|
14015
|
+
Log
|
|
13932
14016
|
};
|
|
13933
14017
|
}
|
|
13934
14018
|
});
|