@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
1,981 lines • 58.2 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { ClosedEnum } from "../types/enums.js";
import { smartUnion } from "../types/smartUnion.js";
export type ConnectConnectorUpdateDataTypePhoton = {
/**
* Photon project secret.
*/
projectSecret?: string | undefined;
/**
* Photon webhook verification secret.
*/
webhookSecret?: string | undefined;
/**
* Whether Connect should recreate the Photon webhook.
*/
repairWebhook?: boolean | undefined;
};
export type ConnectConnectorUpdateDataTypeSendblue = {
/**
* Sendblue API key id (`sb-api-key-id`).
*/
apiKeyId?: string | undefined;
/**
* Sendblue API secret key (`sb-api-secret-key`).
*/
apiSecretKey?: string | undefined;
/**
* E.164 Sendblue lines this connector sends and receives on. Used as the connector's display name, and the only lines its webhooks are registered for; an empty array clears them, which also removes the webhook subscription.
*/
phoneNumbers?: Array<string> | undefined;
};
export type ConnectConnectorUpdateDataTypeLinq = {
/**
* Linq partner API token for the shared line.
*/
apiToken?: string | undefined;
phoneNumbers?: Array<string> | undefined;
};
export type ConnectConnectorUpdateDataTypeSnowflakeWif = {
/**
* Snowflake account identifier.
*/
accountIdentifier?: string | undefined;
};
export type ConnectConnectorUpdateDataTypeSnowflake = {
/**
* Snowflake account identifier.
*/
accountIdentifier?: string | undefined;
/**
* Default Snowflake role for created sessions.
*/
defaultSessionRole?: string | undefined;
};
/**
* Slack workspace metadata.
*/
export type ConnectConnectorUpdateDataSlackTeam = {
/**
* Slack workspace ID.
*/
id: string;
/**
* Slack workspace name.
*/
name?: string | undefined;
/**
* Slack workspace domain.
*/
domain?: string | undefined;
};
export type ConnectConnectorUpdateDataSlashCommands = {
/**
* Slash command including its leading slash.
*/
command: string;
/**
* Description shown for the slash command in Slack.
*/
description: string;
/**
* Optional usage hint shown for the slash command.
*/
usageHint?: string | undefined;
/**
* Whether Slack should escape command arguments.
*/
shouldEscape?: boolean | undefined;
};
/**
* Where Slack exposes the shortcut.
*/
export const ConnectConnectorUpdateData6Type = {
Global: "global",
Message: "message",
} as const;
/**
* Where Slack exposes the shortcut.
*/
export type ConnectConnectorUpdateData6Type = ClosedEnum<
typeof ConnectConnectorUpdateData6Type
>;
export type ConnectConnectorUpdateDataShortcuts = {
/**
* Where Slack exposes the shortcut.
*/
type: ConnectConnectorUpdateData6Type;
/**
* Shortcut display name.
*/
name: string;
/**
* Identifier included in the shortcut callback.
*/
callbackId: string;
/**
* Description shown for the shortcut in Slack.
*/
description: string;
};
export type ConnectConnectorUpdateDataTypeSlack = {
/**
* Slack app ID.
*/
appId?: string | undefined;
/**
* Slack app display name.
*/
appName?: string | undefined;
/**
* Slack app OAuth client ID.
*/
clientId?: string | undefined;
/**
* Slack app OAuth client secret.
*/
clientSecret?: string | undefined;
/**
* Slack workspace metadata.
*/
slackTeam?: ConnectConnectorUpdateDataSlackTeam | undefined;
/**
* Slack request signing secret.
*/
signingSecret?: string | undefined;
/**
* Legacy Slack webhook verification token.
*/
verificationToken?: string | undefined;
/**
* OAuth scopes requested for Slack bot tokens.
*/
botScopes?: Array<string> | undefined;
/**
* OAuth scopes requested for Slack user tokens.
*/
userScopes?: Array<string> | undefined;
/**
* Slash commands configured for the managed Slack app.
*/
slashCommands?: Array<ConnectConnectorUpdateDataSlashCommands> | undefined;
/**
* Global and message shortcuts configured for the Slack app.
*/
shortcuts?: Array<ConnectConnectorUpdateDataShortcuts> | undefined;
/**
* Additional provider metadata stored with the connector.
*/
extras?: { [k: string]: any } | undefined;
};
export type ConnectConnectorUpdateDataTypeSalesforce = {
/**
* Salesforce connected app consumer key.
*/
consumerKey?: string | undefined;
/**
* Salesforce connected app consumer secret.
*/
consumerSecret?: string | undefined;
/**
* Salesforce login host, such as login.salesforce.com.
*/
loginHost?: string | undefined;
};
/**
* Linear organization that owns the OAuth application.
*/
export type ConnectConnectorUpdateDataOwnerOrganization = {
/**
* Linear organization ID.
*/
id: string;
/**
* Linear organization slug.
*/
slug: string;
/**
* Linear organization name.
*/
name: string;
/**
* Linear organization logo URL.
*/
logoUrl?: string | null | undefined;
};
/**
* Linear OAuth application metadata.
*/
export type ConnectConnectorUpdateDataApplication = {
/**
* Linear OAuth application ID.
*/
id: string;
/**
* Linear OAuth client ID.
*/
clientId: string;
/**
* Linear OAuth application name.
*/
name: string;
/**
* Linear OAuth application description.
*/
description?: string | null | undefined;
/**
* Linear OAuth application developer name.
*/
developer?: string | null | undefined;
/**
* Linear OAuth application developer URL.
*/
developerUrl?: string | null | undefined;
/**
* Linear OAuth application image URL.
*/
imageUrl?: string | null | undefined;
/**
* Registered redirect URIs for the Linear OAuth application.
*/
redirectUris?: Array<string> | undefined;
/**
* Linear OAuth application distribution mode.
*/
distribution?: string | null | undefined;
/**
* Linear resource types delivered to the webhook.
*/
webhookResourceTypes?: Array<string> | undefined;
/**
* Linear webhook URL.
*/
webhookUrl?: string | null | undefined;
/**
* Whether the Linear webhook is enabled.
*/
webhookEnabled?: boolean | undefined;
/**
* Linear OAuth application creation timestamp.
*/
createdAt?: string | undefined;
/**
* Linear OAuth application update timestamp.
*/
updatedAt?: string | undefined;
};
export type ConnectConnectorUpdateDataTypeLinear = {
/**
* Linear application ID.
*/
appId?: string | undefined;
/**
* Linear application name.
*/
appName?: string | undefined;
/**
* Linear OAuth client ID.
*/
clientId?: string | undefined;
/**
* Linear OAuth client secret.
*/
clientSecret?: string | undefined;
/**
* Linear webhook verification secret.
*/
webhookSecret?: string | undefined;
/**
* OAuth scopes requested for Linear application tokens.
*/
appScopes?: Array<string> | undefined;
/**
* OAuth scopes requested for Linear user tokens.
*/
userScopes?: Array<string> | undefined;
/**
* Linear organization that owns the OAuth application.
*/
ownerOrganization?: ConnectConnectorUpdateDataOwnerOrganization | undefined;
/**
* Linear OAuth application metadata.
*/
application?: ConnectConnectorUpdateDataApplication | undefined;
/**
* Additional provider metadata stored with the connector.
*/
extras?: { [k: string]: any } | undefined;
};
/**
* GitHub App owner type.
*/
export const ConnectConnectorUpdateDataType = {
UserLower: "user",
OrganizationLower: "organization",
UserMixed: "User",
OrganizationMixed: "Organization",
} as const;
/**
* GitHub App owner type.
*/
export type ConnectConnectorUpdateDataType = ClosedEnum<
typeof ConnectConnectorUpdateDataType
>;
/**
* GitHub App owner.
*/
export type ConnectConnectorUpdateDataOwner = {
/**
* GitHub App owner type.
*/
type: ConnectConnectorUpdateDataType;
/**
* GitHub App owner numeric ID.
*/
id: number;
/**
* GitHub App owner login.
*/
slug: string;
/**
* GitHub App owner display name.
*/
name?: string | undefined;
};
export type ConnectConnectorUpdateDataTypeGithub = {
/**
* GitHub App numeric ID.
*/
appId?: number | undefined;
/**
* GitHub App slug.
*/
appSlug?: string | undefined;
/**
* GitHub App display name.
*/
appName?: string | undefined;
/**
* GitHub App OAuth client ID.
*/
clientId?: string | undefined;
/**
* GitHub App owner.
*/
owner?: ConnectConnectorUpdateDataOwner | undefined;
/**
* GitHub App OAuth client secret.
*/
clientSecret?: string | undefined;
/**
* GitHub App private key in PEM format.
*/
privateKeyPem?: string | undefined;
/**
* GitHub App webhook secret.
*/
webhookSecret?: string | undefined;
/**
* Additional provider metadata stored with the connector.
*/
extras?: { [k: string]: any } | undefined;
};
export type ToAdd = {
/**
* API key value.
*/
value: string;
/**
* Optional scope associated with the API key value.
*/
scope?: string | undefined;
/**
* The timestamp when the API key value expires in milliseconds.
*/
expiresAt?: number | undefined;
};
/**
* The timestamp when the API key value expires in milliseconds.
*/
export type ExpiresAt = number | string;
export type ToUpdate = {
/**
* Stored API key value ID.
*/
id: string;
/**
* Replacement API key value. Use null to keep the stored value.
*/
value?: string | undefined;
/**
* Replacement scope. Use null to remove the scope.
*/
scope?: string | undefined;
/**
* The timestamp when the API key value expires in milliseconds.
*/
expiresAt?: number | string | undefined;
};
export type ConnectConnectorUpdateDataTypeApiKey = {
/**
* Stored API key value IDs to delete.
*/
toDelete?: Array<string> | undefined;
/**
* API key values to add.
*/
toAdd?: Array<ToAdd> | undefined;
/**
* Existing API key values to update.
*/
toUpdate?: Array<ToUpdate> | undefined;
/**
* Markdown instructions shown to each user on the authorization screen, explaining how to obtain the key they should paste.
*/
instructions?: string | undefined;
};
/**
* Intended key use: signing or encryption.
*/
export const ConnectConnectorUpdateDataUse = {
Sig: "sig",
Enc: "enc",
} as const;
/**
* Intended key use: signing or encryption.
*/
export type ConnectConnectorUpdateDataUse = ClosedEnum<
typeof ConnectConnectorUpdateDataUse
>;
export type ConnectConnectorUpdateDataKeys = {
/**
* JSON Web Key type.
*/
kty: string;
/**
* JSON Web Key identifier.
*/
kid?: string | undefined;
/**
* Intended key use: signing or encryption.
*/
use?: ConnectConnectorUpdateDataUse | undefined;
/**
* Operations permitted for this key.
*/
keyOps?: Array<string> | undefined;
/**
* Algorithm intended for this key.
*/
alg?: string | undefined;
additionalProperties?: { [k: string]: any } | undefined;
};
/**
* Inline authorization server JSON Web Key Set.
*/
export type ConnectConnectorUpdateDataJwks = {
/**
* JSON Web Keys published by the authorization server.
*/
keys: Array<ConnectConnectorUpdateDataKeys>;
additionalProperties?: { [k: string]: any } | undefined;
};
/**
* Authorization server metadata. Values override discovered metadata. Empty known string fields remove their stored overrides.
*/
export type ConnectConnectorUpdateDataServerConfig = {
/**
* Authorization server issuer URL.
*/
issuer?: string | undefined;
/**
* OAuth authorization endpoint URL.
*/
authorizationEndpoint?: string | undefined;
/**
* OAuth token endpoint URL.
*/
tokenEndpoint?: string | undefined;
/**
* OpenID Connect UserInfo endpoint URL.
*/
userinfoEndpoint?: string | undefined;
/**
* URL of the authorization server JSON Web Key Set.
*/
jwksUri?: string | undefined;
/**
* Inline authorization server JSON Web Key Set.
*/
jwks?: ConnectConnectorUpdateDataJwks | undefined;
/**
* OAuth token revocation endpoint URL.
*/
revocationEndpoint?: string | undefined;
/**
* OAuth token introspection endpoint URL.
*/
introspectionEndpoint?: string | undefined;
/**
* OpenID Connect session termination endpoint URL.
*/
endSessionEndpoint?: string | undefined;
/**
* OAuth device authorization endpoint URL.
*/
deviceAuthorizationEndpoint?: string | undefined;
/**
* OAuth dynamic client registration endpoint URL.
*/
registrationEndpoint?: string | undefined;
/**
* OAuth response types supported by the server.
*/
responseTypesSupported?: Array<string> | undefined;
/**
* Token endpoint client authentication methods supported by the server.
*/
tokenEndpointAuthMethodsSupported?: Array<string> | undefined;
/**
* Signing algorithms supported for token endpoint authentication.
*/
tokenEndpointAuthSigningAlgValuesSupported?: Array<string> | undefined;
/**
* OAuth scopes supported by the server.
*/
scopesSupported?: Array<string> | undefined;
/**
* OAuth grant types supported by the server.
*/
grantTypesSupported?: Array<string> | undefined;
/**
* OAuth response modes supported by the server.
*/
responseModesSupported?: Array<string> | undefined;
/**
* OpenID Connect subject identifier types supported by the server.
*/
subjectTypesSupported?: Array<string> | undefined;
/**
* Signing algorithms supported for ID tokens.
*/
idTokenSigningAlgValuesSupported?: Array<string> | undefined;
/**
* Key management algorithms supported for encrypted ID tokens.
*/
idTokenEncryptionAlgValuesSupported?: Array<string> | undefined;
/**
* Content encryption algorithms supported for encrypted ID tokens.
*/
idTokenEncryptionEncValuesSupported?: Array<string> | undefined;
/**
* OpenID Connect claim value types supported by the server.
*/
claimTypesSupported?: Array<string> | undefined;
/**
* Claims that the authorization server can return.
*/
claimsSupported?: Array<string> | undefined;
/**
* PKCE code challenge methods supported by the server.
*/
codeChallengeMethodsSupported?: Array<string> | undefined;
/**
* Authorization prompt values supported by the server.
*/
promptValuesSupported?: Array<string> | undefined;
/**
* Whether authorization requests can use the claims parameter.
*/
claimsParameterSupported?: boolean | undefined;
/**
* Whether authorization requests can use signed request objects.
*/
requestParameterSupported?: boolean | undefined;
/**
* Whether authorization requests can use request_uri.
*/
requestUriParameterSupported?: boolean | undefined;
/**
* Whether request_uri values must be registered in advance.
*/
requireRequestUriRegistration?: boolean | undefined;
/**
* Authorization server documentation URL.
*/
serviceDocumentation?: string | undefined;
/**
* Authorization server privacy policy URL.
*/
opPolicyUri?: string | undefined;
/**
* Authorization server terms of service URL.
*/
opTosUri?: string | undefined;
/**
* Authorization server logo URL.
*/
logoUri?: string | undefined;
/**
* Whether the server supports OAuth client ID metadata documents.
*/
clientIdMetadataDocumentSupported?: boolean | undefined;
/**
* OAuth authorization-detail types supported by the server.
*/
authorizationDetailsTypesSupported?: Array<string> | undefined;
additionalProperties?: { [k: string]: any } | undefined;
};
/**
* User authorization grant settings.
*/
export type ConnectConnectorUpdateDataUserAuthorization = {
/**
* Whether this OAuth grant is enabled.
*/
enabled: boolean;
/**
* Default scopes to request when token params specify scopes: [\"*\"].
*/
scopes?: Array<string> | undefined;
};
/**
* Refresh token settings.
*/
export type ConnectConnectorUpdateDataRefreshTokens = {
/**
* Whether this OAuth grant is enabled.
*/
enabled: boolean;
};
/**
* Client credentials grant settings.
*/
export type ConnectConnectorUpdateDataClientCredentials = {
/**
* Whether this OAuth grant is enabled.
*/
enabled: boolean;
/**
* Default scopes to request when token params specify scopes: [\"*\"].
*/
scopes?: Array<string> | undefined;
};
/**
* Allow-list of extra claims to propagate, keyed by source (idToken). Only claims named here and present in that source are exposed.
*/
export type ConnectConnectorUpdateDataForwardedClaims = {
/**
* ID token claim names that Connect can expose.
*/
idToken?: Array<string> | undefined;
};
/**
* JWT bearer grant settings.
*/
export type ConnectConnectorUpdateDataJwtBearer = {
/**
* Whether JWT bearer grants are enabled.
*/
enabled?: boolean | undefined;
/**
* Default scopes to request when token params specify scopes: [\"*\"].
*/
scopes?: Array<string> | undefined;
/**
* Default JWT subject claim.
*/
sub?: string | undefined;
/**
* Default JWT issuer claim.
*/
iss?: string | undefined;
/**
* Default JWT audience claim.
*/
aud?: string | undefined;
/**
* Additional claims included in generated JWT assertions.
*/
additionalClaims?: { [k: string]: any } | undefined;
/**
* JWT lifetime in seconds.
*/
ttl?: number | undefined;
/**
* Whether JWT bearer requests also use client credentials.
*/
useClientCredentials?: boolean | undefined;
};
/**
* `private_key_jwt` client assertion settings.
*/
export type ConnectConnectorUpdateDataClientAssertion = {
/**
* OAuth client assertion type. Defaults to urn:ietf:params:oauth:client-assertion-type:jwt-bearer. An empty string clears the configured type.
*/
type?: string | undefined;
/**
* Client assertion lifetime in seconds.
*/
ttl?: number | undefined;
/**
* Additional claims included in the client assertion.
*/
claims?: { [k: string]: any } | undefined;
};
export type ConnectConnectorUpdateDataTypeOauth = {
/**
* Authorization server base URL used for discovery.
*/
serverUrl?: string | undefined;
/**
* Authorization server metadata. Values override discovered metadata. Empty known string fields remove their stored overrides.
*/
serverConfig?: ConnectConnectorUpdateDataServerConfig | undefined;
/**
* OAuth client ID.
*/
clientId?: string | undefined;
/**
* OAuth client name.
*/
clientName?: string | undefined;
/**
* OAuth client secret.
*/
clientSecret?: string | undefined;
/**
* OAuth token endpoint authentication method. Common values are client_secret_post, client_secret_basic, none, and private_key_jwt. If omitted, Vercel selects a supported method from serverConfig and otherwise uses client_secret_post.
*/
tokenEndpointAuthMethod?: string | undefined;
/**
* OAuth authorization response type. Defaults to code. Other provider-supported values are accepted. An empty string clears the configured type.
*/
responseType?: string | undefined;
/**
* Whether user authorization must use PKCE.
*/
pkceRequired?: boolean | undefined;
/**
* PKCE code challenge method. Supported values are S256 and plain. Vercel prefers S256 when the provider supports it. An empty string clears the configured method.
*/
codeChallengeMethod?: string | undefined;
/**
* User authorization grant settings.
*/
userAuthorization?: ConnectConnectorUpdateDataUserAuthorization | undefined;
/**
* Refresh token settings.
*/
refreshTokens?: ConnectConnectorUpdateDataRefreshTokens | undefined;
/**
* Client credentials grant settings.
*/
clientCredentials?: ConnectConnectorUpdateDataClientCredentials | undefined;
/**
* Allow-list of extra claims to propagate, keyed by source (idToken). Only claims named here and present in that source are exposed.
*/
forwardedClaims?: ConnectConnectorUpdateDataForwardedClaims | undefined;
/**
* Default audience used when a token request omits one. An empty string clears the default.
*/
defaultAudience?: string | undefined;
/**
* Default token lifetime in seconds to use when the token response omits expires_in.
*/
defaultTokenExpiresIn?: number | undefined;
/**
* Extra query parameters added to authorization URLs.
*/
authorizationUrlParams?: { [k: string]: string } | undefined;
/**
* JWT bearer grant settings.
*/
jwtBearer?: ConnectConnectorUpdateDataJwtBearer | undefined;
/**
* `private_key_jwt` client assertion settings.
*/
clientAssertion?: ConnectConnectorUpdateDataClientAssertion | undefined;
};
/**
* Provider configuration fields for the connector type.
*/
export type ConnectConnectorUpdateData =
| ConnectConnectorUpdateDataTypeOauth
| ConnectConnectorUpdateDataTypeApiKey
| ConnectConnectorUpdateDataTypeGithub
| ConnectConnectorUpdateDataTypeLinear
| ConnectConnectorUpdateDataTypeSalesforce
| ConnectConnectorUpdateDataTypeSlack
| ConnectConnectorUpdateDataTypeSnowflake
| ConnectConnectorUpdateDataTypeSnowflakeWif
| ConnectConnectorUpdateDataTypeLinq
| ConnectConnectorUpdateDataTypeSendblue
| ConnectConnectorUpdateDataTypePhoton
| { [k: string]: any };
/** @internal */
export type ConnectConnectorUpdateDataTypePhoton$Outbound = {
projectSecret?: string | undefined;
webhookSecret?: string | undefined;
repairWebhook?: boolean | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypePhoton$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypePhoton$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypePhoton
> = z.object({
projectSecret: z.string().optional(),
webhookSecret: z.string().optional(),
repairWebhook: z.boolean().optional(),
});
export function connectConnectorUpdateDataTypePhotonToJSON(
connectConnectorUpdateDataTypePhoton: ConnectConnectorUpdateDataTypePhoton,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypePhoton$outboundSchema.parse(
connectConnectorUpdateDataTypePhoton,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeSendblue$Outbound = {
apiKeyId?: string | undefined;
apiSecretKey?: string | undefined;
phoneNumbers?: Array<string> | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeSendblue$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeSendblue$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeSendblue
> = z.object({
apiKeyId: z.string().optional(),
apiSecretKey: z.string().optional(),
phoneNumbers: z.array(z.string()).optional(),
});
export function connectConnectorUpdateDataTypeSendblueToJSON(
connectConnectorUpdateDataTypeSendblue:
ConnectConnectorUpdateDataTypeSendblue,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeSendblue$outboundSchema.parse(
connectConnectorUpdateDataTypeSendblue,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeLinq$Outbound = {
apiToken?: string | undefined;
phoneNumbers?: Array<string> | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeLinq$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeLinq$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeLinq
> = z.object({
apiToken: z.string().optional(),
phoneNumbers: z.array(z.string()).optional(),
});
export function connectConnectorUpdateDataTypeLinqToJSON(
connectConnectorUpdateDataTypeLinq: ConnectConnectorUpdateDataTypeLinq,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeLinq$outboundSchema.parse(
connectConnectorUpdateDataTypeLinq,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeSnowflakeWif$Outbound = {
accountIdentifier?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeSnowflakeWif$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataTypeSnowflakeWif$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeSnowflakeWif
> = z.object({
accountIdentifier: z.string().optional(),
});
export function connectConnectorUpdateDataTypeSnowflakeWifToJSON(
connectConnectorUpdateDataTypeSnowflakeWif:
ConnectConnectorUpdateDataTypeSnowflakeWif,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeSnowflakeWif$outboundSchema.parse(
connectConnectorUpdateDataTypeSnowflakeWif,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeSnowflake$Outbound = {
accountIdentifier?: string | undefined;
defaultSessionRole?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeSnowflake$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeSnowflake$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeSnowflake
> = z.object({
accountIdentifier: z.string().optional(),
defaultSessionRole: z.string().optional(),
});
export function connectConnectorUpdateDataTypeSnowflakeToJSON(
connectConnectorUpdateDataTypeSnowflake:
ConnectConnectorUpdateDataTypeSnowflake,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeSnowflake$outboundSchema.parse(
connectConnectorUpdateDataTypeSnowflake,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataSlackTeam$Outbound = {
id: string;
name?: string | undefined;
domain?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataSlackTeam$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataSlackTeam$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataSlackTeam
> = z.object({
id: z.string(),
name: z.string().optional(),
domain: z.string().optional(),
});
export function connectConnectorUpdateDataSlackTeamToJSON(
connectConnectorUpdateDataSlackTeam: ConnectConnectorUpdateDataSlackTeam,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataSlackTeam$outboundSchema.parse(
connectConnectorUpdateDataSlackTeam,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataSlashCommands$Outbound = {
command: string;
description: string;
usageHint?: string | undefined;
shouldEscape?: boolean | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataSlashCommands$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataSlashCommands$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataSlashCommands
> = z.object({
command: z.string(),
description: z.string(),
usageHint: z.string().optional(),
shouldEscape: z.boolean().optional(),
});
export function connectConnectorUpdateDataSlashCommandsToJSON(
connectConnectorUpdateDataSlashCommands:
ConnectConnectorUpdateDataSlashCommands,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataSlashCommands$outboundSchema.parse(
connectConnectorUpdateDataSlashCommands,
),
);
}
/** @internal */
export const ConnectConnectorUpdateData6Type$outboundSchema: z.ZodNativeEnum<
typeof ConnectConnectorUpdateData6Type
> = z.nativeEnum(ConnectConnectorUpdateData6Type);
/** @internal */
export type ConnectConnectorUpdateDataShortcuts$Outbound = {
type: string;
name: string;
callbackId: string;
description: string;
};
/** @internal */
export const ConnectConnectorUpdateDataShortcuts$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataShortcuts$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataShortcuts
> = z.object({
type: ConnectConnectorUpdateData6Type$outboundSchema,
name: z.string(),
callbackId: z.string(),
description: z.string(),
});
export function connectConnectorUpdateDataShortcutsToJSON(
connectConnectorUpdateDataShortcuts: ConnectConnectorUpdateDataShortcuts,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataShortcuts$outboundSchema.parse(
connectConnectorUpdateDataShortcuts,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeSlack$Outbound = {
appId?: string | undefined;
appName?: string | undefined;
clientId?: string | undefined;
clientSecret?: string | undefined;
slackTeam?: ConnectConnectorUpdateDataSlackTeam$Outbound | undefined;
signingSecret?: string | undefined;
verificationToken?: string | undefined;
botScopes?: Array<string> | undefined;
userScopes?: Array<string> | undefined;
slashCommands?:
| Array<ConnectConnectorUpdateDataSlashCommands$Outbound>
| undefined;
shortcuts?: Array<ConnectConnectorUpdateDataShortcuts$Outbound> | undefined;
extras?: { [k: string]: any } | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeSlack$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeSlack$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeSlack
> = z.object({
appId: z.string().optional(),
appName: z.string().optional(),
clientId: z.string().optional(),
clientSecret: z.string().optional(),
slackTeam: z.lazy(() => ConnectConnectorUpdateDataSlackTeam$outboundSchema)
.optional(),
signingSecret: z.string().optional(),
verificationToken: z.string().optional(),
botScopes: z.array(z.string()).optional(),
userScopes: z.array(z.string()).optional(),
slashCommands: z.array(
z.lazy(() => ConnectConnectorUpdateDataSlashCommands$outboundSchema),
).optional(),
shortcuts: z.array(
z.lazy(() => ConnectConnectorUpdateDataShortcuts$outboundSchema),
).optional(),
extras: z.record(z.any()).optional(),
});
export function connectConnectorUpdateDataTypeSlackToJSON(
connectConnectorUpdateDataTypeSlack: ConnectConnectorUpdateDataTypeSlack,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeSlack$outboundSchema.parse(
connectConnectorUpdateDataTypeSlack,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeSalesforce$Outbound = {
consumerKey?: string | undefined;
consumerSecret?: string | undefined;
loginHost?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeSalesforce$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeSalesforce$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeSalesforce
> = z.object({
consumerKey: z.string().optional(),
consumerSecret: z.string().optional(),
loginHost: z.string().optional(),
});
export function connectConnectorUpdateDataTypeSalesforceToJSON(
connectConnectorUpdateDataTypeSalesforce:
ConnectConnectorUpdateDataTypeSalesforce,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeSalesforce$outboundSchema.parse(
connectConnectorUpdateDataTypeSalesforce,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataOwnerOrganization$Outbound = {
id: string;
slug: string;
name: string;
logoUrl?: string | null | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataOwnerOrganization$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataOwnerOrganization$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataOwnerOrganization
> = z.object({
id: z.string(),
slug: z.string(),
name: z.string(),
logoUrl: z.nullable(z.string()).optional(),
});
export function connectConnectorUpdateDataOwnerOrganizationToJSON(
connectConnectorUpdateDataOwnerOrganization:
ConnectConnectorUpdateDataOwnerOrganization,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataOwnerOrganization$outboundSchema.parse(
connectConnectorUpdateDataOwnerOrganization,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataApplication$Outbound = {
id: string;
clientId: string;
name: string;
description?: string | null | undefined;
developer?: string | null | undefined;
developerUrl?: string | null | undefined;
imageUrl?: string | null | undefined;
redirectUris?: Array<string> | undefined;
distribution?: string | null | undefined;
webhookResourceTypes?: Array<string> | undefined;
webhookUrl?: string | null | undefined;
webhookEnabled?: boolean | undefined;
createdAt?: string | undefined;
updatedAt?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataApplication$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataApplication$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataApplication
> = z.object({
id: z.string(),
clientId: z.string(),
name: z.string(),
description: z.nullable(z.string()).optional(),
developer: z.nullable(z.string()).optional(),
developerUrl: z.nullable(z.string()).optional(),
imageUrl: z.nullable(z.string()).optional(),
redirectUris: z.array(z.string()).optional(),
distribution: z.nullable(z.string()).optional(),
webhookResourceTypes: z.array(z.string()).optional(),
webhookUrl: z.nullable(z.string()).optional(),
webhookEnabled: z.boolean().optional(),
createdAt: z.string().optional(),
updatedAt: z.string().optional(),
});
export function connectConnectorUpdateDataApplicationToJSON(
connectConnectorUpdateDataApplication: ConnectConnectorUpdateDataApplication,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataApplication$outboundSchema.parse(
connectConnectorUpdateDataApplication,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeLinear$Outbound = {
appId?: string | undefined;
appName?: string | undefined;
clientId?: string | undefined;
clientSecret?: string | undefined;
webhookSecret?: string | undefined;
appScopes?: Array<string> | undefined;
userScopes?: Array<string> | undefined;
ownerOrganization?:
| ConnectConnectorUpdateDataOwnerOrganization$Outbound
| undefined;
application?: ConnectConnectorUpdateDataApplication$Outbound | undefined;
extras?: { [k: string]: any } | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeLinear$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeLinear$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeLinear
> = z.object({
appId: z.string().optional(),
appName: z.string().optional(),
clientId: z.string().optional(),
clientSecret: z.string().optional(),
webhookSecret: z.string().optional(),
appScopes: z.array(z.string()).optional(),
userScopes: z.array(z.string()).optional(),
ownerOrganization: z.lazy(() =>
ConnectConnectorUpdateDataOwnerOrganization$outboundSchema
).optional(),
application: z.lazy(() =>
ConnectConnectorUpdateDataApplication$outboundSchema
).optional(),
extras: z.record(z.any()).optional(),
});
export function connectConnectorUpdateDataTypeLinearToJSON(
connectConnectorUpdateDataTypeLinear: ConnectConnectorUpdateDataTypeLinear,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeLinear$outboundSchema.parse(
connectConnectorUpdateDataTypeLinear,
),
);
}
/** @internal */
export const ConnectConnectorUpdateDataType$outboundSchema: z.ZodNativeEnum<
typeof ConnectConnectorUpdateDataType
> = z.nativeEnum(ConnectConnectorUpdateDataType);
/** @internal */
export type ConnectConnectorUpdateDataOwner$Outbound = {
type: string;
id: number;
slug: string;
name?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataOwner$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataOwner$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataOwner
> = z.object({
type: ConnectConnectorUpdateDataType$outboundSchema,
id: z.number().int(),
slug: z.string(),
name: z.string().optional(),
});
export function connectConnectorUpdateDataOwnerToJSON(
connectConnectorUpdateDataOwner: ConnectConnectorUpdateDataOwner,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataOwner$outboundSchema.parse(
connectConnectorUpdateDataOwner,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeGithub$Outbound = {
appId?: number | undefined;
appSlug?: string | undefined;
appName?: string | undefined;
clientId?: string | undefined;
owner?: ConnectConnectorUpdateDataOwner$Outbound | undefined;
clientSecret?: string | undefined;
privateKeyPem?: string | undefined;
webhookSecret?: string | undefined;
extras?: { [k: string]: any } | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeGithub$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeGithub$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeGithub
> = z.object({
appId: z.number().int().optional(),
appSlug: z.string().optional(),
appName: z.string().optional(),
clientId: z.string().optional(),
owner: z.lazy(() => ConnectConnectorUpdateDataOwner$outboundSchema)
.optional(),
clientSecret: z.string().optional(),
privateKeyPem: z.string().optional(),
webhookSecret: z.string().optional(),
extras: z.record(z.any()).optional(),
});
export function connectConnectorUpdateDataTypeGithubToJSON(
connectConnectorUpdateDataTypeGithub: ConnectConnectorUpdateDataTypeGithub,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeGithub$outboundSchema.parse(
connectConnectorUpdateDataTypeGithub,
),
);
}
/** @internal */
export type ToAdd$Outbound = {
value: string;
scope?: string | undefined;
expiresAt?: number | undefined;
};
/** @internal */
export const ToAdd$outboundSchema: z.ZodType<
ToAdd$Outbound,
z.ZodTypeDef,
ToAdd
> = z.object({
value: z.string(),
scope: z.string().optional(),
expiresAt: z.number().int().optional(),
});
export function toAddToJSON(toAdd: ToAdd): string {
return JSON.stringify(ToAdd$outboundSchema.parse(toAdd));
}
/** @internal */
export type ExpiresAt$Outbound = number | string;
/** @internal */
export const ExpiresAt$outboundSchema: z.ZodType<
ExpiresAt$Outbound,
z.ZodTypeDef,
ExpiresAt
> = smartUnion([z.number().int(), z.string()]);
export function expiresAtToJSON(expiresAt: ExpiresAt): string {
return JSON.stringify(ExpiresAt$outboundSchema.parse(expiresAt));
}
/** @internal */
export type ToUpdate$Outbound = {
id: string;
value?: string | undefined;
scope?: string | undefined;
expiresAt?: number | string | undefined;
};
/** @internal */
export const ToUpdate$outboundSchema: z.ZodType<
ToUpdate$Outbound,
z.ZodTypeDef,
ToUpdate
> = z.object({
id: z.string(),
value: z.string().optional(),
scope: z.string().optional(),
expiresAt: smartUnion([z.number().int(), z.string()]).optional(),
});
export function toUpdateToJSON(toUpdate: ToUpdate): string {
return JSON.stringify(ToUpdate$outboundSchema.parse(toUpdate));
}
/** @internal */
export type ConnectConnectorUpdateDataTypeApiKey$Outbound = {
toDelete?: Array<string> | undefined;
toAdd?: Array<ToAdd$Outbound> | undefined;
toUpdate?: Array<ToUpdate$Outbound> | undefined;
instructions?: string | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeApiKey$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeApiKey$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeApiKey
> = z.object({
toDelete: z.array(z.string()).optional(),
toAdd: z.array(z.lazy(() => ToAdd$outboundSchema)).optional(),
toUpdate: z.array(z.lazy(() => ToUpdate$outboundSchema)).optional(),
instructions: z.string().optional(),
});
export function connectConnectorUpdateDataTypeApiKeyToJSON(
connectConnectorUpdateDataTypeApiKey: ConnectConnectorUpdateDataTypeApiKey,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeApiKey$outboundSchema.parse(
connectConnectorUpdateDataTypeApiKey,
),
);
}
/** @internal */
export const ConnectConnectorUpdateDataUse$outboundSchema: z.ZodNativeEnum<
typeof ConnectConnectorUpdateDataUse
> = z.nativeEnum(ConnectConnectorUpdateDataUse);
/** @internal */
export type ConnectConnectorUpdateDataKeys$Outbound = {
kty: string;
kid?: string | undefined;
use?: string | undefined;
key_ops?: Array<string> | undefined;
alg?: string | undefined;
[additionalProperties: string]: unknown;
};
/** @internal */
export const ConnectConnectorUpdateDataKeys$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataKeys$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataKeys
> = z.object({
kty: z.string(),
kid: z.string().optional(),
use: ConnectConnectorUpdateDataUse$outboundSchema.optional(),
keyOps: z.array(z.string()).optional(),
alg: z.string().optional(),
additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
return {
...v.additionalProperties,
...remap$(v, {
keyOps: "key_ops",
additionalProperties: null,
}),
};
});
export function connectConnectorUpdateDataKeysToJSON(
connectConnectorUpdateDataKeys: ConnectConnectorUpdateDataKeys,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataKeys$outboundSchema.parse(
connectConnectorUpdateDataKeys,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataJwks$Outbound = {
keys: Array<ConnectConnectorUpdateDataKeys$Outbound>;
[additionalProperties: string]: unknown;
};
/** @internal */
export const ConnectConnectorUpdateDataJwks$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataJwks$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataJwks
> = z.object({
keys: z.array(z.lazy(() => ConnectConnectorUpdateDataKeys$outboundSchema)),
additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
return {
...v.additionalProperties,
...remap$(v, {
additionalProperties: null,
}),
};
});
export function connectConnectorUpdateDataJwksToJSON(
connectConnectorUpdateDataJwks: ConnectConnectorUpdateDataJwks,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataJwks$outboundSchema.parse(
connectConnectorUpdateDataJwks,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataServerConfig$Outbound = {
issuer?: string | undefined;
authorization_endpoint?: string | undefined;
token_endpoint?: string | undefined;
userinfo_endpoint?: string | undefined;
jwks_uri?: string | undefined;
jwks?: ConnectConnectorUpdateDataJwks$Outbound | undefined;
revocation_endpoint?: string | undefined;
introspection_endpoint?: string | undefined;
end_session_endpoint?: string | undefined;
device_authorization_endpoint?: string | undefined;
registration_endpoint?: string | undefined;
response_types_supported?: Array<string> | undefined;
token_endpoint_auth_methods_supported?: Array<string> | undefined;
token_endpoint_auth_signing_alg_values_supported?: Array<string> | undefined;
scopes_supported?: Array<string> | undefined;
grant_types_supported?: Array<string> | undefined;
response_modes_supported?: Array<string> | undefined;
subject_types_supported?: Array<string> | undefined;
id_token_signing_alg_values_supported?: Array<string> | undefined;
id_token_encryption_alg_values_supported?: Array<string> | undefined;
id_token_encryption_enc_values_supported?: Array<string> | undefined;
claim_types_supported?: Array<string> | undefined;
claims_supported?: Array<string> | undefined;
code_challenge_methods_supported?: Array<string> | undefined;
prompt_values_supported?: Array<string> | undefined;
claims_parameter_supported?: boolean | undefined;
request_parameter_supported?: boolean | undefined;
request_uri_parameter_supported?: boolean | undefined;
require_request_uri_registration?: boolean | undefined;
service_documentation?: string | undefined;
op_policy_uri?: string | undefined;
op_tos_uri?: string | undefined;
logo_uri?: string | undefined;
client_id_metadata_document_supported?: boolean | undefined;
authorization_details_types_supported?: Array<string> | undefined;
[additionalProperties: string]: unknown;
};
/** @internal */
export const ConnectConnectorUpdateDataServerConfig$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataServerConfig$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataServerConfig
> = z.object({
issuer: z.string().optional(),
authorizationEndpoint: z.string().optional(),
tokenEndpoint: z.string().optional(),
userinfoEndpoint: z.string().optional(),
jwksUri: z.string().optional(),
jwks: z.lazy(() => ConnectConnectorUpdateDataJwks$outboundSchema).optional(),
revocationEndpoint: z.string().optional(),
introspectionEndpoint: z.string().optional(),
endSessionEndpoint: z.string().optional(),
deviceAuthorizationEndpoint: z.string().optional(),
registrationEndpoint: z.string().optional(),
responseTypesSupported: z.array(z.string()).optional(),
tokenEndpointAuthMethodsSupported: z.array(z.string()).optional(),
tokenEndpointAuthSigningAlgValuesSupported: z.array(z.string()).optional(),
scopesSupported: z.array(z.string()).optional(),
grantTypesSupported: z.array(z.string()).optional(),
responseModesSupported: z.array(z.string()).optional(),
subjectTypesSupported: z.array(z.string()).optional(),
idTokenSigningAlgValuesSupported: z.array(z.string()).optional(),
idTokenEncryptionAlgValuesSupported: z.array(z.string()).optional(),
idTokenEncryptionEncValuesSupported: z.array(z.string()).optional(),
claimTypesSupported: z.array(z.string()).optional(),
claimsSupported: z.array(z.string()).optional(),
codeChallengeMethodsSupported: z.array(z.string()).optional(),
promptValuesSupported: z.array(z.string()).optional(),
claimsParameterSupported: z.boolean().optional(),
requestParameterSupported: z.boolean().optional(),
requestUriParameterSupported: z.boolean().optional(),
requireRequestUriRegistration: z.boolean().optional(),
serviceDocumentation: z.string().optional(),
opPolicyUri: z.string().optional(),
opTosUri: z.string().optional(),
logoUri: z.string().optional(),
clientIdMetadataDocumentSupported: z.boolean().optional(),
authorizationDetailsTypesSupported: z.array(z.string()).optional(),
additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
return {
...v.additionalProperties,
...remap$(v, {
authorizationEndpoint: "authorization_endpoint",
tokenEndpoint: "token_endpoint",
userinfoEndpoint: "userinfo_endpoint",
jwksUri: "jwks_uri",
revocationEndpoint: "revocation_endpoint",
introspectionEndpoint: "introspection_endpoint",
endSessionEndpoint: "end_session_endpoint",
deviceAuthorizationEndpoint: "device_authorization_endpoint",
registrationEndpoint: "registration_endpoint",
responseTypesSupported: "response_types_supported",
tokenEndpointAuthMethodsSupported:
"token_endpoint_auth_methods_supported",
tokenEndpointAuthSigningAlgValuesSupported:
"token_endpoint_auth_signing_alg_values_supported",
scopesSupported: "scopes_supported",
grantTypesSupported: "grant_types_supported",
responseModesSupported: "response_modes_supported",
subjectTypesSupported: "subject_types_supported",
idTokenSigningAlgValuesSupported: "id_token_signing_alg_values_supported",
idTokenEncryptionAlgValuesSupported:
"id_token_encryption_alg_values_supported",
idTokenEncryptionEncValuesSupported:
"id_token_encryption_enc_values_supported",
claimTypesSupported: "claim_types_supported",
claimsSupported: "claims_supported",
codeChallengeMethodsSupported: "code_challenge_methods_supported",
promptValuesSupported: "prompt_values_supported",
claimsParameterSupported: "claims_parameter_supported",
requestParameterSupported: "request_parameter_supported",
requestUriParameterSupported: "request_uri_parameter_supported",
requireRequestUriRegistration: "require_request_uri_registration",
serviceDocumentation: "service_documentation",
opPolicyUri: "op_policy_uri",
opTosUri: "op_tos_uri",
logoUri: "logo_uri",
clientIdMetadataDocumentSupported:
"client_id_metadata_document_supported",
authorizationDetailsTypesSupported:
"authorization_details_types_supported",
additionalProperties: null,
}),
};
});
export function connectConnectorUpdateDataServerConfigToJSON(
connectConnectorUpdateDataServerConfig:
ConnectConnectorUpdateDataServerConfig,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataServerConfig$outboundSchema.parse(
connectConnectorUpdateDataServerConfig,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataUserAuthorization$Outbound = {
enabled: boolean;
scopes?: Array<string> | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataUserAuthorization$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataUserAuthorization$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataUserAuthorization
> = z.object({
enabled: z.boolean(),
scopes: z.array(z.string()).optional(),
});
export function connectConnectorUpdateDataUserAuthorizationToJSON(
connectConnectorUpdateDataUserAuthorization:
ConnectConnectorUpdateDataUserAuthorization,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataUserAuthorization$outboundSchema.parse(
connectConnectorUpdateDataUserAuthorization,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataRefreshTokens$Outbound = {
enabled: boolean;
};
/** @internal */
export const ConnectConnectorUpdateDataRefreshTokens$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataRefreshTokens$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataRefreshTokens
> = z.object({
enabled: z.boolean(),
});
export function connectConnectorUpdateDataRefreshTokensToJSON(
connectConnectorUpdateDataRefreshTokens:
ConnectConnectorUpdateDataRefreshTokens,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataRefreshTokens$outboundSchema.parse(
connectConnectorUpdateDataRefreshTokens,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataClientCredentials$Outbound = {
enabled: boolean;
scopes?: Array<string> | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataClientCredentials$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataClientCredentials$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataClientCredentials
> = z.object({
enabled: z.boolean(),
scopes: z.array(z.string()).optional(),
});
export function connectConnectorUpdateDataClientCredentialsToJSON(
connectConnectorUpdateDataClientCredentials:
ConnectConnectorUpdateDataClientCredentials,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataClientCredentials$outboundSchema.parse(
connectConnectorUpdateDataClientCredentials,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataForwardedClaims$Outbound = {
idToken?: Array<string> | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataForwardedClaims$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataForwardedClaims$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataForwardedClaims
> = z.object({
idToken: z.array(z.string()).optional(),
});
export function connectConnectorUpdateDataForwardedClaimsToJSON(
connectConnectorUpdateDataForwardedClaims:
ConnectConnectorUpdateDataForwardedClaims,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataForwardedClaims$outboundSchema.parse(
connectConnectorUpdateDataForwardedClaims,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataJwtBearer$Outbound = {
enabled?: boolean | undefined;
scopes?: Array<string> | undefined;
sub?: string | undefined;
iss?: string | undefined;
aud?: string | undefined;
additionalClaims?: { [k: string]: any } | undefined;
ttl?: number | undefined;
useClientCredentials?: boolean | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataJwtBearer$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataJwtBearer$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataJwtBearer
> = z.object({
enabled: z.boolean().optional(),
scopes: z.array(z.string()).optional(),
sub: z.string().optional(),
iss: z.string().optional(),
aud: z.string().optional(),
additionalClaims: z.record(z.any()).optional(),
ttl: z.number().optional(),
useClientCredentials: z.boolean().optional(),
});
export function connectConnectorUpdateDataJwtBearerToJSON(
connectConnectorUpdateDataJwtBearer: ConnectConnectorUpdateDataJwtBearer,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataJwtBearer$outboundSchema.parse(
connectConnectorUpdateDataJwtBearer,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataClientAssertion$Outbound = {
type?: string | undefined;
ttl?: number | undefined;
claims?: { [k: string]: any } | undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataClientAssertion$outboundSchema:
z.ZodType<
ConnectConnectorUpdateDataClientAssertion$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataClientAssertion
> = z.object({
type: z.string().optional(),
ttl: z.number().optional(),
claims: z.record(z.any()).optional(),
});
export function connectConnectorUpdateDataClientAssertionToJSON(
connectConnectorUpdateDataClientAssertion:
ConnectConnectorUpdateDataClientAssertion,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataClientAssertion$outboundSchema.parse(
connectConnectorUpdateDataClientAssertion,
),
);
}
/** @internal */
export type ConnectConnectorUpdateDataTypeOauth$Outbound = {
serverUrl?: string | undefined;
serverConfig?: ConnectConnectorUpdateDataServerConfig$Outbound | undefined;
clientId?: string | undefined;
clientName?: string | undefined;
clientSecret?: string | undefined;
tokenEndpointAuthMethod?: string | undefined;
responseType?: string | undefined;
pkceRequired?: boolean | undefined;
codeChallengeMethod?: string | undefined;
userAuthorization?:
| ConnectConnectorUpdateDataUserAuthorization$Outbound
| undefined;
refreshTokens?: ConnectConnectorUpdateDataRefreshTokens$Outbound | undefined;
clientCredentials?:
| ConnectConnectorUpdateDataClientCredentials$Outbound
| undefined;
forwardedClaims?:
| ConnectConnectorUpdateDataForwardedClaims$Outbound
| undefined;
defaultAudience?: string | undefined;
defaultTokenExpiresIn?: number | undefined;
authorizationUrlParams?: { [k: string]: string } | undefined;
jwtBearer?: ConnectConnectorUpdateDataJwtBearer$Outbound | undefined;
clientAssertion?:
| ConnectConnectorUpdateDataClientAssertion$Outbound
| undefined;
};
/** @internal */
export const ConnectConnectorUpdateDataTypeOauth$outboundSchema: z.ZodType<
ConnectConnectorUpdateDataTypeOauth$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateDataTypeOauth
> = z.object({
serverUrl: z.string().optional(),
serverConfig: z.lazy(() =>
ConnectConnectorUpdateDataServerConfig$outboundSchema
).optional(),
clientId: z.string().optional(),
clientName: z.string().optional(),
clientSecret: z.string().optional(),
tokenEndpointAuthMethod: z.string().optional(),
responseType: z.string().optional(),
pkceRequired: z.boolean().optional(),
codeChallengeMethod: z.string().optional(),
userAuthorization: z.lazy(() =>
ConnectConnectorUpdateDataUserAuthorization$outboundSchema
).optional(),
refreshTokens: z.lazy(() =>
ConnectConnectorUpdateDataRefreshTokens$outboundSchema
).optional(),
clientCredentials: z.lazy(() =>
ConnectConnectorUpdateDataClientCredentials$outboundSchema
).optional(),
forwardedClaims: z.lazy(() =>
ConnectConnectorUpdateDataForwardedClaims$outboundSchema
).optional(),
defaultAudience: z.string().optional(),
defaultTokenExpiresIn: z.number().optional(),
authorizationUrlParams: z.record(z.string()).optional(),
jwtBearer: z.lazy(() => ConnectConnectorUpdateDataJwtBearer$outboundSchema)
.optional(),
clientAssertion: z.lazy(() =>
ConnectConnectorUpdateDataClientAssertion$outboundSchema
).optional(),
});
export function connectConnectorUpdateDataTypeOauthToJSON(
connectConnectorUpdateDataTypeOauth: ConnectConnectorUpdateDataTypeOauth,
): string {
return JSON.stringify(
ConnectConnectorUpdateDataTypeOauth$outboundSchema.parse(
connectConnectorUpdateDataTypeOauth,
),
);
}
/** @internal */
export type ConnectConnectorUpdateData$Outbound =
| ConnectConnectorUpdateDataTypeOauth$Outbound
| ConnectConnectorUpdateDataTypeApiKey$Outbound
| ConnectConnectorUpdateDataTypeGithub$Outbound
| ConnectConnectorUpdateDataTypeLinear$Outbound
| ConnectConnectorUpdateDataTypeSalesforce$Outbound
| ConnectConnectorUpdateDataTypeSlack$Outbound
| ConnectConnectorUpdateDataTypeSnowflake$Outbound
| ConnectConnectorUpdateDataTypeSnowflakeWif$Outbound
| ConnectConnectorUpdateDataTypeLinq$Outbound
| ConnectConnectorUpdateDataTypeSendblue$Outbound
| ConnectConnectorUpdateDataTypePhoton$Outbound
| { [k: string]: any };
/** @internal */
export const ConnectConnectorUpdateData$outboundSchema: z.ZodType<
ConnectConnectorUpdateData$Outbound,
z.ZodTypeDef,
ConnectConnectorUpdateData
> = smartUnion([
z.lazy(() => ConnectConnectorUpdateDataTypeOauth$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeApiKey$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeGithub$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeLinear$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeSalesforce$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeSlack$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeSnowflake$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeSnowflakeWif$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeLinq$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypeSendblue$outboundSchema),
z.lazy(() => ConnectConnectorUpdateDataTypePhoton$outboundSchema),
z.record(z.any()),
]);
export function connectConnectorUpdateDataToJSON(
connectConnectorUpdateData: ConnectConnectorUpdateData,
): string {
return JSON.stringify(
ConnectConnectorUpdateData$outboundSchema.parse(connectConnectorUpdateData),
);
}