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,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const MessageCreateCommand_1 = require("./MessageCreateCommand");
|
|
6
|
+
const MessageDeleteCommand_1 = require("./MessageDeleteCommand");
|
|
7
|
+
const MessageGetCommand_1 = require("./MessageGetCommand");
|
|
8
|
+
const MessageListCommand_1 = require("./MessageListCommand");
|
|
9
|
+
const MessageUpdateCommand_1 = require("./MessageUpdateCommand");
|
|
10
|
+
class MessageCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
11
|
+
constructor(argv) {
|
|
12
|
+
super(argv, {
|
|
13
|
+
"list": MessageListCommand_1.MessageListCommand,
|
|
14
|
+
"get": MessageGetCommand_1.MessageGetCommand,
|
|
15
|
+
"create": MessageCreateCommand_1.MessageCreateCommand,
|
|
16
|
+
"update": MessageUpdateCommand_1.MessageUpdateCommand,
|
|
17
|
+
"delete": MessageDeleteCommand_1.MessageDeleteCommand,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MessageCommand = MessageCommand;
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=MessageCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageCommand.js","sourceRoot":"","sources":["../../src/command/MessageCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,iEAA8D;AAC9D,iEAA8D;AAC9D,2DAAwD;AACxD,6DAA0D;AAC1D,iEAA8D;AAE9D,MAAa,cAAe,SAAQ,0CAAoB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,uCAAkB;YAC1B,KAAK,EAAE,qCAAiB;YACxB,QAAQ,EAAE,2CAAoB;YAC9B,QAAQ,EAAE,2CAAoB;YAC9B,QAAQ,EAAE,2CAAoB;SACjC,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,wCAYC;AAAA,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.MessageCreateCommand = 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 MessageCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "ticket_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'ticket_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["ticket_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "sender_id",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'sender_id' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["sender_id"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "message",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'message' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["message"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
exec() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
let token = this.app.storage.getNSAToken();
|
|
49
|
+
if (token == null)
|
|
50
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
51
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
52
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
53
|
+
manager.setValue(token, false);
|
|
54
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
55
|
+
let server = new NamirasoftSupportServer_1.NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
56
|
+
let ans = yield server.message.Create({
|
|
57
|
+
ticket_id: this.option_values.ticket_id,
|
|
58
|
+
sender_id: this.option_values.sender_id,
|
|
59
|
+
message: this.option_values.message
|
|
60
|
+
});
|
|
61
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.MessageCreateCommand = MessageCreateCommand;
|
|
66
|
+
;
|
|
67
|
+
//# sourceMappingURL=MessageCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageCreateCommand.js","sourceRoot":"","sources":["../../src/command/MessageCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,wEAAqE;AACrE,2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AAE,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;aACtC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAhDD,oDAgDC;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.MessageDeleteCommand = 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 MessageDeleteCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
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.message.Delete(this.arg_values[0]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MessageDeleteCommand = MessageDeleteCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=MessageDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageDeleteCommand.js","sourceRoot":"","sources":["../../src/command/MessageDeleteCommand.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,EAAE,CAAC,CAAC;IAC5B,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,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,oDAmBC;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.MessageGetCommand = 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 MessageGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
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.message.Get(this.arg_values[0]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MessageGetCommand = MessageGetCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=MessageGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageGetCommand.js","sourceRoot":"","sources":["../../src/command/MessageGetCommand.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,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,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,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,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,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.MessageListCommand = 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 MessageListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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.message.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.MessageListCommand = MessageListCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=MessageListCommand.js.map
|
|
@@ -0,0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,CAAC;YACpH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,gDAmBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.MessageUpdateCommand = 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 MessageUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "ticket_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'ticket_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["ticket_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "sender_id",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'sender_id' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["sender_id"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "message",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'message' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["message"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
exec() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
let token = this.app.storage.getNSAToken();
|
|
49
|
+
if (token == null)
|
|
50
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
51
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
52
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
53
|
+
manager.setValue(token, false);
|
|
54
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
55
|
+
let server = new NamirasoftSupportServer_1.NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
56
|
+
let ans = yield server.message.Update(this.arg_values[0], {
|
|
57
|
+
ticket_id: this.option_values.ticket_id,
|
|
58
|
+
sender_id: this.option_values.sender_id,
|
|
59
|
+
message: this.option_values.message
|
|
60
|
+
});
|
|
61
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.MessageUpdateCommand = MessageUpdateCommand;
|
|
66
|
+
;
|
|
67
|
+
//# sourceMappingURL=MessageUpdateCommand.js.map
|
|
@@ -0,0 +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,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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,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;aACtC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAhDD,oDAgDC;AAAA,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const TicketCreateCommand_1 = require("./TicketCreateCommand");
|
|
6
|
+
const TicketDeleteCommand_1 = require("./TicketDeleteCommand");
|
|
7
|
+
const TicketGetCommand_1 = require("./TicketGetCommand");
|
|
8
|
+
const TicketListCommand_1 = require("./TicketListCommand");
|
|
9
|
+
const TicketUpdateCommand_1 = require("./TicketUpdateCommand");
|
|
10
|
+
class TicketCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
11
|
+
constructor(argv) {
|
|
12
|
+
super(argv, {
|
|
13
|
+
"list": TicketListCommand_1.TicketListCommand,
|
|
14
|
+
"get": TicketGetCommand_1.TicketGetCommand,
|
|
15
|
+
"create": TicketCreateCommand_1.TicketCreateCommand,
|
|
16
|
+
"update": TicketUpdateCommand_1.TicketUpdateCommand,
|
|
17
|
+
"delete": TicketDeleteCommand_1.TicketDeleteCommand,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TicketCommand = TicketCommand;
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=TicketCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketCommand.js","sourceRoot":"","sources":["../../src/command/TicketCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,+DAA4D;AAC5D,+DAA4D;AAC5D,yDAAsD;AACtD,2DAAwD;AACxD,+DAA4D;AAE5D,MAAa,aAAc,SAAQ,0CAAoB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,qCAAiB;YACzB,KAAK,EAAE,mCAAgB;YACvB,QAAQ,EAAE,yCAAmB;YAC7B,QAAQ,EAAE,yCAAmB;YAC7B,QAAQ,EAAE,yCAAmB;SAChC,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,sCAYC;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.TicketCreateCommand = 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 TicketCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
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.Create({
|
|
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.TicketCreateCommand = TicketCreateCommand;
|
|
93
|
+
;
|
|
94
|
+
//# sourceMappingURL=TicketCreateCommand.js.map
|
|
@@ -0,0 +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;Y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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,MAAM,CAAC;gBACjC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ;gBACrC,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;AA3ED,kDA2EC;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.TicketDeleteCommand = 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 TicketDeleteCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
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.ticket.Delete(this.arg_values[0]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.TicketDeleteCommand = TicketDeleteCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=TicketDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketDeleteCommand.js","sourceRoot":"","sources":["../../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aiter = (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.TicketGetCommand = 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 TicketGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], []);
|
|
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.ticket.Get(this.arg_values[0]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.TicketGetCommand = TicketGetCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=TicketGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketGetCommand.js","sourceRoot":"","sources":["../../src/command/TicketGetCommand.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,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,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,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,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,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.TicketListCommand = 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 TicketListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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.ticket.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.TicketListCommand = TicketListCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=TicketListCommand.js.map
|