@sixb/server 0.1.7 → 0.1.8

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 (66) hide show
  1. package/dist/auth/access-token-boundary.d.ts +3 -0
  2. package/dist/auth/access-token-boundary.d.ts.map +1 -1
  3. package/dist/auth/public-routes.d.ts.map +1 -1
  4. package/dist/auth/shared-access.d.ts +66 -0
  5. package/dist/auth/shared-access.d.ts.map +1 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1419 -627
  9. package/dist/index.js.map +19 -14
  10. package/dist/openapi/security.d.ts +15 -1
  11. package/dist/openapi/security.d.ts.map +1 -1
  12. package/dist/openapi/tags.d.ts +6 -2
  13. package/dist/openapi/tags.d.ts.map +1 -1
  14. package/dist/registerRoutes.d.ts +2 -0
  15. package/dist/registerRoutes.d.ts.map +1 -1
  16. package/dist/routes/actions.d.ts.map +1 -1
  17. package/dist/routes/agents.d.ts +5 -5
  18. package/dist/routes/auth.d.ts +9 -9
  19. package/dist/routes/connector-connection-runs.d.ts +8 -8
  20. package/dist/routes/connector-connections.d.ts +4 -4
  21. package/dist/routes/datasets.d.ts +5 -3
  22. package/dist/routes/datasets.d.ts.map +1 -1
  23. package/dist/routes/logs.d.ts +1 -1
  24. package/dist/routes/pipelines.d.ts +4 -0
  25. package/dist/routes/pipelines.d.ts.map +1 -1
  26. package/dist/routes/share-grants.d.ts +264 -0
  27. package/dist/routes/share-grants.d.ts.map +1 -0
  28. package/dist/routes/shared-access.d.ts +155 -0
  29. package/dist/routes/shared-access.d.ts.map +1 -0
  30. package/dist/routes/syncs.d.ts +2 -0
  31. package/dist/routes/syncs.d.ts.map +1 -1
  32. package/dist/routes/workflows.d.ts +1 -1
  33. package/dist/schemas/agents.d.ts +22 -30
  34. package/dist/schemas/agents.d.ts.map +1 -1
  35. package/dist/schemas/auth.d.ts +40 -40
  36. package/dist/schemas/datasets.d.ts +28 -22
  37. package/dist/schemas/datasets.d.ts.map +1 -1
  38. package/dist/schemas/logs.d.ts +6 -6
  39. package/dist/schemas/pipelines.d.ts +36 -0
  40. package/dist/schemas/pipelines.d.ts.map +1 -1
  41. package/dist/schemas/share-grants.d.ts +518 -0
  42. package/dist/schemas/share-grants.d.ts.map +1 -0
  43. package/dist/schemas/shared-access.d.ts +42 -0
  44. package/dist/schemas/shared-access.d.ts.map +1 -0
  45. package/dist/schemas/syncs.d.ts +7 -0
  46. package/dist/schemas/syncs.d.ts.map +1 -1
  47. package/dist/schemas/workflows.d.ts +4 -4
  48. package/dist/server.d.ts +5 -0
  49. package/dist/server.d.ts.map +1 -1
  50. package/package.json +4 -4
  51. package/src/auth/access-token-boundary.ts +17 -2
  52. package/src/auth/public-routes.ts +5 -0
  53. package/src/auth/shared-access.ts +376 -0
  54. package/src/index.ts +1 -0
  55. package/src/openapi/security.ts +20 -1
  56. package/src/openapi/tags.ts +4 -0
  57. package/src/registerRoutes.ts +6 -0
  58. package/src/routes/actions.ts +5 -10
  59. package/src/routes/agent-api-gateway.ts +1 -1
  60. package/src/routes/share-grants.ts +238 -0
  61. package/src/routes/shared-access.ts +165 -0
  62. package/src/schemas/agents.ts +1 -4
  63. package/src/schemas/datasets.ts +2 -1
  64. package/src/schemas/share-grants.ts +109 -0
  65. package/src/schemas/shared-access.ts +31 -0
  66. package/src/server.ts +91 -1
