namirasoft-scheduler 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/NamirasoftSchedulerServer.d.ts +13 -0
- package/dist/NamirasoftSchedulerServer.js +20 -0
- package/dist/NamirasoftSchedulerServer.js.map +1 -0
- package/dist/NamirasoftSchedulerServerBase.d.ts +5 -0
- package/dist/NamirasoftSchedulerServerBase.js +11 -0
- package/dist/NamirasoftSchedulerServerBase.js.map +1 -0
- package/dist/NamirasoftSchedulerServerHealthz.d.ts +7 -0
- package/dist/NamirasoftSchedulerServerHealthz.js +28 -0
- package/dist/NamirasoftSchedulerServerHealthz.js.map +1 -0
- package/dist/NamirasoftSchedulerServerMetrics.d.ts +7 -0
- package/dist/NamirasoftSchedulerServerMetrics.js +28 -0
- package/dist/NamirasoftSchedulerServerMetrics.js.map +1 -0
- package/dist/NamirasoftSchedulerServerScheduler.d.ts +19 -0
- package/dist/NamirasoftSchedulerServerScheduler.js +64 -0
- package/dist/NamirasoftSchedulerServerScheduler.js.map +1 -0
- package/dist/NamirasoftSchedulerServerValue.d.ts +7 -0
- package/dist/NamirasoftSchedulerServerValue.js +29 -0
- package/dist/NamirasoftSchedulerServerValue.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/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/SchedulerCommand.d.ts +4 -0
- package/dist/command/SchedulerCommand.js +23 -0
- package/dist/command/SchedulerCommand.js.map +1 -0
- package/dist/command/SchedulerCreateCommand.d.ts +5 -0
- package/dist/command/SchedulerCreateCommand.js +292 -0
- package/dist/command/SchedulerCreateCommand.js.map +1 -0
- package/dist/command/SchedulerDeleteCommand.d.ts +5 -0
- package/dist/command/SchedulerDeleteCommand.js +38 -0
- package/dist/command/SchedulerDeleteCommand.js.map +1 -0
- package/dist/command/SchedulerGetCommand.d.ts +5 -0
- package/dist/command/SchedulerGetCommand.js +38 -0
- package/dist/command/SchedulerGetCommand.js.map +1 -0
- package/dist/command/SchedulerListCommand.d.ts +5 -0
- package/dist/command/SchedulerListCommand.js +38 -0
- package/dist/command/SchedulerListCommand.js.map +1 -0
- package/dist/command/SchedulerUpdateCommand.d.ts +5 -0
- package/dist/command/SchedulerUpdateCommand.js +292 -0
- package/dist/command/SchedulerUpdateCommand.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 +20 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/SchedulerFrequencyMonthDays.d.ts +34 -0
- package/dist/enum/SchedulerFrequencyMonthDays.js +39 -0
- package/dist/enum/SchedulerFrequencyMonthDays.js.map +1 -0
- package/dist/enum/SchedulerFrequencyMonthNames.d.ts +13 -0
- package/dist/enum/SchedulerFrequencyMonthNames.js +18 -0
- package/dist/enum/SchedulerFrequencyMonthNames.js.map +1 -0
- package/dist/enum/SchedulerFrequencyMonthOnDays.d.ts +9 -0
- package/dist/enum/SchedulerFrequencyMonthOnDays.js +14 -0
- package/dist/enum/SchedulerFrequencyMonthOnDays.js.map +1 -0
- package/dist/enum/SchedulerFrequencyMonthOnWeek.d.ts +7 -0
- package/dist/enum/SchedulerFrequencyMonthOnWeek.js +12 -0
- package/dist/enum/SchedulerFrequencyMonthOnWeek.js.map +1 -0
- package/dist/enum/SchedulerFrequencyType.d.ts +5 -0
- package/dist/enum/SchedulerFrequencyType.js +10 -0
- package/dist/enum/SchedulerFrequencyType.js.map +1 -0
- package/dist/enum/SchedulerFrequencyWeekDays.d.ts +9 -0
- package/dist/enum/SchedulerFrequencyWeekDays.js +14 -0
- package/dist/enum/SchedulerFrequencyWeekDays.js.map +1 -0
- package/dist/enum/SchedulerRandomDelayUnit.d.ts +5 -0
- package/dist/enum/SchedulerRandomDelayUnit.js +10 -0
- package/dist/enum/SchedulerRandomDelayUnit.js.map +1 -0
- package/dist/enum/SchedulerRepeatEveryUnit.d.ts +5 -0
- package/dist/enum/SchedulerRepeatEveryUnit.js +10 -0
- package/dist/enum/SchedulerRepeatEveryUnit.js.map +1 -0
- package/dist/enum/SchedulerRepeatUntilUnit.d.ts +5 -0
- package/dist/enum/SchedulerRepeatUntilUnit.js +10 -0
- package/dist/enum/SchedulerRepeatUntilUnit.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/NamirasoftSchedulerMetaDatabase.d.ts +13 -0
- package/dist/meta/NamirasoftSchedulerMetaDatabase.js +27 -0
- package/dist/meta/NamirasoftSchedulerMetaDatabase.js.map +1 -0
- package/dist/meta/SchedulerMetaTable.d.ts +43 -0
- package/dist/meta/SchedulerMetaTable.js +66 -0
- package/dist/meta/SchedulerMetaTable.js.map +1 -0
- package/dist/row/SchedulerFullRow.d.ts +45 -0
- package/dist/row/SchedulerFullRow.js +3 -0
- package/dist/row/SchedulerFullRow.js.map +1 -0
- package/dist/row/SchedulerInputRow.d.ts +39 -0
- package/dist/row/SchedulerInputRow.js +3 -0
- package/dist/row/SchedulerInputRow.js.map +1 -0
- package/dist/row/SchedulerRow.d.ts +45 -0
- package/dist/row/SchedulerRow.js +3 -0
- package/dist/row/SchedulerRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftSchedulerServer.ts +42 -0
- package/src/NamirasoftSchedulerServerBase.ts +30 -0
- package/src/NamirasoftSchedulerServerHealthz.ts +37 -0
- package/src/NamirasoftSchedulerServerMetrics.ts +37 -0
- package/src/NamirasoftSchedulerServerScheduler.ts +72 -0
- package/src/NamirasoftSchedulerServerValue.ts +38 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/SchedulerCommand.ts +40 -0
- package/src/command/SchedulerCreateCommand.ts +299 -0
- package/src/command/SchedulerDeleteCommand.ts +45 -0
- package/src/command/SchedulerGetCommand.ts +45 -0
- package/src/command/SchedulerListCommand.ts +45 -0
- package/src/command/SchedulerUpdateCommand.ts +299 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +39 -0
- package/src/enum/SchedulerFrequencyMonthDays.ts +55 -0
- package/src/enum/SchedulerFrequencyMonthNames.ts +34 -0
- package/src/enum/SchedulerFrequencyMonthOnDays.ts +30 -0
- package/src/enum/SchedulerFrequencyMonthOnWeek.ts +28 -0
- package/src/enum/SchedulerFrequencyType.ts +26 -0
- package/src/enum/SchedulerFrequencyWeekDays.ts +30 -0
- package/src/enum/SchedulerRandomDelayUnit.ts +26 -0
- package/src/enum/SchedulerRepeatEveryUnit.ts +26 -0
- package/src/enum/SchedulerRepeatUntilUnit.ts +26 -0
- package/src/index.ts +52 -0
- package/src/meta/NamirasoftSchedulerMetaDatabase.ts +51 -0
- package/src/meta/SchedulerMetaTable.ts +114 -0
- package/src/row/SchedulerFullRow.ts +67 -0
- package/src/row/SchedulerInputRow.ts +61 -0
- package/src/row/SchedulerRow.ts +67 -0
- package/tsconfig.json +42 -0
|
@@ -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 { NamirasoftSchedulerServer } from "../NamirasoftSchedulerServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class SchedulerDeleteCommand 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-scheduler account config \nor \nns-scheduler 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-scheduler-server-url");
|
|
41
|
+
let server = new NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.scheduler.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -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 { NamirasoftSchedulerServer } from "../NamirasoftSchedulerServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class SchedulerGetCommand 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-scheduler account config \nor \nns-scheduler 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-scheduler-server-url");
|
|
41
|
+
let server = new NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.scheduler.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -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 { NamirasoftSchedulerServer } from "../NamirasoftSchedulerServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class SchedulerListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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-scheduler account config \nor \nns-scheduler 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-scheduler-server-url");
|
|
41
|
+
let server = new NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.scheduler.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,299 @@
|
|
|
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 { NamirasoftSchedulerServer } from "../NamirasoftSchedulerServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class SchedulerUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'name' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["name"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "start_date",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'start_date' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["start_date"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "start_time",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'start_time' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["start_time"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "end_date",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'end_date' in body",
|
|
59
|
+
optional: true,
|
|
60
|
+
args: ["end_date"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "end_time",
|
|
65
|
+
short: "",
|
|
66
|
+
description: "Provides the value of 'end_time' in body",
|
|
67
|
+
optional: true,
|
|
68
|
+
args: ["end_time"],
|
|
69
|
+
defaults: [""]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "max_repeat_count",
|
|
73
|
+
short: "",
|
|
74
|
+
description: "Provides the value of 'max_repeat_count' in body",
|
|
75
|
+
optional: true,
|
|
76
|
+
args: ["max_repeat_count"],
|
|
77
|
+
defaults: [""]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "frequency_type",
|
|
81
|
+
short: "",
|
|
82
|
+
description: "Provides the value of 'frequency_type' in body",
|
|
83
|
+
optional: true,
|
|
84
|
+
args: ["frequency_type"],
|
|
85
|
+
defaults: [""]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "frequency_day_every",
|
|
89
|
+
short: "",
|
|
90
|
+
description: "Provides the value of 'frequency_day_every' in body",
|
|
91
|
+
optional: true,
|
|
92
|
+
args: ["frequency_day_every"],
|
|
93
|
+
defaults: [""]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "frequency_week_every",
|
|
97
|
+
short: "",
|
|
98
|
+
description: "Provides the value of 'frequency_week_every' in body",
|
|
99
|
+
optional: true,
|
|
100
|
+
args: ["frequency_week_every"],
|
|
101
|
+
defaults: [""]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "frequency_week_days",
|
|
105
|
+
short: "",
|
|
106
|
+
description: "Provides the value of 'frequency_week_days' in body",
|
|
107
|
+
optional: true,
|
|
108
|
+
args: ["frequency_week_days"],
|
|
109
|
+
defaults: [""]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "frequency_month_names",
|
|
113
|
+
short: "",
|
|
114
|
+
description: "Provides the value of 'frequency_month_names' in body",
|
|
115
|
+
optional: true,
|
|
116
|
+
args: ["frequency_month_names"],
|
|
117
|
+
defaults: [""]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "frequency_month_days",
|
|
121
|
+
short: "",
|
|
122
|
+
description: "Provides the value of 'frequency_month_days' in body",
|
|
123
|
+
optional: true,
|
|
124
|
+
args: ["frequency_month_days"],
|
|
125
|
+
defaults: [""]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "frequency_month_on_week",
|
|
129
|
+
short: "",
|
|
130
|
+
description: "Provides the value of 'frequency_month_on_week' in body",
|
|
131
|
+
optional: true,
|
|
132
|
+
args: ["frequency_month_on_week"],
|
|
133
|
+
defaults: [""]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "frequency_month_on_days",
|
|
137
|
+
short: "",
|
|
138
|
+
description: "Provides the value of 'frequency_month_on_days' in body",
|
|
139
|
+
optional: true,
|
|
140
|
+
args: ["frequency_month_on_days"],
|
|
141
|
+
defaults: [""]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "repeat_every_value",
|
|
145
|
+
short: "",
|
|
146
|
+
description: "Provides the value of 'repeat_every_value' in body",
|
|
147
|
+
optional: true,
|
|
148
|
+
args: ["repeat_every_value"],
|
|
149
|
+
defaults: [""]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "repeat_every_unit",
|
|
153
|
+
short: "",
|
|
154
|
+
description: "Provides the value of 'repeat_every_unit' in body",
|
|
155
|
+
optional: true,
|
|
156
|
+
args: ["repeat_every_unit"],
|
|
157
|
+
defaults: [""]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "repeat_until_value",
|
|
161
|
+
short: "",
|
|
162
|
+
description: "Provides the value of 'repeat_until_value' in body",
|
|
163
|
+
optional: true,
|
|
164
|
+
args: ["repeat_until_value"],
|
|
165
|
+
defaults: [""]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "repeat_until_unit",
|
|
169
|
+
short: "",
|
|
170
|
+
description: "Provides the value of 'repeat_until_unit' in body",
|
|
171
|
+
optional: true,
|
|
172
|
+
args: ["repeat_until_unit"],
|
|
173
|
+
defaults: [""]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "random_delay_value",
|
|
177
|
+
short: "",
|
|
178
|
+
description: "Provides the value of 'random_delay_value' in body",
|
|
179
|
+
optional: true,
|
|
180
|
+
args: ["random_delay_value"],
|
|
181
|
+
defaults: [""]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "random_delay_unit",
|
|
185
|
+
short: "",
|
|
186
|
+
description: "Provides the value of 'random_delay_unit' in body",
|
|
187
|
+
optional: true,
|
|
188
|
+
args: ["random_delay_unit"],
|
|
189
|
+
defaults: [""]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "cron_year",
|
|
193
|
+
short: "",
|
|
194
|
+
description: "Provides the value of 'cron_year' in body",
|
|
195
|
+
optional: true,
|
|
196
|
+
args: ["cron_year"],
|
|
197
|
+
defaults: [""]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "cron_month",
|
|
201
|
+
short: "",
|
|
202
|
+
description: "Provides the value of 'cron_month' in body",
|
|
203
|
+
optional: true,
|
|
204
|
+
args: ["cron_month"],
|
|
205
|
+
defaults: [""]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "cron_week",
|
|
209
|
+
short: "",
|
|
210
|
+
description: "Provides the value of 'cron_week' in body",
|
|
211
|
+
optional: true,
|
|
212
|
+
args: ["cron_week"],
|
|
213
|
+
defaults: [""]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "cron_day",
|
|
217
|
+
short: "",
|
|
218
|
+
description: "Provides the value of 'cron_day' in body",
|
|
219
|
+
optional: true,
|
|
220
|
+
args: ["cron_day"],
|
|
221
|
+
defaults: [""]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "cron_day_of_week",
|
|
225
|
+
short: "",
|
|
226
|
+
description: "Provides the value of 'cron_day_of_week' in body",
|
|
227
|
+
optional: true,
|
|
228
|
+
args: ["cron_day_of_week"],
|
|
229
|
+
defaults: [""]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "cron_hour",
|
|
233
|
+
short: "",
|
|
234
|
+
description: "Provides the value of 'cron_hour' in body",
|
|
235
|
+
optional: true,
|
|
236
|
+
args: ["cron_hour"],
|
|
237
|
+
defaults: [""]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "cron_minute",
|
|
241
|
+
short: "",
|
|
242
|
+
description: "Provides the value of 'cron_minute' in body",
|
|
243
|
+
optional: true,
|
|
244
|
+
args: ["cron_minute"],
|
|
245
|
+
defaults: [""]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "description",
|
|
249
|
+
short: "",
|
|
250
|
+
description: "Provides the value of 'description' in body",
|
|
251
|
+
optional: true,
|
|
252
|
+
args: ["description"],
|
|
253
|
+
defaults: [""]
|
|
254
|
+
}
|
|
255
|
+
]);
|
|
256
|
+
}
|
|
257
|
+
override async exec()
|
|
258
|
+
{
|
|
259
|
+
let token = this.app.storage.getNSAToken();
|
|
260
|
+
if (token == null)
|
|
261
|
+
throw new Error("Token is not available. Please login first using:\nns-scheduler account config \nor \nns-scheduler account login.");
|
|
262
|
+
let storage = new IStorageMemoryDedicated();
|
|
263
|
+
let manager = new TokenManager(storage, () => { });
|
|
264
|
+
manager.setValue(token, false);
|
|
265
|
+
let url = this.app.storage.getItem("ns-scheduler-server-url");
|
|
266
|
+
let server = new NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
267
|
+
let ans = await server.scheduler.Update(this.arg_values[0], {
|
|
268
|
+
name: this.option_values.name,
|
|
269
|
+
start_date: this.option_values.start_date,
|
|
270
|
+
start_time: this.option_values.start_time,
|
|
271
|
+
end_date: this.option_values.end_date,
|
|
272
|
+
end_time: this.option_values.end_time,
|
|
273
|
+
max_repeat_count: this.option_values.max_repeat_count,
|
|
274
|
+
frequency_type: this.option_values.frequency_type,
|
|
275
|
+
frequency_day_every: this.option_values.frequency_day_every,
|
|
276
|
+
frequency_week_every: this.option_values.frequency_week_every,
|
|
277
|
+
frequency_week_days: this.option_values.frequency_week_days,
|
|
278
|
+
frequency_month_names: this.option_values.frequency_month_names,
|
|
279
|
+
frequency_month_days: this.option_values.frequency_month_days,
|
|
280
|
+
frequency_month_on_week: this.option_values.frequency_month_on_week,
|
|
281
|
+
frequency_month_on_days: this.option_values.frequency_month_on_days,
|
|
282
|
+
repeat_every_value: this.option_values.repeat_every_value,
|
|
283
|
+
repeat_every_unit: this.option_values.repeat_every_unit,
|
|
284
|
+
repeat_until_value: this.option_values.repeat_until_value,
|
|
285
|
+
repeat_until_unit: this.option_values.repeat_until_unit,
|
|
286
|
+
random_delay_value: this.option_values.random_delay_value,
|
|
287
|
+
random_delay_unit: this.option_values.random_delay_unit,
|
|
288
|
+
cron_year: this.option_values.cron_year,
|
|
289
|
+
cron_month: this.option_values.cron_month,
|
|
290
|
+
cron_week: this.option_values.cron_week,
|
|
291
|
+
cron_day: this.option_values.cron_day,
|
|
292
|
+
cron_day_of_week: this.option_values.cron_day_of_week,
|
|
293
|
+
cron_hour: this.option_values.cron_hour,
|
|
294
|
+
cron_minute: this.option_values.cron_minute,
|
|
295
|
+
description: this.option_values.description
|
|
296
|
+
});
|
|
297
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
298
|
+
}
|
|
299
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { ValueListCommand } from "./ValueListCommand";
|
|
23
|
+
|
|
24
|
+
export class ValueCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"list": ValueListCommand,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -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 { NamirasoftSchedulerServer } from "../NamirasoftSchedulerServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ValueListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["table", "column", "search", "field_id", "limit"], []);
|
|
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-scheduler account config \nor \nns-scheduler 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-scheduler-server-url");
|
|
41
|
+
let server = new NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/****************************************************************/
|
|
3
|
+
/* */
|
|
4
|
+
/* This is an Auto-Generated File */
|
|
5
|
+
/* Made By */
|
|
6
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
7
|
+
/* */
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/****************************************************************/
|
|
10
|
+
/* */
|
|
11
|
+
/* Please do not make any change to this file */
|
|
12
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
13
|
+
/* */
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/****************************************************************/
|
|
16
|
+
/* */
|
|
17
|
+
/* Namira Software Corporation */
|
|
18
|
+
/* https://namirasoft.com */
|
|
19
|
+
/* */
|
|
20
|
+
/****************************************************************/
|
|
21
|
+
|
|
22
|
+
import { AccountCommand } from "namirasoft-account";
|
|
23
|
+
import { Application, BaseStorage } from "namirasoft-node-cli";
|
|
24
|
+
import { ConfigCommand } from "namirasoft-node-cli";
|
|
25
|
+
import { HealthzCommand } from "./HealthzCommand";
|
|
26
|
+
import { MetricsCommand } from "./MetricsCommand";
|
|
27
|
+
import { SchedulerCommand } from "./SchedulerCommand";
|
|
28
|
+
import { ValueCommand } from "./ValueCommand";
|
|
29
|
+
|
|
30
|
+
let app = new Application("ns-scheduler", new BaseStorage(),
|
|
31
|
+
{
|
|
32
|
+
"healthz": HealthzCommand,
|
|
33
|
+
"metrics": MetricsCommand,
|
|
34
|
+
"value": ValueCommand,
|
|
35
|
+
"scheduler": SchedulerCommand,
|
|
36
|
+
"account": AccountCommand,
|
|
37
|
+
"config": (argv: string[]) => new ConfigCommand(argv, ["ns-scheduler-server-url"])
|
|
38
|
+
});
|
|
39
|
+
app.run();
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
export enum SchedulerFrequencyMonthDays
|
|
22
|
+
{
|
|
23
|
+
Day_1 = "Day_1",
|
|
24
|
+
Day_2 = "Day_2",
|
|
25
|
+
Day_3 = "Day_3",
|
|
26
|
+
Day_4 = "Day_4",
|
|
27
|
+
Day_5 = "Day_5",
|
|
28
|
+
Day_6 = "Day_6",
|
|
29
|
+
Day_7 = "Day_7",
|
|
30
|
+
Day_8 = "Day_8",
|
|
31
|
+
Day_9 = "Day_9",
|
|
32
|
+
Day_10 = "Day_10",
|
|
33
|
+
Day_11 = "Day_11",
|
|
34
|
+
Day_12 = "Day_12",
|
|
35
|
+
Day_13 = "Day_13",
|
|
36
|
+
Day_14 = "Day_14",
|
|
37
|
+
Day_15 = "Day_15",
|
|
38
|
+
Day_16 = "Day_16",
|
|
39
|
+
Day_17 = "Day_17",
|
|
40
|
+
Day_18 = "Day_18",
|
|
41
|
+
Day_19 = "Day_19",
|
|
42
|
+
Day_20 = "Day_20",
|
|
43
|
+
Day_21 = "Day_21",
|
|
44
|
+
Day_22 = "Day_22",
|
|
45
|
+
Day_23 = "Day_23",
|
|
46
|
+
Day_24 = "Day_24",
|
|
47
|
+
Day_25 = "Day_25",
|
|
48
|
+
Day_26 = "Day_26",
|
|
49
|
+
Day_27 = "Day_27",
|
|
50
|
+
Day_28 = "Day_28",
|
|
51
|
+
Day_29 = "Day_29",
|
|
52
|
+
Day_30 = "Day_30",
|
|
53
|
+
Day_31 = "Day_31",
|
|
54
|
+
Last = "Last",
|
|
55
|
+
}
|
|
@@ -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
|
+
export enum SchedulerFrequencyMonthNames
|
|
22
|
+
{
|
|
23
|
+
Jan = "Jan",
|
|
24
|
+
Feb = "Feb",
|
|
25
|
+
Mar = "Mar",
|
|
26
|
+
Apr = "Apr",
|
|
27
|
+
May = "May",
|
|
28
|
+
Jul = "Jul",
|
|
29
|
+
Aug = "Aug",
|
|
30
|
+
Sep = "Sep",
|
|
31
|
+
Oct = "Oct",
|
|
32
|
+
Nov = "Nov",
|
|
33
|
+
Dec = "Dec",
|
|
34
|
+
}
|