@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>
2,675 lines • 82.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 { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetAllLogDrainsRequest = {
projectId?: string | undefined;
projectIdOrName?: string | undefined;
includeMetadata?: boolean | undefined;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
export const GetAllLogDrainsDrainsStatus = {
Disabled: "disabled",
Enabled: "enabled",
Errored: "errored",
} as const;
export type GetAllLogDrainsDrainsStatus = ClosedEnum<
typeof GetAllLogDrainsDrainsStatus
>;
export const GetAllLogDrainsDrainsLogDrainsDisabledReason = {
AccountPlanDowngrade: "account-plan-downgrade",
DisabledByAdmin: "disabled-by-admin",
DisabledByOwner: "disabled-by-owner",
FeatureNotAvailable: "feature-not-available",
} as const;
export type GetAllLogDrainsDrainsLogDrainsDisabledReason = ClosedEnum<
typeof GetAllLogDrainsDrainsLogDrainsDisabledReason
>;
export type GetAllLogDrainsDrainsLogDrainsLog = {};
export type GetAllLogDrainsDrainsLogDrainsTrace = {};
export type GetAllLogDrainsDrainsLogDrainsAnalytics = {};
export type GetAllLogDrainsDrainsSpeedInsights = {};
export type GetAllLogDrainsDrainsLogDrainsAiGateway = {};
export type GetAllLogDrainsDrainsLogDrainsAuditLog = {};
export type GetAllLogDrainsDrainsLogDrainsSchemas = {
log?: GetAllLogDrainsDrainsLogDrainsLog | undefined;
trace?: GetAllLogDrainsDrainsLogDrainsTrace | undefined;
analytics?: GetAllLogDrainsDrainsLogDrainsAnalytics | undefined;
speedInsights?: GetAllLogDrainsDrainsSpeedInsights | undefined;
aiGateway?: GetAllLogDrainsDrainsLogDrainsAiGateway | undefined;
auditLog?: GetAllLogDrainsDrainsLogDrainsAuditLog | undefined;
};
export const GetAllLogDrainsDeliveryTarget = {
VercelOtelTracesDb: "vercel-otel-traces-db",
} as const;
export type GetAllLogDrainsDeliveryTarget = ClosedEnum<
typeof GetAllLogDrainsDeliveryTarget
>;
export type GetAllLogDrainsDelivery5 = {
type: "internal";
target: GetAllLogDrainsDeliveryTarget;
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding =
{
Json: "json",
Ndjson: "ndjson",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding =
ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding
>;
export const GetAllLogDrainsDeliveryLogDrainsCompression = {
None: "none",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsCompression = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsCompression
>;
export const GetAllLogDrainsDeliveryLogDrainsFileStructure = {
Hive: "hive",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsFileStructure = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsFileStructure
>;
export const GetAllLogDrainsDeliveryLogDrainsServerSideEncryption = {
Aes256: "AES256",
AwsKms: "aws:kms",
AwsKmsDsse: "aws:kms:dsse",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsServerSideEncryption = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsServerSideEncryption
>;
export const GetAllLogDrainsDeliveryLogDrainsObjectAcl = {
AuthenticatedRead: "authenticated-read",
AwsExecRead: "aws-exec-read",
BucketOwnerFullControl: "bucket-owner-full-control",
BucketOwnerRead: "bucket-owner-read",
Private: "private",
PublicRead: "public-read",
PublicReadWrite: "public-read-write",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsObjectAcl = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsObjectAcl
>;
export type GetAllLogDrainsDelivery4 = {
type: "s3";
endpoint: string;
encoding: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding;
compression: GetAllLogDrainsDeliveryLogDrainsCompression;
fileStructure: GetAllLogDrainsDeliveryLogDrainsFileStructure;
roleArn: string;
region: string;
serverSideEncryption?:
| GetAllLogDrainsDeliveryLogDrainsServerSideEncryption
| undefined;
objectAcl?: GetAllLogDrainsDeliveryLogDrainsObjectAcl | undefined;
};
export type GetAllLogDrainsDelivery3 = {
type: "clickhouse";
endpoint: string;
table: string;
};
export type GetAllLogDrainsDeliveryLogDrainsEndpoint = {
traces: string;
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200Encoding = {
Json: "json",
Proto: "proto",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponse200Encoding = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200Encoding
>;
export const GetAllLogDrainsSecretLogDrainsResponseKind = {
IntegrationSecret: "INTEGRATION_SECRET",
} as const;
export type GetAllLogDrainsSecretLogDrainsResponseKind = ClosedEnum<
typeof GetAllLogDrainsSecretLogDrainsResponseKind
>;
export type GetAllLogDrainsSecretLogDrainsResponse2 = {
kind: GetAllLogDrainsSecretLogDrainsResponseKind;
};
export type GetAllLogDrainsDeliveryLogDrainsSecret =
| GetAllLogDrainsSecretLogDrainsResponse2
| string;
export type GetAllLogDrainsDelivery2 = {
type: "otlphttp";
endpoint: GetAllLogDrainsDeliveryLogDrainsEndpoint;
encoding: GetAllLogDrainsDeliveryLogDrainsResponse200Encoding;
headers: { [k: string]: string };
secret?: GetAllLogDrainsSecretLogDrainsResponse2 | string | undefined;
};
export const GetAllLogDrainsDeliveryLogDrainsResponseEncoding = {
Json: "json",
Ndjson: "ndjson",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponseEncoding = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponseEncoding
>;
export const GetAllLogDrainsDeliveryCompression = {
Gzip: "gzip",
None: "none",
} as const;
export type GetAllLogDrainsDeliveryCompression = ClosedEnum<
typeof GetAllLogDrainsDeliveryCompression
>;
export const GetAllLogDrainsSecretLogDrainsKind = {
IntegrationSecret: "INTEGRATION_SECRET",
} as const;
export type GetAllLogDrainsSecretLogDrainsKind = ClosedEnum<
typeof GetAllLogDrainsSecretLogDrainsKind
>;
export type GetAllLogDrainsSecretLogDrains2 = {
kind: GetAllLogDrainsSecretLogDrainsKind;
};
export type GetAllLogDrainsDeliverySecret =
| GetAllLogDrainsSecretLogDrains2
| string;
export type GetAllLogDrainsDelivery1 = {
type: "http";
endpoint: string;
encoding: GetAllLogDrainsDeliveryLogDrainsResponseEncoding;
compression?: GetAllLogDrainsDeliveryCompression | undefined;
headers: { [k: string]: string };
secret?: GetAllLogDrainsSecretLogDrains2 | string | undefined;
};
export type GetAllLogDrainsDrainsLogDrainsDelivery =
| GetAllLogDrainsDelivery1
| GetAllLogDrainsDelivery2
| GetAllLogDrainsDelivery3
| GetAllLogDrainsDelivery4
| GetAllLogDrainsDelivery5;
export const GetAllLogDrainsDrainsType = {
HeadSampling: "head_sampling",
} as const;
export type GetAllLogDrainsDrainsType = ClosedEnum<
typeof GetAllLogDrainsDrainsType
>;
export const GetAllLogDrainsDrainsLogDrainsEnv = {
Preview: "preview",
Production: "production",
} as const;
export type GetAllLogDrainsDrainsLogDrainsEnv = ClosedEnum<
typeof GetAllLogDrainsDrainsLogDrainsEnv
>;
export type GetAllLogDrainsDrainsLogDrainsSampling = {
type: GetAllLogDrainsDrainsType;
rate: number;
env?: GetAllLogDrainsDrainsLogDrainsEnv | undefined;
requestPath?: string | undefined;
};
export type GetAllLogDrainsSourceLogDrains2 = {
kind: "integration";
resourceId?: string | undefined;
externalResourceId?: string | undefined;
integrationId: string;
integrationConfigurationId: string;
};
export type GetAllLogDrainsSourceLogDrains1 = {
kind: "self-served";
};
export type GetAllLogDrainsDrainsSource =
| GetAllLogDrainsSourceLogDrains1
| GetAllLogDrainsSourceLogDrains2;
export const GetAllLogDrainsDrainsVersion = {
V2: "v2",
} as const;
export type GetAllLogDrainsDrainsVersion = ClosedEnum<
typeof GetAllLogDrainsDrainsVersion
>;
export type GetAllLogDrainsFilter2 = {
type: "odata";
text: string;
};
export type GetAllLogDrainsFilterProject = {
ids?: Array<string> | undefined;
};
export const GetAllLogDrainsFilterLogDrainsSources = {
Build: "build",
Edge: "edge",
External: "external",
Firewall: "firewall",
Lambda: "lambda",
Redirect: "redirect",
Static: "static",
} as const;
export type GetAllLogDrainsFilterLogDrainsSources = ClosedEnum<
typeof GetAllLogDrainsFilterLogDrainsSources
>;
export type GetAllLogDrainsFilterLog = {
sources?: Array<GetAllLogDrainsFilterLogDrainsSources> | undefined;
legacyExcludeCachedStaticAssetLogs?: boolean | undefined;
};
export const GetAllLogDrainsFilterEnvironments = {
Preview: "preview",
Production: "production",
} as const;
export type GetAllLogDrainsFilterEnvironments = ClosedEnum<
typeof GetAllLogDrainsFilterEnvironments
>;
export type GetAllLogDrainsFilterLogDrainsDeployment = {
environments?: Array<GetAllLogDrainsFilterEnvironments> | undefined;
};
export type GetAllLogDrainsFilter1 = {
type: "basic";
project?: GetAllLogDrainsFilterProject | undefined;
log?: GetAllLogDrainsFilterLog | undefined;
deployment?: GetAllLogDrainsFilterLogDrainsDeployment | undefined;
};
export type GetAllLogDrainsDrainsLogDrainsFilter =
| GetAllLogDrainsFilter1
| GetAllLogDrainsFilter2;
export type GetAllLogDrainsDrainsLogDrainsFilterV2 = {
version: GetAllLogDrainsDrainsVersion;
filter: GetAllLogDrainsFilter1 | GetAllLogDrainsFilter2;
};
export const GetAllLogDrainsProjectAccessLogDrainsManagedBy = {
Drain: "drain",
Integration: "integration",
} as const;
export type GetAllLogDrainsProjectAccessLogDrainsManagedBy = ClosedEnum<
typeof GetAllLogDrainsProjectAccessLogDrainsManagedBy
>;
export type GetAllLogDrainsProjectAccess2 = {
access: "some";
projectIds: Array<string>;
managedBy: GetAllLogDrainsProjectAccessLogDrainsManagedBy;
};
export const GetAllLogDrainsProjectAccessManagedBy = {
Drain: "drain",
Integration: "integration",
} as const;
export type GetAllLogDrainsProjectAccessManagedBy = ClosedEnum<
typeof GetAllLogDrainsProjectAccessManagedBy
>;
export type GetAllLogDrainsProjectAccess1 = {
access: "all";
managedBy: GetAllLogDrainsProjectAccessManagedBy;
};
export type GetAllLogDrainsDrainsProjectAccess =
| GetAllLogDrainsProjectAccess1
| GetAllLogDrainsProjectAccess2;
export type GetAllLogDrainsDrains2 = {
id: string;
createdAt: number;
updatedAt: number;
projectIds?: Array<string> | undefined;
name: string;
teamId?: string | null | undefined;
ownerId: string;
status?: GetAllLogDrainsDrainsStatus | undefined;
firstErrorTimestamp?: number | undefined;
disabledAt?: number | undefined;
disabledBy?: string | undefined;
disabledReason?: GetAllLogDrainsDrainsLogDrainsDisabledReason | undefined;
schemas: GetAllLogDrainsDrainsLogDrainsSchemas;
delivery:
| GetAllLogDrainsDelivery1
| GetAllLogDrainsDelivery2
| GetAllLogDrainsDelivery3
| GetAllLogDrainsDelivery4
| GetAllLogDrainsDelivery5;
sampling?: Array<GetAllLogDrainsDrainsLogDrainsSampling> | undefined;
source: GetAllLogDrainsSourceLogDrains1 | GetAllLogDrainsSourceLogDrains2;
filterV2?: GetAllLogDrainsDrainsLogDrainsFilterV2 | undefined;
integrationIcon?: string | undefined;
integrationConfigurationUri?: string | undefined;
integrationWebsite?: string | undefined;
projectAccess?:
| GetAllLogDrainsProjectAccess1
| GetAllLogDrainsProjectAccess2
| undefined;
};
export const GetAllLogDrainsDrainsLogDrainsStatus = {
Disabled: "disabled",
Enabled: "enabled",
Errored: "errored",
} as const;
export type GetAllLogDrainsDrainsLogDrainsStatus = ClosedEnum<
typeof GetAllLogDrainsDrainsLogDrainsStatus
>;
export const GetAllLogDrainsDrainsDisabledReason = {
AccountPlanDowngrade: "account-plan-downgrade",
DisabledByAdmin: "disabled-by-admin",
DisabledByOwner: "disabled-by-owner",
FeatureNotAvailable: "feature-not-available",
} as const;
export type GetAllLogDrainsDrainsDisabledReason = ClosedEnum<
typeof GetAllLogDrainsDrainsDisabledReason
>;
export type GetAllLogDrainsDrainsLog = {};
export type GetAllLogDrainsDrainsTrace = {};
export type GetAllLogDrainsDrainsAnalytics = {};
export type GetAllLogDrainsDrainsLogDrainsSpeedInsights = {};
export type GetAllLogDrainsDrainsAiGateway = {};
export type GetAllLogDrainsDrainsAuditLog = {};
export type GetAllLogDrainsDrainsSchemas = {
log?: GetAllLogDrainsDrainsLog | undefined;
trace?: GetAllLogDrainsDrainsTrace | undefined;
analytics?: GetAllLogDrainsDrainsAnalytics | undefined;
speedInsights?: GetAllLogDrainsDrainsLogDrainsSpeedInsights | undefined;
aiGateway?: GetAllLogDrainsDrainsAiGateway | undefined;
auditLog?: GetAllLogDrainsDrainsAuditLog | undefined;
};
export const GetAllLogDrainsDeliveryLogDrainsTarget = {
VercelOtelTracesDb: "vercel-otel-traces-db",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsTarget = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsTarget
>;
export type GetAllLogDrainsDeliveryLogDrains5 = {
type: "internal";
target: GetAllLogDrainsDeliveryLogDrainsTarget;
};
export const GetAllLogDrainsDeliveryLogDrainsEncoding = {
Json: "json",
Ndjson: "ndjson",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsEncoding = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsEncoding
>;
export const GetAllLogDrainsDeliveryLogDrainsResponse200Compression = {
None: "none",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponse200Compression = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200Compression
>;
export const GetAllLogDrainsDeliveryFileStructure = {
Hive: "hive",
} as const;
export type GetAllLogDrainsDeliveryFileStructure = ClosedEnum<
typeof GetAllLogDrainsDeliveryFileStructure
>;
export const GetAllLogDrainsDeliveryServerSideEncryption = {
Aes256: "AES256",
AwsKms: "aws:kms",
AwsKmsDsse: "aws:kms:dsse",
} as const;
export type GetAllLogDrainsDeliveryServerSideEncryption = ClosedEnum<
typeof GetAllLogDrainsDeliveryServerSideEncryption
>;
export const GetAllLogDrainsDeliveryObjectAcl = {
AuthenticatedRead: "authenticated-read",
AwsExecRead: "aws-exec-read",
BucketOwnerFullControl: "bucket-owner-full-control",
BucketOwnerRead: "bucket-owner-read",
Private: "private",
PublicRead: "public-read",
PublicReadWrite: "public-read-write",
} as const;
export type GetAllLogDrainsDeliveryObjectAcl = ClosedEnum<
typeof GetAllLogDrainsDeliveryObjectAcl
>;
export type GetAllLogDrainsDeliveryLogDrains4 = {
type: "s3";
endpoint: string;
encoding: GetAllLogDrainsDeliveryLogDrainsEncoding;
compression: GetAllLogDrainsDeliveryLogDrainsResponse200Compression;
fileStructure: GetAllLogDrainsDeliveryFileStructure;
roleArn: string;
region: string;
serverSideEncryption?:
| GetAllLogDrainsDeliveryServerSideEncryption
| undefined;
objectAcl?: GetAllLogDrainsDeliveryObjectAcl | undefined;
};
export type GetAllLogDrainsDeliveryLogDrains3 = {
type: "clickhouse";
endpoint: string;
table: string;
};
export type GetAllLogDrainsDeliveryEndpoint = {
traces: string;
};
export const GetAllLogDrainsDeliveryEncoding = {
Json: "json",
Proto: "proto",
} as const;
export type GetAllLogDrainsDeliveryEncoding = ClosedEnum<
typeof GetAllLogDrainsDeliveryEncoding
>;
export const GetAllLogDrainsSecretKind = {
IntegrationSecret: "INTEGRATION_SECRET",
} as const;
export type GetAllLogDrainsSecretKind = ClosedEnum<
typeof GetAllLogDrainsSecretKind
>;
export type GetAllLogDrainsSecret2 = {
kind: GetAllLogDrainsSecretKind;
};
export type GetAllLogDrainsDeliveryLogDrainsResponse200Secret =
| GetAllLogDrainsSecret2
| string;
export type GetAllLogDrainsDeliveryLogDrains2 = {
type: "otlphttp";
endpoint: GetAllLogDrainsDeliveryEndpoint;
encoding: GetAllLogDrainsDeliveryEncoding;
headers: { [k: string]: string };
secret?: GetAllLogDrainsSecret2 | string | undefined;
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding =
{
Json: "json",
Ndjson: "ndjson",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding =
ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding
>;
export const GetAllLogDrainsDeliveryLogDrainsResponseCompression = {
Gzip: "gzip",
None: "none",
} as const;
export type GetAllLogDrainsDeliveryLogDrainsResponseCompression = ClosedEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponseCompression
>;
export const GetAllLogDrainsSecretLogDrainsResponse200Kind = {
IntegrationSecret: "INTEGRATION_SECRET",
} as const;
export type GetAllLogDrainsSecretLogDrainsResponse200Kind = ClosedEnum<
typeof GetAllLogDrainsSecretLogDrainsResponse200Kind
>;
export type GetAllLogDrainsSecretLogDrainsResponse2002 = {
kind: GetAllLogDrainsSecretLogDrainsResponse200Kind;
};
export type GetAllLogDrainsDeliveryLogDrainsResponseSecret =
| GetAllLogDrainsSecretLogDrainsResponse2002
| string;
export type GetAllLogDrainsDeliveryLogDrains1 = {
type: "http";
endpoint: string;
encoding:
GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding;
compression?: GetAllLogDrainsDeliveryLogDrainsResponseCompression | undefined;
headers: { [k: string]: string };
secret?: GetAllLogDrainsSecretLogDrainsResponse2002 | string | undefined;
};
export type GetAllLogDrainsDrainsDelivery =
| GetAllLogDrainsDeliveryLogDrains1
| GetAllLogDrainsDeliveryLogDrains2
| GetAllLogDrainsDeliveryLogDrains3
| GetAllLogDrainsDeliveryLogDrains4
| GetAllLogDrainsDeliveryLogDrains5;
export const GetAllLogDrainsDrainsLogDrainsType = {
HeadSampling: "head_sampling",
} as const;
export type GetAllLogDrainsDrainsLogDrainsType = ClosedEnum<
typeof GetAllLogDrainsDrainsLogDrainsType
>;
export const GetAllLogDrainsDrainsEnv = {
Preview: "preview",
Production: "production",
} as const;
export type GetAllLogDrainsDrainsEnv = ClosedEnum<
typeof GetAllLogDrainsDrainsEnv
>;
export type GetAllLogDrainsDrainsSampling = {
type: GetAllLogDrainsDrainsLogDrainsType;
rate: number;
env?: GetAllLogDrainsDrainsEnv | undefined;
requestPath?: string | undefined;
};
export type GetAllLogDrainsSource2 = {
kind: "integration";
resourceId?: string | undefined;
externalResourceId?: string | undefined;
integrationId: string;
integrationConfigurationId: string;
};
export type GetAllLogDrainsSource1 = {
kind: "self-served";
};
export type GetAllLogDrainsDrainsLogDrainsSource =
| GetAllLogDrainsSource1
| GetAllLogDrainsSource2;
export const GetAllLogDrainsDrainsLogDrainsVersion = {
V2: "v2",
} as const;
export type GetAllLogDrainsDrainsLogDrainsVersion = ClosedEnum<
typeof GetAllLogDrainsDrainsLogDrainsVersion
>;
export type GetAllLogDrainsFilterLogDrains2 = {
type: "odata";
text: string;
};
export type GetAllLogDrainsFilterLogDrainsProject = {
ids?: Array<string> | undefined;
};
export const GetAllLogDrainsFilterSources = {
Build: "build",
Edge: "edge",
External: "external",
Firewall: "firewall",
Lambda: "lambda",
Redirect: "redirect",
Static: "static",
} as const;
export type GetAllLogDrainsFilterSources = ClosedEnum<
typeof GetAllLogDrainsFilterSources
>;
export type GetAllLogDrainsFilterLogDrainsLog = {
sources?: Array<GetAllLogDrainsFilterSources> | undefined;
legacyExcludeCachedStaticAssetLogs?: boolean | undefined;
};
export const GetAllLogDrainsFilterLogDrainsEnvironments = {
Preview: "preview",
Production: "production",
} as const;
export type GetAllLogDrainsFilterLogDrainsEnvironments = ClosedEnum<
typeof GetAllLogDrainsFilterLogDrainsEnvironments
>;
export type GetAllLogDrainsFilterDeployment = {
environments?: Array<GetAllLogDrainsFilterLogDrainsEnvironments> | undefined;
};
export type GetAllLogDrainsFilterLogDrains1 = {
type: "basic";
project?: GetAllLogDrainsFilterLogDrainsProject | undefined;
log?: GetAllLogDrainsFilterLogDrainsLog | undefined;
deployment?: GetAllLogDrainsFilterDeployment | undefined;
};
export type GetAllLogDrainsDrainsFilter =
| GetAllLogDrainsFilterLogDrains1
| GetAllLogDrainsFilterLogDrains2;
export type GetAllLogDrainsDrainsFilterV2 = {
version: GetAllLogDrainsDrainsLogDrainsVersion;
filter: GetAllLogDrainsFilterLogDrains1 | GetAllLogDrainsFilterLogDrains2;
};
export type GetAllLogDrainsDrains1 = {
id: string;
createdAt: number;
updatedAt: number;
projectIds?: Array<string> | undefined;
name: string;
teamId?: string | null | undefined;
ownerId: string;
status?: GetAllLogDrainsDrainsLogDrainsStatus | undefined;
firstErrorTimestamp?: number | undefined;
disabledAt?: number | undefined;
disabledBy?: string | undefined;
disabledReason?: GetAllLogDrainsDrainsDisabledReason | undefined;
schemas: GetAllLogDrainsDrainsSchemas;
delivery:
| GetAllLogDrainsDeliveryLogDrains1
| GetAllLogDrainsDeliveryLogDrains2
| GetAllLogDrainsDeliveryLogDrains3
| GetAllLogDrainsDeliveryLogDrains4
| GetAllLogDrainsDeliveryLogDrains5;
sampling?: Array<GetAllLogDrainsDrainsSampling> | undefined;
source: GetAllLogDrainsSource1 | GetAllLogDrainsSource2;
filterV2?: GetAllLogDrainsDrainsFilterV2 | undefined;
};
export type ResponseBodyDrains =
| Array<GetAllLogDrainsDrains1>
| Array<GetAllLogDrainsDrains2>;
export type GetAllLogDrainsResponseBody2 = {
drains: Array<GetAllLogDrainsDrains1> | Array<GetAllLogDrainsDrains2>;
};
export const GetAllLogDrainsResponseBodyFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type GetAllLogDrainsResponseBodyFramework = ClosedEnum<
typeof GetAllLogDrainsResponseBodyFramework
>;
export type ResponseBodyProjectsMetadata = {
id: string;
name: string;
framework?: GetAllLogDrainsResponseBodyFramework | null | undefined;
latestDeployment?: string | undefined;
};
export type GetAllLogDrainsResponseBody1 = {
createdFrom: string;
clientId?: string | undefined;
configurationId?: string | undefined;
projectsMetadata?: Array<ResponseBodyProjectsMetadata> | null | undefined;
integrationIcon?: string | undefined;
integrationConfigurationUri?: string | undefined;
integrationWebsite?: string | undefined;
};
export type GetAllLogDrainsResponseBody =
| GetAllLogDrainsResponseBody2
| Array<GetAllLogDrainsResponseBody1>;
/** @internal */
export type GetAllLogDrainsRequest$Outbound = {
projectId?: string | undefined;
projectIdOrName?: string | undefined;
includeMetadata: boolean;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const GetAllLogDrainsRequest$outboundSchema: z.ZodType<
GetAllLogDrainsRequest$Outbound,
z.ZodTypeDef,
GetAllLogDrainsRequest
> = z.object({
projectId: z.string().optional(),
projectIdOrName: z.string().optional(),
includeMetadata: z.boolean().default(false),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getAllLogDrainsRequestToJSON(
getAllLogDrainsRequest: GetAllLogDrainsRequest,
): string {
return JSON.stringify(
GetAllLogDrainsRequest$outboundSchema.parse(getAllLogDrainsRequest),
);
}
/** @internal */
export const GetAllLogDrainsDrainsStatus$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsStatus
> = z.nativeEnum(GetAllLogDrainsDrainsStatus);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDisabledReason$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDrainsLogDrainsDisabledReason> = z
.nativeEnum(GetAllLogDrainsDrainsLogDrainsDisabledReason);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsLog$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsLog,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsLog, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsLogDrainsLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsTrace,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsTraceFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsTrace, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsTrace' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsAnalytics,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDrainsLogDrainsAnalytics,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsAnalytics' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsSpeedInsights$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsSpeedInsights,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsSpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsSpeedInsights, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsSpeedInsights$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsSpeedInsights' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsAiGateway$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsAiGateway,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsAiGatewayFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDrainsLogDrainsAiGateway,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsAiGateway$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsAiGateway' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsAuditLog$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsAuditLog,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsAuditLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsAuditLog, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsAuditLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsAuditLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsSchemas,
z.ZodTypeDef,
unknown
> = z.object({
log: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsLog$inboundSchema),
),
trace: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema),
),
analytics: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema),
),
speed_insights: types.optional(
z.lazy(() => GetAllLogDrainsDrainsSpeedInsights$inboundSchema),
),
ai_gateway: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsAiGateway$inboundSchema),
),
audit_log: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsAuditLog$inboundSchema),
),
}).transform((v) => {
return remap$(v, {
"speed_insights": "speedInsights",
"ai_gateway": "aiGateway",
"audit_log": "auditLog",
});
});
export function getAllLogDrainsDrainsLogDrainsSchemasFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsSchemas, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsSchemas' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryTarget$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryTarget
> = z.nativeEnum(GetAllLogDrainsDeliveryTarget);
/** @internal */
export const GetAllLogDrainsDelivery5$inboundSchema: z.ZodType<
GetAllLogDrainsDelivery5,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("internal"),
target: GetAllLogDrainsDeliveryTarget$inboundSchema,
});
export function getAllLogDrainsDelivery5FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDelivery5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDelivery5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDelivery5' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding$inboundSchema:
z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding
> = z.nativeEnum(
GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding,
);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsCompression$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsCompression> = z
.nativeEnum(GetAllLogDrainsDeliveryLogDrainsCompression);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsFileStructure$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsFileStructure> = z
.nativeEnum(GetAllLogDrainsDeliveryLogDrainsFileStructure);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsServerSideEncryption$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsServerSideEncryption> =
z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsServerSideEncryption);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsObjectAcl$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsObjectAcl> = z
.nativeEnum(GetAllLogDrainsDeliveryLogDrainsObjectAcl);
/** @internal */
export const GetAllLogDrainsDelivery4$inboundSchema: z.ZodType<
GetAllLogDrainsDelivery4,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("s3"),
endpoint: types.string(),
encoding:
GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONEncoding$inboundSchema,
compression: GetAllLogDrainsDeliveryLogDrainsCompression$inboundSchema,
fileStructure: GetAllLogDrainsDeliveryLogDrainsFileStructure$inboundSchema,
roleArn: types.string(),
region: types.string(),
serverSideEncryption: types.optional(
GetAllLogDrainsDeliveryLogDrainsServerSideEncryption$inboundSchema,
),
objectAcl: types.optional(
GetAllLogDrainsDeliveryLogDrainsObjectAcl$inboundSchema,
),
});
export function getAllLogDrainsDelivery4FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDelivery4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDelivery4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDelivery4' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDelivery3$inboundSchema: z.ZodType<
GetAllLogDrainsDelivery3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("clickhouse"),
endpoint: types.string(),
table: types.string(),
});
export function getAllLogDrainsDelivery3FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDelivery3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDelivery3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDelivery3' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrainsEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
traces: types.string(),
});
export function getAllLogDrainsDeliveryLogDrainsEndpointFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDeliveryLogDrainsEndpoint,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrainsEndpoint' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsResponse200Encoding> =
z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200Encoding);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponseKind$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsSecretLogDrainsResponseKind> = z
.nativeEnum(GetAllLogDrainsSecretLogDrainsResponseKind);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema: z.ZodType<
GetAllLogDrainsSecretLogDrainsResponse2,
z.ZodTypeDef,
unknown
> = z.object({
kind: GetAllLogDrainsSecretLogDrainsResponseKind$inboundSchema,
});
export function getAllLogDrainsSecretLogDrainsResponse2FromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsSecretLogDrainsResponse2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsSecretLogDrainsResponse2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsSecret$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrainsSecret,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema),
types.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsSecretFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrainsSecret, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDeliveryLogDrainsSecret$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrainsSecret' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDelivery2$inboundSchema: z.ZodType<
GetAllLogDrainsDelivery2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("otlphttp"),
endpoint: z.lazy(() =>
GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema
),
encoding: GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$inboundSchema,
headers: z.record(types.string()),
secret: types.optional(
smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema),
types.string(),
]),
),
});
export function getAllLogDrainsDelivery2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDelivery2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDelivery2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDelivery2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseEncoding$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsResponseEncoding> = z
.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponseEncoding);
/** @internal */
export const GetAllLogDrainsDeliveryCompression$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryCompression
> = z.nativeEnum(GetAllLogDrainsDeliveryCompression);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsKind$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsSecretLogDrainsKind
> = z.nativeEnum(GetAllLogDrainsSecretLogDrainsKind);
/** @internal */
export const GetAllLogDrainsSecretLogDrains2$inboundSchema: z.ZodType<
GetAllLogDrainsSecretLogDrains2,
z.ZodTypeDef,
unknown
> = z.object({
kind: GetAllLogDrainsSecretLogDrainsKind$inboundSchema,
});
export function getAllLogDrainsSecretLogDrains2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSecretLogDrains2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSecretLogDrains2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSecretLogDrains2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliverySecret$inboundSchema: z.ZodType<
GetAllLogDrainsDeliverySecret,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrains2$inboundSchema),
types.string(),
]);
export function getAllLogDrainsDeliverySecretFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliverySecret, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliverySecret$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliverySecret' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDelivery1$inboundSchema: z.ZodType<
GetAllLogDrainsDelivery1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("http"),
endpoint: types.string(),
encoding: GetAllLogDrainsDeliveryLogDrainsResponseEncoding$inboundSchema,
compression: types.optional(GetAllLogDrainsDeliveryCompression$inboundSchema),
headers: z.record(types.string()),
secret: types.optional(
smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrains2$inboundSchema),
types.string(),
]),
),
});
export function getAllLogDrainsDelivery1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDelivery1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDelivery1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDelivery1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDelivery$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsDelivery,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsDelivery1$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery2$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery3$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery4$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery5$inboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsDeliveryFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsDelivery, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsDelivery$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsDelivery' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsType$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsType
> = z.nativeEnum(GetAllLogDrainsDrainsType);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsEnv$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsLogDrainsEnv
> = z.nativeEnum(GetAllLogDrainsDrainsLogDrainsEnv);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsSampling,
z.ZodTypeDef,
unknown
> = z.object({
type: GetAllLogDrainsDrainsType$inboundSchema,
rate: types.number(),
env: types.optional(GetAllLogDrainsDrainsLogDrainsEnv$inboundSchema),
requestPath: types.optional(types.string()),
});
export function getAllLogDrainsDrainsLogDrainsSamplingFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsSampling, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsSampling' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsSourceLogDrains2$inboundSchema: z.ZodType<
GetAllLogDrainsSourceLogDrains2,
z.ZodTypeDef,
unknown
> = z.object({
kind: types.literal("integration"),
resourceId: types.optional(types.string()),
externalResourceId: types.optional(types.string()),
integrationId: types.string(),
integrationConfigurationId: types.string(),
});
export function getAllLogDrainsSourceLogDrains2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSourceLogDrains2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSourceLogDrains2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSourceLogDrains2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsSourceLogDrains1$inboundSchema: z.ZodType<
GetAllLogDrainsSourceLogDrains1,
z.ZodTypeDef,
unknown
> = z.object({
kind: types.literal("self-served"),
});
export function getAllLogDrainsSourceLogDrains1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSourceLogDrains1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSourceLogDrains1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSourceLogDrains1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsSource$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsSource,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsSourceLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsSourceLogDrains2$inboundSchema),
]);
export function getAllLogDrainsDrainsSourceFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsSource, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsSource' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsVersion$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsVersion
> = z.nativeEnum(GetAllLogDrainsDrainsVersion);
/** @internal */
export const GetAllLogDrainsFilter2$inboundSchema: z.ZodType<
GetAllLogDrainsFilter2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("odata"),
text: types.string(),
});
export function getAllLogDrainsFilter2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilter2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilter2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilter2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterProject$inboundSchema: z.ZodType<
GetAllLogDrainsFilterProject,
z.ZodTypeDef,
unknown
> = z.object({
ids: types.optional(z.array(types.string())),
});
export function getAllLogDrainsFilterProjectFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterProject, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterProject' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsSources$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsFilterLogDrainsSources> = z.nativeEnum(
GetAllLogDrainsFilterLogDrainsSources,
);
/** @internal */
export const GetAllLogDrainsFilterLog$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLog,
z.ZodTypeDef,
unknown
> = z.object({
sources: types.optional(
z.array(GetAllLogDrainsFilterLogDrainsSources$inboundSchema),
),
legacy_excludeCachedStaticAssetLogs: types.optional(types.boolean()),
}).transform((v) => {
return remap$(v, {
"legacy_excludeCachedStaticAssetLogs": "legacyExcludeCachedStaticAssetLogs",
});
});
export function getAllLogDrainsFilterLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterLog, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterEnvironments$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsFilterEnvironments
> = z.nativeEnum(GetAllLogDrainsFilterEnvironments);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLogDrainsDeployment,
z.ZodTypeDef,
unknown
> = z.object({
environments: types.optional(
z.array(GetAllLogDrainsFilterEnvironments$inboundSchema),
),
});
export function getAllLogDrainsFilterLogDrainsDeploymentFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsFilterLogDrainsDeployment,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsFilterLogDrainsDeployment' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilter1$inboundSchema: z.ZodType<
GetAllLogDrainsFilter1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("basic"),
project: types.optional(
z.lazy(() => GetAllLogDrainsFilterProject$inboundSchema),
),
log: types.optional(z.lazy(() => GetAllLogDrainsFilterLog$inboundSchema)),
deployment: types.optional(
z.lazy(() => GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema),
),
});
export function getAllLogDrainsFilter1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilter1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilter1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilter1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsFilter$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsFilter,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsFilter1$inboundSchema),
z.lazy(() => GetAllLogDrainsFilter2$inboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsFilterFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsFilter, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsFilter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsFilter' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsFilterV2$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsFilterV2,
z.ZodTypeDef,
unknown
> = z.object({
version: GetAllLogDrainsDrainsVersion$inboundSchema,
filter: z.union([
z.lazy(() => GetAllLogDrainsFilter1$inboundSchema),
z.lazy(() => GetAllLogDrainsFilter2$inboundSchema),
]),
});
export function getAllLogDrainsDrainsLogDrainsFilterV2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsFilterV2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsFilterV2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsFilterV2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsProjectAccessLogDrainsManagedBy$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsProjectAccessLogDrainsManagedBy> = z
.nativeEnum(GetAllLogDrainsProjectAccessLogDrainsManagedBy);
/** @internal */
export const GetAllLogDrainsProjectAccess2$inboundSchema: z.ZodType<
GetAllLogDrainsProjectAccess2,
z.ZodTypeDef,
unknown
> = z.object({
access: types.literal("some"),
projectIds: z.array(types.string()),
managedBy: GetAllLogDrainsProjectAccessLogDrainsManagedBy$inboundSchema,
});
export function getAllLogDrainsProjectAccess2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsProjectAccess2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsProjectAccess2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsProjectAccess2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsProjectAccessManagedBy$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsProjectAccessManagedBy> = z.nativeEnum(
GetAllLogDrainsProjectAccessManagedBy,
);
/** @internal */
export const GetAllLogDrainsProjectAccess1$inboundSchema: z.ZodType<
GetAllLogDrainsProjectAccess1,
z.ZodTypeDef,
unknown
> = z.object({
access: types.literal("all"),
managedBy: GetAllLogDrainsProjectAccessManagedBy$inboundSchema,
});
export function getAllLogDrainsProjectAccess1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsProjectAccess1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsProjectAccess1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsProjectAccess1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsProjectAccess$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsProjectAccess,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsProjectAccess1$inboundSchema),
z.lazy(() => GetAllLogDrainsProjectAccess2$inboundSchema),
]);
export function getAllLogDrainsDrainsProjectAccessFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsProjectAccess, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsProjectAccess$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsProjectAccess' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrains2$inboundSchema: z.ZodType<
GetAllLogDrainsDrains2,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
createdAt: types.number(),
updatedAt: types.number(),
projectIds: types.optional(z.array(types.string())),
name: types.string(),
teamId: z.nullable(types.string()).optional(),
ownerId: types.string(),
status: types.optional(GetAllLogDrainsDrainsStatus$inboundSchema),
firstErrorTimestamp: types.optional(types.number()),
disabledAt: types.optional(types.number()),
disabledBy: types.optional(types.string()),
disabledReason: types.optional(
GetAllLogDrainsDrainsLogDrainsDisabledReason$inboundSchema,
),
schemas: z.lazy(() => GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema),
delivery: z.union([
z.lazy(() => GetAllLogDrainsDelivery1$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery2$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery3$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery4$inboundSchema),
z.lazy(() => GetAllLogDrainsDelivery5$inboundSchema),
]),
sampling: types.optional(
z.array(z.lazy(() => GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema)),
),
source: z.union([
z.lazy(() => GetAllLogDrainsSourceLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsSourceLogDrains2$inboundSchema),
]),
filterV2: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsFilterV2$inboundSchema),
),
integrationIcon: types.optional(types.string()),
integrationConfigurationUri: types.optional(types.string()),
integrationWebsite: types.optional(types.string()),
projectAccess: types.optional(
z.union([
z.lazy(() => GetAllLogDrainsProjectAccess1$inboundSchema),
z.lazy(() => GetAllLogDrainsProjectAccess2$inboundSchema),
]),
),
});
export function getAllLogDrainsDrains2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrains2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrains2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrains2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsStatus$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDrainsLogDrainsStatus> = z.nativeEnum(
GetAllLogDrainsDrainsLogDrainsStatus,
);
/** @internal */
export const GetAllLogDrainsDrainsDisabledReason$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsDisabledReason
> = z.nativeEnum(GetAllLogDrainsDrainsDisabledReason);
/** @internal */
export const GetAllLogDrainsDrainsLog$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLog,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLog, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsTrace$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsTrace,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsTraceFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsTrace, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsTrace$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsTrace' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsAnalytics$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsAnalytics,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsAnalytics' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema:
z.ZodType<
GetAllLogDrainsDrainsLogDrainsSpeedInsights,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsLogDrainsSpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDrainsLogDrainsSpeedInsights,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsSpeedInsights' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsAiGateway$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsAiGateway,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsAiGatewayFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsAiGateway, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsAiGateway$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsAiGateway' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsAuditLog$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsAuditLog,
z.ZodTypeDef,
unknown
> = z.object({});
export function getAllLogDrainsDrainsAuditLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsAuditLog, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsAuditLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsAuditLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsSchemas$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsSchemas,
z.ZodTypeDef,
unknown
> = z.object({
log: types.optional(z.lazy(() => GetAllLogDrainsDrainsLog$inboundSchema)),
trace: types.optional(z.lazy(() => GetAllLogDrainsDrainsTrace$inboundSchema)),
analytics: types.optional(
z.lazy(() => GetAllLogDrainsDrainsAnalytics$inboundSchema),
),
speed_insights: types.optional(
z.lazy(() => GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema),
),
ai_gateway: types.optional(
z.lazy(() => GetAllLogDrainsDrainsAiGateway$inboundSchema),
),
audit_log: types.optional(
z.lazy(() => GetAllLogDrainsDrainsAuditLog$inboundSchema),
),
}).transform((v) => {
return remap$(v, {
"speed_insights": "speedInsights",
"ai_gateway": "aiGateway",
"audit_log": "auditLog",
});
});
export function getAllLogDrainsDrainsSchemasFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsSchemas, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsSchemas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsSchemas' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsTarget$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsTarget> = z.nativeEnum(
GetAllLogDrainsDeliveryLogDrainsTarget,
);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains5$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrains5,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("internal"),
target: GetAllLogDrainsDeliveryLogDrainsTarget$inboundSchema,
});
export function getAllLogDrainsDeliveryLogDrains5FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrains5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryLogDrains5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrains5' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEncoding$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsEncoding> = z
.nativeEnum(GetAllLogDrainsDeliveryLogDrainsEncoding);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Compression$inboundSchema:
z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200Compression
> = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200Compression);
/** @internal */
export const GetAllLogDrainsDeliveryFileStructure$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryFileStructure> = z.nativeEnum(
GetAllLogDrainsDeliveryFileStructure,
);
/** @internal */
export const GetAllLogDrainsDeliveryServerSideEncryption$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryServerSideEncryption> = z
.nativeEnum(GetAllLogDrainsDeliveryServerSideEncryption);
/** @internal */
export const GetAllLogDrainsDeliveryObjectAcl$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryObjectAcl
> = z.nativeEnum(GetAllLogDrainsDeliveryObjectAcl);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains4$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrains4,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("s3"),
endpoint: types.string(),
encoding: GetAllLogDrainsDeliveryLogDrainsEncoding$inboundSchema,
compression:
GetAllLogDrainsDeliveryLogDrainsResponse200Compression$inboundSchema,
fileStructure: GetAllLogDrainsDeliveryFileStructure$inboundSchema,
roleArn: types.string(),
region: types.string(),
serverSideEncryption: types.optional(
GetAllLogDrainsDeliveryServerSideEncryption$inboundSchema,
),
objectAcl: types.optional(GetAllLogDrainsDeliveryObjectAcl$inboundSchema),
});
export function getAllLogDrainsDeliveryLogDrains4FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrains4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryLogDrains4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrains4' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains3$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrains3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("clickhouse"),
endpoint: types.string(),
table: types.string(),
});
export function getAllLogDrainsDeliveryLogDrains3FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrains3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryLogDrains3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrains3' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryEndpoint$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
traces: types.string(),
});
export function getAllLogDrainsDeliveryEndpointFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryEndpoint' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryEncoding$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryEncoding
> = z.nativeEnum(GetAllLogDrainsDeliveryEncoding);
/** @internal */
export const GetAllLogDrainsSecretKind$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsSecretKind
> = z.nativeEnum(GetAllLogDrainsSecretKind);
/** @internal */
export const GetAllLogDrainsSecret2$inboundSchema: z.ZodType<
GetAllLogDrainsSecret2,
z.ZodTypeDef,
unknown
> = z.object({
kind: GetAllLogDrainsSecretKind$inboundSchema,
});
export function getAllLogDrainsSecret2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSecret2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSecret2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSecret2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Secret$inboundSchema:
z.ZodType<
GetAllLogDrainsDeliveryLogDrainsResponse200Secret,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetAllLogDrainsSecret2$inboundSchema),
types.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsResponse200SecretFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDeliveryLogDrainsResponse200Secret,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDeliveryLogDrainsResponse200Secret$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrainsResponse200Secret' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains2$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrains2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("otlphttp"),
endpoint: z.lazy(() => GetAllLogDrainsDeliveryEndpoint$inboundSchema),
encoding: GetAllLogDrainsDeliveryEncoding$inboundSchema,
headers: z.record(types.string()),
secret: types.optional(
smartUnion([
z.lazy(() => GetAllLogDrainsSecret2$inboundSchema),
types.string(),
]),
),
});
export function getAllLogDrainsDeliveryLogDrains2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrains2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryLogDrains2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrains2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding$inboundSchema:
z.ZodNativeEnum<
typeof GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding
> = z.nativeEnum(
GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding,
);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseCompression$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDeliveryLogDrainsResponseCompression> =
z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponseCompression);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse200Kind$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsSecretLogDrainsResponse200Kind> = z
.nativeEnum(GetAllLogDrainsSecretLogDrainsResponse200Kind);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema:
z.ZodType<GetAllLogDrainsSecretLogDrainsResponse2002, z.ZodTypeDef, unknown> =
z.object({
kind: GetAllLogDrainsSecretLogDrainsResponse200Kind$inboundSchema,
});
export function getAllLogDrainsSecretLogDrainsResponse2002FromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsSecretLogDrainsResponse2002,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsSecretLogDrainsResponse2002' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseSecret$inboundSchema:
z.ZodType<
GetAllLogDrainsDeliveryLogDrainsResponseSecret,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema),
types.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsResponseSecretFromJSON(
jsonString: string,
): SafeParseResult<
GetAllLogDrainsDeliveryLogDrainsResponseSecret,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDeliveryLogDrainsResponseSecret$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrainsResponseSecret' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains1$inboundSchema: z.ZodType<
GetAllLogDrainsDeliveryLogDrains1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("http"),
endpoint: types.string(),
encoding:
GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyEncoding$inboundSchema,
compression: types.optional(
GetAllLogDrainsDeliveryLogDrainsResponseCompression$inboundSchema,
),
headers: z.record(types.string()),
secret: types.optional(
smartUnion([
z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema),
types.string(),
]),
),
});
export function getAllLogDrainsDeliveryLogDrains1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDeliveryLogDrains1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDeliveryLogDrains1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDeliveryLogDrains1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsDelivery$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsDelivery,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains5$inboundSchema),
]);
export function getAllLogDrainsDrainsDeliveryFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsDelivery, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsDelivery$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsDelivery' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsType$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsLogDrainsType
> = z.nativeEnum(GetAllLogDrainsDrainsLogDrainsType);
/** @internal */
export const GetAllLogDrainsDrainsEnv$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsDrainsEnv
> = z.nativeEnum(GetAllLogDrainsDrainsEnv);
/** @internal */
export const GetAllLogDrainsDrainsSampling$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsSampling,
z.ZodTypeDef,
unknown
> = z.object({
type: GetAllLogDrainsDrainsLogDrainsType$inboundSchema,
rate: types.number(),
env: types.optional(GetAllLogDrainsDrainsEnv$inboundSchema),
requestPath: types.optional(types.string()),
});
export function getAllLogDrainsDrainsSamplingFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsSampling, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsSampling$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsSampling' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsSource2$inboundSchema: z.ZodType<
GetAllLogDrainsSource2,
z.ZodTypeDef,
unknown
> = z.object({
kind: types.literal("integration"),
resourceId: types.optional(types.string()),
externalResourceId: types.optional(types.string()),
integrationId: types.string(),
integrationConfigurationId: types.string(),
});
export function getAllLogDrainsSource2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSource2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSource2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSource2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsSource1$inboundSchema: z.ZodType<
GetAllLogDrainsSource1,
z.ZodTypeDef,
unknown
> = z.object({
kind: types.literal("self-served"),
});
export function getAllLogDrainsSource1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsSource1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsSource1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsSource1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSource$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsLogDrainsSource,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsSource1$inboundSchema),
z.lazy(() => GetAllLogDrainsSource2$inboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsSourceFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsLogDrainsSource, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsDrainsLogDrainsSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsLogDrainsSource' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsVersion$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsDrainsLogDrainsVersion> = z.nativeEnum(
GetAllLogDrainsDrainsLogDrainsVersion,
);
/** @internal */
export const GetAllLogDrainsFilterLogDrains2$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLogDrains2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("odata"),
text: types.string(),
});
export function getAllLogDrainsFilterLogDrains2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterLogDrains2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterLogDrains2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterLogDrains2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsProject$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLogDrainsProject,
z.ZodTypeDef,
unknown
> = z.object({
ids: types.optional(z.array(types.string())),
});
export function getAllLogDrainsFilterLogDrainsProjectFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterLogDrainsProject, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetAllLogDrainsFilterLogDrainsProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterLogDrainsProject' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterSources$inboundSchema: z.ZodNativeEnum<
typeof GetAllLogDrainsFilterSources
> = z.nativeEnum(GetAllLogDrainsFilterSources);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsLog$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLogDrainsLog,
z.ZodTypeDef,
unknown
> = z.object({
sources: types.optional(z.array(GetAllLogDrainsFilterSources$inboundSchema)),
legacy_excludeCachedStaticAssetLogs: types.optional(types.boolean()),
}).transform((v) => {
return remap$(v, {
"legacy_excludeCachedStaticAssetLogs": "legacyExcludeCachedStaticAssetLogs",
});
});
export function getAllLogDrainsFilterLogDrainsLogFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterLogDrainsLog, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterLogDrainsLog$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterLogDrainsLog' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsEnvironments$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsFilterLogDrainsEnvironments> = z
.nativeEnum(GetAllLogDrainsFilterLogDrainsEnvironments);
/** @internal */
export const GetAllLogDrainsFilterDeployment$inboundSchema: z.ZodType<
GetAllLogDrainsFilterDeployment,
z.ZodTypeDef,
unknown
> = z.object({
environments: types.optional(
z.array(GetAllLogDrainsFilterLogDrainsEnvironments$inboundSchema),
),
});
export function getAllLogDrainsFilterDeploymentFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterDeployment, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterDeployment$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterDeployment' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrains1$inboundSchema: z.ZodType<
GetAllLogDrainsFilterLogDrains1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("basic"),
project: types.optional(
z.lazy(() => GetAllLogDrainsFilterLogDrainsProject$inboundSchema),
),
log: types.optional(
z.lazy(() => GetAllLogDrainsFilterLogDrainsLog$inboundSchema),
),
deployment: types.optional(
z.lazy(() => GetAllLogDrainsFilterDeployment$inboundSchema),
),
});
export function getAllLogDrainsFilterLogDrains1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsFilterLogDrains1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsFilterLogDrains1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsFilterLogDrains1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsFilter$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsFilter,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetAllLogDrainsFilterLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsFilterLogDrains2$inboundSchema),
]);
export function getAllLogDrainsDrainsFilterFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsFilter, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsFilter$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsFilter' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrainsFilterV2$inboundSchema: z.ZodType<
GetAllLogDrainsDrainsFilterV2,
z.ZodTypeDef,
unknown
> = z.object({
version: GetAllLogDrainsDrainsLogDrainsVersion$inboundSchema,
filter: z.union([
z.lazy(() => GetAllLogDrainsFilterLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsFilterLogDrains2$inboundSchema),
]),
});
export function getAllLogDrainsDrainsFilterV2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrainsFilterV2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrainsFilterV2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrainsFilterV2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsDrains1$inboundSchema: z.ZodType<
GetAllLogDrainsDrains1,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
createdAt: types.number(),
updatedAt: types.number(),
projectIds: types.optional(z.array(types.string())),
name: types.string(),
teamId: z.nullable(types.string()).optional(),
ownerId: types.string(),
status: types.optional(GetAllLogDrainsDrainsLogDrainsStatus$inboundSchema),
firstErrorTimestamp: types.optional(types.number()),
disabledAt: types.optional(types.number()),
disabledBy: types.optional(types.string()),
disabledReason: types.optional(
GetAllLogDrainsDrainsDisabledReason$inboundSchema,
),
schemas: z.lazy(() => GetAllLogDrainsDrainsSchemas$inboundSchema),
delivery: z.union([
z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$inboundSchema),
z.lazy(() => GetAllLogDrainsDeliveryLogDrains5$inboundSchema),
]),
sampling: types.optional(
z.array(z.lazy(() => GetAllLogDrainsDrainsSampling$inboundSchema)),
),
source: z.union([
z.lazy(() => GetAllLogDrainsSource1$inboundSchema),
z.lazy(() => GetAllLogDrainsSource2$inboundSchema),
]),
filterV2: types.optional(
z.lazy(() => GetAllLogDrainsDrainsFilterV2$inboundSchema),
),
});
export function getAllLogDrainsDrains1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsDrains1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsDrains1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsDrains1' from JSON`,
);
}
/** @internal */
export const ResponseBodyDrains$inboundSchema: z.ZodType<
ResponseBodyDrains,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(z.lazy(() => GetAllLogDrainsDrains1$inboundSchema)),
z.array(z.lazy(() => GetAllLogDrainsDrains2$inboundSchema)),
]);
export function responseBodyDrainsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyDrains, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyDrains$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyDrains' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsResponseBody2$inboundSchema: z.ZodType<
GetAllLogDrainsResponseBody2,
z.ZodTypeDef,
unknown
> = z.object({
drains: smartUnion([
z.array(z.lazy(() => GetAllLogDrainsDrains1$inboundSchema)),
z.array(z.lazy(() => GetAllLogDrainsDrains2$inboundSchema)),
]),
});
export function getAllLogDrainsResponseBody2FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsResponseBody2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsResponseBody2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsResponseBody2' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsResponseBodyFramework$inboundSchema:
z.ZodNativeEnum<typeof GetAllLogDrainsResponseBodyFramework> = z.nativeEnum(
GetAllLogDrainsResponseBodyFramework,
);
/** @internal */
export const ResponseBodyProjectsMetadata$inboundSchema: z.ZodType<
ResponseBodyProjectsMetadata,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(GetAllLogDrainsResponseBodyFramework$inboundSchema)
.optional(),
latestDeployment: types.optional(types.string()),
});
export function responseBodyProjectsMetadataFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyProjectsMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyProjectsMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyProjectsMetadata' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsResponseBody1$inboundSchema: z.ZodType<
GetAllLogDrainsResponseBody1,
z.ZodTypeDef,
unknown
> = z.object({
createdFrom: types.string(),
clientId: types.optional(types.string()),
configurationId: types.optional(types.string()),
projectsMetadata: z.nullable(
z.array(z.lazy(() => ResponseBodyProjectsMetadata$inboundSchema)),
).optional(),
integrationIcon: types.optional(types.string()),
integrationConfigurationUri: types.optional(types.string()),
integrationWebsite: types.optional(types.string()),
});
export function getAllLogDrainsResponseBody1FromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsResponseBody1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsResponseBody1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsResponseBody1' from JSON`,
);
}
/** @internal */
export const GetAllLogDrainsResponseBody$inboundSchema: z.ZodType<
GetAllLogDrainsResponseBody,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetAllLogDrainsResponseBody2$inboundSchema),
z.array(z.lazy(() => GetAllLogDrainsResponseBody1$inboundSchema)),
]);
export function getAllLogDrainsResponseBodyFromJSON(
jsonString: string,
): SafeParseResult<GetAllLogDrainsResponseBody, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetAllLogDrainsResponseBody$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetAllLogDrainsResponseBody' from JSON`,
);
}