@caido/sdk-frontend 0.54.2-beta.8 → 0.54.2-beta.9
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
|
@@ -4822,6 +4822,14 @@ export type Workspace = {
|
|
|
4822
4822
|
id: Scalars["ID"]["output"];
|
|
4823
4823
|
name: Scalars["String"]["output"];
|
|
4824
4824
|
};
|
|
4825
|
+
export type TrackMutationVariables = Exact<{
|
|
4826
|
+
input: TrackInput;
|
|
4827
|
+
}>;
|
|
4828
|
+
export type TrackMutation = {
|
|
4829
|
+
track: {
|
|
4830
|
+
success: boolean;
|
|
4831
|
+
};
|
|
4832
|
+
};
|
|
4825
4833
|
export type AssistantMessageFullFragment = {
|
|
4826
4834
|
__typename: "AssistantMessage";
|
|
4827
4835
|
id: string;
|
|
@@ -23890,6 +23898,7 @@ export declare const WorkflowFullFragmentDoc = "\n fragment workflowFull on W
|
|
|
23890
23898
|
export declare const WorkflowEdgeFullFragmentDoc = "\n fragment workflowEdgeFull on WorkflowEdge {\n cursor\n node {\n ...workflowFull\n }\n}\n ";
|
|
23891
23899
|
export declare const WorkflowNodeDefinitionFullFragmentDoc = "\n fragment workflowNodeDefinitionFull on WorkflowNodeDefinition {\n __typename\n raw\n}\n ";
|
|
23892
23900
|
export declare const WorkflowTaskMetaFragmentDoc = "\n fragment workflowTaskMeta on WorkflowTask {\n ...taskMeta\n workflow {\n ...workflowMeta\n }\n}\n ";
|
|
23901
|
+
export declare const TrackDocument = "\n mutation track($input: TrackInput!) {\n track(input: $input) {\n success\n }\n}\n ";
|
|
23893
23902
|
export declare const AssistantSessionsDocument = "\n query assistantSessions {\n assistantSessions {\n ...assistantSessionMeta\n }\n}\n \n fragment assistantSessionMeta on AssistantSession {\n __typename\n id\n modelId\n name\n updatedAt\n createdAt\n}\n ";
|
|
23894
23903
|
export declare const AssistantSessionDocument = "\n query assistantSession($id: ID!) {\n assistantSession(id: $id) {\n ...assistantSessionFull\n }\n}\n \n fragment assistantSessionFull on AssistantSession {\n ...assistantSessionMeta\n messages {\n ...assistantMessageFull\n }\n}\n \n\n fragment assistantSessionMeta on AssistantSession {\n __typename\n id\n modelId\n name\n updatedAt\n createdAt\n}\n \n\n fragment assistantMessageFull on AssistantMessage {\n __typename\n id\n content\n role\n session {\n id\n }\n}\n ";
|
|
23895
23904
|
export declare const AssistantCloudStateDocument = "\n query assistantCloudState {\n viewer {\n __typename\n ... on CloudUser {\n id\n assistantUsage {\n ...assistantUsageFull\n }\n }\n }\n assistantModels {\n ...assistantModelFull\n }\n}\n \n fragment assistantUsageFull on AssistantUsage {\n __typename\n balance\n}\n \n\n fragment assistantModelFull on AssistantModel {\n __typename\n id\n name\n tokenCredit\n}\n ";
|
|
@@ -24205,6 +24214,7 @@ export declare const TestWorkflowActiveDocument = "\n mutation testWorkflowAc
|
|
|
24205
24214
|
export declare const TestWorkflowPassiveDocument = "\n mutation testWorkflowPassive($input: TestWorkflowPassiveInput!) {\n testWorkflowPassive(input: $input) {\n error {\n ... on WorkflowUserError {\n ...workflowUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n runState\n }\n}\n \n fragment workflowUserErrorFull on WorkflowUserError {\n ...userErrorFull\n node\n message\n reason\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment permissionDeniedUserErrorFull on PermissionDeniedUserError {\n ...userErrorFull\n permissionDeniedReason: reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
|
|
24206
24215
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
|
|
24207
24216
|
export declare function getSdk<C>(requester: Requester<C>): {
|
|
24217
|
+
track(variables: TrackMutationVariables, options?: C): Promise<TrackMutation>;
|
|
24208
24218
|
assistantSessions(variables?: AssistantSessionsQueryVariables, options?: C): Promise<AssistantSessionsQuery>;
|
|
24209
24219
|
assistantSession(variables: AssistantSessionQueryVariables, options?: C): Promise<AssistantSessionQuery>;
|
|
24210
24220
|
assistantCloudState(variables?: AssistantCloudStateQueryVariables, options?: C): Promise<AssistantCloudStateQuery>;
|
package/src/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { FooterSlot, type FooterSlotContent } from "./types/footer";
|
|
2
2
|
export type { DialogOptions } from "./types/window";
|
|
3
|
+
export type { _AnalyticsSDK } from "./private/analytics";
|
|
3
4
|
export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
|
|
4
5
|
export type { MenuItem } from "./types/menu";
|
|
5
6
|
export { type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* Generic analytics event input for tracking.
|
|
4
|
+
*/
|
|
5
|
+
type AnalyticsEventInput = {
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* The name/kind of the analytics event.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* @private
|
|
13
|
+
* The payload data for the analytics event.
|
|
14
|
+
*/
|
|
15
|
+
payload: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
* Utilities to track analytics events.
|
|
20
|
+
*/
|
|
21
|
+
export type _AnalyticsSDK = {
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
* Track an analytics event.
|
|
25
|
+
* @param event The analytics event to track.
|
|
26
|
+
*/
|
|
27
|
+
track: (event: AnalyticsEventInput) => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Sdk as GraphqlSDK } from "../__generated__/graphql-sdk";
|
|
2
|
+
import type { _AnalyticsSDK } from "../private/analytics";
|
|
2
3
|
import { type BackendEndpoints, type BackendEvents } from "../types/backend";
|
|
3
4
|
import type { AiSDK } from "./ai";
|
|
4
5
|
import type { AssetsSDK } from "./assets";
|
|
@@ -154,4 +155,9 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
|
|
|
154
155
|
* Utilities for logging messages to the console.
|
|
155
156
|
*/
|
|
156
157
|
log: LogSDK;
|
|
158
|
+
/**
|
|
159
|
+
* @private
|
|
160
|
+
* Utilities to track analytics events.
|
|
161
|
+
*/
|
|
162
|
+
_analytics: _AnalyticsSDK;
|
|
157
163
|
};
|