@cyberismo/backend 0.0.14 → 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.
Files changed (113) hide show
  1. package/dist/app.d.ts +21 -0
  2. package/dist/app.js +9 -3
  3. package/dist/app.js.map +1 -1
  4. package/dist/common/validationSchemas.d.ts +48 -0
  5. package/dist/domain/calculations/index.d.ts +15 -0
  6. package/dist/domain/calculations/index.js +1 -53
  7. package/dist/domain/calculations/index.js.map +1 -1
  8. package/dist/domain/calculations/schema.d.ts +16 -0
  9. package/dist/domain/calculations/schema.js +0 -7
  10. package/dist/domain/calculations/schema.js.map +1 -1
  11. package/dist/domain/calculations/service.d.ts +14 -0
  12. package/dist/domain/calculations/service.js +0 -5
  13. package/dist/domain/calculations/service.js.map +1 -1
  14. package/dist/domain/cardTypes/index.d.ts +15 -0
  15. package/dist/domain/cardTypes/schema.d.ts +17 -0
  16. package/dist/domain/cardTypes/service.d.ts +15 -0
  17. package/dist/domain/cards/index.d.ts +15 -0
  18. package/dist/domain/cards/index.js +24 -8
  19. package/dist/domain/cards/index.js.map +1 -1
  20. package/dist/domain/cards/lib.d.ts +29 -0
  21. package/dist/domain/cards/lib.js +74 -13
  22. package/dist/domain/cards/lib.js.map +1 -1
  23. package/dist/domain/cards/service.d.ts +61 -0
  24. package/dist/domain/cards/service.js +22 -18
  25. package/dist/domain/cards/service.js.map +1 -1
  26. package/dist/domain/fieldTypes/index.d.ts +15 -0
  27. package/dist/domain/fieldTypes/schema.d.ts +28 -0
  28. package/dist/domain/fieldTypes/service.d.ts +16 -0
  29. package/dist/domain/graphModels/index.d.ts +15 -0
  30. package/dist/domain/graphModels/schema.d.ts +16 -0
  31. package/dist/domain/graphModels/service.d.ts +14 -0
  32. package/dist/domain/graphViews/index.d.ts +15 -0
  33. package/dist/domain/graphViews/schema.d.ts +4 -0
  34. package/dist/domain/graphViews/service.d.ts +14 -0
  35. package/dist/domain/labels/index.d.ts +15 -0
  36. package/dist/domain/labels/index.js +33 -0
  37. package/dist/domain/labels/index.js.map +1 -0
  38. package/dist/domain/labels/service.d.ts +19 -0
  39. package/dist/domain/labels/service.js +21 -0
  40. package/dist/domain/labels/service.js.map +1 -0
  41. package/dist/domain/linkTypes/index.d.ts +15 -0
  42. package/dist/domain/linkTypes/schema.d.ts +16 -0
  43. package/dist/domain/linkTypes/service.d.ts +15 -0
  44. package/dist/domain/logicPrograms/index.d.ts +15 -0
  45. package/dist/domain/logicPrograms/service.d.ts +15 -0
  46. package/dist/domain/reports/index.d.ts +15 -0
  47. package/dist/domain/reports/schema.d.ts +16 -0
  48. package/dist/domain/reports/service.d.ts +14 -0
  49. package/dist/domain/resources/index.d.ts +15 -0
  50. package/dist/domain/resources/index.js +2 -20
  51. package/dist/domain/resources/index.js.map +1 -1
  52. package/dist/domain/resources/schema.d.ts +60 -0
  53. package/dist/domain/resources/schema.js +12 -1
  54. package/dist/domain/resources/schema.js.map +1 -1
  55. package/dist/domain/resources/service.d.ts +36 -0
  56. package/dist/domain/resources/service.js +14 -34
  57. package/dist/domain/resources/service.js.map +1 -1
  58. package/dist/domain/templates/index.d.ts +15 -0
  59. package/dist/domain/templates/index.js +1 -1
  60. package/dist/domain/templates/index.js.map +1 -1
  61. package/dist/domain/templates/schema.d.ts +22 -0
  62. package/dist/domain/templates/service.d.ts +16 -0
  63. package/dist/domain/tree/index.d.ts +15 -0
  64. package/dist/domain/tree/index.js +3 -2
  65. package/dist/domain/tree/index.js.map +1 -1
  66. package/dist/domain/tree/service.d.ts +22 -0
  67. package/dist/domain/tree/service.js +10 -2
  68. package/dist/domain/tree/service.js.map +1 -1
  69. package/dist/domain/workflows/index.d.ts +15 -0
  70. package/dist/domain/workflows/schema.d.ts +16 -0
  71. package/dist/domain/workflows/service.d.ts +14 -0
  72. package/dist/export.d.ts +42 -0
  73. package/dist/export.js +48 -152
  74. package/dist/export.js.map +1 -1
  75. package/dist/index.d.ts +13 -0
  76. package/dist/index.js +3 -4
  77. package/dist/index.js.map +1 -1
  78. package/dist/main.d.ts +1 -0
  79. package/dist/middleware/commandManager.d.ts +20 -0
  80. package/dist/middleware/tree.d.ts +9 -0
  81. package/dist/middleware/tree.js +13 -0
  82. package/dist/middleware/tree.js.map +1 -0
  83. package/dist/middleware/zvalidator.d.ts +9 -0
  84. package/dist/public/THIRD-PARTY.txt +164 -164
  85. package/dist/public/assets/{index-OjHhVGiV.js → index-D410yunq.js} +89249 -81256
  86. package/dist/public/assets/index-DnK7MBer.css +1 -0
  87. package/dist/public/index.html +2 -2
  88. package/dist/types.d.ts +29 -0
  89. package/dist/utils.d.ts +11 -0
  90. package/dist/utils.js +0 -32
  91. package/dist/utils.js.map +1 -1
  92. package/package.json +8 -8
  93. package/src/app.ts +11 -4
  94. package/src/domain/calculations/index.ts +1 -68
  95. package/src/domain/calculations/schema.ts +0 -9
  96. package/src/domain/calculations/service.ts +0 -11
  97. package/src/domain/cards/index.ts +33 -8
  98. package/src/domain/cards/lib.ts +95 -22
  99. package/src/domain/cards/service.ts +38 -37
  100. package/src/domain/labels/index.ts +36 -0
  101. package/src/domain/labels/service.ts +23 -0
  102. package/src/domain/resources/index.ts +3 -41
  103. package/src/domain/resources/schema.ts +13 -1
  104. package/src/domain/resources/service.ts +28 -67
  105. package/src/domain/templates/index.ts +1 -1
  106. package/src/domain/tree/index.ts +10 -3
  107. package/src/domain/tree/service.ts +15 -1
  108. package/src/export.ts +59 -192
  109. package/src/index.ts +7 -4
  110. package/src/middleware/tree.ts +17 -0
  111. package/src/types.ts +13 -0
  112. package/src/utils.ts +0 -39
  113. package/dist/public/assets/index-DA46eVkH.css +0 -1
