namirasoft-scheduler 1.4.4 → 1.4.6
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/.ns-sdkg-dir-deep +1 -0
- package/.ns-sdkg-dir-keep +0 -0
- package/.ns-sdkg-file-keep +3 -0
- package/dist/NamirasoftSchedulerServer.d.ts +6 -0
- package/dist/NamirasoftSchedulerServer.js +7 -1
- package/dist/NamirasoftSchedulerServer.js.map +1 -1
- package/dist/NamirasoftSchedulerServerSchedulerCategory.d.ts +17 -0
- package/dist/NamirasoftSchedulerServerSchedulerCategory.js +56 -0
- package/dist/NamirasoftSchedulerServerSchedulerCategory.js.map +1 -0
- package/dist/NamirasoftSchedulerServerSchedulerField.d.ts +18 -0
- package/dist/NamirasoftSchedulerServerSchedulerField.js +64 -0
- package/dist/NamirasoftSchedulerServerSchedulerField.js.map +1 -0
- package/dist/NamirasoftSchedulerServerSchedulerTag.d.ts +18 -0
- package/dist/NamirasoftSchedulerServerSchedulerTag.js +64 -0
- package/dist/NamirasoftSchedulerServerSchedulerTag.js.map +1 -0
- package/dist/ScheduledDateType.d.ts +5 -0
- package/dist/ScheduledDateType.js +3 -0
- package/dist/ScheduledDateType.js.map +1 -0
- package/dist/Scheduler.d.ts +12 -0
- package/dist/Scheduler.js +94 -0
- package/dist/Scheduler.js.map +1 -0
- package/dist/SchedulerStateType.d.ts +6 -0
- package/dist/SchedulerStateType.js +3 -0
- package/dist/SchedulerStateType.js.map +1 -0
- package/dist/command/SchedulerCategoryCommand.d.ts +4 -0
- package/dist/command/SchedulerCategoryCommand.js +21 -0
- package/dist/command/SchedulerCategoryCommand.js.map +1 -0
- package/dist/command/SchedulerCategoryCreateCommand.d.ts +5 -0
- package/dist/command/SchedulerCategoryCreateCommand.js +49 -0
- package/dist/command/SchedulerCategoryCreateCommand.js.map +1 -0
- package/dist/command/SchedulerCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/SchedulerCategoryDeleteCommand.js +38 -0
- package/dist/command/SchedulerCategoryDeleteCommand.js.map +1 -0
- package/dist/command/SchedulerCategoryGetCommand.d.ts +5 -0
- package/dist/command/SchedulerCategoryGetCommand.js +38 -0
- package/dist/command/SchedulerCategoryGetCommand.js.map +1 -0
- package/dist/command/SchedulerCategoryListCommand.d.ts +5 -0
- package/dist/command/SchedulerCategoryListCommand.js +38 -0
- package/dist/command/SchedulerCategoryListCommand.js.map +1 -0
- package/dist/command/SchedulerFieldCommand.d.ts +4 -0
- package/dist/command/SchedulerFieldCommand.js +23 -0
- package/dist/command/SchedulerFieldCommand.js.map +1 -0
- package/dist/command/SchedulerFieldCreateCommand.d.ts +5 -0
- package/dist/command/SchedulerFieldCreateCommand.js +58 -0
- package/dist/command/SchedulerFieldCreateCommand.js.map +1 -0
- package/dist/command/SchedulerFieldDeleteCommand.d.ts +5 -0
- package/dist/command/SchedulerFieldDeleteCommand.js +38 -0
- package/dist/command/SchedulerFieldDeleteCommand.js.map +1 -0
- package/dist/command/SchedulerFieldGetCommand.d.ts +5 -0
- package/dist/command/SchedulerFieldGetCommand.js +38 -0
- package/dist/command/SchedulerFieldGetCommand.js.map +1 -0
- package/dist/command/SchedulerFieldListCommand.d.ts +5 -0
- package/dist/command/SchedulerFieldListCommand.js +38 -0
- package/dist/command/SchedulerFieldListCommand.js.map +1 -0
- package/dist/command/SchedulerFieldUpdateCommand.d.ts +5 -0
- package/dist/command/SchedulerFieldUpdateCommand.js +58 -0
- package/dist/command/SchedulerFieldUpdateCommand.js.map +1 -0
- package/dist/command/SchedulerTagCommand.d.ts +4 -0
- package/dist/command/SchedulerTagCommand.js +23 -0
- package/dist/command/SchedulerTagCommand.js.map +1 -0
- package/dist/command/SchedulerTagCreateCommand.d.ts +5 -0
- package/dist/command/SchedulerTagCreateCommand.js +58 -0
- package/dist/command/SchedulerTagCreateCommand.js.map +1 -0
- package/dist/command/SchedulerTagDeleteCommand.d.ts +5 -0
- package/dist/command/SchedulerTagDeleteCommand.js +38 -0
- package/dist/command/SchedulerTagDeleteCommand.js.map +1 -0
- package/dist/command/SchedulerTagGetCommand.d.ts +5 -0
- package/dist/command/SchedulerTagGetCommand.js +38 -0
- package/dist/command/SchedulerTagGetCommand.js.map +1 -0
- package/dist/command/SchedulerTagListCommand.d.ts +5 -0
- package/dist/command/SchedulerTagListCommand.js +38 -0
- package/dist/command/SchedulerTagListCommand.js.map +1 -0
- package/dist/command/SchedulerTagUpdateCommand.d.ts +5 -0
- package/dist/command/SchedulerTagUpdateCommand.js +58 -0
- package/dist/command/SchedulerTagUpdateCommand.js.map +1 -0
- package/dist/command/cli.js +6 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/index.d.ts +35 -6
- package/dist/index.js +35 -6
- package/dist/index.js.map +1 -1
- package/dist/meta/NamirasoftSchedulerMetaDatabase.js +1 -1
- package/dist/meta/NamirasoftSchedulerMetaDatabase.js.map +1 -1
- package/dist/meta/SchedulerMetaTable.js +1 -1
- package/dist/meta/SchedulerMetaTable.js.map +1 -1
- package/dist/row/EntityCategoryInputRow.d.ts +3 -0
- package/dist/row/EntityCategoryInputRow.js +3 -0
- package/dist/row/EntityCategoryInputRow.js.map +1 -0
- package/dist/row/EntityFieldInputRow.d.ts +4 -0
- package/dist/row/EntityFieldInputRow.js +3 -0
- package/dist/row/EntityFieldInputRow.js.map +1 -0
- package/dist/row/EntityTagInputRow.d.ts +4 -0
- package/dist/row/EntityTagInputRow.js +3 -0
- package/dist/row/EntityTagInputRow.js.map +1 -0
- package/dist/row/SchedulerCategoryRow.d.ts +8 -0
- package/dist/row/SchedulerCategoryRow.js +3 -0
- package/dist/row/SchedulerCategoryRow.js.map +1 -0
- package/dist/row/SchedulerFieldRow.d.ts +9 -0
- package/dist/row/SchedulerFieldRow.js +3 -0
- package/dist/row/SchedulerFieldRow.js.map +1 -0
- package/dist/row/SchedulerInputRow.d.ts +5 -5
- package/dist/row/SchedulerRow.d.ts +14 -10
- package/dist/row/SchedulerTagRow.d.ts +9 -0
- package/dist/row/SchedulerTagRow.js +3 -0
- package/dist/row/SchedulerTagRow.js.map +1 -0
- package/package.json +27 -27
- package/src/NamirasoftSchedulerServer.ts +50 -41
- package/src/NamirasoftSchedulerServerBase.ts +29 -29
- package/src/NamirasoftSchedulerServerHealthz.ts +36 -36
- package/src/NamirasoftSchedulerServerMetrics.ts +36 -36
- package/src/NamirasoftSchedulerServerScheduler.ts +70 -70
- package/src/NamirasoftSchedulerServerSchedulerCategory.ts +64 -0
- package/src/NamirasoftSchedulerServerSchedulerField.ts +71 -0
- package/src/NamirasoftSchedulerServerSchedulerTag.ts +71 -0
- package/src/NamirasoftSchedulerServerValue.ts +37 -37
- package/src/ScheduledDateType.ts +6 -0
- package/src/Scheduler.ts +130 -0
- package/src/SchedulerStateType.ts +8 -0
- package/src/command/HealthzCommand.ts +31 -31
- package/src/command/HealthzGetCommand.ts +44 -44
- package/src/command/MetricsCommand.ts +31 -31
- package/src/command/MetricsGetCommand.ts +44 -44
- package/src/command/SchedulerCategoryCommand.ts +38 -0
- package/src/command/SchedulerCategoryCreateCommand.ts +56 -0
- package/src/command/SchedulerCategoryDeleteCommand.ts +45 -0
- package/src/command/SchedulerCategoryGetCommand.ts +45 -0
- package/src/command/SchedulerCategoryListCommand.ts +45 -0
- package/src/command/SchedulerCommand.ts +39 -39
- package/src/command/SchedulerCreateCommand.ts +298 -298
- package/src/command/SchedulerDeleteCommand.ts +44 -44
- package/src/command/SchedulerFieldCommand.ts +40 -0
- package/src/command/SchedulerFieldCreateCommand.ts +65 -0
- package/src/command/SchedulerFieldDeleteCommand.ts +45 -0
- package/src/command/SchedulerFieldGetCommand.ts +45 -0
- package/src/command/SchedulerFieldListCommand.ts +45 -0
- package/src/command/SchedulerFieldUpdateCommand.ts +65 -0
- package/src/command/SchedulerGetCommand.ts +44 -44
- package/src/command/SchedulerListCommand.ts +44 -44
- package/src/command/SchedulerTagCommand.ts +40 -0
- package/src/command/SchedulerTagCreateCommand.ts +65 -0
- package/src/command/SchedulerTagDeleteCommand.ts +45 -0
- package/src/command/SchedulerTagGetCommand.ts +45 -0
- package/src/command/SchedulerTagListCommand.ts +45 -0
- package/src/command/SchedulerTagUpdateCommand.ts +65 -0
- package/src/command/SchedulerUpdateCommand.ts +298 -298
- package/src/command/ValueCommand.ts +31 -31
- package/src/command/ValueListCommand.ts +44 -44
- package/src/command/cli.ts +44 -38
- package/src/enum/FrequencyMonthDaysType.ts +54 -54
- package/src/enum/FrequencyMonthNamesType.ts +33 -33
- package/src/enum/FrequencyMonthOnDaysType.ts +29 -29
- package/src/enum/FrequencyMonthOnWeekType.ts +27 -27
- package/src/enum/FrequencyWeekDaysType.ts +29 -29
- package/src/enum/SchedulerFrequencyType.ts +25 -25
- package/src/enum/SchedulerRandomDelayUnit.ts +25 -25
- package/src/enum/SchedulerRepeatEveryUnit.ts +25 -25
- package/src/enum/SchedulerRepeatUntilUnit.ts +25 -25
- package/src/index.ts +80 -51
- package/src/meta/NamirasoftSchedulerMetaDatabase.ts +50 -50
- package/src/meta/SchedulerMetaTable.ts +113 -113
- package/src/row/EntityCategoryInputRow.ts +24 -0
- package/src/row/EntityFieldInputRow.ts +25 -0
- package/src/row/EntityTagInputRow.ts +25 -0
- package/src/row/SchedulerCategoryRow.ts +29 -0
- package/src/row/SchedulerFieldRow.ts +30 -0
- package/src/row/SchedulerInputRow.ts +60 -60
- package/src/row/SchedulerRow.ts +70 -66
- package/src/row/SchedulerTagRow.ts +30 -0
- package/tsconfig.json +41 -41
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/src
|
|
File without changes
|
|
@@ -2,12 +2,18 @@ import { NSABaseServer } from "namirasoft-account";
|
|
|
2
2
|
import { NamirasoftSchedulerServerHealthz } from "./NamirasoftSchedulerServerHealthz";
|
|
3
3
|
import { NamirasoftSchedulerServerMetrics } from "./NamirasoftSchedulerServerMetrics";
|
|
4
4
|
import { NamirasoftSchedulerServerScheduler } from "./NamirasoftSchedulerServerScheduler";
|
|
5
|
+
import { NamirasoftSchedulerServerSchedulerCategory } from "./NamirasoftSchedulerServerSchedulerCategory";
|
|
6
|
+
import { NamirasoftSchedulerServerSchedulerField } from "./NamirasoftSchedulerServerSchedulerField";
|
|
7
|
+
import { NamirasoftSchedulerServerSchedulerTag } from "./NamirasoftSchedulerServerSchedulerTag";
|
|
5
8
|
import { NamirasoftSchedulerServerValue } from "./NamirasoftSchedulerServerValue";
|
|
6
9
|
import { TokenManager } from "namirasoft-account";
|
|
7
10
|
export declare class NamirasoftSchedulerServer extends NSABaseServer {
|
|
8
11
|
healthz: NamirasoftSchedulerServerHealthz;
|
|
9
12
|
metrics: NamirasoftSchedulerServerMetrics;
|
|
10
13
|
value: NamirasoftSchedulerServerValue;
|
|
14
|
+
scheduler_category: NamirasoftSchedulerServerSchedulerCategory;
|
|
15
|
+
scheduler_field: NamirasoftSchedulerServerSchedulerField;
|
|
16
|
+
scheduler_tag: NamirasoftSchedulerServerSchedulerTag;
|
|
11
17
|
scheduler: NamirasoftSchedulerServerScheduler;
|
|
12
18
|
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void);
|
|
13
19
|
}
|
|
@@ -5,13 +5,19 @@ const namirasoft_account_1 = require("namirasoft-account");
|
|
|
5
5
|
const NamirasoftSchedulerServerHealthz_1 = require("./NamirasoftSchedulerServerHealthz");
|
|
6
6
|
const NamirasoftSchedulerServerMetrics_1 = require("./NamirasoftSchedulerServerMetrics");
|
|
7
7
|
const NamirasoftSchedulerServerScheduler_1 = require("./NamirasoftSchedulerServerScheduler");
|
|
8
|
+
const NamirasoftSchedulerServerSchedulerCategory_1 = require("./NamirasoftSchedulerServerSchedulerCategory");
|
|
9
|
+
const NamirasoftSchedulerServerSchedulerField_1 = require("./NamirasoftSchedulerServerSchedulerField");
|
|
10
|
+
const NamirasoftSchedulerServerSchedulerTag_1 = require("./NamirasoftSchedulerServerSchedulerTag");
|
|
8
11
|
const NamirasoftSchedulerServerValue_1 = require("./NamirasoftSchedulerServerValue");
|
|
9
12
|
class NamirasoftSchedulerServer extends namirasoft_account_1.NSABaseServer {
|
|
10
13
|
constructor(base_url, manager, onError) {
|
|
11
|
-
super(base_url, `1.4.
|
|
14
|
+
super(base_url, `1.4.5`, manager, onError);
|
|
12
15
|
this.healthz = new NamirasoftSchedulerServerHealthz_1.NamirasoftSchedulerServerHealthz(this);
|
|
13
16
|
this.metrics = new NamirasoftSchedulerServerMetrics_1.NamirasoftSchedulerServerMetrics(this);
|
|
14
17
|
this.value = new NamirasoftSchedulerServerValue_1.NamirasoftSchedulerServerValue(this);
|
|
18
|
+
this.scheduler_category = new NamirasoftSchedulerServerSchedulerCategory_1.NamirasoftSchedulerServerSchedulerCategory(this);
|
|
19
|
+
this.scheduler_field = new NamirasoftSchedulerServerSchedulerField_1.NamirasoftSchedulerServerSchedulerField(this);
|
|
20
|
+
this.scheduler_tag = new NamirasoftSchedulerServerSchedulerTag_1.NamirasoftSchedulerServerSchedulerTag(this);
|
|
15
21
|
this.scheduler = new NamirasoftSchedulerServerScheduler_1.NamirasoftSchedulerServerScheduler(this);
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftSchedulerServer.js","sourceRoot":"","sources":["../src/NamirasoftSchedulerServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,yFAAsF;AACtF,yFAAsF;AACtF,6FAA0F;AAC1F,qFAAkF;AAGlF,MAAa,yBAA0B,SAAQ,kCAAa;
|
|
1
|
+
{"version":3,"file":"NamirasoftSchedulerServer.js","sourceRoot":"","sources":["../src/NamirasoftSchedulerServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,yFAAsF;AACtF,yFAAsF;AACtF,6FAA0F;AAC1F,6GAA0G;AAC1G,uGAAoG;AACpG,mGAAgG;AAChG,qFAAkF;AAGlF,MAAa,yBAA0B,SAAQ,kCAAa;IASxD,YAAY,QAAgB,EAAE,OAAqB,EAAE,OAA+B;QAEhF,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,kBAAkB,GAAG,IAAI,uFAA0C,CAAC,IAAI,CAAC,CAAC;QAC/E,IAAI,CAAC,eAAe,GAAG,IAAI,iFAAuC,CAAC,IAAI,CAAC,CAAC;QACzE,IAAI,CAAC,aAAa,GAAG,IAAI,6EAAqC,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,SAAS,GAAG,IAAI,uEAAkC,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;CACJ;AApBD,8DAoBC;AAAA,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
2
|
+
import { EntityCategoryInputRow } from "./row/EntityCategoryInputRow";
|
|
3
|
+
import { FilterItem } from "namirasoft-core";
|
|
4
|
+
import { NamirasoftSchedulerServer } from "./NamirasoftSchedulerServer";
|
|
5
|
+
import { NamirasoftSchedulerServerBase } from "./NamirasoftSchedulerServerBase";
|
|
6
|
+
import { SchedulerCategoryRow } from "./row/SchedulerCategoryRow";
|
|
7
|
+
import { SortItem } from "namirasoft-core";
|
|
8
|
+
export declare class NamirasoftSchedulerServerSchedulerCategory extends NamirasoftSchedulerServerBase {
|
|
9
|
+
constructor(server: NamirasoftSchedulerServer);
|
|
10
|
+
List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{
|
|
11
|
+
rows: SchedulerCategoryRow[];
|
|
12
|
+
count: number;
|
|
13
|
+
}>;
|
|
14
|
+
Get(id: string, config?: BaseServerConfig<any>): Promise<SchedulerCategoryRow>;
|
|
15
|
+
Create(entity_id: string, body: EntityCategoryInputRow, config?: BaseServerConfig<any>): Promise<SchedulerCategoryRow>;
|
|
16
|
+
Delete(entity_id: string, id: number, config?: BaseServerConfig<any>): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.NamirasoftSchedulerServerSchedulerCategory = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const NamirasoftSchedulerServerBase_1 = require("./NamirasoftSchedulerServerBase");
|
|
15
|
+
const namirasoft_core_2 = require("namirasoft-core");
|
|
16
|
+
class NamirasoftSchedulerServerSchedulerCategory extends NamirasoftSchedulerServerBase_1.NamirasoftSchedulerServerBase {
|
|
17
|
+
constructor(server) {
|
|
18
|
+
super(server);
|
|
19
|
+
this.List = this.List.bind(this);
|
|
20
|
+
this.Get = this.Get.bind(this);
|
|
21
|
+
this.Create = this.Create.bind(this);
|
|
22
|
+
this.Delete = this.Delete.bind(this);
|
|
23
|
+
}
|
|
24
|
+
List(filters, page, size, sorts, config) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
|
|
27
|
+
let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
|
|
28
|
+
let path = `scheduler/category/list`;
|
|
29
|
+
let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
30
|
+
return data;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
Get(id, config) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
let path = `scheduler/category/${id}`;
|
|
36
|
+
let { data } = yield this.server._get(path, {}, config);
|
|
37
|
+
return data;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
Create(entity_id, body, config) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
let path = `scheduler/category/${entity_id}`;
|
|
43
|
+
let { data } = yield this.server._post(path, {}, body, config);
|
|
44
|
+
return data;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
Delete(entity_id, id, config) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
let path = `scheduler/category/${entity_id}/${id}`;
|
|
50
|
+
yield this.server._delete(path, {}, config);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.NamirasoftSchedulerServerSchedulerCategory = NamirasoftSchedulerServerSchedulerCategory;
|
|
55
|
+
;
|
|
56
|
+
//# sourceMappingURL=NamirasoftSchedulerServerSchedulerCategory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftSchedulerServerSchedulerCategory.js","sourceRoot":"","sources":["../src/NamirasoftSchedulerServerSchedulerCategory.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,qDAA6C;AAE7C,mFAAgF;AAEhF,qDAA2C;AAE3C,MAAa,0CAA2C,SAAQ,6DAA6B;IAEzF,YAAY,MAAiC;QAEzC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC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AE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YACrF,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,SAAiB,EAAE,EAAU,EAAE,MAA8B;;YAEtE,IAAI,IAAI,GAAG,sBAAsB,SAAS,IAAI,EAAE,EAAE,CAAC;YACnD,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;KAAA;CACJ;AAnCD,gGAmCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
2
|
+
import { EntityFieldInputRow } from "./row/EntityFieldInputRow";
|
|
3
|
+
import { FilterItem } from "namirasoft-core";
|
|
4
|
+
import { NamirasoftSchedulerServer } from "./NamirasoftSchedulerServer";
|
|
5
|
+
import { NamirasoftSchedulerServerBase } from "./NamirasoftSchedulerServerBase";
|
|
6
|
+
import { SchedulerFieldRow } from "./row/SchedulerFieldRow";
|
|
7
|
+
import { SortItem } from "namirasoft-core";
|
|
8
|
+
export declare class NamirasoftSchedulerServerSchedulerField extends NamirasoftSchedulerServerBase {
|
|
9
|
+
constructor(server: NamirasoftSchedulerServer);
|
|
10
|
+
List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{
|
|
11
|
+
rows: SchedulerFieldRow[];
|
|
12
|
+
count: number;
|
|
13
|
+
}>;
|
|
14
|
+
Get(id: string, config?: BaseServerConfig<any>): Promise<SchedulerFieldRow>;
|
|
15
|
+
Create(entity_id: string, body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<SchedulerFieldRow>;
|
|
16
|
+
Update(entity_id: string, id: number, body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<SchedulerFieldRow>;
|
|
17
|
+
Delete(entity_id: string, id: number, config?: BaseServerConfig<any>): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.NamirasoftSchedulerServerSchedulerField = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const NamirasoftSchedulerServerBase_1 = require("./NamirasoftSchedulerServerBase");
|
|
15
|
+
const namirasoft_core_2 = require("namirasoft-core");
|
|
16
|
+
class NamirasoftSchedulerServerSchedulerField extends NamirasoftSchedulerServerBase_1.NamirasoftSchedulerServerBase {
|
|
17
|
+
constructor(server) {
|
|
18
|
+
super(server);
|
|
19
|
+
this.List = this.List.bind(this);
|
|
20
|
+
this.Get = this.Get.bind(this);
|
|
21
|
+
this.Create = this.Create.bind(this);
|
|
22
|
+
this.Update = this.Update.bind(this);
|
|
23
|
+
this.Delete = this.Delete.bind(this);
|
|
24
|
+
}
|
|
25
|
+
List(filters, page, size, sorts, config) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
|
|
28
|
+
let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
|
|
29
|
+
let path = `scheduler/field/list`;
|
|
30
|
+
let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
31
|
+
return data;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
Get(id, config) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
let path = `scheduler/field/${id}`;
|
|
37
|
+
let { data } = yield this.server._get(path, {}, config);
|
|
38
|
+
return data;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
Create(entity_id, body, config) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
let path = `scheduler/field/${entity_id}`;
|
|
44
|
+
let { data } = yield this.server._post(path, {}, body, config);
|
|
45
|
+
return data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
Update(entity_id, id, body, config) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
let path = `scheduler/field/${entity_id}/${id}`;
|
|
51
|
+
let { data } = yield this.server._put(path, {}, body, config);
|
|
52
|
+
return data;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
Delete(entity_id, id, config) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
let path = `scheduler/field/${entity_id}/${id}`;
|
|
58
|
+
yield this.server._delete(path, {}, config);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.NamirasoftSchedulerServerSchedulerField = NamirasoftSchedulerServerSchedulerField;
|
|
63
|
+
;
|
|
64
|
+
//# sourceMappingURL=NamirasoftSchedulerServerSchedulerField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftSchedulerServerSchedulerField.js","sourceRoot":"","sources":["../src/NamirasoftSchedulerServerSchedulerField.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,qDAA6C;AAE7C,mFAAgF;AAEhF,qDAA2C;AAE3C,MAAa,uCAAwC,SAAQ,6DAA6B;IAEtF,YAAY,MAAiC;QAEzC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAA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YAErF,IAAI,IAAI,GAAG,mBAAmB,SAAS,EAAE,CAAC;YAC1C,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAoB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAClF,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,SAAiB,EAAE,EAAU,EAAE,IAAyB,EAAE,MAA8B;;YAEjG,IAAI,IAAI,GAAG,mBAAmB,SAAS,IAAI,EAAE,EAAE,CAAC;YAChD,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAoB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YACjF,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,MAAM,CAAC,SAAiB,EAAE,EAAU,EAAE,MAA8B;;YAEtE,IAAI,IAAI,GAAG,mBAAmB,SAAS,IAAI,EAAE,EAAE,CAAC;YAChD,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;KAAA;CACJ;AA1CD,0FA0CC;AAAA,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
2
|
+
import { EntityTagInputRow } from "./row/EntityTagInputRow";
|
|
3
|
+
import { FilterItem } from "namirasoft-core";
|
|
4
|
+
import { NamirasoftSchedulerServer } from "./NamirasoftSchedulerServer";
|
|
5
|
+
import { NamirasoftSchedulerServerBase } from "./NamirasoftSchedulerServerBase";
|
|
6
|
+
import { SchedulerTagRow } from "./row/SchedulerTagRow";
|
|
7
|
+
import { SortItem } from "namirasoft-core";
|
|
8
|
+
export declare class NamirasoftSchedulerServerSchedulerTag extends NamirasoftSchedulerServerBase {
|
|
9
|
+
constructor(server: NamirasoftSchedulerServer);
|
|
10
|
+
List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{
|
|
11
|
+
rows: SchedulerTagRow[];
|
|
12
|
+
count: number;
|
|
13
|
+
}>;
|
|
14
|
+
Get(id: string, config?: BaseServerConfig<any>): Promise<SchedulerTagRow>;
|
|
15
|
+
Create(entity_id: string, body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<SchedulerTagRow>;
|
|
16
|
+
Update(entity_id: string, id: number, body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<SchedulerTagRow>;
|
|
17
|
+
Delete(entity_id: string, id: number, config?: BaseServerConfig<any>): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.NamirasoftSchedulerServerSchedulerTag = void 0;
|
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
14
|
+
const NamirasoftSchedulerServerBase_1 = require("./NamirasoftSchedulerServerBase");
|
|
15
|
+
const namirasoft_core_2 = require("namirasoft-core");
|
|
16
|
+
class NamirasoftSchedulerServerSchedulerTag extends NamirasoftSchedulerServerBase_1.NamirasoftSchedulerServerBase {
|
|
17
|
+
constructor(server) {
|
|
18
|
+
super(server);
|
|
19
|
+
this.List = this.List.bind(this);
|
|
20
|
+
this.Get = this.Get.bind(this);
|
|
21
|
+
this.Create = this.Create.bind(this);
|
|
22
|
+
this.Update = this.Update.bind(this);
|
|
23
|
+
this.Delete = this.Delete.bind(this);
|
|
24
|
+
}
|
|
25
|
+
List(filters, page, size, sorts, config) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
let filters_string_value = namirasoft_core_1.FilterItem.stringify(filters);
|
|
28
|
+
let sorts_string_value = namirasoft_core_2.SortItem.stringify(sorts);
|
|
29
|
+
let path = `scheduler/tag/list`;
|
|
30
|
+
let { data } = yield this.server._get(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
31
|
+
return data;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
Get(id, config) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
let path = `scheduler/tag/${id}`;
|
|
37
|
+
let { data } = yield this.server._get(path, {}, config);
|
|
38
|
+
return data;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
Create(entity_id, body, config) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
let path = `scheduler/tag/${entity_id}`;
|
|
44
|
+
let { data } = yield this.server._post(path, {}, body, config);
|
|
45
|
+
return data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
Update(entity_id, id, body, config) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
let path = `scheduler/tag/${entity_id}/${id}`;
|
|
51
|
+
let { data } = yield this.server._put(path, {}, body, config);
|
|
52
|
+
return data;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
Delete(entity_id, id, config) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
let path = `scheduler/tag/${entity_id}/${id}`;
|
|
58
|
+
yield this.server._delete(path, {}, config);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.NamirasoftSchedulerServerSchedulerTag = NamirasoftSchedulerServerSchedulerTag;
|
|
63
|
+
;
|
|
64
|
+
//# sourceMappingURL=NamirasoftSchedulerServerSchedulerTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftSchedulerServerSchedulerTag.js","sourceRoot":"","sources":["../src/NamirasoftSchedulerServerSchedulerTag.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,qDAA6C;AAE7C,mFAAgF;AAEhF,qDAA2C;AAE3C,MAAa,qCAAsC,SAAQ,6DAA6B;IAEpF,YAAY,MAAiC;QAEzC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IACK,IAAI,CAAC,OAA4B,EAAE,IAAqB,EAAE,IAAqB,EAAE,KAAiB,EAAE,MAA8B;;YAEpI,IAAI,oBAAoB,GAAW,4BAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACjE,IAAI,kBAAkB,GAAW,0BAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC3D,IAAI,IAAI,GAAG,oBAAoB,CAAC;YAChC,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA6C,IAAI,EAAE,EAAE,OAA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AC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledDateType.js","sourceRoot":"","sources":["../src/ScheduledDateType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchedulerRow } from "./row/SchedulerRow";
|
|
2
|
+
import { SchedulerStateType } from "./SchedulerStateType";
|
|
3
|
+
export declare class Scheduler {
|
|
4
|
+
private static makeDelay;
|
|
5
|
+
private static getNextSchedule;
|
|
6
|
+
static getSchedule(scheduler: SchedulerRow, date: Date): {
|
|
7
|
+
next_schedule: Date;
|
|
8
|
+
next_run: Date | null;
|
|
9
|
+
next_state: SchedulerStateType[];
|
|
10
|
+
runs: SchedulerStateType[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scheduler = void 0;
|
|
4
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
5
|
+
class Scheduler {
|
|
6
|
+
static makeDelay(scheduler, date) {
|
|
7
|
+
let date_with_delay = null;
|
|
8
|
+
let random_delay_value = 0;
|
|
9
|
+
if (scheduler.random_delay_value != null && scheduler.random_delay_unit != null) {
|
|
10
|
+
let random_delay_value = namirasoft_core_1.TimeUnitOperation.toMinutes(scheduler.random_delay_value, scheduler.random_delay_unit);
|
|
11
|
+
random_delay_value = Math.random() * (random_delay_value + 1);
|
|
12
|
+
date_with_delay = namirasoft_core_1.TimeUnitOperation.later(random_delay_value, namirasoft_core_1.DurationUnit.Minute, date);
|
|
13
|
+
}
|
|
14
|
+
else
|
|
15
|
+
date_with_delay = date;
|
|
16
|
+
return { date, date_with_delay, random_delay_value };
|
|
17
|
+
}
|
|
18
|
+
static getNextSchedule(scheduler, date) {
|
|
19
|
+
let next_run = new Date(date !== null && date !== void 0 ? date : new Date());
|
|
20
|
+
next_run.setSeconds(0);
|
|
21
|
+
next_run.setMilliseconds(0);
|
|
22
|
+
next_run = namirasoft_core_1.TimeOperation.minutesLater(1, next_run);
|
|
23
|
+
if (scheduler.cron_year) {
|
|
24
|
+
let current = next_run.getFullYear();
|
|
25
|
+
let next = namirasoft_core_1.CronOperation.getNext(current, scheduler.cron_year, 1, undefined);
|
|
26
|
+
if (next <= current)
|
|
27
|
+
next_run = namirasoft_core_1.TimeOperation.yearsLater(1, next_run);
|
|
28
|
+
next_run.setMonth(next - 1);
|
|
29
|
+
}
|
|
30
|
+
if (scheduler.cron_month) {
|
|
31
|
+
}
|
|
32
|
+
if (scheduler.cron_day) {
|
|
33
|
+
}
|
|
34
|
+
if (scheduler.cron_day_of_week) {
|
|
35
|
+
}
|
|
36
|
+
if (scheduler.cron_hour) { }
|
|
37
|
+
if (scheduler.cron_minute) { }
|
|
38
|
+
return Scheduler.makeDelay(scheduler, next_run);
|
|
39
|
+
}
|
|
40
|
+
static getSchedule(scheduler, date) {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
let next_schedule = (_a = scheduler.next_schedule) !== null && _a !== void 0 ? _a : null;
|
|
43
|
+
let next_run = null;
|
|
44
|
+
let runs = [];
|
|
45
|
+
let last_state = (_b = scheduler.state) !== null && _b !== void 0 ? _b : [];
|
|
46
|
+
let next_state = [];
|
|
47
|
+
if (next_schedule == null || next_schedule <= date) {
|
|
48
|
+
let schedule = Scheduler.getNextSchedule(scheduler, next_schedule !== null && next_schedule !== void 0 ? next_schedule : date);
|
|
49
|
+
next_schedule = schedule.date;
|
|
50
|
+
last_state.push({
|
|
51
|
+
number: 0,
|
|
52
|
+
scheduler_next_run: schedule,
|
|
53
|
+
every_next_run: schedule
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
for (let i = 0; i < last_state.length; i++) {
|
|
57
|
+
let state = last_state[i];
|
|
58
|
+
if (state.every_next_run.date_with_delay < date) {
|
|
59
|
+
runs.push(Object.assign({}, state));
|
|
60
|
+
if (scheduler.repeat_every_value != null && scheduler.repeat_every_unit != null && scheduler.repeat_until_value != null && scheduler.repeat_until_unit != null) {
|
|
61
|
+
let next_state = Object.assign({}, state);
|
|
62
|
+
next_state.number++;
|
|
63
|
+
let every_next_run = namirasoft_core_1.TimeUnitOperation.later(scheduler.repeat_every_value, scheduler.repeat_every_unit, next_state.every_next_run.date);
|
|
64
|
+
next_state.every_next_run = Scheduler.makeDelay(scheduler, every_next_run);
|
|
65
|
+
let run_until = namirasoft_core_1.TimeUnitOperation.later(scheduler.repeat_until_value, scheduler.repeat_until_unit, next_state.scheduler_next_run.date);
|
|
66
|
+
if (next_state.every_next_run.date_with_delay >= run_until)
|
|
67
|
+
next_state = null;
|
|
68
|
+
state = next_state;
|
|
69
|
+
}
|
|
70
|
+
else
|
|
71
|
+
state = null;
|
|
72
|
+
}
|
|
73
|
+
if (state)
|
|
74
|
+
next_state.push(state);
|
|
75
|
+
}
|
|
76
|
+
next_state = next_state.filter(s => {
|
|
77
|
+
if (scheduler.end_date_time)
|
|
78
|
+
if (s.every_next_run.date_with_delay >= scheduler.end_date_time)
|
|
79
|
+
return false;
|
|
80
|
+
return true;
|
|
81
|
+
});
|
|
82
|
+
if (next_state.length == 0)
|
|
83
|
+
next_run = null;
|
|
84
|
+
else
|
|
85
|
+
next_run = new Date(Math.min(...next_state.map(s => s.every_next_run.date_with_delay.getTime())));
|
|
86
|
+
if (next_run)
|
|
87
|
+
if (scheduler.max_repeat_count)
|
|
88
|
+
if (scheduler.total_run + runs.length >= scheduler.max_repeat_count)
|
|
89
|
+
next_run = null;
|
|
90
|
+
return { next_schedule, next_run, next_state, runs };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Scheduler = Scheduler;
|
|
94
|
+
//# sourceMappingURL=Scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../src/Scheduler.ts"],"names":[],"mappings":";;;AAAA,qDAAgG;AAKhG,MAAa,SAAS;IAEV,MAAM,CAA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AAC,aAAa;oBAC3D,OAAO,KAAK,CAAC;YACrB,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YACtB,QAAQ,GAAG,IAAI,CAAC;;YAEhB,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QAEtG,IAAI,QAAQ;YACR,IAAI,SAAS,CAAC,gBAAgB;gBAC1B,IAAI,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,IAAI,SAAS,CAAC,gBAAgB;oBAC/D,QAAQ,GAAG,IAAI,CAAC;QAE5B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IACzD,CAAC;CACJ;AA5HD,8BA4HC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchedulerStateType.js","sourceRoot":"","sources":["../src/SchedulerStateType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchedulerCategoryCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const SchedulerCategoryCreateCommand_1 = require("./SchedulerCategoryCreateCommand");
|
|
6
|
+
const SchedulerCategoryDeleteCommand_1 = require("./SchedulerCategoryDeleteCommand");
|
|
7
|
+
const SchedulerCategoryGetCommand_1 = require("./SchedulerCategoryGetCommand");
|
|
8
|
+
const SchedulerCategoryListCommand_1 = require("./SchedulerCategoryListCommand");
|
|
9
|
+
class SchedulerCategoryCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
10
|
+
constructor(argv) {
|
|
11
|
+
super(argv, {
|
|
12
|
+
"list": SchedulerCategoryListCommand_1.SchedulerCategoryListCommand,
|
|
13
|
+
"get": SchedulerCategoryGetCommand_1.SchedulerCategoryGetCommand,
|
|
14
|
+
"create": SchedulerCategoryCreateCommand_1.SchedulerCategoryCreateCommand,
|
|
15
|
+
"delete": SchedulerCategoryDeleteCommand_1.SchedulerCategoryDeleteCommand,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.SchedulerCategoryCommand = SchedulerCategoryCommand;
|
|
20
|
+
;
|
|
21
|
+
//# sourceMappingURL=SchedulerCategoryCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchedulerCategoryCommand.js","sourceRoot":"","sources":["../../src/command/SchedulerCategoryCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,qFAAkF;AAClF,qFAAkF;AAClF,+EAA4E;AAC5E,iFAA8E;AAE9E,MAAa,wBAAyB,SAAQ,0CAAoB;IAE9D,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,2DAA4B;YACpC,KAAK,EAAE,yDAA2B;YAClC,QAAQ,EAAE,+DAA8B;YACxC,QAAQ,EAAE,+DAA8B;SAC3C,CAAC,CAAC;IACP,CAAC;CACJ;AAXD,4DAWC;AAAA,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.SchedulerCategoryCreateCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSchedulerServer_1 = require("../NamirasoftSchedulerServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class SchedulerCategoryCreateCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["entity_id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "category_id",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'category_id' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["category_id"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
}
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
exec() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
let token = this.app.storage.getNSAToken();
|
|
33
|
+
if (token == null)
|
|
34
|
+
throw new Error("Token is not available. Please login first using:\nns-scheduler account config \nor \nns-scheduler account login.");
|
|
35
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
36
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
37
|
+
manager.setValue(token, false);
|
|
38
|
+
let url = this.app.storage.getItem("ns-scheduler-server-url");
|
|
39
|
+
let server = new NamirasoftSchedulerServer_1.NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
40
|
+
let ans = yield server.scheduler_category.Create(this.arg_values[0], {
|
|
41
|
+
category_id: this.option_values.category_id
|
|
42
|
+
});
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.SchedulerCategoryCreateCommand = SchedulerCategoryCreateCommand;
|
|
48
|
+
;
|
|
49
|
+
//# sourceMappingURL=SchedulerCategoryCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchedulerCategoryCreateCommand.js","sourceRoot":"","sources":["../../src/command/SchedulerCategoryCreateCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,8BAA+B,SAAQ,sCAAgB;IAEhE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE;YACvB;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,mHAAmH,CAAC,CAAC;YACzI,IAAI,OAAO,GAAG,IAAI,yCAAuB,EAAE,CAAC;YAC5C,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;YAC9D,IAAI,MAAM,GAAG,IAAI,qDAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAChG,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;gBACjE,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;AA9BD,wEA8BC;AAAA,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SchedulerCategoryDeleteCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftSchedulerServer_1 = require("../NamirasoftSchedulerServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class SchedulerCategoryDeleteCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["entity_id", "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-scheduler account config \nor \nns-scheduler account login.");
|
|
26
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
27
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
28
|
+
manager.setValue(token, false);
|
|
29
|
+
let url = this.app.storage.getItem("ns-scheduler-server-url");
|
|
30
|
+
let server = new NamirasoftSchedulerServer_1.NamirasoftSchedulerServer(url, manager, e => this.app.logger.error(e.message));
|
|
31
|
+
let ans = yield server.scheduler_category.Delete(this.arg_values[0], this.arg_values[1]);
|
|
32
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.SchedulerCategoryDeleteCommand = SchedulerCategoryDeleteCommand;
|
|
37
|
+
;
|
|
38
|
+
//# sourceMappingURL=SchedulerCategoryDeleteCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchedulerCategoryDeleteCommand.js","sourceRoot":"","sources":["../../src/command/SchedulerCategoryDeleteCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,4EAAyE;AACzE,2DAAkD;AAElD,MAAa,8BAA+B,SAAQ,sCAAgB;IAEhE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACzC,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,mHAA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