@sixb/server 0.1.1 → 0.1.2
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/README.md +3 -3
- package/dist/auth/application-access.d.ts +2 -2
- package/dist/auth/application-access.d.ts.map +1 -1
- package/dist/auth/connector-callback-cookie.d.ts +12 -0
- package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
- package/dist/auth/guard.d.ts +3 -3
- package/dist/auth/guard.d.ts.map +1 -1
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/scope.d.ts +13 -27
- package/dist/auth/scope.d.ts.map +1 -1
- package/dist/auth/session-cookies.d.ts +2 -2
- package/dist/auth/session-cookies.d.ts.map +1 -1
- package/dist/connectors/http.d.ts +16 -0
- package/dist/connectors/http.d.ts.map +1 -0
- package/dist/index.js +3293 -2704
- package/dist/index.js.map +55 -50
- package/dist/openapi/tags.d.ts +11 -3
- package/dist/openapi/tags.d.ts.map +1 -1
- package/dist/registerRoutes.d.ts +6 -2
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/action-runs.d.ts +21 -31
- package/dist/routes/action-runs.d.ts.map +1 -1
- package/dist/routes/actions.d.ts +9 -8
- package/dist/routes/actions.d.ts.map +1 -1
- package/dist/routes/agent-api-gateway.d.ts +2 -2
- package/dist/routes/agent-api-gateway.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +130 -131
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +84 -84
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/connector-connection-runs.d.ts +794 -0
- package/dist/routes/connector-connection-runs.d.ts.map +1 -0
- package/dist/routes/connector-connections.d.ts +219 -0
- package/dist/routes/connector-connections.d.ts.map +1 -0
- package/dist/routes/connectors.d.ts +10 -4
- package/dist/routes/connectors.d.ts.map +1 -1
- package/dist/routes/datasets.d.ts +8 -4
- package/dist/routes/datasets.d.ts.map +1 -1
- package/dist/routes/events.d.ts +8 -8
- package/dist/routes/events.d.ts.map +1 -1
- package/dist/routes/files.d.ts +11 -10
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/links.d.ts +2 -2
- package/dist/routes/links.d.ts.map +1 -1
- package/dist/routes/logs.d.ts +5 -5
- package/dist/routes/logs.d.ts.map +1 -1
- package/dist/routes/objects.d.ts +34 -34
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/ontology.d.ts +50 -50
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +24 -34
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/project.d.ts +2 -2
- package/dist/routes/project.d.ts.map +1 -1
- package/dist/routes/projections.d.ts +131 -83
- package/dist/routes/projections.d.ts.map +1 -1
- package/dist/routes/rules.d.ts +6 -6
- package/dist/routes/rules.d.ts.map +1 -1
- package/dist/routes/status.d.ts +2 -2
- package/dist/routes/status.d.ts.map +1 -1
- package/dist/routes/syncs.d.ts +20 -25
- package/dist/routes/syncs.d.ts.map +1 -1
- package/dist/routes/telemetry.d.ts +2 -2
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/webhook-runs.d.ts +9 -9
- package/dist/routes/webhook-runs.d.ts.map +1 -1
- package/dist/routes/webhooks.d.ts +2 -2
- package/dist/routes/webhooks.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +74 -48
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/agents.d.ts +11 -5
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/routes/ws/events.d.ts +8 -8
- package/dist/routes/ws/events.d.ts.map +1 -1
- package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
- package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
- package/dist/routes/ws/logs.d.ts +10 -10
- package/dist/routes/ws/logs.d.ts.map +1 -1
- package/dist/schemas/actions.d.ts +97 -202
- package/dist/schemas/actions.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +442 -439
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-usage.d.ts +34 -0
- package/dist/schemas/ai-usage.d.ts.map +1 -0
- package/dist/schemas/auth.d.ts +142 -142
- package/dist/schemas/common.d.ts +37 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/connectors.d.ts +713 -2
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/datasets.d.ts +2 -2
- package/dist/schemas/event-payloads.d.ts +6 -6
- package/dist/schemas/events.d.ts +34 -34
- package/dist/schemas/logs.d.ts +22 -22
- package/dist/schemas/objects.d.ts +10 -10
- package/dist/schemas/ontology.d.ts +118 -118
- package/dist/schemas/pipelines.d.ts +95 -190
- package/dist/schemas/pipelines.d.ts.map +1 -1
- package/dist/schemas/projections.d.ts +918 -563
- package/dist/schemas/projections.d.ts.map +1 -1
- package/dist/schemas/rules.d.ts +6 -6
- package/dist/schemas/status.d.ts +2 -2
- package/dist/schemas/syncs.d.ts +65 -108
- package/dist/schemas/syncs.d.ts.map +1 -1
- package/dist/schemas/webhook-runs.d.ts +41 -41
- package/dist/schemas/webhook-runs.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +516 -183
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts +6 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/http.d.ts +2 -0
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/ws.d.ts +4 -3
- package/dist/utils/ws.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/auth/access-token-boundary.ts +4 -4
- package/src/auth/application-access.ts +8 -9
- package/src/auth/connector-callback-cookie.ts +95 -0
- package/src/auth/guard.ts +11 -11
- package/src/auth/public-routes.ts +13 -0
- package/src/auth/scope.ts +26 -36
- package/src/auth/session-cookies.ts +3 -3
- package/src/connectors/http.ts +110 -0
- package/src/openapi/tags.ts +9 -1
- package/src/registerRoutes.ts +34 -23
- package/src/routes/action-runs.ts +39 -39
- package/src/routes/actions.ts +7 -13
- package/src/routes/agent-api-gateway.ts +41 -38
- package/src/routes/agents.ts +89 -200
- package/src/routes/auth.ts +87 -91
- package/src/routes/connector-connection-runs.ts +346 -0
- package/src/routes/connector-connections.ts +135 -0
- package/src/routes/connectors.ts +24 -12
- package/src/routes/datasets.ts +55 -54
- package/src/routes/events.ts +5 -5
- package/src/routes/files.ts +22 -30
- package/src/routes/links.ts +31 -35
- package/src/routes/logs.ts +6 -11
- package/src/routes/objects.ts +51 -114
- package/src/routes/ontology.ts +27 -38
- package/src/routes/pipelines.ts +28 -62
- package/src/routes/project.ts +3 -3
- package/src/routes/projections.ts +26 -38
- package/src/routes/rules.ts +11 -25
- package/src/routes/status.ts +5 -5
- package/src/routes/syncs.ts +19 -45
- package/src/routes/telemetry.ts +18 -29
- package/src/routes/webhook-runs.ts +5 -5
- package/src/routes/webhooks.ts +259 -341
- package/src/routes/workflows.ts +226 -248
- package/src/routes/ws/agents.ts +196 -66
- package/src/routes/ws/events.ts +11 -10
- package/src/routes/ws/log-subscription-hub.ts +6 -12
- package/src/routes/ws/logs.ts +13 -5
- package/src/schemas/actions.ts +58 -25
- package/src/schemas/agents.ts +19 -14
- package/src/schemas/ai-usage.ts +16 -0
- package/src/schemas/common.ts +24 -0
- package/src/schemas/connectors.ts +164 -0
- package/src/schemas/pipelines.ts +23 -15
- package/src/schemas/projections.ts +17 -3
- package/src/schemas/syncs.ts +13 -8
- package/src/schemas/webhook-runs.ts +10 -5
- package/src/schemas/workflows.ts +16 -6
- package/src/server.ts +65 -26
- package/src/utils/http.ts +34 -6
- package/src/utils/ws.ts +10 -5
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ bun add @sixb/server
|
|
|
15
15
|
import { createSixb } from "@sixb/core"
|
|
16
16
|
import { createSixbServer } from "@sixb/server"
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const host = await createSixb({ /* providers, ontology, ... */ })
|
|
19
19
|
|
|
20
20
|
const server = createSixbServer({
|
|
21
|
-
|
|
21
|
+
host,
|
|
22
22
|
port: 3002,
|
|
23
23
|
browser: {
|
|
24
24
|
publicOrigin: "https://api.example.com",
|
|
@@ -102,7 +102,7 @@ import type { SixbServerOptions } from "@sixb/server"
|
|
|
102
102
|
|
|
103
103
|
- **`createSixbServer(options)`** -- Entrypoint for starting the API/auth/ws/docs server.
|
|
104
104
|
- **`SixbServer`** -- Manages the server lifecycle (`start`, `stop`).
|
|
105
|
-
- **`SixbServerOptions`** -- Config: `
|
|
105
|
+
- **`SixbServerOptions`** -- Config: `host` and `browser` (required), `port` (default 3000), `hostname` (default `"0.0.0.0"`), `quiet`.
|
|
106
106
|
|
|
107
107
|
## OpenAPI
|
|
108
108
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AuthSessionAudience, type
|
|
1
|
+
import { type AuthSessionAudience, type SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { AuthenticatedRequestAuthSession } from "@sixb/core/internal/auth";
|
|
3
|
-
export declare function sessionCanAccessApplication(
|
|
3
|
+
export declare function sessionCanAccessApplication(host: SixbHostView, session: AuthenticatedRequestAuthSession, audience: AuthSessionAudience): boolean;
|
|
4
4
|
//# sourceMappingURL=application-access.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-access.d.ts","sourceRoot":"","sources":["../../src/auth/application-access.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"application-access.d.ts","sourceRoot":"","sources":["../../src/auth/application-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAwB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAE/E,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,+BAA+B,EACxC,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAOT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function createConnectorCallbackCookie(input: {
|
|
2
|
+
readonly request: Request;
|
|
3
|
+
readonly attemptId: string;
|
|
4
|
+
readonly secret: string;
|
|
5
|
+
readonly expiresAt: Date;
|
|
6
|
+
}): string;
|
|
7
|
+
export declare function readConnectorCallbackCookie(request: Request, state: string): {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly value: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare function clearConnectorCallbackCookie(request: Request, name: string): string;
|
|
12
|
+
//# sourceMappingURL=connector-callback-cookie.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-callback-cookie.d.ts","sourceRoot":"","sources":["../../src/auth/connector-callback-cookie.ts"],"names":[],"mappings":"AAQA,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CACzB,GAAG,MAAM,CAST;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAG/D;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQnF"}
|
package/dist/auth/guard.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import { type AuthenticatedRequestAuthSession } from "@sixb/core/internal/auth";
|
|
3
3
|
import { type ResolveRequestAuthContext } from "./browser-origin";
|
|
4
4
|
export interface ServerAuthGuardOptions {
|
|
5
|
-
readonly
|
|
5
|
+
readonly host: SixbHostView;
|
|
6
6
|
readonly resolveAuthContext: ResolveRequestAuthContext;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
@@ -20,7 +20,7 @@ export type ServerAuthGuardDecision = {
|
|
|
20
20
|
readonly session: AuthenticatedRequestAuthSession | null;
|
|
21
21
|
};
|
|
22
22
|
export declare class ServerAuthGuard {
|
|
23
|
-
private readonly
|
|
23
|
+
private readonly host;
|
|
24
24
|
private readonly resolveAuthContext;
|
|
25
25
|
constructor(options: ServerAuthGuardOptions);
|
|
26
26
|
isAuthEnabled(): boolean;
|
package/dist/auth/guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/auth/guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../src/auth/guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EACL,KAAK,+BAA+B,EAErC,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAsB,KAAK,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAWrF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAA;CACvD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,+BAA+B,GAAG,IAAI,CAAA;CAAE,CAAA;AAExF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;gBAElD,OAAO,EAAE,sBAAsB;IAK3C,aAAa,IAAI,OAAO;IAIxB,kBAAkB,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAI5D,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA6FjE,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM;IAK3C,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,+BAA+B,GAAG,OAAO;IAMhF,OAAO,CAAC,qBAAqB;CAa9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-routes.d.ts","sourceRoot":"","sources":["../../src/auth/public-routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"public-routes.d.ts","sourceRoot":"","sources":["../../src/auth/public-routes.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,CAAA;AAErE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;CAChC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAwB3D;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CA6DvE"}
|
package/dist/auth/scope.d.ts
CHANGED
|
@@ -1,34 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OntologySource } from "@sixb/core";
|
|
2
|
+
import type { RequestExecutionAuthorization, Sixb } from "@sixb/core/internal/request-execution";
|
|
2
3
|
import type { AgentRunRecord } from "@sixb/core/storage";
|
|
3
4
|
/**
|
|
4
5
|
* Per-request authorization state attached by the server's auth derive.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* requests
|
|
8
|
-
* behavior for surfaces that are not grant-enforced yet.
|
|
9
|
-
*
|
|
10
|
-
* SECURITY — privileged is the silent default. The core runtime treats a
|
|
11
|
-
* missing authorization context as fully privileged (workers, syncs, tests
|
|
12
|
-
* need that). A scoped principal therefore gains no protection unless the route
|
|
13
|
-
* actively routes through `scoped`. Concretely:
|
|
14
|
-
*
|
|
15
|
-
* - A grant-enforced handler MUST use `scoped` (falling back to the raw
|
|
16
|
-
* `sixb` only when `scoped` is null). That now covers writes as well as
|
|
17
|
-
* reads: object, link, and telemetry writes enforce `edit:object` and
|
|
18
|
-
* `append:telemetry`. Using the raw `sixb` on a path an authenticated
|
|
19
|
-
* principal can reach is a silent god-mode bypass — it will not fail to
|
|
20
|
-
* compile or to run.
|
|
21
|
-
* - Surfaces with no grant family yet (auth admin, raw storage) stay
|
|
22
|
-
* authenticated-only by design and use the raw `sixb` deliberately, not by
|
|
23
|
-
* omission. Add such a route consciously, and lock it down when its grant
|
|
24
|
-
* family lands.
|
|
25
|
-
*
|
|
26
|
-
* This implicit default is a known V1 trade-off (kept for runtime ergonomics);
|
|
27
|
-
* if it proves error-prone, make privileged access explicit at this boundary.
|
|
7
|
+
* Protected domain routes require `sixb`. It is present for authenticated and auth-disabled
|
|
8
|
+
* requests, and absent only for public routes that do not execute protected domain operations.
|
|
28
9
|
*/
|
|
29
10
|
export interface RequestAuthState {
|
|
30
|
-
readonly
|
|
31
|
-
readonly scoped: ScopedSixb<readonly OntologySource[]> | null;
|
|
11
|
+
readonly sixb: Sixb<readonly OntologySource[]> | null;
|
|
32
12
|
/** Present for requests proxied through the run-scoped agent API gateway. */
|
|
33
13
|
readonly agentRun?: AgentRunRecord;
|
|
34
14
|
/** Identifies which kind of active agent execution owns a gateway request. */
|
|
@@ -40,8 +20,13 @@ export interface RequestAuthState {
|
|
|
40
20
|
readonly nodeRunId: string;
|
|
41
21
|
};
|
|
42
22
|
}
|
|
43
|
-
export
|
|
44
|
-
|
|
23
|
+
export interface InternalRequestAuthState {
|
|
24
|
+
readonly authorization: RequestExecutionAuthorization;
|
|
25
|
+
readonly agentRun?: AgentRunRecord;
|
|
26
|
+
readonly agentExecution?: RequestAuthState["agentExecution"];
|
|
27
|
+
}
|
|
28
|
+
export declare function registerInternalRequestAuthState(request: Request, authState: InternalRequestAuthState): void;
|
|
29
|
+
export declare function consumeInternalRequestAuthState(request: Request): InternalRequestAuthState | undefined;
|
|
45
30
|
/**
|
|
46
31
|
* Read the derived auth state from a route handler's context.
|
|
47
32
|
*
|
|
@@ -50,4 +35,5 @@ export declare function consumeInternalRequestAuthState(request: Request): Reque
|
|
|
50
35
|
* point until route registration carries the derived context type.
|
|
51
36
|
*/
|
|
52
37
|
export declare function requestAuthState(context: unknown): RequestAuthState;
|
|
38
|
+
export declare function requireRequestSixb(context: unknown): Sixb<readonly OntologySource[]>;
|
|
53
39
|
//# sourceMappingURL=scope.d.ts.map
|
package/dist/auth/scope.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/auth/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/auth/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,6BAA6B,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC,GAAG,IAAI,CAAA;IACrD,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,cAAc,CAAC,EACpB;QAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GACzD;QAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9D;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,EAAE,6BAA6B,CAAA;IACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;CAC7D;AAID,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,wBAAwB,GAClC,IAAI,CAEN;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,OAAO,GACf,wBAAwB,GAAG,SAAS,CAMtC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAOnE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC,CAMpF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import { type AuthenticatedAuthSession } from "@sixb/core/internal/auth";
|
|
3
3
|
export declare function createSessionRenewalCookieHeaders(input: {
|
|
4
|
-
readonly
|
|
4
|
+
readonly host: SixbHostView;
|
|
5
5
|
readonly request: Request;
|
|
6
6
|
readonly session: AuthenticatedAuthSession;
|
|
7
7
|
readonly csrfToken?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-cookies.d.ts","sourceRoot":"","sources":["../../src/auth/session-cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"session-cookies.d.ts","sourceRoot":"","sources":["../../src/auth/session-cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EACL,KAAK,wBAAwB,EAK9B,MAAM,0BAA0B,CAAA;AAEjC,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAA;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,IAAI,CA4BrF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
|
+
import type { ConnectorConnectionRunView, ConnectorConnectionsRuntime, ConnectorConnectionView } from "@sixb/core/internal/connector-connections";
|
|
3
|
+
import type { z } from "zod";
|
|
4
|
+
import { type ConnectorConnectionRunSchema, type ConnectorConnectionSchema, type ConnectorHttpErrorCode } from "../schemas/connectors";
|
|
5
|
+
export declare function connectorRouteRuntime(host: SixbHostView, owner: object, connectorId: string): ConnectorConnectionsRuntime;
|
|
6
|
+
export declare function serializeConnectorConnection(connection: ConnectorConnectionView): z.infer<typeof ConnectorConnectionSchema>;
|
|
7
|
+
export declare function serializeConnectorConnectionRun(run: ConnectorConnectionRunView): z.infer<typeof ConnectorConnectionRunSchema>;
|
|
8
|
+
export declare function handleConnectorRouteError(error: unknown, set: {
|
|
9
|
+
status?: number | string;
|
|
10
|
+
}): {
|
|
11
|
+
error: string;
|
|
12
|
+
} | {
|
|
13
|
+
error: string;
|
|
14
|
+
code: ConnectorHttpErrorCode;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/connectors/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,2CAA2C,CAAA;AAMlD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAC5B,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAA;AAG9B,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,2BAA2B,CAY7B;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,uBAAuB,GAClC,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAS3C;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,0BAA0B,GAC9B,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CA6C9C;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAChC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,sBAAsB,CAAA;CAAE,CAMrE"}
|