@@ -11,22 +11,12 @@
11
11
  License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
12
  */
13
13
  import Processor from '@asciidoctor/core';
14
- import { CardLocation, } from '@cyberismo/data-handler/interfaces/project-interfaces';
15
14
  import { evaluateMacros } from '@cyberismo/data-handler';
16
15
  import { getCardQueryResult } from '../../export.js';
17
- export async function getCardDetails(commands, key, staticMode) {
18
- const fetchCardDetails = {
19
- attachments: true,
20
- children: false,
21
- content: true,
22
- contentType: 'adoc',
23
- metadata: false,
24
- parent: false,
25
- location: CardLocation.all,
26
- };
16
+ export async function getCardDetails(commands, key, staticMode, raw) {
27
17
  let cardDetailsResponse;
28
18
  try {
29
- cardDetailsResponse = await commands.showCmd.showCardDetails(fetchCardDetails, key);
19
+ cardDetailsResponse = commands.showCmd.showCardDetails(key);
30
20
  }
31
21
  catch {
32
22
  return { status: 400, message: `Card ${key} not found from project` };
@@ -35,7 +25,7 @@ export async function getCardDetails(commands, key, staticMode) {
35
25
  return { status: 400, message: `Card ${key} not found from project` };
36
26
  }
37
27
  // always parse for now if not in export mode
38
- if (!staticMode) {
28
+ if (!staticMode && !raw) {
39
29
  await commands.calculateCmd.generate();
40
30
  }
41
31
  let asciidocContent = '';
@@ -59,6 +49,58 @@ export async function getCardDetails(commands, key, staticMode) {
59
49
  },
60
50
  })
61
51
  .toString();
52
+ if (raw) {
53
+ if (!cardDetailsResponse.metadata) {
54
+ throw new Error('Card has no metadata');
55
+ }
56
+ const cardType = await commands.showCmd.showResource(cardDetailsResponse.metadata.cardType, 'cardTypes');
57
+ const fields = [];
58
+ let i = 0;
59
+ for (const customField of cardType.customFields) {
60
+ const fieldType = await commands.showCmd.showResource(customField.name, 'fieldTypes');
61
+ fields.push({
62
+ key: customField.name,
63
+ visibility: 'always',
64
+ index: i++,
65
+ fieldDisplayName: fieldType.displayName,
66
+ fieldDescription: fieldType.description,
67
+ dataType: fieldType.dataType,
68
+ isCalculated: customField.isCalculated,
69
+ value: cardDetailsResponse.metadata[customField.name],
70
+ enumValues: fieldType.enumValues ?? [],
71
+ });
72
+ }
73
+ return {
74
+ status: 200,
75
+ data: {
76
+ key: cardDetailsResponse.key,
77
+ rank: cardDetailsResponse.metadata?.rank,
78
+ title: cardDetailsResponse.metadata?.title || '',
79
+ cardType: cardDetailsResponse.metadata?.cardType || '',
80
+ cardTypeDisplayName: cardDetailsResponse.metadata.cardType,
81
+ workflowState: '',
82
+ lastUpdated: cardDetailsResponse.metadata.lastUpdated,
83
+ fields,
84
+ labels: cardDetailsResponse.metadata?.labels || [],
85
+ links: [],
86
+ notifications: [],
87
+ policyChecks: {
88
+ successes: [],
89
+ failures: [],
90
+ },
91
+ deniedOperations: {
92
+ transition: [],
93
+ move: [],
94
+ delete: [],
95
+ editField: [],
96
+ editContent: [],
97
+ },
98
+ rawContent: cardDetailsResponse.content || '',
99
+ parsedContent: htmlContent,
100
+ attachments: cardDetailsResponse.attachments,
101
+ },
102
+ };
103
+ }
62
104
  const card = staticMode
63
105
  ? await getCardQueryResult(commands.project.basePath, key)
64
106
  : await commands.calculateCmd.runQuery('card', 'localApp', {
@@ -77,4 +119,23 @@ export async function getCardDetails(commands, key, staticMode) {
77
119
  },
78
120
  };
79
121
  }
122
+ /**
123
+ * Returns all cards from a tree query, flattened.
124
+ * @param commands the command manager used for the query
125
+ * @param options optional tree query options
126
+ * @returns a promise that resolves to an array of all cards
127
+ */
128
+ export async function allCards(commands, options) {
129
+ const fetchedCards = await commands.calculateCmd.runQuery('tree', 'exportedSite', options || {});
130
+ function flattenCards(cards) {
131
+ return cards.reduce((acc, curr) => {
132
+ acc.push(curr);
133
+ if (curr.children && curr.children.length > 0) {
134
+ acc.push(...flattenCards(curr.children));
135
+ }
136
+ return acc;
137
+ }, []);
138
+ }
139
+ return flattenCards(fetchedCards);
140
+ }
80
141
  //# sourceMappingURL=lib.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib.js","sourceRoot":"","sources":["../../../src/domain/cards/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAEL,YAAY,GAEb,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;A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C,WAAW;SAC7C;KACF,CAAC;AACJ,CAAC;AACD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,QAAwB,EACxB,OAAqB;IAErB,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,QAAQ,CACvD,MAAM,EACN,cAAc,EACd,OAAO,IAAI,EAAE,CACd,CAAC;IAEF,SAAS,YAAY,CAAC,KAA4B;QAChD,OAAO,KAAK,CAAC,MAAM,CAAwB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACvD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC9C,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IACD,OAAO,YAAY,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,61 @@
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 { allCards } from './lib.js';
15
+ import type { TreeOptions } from '../../types.js';
16
+ export declare function getProjectInfo(commands: CommandManager): Promise<{
17
+ name: string;
18
+ prefix: string;
19
+ workflows: (import("@cyberismo/data-handler/interfaces/resource-interfaces").Workflow | undefined)[];
20
+ cardTypes: (import("@cyberismo/data-handler/interfaces/resource-interfaces").CardType | undefined)[];
21
+ }>;
22
+ export declare function updateCard(commands: CommandManager, key: string, body: any): Promise<void>;
23
+ export declare function deleteCard(commands: CommandManager, key: string): Promise<void>;
24
+ export declare function createCard(commands: CommandManager, template: string, parentKey?: string): Promise<import("@cyberismo/data-handler").Card[]>;
25
+ export declare function uploadAttachments(commands: CommandManager, key: string, files: File[]): Promise<{
26
+ message: string;
27
+ files: string[];
28
+ }>;
29
+ export declare function removeAttachment(commands: CommandManager, key: string, filename: string): Promise<{
30
+ message: string;
31
+ }>;
32
+ export declare function openAttachment(commands: CommandManager, key: string, filename: string): Promise<{
33
+ message: string;
34
+ }>;
35
+ export declare function parseContent(commands: CommandManager, key: string, content: string): Promise<{
36
+ parsedContent: string;
37
+ }>;
38
+ export declare function createLink(commands: CommandManager, key: string, toCard: string, linkType: string, description?: string): Promise<{
39
+ message: string;
40
+ }>;
41
+ export declare function removeLink(commands: CommandManager, key: string, toCard: string, linkType: string, description?: string): Promise<{
42
+ message: string;
43
+ }>;
44
+ export declare function getAttachment(commands: CommandManager, key: string, filename: string): import("@cyberismo/data-handler/interfaces/request-status-interfaces").attachmentPayload;
45
+ /**
46
+ * Used for exporting cards, thus static mode is assumed
47
+ * @param commandsthe command manager used for the query
48
+ * @param options optional tree query options
49
+ * @returns all cards in a flattened array
50
+ */
51
+ export declare function findAllCards(commands: CommandManager, options?: TreeOptions): ReturnType<typeof allCards>;
52
+ /**
53
+ * Gets all attachments that are required for rendering the wanted cards
54
+ * @param commands the command manager used for the query
55
+ * @param options optional tree query options
56
+ * @returns all attachments for cards returned by the tree query
57
+ */
58
+ export declare function findRelevantAttachments(commands: CommandManager, options?: TreeOptions): Promise<{
59
+ key: string;
60
+ attachment: string;
61
+ }[]>;
@@ -11,9 +11,8 @@
11
11
  License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
12
  */
13
13
  import Processor from '@asciidoctor/core';
14
- import { CardLocation, } from '@cyberismo/data-handler/interfaces/project-interfaces';
15
14
  import { evaluateMacros } from '@cyberismo/data-handler';
16
- import { getCardDetails } from './lib.js';
15
+ import { allCards } from './lib.js';
17
16
  export async function getProjectInfo(commands) {
18
17
  const projectResponse = await commands.showCmd.showProject();
19
18
  const workflowsResponse = await commands.showCmd.showWorkflowsWithDetails();
@@ -86,7 +85,6 @@ body) {
86
85
  if (errors.length > 0) {
87
86
  throw new Error(errors.join('\n'));
88
87
  }
89
- return await getCardDetails(commands, key);
90
88
  }
91
89
  export async function deleteCard(commands, key) {
92
90
  await commands.removeCmd.remove('card', key);
@@ -153,24 +151,30 @@ export async function removeLink(commands, key, toCard, linkType, description) {
153
151
  await commands.removeCmd.remove('link', key, toCard, linkType, description);
154
152
  return { message: 'Link removed successfully' };
155
153
  }
156
- export async function getAttachment(commands, key, filename) {
157
- const attachmentResponse = await commands.showCmd.showAttachment(key, filename);
158
- if (!attachmentResponse) {
159
- throw new Error(`No attachment found from card ${key} and filename ${filename}`);
160
- }
161
- return attachmentResponse;
154
+ export function getAttachment(commands, key, filename) {
155
+ return commands.showCmd.showAttachment(key, filename);
162
156
  }
163
- export async function getAllCards(commands) {
164
- const fetchedCards = await commands.showCmd.showCards(CardLocation.projectOnly);
165
- const projectCards = fetchedCards.find((cardContainer) => cardContainer.type === 'project');
166
- if (!projectCards) {
167
- throw new Error('Data handler did not return project cards');
168
- }
169
- return projectCards.cards;
157
+ /**
158
+ * Used for exporting cards, thus static mode is assumed
159
+ * @param commandsthe command manager used for the query
160
+ * @param options optional tree query options
161
+ * @returns all cards in a flattened array
162
+ */
163
+ export async function findAllCards(commands, options) {
164
+ return allCards(commands, options);
170
165
  }
171
- export async function getAllAttachments(commands) {
166
+ /**
167
+ * Gets all attachments that are required for rendering the wanted cards
168
+ * @param commands the command manager used for the query
169
+ * @param options optional tree query options
170
+ * @returns all attachments for cards returned by the tree query
171
+ */
172
+ export async function findRelevantAttachments(commands, options) {
173
+ const cards = new Set((await allCards(commands, options)).map((c) => c.key));
172
174
  const attachments = await commands.showCmd.showAttachments();
173
- return attachments.map((attachment) => ({
175
+ return attachments
176
+ .filter((attachment) => cards.has(attachment.card) && attachment.mimeType?.startsWith('image/'))
177
+ .map((attachment) => ({
174
178
  key: attachment.card,
175
179
  attachment: attachment.fileName,
176
180
  }));
@@ -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;AAC1C,OAAO,EACL,YAAY,GAEb,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,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,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,QAAwB,EACxB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AAC;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,4 @@
1
+ import { z } from 'zod';
2
+ export declare const createGraphViewSchema: z.ZodObject<{
3
+ identifier: z.ZodString;
4
+ }, 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 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>;