mtmsdk 0.0.46 → 0.0.47
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/gomtmapi/@tanstack/react-query.gen.d.ts +45 -45
- package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/gomtmapi/@tanstack/react-query.gen.js +69 -69
- package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -1
- package/dist/gomtmapi/index.d.ts +2 -2
- package/dist/gomtmapi/index.d.ts.map +1 -1
- package/dist/gomtmapi/index.js +1 -1
- package/dist/gomtmapi/index.js.map +1 -1
- package/dist/gomtmapi/schemas.gen.d.ts +91 -52
- package/dist/gomtmapi/schemas.gen.d.ts.map +1 -1
- package/dist/gomtmapi/schemas.gen.js +91 -56
- package/dist/gomtmapi/schemas.gen.js.map +1 -1
- package/dist/gomtmapi/sdk.gen.d.ts +41 -41
- package/dist/gomtmapi/sdk.gen.d.ts.map +1 -1
- package/dist/gomtmapi/sdk.gen.js +55 -55
- package/dist/gomtmapi/sdk.gen.js.map +1 -1
- package/dist/gomtmapi/types.gen.d.ts +120 -131
- package/dist/gomtmapi/types.gen.d.ts.map +1 -1
- package/dist/gomtmapi/zod.gen.d.ts +96 -74
- package/dist/gomtmapi/zod.gen.d.ts.map +1 -1
- package/dist/gomtmapi/zod.gen.js +67 -58
- package/dist/gomtmapi/zod.gen.js.map +1 -1
- package/dist/mtgate_api/@tanstack/react-query.gen.d.ts +4 -101
- package/dist/mtgate_api/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/mtgate_api/@tanstack/react-query.gen.js +1 -14
- package/dist/mtgate_api/@tanstack/react-query.gen.js.map +1 -1
- package/dist/mtgate_api/index.d.ts +2 -2
- package/dist/mtgate_api/index.d.ts.map +1 -1
- package/dist/mtgate_api/index.js +1 -1
- package/dist/mtgate_api/index.js.map +1 -1
- package/dist/mtgate_api/schemas.gen.d.ts +0 -31
- package/dist/mtgate_api/schemas.gen.d.ts.map +1 -1
- package/dist/mtgate_api/schemas.gen.js +0 -46
- package/dist/mtgate_api/schemas.gen.js.map +1 -1
- package/dist/mtgate_api/sdk.gen.d.ts +1 -2
- package/dist/mtgate_api/sdk.gen.d.ts.map +1 -1
- package/dist/mtgate_api/sdk.gen.js +0 -1
- package/dist/mtgate_api/sdk.gen.js.map +1 -1
- package/dist/mtgate_api/types.gen.d.ts +1 -73
- package/dist/mtgate_api/types.gen.d.ts.map +1 -1
- package/dist/mtgate_api/zod.gen.d.ts +0 -77
- package/dist/mtgate_api/zod.gen.d.ts.map +1 -1
- package/dist/mtgate_api/zod.gen.js +0 -47
- package/dist/mtgate_api/zod.gen.js.map +1 -1
- package/dist/openclaw/gateway.d.ts.map +1 -1
- package/dist/openclaw/gateway.js +1 -5
- package/dist/openclaw/gateway.js.map +1 -1
- package/dist/sbmng/schemas.gen.d.ts +15 -2
- package/dist/sbmng/schemas.gen.d.ts.map +1 -1
- package/dist/sbmng/schemas.gen.js +55 -2
- package/dist/sbmng/schemas.gen.js.map +1 -1
- package/dist/sbmng/types.gen.d.ts +5 -2
- package/dist/sbmng/types.gen.d.ts.map +1 -1
- package/dist/supabase/schema/index.d.ts +0 -9
- package/dist/supabase/schema/index.d.ts.map +1 -1
- package/dist/supabase/schema/index.js +0 -13
- package/dist/supabase/schema/index.js.map +1 -1
- package/dist/supabase/supabase-client.d.ts +985 -739
- package/dist/supabase/supabase-client.d.ts.map +1 -1
- package/dist/supabase/supabase.d.ts +2182 -1689
- package/dist/supabase/supabase.d.ts.map +1 -1
- package/dist/supabase/supabase.js.map +1 -1
- package/dist/types/database.schemas.d.ts +1322 -743
- package/dist/types/database.schemas.d.ts.map +1 -1
- package/dist/types/database.schemas.js +822 -610
- package/dist/types/database.schemas.js.map +1 -1
- package/dist/types/database.types.d.ts +1004 -734
- package/dist/types/database.types.d.ts.map +1 -1
- package/dist/types/database.types.js +16 -1
- package/dist/types/database.types.js.map +1 -1
- package/dist/types/index.d.ts +32 -48
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -25
- package/dist/types/index.js.map +1 -1
- package/dist/types/rpc.schemas.d.ts +1 -13
- package/dist/types/rpc.schemas.d.ts.map +1 -1
- package/dist/types/rpc.schemas.js +7 -21
- package/dist/types/rpc.schemas.js.map +1 -1
- package/package.json +3 -4
- package/src/gomtmapi/@tanstack/react-query.gen.ts +73 -73
- package/src/gomtmapi/index.ts +2 -2
- package/src/gomtmapi/schemas.gen.ts +92 -58
- package/src/gomtmapi/sdk.gen.ts +58 -58
- package/src/gomtmapi/types.gen.ts +131 -143
- package/src/gomtmapi/zod.gen.ts +72 -64
- package/src/mtgate_api/@tanstack/react-query.gen.ts +3 -18
- package/src/mtgate_api/index.ts +2 -2
- package/src/mtgate_api/schemas.gen.ts +0 -47
- package/src/mtgate_api/sdk.gen.ts +1 -3
- package/src/mtgate_api/types.gen.ts +1 -79
- package/src/mtgate_api/zod.gen.ts +0 -52
- package/src/openclaw/gateway.ts +5 -10
- package/src/sbmng/schemas.gen.ts +55 -2
- package/src/sbmng/types.gen.ts +5 -2
- package/src/supabase/schema/index.ts +0 -20
- package/src/supabase/supabase.ts +4 -2
- package/src/types/database.schemas.ts +956 -732
- package/src/types/database.types.ts +977 -707
- package/src/types/index.ts +33 -66
- package/src/types/rpc.schemas.ts +8 -23
- package/dist/sbapi/@tanstack/react-query.gen.d.ts +0 -3280
- package/dist/sbapi/@tanstack/react-query.gen.d.ts.map +0 -1
- package/dist/sbapi/@tanstack/react-query.gen.js +0 -6084
- package/dist/sbapi/@tanstack/react-query.gen.js.map +0 -1
- package/dist/sbapi/client/client.gen.d.ts +0 -3
- package/dist/sbapi/client/client.gen.d.ts.map +0 -1
- package/dist/sbapi/client/client.gen.js +0 -236
- package/dist/sbapi/client/client.gen.js.map +0 -1
- package/dist/sbapi/client/index.d.ts +0 -9
- package/dist/sbapi/client/index.d.ts.map +0 -1
- package/dist/sbapi/client/index.js +0 -7
- package/dist/sbapi/client/index.js.map +0 -1
- package/dist/sbapi/client/types.gen.d.ts +0 -118
- package/dist/sbapi/client/types.gen.d.ts.map +0 -1
- package/dist/sbapi/client/types.gen.js +0 -3
- package/dist/sbapi/client/types.gen.js.map +0 -1
- package/dist/sbapi/client/utils.gen.d.ts +0 -34
- package/dist/sbapi/client/utils.gen.d.ts.map +0 -1
- package/dist/sbapi/client/utils.gen.js +0 -232
- package/dist/sbapi/client/utils.gen.js.map +0 -1
- package/dist/sbapi/client.gen.d.ts +0 -13
- package/dist/sbapi/client.gen.d.ts.map +0 -1
- package/dist/sbapi/client.gen.js +0 -4
- package/dist/sbapi/client.gen.js.map +0 -1
- package/dist/sbapi/core/auth.gen.d.ts +0 -19
- package/dist/sbapi/core/auth.gen.d.ts.map +0 -1
- package/dist/sbapi/core/auth.gen.js +0 -15
- package/dist/sbapi/core/auth.gen.js.map +0 -1
- package/dist/sbapi/core/bodySerializer.gen.d.ts +0 -26
- package/dist/sbapi/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/sbapi/core/bodySerializer.gen.js +0 -58
- package/dist/sbapi/core/bodySerializer.gen.js.map +0 -1
- package/dist/sbapi/core/params.gen.d.ts +0 -44
- package/dist/sbapi/core/params.gen.d.ts.map +0 -1
- package/dist/sbapi/core/params.gen.js +0 -101
- package/dist/sbapi/core/params.gen.js.map +0 -1
- package/dist/sbapi/core/pathSerializer.gen.d.ts +0 -34
- package/dist/sbapi/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/sbapi/core/pathSerializer.gen.js +0 -115
- package/dist/sbapi/core/pathSerializer.gen.js.map +0 -1
- package/dist/sbapi/core/queryKeySerializer.gen.d.ts +0 -19
- package/dist/sbapi/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/sbapi/core/queryKeySerializer.gen.js +0 -100
- package/dist/sbapi/core/queryKeySerializer.gen.js.map +0 -1
- package/dist/sbapi/core/serverSentEvents.gen.d.ts +0 -72
- package/dist/sbapi/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/sbapi/core/serverSentEvents.gen.js +0 -138
- package/dist/sbapi/core/serverSentEvents.gen.js.map +0 -1
- package/dist/sbapi/core/types.gen.d.ts +0 -79
- package/dist/sbapi/core/types.gen.d.ts.map +0 -1
- package/dist/sbapi/core/types.gen.js +0 -3
- package/dist/sbapi/core/types.gen.js.map +0 -1
- package/dist/sbapi/core/utils.gen.d.ts +0 -20
- package/dist/sbapi/core/utils.gen.d.ts.map +0 -1
- package/dist/sbapi/core/utils.gen.js +0 -88
- package/dist/sbapi/core/utils.gen.js.map +0 -1
- package/dist/sbapi/index.d.ts +0 -3
- package/dist/sbapi/index.d.ts.map +0 -1
- package/dist/sbapi/index.js +0 -3
- package/dist/sbapi/index.js.map +0 -1
- package/dist/sbapi/schemas.gen.d.ts +0 -2322
- package/dist/sbapi/schemas.gen.d.ts.map +0 -1
- package/dist/sbapi/schemas.gen.js +0 -2596
- package/dist/sbapi/schemas.gen.js.map +0 -1
- package/dist/sbapi/sdk.gen.d.ts +0 -834
- package/dist/sbapi/sdk.gen.d.ts.map +0 -1
- package/dist/sbapi/sdk.gen.js +0 -2466
- package/dist/sbapi/sdk.gen.js.map +0 -1
- package/dist/sbapi/types.gen.d.ts +0 -11726
- package/dist/sbapi/types.gen.d.ts.map +0 -1
- package/dist/sbapi/types.gen.js +0 -3
- package/dist/sbapi/types.gen.js.map +0 -1
- package/dist/sbapi/zod.gen.d.ts +0 -8147
- package/dist/sbapi/zod.gen.d.ts.map +0 -1
- package/dist/sbapi/zod.gen.js +0 -6585
- package/dist/sbapi/zod.gen.js.map +0 -1
- package/src/sbapi/@tanstack/react-query.gen.ts +0 -6591
- package/src/sbapi/client/client.gen.ts +0 -311
- package/src/sbapi/client/index.ts +0 -25
- package/src/sbapi/client/types.gen.ts +0 -241
- package/src/sbapi/client/utils.gen.ts +0 -332
- package/src/sbapi/client.gen.ts +0 -16
- package/src/sbapi/core/auth.gen.ts +0 -42
- package/src/sbapi/core/bodySerializer.gen.ts +0 -100
- package/src/sbapi/core/params.gen.ts +0 -176
- package/src/sbapi/core/pathSerializer.gen.ts +0 -181
- package/src/sbapi/core/queryKeySerializer.gen.ts +0 -136
- package/src/sbapi/core/serverSentEvents.gen.ts +0 -266
- package/src/sbapi/core/types.gen.ts +0 -118
- package/src/sbapi/core/utils.gen.ts +0 -143
- package/src/sbapi/index.ts +0 -4
- package/src/sbapi/schemas.gen.ts +0 -2643
- package/src/sbapi/sdk.gen.ts +0 -2822
- package/src/sbapi/types.gen.ts +0 -12503
- package/src/sbapi/zod.gen.ts +0 -7021
|
@@ -98,21 +98,8 @@ export type AgentQuickActionItem = {
|
|
|
98
98
|
text: string;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
export type ChatMessage = {
|
|
102
|
-
id: string;
|
|
103
|
-
created_at: string;
|
|
104
|
-
updated_at: string;
|
|
105
|
-
chat_id: string;
|
|
106
|
-
role: 'user' | 'assistant' | 'system' | 'data' | 'control';
|
|
107
|
-
parts: unknown;
|
|
108
|
-
attachments: unknown;
|
|
109
|
-
user_id: string;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
101
|
export type ChatlistParams = string;
|
|
113
102
|
|
|
114
|
-
export type ChatMessagesListInput = string;
|
|
115
|
-
|
|
116
103
|
export type AdkAgentRunData = {
|
|
117
104
|
body?: AgentRunReq;
|
|
118
105
|
path?: never;
|
|
@@ -220,45 +207,6 @@ export type AgentQuickActionResponses = {
|
|
|
220
207
|
|
|
221
208
|
export type AgentQuickActionResponse = AgentQuickActionResponses[keyof AgentQuickActionResponses];
|
|
222
209
|
|
|
223
|
-
export type AgentChatMessageListData = {
|
|
224
|
-
body?: never;
|
|
225
|
-
path?: never;
|
|
226
|
-
query: {
|
|
227
|
-
chat_id: string;
|
|
228
|
-
};
|
|
229
|
-
url: '/api/cf/agent/chat_messages';
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
export type AgentChatMessageListResponses = {
|
|
233
|
-
200: {
|
|
234
|
-
paginate: {
|
|
235
|
-
/**
|
|
236
|
-
* Total number of records
|
|
237
|
-
*/
|
|
238
|
-
total: number;
|
|
239
|
-
/**
|
|
240
|
-
* Current page number
|
|
241
|
-
*/
|
|
242
|
-
page: number;
|
|
243
|
-
/**
|
|
244
|
-
* Number of records per page
|
|
245
|
-
*/
|
|
246
|
-
pageSize: number;
|
|
247
|
-
/**
|
|
248
|
-
* Total number of pages
|
|
249
|
-
*/
|
|
250
|
-
totalPages: number;
|
|
251
|
-
/**
|
|
252
|
-
* Whether there is a next page
|
|
253
|
-
*/
|
|
254
|
-
hasNext: boolean;
|
|
255
|
-
};
|
|
256
|
-
data: Array<ChatMessage>;
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
export type AgentChatMessageListResponse = AgentChatMessageListResponses[keyof AgentChatMessageListResponses];
|
|
261
|
-
|
|
262
210
|
export type HumanTasksListData = {
|
|
263
211
|
body?: never;
|
|
264
212
|
path?: never;
|
|
@@ -287,35 +235,9 @@ export type McpApiHelloResponses = {
|
|
|
287
235
|
/**
|
|
288
236
|
* 简单问候API
|
|
289
237
|
*/
|
|
290
|
-
200:
|
|
291
|
-
paginate: {
|
|
292
|
-
/**
|
|
293
|
-
* Total number of records
|
|
294
|
-
*/
|
|
295
|
-
total: number;
|
|
296
|
-
/**
|
|
297
|
-
* Current page number
|
|
298
|
-
*/
|
|
299
|
-
page: number;
|
|
300
|
-
/**
|
|
301
|
-
* Number of records per page
|
|
302
|
-
*/
|
|
303
|
-
pageSize: number;
|
|
304
|
-
/**
|
|
305
|
-
* Total number of pages
|
|
306
|
-
*/
|
|
307
|
-
totalPages: number;
|
|
308
|
-
/**
|
|
309
|
-
* Whether there is a next page
|
|
310
|
-
*/
|
|
311
|
-
hasNext: boolean;
|
|
312
|
-
};
|
|
313
|
-
data: Array<ChatMessage>;
|
|
314
|
-
};
|
|
238
|
+
200: unknown;
|
|
315
239
|
};
|
|
316
240
|
|
|
317
|
-
export type McpApiHelloResponse = McpApiHelloResponses[keyof McpApiHelloResponses];
|
|
318
|
-
|
|
319
241
|
export type ClawdSessionsListData = {
|
|
320
242
|
body?: never;
|
|
321
243
|
path?: never;
|
|
@@ -93,27 +93,8 @@ export const zAgentQuickActionItem = z.object({
|
|
|
93
93
|
text: z.string()
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
export const zChatMessage = z.object({
|
|
97
|
-
id: z.string(),
|
|
98
|
-
created_at: z.iso.datetime().regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
99
|
-
updated_at: z.iso.datetime().regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
100
|
-
chat_id: z.string(),
|
|
101
|
-
role: z.enum([
|
|
102
|
-
'user',
|
|
103
|
-
'assistant',
|
|
104
|
-
'system',
|
|
105
|
-
'data',
|
|
106
|
-
'control'
|
|
107
|
-
]),
|
|
108
|
-
parts: z.unknown(),
|
|
109
|
-
attachments: z.unknown(),
|
|
110
|
-
user_id: z.string()
|
|
111
|
-
});
|
|
112
|
-
|
|
113
96
|
export const zChatlistParams = z.string();
|
|
114
97
|
|
|
115
|
-
export const zChatMessagesListInput = z.string();
|
|
116
|
-
|
|
117
98
|
export const zAdkAgentRunData = z.object({
|
|
118
99
|
body: z.optional(zAgentRunReq),
|
|
119
100
|
path: z.optional(z.never()),
|
|
@@ -178,25 +159,6 @@ export const zAgentQuickActionResponse = z.object({
|
|
|
178
159
|
items: z.array(zAgentQuickActionItem)
|
|
179
160
|
});
|
|
180
161
|
|
|
181
|
-
export const zAgentChatMessageListData = z.object({
|
|
182
|
-
body: z.optional(z.never()),
|
|
183
|
-
path: z.optional(z.never()),
|
|
184
|
-
query: z.object({
|
|
185
|
-
chat_id: z.string()
|
|
186
|
-
})
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
export const zAgentChatMessageListResponse = z.object({
|
|
190
|
-
paginate: z.object({
|
|
191
|
-
total: z.number(),
|
|
192
|
-
page: z.number(),
|
|
193
|
-
pageSize: z.number(),
|
|
194
|
-
totalPages: z.number(),
|
|
195
|
-
hasNext: z.boolean()
|
|
196
|
-
}),
|
|
197
|
-
data: z.array(zChatMessage)
|
|
198
|
-
});
|
|
199
|
-
|
|
200
162
|
export const zHumanTasksListData = z.object({
|
|
201
163
|
body: z.optional(z.never()),
|
|
202
164
|
path: z.optional(z.never()),
|
|
@@ -213,20 +175,6 @@ export const zMcpApiHelloData = z.object({
|
|
|
213
175
|
})
|
|
214
176
|
});
|
|
215
177
|
|
|
216
|
-
/**
|
|
217
|
-
* 简单问候API
|
|
218
|
-
*/
|
|
219
|
-
export const zMcpApiHelloResponse = z.object({
|
|
220
|
-
paginate: z.object({
|
|
221
|
-
total: z.number(),
|
|
222
|
-
page: z.number(),
|
|
223
|
-
pageSize: z.number(),
|
|
224
|
-
totalPages: z.number(),
|
|
225
|
-
hasNext: z.boolean()
|
|
226
|
-
}),
|
|
227
|
-
data: z.array(zChatMessage)
|
|
228
|
-
});
|
|
229
|
-
|
|
230
178
|
export const zClawdSessionsListData = z.object({
|
|
231
179
|
body: z.optional(z.never()),
|
|
232
180
|
path: z.optional(z.never()),
|
package/src/openclaw/gateway.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
GATEWAY_CLIENT_MODES,
|
|
3
|
+
GATEWAY_CLIENT_NAMES,
|
|
4
|
+
type GatewayClientMode,
|
|
5
|
+
type GatewayClientName,
|
|
6
6
|
} from "./client-info";
|
|
7
7
|
import { generateUUID } from "./uuid";
|
|
8
8
|
|
|
@@ -93,12 +93,7 @@ export class GatewayBrowserClient {
|
|
|
93
93
|
private connect() {
|
|
94
94
|
if (this.closed) return;
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
if (this.opts.supabaseToken) {
|
|
98
|
-
protocols.push(`sb_token.${this.opts.supabaseToken}`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
this.ws = new WebSocket(this.opts.url, protocols.length > 0 ? protocols : undefined);
|
|
96
|
+
this.ws = new WebSocket(this.opts.url);
|
|
102
97
|
this.ws.onopen = () => this.queueConnect();
|
|
103
98
|
this.ws.onmessage = (ev) => this.handleMessage(String(ev.data ?? ""));
|
|
104
99
|
this.ws.onclose = (ev) => {
|
package/src/sbmng/schemas.gen.ts
CHANGED
|
@@ -808,7 +808,27 @@ export const RegionsInfoSchema = {
|
|
|
808
808
|
type: 'string'
|
|
809
809
|
},
|
|
810
810
|
code: {
|
|
811
|
-
type: 'string'
|
|
811
|
+
type: 'string',
|
|
812
|
+
enum: [
|
|
813
|
+
'us-east-1',
|
|
814
|
+
'us-east-2',
|
|
815
|
+
'us-west-1',
|
|
816
|
+
'us-west-2',
|
|
817
|
+
'ap-southeast-1',
|
|
818
|
+
'ap-northeast-1',
|
|
819
|
+
'ap-northeast-2',
|
|
820
|
+
'ap-east-1',
|
|
821
|
+
'ap-southeast-2',
|
|
822
|
+
'eu-west-1',
|
|
823
|
+
'eu-west-2',
|
|
824
|
+
'eu-west-3',
|
|
825
|
+
'eu-north-1',
|
|
826
|
+
'eu-central-1',
|
|
827
|
+
'eu-central-2',
|
|
828
|
+
'ca-central-1',
|
|
829
|
+
'ap-south-1',
|
|
830
|
+
'sa-east-1'
|
|
831
|
+
]
|
|
812
832
|
},
|
|
813
833
|
type: {
|
|
814
834
|
type: 'string',
|
|
@@ -889,7 +909,27 @@ export const RegionsInfoSchema = {
|
|
|
889
909
|
type: 'string'
|
|
890
910
|
},
|
|
891
911
|
code: {
|
|
892
|
-
type: 'string'
|
|
912
|
+
type: 'string',
|
|
913
|
+
enum: [
|
|
914
|
+
'us-east-1',
|
|
915
|
+
'us-east-2',
|
|
916
|
+
'us-west-1',
|
|
917
|
+
'us-west-2',
|
|
918
|
+
'ap-southeast-1',
|
|
919
|
+
'ap-northeast-1',
|
|
920
|
+
'ap-northeast-2',
|
|
921
|
+
'ap-east-1',
|
|
922
|
+
'ap-southeast-2',
|
|
923
|
+
'eu-west-1',
|
|
924
|
+
'eu-west-2',
|
|
925
|
+
'eu-west-3',
|
|
926
|
+
'eu-north-1',
|
|
927
|
+
'eu-central-1',
|
|
928
|
+
'eu-central-2',
|
|
929
|
+
'ca-central-1',
|
|
930
|
+
'ap-south-1',
|
|
931
|
+
'sa-east-1'
|
|
932
|
+
]
|
|
893
933
|
},
|
|
894
934
|
type: {
|
|
895
935
|
type: 'string',
|
|
@@ -3129,6 +3169,9 @@ export const V1ServiceHealthResponseSchema = {
|
|
|
3129
3169
|
db_connected: {
|
|
3130
3170
|
type: 'boolean'
|
|
3131
3171
|
},
|
|
3172
|
+
replication_connected: {
|
|
3173
|
+
type: 'boolean'
|
|
3174
|
+
},
|
|
3132
3175
|
connected_cluster: {
|
|
3133
3176
|
type: 'integer'
|
|
3134
3177
|
}
|
|
@@ -3136,6 +3179,7 @@ export const V1ServiceHealthResponseSchema = {
|
|
|
3136
3179
|
required: [
|
|
3137
3180
|
'healthy',
|
|
3138
3181
|
'db_connected',
|
|
3182
|
+
'replication_connected',
|
|
3139
3183
|
'connected_cluster'
|
|
3140
3184
|
]
|
|
3141
3185
|
},
|
|
@@ -4346,6 +4390,10 @@ export const AuthConfigResponseSchema = {
|
|
|
4346
4390
|
type: 'boolean',
|
|
4347
4391
|
nullable: true
|
|
4348
4392
|
},
|
|
4393
|
+
security_sb_forwarded_for_enabled: {
|
|
4394
|
+
type: 'boolean',
|
|
4395
|
+
nullable: true
|
|
4396
|
+
},
|
|
4349
4397
|
security_captcha_enabled: {
|
|
4350
4398
|
type: 'boolean',
|
|
4351
4399
|
nullable: true
|
|
@@ -4720,6 +4768,7 @@ export const AuthConfigResponseSchema = {
|
|
|
4720
4768
|
'saml_enabled',
|
|
4721
4769
|
'saml_external_url',
|
|
4722
4770
|
'saml_allow_encrypted_assertions',
|
|
4771
|
+
'security_sb_forwarded_for_enabled',
|
|
4723
4772
|
'security_captcha_enabled',
|
|
4724
4773
|
'security_captcha_provider',
|
|
4725
4774
|
'security_captcha_secret',
|
|
@@ -4987,6 +5036,10 @@ export const UpdateAuthConfigBodySchema = {
|
|
|
4987
5036
|
pattern: '^[^,]+$',
|
|
4988
5037
|
nullable: true
|
|
4989
5038
|
},
|
|
5039
|
+
security_sb_forwarded_for_enabled: {
|
|
5040
|
+
type: 'boolean',
|
|
5041
|
+
nullable: true
|
|
5042
|
+
},
|
|
4990
5043
|
security_captcha_enabled: {
|
|
4991
5044
|
type: 'boolean',
|
|
4992
5045
|
nullable: true
|
package/src/sbmng/types.gen.ts
CHANGED
|
@@ -282,7 +282,7 @@ export type RegionsInfo = {
|
|
|
282
282
|
};
|
|
283
283
|
specific: Array<{
|
|
284
284
|
name: string;
|
|
285
|
-
code:
|
|
285
|
+
code: 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'ap-southeast-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-east-1' | 'ap-southeast-2' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'eu-central-1' | 'eu-central-2' | 'ca-central-1' | 'ap-south-1' | 'sa-east-1';
|
|
286
286
|
type: 'specific';
|
|
287
287
|
provider: 'AWS' | 'FLY' | 'AWS_K8S' | 'AWS_NIMBUS';
|
|
288
288
|
status?: 'capacity' | 'other';
|
|
@@ -296,7 +296,7 @@ export type RegionsInfo = {
|
|
|
296
296
|
}>;
|
|
297
297
|
specific: Array<{
|
|
298
298
|
name: string;
|
|
299
|
-
code:
|
|
299
|
+
code: 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'ap-southeast-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-east-1' | 'ap-southeast-2' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'eu-central-1' | 'eu-central-2' | 'ca-central-1' | 'ap-south-1' | 'sa-east-1';
|
|
300
300
|
type: 'specific';
|
|
301
301
|
provider: 'AWS' | 'FLY' | 'AWS_K8S' | 'AWS_NIMBUS';
|
|
302
302
|
status?: 'capacity' | 'other';
|
|
@@ -878,6 +878,7 @@ export type V1ServiceHealthResponse = {
|
|
|
878
878
|
*/
|
|
879
879
|
healthy: boolean;
|
|
880
880
|
db_connected: boolean;
|
|
881
|
+
replication_connected: boolean;
|
|
881
882
|
connected_cluster: number;
|
|
882
883
|
} | {
|
|
883
884
|
db_schema: string;
|
|
@@ -1158,6 +1159,7 @@ export type AuthConfigResponse = {
|
|
|
1158
1159
|
saml_enabled: boolean | null;
|
|
1159
1160
|
saml_external_url: string | null;
|
|
1160
1161
|
saml_allow_encrypted_assertions: boolean | null;
|
|
1162
|
+
security_sb_forwarded_for_enabled: boolean | null;
|
|
1161
1163
|
security_captcha_enabled: boolean | null;
|
|
1162
1164
|
security_captcha_provider: 'turnstile' | 'hcaptcha';
|
|
1163
1165
|
security_captcha_secret: string | null;
|
|
@@ -1257,6 +1259,7 @@ export type UpdateAuthConfigBody = {
|
|
|
1257
1259
|
external_phone_enabled?: boolean | null;
|
|
1258
1260
|
saml_enabled?: boolean | null;
|
|
1259
1261
|
saml_external_url?: string | null;
|
|
1262
|
+
security_sb_forwarded_for_enabled?: boolean | null;
|
|
1260
1263
|
security_captcha_enabled?: boolean | null;
|
|
1261
1264
|
security_captcha_provider?: 'turnstile' | 'hcaptcha';
|
|
1262
1265
|
security_captcha_secret?: string | null;
|
|
@@ -8,15 +8,6 @@ const singleRowPreprocessor = (val: unknown) => {
|
|
|
8
8
|
return val;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const gatewayUrlConfigSchema = z.preprocess(
|
|
12
|
-
singleRowPreprocessor,
|
|
13
|
-
z
|
|
14
|
-
.object({
|
|
15
|
-
mtgate_url: z.string().url({ message: "必须是有效的 URL" }).optional().or(z.literal("")),
|
|
16
|
-
})
|
|
17
|
-
.nullable(),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
11
|
export const domainConfigSchema = z.preprocess(
|
|
21
12
|
singleRowPreprocessor,
|
|
22
13
|
z
|
|
@@ -27,17 +18,6 @@ export const domainConfigSchema = z.preprocess(
|
|
|
27
18
|
.nullable(),
|
|
28
19
|
);
|
|
29
20
|
|
|
30
|
-
export const sharedServerGetSchema = z.preprocess(
|
|
31
|
-
singleRowPreprocessor,
|
|
32
|
-
z
|
|
33
|
-
.object({
|
|
34
|
-
id: z.string(),
|
|
35
|
-
name: z.string(),
|
|
36
|
-
url: z.string().nullable().optional(),
|
|
37
|
-
is_shared: z.boolean(),
|
|
38
|
-
})
|
|
39
|
-
.nullable(),
|
|
40
|
-
);
|
|
41
21
|
|
|
42
22
|
export const smsProviderConfigSchema = z.object({
|
|
43
23
|
default_provider: z.enum(["manual", "demo"]).optional().default("manual"),
|
package/src/supabase/supabase.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { createClient } from "@supabase/supabase-js";
|
|
|
3
3
|
import type { Context } from "hono";
|
|
4
4
|
import { setCookie } from "hono/cookie";
|
|
5
5
|
import type { TypedSupabaseClient } from "../types";
|
|
6
|
+
import type { Database } from "../types/database.types";
|
|
6
7
|
|
|
7
8
|
export const getSupabaseUrl = () => {
|
|
8
9
|
if (!process.env.NEXT_PUBLIC_SUPABASE_URL) {
|
|
@@ -24,7 +25,7 @@ export const getSupabaseProjectRef = () => {
|
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const getSupabase = (c: Context) => {
|
|
27
|
-
const client: TypedSupabaseClient = createServerClient(getSupabaseUrl(), getSupabasePublicKey(), {
|
|
28
|
+
const client: TypedSupabaseClient = createServerClient<Database, "public">(getSupabaseUrl(), getSupabasePublicKey(), {
|
|
28
29
|
cookies: {
|
|
29
30
|
//@ts-expect-error
|
|
30
31
|
getAll() {
|
|
@@ -46,6 +47,7 @@ export const getSupabase = (c: Context) => {
|
|
|
46
47
|
},
|
|
47
48
|
},
|
|
48
49
|
});
|
|
50
|
+
|
|
49
51
|
return client;
|
|
50
52
|
};
|
|
51
53
|
|
|
@@ -54,7 +56,7 @@ export const getSupabaseAdmin = () => {
|
|
|
54
56
|
if (!serviceRoleKey) {
|
|
55
57
|
throw new Error("require SUPABASE_SERVICE_ROLE_KEY");
|
|
56
58
|
}
|
|
57
|
-
const client: TypedSupabaseClient = createClient(getSupabaseUrl(), serviceRoleKey, {
|
|
59
|
+
const client: TypedSupabaseClient = createClient<Database, "public">(getSupabaseUrl(), serviceRoleKey, {
|
|
58
60
|
auth: {
|
|
59
61
|
autoRefreshToken: false,
|
|
60
62
|
persistSession: false,
|