@sixb/server 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +38 -8
- package/dist/index.js.map +6 -6
- package/dist/routes/actions.d.ts +2 -1
- package/dist/routes/actions.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +5 -0
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/schemas/actions.d.ts +92 -0
- package/dist/schemas/actions.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +47 -0
- package/dist/schemas/auth.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/routes/actions.ts +18 -3
- package/src/routes/auth.ts +17 -1
- package/src/schemas/actions.ts +5 -0
- package/src/schemas/auth.ts +7 -0
package/dist/routes/actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { Elysia } from "elysia";
|
|
3
|
-
export declare function registerActionRoutes(app: Elysia,
|
|
3
|
+
export declare function registerActionRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -88,6 +88,7 @@ export declare function registerActionRoutes(app: Elysia, _host: SixbHostView):
|
|
|
88
88
|
edits: boolean;
|
|
89
89
|
effects: boolean;
|
|
90
90
|
};
|
|
91
|
+
inputSchema: Record<string, unknown>;
|
|
91
92
|
description?: string | undefined;
|
|
92
93
|
objectTypeId?: string | undefined;
|
|
93
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/routes/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/routes/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAqDpC,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EnE"}
|
package/dist/routes/auth.d.ts
CHANGED
|
@@ -829,6 +829,7 @@ export declare function registerAuthRoutes(app: Elysia, host: SixbHostView, opti
|
|
|
829
829
|
expiresAt?: string | undefined;
|
|
830
830
|
groupIds?: string[] | undefined;
|
|
831
831
|
destinationId?: "atlas" | "app" | undefined;
|
|
832
|
+
revealLink?: boolean | undefined;
|
|
832
833
|
};
|
|
833
834
|
params: {};
|
|
834
835
|
query: unknown;
|
|
@@ -864,6 +865,10 @@ export declare function registerAuthRoutes(app: Elysia, host: SixbHostView, opti
|
|
|
864
865
|
};
|
|
865
866
|
delivery: {
|
|
866
867
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
868
|
+
link?: {
|
|
869
|
+
url: string;
|
|
870
|
+
expiresAt?: string | undefined;
|
|
871
|
+
} | undefined;
|
|
867
872
|
};
|
|
868
873
|
};
|
|
869
874
|
422: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwC,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwC,YAAY,EAAE,MAAM,YAAY,CAAA;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAq1C7F"}
|
|
@@ -179,6 +179,98 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
|
|
|
179
179
|
description?: string | undefined;
|
|
180
180
|
objectTypeId?: string | undefined;
|
|
181
181
|
}>;
|
|
182
|
+
export declare const ActionDetailSchema: z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
name: z.ZodString;
|
|
185
|
+
description: z.ZodOptional<z.ZodString>;
|
|
186
|
+
objectTypeId: z.ZodOptional<z.ZodString>;
|
|
187
|
+
params: z.ZodArray<z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
name: z.ZodString;
|
|
190
|
+
description: z.ZodOptional<z.ZodString>;
|
|
191
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
nullable: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
semanticType: z.ZodOptional<z.ZodString>;
|
|
194
|
+
schema: z.ZodUnknown;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
description?: string | undefined;
|
|
199
|
+
nullable?: boolean | undefined;
|
|
200
|
+
required?: boolean | undefined;
|
|
201
|
+
semanticType?: string | undefined;
|
|
202
|
+
schema?: unknown;
|
|
203
|
+
}, {
|
|
204
|
+
id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
description?: string | undefined;
|
|
207
|
+
nullable?: boolean | undefined;
|
|
208
|
+
required?: boolean | undefined;
|
|
209
|
+
semanticType?: string | undefined;
|
|
210
|
+
schema?: unknown;
|
|
211
|
+
}>, "many">;
|
|
212
|
+
phases: z.ZodObject<{
|
|
213
|
+
validate: z.ZodBoolean;
|
|
214
|
+
writeback: z.ZodBoolean;
|
|
215
|
+
edits: z.ZodBoolean;
|
|
216
|
+
effects: z.ZodBoolean;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
validate: boolean;
|
|
219
|
+
writeback: boolean;
|
|
220
|
+
edits: boolean;
|
|
221
|
+
effects: boolean;
|
|
222
|
+
}, {
|
|
223
|
+
validate: boolean;
|
|
224
|
+
writeback: boolean;
|
|
225
|
+
edits: boolean;
|
|
226
|
+
effects: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
} & {
|
|
229
|
+
/** Strict JSON Schema for the params object accepted by an Action request. */
|
|
230
|
+
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
id: string;
|
|
233
|
+
name: string;
|
|
234
|
+
params: {
|
|
235
|
+
id: string;
|
|
236
|
+
name: string;
|
|
237
|
+
description?: string | undefined;
|
|
238
|
+
nullable?: boolean | undefined;
|
|
239
|
+
required?: boolean | undefined;
|
|
240
|
+
semanticType?: string | undefined;
|
|
241
|
+
schema?: unknown;
|
|
242
|
+
}[];
|
|
243
|
+
phases: {
|
|
244
|
+
validate: boolean;
|
|
245
|
+
writeback: boolean;
|
|
246
|
+
edits: boolean;
|
|
247
|
+
effects: boolean;
|
|
248
|
+
};
|
|
249
|
+
inputSchema: Record<string, unknown>;
|
|
250
|
+
description?: string | undefined;
|
|
251
|
+
objectTypeId?: string | undefined;
|
|
252
|
+
}, {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
params: {
|
|
256
|
+
id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
description?: string | undefined;
|
|
259
|
+
nullable?: boolean | undefined;
|
|
260
|
+
required?: boolean | undefined;
|
|
261
|
+
semanticType?: string | undefined;
|
|
262
|
+
schema?: unknown;
|
|
263
|
+
}[];
|
|
264
|
+
phases: {
|
|
265
|
+
validate: boolean;
|
|
266
|
+
writeback: boolean;
|
|
267
|
+
edits: boolean;
|
|
268
|
+
effects: boolean;
|
|
269
|
+
};
|
|
270
|
+
inputSchema: Record<string, unknown>;
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
objectTypeId?: string | undefined;
|
|
273
|
+
}>;
|
|
182
274
|
export declare const ActionRunStatusSchema: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled"]>;
|
|
183
275
|
export declare const ActionRunPhaseSchema: z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>;
|
|
184
276
|
export declare const ActionRunsQuerySchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/schemas/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAS9B,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAKtC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlC,CAAA;AAEF,eAAO,MAAM,qBAAqB,sEAMhC,CAAA;AAEF,eAAO,MAAM,oBAAoB,yGAA4B,CAAA;AAE7D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAA;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAQ7D,CAAA;AAsBF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjC,CAAA;AA2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M,oBAAoB,yGAA4B,CAAA;AAE7D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAA;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAQ7D,CAAA;AAsBF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWjC,CAAA;AA2BF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAItC,CAAA"}
|
package/dist/schemas/auth.d.ts
CHANGED
|
@@ -46,10 +46,28 @@ export declare const AuthInvitationSchema: z.ZodObject<{
|
|
|
46
46
|
}>;
|
|
47
47
|
export declare const AuthInvitationDeliverySchema: z.ZodObject<{
|
|
48
48
|
status: z.ZodEnum<["sent", "skipped", "rate_limited", "not_supported"]>;
|
|
49
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
url: z.ZodString;
|
|
51
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
url: string;
|
|
54
|
+
expiresAt?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
url: string;
|
|
57
|
+
expiresAt?: string | undefined;
|
|
58
|
+
}>>;
|
|
49
59
|
}, "strip", z.ZodTypeAny, {
|
|
50
60
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
61
|
+
link?: {
|
|
62
|
+
url: string;
|
|
63
|
+
expiresAt?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
51
65
|
}, {
|
|
52
66
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
67
|
+
link?: {
|
|
68
|
+
url: string;
|
|
69
|
+
expiresAt?: string | undefined;
|
|
70
|
+
} | undefined;
|
|
53
71
|
}>;
|
|
54
72
|
export declare const AuthInvitationGroupOptionSchema: z.ZodObject<{
|
|
55
73
|
id: z.ZodString;
|
|
@@ -1595,18 +1613,21 @@ export declare const CreateAuthInvitationBodySchema: z.ZodObject<{
|
|
|
1595
1613
|
destinationId: z.ZodOptional<z.ZodEnum<["atlas", "app"]>>;
|
|
1596
1614
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
1597
1615
|
returnTo: z.ZodOptional<z.ZodString>;
|
|
1616
|
+
revealLink: z.ZodOptional<z.ZodBoolean>;
|
|
1598
1617
|
}, "strip", z.ZodTypeAny, {
|
|
1599
1618
|
email: string;
|
|
1600
1619
|
returnTo?: string | undefined;
|
|
1601
1620
|
expiresAt?: string | undefined;
|
|
1602
1621
|
groupIds?: string[] | undefined;
|
|
1603
1622
|
destinationId?: "atlas" | "app" | undefined;
|
|
1623
|
+
revealLink?: boolean | undefined;
|
|
1604
1624
|
}, {
|
|
1605
1625
|
email: string;
|
|
1606
1626
|
returnTo?: string | undefined;
|
|
1607
1627
|
expiresAt?: string | undefined;
|
|
1608
1628
|
groupIds?: string[] | undefined;
|
|
1609
1629
|
destinationId?: "atlas" | "app" | undefined;
|
|
1630
|
+
revealLink?: boolean | undefined;
|
|
1610
1631
|
}>;
|
|
1611
1632
|
export declare const CreateAuthInvitationResponseSchema: z.ZodObject<{
|
|
1612
1633
|
invitation: z.ZodObject<{
|
|
@@ -1642,10 +1663,28 @@ export declare const CreateAuthInvitationResponseSchema: z.ZodObject<{
|
|
|
1642
1663
|
}>;
|
|
1643
1664
|
delivery: z.ZodObject<{
|
|
1644
1665
|
status: z.ZodEnum<["sent", "skipped", "rate_limited", "not_supported"]>;
|
|
1666
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
1667
|
+
url: z.ZodString;
|
|
1668
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
url: string;
|
|
1671
|
+
expiresAt?: string | undefined;
|
|
1672
|
+
}, {
|
|
1673
|
+
url: string;
|
|
1674
|
+
expiresAt?: string | undefined;
|
|
1675
|
+
}>>;
|
|
1645
1676
|
}, "strip", z.ZodTypeAny, {
|
|
1646
1677
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
1678
|
+
link?: {
|
|
1679
|
+
url: string;
|
|
1680
|
+
expiresAt?: string | undefined;
|
|
1681
|
+
} | undefined;
|
|
1647
1682
|
}, {
|
|
1648
1683
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
1684
|
+
link?: {
|
|
1685
|
+
url: string;
|
|
1686
|
+
expiresAt?: string | undefined;
|
|
1687
|
+
} | undefined;
|
|
1649
1688
|
}>;
|
|
1650
1689
|
}, "strip", z.ZodTypeAny, {
|
|
1651
1690
|
invitation: {
|
|
@@ -1661,6 +1700,10 @@ export declare const CreateAuthInvitationResponseSchema: z.ZodObject<{
|
|
|
1661
1700
|
};
|
|
1662
1701
|
delivery: {
|
|
1663
1702
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
1703
|
+
link?: {
|
|
1704
|
+
url: string;
|
|
1705
|
+
expiresAt?: string | undefined;
|
|
1706
|
+
} | undefined;
|
|
1664
1707
|
};
|
|
1665
1708
|
}, {
|
|
1666
1709
|
invitation: {
|
|
@@ -1676,6 +1719,10 @@ export declare const CreateAuthInvitationResponseSchema: z.ZodObject<{
|
|
|
1676
1719
|
};
|
|
1677
1720
|
delivery: {
|
|
1678
1721
|
status: "sent" | "skipped" | "rate_limited" | "not_supported";
|
|
1722
|
+
link?: {
|
|
1723
|
+
url: string;
|
|
1724
|
+
expiresAt?: string | undefined;
|
|
1725
|
+
} | undefined;
|
|
1679
1726
|
};
|
|
1680
1727
|
}>;
|
|
1681
1728
|
export declare const ListAuthInvitationsQuerySchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,0BAA0B,+CAA6C,CAAA;AAEpF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU/B,CAAA;AAEF,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,0BAA0B,+CAA6C,CAAA;AAEpF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU/B,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;EAQvC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;EAAwB,CAAA;AAEpE,eAAO,MAAM,yBAAyB,2CAAyC,CAAA;AAC/E,eAAO,MAAM,gCAAgC,uCAAqC,CAAA;AAClF,eAAO,MAAM,2BAA2B,6CAA2C,CAAA;AACnF,eAAO,MAAM,8BAA8B,oCAAkC,CAAA;AAC7E,eAAO,MAAM,oBAAoB,oCAAkC,CAAA;AAEnE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAehC,CAAA;AAEF,eAAO,MAAM,wBA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AAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEzC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;EAE1C,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;EAGnC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "HTTP and WebSocket API server for Sixb",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"zod-to-json-schema": "^3.24.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@sixb/core": "0.1.
|
|
40
|
+
"@sixb/core": "0.1.6"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@sixb/auth-magic-link": "0.1.
|
|
44
|
-
"@sixb/auth-oidc": "0.1.
|
|
45
|
-
"@sixb/core": "0.1.
|
|
46
|
-
"@sixb/sqlite": "0.1.
|
|
43
|
+
"@sixb/auth-magic-link": "0.1.3",
|
|
44
|
+
"@sixb/auth-oidc": "0.1.2",
|
|
45
|
+
"@sixb/core": "0.1.6",
|
|
46
|
+
"@sixb/sqlite": "0.1.6",
|
|
47
47
|
"@types/bun": "latest",
|
|
48
48
|
"typescript": "^5.7.0"
|
|
49
49
|
},
|
package/src/routes/actions.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ActionDefinition, SixbHostView } from "@sixb/core"
|
|
2
|
+
import { schemaFieldsToJsonSchema } from "@sixb/core/internal/ontology"
|
|
2
3
|
import type { Elysia } from "elysia"
|
|
3
4
|
import { bearerSecurityRequirement } from "../auth/access-token-boundary"
|
|
4
5
|
import { requireRequestSixb } from "../auth/scope"
|
|
5
6
|
import { OPENAPI_TAGS } from "../openapi/tags"
|
|
6
7
|
import {
|
|
7
8
|
ActionCatalogItemSchema,
|
|
9
|
+
ActionDetailSchema,
|
|
8
10
|
ActionIdParamsSchema,
|
|
9
11
|
RequestActionBodySchema,
|
|
10
12
|
RequestActionResponseSchema,
|
|
@@ -38,7 +40,20 @@ function serializeAction(
|
|
|
38
40
|
})
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
function serializeActionDetail(
|
|
44
|
+
action: ActionDefinition,
|
|
45
|
+
host: SixbHostView
|
|
46
|
+
): ReturnType<typeof ActionDetailSchema.parse> {
|
|
47
|
+
return ActionDetailSchema.parse({
|
|
48
|
+
...serializeAction(action),
|
|
49
|
+
inputSchema: schemaFieldsToJsonSchema({
|
|
50
|
+
fields: action.params,
|
|
51
|
+
valueTypesById: host.definitions.ontology.getValueTypesById(),
|
|
52
|
+
}),
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function registerActionRoutes(app: Elysia, host: SixbHostView) {
|
|
42
57
|
return app
|
|
43
58
|
.get(
|
|
44
59
|
"/api/actions",
|
|
@@ -66,11 +81,11 @@ export function registerActionRoutes(app: Elysia, _host: SixbHostView) {
|
|
|
66
81
|
return { error: "Action not found" }
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
return
|
|
84
|
+
return serializeActionDetail(action, host)
|
|
70
85
|
},
|
|
71
86
|
{
|
|
72
87
|
params: ActionIdParamsSchema,
|
|
73
|
-
response: { 200:
|
|
88
|
+
response: { 200: ActionDetailSchema, 404: ErrorResponseSchema },
|
|
74
89
|
detail: {
|
|
75
90
|
summary: "Get action metadata",
|
|
76
91
|
tags: [OPENAPI_TAGS.actions.name],
|
package/src/routes/auth.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
createSessionCredential,
|
|
12
12
|
generateCsrfToken,
|
|
13
13
|
getCookie,
|
|
14
|
+
type InviteDeliveryResult,
|
|
14
15
|
isMagicLinkAuthStrategy,
|
|
15
16
|
isOidcAuthStrategy,
|
|
16
17
|
type MagicLinkAuthStrategy,
|
|
@@ -901,6 +902,7 @@ export function registerAuthRoutes(app: Elysia, host: SixbHostView, options: Aut
|
|
|
901
902
|
groupIds: parsed.groupIds,
|
|
902
903
|
expiresAt: parseDate(parsed.expiresAt),
|
|
903
904
|
returnTo: deliveryContext.returnTo,
|
|
905
|
+
revealLink: parsed.revealLink,
|
|
904
906
|
},
|
|
905
907
|
{
|
|
906
908
|
...authOptions,
|
|
@@ -915,7 +917,7 @@ export function registerAuthRoutes(app: Elysia, host: SixbHostView, options: Aut
|
|
|
915
917
|
return jsonResponse(
|
|
916
918
|
{
|
|
917
919
|
invitation: serializeInvitation(result.invitation),
|
|
918
|
-
delivery: result.delivery,
|
|
920
|
+
delivery: serializeInvitationDelivery(result.delivery),
|
|
919
921
|
},
|
|
920
922
|
201
|
|
921
923
|
)
|
|
@@ -2277,6 +2279,20 @@ function serializeInvitation(invitation: InvitationRecord) {
|
|
|
2277
2279
|
}
|
|
2278
2280
|
}
|
|
2279
2281
|
|
|
2282
|
+
function serializeInvitationDelivery(delivery: InviteDeliveryResult) {
|
|
2283
|
+
return {
|
|
2284
|
+
status: delivery.status,
|
|
2285
|
+
...(delivery.link
|
|
2286
|
+
? {
|
|
2287
|
+
link: {
|
|
2288
|
+
url: delivery.link.url,
|
|
2289
|
+
expiresAt: delivery.link.expiresAt ? toIsoString(delivery.link.expiresAt) : undefined,
|
|
2290
|
+
},
|
|
2291
|
+
}
|
|
2292
|
+
: {}),
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2280
2296
|
function serializeMemberSummary(member: MemberSummary) {
|
|
2281
2297
|
return {
|
|
2282
2298
|
...serializeManagedMember(member.user, member.groupIds),
|
package/src/schemas/actions.ts
CHANGED
|
@@ -53,6 +53,11 @@ export const ActionCatalogItemSchema = z.object({
|
|
|
53
53
|
}),
|
|
54
54
|
})
|
|
55
55
|
|
|
56
|
+
export const ActionDetailSchema = ActionCatalogItemSchema.extend({
|
|
57
|
+
/** Strict JSON Schema for the params object accepted by an Action request. */
|
|
58
|
+
inputSchema: z.record(z.unknown()),
|
|
59
|
+
})
|
|
60
|
+
|
|
56
61
|
export const ActionRunStatusSchema = z.enum([
|
|
57
62
|
"queued",
|
|
58
63
|
"running",
|
package/src/schemas/auth.ts
CHANGED
|
@@ -22,6 +22,12 @@ export const AuthInvitationSchema = z.object({
|
|
|
22
22
|
|
|
23
23
|
export const AuthInvitationDeliverySchema = z.object({
|
|
24
24
|
status: z.enum(["sent", "skipped", "rate_limited", "not_supported"]),
|
|
25
|
+
link: z
|
|
26
|
+
.object({
|
|
27
|
+
url: z.string().url(),
|
|
28
|
+
expiresAt: z.string().optional(),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
25
31
|
})
|
|
26
32
|
|
|
27
33
|
export const AuthInvitationGroupOptionSchema = AuthGroupOptionSchema
|
|
@@ -230,6 +236,7 @@ export const CreateAuthInvitationBodySchema = z.object({
|
|
|
230
236
|
destinationId: z.enum(["atlas", "app"]).optional(),
|
|
231
237
|
expiresAt: z.string().optional(),
|
|
232
238
|
returnTo: z.string().optional(),
|
|
239
|
+
revealLink: z.boolean().optional(),
|
|
233
240
|
})
|
|
234
241
|
|
|
235
242
|
export const CreateAuthInvitationResponseSchema = z.object({
|