@cyberismo/backend 0.0.15 → 0.0.16
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/app.d.ts +21 -0
- package/dist/app.js +9 -3
- package/dist/app.js.map +1 -1
- package/dist/common/validationSchemas.d.ts +48 -0
- package/dist/domain/calculations/index.d.ts +15 -0
- package/dist/domain/calculations/schema.d.ts +16 -0
- package/dist/domain/calculations/service.d.ts +14 -0
- package/dist/domain/cardTypes/index.d.ts +15 -0
- package/dist/domain/cardTypes/schema.d.ts +17 -0
- package/dist/domain/cardTypes/service.d.ts +15 -0
- package/dist/domain/cards/index.d.ts +15 -0
- package/dist/domain/cards/index.js +22 -6
- package/dist/domain/cards/index.js.map +1 -1
- package/dist/domain/cards/lib.d.ts +29 -0
- package/dist/domain/cards/lib.js +73 -2
- package/dist/domain/cards/lib.js.map +1 -1
- package/dist/domain/cards/service.d.ts +61 -0
- package/dist/domain/cards/service.js +20 -12
- package/dist/domain/cards/service.js.map +1 -1
- package/dist/domain/fieldTypes/index.d.ts +15 -0
- package/dist/domain/fieldTypes/schema.d.ts +28 -0
- package/dist/domain/fieldTypes/service.d.ts +16 -0
- package/dist/domain/graphModels/index.d.ts +15 -0
- package/dist/domain/graphModels/schema.d.ts +16 -0
- package/dist/domain/graphModels/service.d.ts +14 -0
- package/dist/domain/graphViews/index.d.ts +15 -0
- package/dist/domain/graphViews/schema.d.ts +4 -0
- package/dist/domain/graphViews/service.d.ts +14 -0
- package/dist/domain/labels/index.d.ts +15 -0
- package/dist/domain/labels/index.js +33 -0
- package/dist/domain/labels/index.js.map +1 -0
- package/dist/domain/labels/service.d.ts +19 -0
- package/dist/domain/labels/service.js +21 -0
- package/dist/domain/labels/service.js.map +1 -0
- package/dist/domain/linkTypes/index.d.ts +15 -0
- package/dist/domain/linkTypes/schema.d.ts +16 -0
- package/dist/domain/linkTypes/service.d.ts +15 -0
- package/dist/domain/logicPrograms/index.d.ts +15 -0
- package/dist/domain/logicPrograms/service.d.ts +15 -0
- package/dist/domain/reports/index.d.ts +15 -0
- package/dist/domain/reports/schema.d.ts +16 -0
- package/dist/domain/reports/service.d.ts +14 -0
- package/dist/domain/resources/index.d.ts +15 -0
- package/dist/domain/resources/schema.d.ts +60 -0
- package/dist/domain/resources/service.d.ts +36 -0
- package/dist/domain/templates/index.d.ts +15 -0
- package/dist/domain/templates/index.js +1 -1
- package/dist/domain/templates/index.js.map +1 -1
- package/dist/domain/templates/schema.d.ts +22 -0
- package/dist/domain/templates/service.d.ts +16 -0
- package/dist/domain/tree/index.d.ts +15 -0
- package/dist/domain/tree/index.js +3 -2
- package/dist/domain/tree/index.js.map +1 -1
- package/dist/domain/tree/service.d.ts +22 -0
- package/dist/domain/tree/service.js +10 -2
- package/dist/domain/tree/service.js.map +1 -1
- package/dist/domain/workflows/index.d.ts +15 -0
- package/dist/domain/workflows/schema.d.ts +16 -0
- package/dist/domain/workflows/service.d.ts +14 -0
- package/dist/export.d.ts +42 -0
- package/dist/export.js +48 -152
- package/dist/export.js.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/middleware/commandManager.d.ts +20 -0
- package/dist/middleware/tree.d.ts +9 -0
- package/dist/middleware/tree.js +13 -0
- package/dist/middleware/tree.js.map +1 -0
- package/dist/middleware/zvalidator.d.ts +9 -0
- package/dist/public/THIRD-PARTY.txt +53 -53
- package/dist/public/assets/{index-Dtn1rQ-9.js → index-D410yunq.js} +26486 -26409
- package/dist/public/index.html +1 -1
- package/dist/types.d.ts +29 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +0 -32
- package/dist/utils.js.map +1 -1
- package/package.json +6 -6
- package/src/app.ts +11 -4
- package/src/domain/cards/index.ts +31 -6
- package/src/domain/cards/lib.ts +93 -3
- package/src/domain/cards/service.ts +36 -24
- package/src/domain/labels/index.ts +36 -0
- package/src/domain/labels/service.ts +23 -0
- package/src/domain/resources/service.ts +3 -3
- package/src/domain/templates/index.ts +1 -1
- package/src/domain/tree/index.ts +10 -3
- package/src/domain/tree/service.ts +15 -1
- package/src/export.ts +59 -192
- package/src/index.ts +5 -1
- package/src/middleware/tree.ts +17 -0
- package/src/types.ts +13 -0
- package/src/utils.ts +0 -39
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/cards/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,SAAS,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/cards/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAwB;IAC3D,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAE7D,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAC5E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAC5E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO;QACL,IAAI,EAAE,eAAe,CAAC,IAAI;QAC1B,MAAM,EAAE,eAAe,CAAC,MAAM;QAC9B,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,iBAAiB;KAC7B,CAAC;AACJ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QAAgB;IAEhB,OAAO,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAAwB,EACxB,OAAqB;IAErB,OAAO,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AACD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAwB,EACxB,OAAqB;IAErB,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CACtD,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;IAC7D,OAAO,WAAW;SACf,MAAM,CACL,CAAC,UAAU,EAAE,EAAE,CACb,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAC1E;SACA,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACpB,GAAG,EAAE,UAAU,CAAC,IAAI;QACpB,UAAU,EAAE,UAAU,CAAC,QAAQ;KAChC,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
export declare const createFieldTypeSchema: z.ZodObject<{
|
|
15
|
+
dataType: z.ZodEnum<{
|
|
16
|
+
number: "number";
|
|
17
|
+
boolean: "boolean";
|
|
18
|
+
date: "date";
|
|
19
|
+
enum: "enum";
|
|
20
|
+
dateTime: "dateTime";
|
|
21
|
+
integer: "integer";
|
|
22
|
+
list: "list";
|
|
23
|
+
longText: "longText";
|
|
24
|
+
person: "person";
|
|
25
|
+
shortText: "shortText";
|
|
26
|
+
}>;
|
|
27
|
+
identifier: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
import type { DataType } from '@cyberismo/data-handler/interfaces/resource-interfaces';
|
|
15
|
+
export declare function getFieldTypes(commands: CommandManager): Promise<import("@cyberismo/data-handler/interfaces/resource-interfaces").AnyResourceContent[]>;
|
|
16
|
+
export declare function createFieldType(commands: CommandManager, identifier: string, dataType: DataType): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
export declare const createGraphModelSchema: z.ZodObject<{
|
|
15
|
+
identifier: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
export declare function createGraphModel(commands: CommandManager, graphModelName: string): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
export declare function createGraphView(commands: CommandManager, graphViewName: string): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
import * as labelsService from './service.js';
|
|
15
|
+
const router = new Hono();
|
|
16
|
+
/**
|
|
17
|
+
* @swagger
|
|
18
|
+
* /api/labels:
|
|
19
|
+
* get:
|
|
20
|
+
* summary: Returns all unique labels defined in the project.
|
|
21
|
+
* responses:
|
|
22
|
+
* 200:
|
|
23
|
+
* description: List of label strings.
|
|
24
|
+
* 500:
|
|
25
|
+
* description: Internal server error
|
|
26
|
+
*/
|
|
27
|
+
router.get('/', (c) => {
|
|
28
|
+
const commands = c.get('commands');
|
|
29
|
+
const labels = labelsService.getLabels(commands);
|
|
30
|
+
return c.json(labels);
|
|
31
|
+
});
|
|
32
|
+
export default router;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/labels/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,aAAa,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;IACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
/**
|
|
15
|
+
* Returns all unique labels available in the project.
|
|
16
|
+
* @param commands command manager used for the query
|
|
17
|
+
* @returns a list of labels
|
|
18
|
+
*/
|
|
19
|
+
export declare function getLabels(commands: CommandManager): string[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Returns all unique labels available in the project.
|
|
15
|
+
* @param commands command manager used for the query
|
|
16
|
+
* @returns a list of labels
|
|
17
|
+
*/
|
|
18
|
+
export function getLabels(commands) {
|
|
19
|
+
return commands.showCmd.showLabels().sort();
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/labels/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAIF;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,QAAwB;IAChD,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
export declare const createLinkTypeSchema: z.ZodObject<{
|
|
15
|
+
identifier: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
export declare function getLinkTypes(commands: CommandManager): Promise<import("@cyberismo/data-handler/interfaces/resource-interfaces").AnyResourceContent[]>;
|
|
15
|
+
export declare function createLinkType(commands: CommandManager, linkTypeName: string): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
import type { ResourceParamsWithCard } from '../../common/validationSchemas.js';
|
|
15
|
+
export declare function getLogicProgram(commands: CommandManager, resource: ResourceParamsWithCard): Promise<string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
export declare const createReportSchema: z.ZodObject<{
|
|
15
|
+
identifier: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
export declare function createReport(commands: CommandManager, reportName: string): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const resourceFileParamsSchema: z.ZodObject<{
|
|
3
|
+
prefix: z.ZodString;
|
|
4
|
+
type: z.ZodEnum<{
|
|
5
|
+
cardTypes: "cardTypes";
|
|
6
|
+
calculations: "calculations";
|
|
7
|
+
fieldTypes: "fieldTypes";
|
|
8
|
+
graphModels: "graphModels";
|
|
9
|
+
graphViews: "graphViews";
|
|
10
|
+
linkTypes: "linkTypes";
|
|
11
|
+
reports: "reports";
|
|
12
|
+
templates: "templates";
|
|
13
|
+
workflows: "workflows";
|
|
14
|
+
}>;
|
|
15
|
+
identifier: z.ZodString;
|
|
16
|
+
file: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type ResourceFileParams = z.infer<typeof resourceFileParamsSchema>;
|
|
19
|
+
export declare const validateResourceParamsSchema: z.ZodObject<{
|
|
20
|
+
prefix: z.ZodString;
|
|
21
|
+
identifier: z.ZodString;
|
|
22
|
+
type: z.ZodEnum<{
|
|
23
|
+
cardTypes: "cardTypes";
|
|
24
|
+
fieldTypes: "fieldTypes";
|
|
25
|
+
graphModels: "graphModels";
|
|
26
|
+
graphViews: "graphViews";
|
|
27
|
+
linkTypes: "linkTypes";
|
|
28
|
+
reports: "reports";
|
|
29
|
+
templates: "templates";
|
|
30
|
+
workflows: "workflows";
|
|
31
|
+
}>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type ValidateResourceParams = z.infer<typeof validateResourceParamsSchema>;
|
|
34
|
+
export declare const updateOperationBodySchema: z.ZodObject<{
|
|
35
|
+
updateKey: z.ZodUnion<readonly [z.ZodObject<{
|
|
36
|
+
key: z.ZodLiteral<"content">;
|
|
37
|
+
subKey: z.ZodString;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
key: z.ZodString;
|
|
40
|
+
}, z.core.$strip>]>;
|
|
41
|
+
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
|
+
name: z.ZodLiteral<"add">;
|
|
43
|
+
target: z.ZodUnknown;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
name: z.ZodLiteral<"change">;
|
|
46
|
+
target: z.ZodUnknown;
|
|
47
|
+
to: z.ZodUnknown;
|
|
48
|
+
mappingTable: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
stateMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
name: z.ZodLiteral<"remove">;
|
|
53
|
+
target: z.ZodUnknown;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
name: z.ZodLiteral<"rank">;
|
|
56
|
+
target: z.ZodUnknown;
|
|
57
|
+
newIndex: z.ZodNumber;
|
|
58
|
+
}, z.core.$strip>], "name">;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type UpdateOperationBody = z.infer<typeof updateOperationBodySchema>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { type CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
import type { ResourceParams } from '../../common/validationSchemas.js';
|
|
15
|
+
import type { ValidateResourceParams, UpdateOperationBody } from './schema.js';
|
|
16
|
+
export declare function buildResourceTree(commands: CommandManager): Promise<unknown[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Delete a resource.
|
|
19
|
+
* @param commands Command manager.
|
|
20
|
+
* @param resource Resource to delete.
|
|
21
|
+
*/
|
|
22
|
+
export declare function deleteResource(commands: CommandManager, resource: ResourceParams): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Validate a single resource.
|
|
25
|
+
* @param commands Command manager.
|
|
26
|
+
* @param resource Resource to validate.
|
|
27
|
+
* @returns Validation result with errors and validity status.
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateResource(commands: CommandManager, resource: ValidateResourceParams): Promise<{
|
|
30
|
+
errors: string[];
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Perform an updateOperation on a resource key.
|
|
34
|
+
* This delegates to data-handler Update.applyResourceOperation.
|
|
35
|
+
*/
|
|
36
|
+
export declare function updateResourceWithOperation(commands: CommandManager, resource: ResourceParams, body: UpdateOperationBody): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { Hono } from 'hono';
|
|
14
|
+
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
|
+
export default router;
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
12
|
*/
|
|
13
13
|
import { Hono } from 'hono';
|
|
14
|
-
import { isSSGContext } from '../../export.js';
|
|
15
14
|
import * as templateService from './service.js';
|
|
16
15
|
import { createTemplateSchema, addTemplateCardSchema } from './schema.js';
|
|
17
16
|
import { zValidator } from '../../middleware/zvalidator.js';
|
|
17
|
+
import { isSSGContext } from 'hono/ssg';
|
|
18
18
|
const router = new Hono();
|
|
19
19
|
/**
|
|
20
20
|
* @swagger
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,eAAe,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1B,0CAA0C;IAC1C,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAEnC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QACzE,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;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,SAAS,EACT,KAAK,CACN,CAAC;IACF,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
export declare const createTemplateSchema: z.ZodObject<{
|
|
15
|
+
identifier: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const addTemplateCardSchema: z.ZodObject<{
|
|
18
|
+
template: z.ZodString;
|
|
19
|
+
cardType: z.ZodString;
|
|
20
|
+
parentKey: z.ZodOptional<z.ZodString>;
|
|
21
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Cyberismo
|
|
3
|
+
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
+
the Free Software Foundation.
|
|
7
|
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
+
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
+
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
+
export declare function getTemplatesWithDetails(commands: CommandManager): Promise<import("@cyberismo/data-handler").TemplateConfiguration[]>;
|
|
15
|
+
export declare function createTemplate(commands: CommandManager, templateName: string): Promise<void>;
|
|
16
|
+
export declare function addTemplateCard(commands: CommandManager, template: string, cardType: string, parentKey?: string, count?: number): Promise<string[]>;
|