@redonvn/event-ws-cliproxyapi-sdk 1.0.5 → 1.0.6
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseHttpClient } from '../shared/http.js';
|
|
2
|
-
import type { AmpModelMapping, AmpModelMappingsPatch, AmpUpstreamAPIKeyEntry, AmpUpstreamAPIKeysPatch, ApiCallRequest, ApiCallResponse, AuthFileDeleteResponse, AuthFileListQuery, AuthFileListResponse, AuthFileModelsQuery, AuthFileModelsResponse, AuthFileStatusRequest, AuthFileStatusResponse, AuthStatusResponse, ClaudeKey, ClaudeKeyPatch, CodexKey, CodexKeyPatch, Config, DeleteLogsResponse, DesktopKeysResponse, ErrorLogFilesResponse, GeminiKey, GeminiKeyPatch, KeyedValueResponse, LogLinesResponse, ManagementApiKeysResponse, OAuthCallbackRequest, OAuthCallbackResponse, OAuthExcludedModelsPatch, OAuthModelAlias, OAuthModelAliasPatch, OAuthStartResponse, OpenAICompatibility, OpenAICompatPatch, PatchByIndexOrMatch, PatchStringListRequest, UpdateConnectionSettingsRequest, UsageExportResponse, UsageGetResponse, UsageImportRequest, UsageImportResponse, VertexCompatKey, VertexCompatPatch } from '../shared/types.js';
|
|
2
|
+
import type { AmpModelMapping, AmpModelMappingsPatch, AmpUpstreamAPIKeyEntry, AmpUpstreamAPIKeysPatch, ApiCallRequest, ApiCallResponse, AuthFileDeleteResponse, AuthFileListQuery, AuthFileListResponse, AuthFileModelsQuery, AuthFileModelsResponse, AuthFileStatusRequest, AuthFileStatusResponse, AuthStatusResponse, ClaudeKey, ClaudeKeyPatch, CodexKey, CodexKeyPatch, Config, DeleteLogsResponse, DesktopKeysResponse, DesktopRuntimeClientIdResponse, ErrorLogFilesResponse, GeminiKey, GeminiKeyPatch, KeyedValueResponse, LogLinesResponse, ManagementApiKeysResponse, OAuthCallbackRequest, OAuthCallbackResponse, OAuthExcludedModelsPatch, OAuthModelAlias, OAuthModelAliasPatch, OAuthStartResponse, OpenAICompatibility, OpenAICompatPatch, PatchByIndexOrMatch, PatchStringListRequest, UpdateConnectionSettingsRequest, UsageExportResponse, UsageGetResponse, UsageImportRequest, UsageImportResponse, VertexCompatKey, VertexCompatPatch } from '../shared/types.js';
|
|
3
3
|
export declare class ManagementClient extends BaseHttpClient {
|
|
4
4
|
getDesktopKeys(): Promise<DesktopKeysResponse>;
|
|
5
|
+
getRuntimeClientId(): Promise<DesktopRuntimeClientIdResponse>;
|
|
5
6
|
getManagementApiKeys(): Promise<ManagementApiKeysResponse>;
|
|
6
7
|
getUsage(): Promise<UsageGetResponse>;
|
|
7
8
|
exportUsage(): Promise<UsageExportResponse>;
|
|
@@ -3,6 +3,9 @@ export class ManagementClient extends BaseHttpClient {
|
|
|
3
3
|
getDesktopKeys() {
|
|
4
4
|
return this.requestJson('GET', '/desktop/keys');
|
|
5
5
|
}
|
|
6
|
+
getRuntimeClientId() {
|
|
7
|
+
return this.requestJson('GET', '/desktop/runtime-client-id');
|
|
8
|
+
}
|
|
6
9
|
async getManagementApiKeys() {
|
|
7
10
|
try {
|
|
8
11
|
const data = await this.getDesktopKeys();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { AccessConfig, AccessProvider, AmpCodeConfig, AmpModelMapping, AmpModelMappingsPatch, AmpStringListPatch, AmpUpstreamAPIKeyEntry, AmpUpstreamAPIKeysPatch, ApiCallRequest, ApiCallResponse, AuthFileDeleteResponse, AuthFileDownloadRequest, AuthFileEntry, AuthFileListQuery, AuthFileListResponse, AuthFileModelsQuery, AuthFileModelsResponse, AuthFileStatusRequest, AuthFileStatusResponse, AuthFileUploadRequest, AuthFileUploadResponse, AuthStatusResponse, ClaudeKey, ClaudeKeyPatch, ClaudeModel, CloakConfig, CodexKey, CodexKeyPatch, CodexModel, Config, DeleteLogsResponse, DesktopKeysResponse, ErrorLogFileInfo, ErrorLogFilesResponse, ErrorResponse, GeminiKey, GeminiKeyPatch, GeminiModel, KeepAliveResponse, LogLinesResponse, ManagementApiKeysResponse, ModelInfo, ModelListResponse, ModelThinkingSupport, OAuthCallbackRequest, OAuthCallbackResponse, OAuthExcludedModelsPatch, OAuthModelAlias, OAuthModelAliasPatch, OAuthStartResponse, OpenAICompatibility, OpenAICompatibilityAPIKey, OpenAICompatibilityModel, OpenAICompatPatch, PatchByIndexOrMatch, PatchStringListRequest, PayloadConfig, PayloadFilterRule, PayloadModelRule, PayloadRule, PprofConfig, QuotaExceededConfig, RemoteManagementConfig, RootResponse, RoutingConfig, SDKConfig, StatusResponse, StreamingConfig, TLSConfig, UpdateConnectionSettingsRequest, UsageApiSnapshot, UsageExportResponse, UsageGetResponse, UsageImportRequest, UsageImportResponse, UsageModelSnapshot, UsageRequestDetail, UsageStatisticsSnapshot, UsageTokenStats, VertexCompatKey, VertexCompatModel, VertexCompatPatch, VertexImportRequest } from '../shared/types.js';
|
|
1
|
+
export type { AccessConfig, AccessProvider, AmpCodeConfig, AmpModelMapping, AmpModelMappingsPatch, AmpStringListPatch, AmpUpstreamAPIKeyEntry, AmpUpstreamAPIKeysPatch, ApiCallRequest, ApiCallResponse, AuthFileDeleteResponse, AuthFileDownloadRequest, AuthFileEntry, AuthFileListQuery, AuthFileListResponse, AuthFileModelsQuery, AuthFileModelsResponse, AuthFileStatusRequest, AuthFileStatusResponse, AuthFileUploadRequest, AuthFileUploadResponse, AuthStatusResponse, ClaudeKey, ClaudeKeyPatch, ClaudeModel, CloakConfig, CodexKey, CodexKeyPatch, CodexModel, Config, DeleteLogsResponse, DesktopKeysResponse, DesktopRuntimeClientIdResponse, ErrorLogFileInfo, ErrorLogFilesResponse, ErrorResponse, GeminiKey, GeminiKeyPatch, GeminiModel, KeepAliveResponse, LogLinesResponse, ManagementApiKeysResponse, ModelInfo, ModelListResponse, ModelThinkingSupport, OAuthCallbackRequest, OAuthCallbackResponse, OAuthExcludedModelsPatch, OAuthModelAlias, OAuthModelAliasPatch, OAuthStartResponse, OpenAICompatibility, OpenAICompatibilityAPIKey, OpenAICompatibilityModel, OpenAICompatPatch, PatchByIndexOrMatch, PatchStringListRequest, PayloadConfig, PayloadFilterRule, PayloadModelRule, PayloadRule, PprofConfig, QuotaExceededConfig, RemoteManagementConfig, RootResponse, RoutingConfig, SDKConfig, StatusResponse, StreamingConfig, TLSConfig, UpdateConnectionSettingsRequest, UsageApiSnapshot, UsageExportResponse, UsageGetResponse, UsageImportRequest, UsageImportResponse, UsageModelSnapshot, UsageRequestDetail, UsageStatisticsSnapshot, UsageTokenStats, VertexCompatKey, VertexCompatModel, VertexCompatPatch, VertexImportRequest } from '../shared/types.js';
|
|
2
2
|
export { ManagementClient } from './client.js';
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export interface DesktopKeysResponse {
|
|
|
31
31
|
apiKeys: string[];
|
|
32
32
|
managementKey: string;
|
|
33
33
|
}
|
|
34
|
+
export interface DesktopRuntimeClientIdResponse {
|
|
35
|
+
clientId: string;
|
|
36
|
+
}
|
|
34
37
|
export interface ManagementApiKeysResponse {
|
|
35
38
|
'api-keys': string[];
|
|
36
39
|
'management-key': string;
|
package/package.json
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redonvn/event-ws-cliproxyapi-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "TypeScript SDK for CLIProxyAPI WebSocket relay (provider-side).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
10
12
|
"scripts": {
|
|
11
13
|
"build": "tsc -p tsconfig.json",
|
|
12
14
|
"dev": "tsc -p tsconfig.json --watch",
|
|
13
15
|
"example": "node examples/run.js"
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
16
|
-
"ws": "^
|
|
17
|
-
"uuid": "^11.0.3"
|
|
18
|
+
"@redonvn/event-ws-cliproxyapi-sdk": "^1.0.5",
|
|
19
|
+
"uuid": "^11.0.3",
|
|
20
|
+
"ws": "^8.18.0"
|
|
18
21
|
},
|
|
19
22
|
"devDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
23
|
+
"@types/ws": "^8.5.12",
|
|
24
|
+
"typescript": "^5.7.3"
|
|
22
25
|
}
|
|
23
26
|
}
|