namirasoft-sms-sender 1.3.0 → 1.3.3
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/NamirasoftSMSSenderServer.d.ts +4 -2
- package/dist/NamirasoftSMSSenderServer.js +5 -2
- package/dist/NamirasoftSMSSenderServer.js.map +1 -1
- package/dist/NamirasoftSMSSenderServerBase.js +1 -0
- package/dist/NamirasoftSMSSenderServerBase.js.map +1 -1
- package/dist/NamirasoftSMSSenderServerHealthz.d.ts +1 -1
- package/dist/NamirasoftSMSSenderServerHealthz.js +1 -0
- package/dist/NamirasoftSMSSenderServerHealthz.js.map +1 -1
- package/dist/NamirasoftSMSSenderServerProvider.d.ts +7 -5
- package/dist/NamirasoftSMSSenderServerProvider.js +5 -4
- package/dist/NamirasoftSMSSenderServerProvider.js.map +1 -1
- package/dist/NamirasoftSMSSenderServerSMS.d.ts +8 -0
- package/dist/{NamirasoftSMSSenderServerSend.js → NamirasoftSMSSenderServerSMS.js} +6 -5
- package/dist/NamirasoftSMSSenderServerSMS.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 +37 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/ProviderCommand.d.ts +4 -0
- package/dist/command/ProviderCommand.js +23 -0
- package/dist/command/ProviderCommand.js.map +1 -0
- package/dist/command/ProviderCreateAWSCommand.d.ts +5 -0
- package/dist/command/ProviderCreateAWSCommand.js +84 -0
- package/dist/command/ProviderCreateAWSCommand.js.map +1 -0
- package/dist/command/ProviderDeleteCommand.d.ts +5 -0
- package/dist/command/ProviderDeleteCommand.js +37 -0
- package/dist/command/ProviderDeleteCommand.js.map +1 -0
- package/dist/command/ProviderGetAllCommand.d.ts +5 -0
- package/dist/command/ProviderGetAllCommand.js +37 -0
- package/dist/command/ProviderGetAllCommand.js.map +1 -0
- package/dist/command/ProviderGetCommand.d.ts +5 -0
- package/dist/command/ProviderGetCommand.js +37 -0
- package/dist/command/ProviderGetCommand.js.map +1 -0
- package/dist/command/ProviderPutCommand.d.ts +5 -0
- package/dist/command/ProviderPutCommand.js +57 -0
- package/dist/command/ProviderPutCommand.js.map +1 -0
- package/dist/command/SMSCommand.d.ts +4 -0
- package/dist/command/SMSCommand.js +15 -0
- package/dist/command/SMSCommand.js.map +1 -0
- package/dist/command/SMSSendCommand.d.ts +5 -0
- package/dist/command/SMSSendCommand.js +66 -0
- package/dist/command/SMSSendCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +16 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/row/MetaawsRow.d.ts +3 -0
- package/dist/row/{SentRow.js → MetaawsRow.js} +1 -1
- package/dist/row/MetaawsRow.js.map +1 -0
- package/dist/row/MetaawsRow_Input.d.ts +7 -0
- package/dist/row/{SentRow_Input.js → MetaawsRow_Input.js} +1 -1
- package/dist/row/MetaawsRow_Input.js.map +1 -0
- package/dist/row/MetaawsRow_Output.d.ts +3 -0
- package/dist/row/{SentRow_Output.js → MetaawsRow_Output.js} +1 -1
- package/dist/row/MetaawsRow_Output.js.map +1 -0
- package/dist/row/ProviderRow_Output.d.ts +1 -0
- package/package.json +10 -4
- package/src/NamirasoftSMSSenderServer.ts +10 -5
- package/src/NamirasoftSMSSenderServerBase.ts +3 -2
- package/src/NamirasoftSMSSenderServerHealthz.ts +5 -4
- package/src/NamirasoftSMSSenderServerProvider.ts +14 -11
- package/src/{NamirasoftSMSSenderServerSend.ts → NamirasoftSMSSenderServerSMS.ts} +6 -7
- package/src/command/HealthzCommand.ts +33 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/ProviderCommand.ts +41 -0
- package/src/command/ProviderCreateAWSCommand.ts +92 -0
- package/src/command/ProviderDeleteCommand.ts +45 -0
- package/src/command/ProviderGetAllCommand.ts +45 -0
- package/src/command/ProviderGetCommand.ts +45 -0
- package/src/command/ProviderPutCommand.ts +65 -0
- package/src/command/SMSCommand.ts +33 -0
- package/src/command/SMSSendCommand.ts +74 -0
- package/src/command/cli.ts +35 -0
- package/src/index.ts +16 -5
- package/src/row/{SentRow.ts → MetaawsRow.ts} +5 -4
- package/src/row/{SentRow_Input.ts → MetaawsRow_Input.ts} +8 -6
- package/src/row/{SentRow_Output.ts → MetaawsRow_Output.ts} +4 -5
- package/src/row/ProviderRow.ts +2 -1
- package/src/row/ProviderRow_Input.ts +2 -1
- package/src/row/ProviderRow_Output.ts +3 -1
- package/tsconfig.json +1 -1
- package/dist/NamirasoftSMSSenderServerSend.d.ts +0 -6
- package/dist/NamirasoftSMSSenderServerSend.js.map +0 -1
- package/dist/row/SentRow.d.ts +0 -3
- package/dist/row/SentRow.js.map +0 -1
- package/dist/row/SentRow_Input.d.ts +0 -6
- package/dist/row/SentRow_Input.js.map +0 -1
- package/dist/row/SentRow_Output.d.ts +0 -5
- package/dist/row/SentRow_Output.js.map +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { NamirasoftSMSSenderServerHealthz } from "./NamirasoftSMSSenderServerHealthz";
|
|
2
2
|
import { NamirasoftSMSSenderServerProvider } from "./NamirasoftSMSSenderServerProvider";
|
|
3
|
-
import {
|
|
3
|
+
import { NamirasoftSMSSenderServerSMS } from "./NamirasoftSMSSenderServerSMS";
|
|
4
4
|
import { TokenManager } from "namirasoft-account";
|
|
5
5
|
export declare class NamirasoftSMSSenderServer {
|
|
6
|
+
manager: TokenManager;
|
|
7
|
+
zone: string;
|
|
6
8
|
healthz: NamirasoftSMSSenderServerHealthz;
|
|
7
|
-
|
|
9
|
+
sms: NamirasoftSMSSenderServerSMS;
|
|
8
10
|
provider: NamirasoftSMSSenderServerProvider;
|
|
9
11
|
constructor(manager: TokenManager, zone: string, onError: (error: Error) => void);
|
|
10
12
|
}
|
|
@@ -3,13 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NamirasoftSMSSenderServer = void 0;
|
|
4
4
|
const NamirasoftSMSSenderServerHealthz_1 = require("./NamirasoftSMSSenderServerHealthz");
|
|
5
5
|
const NamirasoftSMSSenderServerProvider_1 = require("./NamirasoftSMSSenderServerProvider");
|
|
6
|
-
const
|
|
6
|
+
const NamirasoftSMSSenderServerSMS_1 = require("./NamirasoftSMSSenderServerSMS");
|
|
7
7
|
class NamirasoftSMSSenderServer {
|
|
8
8
|
constructor(manager, zone, onError) {
|
|
9
|
+
this.manager = manager;
|
|
10
|
+
this.zone = zone;
|
|
9
11
|
this.healthz = new NamirasoftSMSSenderServerHealthz_1.NamirasoftSMSSenderServerHealthz(manager, zone, onError);
|
|
10
|
-
this.
|
|
12
|
+
this.sms = new NamirasoftSMSSenderServerSMS_1.NamirasoftSMSSenderServerSMS(manager, zone, onError);
|
|
11
13
|
this.provider = new NamirasoftSMSSenderServerProvider_1.NamirasoftSMSSenderServerProvider(manager, zone, onError);
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
exports.NamirasoftSMSSenderServer = NamirasoftSMSSenderServer;
|
|
17
|
+
;
|
|
15
18
|
//# sourceMappingURL=NamirasoftSMSSenderServer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSMSSenderServer.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"NamirasoftSMSSenderServer.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServer.ts"],"names":[],"mappings":";;;AAqBA,yFAAsF;AACtF,2FAAwF;AACxF,iFAA8E;AAG9E,MAAa,yBAAyB;IAOlC,YAAY,OAAqB,EAAE,IAAY,EAAE,OAA+B;QAE5E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,mEAAgC,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5E,IAAI,CAAC,GAAG,GAAG,IAAI,2DAA4B,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ,GAAG,IAAI,qEAAiC,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACJ;AAfD,8DAeC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSMSSenderServerBase.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerBase.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"NamirasoftSMSSenderServerBase.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerBase.ts"],"names":[],"mappings":";;;AAqBA,2DAA0D;AAG1D,MAAa,6BAA8B,SAAQ,yCAAoB;IAEnE,YAAY,OAAqB,EAAE,IAAY,EAAE,OAA+B;QAE5E,KAAK,CAAC,eAAe,IAAI,+BAA+B,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACJ;AAND,sEAMC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSMSSenderServerHealthz.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerHealthz.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"NamirasoftSMSSenderServerHealthz.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerHealthz.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,mFAAgF;AAEhF,MAAa,gCAAiC,SAAQ,6DAA6B;IAEzE,GAAG;;YAEL,IAAI,IAAI,GAAG,UAAU,CAAC;YACtB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAO,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AARD,4EAQC;AAAA,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { MetaawsRow } from "./row/MetaawsRow";
|
|
2
|
+
import { MetaawsRow_Input } from "./row/MetaawsRow_Input";
|
|
1
3
|
import { NamirasoftSMSSenderServerBase } from "./NamirasoftSMSSenderServerBase";
|
|
2
4
|
import { ProviderRow } from "./row/ProviderRow";
|
|
3
5
|
import { ProviderRow_Input } from "./row/ProviderRow_Input";
|
|
4
6
|
export declare class NamirasoftSMSSenderServerProvider extends NamirasoftSMSSenderServerBase {
|
|
5
|
-
GetAll(): Promise<ProviderRow[]>;
|
|
6
|
-
Get(id:
|
|
7
|
-
|
|
8
|
-
Put(id:
|
|
9
|
-
Delete(id:
|
|
7
|
+
GetAll(search: (string | null)): Promise<ProviderRow[]>;
|
|
8
|
+
Get(id: string): Promise<ProviderRow>;
|
|
9
|
+
CreateAWS(body: MetaawsRow_Input): Promise<MetaawsRow>;
|
|
10
|
+
Put(id: string, body: ProviderRow_Input): Promise<ProviderRow>;
|
|
11
|
+
Delete(id: string): Promise<void>;
|
|
10
12
|
}
|
|
@@ -12,10 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.NamirasoftSMSSenderServerProvider = void 0;
|
|
13
13
|
const NamirasoftSMSSenderServerBase_1 = require("./NamirasoftSMSSenderServerBase");
|
|
14
14
|
class NamirasoftSMSSenderServerProvider extends NamirasoftSMSSenderServerBase_1.NamirasoftSMSSenderServerBase {
|
|
15
|
-
GetAll() {
|
|
15
|
+
GetAll(search) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
let path = `/provider/all`;
|
|
18
|
-
let { data } = yield this._get(path, {});
|
|
18
|
+
let { data } = yield this._get(path, { search });
|
|
19
19
|
return data;
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -26,9 +26,9 @@ class NamirasoftSMSSenderServerProvider extends NamirasoftSMSSenderServerBase_1.
|
|
|
26
26
|
return data;
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
CreateAWS(body) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
let path = `/provider
|
|
31
|
+
let path = `/provider/create/aws`;
|
|
32
32
|
let { data } = yield this._post(path, {}, body);
|
|
33
33
|
return data;
|
|
34
34
|
});
|
|
@@ -49,4 +49,5 @@ class NamirasoftSMSSenderServerProvider extends NamirasoftSMSSenderServerBase_1.
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
exports.NamirasoftSMSSenderServerProvider = NamirasoftSMSSenderServerProvider;
|
|
52
|
+
;
|
|
52
53
|
//# sourceMappingURL=NamirasoftSMSSenderServerProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSMSSenderServerProvider.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"NamirasoftSMSSenderServerProvider.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,mFAAgF;AAIhF,MAAa,iCAAkC,SAAQ,6DAA6B;IAE1E,MAAM,CAAC,MAAuB;;YAEhC,IAAI,IAAI,GAAG,eAAe,CAAC;YAC3B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAgB,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,aAAa,EAAE,EAAE,CAAC;YAC7B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAc,IAAI,EAAE,EAAE,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,SAAS,CAAC,IAAsB;;YAElC,IAAI,IAAI,GAAG,sBAAsB,CAAC;YAClC,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAa,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU,EAAE,IAAuB;;YAEzC,IAAI,IAAI,GAAG,aAAa,EAAE,EAAE,CAAC;YAC7B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAc,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,EAAU;;YAEnB,IAAI,IAAI,GAAG,aAAa,EAAE,EAAE,CAAC;YAC7B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAO,IAAI,EAAE,EAAE,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAhCD,8EAgCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NamirasoftSMSSenderServerBase } from "./NamirasoftSMSSenderServerBase";
|
|
2
|
+
export declare class NamirasoftSMSSenderServerSMS extends NamirasoftSMSSenderServerBase {
|
|
3
|
+
Send(body: {
|
|
4
|
+
provider_id: string;
|
|
5
|
+
phone: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
}
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.NamirasoftSMSSenderServerSMS = void 0;
|
|
13
13
|
const NamirasoftSMSSenderServerBase_1 = require("./NamirasoftSMSSenderServerBase");
|
|
14
|
-
class
|
|
15
|
-
|
|
14
|
+
class NamirasoftSMSSenderServerSMS extends NamirasoftSMSSenderServerBase_1.NamirasoftSMSSenderServerBase {
|
|
15
|
+
Send(body) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
let path = `/send`;
|
|
18
18
|
let { data } = yield this._post(path, {}, body);
|
|
@@ -20,5 +20,6 @@ class NamirasoftSMSSenderServerSend extends NamirasoftSMSSenderServerBase_1.Nami
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
exports.
|
|
24
|
-
|
|
23
|
+
exports.NamirasoftSMSSenderServerSMS = NamirasoftSMSSenderServerSMS;
|
|
24
|
+
;
|
|
25
|
+
//# sourceMappingURL=NamirasoftSMSSenderServerSMS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftSMSSenderServerSMS.js","sourceRoot":"","sources":["../src/NamirasoftSMSSenderServerSMS.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,mFAAgF;AAEhF,MAAa,4BAA6B,SAAQ,6DAA6B;IAErE,IAAI,CAAC,IAA6D;;YAEpE,IAAI,IAAI,GAAG,OAAO,CAAC;YACnB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAO,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AARD,oEAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HealthzCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const HealthzGetCommand_1 = require("./HealthzGetCommand");
|
|
6
|
+
class HealthzCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"get": HealthzGetCommand_1.HealthzGetCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.HealthzCommand = HealthzCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=HealthzCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzCommand.js","sourceRoot":"","sources":["../../src/command/HealthzCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,2DAAwD;AAExD,MAAa,cAAe,SAAQ,0CAAoB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,KAAK,EAAE,qCAAiB;SAC3B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,wCAQC;AAAA,CAAC"}
|
|
@@ -0,0 +1,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.HealthzGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class HealthzGetCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], []);
|
|
20
|
+
}
|
|
21
|
+
exec() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
let token = this.app.storage.getNSAToken();
|
|
24
|
+
if (token == null)
|
|
25
|
+
throw new Error("Token is not available. Please login first using:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.healthz.Get();
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.HealthzGetCommand = HealthzGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=HealthzGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HealthzGetCommand.js","sourceRoot":"","sources":["../../src/command/HealthzGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,8CAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProviderCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const ProviderCreateAWSCommand_1 = require("./ProviderCreateAWSCommand");
|
|
6
|
+
const ProviderDeleteCommand_1 = require("./ProviderDeleteCommand");
|
|
7
|
+
const ProviderGetAllCommand_1 = require("./ProviderGetAllCommand");
|
|
8
|
+
const ProviderGetCommand_1 = require("./ProviderGetCommand");
|
|
9
|
+
const ProviderPutCommand_1 = require("./ProviderPutCommand");
|
|
10
|
+
class ProviderCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
11
|
+
constructor(argv) {
|
|
12
|
+
super(argv, {
|
|
13
|
+
"getall": ProviderGetAllCommand_1.ProviderGetAllCommand,
|
|
14
|
+
"get": ProviderGetCommand_1.ProviderGetCommand,
|
|
15
|
+
"createaws": ProviderCreateAWSCommand_1.ProviderCreateAWSCommand,
|
|
16
|
+
"put": ProviderPutCommand_1.ProviderPutCommand,
|
|
17
|
+
"delete": ProviderDeleteCommand_1.ProviderDeleteCommand,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.ProviderCommand = ProviderCommand;
|
|
22
|
+
;
|
|
23
|
+
//# sourceMappingURL=ProviderCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderCommand.js","sourceRoot":"","sources":["../../src/command/ProviderCommand.ts"],"names":[],"mappings":";;;AAqBA,6DAA2D;AAC3D,yEAAsE;AACtE,mEAAgE;AAChE,mEAAgE;AAChE,6DAA0D;AAC1D,6DAA0D;AAE1D,MAAa,eAAgB,SAAQ,0CAAoB;IAErD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,QAAQ,EAAE,6CAAqB;YAC/B,KAAK,EAAE,uCAAkB;YACzB,WAAW,EAAE,mDAAwB;YACrC,KAAK,EAAE,uCAAkB;YACzB,QAAQ,EAAE,6CAAqB;SAClC,CAAC,CAAC;IACP,CAAC;CACJ;AAZD,0CAYC;AAAA,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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.ProviderCreateAWSCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ProviderCreateAWSCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "region",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'region' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["region"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "key",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'key' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["key"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "secret",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'secret' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["secret"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "name",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'name' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["name"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "type",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'type' in body",
|
|
56
|
+
optional: false,
|
|
57
|
+
args: ["type"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
}
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
exec() {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
let token = this.app.storage.getNSAToken();
|
|
65
|
+
if (token == null)
|
|
66
|
+
throw new Error("Token is not available. Please login first using:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
67
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
68
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
69
|
+
manager.setValue(token, false);
|
|
70
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
71
|
+
let ans = yield server.provider.CreateAWS({
|
|
72
|
+
region: this.option_values.region,
|
|
73
|
+
key: this.option_values.key,
|
|
74
|
+
secret: this.option_values.secret,
|
|
75
|
+
name: this.option_values.name,
|
|
76
|
+
type: this.option_values.type
|
|
77
|
+
});
|
|
78
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ProviderCreateAWSCommand = ProviderCreateAWSCommand;
|
|
83
|
+
;
|
|
84
|
+
//# sourceMappingURL=ProviderCreateAWSCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderCreateAWSCommand.js","sourceRoot":"","sources":["../../src/command/ProviderCreateAWSCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,wBAAyB,SAAQ,sCAAgB;IAE1D,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,qCAAqC;gBAClD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,KAAK,CAAC;gBACb,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;gBACtC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG;gBAC3B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;gBAC7B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAjED,4DAiEC;AAAA,CAAC"}
|
|
@@ -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.ProviderDeleteCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ProviderDeleteCommand 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:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.provider.Delete(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ProviderDeleteCommand = ProviderDeleteCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=ProviderDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderDeleteCommand.js","sourceRoot":"","sources":["../../src/command/ProviderDeleteCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,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,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -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.ProviderGetAllCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ProviderGetAllCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["search"], []);
|
|
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:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.provider.GetAll(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ProviderGetAllCommand = ProviderGetAllCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=ProviderGetAllCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderGetAllCommand.js","sourceRoot":"","sources":["../../src/command/ProviderGetAllCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;IAChC,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,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,sDAkBC;AAAA,CAAC"}
|
|
@@ -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.ProviderGetCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ProviderGetCommand 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:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
30
|
+
let ans = yield server.provider.Get(this.arg_values[0]);
|
|
31
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.ProviderGetCommand = ProviderGetCommand;
|
|
36
|
+
;
|
|
37
|
+
//# sourceMappingURL=ProviderGetCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderGetCommand.js","sourceRoot":"","sources":["../../src/command/ProviderGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,kBAAmB,SAAQ,sCAAgB;IAEpD,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,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,gDAkBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.ProviderPutCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSMSSenderServer_1 = require("../NamirasoftSMSSenderServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class ProviderPutCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "name",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'name' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["name"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "type",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'type' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["type"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
exec() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
let token = this.app.storage.getNSAToken();
|
|
41
|
+
if (token == null)
|
|
42
|
+
throw new Error("Token is not available. Please login first using:\nnws-sms-sender account config \nor \n{this.command} account login.");
|
|
43
|
+
let storage = new namirasoft_core_1.IStorageMemory();
|
|
44
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
45
|
+
manager.setValue(token, false);
|
|
46
|
+
let server = new NamirasoftSMSSenderServer_1.NamirasoftSMSSenderServer(manager, "zone", e => this.app.logger.error(e.message));
|
|
47
|
+
let ans = yield server.provider.Put(this.arg_values[0], {
|
|
48
|
+
name: this.option_values.name,
|
|
49
|
+
type: this.option_values.type
|
|
50
|
+
});
|
|
51
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ProviderPutCommand = ProviderPutCommand;
|
|
56
|
+
;
|
|
57
|
+
//# sourceMappingURL=ProviderPutCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderPutCommand.js","sourceRoot":"","sources":["../../src/command/ProviderPutCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,6DAAuD;AACvD,qDAAiD;AACjD,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,kBAAmB,SAAQ,sCAAgB;IAEpD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;YAChB;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,sCAAsC;gBACnD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;SACA,CAAC,CAAC;IACX,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YAC7I,IAAI,OAAO,GAAG,IAAI,gCAAc,EAAE,CAAC;YACnC,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,MAAM,GAAG,IAAI,qDAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACnG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACpD,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;gBAC7B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAtCD,gDAsCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMSCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const SMSSendCommand_1 = require("./SMSSendCommand");
|
|
6
|
+
class SMSCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
7
|
+
constructor(argv) {
|
|
8
|
+
super(argv, {
|
|
9
|
+
"send": SMSSendCommand_1.SMSSendCommand,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.SMSCommand = SMSCommand;
|
|
14
|
+
;
|
|
15
|
+
//# sourceMappingURL=SMSCommand.js.map
|