@bctrl/sdk 1.0.5 → 1.0.7
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 +72 -71
- package/dist/accountTypes.d.ts +20 -126
- package/dist/ai.d.ts +23 -0
- package/dist/ai.js +51 -0
- package/dist/aiTypes.d.ts +19 -0
- package/dist/bctrl.d.ts +3 -3
- package/dist/bctrl.js +5 -5
- package/dist/browserExtensionTypes.d.ts +7 -36
- package/dist/files.d.ts +2 -2
- package/dist/generated/openapi-types.d.ts +13755 -0
- package/dist/generated/openapi-types.js +5 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/invocations.d.ts +10 -10
- package/dist/invocations.js +0 -3
- package/dist/node.d.ts +100 -2
- package/dist/openapi.d.ts +7 -0
- package/dist/openapi.js +1 -0
- package/dist/proxyTypes.d.ts +16 -107
- package/dist/runs.d.ts +86 -6
- package/dist/runtimes.d.ts +18 -1
- package/dist/runtimes.js +55 -12
- package/dist/toolCallTypes.d.ts +6 -41
- package/dist/toolsetTypes.d.ts +7 -32
- package/dist/types.d.ts +133 -624
- package/dist/vaultTypes.d.ts +9 -73
- package/package.json +46 -46
- package/dist/aiProviderTypes.d.ts +0 -58
- package/dist/aiProviders.d.ts +0 -13
- package/dist/aiProviders.js +0 -36
- /package/dist/{aiProviderTypes.js → aiTypes.js} +0 -0
package/dist/vaultTypes.d.ts
CHANGED
|
@@ -1,73 +1,9 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
origins?: string[];
|
|
11
|
-
originPatterns?: string[];
|
|
12
|
-
hasTotp: boolean;
|
|
13
|
-
createdAt?: string;
|
|
14
|
-
updatedAt?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface V1VaultSecretListQuery extends V1VaultPageQuery {
|
|
17
|
-
prefix?: string;
|
|
18
|
-
origin?: string;
|
|
19
|
-
hasTotp?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export type V1VaultSecretUpsertRequest = {
|
|
22
|
-
type: 'login';
|
|
23
|
-
username: string;
|
|
24
|
-
password: string;
|
|
25
|
-
totpSecret?: string;
|
|
26
|
-
label?: string;
|
|
27
|
-
origins?: string[];
|
|
28
|
-
originPatterns?: string[];
|
|
29
|
-
notes?: string;
|
|
30
|
-
} | {
|
|
31
|
-
type: 'value';
|
|
32
|
-
value: string;
|
|
33
|
-
label?: string;
|
|
34
|
-
origins?: string[];
|
|
35
|
-
originPatterns?: string[];
|
|
36
|
-
notes?: string;
|
|
37
|
-
};
|
|
38
|
-
export interface V1VaultSecretPatchRequest {
|
|
39
|
-
username?: string;
|
|
40
|
-
password?: string;
|
|
41
|
-
value?: string;
|
|
42
|
-
totpSecret?: string | null;
|
|
43
|
-
label?: string | null;
|
|
44
|
-
origins?: string[] | null;
|
|
45
|
-
originPatterns?: string[] | null;
|
|
46
|
-
notes?: string | null;
|
|
47
|
-
}
|
|
48
|
-
export type V1VaultSecretValue = {
|
|
49
|
-
key: string;
|
|
50
|
-
type: 'login';
|
|
51
|
-
username: string;
|
|
52
|
-
password: string;
|
|
53
|
-
label?: string;
|
|
54
|
-
origins?: string[];
|
|
55
|
-
originPatterns?: string[];
|
|
56
|
-
notes?: string;
|
|
57
|
-
} | {
|
|
58
|
-
key: string;
|
|
59
|
-
type: 'value';
|
|
60
|
-
value: string;
|
|
61
|
-
label?: string;
|
|
62
|
-
origins?: string[];
|
|
63
|
-
originPatterns?: string[];
|
|
64
|
-
notes?: string;
|
|
65
|
-
};
|
|
66
|
-
export interface V1VaultTotpResponse {
|
|
67
|
-
code: string;
|
|
68
|
-
}
|
|
69
|
-
export interface V1VaultSecretDeleteResponse {
|
|
70
|
-
key: string;
|
|
71
|
-
deleted: true;
|
|
72
|
-
}
|
|
73
|
-
export {};
|
|
1
|
+
import type { OpenApiQuery, OpenApiSchemas } from './openapi.js';
|
|
2
|
+
export type V1VaultSecretType = OpenApiSchemas['VaultSecret']['type'];
|
|
3
|
+
export type V1VaultSecret = OpenApiSchemas['VaultSecret'];
|
|
4
|
+
export type V1VaultSecretListQuery = OpenApiQuery<'vault.secrets.list'>;
|
|
5
|
+
export type V1VaultSecretUpsertRequest = OpenApiSchemas['VaultSecretUpsertRequest'];
|
|
6
|
+
export type V1VaultSecretPatchRequest = OpenApiSchemas['VaultSecretPatchRequest'];
|
|
7
|
+
export type V1VaultSecretValue = OpenApiSchemas['VaultSecretValue'];
|
|
8
|
+
export type V1VaultTotpResponse = OpenApiSchemas['VaultTotpResponse'];
|
|
9
|
+
export type V1VaultSecretDeleteResponse = OpenApiSchemas['VaultSecretDeleteResponse'];
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bctrl/sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "BCTRL SDK - Remote browser automation",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./node": {
|
|
14
|
-
"types": "./dist/node.d.ts",
|
|
15
|
-
"import": "./dist/node.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"clean": "
|
|
20
|
-
"build": "pnpm run clean && tsc -p tsconfig.json",
|
|
21
|
-
"prepack": "pnpm run build",
|
|
22
|
-
"dev": "tsc --watch",
|
|
23
|
-
"test": "tsx --test tests/v1/*.test.ts tests/v1/e2e/*.test.ts",
|
|
24
|
-
"test:v1": "tsx --test tests/v1/*.test.ts tests/v1/e2e/*.test.ts",
|
|
25
|
-
"test:v1:e2e": "BCTRL_E2E=1 tsx --test tests/v1/e2e/**/*.test.ts",
|
|
26
|
-
"typecheck": "tsc --noEmit"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [],
|
|
29
|
-
"author": "",
|
|
30
|
-
"license": "ISC",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"zod": "^4.3
|
|
33
|
-
},
|
|
34
|
-
"packageManager": "pnpm@10.12.4",
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@types/node": "^25.0.3",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
38
|
-
"@typescript-eslint/parser": "^8.56.0",
|
|
39
|
-
"eslint": "^10.0.0",
|
|
40
|
-
"tsx": "^4.21.0",
|
|
41
|
-
"typescript": "^5.9.3"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"dist"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bctrl/sdk",
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "BCTRL SDK - Remote browser automation",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./node": {
|
|
14
|
+
"types": "./dist/node.d.ts",
|
|
15
|
+
"import": "./dist/node.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
20
|
+
"build": "pnpm run clean && tsc -p tsconfig.json",
|
|
21
|
+
"prepack": "pnpm run build",
|
|
22
|
+
"dev": "tsc --watch",
|
|
23
|
+
"test": "tsx --test tests/v1/*.test.ts tests/v1/e2e/*.test.ts",
|
|
24
|
+
"test:v1": "tsx --test tests/v1/*.test.ts tests/v1/e2e/*.test.ts",
|
|
25
|
+
"test:v1:e2e": "BCTRL_E2E=1 tsx --test tests/v1/e2e/**/*.test.ts",
|
|
26
|
+
"typecheck": "tsc --noEmit"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [],
|
|
29
|
+
"author": "",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"zod": "^4.4.3"
|
|
33
|
+
},
|
|
34
|
+
"packageManager": "pnpm@10.12.4",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^25.0.3",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
39
|
+
"eslint": "^10.0.0",
|
|
40
|
+
"tsx": "^4.21.0",
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { V1PageQuery } from './types.js';
|
|
2
|
-
export type V1AiProviderProvider = 'openai' | 'anthropic' | 'google' | 'groq' | 'deepseek' | 'mistral' | 'cerebras' | 'openrouter' | 'xai' | 'perplexity' | 'togetherai' | 'vercel-ai-gateway' | 'custom';
|
|
3
|
-
export type V1AiProviderStatus = 'enabled' | 'disabled';
|
|
4
|
-
export interface V1AiProviderModel {
|
|
5
|
-
id: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
inputModalities?: string[];
|
|
8
|
-
outputModalities?: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface V1AiProvider {
|
|
11
|
-
id: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
provider: V1AiProviderProvider;
|
|
14
|
-
status: V1AiProviderStatus;
|
|
15
|
-
subaccountId?: string;
|
|
16
|
-
defaultModel?: string;
|
|
17
|
-
baseUrl?: string;
|
|
18
|
-
hasApiKey: boolean;
|
|
19
|
-
models?: V1AiProviderModel[];
|
|
20
|
-
createdAt: string;
|
|
21
|
-
updatedAt: string;
|
|
22
|
-
}
|
|
23
|
-
export interface V1AiProviderListQuery extends V1PageQuery {
|
|
24
|
-
provider?: V1AiProviderProvider;
|
|
25
|
-
status?: V1AiProviderStatus;
|
|
26
|
-
include?: 'models' | 'models'[];
|
|
27
|
-
subaccountId?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface V1AiProviderGetQuery {
|
|
30
|
-
include?: 'models' | 'models'[];
|
|
31
|
-
}
|
|
32
|
-
export interface V1AiProviderCreateRequest {
|
|
33
|
-
provider: V1AiProviderProvider;
|
|
34
|
-
name?: string;
|
|
35
|
-
apiKey?: string;
|
|
36
|
-
defaultModel?: string;
|
|
37
|
-
baseUrl?: string;
|
|
38
|
-
status?: V1AiProviderStatus;
|
|
39
|
-
subaccountId?: string | null;
|
|
40
|
-
test?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface V1AiProviderUpdateRequest {
|
|
43
|
-
name?: string;
|
|
44
|
-
apiKey?: string | null;
|
|
45
|
-
defaultModel?: string | null;
|
|
46
|
-
baseUrl?: string | null;
|
|
47
|
-
status?: V1AiProviderStatus;
|
|
48
|
-
}
|
|
49
|
-
export interface V1AiProviderDeleteResponse {
|
|
50
|
-
id: string;
|
|
51
|
-
deleted: true;
|
|
52
|
-
}
|
|
53
|
-
export interface V1AiProviderTestResponse {
|
|
54
|
-
ok: boolean;
|
|
55
|
-
checkedAt: string;
|
|
56
|
-
latencyMs?: number;
|
|
57
|
-
error?: string;
|
|
58
|
-
}
|
package/dist/aiProviders.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { V1HttpClient } from './http.js';
|
|
2
|
-
import type { V1AiProvider, V1AiProviderCreateRequest, V1AiProviderDeleteResponse, V1AiProviderGetQuery, V1AiProviderListQuery, V1AiProviderTestResponse, V1AiProviderUpdateRequest, V1ListEnvelope } from './types.js';
|
|
3
|
-
export declare class V1AiProvidersClient {
|
|
4
|
-
private readonly http;
|
|
5
|
-
constructor(http: V1HttpClient);
|
|
6
|
-
list(query?: V1AiProviderListQuery): Promise<V1ListEnvelope<V1AiProvider>>;
|
|
7
|
-
iter(query?: V1AiProviderListQuery): AsyncGenerator<V1AiProvider, void, undefined>;
|
|
8
|
-
create(request: V1AiProviderCreateRequest): Promise<V1AiProvider>;
|
|
9
|
-
get(aiProviderId: string, query?: V1AiProviderGetQuery): Promise<V1AiProvider>;
|
|
10
|
-
update(aiProviderId: string, request: V1AiProviderUpdateRequest): Promise<V1AiProvider>;
|
|
11
|
-
delete(aiProviderId: string): Promise<V1AiProviderDeleteResponse>;
|
|
12
|
-
test(aiProviderId: string): Promise<V1AiProviderTestResponse>;
|
|
13
|
-
}
|
package/dist/aiProviders.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { iterateV1Pages } from './pagination.js';
|
|
2
|
-
export class V1AiProvidersClient {
|
|
3
|
-
http;
|
|
4
|
-
constructor(http) {
|
|
5
|
-
this.http = http;
|
|
6
|
-
}
|
|
7
|
-
list(query = {}) {
|
|
8
|
-
return this.http.request('/ai-providers', { query });
|
|
9
|
-
}
|
|
10
|
-
iter(query = {}) {
|
|
11
|
-
return iterateV1Pages(query, (pageQuery) => this.list(pageQuery));
|
|
12
|
-
}
|
|
13
|
-
create(request) {
|
|
14
|
-
return this.http.request('/ai-providers', {
|
|
15
|
-
method: 'POST',
|
|
16
|
-
body: request,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
get(aiProviderId, query = {}) {
|
|
20
|
-
return this.http.request(`/ai-providers/${encodeURIComponent(aiProviderId)}`, {
|
|
21
|
-
query,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
update(aiProviderId, request) {
|
|
25
|
-
return this.http.request(`/ai-providers/${encodeURIComponent(aiProviderId)}`, {
|
|
26
|
-
method: 'PATCH',
|
|
27
|
-
body: request,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
delete(aiProviderId) {
|
|
31
|
-
return this.http.request(`/ai-providers/${encodeURIComponent(aiProviderId)}`, { method: 'DELETE' });
|
|
32
|
-
}
|
|
33
|
-
test(aiProviderId) {
|
|
34
|
-
return this.http.request(`/ai-providers/${encodeURIComponent(aiProviderId)}/test`, { method: 'POST' });
|
|
35
|
-
}
|
|
36
|
-
}
|
|
File without changes
|