@opendatalabs/personal-server-ts-server 1.33.7 → 1.34.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.
- package/dist/__fixtures__/bound-record-store.d.ts +19 -0
- package/dist/__fixtures__/bound-record-store.d.ts.map +1 -0
- package/dist/__fixtures__/bound-record-store.js +60 -0
- package/dist/__fixtures__/bound-record-store.js.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-authorization-strategy.d.ts +41 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-authorization-strategy.d.ts.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-authorization-strategy.js +34 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-authorization-strategy.js.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-context-client.d.ts +112 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-context-client.d.ts.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-context-client.js +226 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-context-client.js.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-types.d.ts +135 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-types.d.ts.map +1 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-types.js +21 -0
- package/dist/__fixtures__/cg-pdpp-client/pdpp-types.js.map +1 -0
- package/dist/api-auth.d.ts +18 -2
- package/dist/api-auth.d.ts.map +1 -1
- package/dist/api-auth.js +114 -22
- package/dist/api-auth.js.map +1 -1
- package/dist/app.d.ts +60 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +139 -1
- package/dist/app.js.map +1 -1
- package/dist/bootstrap.d.ts +10 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +358 -7
- package/dist/bootstrap.js.map +1 -1
- package/dist/enclave-main.d.ts +4 -0
- package/dist/enclave-main.d.ts.map +1 -1
- package/dist/enclave-main.js +152 -1
- package/dist/enclave-main.js.map +1 -1
- package/dist/middleware/body-limit.d.ts +1 -1
- package/dist/middleware/body-limit.d.ts.map +1 -1
- package/dist/middleware/body-limit.js +8 -3
- package/dist/middleware/body-limit.js.map +1 -1
- package/dist/middleware/cors.d.ts.map +1 -1
- package/dist/middleware/cors.js +1 -0
- package/dist/middleware/cors.js.map +1 -1
- package/dist/package.json +9 -1
- package/dist/pdpp/bootstrap.d.ts +72 -0
- package/dist/pdpp/bootstrap.d.ts.map +1 -0
- package/dist/pdpp/bootstrap.js +270 -0
- package/dist/pdpp/bootstrap.js.map +1 -0
- package/dist/pdpp/chain-enforcement.d.ts +95 -0
- package/dist/pdpp/chain-enforcement.d.ts.map +1 -0
- package/dist/pdpp/chain-enforcement.js +145 -0
- package/dist/pdpp/chain-enforcement.js.map +1 -0
- package/dist/pdpp/client-document-fetch.d.ts +63 -0
- package/dist/pdpp/client-document-fetch.d.ts.map +1 -0
- package/dist/pdpp/client-document-fetch.js +254 -0
- package/dist/pdpp/client-document-fetch.js.map +1 -0
- package/dist/pdpp/declaration-registry.d.ts +83 -0
- package/dist/pdpp/declaration-registry.d.ts.map +1 -0
- package/dist/pdpp/declaration-registry.js +251 -0
- package/dist/pdpp/declaration-registry.js.map +1 -0
- package/dist/pdpp/deployment.d.ts +70 -0
- package/dist/pdpp/deployment.d.ts.map +1 -0
- package/dist/pdpp/deployment.js +104 -0
- package/dist/pdpp/deployment.js.map +1 -0
- package/dist/pdpp/record-schema.d.ts +2 -0
- package/dist/pdpp/record-schema.d.ts.map +1 -0
- package/dist/pdpp/record-schema.js +2 -0
- package/dist/pdpp/record-schema.js.map +1 -0
- package/dist/pdpp/records-bootstrap.d.ts +111 -0
- package/dist/pdpp/records-bootstrap.d.ts.map +1 -0
- package/dist/pdpp/records-bootstrap.js +353 -0
- package/dist/pdpp/records-bootstrap.js.map +1 -0
- package/dist/pdpp/source-id-compat.d.ts +5 -0
- package/dist/pdpp/source-id-compat.d.ts.map +1 -0
- package/dist/pdpp/source-id-compat.js +16 -0
- package/dist/pdpp/source-id-compat.js.map +1 -0
- package/dist/pdpp/test-connections.d.ts +6 -0
- package/dist/pdpp/test-connections.d.ts.map +1 -0
- package/dist/pdpp/test-connections.js +37 -0
- package/dist/pdpp/test-connections.js.map +1 -0
- package/dist/routes/auth-device.d.ts.map +1 -1
- package/dist/routes/auth-device.js +3 -0
- package/dist/routes/auth-device.js.map +1 -1
- package/dist/routes/chunked-scope-import.d.ts +41 -0
- package/dist/routes/chunked-scope-import.d.ts.map +1 -0
- package/dist/routes/chunked-scope-import.js +901 -0
- package/dist/routes/chunked-scope-import.js.map +1 -0
- package/dist/routes/data.d.ts +23 -1
- package/dist/routes/data.d.ts.map +1 -1
- package/dist/routes/data.js +112 -1
- package/dist/routes/data.js.map +1 -1
- package/dist/routes/grants.d.ts.map +1 -1
- package/dist/routes/grants.js +2 -0
- package/dist/routes/grants.js.map +1 -1
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +21 -12
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/pdpp-auth.d.ts +157 -0
- package/dist/routes/pdpp-auth.d.ts.map +1 -0
- package/dist/routes/pdpp-auth.js +953 -0
- package/dist/routes/pdpp-auth.js.map +1 -0
- package/dist/routes/pdpp-blobs.d.ts +26 -0
- package/dist/routes/pdpp-blobs.d.ts.map +1 -0
- package/dist/routes/pdpp-blobs.js +179 -0
- package/dist/routes/pdpp-blobs.js.map +1 -0
- package/dist/routes/pdpp-connections.d.ts +28 -0
- package/dist/routes/pdpp-connections.d.ts.map +1 -0
- package/dist/routes/pdpp-connections.js +144 -0
- package/dist/routes/pdpp-connections.js.map +1 -0
- package/dist/routes/pdpp-declarations.d.ts +58 -0
- package/dist/routes/pdpp-declarations.d.ts.map +1 -0
- package/dist/routes/pdpp-declarations.js +94 -0
- package/dist/routes/pdpp-declarations.js.map +1 -0
- package/dist/routes/pdpp-instance-bindings.d.ts +26 -0
- package/dist/routes/pdpp-instance-bindings.d.ts.map +1 -0
- package/dist/routes/pdpp-instance-bindings.js +124 -0
- package/dist/routes/pdpp-instance-bindings.js.map +1 -0
- package/dist/routes/pdpp-records.d.ts +158 -0
- package/dist/routes/pdpp-records.d.ts.map +1 -0
- package/dist/routes/pdpp-records.js +1537 -0
- package/dist/routes/pdpp-records.js.map +1 -0
- package/dist/routes/pdpp-well-known.d.ts +13 -0
- package/dist/routes/pdpp-well-known.d.ts.map +1 -0
- package/dist/routes/pdpp-well-known.js +20 -0
- package/dist/routes/pdpp-well-known.js.map +1 -0
- package/dist/storage/declaration-witness.d.ts +56 -0
- package/dist/storage/declaration-witness.d.ts.map +1 -0
- package/dist/storage/declaration-witness.js +273 -0
- package/dist/storage/declaration-witness.js.map +1 -0
- package/dist/storage/hierarchy.d.ts +25 -1
- package/dist/storage/hierarchy.d.ts.map +1 -1
- package/dist/storage/hierarchy.js +210 -16
- package/dist/storage/hierarchy.js.map +1 -1
- package/dist/storage/import-operations.d.ts +11 -0
- package/dist/storage/import-operations.d.ts.map +1 -0
- package/dist/storage/import-operations.js +261 -0
- package/dist/storage/import-operations.js.map +1 -0
- package/dist/storage/index-manager.d.ts +24 -2
- package/dist/storage/index-manager.d.ts.map +1 -1
- package/dist/storage/index-manager.js +279 -30
- package/dist/storage/index-manager.js.map +1 -1
- package/dist/storage/index-schema.d.ts +1 -1
- package/dist/storage/index-schema.d.ts.map +1 -1
- package/dist/storage/index-schema.js +189 -8
- package/dist/storage/index-schema.js.map +1 -1
- package/dist/storage/legacy-scope-authority.d.ts +14 -0
- package/dist/storage/legacy-scope-authority.d.ts.map +1 -0
- package/dist/storage/legacy-scope-authority.js +298 -0
- package/dist/storage/legacy-scope-authority.js.map +1 -0
- package/dist/storage/node-data-storage.d.ts +6 -0
- package/dist/storage/node-data-storage.d.ts.map +1 -1
- package/dist/storage/node-data-storage.js +161 -2
- package/dist/storage/node-data-storage.js.map +1 -1
- package/dist/storage/pdpp-grant-binding-sqlite-store.d.ts +17 -0
- package/dist/storage/pdpp-grant-binding-sqlite-store.d.ts.map +1 -0
- package/dist/storage/pdpp-grant-binding-sqlite-store.js +159 -0
- package/dist/storage/pdpp-grant-binding-sqlite-store.js.map +1 -0
- package/dist/storage/pdpp-records-sqlite-store.d.ts +112 -0
- package/dist/storage/pdpp-records-sqlite-store.d.ts.map +1 -0
- package/dist/storage/pdpp-records-sqlite-store.js +1440 -0
- package/dist/storage/pdpp-records-sqlite-store.js.map +1 -0
- package/dist/storage/pdpp-stream-completion.d.ts +5 -0
- package/dist/storage/pdpp-stream-completion.d.ts.map +1 -0
- package/dist/storage/pdpp-stream-completion.js +10 -0
- package/dist/storage/pdpp-stream-completion.js.map +1 -0
- package/dist/storage/scope-deletion-history.d.ts +8 -0
- package/dist/storage/scope-deletion-history.d.ts.map +1 -0
- package/dist/storage/scope-deletion-history.js +40 -0
- package/dist/storage/scope-deletion-history.js.map +1 -0
- package/dist/ui/ps-lite-debug.js +3697 -876
- package/package.json +12 -4
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDPP Core §8 (Resource Server Interface) request/response types.
|
|
3
|
+
*
|
|
4
|
+
* Cited against `PDP-Connect/pdpp` `apps/site/content/docs/spec-core.md`
|
|
5
|
+
* section 8 (`#resource-server-interface`) as of 2026-09-17. This module is
|
|
6
|
+
* intentionally the *only* place that names PDPP wire shapes for the Client
|
|
7
|
+
* role — do not redeclare `PdppRecord`/`PdppListRecordsResponse`/etc. inline
|
|
8
|
+
* at a call site.
|
|
9
|
+
*
|
|
10
|
+
* PS's actual §8 endpoints have not landed yet (no PR in
|
|
11
|
+
* vana-com/personal-server-ts implements them as of this writing; see
|
|
12
|
+
* `local/conformance-fleet-0917/scope-lanes.md` Lane B/C in the pdpp repo).
|
|
13
|
+
* These types are derived directly from the spec text, not from PS's
|
|
14
|
+
* implementation — per that same plan's warning against reverse-engineering
|
|
15
|
+
* a vendor's behavior instead of the normative document.
|
|
16
|
+
*/
|
|
17
|
+
/** Spec §8 "Errors": every non-2xx response has this envelope. */
|
|
18
|
+
export interface PdppErrorBody {
|
|
19
|
+
error: {
|
|
20
|
+
type: PdppErrorType;
|
|
21
|
+
code: PdppErrorCode;
|
|
22
|
+
message: string;
|
|
23
|
+
param?: string;
|
|
24
|
+
request_id?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type PdppErrorType = "invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "gone_error" | "rate_limit_error" | "api_error";
|
|
28
|
+
/** Spec §8 error table, `#errors`. */
|
|
29
|
+
export type PdppErrorCode = "invalid_cursor" | "invalid_request" | "invalid_record" | "invalid_record_identity" | "invalid_expand" | "unknown_field" | "unsupported_version" | "authentication_error" | "field_not_granted" | "insufficient_scope" | "grant_stream_not_allowed" | "grant_time_range_exceeded" | "grant_expired" | "grant_revoked" | "grant_invalid" | "blob_not_found" | "not_found" | "cursor_expired" | "rate_limit_exceeded" | "api_error";
|
|
30
|
+
export interface PdppFreshness {
|
|
31
|
+
captured_at: string | null;
|
|
32
|
+
status: "current" | "stale" | "unknown";
|
|
33
|
+
last_attempted_at: string | null;
|
|
34
|
+
}
|
|
35
|
+
/** Spec §8 "List streams". */
|
|
36
|
+
export interface PdppStreamListItem {
|
|
37
|
+
object: "stream";
|
|
38
|
+
name: string;
|
|
39
|
+
record_count: number;
|
|
40
|
+
last_updated: string;
|
|
41
|
+
freshness?: PdppFreshness;
|
|
42
|
+
}
|
|
43
|
+
export interface PdppListStreamsResponse {
|
|
44
|
+
object: "list";
|
|
45
|
+
data: PdppStreamListItem[];
|
|
46
|
+
}
|
|
47
|
+
/** Spec §8 "Get stream metadata". Not grant-projected. */
|
|
48
|
+
export interface PdppStreamMetadata {
|
|
49
|
+
object: "stream_metadata";
|
|
50
|
+
name: string;
|
|
51
|
+
schema: Record<string, unknown>;
|
|
52
|
+
primary_key: string[];
|
|
53
|
+
cursor_field: string;
|
|
54
|
+
consent_time_field: string;
|
|
55
|
+
selection: {
|
|
56
|
+
fields: boolean;
|
|
57
|
+
resources: boolean;
|
|
58
|
+
};
|
|
59
|
+
query?: {
|
|
60
|
+
range_filters?: Record<string, Array<"gte" | "gt" | "lte" | "lt">>;
|
|
61
|
+
expand?: Array<{
|
|
62
|
+
name: string;
|
|
63
|
+
default_limit: number;
|
|
64
|
+
max_limit: number;
|
|
65
|
+
}>;
|
|
66
|
+
};
|
|
67
|
+
freshness?: PdppFreshness;
|
|
68
|
+
views?: Array<{
|
|
69
|
+
id: string;
|
|
70
|
+
label: string;
|
|
71
|
+
fields: string[];
|
|
72
|
+
}>;
|
|
73
|
+
relationships?: Array<{
|
|
74
|
+
name: string;
|
|
75
|
+
stream: string;
|
|
76
|
+
foreign_key: string;
|
|
77
|
+
cardinality: "has_one" | "has_many";
|
|
78
|
+
}>;
|
|
79
|
+
}
|
|
80
|
+
/** Spec §4 "The RECORD envelope" / §8 list-records response item. */
|
|
81
|
+
export interface PdppRecord {
|
|
82
|
+
object: "record";
|
|
83
|
+
id: string;
|
|
84
|
+
stream: string;
|
|
85
|
+
data: Record<string, unknown>;
|
|
86
|
+
emitted_at: string;
|
|
87
|
+
expanded?: Record<string, PdppRecord[] | PdppRecord>;
|
|
88
|
+
}
|
|
89
|
+
/** Spec §4 "Tombstones": present in `changes_since` responses for deletions. */
|
|
90
|
+
export interface PdppTombstone {
|
|
91
|
+
object: "tombstone";
|
|
92
|
+
id: string;
|
|
93
|
+
stream: string;
|
|
94
|
+
deleted_at: string;
|
|
95
|
+
}
|
|
96
|
+
/** Spec §8 "Non-fatal warnings", `meta.warnings[]`. */
|
|
97
|
+
export interface PdppWarning {
|
|
98
|
+
code: string;
|
|
99
|
+
message: string;
|
|
100
|
+
}
|
|
101
|
+
/** Spec §8 "List records" query parameters — the durable v0.1 base surface. */
|
|
102
|
+
export interface PdppListRecordsParams {
|
|
103
|
+
limit?: number;
|
|
104
|
+
cursor?: string;
|
|
105
|
+
order?: "asc" | "desc";
|
|
106
|
+
/** `filter[{field}]` and `filter[{field}][gte|gt|lte|lt]`, keyed by field name. */
|
|
107
|
+
filter?: Record<string, string | Partial<Record<"gte" | "gt" | "lte" | "lt", string>>>;
|
|
108
|
+
view?: string;
|
|
109
|
+
fields?: string[];
|
|
110
|
+
expand?: string[];
|
|
111
|
+
expand_limit?: Record<string, number>;
|
|
112
|
+
/** Opaque incremental-sync token — a distinct token space from `cursor`. */
|
|
113
|
+
changes_since?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface PdppListRecordsResponse {
|
|
116
|
+
object: "list";
|
|
117
|
+
url: string;
|
|
118
|
+
has_more: boolean;
|
|
119
|
+
next_cursor?: string;
|
|
120
|
+
/** Present only on the terminal page of a `changes_since` request. */
|
|
121
|
+
next_changes_since?: string;
|
|
122
|
+
freshness?: PdppFreshness;
|
|
123
|
+
data: Array<PdppRecord | PdppTombstone>;
|
|
124
|
+
meta?: {
|
|
125
|
+
warnings?: PdppWarning[];
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface PdppGetRecordParams {
|
|
129
|
+
expand?: string[];
|
|
130
|
+
}
|
|
131
|
+
/** Spec §8 API versioning: request/response header name and stable value used by this client. */
|
|
132
|
+
export declare const PDPP_VERSION_HEADER = "PDPP-Version";
|
|
133
|
+
export declare const PDPP_VERSION = "2026-04-06";
|
|
134
|
+
export declare const PDPP_REQUEST_ID_HEADER = "Request-Id";
|
|
135
|
+
//# sourceMappingURL=pdpp-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdpp-types.d.ts","sourceRoot":"","sources":["../../../src/__fixtures__/cg-pdpp-client/pdpp-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,aAAa,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAA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AY,eAAe,CAAC;AACzC,eAAO,MAAM,sBAAsB,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDPP Core §8 (Resource Server Interface) request/response types.
|
|
3
|
+
*
|
|
4
|
+
* Cited against `PDP-Connect/pdpp` `apps/site/content/docs/spec-core.md`
|
|
5
|
+
* section 8 (`#resource-server-interface`) as of 2026-09-17. This module is
|
|
6
|
+
* intentionally the *only* place that names PDPP wire shapes for the Client
|
|
7
|
+
* role — do not redeclare `PdppRecord`/`PdppListRecordsResponse`/etc. inline
|
|
8
|
+
* at a call site.
|
|
9
|
+
*
|
|
10
|
+
* PS's actual §8 endpoints have not landed yet (no PR in
|
|
11
|
+
* vana-com/personal-server-ts implements them as of this writing; see
|
|
12
|
+
* `local/conformance-fleet-0917/scope-lanes.md` Lane B/C in the pdpp repo).
|
|
13
|
+
* These types are derived directly from the spec text, not from PS's
|
|
14
|
+
* implementation — per that same plan's warning against reverse-engineering
|
|
15
|
+
* a vendor's behavior instead of the normative document.
|
|
16
|
+
*/
|
|
17
|
+
/** Spec §8 API versioning: request/response header name and stable value used by this client. */
|
|
18
|
+
export const PDPP_VERSION_HEADER = "PDPP-Version";
|
|
19
|
+
export const PDPP_VERSION = "2026-04-06";
|
|
20
|
+
export const PDPP_REQUEST_ID_HEADER = "Request-Id";
|
|
21
|
+
//# sourceMappingURL=pdpp-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdpp-types.js","sourceRoot":"","sources":["../../../src/__fixtures__/cg-pdpp-client/pdpp-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkJH,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC"}
|
package/dist/api-auth.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type SessionTokenVerifierPort } from "@opendatalabs/personal-server-ts-core/auth";
|
|
2
|
-
import type { PersonalServerApiAuthPort } from "@opendatalabs/personal-server-ts-core/api";
|
|
2
|
+
import type { PersonalServerApiAuthPort, PersonalServerScopeAuthInput } from "@opendatalabs/personal-server-ts-core/api";
|
|
3
3
|
import { type WriteProofReplayStore, type WriteSessionStore } from "@opendatalabs/personal-server-ts-core/write";
|
|
4
4
|
import type { DataStoragePort, RuntimeAvailabilityPort } from "@opendatalabs/personal-server-ts-core/ports";
|
|
5
|
+
import type { PdppAuthorizationService } from "@opendatalabs/personal-server-ts-core/ports/pdpp-auth";
|
|
5
6
|
import type { GatewayClient } from "@opendatalabs/vana-sdk/node";
|
|
6
7
|
export interface ServerApiAuthDeps {
|
|
7
8
|
serverOrigin: string | (() => string);
|
|
@@ -26,6 +27,21 @@ export interface ServerApiAuthDeps {
|
|
|
26
27
|
* are enabled; hosts may supply a shared store.
|
|
27
28
|
*/
|
|
28
29
|
writeProofReplayStore?: WriteProofReplayStore;
|
|
30
|
+
/**
|
|
31
|
+
* PDPP owner bearer bridge for the legacy reconciler path. When supplied,
|
|
32
|
+
* POST /v1/data/:scope and GET /v1/data/:scope/versions may accept a PDPP
|
|
33
|
+
* owner token, but only when the token's live instance scope maps to the
|
|
34
|
+
* legacy source namespace. It never authorizes DELETE or broad owner reads.
|
|
35
|
+
*/
|
|
36
|
+
pdppOwnerBearer?: {
|
|
37
|
+
auth: PdppAuthorizationService;
|
|
38
|
+
configuredMethods: Map<string, string[]>;
|
|
39
|
+
ownerSubjectId?: string;
|
|
40
|
+
instancesForSubject?: (subjectId: string) => string[];
|
|
41
|
+
instancesForSource?: (subjectId: string, sourceId: string) => string[];
|
|
42
|
+
};
|
|
29
43
|
}
|
|
30
|
-
export declare function createServerApiAuth(deps: ServerApiAuthDeps): PersonalServerApiAuthPort
|
|
44
|
+
export declare function createServerApiAuth(deps: ServerApiAuthDeps): PersonalServerApiAuthPort & {
|
|
45
|
+
authorizeOwnerScope(input: PersonalServerScopeAuthInput): Promise<void>;
|
|
46
|
+
};
|
|
31
47
|
//# sourceMappingURL=api-auth.d.ts.map
|
package/dist/api-auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-auth.d.ts","sourceRoot":"","sources":["../src/api-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EACV,yBAAyB,
|
|
1
|
+
{"version":3,"file":"api-auth.d.ts","sourceRoot":"","sources":["../src/api-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EACV,yBAAyB,EAGzB,4BAA4B,EAE7B,MAAM,2CAA2C,CAAC;AAKnD,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,6CAA6C,CAAC;AAKrD,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACjD,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C;;;;;OAKG;IACH,eAAe,CAAC,EAAE;QAChB,IAAI,EAAE,wBAAwB,CAAC;QAC/B,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACzC,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;QACtD,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;KACxE,CAAC;CACH;AAoDD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,iBAAiB,GACtB,yBAAyB,GAAG;IAC7B,mBAAmB,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE,CAwRA"}
|
package/dist/api-auth.js
CHANGED
|
@@ -18,6 +18,19 @@ async function authenticate(request, deps) {
|
|
|
18
18
|
serverOwner: deps.serverOwner,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
+
function bearerToken(request) {
|
|
22
|
+
const header = request.headers.get("authorization");
|
|
23
|
+
if (!header)
|
|
24
|
+
return undefined;
|
|
25
|
+
const match = /^Bearer\s+(.+)$/i.exec(header.trim());
|
|
26
|
+
return match?.[1]?.trim();
|
|
27
|
+
}
|
|
28
|
+
function legacyNamespace(scope) {
|
|
29
|
+
return scope.split(".", 1)[0] ?? "";
|
|
30
|
+
}
|
|
31
|
+
function pdppBridgeError(errorCode, message, details) {
|
|
32
|
+
return new ProtocolError(403, errorCode, message, details);
|
|
33
|
+
}
|
|
21
34
|
export function createServerApiAuth(deps) {
|
|
22
35
|
const writeProofReplayStore = deps.writeProofReplayStore ?? createInMemoryWriteProofReplayStore();
|
|
23
36
|
// The write-session half of this port is protocol, not runtime: the browser
|
|
@@ -49,6 +62,70 @@ export function createServerApiAuth(deps) {
|
|
|
49
62
|
});
|
|
50
63
|
}
|
|
51
64
|
}
|
|
65
|
+
async function authorizePdppOwnerBearerForScope(input) {
|
|
66
|
+
if (!deps.pdppOwnerBearer)
|
|
67
|
+
return false;
|
|
68
|
+
const token = bearerToken(input.request);
|
|
69
|
+
if (!token)
|
|
70
|
+
return false;
|
|
71
|
+
const context = await deps.pdppOwnerBearer.auth.resolveToken(token);
|
|
72
|
+
if (!context.active)
|
|
73
|
+
return false;
|
|
74
|
+
assertPdppOwnerBearerForScope(context, input.scope, deps);
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
function assertPdppOwnerBearerForScope(context, scope, authDeps) {
|
|
78
|
+
const bridge = authDeps.pdppOwnerBearer;
|
|
79
|
+
if (!bridge)
|
|
80
|
+
return;
|
|
81
|
+
if (context.tokenKind !== "owner") {
|
|
82
|
+
throw pdppBridgeError("PDPP_CLIENT_BEARER_NOT_OWNER", "PDPP client bearer tokens cannot authorize legacy data owner writes");
|
|
83
|
+
}
|
|
84
|
+
if (!context.subjectId ||
|
|
85
|
+
!bridge.ownerSubjectId ||
|
|
86
|
+
context.subjectId.toLowerCase() !== bridge.ownerSubjectId.toLowerCase()) {
|
|
87
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_FOREIGN", "PDPP owner bearer token belongs to a different subject", {
|
|
88
|
+
subjectId: context.subjectId,
|
|
89
|
+
expectedSubjectId: bridge.ownerSubjectId,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (context.sourceId) {
|
|
93
|
+
const namespace = legacyNamespace(scope);
|
|
94
|
+
const configured = bridge.configuredMethods.get(context.sourceId) ?? [];
|
|
95
|
+
const sourceNamespace = context.sourceId.split("/").filter(Boolean).at(-1) ?? context.sourceId;
|
|
96
|
+
if (namespace !== sourceNamespace || configured.length !== 1) {
|
|
97
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_SCOPE_MISMATCH", "PDPP owner bearer token is not scoped to the requested legacy source namespace", { scope, sourceId: context.sourceId });
|
|
98
|
+
}
|
|
99
|
+
if (context.instanceIds) {
|
|
100
|
+
const liveInstances = new Set(bridge.instancesForSource?.(context.subjectId, context.sourceId) ??
|
|
101
|
+
[]);
|
|
102
|
+
if (context.instanceIds.length === 0 ||
|
|
103
|
+
context.instanceIds.some((instance) => !liveInstances.has(instance))) {
|
|
104
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_FOREIGN", "PDPP owner bearer token is not scoped to currently available source instances", { sourceId: context.sourceId, instanceIds: context.instanceIds });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (!context.instanceIds || context.instanceIds.length !== 1) {
|
|
110
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_UNSCOPED_INSTANCE", "PDPP owner bearer token must be scoped to exactly one legacy source instance");
|
|
111
|
+
}
|
|
112
|
+
const currentInstances = bridge.instancesForSubject?.(context.subjectId);
|
|
113
|
+
if (!currentInstances || currentInstances.length === 0) {
|
|
114
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_FOREIGN", "PDPP owner bearer token is not scoped to a currently owned instance", { subjectId: context.subjectId });
|
|
115
|
+
}
|
|
116
|
+
const current = new Set(currentInstances);
|
|
117
|
+
const liveInstanceIds = context.instanceIds.filter((instance) => current.has(instance));
|
|
118
|
+
if (liveInstanceIds.length === 0) {
|
|
119
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_FOREIGN", "PDPP owner bearer token is not scoped to a currently owned instance", { subjectId: context.subjectId });
|
|
120
|
+
}
|
|
121
|
+
const namespace = legacyNamespace(scope);
|
|
122
|
+
const [liveInstance] = liveInstanceIds;
|
|
123
|
+
const matchesScope = liveInstance.split(":", 1)[0] === namespace &&
|
|
124
|
+
bridge.configuredMethods.has(liveInstance);
|
|
125
|
+
if (!matchesScope) {
|
|
126
|
+
throw pdppBridgeError("PDPP_OWNER_BEARER_SCOPE_MISMATCH", "PDPP owner bearer token is not scoped to the requested legacy source namespace", { scope, instanceIds: liveInstanceIds });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
52
129
|
/**
|
|
53
130
|
* Delegated ingest. A bearer token that resolves to a live write session
|
|
54
131
|
* authorizes as the session builder: the write policy re-runs against the
|
|
@@ -62,6 +139,8 @@ export function createServerApiAuth(deps) {
|
|
|
62
139
|
const delegated = await writeSessions.authorizeSessionWrite(input);
|
|
63
140
|
if (delegated)
|
|
64
141
|
return delegated;
|
|
142
|
+
if (await authorizePdppOwnerBearerForScope(input))
|
|
143
|
+
return;
|
|
65
144
|
await authorizeOwner(input.request);
|
|
66
145
|
}
|
|
67
146
|
/**
|
|
@@ -75,34 +154,47 @@ export function createServerApiAuth(deps) {
|
|
|
75
154
|
async function authorizeWriteSession(request) {
|
|
76
155
|
return writeSessions.recognizeWriteSession(request);
|
|
77
156
|
}
|
|
157
|
+
async function authorizeBuilderList(request, options) {
|
|
158
|
+
const result = await authenticate(request, deps);
|
|
159
|
+
if (result.isPolicyBypass ||
|
|
160
|
+
isOwner(result.auth.signer, deps.serverOwner)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
// A builder lists only what its grants cover, bound to this server's
|
|
164
|
+
// owner like a read; fail closed when we can't identify the owner.
|
|
165
|
+
// resolveDataListGrantScopes does the one builder lookup (and throws
|
|
166
|
+
// UnregisteredBuilderError), so no separate registration check here.
|
|
167
|
+
if (!deps.serverOwner)
|
|
168
|
+
throw serverNotConfigured();
|
|
169
|
+
const grantedScopes = await resolveDataListGrantScopes({
|
|
170
|
+
signer: result.auth.signer,
|
|
171
|
+
grantId: result.auth.payload.grantId ?? options?.grantId,
|
|
172
|
+
serverOwner: deps.serverOwner,
|
|
173
|
+
}, {
|
|
174
|
+
authSessionVerifier: deps.gateway,
|
|
175
|
+
grantVerifier: deps.gateway,
|
|
176
|
+
grantLister: deps.gateway,
|
|
177
|
+
runtimeAvailability: deps.runtimeAvailability,
|
|
178
|
+
});
|
|
179
|
+
return { grantedScopes };
|
|
180
|
+
}
|
|
78
181
|
return {
|
|
79
182
|
authorizeOwner,
|
|
80
183
|
authorizeWrite,
|
|
81
184
|
authorizeWriteSession,
|
|
82
|
-
async
|
|
83
|
-
|
|
84
|
-
if (result.isPolicyBypass ||
|
|
85
|
-
isOwner(result.auth.signer, deps.serverOwner)) {
|
|
185
|
+
async authorizeOwnerScope(input) {
|
|
186
|
+
if (await authorizePdppOwnerBearerForScope(input))
|
|
86
187
|
return;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
signer: result.auth.signer,
|
|
96
|
-
grantId: result.auth.payload.grantId ?? options?.grantId,
|
|
97
|
-
serverOwner: deps.serverOwner,
|
|
98
|
-
}, {
|
|
99
|
-
authSessionVerifier: deps.gateway,
|
|
100
|
-
grantVerifier: deps.gateway,
|
|
101
|
-
grantLister: deps.gateway,
|
|
102
|
-
runtimeAvailability: deps.runtimeAvailability,
|
|
103
|
-
});
|
|
104
|
-
return { grantedScopes };
|
|
188
|
+
await authorizeOwner(input.request);
|
|
189
|
+
},
|
|
190
|
+
async authorizeScopeVersions(input) {
|
|
191
|
+
if (await authorizePdppOwnerBearerForScope(input))
|
|
192
|
+
return;
|
|
193
|
+
// Any other credential is held to the listing rules: a builder sees the
|
|
194
|
+
// versions of a scope only when one of its grants covers it.
|
|
195
|
+
return authorizeBuilderList(input.request, { grantId: input.grantId });
|
|
105
196
|
},
|
|
197
|
+
authorizeBuilderList,
|
|
106
198
|
async authorizeBuilderRead(input) {
|
|
107
199
|
const result = await authenticate(input.request, deps);
|
|
108
200
|
if (result.isPolicyBypass) {
|
package/dist/api-auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-auth.js","sourceRoot":"","sources":["../src/api-auth.ts"],"names":[],"mappings":"AAAA,OAA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;YACrD,IAAI,CAAC,IAAI,CAAC,WAAW;gBAAE,MAAM,mBAAmB,EAAE,CAAC;YAEnD,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;gBAChD,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,oBAAoB,CACtC;gBACE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;gBAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO;gBACrD,cAAc,EAAE,KAAK,CAAC,KAAK;gBAC3B,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,aAAa,EAAE,MAAM,IAAI,SAAS;gBAC1D,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,EACD;gBACE,mBAAmB,EAAE,IAAI,CAAC,OAAO;gBACjC,aAAa,EAAE,IAAI,CAAC,OAAO;gBAC3B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;aAC9C,CACF,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QAC5D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/app.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DurableAdditionsService } from "@opendatalabs/personal-server-ts-core/additions";
|
|
1
2
|
import { Hono } from "hono";
|
|
2
3
|
import type { IndexManager } from "@opendatalabs/personal-server-ts-core/storage/index";
|
|
3
4
|
import type { HierarchyManagerOptions } from "@opendatalabs/personal-server-ts-core/storage/hierarchy";
|
|
@@ -9,7 +10,9 @@ import type { PersonalServerReadFulfillmentReporter } from "@opendatalabs/person
|
|
|
9
10
|
import { type HealthDeps } from "./routes/health.js";
|
|
10
11
|
import { type WriteProofReplayStore, type WriteSessionStore } from "@opendatalabs/personal-server-ts-core/write";
|
|
11
12
|
import { McpActivityRecorder, type McpConnectionStore, type McpOAuthAuthorizationStore, type McpScopeRequestApprovalUrlHook } from "@opendatalabs/personal-server-ts-core/mcp";
|
|
12
|
-
import
|
|
13
|
+
import { type PdppAuthRouteDeps } from "./routes/pdpp-auth.js";
|
|
14
|
+
import type { MutableDeclarationRegistry } from "./pdpp/declaration-registry.js";
|
|
15
|
+
import type { PdppImporter, ScopeDeletionTracker, SyncManager } from "@opendatalabs/personal-server-ts-core/sync";
|
|
13
16
|
import type { ServerSigner } from "@opendatalabs/personal-server-ts-core/signing";
|
|
14
17
|
import type { LineageGatewayPort } from "@opendatalabs/personal-server-ts-core/lineage";
|
|
15
18
|
import type { QuestionStore, RecomputeScheduler } from "@opendatalabs/personal-server-ts-core/derivatives";
|
|
@@ -18,12 +21,18 @@ import type { TokenStore } from "./token-store.js";
|
|
|
18
21
|
import type { Logger } from "pino";
|
|
19
22
|
import type { JobRequestEnvelope } from "@opendatalabs/vana-sdk/protocol/jobs";
|
|
20
23
|
import type { JobExecuteResponse } from "./jobs/types.js";
|
|
24
|
+
import { type PdppConnectionRouteDeps } from "./routes/pdpp-connections.js";
|
|
25
|
+
import type { createSqliteRecordStore } from "./storage/pdpp-records-sqlite-store.js";
|
|
26
|
+
import type { PdppAuthorizationService } from "@opendatalabs/personal-server-ts-core/ports/pdpp-auth";
|
|
27
|
+
import type { LegacyScopeViewPort } from "@opendatalabs/personal-server-ts-core/storage/legacy-scope-view";
|
|
28
|
+
import type { PdppRecordStore, StreamDeclarationRegistry } from "@opendatalabs/personal-server-ts-core/storage/pdpp-records";
|
|
21
29
|
export interface IdentityInfo {
|
|
22
30
|
address: `0x${string}`;
|
|
23
31
|
publicKey: `0x${string}`;
|
|
24
32
|
serverId: string | null;
|
|
25
33
|
}
|
|
26
34
|
export interface AppDeps {
|
|
35
|
+
additions?: DurableAdditionsService;
|
|
27
36
|
logger: Logger;
|
|
28
37
|
version: string;
|
|
29
38
|
startedAt: Date;
|
|
@@ -65,6 +74,8 @@ export interface AppDeps {
|
|
|
65
74
|
tokenStore?: TokenStore;
|
|
66
75
|
runtimeAvailability?: RuntimeAvailabilityPort;
|
|
67
76
|
dataStorage?: DataStoragePort;
|
|
77
|
+
/** Canonical latest bodies for GET /v1/data; absent = file reads only. */
|
|
78
|
+
legacyScopeView?: LegacyScopeViewPort;
|
|
68
79
|
/**
|
|
69
80
|
* Gateway base URL — wired into the data route so the GET handler can
|
|
70
81
|
* forward validated X-PAYMENTs to POST /v1/escrow/pay via direct fetch.
|
|
@@ -91,6 +102,14 @@ export interface AppDeps {
|
|
|
91
102
|
store: QuestionStore;
|
|
92
103
|
scheduler: RecomputeScheduler;
|
|
93
104
|
} | null;
|
|
105
|
+
/**
|
|
106
|
+
* PDPP record importer for locally-ingested envelopes. The bootstrap passes
|
|
107
|
+
* the same stable delegate it gives the sync download worker, so both
|
|
108
|
+
* arrival routes — gateway sync and local owner-authenticated POST —
|
|
109
|
+
* import through one importer into one store. Absent = no PDPP mounted,
|
|
110
|
+
* and `$pdpp` envelopes are stored and indexed exactly as before.
|
|
111
|
+
*/
|
|
112
|
+
pdppImporter?: PdppImporter;
|
|
94
113
|
getTunnelStatus?: HealthDeps["getTunnelStatus"];
|
|
95
114
|
/**
|
|
96
115
|
* Invoked when the /ui/api registration route confirms the server is
|
|
@@ -108,6 +127,27 @@ export interface AppDeps {
|
|
|
108
127
|
mcpConnectionStore?: McpConnectionStore;
|
|
109
128
|
mcpOAuthAuthorizationStore?: McpOAuthAuthorizationStore;
|
|
110
129
|
mcpOAuthApprovalUrl?: string | (() => string);
|
|
130
|
+
/**
|
|
131
|
+
* PDPP Core v0.1 Authorization Server. Absent = the `/pdpp/v1` surface is
|
|
132
|
+
* not mounted, and existing OAuth/MCP behavior is unchanged. This is a
|
|
133
|
+
* separate authority from `tokenStore`: PDPP tokens are grant-bound and
|
|
134
|
+
* live in their own store (spec §8 forbids a second grant authority behind
|
|
135
|
+
* one enforcement path).
|
|
136
|
+
*/
|
|
137
|
+
pdppAuth?: PdppAuthRouteDeps;
|
|
138
|
+
/** Connection registry routes can run with canonical record routes off. */
|
|
139
|
+
pdppConnections?: PdppConnectionRouteDeps;
|
|
140
|
+
/**
|
|
141
|
+
* Operator-authenticated declaration submission. Absent (or with no
|
|
142
|
+
* operator token) leaves the route unmounted and the declaration set
|
|
143
|
+
* exactly as config made it — the pre-existing behavior.
|
|
144
|
+
*/
|
|
145
|
+
pdppDeclarations?: {
|
|
146
|
+
registry: MutableDeclarationRegistry;
|
|
147
|
+
supportedConnectors: string[];
|
|
148
|
+
/** Absent = the route is not mounted at all. */
|
|
149
|
+
operatorToken?: string;
|
|
150
|
+
};
|
|
111
151
|
/** See `CreateServerOptions.mcpScopeRequestApprovalUrl`. */
|
|
112
152
|
mcpScopeRequestApprovalUrl?: McpScopeRequestApprovalUrlHook;
|
|
113
153
|
mcpActivityRecorder?: McpActivityRecorder;
|
|
@@ -125,6 +165,25 @@ export interface AppDeps {
|
|
|
125
165
|
writeProofReplayStore?: WriteProofReplayStore;
|
|
126
166
|
profile?: "standard" | "enclave";
|
|
127
167
|
jobWorker?: (envelope: JobRequestEnvelope) => Promise<JobExecuteResponse>;
|
|
168
|
+
/**
|
|
169
|
+
* PDPP §4/§8 record model + Resource Server query surface. Absent = the
|
|
170
|
+
* PDPP routes are not mounted; existing deployments are unaffected. When
|
|
171
|
+
* present, all three must be present together (record store, token
|
|
172
|
+
* resolution, and stream declarations are mutually required).
|
|
173
|
+
*/
|
|
174
|
+
pdpp?: {
|
|
175
|
+
store: PdppRecordStore;
|
|
176
|
+
bindingStore: ReturnType<typeof createSqliteRecordStore>;
|
|
177
|
+
configuredMethods: Map<string, string[]>;
|
|
178
|
+
auth: PdppAuthorizationService;
|
|
179
|
+
declarations: StreamDeclarationRegistry;
|
|
180
|
+
instancesForSubject?: (subjectId: string) => string[];
|
|
181
|
+
instancesForSource?: (subjectId: string, sourceId: string) => string[];
|
|
182
|
+
readBlobBytes?: (blobId: string) => Promise<Uint8Array<ArrayBuffer> | undefined>;
|
|
183
|
+
/** This resource server's own identifier, RFC 9728 `resource` member. */
|
|
184
|
+
resource: string;
|
|
185
|
+
authorizationServers?: string[];
|
|
186
|
+
};
|
|
128
187
|
}
|
|
129
188
|
export declare function createApp(deps: AppDeps): Hono;
|
|
130
189
|
//# sourceMappingURL=app.d.ts.map
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AACvG,OAAO,KAAK,EACV,4BAA4B,EAC5B,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AACvG,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKlE,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,6CAA6C,CAAC;AAcrD,OAAO,EACL,mBAAmB,EAGnB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACpC,MAAM,2CAA2C,CAAC;AASn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