@agimon-ai/po-auth-server 0.0.0-stage → 0.0.2-alpha.0

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 (40) hide show
  1. package/LICENSE +149 -0
  2. package/README.md +267 -2
  3. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  4. package/dist/apiContracts.cjs +7 -0
  5. package/dist/apiContracts.d.mts +2 -0
  6. package/dist/apiContracts.mjs +1 -0
  7. package/dist/extensions/server.cjs +168 -0
  8. package/dist/extensions/server.d.mts +5 -0
  9. package/dist/extensions/server.mjs +161 -0
  10. package/dist/index.cjs +12 -0
  11. package/dist/index.d.mts +7 -0
  12. package/dist/index.mjs +6 -0
  13. package/dist/schemas/apiContracts.cjs +254 -0
  14. package/dist/schemas/apiContracts.d.mts +72 -0
  15. package/dist/schemas/apiContracts.mjs +253 -0
  16. package/dist/services/appleTokens/index.cjs +68 -0
  17. package/dist/services/appleTokens/index.d.mts +16 -0
  18. package/dist/services/appleTokens/index.mjs +68 -0
  19. package/dist/services/emailSender/index.cjs +23 -0
  20. package/dist/services/emailSender/index.d.mts +20 -0
  21. package/dist/services/emailSender/index.mjs +23 -0
  22. package/dist/services/identityConfiguration/index.cjs +52 -0
  23. package/dist/services/identityConfiguration/index.d.mts +42 -0
  24. package/dist/services/identityConfiguration/index.mjs +52 -0
  25. package/dist/services/identityHome/globalTier.cjs +126 -0
  26. package/dist/services/identityHome/globalTier.d.mts +13 -0
  27. package/dist/services/identityHome/globalTier.mjs +124 -0
  28. package/dist/services/identityHome/hostedSignIn.cjs +211 -0
  29. package/dist/services/identityHome/hostedSignIn.mjs +209 -0
  30. package/dist/services/identityHome/index.cjs +1441 -0
  31. package/dist/services/identityHome/index.d.mts +167 -0
  32. package/dist/services/identityHome/index.mjs +1441 -0
  33. package/dist/services/identityHome/roster.cjs +275 -0
  34. package/dist/services/identityHome/roster.mjs +273 -0
  35. package/dist/services/sharedSpace/index.cjs +34 -0
  36. package/dist/services/sharedSpace/index.mjs +31 -0
  37. package/dist/services/sqliteAdapter/index.cjs +139 -0
  38. package/dist/services/sqliteAdapter/index.d.mts +8 -0
  39. package/dist/services/sqliteAdapter/index.mjs +138 -0
  40. package/package.json +86 -3
