dominus-sdk-nodejs 3.0.1 → 3.0.3
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 +4 -5
- package/dist/index.d.ts +22 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -27
- package/dist/index.js.map +1 -1
- package/dist/lib/cache.d.ts +1 -1
- package/dist/lib/cache.d.ts.map +1 -1
- package/dist/lib/cache.js +2 -2
- package/dist/lib/cache.js.map +1 -1
- package/dist/lib/client.d.ts +68 -16
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +217 -73
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +10 -5
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/crypto.d.ts +3 -3
- package/dist/lib/crypto.js +3 -3
- package/dist/lib/errors.d.ts +12 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +82 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/namespaces/artifacts.d.ts +15 -5
- package/dist/namespaces/artifacts.d.ts.map +1 -1
- package/dist/namespaces/artifacts.js +14 -7
- package/dist/namespaces/artifacts.js.map +1 -1
- package/dist/namespaces/auth.d.ts.map +1 -1
- package/dist/namespaces/auth.js +4 -5
- package/dist/namespaces/auth.js.map +1 -1
- package/dist/namespaces/authority.d.ts +502 -0
- package/dist/namespaces/authority.d.ts.map +1 -0
- package/dist/namespaces/authority.js +975 -0
- package/dist/namespaces/authority.js.map +1 -0
- package/dist/namespaces/db.d.ts +38 -2
- package/dist/namespaces/db.d.ts.map +1 -1
- package/dist/namespaces/db.js +50 -6
- package/dist/namespaces/db.js.map +1 -1
- package/dist/namespaces/files.d.ts +10 -2
- package/dist/namespaces/files.d.ts.map +1 -1
- package/dist/namespaces/files.js +9 -3
- package/dist/namespaces/files.js.map +1 -1
- package/dist/namespaces/health.d.ts +2 -6
- package/dist/namespaces/health.d.ts.map +1 -1
- package/dist/namespaces/health.js +9 -15
- package/dist/namespaces/health.js.map +1 -1
- package/dist/namespaces/logs.d.ts +2 -0
- package/dist/namespaces/logs.d.ts.map +1 -1
- package/dist/namespaces/logs.js +3 -1
- package/dist/namespaces/logs.js.map +1 -1
- package/dist/namespaces/portal.d.ts +1 -1
- package/dist/namespaces/portal.js +1 -1
- package/dist/namespaces/secrets.d.ts +34 -1
- package/dist/namespaces/secrets.d.ts.map +1 -1
- package/dist/namespaces/secrets.js +68 -4
- package/dist/namespaces/secrets.js.map +1 -1
- package/dist/namespaces/sync.d.ts +5 -1
- package/dist/namespaces/sync.d.ts.map +1 -1
- package/dist/namespaces/sync.js +4 -2
- package/dist/namespaces/sync.js.map +1 -1
- package/docs/architecture.md +6 -8
- package/docs/routes-services.md +15 -12
- package/docs/usage-reference.md +20 -20
- package/package.json +4 -4
- package/dist/namespaces/open.d.ts +0 -27
- package/dist/namespaces/open.d.ts.map +0 -1
- package/dist/namespaces/open.js +0 -46
- package/dist/namespaces/open.js.map +0 -1
- package/dist/namespaces/oracle/OracleSession.d.ts +0 -92
- package/dist/namespaces/oracle/OracleSession.d.ts.map +0 -1
- package/dist/namespaces/oracle/OracleSession.js +0 -219
- package/dist/namespaces/oracle/OracleSession.js.map +0 -1
- package/dist/namespaces/oracle/index.d.ts +0 -78
- package/dist/namespaces/oracle/index.d.ts.map +0 -1
- package/dist/namespaces/oracle/index.js +0 -87
- package/dist/namespaces/oracle/index.js.map +0 -1
- package/dist/namespaces/oracle/internal/AudioCapture.d.ts +0 -42
- package/dist/namespaces/oracle/internal/AudioCapture.d.ts.map +0 -1
- package/dist/namespaces/oracle/internal/AudioCapture.js +0 -316
- package/dist/namespaces/oracle/internal/AudioCapture.js.map +0 -1
- package/dist/namespaces/oracle/internal/OracleWebSocket.d.ts +0 -81
- package/dist/namespaces/oracle/internal/OracleWebSocket.d.ts.map +0 -1
- package/dist/namespaces/oracle/internal/OracleWebSocket.js +0 -209
- package/dist/namespaces/oracle/internal/OracleWebSocket.js.map +0 -1
- package/dist/namespaces/oracle/internal/VADGate.d.ts +0 -76
- package/dist/namespaces/oracle/internal/VADGate.d.ts.map +0 -1
- package/dist/namespaces/oracle/internal/VADGate.js +0 -260
- package/dist/namespaces/oracle/internal/VADGate.js.map +0 -1
- package/dist/namespaces/oracle/types.d.ts +0 -98
- package/dist/namespaces/oracle/types.d.ts.map +0 -1
- package/dist/namespaces/oracle/types.js +0 -28
- package/dist/namespaces/oracle/types.js.map +0 -1
package/dist/namespaces/logs.js
CHANGED
|
@@ -173,7 +173,7 @@ export class LogsNamespace {
|
|
|
173
173
|
* @param options.trace_id - Optional trace_id filter to return only events from a specific trace
|
|
174
174
|
*/
|
|
175
175
|
async tail(options = {}) {
|
|
176
|
-
const { minutes = 10, limit = 100, trace_id, since, company, subject, run_id, deploy_id, installation_id, artifact_ref, } = options;
|
|
176
|
+
const { minutes = 10, limit = 100, trace_id, since, level, company, subject, run_id, deploy_id, installation_id, artifact_ref, } = options;
|
|
177
177
|
const params = [];
|
|
178
178
|
if (minutes !== 10)
|
|
179
179
|
params.push(`minutes=${minutes}`);
|
|
@@ -183,6 +183,8 @@ export class LogsNamespace {
|
|
|
183
183
|
params.push(`trace_id=${trace_id}`);
|
|
184
184
|
if (since)
|
|
185
185
|
params.push(`since=${encodeURIComponent(since)}`);
|
|
186
|
+
if (level)
|
|
187
|
+
params.push(`level=${encodeURIComponent(level)}`);
|
|
186
188
|
if (company)
|
|
187
189
|
params.push(`company=${encodeURIComponent(company)}`);
|
|
188
190
|
if (subject)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/namespaces/logs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/namespaces/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,IAAI;aACjB,CAAC,CAAC;YACH,OAAO;gBACL,KAAK,EAAE,WAAW,CAAC,MAAM;gBACzB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,WAAW,CAAC,MAAM;gBAC3C,MAAM,EAAE,CAAC;aACV,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,8BAA8B;YAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,WAAW,CACd,KAAK,CAAC,KAAK,IAAI,MAAM,EACrB,KAAK,CAAC,OAAO,IAAI,EAAE,EACnB,KAAK,CAAC,OAAO,CACd,CAAC;YACJ,CAAC;YACD,OAAO;gBACL,KAAK,EAAE,MAAM,CAAC,MAAM;gBACpB,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -62,7 +62,7 @@ export declare class PortalNamespace {
|
|
|
62
62
|
constructor(client: DominusClient);
|
|
63
63
|
/**
|
|
64
64
|
* Login user with password.
|
|
65
|
-
* Uses 90 second timeout to
|
|
65
|
+
* Uses 90 second timeout to tolerate gateway-routed backend cold starts.
|
|
66
66
|
*
|
|
67
67
|
* @param username - Username or email
|
|
68
68
|
* @param password - User password
|
|
@@ -23,7 +23,7 @@ export class PortalNamespace {
|
|
|
23
23
|
// ========================================
|
|
24
24
|
/**
|
|
25
25
|
* Login user with password.
|
|
26
|
-
* Uses 90 second timeout to
|
|
26
|
+
* Uses 90 second timeout to tolerate gateway-routed backend cold starts.
|
|
27
27
|
*
|
|
28
28
|
* @param username - Username or email
|
|
29
29
|
* @param password - User password
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Secrets Namespace - Warden secrets management.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* CRUD for project secrets via /api/warden/secrets, routed through the Dominus
|
|
5
|
+
* gateway (same pattern as DB/Redis workers).
|
|
5
6
|
*/
|
|
6
7
|
import type { DominusClient } from '../lib/client.js';
|
|
7
8
|
export interface Secret {
|
|
@@ -46,5 +47,37 @@ export declare class SecretsNamespace {
|
|
|
46
47
|
* @returns Operation result
|
|
47
48
|
*/
|
|
48
49
|
delete(key: string): Promise<Record<string, unknown>>;
|
|
50
|
+
/**
|
|
51
|
+
* Read a platform secret via Secrets Worker (`/svc/secrets/get`).
|
|
52
|
+
* Use for global provisioning keys (e.g. `PROVISION_NEON_API_KEY`), distinct from
|
|
53
|
+
* Warden project-scoped secrets (`get` / `upsert` on `/api/warden/secrets`).
|
|
54
|
+
*/
|
|
55
|
+
getPlatformSecret(key: string): Promise<string | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Set a secret in Infisical for one environment (Secrets Worker `POST /svc/secrets/set`).
|
|
58
|
+
* `projectId` is the Dominus project row id used for routing.
|
|
59
|
+
*/
|
|
60
|
+
setProjectSecret(options: {
|
|
61
|
+
key: string;
|
|
62
|
+
value: string;
|
|
63
|
+
environment: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
}): Promise<Record<string, unknown>>;
|
|
66
|
+
/**
|
|
67
|
+
* Delete a secret for one environment (Secrets Worker `POST /svc/secrets/delete`).
|
|
68
|
+
*/
|
|
69
|
+
deleteProjectSecret(options: {
|
|
70
|
+
key: string;
|
|
71
|
+
environment: string;
|
|
72
|
+
projectId: string;
|
|
73
|
+
}): Promise<Record<string, unknown>>;
|
|
74
|
+
/**
|
|
75
|
+
* List secrets across Infisical environments for a project (Warden `list-all-environments`).
|
|
76
|
+
*/
|
|
77
|
+
listSecretsAllEnvironments(infisicalProjectId: string): Promise<{
|
|
78
|
+
secrets: Record<string, Record<string, string | undefined>>;
|
|
79
|
+
keys: string[];
|
|
80
|
+
count: number;
|
|
81
|
+
}>;
|
|
49
82
|
}
|
|
50
83
|
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/namespaces/secrets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/namespaces/secrets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;;;;OAKG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IASnD;;;;;;;OAOG;IACG,MAAM,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,CAAC;IAoCxB;;;;;OAKG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAgBpE;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAQ3D;;;;OAIG;IACG,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAajE;;;OAGG;IACG,gBAAgB,CAAC,OAAO,EAAE;QAC9B,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAapC;;OAEG;IACG,mBAAmB,CAAC,OAAO,EAAE;QACjC,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAYpC;;OAEG;IACG,0BAA0B,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC;QACpE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;QAC5D,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CAOH"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Secrets Namespace - Warden secrets management.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* CRUD for project secrets via /api/warden/secrets, routed through the Dominus
|
|
5
|
+
* gateway (same pattern as DB/Redis workers).
|
|
5
6
|
*/
|
|
6
7
|
export class SecretsNamespace {
|
|
7
8
|
client;
|
|
@@ -18,6 +19,7 @@ export class SecretsNamespace {
|
|
|
18
19
|
const result = await this.client.request({
|
|
19
20
|
endpoint: '/api/warden/secrets',
|
|
20
21
|
body: { action: 'get', key },
|
|
22
|
+
useGateway: true,
|
|
21
23
|
});
|
|
22
24
|
return result.secret?.value;
|
|
23
25
|
}
|
|
@@ -42,18 +44,21 @@ export class SecretsNamespace {
|
|
|
42
44
|
const result = await this.client.request({
|
|
43
45
|
endpoint: '/api/warden/secrets',
|
|
44
46
|
body,
|
|
47
|
+
useGateway: true,
|
|
45
48
|
});
|
|
46
49
|
return { ...result, operation: 'updated' };
|
|
47
50
|
}
|
|
48
51
|
catch (error) {
|
|
49
52
|
// If update fails (secret doesn't exist), try create
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
const status = error instanceof Error && 'statusCode' in error
|
|
54
|
+
? error.statusCode
|
|
55
|
+
: undefined;
|
|
56
|
+
if (status === 500) {
|
|
53
57
|
body.action = 'create';
|
|
54
58
|
const result = await this.client.request({
|
|
55
59
|
endpoint: '/api/warden/secrets',
|
|
56
60
|
body,
|
|
61
|
+
useGateway: true,
|
|
57
62
|
});
|
|
58
63
|
return { ...result, operation: 'created' };
|
|
59
64
|
}
|
|
@@ -74,6 +79,7 @@ export class SecretsNamespace {
|
|
|
74
79
|
const result = await this.client.request({
|
|
75
80
|
endpoint: '/api/warden/secrets',
|
|
76
81
|
body,
|
|
82
|
+
useGateway: true,
|
|
77
83
|
});
|
|
78
84
|
return result.secrets || [];
|
|
79
85
|
}
|
|
@@ -87,6 +93,64 @@ export class SecretsNamespace {
|
|
|
87
93
|
return this.client.request({
|
|
88
94
|
endpoint: '/api/warden/secrets',
|
|
89
95
|
body: { action: 'delete', key },
|
|
96
|
+
useGateway: true,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Read a platform secret via Secrets Worker (`/svc/secrets/get`).
|
|
101
|
+
* Use for global provisioning keys (e.g. `PROVISION_NEON_API_KEY`), distinct from
|
|
102
|
+
* Warden project-scoped secrets (`get` / `upsert` on `/api/warden/secrets`).
|
|
103
|
+
*/
|
|
104
|
+
async getPlatformSecret(key) {
|
|
105
|
+
const data = await this.client.request({
|
|
106
|
+
endpoint: '/api/secrets/get',
|
|
107
|
+
method: 'POST',
|
|
108
|
+
body: { key },
|
|
109
|
+
});
|
|
110
|
+
const v = data?.value;
|
|
111
|
+
if (v === undefined || v === '') {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
return v;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Set a secret in Infisical for one environment (Secrets Worker `POST /svc/secrets/set`).
|
|
118
|
+
* `projectId` is the Dominus project row id used for routing.
|
|
119
|
+
*/
|
|
120
|
+
async setProjectSecret(options) {
|
|
121
|
+
return this.client.request({
|
|
122
|
+
endpoint: '/api/secrets/set',
|
|
123
|
+
method: 'POST',
|
|
124
|
+
body: {
|
|
125
|
+
key: options.key,
|
|
126
|
+
value: options.value,
|
|
127
|
+
environment: options.environment,
|
|
128
|
+
target_project_id: options.projectId,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Delete a secret for one environment (Secrets Worker `POST /svc/secrets/delete`).
|
|
134
|
+
*/
|
|
135
|
+
async deleteProjectSecret(options) {
|
|
136
|
+
return this.client.request({
|
|
137
|
+
endpoint: '/api/secrets/delete',
|
|
138
|
+
method: 'POST',
|
|
139
|
+
body: {
|
|
140
|
+
key: options.key,
|
|
141
|
+
environment: options.environment,
|
|
142
|
+
target_project_id: options.projectId,
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* List secrets across Infisical environments for a project (Warden `list-all-environments`).
|
|
148
|
+
*/
|
|
149
|
+
async listSecretsAllEnvironments(infisicalProjectId) {
|
|
150
|
+
return this.client.request({
|
|
151
|
+
endpoint: '/api/warden/secrets',
|
|
152
|
+
body: { action: 'list-all-environments', project_id: infisicalProjectId },
|
|
153
|
+
useGateway: true,
|
|
90
154
|
});
|
|
91
155
|
}
|
|
92
156
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/namespaces/secrets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/namespaces/secrets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,MAAM,OAAO,gBAAgB;IACP;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C;;;;;OAKG;IACH,KAA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AO,CAAC;YACzB,QAAQ,EAAE,kBAAkB;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,iBAAiB,EAAE,OAAO,CAAC,SAAS;aACrC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CAAC,OAIzB;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,QAAQ,EAAE,qBAAqB;YAC/B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,iBAAiB,EAAE,OAAO,CAAC,SAAS;aACrC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,0BAA0B,CAAC,kBAA0B;QAKzD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,QAAQ,EAAE,qBAAqB;YAC/B,IAAI,EAAE,EAAE,MAAM,EAAE,uBAAuB,EAAE,UAAU,EAAE,kBAAkB,EAAE;YACzE,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -30,8 +30,12 @@ export declare class SyncNamespace {
|
|
|
30
30
|
* into Cloudflare KV. Purges stale entries and re-seeds current data.
|
|
31
31
|
*
|
|
32
32
|
* Requires admin system level.
|
|
33
|
+
*
|
|
34
|
+
* @param options.timeout - Request timeout in ms (default 60000; Mothership uses 180000)
|
|
33
35
|
*/
|
|
34
|
-
triggerSync(
|
|
36
|
+
triggerSync(options?: {
|
|
37
|
+
timeout?: number;
|
|
38
|
+
}): Promise<SyncResult>;
|
|
35
39
|
/**
|
|
36
40
|
* Check sync worker health.
|
|
37
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/namespaces/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/namespaces/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;;;;;;;;OASG;IACG,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAStE;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC;CAOvC"}
|
package/dist/namespaces/sync.js
CHANGED
|
@@ -17,13 +17,15 @@ export class SyncNamespace {
|
|
|
17
17
|
* into Cloudflare KV. Purges stale entries and re-seeds current data.
|
|
18
18
|
*
|
|
19
19
|
* Requires admin system level.
|
|
20
|
+
*
|
|
21
|
+
* @param options.timeout - Request timeout in ms (default 60000; Mothership uses 180000)
|
|
20
22
|
*/
|
|
21
|
-
async triggerSync() {
|
|
23
|
+
async triggerSync(options) {
|
|
22
24
|
return this.client.request({
|
|
23
25
|
endpoint: '/api/sync/',
|
|
24
26
|
method: 'POST',
|
|
25
27
|
useGateway: true,
|
|
26
|
-
timeout: 60000,
|
|
28
|
+
timeout: options?.timeout ?? 60000,
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/namespaces/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwBH,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/namespaces/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwBH,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C;;;;;;;;;OASG;IACH,KAAK,CAAC,WAAW,CAAC,OAA8B;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,QAAQ,EAAE,YAAY;YACtB,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,KAAK;SACnC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,QAAQ,EAAE,kBAAkB;YAC5B,MAAM,EAAE,KAAK;YACb,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/docs/architecture.md
CHANGED
|
@@ -81,16 +81,14 @@ See [routes-services.md](./routes-services.md) for full route/service assessment
|
|
|
81
81
|
- Multipart binary upload: `binaryUpload()`.
|
|
82
82
|
- Binary download to `Buffer`: `binaryDownload()`.
|
|
83
83
|
|
|
84
|
-
## 8.
|
|
84
|
+
## 8. Speech APIs
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Speech routes are owned by agent-runtime through the `dominus.ai` namespace:
|
|
87
87
|
|
|
88
|
-
- `dominus.stt
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- WebSocket streaming (`/api/oracle/stream`)
|
|
93
|
-
- This subsystem requires browser APIs (`navigator.mediaDevices`, Web Audio). It is not purely server-side Node behavior.
|
|
88
|
+
- `dominus.ai.stt(audio, options?)` -> `POST /api/agent/stt`
|
|
89
|
+
- `dominus.ai.tts(text, options?)` -> `POST /api/agent/tts`
|
|
90
|
+
|
|
91
|
+
The legacy streaming STT namespace (`dominus.stt`) is retired in hard cutover.
|
|
94
92
|
|
|
95
93
|
## 9. Documentation Topology
|
|
96
94
|
|
package/docs/routes-services.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This assessment is derived from all public namespace methods under `src/namespaces/` and their configured routes in SDK request calls.
|
|
4
4
|
|
|
5
|
-
Audited commands: **
|
|
5
|
+
Audited commands: **412** across **26** namespace surfaces.
|
|
6
6
|
|
|
7
7
|
## Service Matrix
|
|
8
8
|
|
|
@@ -11,30 +11,32 @@ Audited commands: **379** across **25** namespace surfaces.
|
|
|
11
11
|
| `guardian` | 146 | dominus.auth | 146 | HTTP API routes via Dominus client. |
|
|
12
12
|
| `agent-runtime` | 53 | dominus.ai, dominus.ai.artifacts, dominus.ai.rag, dominus.ai.results, dominus.ai.tools, dominus.ai.workflow | 51 | HTTP API routes via Dominus client. |
|
|
13
13
|
| `workflow-manager` | 38 | dominus.workflow | 36 | HTTP API routes via Dominus client. |
|
|
14
|
+
| `authority` | 33 | dominus.authority | 33 | Hard-cut app/org/env Authority surface. |
|
|
14
15
|
| `portal-worker` | 22 | dominus.portal | 22 | HTTP API routes via Dominus client. |
|
|
15
16
|
| `db-worker` | 20 | dominus.db, dominus.ddl | 19 | HTTP API routes via Dominus client. |
|
|
16
17
|
| `smith` | 15 | dominus.ddl | 15 | HTTP API routes via Dominus client. |
|
|
17
18
|
| `b2-worker` | 14 | dominus.files | 14 | HTTP API routes via Dominus client. |
|
|
18
19
|
| `redis-worker` | 14 | dominus.redis | 14 | HTTP API routes via Dominus client. |
|
|
19
20
|
| `logs-worker` | 9 | dominus.logs | 4 | HTTP API routes via Dominus client. |
|
|
20
|
-
| `scribe` |
|
|
21
|
+
| `scribe` | 7 | dominus.secure | 7 | HTTP API routes via Dominus client. |
|
|
21
22
|
| `job-worker` | 8 | dominus.jobs | 6 | HTTP API routes via Dominus client. |
|
|
22
23
|
| `artifact-worker` | 6 | dominus.artifacts | 6 | HTTP API routes via Dominus client. |
|
|
23
24
|
| `admin-worker` | 5 | dominus.admin, dominus.files | 5 | HTTP API routes via Dominus client. |
|
|
24
|
-
| `warden` |
|
|
25
|
+
| `warden` | 4 | dominus.secrets | 1 | Selected-scope grant semantics live in this group. |
|
|
25
26
|
| `courier-worker` | 5 | dominus.courier | 2 | HTTP API routes via Dominus client. |
|
|
26
|
-
| `
|
|
27
|
+
| `gateway-local` | 4 | dominus.auth, dominus.health | 3 | Gateway `/health`, `/v1/ping`, and `/jwt/jwks` helpers. |
|
|
27
28
|
| `processor-service` | 3 | dominus.processor | 3 | HTTP API routes via Dominus client. |
|
|
28
29
|
| `sync-worker` | 2 | dominus.sync | 2 | HTTP API routes via Dominus client. |
|
|
29
30
|
| `local-jwt` | 1 | dominus.auth | 1 | Local JWT parsing/validation helpers in auth namespace. |
|
|
30
|
-
| `
|
|
31
|
+
| `retired-stt` | 0 | (retired) | 0 | Legacy streaming STT namespace/routes are removed in hard cutover. |
|
|
31
32
|
|
|
32
33
|
## Route Prefix Mapping
|
|
33
34
|
|
|
34
35
|
| Prefix | Primary Namespace(s) | Expected Backend |
|
|
35
36
|
|---|---|---|
|
|
36
|
-
| `/api/warden/*` | secrets
|
|
37
|
+
| `/api/warden/*` | secrets | `warden` |
|
|
37
38
|
| `/api/guardian/*` | auth | `guardian` |
|
|
39
|
+
| `/api/authority/*` | authority | `authority` |
|
|
38
40
|
| `/api/portal/*` | portal | `portal-worker` |
|
|
39
41
|
| `/api/database/* and /api/provision/*` | db, ddl (builder + provisioning) | `db-worker` |
|
|
40
42
|
| `/api/scribe/*` | secure, open | `scribe` |
|
|
@@ -43,7 +45,7 @@ Audited commands: **379** across **25** namespace surfaces.
|
|
|
43
45
|
| `/api/archivist/*` | files | `b2-worker` |
|
|
44
46
|
| `/api/courier/*` | courier | `courier-worker` |
|
|
45
47
|
| `/api/logs/*` | logs | `logs-worker` |
|
|
46
|
-
| `/
|
|
48
|
+
| `/health`, `/v1/ping` | health | `gateway-local` |
|
|
47
49
|
| `/api/admin/*` | admin, files.factoryReset | `admin-worker` |
|
|
48
50
|
| `/api/sync/*` | sync | `sync-worker` |
|
|
49
51
|
| `/api/job/*` | jobs | `job-worker` |
|
|
@@ -51,14 +53,15 @@ Audited commands: **379** across **25** namespace surfaces.
|
|
|
51
53
|
| `/api/artifact/*` | artifacts | `artifact-worker` |
|
|
52
54
|
| `/api/rag/*, /api/agent/*, /api/llm/*, /api/results/*, /api/orchestration/*, /api/session/*` | ai, ai.rag, ai.tools, ai.workflow, ai.results | `agent-runtime` |
|
|
53
55
|
| `/api/workflow/*` | workflow | `workflow-manager` |
|
|
54
|
-
| `/api/
|
|
56
|
+
| `/api/agent/stt` | ai.stt | `agent-runtime` |
|
|
55
57
|
|
|
56
|
-
## Local and
|
|
58
|
+
## Local and Helper Operations
|
|
57
59
|
|
|
58
60
|
- `dominus.auth.validateJwt` performs local payload checks and expiry validation; it is not a full remote introspection endpoint.
|
|
59
|
-
- `dominus.auth.getJwks` fetches and caches public signing keys from `/
|
|
60
|
-
- `dominus.health.check` uses direct `fetch` to `/
|
|
61
|
-
- `dominus.stt
|
|
61
|
+
- `dominus.auth.getJwks` fetches and caches public signing keys from `/jwt/jwks`.
|
|
62
|
+
- `dominus.health.check` uses direct `fetch` to the gateway `/health` route for low-level availability checks.
|
|
63
|
+
- `dominus.ai.stt` sends binary audio to `POST /api/agent/stt` for batch transcription.
|
|
64
|
+
- `dominus.authority.*` uses the cutover `appSlug` / `env` / `targetOrgId` / `targetAppSlug` / `targetEnv` vocabulary; `contextResolve()` and `mintSelectedScopeJwt()` now send the canonical `org_id` / `app_slug` / `env` and `target_org_id` / `target_env` wire payloads expected by live gateway routes.
|
|
62
65
|
- Convenience wrappers like `dominus.courier.sendWelcome` delegate to core routes (for example `/api/courier/send`).
|
|
63
66
|
|
|
64
67
|
## Coverage Notes
|
package/docs/usage-reference.md
CHANGED
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Generated from `src/namespaces/**/*.ts` method signatures and JSDoc comments.
|
|
4
4
|
|
|
5
|
-
Total namespaced commands: **
|
|
5
|
+
Total namespaced commands: **412**.
|
|
6
6
|
|
|
7
7
|
Columns: `Command` is the method path on the singleton, `Params` is the expected parameter signature, `Returns` is the declared TypeScript return type, `Route` is the backend endpoint (or local behavior), and `What it does` is the method summary.
|
|
8
8
|
|
|
9
|
+
## dominus.authority
|
|
10
|
+
|
|
11
|
+
Source: `src/namespaces/authority.ts` (AuthorityNamespace)
|
|
12
|
+
|
|
13
|
+
Public scope vocabulary uses `appSlug` / `env` / `targetOrgId` / `targetAppSlug` / `targetEnv`, plus `sharedAppSlug` and `storageAppSlug` / `storageEnv` where applicable. Backend wire payloads still use the current internal snake_case names.
|
|
14
|
+
|
|
15
|
+
| Command family | Public options | Backend wire names |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| Runs, companies, deploys, managed-client lifecycle, timelines, workflow publication/bindings | `appSlug`, `env`, `targetOrgId`, `targetAppSlug`, `targetEnv`, `sharedAppSlug` | `project_slug`, `environment`, `target_project_id`, `target_project_slug`, `target_environment`, `shared_project_slug` |
|
|
18
|
+
| `publishClientRelease` | `storageAppSlug`, `storageEnv` | `storage_project_slug`, `storage_environment` |
|
|
19
|
+
| `contextResolve` | `orgId`, `appSlug`, `env`, `targetOrgId`, `targetAppSlug`, `targetEnv`, `sharedAppSlug` | `project_id`, `project_slug`, `environment`, `target_project_id`, `target_project_slug`, `target_environment`, `shared_project_slug` |
|
|
20
|
+
| `mintSelectedScopeJwt` | `targetOrgId`, `targetEnv` | `target_project_id`, `target_environment` |
|
|
21
|
+
|
|
9
22
|
## dominus.secrets
|
|
10
23
|
|
|
11
24
|
Source: `src/namespaces/secrets.ts` (SecretsNamespace)
|
|
@@ -243,7 +256,7 @@ Source: `src/namespaces/auth.ts` (AuthNamespace)
|
|
|
243
256
|
| `dominus.auth.getSecureTableScopes` | `secureTableId: string` | `Promise<Array<Record<string, unknown>>>` | `GET /api/guardian/secure-tables/${secureTableId}/scopes` | Execute get secure table scopes. |
|
|
244
257
|
| `dominus.auth.addSecureTableScopes` | `secureTableId: string, scopeIds: string[]` | `Promise<Record<string, unknown>>` | `POST /api/guardian/secure-tables/${secureTableId}/scopes` | Execute add secure table scopes. |
|
|
245
258
|
| `dominus.auth.removeSecureTableScopes` | `secureTableId: string, scopeIds: string[]` | `Promise<Record<string, unknown>>` | `DELETE /api/guardian/secure-tables/${secureTableId}/scopes` | Execute remove secure table scopes. |
|
|
246
|
-
| `dominus.auth.getJwks` | `none` | `Promise<Record<string, unknown>>` | `GET /
|
|
259
|
+
| `dominus.auth.getJwks` | `none` | `Promise<Record<string, unknown>>` | `GET /jwt/jwks (direct fetch; public endpoint)` | Get JWKS (JSON Web Key Set) for token verification. |
|
|
247
260
|
| `dominus.auth.validateJwt` | `token: string` | `Promise<Record<string, unknown>>` | `local verification (invokes getJwks cache when needed)` | Execute validate jwt. |
|
|
248
261
|
|
|
249
262
|
## dominus.ddl
|
|
@@ -355,32 +368,19 @@ Source: `src/namespaces/courier.ts` (CourierNamespace)
|
|
|
355
368
|
| `dominus.courier.listDeliveries` | `filters?: CourierDeliveryFilters` | `Promise<{ items: CourierDelivery[] }>` | `GET /api/courier/admin/deliveries` | List courier deliveries with optional filters. |
|
|
356
369
|
| `dominus.courier.getDelivery` | `deliveryId: string` | `Promise<CourierDeliveryDetail>` | `GET /api/courier/admin/deliveries/${deliveryId}` | Get a delivery and its attempts. |
|
|
357
370
|
|
|
358
|
-
## dominus.open
|
|
359
|
-
|
|
360
|
-
Source: `src/namespaces/open.ts` (OpenNamespace)
|
|
361
|
-
|
|
362
|
-
| Command | Params | Returns | Route | What it does |
|
|
363
|
-
|---|---|---|---|---|
|
|
364
|
-
| `dominus.open.dsn` | `none` | `Promise<string>` | `GET /api/scribe/open/dsn` | Get the PostgreSQL connection DSN. |
|
|
365
|
-
| `dominus.open.execute` | `sql: string, params?: Record<string, unknown>` | `Promise<Record<string, unknown>>` | `POST /api/scribe/open/execute` | Execute raw SQL query. |
|
|
366
|
-
|
|
367
371
|
## dominus.health
|
|
368
372
|
|
|
369
373
|
Source: `src/namespaces/health.ts` (HealthNamespace)
|
|
370
374
|
|
|
371
375
|
| Command | Params | Returns | Route | What it does |
|
|
372
376
|
|---|---|---|---|---|
|
|
373
|
-
| `dominus.health.check` | `none` | `Promise<HealthStatus>` | `GET /
|
|
374
|
-
| `dominus.health.ping` | `none` | `Promise<{ status: string }>` | `GET /
|
|
375
|
-
| `dominus.health.warmup` | `none` | `Promise<Record<string, unknown>>` | `GET /api/health/warmup` | Warmup request (triggers cold start if needed). |
|
|
377
|
+
| `dominus.health.check` | `none` | `Promise<HealthStatus>` | `GET /health (direct gateway fetch)` | Probe the live gateway health route. |
|
|
378
|
+
| `dominus.health.ping` | `none` | `Promise<{ status: string }>` | `GET /v1/ping` | Probe the live gateway ping route and normalize the pong payload. |
|
|
376
379
|
|
|
377
|
-
## dominus.stt
|
|
380
|
+
## dominus.stt (retired)
|
|
378
381
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
| Command | Params | Returns | Route | What it does |
|
|
382
|
-
|---|---|---|---|---|
|
|
383
|
-
| `dominus.stt.createSession` | `userToken: string, options?: OracleSessionOptions` | `OracleSession` | `WebSocket /api/oracle/stream (created by OracleSession)` | Create a streaming transcription session. |
|
|
382
|
+
The legacy streaming STT namespace is removed in hard cutover.
|
|
383
|
+
Use `dominus.ai.stt` (`POST /api/agent/stt`) for speech-to-text.
|
|
384
384
|
|
|
385
385
|
## dominus.admin
|
|
386
386
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominus-sdk-nodejs",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "Node.js SDK for the Dominus
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "Node.js SDK for the Dominus gateway-first platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
22
|
"prepublishOnly": "npm run build",
|
|
23
|
-
"test": "npm run build && node --test tests/workflow-lifecycle.test.js tests/logs.test.js tests/public-exports.test.js",
|
|
23
|
+
"test": "npm run build && node --test tests/auth.test.js tests/health.test.js tests/workflow-lifecycle.test.js tests/logs.test.js tests/public-exports.test.js tests/authority-contract.test.js tests/error-contract.test.js",
|
|
24
24
|
"lint": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"dominus",
|
|
28
28
|
"carebridge",
|
|
29
29
|
"sdk",
|
|
30
|
-
"
|
|
30
|
+
"gateway",
|
|
31
31
|
"api"
|
|
32
32
|
],
|
|
33
33
|
"author": "CareBridge Systems",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Open Namespace - Direct database access operations.
|
|
3
|
-
*
|
|
4
|
-
* Provides DSN retrieval and raw SQL execution for advanced use cases.
|
|
5
|
-
*/
|
|
6
|
-
import type { DominusClient } from '../lib/client.js';
|
|
7
|
-
export declare class OpenNamespace {
|
|
8
|
-
private client;
|
|
9
|
-
constructor(client: DominusClient);
|
|
10
|
-
/**
|
|
11
|
-
* Get the PostgreSQL connection DSN.
|
|
12
|
-
*
|
|
13
|
-
* Returns the complete PostgreSQL connection URI that can be
|
|
14
|
-
* used directly by clients to connect to the database.
|
|
15
|
-
*/
|
|
16
|
-
dsn(): Promise<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Execute raw SQL query.
|
|
19
|
-
*
|
|
20
|
-
* Use with caution - this bypasses most safety checks.
|
|
21
|
-
*
|
|
22
|
-
* @param sql - SQL query string
|
|
23
|
-
* @param params - Optional parameter dictionary
|
|
24
|
-
*/
|
|
25
|
-
execute(sql: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=open.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../src/namespaces/open.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,qBAAa,aAAa;IACZ,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC;;;;;OAKG;IACG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;IAY5B;;;;;;;OAOG;IACG,OAAO,CACX,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAWpC"}
|
package/dist/namespaces/open.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Open Namespace - Direct database access operations.
|
|
3
|
-
*
|
|
4
|
-
* Provides DSN retrieval and raw SQL execution for advanced use cases.
|
|
5
|
-
*/
|
|
6
|
-
export class OpenNamespace {
|
|
7
|
-
client;
|
|
8
|
-
constructor(client) {
|
|
9
|
-
this.client = client;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get the PostgreSQL connection DSN.
|
|
13
|
-
*
|
|
14
|
-
* Returns the complete PostgreSQL connection URI that can be
|
|
15
|
-
* used directly by clients to connect to the database.
|
|
16
|
-
*/
|
|
17
|
-
async dsn() {
|
|
18
|
-
const result = await this.client.request({
|
|
19
|
-
endpoint: '/api/scribe/open/dsn',
|
|
20
|
-
method: 'GET',
|
|
21
|
-
});
|
|
22
|
-
if (typeof result === 'string') {
|
|
23
|
-
return result;
|
|
24
|
-
}
|
|
25
|
-
return result.dsn || result.connection_string || '';
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Execute raw SQL query.
|
|
29
|
-
*
|
|
30
|
-
* Use with caution - this bypasses most safety checks.
|
|
31
|
-
*
|
|
32
|
-
* @param sql - SQL query string
|
|
33
|
-
* @param params - Optional parameter dictionary
|
|
34
|
-
*/
|
|
35
|
-
async execute(sql, params) {
|
|
36
|
-
const body = { sql };
|
|
37
|
-
if (params) {
|
|
38
|
-
body.params = params;
|
|
39
|
-
}
|
|
40
|
-
return this.client.request({
|
|
41
|
-
endpoint: '/api/scribe/open/execute',
|
|
42
|
-
body,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=open.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open.js","sourceRoot":"","sources":["../../src/namespaces/open.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C;;;;;OAKG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwD;YAC9F,QAAQ,EAAE,sBAAsB;YAChC,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QAEH,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC;IACtD,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,CACX,GAAW,EACX,MAAgC;QAEhC,MAAM,IAAI,GAA4B,EAAE,GAAG,EAAE,CAAC;QAC9C,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,QAAQ,EAAE,0BAA0B;YACpC,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
|