namirasoft-access 1.3.1

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.
Files changed (171) hide show
  1. package/dist/NamirasoftAccessServer.d.ts +13 -0
  2. package/dist/NamirasoftAccessServer.js +19 -0
  3. package/dist/NamirasoftAccessServer.js.map +1 -0
  4. package/dist/NamirasoftAccessServerBase.d.ts +5 -0
  5. package/dist/NamirasoftAccessServerBase.js +12 -0
  6. package/dist/NamirasoftAccessServerBase.js.map +1 -0
  7. package/dist/NamirasoftAccessServerHealthz.d.ts +4 -0
  8. package/dist/NamirasoftAccessServerHealthz.js +24 -0
  9. package/dist/NamirasoftAccessServerHealthz.js.map +1 -0
  10. package/dist/NamirasoftAccessServerPermission.d.ts +24 -0
  11. package/dist/NamirasoftAccessServerPermission.js +84 -0
  12. package/dist/NamirasoftAccessServerPermission.js.map +1 -0
  13. package/dist/NamirasoftAccessServerPolicy.d.ts +19 -0
  14. package/dist/NamirasoftAccessServerPolicy.js +69 -0
  15. package/dist/NamirasoftAccessServerPolicy.js.map +1 -0
  16. package/dist/NamirasoftAccessServerRole.d.ts +19 -0
  17. package/dist/NamirasoftAccessServerRole.js +69 -0
  18. package/dist/NamirasoftAccessServerRole.js.map +1 -0
  19. package/dist/command/HealthzCommand.d.ts +4 -0
  20. package/dist/command/HealthzCommand.js +15 -0
  21. package/dist/command/HealthzCommand.js.map +1 -0
  22. package/dist/command/HealthzGetCommand.d.ts +5 -0
  23. package/dist/command/HealthzGetCommand.js +37 -0
  24. package/dist/command/HealthzGetCommand.js.map +1 -0
  25. package/dist/command/PermissionCommand.d.ts +4 -0
  26. package/dist/command/PermissionCommand.js +31 -0
  27. package/dist/command/PermissionCommand.js.map +1 -0
  28. package/dist/command/PermissionCreateCommand.d.ts +5 -0
  29. package/dist/command/PermissionCreateCommand.js +75 -0
  30. package/dist/command/PermissionCreateCommand.js.map +1 -0
  31. package/dist/command/PermissionDeleteCommand.d.ts +5 -0
  32. package/dist/command/PermissionDeleteCommand.js +37 -0
  33. package/dist/command/PermissionDeleteCommand.js.map +1 -0
  34. package/dist/command/PermissionGetCommand.d.ts +5 -0
  35. package/dist/command/PermissionGetCommand.js +37 -0
  36. package/dist/command/PermissionGetCommand.js.map +1 -0
  37. package/dist/command/PermissionGetIncomingCommand.d.ts +5 -0
  38. package/dist/command/PermissionGetIncomingCommand.js +37 -0
  39. package/dist/command/PermissionGetIncomingCommand.js.map +1 -0
  40. package/dist/command/PermissionGetOutgoingCommand.d.ts +5 -0
  41. package/dist/command/PermissionGetOutgoingCommand.js +37 -0
  42. package/dist/command/PermissionGetOutgoingCommand.js.map +1 -0
  43. package/dist/command/PermissionListCommand.d.ts +5 -0
  44. package/dist/command/PermissionListCommand.js +37 -0
  45. package/dist/command/PermissionListCommand.js.map +1 -0
  46. package/dist/command/PermissionListIncomingCommand.d.ts +5 -0
  47. package/dist/command/PermissionListIncomingCommand.js +37 -0
  48. package/dist/command/PermissionListIncomingCommand.js.map +1 -0
  49. package/dist/command/PermissionListOutgoingCommand.d.ts +5 -0
  50. package/dist/command/PermissionListOutgoingCommand.js +37 -0
  51. package/dist/command/PermissionListOutgoingCommand.js.map +1 -0
  52. package/dist/command/PermissionUpdateCommand.d.ts +5 -0
  53. package/dist/command/PermissionUpdateCommand.js +75 -0
  54. package/dist/command/PermissionUpdateCommand.js.map +1 -0
  55. package/dist/command/PolicyCommand.d.ts +4 -0
  56. package/dist/command/PolicyCommand.js +27 -0
  57. package/dist/command/PolicyCommand.js.map +1 -0
  58. package/dist/command/PolicyCreateCommand.d.ts +5 -0
  59. package/dist/command/PolicyCreateCommand.js +93 -0
  60. package/dist/command/PolicyCreateCommand.js.map +1 -0
  61. package/dist/command/PolicyDeleteCommand.d.ts +5 -0
  62. package/dist/command/PolicyDeleteCommand.js +37 -0
  63. package/dist/command/PolicyDeleteCommand.js.map +1 -0
  64. package/dist/command/PolicyGetCommand.d.ts +5 -0
  65. package/dist/command/PolicyGetCommand.js +37 -0
  66. package/dist/command/PolicyGetCommand.js.map +1 -0
  67. package/dist/command/PolicyGetIncomingCommand.d.ts +5 -0
  68. package/dist/command/PolicyGetIncomingCommand.js +37 -0
  69. package/dist/command/PolicyGetIncomingCommand.js.map +1 -0
  70. package/dist/command/PolicyListCommand.d.ts +5 -0
  71. package/dist/command/PolicyListCommand.js +37 -0
  72. package/dist/command/PolicyListCommand.js.map +1 -0
  73. package/dist/command/PolicyListIncomingCommand.d.ts +5 -0
  74. package/dist/command/PolicyListIncomingCommand.js +37 -0
  75. package/dist/command/PolicyListIncomingCommand.js.map +1 -0
  76. package/dist/command/PolicyUpdateCommand.d.ts +5 -0
  77. package/dist/command/PolicyUpdateCommand.js +93 -0
  78. package/dist/command/PolicyUpdateCommand.js.map +1 -0
  79. package/dist/command/RoleCommand.d.ts +4 -0
  80. package/dist/command/RoleCommand.js +27 -0
  81. package/dist/command/RoleCommand.js.map +1 -0
  82. package/dist/command/RoleCreateCommand.d.ts +5 -0
  83. package/dist/command/RoleCreateCommand.js +57 -0
  84. package/dist/command/RoleCreateCommand.js.map +1 -0
  85. package/dist/command/RoleDeleteCommand.d.ts +5 -0
  86. package/dist/command/RoleDeleteCommand.js +37 -0
  87. package/dist/command/RoleDeleteCommand.js.map +1 -0
  88. package/dist/command/RoleGetCommand.d.ts +5 -0
  89. package/dist/command/RoleGetCommand.js +37 -0
  90. package/dist/command/RoleGetCommand.js.map +1 -0
  91. package/dist/command/RoleGetIncomingCommand.d.ts +5 -0
  92. package/dist/command/RoleGetIncomingCommand.js +37 -0
  93. package/dist/command/RoleGetIncomingCommand.js.map +1 -0
  94. package/dist/command/RoleListCommand.d.ts +5 -0
  95. package/dist/command/RoleListCommand.js +37 -0
  96. package/dist/command/RoleListCommand.js.map +1 -0
  97. package/dist/command/RoleListIncomingCommand.d.ts +5 -0
  98. package/dist/command/RoleListIncomingCommand.js +37 -0
  99. package/dist/command/RoleListIncomingCommand.js.map +1 -0
  100. package/dist/command/RoleUpdateCommand.d.ts +5 -0
  101. package/dist/command/RoleUpdateCommand.js +57 -0
  102. package/dist/command/RoleUpdateCommand.js.map +1 -0
  103. package/dist/command/cli.d.ts +2 -0
  104. package/dist/command/cli.js +18 -0
  105. package/dist/command/cli.js.map +1 -0
  106. package/dist/index.d.ts +40 -0
  107. package/dist/index.js +57 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/row/PermissionInputRow.d.ts +6 -0
  110. package/dist/row/PermissionInputRow.js +3 -0
  111. package/dist/row/PermissionInputRow.js.map +1 -0
  112. package/dist/row/PermissionRow.d.ts +8 -0
  113. package/dist/row/PermissionRow.js +3 -0
  114. package/dist/row/PermissionRow.js.map +1 -0
  115. package/dist/row/PoleRow.d.ts +6 -0
  116. package/dist/row/PoleRow.js +3 -0
  117. package/dist/row/PoleRow.js.map +1 -0
  118. package/dist/row/PolicyInputRow.d.ts +8 -0
  119. package/dist/row/PolicyInputRow.js +3 -0
  120. package/dist/row/PolicyInputRow.js.map +1 -0
  121. package/dist/row/PolicyRow.d.ts +10 -0
  122. package/dist/row/PolicyRow.js +3 -0
  123. package/dist/row/PolicyRow.js.map +1 -0
  124. package/dist/row/RoleInputRow.d.ts +4 -0
  125. package/dist/row/RoleInputRow.js +3 -0
  126. package/dist/row/RoleInputRow.js.map +1 -0
  127. package/logo.png +0 -0
  128. package/package.json +28 -0
  129. package/src/NamirasoftAccessServer.ts +42 -0
  130. package/src/NamirasoftAccessServerBase.ts +30 -0
  131. package/src/NamirasoftAccessServerHealthz.ts +30 -0
  132. package/src/NamirasoftAccessServerPermission.ts +84 -0
  133. package/src/NamirasoftAccessServerPolicy.ts +71 -0
  134. package/src/NamirasoftAccessServerRole.ts +71 -0
  135. package/src/command/HealthzCommand.ts +32 -0
  136. package/src/command/HealthzGetCommand.ts +44 -0
  137. package/src/command/PermissionCommand.ts +48 -0
  138. package/src/command/PermissionCreateCommand.ts +82 -0
  139. package/src/command/PermissionDeleteCommand.ts +44 -0
  140. package/src/command/PermissionGetCommand.ts +44 -0
  141. package/src/command/PermissionGetIncomingCommand.ts +44 -0
  142. package/src/command/PermissionGetOutgoingCommand.ts +44 -0
  143. package/src/command/PermissionListCommand.ts +44 -0
  144. package/src/command/PermissionListIncomingCommand.ts +44 -0
  145. package/src/command/PermissionListOutgoingCommand.ts +44 -0
  146. package/src/command/PermissionUpdateCommand.ts +82 -0
  147. package/src/command/PolicyCommand.ts +44 -0
  148. package/src/command/PolicyCreateCommand.ts +100 -0
  149. package/src/command/PolicyDeleteCommand.ts +44 -0
  150. package/src/command/PolicyGetCommand.ts +44 -0
  151. package/src/command/PolicyGetIncomingCommand.ts +44 -0
  152. package/src/command/PolicyListCommand.ts +44 -0
  153. package/src/command/PolicyListIncomingCommand.ts +44 -0
  154. package/src/command/PolicyUpdateCommand.ts +100 -0
  155. package/src/command/RoleCommand.ts +44 -0
  156. package/src/command/RoleCreateCommand.ts +64 -0
  157. package/src/command/RoleDeleteCommand.ts +44 -0
  158. package/src/command/RoleGetCommand.ts +44 -0
  159. package/src/command/RoleGetIncomingCommand.ts +44 -0
  160. package/src/command/RoleListCommand.ts +44 -0
  161. package/src/command/RoleListIncomingCommand.ts +44 -0
  162. package/src/command/RoleUpdateCommand.ts +64 -0
  163. package/src/command/cli.ts +37 -0
  164. package/src/index.ts +60 -0
  165. package/src/row/PermissionInputRow.ts +27 -0
  166. package/src/row/PermissionRow.ts +29 -0
  167. package/src/row/PoleRow.ts +27 -0
  168. package/src/row/PolicyInputRow.ts +29 -0
  169. package/src/row/PolicyRow.ts +31 -0
  170. package/src/row/RoleInputRow.ts +25 -0
  171. package/tsconfig.json +42 -0
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class PolicyGetCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.PolicyGetCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class PolicyGetCommand 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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.policy.Get(this.arg_values[0]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.PolicyGetCommand = PolicyGetCommand;
36
+ ;
37
+ //# sourceMappingURL=PolicyGetCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyGetCommand.js","sourceRoot":"","sources":["../../src/command/PolicyGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,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;AAlBD,4CAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class PolicyGetIncomingCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.PolicyGetIncomingCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class PolicyGetIncomingCommand 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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.policy.GetIncoming(this.arg_values[0]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.PolicyGetIncomingCommand = PolicyGetIncomingCommand;
36
+ ;
37
+ //# sourceMappingURL=PolicyGetIncomingCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyGetIncomingCommand.js","sourceRoot":"","sources":["../../src/command/PolicyGetIncomingCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,wBAAyB,SAAQ,sCAAgB;IAE1D,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,4DAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class PolicyListCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.PolicyListCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class PolicyListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, ["filters", "page", "size"], []);
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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.policy.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.PolicyListCommand = PolicyListCommand;
36
+ ;
37
+ //# sourceMappingURL=PolicyListCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyListCommand.js","sourceRoot":"","sources":["../../src/command/PolicyListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACjD,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/F,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,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class PolicyListIncomingCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.PolicyListIncomingCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class PolicyListIncomingCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, ["filters", "page", "size"], []);
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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.policy.ListIncoming(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.PolicyListIncomingCommand = PolicyListIncomingCommand;
36
+ ;
37
+ //# sourceMappingURL=PolicyListIncomingCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyListIncomingCommand.js","sourceRoot":"","sources":["../../src/command/PolicyListIncomingCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,yBAA0B,SAAQ,sCAAgB;IAE3D,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACjD,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,8DAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class PolicyUpdateCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -0,0 +1,93 @@
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.PolicyUpdateCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class PolicyUpdateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, ["id"], [
20
+ {
21
+ name: "product_id",
22
+ short: "",
23
+ description: "Provides the value of 'product_id' in body",
24
+ optional: true,
25
+ args: ["product_id"],
26
+ defaults: [""]
27
+ },
28
+ {
29
+ name: "name",
30
+ short: "",
31
+ description: "Provides the value of 'name' in body",
32
+ optional: true,
33
+ args: ["name"],
34
+ defaults: [""]
35
+ },
36
+ {
37
+ name: "actions",
38
+ short: "",
39
+ description: "Provides the value of 'actions' in body",
40
+ optional: false,
41
+ args: ["actions"],
42
+ defaults: [""]
43
+ },
44
+ {
45
+ name: "entity_ids",
46
+ short: "",
47
+ description: "Provides the value of 'entity_ids' in body",
48
+ optional: false,
49
+ args: ["entity_ids"],
50
+ defaults: [""]
51
+ },
52
+ {
53
+ name: "allow",
54
+ short: "",
55
+ description: "Provides the value of 'allow' in body",
56
+ optional: false,
57
+ args: ["allow"],
58
+ defaults: [""]
59
+ },
60
+ {
61
+ name: "description",
62
+ short: "",
63
+ description: "Provides the value of 'description' in body",
64
+ optional: false,
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-access account config \nor \n{this.command} account login.");
75
+ let storage = new namirasoft_core_1.IStorageMemory();
76
+ let manager = new namirasoft_account_1.TokenManager(storage, () => { });
77
+ manager.setValue(token, false);
78
+ let server = new NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
79
+ let ans = yield server.policy.Update(this.arg_values[0], {
80
+ product_id: this.option_values.product_id,
81
+ name: this.option_values.name,
82
+ actions: this.option_values.actions,
83
+ entity_ids: this.option_values.entity_ids,
84
+ allow: this.option_values.allow,
85
+ description: this.option_values.description
86
+ });
87
+ this.app.logger.success(JSON.stringify(ans));
88
+ });
89
+ }
90
+ }
91
+ exports.PolicyUpdateCommand = PolicyUpdateCommand;
92
+ ;
93
+ //# sourceMappingURL=PolicyUpdateCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolicyUpdateCommand.js","sourceRoot":"","sources":["../../src/command/PolicyUpdateCommand.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { BaseNavigatorCommand } from "namirasoft-node-cli";
2
+ export declare class RoleCommand extends BaseNavigatorCommand {
3
+ constructor(argv: string[]);
4
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoleCommand = void 0;
4
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
5
+ const RoleCreateCommand_1 = require("./RoleCreateCommand");
6
+ const RoleDeleteCommand_1 = require("./RoleDeleteCommand");
7
+ const RoleGetCommand_1 = require("./RoleGetCommand");
8
+ const RoleGetIncomingCommand_1 = require("./RoleGetIncomingCommand");
9
+ const RoleListCommand_1 = require("./RoleListCommand");
10
+ const RoleListIncomingCommand_1 = require("./RoleListIncomingCommand");
11
+ const RoleUpdateCommand_1 = require("./RoleUpdateCommand");
12
+ class RoleCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
13
+ constructor(argv) {
14
+ super(argv, {
15
+ "list": RoleListCommand_1.RoleListCommand,
16
+ "listincoming": RoleListIncomingCommand_1.RoleListIncomingCommand,
17
+ "get": RoleGetCommand_1.RoleGetCommand,
18
+ "getincoming": RoleGetIncomingCommand_1.RoleGetIncomingCommand,
19
+ "create": RoleCreateCommand_1.RoleCreateCommand,
20
+ "update": RoleUpdateCommand_1.RoleUpdateCommand,
21
+ "delete": RoleDeleteCommand_1.RoleDeleteCommand,
22
+ });
23
+ }
24
+ }
25
+ exports.RoleCommand = RoleCommand;
26
+ ;
27
+ //# sourceMappingURL=RoleCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleCommand.js","sourceRoot":"","sources":["../../src/command/RoleCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,2DAAwD;AACxD,2DAAwD;AACxD,qDAAkD;AAClD,qEAAkE;AAClE,uDAAoD;AACpD,uEAAoE;AACpE,2DAAwD;AAExD,MAAa,WAAY,SAAQ,0CAAoB;IAEjD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,iCAAe;YACvB,cAAc,EAAE,iDAAuB;YACvC,KAAK,EAAE,+BAAc;YACrB,aAAa,EAAE,+CAAsB;YACrC,QAAQ,EAAE,qCAAiB;YAC3B,QAAQ,EAAE,qCAAiB;YAC3B,QAAQ,EAAE,qCAAiB;SAC9B,CAAC,CAAC;IACP,CAAC;CACJ;AAdD,kCAcC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleCreateCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.RoleCreateCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class RoleCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, [], [
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: "description",
30
+ short: "",
31
+ description: "Provides the value of 'description' in body",
32
+ optional: false,
33
+ args: ["description"],
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:\nns-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
47
+ let ans = yield server.role.Create({
48
+ name: this.option_values.name,
49
+ description: this.option_values.description
50
+ });
51
+ this.app.logger.success(JSON.stringify(ans));
52
+ });
53
+ }
54
+ }
55
+ exports.RoleCreateCommand = RoleCreateCommand;
56
+ ;
57
+ //# sourceMappingURL=RoleCreateCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleCreateCommand.js","sourceRoot":"","sources":["../../src/command/RoleCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,iBAAkB,SAAQ,sCAAgB;IAEnD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;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,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;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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC/B,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI;gBAC7B,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;AAtCD,8CAsCC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleDeleteCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.RoleDeleteCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class RoleDeleteCommand 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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.role.Delete(this.arg_values[0]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.RoleDeleteCommand = RoleDeleteCommand;
36
+ ;
37
+ //# sourceMappingURL=RoleDeleteCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleDeleteCommand.js","sourceRoot":"","sources":["../../src/command/RoleDeleteCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,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;AAlBD,8CAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleGetCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.RoleGetCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class RoleGetCommand 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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.role.Get(this.arg_values[0]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.RoleGetCommand = RoleGetCommand;
36
+ ;
37
+ //# sourceMappingURL=RoleGetCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleGetCommand.js","sourceRoot":"","sources":["../../src/command/RoleGetCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,cAAe,SAAQ,sCAAgB;IAEhD,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,wCAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleGetIncomingCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.RoleGetIncomingCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class RoleGetIncomingCommand 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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.role.GetIncoming(this.arg_values[0]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.RoleGetIncomingCommand = RoleGetIncomingCommand;
36
+ ;
37
+ //# sourceMappingURL=RoleGetIncomingCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleGetIncomingCommand.js","sourceRoot":"","sources":["../../src/command/RoleGetIncomingCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,sBAAuB,SAAQ,sCAAgB;IAExD,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,wDAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleListCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }
@@ -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.RoleListCommand = void 0;
13
+ const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
+ const namirasoft_core_1 = require("namirasoft-core");
15
+ const NamirasoftAccessServer_1 = require("../NamirasoftAccessServer");
16
+ const namirasoft_account_1 = require("namirasoft-account");
17
+ class RoleListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
+ constructor(argv) {
19
+ super(argv, ["filters", "page", "size"], []);
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-access 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 NamirasoftAccessServer_1.NamirasoftAccessServer(manager, e => this.app.logger.error(e.message));
30
+ let ans = yield server.role.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
31
+ this.app.logger.success(JSON.stringify(ans));
32
+ });
33
+ }
34
+ }
35
+ exports.RoleListCommand = RoleListCommand;
36
+ ;
37
+ //# sourceMappingURL=RoleListCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleListCommand.js","sourceRoot":"","sources":["../../src/command/RoleListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAAiD;AACjD,sEAAmE;AACnE,2DAAkD;AAElD,MAAa,eAAgB,SAAQ,sCAAgB;IAEjD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACjD,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,kHAAkH,CAAC,CAAC;YACxI,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,+CAAsB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACxF,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7F,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAlBD,0CAkBC;AAAA,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseFinalCommand } from "namirasoft-node-cli";
2
+ export declare class RoleListIncomingCommand extends BaseFinalCommand {
3
+ constructor(argv: string[]);
4
+ exec(): Promise<void>;
5
+ }