@sixb/server 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/auth/access-token-boundary.d.ts +23 -0
  4. package/dist/auth/access-token-boundary.d.ts.map +1 -0
  5. package/dist/auth/application-access.d.ts +4 -0
  6. package/dist/auth/application-access.d.ts.map +1 -0
  7. package/dist/auth/browser-origin.d.ts +62 -0
  8. package/dist/auth/browser-origin.d.ts.map +1 -0
  9. package/dist/auth/csrf.d.ts +2 -0
  10. package/dist/auth/csrf.d.ts.map +1 -0
  11. package/dist/auth/guard.d.ts +35 -0
  12. package/dist/auth/guard.d.ts.map +1 -0
  13. package/dist/auth/public-routes.d.ts +8 -0
  14. package/dist/auth/public-routes.d.ts.map +1 -0
  15. package/dist/auth/responses.d.ts +11 -0
  16. package/dist/auth/responses.d.ts.map +1 -0
  17. package/dist/auth/return-to.d.ts +3 -0
  18. package/dist/auth/return-to.d.ts.map +1 -0
  19. package/dist/auth/scope.d.ts +43 -0
  20. package/dist/auth/scope.d.ts.map +1 -0
  21. package/dist/auth/session-activity.d.ts +4 -0
  22. package/dist/auth/session-activity.d.ts.map +1 -0
  23. package/dist/auth/session-cookies.d.ts +12 -0
  24. package/dist/auth/session-cookies.d.ts.map +1 -0
  25. package/dist/files/content.d.ts +141 -0
  26. package/dist/files/content.d.ts.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +11522 -0
  30. package/dist/index.js.map +78 -0
  31. package/dist/openapi/security.d.ts +26 -0
  32. package/dist/openapi/security.d.ts.map +1 -0
  33. package/dist/openapi/tags.d.ts +151 -0
  34. package/dist/openapi/tags.d.ts.map +1 -0
  35. package/dist/registerRoutes.d.ts +31 -0
  36. package/dist/registerRoutes.d.ts.map +1 -0
  37. package/dist/routes/action-runs.d.ts +244 -0
  38. package/dist/routes/action-runs.d.ts.map +1 -0
  39. package/dist/routes/actions.d.ts +183 -0
  40. package/dist/routes/actions.d.ts.map +1 -0
  41. package/dist/routes/agent-api-gateway.d.ts +4 -0
  42. package/dist/routes/agent-api-gateway.d.ts.map +1 -0
  43. package/dist/routes/agents.d.ts +1061 -0
  44. package/dist/routes/agents.d.ts.map +1 -0
  45. package/dist/routes/auth.d.ts +1366 -0
  46. package/dist/routes/auth.d.ts.map +1 -0
  47. package/dist/routes/connectors.d.ts +108 -0
  48. package/dist/routes/connectors.d.ts.map +1 -0
  49. package/dist/routes/datasets.d.ts +339 -0
  50. package/dist/routes/datasets.d.ts.map +1 -0
  51. package/dist/routes/events.d.ts +116 -0
  52. package/dist/routes/events.d.ts.map +1 -0
  53. package/dist/routes/files.d.ts +340 -0
  54. package/dist/routes/files.d.ts.map +1 -0
  55. package/dist/routes/links.d.ts +175 -0
  56. package/dist/routes/links.d.ts.map +1 -0
  57. package/dist/routes/logs.d.ts +88 -0
  58. package/dist/routes/logs.d.ts.map +1 -0
  59. package/dist/routes/objects.d.ts +450 -0
  60. package/dist/routes/objects.d.ts.map +1 -0
  61. package/dist/routes/ontology.d.ts +240 -0
  62. package/dist/routes/ontology.d.ts.map +1 -0
  63. package/dist/routes/pipelines.d.ts +399 -0
  64. package/dist/routes/pipelines.d.ts.map +1 -0
  65. package/dist/routes/project.d.ts +56 -0
  66. package/dist/routes/project.d.ts.map +1 -0
  67. package/dist/routes/projections.d.ts +916 -0
  68. package/dist/routes/projections.d.ts.map +1 -0
  69. package/dist/routes/rules.d.ts +165 -0
  70. package/dist/routes/rules.d.ts.map +1 -0
  71. package/dist/routes/status.d.ts +81 -0
  72. package/dist/routes/status.d.ts.map +1 -0
  73. package/dist/routes/syncs.d.ts +294 -0
  74. package/dist/routes/syncs.d.ts.map +1 -0
  75. package/dist/routes/telemetry.d.ts +241 -0
  76. package/dist/routes/telemetry.d.ts.map +1 -0
  77. package/dist/routes/webhook-runs.d.ts +89 -0
  78. package/dist/routes/webhook-runs.d.ts.map +1 -0
  79. package/dist/routes/webhooks.d.ts +60 -0
  80. package/dist/routes/webhooks.d.ts.map +1 -0
  81. package/dist/routes/workflows.d.ts +973 -0
  82. package/dist/routes/workflows.d.ts.map +1 -0
  83. package/dist/routes/ws/agents.d.ts +99 -0
  84. package/dist/routes/ws/agents.d.ts.map +1 -0
  85. package/dist/routes/ws/events.d.ts +89 -0
  86. package/dist/routes/ws/events.d.ts.map +1 -0
  87. package/dist/routes/ws/index.d.ts +31 -0
  88. package/dist/routes/ws/index.d.ts.map +1 -0
  89. package/dist/routes/ws/log-subscription-hub.d.ts +47 -0
  90. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -0
  91. package/dist/routes/ws/logs.d.ts +110 -0
  92. package/dist/routes/ws/logs.d.ts.map +1 -0
  93. package/dist/schemas/actions.d.ts +644 -0
  94. package/dist/schemas/actions.d.ts.map +1 -0
  95. package/dist/schemas/agents.d.ts +3157 -0
  96. package/dist/schemas/agents.d.ts.map +1 -0
  97. package/dist/schemas/auth.d.ts +2023 -0
  98. package/dist/schemas/auth.d.ts.map +1 -0
  99. package/dist/schemas/common.d.ts +30 -0
  100. package/dist/schemas/common.d.ts.map +1 -0
  101. package/dist/schemas/connectors.d.ts +82 -0
  102. package/dist/schemas/connectors.d.ts.map +1 -0
  103. package/dist/schemas/datasets.d.ts +744 -0
  104. package/dist/schemas/datasets.d.ts.map +1 -0
  105. package/dist/schemas/event-payloads.d.ts +477 -0
  106. package/dist/schemas/event-payloads.d.ts.map +1 -0
  107. package/dist/schemas/events.d.ts +665 -0
  108. package/dist/schemas/events.d.ts.map +1 -0
  109. package/dist/schemas/files.d.ts +241 -0
  110. package/dist/schemas/files.d.ts.map +1 -0
  111. package/dist/schemas/links.d.ts +90 -0
  112. package/dist/schemas/links.d.ts.map +1 -0
  113. package/dist/schemas/logs.d.ts +231 -0
  114. package/dist/schemas/logs.d.ts.map +1 -0
  115. package/dist/schemas/objects.d.ts +288 -0
  116. package/dist/schemas/objects.d.ts.map +1 -0
  117. package/dist/schemas/ontology.d.ts +778 -0
  118. package/dist/schemas/ontology.d.ts.map +1 -0
  119. package/dist/schemas/pipelines.d.ts +1373 -0
  120. package/dist/schemas/pipelines.d.ts.map +1 -0
  121. package/dist/schemas/project.d.ts +9 -0
  122. package/dist/schemas/project.d.ts.map +1 -0
  123. package/dist/schemas/projections.d.ts +6992 -0
  124. package/dist/schemas/projections.d.ts.map +1 -0
  125. package/dist/schemas/rules.d.ts +204 -0
  126. package/dist/schemas/rules.d.ts.map +1 -0
  127. package/dist/schemas/status.d.ts +189 -0
  128. package/dist/schemas/status.d.ts.map +1 -0
  129. package/dist/schemas/syncs.d.ts +538 -0
  130. package/dist/schemas/syncs.d.ts.map +1 -0
  131. package/dist/schemas/telemetry.d.ts +265 -0
  132. package/dist/schemas/telemetry.d.ts.map +1 -0
  133. package/dist/schemas/webhook-runs.d.ts +169 -0
  134. package/dist/schemas/webhook-runs.d.ts.map +1 -0
  135. package/dist/schemas/workflows.d.ts +1720 -0
  136. package/dist/schemas/workflows.d.ts.map +1 -0
  137. package/dist/server.d.ts +64 -0
  138. package/dist/server.d.ts.map +1 -0
  139. package/dist/tsconfig.json +5 -0
  140. package/dist/utils/http.d.ts +23 -0
  141. package/dist/utils/http.d.ts.map +1 -0
  142. package/dist/utils/request-body.d.ts +15 -0
  143. package/dist/utils/request-body.d.ts.map +1 -0
  144. package/dist/utils/ws.d.ts +10 -0
  145. package/dist/utils/ws.d.ts.map +1 -0
  146. package/package.json +68 -0
  147. package/src/auth/access-token-boundary.ts +68 -0
  148. package/src/auth/application-access.ts +16 -0
  149. package/src/auth/browser-origin.ts +367 -0
  150. package/src/auth/csrf.ts +1 -0
  151. package/src/auth/guard.ts +169 -0
  152. package/src/auth/public-routes.ts +87 -0
  153. package/src/auth/responses.ts +54 -0
  154. package/src/auth/return-to.ts +21 -0
  155. package/src/auth/scope.ts +64 -0
  156. package/src/auth/session-activity.ts +19 -0
  157. package/src/auth/session-cookies.ts +43 -0
  158. package/src/files/content.ts +419 -0
  159. package/src/index.ts +2 -0
  160. package/src/openapi/security.ts +37 -0
  161. package/src/openapi/tags.ts +151 -0
  162. package/src/registerRoutes.ts +49 -0
  163. package/src/routes/action-runs.ts +238 -0
  164. package/src/routes/actions.ts +126 -0
  165. package/src/routes/agent-api-gateway.ts +260 -0
  166. package/src/routes/agents.ts +943 -0
  167. package/src/routes/auth.ts +2233 -0
  168. package/src/routes/connectors.ts +69 -0
  169. package/src/routes/datasets.ts +402 -0
  170. package/src/routes/events.ts +55 -0
  171. package/src/routes/files.ts +675 -0
  172. package/src/routes/links.ts +143 -0
  173. package/src/routes/logs.ts +65 -0
  174. package/src/routes/objects.ts +838 -0
  175. package/src/routes/ontology.ts +138 -0
  176. package/src/routes/pipelines.ts +332 -0
  177. package/src/routes/project.ts +16 -0
  178. package/src/routes/projections.ts +251 -0
  179. package/src/routes/rules.ts +124 -0
  180. package/src/routes/status.ts +53 -0
  181. package/src/routes/syncs.ts +243 -0
  182. package/src/routes/telemetry.ts +207 -0
  183. package/src/routes/webhook-runs.ts +81 -0
  184. package/src/routes/webhooks.ts +508 -0
  185. package/src/routes/workflows.ts +1333 -0
  186. package/src/routes/ws/agents.ts +301 -0
  187. package/src/routes/ws/events.ts +278 -0
  188. package/src/routes/ws/index.ts +12 -0
  189. package/src/routes/ws/log-subscription-hub.ts +375 -0
  190. package/src/routes/ws/logs.ts +117 -0
  191. package/src/schemas/actions.ts +123 -0
  192. package/src/schemas/agents.ts +293 -0
  193. package/src/schemas/auth.ts +317 -0
  194. package/src/schemas/common.ts +60 -0
  195. package/src/schemas/connectors.ts +21 -0
  196. package/src/schemas/datasets.ts +107 -0
  197. package/src/schemas/event-payloads.ts +79 -0
  198. package/src/schemas/events.ts +117 -0
  199. package/src/schemas/files.ts +82 -0
  200. package/src/schemas/links.ts +38 -0
  201. package/src/schemas/logs.ts +76 -0
  202. package/src/schemas/objects.ts +759 -0
  203. package/src/schemas/ontology.ts +77 -0
  204. package/src/schemas/pipelines.ts +150 -0
  205. package/src/schemas/project.ts +5 -0
  206. package/src/schemas/projections.ts +144 -0
  207. package/src/schemas/rules.ts +98 -0
  208. package/src/schemas/status.ts +51 -0
  209. package/src/schemas/syncs.ts +83 -0
  210. package/src/schemas/telemetry.ts +59 -0
  211. package/src/schemas/webhook-runs.ts +40 -0
  212. package/src/schemas/workflows.ts +229 -0
  213. package/src/server.ts +383 -0
  214. package/src/utils/http.ts +108 -0
  215. package/src/utils/request-body.ts +62 -0
  216. package/src/utils/ws.ts +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../src/routes/projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EAEd,IAAI,EAEL,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA8GpC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkI1F"}