@@ -0,0 +1,264 @@
1
+ import { type SixbHostView } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerShareGrantRoutes(app: Elysia, _host: SixbHostView): 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
+ "share-grants": {
21
+ post: {
22
+ body: {
23
+ expiresAt: string;
24
+ target: {
25
+ objectTypeId: string;
26
+ primaryId: string;
27
+ };
28
+ definitionId: string;
29
+ destinationPath: string;
30
+ };
31
+ params: {};
32
+ query: unknown;
33
+ headers: unknown;
34
+ response: {
35
+ 200: {
36
+ url: string;
37
+ grant: {
38
+ id: string;
39
+ expiresAt: string;
40
+ createdAt: string;
41
+ target: {
42
+ objectTypeId: string;
43
+ primaryId: string;
44
+ };
45
+ definitionId: string;
46
+ issuedBy: {
47
+ id: string;
48
+ type: "user" | "serviceAccount";
49
+ };
50
+ destinationPath: string;
51
+ revokedAt?: string | undefined;
52
+ revokedBy?: {
53
+ id: string;
54
+ type: "user" | "serviceAccount" | "system";
55
+ } | undefined;
56
+ };
57
+ } | {
58
+ error: string;
59
+ };
60
+ 404: {
61
+ error: string;
62
+ };
63
+ 401: {
64
+ error: string;
65
+ };
66
+ 403: {
67
+ error: string;
68
+ };
69
+ 400: {
70
+ error: string;
71
+ };
72
+ 501: {
73
+ error: string;
74
+ };
75
+ 500: {
76
+ error: string;
77
+ };
78
+ 201: {
79
+ url: string;
80
+ grant: {
81
+ id: string;
82
+ expiresAt: string;
83
+ createdAt: string;
84
+ target: {
85
+ objectTypeId: string;
86
+ primaryId: string;
87
+ };
88
+ definitionId: string;
89
+ issuedBy: {
90
+ id: string;
91
+ type: "user" | "serviceAccount";
92
+ };
93
+ destinationPath: string;
94
+ revokedAt?: string | undefined;
95
+ revokedBy?: {
96
+ id: string;
97
+ type: "user" | "serviceAccount" | "system";
98
+ } | undefined;
99
+ };
100
+ };
101
+ 422: {
102
+ type: "validation";
103
+ on: string;
104
+ summary?: string;
105
+ message?: string;
106
+ found?: unknown;
107
+ property?: string;
108
+ expected?: string;
109
+ };
110
+ };
111
+ };
112
+ };
113
+ };
114
+ } & {
115
+ api: {
116
+ "share-grants": {
117
+ get: {
118
+ body: unknown;
119
+ params: {};
120
+ query: {
121
+ definitionId: string;
122
+ primaryId?: string | undefined;
123
+ limit?: number | undefined;
124
+ offset?: number | undefined;
125
+ includeRevoked?: boolean | undefined;
126
+ includeExpired?: boolean | undefined;
127
+ };
128
+ headers: unknown;
129
+ response: {
130
+ 200: {
131
+ hasMore: boolean;
132
+ total: number;
133
+ grants: {
134
+ id: string;
135
+ expiresAt: string;
136
+ createdAt: string;
137
+ target: {
138
+ objectTypeId: string;
139
+ primaryId: string;
140
+ };
141
+ definitionId: string;
142
+ issuedBy: {
143
+ id: string;
144
+ type: "user" | "serviceAccount";
145
+ };
146
+ destinationPath: string;
147
+ revokedAt?: string | undefined;
148
+ revokedBy?: {
149
+ id: string;
150
+ type: "user" | "serviceAccount" | "system";
151
+ } | undefined;
152
+ }[];
153
+ };
154
+ 404: {
155
+ error: string;
156
+ };
157
+ 401: {
158
+ error: string;
159
+ };
160
+ 403: {
161
+ error: string;
162
+ };
163
+ 400: {
164
+ error: string;
165
+ };
166
+ 501: {
167
+ error: string;
168
+ };
169
+ 500: {
170
+ error: string;
171
+ };
172
+ 422: {
173
+ type: "validation";
174
+ on: string;
175
+ summary?: string;
176
+ message?: string;
177
+ found?: unknown;
178
+ property?: string;
179
+ expected?: string;
180
+ };
181
+ };
182
+ };
183
+ };
184
+ };
185
+ } & {
186
+ api: {
187
+ "share-grants": {
188
+ ":grantId": {
189
+ delete: {
190
+ body: unknown;
191
+ params: {
192
+ grantId: string;
193
+ };
194
+ query: unknown;
195
+ headers: unknown;
196
+ response: {
197
+ 200: {
198
+ grant: {
199
+ id: string;
200
+ expiresAt: string;
201
+ createdAt: string;
202
+ target: {
203
+ objectTypeId: string;
204
+ primaryId: string;
205
+ };
206
+ definitionId: string;
207
+ issuedBy: {
208
+ id: string;
209
+ type: "user" | "serviceAccount";
210
+ };
211
+ destinationPath: string;
212
+ revokedAt?: string | undefined;
213
+ revokedBy?: {
214
+ id: string;
215
+ type: "user" | "serviceAccount" | "system";
216
+ } | undefined;
217
+ };
218
+ };
219
+ 404: {
220
+ error: string;
221
+ };
222
+ 401: {
223
+ error: string;
224
+ };
225
+ 403: {
226
+ error: string;
227
+ };
228
+ 400: {
229
+ error: string;
230
+ };
231
+ 501: {
232
+ error: string;
233
+ };
234
+ 500: {
235
+ error: string;
236
+ };
237
+ 422: {
238
+ type: "validation";
239
+ on: string;
240
+ summary?: string;
241
+ message?: string;
242
+ found?: unknown;
243
+ property?: string;
244
+ expected?: string;
245
+ };
246
+ };
247
+ };
248
+ };
249
+ };
250
+ };
251
+ }, {
252
+ derive: {};
253
+ resolve: {};
254
+ schema: {};
255
+ standaloneSchema: {};
256
+ response: {};
257
+ }, {
258
+ derive: {};
259
+ resolve: {};
260
+ schema: {};
261
+ standaloneSchema: {};
262
+ response: {};
263
+ }>;
264
+ //# sourceMappingURL=share-grants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-grants.d.ts","sourceRoot":"","sources":["../../src/routes/share-grants.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAmBpC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAuJ7D,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAvBjB"}
@@ -0,0 +1,155 @@
1
+ import type { Elysia } from "elysia";
2
+ import { type SharedAccessBoundary } from "../auth/shared-access";
3
+ export declare function registerSharedAccessRoutes(app: Elysia, boundary: SharedAccessBoundary): 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
+ "shared-access": {
21
+ ":grantId": {
22
+ exchange: {
23
+ post: {
24
+ body: {
25
+ secret: string;
26
+ };
27
+ params: {
28
+ grantId: string;
29
+ };
30
+ query: unknown;
31
+ headers: unknown;
32
+ response: {
33
+ 200: {
34
+ grantId: string;
35
+ csrfToken: string;
36
+ expiresAt: string;
37
+ destinationPath: string;
38
+ absoluteExpiresAt: string;
39
+ };
40
+ 401: {
41
+ error: string;
42
+ };
43
+ 503: {
44
+ error: string;
45
+ };
46
+ 422: {
47
+ type: "validation";
48
+ on: string;
49
+ summary?: string;
50
+ message?: string;
51
+ found?: unknown;
52
+ property?: string;
53
+ expected?: string;
54
+ };
55
+ };
56
+ };
57
+ };
58
+ };
59
+ };
60
+ };
61
+ } & {
62
+ api: {
63
+ "shared-access": {
64
+ ":grantId": {
65
+ session: {
66
+ get: {
67
+ body: unknown;
68
+ params: {
69
+ grantId: string;
70
+ };
71
+ query: unknown;
72
+ headers: unknown;
73
+ response: {
74
+ 200: {
75
+ grantId: string;
76
+ csrfToken: string;
77
+ expiresAt: string;
78
+ destinationPath: string;
79
+ absoluteExpiresAt: string;
80
+ };
81
+ 401: {
82
+ error: string;
83
+ };
84
+ 503: {
85
+ error: string;
86
+ };
87
+ 422: {
88
+ type: "validation";
89
+ on: string;
90
+ summary?: string;
91
+ message?: string;
92
+ found?: unknown;
93
+ property?: string;
94
+ expected?: string;
95
+ };
96
+ };
97
+ };
98
+ };
99
+ };
100
+ };
101
+ };
102
+ } & {
103
+ api: {
104
+ "shared-access": {
105
+ ":grantId": {
106
+ "sign-out": {
107
+ post: {
108
+ body: unknown;
109
+ params: {
110
+ grantId: string;
111
+ };
112
+ query: unknown;
113
+ headers: unknown;
114
+ response: {
115
+ 200: {
116
+ signedOut: true;
117
+ };
118
+ 401: {
119
+ error: string;
120
+ };
121
+ 403: {
122
+ error: string;
123
+ };
124
+ 503: {
125
+ error: string;
126
+ };
127
+ 422: {
128
+ type: "validation";
129
+ on: string;
130
+ summary?: string;
131
+ message?: string;
132
+ found?: unknown;
133
+ property?: string;
134
+ expected?: string;
135
+ };
136
+ };
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ }, {
143
+ derive: {};
144
+ resolve: {};
145
+ schema: {};
146
+ standaloneSchema: {};
147
+ response: {};
148
+ }, {
149
+ derive: {};
150
+ resolve: {};
151
+ schema: {};
152
+ standaloneSchema: {};
153
+ response: {};
154
+ }>;
155
+ //# sourceMappingURL=shared-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-access.d.ts","sourceRoot":"","sources":["../../src/routes/shared-access.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EACL,KAAK,oBAAoB,EAK1B,MAAM,uBAAuB,CAAA;AAW9B,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkGrF"}
@@ -40,6 +40,7 @@ export declare function registerSyncRoutes(app: Elysia, host: SixbHostView): Ely
40
40
  };
41
41
  description?: string | undefined;
42
42
  primaryKey?: string | string[] | undefined;
43
+ sequenceBy?: string | undefined;
43
44
  partitionBy?: string[] | undefined;
44
45
  };
45
46
  };
@@ -112,6 +113,7 @@ export declare function registerSyncRoutes(app: Elysia, host: SixbHostView): Ely
112
113
  };
113
114
  description?: string | undefined;
114
115
  primaryKey?: string | string[] | undefined;
116
+ sequenceBy?: string | undefined;
115
117
  partitionBy?: string[] | undefined;
116
118
  };
117
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"syncs.d.ts","sourceRoot":"","sources":["../../src/routes/syncs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAqFpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIjE"}
1
+ {"version":3,"file":"syncs.d.ts","sourceRoot":"","sources":["../../src/routes/syncs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAqFpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIjE"}
@@ -669,7 +669,6 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
669
669
  diagnostics?: import("../schemas/common").JsonValue[] | undefined;
670
670
  trace?: ({
671
671
  origin: "ambient" | "explicit";
672
- type: "context";
673
672
  context: {
674
673
  kind: "object";
675
674
  ref: {
@@ -683,6 +682,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
683
682
  value: import("../schemas/common").JsonValue;
684
683
  label: string;
685
684
  };
685
+ type: "context";
686
686
  } | {
687
687
  type: "text";
688
688
  text: string;