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,42 @@
|
|
|
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.TicketMetaTable = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const namirasoft_site_1 = require("namirasoft-site");
|
|
15
|
+
class TicketMetaTable extends namirasoft_site_1.NSBaseMetaTable {
|
|
16
|
+
constructor(database) {
|
|
17
|
+
super(database, "ticket", "Ticket", 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
|
+
category_id: new namirasoft_core_1.BaseMetaColumn(this, "category_id", "Category ID", "Integer", true),
|
|
22
|
+
title: new namirasoft_core_1.BaseMetaColumn(this, "title", "Title", "String", true),
|
|
23
|
+
status: new namirasoft_core_1.BaseMetaColumn(this, "status", "Status", "Enum", true),
|
|
24
|
+
priority: new namirasoft_core_1.BaseMetaColumn(this, "priority", "Priority", "Enum", true),
|
|
25
|
+
assignee: new namirasoft_core_1.BaseMetaColumn(this, "assignee", "Assignee", "Enum", true),
|
|
26
|
+
description: new namirasoft_core_1.BaseMetaColumn(this, "description", "Description", "String", false),
|
|
27
|
+
created_at: new namirasoft_core_1.BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
28
|
+
updated_at: new namirasoft_core_1.BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
29
|
+
};
|
|
30
|
+
this.back_end.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let server = this.database.getServer();
|
|
32
|
+
return yield server.ticket.Get(id);
|
|
33
|
+
});
|
|
34
|
+
this.back_end.list = (filters, page, size, sorts) => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
let server = this.database.getServer();
|
|
36
|
+
return yield server.ticket.List(filters, page, size, sorts);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.TicketMetaTable = TicketMetaTable;
|
|
41
|
+
;
|
|
42
|
+
//# sourceMappingURL=TicketMetaTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketMetaTable.js","sourceRoot":"","sources":["../../src/meta/TicketMetaTable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAAiF;AACjF,qDAAsE;AAItE,MAAa,eAAgB,SAAQ,iCAAmD;IAcpF,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,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,WAAW,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC;YACpF,KAAK,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC;YACjE,MAAM,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC;YAClE,QAAQ,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;YACxE,QAAQ,EAAE,IAAI,gCAAc,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC;YACxE,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,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;AAxCD,0CAwCC;AAAA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryRow.js","sourceRoot":"","sources":["../../src/row/CategoryRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageInputRow.js","sourceRoot":"","sources":["../../src/row/MessageInputRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageRow.js","sourceRoot":"","sources":["../../src/row/MessageRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TicketAssignee } from "../enum/TicketAssignee";
|
|
2
|
+
import { TicketPriority } from "../enum/TicketPriority";
|
|
3
|
+
import { TicketStatus } from "../enum/TicketStatus";
|
|
4
|
+
export type TicketInputRow = {
|
|
5
|
+
category_id: number;
|
|
6
|
+
title: string;
|
|
7
|
+
status: TicketStatus;
|
|
8
|
+
priority: TicketPriority;
|
|
9
|
+
assignee: TicketAssignee;
|
|
10
|
+
description: (string | null);
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketInputRow.js","sourceRoot":"","sources":["../../src/row/TicketInputRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TicketAssignee } from "../enum/TicketAssignee";
|
|
2
|
+
import { TicketPriority } from "../enum/TicketPriority";
|
|
3
|
+
import { TicketStatus } from "../enum/TicketStatus";
|
|
4
|
+
export type TicketRow = {
|
|
5
|
+
id: string;
|
|
6
|
+
user_id: string;
|
|
7
|
+
category_id: number;
|
|
8
|
+
title: string;
|
|
9
|
+
status: TicketStatus;
|
|
10
|
+
priority: TicketPriority;
|
|
11
|
+
assignee: TicketAssignee;
|
|
12
|
+
description: (string | null);
|
|
13
|
+
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TicketRow.js","sourceRoot":"","sources":["../../src/row/TicketRow.ts"],"names":[],"mappings":""}
|
package/logo.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-support",
|
|
3
|
+
"title": "Namirasoft Support NPM Package",
|
|
4
|
+
"description": "Namira Software Corporation Support NPM Package",
|
|
5
|
+
"icon": "logo.png",
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/support/logo/base.png",
|
|
7
|
+
"language": "ts",
|
|
8
|
+
"framework": "npm",
|
|
9
|
+
"application": "package",
|
|
10
|
+
"private": false,
|
|
11
|
+
"version": "1.4.0",
|
|
12
|
+
"author": "Amir Abolhasani",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": ""
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"namirasoft-core": "^1.4.76",
|
|
21
|
+
"namirasoft-site": "^1.4.38",
|
|
22
|
+
"namirasoft-node-cli": "^1.4.7",
|
|
23
|
+
"namirasoft-account": "^1.4.79"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"ns-support": "./dist/command/cli.js"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -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 { NSABaseServer } from "namirasoft-account";
|
|
22
|
+
import { NamirasoftSupportServerCategory } from "./NamirasoftSupportServerCategory";
|
|
23
|
+
import { NamirasoftSupportServerHealthz } from "./NamirasoftSupportServerHealthz";
|
|
24
|
+
import { NamirasoftSupportServerMessage } from "./NamirasoftSupportServerMessage";
|
|
25
|
+
import { NamirasoftSupportServerTicket } from "./NamirasoftSupportServerTicket";
|
|
26
|
+
import { NamirasoftSupportServerValue } from "./NamirasoftSupportServerValue";
|
|
27
|
+
import { TokenManager } from "namirasoft-account";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftSupportServer extends NSABaseServer
|
|
30
|
+
{
|
|
31
|
+
healthz: NamirasoftSupportServerHealthz;
|
|
32
|
+
value: NamirasoftSupportServerValue;
|
|
33
|
+
category: NamirasoftSupportServerCategory;
|
|
34
|
+
ticket: NamirasoftSupportServerTicket;
|
|
35
|
+
message: NamirasoftSupportServerMessage;
|
|
36
|
+
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
|
37
|
+
{
|
|
38
|
+
super(base_url, `1.4.0`, manager, onError);
|
|
39
|
+
this.healthz = new NamirasoftSupportServerHealthz(this);
|
|
40
|
+
this.value = new NamirasoftSupportServerValue(this);
|
|
41
|
+
this.category = new NamirasoftSupportServerCategory(this);
|
|
42
|
+
this.ticket = new NamirasoftSupportServerTicket(this);
|
|
43
|
+
this.message = new NamirasoftSupportServerMessage(this);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
|
|
23
|
+
export class NamirasoftSupportServerBase
|
|
24
|
+
{
|
|
25
|
+
public server: NamirasoftSupportServer;
|
|
26
|
+
constructor(server: NamirasoftSupportServer)
|
|
27
|
+
{
|
|
28
|
+
this.server = server;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { CategoryRow } from "./row/CategoryRow";
|
|
22
|
+
import { FilterItem } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftSupportServer } from "./NamirasoftSupportServer";
|
|
24
|
+
import { NamirasoftSupportServerBase } from "./NamirasoftSupportServerBase";
|
|
25
|
+
import { SortItem } from "namirasoft-core";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftSupportServerCategory extends NamirasoftSupportServerBase
|
|
28
|
+
{
|
|
29
|
+
constructor(server: NamirasoftSupportServer)
|
|
30
|
+
{
|
|
31
|
+
super(server);
|
|
32
|
+
this.List = this.List.bind(this);
|
|
33
|
+
this.Get = this.Get.bind(this);
|
|
34
|
+
}
|
|
35
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: CategoryRow[], count: number }>
|
|
36
|
+
{
|
|
37
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
38
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
39
|
+
let path = `/category/list`;
|
|
40
|
+
let { data } = await this.server._get<{ rows: CategoryRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
async Get(id: (string | null)): Promise<CategoryRow>
|
|
44
|
+
{
|
|
45
|
+
let path = `/category/${id}`;
|
|
46
|
+
let { data } = await this.server._get<CategoryRow>(path, {});
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
@@ -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 NamirasoftSupportServerHealthz 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 = `/healthz`;
|
|
34
|
+
await this.server._get<void>(path, {});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { FilterItem } from "namirasoft-core";
|
|
22
|
+
import { MessageInputRow } from "./row/MessageInputRow";
|
|
23
|
+
import { MessageRow } from "./row/MessageRow";
|
|
24
|
+
import { NamirasoftSupportServer } from "./NamirasoftSupportServer";
|
|
25
|
+
import { NamirasoftSupportServerBase } from "./NamirasoftSupportServerBase";
|
|
26
|
+
import { SortItem } from "namirasoft-core";
|
|
27
|
+
|
|
28
|
+
export class NamirasoftSupportServerMessage extends NamirasoftSupportServerBase
|
|
29
|
+
{
|
|
30
|
+
constructor(server: NamirasoftSupportServer)
|
|
31
|
+
{
|
|
32
|
+
super(server);
|
|
33
|
+
this.List = this.List.bind(this);
|
|
34
|
+
this.Get = this.Get.bind(this);
|
|
35
|
+
this.Create = this.Create.bind(this);
|
|
36
|
+
this.Update = this.Update.bind(this);
|
|
37
|
+
this.Delete = this.Delete.bind(this);
|
|
38
|
+
}
|
|
39
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: MessageRow[], count: number }>
|
|
40
|
+
{
|
|
41
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
42
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
43
|
+
let path = `/message/list`;
|
|
44
|
+
let { data } = await this.server._get<{ rows: MessageRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
async Get(id: string): Promise<MessageRow>
|
|
48
|
+
{
|
|
49
|
+
let path = `/message/${id}`;
|
|
50
|
+
let { data } = await this.server._get<MessageRow>(path, {});
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
async Create(body: MessageInputRow): Promise<MessageRow>
|
|
54
|
+
{
|
|
55
|
+
let path = `/message`;
|
|
56
|
+
let { data } = await this.server._post<MessageRow>(path, {}, body);
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
async Update(id: string, body: MessageInputRow): Promise<MessageRow>
|
|
60
|
+
{
|
|
61
|
+
let path = `/message/${id}`;
|
|
62
|
+
let { data } = await this.server._put<MessageRow>(path, {}, body);
|
|
63
|
+
return data;
|
|
64
|
+
}
|
|
65
|
+
async Delete(id: string): Promise<void>
|
|
66
|
+
{
|
|
67
|
+
let path = `/message/${id}`;
|
|
68
|
+
await this.server._delete<void>(path, {});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { FilterItem } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftSupportServer } from "./NamirasoftSupportServer";
|
|
23
|
+
import { NamirasoftSupportServerBase } from "./NamirasoftSupportServerBase";
|
|
24
|
+
import { SortItem } from "namirasoft-core";
|
|
25
|
+
import { TicketInputRow } from "./row/TicketInputRow";
|
|
26
|
+
import { TicketRow } from "./row/TicketRow";
|
|
27
|
+
|
|
28
|
+
export class NamirasoftSupportServerTicket extends NamirasoftSupportServerBase
|
|
29
|
+
{
|
|
30
|
+
constructor(server: NamirasoftSupportServer)
|
|
31
|
+
{
|
|
32
|
+
super(server);
|
|
33
|
+
this.List = this.List.bind(this);
|
|
34
|
+
this.Get = this.Get.bind(this);
|
|
35
|
+
this.Create = this.Create.bind(this);
|
|
36
|
+
this.Update = this.Update.bind(this);
|
|
37
|
+
this.Delete = this.Delete.bind(this);
|
|
38
|
+
}
|
|
39
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: TicketRow[], count: number }>
|
|
40
|
+
{
|
|
41
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
42
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
43
|
+
let path = `/ticket/list`;
|
|
44
|
+
let { data } = await this.server._get<{ rows: TicketRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
async Get(id: string): Promise<TicketRow>
|
|
48
|
+
{
|
|
49
|
+
let path = `/ticket/${id}`;
|
|
50
|
+
let { data } = await this.server._get<TicketRow>(path, {});
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
async Create(body: TicketInputRow): Promise<TicketRow>
|
|
54
|
+
{
|
|
55
|
+
let path = `/ticket`;
|
|
56
|
+
let { data } = await this.server._post<TicketRow>(path, {}, body);
|
|
57
|
+
return data;
|
|
58
|
+
}
|
|
59
|
+
async Update(id: string, body: TicketInputRow): Promise<TicketRow>
|
|
60
|
+
{
|
|
61
|
+
let path = `/ticket/${id}`;
|
|
62
|
+
let { data } = await this.server._put<TicketRow>(path, {}, body);
|
|
63
|
+
return data;
|
|
64
|
+
}
|
|
65
|
+
async Delete(id: string): Promise<void>
|
|
66
|
+
{
|
|
67
|
+
let path = `/ticket/${id}`;
|
|
68
|
+
await this.server._delete<void>(path, {});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 NamirasoftSupportServerValue extends NamirasoftSupportServerBase
|
|
25
|
+
{
|
|
26
|
+
constructor(server: NamirasoftSupportServer)
|
|
27
|
+
{
|
|
28
|
+
super(server);
|
|
29
|
+
this.List = this.List.bind(this);
|
|
30
|
+
}
|
|
31
|
+
async List(table: string, column: string, search: (string | null), field_id: (string | null), limit: (number | null)): Promise<string[]>
|
|
32
|
+
{
|
|
33
|
+
let path = `/value/list/${table}/${column}`;
|
|
34
|
+
let { data } = await this.server._get<string[]>(path, { search, field_id, limit });
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { CategoryGetCommand } from "./CategoryGetCommand";
|
|
23
|
+
import { CategoryListCommand } from "./CategoryListCommand";
|
|
24
|
+
|
|
25
|
+
export class CategoryCommand extends BaseNavigatorCommand
|
|
26
|
+
{
|
|
27
|
+
constructor(argv: string[])
|
|
28
|
+
{
|
|
29
|
+
super(argv, {
|
|
30
|
+
"list": CategoryListCommand,
|
|
31
|
+
"get": CategoryGetCommand,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -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 CategoryGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
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.category.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|