@@ -0,0 +1,165 @@
1
+ import { type OntologySource, type Sixb } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerRuleRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ api: {
20
+ rules: {
21
+ get: {
22
+ body: unknown;
23
+ params: {};
24
+ query: unknown;
25
+ headers: unknown;
26
+ response: {
27
+ 200: {
28
+ kind: "rule";
29
+ id: string;
30
+ subject: {
31
+ kind: "object";
32
+ objectTypeId: string;
33
+ };
34
+ predicate: import("@sixb/core").Predicate;
35
+ dependencies: ({
36
+ type: "object.created" | "object.updated" | "object.deleted";
37
+ objectTypeId: string;
38
+ } | {
39
+ type: "link.created" | "link.updated" | "link.deleted";
40
+ sourceTypeId: string;
41
+ linkId: string;
42
+ })[];
43
+ }[];
44
+ 422: {
45
+ type: "validation";
46
+ on: string;
47
+ summary?: string;
48
+ message?: string;
49
+ found?: unknown;
50
+ property?: string;
51
+ expected?: string;
52
+ };
53
+ };
54
+ };
55
+ };
56
+ };
57
+ } & {
58
+ api: {
59
+ rules: {
60
+ ":ruleId": {
61
+ get: {
62
+ body: unknown;
63
+ params: {
64
+ ruleId: string;
65
+ };
66
+ query: unknown;
67
+ headers: unknown;
68
+ response: {
69
+ 200: {
70
+ kind: "rule";
71
+ id: string;
72
+ subject: {
73
+ kind: "object";
74
+ objectTypeId: string;
75
+ };
76
+ predicate: import("@sixb/core").Predicate;
77
+ dependencies: ({
78
+ type: "object.created" | "object.updated" | "object.deleted";
79
+ objectTypeId: string;
80
+ } | {
81
+ type: "link.created" | "link.updated" | "link.deleted";
82
+ sourceTypeId: string;
83
+ linkId: string;
84
+ })[];
85
+ };
86
+ 404: {
87
+ error: string;
88
+ };
89
+ 422: {
90
+ type: "validation";
91
+ on: string;
92
+ summary?: string;
93
+ message?: string;
94
+ found?: unknown;
95
+ property?: string;
96
+ expected?: string;
97
+ };
98
+ };
99
+ };
100
+ };
101
+ };
102
+ };
103
+ } & {
104
+ api: {
105
+ "rule-states": {
106
+ get: {
107
+ body: unknown;
108
+ params: {};
109
+ query: {
110
+ limit?: string | undefined;
111
+ offset?: string | undefined;
112
+ order?: "asc" | "desc" | undefined;
113
+ objectTypeId?: string | undefined;
114
+ primaryId?: string | undefined;
115
+ ruleId?: string | undefined;
116
+ };
117
+ headers: unknown;
118
+ response: {
119
+ 200: {
120
+ hasMore: boolean;
121
+ total: number;
122
+ states: {
123
+ projectId: string;
124
+ subject: {
125
+ kind: "object";
126
+ objectTypeId: string;
127
+ primaryId: string;
128
+ };
129
+ triggeredAt: string;
130
+ ruleId: string;
131
+ }[];
132
+ };
133
+ 400: {
134
+ error: string;
135
+ };
136
+ 501: {
137
+ error: string;
138
+ };
139
+ 422: {
140
+ type: "validation";
141
+ on: string;
142
+ summary?: string;
143
+ message?: string;
144
+ found?: unknown;
145
+ property?: string;
146
+ expected?: string;
147
+ };
148
+ };
149
+ };
150
+ };
151
+ };
152
+ }, {
153
+ derive: {};
154
+ resolve: {};
155
+ schema: {};
156
+ standaloneSchema: {};
157
+ response: {};
158
+ }, {
159
+ derive: {};
160
+ resolve: {};
161
+ schema: {};
162
+ standaloneSchema: {};
163
+ response: {};
164
+ }>;
165
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/routes/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAuB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAG3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAwBpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGpF"}
@@ -0,0 +1,81 @@
1
+ import type { OntologySource, Sixb } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerStatusRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ api: {
20
+ status: {
21
+ get: {
22
+ body: unknown;
23
+ params: {};
24
+ query: unknown;
25
+ headers: unknown;
26
+ response: {
27
+ 200: {
28
+ status: "ok" | "degraded";
29
+ objectTypes: number;
30
+ maintenance: {
31
+ running: boolean;
32
+ intervalMs: number;
33
+ lastStartedAt: string | null;
34
+ lastCompletedAt: string | null;
35
+ lastDurationMs: number | null;
36
+ consecutiveFailures: number;
37
+ lastError: string | null;
38
+ outbox: {
39
+ pendingCount: number;
40
+ oldestPendingAt: string | null;
41
+ retryingCount: number;
42
+ maxAttempts: number;
43
+ } | null;
44
+ terminalSources: {
45
+ count: number;
46
+ oldestTerminalAt: string | null;
47
+ } | null;
48
+ cleanup: {
49
+ publishedOutboxRowsDeleted: number;
50
+ terminalSourceRowsDeleted: number;
51
+ terminalSourceMaterializationsDeleted: number;
52
+ } | null;
53
+ };
54
+ };
55
+ 422: {
56
+ type: "validation";
57
+ on: string;
58
+ summary?: string;
59
+ message?: string;
60
+ found?: unknown;
61
+ property?: string;
62
+ expected?: string;
63
+ };
64
+ };
65
+ };
66
+ };
67
+ };
68
+ }, {
69
+ derive: {};
70
+ resolve: {};
71
+ schema: {};
72
+ standaloneSchema: {};
73
+ response: {};
74
+ }, {
75
+ derive: {};
76
+ resolve: {};
77
+ schema: {};
78
+ standaloneSchema: {};
79
+ response: {};
80
+ }>;
81
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/routes/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAOpC,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CtF"}
@@ -0,0 +1,294 @@
1
+ import type { OntologySource, Sixb } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ api: {
20
+ syncs: {
21
+ get: {
22
+ body: unknown;
23
+ params: {};
24
+ query: unknown;
25
+ headers: unknown;
26
+ response: {
27
+ 200: {
28
+ id: string;
29
+ mode: "append" | "snapshot";
30
+ triggers: {
31
+ type: "schedule";
32
+ scheduleId: string;
33
+ }[];
34
+ latestRun: {
35
+ status: "running" | "succeeded" | "failed" | "cancelled";
36
+ projectId: string;
37
+ id: string;
38
+ mode: "append" | "snapshot";
39
+ startedAt: string;
40
+ datasetId: string;
41
+ syncId: string;
42
+ error?: {
43
+ message: string;
44
+ name?: string | undefined;
45
+ } | undefined;
46
+ finishedAt?: string | undefined;
47
+ output?: {
48
+ datasetId: string;
49
+ versionId: string;
50
+ } | undefined;
51
+ expectedLatestVersionId?: string | undefined;
52
+ commitMessage?: string | undefined;
53
+ rowsRead?: number | undefined;
54
+ } | null;
55
+ target: {
56
+ kind: "dataset";
57
+ dataset: {
58
+ id: string;
59
+ schema: {
60
+ columns: {
61
+ name: string;
62
+ type: "string" | "boolean" | "json" | "date" | "int64" | "decimal" | "timestamp" | "fileRef" | "float64";
63
+ nullable?: boolean | undefined;
64
+ }[];
65
+ };
66
+ description?: string | undefined;
67
+ partitionBy?: string[] | undefined;
68
+ };
69
+ };
70
+ connector: {
71
+ type: string;
72
+ id: string;
73
+ };
74
+ }[];
75
+ 422: {
76
+ type: "validation";
77
+ on: string;
78
+ summary?: string;
79
+ message?: string;
80
+ found?: unknown;
81
+ property?: string;
82
+ expected?: string;
83
+ };
84
+ };
85
+ };
86
+ };
87
+ };
88
+ } & {
89
+ api: {
90
+ syncs: {
91
+ ":syncId": {
92
+ get: {
93
+ body: unknown;
94
+ params: {
95
+ syncId: string;
96
+ };
97
+ query: unknown;
98
+ headers: unknown;
99
+ response: {
100
+ 200: {
101
+ id: string;
102
+ mode: "append" | "snapshot";
103
+ triggers: {
104
+ type: "schedule";
105
+ scheduleId: string;
106
+ }[];
107
+ latestRun: {
108
+ status: "running" | "succeeded" | "failed" | "cancelled";
109
+ projectId: string;
110
+ id: string;
111
+ mode: "append" | "snapshot";
112
+ startedAt: string;
113
+ datasetId: string;
114
+ syncId: string;
115
+ error?: {
116
+ message: string;
117
+ name?: string | undefined;
118
+ } | undefined;
119
+ finishedAt?: string | undefined;
120
+ output?: {
121
+ datasetId: string;
122
+ versionId: string;
123
+ } | undefined;
124
+ expectedLatestVersionId?: string | undefined;
125
+ commitMessage?: string | undefined;
126
+ rowsRead?: number | undefined;
127
+ } | null;
128
+ target: {
129
+ kind: "dataset";
130
+ dataset: {
131
+ id: string;
132
+ schema: {
133
+ columns: {
134
+ name: string;
135
+ type: "string" | "boolean" | "json" | "date" | "int64" | "decimal" | "timestamp" | "fileRef" | "float64";
136
+ nullable?: boolean | undefined;
137
+ }[];
138
+ };
139
+ description?: string | undefined;
140
+ partitionBy?: string[] | undefined;
141
+ };
142
+ };
143
+ connector: {
144
+ type: string;
145
+ id: string;
146
+ };
147
+ };
148
+ 404: {
149
+ error: string;
150
+ };
151
+ 422: {
152
+ type: "validation";
153
+ on: string;
154
+ summary?: string;
155
+ message?: string;
156
+ found?: unknown;
157
+ property?: string;
158
+ expected?: string;
159
+ };
160
+ };
161
+ };
162
+ };
163
+ };
164
+ };
165
+ } & {
166
+ api: {
167
+ "sync-runs": {
168
+ get: {
169
+ body: unknown;
170
+ params: {};
171
+ query: {
172
+ status?: "running" | "succeeded" | "failed" | "cancelled" | undefined;
173
+ limit?: string | undefined;
174
+ offset?: string | undefined;
175
+ order?: "asc" | "desc" | undefined;
176
+ startedAfter?: string | undefined;
177
+ startedBefore?: string | undefined;
178
+ datasetId?: string | undefined;
179
+ syncId?: string | undefined;
180
+ };
181
+ headers: unknown;
182
+ response: {
183
+ 200: {
184
+ runs: {
185
+ status: "running" | "succeeded" | "failed" | "cancelled";
186
+ projectId: string;
187
+ id: string;
188
+ mode: "append" | "snapshot";
189
+ startedAt: string;
190
+ datasetId: string;
191
+ syncId: string;
192
+ error?: {
193
+ message: string;
194
+ name?: string | undefined;
195
+ } | undefined;
196
+ finishedAt?: string | undefined;
197
+ output?: {
198
+ datasetId: string;
199
+ versionId: string;
200
+ } | undefined;
201
+ expectedLatestVersionId?: string | undefined;
202
+ commitMessage?: string | undefined;
203
+ rowsRead?: number | undefined;
204
+ }[];
205
+ hasMore: boolean;
206
+ total: number;
207
+ };
208
+ 400: {
209
+ error: string;
210
+ };
211
+ 501: {
212
+ error: string;
213
+ };
214
+ 422: {
215
+ type: "validation";
216
+ on: string;
217
+ summary?: string;
218
+ message?: string;
219
+ found?: unknown;
220
+ property?: string;
221
+ expected?: string;
222
+ };
223
+ };
224
+ };
225
+ };
226
+ };
227
+ } & {
228
+ api: {
229
+ syncs: {
230
+ ":syncId": {
231
+ runs: {
232
+ post: {
233
+ body: {
234
+ expectedLatestVersionId?: string | undefined;
235
+ commitMessage?: string | undefined;
236
+ };
237
+ params: {
238
+ syncId: string;
239
+ };
240
+ query: unknown;
241
+ headers: unknown;
242
+ response: {
243
+ 200: {
244
+ error: string;
245
+ } | {
246
+ runId: string;
247
+ jobId: string;
248
+ syncId: string;
249
+ queuedAt: string;
250
+ };
251
+ 403: {
252
+ error: string;
253
+ };
254
+ 400: {
255
+ error: string;
256
+ };
257
+ 404: {
258
+ error: string;
259
+ };
260
+ 202: {
261
+ runId: string;
262
+ queuedAt: string;
263
+ jobId: string;
264
+ syncId: string;
265
+ };
266
+ 422: {
267
+ type: "validation";
268
+ on: string;
269
+ summary?: string;
270
+ message?: string;
271
+ found?: unknown;
272
+ property?: string;
273
+ expected?: string;
274
+ };
275
+ };
276
+ };
277
+ };
278
+ };
279
+ };
280
+ };
281
+ }, {
282
+ derive: {};
283
+ resolve: {};
284
+ schema: {};
285
+ standaloneSchema: {};
286
+ response: {};
287
+ }, {
288
+ derive: {};
289
+ resolve: {};
290
+ schema: {};
291
+ standaloneSchema: {};
292
+ response: {};
293
+ }>;
294
+ //# sourceMappingURL=syncs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncs.d.ts","sourceRoot":"","sources":["../../src/routes/syncs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAEtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAgGpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgJpF"}