@clinebot/core 0.0.16 → 0.0.20

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@clinebot/core",
3
- "version": "0.0.16",
3
+ "version": "0.0.20",
4
4
  "main": "./dist/index.node.js",
5
5
  "dependencies": {
6
- "@clinebot/agents": "0.0.16",
7
- "@clinebot/llms": "0.0.16",
8
- "@clinebot/shared": "0.0.16",
6
+ "@clinebot/agents": "0.0.20",
7
+ "@clinebot/llms": "0.0.20",
8
+ "@clinebot/shared": "0.0.20",
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> {
@@ -17,5 +17,6 @@ export type {
17
17
  ClineAccountPaymentTransaction,
18
18
  ClineAccountUsageTransaction,
19
19
  ClineAccountUser,
20
+ ClineOrganization,
20
21
  UserRemoteConfigResponse,
21
22
  } from "./types";
@@ -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
@@ -114,6 +114,7 @@ export {
114
114
  type ClineAccountServiceOptions,
115
115
  type ClineAccountUsageTransaction,
116
116
  type ClineAccountUser,
117
+ type ClineOrganization,
117
118
  executeRpcClineAccountAction,
118
119
  isRpcClineAccountActionRequest,
119
120
  RpcClineAccountService,
package/src/index.ts CHANGED
@@ -76,6 +76,7 @@ export {
76
76
  type ClineAccountServiceOptions,
77
77
  type ClineAccountUsageTransaction,
78
78
  type ClineAccountUser,
79
+ type ClineOrganization,
79
80
  executeRpcClineAccountAction,
80
81
  isRpcClineAccountActionRequest,
81
82
  RpcClineAccountService,