@opensecret/react 1.5.3 → 3.0.0-alpha.0
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/index.d.ts +122 -9
- package/dist/opensecret-react.es.js +1658 -1556
- package/dist/opensecret-react.umd.js +18 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,35 @@ declare function acceptInvite(code: string): Promise<{
|
|
|
31
31
|
*/
|
|
32
32
|
declare function addConversationItems(conversationId: string, items: Partial<ConversationItem>[]): Promise<Conversation>;
|
|
33
33
|
|
|
34
|
+
export declare type AgentCreatedBy = "user" | "agent";
|
|
35
|
+
|
|
36
|
+
export declare type AgentDeletedObjectResponse = {
|
|
37
|
+
id: string;
|
|
38
|
+
object: string;
|
|
39
|
+
deleted: boolean;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export declare type AgentDoneEvent = {
|
|
43
|
+
total_steps: number;
|
|
44
|
+
total_messages: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type AgentErrorEvent = {
|
|
48
|
+
error: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare type AgentItemsListParams = {
|
|
52
|
+
limit?: number;
|
|
53
|
+
after?: string;
|
|
54
|
+
order?: string;
|
|
55
|
+
include?: string[];
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export declare type AgentMessageEvent = {
|
|
59
|
+
messages: string[];
|
|
60
|
+
step: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
34
63
|
declare namespace api {
|
|
35
64
|
export {
|
|
36
65
|
setApiUrl,
|
|
@@ -99,6 +128,16 @@ declare namespace api {
|
|
|
99
128
|
updateInstruction,
|
|
100
129
|
deleteInstruction,
|
|
101
130
|
setDefaultInstruction,
|
|
131
|
+
getMainAgent,
|
|
132
|
+
deleteMainAgent,
|
|
133
|
+
listMainAgentItems,
|
|
134
|
+
getMainAgentItem,
|
|
135
|
+
listSubagents,
|
|
136
|
+
getSubagent,
|
|
137
|
+
createSubagent,
|
|
138
|
+
deleteSubagent,
|
|
139
|
+
listSubagentItems,
|
|
140
|
+
getSubagentItem,
|
|
102
141
|
LoginResponse,
|
|
103
142
|
UserResponse,
|
|
104
143
|
KVListItem,
|
|
@@ -150,7 +189,18 @@ declare namespace api {
|
|
|
150
189
|
InstructionUpdateRequest,
|
|
151
190
|
InstructionListParams,
|
|
152
191
|
InstructionListResponse,
|
|
153
|
-
InstructionDeleteResponse
|
|
192
|
+
InstructionDeleteResponse,
|
|
193
|
+
CreateSubagentRequest,
|
|
194
|
+
AgentCreatedBy,
|
|
195
|
+
MainAgentResponse,
|
|
196
|
+
SubagentResponse,
|
|
197
|
+
AgentItemsListParams,
|
|
198
|
+
ListSubagentsParams,
|
|
199
|
+
SubagentListResponse,
|
|
200
|
+
AgentDeletedObjectResponse,
|
|
201
|
+
AgentMessageEvent,
|
|
202
|
+
AgentDoneEvent,
|
|
203
|
+
AgentErrorEvent
|
|
154
204
|
}
|
|
155
205
|
}
|
|
156
206
|
|
|
@@ -442,11 +492,11 @@ export declare type Conversation = {
|
|
|
442
492
|
id: string;
|
|
443
493
|
object: "conversation";
|
|
444
494
|
created_at: number;
|
|
445
|
-
metadata?: Record<string,
|
|
495
|
+
metadata?: Record<string, unknown>;
|
|
446
496
|
};
|
|
447
497
|
|
|
448
498
|
export declare type ConversationCreateRequest = {
|
|
449
|
-
metadata?: Record<string,
|
|
499
|
+
metadata?: Record<string, unknown>;
|
|
450
500
|
};
|
|
451
501
|
|
|
452
502
|
export declare type ConversationDeleteResponse = {
|
|
@@ -491,7 +541,7 @@ export declare type ConversationsListResponse = {
|
|
|
491
541
|
};
|
|
492
542
|
|
|
493
543
|
export declare type ConversationUpdateRequest = {
|
|
494
|
-
metadata?: Record<string,
|
|
544
|
+
metadata?: Record<string, unknown>;
|
|
495
545
|
};
|
|
496
546
|
|
|
497
547
|
declare function convertGuestToEmailAccount(email: string, password: string, name?: string | null): Promise<void>;
|
|
@@ -541,7 +591,7 @@ export declare function createApiKey(name: string): Promise<ApiKeyCreateResponse
|
|
|
541
591
|
*
|
|
542
592
|
* @deprecated Use openai.conversations.create() instead
|
|
543
593
|
*/
|
|
544
|
-
declare function createConversation(metadata?: Record<string,
|
|
594
|
+
declare function createConversation(metadata?: Record<string, unknown>): Promise<Conversation>;
|
|
545
595
|
|
|
546
596
|
export declare function createCustomFetch(options?: CustomFetchOptions): (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
547
597
|
|
|
@@ -605,10 +655,18 @@ declare function createProjectSecret(orgId: string, projectId: string, keyName:
|
|
|
605
655
|
* });
|
|
606
656
|
* ```
|
|
607
657
|
*/
|
|
608
|
-
declare function createResponse(request: ResponsesCreateRequest): Promise<
|
|
658
|
+
declare function createResponse(request: ResponsesCreateRequest): Promise<ResponsesRetrieveResponse>;
|
|
659
|
+
|
|
660
|
+
export declare function createSubagent(request: CreateSubagentRequest): Promise<SubagentResponse>;
|
|
661
|
+
|
|
662
|
+
export declare type CreateSubagentRequest = {
|
|
663
|
+
display_name?: string;
|
|
664
|
+
purpose: string;
|
|
665
|
+
};
|
|
609
666
|
|
|
610
667
|
export declare interface CustomFetchOptions {
|
|
611
668
|
apiKey?: string;
|
|
669
|
+
apiUrl?: string;
|
|
612
670
|
}
|
|
613
671
|
|
|
614
672
|
/**
|
|
@@ -745,6 +803,8 @@ declare function deleteConversations(): Promise<ConversationsDeleteResponse>;
|
|
|
745
803
|
*/
|
|
746
804
|
declare function deleteInstruction(instructionId: string): Promise<InstructionDeleteResponse>;
|
|
747
805
|
|
|
806
|
+
export declare function deleteMainAgent(): Promise<AgentDeletedObjectResponse>;
|
|
807
|
+
|
|
748
808
|
declare function deleteOrganization(orgId: string): Promise<void>;
|
|
749
809
|
|
|
750
810
|
declare function deleteOrganizationInvite(orgId: string, inviteCode: string): Promise<{
|
|
@@ -778,6 +838,8 @@ declare function deleteProjectSecret(orgId: string, projectId: string, keyName:
|
|
|
778
838
|
*/
|
|
779
839
|
declare function deleteResponse(responseId: string): Promise<ResponsesDeleteResponse>;
|
|
780
840
|
|
|
841
|
+
export declare function deleteSubagent(id: string): Promise<AgentDeletedObjectResponse>;
|
|
842
|
+
|
|
781
843
|
declare type DeveloperResponse = PlatformUser & {
|
|
782
844
|
organizations: PlatformOrg[];
|
|
783
845
|
};
|
|
@@ -1097,6 +1159,10 @@ declare function getEmailSettings(orgId: string, projectId: string): Promise<Ema
|
|
|
1097
1159
|
*/
|
|
1098
1160
|
declare function getInstruction(instructionId: string): Promise<Instruction>;
|
|
1099
1161
|
|
|
1162
|
+
export declare function getMainAgent(): Promise<MainAgentResponse>;
|
|
1163
|
+
|
|
1164
|
+
export declare function getMainAgentItem(itemId: string): Promise<ConversationItem>;
|
|
1165
|
+
|
|
1100
1166
|
declare function getOAuthSettings(orgId: string, projectId: string): Promise<OAuthSettings>;
|
|
1101
1167
|
|
|
1102
1168
|
declare function getOrganizationInvite(orgId: string, inviteCode: string): Promise<OrganizationInvite>;
|
|
@@ -1105,6 +1171,10 @@ declare function getPlatformApiUrl(): string;
|
|
|
1105
1171
|
|
|
1106
1172
|
declare function getProject(orgId: string, projectId: string): Promise<Project>;
|
|
1107
1173
|
|
|
1174
|
+
export declare function getSubagent(id: string): Promise<SubagentResponse>;
|
|
1175
|
+
|
|
1176
|
+
export declare function getSubagentItem(id: string, itemId: string): Promise<ConversationItem>;
|
|
1177
|
+
|
|
1108
1178
|
export declare type GithubAuthResponse = {
|
|
1109
1179
|
auth_url: string;
|
|
1110
1180
|
csrf_token: string;
|
|
@@ -1365,6 +1435,8 @@ declare function listConversations(params?: {
|
|
|
1365
1435
|
*/
|
|
1366
1436
|
declare function listInstructions(params?: InstructionListParams): Promise<InstructionListResponse>;
|
|
1367
1437
|
|
|
1438
|
+
export declare function listMainAgentItems(params?: AgentItemsListParams): Promise<ConversationItemsResponse>;
|
|
1439
|
+
|
|
1368
1440
|
declare function listOrganizationInvites(orgId: string): Promise<OrganizationInvite[]>;
|
|
1369
1441
|
|
|
1370
1442
|
declare function listOrganizationMembers(orgId: string): Promise<OrganizationMember[]>;
|
|
@@ -1375,6 +1447,17 @@ declare function listProjects(orgId: string): Promise<Project[]>;
|
|
|
1375
1447
|
|
|
1376
1448
|
declare function listProjectSecrets(orgId: string, projectId: string): Promise<ProjectSecret[]>;
|
|
1377
1449
|
|
|
1450
|
+
export declare function listSubagentItems(id: string, params?: AgentItemsListParams): Promise<ConversationItemsResponse>;
|
|
1451
|
+
|
|
1452
|
+
export declare function listSubagents(params?: ListSubagentsParams): Promise<SubagentListResponse>;
|
|
1453
|
+
|
|
1454
|
+
export declare type ListSubagentsParams = {
|
|
1455
|
+
limit?: number;
|
|
1456
|
+
after?: string;
|
|
1457
|
+
order?: string;
|
|
1458
|
+
created_by?: AgentCreatedBy;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1378
1461
|
export declare type LoginResponse = {
|
|
1379
1462
|
id: string;
|
|
1380
1463
|
email?: string;
|
|
@@ -1382,6 +1465,16 @@ export declare type LoginResponse = {
|
|
|
1382
1465
|
refresh_token: string;
|
|
1383
1466
|
};
|
|
1384
1467
|
|
|
1468
|
+
export declare type MainAgentResponse = {
|
|
1469
|
+
id: string;
|
|
1470
|
+
object: "agent.main";
|
|
1471
|
+
kind: "main";
|
|
1472
|
+
conversation_id: string;
|
|
1473
|
+
display_name: string;
|
|
1474
|
+
created_at: number;
|
|
1475
|
+
updated_at: number;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1385
1478
|
declare type MeResponse = {
|
|
1386
1479
|
user: PlatformUser;
|
|
1387
1480
|
organizations: PlatformOrg[];
|
|
@@ -2865,7 +2958,7 @@ export declare type ResponsesCreateRequest = {
|
|
|
2865
2958
|
};
|
|
2866
2959
|
previous_response_id?: string;
|
|
2867
2960
|
stream?: boolean;
|
|
2868
|
-
metadata?: Record<string,
|
|
2961
|
+
metadata?: Record<string, unknown>;
|
|
2869
2962
|
};
|
|
2870
2963
|
|
|
2871
2964
|
export declare type ResponsesDeleteResponse = {
|
|
@@ -2906,7 +2999,7 @@ export declare type ResponsesRetrieveResponse = {
|
|
|
2906
2999
|
};
|
|
2907
3000
|
total_tokens: number;
|
|
2908
3001
|
};
|
|
2909
|
-
output?: string |
|
|
3002
|
+
output?: string | unknown[];
|
|
2910
3003
|
};
|
|
2911
3004
|
|
|
2912
3005
|
declare function setApiUrl(url: string): void;
|
|
@@ -2990,6 +3083,26 @@ declare type SignMessageResponse = {
|
|
|
2990
3083
|
message_hash: string;
|
|
2991
3084
|
};
|
|
2992
3085
|
|
|
3086
|
+
export declare type SubagentListResponse = {
|
|
3087
|
+
object: "list";
|
|
3088
|
+
data: SubagentResponse[];
|
|
3089
|
+
first_id?: string;
|
|
3090
|
+
last_id?: string;
|
|
3091
|
+
has_more: boolean;
|
|
3092
|
+
};
|
|
3093
|
+
|
|
3094
|
+
export declare type SubagentResponse = {
|
|
3095
|
+
id: string;
|
|
3096
|
+
object: "agent.subagent";
|
|
3097
|
+
kind: "subagent";
|
|
3098
|
+
conversation_id: string;
|
|
3099
|
+
display_name: string;
|
|
3100
|
+
purpose: string;
|
|
3101
|
+
created_by: AgentCreatedBy;
|
|
3102
|
+
created_at: number;
|
|
3103
|
+
updated_at: number;
|
|
3104
|
+
};
|
|
3105
|
+
|
|
2993
3106
|
declare type ThirdPartyTokenRequest = {
|
|
2994
3107
|
audience?: string;
|
|
2995
3108
|
};
|
|
@@ -3060,7 +3173,7 @@ declare function transcribeAudio(file: File | Blob, model?: string, language?: s
|
|
|
3060
3173
|
* });
|
|
3061
3174
|
* ```
|
|
3062
3175
|
*/
|
|
3063
|
-
declare function updateConversation(conversationId: string, metadata: Record<string,
|
|
3176
|
+
declare function updateConversation(conversationId: string, metadata: Record<string, unknown>): Promise<Conversation>;
|
|
3064
3177
|
|
|
3065
3178
|
declare function updateEmailSettings(orgId: string, projectId: string, settings: EmailSettings): Promise<EmailSettings>;
|
|
3066
3179
|
|