@erdoai/types 0.1.6 → 0.1.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 +2 -2
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ import type {
|
|
|
41
41
|
|
|
42
42
|
### Token Types
|
|
43
43
|
|
|
44
|
-
- **`CreateTokenParams`** - Parameters for creating a scoped token (botKeys, datasetIds, externalUserId)
|
|
45
|
-
- **`TokenResponse`** - Token creation response (token, expiresAt)
|
|
44
|
+
- **`CreateTokenParams`** - Parameters for creating a scoped token (botKeys, datasetIds, threadIds, externalUserId)
|
|
45
|
+
- **`TokenResponse`** - Token creation response (tokenId, token, expiresAt)
|
|
46
46
|
|
|
47
47
|
### Thread Types
|
|
48
48
|
|
package/dist/index.d.cts
CHANGED
|
@@ -146,16 +146,20 @@ interface ErdoClient {
|
|
|
146
146
|
sendMessageAndWait?(threadId: string, params: SendMessageParams): Promise<SSEEvent[]>;
|
|
147
147
|
}
|
|
148
148
|
interface CreateTokenParams {
|
|
149
|
-
/** Bot keys to grant access to */
|
|
149
|
+
/** Bot keys to grant access to (e.g., ["my-org.data-analyst"]) */
|
|
150
150
|
botKeys?: string[];
|
|
151
151
|
/** Dataset IDs to grant access to */
|
|
152
152
|
datasetIds?: string[];
|
|
153
|
+
/** Thread IDs to grant access to */
|
|
154
|
+
threadIds?: string[];
|
|
153
155
|
/** Optional identifier for the external user */
|
|
154
156
|
externalUserId?: string;
|
|
155
157
|
/** Token expiry in seconds (default: 3600 = 1 hour, max: 86400 = 24 hours) */
|
|
156
158
|
expiresInSeconds?: number;
|
|
157
159
|
}
|
|
158
160
|
interface TokenResponse {
|
|
161
|
+
/** Token ID (needed for revocation) */
|
|
162
|
+
tokenId: string;
|
|
159
163
|
/** The scoped token (only returned once) */
|
|
160
164
|
token: string;
|
|
161
165
|
/** When the token expires */
|
package/dist/index.d.ts
CHANGED
|
@@ -146,16 +146,20 @@ interface ErdoClient {
|
|
|
146
146
|
sendMessageAndWait?(threadId: string, params: SendMessageParams): Promise<SSEEvent[]>;
|
|
147
147
|
}
|
|
148
148
|
interface CreateTokenParams {
|
|
149
|
-
/** Bot keys to grant access to */
|
|
149
|
+
/** Bot keys to grant access to (e.g., ["my-org.data-analyst"]) */
|
|
150
150
|
botKeys?: string[];
|
|
151
151
|
/** Dataset IDs to grant access to */
|
|
152
152
|
datasetIds?: string[];
|
|
153
|
+
/** Thread IDs to grant access to */
|
|
154
|
+
threadIds?: string[];
|
|
153
155
|
/** Optional identifier for the external user */
|
|
154
156
|
externalUserId?: string;
|
|
155
157
|
/** Token expiry in seconds (default: 3600 = 1 hour, max: 86400 = 24 hours) */
|
|
156
158
|
expiresInSeconds?: number;
|
|
157
159
|
}
|
|
158
160
|
interface TokenResponse {
|
|
161
|
+
/** Token ID (needed for revocation) */
|
|
162
|
+
tokenId: string;
|
|
159
163
|
/** The scoped token (only returned once) */
|
|
160
164
|
token: string;
|
|
161
165
|
/** When the token expires */
|