refactor(core): simplify integration credentials (#31968)
This commit is contained in:
@@ -265,20 +265,10 @@ import type {
|
||||
V2AgentListResponses,
|
||||
V2CommandListErrors,
|
||||
V2CommandListResponses,
|
||||
V2ConnectorConnectKeyErrors,
|
||||
V2ConnectorConnectKeyResponses,
|
||||
V2ConnectorConnectOauthBeginErrors,
|
||||
V2ConnectorConnectOauthBeginResponses,
|
||||
V2ConnectorConnectOauthCancelErrors,
|
||||
V2ConnectorConnectOauthCancelResponses,
|
||||
V2ConnectorConnectOauthCompleteErrors,
|
||||
V2ConnectorConnectOauthCompleteResponses,
|
||||
V2ConnectorConnectOauthStatusErrors,
|
||||
V2ConnectorConnectOauthStatusResponses,
|
||||
V2ConnectorGetErrors,
|
||||
V2ConnectorGetResponses,
|
||||
V2ConnectorListErrors,
|
||||
V2ConnectorListResponses,
|
||||
V2CredentialRemoveErrors,
|
||||
V2CredentialRemoveResponses,
|
||||
V2CredentialUpdateErrors,
|
||||
V2CredentialUpdateResponses,
|
||||
V2EventSubscribeErrors,
|
||||
V2EventSubscribeResponses,
|
||||
V2FsFindErrors,
|
||||
@@ -289,6 +279,20 @@ import type {
|
||||
V2FsReadResponses,
|
||||
V2HealthGetErrors,
|
||||
V2HealthGetResponses,
|
||||
V2IntegrationAttemptCancelErrors,
|
||||
V2IntegrationAttemptCancelResponses,
|
||||
V2IntegrationAttemptCompleteErrors,
|
||||
V2IntegrationAttemptCompleteResponses,
|
||||
V2IntegrationAttemptStatusErrors,
|
||||
V2IntegrationAttemptStatusResponses,
|
||||
V2IntegrationConnectKeyErrors,
|
||||
V2IntegrationConnectKeyResponses,
|
||||
V2IntegrationConnectOauthErrors,
|
||||
V2IntegrationConnectOauthResponses,
|
||||
V2IntegrationGetErrors,
|
||||
V2IntegrationGetResponses,
|
||||
V2IntegrationListErrors,
|
||||
V2IntegrationListResponses,
|
||||
V2LocationGetErrors,
|
||||
V2LocationGetResponses,
|
||||
V2ModelListErrors,
|
||||
@@ -5581,15 +5585,61 @@ export class Provider2 extends HeyApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
export class Oauth2 extends HeyApiClient {
|
||||
export class Connect extends HeyApiClient {
|
||||
/**
|
||||
* Connect with key
|
||||
*
|
||||
* Run a key authentication method and store the resulting credential.
|
||||
*/
|
||||
public key<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
integrationID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
key?: string
|
||||
label?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "integrationID" },
|
||||
{ in: "query", key: "location" },
|
||||
{ in: "body", key: "key" },
|
||||
{ in: "body", key: "label" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2IntegrationConnectKeyResponses,
|
||||
V2IntegrationConnectKeyErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/integration/{integrationID}/connect/key",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
...params.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin OAuth connection
|
||||
*
|
||||
* Start an OAuth attempt and return the authorization details.
|
||||
*/
|
||||
public begin<ThrowOnError extends boolean = false>(
|
||||
public oauth<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
connectorID: string
|
||||
integrationID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
@@ -5607,7 +5657,7 @@ export class Oauth2 extends HeyApiClient {
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "connectorID" },
|
||||
{ in: "path", key: "integrationID" },
|
||||
{ in: "query", key: "location" },
|
||||
{ in: "body", key: "methodID" },
|
||||
{ in: "body", key: "inputs" },
|
||||
@@ -5617,11 +5667,11 @@ export class Oauth2 extends HeyApiClient {
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2ConnectorConnectOauthBeginResponses,
|
||||
V2ConnectorConnectOauthBeginErrors,
|
||||
V2IntegrationConnectOauthResponses,
|
||||
V2IntegrationConnectOauthErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/connector/{connectorID}/connect/oauth",
|
||||
url: "/api/integration/{integrationID}/connect/oauth",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
@@ -5631,7 +5681,9 @@ export class Oauth2 extends HeyApiClient {
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Attempt extends HeyApiClient {
|
||||
/**
|
||||
* Cancel OAuth connection
|
||||
*
|
||||
@@ -5659,11 +5711,11 @@ export class Oauth2 extends HeyApiClient {
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).delete<
|
||||
V2ConnectorConnectOauthCancelResponses,
|
||||
V2ConnectorConnectOauthCancelErrors,
|
||||
V2IntegrationAttemptCancelResponses,
|
||||
V2IntegrationAttemptCancelErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/connector/oauth/{attemptID}",
|
||||
url: "/api/integration/attempt/{attemptID}",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
@@ -5696,11 +5748,11 @@ export class Oauth2 extends HeyApiClient {
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).get<
|
||||
V2ConnectorConnectOauthStatusResponses,
|
||||
V2ConnectorConnectOauthStatusErrors,
|
||||
V2IntegrationAttemptStatusResponses,
|
||||
V2IntegrationAttemptStatusErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/connector/oauth/{attemptID}",
|
||||
url: "/api/integration/attempt/{attemptID}",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
@@ -5735,11 +5787,11 @@ export class Oauth2 extends HeyApiClient {
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2ConnectorConnectOauthCompleteResponses,
|
||||
V2ConnectorConnectOauthCompleteErrors,
|
||||
V2IntegrationAttemptCompleteResponses,
|
||||
V2IntegrationAttemptCompleteErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/connector/oauth/{attemptID}/complete",
|
||||
url: "/api/integration/attempt/{attemptID}/complete",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
@@ -5751,70 +5803,11 @@ export class Oauth2 extends HeyApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
export class Connect extends HeyApiClient {
|
||||
export class Integration extends HeyApiClient {
|
||||
/**
|
||||
* Connect with key
|
||||
* List integrations
|
||||
*
|
||||
* Run a key authentication method and store the resulting credential.
|
||||
*/
|
||||
public key<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
connectorID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
methodID?: string
|
||||
key?: string
|
||||
inputs?: {
|
||||
[key: string]: string
|
||||
}
|
||||
label?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "connectorID" },
|
||||
{ in: "query", key: "location" },
|
||||
{ in: "body", key: "methodID" },
|
||||
{ in: "body", key: "key" },
|
||||
{ in: "body", key: "inputs" },
|
||||
{ in: "body", key: "label" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).post<
|
||||
V2ConnectorConnectKeyResponses,
|
||||
V2ConnectorConnectKeyErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
url: "/api/connector/{connectorID}/connect/key",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
...params.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
private _oauth?: Oauth2
|
||||
get oauth(): Oauth2 {
|
||||
return (this._oauth ??= new Oauth2({ client: this.client }))
|
||||
}
|
||||
}
|
||||
|
||||
export class Connector extends HeyApiClient {
|
||||
/**
|
||||
* List connectors
|
||||
*
|
||||
* Retrieve available connectors and their authentication methods.
|
||||
* Retrieve available integrations and their authentication methods.
|
||||
*/
|
||||
public list<ThrowOnError extends boolean = false>(
|
||||
parameters?: {
|
||||
@@ -5826,21 +5819,21 @@ export class Connector extends HeyApiClient {
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }])
|
||||
return (options?.client ?? this.client).get<V2ConnectorListResponses, V2ConnectorListErrors, ThrowOnError>({
|
||||
url: "/api/connector",
|
||||
return (options?.client ?? this.client).get<V2IntegrationListResponses, V2IntegrationListErrors, ThrowOnError>({
|
||||
url: "/api/integration",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get connector
|
||||
* Get integration
|
||||
*
|
||||
* Retrieve one connector and its authentication methods.
|
||||
* Retrieve one integration and its authentication methods.
|
||||
*/
|
||||
public get<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
connectorID: string
|
||||
integrationID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
@@ -5853,14 +5846,14 @@ export class Connector extends HeyApiClient {
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "connectorID" },
|
||||
{ in: "path", key: "integrationID" },
|
||||
{ in: "query", key: "location" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).get<V2ConnectorGetResponses, V2ConnectorGetErrors, ThrowOnError>({
|
||||
url: "/api/connector/{connectorID}",
|
||||
return (options?.client ?? this.client).get<V2IntegrationGetResponses, V2IntegrationGetErrors, ThrowOnError>({
|
||||
url: "/api/integration/{integrationID}",
|
||||
...options,
|
||||
...params,
|
||||
})
|
||||
@@ -5870,6 +5863,69 @@ export class Connector extends HeyApiClient {
|
||||
get connect(): Connect {
|
||||
return (this._connect ??= new Connect({ client: this.client }))
|
||||
}
|
||||
|
||||
private _attempt?: Attempt
|
||||
get attempt(): Attempt {
|
||||
return (this._attempt ??= new Attempt({ client: this.client }))
|
||||
}
|
||||
}
|
||||
|
||||
export class Credential extends HeyApiClient {
|
||||
/**
|
||||
* Remove credential
|
||||
*
|
||||
* Remove a stored integration credential.
|
||||
*/
|
||||
public remove<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
credentialID: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "credentialID" }] }])
|
||||
return (options?.client ?? this.client).delete<V2CredentialRemoveResponses, V2CredentialRemoveErrors, ThrowOnError>(
|
||||
{
|
||||
url: "/api/credential/{credentialID}",
|
||||
...options,
|
||||
...params,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update credential
|
||||
*
|
||||
* Update a stored credential label.
|
||||
*/
|
||||
public update<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
credentialID: string
|
||||
label?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "credentialID" },
|
||||
{ in: "body", key: "label" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).patch<V2CredentialUpdateResponses, V2CredentialUpdateErrors, ThrowOnError>({
|
||||
url: "/api/credential/{credentialID}",
|
||||
...options,
|
||||
...params,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options?.headers,
|
||||
...params.headers,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export class Request extends HeyApiClient {
|
||||
@@ -6216,9 +6272,14 @@ export class V2 extends HeyApiClient {
|
||||
return (this._provider ??= new Provider2({ client: this.client }))
|
||||
}
|
||||
|
||||
private _connector?: Connector
|
||||
get connector(): Connector {
|
||||
return (this._connector ??= new Connector({ client: this.client }))
|
||||
private _integration?: Integration
|
||||
get integration(): Integration {
|
||||
return (this._integration ??= new Integration({ client: this.client }))
|
||||
}
|
||||
|
||||
private _credential?: Credential
|
||||
get credential(): Credential {
|
||||
return (this._credential ??= new Credential({ client: this.client }))
|
||||
}
|
||||
|
||||
private _permission?: Permission3
|
||||
|
||||
@@ -6,9 +6,6 @@ export type ClientOptions = {
|
||||
|
||||
export type Event =
|
||||
| EventModelsDevRefreshed
|
||||
| EventCredentialAdded
|
||||
| EventCredentialRemoved
|
||||
| EventCredentialSwitched
|
||||
| EventPluginAdded
|
||||
| EventCatalogModelUpdated
|
||||
| EventSessionCreated
|
||||
@@ -55,7 +52,7 @@ export type Event =
|
||||
| EventInstallationUpdated
|
||||
| EventInstallationUpdateAvailable
|
||||
| EventFileEdited
|
||||
| EventConnectorUpdated
|
||||
| EventIntegrationUpdated
|
||||
| EventPermissionV2Asked
|
||||
| EventPermissionV2Replied
|
||||
| EventReferenceUpdated
|
||||
@@ -739,29 +736,6 @@ export type GlobalEvent = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "credential.added"
|
||||
properties: {
|
||||
credential: CredentialInfo
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "credential.removed"
|
||||
properties: {
|
||||
credential: CredentialInfo
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "credential.switched"
|
||||
properties: {
|
||||
connectorID: string
|
||||
from?: string
|
||||
to?: string
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "plugin.added"
|
||||
@@ -1284,7 +1258,7 @@ export type GlobalEvent = {
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "connector.updated"
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
@@ -2856,34 +2830,6 @@ export type MoveSessionDestination = {
|
||||
directory: string
|
||||
}
|
||||
|
||||
export type CredentialOAuth = {
|
||||
type: "oauth"
|
||||
refresh: string
|
||||
access: string
|
||||
expires: number
|
||||
metadata?: {
|
||||
[key: string]: string
|
||||
}
|
||||
}
|
||||
|
||||
export type CredentialKey = {
|
||||
type: "key"
|
||||
key: string
|
||||
metadata?: {
|
||||
[key: string]: string
|
||||
}
|
||||
}
|
||||
|
||||
export type CredentialValue = CredentialOAuth | CredentialKey
|
||||
|
||||
export type CredentialInfo = {
|
||||
id: string
|
||||
connectorID: string
|
||||
methodID: string
|
||||
label: string
|
||||
value: CredentialValue
|
||||
}
|
||||
|
||||
export type ModelV2Info = {
|
||||
id: string
|
||||
providerID: string
|
||||
@@ -4120,21 +4066,21 @@ export type ProviderV2Info = {
|
||||
}
|
||||
}
|
||||
|
||||
export type ConnectorWhen = {
|
||||
export type IntegrationWhen = {
|
||||
key: string
|
||||
op: "eq" | "neq"
|
||||
value: string
|
||||
}
|
||||
|
||||
export type ConnectorTextPrompt = {
|
||||
export type IntegrationTextPrompt = {
|
||||
type: "text"
|
||||
key: string
|
||||
message: string
|
||||
placeholder?: string
|
||||
when?: ConnectorWhen
|
||||
when?: IntegrationWhen
|
||||
}
|
||||
|
||||
export type ConnectorSelectPrompt = {
|
||||
export type IntegrationSelectPrompt = {
|
||||
type: "select"
|
||||
key: string
|
||||
message: string
|
||||
@@ -4143,30 +4089,47 @@ export type ConnectorSelectPrompt = {
|
||||
value: string
|
||||
hint?: string
|
||||
}>
|
||||
when?: ConnectorWhen
|
||||
when?: IntegrationWhen
|
||||
}
|
||||
|
||||
export type ConnectorOAuthMethod = {
|
||||
export type IntegrationOAuthMethod = {
|
||||
id: string
|
||||
type: "oauth"
|
||||
label: string
|
||||
prompts?: Array<ConnectorTextPrompt | ConnectorSelectPrompt>
|
||||
prompts?: Array<IntegrationTextPrompt | IntegrationSelectPrompt>
|
||||
}
|
||||
|
||||
export type ConnectorKeyMethod = {
|
||||
id: string
|
||||
export type IntegrationKeyMethod = {
|
||||
type: "key"
|
||||
label: string
|
||||
prompts?: Array<ConnectorTextPrompt | ConnectorSelectPrompt>
|
||||
label?: string
|
||||
}
|
||||
|
||||
export type ConnectorInfo = {
|
||||
export type IntegrationEnvMethod = {
|
||||
type: "env"
|
||||
names: Array<string>
|
||||
}
|
||||
|
||||
export type ConnectionCredentialInfo = {
|
||||
type: "credential"
|
||||
id: string
|
||||
label: string
|
||||
}
|
||||
|
||||
export type ConnectionEnvInfo = {
|
||||
type: "env"
|
||||
name: string
|
||||
}
|
||||
|
||||
export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo
|
||||
|
||||
export type IntegrationInfo = {
|
||||
id: string
|
||||
name: string
|
||||
methods: Array<ConnectorOAuthMethod | ConnectorKeyMethod>
|
||||
methods: Array<IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod>
|
||||
connections: Array<ConnectionInfo>
|
||||
}
|
||||
|
||||
export type ConnectorAttempt = {
|
||||
export type IntegrationAttempt = {
|
||||
attemptID: string
|
||||
url: string
|
||||
instructions: string
|
||||
@@ -4271,32 +4234,6 @@ export type EventModelsDevRefreshed = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCredentialAdded = {
|
||||
id: string
|
||||
type: "credential.added"
|
||||
properties: {
|
||||
credential: CredentialInfo
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCredentialRemoved = {
|
||||
id: string
|
||||
type: "credential.removed"
|
||||
properties: {
|
||||
credential: CredentialInfo
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCredentialSwitched = {
|
||||
id: string
|
||||
type: "credential.switched"
|
||||
properties: {
|
||||
connectorID: string
|
||||
from?: string
|
||||
to?: string
|
||||
}
|
||||
}
|
||||
|
||||
export type EventPluginAdded = {
|
||||
id: string
|
||||
type: "plugin.added"
|
||||
@@ -4959,9 +4896,9 @@ export type EventFileEdited = {
|
||||
}
|
||||
}
|
||||
|
||||
export type EventConnectorUpdated = {
|
||||
export type EventIntegrationUpdated = {
|
||||
id: string
|
||||
type: "connector.updated"
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
@@ -10062,7 +9999,7 @@ export type V2ProviderGetResponses = {
|
||||
|
||||
export type V2ProviderGetResponse = V2ProviderGetResponses[keyof V2ProviderGetResponses]
|
||||
|
||||
export type V2ConnectorListData = {
|
||||
export type V2IntegrationListData = {
|
||||
body?: never
|
||||
path?: never
|
||||
query?: {
|
||||
@@ -10071,10 +10008,10 @@ export type V2ConnectorListData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector"
|
||||
url: "/api/integration"
|
||||
}
|
||||
|
||||
export type V2ConnectorListErrors = {
|
||||
export type V2IntegrationListErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10085,24 +10022,24 @@ export type V2ConnectorListErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorListError = V2ConnectorListErrors[keyof V2ConnectorListErrors]
|
||||
export type V2IntegrationListError = V2IntegrationListErrors[keyof V2IntegrationListErrors]
|
||||
|
||||
export type V2ConnectorListResponses = {
|
||||
export type V2IntegrationListResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: Array<ConnectorInfo>
|
||||
data: Array<IntegrationInfo>
|
||||
}
|
||||
}
|
||||
|
||||
export type V2ConnectorListResponse = V2ConnectorListResponses[keyof V2ConnectorListResponses]
|
||||
export type V2IntegrationListResponse = V2IntegrationListResponses[keyof V2IntegrationListResponses]
|
||||
|
||||
export type V2ConnectorGetData = {
|
||||
export type V2IntegrationGetData = {
|
||||
body?: never
|
||||
path: {
|
||||
connectorID: string
|
||||
integrationID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
@@ -10110,10 +10047,10 @@ export type V2ConnectorGetData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/{connectorID}"
|
||||
url: "/api/integration/{integrationID}"
|
||||
}
|
||||
|
||||
export type V2ConnectorGetErrors = {
|
||||
export type V2IntegrationGetErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10124,31 +10061,27 @@ export type V2ConnectorGetErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorGetError = V2ConnectorGetErrors[keyof V2ConnectorGetErrors]
|
||||
export type V2IntegrationGetError = V2IntegrationGetErrors[keyof V2IntegrationGetErrors]
|
||||
|
||||
export type V2ConnectorGetResponses = {
|
||||
export type V2IntegrationGetResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: ConnectorInfo
|
||||
data: IntegrationInfo
|
||||
}
|
||||
}
|
||||
|
||||
export type V2ConnectorGetResponse = V2ConnectorGetResponses[keyof V2ConnectorGetResponses]
|
||||
export type V2IntegrationGetResponse = V2IntegrationGetResponses[keyof V2IntegrationGetResponses]
|
||||
|
||||
export type V2ConnectorConnectKeyData = {
|
||||
export type V2IntegrationConnectKeyData = {
|
||||
body: {
|
||||
methodID: string
|
||||
key: string
|
||||
inputs: {
|
||||
[key: string]: string
|
||||
}
|
||||
label?: string
|
||||
}
|
||||
path: {
|
||||
connectorID: string
|
||||
integrationID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
@@ -10156,10 +10089,10 @@ export type V2ConnectorConnectKeyData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/{connectorID}/connect/key"
|
||||
url: "/api/integration/{integrationID}/connect/key"
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectKeyErrors = {
|
||||
export type V2IntegrationConnectKeyErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10170,18 +10103,18 @@ export type V2ConnectorConnectKeyErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectKeyError = V2ConnectorConnectKeyErrors[keyof V2ConnectorConnectKeyErrors]
|
||||
export type V2IntegrationConnectKeyError = V2IntegrationConnectKeyErrors[keyof V2IntegrationConnectKeyErrors]
|
||||
|
||||
export type V2ConnectorConnectKeyResponses = {
|
||||
export type V2IntegrationConnectKeyResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectKeyResponse = V2ConnectorConnectKeyResponses[keyof V2ConnectorConnectKeyResponses]
|
||||
export type V2IntegrationConnectKeyResponse = V2IntegrationConnectKeyResponses[keyof V2IntegrationConnectKeyResponses]
|
||||
|
||||
export type V2ConnectorConnectOauthBeginData = {
|
||||
export type V2IntegrationConnectOauthData = {
|
||||
body: {
|
||||
methodID: string
|
||||
inputs: {
|
||||
@@ -10190,7 +10123,7 @@ export type V2ConnectorConnectOauthBeginData = {
|
||||
label?: string
|
||||
}
|
||||
path: {
|
||||
connectorID: string
|
||||
integrationID: string
|
||||
}
|
||||
query?: {
|
||||
location?: {
|
||||
@@ -10198,10 +10131,10 @@ export type V2ConnectorConnectOauthBeginData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/{connectorID}/connect/oauth"
|
||||
url: "/api/integration/{integrationID}/connect/oauth"
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthBeginErrors = {
|
||||
export type V2IntegrationConnectOauthErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10212,23 +10145,22 @@ export type V2ConnectorConnectOauthBeginErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthBeginError =
|
||||
V2ConnectorConnectOauthBeginErrors[keyof V2ConnectorConnectOauthBeginErrors]
|
||||
export type V2IntegrationConnectOauthError = V2IntegrationConnectOauthErrors[keyof V2IntegrationConnectOauthErrors]
|
||||
|
||||
export type V2ConnectorConnectOauthBeginResponses = {
|
||||
export type V2IntegrationConnectOauthResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
200: {
|
||||
location: LocationInfo
|
||||
data: ConnectorAttempt
|
||||
data: IntegrationAttempt
|
||||
}
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthBeginResponse =
|
||||
V2ConnectorConnectOauthBeginResponses[keyof V2ConnectorConnectOauthBeginResponses]
|
||||
export type V2IntegrationConnectOauthResponse =
|
||||
V2IntegrationConnectOauthResponses[keyof V2IntegrationConnectOauthResponses]
|
||||
|
||||
export type V2ConnectorConnectOauthCancelData = {
|
||||
export type V2IntegrationAttemptCancelData = {
|
||||
body?: never
|
||||
path: {
|
||||
attemptID: string
|
||||
@@ -10239,10 +10171,10 @@ export type V2ConnectorConnectOauthCancelData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/oauth/{attemptID}"
|
||||
url: "/api/integration/attempt/{attemptID}"
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCancelErrors = {
|
||||
export type V2IntegrationAttemptCancelErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10253,20 +10185,19 @@ export type V2ConnectorConnectOauthCancelErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCancelError =
|
||||
V2ConnectorConnectOauthCancelErrors[keyof V2ConnectorConnectOauthCancelErrors]
|
||||
export type V2IntegrationAttemptCancelError = V2IntegrationAttemptCancelErrors[keyof V2IntegrationAttemptCancelErrors]
|
||||
|
||||
export type V2ConnectorConnectOauthCancelResponses = {
|
||||
export type V2IntegrationAttemptCancelResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCancelResponse =
|
||||
V2ConnectorConnectOauthCancelResponses[keyof V2ConnectorConnectOauthCancelResponses]
|
||||
export type V2IntegrationAttemptCancelResponse =
|
||||
V2IntegrationAttemptCancelResponses[keyof V2IntegrationAttemptCancelResponses]
|
||||
|
||||
export type V2ConnectorConnectOauthStatusData = {
|
||||
export type V2IntegrationAttemptStatusData = {
|
||||
body?: never
|
||||
path: {
|
||||
attemptID: string
|
||||
@@ -10277,10 +10208,10 @@ export type V2ConnectorConnectOauthStatusData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/oauth/{attemptID}"
|
||||
url: "/api/integration/attempt/{attemptID}"
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthStatusErrors = {
|
||||
export type V2IntegrationAttemptStatusErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10291,10 +10222,9 @@ export type V2ConnectorConnectOauthStatusErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthStatusError =
|
||||
V2ConnectorConnectOauthStatusErrors[keyof V2ConnectorConnectOauthStatusErrors]
|
||||
export type V2IntegrationAttemptStatusError = V2IntegrationAttemptStatusErrors[keyof V2IntegrationAttemptStatusErrors]
|
||||
|
||||
export type V2ConnectorConnectOauthStatusResponses = {
|
||||
export type V2IntegrationAttemptStatusResponses = {
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
@@ -10333,10 +10263,10 @@ export type V2ConnectorConnectOauthStatusResponses = {
|
||||
}
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthStatusResponse =
|
||||
V2ConnectorConnectOauthStatusResponses[keyof V2ConnectorConnectOauthStatusResponses]
|
||||
export type V2IntegrationAttemptStatusResponse =
|
||||
V2IntegrationAttemptStatusResponses[keyof V2IntegrationAttemptStatusResponses]
|
||||
|
||||
export type V2ConnectorConnectOauthCompleteData = {
|
||||
export type V2IntegrationAttemptCompleteData = {
|
||||
body: {
|
||||
code?: string
|
||||
}
|
||||
@@ -10349,10 +10279,10 @@ export type V2ConnectorConnectOauthCompleteData = {
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/connector/oauth/{attemptID}/complete"
|
||||
url: "/api/integration/attempt/{attemptID}/complete"
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCompleteErrors = {
|
||||
export type V2IntegrationAttemptCompleteErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
@@ -10363,18 +10293,82 @@ export type V2ConnectorConnectOauthCompleteErrors = {
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCompleteError =
|
||||
V2ConnectorConnectOauthCompleteErrors[keyof V2ConnectorConnectOauthCompleteErrors]
|
||||
export type V2IntegrationAttemptCompleteError =
|
||||
V2IntegrationAttemptCompleteErrors[keyof V2IntegrationAttemptCompleteErrors]
|
||||
|
||||
export type V2ConnectorConnectOauthCompleteResponses = {
|
||||
export type V2IntegrationAttemptCompleteResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2ConnectorConnectOauthCompleteResponse =
|
||||
V2ConnectorConnectOauthCompleteResponses[keyof V2ConnectorConnectOauthCompleteResponses]
|
||||
export type V2IntegrationAttemptCompleteResponse =
|
||||
V2IntegrationAttemptCompleteResponses[keyof V2IntegrationAttemptCompleteResponses]
|
||||
|
||||
export type V2CredentialRemoveData = {
|
||||
body?: never
|
||||
path: {
|
||||
credentialID: string
|
||||
}
|
||||
query?: never
|
||||
url: "/api/credential/{credentialID}"
|
||||
}
|
||||
|
||||
export type V2CredentialRemoveErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2CredentialRemoveError = V2CredentialRemoveErrors[keyof V2CredentialRemoveErrors]
|
||||
|
||||
export type V2CredentialRemoveResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2CredentialRemoveResponse = V2CredentialRemoveResponses[keyof V2CredentialRemoveResponses]
|
||||
|
||||
export type V2CredentialUpdateData = {
|
||||
body: {
|
||||
label: string
|
||||
}
|
||||
path: {
|
||||
credentialID: string
|
||||
}
|
||||
query?: never
|
||||
url: "/api/credential/{credentialID}"
|
||||
}
|
||||
|
||||
export type V2CredentialUpdateErrors = {
|
||||
/**
|
||||
* InvalidRequestError
|
||||
*/
|
||||
400: InvalidRequestError
|
||||
/**
|
||||
* UnauthorizedError
|
||||
*/
|
||||
401: UnauthorizedError
|
||||
}
|
||||
|
||||
export type V2CredentialUpdateError = V2CredentialUpdateErrors[keyof V2CredentialUpdateErrors]
|
||||
|
||||
export type V2CredentialUpdateResponses = {
|
||||
/**
|
||||
* <No Content>
|
||||
*/
|
||||
204: void
|
||||
}
|
||||
|
||||
export type V2CredentialUpdateResponse = V2CredentialUpdateResponses[keyof V2CredentialUpdateResponses]
|
||||
|
||||
export type V2PermissionRequestListData = {
|
||||
body?: never
|
||||
|
||||
Reference in New Issue
Block a user