@devorash/node 0.1.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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Outbound calls to the Devora API: no redirects (signed headers and bodies
3
+ * must never be forwarded to another origin), a total deadline, and a bounded
4
+ * JSON response.
5
+ * @module @devorash/node
6
+ */
7
+ /** Largest control-plane response the SDK will buffer. */
8
+ export declare const MAX_CONTROL_RESPONSE_BYTES: number;
9
+ export declare class ControlPlaneResponseError extends Error {
10
+ constructor(message: string);
11
+ }
12
+ /** `fetch` that refuses redirects and aborts after `timeoutMs` in total. */
13
+ export declare function controlPlaneFetch(url: string, init: RequestInit, timeoutMs?: number): Promise<Response>;
14
+ /**
15
+ * Read a JSON object response of at most `maxBytes`. Non-object JSON, invalid
16
+ * UTF-8 and oversized bodies throw {@link ControlPlaneResponseError}.
17
+ */
18
+ export declare function readBoundedJsonObject(response: Response, maxBytes?: number): Promise<Record<string, unknown>>;
19
+ //# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,QAAY,CAAA;AAEnD,qBAAa,yBAA0B,SAAQ,KAAK;gBACvC,OAAO,EAAE,MAAM;CAI3B;AAED,4EAA4E;AAC5E,wBAAsB,iBAAiB,CACtC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,EACjB,SAAS,SAAQ,GACf,OAAO,CAAC,QAAQ,CAAC,CAcnB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAC1C,QAAQ,EAAE,QAAQ,EAClB,QAAQ,SAA6B,GACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqClC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Outbound calls to the Devora API: no redirects (signed headers and bodies
3
+ * must never be forwarded to another origin), a total deadline, and a bounded
4
+ * JSON response.
5
+ * @module @devorash/node
6
+ */
7
+ /** Largest control-plane response the SDK will buffer. */
8
+ export const MAX_CONTROL_RESPONSE_BYTES = 64 * 1024;
9
+ export class ControlPlaneResponseError extends Error {
10
+ constructor(message) {
11
+ super(message);
12
+ this.name = "ControlPlaneResponseError";
13
+ }
14
+ }
15
+ /** `fetch` that refuses redirects and aborts after `timeoutMs` in total. */
16
+ export async function controlPlaneFetch(url, init, timeoutMs = 5_000) {
17
+ // Bun 1.3.14 treats a 304 as an unexpected redirect in "error" mode.
18
+ // Manual mode never forwards signed headers/body; reject redirect replies
19
+ // ourselves while allowing conditional GET policy revalidation.
20
+ const response = await fetch(url, {
21
+ ...init,
22
+ redirect: "manual",
23
+ signal: AbortSignal.timeout(timeoutMs),
24
+ });
25
+ if (response.status >= 300 && response.status < 400 && response.status !== 304) {
26
+ void response.body?.cancel().catch(() => { });
27
+ throw new ControlPlaneResponseError("Control-plane redirects are not allowed");
28
+ }
29
+ return response;
30
+ }
31
+ /**
32
+ * Read a JSON object response of at most `maxBytes`. Non-object JSON, invalid
33
+ * UTF-8 and oversized bodies throw {@link ControlPlaneResponseError}.
34
+ */
35
+ export async function readBoundedJsonObject(response, maxBytes = MAX_CONTROL_RESPONSE_BYTES) {
36
+ const declared = response.headers.get("content-length");
37
+ if (declared !== null && (!/^\d+$/.test(declared) || Number(declared) > maxBytes)) {
38
+ void response.body?.cancel().catch(() => { });
39
+ throw new ControlPlaneResponseError("Response too large");
40
+ }
41
+ const chunks = [];
42
+ let total = 0;
43
+ if (response.body) {
44
+ const reader = response.body.getReader();
45
+ try {
46
+ for (;;) {
47
+ const { value, done } = await reader.read();
48
+ if (done)
49
+ break;
50
+ total += value.byteLength;
51
+ if (total > maxBytes)
52
+ throw new ControlPlaneResponseError("Response too large");
53
+ chunks.push(value);
54
+ }
55
+ }
56
+ finally {
57
+ void reader.cancel().catch(() => { });
58
+ }
59
+ }
60
+ const bytes = new Uint8Array(total);
61
+ let offset = 0;
62
+ for (const chunk of chunks) {
63
+ bytes.set(chunk, offset);
64
+ offset += chunk.byteLength;
65
+ }
66
+ let parsed;
67
+ try {
68
+ parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
69
+ }
70
+ catch {
71
+ throw new ControlPlaneResponseError("Invalid JSON response");
72
+ }
73
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
74
+ throw new ControlPlaneResponseError("Unexpected response shape");
75
+ return parsed;
76
+ }
77
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,CAAA;AAEnD,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACnD,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAA;IACxC,CAAC;CACD;AAED,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACtC,GAAW,EACX,IAAiB,EACjB,SAAS,GAAG,KAAK;IAEjB,qEAAqE;IACrE,0EAA0E;IAC1E,gEAAgE;IAChE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QACjC,GAAG,IAAI;QACP,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC;KACtC,CAAC,CAAA;IACF,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAChF,KAAK,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC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AE,CAAC,CAAC,CAAA;QACrC,CAAC;IACF,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;IACnC,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QACxB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAA;IAC3B,CAAC;IACD,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACJ,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAC7E,CAAC;IAAC,MAAM,CAAC;QACR,MAAM,IAAI,yBAAyB,CAAC,uBAAuB,CAAC,CAAA;IAC7D,CAAC;IACD,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACjE,MAAM,IAAI,yBAAyB,CAAC,2BAA2B,CAAC,CAAA;IACjE,OAAO,MAAiC,CAAA;AACzC,CAAC"}
@@ -0,0 +1,191 @@
1
+ import type { BrowserResumeCode } from "@devorash/core";
2
+ /**
3
+ * Node.js Backend SDK specific types
4
+ * @module @devorash/node
5
+ */
6
+ import type { BackendSDKConfig, DevoraRequest, RouteHandler, SDKInfo } from "@devorash/core";
7
+ import type { ScopeConfig } from "./scope-config.js";
8
+ import type { ReplayStore } from "./replay-store.js";
9
+ /**
10
+ * Extended backend SDK configuration for Node.js
11
+ */
12
+ export interface NodeBackendSDKConfig extends BackendSDKConfig {
13
+ /**
14
+ * Devora API origin override (advanced; e.g. self-hosted deployments).
15
+ * Must be an https origin (http is allowed for localhost only).
16
+ * @default the origin baked into the SDK at build time
17
+ */
18
+ apiUrl?: string;
19
+ /** Enable request logging */
20
+ logRequests?: boolean;
21
+ /** Custom logger implementation */
22
+ logger?: Logger;
23
+ /** Statistics collection */
24
+ collectStats?: boolean;
25
+ /** Required in production so replay rejection works across processes/instances. */
26
+ replayStore?: ReplayStore;
27
+ /**
28
+ * Runtime environment. Anything other than "development" or "test" is treated
29
+ * as production, which requires `replayStore`. Falls back to `DEVORA_ENV`,
30
+ * then `NODE_ENV`, then "production" (fail closed).
31
+ */
32
+ environment?: DevoraEnvironment;
33
+ }
34
+ export type DevoraEnvironment = "development" | "test" | "production";
35
+ /**
36
+ * Logger interface for custom logging
37
+ */
38
+ export interface Logger {
39
+ debug: (message: string, meta?: Record<string, unknown>) => void;
40
+ info: (message: string, meta?: Record<string, unknown>) => void;
41
+ warn: (message: string, meta?: Record<string, unknown>) => void;
42
+ error: (message: string, meta?: Record<string, unknown>) => void;
43
+ }
44
+ /**
45
+ * Route definition with method and handler
46
+ */
47
+ export interface SDKRoute<TRequest = DevoraRequest, TResponse = unknown> {
48
+ /** Endpoint path */
49
+ path: string;
50
+ /** HTTP method */
51
+ method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
52
+ /** Route handler */
53
+ handler: RouteHandler<TRequest, TResponse>;
54
+ /** Whether this is a built-in route */
55
+ isBuiltIn?: boolean;
56
+ }
57
+ /**
58
+ * Result of a server-side session liveness check.
59
+ */
60
+ export interface SessionStatusResult {
61
+ /** True only when the session is active and not past its hard expiry. */
62
+ valid: boolean;
63
+ /** Machine-readable reason when not valid (e.g. SESSION_TERMINATED, SESSION_EXPIRED). */
64
+ error?: string;
65
+ /** Raw session status (active, terminated, completed, expired, ...). */
66
+ status?: string;
67
+ /** Session scope. */
68
+ scope?: "read" | "write";
69
+ /** Session hard expiry as a Unix timestamp in milliseconds. */
70
+ expiresAt?: number;
71
+ /** Remaining time in milliseconds. */
72
+ remainingMs?: number;
73
+ }
74
+ /**
75
+ * SDK instance returned by devoraSDK()
76
+ */
77
+ export interface DevoraBackendSDK {
78
+ /** SDK configuration (read-only) */
79
+ readonly config: NodeBackendSDKConfig;
80
+ /** SDK info */
81
+ readonly info: SDKInfo;
82
+ /** Resolves after the initial scope policy fetch attempt completes. Use getScopeConfig() or isPolicyLoaded() to check whether policy is available. */
83
+ readonly ready: Promise<void>;
84
+ /** Register a new endpoint handler */
85
+ register: <TRequest extends DevoraRequest, TResponse>(path: string, handler: RouteHandler<TRequest, TResponse>, options?: RegisterOptions) => SDKRoute<TRequest, TResponse>;
86
+ /** Get all registered routes */
87
+ getRoutes: () => SDKRoute[];
88
+ /** Get statistics */
89
+ getStats: () => SDKStats;
90
+ /** Fetch the latest centrally managed scope policy, using the cache when valid. */
91
+ getScopeConfig: () => Promise<ScopeConfig | null>;
92
+ /** Whether a scope policy is currently cached in memory. */
93
+ isPolicyLoaded: () => boolean;
94
+ /** Return the currently cached scope policy without network I/O. */
95
+ getCachedScopeConfig: () => ScopeConfig | null;
96
+ /** Force a scope policy refresh. */
97
+ refreshScopeConfig: () => Promise<ScopeConfig | null>;
98
+ /**
99
+ * Check whether a Devora session is still live (not terminated, revoked, or expired).
100
+ * Used by the optional `enforceLiveness` guard. Returns null when Devora is unreachable.
101
+ */
102
+ getSessionStatus: (sessionId: string) => Promise<SessionStatusResult | null>;
103
+ /**
104
+ * Ask Devora for a one-time browser resume code for an active session. The
105
+ * request is signed with the server secret and consumed once. Returns null
106
+ * when Devora is unreachable; throws never.
107
+ */
108
+ createBrowserResumeCode: (input: {
109
+ sessionId: string;
110
+ tabRef: string;
111
+ origin: string;
112
+ }) => Promise<BrowserResumeCode | {
113
+ error: string;
114
+ status?: number;
115
+ } | null>;
116
+ /** Stop background refresh timers. */
117
+ destroy: () => void;
118
+ /**
119
+ * Verify a signed request from Devora over its exact wire bytes (signature
120
+ * v3): headers, key and org, timestamp, raw path and query, body digest,
121
+ * direction, then single-use request id. Nothing is re-serialized.
122
+ * Optional tolerance (seconds) overrides the SDK config for this call.
123
+ */
124
+ verifyRequest: (request: SignedRequestInput, options?: {
125
+ timestampTolerance?: number;
126
+ }) => Promise<ValidationResult>;
127
+ }
128
+ /**
129
+ * Options for register()
130
+ */
131
+ export interface RegisterOptions {
132
+ /** HTTP method (auto-detected if using DEVORA_ENDPOINTS) */
133
+ method?: "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
134
+ /** Custom description for debug output */
135
+ description?: string;
136
+ }
137
+ /**
138
+ * SDK statistics
139
+ */
140
+ export interface SDKStats {
141
+ /** Total requests received */
142
+ totalRequests: number;
143
+ /** Successful requests */
144
+ successfulRequests: number;
145
+ /** Failed requests */
146
+ failedRequests: number;
147
+ /** Security validation errors */
148
+ securityErrors: number;
149
+ /** Requests by endpoint */
150
+ requestsByEndpoint: Record<string, number>;
151
+ }
152
+ /**
153
+ * A signed request exactly as received. `path` is relative to the SDK mount
154
+ * and still percent-encoded; `query` is everything after the first `?`.
155
+ */
156
+ export interface SignedRequestInput {
157
+ method: string;
158
+ path: string;
159
+ query: string;
160
+ body: Uint8Array;
161
+ headers: Record<string, string | string[] | undefined>;
162
+ }
163
+ /**
164
+ * Validation result for incoming requests
165
+ */
166
+ export interface ValidationResult {
167
+ /** Whether validation passed */
168
+ valid: boolean;
169
+ /** Error message if validation failed */
170
+ error?: string;
171
+ /** Machine-readable error code when validation failed */
172
+ errorCode?: string;
173
+ /** Extracted organization ID */
174
+ orgId?: string;
175
+ /** Extracted key ID */
176
+ keyId?: string;
177
+ /** Request timestamp */
178
+ timestamp?: number;
179
+ /** Unique request ID */
180
+ requestId?: string;
181
+ }
182
+ /**
183
+ * Adapter interface for framework integrations
184
+ */
185
+ export interface FrameworkAdapter<THandler = unknown> {
186
+ /** Adapter name */
187
+ name: string;
188
+ /** Create framework-specific handler */
189
+ createHandler: (sdk: DevoraBackendSDK, routes: SDKRoute[]) => THandler;
190
+ }
191
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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1B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAA;IACtB,2BAA2B;IAC3B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAA;IACd,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,QAAQ,GAAG,OAAO;IACnD,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,wCAAwC;IACxC,aAAa,EAAE,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,QAAQ,CAAA;CACtE"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@devorash/node",
3
+ "version": "0.1.0",
4
+ "description": "Devora Node.js Backend SDK for secure impersonation",
5
+ "keywords": [
6
+ "backend",
7
+ "customer-support",
8
+ "devora",
9
+ "impersonation",
10
+ "nodejs",
11
+ "sdk",
12
+ "support"
13
+ ],
14
+ "homepage": "https://docs.devora.sh/reference/packages",
15
+ "bugs": {
16
+ "url": "https://github.com/getdevora/devora-sdks/issues"
17
+ },
18
+ "license": "MIT",
19
+ "author": "Devora",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/getdevora/devora-sdks.git",
23
+ "directory": "node"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "type": "module",
31
+ "main": "./dist/index.js",
32
+ "module": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "import": "./dist/index.js"
38
+ }
39
+ },
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "provenance": true
43
+ },
44
+ "dependencies": {
45
+ "@devorash/core": "0.1.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=20.0.0"
49
+ }
50
+ }