@clinebot/core 0.0.16 → 0.0.18
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/account/cline-account-service.d.ts +1 -0
- package/dist/account/index.d.ts +1 -1
- package/dist/account/types.d.ts +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.node.d.ts +1 -1
- package/dist/index.node.js +102 -102
- package/package.json +4 -4
- package/src/account/cline-account-service.ts +13 -0
- package/src/account/index.ts +1 -0
- package/src/account/types.ts +12 -0
- package/src/index.node.ts +1 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clinebot/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"main": "./dist/index.node.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@clinebot/agents": "0.0.
|
|
7
|
-
"@clinebot/llms": "0.0.
|
|
8
|
-
"@clinebot/shared": "0.0.
|
|
6
|
+
"@clinebot/agents": "0.0.17",
|
|
7
|
+
"@clinebot/llms": "0.0.17",
|
|
8
|
+
"@clinebot/shared": "0.0.17",
|
|
9
9
|
"@opentelemetry/api": "^1.9.0",
|
|
10
10
|
"@opentelemetry/api-logs": "^0.56.0",
|
|
11
11
|
"@opentelemetry/exporter-logs-otlp-http": "^0.56.0",
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
ClineAccountPaymentTransaction,
|
|
7
7
|
ClineAccountUsageTransaction,
|
|
8
8
|
ClineAccountUser,
|
|
9
|
+
ClineOrganization,
|
|
9
10
|
UserRemoteConfigResponse,
|
|
10
11
|
} from "./types";
|
|
11
12
|
|
|
@@ -102,6 +103,18 @@ export class ClineAccountService {
|
|
|
102
103
|
return me.organizations ?? [];
|
|
103
104
|
}
|
|
104
105
|
|
|
106
|
+
public async fetchOrganization(
|
|
107
|
+
organizationId: string,
|
|
108
|
+
): Promise<ClineOrganization> {
|
|
109
|
+
const orgId = organizationId.trim();
|
|
110
|
+
if (!orgId) {
|
|
111
|
+
throw new Error("organizationId is required");
|
|
112
|
+
}
|
|
113
|
+
return this.request<ClineOrganization>(
|
|
114
|
+
`/api/v1/organizations/${encodeURIComponent(orgId)}`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
105
118
|
public async fetchOrganizationBalance(
|
|
106
119
|
organizationId: string,
|
|
107
120
|
): Promise<ClineAccountOrganizationBalance> {
|
package/src/account/index.ts
CHANGED
package/src/account/types.ts
CHANGED
|
@@ -56,6 +56,18 @@ export interface ClineAccountPaymentTransaction {
|
|
|
56
56
|
credits: number;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export interface ClineOrganization {
|
|
60
|
+
createdAt: string;
|
|
61
|
+
defaultRemoteConfig?: string;
|
|
62
|
+
deletedAt?: string;
|
|
63
|
+
externalOrganizationId?: string;
|
|
64
|
+
id: string;
|
|
65
|
+
memberCount?: number;
|
|
66
|
+
name: string;
|
|
67
|
+
remoteConfigEnabled: boolean;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
59
71
|
export interface ClineAccountOrganizationBalance {
|
|
60
72
|
balance: number;
|
|
61
73
|
organizationId: string;
|
package/src/index.node.ts
CHANGED