@kohost/api-client 3.9.7 → 3.9.8
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 +36 -0
- package/dist/cjs/utils/entityFactory.js +2 -0
- package/dist/esm/Models.js +82 -1
- package/dist/esm/Models.js.map +3 -3
- package/dist/esm/utils.js +84 -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 +18 -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,36 @@
|
|
|
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
|
+
"message": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"field1": {
|
|
24
|
+
"type":"string"
|
|
25
|
+
},
|
|
26
|
+
"field2": {
|
|
27
|
+
"type":"string"
|
|
28
|
+
},
|
|
29
|
+
"field3": {
|
|
30
|
+
"type":"string"
|
|
31
|
+
},
|
|
32
|
+
"field4": {
|
|
33
|
+
"type":"string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
package/dist/esm/Models.js
CHANGED
|
@@ -13847,6 +13847,85 @@ 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
|
+
message: {
|
|
13873
|
+
type: "string"
|
|
13874
|
+
},
|
|
13875
|
+
field1: {
|
|
13876
|
+
type: "string"
|
|
13877
|
+
},
|
|
13878
|
+
field2: {
|
|
13879
|
+
type: "string"
|
|
13880
|
+
},
|
|
13881
|
+
field3: {
|
|
13882
|
+
type: "string"
|
|
13883
|
+
},
|
|
13884
|
+
field4: {
|
|
13885
|
+
type: "string"
|
|
13886
|
+
}
|
|
13887
|
+
}
|
|
13888
|
+
};
|
|
13889
|
+
}
|
|
13890
|
+
});
|
|
13891
|
+
|
|
13892
|
+
// src/Models/Log.js
|
|
13893
|
+
var require_Log = __commonJS({
|
|
13894
|
+
"src/Models/Log.js"(exports, module) {
|
|
13895
|
+
var schemas = require_schema();
|
|
13896
|
+
var schema = require_log();
|
|
13897
|
+
var Entity = require_Entity();
|
|
13898
|
+
schemas.add(schema);
|
|
13899
|
+
var validator = schemas.compile(schema);
|
|
13900
|
+
var Log = class extends Entity {
|
|
13901
|
+
static {
|
|
13902
|
+
__name(this, "Log");
|
|
13903
|
+
}
|
|
13904
|
+
/**
|
|
13905
|
+
* @typedef {import("../schemas/LogSchema").Log} LogType
|
|
13906
|
+
* Create a Product instance.
|
|
13907
|
+
* @constructor
|
|
13908
|
+
* @param {Log} log - The log object of type Log.
|
|
13909
|
+
*/
|
|
13910
|
+
constructor(log) {
|
|
13911
|
+
super(log);
|
|
13912
|
+
}
|
|
13913
|
+
};
|
|
13914
|
+
Object.defineProperty(Log.prototype, "schema", {
|
|
13915
|
+
value: schema
|
|
13916
|
+
});
|
|
13917
|
+
Object.defineProperty(Log.prototype, "validator", {
|
|
13918
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13919
|
+
return validator;
|
|
13920
|
+
}, "get")
|
|
13921
|
+
});
|
|
13922
|
+
Object.defineProperty(Log, "validProperties", {
|
|
13923
|
+
value: Object.keys(schema.properties)
|
|
13924
|
+
});
|
|
13925
|
+
module.exports = Log;
|
|
13926
|
+
}
|
|
13927
|
+
});
|
|
13928
|
+
|
|
13850
13929
|
// src/Models/index.js
|
|
13851
13930
|
var require_Models = __commonJS({
|
|
13852
13931
|
"src/Models/index.js"(exports, module) {
|
|
@@ -13888,6 +13967,7 @@ var require_Models = __commonJS({
|
|
|
13888
13967
|
var Vendor = require_Vendor();
|
|
13889
13968
|
var Property = require_Property();
|
|
13890
13969
|
var Organization = require_Organization();
|
|
13970
|
+
var Log = require_Log();
|
|
13891
13971
|
var Entity = require_Entity();
|
|
13892
13972
|
module.exports = {
|
|
13893
13973
|
Entity,
|
|
@@ -13928,7 +14008,8 @@ var require_Models = __commonJS({
|
|
|
13928
14008
|
TimeSheet,
|
|
13929
14009
|
Policy,
|
|
13930
14010
|
Issue,
|
|
13931
|
-
Vendor
|
|
14011
|
+
Vendor,
|
|
14012
|
+
Log
|
|
13932
14013
|
};
|
|
13933
14014
|
}
|
|
13934
14015
|
});
|