namirasoft-support 1.4.0
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 +15 -0
- package/dist/NamirasoftSupportServer.js +22 -0
- package/dist/NamirasoftSupportServer.js.map +1 -0
- package/dist/NamirasoftSupportServerBase.d.ts +5 -0
- package/dist/NamirasoftSupportServerBase.js +11 -0
- package/dist/NamirasoftSupportServerBase.js.map +1 -0
- package/dist/NamirasoftSupportServerCategory.d.ts +13 -0
- package/dist/NamirasoftSupportServerCategory.js +41 -0
- package/dist/NamirasoftSupportServerCategory.js.map +1 -0
- package/dist/NamirasoftSupportServerHealthz.d.ts +6 -0
- package/dist/NamirasoftSupportServerHealthz.js +28 -0
- package/dist/NamirasoftSupportServerHealthz.js.map +1 -0
- package/dist/NamirasoftSupportServerMessage.d.ts +17 -0
- package/dist/NamirasoftSupportServerMessage.js +64 -0
- package/dist/NamirasoftSupportServerMessage.js.map +1 -0
- package/dist/NamirasoftSupportServerTicket.d.ts +17 -0
- package/dist/NamirasoftSupportServerTicket.js +64 -0
- package/dist/NamirasoftSupportServerTicket.js.map +1 -0
- package/dist/NamirasoftSupportServerValue.d.ts +6 -0
- package/dist/NamirasoftSupportServerValue.js +29 -0
- package/dist/NamirasoftSupportServerValue.js.map +1 -0
- package/dist/command/CategoryCommand.d.ts +4 -0
- package/dist/command/CategoryCommand.js +17 -0
- package/dist/command/CategoryCommand.js.map +1 -0
- package/dist/command/CategoryGetCommand.d.ts +5 -0
- package/dist/command/CategoryGetCommand.js +38 -0
- package/dist/command/CategoryGetCommand.js.map +1 -0
- package/dist/command/CategoryListCommand.d.ts +5 -0
- package/dist/command/CategoryListCommand.js +38 -0
- package/dist/command/CategoryListCommand.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MessageCommand.d.ts +4 -0
- package/dist/command/MessageCommand.js +23 -0
- package/dist/command/MessageCommand.js.map +1 -0
- package/dist/command/MessageCreateCommand.d.ts +5 -0
- package/dist/command/MessageCreateCommand.js +67 -0
- package/dist/command/MessageCreateCommand.js.map +1 -0
- package/dist/command/MessageDeleteCommand.d.ts +5 -0
- package/dist/command/MessageDeleteCommand.js +38 -0
- package/dist/command/MessageDeleteCommand.js.map +1 -0
- package/dist/command/MessageGetCommand.d.ts +5 -0
- package/dist/command/MessageGetCommand.js +38 -0
- package/dist/command/MessageGetCommand.js.map +1 -0
- package/dist/command/MessageListCommand.d.ts +5 -0
- package/dist/command/MessageListCommand.js +38 -0
- package/dist/command/MessageListCommand.js.map +1 -0
- package/dist/command/MessageUpdateCommand.d.ts +5 -0
- package/dist/command/MessageUpdateCommand.js +67 -0
- package/dist/command/MessageUpdateCommand.js.map +1 -0
- package/dist/command/TicketCommand.d.ts +4 -0
- package/dist/command/TicketCommand.js +23 -0
- package/dist/command/TicketCommand.js.map +1 -0
- package/dist/command/TicketCreateCommand.d.ts +5 -0
- package/dist/command/TicketCreateCommand.js +94 -0
- package/dist/command/TicketCreateCommand.js.map +1 -0
- package/dist/command/TicketDeleteCommand.d.ts +5 -0
- package/dist/command/TicketDeleteCommand.js +38 -0
- package/dist/command/TicketDeleteCommand.js.map +1 -0
- package/dist/command/TicketGetCommand.d.ts +5 -0
- package/dist/command/TicketGetCommand.js +38 -0
- package/dist/command/TicketGetCommand.js.map +1 -0
- package/dist/command/TicketListCommand.d.ts +5 -0
- package/dist/command/TicketListCommand.js +38 -0
- package/dist/command/TicketListCommand.js.map +1 -0
- package/dist/command/TicketUpdateCommand.d.ts +5 -0
- package/dist/command/TicketUpdateCommand.js +94 -0
- package/dist/command/TicketUpdateCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +22 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/TicketAssignee.d.ts +3 -0
- package/dist/enum/TicketAssignee.js +8 -0
- package/dist/enum/TicketAssignee.js.map +1 -0
- package/dist/enum/TicketPriority.d.ts +6 -0
- package/dist/enum/TicketPriority.js +11 -0
- package/dist/enum/TicketPriority.js.map +1 -0
- package/dist/enum/TicketStatus.d.ts +6 -0
- package/dist/enum/TicketStatus.js +11 -0
- package/dist/enum/TicketStatus.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/CategoryMetaTable.d.ts +14 -0
- package/dist/meta/CategoryMetaTable.js +37 -0
- package/dist/meta/CategoryMetaTable.js.map +1 -0
- package/dist/meta/MessageMetaTable.d.ts +16 -0
- package/dist/meta/MessageMetaTable.js +39 -0
- package/dist/meta/MessageMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.d.ts +17 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.js +31 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.js.map +1 -0
- package/dist/meta/TicketMetaTable.d.ts +19 -0
- package/dist/meta/TicketMetaTable.js +42 -0
- package/dist/meta/TicketMetaTable.js.map +1 -0
- package/dist/row/CategoryRow.d.ts +7 -0
- package/dist/row/CategoryRow.js +3 -0
- package/dist/row/CategoryRow.js.map +1 -0
- package/dist/row/MessageInputRow.d.ts +5 -0
- package/dist/row/MessageInputRow.js +3 -0
- package/dist/row/MessageInputRow.js.map +1 -0
- package/dist/row/MessageRow.d.ts +9 -0
- package/dist/row/MessageRow.js +3 -0
- package/dist/row/MessageRow.js.map +1 -0
- package/dist/row/TicketInputRow.d.ts +11 -0
- package/dist/row/TicketInputRow.js +3 -0
- package/dist/row/TicketInputRow.js.map +1 -0
- package/dist/row/TicketRow.d.ts +15 -0
- package/dist/row/TicketRow.js +3 -0
- package/dist/row/TicketRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftSupportServer.ts +45 -0
- package/src/NamirasoftSupportServerBase.ts +30 -0
- package/src/NamirasoftSupportServerCategory.ts +49 -0
- package/src/NamirasoftSupportServerHealthz.ts +36 -0
- package/src/NamirasoftSupportServerMessage.ts +70 -0
- package/src/NamirasoftSupportServerTicket.ts +70 -0
- package/src/NamirasoftSupportServerValue.ts +37 -0
- package/src/command/CategoryCommand.ts +34 -0
- package/src/command/CategoryGetCommand.ts +45 -0
- package/src/command/CategoryListCommand.ts +45 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MessageCommand.ts +40 -0
- package/src/command/MessageCreateCommand.ts +74 -0
- package/src/command/MessageDeleteCommand.ts +45 -0
- package/src/command/MessageGetCommand.ts +45 -0
- package/src/command/MessageListCommand.ts +45 -0
- package/src/command/MessageUpdateCommand.ts +74 -0
- package/src/command/TicketCommand.ts +40 -0
- package/src/command/TicketCreateCommand.ts +101 -0
- package/src/command/TicketDeleteCommand.ts +45 -0
- package/src/command/TicketGetCommand.ts +45 -0
- package/src/command/TicketListCommand.ts +45 -0
- package/src/command/TicketUpdateCommand.ts +101 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +41 -0
- package/src/enum/TicketAssignee.ts +24 -0
- package/src/enum/TicketPriority.ts +27 -0
- package/src/enum/TicketStatus.ts +27 -0
- package/src/index.ts +58 -0
- package/src/meta/CategoryMetaTable.ts +56 -0
- package/src/meta/MessageMetaTable.ts +60 -0
- package/src/meta/NamirasoftSupportMetaDatabase.ts +57 -0
- package/src/meta/TicketMetaTable.ts +66 -0
- package/src/row/CategoryRow.ts +28 -0
- package/src/row/MessageInputRow.ts +26 -0
- package/src/row/MessageRow.ts +30 -0
- package/src/row/TicketInputRow.ts +33 -0
- package/src/row/TicketRow.ts +37 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketListCommand.js","sourceRoot":"","sources":["../../src/command/TicketListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1D,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,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACnH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,8CAmBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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.TicketUpdateCommand = 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 TicketUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "category_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'category_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["category_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "title",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'title' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["title"],
|
|
34
|
+
defaults: [""]
|
|
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
|
+
{
|
|
45
|
+
name: "priority",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'priority' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["priority"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
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
|
+
{
|
|
61
|
+
name: "description",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'description' in body",
|
|
64
|
+
optional: true,
|
|
65
|
+
args: ["description"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
}
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
exec() {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
let token = this.app.storage.getNSAToken();
|
|
73
|
+
if (token == null)
|
|
74
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
75
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
76
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
77
|
+
manager.setValue(token, false);
|
|
78
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
79
|
+
let server = new NamirasoftSupportServer_1.NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
80
|
+
let ans = yield server.ticket.Update(this.arg_values[0], {
|
|
81
|
+
category_id: this.option_values.category_id,
|
|
82
|
+
title: this.option_values.title,
|
|
83
|
+
status: this.option_values.status,
|
|
84
|
+
priority: this.option_values.priority,
|
|
85
|
+
assignee: this.option_values.assignee,
|
|
86
|
+
description: this.option_values.description
|
|
87
|
+
});
|
|
88
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.TicketUpdateCommand = TicketUpdateCommand;
|
|
93
|
+
;
|
|
94
|
+
//# sourceMappingURL=TicketUpdateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketUpdateCommand.js","sourceRoot":"","sources":["../../src/command/TicketUpdateCommand.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValueCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const ValueListCommand_1 = require("./ValueListCommand");
|
|
6
|
+
class ValueCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"list": ValueListCommand_1.ValueListCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ValueCommand = ValueCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=ValueCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueCommand.js","sourceRoot":"","sources":["../../src/command/ValueCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,yDAAsD;AAEtD,MAAa,YAAa,SAAQ,0CAAoB;IAElD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,mCAAgB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,oCAQC;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.ValueListCommand = 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 ValueListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["table", "column", "search", "field_id", "limit"], []);
|
|
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.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ValueListCommand = ValueListCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=ValueListCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueListCommand.js","sourceRoot":"","sources":["../../src/command/ValueListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2DAAkD;AAElD,MAAa,gBAAiB,SAAQ,sCAAgB;IAElD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACxE,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,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACtI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,4CAmBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
5
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
6
|
+
const CategoryCommand_1 = require("./CategoryCommand");
|
|
7
|
+
const namirasoft_node_cli_2 = require("namirasoft-node-cli");
|
|
8
|
+
const HealthzCommand_1 = require("./HealthzCommand");
|
|
9
|
+
const MessageCommand_1 = require("./MessageCommand");
|
|
10
|
+
const TicketCommand_1 = require("./TicketCommand");
|
|
11
|
+
const ValueCommand_1 = require("./ValueCommand");
|
|
12
|
+
let app = new namirasoft_node_cli_1.Application("ns-support", new namirasoft_node_cli_1.BaseStorage(), {
|
|
13
|
+
"healthz": HealthzCommand_1.HealthzCommand,
|
|
14
|
+
"value": ValueCommand_1.ValueCommand,
|
|
15
|
+
"category": CategoryCommand_1.CategoryCommand,
|
|
16
|
+
"ticket": TicketCommand_1.TicketCommand,
|
|
17
|
+
"message": MessageCommand_1.MessageCommand,
|
|
18
|
+
"account": namirasoft_account_1.AccountCommand,
|
|
19
|
+
"config": (argv) => new namirasoft_node_cli_2.ConfigCommand(argv, ["ns-support-server-url"])
|
|
20
|
+
});
|
|
21
|
+
app.run();
|
|
22
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketAssignee = void 0;
|
|
4
|
+
var TicketAssignee;
|
|
5
|
+
(function (TicketAssignee) {
|
|
6
|
+
TicketAssignee["ReadOnly"] = "ReadOnly";
|
|
7
|
+
})(TicketAssignee || (exports.TicketAssignee = TicketAssignee = {}));
|
|
8
|
+
//# sourceMappingURL=TicketAssignee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketAssignee.js","sourceRoot":"","sources":["../../src/enum/TicketAssignee.ts"],"names":[],"mappings":";;;AAoBA,IAAY,cAGX;AAHD,WAAY,cAAc;IAEtB,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketPriority = void 0;
|
|
4
|
+
var TicketPriority;
|
|
5
|
+
(function (TicketPriority) {
|
|
6
|
+
TicketPriority["Low"] = "Low";
|
|
7
|
+
TicketPriority["Medium"] = "Medium";
|
|
8
|
+
TicketPriority["High"] = "High";
|
|
9
|
+
TicketPriority["Urgent"] = "Urgent";
|
|
10
|
+
})(TicketPriority || (exports.TicketPriority = TicketPriority = {}));
|
|
11
|
+
//# sourceMappingURL=TicketPriority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketPriority.js","sourceRoot":"","sources":["../../src/enum/TicketPriority.ts"],"names":[],"mappings":";;;AAoBA,IAAY,cAMX;AAND,WAAY,cAAc;IAEtB,6BAAW,CAAA;IACX,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACrB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketStatus = void 0;
|
|
4
|
+
var TicketStatus;
|
|
5
|
+
(function (TicketStatus) {
|
|
6
|
+
TicketStatus["Open"] = "Open";
|
|
7
|
+
TicketStatus["InProgress"] = "InProgress";
|
|
8
|
+
TicketStatus["Resolved"] = "Resolved";
|
|
9
|
+
TicketStatus["Closed"] = "Closed";
|
|
10
|
+
})(TicketStatus || (exports.TicketStatus = TicketStatus = {}));
|
|
11
|
+
//# sourceMappingURL=TicketStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketStatus.js","sourceRoot":"","sources":["../../src/enum/TicketStatus.ts"],"names":[],"mappings":";;;AAoBA,IAAY,YAMX;AAND,WAAY,YAAY;IAEpB,6BAAa,CAAA;IACb,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;AACrB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * from "./NamirasoftSupportServer";
|
|
2
|
+
export * from "./NamirasoftSupportServerBase";
|
|
3
|
+
export * from "./NamirasoftSupportServerCategory";
|
|
4
|
+
export * from "./NamirasoftSupportServerHealthz";
|
|
5
|
+
export * from "./NamirasoftSupportServerMessage";
|
|
6
|
+
export * from "./NamirasoftSupportServerTicket";
|
|
7
|
+
export * from "./NamirasoftSupportServerValue";
|
|
8
|
+
export * from "./command/CategoryCommand";
|
|
9
|
+
export * from "./command/CategoryGetCommand";
|
|
10
|
+
export * from "./command/CategoryListCommand";
|
|
11
|
+
export * from "./command/HealthzCommand";
|
|
12
|
+
export * from "./command/HealthzGetCommand";
|
|
13
|
+
export * from "./command/MessageCommand";
|
|
14
|
+
export * from "./command/MessageCreateCommand";
|
|
15
|
+
export * from "./command/MessageDeleteCommand";
|
|
16
|
+
export * from "./command/MessageGetCommand";
|
|
17
|
+
export * from "./command/MessageListCommand";
|
|
18
|
+
export * from "./command/MessageUpdateCommand";
|
|
19
|
+
export * from "./command/TicketCommand";
|
|
20
|
+
export * from "./command/TicketCreateCommand";
|
|
21
|
+
export * from "./command/TicketDeleteCommand";
|
|
22
|
+
export * from "./command/TicketGetCommand";
|
|
23
|
+
export * from "./command/TicketListCommand";
|
|
24
|
+
export * from "./command/TicketUpdateCommand";
|
|
25
|
+
export * from "./command/ValueCommand";
|
|
26
|
+
export * from "./command/ValueListCommand";
|
|
27
|
+
export * from "./enum/TicketAssignee";
|
|
28
|
+
export * from "./enum/TicketPriority";
|
|
29
|
+
export * from "./enum/TicketStatus";
|
|
30
|
+
export * from "./meta/CategoryMetaTable";
|
|
31
|
+
export * from "./meta/MessageMetaTable";
|
|
32
|
+
export * from "./meta/NamirasoftSupportMetaDatabase";
|
|
33
|
+
export * from "./meta/TicketMetaTable";
|
|
34
|
+
export * from "./row/CategoryRow";
|
|
35
|
+
export * from "./row/MessageInputRow";
|
|
36
|
+
export * from "./row/MessageRow";
|
|
37
|
+
export * from "./row/TicketInputRow";
|
|
38
|
+
export * from "./row/TicketRow";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./NamirasoftSupportServer"), exports);
|
|
18
|
+
__exportStar(require("./NamirasoftSupportServerBase"), exports);
|
|
19
|
+
__exportStar(require("./NamirasoftSupportServerCategory"), exports);
|
|
20
|
+
__exportStar(require("./NamirasoftSupportServerHealthz"), exports);
|
|
21
|
+
__exportStar(require("./NamirasoftSupportServerMessage"), exports);
|
|
22
|
+
__exportStar(require("./NamirasoftSupportServerTicket"), exports);
|
|
23
|
+
__exportStar(require("./NamirasoftSupportServerValue"), exports);
|
|
24
|
+
__exportStar(require("./command/CategoryCommand"), exports);
|
|
25
|
+
__exportStar(require("./command/CategoryGetCommand"), exports);
|
|
26
|
+
__exportStar(require("./command/CategoryListCommand"), exports);
|
|
27
|
+
__exportStar(require("./command/HealthzCommand"), exports);
|
|
28
|
+
__exportStar(require("./command/HealthzGetCommand"), exports);
|
|
29
|
+
__exportStar(require("./command/MessageCommand"), exports);
|
|
30
|
+
__exportStar(require("./command/MessageCreateCommand"), exports);
|
|
31
|
+
__exportStar(require("./command/MessageDeleteCommand"), exports);
|
|
32
|
+
__exportStar(require("./command/MessageGetCommand"), exports);
|
|
33
|
+
__exportStar(require("./command/MessageListCommand"), exports);
|
|
34
|
+
__exportStar(require("./command/MessageUpdateCommand"), exports);
|
|
35
|
+
__exportStar(require("./command/TicketCommand"), exports);
|
|
36
|
+
__exportStar(require("./command/TicketCreateCommand"), exports);
|
|
37
|
+
__exportStar(require("./command/TicketDeleteCommand"), exports);
|
|
38
|
+
__exportStar(require("./command/TicketGetCommand"), exports);
|
|
39
|
+
__exportStar(require("./command/TicketListCommand"), exports);
|
|
40
|
+
__exportStar(require("./command/TicketUpdateCommand"), exports);
|
|
41
|
+
__exportStar(require("./command/ValueCommand"), exports);
|
|
42
|
+
__exportStar(require("./command/ValueListCommand"), exports);
|
|
43
|
+
__exportStar(require("./enum/TicketAssignee"), exports);
|
|
44
|
+
__exportStar(require("./enum/TicketPriority"), exports);
|
|
45
|
+
__exportStar(require("./enum/TicketStatus"), exports);
|
|
46
|
+
__exportStar(require("./meta/CategoryMetaTable"), exports);
|
|
47
|
+
__exportStar(require("./meta/MessageMetaTable"), exports);
|
|
48
|
+
__exportStar(require("./meta/NamirasoftSupportMetaDatabase"), exports);
|
|
49
|
+
__exportStar(require("./meta/TicketMetaTable"), exports);
|
|
50
|
+
__exportStar(require("./row/CategoryRow"), exports);
|
|
51
|
+
__exportStar(require("./row/MessageInputRow"), exports);
|
|
52
|
+
__exportStar(require("./row/MessageRow"), exports);
|
|
53
|
+
__exportStar(require("./row/TicketInputRow"), exports);
|
|
54
|
+
__exportStar(require("./row/TicketRow"), exports);
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseMetaColumn } from "namirasoft-core";
|
|
2
|
+
import { CategoryRow } from "../row/CategoryRow";
|
|
3
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
4
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
5
|
+
export declare class CategoryMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, CategoryRow> {
|
|
6
|
+
columns: {
|
|
7
|
+
id: BaseMetaColumn;
|
|
8
|
+
name: BaseMetaColumn;
|
|
9
|
+
description: BaseMetaColumn;
|
|
10
|
+
created_at: BaseMetaColumn;
|
|
11
|
+
updated_at: BaseMetaColumn;
|
|
12
|
+
};
|
|
13
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftSupportServer>);
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.CategoryMetaTable = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const namirasoft_site_1 = require("namirasoft-site");
|
|
15
|
+
class CategoryMetaTable extends namirasoft_site_1.NSBaseMetaTable {
|
|
16
|
+
constructor(database) {
|
|
17
|
+
super(database, "category", "Category", new namirasoft_core_1.BaseUUID(""));
|
|
18
|
+
this.columns = {
|
|
19
|
+
id: new namirasoft_core_1.BaseMetaColumn(this, "id", "ID", "Integer", true),
|
|
20
|
+
name: new namirasoft_core_1.BaseMetaColumn(this, "name", "Name", "String", true),
|
|
21
|
+
description: new namirasoft_core_1.BaseMetaColumn(this, "description", "Description", "String", false),
|
|
22
|
+
created_at: new namirasoft_core_1.BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
23
|
+
updated_at: new namirasoft_core_1.BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
24
|
+
};
|
|
25
|
+
this.back_end.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
let server = this.database.getServer();
|
|
27
|
+
return yield server.category.Get(id);
|
|
28
|
+
});
|
|
29
|
+
this.back_end.list = (filters, page, size, sorts) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
let server = this.database.getServer();
|
|
31
|
+
return yield server.category.List(filters, page, size, sorts);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.CategoryMetaTable = CategoryMetaTable;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=CategoryMetaTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryMetaTable.js","sourceRoot":"","sources":["../../src/meta/CategoryMetaTable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAAiF;AAEjF,qDAAsE;AAGtE,MAAa,iBAAkB,SAAQ,iCAAqD;IASxF,YAAY,QAAqD;QAE7D,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,0BAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,GAAG;YACX,EAAE,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC;YACzD,IAAI,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC;YAC9D,WAAW,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC;YACpF,UAAU,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC;YAClF,UAAU,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC;SACrF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAO,EAAU,EAAE,EAAE;YAErC,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YACvC,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzC,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,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAClE,CAAC,CAAA,CAAC;IACN,CAAC;CACJ;AA9BD,8CA8BC;AAAA,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseMetaColumn } from "namirasoft-core";
|
|
2
|
+
import { MessageRow } from "../row/MessageRow";
|
|
3
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
4
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
5
|
+
export declare class MessageMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, MessageRow> {
|
|
6
|
+
columns: {
|
|
7
|
+
id: BaseMetaColumn;
|
|
8
|
+
user_id: BaseMetaColumn;
|
|
9
|
+
ticket_id: BaseMetaColumn;
|
|
10
|
+
sender_id: BaseMetaColumn;
|
|
11
|
+
message: BaseMetaColumn;
|
|
12
|
+
created_at: BaseMetaColumn;
|
|
13
|
+
updated_at: BaseMetaColumn;
|
|
14
|
+
};
|
|
15
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftSupportServer>);
|
|
16
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.MessageMetaTable = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const namirasoft_site_1 = require("namirasoft-site");
|
|
15
|
+
class MessageMetaTable extends namirasoft_site_1.NSBaseMetaTable {
|
|
16
|
+
constructor(database) {
|
|
17
|
+
super(database, "message", "Message", new namirasoft_core_1.BaseUUID(""));
|
|
18
|
+
this.columns = {
|
|
19
|
+
id: new namirasoft_core_1.BaseMetaColumn(this, "id", "ID", "String", true),
|
|
20
|
+
user_id: new namirasoft_core_1.BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
|
21
|
+
ticket_id: new namirasoft_core_1.BaseMetaColumn(this, "ticket_id", "Ticket ID", "String", true),
|
|
22
|
+
sender_id: new namirasoft_core_1.BaseMetaColumn(this, "sender_id", "Sender ID", "String", true),
|
|
23
|
+
message: new namirasoft_core_1.BaseMetaColumn(this, "message", "Message", "String", true),
|
|
24
|
+
created_at: new namirasoft_core_1.BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
25
|
+
updated_at: new namirasoft_core_1.BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
26
|
+
};
|
|
27
|
+
this.back_end.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
let server = this.database.getServer();
|
|
29
|
+
return yield server.message.Get(id);
|
|
30
|
+
});
|
|
31
|
+
this.back_end.list = (filters, page, size, sorts) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
let server = this.database.getServer();
|
|
33
|
+
return yield server.message.List(filters, page, size, sorts);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.MessageMetaTable = MessageMetaTable;
|
|
38
|
+
;
|
|
39
|
+
//# sourceMappingURL=MessageMetaTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageMetaTable.js","sourceRoot":"","sources":["../../src/meta/MessageMetaTable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAAiF;AAEjF,qDAAsE;AAGtE,MAAa,gBAAiB,SAAQ,iCAAoD;IAWtF,YAAY,QAAqD;QAE7D,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,0BAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG;YACX,EAAE,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC;YACxD,OAAO,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC;YACvE,SAAS,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC;YAC7E,SAAS,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC;YAC7E,OAAO,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC;YACvE,UAAU,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC;YAClF,UAAU,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC;SACrF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAO,EAAU,EAAE,EAAE;YAErC,IAAI,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YACvC,OAAO,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACxC,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,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACjE,CAAC,CAAA,CAAC;IACN,CAAC;CACJ;AAlCD,4CAkCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CategoryMetaTable } from "./CategoryMetaTable";
|
|
2
|
+
import { MessageMetaTable } from "./MessageMetaTable";
|
|
3
|
+
import { NSBaseMetaDatabase } from "namirasoft-site";
|
|
4
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
5
|
+
import { TicketMetaTable } from "./TicketMetaTable";
|
|
6
|
+
import { TokenManager } from "namirasoft-account";
|
|
7
|
+
export declare class NamirasoftSupportMetaDatabase extends NSBaseMetaDatabase<NamirasoftSupportServer> {
|
|
8
|
+
private manager?;
|
|
9
|
+
private onError?;
|
|
10
|
+
tables: {
|
|
11
|
+
category: CategoryMetaTable;
|
|
12
|
+
ticket: TicketMetaTable;
|
|
13
|
+
message: MessageMetaTable;
|
|
14
|
+
};
|
|
15
|
+
constructor(manager?: TokenManager, onError?: (error: Error) => void);
|
|
16
|
+
getServer(): NamirasoftSupportServer;
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NamirasoftSupportMetaDatabase = void 0;
|
|
4
|
+
const CategoryMetaTable_1 = require("./CategoryMetaTable");
|
|
5
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
6
|
+
const MessageMetaTable_1 = require("./MessageMetaTable");
|
|
7
|
+
const namirasoft_site_1 = require("namirasoft-site");
|
|
8
|
+
const NamirasoftSupportServer_1 = require("../NamirasoftSupportServer");
|
|
9
|
+
const TicketMetaTable_1 = require("./TicketMetaTable");
|
|
10
|
+
class NamirasoftSupportMetaDatabase extends namirasoft_site_1.NSBaseMetaDatabase {
|
|
11
|
+
constructor(manager, onError) {
|
|
12
|
+
super({ id: "prd-a365c9a5db434a23", name: "Namirasoft Workspace", headline: "Workspace Management Service", description: "Manage workspaces effectively. Plan, execute, and track workspace progress. Collaborate with team members and ensure timely delivery.", logo: "https://static.namirasoft.com/image/namirasoft/workspace/logo/base.png", link: "https://workspace.namirasoft.com" });
|
|
13
|
+
this.manager = manager;
|
|
14
|
+
this.onError = onError;
|
|
15
|
+
this.tables = {
|
|
16
|
+
category: new CategoryMetaTable_1.CategoryMetaTable(this),
|
|
17
|
+
ticket: new TicketMetaTable_1.TicketMetaTable(this),
|
|
18
|
+
message: new MessageMetaTable_1.MessageMetaTable(this),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
getServer() {
|
|
22
|
+
if (!this.manager || !this.onError)
|
|
23
|
+
throw new Error("Arguments of NamirasoftSupportMetaDatabase (manager, onError) are required for server operations.");
|
|
24
|
+
let NAME = namirasoft_site_1.NSBaseMetaDatabase.getServerBaseURL(this.product.name);
|
|
25
|
+
let BASE_URL = new namirasoft_core_1.EnvService(NAME, true).getString();
|
|
26
|
+
return new NamirasoftSupportServer_1.NamirasoftSupportServer(BASE_URL, this.manager, this.onError);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.NamirasoftSupportMetaDatabase = NamirasoftSupportMetaDatabase;
|
|
30
|
+
;
|
|
31
|
+
//# sourceMappingURL=NamirasoftSupportMetaDatabase.js.map
|
|
@@ -0,0 +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,sBAAsB,EAAE,QAAQ,EAAE,8BAA8B,EAAE,WAAW,EAAE,uIAAuI,EAAE,IAAI,EAAE,wEAAwE,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC,CAAC;QAC9X,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG;YACV,QAAQ,EAAE,IAAI,qCAAiB,CAAC,IAAI,CAAC;YACrC,MAAM,EAAE,IAAI,iCAAe,CAAC,IAAI,CAAC;YACjC,OAAO,EAAE,IAAI,mCAAgB,CAAC,IAAI,CAAC;SACtC,CAAC;IACN,CAAC;IACQ,SAAS;QAEd,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO;YAC9B,MAAM,IAAI,KAAK,CAAC,mGAAmG,CAAC,CAAA;QACxH,IAAI,IAAI,GAAG,oCAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClE,IAAI,QAAQ,GAAG,IAAI,4BAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;QACtD,OAAO,IAAI,iDAAuB,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7E,CAAC;CACJ;AA5BD,sEA4BC;AAAA,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseMetaColumn } from "namirasoft-core";
|
|
2
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
3
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
4
|
+
import { TicketRow } from "../row/TicketRow";
|
|
5
|
+
export declare class TicketMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, TicketRow> {
|
|
6
|
+
columns: {
|
|
7
|
+
id: BaseMetaColumn;
|
|
8
|
+
user_id: BaseMetaColumn;
|
|
9
|
+
category_id: BaseMetaColumn;
|
|
10
|
+
title: BaseMetaColumn;
|
|
11
|
+
status: BaseMetaColumn;
|
|
12
|
+
priority: BaseMetaColumn;
|
|
13
|
+
assignee: BaseMetaColumn;
|
|
14
|
+
description: BaseMetaColumn;
|
|
15
|
+
created_at: BaseMetaColumn;
|
|
16
|
+
updated_at: BaseMetaColumn;
|
|
17
|
+
};
|
|
18
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftSupportServer>);
|
|
19
|
+
}
|