@gokiteam/goki-dev 0.2.1 → 0.2.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/cli/NgrokManager.js +22 -9
- package/config.development +0 -1
- package/docker-compose.dev.yml +1 -1
- package/docker-compose.yml +1 -1
- package/package.json +19 -24
- package/src/api/firestore/Controllers.js +14 -0
- package/src/api/firestore/Logic.js +74 -1
- package/src/api/firestore/Router.js +2 -0
- package/src/api/firestore/Schemas.js +160 -0
- package/src/api/snapshots/Logic.js +2 -5
- package/src/configs/Application.js +3 -1
- package/src/mcp/tools/data.js +8 -3
- package/src/mcp/tools/docker.js +6 -2
- package/src/mcp/tools/firestore.js +49 -2
- package/src/mcp/tools/functions.js +15 -4
- package/src/mcp/tools/httpTraffic.js +6 -1
- package/src/mcp/tools/logging.js +10 -1
- package/src/mcp/tools/mqtt.js +2 -0
- package/src/mcp/tools/postgres.js +9 -1
- package/src/mcp/tools/pubsub.js +18 -4
- package/src/mcp/tools/redis.js +10 -2
- package/src/mcp/tools/services.js +11 -3
- package/src/mcp/tools/snapshots.js +6 -2
- package/src/mcp/tools/webhooks.js +5 -1
- package/src/singletons/SqliteStore.js +6 -1
- package/client/dist/client.d.ts +0 -380
- package/client/dist/client.js +0 -557
- package/client/dist/helpers.d.ts +0 -62
- package/client/dist/helpers.js +0 -122
- package/client/dist/index.d.ts +0 -59
- package/client/dist/index.js +0 -78
- package/client/dist/package.json +0 -1
- package/client/dist/types.d.ts +0 -339
- package/client/dist/types.js +0 -7
|
@@ -3,6 +3,7 @@ export function registerServicesTools (server, apiClient) {
|
|
|
3
3
|
'services_list',
|
|
4
4
|
'List all dev-tools platform services and their status',
|
|
5
5
|
{},
|
|
6
|
+
{ readOnlyHint: true },
|
|
6
7
|
async () => {
|
|
7
8
|
try {
|
|
8
9
|
const data = await apiClient.post('/v1/services/list')
|
|
@@ -17,6 +18,7 @@ export function registerServicesTools (server, apiClient) {
|
|
|
17
18
|
'services_status',
|
|
18
19
|
'Get detailed status of all services',
|
|
19
20
|
{},
|
|
21
|
+
{ readOnlyHint: true },
|
|
20
22
|
async () => {
|
|
21
23
|
try {
|
|
22
24
|
const data = await apiClient.post('/v1/services/status')
|
|
@@ -29,8 +31,9 @@ export function registerServicesTools (server, apiClient) {
|
|
|
29
31
|
|
|
30
32
|
server.tool(
|
|
31
33
|
'services_restart',
|
|
32
|
-
'Restart dev-tools services',
|
|
34
|
+
'[DESTRUCTIVE] Restart dev-tools services. Ask the user for confirmation before calling this tool.',
|
|
33
35
|
{},
|
|
36
|
+
{ destructiveHint: true },
|
|
34
37
|
async () => {
|
|
35
38
|
try {
|
|
36
39
|
const data = await apiClient.post('/v1/services/restart')
|
|
@@ -57,8 +60,9 @@ export function registerServicesTools (server, apiClient) {
|
|
|
57
60
|
|
|
58
61
|
server.tool(
|
|
59
62
|
'scheduler_stop',
|
|
60
|
-
'Stop the scheduler tick',
|
|
63
|
+
'[DESTRUCTIVE] Stop the scheduler tick. Ask the user for confirmation before calling this tool.',
|
|
61
64
|
{},
|
|
65
|
+
{ destructiveHint: true },
|
|
62
66
|
async () => {
|
|
63
67
|
try {
|
|
64
68
|
const data = await apiClient.post('/v1/scheduler/tick/stop')
|
|
@@ -73,6 +77,7 @@ export function registerServicesTools (server, apiClient) {
|
|
|
73
77
|
'scheduler_status',
|
|
74
78
|
'Get scheduler tick status (running/stopped, interval)',
|
|
75
79
|
{},
|
|
80
|
+
{ readOnlyHint: true },
|
|
76
81
|
async () => {
|
|
77
82
|
try {
|
|
78
83
|
const data = await apiClient.post('/v1/scheduler/tick/status')
|
|
@@ -113,8 +118,9 @@ export function registerServicesTools (server, apiClient) {
|
|
|
113
118
|
|
|
114
119
|
server.tool(
|
|
115
120
|
'gateway_stop',
|
|
116
|
-
'Stop the app gateway service',
|
|
121
|
+
'[DESTRUCTIVE] Stop the app gateway service. Ask the user for confirmation before calling this tool.',
|
|
117
122
|
{},
|
|
123
|
+
{ destructiveHint: true },
|
|
118
124
|
async () => {
|
|
119
125
|
try {
|
|
120
126
|
const data = await apiClient.post('/v1/gateway/stop')
|
|
@@ -129,6 +135,7 @@ export function registerServicesTools (server, apiClient) {
|
|
|
129
135
|
'gateway_status',
|
|
130
136
|
'Get the app gateway status',
|
|
131
137
|
{},
|
|
138
|
+
{ readOnlyHint: true },
|
|
132
139
|
async () => {
|
|
133
140
|
try {
|
|
134
141
|
const data = await apiClient.post('/v1/gateway/status')
|
|
@@ -157,6 +164,7 @@ export function registerServicesTools (server, apiClient) {
|
|
|
157
164
|
'gateway_health_check',
|
|
158
165
|
'Run health checks on all gateway endpoints',
|
|
159
166
|
{},
|
|
167
|
+
{ readOnlyHint: true },
|
|
160
168
|
async () => {
|
|
161
169
|
try {
|
|
162
170
|
const data = await apiClient.post('/v1/gateway/healthCheck')
|
|
@@ -21,11 +21,12 @@ export function registerSnapshotTools (server, apiClient) {
|
|
|
21
21
|
|
|
22
22
|
server.tool(
|
|
23
23
|
'snapshots_restore',
|
|
24
|
-
'Restore development environment from a snapshot. This will stop microservices, restore data, and restart them.',
|
|
24
|
+
'[DESTRUCTIVE] Restore development environment from a snapshot. This will stop microservices, restore data, and restart them. Ask the user for confirmation before calling this tool.',
|
|
25
25
|
{
|
|
26
26
|
snapshotId: z.string().describe('Snapshot ID to restore from (e.g., "e2e_2026-02-26_10-30-45")'),
|
|
27
27
|
restartServices: z.boolean().optional().describe('Whether to restart microservices after restore (default: true)')
|
|
28
28
|
},
|
|
29
|
+
{ destructiveHint: true },
|
|
29
30
|
async ({ snapshotId, restartServices }) => {
|
|
30
31
|
try {
|
|
31
32
|
const body = { snapshotId }
|
|
@@ -42,6 +43,7 @@ export function registerSnapshotTools (server, apiClient) {
|
|
|
42
43
|
'snapshots_list',
|
|
43
44
|
'List all available snapshots with their metadata',
|
|
44
45
|
{},
|
|
46
|
+
{ readOnlyHint: true },
|
|
45
47
|
async () => {
|
|
46
48
|
try {
|
|
47
49
|
const data = await apiClient.post('/v1/snapshots/list', {})
|
|
@@ -58,6 +60,7 @@ export function registerSnapshotTools (server, apiClient) {
|
|
|
58
60
|
{
|
|
59
61
|
snapshotId: z.string().describe('Snapshot ID to get details for')
|
|
60
62
|
},
|
|
63
|
+
{ readOnlyHint: true },
|
|
61
64
|
async ({ snapshotId }) => {
|
|
62
65
|
try {
|
|
63
66
|
const data = await apiClient.post('/v1/snapshots/details', { snapshotId })
|
|
@@ -70,10 +73,11 @@ export function registerSnapshotTools (server, apiClient) {
|
|
|
70
73
|
|
|
71
74
|
server.tool(
|
|
72
75
|
'snapshots_delete',
|
|
73
|
-
'Delete a snapshot and its files',
|
|
76
|
+
'[DESTRUCTIVE] Delete a snapshot and its files. Ask the user for confirmation before calling this tool.',
|
|
74
77
|
{
|
|
75
78
|
snapshotId: z.string().optional().describe('Snapshot ID to delete. If omitted, deletes all snapshots.')
|
|
76
79
|
},
|
|
80
|
+
{ destructiveHint: true },
|
|
77
81
|
async ({ snapshotId }) => {
|
|
78
82
|
try {
|
|
79
83
|
const body = {}
|
|
@@ -27,6 +27,7 @@ export function registerWebhooksTools (server, apiClient) {
|
|
|
27
27
|
'webhooks_list',
|
|
28
28
|
'List all registered webhooks',
|
|
29
29
|
{},
|
|
30
|
+
{ readOnlyHint: true },
|
|
30
31
|
async () => {
|
|
31
32
|
try {
|
|
32
33
|
const data = await apiClient.post('/v1/webhooks/list')
|
|
@@ -39,10 +40,11 @@ export function registerWebhooksTools (server, apiClient) {
|
|
|
39
40
|
|
|
40
41
|
server.tool(
|
|
41
42
|
'webhooks_remove',
|
|
42
|
-
'Remove a registered webhook by its prefix',
|
|
43
|
+
'[DESTRUCTIVE] Remove a registered webhook by its prefix. Ask the user for confirmation before calling this tool.',
|
|
43
44
|
{
|
|
44
45
|
prefix: z.string().describe('URL prefix of the webhook to remove')
|
|
45
46
|
},
|
|
47
|
+
{ destructiveHint: true },
|
|
46
48
|
async ({ prefix }) => {
|
|
47
49
|
try {
|
|
48
50
|
const data = await apiClient.post('/v1/webhooks/remove', { prefix })
|
|
@@ -73,6 +75,7 @@ export function registerWebhooksTools (server, apiClient) {
|
|
|
73
75
|
'webhooks_tunnel_status',
|
|
74
76
|
'Get ngrok tunnel status (connected/disconnected, public URL)',
|
|
75
77
|
{},
|
|
78
|
+
{ readOnlyHint: true },
|
|
76
79
|
async () => {
|
|
77
80
|
try {
|
|
78
81
|
const data = await apiClient.post('/v1/webhooks/tunnel/status')
|
|
@@ -87,6 +90,7 @@ export function registerWebhooksTools (server, apiClient) {
|
|
|
87
90
|
'webhooks_settings_get',
|
|
88
91
|
'Get current webhook/ngrok settings',
|
|
89
92
|
{},
|
|
93
|
+
{ readOnlyHint: true },
|
|
90
94
|
async () => {
|
|
91
95
|
try {
|
|
92
96
|
const data = await apiClient.post('/v1/webhooks/settings/get')
|
|
@@ -21,10 +21,15 @@ class SqliteStoreClass {
|
|
|
21
21
|
initialize (dbPath = null) {
|
|
22
22
|
if (this.isInitialized) return
|
|
23
23
|
|
|
24
|
-
const dataDir = Application.storage.dataDir
|
|
24
|
+
const dataDir = Application.storage.dataDir
|
|
25
25
|
if (!fs.existsSync(dataDir)) {
|
|
26
26
|
fs.mkdirSync(dataDir, { recursive: true })
|
|
27
27
|
}
|
|
28
|
+
if (dataDir.includes('.goki-dev') && fs.existsSync('./data/dev-tools.db')) {
|
|
29
|
+
console.warn('[MIGRATION] Found legacy database at ./data/dev-tools.db')
|
|
30
|
+
console.warn(`[MIGRATION] Database now lives at ${path.join(dataDir, 'dev-tools.db')}`)
|
|
31
|
+
console.warn(`[MIGRATION] Copy manually: cp ./data/dev-tools.db ${path.join(dataDir, 'dev-tools.db')}`)
|
|
32
|
+
}
|
|
28
33
|
|
|
29
34
|
const finalDbPath = dbPath || path.join(dataDir, 'dev-tools.db')
|
|
30
35
|
this.db = new Database(finalDbPath)
|
package/client/dist/client.d.ts
DELETED
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @gokiteam/goki-dev - Main Client
|
|
3
|
-
*
|
|
4
|
-
* HTTP client for Goki Developer Tools
|
|
5
|
-
*/
|
|
6
|
-
import { AxiosInstance } from 'axios';
|
|
7
|
-
import type * as Types from './types';
|
|
8
|
-
export interface DevToolsClientConfig {
|
|
9
|
-
baseUrl?: string;
|
|
10
|
-
timeout?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare class PubSubClient {
|
|
13
|
-
private client;
|
|
14
|
-
constructor(client: AxiosInstance);
|
|
15
|
-
private call;
|
|
16
|
-
/**
|
|
17
|
-
* Extract short topic name from a full path like 'projects/X/topics/Y' -> 'Y'
|
|
18
|
-
*/
|
|
19
|
-
private extractTopicName;
|
|
20
|
-
publish(params: {
|
|
21
|
-
topic: string;
|
|
22
|
-
message: any;
|
|
23
|
-
attributes?: Record<string, string>;
|
|
24
|
-
traceId?: string;
|
|
25
|
-
}): Promise<{
|
|
26
|
-
messageIds: string[];
|
|
27
|
-
} & {
|
|
28
|
-
traceId: string;
|
|
29
|
-
}>;
|
|
30
|
-
waitForMessage(params: Types.WaitForMessageRequest): Promise<Types.WaitForMessageResponse>;
|
|
31
|
-
assertMessagePublished(params: Types.AssertMessagePublishedRequest): Promise<Types.AssertMessagePublishedResponse>;
|
|
32
|
-
getMessages(params?: {
|
|
33
|
-
filter?: Types.PubSubHistoryFilter;
|
|
34
|
-
page?: Types.PageOptions;
|
|
35
|
-
traceId?: string;
|
|
36
|
-
}): Promise<{
|
|
37
|
-
messages: Types.PubSubMessage[];
|
|
38
|
-
total: number;
|
|
39
|
-
} & {
|
|
40
|
-
traceId: string;
|
|
41
|
-
}>;
|
|
42
|
-
searchMessages(params: {
|
|
43
|
-
query: string;
|
|
44
|
-
filter?: Partial<Types.PubSubHistoryFilter>;
|
|
45
|
-
traceId?: string;
|
|
46
|
-
}): Promise<{
|
|
47
|
-
messages: Types.PubSubMessage[];
|
|
48
|
-
total: number;
|
|
49
|
-
} & {
|
|
50
|
-
traceId: string;
|
|
51
|
-
}>;
|
|
52
|
-
listTopics(params?: {
|
|
53
|
-
traceId?: string;
|
|
54
|
-
}): Promise<{
|
|
55
|
-
topics: Types.PubSubTopic[];
|
|
56
|
-
total: number;
|
|
57
|
-
} & {
|
|
58
|
-
traceId: string;
|
|
59
|
-
}>;
|
|
60
|
-
createTopic(params: {
|
|
61
|
-
topic: string;
|
|
62
|
-
traceId?: string;
|
|
63
|
-
}): Promise<{
|
|
64
|
-
topic: Types.PubSubTopic;
|
|
65
|
-
} & {
|
|
66
|
-
traceId: string;
|
|
67
|
-
}>;
|
|
68
|
-
deleteTopic(params: {
|
|
69
|
-
topic: string;
|
|
70
|
-
traceId?: string;
|
|
71
|
-
}): Promise<void>;
|
|
72
|
-
}
|
|
73
|
-
export declare class LoggingClient {
|
|
74
|
-
private client;
|
|
75
|
-
constructor(client: AxiosInstance);
|
|
76
|
-
private call;
|
|
77
|
-
getByTrace(params: {
|
|
78
|
-
traceId: string;
|
|
79
|
-
queryTraceId?: string;
|
|
80
|
-
}): Promise<{
|
|
81
|
-
traceId: string;
|
|
82
|
-
entries: Types.LogEntry[];
|
|
83
|
-
count: number;
|
|
84
|
-
}>;
|
|
85
|
-
list(params?: {
|
|
86
|
-
filter?: Types.LogFilter;
|
|
87
|
-
page?: Types.PageOptions;
|
|
88
|
-
traceId?: string;
|
|
89
|
-
}): Promise<{
|
|
90
|
-
entries: Types.LogEntry[];
|
|
91
|
-
total: number;
|
|
92
|
-
} & {
|
|
93
|
-
traceId: string;
|
|
94
|
-
}>;
|
|
95
|
-
clear(params?: {
|
|
96
|
-
service?: string;
|
|
97
|
-
traceId?: string;
|
|
98
|
-
}): Promise<{
|
|
99
|
-
deletedCount: number;
|
|
100
|
-
} & {
|
|
101
|
-
traceId: string;
|
|
102
|
-
}>;
|
|
103
|
-
waitForLog(params: Types.WaitForLogRequest): Promise<Types.WaitForLogResponse>;
|
|
104
|
-
assertNoErrors(params: Types.AssertNoErrorsRequest): Promise<Types.AssertNoErrorsResponse>;
|
|
105
|
-
}
|
|
106
|
-
export declare class PostgresClient {
|
|
107
|
-
private client;
|
|
108
|
-
constructor(client: AxiosInstance);
|
|
109
|
-
private call;
|
|
110
|
-
query(params: Types.PostgresQueryRequest): Promise<Types.PostgresQueryResponse>;
|
|
111
|
-
listTables(params: {
|
|
112
|
-
database: string;
|
|
113
|
-
schema?: string;
|
|
114
|
-
traceId?: string;
|
|
115
|
-
}): Promise<{
|
|
116
|
-
tables: {
|
|
117
|
-
name: string;
|
|
118
|
-
rowCount: number;
|
|
119
|
-
}[];
|
|
120
|
-
} & {
|
|
121
|
-
traceId: string;
|
|
122
|
-
}>;
|
|
123
|
-
listRows(params: {
|
|
124
|
-
database: string;
|
|
125
|
-
schema: string;
|
|
126
|
-
table: string;
|
|
127
|
-
page?: Types.PageOptions;
|
|
128
|
-
traceId?: string;
|
|
129
|
-
}): Promise<{
|
|
130
|
-
rows: any[];
|
|
131
|
-
total: number;
|
|
132
|
-
} & {
|
|
133
|
-
traceId: string;
|
|
134
|
-
}>;
|
|
135
|
-
waitForCondition(params: Types.WaitForConditionRequest & {
|
|
136
|
-
type: 'postgres';
|
|
137
|
-
}): Promise<Types.WaitForConditionResponse>;
|
|
138
|
-
}
|
|
139
|
-
export declare class RedisClient {
|
|
140
|
-
private client;
|
|
141
|
-
constructor(client: AxiosInstance);
|
|
142
|
-
private call;
|
|
143
|
-
get(params: {
|
|
144
|
-
key: string;
|
|
145
|
-
traceId?: string;
|
|
146
|
-
}): Promise<Types.RedisValue>;
|
|
147
|
-
scan(params: {
|
|
148
|
-
pattern: string;
|
|
149
|
-
count?: number;
|
|
150
|
-
traceId?: string;
|
|
151
|
-
}): Promise<{
|
|
152
|
-
keys: Types.RedisKey[];
|
|
153
|
-
total: number;
|
|
154
|
-
} & {
|
|
155
|
-
traceId: string;
|
|
156
|
-
}>;
|
|
157
|
-
delete(params: {
|
|
158
|
-
key: string;
|
|
159
|
-
traceId?: string;
|
|
160
|
-
}): Promise<{
|
|
161
|
-
deleted: boolean;
|
|
162
|
-
} & {
|
|
163
|
-
traceId: string;
|
|
164
|
-
}>;
|
|
165
|
-
deletePattern(params: {
|
|
166
|
-
pattern: string;
|
|
167
|
-
traceId?: string;
|
|
168
|
-
}): Promise<{
|
|
169
|
-
deletedCount: number;
|
|
170
|
-
} & {
|
|
171
|
-
traceId: string;
|
|
172
|
-
}>;
|
|
173
|
-
waitForCondition(params: Types.WaitForConditionRequest & {
|
|
174
|
-
type: 'redis';
|
|
175
|
-
}): Promise<Types.WaitForConditionResponse>;
|
|
176
|
-
}
|
|
177
|
-
export declare class FirestoreClient {
|
|
178
|
-
private client;
|
|
179
|
-
constructor(client: AxiosInstance);
|
|
180
|
-
private call;
|
|
181
|
-
/**
|
|
182
|
-
* Parses a Firestore REST API typed value into a plain JS value.
|
|
183
|
-
*/
|
|
184
|
-
private parseFirestoreValue;
|
|
185
|
-
/**
|
|
186
|
-
* Parses Firestore REST API fields object into a plain JS object.
|
|
187
|
-
*/
|
|
188
|
-
private parseFirestoreFields;
|
|
189
|
-
/**
|
|
190
|
-
* Converts a raw Firestore REST API document to a clean FirestoreDocument.
|
|
191
|
-
* Raw format: { name: "projects/.../documents/collection/id", fields: { key: { stringValue: "..." } }, ... }
|
|
192
|
-
* Clean format: { id: "docId", data: { key: "..." } }
|
|
193
|
-
*/
|
|
194
|
-
private parseRawDocument;
|
|
195
|
-
getDocument(params: {
|
|
196
|
-
collection: string;
|
|
197
|
-
documentId: string;
|
|
198
|
-
traceId?: string;
|
|
199
|
-
}): Promise<{
|
|
200
|
-
document: Types.FirestoreDocument;
|
|
201
|
-
}>;
|
|
202
|
-
query(params: {
|
|
203
|
-
collection: string;
|
|
204
|
-
where: Types.FirestoreQuery;
|
|
205
|
-
traceId?: string;
|
|
206
|
-
}): Promise<{
|
|
207
|
-
documents: Types.FirestoreDocument[];
|
|
208
|
-
}>;
|
|
209
|
-
listDocuments(params: {
|
|
210
|
-
collection: string;
|
|
211
|
-
page?: Types.PageOptions;
|
|
212
|
-
traceId?: string;
|
|
213
|
-
}): Promise<{
|
|
214
|
-
documents: Types.FirestoreDocument[];
|
|
215
|
-
total: number;
|
|
216
|
-
}>;
|
|
217
|
-
deleteByQuery(params: Types.DeleteByQueryRequest): Promise<Types.DeleteByQueryResponse>;
|
|
218
|
-
deleteByPrefix(params: Types.DeleteByPrefixRequest): Promise<Types.DeleteByPrefixResponse>;
|
|
219
|
-
deleteBatch(params: Types.DeleteBatchRequest): Promise<Types.DeleteBatchResponse>;
|
|
220
|
-
waitForCondition(params: Types.WaitForConditionRequest & {
|
|
221
|
-
type: 'firestore';
|
|
222
|
-
}): Promise<Types.WaitForConditionResponse>;
|
|
223
|
-
}
|
|
224
|
-
export declare class MqttClient {
|
|
225
|
-
private client;
|
|
226
|
-
constructor(client: AxiosInstance);
|
|
227
|
-
private call;
|
|
228
|
-
listClients(params?: {
|
|
229
|
-
traceId?: string;
|
|
230
|
-
}): Promise<{
|
|
231
|
-
clients: Types.MqttClientInfo[];
|
|
232
|
-
} & {
|
|
233
|
-
traceId: string;
|
|
234
|
-
}>;
|
|
235
|
-
getMessages(params?: {
|
|
236
|
-
filter?: {
|
|
237
|
-
clientId?: string;
|
|
238
|
-
topic?: string;
|
|
239
|
-
};
|
|
240
|
-
page?: Types.PageOptions;
|
|
241
|
-
traceId?: string;
|
|
242
|
-
}): Promise<{
|
|
243
|
-
messages: Types.MqttMessage[];
|
|
244
|
-
total: number;
|
|
245
|
-
} & {
|
|
246
|
-
traceId: string;
|
|
247
|
-
}>;
|
|
248
|
-
}
|
|
249
|
-
export declare class DockerClient {
|
|
250
|
-
private client;
|
|
251
|
-
constructor(client: AxiosInstance);
|
|
252
|
-
private call;
|
|
253
|
-
list(params?: {
|
|
254
|
-
traceId?: string;
|
|
255
|
-
}): Promise<{
|
|
256
|
-
data: Types.DockerContainer[];
|
|
257
|
-
} & {
|
|
258
|
-
traceId: string;
|
|
259
|
-
}>;
|
|
260
|
-
start(params: {
|
|
261
|
-
containerName: string;
|
|
262
|
-
traceId?: string;
|
|
263
|
-
}): Promise<void>;
|
|
264
|
-
stop(params: {
|
|
265
|
-
containerName: string;
|
|
266
|
-
traceId?: string;
|
|
267
|
-
}): Promise<void>;
|
|
268
|
-
restart(params: {
|
|
269
|
-
containerName: string;
|
|
270
|
-
traceId?: string;
|
|
271
|
-
}): Promise<void>;
|
|
272
|
-
logs(params: {
|
|
273
|
-
containerName: string;
|
|
274
|
-
lines?: number;
|
|
275
|
-
traceId?: string;
|
|
276
|
-
}): Promise<{
|
|
277
|
-
data: string;
|
|
278
|
-
} & {
|
|
279
|
-
traceId: string;
|
|
280
|
-
}>;
|
|
281
|
-
}
|
|
282
|
-
export declare class PlatformClient {
|
|
283
|
-
private client;
|
|
284
|
-
constructor(client: AxiosInstance);
|
|
285
|
-
private call;
|
|
286
|
-
getStats(params?: {
|
|
287
|
-
traceId?: string;
|
|
288
|
-
}): Promise<{
|
|
289
|
-
stats: Types.PlatformStats;
|
|
290
|
-
} & {
|
|
291
|
-
traceId: string;
|
|
292
|
-
}>;
|
|
293
|
-
clearAll(params?: {
|
|
294
|
-
traceId?: string;
|
|
295
|
-
}): Promise<{
|
|
296
|
-
cleared: Record<string, number>;
|
|
297
|
-
} & {
|
|
298
|
-
traceId: string;
|
|
299
|
-
}>;
|
|
300
|
-
clearServices(params: Types.ClearServiceDataRequest): Promise<Types.ClearServiceDataResponse>;
|
|
301
|
-
export(params?: {
|
|
302
|
-
traceId?: string;
|
|
303
|
-
}): Promise<{
|
|
304
|
-
export: Types.ExportData;
|
|
305
|
-
} & {
|
|
306
|
-
traceId: string;
|
|
307
|
-
}>;
|
|
308
|
-
}
|
|
309
|
-
export declare class SchedulerClient {
|
|
310
|
-
private client;
|
|
311
|
-
constructor(client: AxiosInstance);
|
|
312
|
-
private call;
|
|
313
|
-
triggerTick(params?: {
|
|
314
|
-
traceId?: string;
|
|
315
|
-
}): Promise<Types.SchedulerTickResponse>;
|
|
316
|
-
}
|
|
317
|
-
export declare class HttpTrafficClient {
|
|
318
|
-
private client;
|
|
319
|
-
constructor(client: AxiosInstance);
|
|
320
|
-
private call;
|
|
321
|
-
list(params?: {
|
|
322
|
-
filter?: Types.HttpTrafficFilter;
|
|
323
|
-
limit?: number;
|
|
324
|
-
offset?: number;
|
|
325
|
-
traceId?: string;
|
|
326
|
-
}): Promise<{
|
|
327
|
-
entries: Types.HttpTrafficEntry[];
|
|
328
|
-
total: number;
|
|
329
|
-
limit: number;
|
|
330
|
-
offset: number;
|
|
331
|
-
} & {
|
|
332
|
-
traceId: string;
|
|
333
|
-
}>;
|
|
334
|
-
getDetails(params: {
|
|
335
|
-
id: string;
|
|
336
|
-
traceId?: string;
|
|
337
|
-
}): Promise<{
|
|
338
|
-
entry: Types.HttpTrafficEntry;
|
|
339
|
-
} & {
|
|
340
|
-
traceId: string;
|
|
341
|
-
}>;
|
|
342
|
-
clear(params?: {
|
|
343
|
-
traceId?: string;
|
|
344
|
-
}): Promise<{
|
|
345
|
-
message: string;
|
|
346
|
-
} & {
|
|
347
|
-
traceId: string;
|
|
348
|
-
}>;
|
|
349
|
-
waitFor(params: {
|
|
350
|
-
filter: Types.HttpTrafficWaitFilter;
|
|
351
|
-
timeout?: number;
|
|
352
|
-
traceId?: string;
|
|
353
|
-
}): Promise<{
|
|
354
|
-
entry: Types.HttpTrafficEntry;
|
|
355
|
-
foundAt: number;
|
|
356
|
-
traceId: string;
|
|
357
|
-
}>;
|
|
358
|
-
stats(params?: {
|
|
359
|
-
traceId?: string;
|
|
360
|
-
}): Promise<Types.HttpTrafficStats & {
|
|
361
|
-
traceId: string;
|
|
362
|
-
}>;
|
|
363
|
-
}
|
|
364
|
-
export declare class DevToolsClient {
|
|
365
|
-
private client;
|
|
366
|
-
private baseUrl;
|
|
367
|
-
pubsub: PubSubClient;
|
|
368
|
-
logging: LoggingClient;
|
|
369
|
-
postgres: PostgresClient;
|
|
370
|
-
redis: RedisClient;
|
|
371
|
-
firestore: FirestoreClient;
|
|
372
|
-
mqtt: MqttClient;
|
|
373
|
-
docker: DockerClient;
|
|
374
|
-
platform: PlatformClient;
|
|
375
|
-
scheduler: SchedulerClient;
|
|
376
|
-
httpTraffic: HttpTrafficClient;
|
|
377
|
-
constructor(config?: DevToolsClientConfig);
|
|
378
|
-
generateTraceId(prefix?: string): string;
|
|
379
|
-
}
|
|
380
|
-
export * from './types';
|