namirasoft-support 1.4.0 → 1.4.2
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/NamirasoftSupportServer.d.ts +2 -0
- package/dist/NamirasoftSupportServer.js +3 -1
- package/dist/NamirasoftSupportServer.js.map +1 -1
- package/dist/NamirasoftSupportServerMetrics.d.ts +6 -0
- package/dist/NamirasoftSupportServerMetrics.js +28 -0
- package/dist/NamirasoftSupportServerMetrics.js.map +1 -0
- package/dist/command/MessageCreateCommand.js +10 -1
- package/dist/command/MessageCreateCommand.js.map +1 -1
- package/dist/command/MessageUpdateCommand.js +10 -1
- package/dist/command/MessageUpdateCommand.js.map +1 -1
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/TicketCreateCommand.js +0 -18
- package/dist/command/TicketCreateCommand.js.map +1 -1
- package/dist/command/TicketUpdateCommand.js +0 -18
- package/dist/command/TicketUpdateCommand.js.map +1 -1
- package/dist/command/cli.js +2 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/meta/NamirasoftSupportMetaDatabase.js +1 -1
- package/dist/meta/NamirasoftSupportMetaDatabase.js.map +1 -1
- package/dist/meta/TicketMetaTable.d.ts +1 -0
- package/dist/meta/TicketMetaTable.js +1 -0
- package/dist/meta/TicketMetaTable.js.map +1 -1
- package/dist/row/MessageInputRow.d.ts +1 -0
- package/dist/row/TicketInputRow.d.ts +0 -4
- package/dist/row/TicketRow.d.ts +1 -0
- package/logo.png +0 -0
- package/package.json +5 -5
- package/src/NamirasoftSupportServer.ts +4 -1
- package/src/NamirasoftSupportServerMetrics.ts +36 -0
- package/src/command/MessageCreateCommand.ts +10 -1
- package/src/command/MessageUpdateCommand.ts +10 -1
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/TicketCreateCommand.ts +0 -18
- package/src/command/TicketUpdateCommand.ts +0 -18
- package/src/command/cli.ts +2 -0
- package/src/index.ts +3 -0
- package/src/meta/NamirasoftSupportMetaDatabase.ts +1 -1
- package/src/meta/TicketMetaTable.ts +2 -0
- package/src/row/MessageInputRow.ts +1 -0
- package/src/row/TicketInputRow.ts +0 -4
- package/src/row/TicketRow.ts +1 -0
|
@@ -2,11 +2,13 @@ import { NSABaseServer } from "namirasoft-account";
|
|
|
2
2
|
import { NamirasoftSupportServerCategory } from "./NamirasoftSupportServerCategory";
|
|
3
3
|
import { NamirasoftSupportServerHealthz } from "./NamirasoftSupportServerHealthz";
|
|
4
4
|
import { NamirasoftSupportServerMessage } from "./NamirasoftSupportServerMessage";
|
|
5
|
+
import { NamirasoftSupportServerMetrics } from "./NamirasoftSupportServerMetrics";
|
|
5
6
|
import { NamirasoftSupportServerTicket } from "./NamirasoftSupportServerTicket";
|
|
6
7
|
import { NamirasoftSupportServerValue } from "./NamirasoftSupportServerValue";
|
|
7
8
|
import { TokenManager } from "namirasoft-account";
|
|
8
9
|
export declare class NamirasoftSupportServer extends NSABaseServer {
|
|
9
10
|
healthz: NamirasoftSupportServerHealthz;
|
|
11
|
+
metrics: NamirasoftSupportServerMetrics;
|
|
10
12
|
value: NamirasoftSupportServerValue;
|
|
11
13
|
category: NamirasoftSupportServerCategory;
|
|
12
14
|
ticket: NamirasoftSupportServerTicket;
|
|
@@ -5,12 +5,14 @@ const namirasoft_account_1 = require("namirasoft-account");
|
|
|
5
5
|
const NamirasoftSupportServerCategory_1 = require("./NamirasoftSupportServerCategory");
|
|
6
6
|
const NamirasoftSupportServerHealthz_1 = require("./NamirasoftSupportServerHealthz");
|
|
7
7
|
const NamirasoftSupportServerMessage_1 = require("./NamirasoftSupportServerMessage");
|
|
8
|
+
const NamirasoftSupportServerMetrics_1 = require("./NamirasoftSupportServerMetrics");
|
|
8
9
|
const NamirasoftSupportServerTicket_1 = require("./NamirasoftSupportServerTicket");
|
|
9
10
|
const NamirasoftSupportServerValue_1 = require("./NamirasoftSupportServerValue");
|
|
10
11
|
class NamirasoftSupportServer extends namirasoft_account_1.NSABaseServer {
|
|
11
12
|
constructor(base_url, manager, onError) {
|
|
12
|
-
super(base_url, `1.4.
|
|
13
|
+
super(base_url, `1.4.2`, manager, onError);
|
|
13
14
|
this.healthz = new NamirasoftSupportServerHealthz_1.NamirasoftSupportServerHealthz(this);
|
|
15
|
+
this.metrics = new NamirasoftSupportServerMetrics_1.NamirasoftSupportServerMetrics(this);
|
|
14
16
|
this.value = new NamirasoftSupportServerValue_1.NamirasoftSupportServerValue(this);
|
|
15
17
|
this.category = new NamirasoftSupportServerCategory_1.NamirasoftSupportServerCategory(this);
|
|
16
18
|
this.ticket = new NamirasoftSupportServerTicket_1.NamirasoftSupportServerTicket(this);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSupportServer.js","sourceRoot":"","sources":["../src/NamirasoftSupportServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,uFAAoF;AACpF,qFAAkF;AAClF,qFAAkF;AAClF,mFAAgF;AAChF,iFAA8E;AAG9E,MAAa,uBAAwB,SAAQ,kCAAa;
|
|
1
|
+
{"version":3,"file":"NamirasoftSupportServer.js","sourceRoot":"","sources":["../src/NamirasoftSupportServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,uFAAoF;AACpF,qFAAkF;AAClF,qFAAkF;AAClF,qFAAkF;AAClF,mFAAgF;AAChF,iFAA8E;AAG9E,MAAa,uBAAwB,SAAQ,kCAAa;IAQtD,YAAY,QAAgB,EAAE,OAAqB,EAAE,OAA+B;QAEhF,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,IAAI,2DAA4B,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,IAAI,iEAA+B,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,GAAG,IAAI,6DAA6B,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;CACJ;AAlBD,0DAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NamirasoftSupportServer } from "./NamirasoftSupportServer";
|
|
2
|
+
import { NamirasoftSupportServerBase } from "./NamirasoftSupportServerBase";
|
|
3
|
+
export declare class NamirasoftSupportServerMetrics extends NamirasoftSupportServerBase {
|
|
4
|
+
constructor(server: NamirasoftSupportServer);
|
|
5
|
+
Get(): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftSupportServerMetrics = void 0;
|
|
13
|
+
const NamirasoftSupportServerBase_1 = require("./NamirasoftSupportServerBase");
|
|
14
|
+
class NamirasoftSupportServerMetrics extends NamirasoftSupportServerBase_1.NamirasoftSupportServerBase {
|
|
15
|
+
constructor(server) {
|
|
16
|
+
super(server);
|
|
17
|
+
this.Get = this.Get.bind(this);
|
|
18
|
+
}
|
|
19
|
+
Get() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
let path = `/metrics`;
|
|
22
|
+
yield this.server._get(path, {});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.NamirasoftSupportServerMetrics = NamirasoftSupportServerMetrics;
|
|
27
|
+
;
|
|
28
|
+
//# sourceMappingURL=NamirasoftSupportServerMetrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftSupportServerMetrics.js","sourceRoot":"","sources":["../src/NamirasoftSupportServerMetrics.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,+EAA4E;AAE5E,MAAa,8BAA+B,SAAQ,yDAA2B;IAE3E,YAAY,MAA+B;QAEvC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACK,GAAG;;YAEL,IAAI,IAAI,GAAG,UAAU,CAAC;YACtB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,IAAI,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC;KAAA;CACJ;AAZD,wEAYC;AAAA,CAAC"}
|
|
@@ -40,6 +40,14 @@ class MessageCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
40
40
|
optional: false,
|
|
41
41
|
args: ["message"],
|
|
42
42
|
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "ticket_resolved",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'ticket_resolved' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["ticket_resolved"],
|
|
50
|
+
defaults: [""]
|
|
43
51
|
}
|
|
44
52
|
]);
|
|
45
53
|
}
|
|
@@ -56,7 +64,8 @@ class MessageCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
56
64
|
let ans = yield server.message.Create({
|
|
57
65
|
ticket_id: this.option_values.ticket_id,
|
|
58
66
|
sender_id: this.option_values.sender_id,
|
|
59
|
-
message: this.option_values.message
|
|
67
|
+
message: this.option_values.message,
|
|
68
|
+
ticket_resolved: this.option_values.ticket_resolved
|
|
60
69
|
});
|
|
61
70
|
this.app.logger.success(JSON.stringify(ans));
|
|
62
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageCreateCommand.js","sourceRoot":"","sources":["../../src/command/MessageCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,oBAAqB,SAAQ,sCAAgB;IAEtD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,WAAW,CAAC;gBACnB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,WAAW,CAAC;gBACnB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yCAAyC;gBACtD,QAAQ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AO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;YAC5D,IAAI,MAAM,GAAG,IAAI,iDAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC9F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;gBAClC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS;gBACvC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS;gBACvC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO;gBACnC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,eAAe;aACtD,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,oDAyDC;AAAA,CAAC"}
|
|
@@ -40,6 +40,14 @@ class MessageUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
40
40
|
optional: false,
|
|
41
41
|
args: ["message"],
|
|
42
42
|
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "ticket_resolved",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'ticket_resolved' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["ticket_resolved"],
|
|
50
|
+
defaults: [""]
|
|
43
51
|
}
|
|
44
52
|
]);
|
|
45
53
|
}
|
|
@@ -56,7 +64,8 @@ class MessageUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
56
64
|
let ans = yield server.message.Update(this.arg_values[0], {
|
|
57
65
|
ticket_id: this.option_values.ticket_id,
|
|
58
66
|
sender_id: this.option_values.sender_id,
|
|
59
|
-
message: this.option_values.message
|
|
67
|
+
message: this.option_values.message,
|
|
68
|
+
ticket_resolved: this.option_values.ticket_resolved
|
|
60
69
|
});
|
|
61
70
|
this.app.logger.success(JSON.stringify(ans));
|
|
62
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageUpdateCommand.js","sourceRoot":"","sources":["../../src/command/MessageUpdateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,oBAAqB,SAAQ,sCAAgB;IAEtD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,WAAW,CAAC;gBACnB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,WAAW,CAAC;gBACnB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yCAAyC;gBACtD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,SAAS,CAAC;gBACjB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,yCAAuB,EAAE,CAAC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IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACtD,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS;gBACvC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS;gBACvC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO;gBACnC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,eAAe;aACtD,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,oDAyDC;AAAA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetricsCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const MetricsGetCommand_1 = require("./MetricsGetCommand");
|
|
6
|
+
class MetricsCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"get": MetricsGetCommand_1.MetricsGetCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MetricsCommand = MetricsCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=MetricsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsCommand.js","sourceRoot":"","sources":["../../src/command/MetricsCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,2DAAwD;AAExD,MAAa,cAAe,SAAQ,0CAAoB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,KAAK,EAAE,qCAAiB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,wCAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MetricsGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSupportServer_1 = require("../NamirasoftSupportServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class MetricsGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
30
|
+
let server = new NamirasoftSupportServer_1.NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
31
|
+
let ans = yield server.metrics.Get();
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MetricsGetCommand = MetricsGetCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=MetricsGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsGetCommand.js","sourceRoot":"","sources":["../../src/command/MetricsGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAC;YACrI,IAAI,OAAO,GAAG,IAAI,yCAAuB,EAAE,CAAC;YAC5C,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;YAC5D,IAAI,MAAM,GAAG,IAAI,iDAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC9F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,8CAmBC;AAAA,CAAC"}
|
|
@@ -33,14 +33,6 @@ class TicketCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
33
33
|
args: ["title"],
|
|
34
34
|
defaults: [""]
|
|
35
35
|
},
|
|
36
|
-
{
|
|
37
|
-
name: "status",
|
|
38
|
-
short: "",
|
|
39
|
-
description: "Provides the value of 'status' in body",
|
|
40
|
-
optional: false,
|
|
41
|
-
args: ["status"],
|
|
42
|
-
defaults: [""]
|
|
43
|
-
},
|
|
44
36
|
{
|
|
45
37
|
name: "priority",
|
|
46
38
|
short: "",
|
|
@@ -49,14 +41,6 @@ class TicketCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
49
41
|
args: ["priority"],
|
|
50
42
|
defaults: [""]
|
|
51
43
|
},
|
|
52
|
-
{
|
|
53
|
-
name: "assignee",
|
|
54
|
-
short: "",
|
|
55
|
-
description: "Provides the value of 'assignee' in body",
|
|
56
|
-
optional: false,
|
|
57
|
-
args: ["assignee"],
|
|
58
|
-
defaults: [""]
|
|
59
|
-
},
|
|
60
44
|
{
|
|
61
45
|
name: "description",
|
|
62
46
|
short: "",
|
|
@@ -80,9 +64,7 @@ class TicketCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
80
64
|
let ans = yield server.ticket.Create({
|
|
81
65
|
category_id: this.option_values.category_id,
|
|
82
66
|
title: this.option_values.title,
|
|
83
|
-
status: this.option_values.status,
|
|
84
67
|
priority: this.option_values.priority,
|
|
85
|
-
assignee: this.option_values.assignee,
|
|
86
68
|
description: this.option_values.description
|
|
87
69
|
});
|
|
88
70
|
this.app.logger.success(JSON.stringify(ans));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketCreateCommand.js","sourceRoot":"","sources":["../../src/command/TicketCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,mBAAoB,SAAQ,sCAAgB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"TicketCreateCommand.js","sourceRoot":"","sources":["../../src/command/TicketCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,mBAAoB,SAAQ,sCAAgB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,EAAE,C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BAC/B,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ;gBACrC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;aAC9C,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,kDAyDC;AAAA,CAAC"}
|
|
@@ -33,14 +33,6 @@ class TicketUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
33
33
|
args: ["title"],
|
|
34
34
|
defaults: [""]
|
|
35
35
|
},
|
|
36
|
-
{
|
|
37
|
-
name: "status",
|
|
38
|
-
short: "",
|
|
39
|
-
description: "Provides the value of 'status' in body",
|
|
40
|
-
optional: false,
|
|
41
|
-
args: ["status"],
|
|
42
|
-
defaults: [""]
|
|
43
|
-
},
|
|
44
36
|
{
|
|
45
37
|
name: "priority",
|
|
46
38
|
short: "",
|
|
@@ -49,14 +41,6 @@ class TicketUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
49
41
|
args: ["priority"],
|
|
50
42
|
defaults: [""]
|
|
51
43
|
},
|
|
52
|
-
{
|
|
53
|
-
name: "assignee",
|
|
54
|
-
short: "",
|
|
55
|
-
description: "Provides the value of 'assignee' in body",
|
|
56
|
-
optional: false,
|
|
57
|
-
args: ["assignee"],
|
|
58
|
-
defaults: [""]
|
|
59
|
-
},
|
|
60
44
|
{
|
|
61
45
|
name: "description",
|
|
62
46
|
short: "",
|
|
@@ -80,9 +64,7 @@ class TicketUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
|
80
64
|
let ans = yield server.ticket.Update(this.arg_values[0], {
|
|
81
65
|
category_id: this.option_values.category_id,
|
|
82
66
|
title: this.option_values.title,
|
|
83
|
-
status: this.option_values.status,
|
|
84
67
|
priority: this.option_values.priority,
|
|
85
|
-
assignee: this.option_values.assignee,
|
|
86
68
|
description: this.option_values.description
|
|
87
69
|
});
|
|
88
70
|
this.app.logger.success(JSON.stringify(ans));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketUpdateCommand.js","sourceRoot":"","sources":["../../src/command/TicketUpdateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,mBAAoB,SAAQ,sCAAgB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"TicketUpdateCommand.js","sourceRoot":"","sources":["../../src/command/TicketUpdateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,mBAAoB,SAAQ,sCAAgB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YAC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AC;YAC9F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACrD,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ;gBACrC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;aAC9C,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,kDAyDC;AAAA,CAAC"}
|
package/dist/command/cli.js
CHANGED
|
@@ -7,10 +7,12 @@ const CategoryCommand_1 = require("./CategoryCommand");
|
|
|
7
7
|
const namirasoft_node_cli_2 = require("namirasoft-node-cli");
|
|
8
8
|
const HealthzCommand_1 = require("./HealthzCommand");
|
|
9
9
|
const MessageCommand_1 = require("./MessageCommand");
|
|
10
|
+
const MetricsCommand_1 = require("./MetricsCommand");
|
|
10
11
|
const TicketCommand_1 = require("./TicketCommand");
|
|
11
12
|
const ValueCommand_1 = require("./ValueCommand");
|
|
12
13
|
let app = new namirasoft_node_cli_1.Application("ns-support", new namirasoft_node_cli_1.BaseStorage(), {
|
|
13
14
|
"healthz": HealthzCommand_1.HealthzCommand,
|
|
15
|
+
"metrics": MetricsCommand_1.MetricsCommand,
|
|
14
16
|
"value": ValueCommand_1.ValueCommand,
|
|
15
17
|
"category": CategoryCommand_1.CategoryCommand,
|
|
16
18
|
"ticket": TicketCommand_1.TicketCommand,
|
package/dist/command/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/command/cli.ts"],"names":[],"mappings":";;;AAqBA,2DAAoD;AACpD,6DAA+D;AAC/D,uDAAoD;AACpD,6DAAoD;AACpD,qDAAkD;AAClD,qDAAkD;AAClD,mDAAgD;AAChD,iDAA8C;AAE9C,IAAI,GAAG,GAAG,IAAI,iCAAW,CAAC,YAAY,EAAE,IAAI,iCAAW,EAAE,EACrD;IACI,SAAS,EAAE,+BAAc;IACzB,OAAO,EAAE,2BAAY;IACrB,UAAU,EAAE,iCAAe;IAC3B,QAAQ,EAAE,6BAAa;IACvB,SAAS,EAAE,+BAAc;IACzB,SAAS,EAAE,mCAAc;IACzB,QAAQ,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,mCAAa,CAAC,IAAI,EAAE,CAAC,uBAAuB,CAAC,CAAC;CACnF,CAAC,CAAC;AACP,GAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/command/cli.ts"],"names":[],"mappings":";;;AAqBA,2DAAoD;AACpD,6DAA+D;AAC/D,uDAAoD;AACpD,6DAAoD;AACpD,qDAAkD;AAClD,qDAAkD;AAClD,qDAAkD;AAClD,mDAAgD;AAChD,iDAA8C;AAE9C,IAAI,GAAG,GAAG,IAAI,iCAAW,CAAC,YAAY,EAAE,IAAI,iCAAW,EAAE,EACrD;IACI,SAAS,EAAE,+BAAc;IACzB,SAAS,EAAE,+BAAc;IACzB,OAAO,EAAE,2BAAY;IACrB,UAAU,EAAE,iCAAe;IAC3B,QAAQ,EAAE,6BAAa;IACvB,SAAS,EAAE,+BAAc;IACzB,SAAS,EAAE,mCAAc;IACzB,QAAQ,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,mCAAa,CAAC,IAAI,EAAE,CAAC,uBAAuB,CAAC,CAAC;CACnF,CAAC,CAAC;AACP,GAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./NamirasoftSupportServerBase";
|
|
|
3
3
|
export * from "./NamirasoftSupportServerCategory";
|
|
4
4
|
export * from "./NamirasoftSupportServerHealthz";
|
|
5
5
|
export * from "./NamirasoftSupportServerMessage";
|
|
6
|
+
export * from "./NamirasoftSupportServerMetrics";
|
|
6
7
|
export * from "./NamirasoftSupportServerTicket";
|
|
7
8
|
export * from "./NamirasoftSupportServerValue";
|
|
8
9
|
export * from "./command/CategoryCommand";
|
|
@@ -16,6 +17,8 @@ export * from "./command/MessageDeleteCommand";
|
|
|
16
17
|
export * from "./command/MessageGetCommand";
|
|
17
18
|
export * from "./command/MessageListCommand";
|
|
18
19
|
export * from "./command/MessageUpdateCommand";
|
|
20
|
+
export * from "./command/MetricsCommand";
|
|
21
|
+
export * from "./command/MetricsGetCommand";
|
|
19
22
|
export * from "./command/TicketCommand";
|
|
20
23
|
export * from "./command/TicketCreateCommand";
|
|
21
24
|
export * from "./command/TicketDeleteCommand";
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./NamirasoftSupportServerBase"), exports);
|
|
|
19
19
|
__exportStar(require("./NamirasoftSupportServerCategory"), exports);
|
|
20
20
|
__exportStar(require("./NamirasoftSupportServerHealthz"), exports);
|
|
21
21
|
__exportStar(require("./NamirasoftSupportServerMessage"), exports);
|
|
22
|
+
__exportStar(require("./NamirasoftSupportServerMetrics"), exports);
|
|
22
23
|
__exportStar(require("./NamirasoftSupportServerTicket"), exports);
|
|
23
24
|
__exportStar(require("./NamirasoftSupportServerValue"), exports);
|
|
24
25
|
__exportStar(require("./command/CategoryCommand"), exports);
|
|
@@ -32,6 +33,8 @@ __exportStar(require("./command/MessageDeleteCommand"), exports);
|
|
|
32
33
|
__exportStar(require("./command/MessageGetCommand"), exports);
|
|
33
34
|
__exportStar(require("./command/MessageListCommand"), exports);
|
|
34
35
|
__exportStar(require("./command/MessageUpdateCommand"), exports);
|
|
36
|
+
__exportStar(require("./command/MetricsCommand"), exports);
|
|
37
|
+
__exportStar(require("./command/MetricsGetCommand"), exports);
|
|
35
38
|
__exportStar(require("./command/TicketCommand"), exports);
|
|
36
39
|
__exportStar(require("./command/TicketCreateCommand"), exports);
|
|
37
40
|
__exportStar(require("./command/TicketDeleteCommand"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,4DAA0C;AAC1C,gEAA8C;AAC9C,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,4DAA0C;AAC1C,+DAA6C;AAC7C,gEAA8C;AAC9C,2DAAyC;AACzC,8DAA4C;AAC5C,2DAAyC;AACzC,iEAA+C;AAC/C,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,iEAA+C;AAC/C,0DAAwC;AACxC,gEAA8C;AAC9C,gEAA8C;AAC9C,6DAA2C;AAC3C,8DAA4C;AAC5C,gEAA8C;AAC9C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,2DAAyC;AACzC,0DAAwC;AACxC,uEAAqD;AACrD,yDAAuC;AACvC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,4DAA0C;AAC1C,gEAA8C;AAC9C,oEAAkD;AAClD,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,4DAA0C;AAC1C,+DAA6C;AAC7C,gEAA8C;AAC9C,2DAAyC;AACzC,8DAA4C;AAC5C,2DAAyC;AACzC,iEAA+C;AAC/C,iEAA+C;AAC/C,8DAA4C;AAC5C,+DAA6C;AAC7C,iEAA+C;AAC/C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,gEAA8C;AAC9C,gEAA8C;AAC9C,6DAA2C;AAC3C,8DAA4C;AAC5C,gEAA8C;AAC9C,yDAAuC;AACvC,6DAA2C;AAC3C,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,2DAAyC;AACzC,0DAAwC;AACxC,uEAAqD;AACrD,yDAAuC;AACvC,oDAAkC;AAClC,wDAAsC;AACtC,mDAAiC;AACjC,uDAAqC;AACrC,kDAAgC"}
|
|
@@ -9,7 +9,7 @@ const NamirasoftSupportServer_1 = require("../NamirasoftSupportServer");
|
|
|
9
9
|
const TicketMetaTable_1 = require("./TicketMetaTable");
|
|
10
10
|
class NamirasoftSupportMetaDatabase extends namirasoft_site_1.NSBaseMetaDatabase {
|
|
11
11
|
constructor(manager, onError) {
|
|
12
|
-
super({ id: "prd-
|
|
12
|
+
super({ id: "prd-5a0d9558f84b470a", name: "Namirasoft Support", headline: "Need support? We’re here to help!", description: "Whether you prefer chatting live, sending an email, or booking a free meeting, our team is ready to assist you.\nWe respond to live chat and email inquiries during business days. We carefully review meeting requests and will get back to you promptly to confirm your appointment.", logo: "https://static.namirasoft.com/image/namirasoft/support/logo/base.png", link: "https://support.namirasoft.com" });
|
|
13
13
|
this.manager = manager;
|
|
14
14
|
this.onError = onError;
|
|
15
15
|
this.tables = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSupportMetaDatabase.js","sourceRoot":"","sources":["../../src/meta/NamirasoftSupportMetaDatabase.ts"],"names":[],"mappings":";;;AAoBA,2DAAwD;AACxD,qDAA6C;AAC7C,yDAAsD;AACtD,qDAAqD;AACrD,wEAAqE;AACrE,uDAAoD;AAGpD,MAAa,6BAA8B,SAAQ,oCAA2C;IAS1F,YAAY,OAAsB,EAAE,OAAgC;QAEhE,KAAK,CAAC,EAAE,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"NamirasoftSupportMetaDatabase.js","sourceRoot":"","sources":["../../src/meta/NamirasoftSupport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seMetaColumn;
|
|
8
8
|
user_id: BaseMetaColumn;
|
|
9
9
|
category_id: BaseMetaColumn;
|
|
10
|
+
last_sender_id: BaseMetaColumn;
|
|
10
11
|
title: BaseMetaColumn;
|
|
11
12
|
status: BaseMetaColumn;
|
|
12
13
|
priority: BaseMetaColumn;
|
|
@@ -19,6 +19,7 @@ class TicketMetaTable extends namirasoft_site_1.NSBaseMetaTable {
|
|
|
19
19
|
id: new namirasoft_core_1.BaseMetaColumn(this, "id", "ID", "String", true),
|
|
20
20
|
user_id: new namirasoft_core_1.BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
|
21
21
|
category_id: new namirasoft_core_1.BaseMetaColumn(this, "category_id", "Category ID", "Integer", true),
|
|
22
|
+
last_sender_id: new namirasoft_core_1.BaseMetaColumn(this, "last_sender_id", "Last Sender ID", "String", true),
|
|
22
23
|
title: new namirasoft_core_1.BaseMetaColumn(this, "title", "Title", "String", true),
|
|
23
24
|
status: new namirasoft_core_1.BaseMetaColumn(this, "status", "Status", "Enum", true),
|
|
24
25
|
priority: new namirasoft_core_1.BaseMetaColumn(this, "priority", "Priority", "Enum", true),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketMetaTable.js","sourceRoot":"","sources":["../../src/meta/TicketMetaTable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAAiF;AACjF,qDAAsE;AAItE,MAAa,eAAgB,SAAQ,iCAAmD;
|
|
1
|
+
{"version":3,"file":"TicketMetaTable.js","sourceRoot":"","sources":["../../src/meta/TicketMetaTable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAAiF;AACjF,qDAAsE;AAItE,MAAa,eAAgB,SAAQ,iCAAmD;IAepF,YAAY,QAAqD;QAE7D,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,0BAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG;YACX,EAAE,EAAE,I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,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC,CAAA,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAO,OAA4B,EAAE,IAAqB,EAAE,IAAqB,EAAE,KAAiB,EAAE,EAAE;YAEzH,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YACvC,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAChE,CAAC,CAAA,CAAC;IACN,CAAC;CACJ;AA1CD,0CA0CC;AAAA,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { TicketAssignee } from "../enum/TicketAssignee";
|
|
2
1
|
import { TicketPriority } from "../enum/TicketPriority";
|
|
3
|
-
import { TicketStatus } from "../enum/TicketStatus";
|
|
4
2
|
export type TicketInputRow = {
|
|
5
3
|
category_id: number;
|
|
6
4
|
title: string;
|
|
7
|
-
status: TicketStatus;
|
|
8
5
|
priority: TicketPriority;
|
|
9
|
-
assignee: TicketAssignee;
|
|
10
6
|
description: (string | null);
|
|
11
7
|
};
|
package/dist/row/TicketRow.d.ts
CHANGED
package/logo.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.4.
|
|
11
|
+
"version": "1.4.2",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"build": ""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"namirasoft-core": "^1.4.
|
|
21
|
-
"namirasoft-site": "^1.4.
|
|
22
|
-
"namirasoft-node-cli": "^1.4.
|
|
23
|
-
"namirasoft-account": "^1.4.
|
|
20
|
+
"namirasoft-core": "^1.4.81",
|
|
21
|
+
"namirasoft-site": "^1.4.39",
|
|
22
|
+
"namirasoft-node-cli": "^1.4.8",
|
|
23
|
+
"namirasoft-account": "^1.4.85"
|
|
24
24
|
},
|
|
25
25
|
"bin": {
|
|
26
26
|
"ns-support": "./dist/command/cli.js"
|
|
@@ -22,6 +22,7 @@ import { NSABaseServer } from "namirasoft-account";
|
|
|
22
22
|
import { NamirasoftSupportServerCategory } from "./NamirasoftSupportServerCategory";
|
|
23
23
|
import { NamirasoftSupportServerHealthz } from "./NamirasoftSupportServerHealthz";
|
|
24
24
|
import { NamirasoftSupportServerMessage } from "./NamirasoftSupportServerMessage";
|
|
25
|
+
import { NamirasoftSupportServerMetrics } from "./NamirasoftSupportServerMetrics";
|
|
25
26
|
import { NamirasoftSupportServerTicket } from "./NamirasoftSupportServerTicket";
|
|
26
27
|
import { NamirasoftSupportServerValue } from "./NamirasoftSupportServerValue";
|
|
27
28
|
import { TokenManager } from "namirasoft-account";
|
|
@@ -29,14 +30,16 @@ import { TokenManager } from "namirasoft-account";
|
|
|
29
30
|
export class NamirasoftSupportServer extends NSABaseServer
|
|
30
31
|
{
|
|
31
32
|
healthz: NamirasoftSupportServerHealthz;
|
|
33
|
+
metrics: NamirasoftSupportServerMetrics;
|
|
32
34
|
value: NamirasoftSupportServerValue;
|
|
33
35
|
category: NamirasoftSupportServerCategory;
|
|
34
36
|
ticket: NamirasoftSupportServerTicket;
|
|
35
37
|
message: NamirasoftSupportServerMessage;
|
|
36
38
|
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
|
37
39
|
{
|
|
38
|
-
super(base_url, `1.4.
|
|
40
|
+
super(base_url, `1.4.2`, manager, onError);
|
|
39
41
|
this.healthz = new NamirasoftSupportServerHealthz(this);
|
|
42
|
+
this.metrics = new NamirasoftSupportServerMetrics(this);
|
|
40
43
|
this.value = new NamirasoftSupportServerValue(this);
|
|
41
44
|
this.category = new NamirasoftSupportServerCategory(this);
|
|
42
45
|
this.ticket = new NamirasoftSupportServerTicket(this);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { NamirasoftSupportServer } from "./NamirasoftSupportServer";
|
|
22
|
+
import { NamirasoftSupportServerBase } from "./NamirasoftSupportServerBase";
|
|
23
|
+
|
|
24
|
+
export class NamirasoftSupportServerMetrics extends NamirasoftSupportServerBase
|
|
25
|
+
{
|
|
26
|
+
constructor(server: NamirasoftSupportServer)
|
|
27
|
+
{
|
|
28
|
+
super(server);
|
|
29
|
+
this.Get = this.Get.bind(this);
|
|
30
|
+
}
|
|
31
|
+
async Get(): Promise<void>
|
|
32
|
+
{
|
|
33
|
+
let path = `/metrics`;
|
|
34
|
+
await this.server._get<void>(path, {});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -51,6 +51,14 @@ export class MessageCreateCommand extends BaseFinalCommand
|
|
|
51
51
|
optional: false,
|
|
52
52
|
args: ["message"],
|
|
53
53
|
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "ticket_resolved",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'ticket_resolved' in body",
|
|
59
|
+
optional: false,
|
|
60
|
+
args: ["ticket_resolved"],
|
|
61
|
+
defaults: [""]
|
|
54
62
|
}
|
|
55
63
|
]);
|
|
56
64
|
}
|
|
@@ -67,7 +75,8 @@ export class MessageCreateCommand extends BaseFinalCommand
|
|
|
67
75
|
let ans = await server.message.Create({
|
|
68
76
|
ticket_id: this.option_values.ticket_id,
|
|
69
77
|
sender_id: this.option_values.sender_id,
|
|
70
|
-
message: this.option_values.message
|
|
78
|
+
message: this.option_values.message,
|
|
79
|
+
ticket_resolved: this.option_values.ticket_resolved
|
|
71
80
|
});
|
|
72
81
|
this.app.logger.success(JSON.stringify(ans));
|
|
73
82
|
}
|
|
@@ -51,6 +51,14 @@ export class MessageUpdateCommand extends BaseFinalCommand
|
|
|
51
51
|
optional: false,
|
|
52
52
|
args: ["message"],
|
|
53
53
|
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "ticket_resolved",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'ticket_resolved' in body",
|
|
59
|
+
optional: false,
|
|
60
|
+
args: ["ticket_resolved"],
|
|
61
|
+
defaults: [""]
|
|
54
62
|
}
|
|
55
63
|
]);
|
|
56
64
|
}
|
|
@@ -67,7 +75,8 @@ export class MessageUpdateCommand extends BaseFinalCommand
|
|
|
67
75
|
let ans = await server.message.Update(this.arg_values[0], {
|
|
68
76
|
ticket_id: this.option_values.ticket_id,
|
|
69
77
|
sender_id: this.option_values.sender_id,
|
|
70
|
-
message: this.option_values.message
|
|
78
|
+
message: this.option_values.message,
|
|
79
|
+
ticket_resolved: this.option_values.ticket_resolved
|
|
71
80
|
});
|
|
72
81
|
this.app.logger.success(JSON.stringify(ans));
|
|
73
82
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { MetricsGetCommand } from "./MetricsGetCommand";
|
|
23
|
+
|
|
24
|
+
export class MetricsCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"get": MetricsGetCommand,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MetricsGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
41
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.metrics.Get();
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -44,14 +44,6 @@ export class TicketCreateCommand extends BaseFinalCommand
|
|
|
44
44
|
args: ["title"],
|
|
45
45
|
defaults: [""]
|
|
46
46
|
},
|
|
47
|
-
{
|
|
48
|
-
name: "status",
|
|
49
|
-
short: "",
|
|
50
|
-
description: "Provides the value of 'status' in body",
|
|
51
|
-
optional: false,
|
|
52
|
-
args: ["status"],
|
|
53
|
-
defaults: [""]
|
|
54
|
-
},
|
|
55
47
|
{
|
|
56
48
|
name: "priority",
|
|
57
49
|
short: "",
|
|
@@ -60,14 +52,6 @@ export class TicketCreateCommand extends BaseFinalCommand
|
|
|
60
52
|
args: ["priority"],
|
|
61
53
|
defaults: [""]
|
|
62
54
|
},
|
|
63
|
-
{
|
|
64
|
-
name: "assignee",
|
|
65
|
-
short: "",
|
|
66
|
-
description: "Provides the value of 'assignee' in body",
|
|
67
|
-
optional: false,
|
|
68
|
-
args: ["assignee"],
|
|
69
|
-
defaults: [""]
|
|
70
|
-
},
|
|
71
55
|
{
|
|
72
56
|
name: "description",
|
|
73
57
|
short: "",
|
|
@@ -91,9 +75,7 @@ export class TicketCreateCommand extends BaseFinalCommand
|
|
|
91
75
|
let ans = await server.ticket.Create({
|
|
92
76
|
category_id: this.option_values.category_id,
|
|
93
77
|
title: this.option_values.title,
|
|
94
|
-
status: this.option_values.status,
|
|
95
78
|
priority: this.option_values.priority,
|
|
96
|
-
assignee: this.option_values.assignee,
|
|
97
79
|
description: this.option_values.description
|
|
98
80
|
});
|
|
99
81
|
this.app.logger.success(JSON.stringify(ans));
|
|
@@ -44,14 +44,6 @@ export class TicketUpdateCommand extends BaseFinalCommand
|
|
|
44
44
|
args: ["title"],
|
|
45
45
|
defaults: [""]
|
|
46
46
|
},
|
|
47
|
-
{
|
|
48
|
-
name: "status",
|
|
49
|
-
short: "",
|
|
50
|
-
description: "Provides the value of 'status' in body",
|
|
51
|
-
optional: false,
|
|
52
|
-
args: ["status"],
|
|
53
|
-
defaults: [""]
|
|
54
|
-
},
|
|
55
47
|
{
|
|
56
48
|
name: "priority",
|
|
57
49
|
short: "",
|
|
@@ -60,14 +52,6 @@ export class TicketUpdateCommand extends BaseFinalCommand
|
|
|
60
52
|
args: ["priority"],
|
|
61
53
|
defaults: [""]
|
|
62
54
|
},
|
|
63
|
-
{
|
|
64
|
-
name: "assignee",
|
|
65
|
-
short: "",
|
|
66
|
-
description: "Provides the value of 'assignee' in body",
|
|
67
|
-
optional: false,
|
|
68
|
-
args: ["assignee"],
|
|
69
|
-
defaults: [""]
|
|
70
|
-
},
|
|
71
55
|
{
|
|
72
56
|
name: "description",
|
|
73
57
|
short: "",
|
|
@@ -91,9 +75,7 @@ export class TicketUpdateCommand extends BaseFinalCommand
|
|
|
91
75
|
let ans = await server.ticket.Update(this.arg_values[0], {
|
|
92
76
|
category_id: this.option_values.category_id,
|
|
93
77
|
title: this.option_values.title,
|
|
94
|
-
status: this.option_values.status,
|
|
95
78
|
priority: this.option_values.priority,
|
|
96
|
-
assignee: this.option_values.assignee,
|
|
97
79
|
description: this.option_values.description
|
|
98
80
|
});
|
|
99
81
|
this.app.logger.success(JSON.stringify(ans));
|
package/src/command/cli.ts
CHANGED
|
@@ -25,12 +25,14 @@ import { CategoryCommand } from "./CategoryCommand";
|
|
|
25
25
|
import { ConfigCommand } from "namirasoft-node-cli";
|
|
26
26
|
import { HealthzCommand } from "./HealthzCommand";
|
|
27
27
|
import { MessageCommand } from "./MessageCommand";
|
|
28
|
+
import { MetricsCommand } from "./MetricsCommand";
|
|
28
29
|
import { TicketCommand } from "./TicketCommand";
|
|
29
30
|
import { ValueCommand } from "./ValueCommand";
|
|
30
31
|
|
|
31
32
|
let app = new Application("ns-support", new BaseStorage(),
|
|
32
33
|
{
|
|
33
34
|
"healthz": HealthzCommand,
|
|
35
|
+
"metrics": MetricsCommand,
|
|
34
36
|
"value": ValueCommand,
|
|
35
37
|
"category": CategoryCommand,
|
|
36
38
|
"ticket": TicketCommand,
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./NamirasoftSupportServerBase";
|
|
|
23
23
|
export * from "./NamirasoftSupportServerCategory";
|
|
24
24
|
export * from "./NamirasoftSupportServerHealthz";
|
|
25
25
|
export * from "./NamirasoftSupportServerMessage";
|
|
26
|
+
export * from "./NamirasoftSupportServerMetrics";
|
|
26
27
|
export * from "./NamirasoftSupportServerTicket";
|
|
27
28
|
export * from "./NamirasoftSupportServerValue";
|
|
28
29
|
export * from "./command/CategoryCommand";
|
|
@@ -36,6 +37,8 @@ export * from "./command/MessageDeleteCommand";
|
|
|
36
37
|
export * from "./command/MessageGetCommand";
|
|
37
38
|
export * from "./command/MessageListCommand";
|
|
38
39
|
export * from "./command/MessageUpdateCommand";
|
|
40
|
+
export * from "./command/MetricsCommand";
|
|
41
|
+
export * from "./command/MetricsGetCommand";
|
|
39
42
|
export * from "./command/TicketCommand";
|
|
40
43
|
export * from "./command/TicketCreateCommand";
|
|
41
44
|
export * from "./command/TicketDeleteCommand";
|
|
@@ -37,7 +37,7 @@ export class NamirasoftSupportMetaDatabase extends NSBaseMetaDatabase<Namirasoft
|
|
|
37
37
|
};
|
|
38
38
|
constructor(manager?: TokenManager, onError?: (error: Error) => void)
|
|
39
39
|
{
|
|
40
|
-
super({ id: "prd-
|
|
40
|
+
super({ id: "prd-5a0d9558f84b470a", name: "Namirasoft Support", headline: "Need support? We’re here to help!", description: "Whether you prefer chatting live, sending an email, or booking a free meeting, our team is ready to assist you.\nWe respond to live chat and email inquiries during business days. We carefully review meeting requests and will get back to you promptly to confirm your appointment.", logo: "https://static.namirasoft.com/image/namirasoft/support/logo/base.png", link: "https://support.namirasoft.com" });
|
|
41
41
|
this.manager = manager;
|
|
42
42
|
this.onError = onError;
|
|
43
43
|
this.tables = {
|
|
@@ -29,6 +29,7 @@ export class TicketMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, Ti
|
|
|
29
29
|
id: BaseMetaColumn;
|
|
30
30
|
user_id: BaseMetaColumn;
|
|
31
31
|
category_id: BaseMetaColumn;
|
|
32
|
+
last_sender_id: BaseMetaColumn;
|
|
32
33
|
title: BaseMetaColumn;
|
|
33
34
|
status: BaseMetaColumn;
|
|
34
35
|
priority: BaseMetaColumn;
|
|
@@ -44,6 +45,7 @@ export class TicketMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, Ti
|
|
|
44
45
|
id: new BaseMetaColumn(this, "id", "ID", "String", true),
|
|
45
46
|
user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
|
46
47
|
category_id: new BaseMetaColumn(this, "category_id", "Category ID", "Integer", true),
|
|
48
|
+
last_sender_id: new BaseMetaColumn(this, "last_sender_id", "Last Sender ID", "String", true),
|
|
47
49
|
title: new BaseMetaColumn(this, "title", "Title", "String", true),
|
|
48
50
|
status: new BaseMetaColumn(this, "status", "Status", "Enum", true),
|
|
49
51
|
priority: new BaseMetaColumn(this, "priority", "Priority", "Enum", true),
|
|
@@ -18,16 +18,12 @@
|
|
|
18
18
|
/* */
|
|
19
19
|
/****************************************************************/
|
|
20
20
|
|
|
21
|
-
import { TicketAssignee } from "../enum/TicketAssignee";
|
|
22
21
|
import { TicketPriority } from "../enum/TicketPriority";
|
|
23
|
-
import { TicketStatus } from "../enum/TicketStatus";
|
|
24
22
|
|
|
25
23
|
export type TicketInputRow =
|
|
26
24
|
{
|
|
27
25
|
category_id: number;
|
|
28
26
|
title: string;
|
|
29
|
-
status: TicketStatus;
|
|
30
27
|
priority: TicketPriority;
|
|
31
|
-
assignee: TicketAssignee;
|
|
32
28
|
description: (string | null);
|
|
33
29
|
}
|