@caido/sdk-frontend 0.54.2-beta.15 → 0.54.2-beta.16
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
|
@@ -10500,6 +10500,48 @@ export type HostedFilesQuery = {
|
|
|
10500
10500
|
createdAt: Date;
|
|
10501
10501
|
}>;
|
|
10502
10502
|
};
|
|
10503
|
+
export type OnUploadedHostedFileSubscriptionVariables = Exact<{
|
|
10504
|
+
[key: string]: never;
|
|
10505
|
+
}>;
|
|
10506
|
+
export type OnUploadedHostedFileSubscription = {
|
|
10507
|
+
uploadedHostedFile: {
|
|
10508
|
+
hostedFile: {
|
|
10509
|
+
__typename: "HostedFile";
|
|
10510
|
+
id: string;
|
|
10511
|
+
name: string;
|
|
10512
|
+
path: string;
|
|
10513
|
+
size: number;
|
|
10514
|
+
status: HostedFileStatus;
|
|
10515
|
+
updatedAt: Date;
|
|
10516
|
+
createdAt: Date;
|
|
10517
|
+
};
|
|
10518
|
+
};
|
|
10519
|
+
};
|
|
10520
|
+
export type OnDeletedHostedFileSubscriptionVariables = Exact<{
|
|
10521
|
+
[key: string]: never;
|
|
10522
|
+
}>;
|
|
10523
|
+
export type OnDeletedHostedFileSubscription = {
|
|
10524
|
+
deletedHostedFile: {
|
|
10525
|
+
deletedHostedFileId: string;
|
|
10526
|
+
};
|
|
10527
|
+
};
|
|
10528
|
+
export type OnUpdatedHostedFileSubscriptionVariables = Exact<{
|
|
10529
|
+
[key: string]: never;
|
|
10530
|
+
}>;
|
|
10531
|
+
export type OnUpdatedHostedFileSubscription = {
|
|
10532
|
+
updatedHostedFile: {
|
|
10533
|
+
hostedFile: {
|
|
10534
|
+
__typename: "HostedFile";
|
|
10535
|
+
id: string;
|
|
10536
|
+
name: string;
|
|
10537
|
+
path: string;
|
|
10538
|
+
size: number;
|
|
10539
|
+
status: HostedFileStatus;
|
|
10540
|
+
updatedAt: Date;
|
|
10541
|
+
createdAt: Date;
|
|
10542
|
+
};
|
|
10543
|
+
};
|
|
10544
|
+
};
|
|
10503
10545
|
export type InstanceSettingsFullFragment = {
|
|
10504
10546
|
__typename: "InstanceSettings";
|
|
10505
10547
|
aiProviders: {
|
|
@@ -24845,6 +24887,9 @@ export declare const DeleteHostedFileDocument = "\n mutation deleteHostedFile
|
|
|
24845
24887
|
export declare const RenameHostedFileDocument = "\n mutation renameHostedFile($id: ID!, $name: String!) {\n renameHostedFile(id: $id, name: $name) {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
|
|
24846
24888
|
export declare const UploadHostedFileDocument = "\n mutation uploadHostedFile($input: UploadHostedFileInput!) {\n uploadHostedFile(input: $input) {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
|
|
24847
24889
|
export declare const HostedFilesDocument = "\n query hostedFiles {\n hostedFiles {\n ...hostedFileFull\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
|
|
24890
|
+
export declare const OnUploadedHostedFileDocument = "\n subscription onUploadedHostedFile {\n uploadedHostedFile {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
|
|
24891
|
+
export declare const OnDeletedHostedFileDocument = "\n subscription onDeletedHostedFile {\n deletedHostedFile {\n deletedHostedFileId\n }\n}\n ";
|
|
24892
|
+
export declare const OnUpdatedHostedFileDocument = "\n subscription onUpdatedHostedFile {\n updatedHostedFile {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
|
|
24848
24893
|
export declare const SetInstanceSettingsDocument = "\n mutation setInstanceSettings($input: SetInstanceSettingsInput!) {\n setInstanceSettings(input: $input) {\n settings {\n ...instanceSettingsFull\n }\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
|
|
24849
24894
|
export declare const TestAiProviderDocument = "\n mutation testAiProvider($input: TestAIProviderInput!) {\n testAiProvider(input: $input) {\n ...testAiProviderPayloadFull\n }\n}\n \n fragment testAiProviderPayloadFull on TestAIProviderPayload {\n error {\n ... on AIUserError {\n code\n message\n reason\n }\n ... on OtherUserError {\n code\n }\n }\n success\n}\n ";
|
|
24850
24895
|
export declare const InstanceSettingsDocument = "\n query instanceSettings {\n instanceSettings {\n ...instanceSettingsFull\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
|
|
@@ -25167,6 +25212,9 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
25167
25212
|
renameHostedFile(variables: RenameHostedFileMutationVariables, options?: C): Promise<RenameHostedFileMutation>;
|
|
25168
25213
|
uploadHostedFile(variables: UploadHostedFileMutationVariables, options?: C): Promise<UploadHostedFileMutation>;
|
|
25169
25214
|
hostedFiles(variables?: HostedFilesQueryVariables, options?: C): Promise<HostedFilesQuery>;
|
|
25215
|
+
onUploadedHostedFile(variables?: OnUploadedHostedFileSubscriptionVariables, options?: C): AsyncIterable<OnUploadedHostedFileSubscription>;
|
|
25216
|
+
onDeletedHostedFile(variables?: OnDeletedHostedFileSubscriptionVariables, options?: C): AsyncIterable<OnDeletedHostedFileSubscription>;
|
|
25217
|
+
onUpdatedHostedFile(variables?: OnUpdatedHostedFileSubscriptionVariables, options?: C): AsyncIterable<OnUpdatedHostedFileSubscription>;
|
|
25170
25218
|
setInstanceSettings(variables: SetInstanceSettingsMutationVariables, options?: C): Promise<SetInstanceSettingsMutation>;
|
|
25171
25219
|
testAiProvider(variables: TestAiProviderMutationVariables, options?: C): Promise<TestAiProviderMutation>;
|
|
25172
25220
|
instanceSettings(variables?: InstanceSettingsQueryVariables, options?: C): Promise<InstanceSettingsQuery>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ListenerHandle } from "src/types/utils";
|
|
1
2
|
import { type HostedFile } from "../types/files";
|
|
2
3
|
/**
|
|
3
4
|
* SDK for interacting with the Files page.
|
|
@@ -28,4 +29,46 @@ export type FilesSDK = {
|
|
|
28
29
|
* @returns The deleted file.
|
|
29
30
|
*/
|
|
30
31
|
delete: (id: string) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Listen for uploaded hosted files.
|
|
34
|
+
* @param callback The callback function that receives the hosted file.
|
|
35
|
+
* @returns A handle object with a `stop` method to stop listening.
|
|
36
|
+
* @example
|
|
37
|
+
*
|
|
38
|
+
* const handle = sdk.files.onUploadedHostedFile((hostedFile) => {
|
|
39
|
+
* console.log(`Hosted file uploaded:`, hostedFile);
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // Later, stop listening
|
|
43
|
+
* handle.stop();
|
|
44
|
+
*/
|
|
45
|
+
onUploadedHostedFile: (callback: (event: HostedFile) => void) => ListenerHandle;
|
|
46
|
+
/**
|
|
47
|
+
* Listen for updated hosted files.
|
|
48
|
+
* @param callback The callback function that receives the hosted file.
|
|
49
|
+
* @returns A handle object with a `stop` method to stop listening.
|
|
50
|
+
* @example
|
|
51
|
+
*
|
|
52
|
+
* const handle = sdk.files.onUpdatedHostedFile((hostedFile) => {
|
|
53
|
+
* console.log(`Hosted file updated:`, hostedFile);
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* // Later, stop listening
|
|
57
|
+
* handle.stop();
|
|
58
|
+
*/
|
|
59
|
+
onUpdatedHostedFile: (callback: (event: HostedFile) => void) => ListenerHandle;
|
|
60
|
+
/**
|
|
61
|
+
* Listen for deleted hosted files.
|
|
62
|
+
* @param callback The callback function that receives the file ID.
|
|
63
|
+
* @returns A handle object with a `stop` method to stop listening.
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
66
|
+
* const handle = sdk.files.onDeletedHostedFile((fileId) => {
|
|
67
|
+
* console.log(`Hosted file deleted:`, fileId);
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* // Later, stop listening
|
|
71
|
+
* handle.stop();
|
|
72
|
+
*/
|
|
73
|
+
onDeletedHostedFile: (callback: (fileId: string) => void) => ListenerHandle;
|
|
31
74
|
};
|