@sixb/client 0.1.1 → 0.1.3
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/agent-streams.d.ts +26 -3
- package/dist/agent-streams.d.ts.map +1 -1
- package/dist/api.d.ts +6 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +2 -2
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-2vsyqn32.js → chunk-6esh0dxx.js} +1 -1
- package/dist/{chunk-hkrfakyt.js → chunk-7ts981a8.js} +2 -2
- package/dist/{chunk-h8bd95xf.js → chunk-eyd61e4t.js} +55 -2
- package/dist/chunk-eyd61e4t.js.map +19 -0
- package/dist/{chunk-1mnf48s9.js → chunk-heqezbjc.js} +2 -2
- package/dist/{chunk-dkd2wgva.js → chunk-hfk246y4.js} +40 -28
- package/dist/{chunk-dkd2wgva.js.map → chunk-hfk246y4.js.map} +3 -3
- package/dist/{chunk-w527w02k.js → chunk-mpgzkmwc.js} +2 -74
- package/dist/chunk-mpgzkmwc.js.map +10 -0
- package/dist/{chunk-6w5w9e75.js → chunk-yjank04c.js} +27 -12
- package/dist/chunk-yjank04c.js.map +10 -0
- package/dist/client-provider.d.ts +8 -0
- package/dist/client-provider.d.ts.map +1 -0
- package/dist/connectors/connection.d.ts +50 -0
- package/dist/connectors/connection.d.ts.map +1 -0
- package/dist/connectors/index.d.ts +4 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/mutations.d.ts +62 -0
- package/dist/connectors/mutations.d.ts.map +1 -0
- package/dist/connectors/queries.d.ts +536 -0
- package/dist/connectors/queries.d.ts.map +1 -0
- package/dist/generated/@tanstack/react-query.gen.d.ts +5679 -809
- package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/sdk.gen.d.ts +41 -1
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +2330 -218
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +1180 -360
- package/dist/hooks.js.map +11 -6
- package/dist/index.js +29 -11
- package/dist/index.js.map +1 -1
- package/dist/logs.js +3 -3
- package/dist/models.d.ts +0 -31
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +23 -7
- package/dist/models.js.map +1 -1
- package/dist/query-hooks.d.ts +2 -6
- package/dist/query-hooks.d.ts.map +1 -1
- package/dist/query.js +3 -3
- package/dist/useAgentActivityStream.d.ts +14 -0
- package/dist/useAgentActivityStream.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/agent-streams.ts +68 -45
- package/src/api.ts +26 -2
- package/src/browser.ts +1 -1
- package/src/client-provider.ts +12 -0
- package/src/connectors/connection.ts +443 -0
- package/src/connectors/index.ts +12 -0
- package/src/connectors/mutations.ts +417 -0
- package/src/connectors/queries.ts +150 -0
- package/src/generated/@tanstack/react-query.gen.ts +346 -0
- package/src/generated/index.ts +60 -0
- package/src/generated/sdk.gen.ts +189 -0
- package/src/generated/types.gen.ts +3048 -254
- package/src/hooks.ts +6 -0
- package/src/models.ts +0 -103
- package/src/query-hooks.ts +8 -14
- package/src/useAgentActivityStream.ts +48 -0
- package/dist/chunk-6w5w9e75.js.map +0 -10
- package/dist/chunk-h8bd95xf.js.map +0 -19
- package/dist/chunk-w527w02k.js.map +0 -10
- /package/dist/{chunk-2vsyqn32.js.map → chunk-6esh0dxx.js.map} +0 -0
- /package/dist/{chunk-hkrfakyt.js.map → chunk-7ts981a8.js.map} +0 -0
- /package/dist/{chunk-1mnf48s9.js.map → chunk-heqezbjc.js.map} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ConnectorAccount, type ConnectorConnection } from "./queries";
|
|
2
|
+
interface ConnectorConnectionCallback {
|
|
3
|
+
readonly connectorId: string;
|
|
4
|
+
readonly runId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UseConnectorConnectionOptions {
|
|
7
|
+
readonly connectorId: string;
|
|
8
|
+
/** Stable application-defined role filled by this connection, for example `organic` or `ads`. */
|
|
9
|
+
readonly slot: string;
|
|
10
|
+
/** Defaults to the current page while preserving unrelated query parameters and the hash. */
|
|
11
|
+
readonly returnTo?: string;
|
|
12
|
+
}
|
|
13
|
+
export type ConnectorConnectionStatus = "loading" | "disconnected" | "authorizing" | "selecting_account" | "connected" | "needs_reauthorization" | "error";
|
|
14
|
+
export type ConnectorConnectionOperation = "load" | "resume" | "connect" | "select_account" | "disconnect" | "revoke";
|
|
15
|
+
export interface ConnectorConnectionFailure {
|
|
16
|
+
readonly operation: ConnectorConnectionOperation;
|
|
17
|
+
readonly cause: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface ConnectorAccountSelectionOptions {
|
|
20
|
+
readonly replace?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface UseConnectorConnectionResult {
|
|
23
|
+
readonly status: ConnectorConnectionStatus;
|
|
24
|
+
readonly connection: ConnectorConnection | undefined;
|
|
25
|
+
readonly accounts: readonly ConnectorAccount[];
|
|
26
|
+
readonly error: ConnectorConnectionFailure | null;
|
|
27
|
+
/** Whether a new authorization or reauthorization can start from the current state. */
|
|
28
|
+
readonly canConnect: boolean;
|
|
29
|
+
readonly isPending: boolean;
|
|
30
|
+
readonly selectedAccountId: string | undefined;
|
|
31
|
+
connect(): Promise<void>;
|
|
32
|
+
selectAccount(accountId: string, options?: ConnectorAccountSelectionOptions): Promise<void>;
|
|
33
|
+
disconnect(): Promise<void>;
|
|
34
|
+
revoke(): Promise<void>;
|
|
35
|
+
refresh(): Promise<void>;
|
|
36
|
+
dismiss(): void;
|
|
37
|
+
resetError(): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Headless OAuth connection flow for one application-defined connector slot.
|
|
41
|
+
*
|
|
42
|
+
* The hook owns browser redirection, durable run resumption and cache convergence. The application
|
|
43
|
+
* owns presentation, including account selection and replacement confirmation.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useConnectorConnection({ connectorId, slot, returnTo, }: UseConnectorConnectionOptions): UseConnectorConnectionResult;
|
|
46
|
+
export declare function isConnectorReplacementRequired(error: unknown): boolean;
|
|
47
|
+
export declare function readConnectorConnectionCallback(href?: string | undefined): ConnectorConnectionCallback | null;
|
|
48
|
+
export declare function connectorConnectionReturnTo(href?: string | undefined): string;
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/connectors/connection.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EAIzB,MAAM,WAAW,CAAA;AAMlB,UAAU,2BAA2B;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,iGAAiG;IACjG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,WAAW,GACX,uBAAuB,GACvB,OAAO,CAAA;AAEX,MAAM,MAAM,4BAA4B,GACpC,MAAM,GACN,QAAQ,GACR,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,QAAQ,CAAA;AAEZ,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,SAAS,EAAE,4BAA4B,CAAA;IAChD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;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@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { type ConnectorAccountSelectionOptions, type ConnectorConnectionFailure, type ConnectorConnectionOperation, type ConnectorConnectionStatus, isConnectorReplacementRequired, type UseConnectorConnectionOptions, type UseConnectorConnectionResult, useConnectorConnection, } from "./connection";
|
|
2
|
+
export * from "./mutations";
|
|
3
|
+
export * from "./queries";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,8BAA8B,EAC9B,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,sBAAsB,GACvB,MAAM,cAAc,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type QueryClient, type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Client } from "../generated/client";
|
|
3
|
+
import type { AddConnectorConnectionResponse, DisconnectConnectorConnectionResponse, ReauthorizeConnectorConnectionResponse, RevokeConnectorConnectionResponse, SelectConnectorConnectionRunAccountResponse, StartConnectorConnectionRunResponse } from "../generated/types.gen";
|
|
4
|
+
export interface AddConnectorConnectionOptions<TContext = unknown> extends Omit<UseMutationOptions<AddConnectorConnectionResponse, Error, void, TContext>, "mutationFn"> {
|
|
5
|
+
readonly connectorId: string;
|
|
6
|
+
readonly fromConnectionId: string;
|
|
7
|
+
readonly slot: string;
|
|
8
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
9
|
+
readonly client?: Client;
|
|
10
|
+
/** Override used by tests and non-hook option factory consumers. */
|
|
11
|
+
readonly queryClient?: QueryClient;
|
|
12
|
+
}
|
|
13
|
+
export declare function addConnectorConnectionMutationOptions<TContext = unknown>(options: AddConnectorConnectionOptions<TContext>): UseMutationOptions<AddConnectorConnectionResponse, Error, void, TContext>;
|
|
14
|
+
export declare function useAddConnectorConnection<TContext = unknown>(options: AddConnectorConnectionOptions<TContext>): UseMutationResult<AddConnectorConnectionResponse, Error, void, TContext>;
|
|
15
|
+
export interface ConnectConnectorOptions<TContext = unknown> extends Omit<UseMutationOptions<StartConnectorConnectionRunResponse, Error, void, TContext>, "mutationFn"> {
|
|
16
|
+
readonly connectorId: string;
|
|
17
|
+
readonly slot: string;
|
|
18
|
+
readonly returnTo: string;
|
|
19
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
20
|
+
readonly client?: Client;
|
|
21
|
+
}
|
|
22
|
+
export declare function connectConnectorMutationOptions<TContext = unknown>(options: ConnectConnectorOptions<TContext>): UseMutationOptions<StartConnectorConnectionRunResponse, Error, void, TContext>;
|
|
23
|
+
export declare function useConnectConnector<TContext = unknown>(options: ConnectConnectorOptions<TContext>): UseMutationResult<StartConnectorConnectionRunResponse, Error, void, TContext>;
|
|
24
|
+
export interface SelectConnectorAccountInput {
|
|
25
|
+
readonly accountId: string;
|
|
26
|
+
readonly replace?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface SelectConnectorAccountOptions<TContext = unknown> extends Omit<UseMutationOptions<SelectConnectorConnectionRunAccountResponse, Error, SelectConnectorAccountInput, TContext>, "mutationFn"> {
|
|
29
|
+
readonly connectorId: string;
|
|
30
|
+
readonly runId: string;
|
|
31
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
32
|
+
readonly client?: Client;
|
|
33
|
+
/** Override used by tests and non-hook option factory consumers. */
|
|
34
|
+
readonly queryClient?: QueryClient;
|
|
35
|
+
}
|
|
36
|
+
export declare function selectConnectorAccountMutationOptions<TContext = unknown>(options: SelectConnectorAccountOptions<TContext>): UseMutationOptions<SelectConnectorConnectionRunAccountResponse, Error, SelectConnectorAccountInput, TContext>;
|
|
37
|
+
export declare function useSelectConnectorAccount<TContext = unknown>(options: SelectConnectorAccountOptions<TContext>): UseMutationResult<SelectConnectorConnectionRunAccountResponse, Error, SelectConnectorAccountInput, TContext>;
|
|
38
|
+
interface ConnectorConnectionMutationOptions<TResponse, TContext> extends Omit<UseMutationOptions<TResponse, Error, void, TContext>, "mutationFn"> {
|
|
39
|
+
readonly connectorId: string;
|
|
40
|
+
readonly connectionId: string;
|
|
41
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
42
|
+
readonly client?: Client;
|
|
43
|
+
/** Override used by tests and non-hook option factory consumers. */
|
|
44
|
+
readonly queryClient?: QueryClient;
|
|
45
|
+
}
|
|
46
|
+
export type DisconnectConnectorOptions<TContext = unknown> = ConnectorConnectionMutationOptions<DisconnectConnectorConnectionResponse, TContext>;
|
|
47
|
+
export declare function disconnectConnectorMutationOptions<TContext = unknown>(options: DisconnectConnectorOptions<TContext>): UseMutationOptions<DisconnectConnectorConnectionResponse, Error, void, TContext>;
|
|
48
|
+
export declare function useDisconnectConnector<TContext = unknown>(options: DisconnectConnectorOptions<TContext>): UseMutationResult<DisconnectConnectorConnectionResponse, Error, void, TContext>;
|
|
49
|
+
export type RevokeConnectorOptions<TContext = unknown> = ConnectorConnectionMutationOptions<RevokeConnectorConnectionResponse, TContext>;
|
|
50
|
+
export declare function revokeConnectorMutationOptions<TContext = unknown>(options: RevokeConnectorOptions<TContext>): UseMutationOptions<RevokeConnectorConnectionResponse, Error, void, TContext>;
|
|
51
|
+
export declare function useRevokeConnector<TContext = unknown>(options: RevokeConnectorOptions<TContext>): UseMutationResult<RevokeConnectorConnectionResponse, Error, void, TContext>;
|
|
52
|
+
export interface ReauthorizeConnectorOptions<TContext = unknown> extends Omit<UseMutationOptions<ReauthorizeConnectorConnectionResponse, Error, void, TContext>, "mutationFn"> {
|
|
53
|
+
readonly connectorId: string;
|
|
54
|
+
readonly connectionId: string;
|
|
55
|
+
readonly returnTo: string;
|
|
56
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
57
|
+
readonly client?: Client;
|
|
58
|
+
}
|
|
59
|
+
export declare function reauthorizeConnectorMutationOptions<TContext = unknown>(options: ReauthorizeConnectorOptions<TContext>): UseMutationOptions<ReauthorizeConnectorConnectionResponse, Error, void, TContext>;
|
|
60
|
+
export declare function useReauthorizeConnector<TContext = unknown>(options: ReauthorizeConnectorOptions<TContext>): UseMutationResult<ReauthorizeConnectorConnectionResponse, Error, void, TContext>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/connectors/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGvB,MAAM,uBAAuB,CAAA;AAM9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AASjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,qCAAqC,EACrC,sCAAsC,EACtC,iCAAiC,EACjC,2CAA2C,EAC3C,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,6BAA6B,CAAC,QAAQ,GAAG,OAAO,CAC/D,SAAQ,IAAI,CACV,kBAAkB,CAAC,8BAA8B,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EACzE,YAAY,CACb;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAA;CACnC;AAED,wBAAgB,qCAAqC,CAAC,QAAQ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AED,wBAAgB,uBAAuB,CAAC,QAAQ,GAAG,OAAO,EACxD,OAAO,EAAE,2BAA2B,CAAC,QAAQ,CAAC,GAC7C,iBAAiB,CAAC,sCAAsC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAQlF"}
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import { getConnectorConnectionRunQueryKey, listConnectorConnectionsQueryKey } from "../generated/@tanstack/react-query.gen";
|
|
3
|
+
import type { Client } from "../generated/client";
|
|
4
|
+
import type { GetConnectorConnectionRunResponse, ListConnectorConnectionsResponse } from "../generated/types.gen";
|
|
5
|
+
export type ConnectorConnection = ListConnectorConnectionsResponse[number];
|
|
6
|
+
export type ConnectorAccount = ConnectorConnection["account"];
|
|
7
|
+
export type ConnectorConnectionRun = GetConnectorConnectionRunResponse;
|
|
8
|
+
export type ConnectorConnectionsQueryKey = ReturnType<typeof listConnectorConnectionsQueryKey>;
|
|
9
|
+
export interface ConnectorConnectionsOptions extends Omit<UseQueryOptions<ListConnectorConnectionsResponse, Error, ListConnectorConnectionsResponse, ConnectorConnectionsQueryKey>, "queryKey" | "queryFn"> {
|
|
10
|
+
readonly connectorId: string;
|
|
11
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
12
|
+
readonly client?: Client;
|
|
13
|
+
}
|
|
14
|
+
export declare function connectorConnectionsQueryOptions(options: ConnectorConnectionsOptions): import("@tanstack/react-query").OmitKeyof<UseQueryOptions<{
|
|
15
|
+
id: string;
|
|
16
|
+
connectorId: string;
|
|
17
|
+
owner: {
|
|
18
|
+
type: "project";
|
|
19
|
+
};
|
|
20
|
+
slot: string;
|
|
21
|
+
account: {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
avatarUrl?: string;
|
|
26
|
+
};
|
|
27
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
28
|
+
}[], Error, {
|
|
29
|
+
id: string;
|
|
30
|
+
connectorId: string;
|
|
31
|
+
owner: {
|
|
32
|
+
type: "project";
|
|
33
|
+
};
|
|
34
|
+
slot: string;
|
|
35
|
+
account: {
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
avatarUrl?: string;
|
|
40
|
+
};
|
|
41
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
42
|
+
}[], [Pick<import("..").Options<import("..").ListConnectorConnectionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
43
|
+
_id: string;
|
|
44
|
+
_infinite?: boolean;
|
|
45
|
+
tags?: ReadonlyArray<string>;
|
|
46
|
+
}]>, "queryFn"> & {
|
|
47
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
48
|
+
id: string;
|
|
49
|
+
connectorId: string;
|
|
50
|
+
owner: {
|
|
51
|
+
type: "project";
|
|
52
|
+
};
|
|
53
|
+
slot: string;
|
|
54
|
+
account: {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
avatarUrl?: string;
|
|
59
|
+
};
|
|
60
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
61
|
+
}[], [Pick<import("..").Options<import("..").ListConnectorConnectionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
62
|
+
_id: string;
|
|
63
|
+
_infinite?: boolean;
|
|
64
|
+
tags?: ReadonlyArray<string>;
|
|
65
|
+
}], never> | undefined;
|
|
66
|
+
} & {
|
|
67
|
+
queryKey: [Pick<import("..").Options<import("..").ListConnectorConnectionsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
68
|
+
_id: string;
|
|
69
|
+
_infinite?: boolean;
|
|
70
|
+
tags?: ReadonlyArray<string>;
|
|
71
|
+
}] & {
|
|
72
|
+
[dataTagSymbol]: {
|
|
73
|
+
id: string;
|
|
74
|
+
connectorId: string;
|
|
75
|
+
owner: {
|
|
76
|
+
type: "project";
|
|
77
|
+
};
|
|
78
|
+
slot: string;
|
|
79
|
+
account: {
|
|
80
|
+
id: string;
|
|
81
|
+
label: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
avatarUrl?: string;
|
|
84
|
+
};
|
|
85
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
86
|
+
}[];
|
|
87
|
+
[dataTagErrorSymbol]: Error;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare function useConnectorConnections(options: ConnectorConnectionsOptions): UseQueryResult<ListConnectorConnectionsResponse, Error>;
|
|
91
|
+
export type ConnectorConnectionRunQueryKey = ReturnType<typeof getConnectorConnectionRunQueryKey>;
|
|
92
|
+
export interface ConnectorConnectionRunOptions extends Omit<UseQueryOptions<GetConnectorConnectionRunResponse, Error, GetConnectorConnectionRunResponse, ConnectorConnectionRunQueryKey>, "queryKey" | "queryFn"> {
|
|
93
|
+
readonly connectorId: string;
|
|
94
|
+
/** A missing callback query parameter disables the query. */
|
|
95
|
+
readonly runId: string | null | undefined;
|
|
96
|
+
/** hey-api client override. Defaults to the nearest SixbProvider client, then the global client. */
|
|
97
|
+
readonly client?: Client;
|
|
98
|
+
}
|
|
99
|
+
export declare function connectorConnectionRunQueryOptions(options: ConnectorConnectionRunOptions): import("@tanstack/react-query").OmitKeyof<UseQueryOptions<{
|
|
100
|
+
id: string;
|
|
101
|
+
connectorId: string;
|
|
102
|
+
kind: "connect" | "reauthorize";
|
|
103
|
+
owner: {
|
|
104
|
+
type: "project";
|
|
105
|
+
};
|
|
106
|
+
slot: string;
|
|
107
|
+
createdAt: string;
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
status: "waiting";
|
|
110
|
+
waitingFor: "provider_authorization";
|
|
111
|
+
expiresAt: string;
|
|
112
|
+
} | {
|
|
113
|
+
id: string;
|
|
114
|
+
connectorId: string;
|
|
115
|
+
kind: "connect" | "reauthorize";
|
|
116
|
+
owner: {
|
|
117
|
+
type: "project";
|
|
118
|
+
};
|
|
119
|
+
slot: string;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
updatedAt: string;
|
|
122
|
+
status: "running";
|
|
123
|
+
} | {
|
|
124
|
+
id: string;
|
|
125
|
+
connectorId: string;
|
|
126
|
+
kind: "connect" | "reauthorize";
|
|
127
|
+
owner: {
|
|
128
|
+
type: "project";
|
|
129
|
+
};
|
|
130
|
+
slot: string;
|
|
131
|
+
createdAt: string;
|
|
132
|
+
updatedAt: string;
|
|
133
|
+
status: "waiting";
|
|
134
|
+
waitingFor: "account_selection";
|
|
135
|
+
accounts: Array<{
|
|
136
|
+
id: string;
|
|
137
|
+
label: string;
|
|
138
|
+
description?: string;
|
|
139
|
+
avatarUrl?: string;
|
|
140
|
+
}>;
|
|
141
|
+
expiresAt: string;
|
|
142
|
+
} | {
|
|
143
|
+
id: string;
|
|
144
|
+
connectorId: string;
|
|
145
|
+
kind: "connect" | "reauthorize";
|
|
146
|
+
owner: {
|
|
147
|
+
type: "project";
|
|
148
|
+
};
|
|
149
|
+
slot: string;
|
|
150
|
+
createdAt: string;
|
|
151
|
+
updatedAt: string;
|
|
152
|
+
status: "succeeded";
|
|
153
|
+
connections: Array<{
|
|
154
|
+
id: string;
|
|
155
|
+
connectorId: string;
|
|
156
|
+
owner: {
|
|
157
|
+
type: "project";
|
|
158
|
+
};
|
|
159
|
+
slot: string;
|
|
160
|
+
account: {
|
|
161
|
+
id: string;
|
|
162
|
+
label: string;
|
|
163
|
+
description?: string;
|
|
164
|
+
avatarUrl?: string;
|
|
165
|
+
};
|
|
166
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
167
|
+
}>;
|
|
168
|
+
finishedAt: string;
|
|
169
|
+
} | {
|
|
170
|
+
id: string;
|
|
171
|
+
connectorId: string;
|
|
172
|
+
kind: "connect" | "reauthorize";
|
|
173
|
+
owner: {
|
|
174
|
+
type: "project";
|
|
175
|
+
};
|
|
176
|
+
slot: string;
|
|
177
|
+
createdAt: string;
|
|
178
|
+
updatedAt: string;
|
|
179
|
+
status: "failed";
|
|
180
|
+
error: {
|
|
181
|
+
code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
|
|
182
|
+
message: string;
|
|
183
|
+
retryable: boolean;
|
|
184
|
+
at: string;
|
|
185
|
+
details?: string | number | boolean | Array<unknown> | {
|
|
186
|
+
[key: string]: unknown;
|
|
187
|
+
} | null;
|
|
188
|
+
truncated?: true;
|
|
189
|
+
};
|
|
190
|
+
finishedAt: string;
|
|
191
|
+
} | {
|
|
192
|
+
id: string;
|
|
193
|
+
connectorId: string;
|
|
194
|
+
kind: "connect" | "reauthorize";
|
|
195
|
+
owner: {
|
|
196
|
+
type: "project";
|
|
197
|
+
};
|
|
198
|
+
slot: string;
|
|
199
|
+
createdAt: string;
|
|
200
|
+
updatedAt: string;
|
|
201
|
+
status: "cancelled" | "expired";
|
|
202
|
+
finishedAt: string;
|
|
203
|
+
}, Error, {
|
|
204
|
+
id: string;
|
|
205
|
+
connectorId: string;
|
|
206
|
+
kind: "connect" | "reauthorize";
|
|
207
|
+
owner: {
|
|
208
|
+
type: "project";
|
|
209
|
+
};
|
|
210
|
+
slot: string;
|
|
211
|
+
createdAt: string;
|
|
212
|
+
updatedAt: string;
|
|
213
|
+
status: "waiting";
|
|
214
|
+
waitingFor: "provider_authorization";
|
|
215
|
+
expiresAt: string;
|
|
216
|
+
} | {
|
|
217
|
+
id: string;
|
|
218
|
+
connectorId: string;
|
|
219
|
+
kind: "connect" | "reauthorize";
|
|
220
|
+
owner: {
|
|
221
|
+
type: "project";
|
|
222
|
+
};
|
|
223
|
+
slot: string;
|
|
224
|
+
createdAt: string;
|
|
225
|
+
updatedAt: string;
|
|
226
|
+
status: "running";
|
|
227
|
+
} | {
|
|
228
|
+
id: string;
|
|
229
|
+
connectorId: string;
|
|
230
|
+
kind: "connect" | "reauthorize";
|
|
231
|
+
owner: {
|
|
232
|
+
type: "project";
|
|
233
|
+
};
|
|
234
|
+
slot: string;
|
|
235
|
+
createdAt: string;
|
|
236
|
+
updatedAt: string;
|
|
237
|
+
status: "waiting";
|
|
238
|
+
waitingFor: "account_selection";
|
|
239
|
+
accounts: Array<{
|
|
240
|
+
id: string;
|
|
241
|
+
label: string;
|
|
242
|
+
description?: string;
|
|
243
|
+
avatarUrl?: string;
|
|
244
|
+
}>;
|
|
245
|
+
expiresAt: string;
|
|
246
|
+
} | {
|
|
247
|
+
id: string;
|
|
248
|
+
connectorId: string;
|
|
249
|
+
kind: "connect" | "reauthorize";
|
|
250
|
+
owner: {
|
|
251
|
+
type: "project";
|
|
252
|
+
};
|
|
253
|
+
slot: string;
|
|
254
|
+
createdAt: string;
|
|
255
|
+
updatedAt: string;
|
|
256
|
+
status: "succeeded";
|
|
257
|
+
connections: Array<{
|
|
258
|
+
id: string;
|
|
259
|
+
connectorId: string;
|
|
260
|
+
owner: {
|
|
261
|
+
type: "project";
|
|
262
|
+
};
|
|
263
|
+
slot: string;
|
|
264
|
+
account: {
|
|
265
|
+
id: string;
|
|
266
|
+
label: string;
|
|
267
|
+
description?: string;
|
|
268
|
+
avatarUrl?: string;
|
|
269
|
+
};
|
|
270
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
271
|
+
}>;
|
|
272
|
+
finishedAt: string;
|
|
273
|
+
} | {
|
|
274
|
+
id: string;
|
|
275
|
+
connectorId: string;
|
|
276
|
+
kind: "connect" | "reauthorize";
|
|
277
|
+
owner: {
|
|
278
|
+
type: "project";
|
|
279
|
+
};
|
|
280
|
+
slot: string;
|
|
281
|
+
createdAt: string;
|
|
282
|
+
updatedAt: string;
|
|
283
|
+
status: "failed";
|
|
284
|
+
error: {
|
|
285
|
+
code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
|
|
286
|
+
message: string;
|
|
287
|
+
retryable: boolean;
|
|
288
|
+
at: string;
|
|
289
|
+
details?: string | number | boolean | Array<unknown> | {
|
|
290
|
+
[key: string]: unknown;
|
|
291
|
+
} | null;
|
|
292
|
+
truncated?: true;
|
|
293
|
+
};
|
|
294
|
+
finishedAt: string;
|
|
295
|
+
} | {
|
|
296
|
+
id: string;
|
|
297
|
+
connectorId: string;
|
|
298
|
+
kind: "connect" | "reauthorize";
|
|
299
|
+
owner: {
|
|
300
|
+
type: "project";
|
|
301
|
+
};
|
|
302
|
+
slot: string;
|
|
303
|
+
createdAt: string;
|
|
304
|
+
updatedAt: string;
|
|
305
|
+
status: "cancelled" | "expired";
|
|
306
|
+
finishedAt: string;
|
|
307
|
+
}, [Pick<import("..").Options<import("..").GetConnectorConnectionRunData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
308
|
+
_id: string;
|
|
309
|
+
_infinite?: boolean;
|
|
310
|
+
tags?: ReadonlyArray<string>;
|
|
311
|
+
}]>, "queryFn"> & {
|
|
312
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
313
|
+
id: string;
|
|
314
|
+
connectorId: string;
|
|
315
|
+
kind: "connect" | "reauthorize";
|
|
316
|
+
owner: {
|
|
317
|
+
type: "project";
|
|
318
|
+
};
|
|
319
|
+
slot: string;
|
|
320
|
+
createdAt: string;
|
|
321
|
+
updatedAt: string;
|
|
322
|
+
status: "waiting";
|
|
323
|
+
waitingFor: "provider_authorization";
|
|
324
|
+
expiresAt: string;
|
|
325
|
+
} | {
|
|
326
|
+
id: string;
|
|
327
|
+
connectorId: string;
|
|
328
|
+
kind: "connect" | "reauthorize";
|
|
329
|
+
owner: {
|
|
330
|
+
type: "project";
|
|
331
|
+
};
|
|
332
|
+
slot: string;
|
|
333
|
+
createdAt: string;
|
|
334
|
+
updatedAt: string;
|
|
335
|
+
status: "running";
|
|
336
|
+
} | {
|
|
337
|
+
id: string;
|
|
338
|
+
connectorId: string;
|
|
339
|
+
kind: "connect" | "reauthorize";
|
|
340
|
+
owner: {
|
|
341
|
+
type: "project";
|
|
342
|
+
};
|
|
343
|
+
slot: string;
|
|
344
|
+
createdAt: string;
|
|
345
|
+
updatedAt: string;
|
|
346
|
+
status: "waiting";
|
|
347
|
+
waitingFor: "account_selection";
|
|
348
|
+
accounts: Array<{
|
|
349
|
+
id: string;
|
|
350
|
+
label: string;
|
|
351
|
+
description?: string;
|
|
352
|
+
avatarUrl?: string;
|
|
353
|
+
}>;
|
|
354
|
+
expiresAt: string;
|
|
355
|
+
} | {
|
|
356
|
+
id: string;
|
|
357
|
+
connectorId: string;
|
|
358
|
+
kind: "connect" | "reauthorize";
|
|
359
|
+
owner: {
|
|
360
|
+
type: "project";
|
|
361
|
+
};
|
|
362
|
+
slot: string;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
updatedAt: string;
|
|
365
|
+
status: "succeeded";
|
|
366
|
+
connections: Array<{
|
|
367
|
+
id: string;
|
|
368
|
+
connectorId: string;
|
|
369
|
+
owner: {
|
|
370
|
+
type: "project";
|
|
371
|
+
};
|
|
372
|
+
slot: string;
|
|
373
|
+
account: {
|
|
374
|
+
id: string;
|
|
375
|
+
label: string;
|
|
376
|
+
description?: string;
|
|
377
|
+
avatarUrl?: string;
|
|
378
|
+
};
|
|
379
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
380
|
+
}>;
|
|
381
|
+
finishedAt: string;
|
|
382
|
+
} | {
|
|
383
|
+
id: string;
|
|
384
|
+
connectorId: string;
|
|
385
|
+
kind: "connect" | "reauthorize";
|
|
386
|
+
owner: {
|
|
387
|
+
type: "project";
|
|
388
|
+
};
|
|
389
|
+
slot: string;
|
|
390
|
+
createdAt: string;
|
|
391
|
+
updatedAt: string;
|
|
392
|
+
status: "failed";
|
|
393
|
+
error: {
|
|
394
|
+
code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
|
|
395
|
+
message: string;
|
|
396
|
+
retryable: boolean;
|
|
397
|
+
at: string;
|
|
398
|
+
details?: string | number | boolean | Array<unknown> | {
|
|
399
|
+
[key: string]: unknown;
|
|
400
|
+
} | null;
|
|
401
|
+
truncated?: true;
|
|
402
|
+
};
|
|
403
|
+
finishedAt: string;
|
|
404
|
+
} | {
|
|
405
|
+
id: string;
|
|
406
|
+
connectorId: string;
|
|
407
|
+
kind: "connect" | "reauthorize";
|
|
408
|
+
owner: {
|
|
409
|
+
type: "project";
|
|
410
|
+
};
|
|
411
|
+
slot: string;
|
|
412
|
+
createdAt: string;
|
|
413
|
+
updatedAt: string;
|
|
414
|
+
status: "cancelled" | "expired";
|
|
415
|
+
finishedAt: string;
|
|
416
|
+
}, [Pick<import("..").Options<import("..").GetConnectorConnectionRunData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
417
|
+
_id: string;
|
|
418
|
+
_infinite?: boolean;
|
|
419
|
+
tags?: ReadonlyArray<string>;
|
|
420
|
+
}], never> | undefined;
|
|
421
|
+
} & {
|
|
422
|
+
queryKey: [Pick<import("..").Options<import("..").GetConnectorConnectionRunData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
423
|
+
_id: string;
|
|
424
|
+
_infinite?: boolean;
|
|
425
|
+
tags?: ReadonlyArray<string>;
|
|
426
|
+
}] & {
|
|
427
|
+
[dataTagSymbol]: {
|
|
428
|
+
id: string;
|
|
429
|
+
connectorId: string;
|
|
430
|
+
kind: "connect" | "reauthorize";
|
|
431
|
+
owner: {
|
|
432
|
+
type: "project";
|
|
433
|
+
};
|
|
434
|
+
slot: string;
|
|
435
|
+
createdAt: string;
|
|
436
|
+
updatedAt: string;
|
|
437
|
+
status: "waiting";
|
|
438
|
+
waitingFor: "provider_authorization";
|
|
439
|
+
expiresAt: string;
|
|
440
|
+
} | {
|
|
441
|
+
id: string;
|
|
442
|
+
connectorId: string;
|
|
443
|
+
kind: "connect" | "reauthorize";
|
|
444
|
+
owner: {
|
|
445
|
+
type: "project";
|
|
446
|
+
};
|
|
447
|
+
slot: string;
|
|
448
|
+
createdAt: string;
|
|
449
|
+
updatedAt: string;
|
|
450
|
+
status: "running";
|
|
451
|
+
} | {
|
|
452
|
+
id: string;
|
|
453
|
+
connectorId: string;
|
|
454
|
+
kind: "connect" | "reauthorize";
|
|
455
|
+
owner: {
|
|
456
|
+
type: "project";
|
|
457
|
+
};
|
|
458
|
+
slot: string;
|
|
459
|
+
createdAt: string;
|
|
460
|
+
updatedAt: string;
|
|
461
|
+
status: "waiting";
|
|
462
|
+
waitingFor: "account_selection";
|
|
463
|
+
accounts: Array<{
|
|
464
|
+
id: string;
|
|
465
|
+
label: string;
|
|
466
|
+
description?: string;
|
|
467
|
+
avatarUrl?: string;
|
|
468
|
+
}>;
|
|
469
|
+
expiresAt: string;
|
|
470
|
+
} | {
|
|
471
|
+
id: string;
|
|
472
|
+
connectorId: string;
|
|
473
|
+
kind: "connect" | "reauthorize";
|
|
474
|
+
owner: {
|
|
475
|
+
type: "project";
|
|
476
|
+
};
|
|
477
|
+
slot: string;
|
|
478
|
+
createdAt: string;
|
|
479
|
+
updatedAt: string;
|
|
480
|
+
status: "succeeded";
|
|
481
|
+
connections: Array<{
|
|
482
|
+
id: string;
|
|
483
|
+
connectorId: string;
|
|
484
|
+
owner: {
|
|
485
|
+
type: "project";
|
|
486
|
+
};
|
|
487
|
+
slot: string;
|
|
488
|
+
account: {
|
|
489
|
+
id: string;
|
|
490
|
+
label: string;
|
|
491
|
+
description?: string;
|
|
492
|
+
avatarUrl?: string;
|
|
493
|
+
};
|
|
494
|
+
status: "connected" | "needs_reauthorization" | "disconnected";
|
|
495
|
+
}>;
|
|
496
|
+
finishedAt: string;
|
|
497
|
+
} | {
|
|
498
|
+
id: string;
|
|
499
|
+
connectorId: string;
|
|
500
|
+
kind: "connect" | "reauthorize";
|
|
501
|
+
owner: {
|
|
502
|
+
type: "project";
|
|
503
|
+
};
|
|
504
|
+
slot: string;
|
|
505
|
+
createdAt: string;
|
|
506
|
+
updatedAt: string;
|
|
507
|
+
status: "failed";
|
|
508
|
+
error: {
|
|
509
|
+
code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
|
|
510
|
+
message: string;
|
|
511
|
+
retryable: boolean;
|
|
512
|
+
at: string;
|
|
513
|
+
details?: string | number | boolean | Array<unknown> | {
|
|
514
|
+
[key: string]: unknown;
|
|
515
|
+
} | null;
|
|
516
|
+
truncated?: true;
|
|
517
|
+
};
|
|
518
|
+
finishedAt: string;
|
|
519
|
+
} | {
|
|
520
|
+
id: string;
|
|
521
|
+
connectorId: string;
|
|
522
|
+
kind: "connect" | "reauthorize";
|
|
523
|
+
owner: {
|
|
524
|
+
type: "project";
|
|
525
|
+
};
|
|
526
|
+
slot: string;
|
|
527
|
+
createdAt: string;
|
|
528
|
+
updatedAt: string;
|
|
529
|
+
status: "cancelled" | "expired";
|
|
530
|
+
finishedAt: string;
|
|
531
|
+
};
|
|
532
|
+
[dataTagErrorSymbol]: Error;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
export declare function useConnectorConnectionRun(options: ConnectorConnectionRunOptions): UseQueryResult<GetConnectorConnectionRunResponse, Error>;
|
|
536
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/connectors/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,iCAAiC,EACjC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