@@ -0,0 +1,161 @@
1
+ import { createIdentityHome } from "../services/identityHome/index.mjs";
2
+ import { identityConfiguration } from "../services/identityConfiguration/index.mjs";
3
+ import { createSharedSpaceProvider, sharedSpaceRoot } from "../services/sharedSpace/index.mjs";
4
+ import path from "node:path";
5
+ import { PO_API_PEER_ADDRESS_HEADER } from "@agimon-ai/po-core/packageApi";
6
+ import { piAgentDirectory, poHomeDirectory } from "@agimon-ai/po-core/piSettings";
7
+ import { BACKGROUND_CONTEXT, PO_FS_SERVICE, PO_SPACE_SERVICE, PO_SQLITE_SERVICE, getOrThrow, readPoSpace, requirePoFs, requirePoSqlite } from "@agimon-ai/po-core/platform";
8
+ import { PO_HOST_TEAM_SERVICE, defineServerPlugin, readPoHostTeam } from "@agimon-ai/po-core/serverPlugin";
9
+ //#region src/extensions/server.ts
10
+ /** Only selected global compositions install an issuer. Pairing-only hosts keep the attach gate. */
11
+ const serverPlugin = defineServerPlugin({
12
+ name: "@agimon-ai/po-identity",
13
+ host: async (plugin) => {
14
+ const environment = plugin.host.context.environment;
15
+ if (!environment) throw new Error("Identity home requires an admitted server environment");
16
+ const configuration = identityConfiguration(environment);
17
+ let home;
18
+ let timer;
19
+ let recoveryTimer;
20
+ let started = false;
21
+ const spaceRoot = path.join(piAgentDirectory(environment, environment.HOME), "po-space");
22
+ const provider = plugin.context.inject([PO_SQLITE_SERVICE, PO_FS_SERVICE], async (context) => {
23
+ const homeDirectory = plugin.host.context.homeDirectory;
24
+ if (!homeDirectory) throw new Error("Identity home requires an admitted home directory");
25
+ const directory = poHomeDirectory(homeDirectory, environment);
26
+ const fs = requirePoFs(context);
27
+ getOrThrow(await fs.createDir(directory, { recursive: true }, BACKGROUND_CONTEXT));
28
+ home = await createIdentityHome({
29
+ ...configuration.config,
30
+ filename: path.join(directory, "identity.sqlite"),
31
+ clientAddress: {
32
+ header: PO_API_PEER_ADDRESS_HEADER,
33
+ trustedProxies: configuration.trustedProxies
34
+ }
35
+ }, {
36
+ sqlite: requirePoSqlite(context),
37
+ email: configuration.email,
38
+ reportOverduePurge: () => plugin.host.context.onNotice("Identity Cloud purge overdue; pending work will retry."),
39
+ purgePersonalOrg: async (org) => {
40
+ getOrThrow(await fs.remove(await sharedSpaceRoot(spaceRoot, org), {
41
+ recursive: true,
42
+ force: true
43
+ }, BACKGROUND_CONTEXT));
44
+ },
45
+ scheduleRecovery: async (dueAt) => {
46
+ if (recoveryTimer) clearTimeout(recoveryTimer);
47
+ recoveryTimer = void 0;
48
+ if (!started || dueAt === void 0) return;
49
+ recoveryTimer = setTimeout(() => {
50
+ home?.runDueRecovery().catch(() => plugin.host.context.onNotice("Identity recovery storage failed; pending work will retry."));
51
+ }, Math.max(0, Math.min(dueAt - Date.now(), 2147483647)));
52
+ }
53
+ });
54
+ return async () => {
55
+ await home?.close();
56
+ home = void 0;
57
+ };
58
+ });
59
+ await provider.await();
60
+ if (!home) {
61
+ await provider.dispose();
62
+ throw new Error("Identity platform services unavailable");
63
+ }
64
+ const shared = createSharedSpaceProvider({
65
+ issuer: configuration.config.issuer,
66
+ spaceRoot,
67
+ isMember: async (subject, org) => await home?.isOrgMember(subject, org) === true
68
+ });
69
+ const space = plugin.context.inject([PO_SPACE_SERVICE], (bound) => readPoSpace(bound)?.registerProvider(shared));
70
+ let teamChanged;
71
+ let audit;
72
+ const team = plugin.context.inject([PO_HOST_TEAM_SERVICE], (bound) => {
73
+ const host = readPoHostTeam(bound);
74
+ if (!host) return;
75
+ const undo = host.setSource({
76
+ issuer: configuration.config.issuer,
77
+ team: (owner) => home.ownedTeam(owner)
78
+ });
79
+ teamChanged = () => host.changed();
80
+ audit = (entry) => host.audit(entry);
81
+ return () => {
82
+ teamChanged = void 0;
83
+ audit = void 0;
84
+ undo();
85
+ };
86
+ });
87
+ /**
88
+ * The server stamps the socket peer. Behind trusted proxies the caller is further back, so the proxies' own
89
+ * forwarded chain goes in front of the peer; without any, a forwarded header is the caller's word and is dropped.
90
+ */
91
+ const answer = (request) => {
92
+ const forwarded = configuration.trustedProxies.length ? request.headers.get("x-forwarded-for") : null;
93
+ const peer = request.headers.get(PO_API_PEER_ADDRESS_HEADER);
94
+ if (!forwarded || !peer) return home.fetch(request);
95
+ const headers = new Headers(request.headers);
96
+ headers.set(PO_API_PEER_ADDRESS_HEADER, `${forwarded}, ${peer}`);
97
+ return home.fetch(new Request(request, { headers }));
98
+ };
99
+ const fetch = async (request) => {
100
+ if (request.method === "GET" || request.method === "HEAD") return answer(request);
101
+ const before = audit ? await home.signedIn(request.headers).catch(() => null) : null;
102
+ const response = await answer(request);
103
+ teamChanged?.();
104
+ audit?.({
105
+ ...before === null ? {} : { actor: {
106
+ issuer: configuration.config.issuer,
107
+ subject: before.userId,
108
+ org: before.org ?? ""
109
+ } },
110
+ action: request.method,
111
+ resource: new URL(request.url).pathname,
112
+ outcome: response.status < 400 ? "allowed" : response.status === 401 || response.status === 403 ? "denied" : "failed"
113
+ });
114
+ return response;
115
+ };
116
+ return {
117
+ api: [{
118
+ basePath: "auth",
119
+ publicRoutes: {
120
+ paths: ["/"],
121
+ authenticate: () => true
122
+ },
123
+ start: () => ({
124
+ fetch,
125
+ close() {}
126
+ })
127
+ }, {
128
+ basePath: "networks",
129
+ publicRoutes: {
130
+ paths: ["/"],
131
+ authenticate: () => true
132
+ },
133
+ start: () => ({
134
+ fetch,
135
+ close() {}
136
+ })
137
+ }],
138
+ onStart: async () => {
139
+ started = true;
140
+ await home.runDueRecovery();
141
+ timer = setInterval(() => {
142
+ home?.runDueRecovery().catch(() => plugin.host.context.onNotice("Identity outbox storage failed; pending work will retry."));
143
+ }, 6e4);
144
+ },
145
+ onStop: () => {
146
+ started = false;
147
+ if (recoveryTimer) clearTimeout(recoveryTimer);
148
+ recoveryTimer = void 0;
149
+ if (timer) clearInterval(timer);
150
+ timer = void 0;
151
+ },
152
+ onDispose: async () => {
153
+ await space.dispose();
154
+ await team.dispose();
155
+ await provider.dispose();
156
+ }
157
+ };
158
+ }
159
+ });
160
+ //#endregion
161
+ export { serverPlugin as default, serverPlugin };
package/dist/index.cjs ADDED
@@ -0,0 +1,12 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("./services/appleTokens/index.cjs");
3
+ const require_index$1 = require("./services/sqliteAdapter/index.cjs");
4
+ const require_index$2 = require("./services/identityHome/index.cjs");
5
+ const require_index$3 = require("./services/emailSender/index.cjs");
6
+ const require_index$4 = require("./services/identityConfiguration/index.cjs");
7
+ exports.appleTokenService = require_index.appleTokenService;
8
+ exports.createIdentityHome = require_index$2.createIdentityHome;
9
+ exports.identityConfiguration = require_index$4.identityConfiguration;
10
+ exports.openIdentity = require_index$1.openIdentity;
11
+ exports.poAdapter = require_index$1.poAdapter;
12
+ exports.unsendboxEmailSender = require_index$3.unsendboxEmailSender;
@@ -0,0 +1,7 @@
1
+ import { IdentityProvisioningApi, IdentityProvisioningItem, IdentityWorkspaceAllocation, PersonalOrgTrigger } from "./schemas/apiContracts.mjs";
2
+ import { AppleTokenConfig, appleTokenService } from "./services/appleTokens/index.mjs";
3
+ import { IdentityEmailSender, unsendboxEmailSender } from "./services/emailSender/index.mjs";
4
+ import { IdentityHomeConfig, IdentityHomePorts, createIdentityHome } from "./services/identityHome/index.mjs";
5
+ import { openIdentity, poAdapter } from "./services/sqliteAdapter/index.mjs";
6
+ import { IdentityEnvironment, identityConfiguration } from "./services/identityConfiguration/index.mjs";
7
+ export { type AppleTokenConfig, type IdentityEmailSender, type IdentityEnvironment, type IdentityHomeConfig, type IdentityHomePorts, type IdentityProvisioningApi, type IdentityProvisioningItem, type IdentityWorkspaceAllocation, type PersonalOrgTrigger, appleTokenService, createIdentityHome, identityConfiguration, openIdentity, poAdapter, unsendboxEmailSender };
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import { appleTokenService } from "./services/appleTokens/index.mjs";
2
+ import { openIdentity, poAdapter } from "./services/sqliteAdapter/index.mjs";
3
+ import { createIdentityHome } from "./services/identityHome/index.mjs";
4
+ import { unsendboxEmailSender } from "./services/emailSender/index.mjs";
5
+ import { identityConfiguration } from "./services/identityConfiguration/index.mjs";
6
+ export { appleTokenService, createIdentityHome, identityConfiguration, openIdentity, poAdapter, unsendboxEmailSender };
@@ -0,0 +1,254 @@
1
+ let _agimon_ai_po_core_apiContracts = require("@agimon-ai/po-core/apiContracts");
2
+ //#region src/schemas/apiContracts.ts
3
+ const proof = {
4
+ type: "object",
5
+ required: [
6
+ "deviceId",
7
+ "org",
8
+ "issuedAt",
9
+ "expiresAt",
10
+ "nonce",
11
+ "signature"
12
+ ],
13
+ properties: {
14
+ deviceId: { type: "string" },
15
+ org: { type: "string" },
16
+ issuedAt: { type: "integer" },
17
+ expiresAt: { type: "integer" },
18
+ nonce: { type: "string" },
19
+ signature: { type: "string" },
20
+ publicKey: { type: "string" },
21
+ assurance: {
22
+ type: "string",
23
+ enum: ["hardware", "software"]
24
+ },
25
+ name: {
26
+ type: "string",
27
+ minLength: 1,
28
+ maxLength: 64
29
+ },
30
+ model: {
31
+ type: "string",
32
+ minLength: 1,
33
+ maxLength: 64
34
+ },
35
+ targetDeviceId: { type: "string" },
36
+ grant: { type: "object" },
37
+ approval: { type: "object" },
38
+ hubEnrollment: { type: "object" }
39
+ }
40
+ };
41
+ const post = (path, description, schema, authentication) => ({
42
+ id: `identity:${path}`,
43
+ scope: "host",
44
+ path: `/api/auth/${path}`,
45
+ method: "POST",
46
+ description,
47
+ authentication,
48
+ availability: "Only when the identity issuer is composed",
49
+ body: {
50
+ contentType: "application/json",
51
+ required: true,
52
+ schema
53
+ },
54
+ responses: {
55
+ "200": {
56
+ description: "Identity operation completed",
57
+ contentType: "application/json",
58
+ schema: { type: "object" }
59
+ },
60
+ "400": { description: "Invalid input" },
61
+ "401": { description: "Authentication or fresh proof required" },
62
+ "403": { description: "Current authority required" },
63
+ "409": { description: "Ownership transfer or Apple credential required" }
64
+ }
65
+ });
66
+ /** Data-only contracts. Better Auth owns its version-pinned plugin protocol schemas. */
67
+ const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
68
+ version: 1,
69
+ http: [
70
+ {
71
+ id: "identity:providers",
72
+ scope: "host",
73
+ path: "/api/auth/providers",
74
+ method: "GET",
75
+ description: "Configured sign-in provider names only",
76
+ authentication: "none",
77
+ responses: { "200": {
78
+ description: "Configured providers",
79
+ contentType: "application/json",
80
+ schema: { type: "object" }
81
+ } }
82
+ },
83
+ ...["jwks", "revocations"].map((path) => ({
84
+ id: `identity:${path}`,
85
+ scope: "host",
86
+ path: `/api/auth/${path}`,
87
+ method: "GET",
88
+ description: path === "jwks" ? "Issuer public signing keys" : "Cursor-based issuer revocations without addresses",
89
+ authentication: "none",
90
+ responses: { "200": {
91
+ description: "Issuer public state",
92
+ contentType: "application/json",
93
+ schema: path === "jwks" ? { type: "object" } : {
94
+ type: "array",
95
+ items: { type: "object" }
96
+ }
97
+ } },
98
+ ...path === "revocations" ? { parameters: [{
99
+ name: "after",
100
+ in: "query",
101
+ required: false,
102
+ schema: {
103
+ type: "integer",
104
+ minimum: 0
105
+ }
106
+ }] } : {}
107
+ })),
108
+ {
109
+ ...post("device-key", "Resolve an in-scope device key with a fresh enrolled hub signature, without a person cookie", {
110
+ type: "object",
111
+ required: ["proof"],
112
+ properties: { proof: { type: "object" } }
113
+ }, "device"),
114
+ responses: {
115
+ "200": {
116
+ description: "Registry device key and current recovery epoch",
117
+ contentType: "application/json",
118
+ schema: { type: "object" }
119
+ },
120
+ "404": { description: "Unknown, unauthorized or out-of-scope key or host proof" }
121
+ }
122
+ },
123
+ post("devices/enroll", "Enroll with an account session and new-key enroll proof; later devices require C10 approval or trusted-hub attestation", proof, "owner"),
124
+ {
125
+ id: "identity:devices",
126
+ scope: "host",
127
+ path: "/api/auth/devices",
128
+ method: "GET",
129
+ description: "List same-person devices, without keys or routing metadata",
130
+ authentication: "owner",
131
+ responses: { "200": {
132
+ description: "Device list",
133
+ contentType: "application/json",
134
+ schema: { type: "object" }
135
+ } }
136
+ },
137
+ post("devices/approval/request", "Create a five-minute same-person approval rendezvous using new-key approval-request proof", {
138
+ type: "object",
139
+ required: ["proof"],
140
+ properties: { proof }
141
+ }, "owner"),
142
+ post("devices/approval", "Submit trusted device approval for an opaque rendezvous code", {
143
+ type: "object",
144
+ required: ["code", "approval"],
145
+ properties: {
146
+ code: { type: "string" },
147
+ approval: { type: "object" }
148
+ }
149
+ }, "device"),
150
+ {
151
+ id: "identity:devices/approval:lookup",
152
+ scope: "host",
153
+ path: "/api/auth/devices/approval",
154
+ method: "GET",
155
+ description: "Same-person approval challenge lookup and polling",
156
+ authentication: "owner",
157
+ parameters: [{
158
+ name: "code",
159
+ in: "query",
160
+ required: true,
161
+ schema: { type: "string" }
162
+ }],
163
+ responses: { "200": {
164
+ description: "Approval challenge",
165
+ contentType: "application/json",
166
+ schema: { type: "object" }
167
+ } }
168
+ },
169
+ post("devices/approval/reject", "Reject a pending request with trusted approval-reject proof targeting its deviceId", {
170
+ type: "object",
171
+ required: ["code", "proof"],
172
+ properties: {
173
+ code: { type: "string" },
174
+ proof
175
+ }
176
+ }, "device"),
177
+ post("devices/recovery/rotate", "Rotate the recovery code with trusted rotate-recovery-code proof", {
178
+ type: "object",
179
+ required: ["proof"],
180
+ properties: { proof }
181
+ }, "device"),
182
+ post("hubs/claim", "Record an enrolled-device-signed claim and nested QR hub attestation", {
183
+ type: "object",
184
+ required: ["claim"],
185
+ properties: { claim: { type: "object" } }
186
+ }, "device"),
187
+ post("devices/recovery/code", "Immediately recover with a single-use code and new-key recover-code proof", {
188
+ type: "object",
189
+ required: ["proof", "recoveryCode"],
190
+ properties: {
191
+ proof,
192
+ recoveryCode: { type: "string" }
193
+ }
194
+ }, "owner"),
195
+ post("devices/recovery/start", "Start a durable 72-hour wait with new-key recover-start proof", {
196
+ type: "object",
197
+ required: ["proof"],
198
+ properties: { proof }
199
+ }, "owner"),
200
+ post("devices/recovery/cancel", "Cancel by email token or trusted cancel-recovery proof targeting recoveryId", {
201
+ type: "object",
202
+ properties: {
203
+ cancelToken: { type: "string" },
204
+ proof
205
+ }
206
+ }, "none"),
207
+ post("devices/recovery/admin-approve", "Current enrolled org-admin proof targeting recoveryId; grants only that org", {
208
+ type: "object",
209
+ required: ["proof"],
210
+ properties: { proof }
211
+ }, "device"),
212
+ post("devices/revoke", "Revoke a same-person device using an enrolled device signature", proof, "device"),
213
+ post("identity-token", "Mint device-bound C1 for a current member with a fresh enrolled-device proof", proof, "device"),
214
+ post("delegated-token", "Mint C2 with fresh calling-host proof and a current owner-device-signed C5 grant", proof, "device"),
215
+ post("personal-org", "Provision the authenticated personal org; cloud-workspace trigger atomically allocates its first workspace", {
216
+ type: "object",
217
+ properties: { trigger: {
218
+ type: "string",
219
+ enum: ["cloud-workspace"]
220
+ } }
221
+ }, "owner"),
222
+ post("delete-account", "Delete identity after sole-company-owner checks and durable Apple/purge outbox admission", { type: "object" }, "owner"),
223
+ post("email-otp/send-verification-otp", "Send an email code through the configured sender port", {
224
+ type: "object",
225
+ required: ["email", "type"],
226
+ properties: {
227
+ email: { type: "string" },
228
+ type: { type: "string" }
229
+ }
230
+ }, "none"),
231
+ post("sign-in/email-otp", "Verify an email code and create an account or session without an organization", {
232
+ type: "object",
233
+ required: ["email", "otp"],
234
+ properties: {
235
+ email: { type: "string" },
236
+ otp: { type: "string" }
237
+ }
238
+ }, "none"),
239
+ post("sign-in/social", "Provider sign-in; native Apple also requires authorizationCode and a nonce-bound idToken", {
240
+ type: "object",
241
+ required: ["provider"],
242
+ properties: {
243
+ provider: { type: "string" },
244
+ idToken: { type: "object" },
245
+ authorizationCode: { type: "string" }
246
+ }
247
+ }, "none")
248
+ ],
249
+ sockets: [],
250
+ dynamic: ["Better Auth 1.7.12 organization, OAuth callback, Expo, email/magic-link, OIDC/SAML and optional web-passkey endpoint schemas are supplied by the composed Better Auth plugins."]
251
+ });
252
+ //#endregion
253
+ exports.apiContracts = apiContracts;
254
+ exports.default = apiContracts;
@@ -0,0 +1,72 @@
1
+ //#region src/schemas/apiContracts.d.ts
2
+ /** own-hub-link is reserved for phase 5 and currently refused. */
3
+ export type PersonalOrgTrigger = 'cloud-workspace' | 'own-hub-link';
4
+ export interface IdentityWorkspaceAllocation {
5
+ orgId: string;
6
+ workspaceId: string;
7
+ }
8
+ export interface IdentityProvisioningItem {
9
+ id: string;
10
+ kind: 'materialize-workspace';
11
+ payload: IdentityWorkspaceAllocation;
12
+ }
13
+ /** Trusted host API, not an HTTP authentication boundary. Hosts authenticate the subject first. */
14
+ export interface IdentityProvisioningApi {
15
+ ensurePersonalOrg(subject: string, trigger: PersonalOrgTrigger): Promise<IdentityWorkspaceAllocation>;
16
+ allocateWorkspace(subject: string, orgId: string): Promise<IdentityWorkspaceAllocation>;
17
+ listOrgWorkspaces(subject: string, orgId: string): Promise<IdentityWorkspaceAllocation[]>;
18
+ isWorkspaceAllocatedToOrg(subject: string, orgId: string, workspaceId: string): Promise<boolean>;
19
+ listProvisioningOutbox(): Promise<IdentityProvisioningItem[]>;
20
+ ackProvisioningOutbox(id: string): Promise<void>;
21
+ }
22
+ /** Data-only contracts. Better Auth owns its version-pinned plugin protocol schemas. */
23
+ export declare const apiContracts: {
24
+ version: 1;
25
+ protocols?: Record<string, string> | undefined;
26
+ schemas?: Record<string, boolean | object> | undefined;
27
+ http: {
28
+ id: string;
29
+ scope: "host" | "session" | "workspace";
30
+ basePath?: string | undefined;
31
+ path: string;
32
+ method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
33
+ description: string;
34
+ availability?: string | undefined;
35
+ authentication: "device" | "none" | "owner";
36
+ parameters?: {
37
+ name: string;
38
+ in: "header" | "path" | "query";
39
+ required: boolean;
40
+ schema: boolean | object;
41
+ }[] | undefined;
42
+ body?: {
43
+ contentType: string;
44
+ contentTypes?: string[] | undefined;
45
+ required: boolean;
46
+ schema: boolean | object;
47
+ } | undefined;
48
+ responses: Record<string, {
49
+ description: string;
50
+ contentType?: string | undefined;
51
+ schema?: boolean | object | undefined;
52
+ events?: Record<string, boolean | object> | undefined;
53
+ }>;
54
+ }[];
55
+ sockets: {
56
+ id: string;
57
+ scope: "host" | "session" | "workspace";
58
+ description: string;
59
+ availability?: string | undefined;
60
+ service: string;
61
+ member: string;
62
+ direction: "client-to-server" | "server-to-client";
63
+ kind: "channel" | "method" | "state";
64
+ input: boolean | object;
65
+ output?: boolean | object | undefined;
66
+ errors?: boolean | object | undefined;
67
+ }[];
68
+ dynamic: string[];
69
+ gaps?: string[] | undefined;
70
+ };
71
+ //#endregion
72
+ export { apiContracts as default };