@fern-api/fdr-sdk 1.2.33-9d7e001fd0 → 1.2.33-e73a4c8a93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/api-definition/index.js +170 -54
- package/dist/js/api-definition/index.js.map +1 -1
- package/dist/js/api-definition/index.mjs +169 -54
- package/dist/js/api-definition/index.mjs.map +1 -1
- package/dist/js/api-definition-lite/index.js.map +1 -1
- package/dist/js/client/FdrClient.js +17 -9
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +17 -9
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/client/types.js +22 -9
- package/dist/js/client/types.js.map +1 -1
- package/dist/js/client/types.mjs +22 -9
- package/dist/js/client/types.mjs.map +1 -1
- package/dist/js/converters/index.js +276 -71
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +276 -71
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +276 -71
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +276 -71
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +273 -70
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +273 -70
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/navigation/ledger-root-builder.js +12 -8
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +12 -8
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/js/navigation/types/latest.js.map +1 -1
- package/dist/js/navigation/types/latest.mjs.map +1 -1
- package/dist/js/navigation/types/v1.js.map +1 -1
- package/dist/js/navigation/types/v1.mjs.map +1 -1
- package/dist/js/orpc-client.js +20 -9
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +19 -9
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api-definition/__test__/collect-type-tree.test.d.ts +2 -0
- package/dist/types/api-definition/__test__/collect-type-tree.test.d.ts.map +1 -0
- package/dist/types/api-definition/collect-referenced-types.d.ts.map +1 -1
- package/dist/types/api-definition/collect-type-tree.d.ts +4 -0
- package/dist/types/api-definition/collect-type-tree.d.ts.map +1 -1
- package/dist/types/api-definition/endpoint-context.d.ts +3 -0
- package/dist/types/api-definition/endpoint-context.d.ts.map +1 -1
- package/dist/types/api-definition/migrators/v1ToV2.d.ts +17 -7
- package/dist/types/api-definition/migrators/v1ToV2.d.ts.map +1 -1
- package/dist/types/api-definition/prune.d.ts +1 -0
- package/dist/types/api-definition/prune.d.ts.map +1 -1
- package/dist/types/api-definition/snippets/graphql-snippets.d.ts.map +1 -1
- package/dist/types/api-definition/typeid-visitor.d.ts.map +1 -1
- package/dist/types/api-definition-lite/index.d.ts +1 -1
- package/dist/types/api-definition-lite/index.d.ts.map +1 -1
- package/dist/types/converters/__test__/subtitle-round-trip.test.d.ts +2 -0
- package/dist/types/converters/__test__/subtitle-round-trip.test.d.ts.map +1 -0
- package/dist/types/converters/db/convertAPIDefinitionToDb.d.ts.map +1 -1
- package/dist/types/converters/read/convertDbAPIDefinitionToRead.d.ts +48 -14
- package/dist/types/converters/read/convertDbAPIDefinitionToRead.d.ts.map +1 -1
- package/dist/types/navigation/ApiDefinitionPruner.d.ts.map +1 -1
- package/dist/types/navigation/ApiTypeIdVisitor.d.ts.map +1 -1
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/types/navigation/migrators/v1ToV2.d.ts.map +1 -1
- package/dist/types/navigation/types/latest.d.ts +18 -2
- package/dist/types/navigation/types/latest.d.ts.map +1 -1
- package/dist/types/navigation/types/v1.d.ts +2 -0
- package/dist/types/navigation/types/v1.d.ts.map +1 -1
- package/dist/types/navigation/utils/getApiReferenceId.d.ts.map +1 -1
- package/dist/types/navigation/utils/toApis.d.ts +3 -1
- package/dist/types/navigation/utils/toApis.d.ts.map +1 -1
- package/dist/types/navigation/versions/latest/NavigationNode.d.ts +1 -1
- package/dist/types/navigation/versions/latest/NavigationNode.d.ts.map +1 -1
- package/dist/types/navigation/versions/latest/NavigationNodeApiLeaf.d.ts +2 -2
- package/dist/types/navigation/versions/latest/NavigationNodeApiLeaf.d.ts.map +1 -1
- package/dist/types/navigation/versions/latest/__test__/GraphQlTypeNode.test.d.ts +2 -0
- package/dist/types/navigation/versions/latest/__test__/GraphQlTypeNode.test.d.ts.map +1 -0
- package/dist/types/navigation/versions/latest/getPageId.d.ts.map +1 -1
- package/dist/types/navigation/versions/v1/converters/ApiReferenceNavigationConverter.d.ts +1 -0
- package/dist/types/navigation/versions/v1/converters/ApiReferenceNavigationConverter.d.ts.map +1 -1
- package/dist/types/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.d.ts +2 -0
- package/dist/types/navigation/versions/v1/converters/__test__/ApiReferenceNavigationConverter.graphql.test.d.ts.map +1 -0
- package/dist/types/orpc-client/api/contract-db.d.ts +1880 -216
- package/dist/types/orpc-client/api/contract-db.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-latest.d.ts +37 -10
- package/dist/types/orpc-client/api/contract-latest.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-read.d.ts +1727 -216
- package/dist/types/orpc-client/api/contract-read.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-register.d.ts +1905 -216
- package/dist/types/orpc-client/api/contract-register.d.ts.map +1 -1
- package/dist/types/orpc-client/api/shared.d.ts +99 -53
- package/dist/types/orpc-client/api/shared.d.ts.map +1 -1
- package/dist/types/orpc-client/files/contract.d.ts +5 -1
- package/dist/types/orpc-client/files/contract.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/api-definition-lite/index.ts","../../../src/orpc-client/shared.ts","../../../src/api-definition/endpoint-path-literal.ts","../../../src/api-definition/status-message.ts","../../../../commons/core-utils/src/assertNever.ts","../../../../commons/core-utils/src/objects/isPlainObject.ts","../../../../commons/core-utils/src/sanitizeUrl.ts","../../../../commons/core-utils/src/unknownToString.ts","../../../../commons/core-utils/src/visitDiscriminatedUnion.ts","../../../src/api-definition/unwrap.ts","../../../src/api-definition/availability.ts","../../../src/api-definition/const.ts","../../../src/api-definition/url.ts"],"sourcesContent":["/**\n * Lightweight entry point for client-side API reference rendering.\n *\n * Re-exports only the functions and types needed by \"use client\" components\n * that render endpoint pages (type definitions, URL building, status messages).\n * Excludes heavy server-only modules: transformer, v1ToV2 migrator, snippet\n * generators, type-tree collectors, etc.\n */\n\n// ── Context types (type-only, no runtime) ──\nexport type {\n EndpointContext,\n GrpcContext,\n WebhookContext,\n WebSocketContext\n} from \"../api-definition/endpoint-context\";\n// ── Endpoint path literal ──\nexport { toColonEndpointPathLiteral, toCurlyBraceEndpointPathLiteral } from \"../api-definition/endpoint-path-literal\";\n// ── Types from latest (zero runtime cost) ──\nexport type {\n ApiDefinition,\n AuthScheme,\n Availability,\n DiscriminatedUnionType,\n DiscriminatedUnionVariant,\n EndpointDefinition,\n EnumType,\n EnumValue,\n ErrorResponse,\n ExampleEndpointCall,\n ExampleEndpointRequest,\n ExampleEndpointResponse,\n ExampleWebSocketSession,\n FormDataField,\n GraphQlOperation,\n HttpMethod,\n HttpRequest,\n HttpRequestBodyShape,\n HttpResponse,\n HttpResponseBodyShape,\n ObjectProperty,\n ObjectPropertyAccess,\n ObjectType,\n ParameterProperty,\n PathPart,\n PrimitiveType,\n Protocol,\n SubpackageMetadata,\n TypeDefinition,\n TypeId,\n TypeReference,\n TypeShape,\n UndiscriminatedUnionType,\n UndiscriminatedUnionVariant,\n WebhookDefinition,\n WebhookPayload,\n WebhookPayloadShape,\n WebSocketChannel,\n WebSocketMessage\n} from \"../api-definition/latest\";\n// ── Status code messages ──\nexport { getMessageForStatus, STATUS_CODE_MESSAGES } from \"../api-definition/status-message\";\n// ── Additional types ──\nexport type { DereferencedNonOptionalTypeShapeOrReference, TypeShapeOrReference } from \"../api-definition/types\";\n// ── Type unwrapping ──\nexport {\n type UnwrappedObjectType,\n type UnwrappedReference,\n unwrapDiscriminatedUnionVariant,\n unwrapObjectType,\n unwrapReference\n} from \"../api-definition/unwrap\";\n// ── URL building ──\nexport { buildEndpointUrl, buildRequestUrl, preprocessQueryParameters } from \"../api-definition/url\";\n\n// ── Branded ID types (type-only, no runtime) ──\nexport type { AuthSchemeId, EndpointId, EnvironmentId, PropertyKey } from \"../orpc-client/api/shared.js\";\n","import * as z from \"zod\";\n\n// ── Org / API identifiers ──────────────────────────────────────────────\n\nexport const OrgIdSchema = z.string();\nexport type OrgId = z.infer<typeof OrgIdSchema>;\nexport function OrgId(value: string): OrgId {\n return value;\n}\n\nexport const ApiIdSchema = z.string();\nexport type ApiId = z.infer<typeof ApiIdSchema>;\nexport function ApiId(value: string): ApiId {\n return value;\n}\n\nexport const ApiDefinitionIdSchema = z.string().uuid();\nexport type ApiDefinitionId = z.infer<typeof ApiDefinitionIdSchema>;\nexport function ApiDefinitionId(value: string): ApiDefinitionId {\n return value;\n}\n\n// ── HTTP / Endpoint schemas ─────────────────────────────────────────────\n\nexport const HttpMethodSchema = z.enum([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\"]);\nexport type HttpMethod = z.infer<typeof HttpMethodSchema>;\n\nexport const HttpMethod = {\n Get: \"GET\",\n Post: \"POST\",\n Put: \"PUT\",\n Patch: \"PATCH\",\n Delete: \"DELETE\",\n Head: \"HEAD\"\n} as const;\n\nexport const UrlSchema: z.ZodType<Url> = z.string() as any;\nexport type Url = string & { Url: void };\nexport function Url(value: string): Url {\n return value as unknown as Url;\n}\n\nexport const EndpointPathLiteralSchema = z.string();\nexport type EndpointPathLiteral = z.infer<typeof EndpointPathLiteralSchema>;\nexport function EndpointPathLiteral(value: string): EndpointPathLiteral {\n return value;\n}\n\nexport const EndpointIdentifierSchema = z.object({\n path: z.string(),\n method: HttpMethodSchema,\n identifierOverride: z.string().nullish()\n});\nexport type EndpointIdentifier = z.infer<typeof EndpointIdentifierSchema>;\n\n// ── SDK request schema ──────────────────────────────────────────────────\n\nexport type SdkRequest =\n | { type: \"typescript\"; package: string; version: string | undefined }\n | { type: \"python\"; package: string; version: string | undefined }\n | { type: \"go\"; githubRepo: string; version: string | undefined }\n | { type: \"ruby\"; gem: string; version: string | undefined }\n | { type: \"java\"; group: string; artifact: string; version: string | undefined }\n | { type: \"csharp\"; package: string; version: string | undefined };\n\nexport const SdkRequestSchema: z.ZodType<SdkRequest> = z.discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"typescript\"), package: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"python\"), package: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"go\"), githubRepo: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"ruby\"), gem: z.string(), version: z.string().nullish() }),\n z.object({\n type: z.literal(\"java\"),\n group: z.string(),\n artifact: z.string(),\n version: z.string().nullish()\n }),\n z.object({ type: z.literal(\"csharp\"), package: z.string(), version: z.string().nullish() })\n]) as any;\n\n// ── Additional identifiers ─────────────────────────────────────────────\n\nexport const DocsConfigIdSchema = z.string();\nexport type DocsConfigId = z.infer<typeof DocsConfigIdSchema>;\nexport function DocsConfigId(value: string): DocsConfigId {\n return value;\n}\n\nexport const GrpcIdSchema = z.string();\nexport type GrpcId = z.infer<typeof GrpcIdSchema>;\nexport function GrpcId(value: string): GrpcId {\n return value;\n}\n\nexport const PageIdSchema = z.string();\nexport type PageId = z.infer<typeof PageIdSchema>;\nexport function PageId(value: string): PageId {\n return value;\n}\n\nexport const RoleIdSchema = z.string();\nexport type RoleId = z.infer<typeof RoleIdSchema>;\nexport function RoleId(value: string): RoleId {\n return value;\n}\n\nexport const TokenIdSchema = z.string();\nexport type TokenId = z.infer<typeof TokenIdSchema>;\n\nexport const VersionIdSchema = z.string();\nexport type VersionId = z.infer<typeof VersionIdSchema>;\nexport function VersionId(value: string): VersionId {\n return value;\n}\n\n// ── Enums ──────────────────────────────────────────────────────────────\n\nexport const LinkTarget = {\n Blank: \"_blank\",\n Self: \"_self\",\n Parent: \"_parent\",\n Top: \"_top\"\n} as const;\nexport type LinkTarget = (typeof LinkTarget)[keyof typeof LinkTarget];\n\nexport const GrpcMethod = {\n Unary: \"UNARY\",\n ClientStream: \"CLIENT_STREAM\",\n ServerStream: \"SERVER_STREAM\",\n BidirectionalStream: \"BIDIRECTIONAL_STREAM\"\n} as const;\nexport type GrpcMethod = (typeof GrpcMethod)[keyof typeof GrpcMethod];\n\nexport const Availability = {\n Alpha: \"Alpha\",\n Stable: \"Stable\",\n GenerallyAvailable: \"GenerallyAvailable\",\n InDevelopment: \"InDevelopment\",\n PreRelease: \"PreRelease\",\n Deprecated: \"Deprecated\",\n Beta: \"Beta\",\n Preview: \"Preview\",\n Legacy: \"Legacy\"\n} as const;\nexport type Availability = (typeof Availability)[keyof typeof Availability];\n\nexport const SupportedLanguage = {\n Curl: \"curl\",\n Python: \"python\",\n Javascript: \"javascript\",\n Js: \"js\",\n Node: \"node\",\n Typescript: \"typescript\",\n Ts: \"ts\",\n Go: \"go\",\n Ruby: \"ruby\",\n Csharp: \"csharp\",\n Php: \"php\",\n Swift: \"swift\",\n Rust: \"rust\"\n} as const;\nexport type SupportedLanguage = (typeof SupportedLanguage)[keyof typeof SupportedLanguage];\n\nexport const HttpSnippetLanguage = {\n Curl: \"curl\",\n Csharp: \"csharp\",\n Go: \"go\",\n Java: \"java\",\n Javascript: \"javascript\",\n Php: \"php\",\n Python: \"python\",\n Ruby: \"ruby\",\n Swift: \"swift\",\n Rust: \"rust\",\n Typescript: \"typescript\"\n} as const;\nexport type HttpSnippetLanguage = (typeof HttpSnippetLanguage)[keyof typeof HttpSnippetLanguage];\n\n// ── Error types ────────────────────────────────────────────────────────\n\nexport interface InvalidDomainErrorBody {\n /** Value the domain should end with (i.e. docs.buildwithfern.com or dev.docs.buildwithfern.com) */\n requiredDomainSuffix: string;\n}\n\n// ── Docs types ─────────────────────────────────────────────────────────\n\nexport interface AnnouncementConfig {\n /** The text to display in the banner, using markdown. */\n text: string;\n}\n\n// ── Snippet types ──────────────────────────────────────────────────────\n\nexport type SnippetsByEndpointMethod = Partial<Record<HttpMethod, Snippet[]>>;\n\nexport const SnippetsByEndpointMethodSchema: z.ZodType<SnippetsByEndpointMethod> = z.record(\n HttpMethodSchema,\n z.array(z.unknown())\n) as any;\n\n// ── SDK types for snippets ────────────────────────────────────────────\n\nexport interface TypeScriptSdk {\n package: string;\n version: string;\n}\n\nexport interface PythonSdk {\n package: string;\n version: string;\n}\n\nexport interface GoSdk {\n githubRepo: string;\n version: string;\n}\n\nexport interface RubySdk {\n gem: string;\n version: string;\n}\n\nexport interface CsharpSdk {\n package: string;\n version: string;\n}\n\nexport interface JavaSdk {\n group: string;\n artifact: string;\n version: string;\n}\n\nexport interface TypeScriptSnippet {\n sdk: TypeScriptSdk;\n client: string;\n}\n\nexport interface PythonSnippet {\n sdk: PythonSdk;\n async_client: string;\n sync_client: string;\n}\n\nexport interface GoSnippet {\n sdk: GoSdk;\n client: string;\n}\n\nexport interface RubySnippet {\n sdk: RubySdk;\n client: string;\n}\n\nexport interface CsharpSnippet {\n sdk: CsharpSdk;\n client: string;\n}\n\nexport interface JavaSnippet {\n sdk: JavaSdk;\n async_client: string;\n sync_client: string;\n}\n\n// ── Snippet discriminated union ───────────────────────────────────────\n\n// ── Snippet code types (used to deserialize snippet data from DB) ────\n\nexport interface TypeScriptSnippetCode {\n client: string;\n}\n\nexport interface PythonSnippetCode {\n async_client: string;\n sync_client: string;\n}\n\nexport interface GoSnippetCode {\n client: string;\n}\n\nexport interface RubySnippetCode {\n client: string;\n}\n\nexport interface JavaSnippetCode {\n async_client: string;\n sync_client: string;\n}\n\nexport interface CsharpSnippetCode {\n client: string;\n}\n\n// ── Sdk type (SdkRequest with required version) ─────────────────────\n\nexport const SdkSchema = z.discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"typescript\"), package: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"python\"), package: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"go\"), githubRepo: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"ruby\"), gem: z.string(), version: z.string() }),\n z.object({\n type: z.literal(\"java\"),\n group: z.string(),\n artifact: z.string(),\n version: z.string()\n }),\n z.object({ type: z.literal(\"csharp\"), package: z.string(), version: z.string() })\n]);\nexport type Sdk = z.infer<typeof SdkSchema>;\n\n// ── Template type (generic template placeholder) ────────────────────\nexport type Template = unknown;\n\nexport type Snippet = Snippet.Typescript | Snippet.Python | Snippet.Java | Snippet.Go | Snippet.Ruby | Snippet.Csharp;\n\nexport namespace Snippet {\n interface _Base {\n exampleIdentifier: string | undefined;\n }\n\n export interface Typescript extends TypeScriptSnippet, _Base {\n type: \"typescript\";\n }\n\n export interface Python extends PythonSnippet, _Base {\n type: \"python\";\n }\n\n export interface Java extends JavaSnippet, _Base {\n type: \"java\";\n }\n\n export interface Go extends GoSnippet, _Base {\n type: \"go\";\n }\n\n export interface Ruby extends RubySnippet, _Base {\n type: \"ruby\";\n }\n\n export interface Csharp extends CsharpSnippet, _Base {\n type: \"csharp\";\n }\n}\n","import type { EndpointPathPart } from \"../orpc-client/api/shared.js\";\nimport { EndpointPathLiteral } from \"../orpc-client/shared.js\";\n\n/**\n * Commonly used in Express.js and how we render paths in the UI.\n */\nexport function toColonEndpointPathLiteral(pathParts: EndpointPathPart[]): EndpointPathLiteral {\n return EndpointPathLiteral(\n pathParts.map((part) => (part.type === \"literal\" ? part.value : `:${part.value}`)).join(\"\")\n );\n}\n\n/**\n * Used in OpenAPI specification and Fern Definition. This is how we store EndpointPathLiteral in the snippet resolver.\n */\nexport function toCurlyBraceEndpointPathLiteral(pathParts: EndpointPathPart[]): EndpointPathLiteral {\n return EndpointPathLiteral(\n pathParts.map((part) => (part.type === \"literal\" ? part.value : `{${part.value}}`)).join(\"\")\n );\n}\n","import type { HttpMethod } from \"./latest\";\n\ntype StatusCodeMessagesByMethod = Partial<Record<HttpMethod, string>>;\n\ntype StatusCodeMessages = Record<number, StatusCodeMessagesByMethod>;\n\ntype DefaultStatusCodeMessages = Record<number, string>;\n\nexport const STATUS_CODE_MESSAGES: DefaultStatusCodeMessages = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 306: \"Switch Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n};\n\nexport const STATUS_CODE_MESSAGES_METHOD_OVERRIDES: StatusCodeMessages = {\n 200: {\n GET: \"Retrieved\",\n POST: \"Successful\", // more accurate than \"Created\" for POST\n PUT: \"Updated\",\n PATCH: \"Updated\",\n DELETE: \"Deleted\"\n }\n};\n\nexport function getMessageForStatus(statusCode: number, method?: HttpMethod): string {\n // return the method-specific message if it exists\n if (method != null) {\n const methodOverrides = STATUS_CODE_MESSAGES_METHOD_OVERRIDES[statusCode];\n if (methodOverrides != null) {\n const message = methodOverrides[method];\n if (message != null) {\n return message;\n }\n }\n }\n\n // return the official status message if it exists\n const message = STATUS_CODE_MESSAGES[statusCode];\n if (message != null) {\n return message;\n }\n\n // return the default message if it exists\n if (statusCode >= 100 && statusCode < 200) {\n return \"Informational\";\n } else if (statusCode >= 200 && statusCode < 300) {\n return \"Success\";\n } else if (statusCode >= 300 && statusCode < 400) {\n return \"Redirection\";\n } else if (statusCode >= 400 && statusCode < 500) {\n return \"Client Error\";\n } else if (statusCode >= 500 && statusCode < 600) {\n return \"Server Error\";\n } else {\n return \"Unknown Status\";\n }\n}\n","export function assertNever(x: never): never {\n throw new Error(\"Unexpected value: \" + JSON.stringify(x));\n}\n\nexport function assertNeverNoThrow(_: never): void {}\n\nexport default assertNever;\n","// https://github.com/lodash/lodash/blob/master/isPlainObject.js\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (!isObjectLike(value) || String(value) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(value) == null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) != null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\n\nfunction isObjectLike(value: unknown) {\n return typeof value === \"object\" && value != null;\n}\n\nexport default isPlainObject;\n","/**\n * validates and sanitizes a base URL.\n * returns null if the URL cannot be coerced into a valid URL.\n */\nexport function sanitizeUrl(url: string | undefined): string | undefined {\n if (!url) {\n return undefined;\n }\n\n // handle protocol-relative URLs (starting with //)\n if (url.startsWith(\"//\")) {\n try {\n const parsedUrl = new URL(`https:${url}`);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n }\n\n // handle URLs without protocol\n if (\n !url.startsWith(\"http://\") &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"wss://\") &&\n !url.startsWith(\"ws://\") &&\n !url.startsWith(\"mailto:\") &&\n !url.startsWith(\"tel:\")\n ) {\n try {\n const parsedUrl = new URL(`https://${url}`);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n }\n\n // validate complete URLs\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n}\n","interface Opts {\n renderNull?: boolean;\n}\n\nexport function unknownToString(value: unknown, { renderNull = false }: Opts = {}): string {\n if (value == null || typeof value === \"function\") {\n return renderNull ? \"null\" : \"\";\n } else if (typeof value === \"string\") {\n return value;\n }\n return JSON.stringify(value);\n}\n\nexport default unknownToString;\n","import { assertNever } from \"./assertNever\";\n\nexport type DiscriminatedUnionVisitor<T extends Record<Discriminant, string>, U, Discriminant extends string> = {\n [D in T[Discriminant]]: (value: Extract<T, Record<Discriminant, D>>) => U;\n} & {\n _other?: (value: Record<Discriminant, string>) => U;\n};\n\nexport function visitDiscriminatedUnion<T extends Record<\"type\", string>>(\n item: T\n): { _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, \"type\">) => U };\nexport function visitDiscriminatedUnion<T extends Record<Discriminant, string>, Discriminant extends string>(\n item: T,\n discriminant: Discriminant\n): { _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, Discriminant>) => U };\nexport function visitDiscriminatedUnion<T extends Record<Discriminant, string>, Discriminant extends string>(\n item: T,\n discriminant: Discriminant = \"type\" as Discriminant\n): {\n _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, Discriminant>) => U;\n} {\n return {\n _visit: (visitor) => {\n const visit = visitor[item[discriminant]];\n if (visit != null) {\n return visit(item as Extract<T, Record<Discriminant, string>>);\n } else {\n if (visitor._other == null) {\n assertNever(item as never);\n }\n return visitor._other(item);\n }\n }\n };\n}\n\nexport default visitDiscriminatedUnion;\n","import { isPlainObject } from \"@fern-api/ui-core-utils\";\nimport visitDiscriminatedUnion from \"@fern-api/ui-core-utils/visitDiscriminatedUnion\";\nimport { compact, sortBy } from \"es-toolkit/array\";\n\nimport { AvailabilityOrder, coalesceAvailability } from \"./availability\";\nimport { LOOP_TOLERANCE } from \"./const\";\nimport * as Latest from \"./latest\";\nimport type { DereferencedNonOptionalTypeShapeOrReference, TypeShapeOrReference } from \"./types\";\n\nexport type UnwrappedReference = {\n shape: DereferencedNonOptionalTypeShapeOrReference;\n availability: Latest.Availability | undefined;\n descriptions: string[];\n visitedTypeIds: Set<Latest.TypeId>;\n isOptional: boolean;\n isNullable: boolean;\n default?: unknown;\n};\n\nexport type UnwrappedObjectType = {\n properties: Latest.ObjectProperty[];\n extraProperties: Latest.TypeReference | null | undefined;\n descriptions: string[];\n visitedTypeIds: Set<Latest.TypeId>;\n};\n\ntype InternalDefaultValue =\n | { type: \"unknown\"; value: unknown }\n | { type: \"typeReferenceId\"; value: Latest.TypeReferenceIdDefault };\n\n/**\n * Cache for unwrapped references. Perform the unwrapping only once.\n */\nconst UnwrapReferenceCache = new WeakMap<TypeShapeOrReference, UnwrappedReference>();\n\n/**\n * A TypeShape or TypeReference might be an alias or reference to another type.\n * This function unwraps the reference, including any optional wrappers, to get the actual shape.\n *\n * When optionals are detected, attempt to find the default value for the shape.\n * Since aliases can be recursive, the first default value found is returned, which can be contained in:\n * - the optional wrapper\n * - the type reference id\n * - the primitive or literal shape itself\n *\n * @param typeRef to unwrap\n * @param types from the API definition\n * @returns UnwrappedReference containing the shape, whether it is optional, and the default value if it exists\n */\nexport function unwrapReference(\n typeRef: TypeShapeOrReference,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference;\nexport function unwrapReference(\n typeRef: TypeShapeOrReference | undefined,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference | undefined;\nexport function unwrapReference(\n typeRef: TypeShapeOrReference | undefined,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference | undefined {\n if (typeRef == null) {\n return undefined;\n }\n\n const cached = UnwrapReferenceCache.get(typeRef);\n if (cached != null) {\n return cached;\n }\n\n let isOptional = false;\n let isNullable = false;\n const defaults: InternalDefaultValue[] = [];\n const descriptions: string[] = [];\n const availabilities: Latest.Availability[] = [];\n\n const visitedTypeIds = new Set<Latest.TypeId>();\n let internalTypeRef: TypeShapeOrReference | undefined = typeRef;\n let loop = 0;\n let circularReference = false;\n while (internalTypeRef != null) {\n if (loop > LOOP_TOLERANCE) {\n // infinite loop detected\n internalTypeRef = undefined;\n break;\n }\n\n if (internalTypeRef.type === \"nullable\") {\n isNullable = true;\n internalTypeRef = internalTypeRef.shape;\n } else if (internalTypeRef.type === \"optional\") {\n isOptional = true;\n if (internalTypeRef.default != null) {\n defaults.push({\n type: \"unknown\",\n value: internalTypeRef.default\n });\n }\n internalTypeRef = internalTypeRef.shape;\n } else if (internalTypeRef.type === \"alias\") {\n internalTypeRef = internalTypeRef.value;\n } else if (internalTypeRef.type === \"id\") {\n if (visitedTypeIds.has(internalTypeRef.id)) {\n // circular reference detected\n internalTypeRef = undefined;\n circularReference = true;\n break;\n }\n\n if (internalTypeRef.default != null) {\n defaults.push({\n type: \"typeReferenceId\",\n value: internalTypeRef.default\n });\n }\n const typeDef: Latest.TypeDefinition | undefined = types[internalTypeRef.id];\n visitedTypeIds.add(internalTypeRef.id);\n internalTypeRef = typeDef?.shape;\n if (typeDef != null) {\n if (typeDef.availability) {\n availabilities.push(typeDef.availability);\n }\n\n if (typeDef.description != null) {\n descriptions.push(typeDef.description);\n }\n }\n } else {\n break;\n }\n\n loop++;\n }\n\n if (internalTypeRef == null) {\n // Note: this should be a fatal error, but we're handling it gracefully for now\n if (circularReference) {\n console.error(\n `Circular reference detected. Falling back to unknown type. types=[${[...visitedTypeIds].join(\", \")}]`\n );\n } else {\n console.error(\n `Type reference is invalid. Falling back to unknown type. types=[${[...visitedTypeIds].join(\", \")}]`\n );\n }\n }\n\n const toRet = {\n shape: internalTypeRef ?? { type: \"unknown\", displayName: undefined },\n availability: coalesceAvailability(availabilities),\n visitedTypeIds,\n isOptional,\n isNullable,\n default: selectDefaultValue(internalTypeRef, defaults),\n descriptions\n };\n\n UnwrapReferenceCache.set(typeRef, toRet);\n\n return toRet;\n}\n\nfunction selectDefaultValue(\n shape: DereferencedNonOptionalTypeShapeOrReference | undefined,\n defaults: InternalDefaultValue[]\n): unknown | undefined {\n const defaultValue = defaults.find((d) => {\n // If the shape is unknown, we can't validate the default value, so we assume it's always the first one\n if (shape == null) {\n return true;\n }\n\n // if a typeReferenceId is found, we need to validate that the default value is compatible with the shape\n else if (d.type === \"typeReferenceId\") {\n return visitDiscriminatedUnion(d.value)._visit({\n enum: () => shape?.type === \"enum\"\n });\n }\n\n // TODO: validate that the default value is compatible with the shape\n else {\n return true;\n }\n });\n\n if (defaultValue?.type === \"unknown\") {\n return defaultValue.value;\n } else if (defaultValue?.type === \"typeReferenceId\") {\n return defaultValue.value.value;\n } else if (shape?.type === \"primitive\") {\n return primitiveToDefault(shape.value);\n } else if (shape?.type === \"enum\") {\n return shape.default;\n } else {\n return undefined;\n }\n}\n\nconst UnwrapObjectTypeCache = new WeakMap<Latest.ObjectType, UnwrappedObjectType>();\n\n/**\n * Dereferences extended objects and returns all properties of the object.\n * If an object extends another object, the properties of the extended object will be sorted alphabetically.\n * Additionally, required properties will come before optional properties.\n *\n * @param object to dereference\n * @param types from the API definition\n * @returns the properties of the object, including properties from extended objects\n */\nexport function unwrapObjectType(\n object: Latest.ObjectType,\n types: Record<Latest.TypeId, Latest.TypeDefinition>,\n parentVisitedTypeIds?: Set<Latest.TypeId>\n): UnwrappedObjectType {\n const cached = UnwrapObjectTypeCache.get(object);\n if (cached != null) {\n return cached;\n }\n\n const directProperties = object.properties;\n const extraProperties = object.extraProperties;\n const descriptions: string[] = [];\n const visitedTypeIds = new Set<Latest.TypeId>();\n const extendedProperties = object.extends.flatMap((typeId): Latest.ObjectProperty[] => {\n if (parentVisitedTypeIds?.has(typeId)) {\n console.error(`Circular reference detected. Cannot extend type=${typeId}`);\n return [];\n }\n\n const typeDef = types[typeId];\n visitedTypeIds.add(typeId);\n if (typeDef?.description) {\n descriptions.push(typeDef.description);\n }\n\n const unwrapped = unwrapReference(typeDef?.shape, types);\n unwrapped?.descriptions.forEach((description) => descriptions.push(description));\n unwrapped?.visitedTypeIds.forEach((typeId) => visitedTypeIds.add(typeId));\n\n // TODO: should we be able to extend discriminated and undiscriminated unions?\n if (unwrapped?.shape.type !== \"object\") {\n console.warn(\"Object extends non-object\", typeId);\n return [];\n }\n const extended = unwrapObjectType(unwrapped.shape, types, visitedTypeIds);\n extended.visitedTypeIds.forEach((typeId) => visitedTypeIds.add(typeId));\n\n // merge the availability of the extended object with the availability of the properties\n // use a local variable to avoid mutating the cached result\n const extendedPropsWithAvailability = extended.properties.map((property) => {\n return {\n ...property,\n availability: coalesceAvailability(\n compact([typeDef?.availability, unwrapped.availability, property.availability])\n )\n };\n });\n\n descriptions.push(...extended.descriptions);\n\n if (!unwrapped.isOptional) {\n return extendedPropsWithAvailability;\n }\n\n // if the extended object is optional, we need to make all properties optional\n return extendedPropsWithAvailability.map((property): Latest.ObjectProperty => {\n // if a default value is present for the referenced object, we can find the default value for this property\n const defaultProperty = isPlainObject(unwrapped.default) ? unwrapped.default[property.key] : undefined;\n\n const valueShape: Latest.TypeReference.Optional =\n property.valueShape.type === \"alias\" && property.valueShape.value.type === \"optional\"\n ? {\n ...property.valueShape.value,\n default: defaultProperty ?? property.valueShape.value.default\n }\n : {\n type: \"optional\",\n shape: property.valueShape,\n default: defaultProperty\n };\n\n return {\n ...property,\n valueShape: { type: \"alias\", value: valueShape }\n };\n });\n });\n\n if (extendedProperties.length === 0) {\n // if there are no extended properties, we can just return the direct properties\n // required properties should come before optional properties\n // however, we do NOT sort the properties by key because the initial order of properties may be significant\n const properties = sortBy(\n [...directProperties],\n [\n (property) => unwrapReference(property.valueShape, types)?.isOptional,\n (property) => AvailabilityOrder.indexOf(property.availability ?? Latest.Availability.Stable)\n ]\n );\n const toRet = {\n properties,\n descriptions,\n extraProperties,\n visitedTypeIds\n };\n UnwrapObjectTypeCache.set(object, toRet);\n return toRet;\n }\n const propertyKeys = new Set(object.properties.map((property) => property.key));\n // deduplicate extended properties: remove those that conflict with direct properties,\n // and also remove duplicates between different extends chains (keep first occurrence)\n const seenExtendedKeys = new Set<string>();\n const filteredExtendedProperties = extendedProperties.filter((extendedProperty) => {\n if (propertyKeys.has(extendedProperty.key) || seenExtendedKeys.has(extendedProperty.key)) {\n return false;\n }\n seenExtendedKeys.add(extendedProperty.key);\n return true;\n });\n\n // required properties should come before optional properties\n // since there are extended properties, the initial order of properties are not significant, and we should sort by key\n const properties = sortBy(\n [...directProperties, ...filteredExtendedProperties],\n [\n (property) => unwrapReference(property.valueShape, types)?.isOptional,\n (property) => AvailabilityOrder.indexOf(property.availability ?? Latest.Availability.Stable),\n (property) => property.key\n ]\n );\n const toRet = { properties, descriptions, extraProperties, visitedTypeIds };\n UnwrapObjectTypeCache.set(object, toRet);\n return toRet;\n}\n\n/**\n * The discriminant of a discriminated union is converted to a literal type, *prepended* to the additional properties.\n */\nexport function unwrapDiscriminatedUnionVariant(\n union: Pick<Latest.DiscriminatedUnionType, \"discriminant\">,\n variant: Latest.DiscriminatedUnionVariant,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedObjectType {\n const { properties, descriptions, visitedTypeIds } = unwrapObjectType(variant, types); // this is already cached\n return {\n properties: [\n {\n key: union.discriminant,\n valueShape: {\n type: \"alias\",\n value: {\n type: \"literal\",\n value: {\n type: \"stringLiteral\",\n value: variant.discriminantValue\n }\n }\n },\n propertyAccess: undefined,\n // the description and availability of the discriminant should not be included here\n // because they are already included in the union variant itself\n description: undefined,\n availability: undefined\n },\n ...properties\n ],\n extraProperties: undefined,\n descriptions,\n visitedTypeIds\n };\n}\n\nfunction primitiveToDefault(shape: Latest.PrimitiveType): unknown | undefined {\n return visitDiscriminatedUnion(shape, \"type\")._visit<unknown | undefined>({\n string: (value) => value.default,\n integer: (value) => value.default,\n double: (value) => value.default,\n uint: () => undefined,\n uint64: () => undefined,\n boolean: (value) => value.default,\n long: (value) => value.default,\n datetime: (datetime) => datetime.default,\n uuid: (uuid) => uuid.default,\n base64: (base64) => base64.default,\n date: (value) => value.default,\n bigInteger: (value) => value.default,\n scalar: (value) => value.default\n });\n}\n","import * as Latest from \"./latest\";\n\n/**\n * The order of availability levels, from most stable to least stable.\n *\n * This is used to sort the availability levels in the UI, and to determine the stability level of a type reference when multiple are available.\n */\nexport const AvailabilityOrder = [\n Latest.Availability.Stable,\n Latest.Availability.GenerallyAvailable,\n Latest.Availability.Beta,\n Latest.Availability.Preview,\n Latest.Availability.PreRelease,\n Latest.Availability.Alpha,\n Latest.Availability.InDevelopment,\n Latest.Availability.Deprecated,\n Latest.Availability.Legacy\n] as const;\n\n/**\n * @param availabilities an array of availability levels\n * @returns the **least** stable availability level from the input array\n */\nexport function coalesceAvailability(\n availabilities: (Latest.Availability | null | undefined)[]\n): Latest.Availability | undefined {\n for (const availability of [...AvailabilityOrder].reverse()) {\n if (availabilities.includes(availability)) {\n return availability;\n }\n }\n return undefined;\n}\n\n// the following code is used to check that the contents of the AvailabilityOrder array contains all the values of the Availability enum\ntype AvailabilityValues = (typeof Latest.Availability)[keyof typeof Latest.Availability];\ntype CheckAvailabilityOrder<T extends readonly AvailabilityValues[]> = T[number] extends AvailabilityValues\n ? AvailabilityValues extends T[number]\n ? true\n : false\n : false;\ntype Assert<T extends true> = T;\nexport type CheckAssert = Assert<CheckAvailabilityOrder<typeof AvailabilityOrder>>;\n","/**\n * The maximum number of times to loop while unwrapping a type reference.\n * This may need to be increased if the API definition contains extremely deeply nested type references.\n */\nexport const LOOP_TOLERANCE = 100;\n\n/**\n * The maximum number of times to loop while expanding type IDs.\n * Since there can be many type ids to expand, this number is an order of magnitude larger than `LOOP_TOLERANCE`.\n */\nexport const LARGE_LOOP_TOLERANCE = 100 ** 2;\n","import { sanitizeUrl, unknownToString } from \"@fern-api/ui-core-utils\";\nimport qs from \"qs\";\n\nimport type { EndpointDefinition, ParameterProperty, PathPart } from \"./latest\";\n\n/**\n * Preprocesses query parameters based on explode metadata.\n * When explode=false, arrays are joined with commas instead of being repeated.\n */\nexport function preprocessQueryParameters(\n queryParameters: Record<string, unknown> | undefined,\n parameterMetadata: ParameterProperty[] | undefined\n): Record<string, unknown> | undefined {\n if (queryParameters == null) {\n return undefined;\n }\n\n // If no metadata, return as-is (default behavior is explode=true)\n if (parameterMetadata == null || parameterMetadata.length === 0) {\n return queryParameters;\n }\n\n // Create a map of parameter key to explode setting\n const explodeMap = new Map<string, boolean | undefined>();\n for (const param of parameterMetadata) {\n explodeMap.set(param.key, param.explode ?? undefined);\n }\n\n // Process each query parameter\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(queryParameters)) {\n const explode = explodeMap.get(key);\n\n // If explode is explicitly false and value is an array, join with commas\n if (explode === false && Array.isArray(value)) {\n result[key] = value.map((v) => unknownToString(v)).join(\",\");\n } else {\n result[key] = value;\n }\n }\n\n return result;\n}\n\nfunction buildQueryParams(queryParameters: Record<string, unknown> | undefined): string {\n if (queryParameters == null) {\n return \"\";\n }\n\n const filteredParams = Object.entries(queryParameters).reduce<Record<string, unknown>>((acc, [key, value]) => {\n if (value != null) {\n acc[key] = value;\n }\n return acc;\n }, {});\n\n if (Object.keys(filteredParams).length === 0) {\n return \"\";\n }\n\n const queryString = qs.stringify(filteredParams, {\n encode: false,\n arrayFormat: \"repeat\",\n skipNulls: true,\n serializeDate: (date: Date) => date.toISOString()\n });\n\n return queryString ? \"?\" + queryString : \"\";\n}\n\nfunction buildPath(path: PathPart[] = [], pathParameters?: Record<string, unknown>): string {\n return path\n .map((part) => {\n if (part.type === \"pathParameter\") {\n const key = part.value;\n const stateValue = unknownToString(pathParameters?.[key]);\n return stateValue.length > 0 ? encodeURIComponent(stateValue) : \":\" + key;\n }\n return part.value;\n })\n .join(\"\");\n}\n\ninterface BuildRequestUrlOptions {\n path?: PathPart[];\n pathParameters?: Record<string, unknown>;\n queryParameters?: Record<string, unknown>;\n baseUrl?: string;\n}\nexport function buildRequestUrl({\n baseUrl = \"\",\n path,\n pathParameters,\n queryParameters\n}: BuildRequestUrlOptions): string {\n const sanitizedBaseUrl = sanitizeUrl(baseUrl) || \"\";\n\n if (sanitizedBaseUrl.endsWith(\"/\")) {\n return sanitizedBaseUrl.slice(0, -1) + buildPath(path, pathParameters) + buildQueryParams(queryParameters);\n }\n return sanitizedBaseUrl + buildPath(path, pathParameters) + buildQueryParams(queryParameters);\n}\n\ninterface BuildEndpointUrlOptions {\n endpoint?: EndpointDefinition;\n pathParameters?: Record<string, unknown>;\n queryParameters?: Record<string, unknown>;\n baseUrl?: string;\n}\nexport function buildEndpointUrl({\n endpoint,\n pathParameters,\n queryParameters,\n baseUrl\n}: BuildEndpointUrlOptions): string {\n const environmentBaseUrl =\n baseUrl ??\n (endpoint?.environments?.find((env) => env.id === endpoint.defaultEnvironment) ?? endpoint?.environments?.[0])\n ?.baseUrl;\n\n // sanitize the base URL - if invalid, it will be null\n const sanitizedBaseUrl = sanitizeUrl(environmentBaseUrl);\n\n // Preprocess query parameters based on explode metadata\n const processedQueryParameters = preprocessQueryParameters(queryParameters, endpoint?.queryParameters ?? undefined);\n\n return buildRequestUrl({\n baseUrl: sanitizedBaseUrl || \"\",\n path: endpoint?.path,\n pathParameters,\n queryParameters: processedQueryParameters\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAA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kB,KAAK,UAAU,eAAe,CAAC,IACtG;AAGV,QAAM,mBAAmB,YAAY,kBAAkB;AAGvD,QAAM,2BAA2B,0BAA0B,iBAAiB,UAAU,mBAAmB,MAAS;AAElH,SAAO,gBAAgB;AAAA,IACnB,SAAS,oBAAoB;AAAA,IAC7B,MAAM,UAAU;AAAA,IAChB;AAAA,IACA,iBAAiB;AAAA,EACrB,CAAC;AACL;","names":["message","object","typeId","properties","toRet","qs"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/api-definition-lite/index.ts","../../../src/orpc-client/shared.ts","../../../src/api-definition/endpoint-path-literal.ts","../../../src/api-definition/status-message.ts","../../../../commons/core-utils/src/assertNever.ts","../../../../commons/core-utils/src/objects/isPlainObject.ts","../../../../commons/core-utils/src/sanitizeUrl.ts","../../../../commons/core-utils/src/unknownToString.ts","../../../../commons/core-utils/src/visitDiscriminatedUnion.ts","../../../src/api-definition/unwrap.ts","../../../src/api-definition/availability.ts","../../../src/api-definition/const.ts","../../../src/api-definition/url.ts"],"sourcesContent":["/**\n * Lightweight entry point for client-side API reference rendering.\n *\n * Re-exports only the functions and types needed by \"use client\" components\n * that render endpoint pages (type definitions, URL building, status messages).\n * Excludes heavy server-only modules: transformer, v1ToV2 migrator, snippet\n * generators, type-tree collectors, etc.\n */\n\n// ── Context types (type-only, no runtime) ──\nexport type {\n EndpointContext,\n GrpcContext,\n WebhookContext,\n WebSocketContext\n} from \"../api-definition/endpoint-context\";\n// ── Endpoint path literal ──\nexport { toColonEndpointPathLiteral, toCurlyBraceEndpointPathLiteral } from \"../api-definition/endpoint-path-literal\";\n// ── Types from latest (zero runtime cost) ──\nexport type {\n ApiDefinition,\n AuthScheme,\n Availability,\n DiscriminatedUnionType,\n DiscriminatedUnionVariant,\n EndpointDefinition,\n EnumType,\n EnumValue,\n ErrorResponse,\n ExampleEndpointCall,\n ExampleEndpointRequest,\n ExampleEndpointResponse,\n ExampleWebSocketSession,\n FormDataField,\n GraphQlArgument,\n GraphQlOperation,\n HttpMethod,\n HttpRequest,\n HttpRequestBodyShape,\n HttpResponse,\n HttpResponseBodyShape,\n ObjectProperty,\n ObjectPropertyAccess,\n ObjectType,\n ParameterProperty,\n PathPart,\n PrimitiveType,\n Protocol,\n SubpackageMetadata,\n TypeDefinition,\n TypeId,\n TypeReference,\n TypeShape,\n UndiscriminatedUnionType,\n UndiscriminatedUnionVariant,\n WebhookDefinition,\n WebhookPayload,\n WebhookPayloadShape,\n WebSocketChannel,\n WebSocketMessage\n} from \"../api-definition/latest\";\n// ── Status code messages ──\nexport { getMessageForStatus, STATUS_CODE_MESSAGES } from \"../api-definition/status-message\";\n// ── Additional types ──\nexport type { DereferencedNonOptionalTypeShapeOrReference, TypeShapeOrReference } from \"../api-definition/types\";\n// ── Type unwrapping ──\nexport {\n type UnwrappedObjectType,\n type UnwrappedReference,\n unwrapDiscriminatedUnionVariant,\n unwrapObjectType,\n unwrapReference\n} from \"../api-definition/unwrap\";\n// ── URL building ──\nexport { buildEndpointUrl, buildRequestUrl, preprocessQueryParameters } from \"../api-definition/url\";\n\n// ── Branded ID types (type-only, no runtime) ──\nexport type { AuthSchemeId, EndpointId, EnvironmentId, PropertyKey } from \"../orpc-client/api/shared.js\";\n","import * as z from \"zod\";\n\n// ── Org / API identifiers ──────────────────────────────────────────────\n\nexport const OrgIdSchema = z.string();\nexport type OrgId = z.infer<typeof OrgIdSchema>;\nexport function OrgId(value: string): OrgId {\n return value;\n}\n\nexport const ApiIdSchema = z.string();\nexport type ApiId = z.infer<typeof ApiIdSchema>;\nexport function ApiId(value: string): ApiId {\n return value;\n}\n\nexport const ApiDefinitionIdSchema = z.string().uuid();\nexport type ApiDefinitionId = z.infer<typeof ApiDefinitionIdSchema>;\nexport function ApiDefinitionId(value: string): ApiDefinitionId {\n return value;\n}\n\n// ── HTTP / Endpoint schemas ─────────────────────────────────────────────\n\nexport const HttpMethodSchema = z.enum([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\"]);\nexport type HttpMethod = z.infer<typeof HttpMethodSchema>;\n\nexport const HttpMethod = {\n Get: \"GET\",\n Post: \"POST\",\n Put: \"PUT\",\n Patch: \"PATCH\",\n Delete: \"DELETE\",\n Head: \"HEAD\"\n} as const;\n\nexport const UrlSchema: z.ZodType<Url> = z.string() as any;\nexport type Url = string & { Url: void };\nexport function Url(value: string): Url {\n return value as unknown as Url;\n}\n\nexport const EndpointPathLiteralSchema = z.string();\nexport type EndpointPathLiteral = z.infer<typeof EndpointPathLiteralSchema>;\nexport function EndpointPathLiteral(value: string): EndpointPathLiteral {\n return value;\n}\n\nexport const EndpointIdentifierSchema = z.object({\n path: z.string(),\n method: HttpMethodSchema,\n identifierOverride: z.string().nullish()\n});\nexport type EndpointIdentifier = z.infer<typeof EndpointIdentifierSchema>;\n\n// ── SDK request schema ──────────────────────────────────────────────────\n\nexport type SdkRequest =\n | { type: \"typescript\"; package: string; version: string | undefined }\n | { type: \"python\"; package: string; version: string | undefined }\n | { type: \"go\"; githubRepo: string; version: string | undefined }\n | { type: \"ruby\"; gem: string; version: string | undefined }\n | { type: \"java\"; group: string; artifact: string; version: string | undefined }\n | { type: \"csharp\"; package: string; version: string | undefined };\n\nexport const SdkRequestSchema: z.ZodType<SdkRequest> = z.discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"typescript\"), package: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"python\"), package: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"go\"), githubRepo: z.string(), version: z.string().nullish() }),\n z.object({ type: z.literal(\"ruby\"), gem: z.string(), version: z.string().nullish() }),\n z.object({\n type: z.literal(\"java\"),\n group: z.string(),\n artifact: z.string(),\n version: z.string().nullish()\n }),\n z.object({ type: z.literal(\"csharp\"), package: z.string(), version: z.string().nullish() })\n]) as any;\n\n// ── Additional identifiers ─────────────────────────────────────────────\n\nexport const DocsConfigIdSchema = z.string();\nexport type DocsConfigId = z.infer<typeof DocsConfigIdSchema>;\nexport function DocsConfigId(value: string): DocsConfigId {\n return value;\n}\n\nexport const GrpcIdSchema = z.string();\nexport type GrpcId = z.infer<typeof GrpcIdSchema>;\nexport function GrpcId(value: string): GrpcId {\n return value;\n}\n\nexport const PageIdSchema = z.string();\nexport type PageId = z.infer<typeof PageIdSchema>;\nexport function PageId(value: string): PageId {\n return value;\n}\n\nexport const RoleIdSchema = z.string();\nexport type RoleId = z.infer<typeof RoleIdSchema>;\nexport function RoleId(value: string): RoleId {\n return value;\n}\n\nexport const TokenIdSchema = z.string();\nexport type TokenId = z.infer<typeof TokenIdSchema>;\n\nexport const VersionIdSchema = z.string();\nexport type VersionId = z.infer<typeof VersionIdSchema>;\nexport function VersionId(value: string): VersionId {\n return value;\n}\n\n// ── Enums ──────────────────────────────────────────────────────────────\n\nexport const LinkTarget = {\n Blank: \"_blank\",\n Self: \"_self\",\n Parent: \"_parent\",\n Top: \"_top\"\n} as const;\nexport type LinkTarget = (typeof LinkTarget)[keyof typeof LinkTarget];\n\nexport const GrpcMethod = {\n Unary: \"UNARY\",\n ClientStream: \"CLIENT_STREAM\",\n ServerStream: \"SERVER_STREAM\",\n BidirectionalStream: \"BIDIRECTIONAL_STREAM\"\n} as const;\nexport type GrpcMethod = (typeof GrpcMethod)[keyof typeof GrpcMethod];\n\nexport const Availability = {\n Alpha: \"Alpha\",\n Stable: \"Stable\",\n GenerallyAvailable: \"GenerallyAvailable\",\n InDevelopment: \"InDevelopment\",\n PreRelease: \"PreRelease\",\n Deprecated: \"Deprecated\",\n Beta: \"Beta\",\n Preview: \"Preview\",\n Legacy: \"Legacy\"\n} as const;\nexport type Availability = (typeof Availability)[keyof typeof Availability];\n\nexport const SupportedLanguage = {\n Curl: \"curl\",\n Python: \"python\",\n Javascript: \"javascript\",\n Js: \"js\",\n Node: \"node\",\n Typescript: \"typescript\",\n Ts: \"ts\",\n Go: \"go\",\n Ruby: \"ruby\",\n Csharp: \"csharp\",\n Php: \"php\",\n Swift: \"swift\",\n Rust: \"rust\"\n} as const;\nexport type SupportedLanguage = (typeof SupportedLanguage)[keyof typeof SupportedLanguage];\n\nexport const HttpSnippetLanguage = {\n Curl: \"curl\",\n Csharp: \"csharp\",\n Go: \"go\",\n Java: \"java\",\n Javascript: \"javascript\",\n Php: \"php\",\n Python: \"python\",\n Ruby: \"ruby\",\n Swift: \"swift\",\n Rust: \"rust\",\n Typescript: \"typescript\"\n} as const;\nexport type HttpSnippetLanguage = (typeof HttpSnippetLanguage)[keyof typeof HttpSnippetLanguage];\n\n// ── Error types ────────────────────────────────────────────────────────\n\nexport interface InvalidDomainErrorBody {\n /** Value the domain should end with (i.e. docs.buildwithfern.com or dev.docs.buildwithfern.com) */\n requiredDomainSuffix: string;\n}\n\n// ── Docs types ─────────────────────────────────────────────────────────\n\nexport interface AnnouncementConfig {\n /** The text to display in the banner, using markdown. */\n text: string;\n}\n\n// ── Snippet types ──────────────────────────────────────────────────────\n\nexport type SnippetsByEndpointMethod = Partial<Record<HttpMethod, Snippet[]>>;\n\nexport const SnippetsByEndpointMethodSchema: z.ZodType<SnippetsByEndpointMethod> = z.record(\n HttpMethodSchema,\n z.array(z.unknown())\n) as any;\n\n// ── SDK types for snippets ────────────────────────────────────────────\n\nexport interface TypeScriptSdk {\n package: string;\n version: string;\n}\n\nexport interface PythonSdk {\n package: string;\n version: string;\n}\n\nexport interface GoSdk {\n githubRepo: string;\n version: string;\n}\n\nexport interface RubySdk {\n gem: string;\n version: string;\n}\n\nexport interface CsharpSdk {\n package: string;\n version: string;\n}\n\nexport interface JavaSdk {\n group: string;\n artifact: string;\n version: string;\n}\n\nexport interface TypeScriptSnippet {\n sdk: TypeScriptSdk;\n client: string;\n}\n\nexport interface PythonSnippet {\n sdk: PythonSdk;\n async_client: string;\n sync_client: string;\n}\n\nexport interface GoSnippet {\n sdk: GoSdk;\n client: string;\n}\n\nexport interface RubySnippet {\n sdk: RubySdk;\n client: string;\n}\n\nexport interface CsharpSnippet {\n sdk: CsharpSdk;\n client: string;\n}\n\nexport interface JavaSnippet {\n sdk: JavaSdk;\n async_client: string;\n sync_client: string;\n}\n\n// ── Snippet discriminated union ───────────────────────────────────────\n\n// ── Snippet code types (used to deserialize snippet data from DB) ────\n\nexport interface TypeScriptSnippetCode {\n client: string;\n}\n\nexport interface PythonSnippetCode {\n async_client: string;\n sync_client: string;\n}\n\nexport interface GoSnippetCode {\n client: string;\n}\n\nexport interface RubySnippetCode {\n client: string;\n}\n\nexport interface JavaSnippetCode {\n async_client: string;\n sync_client: string;\n}\n\nexport interface CsharpSnippetCode {\n client: string;\n}\n\n// ── Sdk type (SdkRequest with required version) ─────────────────────\n\nexport const SdkSchema = z.discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"typescript\"), package: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"python\"), package: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"go\"), githubRepo: z.string(), version: z.string() }),\n z.object({ type: z.literal(\"ruby\"), gem: z.string(), version: z.string() }),\n z.object({\n type: z.literal(\"java\"),\n group: z.string(),\n artifact: z.string(),\n version: z.string()\n }),\n z.object({ type: z.literal(\"csharp\"), package: z.string(), version: z.string() })\n]);\nexport type Sdk = z.infer<typeof SdkSchema>;\n\n// ── Template type (generic template placeholder) ────────────────────\nexport type Template = unknown;\n\nexport type Snippet = Snippet.Typescript | Snippet.Python | Snippet.Java | Snippet.Go | Snippet.Ruby | Snippet.Csharp;\n\nexport namespace Snippet {\n interface _Base {\n exampleIdentifier: string | undefined;\n }\n\n export interface Typescript extends TypeScriptSnippet, _Base {\n type: \"typescript\";\n }\n\n export interface Python extends PythonSnippet, _Base {\n type: \"python\";\n }\n\n export interface Java extends JavaSnippet, _Base {\n type: \"java\";\n }\n\n export interface Go extends GoSnippet, _Base {\n type: \"go\";\n }\n\n export interface Ruby extends RubySnippet, _Base {\n type: \"ruby\";\n }\n\n export interface Csharp extends CsharpSnippet, _Base {\n type: \"csharp\";\n }\n}\n","import type { EndpointPathPart } from \"../orpc-client/api/shared.js\";\nimport { EndpointPathLiteral } from \"../orpc-client/shared.js\";\n\n/**\n * Commonly used in Express.js and how we render paths in the UI.\n */\nexport function toColonEndpointPathLiteral(pathParts: EndpointPathPart[]): EndpointPathLiteral {\n return EndpointPathLiteral(\n pathParts.map((part) => (part.type === \"literal\" ? part.value : `:${part.value}`)).join(\"\")\n );\n}\n\n/**\n * Used in OpenAPI specification and Fern Definition. This is how we store EndpointPathLiteral in the snippet resolver.\n */\nexport function toCurlyBraceEndpointPathLiteral(pathParts: EndpointPathPart[]): EndpointPathLiteral {\n return EndpointPathLiteral(\n pathParts.map((part) => (part.type === \"literal\" ? part.value : `{${part.value}}`)).join(\"\")\n );\n}\n","import type { HttpMethod } from \"./latest\";\n\ntype StatusCodeMessagesByMethod = Partial<Record<HttpMethod, string>>;\n\ntype StatusCodeMessages = Record<number, StatusCodeMessagesByMethod>;\n\ntype DefaultStatusCodeMessages = Record<number, string>;\n\nexport const STATUS_CODE_MESSAGES: DefaultStatusCodeMessages = {\n 100: \"Continue\",\n 101: \"Switching Protocols\",\n 102: \"Processing\",\n 103: \"Early Hints\",\n 200: \"OK\",\n 201: \"Created\",\n 202: \"Accepted\",\n 203: \"Non-Authoritative Information\",\n 204: \"No Content\",\n 205: \"Reset Content\",\n 206: \"Partial Content\",\n 207: \"Multi-Status\",\n 208: \"Already Reported\",\n 226: \"IM Used\",\n 300: \"Multiple Choices\",\n 301: \"Moved Permanently\",\n 302: \"Found\",\n 303: \"See Other\",\n 304: \"Not Modified\",\n 305: \"Use Proxy\",\n 306: \"Switch Proxy\",\n 307: \"Temporary Redirect\",\n 308: \"Permanent Redirect\",\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 402: \"Payment Required\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 405: \"Method Not Allowed\",\n 406: \"Not Acceptable\",\n 407: \"Proxy Authentication Required\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 411: \"Length Required\",\n 412: \"Precondition Failed\",\n 413: \"Payload Too Large\",\n 414: \"URI Too Long\",\n 415: \"Unsupported Media Type\",\n 416: \"Range Not Satisfiable\",\n 417: \"Expectation Failed\",\n 418: \"I'm a teapot\",\n 421: \"Misdirected Request\",\n 422: \"Unprocessable Entity\",\n 423: \"Locked\",\n 424: \"Failed Dependency\",\n 425: \"Too Early\",\n 426: \"Upgrade Required\",\n 428: \"Precondition Required\",\n 429: \"Too Many Requests\",\n 431: \"Request Header Fields Too Large\",\n 451: \"Unavailable For Legal Reasons\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n 505: \"HTTP Version Not Supported\",\n 506: \"Variant Also Negotiates\",\n 507: \"Insufficient Storage\",\n 508: \"Loop Detected\",\n 510: \"Not Extended\",\n 511: \"Network Authentication Required\"\n};\n\nexport const STATUS_CODE_MESSAGES_METHOD_OVERRIDES: StatusCodeMessages = {\n 200: {\n GET: \"Retrieved\",\n POST: \"Successful\", // more accurate than \"Created\" for POST\n PUT: \"Updated\",\n PATCH: \"Updated\",\n DELETE: \"Deleted\"\n }\n};\n\nexport function getMessageForStatus(statusCode: number, method?: HttpMethod): string {\n // return the method-specific message if it exists\n if (method != null) {\n const methodOverrides = STATUS_CODE_MESSAGES_METHOD_OVERRIDES[statusCode];\n if (methodOverrides != null) {\n const message = methodOverrides[method];\n if (message != null) {\n return message;\n }\n }\n }\n\n // return the official status message if it exists\n const message = STATUS_CODE_MESSAGES[statusCode];\n if (message != null) {\n return message;\n }\n\n // return the default message if it exists\n if (statusCode >= 100 && statusCode < 200) {\n return \"Informational\";\n } else if (statusCode >= 200 && statusCode < 300) {\n return \"Success\";\n } else if (statusCode >= 300 && statusCode < 400) {\n return \"Redirection\";\n } else if (statusCode >= 400 && statusCode < 500) {\n return \"Client Error\";\n } else if (statusCode >= 500 && statusCode < 600) {\n return \"Server Error\";\n } else {\n return \"Unknown Status\";\n }\n}\n","export function assertNever(x: never): never {\n throw new Error(\"Unexpected value: \" + JSON.stringify(x));\n}\n\nexport function assertNeverNoThrow(_: never): void {}\n\nexport default assertNever;\n","// https://github.com/lodash/lodash/blob/master/isPlainObject.js\nexport function isPlainObject(value: unknown): value is Record<string, unknown> {\n if (!isObjectLike(value) || String(value) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(value) == null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) != null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\n\nfunction isObjectLike(value: unknown) {\n return typeof value === \"object\" && value != null;\n}\n\nexport default isPlainObject;\n","/**\n * validates and sanitizes a base URL.\n * returns null if the URL cannot be coerced into a valid URL.\n */\nexport function sanitizeUrl(url: string | undefined): string | undefined {\n if (!url) {\n return undefined;\n }\n\n // handle protocol-relative URLs (starting with //)\n if (url.startsWith(\"//\")) {\n try {\n const parsedUrl = new URL(`https:${url}`);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n }\n\n // handle URLs without protocol\n if (\n !url.startsWith(\"http://\") &&\n !url.startsWith(\"https://\") &&\n !url.startsWith(\"wss://\") &&\n !url.startsWith(\"ws://\") &&\n !url.startsWith(\"mailto:\") &&\n !url.startsWith(\"tel:\")\n ) {\n try {\n const parsedUrl = new URL(`https://${url}`);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n }\n\n // validate complete URLs\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.toString();\n } catch {\n return undefined;\n }\n}\n","interface Opts {\n renderNull?: boolean;\n}\n\nexport function unknownToString(value: unknown, { renderNull = false }: Opts = {}): string {\n if (value == null || typeof value === \"function\") {\n return renderNull ? \"null\" : \"\";\n } else if (typeof value === \"string\") {\n return value;\n }\n return JSON.stringify(value);\n}\n\nexport default unknownToString;\n","import { assertNever } from \"./assertNever\";\n\nexport type DiscriminatedUnionVisitor<T extends Record<Discriminant, string>, U, Discriminant extends string> = {\n [D in T[Discriminant]]: (value: Extract<T, Record<Discriminant, D>>) => U;\n} & {\n _other?: (value: Record<Discriminant, string>) => U;\n};\n\nexport function visitDiscriminatedUnion<T extends Record<\"type\", string>>(\n item: T\n): { _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, \"type\">) => U };\nexport function visitDiscriminatedUnion<T extends Record<Discriminant, string>, Discriminant extends string>(\n item: T,\n discriminant: Discriminant\n): { _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, Discriminant>) => U };\nexport function visitDiscriminatedUnion<T extends Record<Discriminant, string>, Discriminant extends string>(\n item: T,\n discriminant: Discriminant = \"type\" as Discriminant\n): {\n _visit: <U>(visitor: DiscriminatedUnionVisitor<T, U, Discriminant>) => U;\n} {\n return {\n _visit: (visitor) => {\n const visit = visitor[item[discriminant]];\n if (visit != null) {\n return visit(item as Extract<T, Record<Discriminant, string>>);\n } else {\n if (visitor._other == null) {\n assertNever(item as never);\n }\n return visitor._other(item);\n }\n }\n };\n}\n\nexport default visitDiscriminatedUnion;\n","import { isPlainObject } from \"@fern-api/ui-core-utils\";\nimport visitDiscriminatedUnion from \"@fern-api/ui-core-utils/visitDiscriminatedUnion\";\nimport { compact, sortBy } from \"es-toolkit/array\";\n\nimport { AvailabilityOrder, coalesceAvailability } from \"./availability\";\nimport { LOOP_TOLERANCE } from \"./const\";\nimport * as Latest from \"./latest\";\nimport type { DereferencedNonOptionalTypeShapeOrReference, TypeShapeOrReference } from \"./types\";\n\nexport type UnwrappedReference = {\n shape: DereferencedNonOptionalTypeShapeOrReference;\n availability: Latest.Availability | undefined;\n descriptions: string[];\n visitedTypeIds: Set<Latest.TypeId>;\n isOptional: boolean;\n isNullable: boolean;\n default?: unknown;\n};\n\nexport type UnwrappedObjectType = {\n properties: Latest.ObjectProperty[];\n extraProperties: Latest.TypeReference | null | undefined;\n descriptions: string[];\n visitedTypeIds: Set<Latest.TypeId>;\n};\n\ntype InternalDefaultValue =\n | { type: \"unknown\"; value: unknown }\n | { type: \"typeReferenceId\"; value: Latest.TypeReferenceIdDefault };\n\n/**\n * Cache for unwrapped references. Perform the unwrapping only once.\n */\nconst UnwrapReferenceCache = new WeakMap<TypeShapeOrReference, UnwrappedReference>();\n\n/**\n * A TypeShape or TypeReference might be an alias or reference to another type.\n * This function unwraps the reference, including any optional wrappers, to get the actual shape.\n *\n * When optionals are detected, attempt to find the default value for the shape.\n * Since aliases can be recursive, the first default value found is returned, which can be contained in:\n * - the optional wrapper\n * - the type reference id\n * - the primitive or literal shape itself\n *\n * @param typeRef to unwrap\n * @param types from the API definition\n * @returns UnwrappedReference containing the shape, whether it is optional, and the default value if it exists\n */\nexport function unwrapReference(\n typeRef: TypeShapeOrReference,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference;\nexport function unwrapReference(\n typeRef: TypeShapeOrReference | undefined,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference | undefined;\nexport function unwrapReference(\n typeRef: TypeShapeOrReference | undefined,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedReference | undefined {\n if (typeRef == null) {\n return undefined;\n }\n\n const cached = UnwrapReferenceCache.get(typeRef);\n if (cached != null) {\n return cached;\n }\n\n let isOptional = false;\n let isNullable = false;\n const defaults: InternalDefaultValue[] = [];\n const descriptions: string[] = [];\n const availabilities: Latest.Availability[] = [];\n\n const visitedTypeIds = new Set<Latest.TypeId>();\n let internalTypeRef: TypeShapeOrReference | undefined = typeRef;\n let loop = 0;\n let circularReference = false;\n while (internalTypeRef != null) {\n if (loop > LOOP_TOLERANCE) {\n // infinite loop detected\n internalTypeRef = undefined;\n break;\n }\n\n if (internalTypeRef.type === \"nullable\") {\n isNullable = true;\n internalTypeRef = internalTypeRef.shape;\n } else if (internalTypeRef.type === \"optional\") {\n isOptional = true;\n if (internalTypeRef.default != null) {\n defaults.push({\n type: \"unknown\",\n value: internalTypeRef.default\n });\n }\n internalTypeRef = internalTypeRef.shape;\n } else if (internalTypeRef.type === \"alias\") {\n internalTypeRef = internalTypeRef.value;\n } else if (internalTypeRef.type === \"id\") {\n if (visitedTypeIds.has(internalTypeRef.id)) {\n // circular reference detected\n internalTypeRef = undefined;\n circularReference = true;\n break;\n }\n\n if (internalTypeRef.default != null) {\n defaults.push({\n type: \"typeReferenceId\",\n value: internalTypeRef.default\n });\n }\n const typeDef: Latest.TypeDefinition | undefined = types[internalTypeRef.id];\n visitedTypeIds.add(internalTypeRef.id);\n internalTypeRef = typeDef?.shape;\n if (typeDef != null) {\n if (typeDef.availability) {\n availabilities.push(typeDef.availability);\n }\n\n if (typeDef.description != null) {\n descriptions.push(typeDef.description);\n }\n }\n } else {\n break;\n }\n\n loop++;\n }\n\n if (internalTypeRef == null) {\n // Note: this should be a fatal error, but we're handling it gracefully for now\n if (circularReference) {\n console.error(\n `Circular reference detected. Falling back to unknown type. types=[${[...visitedTypeIds].join(\", \")}]`\n );\n } else {\n console.error(\n `Type reference is invalid. Falling back to unknown type. types=[${[...visitedTypeIds].join(\", \")}]`\n );\n }\n }\n\n const toRet = {\n shape: internalTypeRef ?? { type: \"unknown\", displayName: undefined },\n availability: coalesceAvailability(availabilities),\n visitedTypeIds,\n isOptional,\n isNullable,\n default: selectDefaultValue(internalTypeRef, defaults),\n descriptions\n };\n\n UnwrapReferenceCache.set(typeRef, toRet);\n\n return toRet;\n}\n\nfunction selectDefaultValue(\n shape: DereferencedNonOptionalTypeShapeOrReference | undefined,\n defaults: InternalDefaultValue[]\n): unknown | undefined {\n const defaultValue = defaults.find((d) => {\n // If the shape is unknown, we can't validate the default value, so we assume it's always the first one\n if (shape == null) {\n return true;\n }\n\n // if a typeReferenceId is found, we need to validate that the default value is compatible with the shape\n else if (d.type === \"typeReferenceId\") {\n return visitDiscriminatedUnion(d.value)._visit({\n enum: () => shape?.type === \"enum\"\n });\n }\n\n // TODO: validate that the default value is compatible with the shape\n else {\n return true;\n }\n });\n\n if (defaultValue?.type === \"unknown\") {\n return defaultValue.value;\n } else if (defaultValue?.type === \"typeReferenceId\") {\n return defaultValue.value.value;\n } else if (shape?.type === \"primitive\") {\n return primitiveToDefault(shape.value);\n } else if (shape?.type === \"enum\") {\n return shape.default;\n } else {\n return undefined;\n }\n}\n\nconst UnwrapObjectTypeCache = new WeakMap<Latest.ObjectType, UnwrappedObjectType>();\n\n/**\n * Dereferences extended objects and returns all properties of the object.\n * If an object extends another object, the properties of the extended object will be sorted alphabetically.\n * Additionally, required properties will come before optional properties.\n *\n * @param object to dereference\n * @param types from the API definition\n * @returns the properties of the object, including properties from extended objects\n */\nexport function unwrapObjectType(\n object: Latest.ObjectType,\n types: Record<Latest.TypeId, Latest.TypeDefinition>,\n parentVisitedTypeIds?: Set<Latest.TypeId>\n): UnwrappedObjectType {\n const cached = UnwrapObjectTypeCache.get(object);\n if (cached != null) {\n return cached;\n }\n\n const directProperties = object.properties;\n const extraProperties = object.extraProperties;\n const descriptions: string[] = [];\n const visitedTypeIds = new Set<Latest.TypeId>();\n const extendedProperties = object.extends.flatMap((typeId): Latest.ObjectProperty[] => {\n if (parentVisitedTypeIds?.has(typeId)) {\n console.error(`Circular reference detected. Cannot extend type=${typeId}`);\n return [];\n }\n\n const typeDef = types[typeId];\n visitedTypeIds.add(typeId);\n if (typeDef?.description) {\n descriptions.push(typeDef.description);\n }\n\n const unwrapped = unwrapReference(typeDef?.shape, types);\n unwrapped?.descriptions.forEach((description) => descriptions.push(description));\n unwrapped?.visitedTypeIds.forEach((typeId) => visitedTypeIds.add(typeId));\n\n // TODO: should we be able to extend discriminated and undiscriminated unions?\n if (unwrapped?.shape.type !== \"object\") {\n console.warn(\"Object extends non-object\", typeId);\n return [];\n }\n const extended = unwrapObjectType(unwrapped.shape, types, visitedTypeIds);\n extended.visitedTypeIds.forEach((typeId) => visitedTypeIds.add(typeId));\n\n // merge the availability of the extended object with the availability of the properties\n // use a local variable to avoid mutating the cached result\n const extendedPropsWithAvailability = extended.properties.map((property) => {\n return {\n ...property,\n availability: coalesceAvailability(\n compact([typeDef?.availability, unwrapped.availability, property.availability])\n )\n };\n });\n\n descriptions.push(...extended.descriptions);\n\n if (!unwrapped.isOptional) {\n return extendedPropsWithAvailability;\n }\n\n // if the extended object is optional, we need to make all properties optional\n return extendedPropsWithAvailability.map((property): Latest.ObjectProperty => {\n // if a default value is present for the referenced object, we can find the default value for this property\n const defaultProperty = isPlainObject(unwrapped.default) ? unwrapped.default[property.key] : undefined;\n\n const valueShape: Latest.TypeReference.Optional =\n property.valueShape.type === \"alias\" && property.valueShape.value.type === \"optional\"\n ? {\n ...property.valueShape.value,\n default: defaultProperty ?? property.valueShape.value.default\n }\n : {\n type: \"optional\",\n shape: property.valueShape,\n default: defaultProperty\n };\n\n return {\n ...property,\n valueShape: { type: \"alias\", value: valueShape }\n };\n });\n });\n\n if (extendedProperties.length === 0) {\n // if there are no extended properties, we can just return the direct properties\n // required properties should come before optional properties\n // however, we do NOT sort the properties by key because the initial order of properties may be significant\n const properties = sortBy(\n [...directProperties],\n [\n (property) => unwrapReference(property.valueShape, types)?.isOptional,\n (property) => AvailabilityOrder.indexOf(property.availability ?? Latest.Availability.Stable)\n ]\n );\n const toRet = {\n properties,\n descriptions,\n extraProperties,\n visitedTypeIds\n };\n UnwrapObjectTypeCache.set(object, toRet);\n return toRet;\n }\n const propertyKeys = new Set(object.properties.map((property) => property.key));\n // deduplicate extended properties: remove those that conflict with direct properties,\n // and also remove duplicates between different extends chains (keep first occurrence)\n const seenExtendedKeys = new Set<string>();\n const filteredExtendedProperties = extendedProperties.filter((extendedProperty) => {\n if (propertyKeys.has(extendedProperty.key) || seenExtendedKeys.has(extendedProperty.key)) {\n return false;\n }\n seenExtendedKeys.add(extendedProperty.key);\n return true;\n });\n\n // required properties should come before optional properties\n // since there are extended properties, the initial order of properties are not significant, and we should sort by key\n const properties = sortBy(\n [...directProperties, ...filteredExtendedProperties],\n [\n (property) => unwrapReference(property.valueShape, types)?.isOptional,\n (property) => AvailabilityOrder.indexOf(property.availability ?? Latest.Availability.Stable),\n (property) => property.key\n ]\n );\n const toRet = { properties, descriptions, extraProperties, visitedTypeIds };\n UnwrapObjectTypeCache.set(object, toRet);\n return toRet;\n}\n\n/**\n * The discriminant of a discriminated union is converted to a literal type, *prepended* to the additional properties.\n */\nexport function unwrapDiscriminatedUnionVariant(\n union: Pick<Latest.DiscriminatedUnionType, \"discriminant\">,\n variant: Latest.DiscriminatedUnionVariant,\n types: Record<string, Latest.TypeDefinition>\n): UnwrappedObjectType {\n const { properties, descriptions, visitedTypeIds } = unwrapObjectType(variant, types); // this is already cached\n return {\n properties: [\n {\n key: union.discriminant,\n valueShape: {\n type: \"alias\",\n value: {\n type: \"literal\",\n value: {\n type: \"stringLiteral\",\n value: variant.discriminantValue\n }\n }\n },\n propertyAccess: undefined,\n // the description and availability of the discriminant should not be included here\n // because they are already included in the union variant itself\n description: undefined,\n availability: undefined\n },\n ...properties\n ],\n extraProperties: undefined,\n descriptions,\n visitedTypeIds\n };\n}\n\nfunction primitiveToDefault(shape: Latest.PrimitiveType): unknown | undefined {\n return visitDiscriminatedUnion(shape, \"type\")._visit<unknown | undefined>({\n string: (value) => value.default,\n integer: (value) => value.default,\n double: (value) => value.default,\n uint: () => undefined,\n uint64: () => undefined,\n boolean: (value) => value.default,\n long: (value) => value.default,\n datetime: (datetime) => datetime.default,\n uuid: (uuid) => uuid.default,\n base64: (base64) => base64.default,\n date: (value) => value.default,\n bigInteger: (value) => value.default,\n scalar: (value) => value.default\n });\n}\n","import * as Latest from \"./latest\";\n\n/**\n * The order of availability levels, from most stable to least stable.\n *\n * This is used to sort the availability levels in the UI, and to determine the stability level of a type reference when multiple are available.\n */\nexport const AvailabilityOrder = [\n Latest.Availability.Stable,\n Latest.Availability.GenerallyAvailable,\n Latest.Availability.Beta,\n Latest.Availability.Preview,\n Latest.Availability.PreRelease,\n Latest.Availability.Alpha,\n Latest.Availability.InDevelopment,\n Latest.Availability.Deprecated,\n Latest.Availability.Legacy\n] as const;\n\n/**\n * @param availabilities an array of availability levels\n * @returns the **least** stable availability level from the input array\n */\nexport function coalesceAvailability(\n availabilities: (Latest.Availability | null | undefined)[]\n): Latest.Availability | undefined {\n for (const availability of [...AvailabilityOrder].reverse()) {\n if (availabilities.includes(availability)) {\n return availability;\n }\n }\n return undefined;\n}\n\n// the following code is used to check that the contents of the AvailabilityOrder array contains all the values of the Availability enum\ntype AvailabilityValues = (typeof Latest.Availability)[keyof typeof Latest.Availability];\ntype CheckAvailabilityOrder<T extends readonly AvailabilityValues[]> = T[number] extends AvailabilityValues\n ? AvailabilityValues extends T[number]\n ? true\n : false\n : false;\ntype Assert<T extends true> = T;\nexport type CheckAssert = Assert<CheckAvailabilityOrder<typeof AvailabilityOrder>>;\n","/**\n * The maximum number of times to loop while unwrapping a type reference.\n * This may need to be increased if the API definition contains extremely deeply nested type references.\n */\nexport const LOOP_TOLERANCE = 100;\n\n/**\n * The maximum number of times to loop while expanding type IDs.\n * Since there can be many type ids to expand, this number is an order of magnitude larger than `LOOP_TOLERANCE`.\n */\nexport const LARGE_LOOP_TOLERANCE = 100 ** 2;\n","import { sanitizeUrl, unknownToString } from \"@fern-api/ui-core-utils\";\nimport qs from \"qs\";\n\nimport type { EndpointDefinition, ParameterProperty, PathPart } from \"./latest\";\n\n/**\n * Preprocesses query parameters based on explode metadata.\n * When explode=false, arrays are joined with commas instead of being repeated.\n */\nexport function preprocessQueryParameters(\n queryParameters: Record<string, unknown> | undefined,\n parameterMetadata: ParameterProperty[] | undefined\n): Record<string, unknown> | undefined {\n if (queryParameters == null) {\n return undefined;\n }\n\n // If no metadata, return as-is (default behavior is explode=true)\n if (parameterMetadata == null || parameterMetadata.length === 0) {\n return queryParameters;\n }\n\n // Create a map of parameter key to explode setting\n const explodeMap = new Map<string, boolean | undefined>();\n for (const param of parameterMetadata) {\n explodeMap.set(param.key, param.explode ?? undefined);\n }\n\n // Process each query parameter\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(queryParameters)) {\n const explode = explodeMap.get(key);\n\n // If explode is explicitly false and value is an array, join with commas\n if (explode === false && Array.isArray(value)) {\n result[key] = value.map((v) => unknownToString(v)).join(\",\");\n } else {\n result[key] = value;\n }\n }\n\n return result;\n}\n\nfunction buildQueryParams(queryParameters: Record<string, unknown> | undefined): string {\n if (queryParameters == null) {\n return \"\";\n }\n\n const filteredParams = Object.entries(queryParameters).reduce<Record<string, unknown>>((acc, [key, value]) => {\n if (value != null) {\n acc[key] = value;\n }\n return acc;\n }, {});\n\n if (Object.keys(filteredParams).length === 0) {\n return \"\";\n }\n\n const queryString = qs.stringify(filteredParams, {\n encode: false,\n arrayFormat: \"repeat\",\n skipNulls: true,\n serializeDate: (date: Date) => date.toISOString()\n });\n\n return queryString ? \"?\" + queryString : \"\";\n}\n\nfunction buildPath(path: PathPart[] = [], pathParameters?: Record<string, unknown>): string {\n return path\n .map((part) => {\n if (part.type === \"pathParameter\") {\n const key = part.value;\n const stateValue = unknownToString(pathParameters?.[key]);\n return stateValue.length > 0 ? encodeURIComponent(stateValue) : \":\" + key;\n }\n return part.value;\n })\n .join(\"\");\n}\n\ninterface BuildRequestUrlOptions {\n path?: PathPart[];\n pathParameters?: Record<string, unknown>;\n queryParameters?: Record<string, unknown>;\n baseUrl?: string;\n}\nexport function buildRequestUrl({\n baseUrl = \"\",\n path,\n pathParameters,\n queryParameters\n}: BuildRequestUrlOptions): string {\n const sanitizedBaseUrl = sanitizeUrl(baseUrl) || \"\";\n\n if (sanitizedBaseUrl.endsWith(\"/\")) {\n return sanitizedBaseUrl.slice(0, -1) + buildPath(path, pathParameters) + buildQueryParams(queryParameters);\n }\n return sanitizedBaseUrl + buildPath(path, pathParameters) + buildQueryParams(queryParameters);\n}\n\ninterface BuildEndpointUrlOptions {\n endpoint?: EndpointDefinition;\n pathParameters?: Record<string, unknown>;\n queryParameters?: Record<string, unknown>;\n baseUrl?: string;\n}\nexport function buildEndpointUrl({\n endpoint,\n pathParameters,\n queryParameters,\n baseUrl\n}: BuildEndpointUrlOptions): string {\n const environmentBaseUrl =\n baseUrl ??\n (endpoint?.environments?.find((env) => env.id === endpoint.defaultEnvironment) ?? endpoint?.environments?.[0])\n ?.baseUrl;\n\n // sanitize the base URL - if invalid, it will be null\n const sanitizedBaseUrl = sanitizeUrl(environmentBaseUrl);\n\n // Preprocess query parameters based on explode metadata\n const processedQueryParameters = preprocessQueryParameters(queryParameters, endpoint?.queryParameters ?? undefined);\n\n return buildRequestUrl({\n baseUrl: sanitizedBaseUrl || \"\",\n path: endpoint?.path,\n pathParameters,\n queryParameters: processedQueryParameters\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAIZ,IAAM,cAAgB,SAAO;AAM7B,IAAM,cAAgB,SAAO;AAM7B,IAAM,wBAA0B,SAAO,EAAE,KAAK;AAQ9C,IAAM,mBAAqB,OAAK,CAAC,OAAO,QAAQ,OAAO,SAAS,UAAU,MAAM,CAAC;AAYjF,IAAM,YAA8B,SAAO;AAM3C,IAAM,4BAA8B,SAAO;AAE3C,SAAS,oBAAoB,OAAoC;AACpE,SAAO;AACX;AAEO,IAAM,2BAA6B,SAAO;AAAA,EAC7C,MAAQ,SAAO;AAAA,EACf,QAAQ;AAAA,EACR,oBAAsB,SAAO,EAAE,QAAQ;AAC3C,CAAC;AAaM,IAAM,mBAA4C,qBAAmB,QAAQ;AAAA,EAC9E,SAAO,EAAE,MAAQ,UAAQ,YAAY,GAAG,SAAW,SAAO,GAAG,SAAW,SAAO,EAAE,QAAQ,EAAE,CAAC;AAAA,EAC5F,SAAO,EAAE,MAAQ,UAAQ,QAAQ,GAAG,SAAW,SAAO,GAAG,SAAW,SAAO,EAAE,QAAQ,EAAE,CAAC;AAAA,EACxF,SAAO,EAAE,MAAQ,UAAQ,IAAI,GAAG,YAAc,SAAO,GAAG,SAAW,SAAO,EAAE,QAAQ,EAAE,CAAC;AAAA,EACvF,SAAO,EAAE,MAAQ,UAAQ,MAAM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ACV;AAAA,EACA;AAAA,EACA;AACJ,GAAmC;AAC/B,QAAM,mBAAmB,YAAY,OAAO,KAAK;AAEjD,MAAI,iBAAiB,SAAS,GAAG,GAAG;AAChC,WAAO,iBAAiB,MAAM,GAAG,EAAE,IAAI,UAAU,MAAM,cAAc,IAAI,iBAAiB,eAAe;AAAA,EAC7G;AACA,SAAO,mBAAmB,UAAU,MAAM,cAAc,IAAI,iBAAiB,eAAe;AAChG;AAQO,SAAS,iBAAiB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,GAAoC;AAChC,QAAM,qBACF,YACC,UAAU,cAAc,KAAK,CAAC,QAAQ,IAAI,OAAO,SAAS,kBAAkB,KAAK,UAAU,eAAe,CAAC,IACtG;AAGV,QAAM,mBAAmB,YAAY,kBAAkB;AAGvD,QAAM,2BAA2B,0BAA0B,iBAAiB,UAAU,mBAAmB,MAAS;AAElH,SAAO,gBAAgB;AAAA,IACnB,SAAS,oBAAoB;AAAA,IAC7B,MAAM,UAAU;AAAA,IAChB;AAAA,IACA,iBAAiB;AAAA,EACrB,CAAC;AACL;","names":["message","object","typeId","properties","toRet","qs"]}
|
|
@@ -103,6 +103,7 @@ var EndpointIdSchema = z2.string();
|
|
|
103
103
|
var WebSocketIdSchema = z2.string();
|
|
104
104
|
var WebhookIdSchema = z2.string();
|
|
105
105
|
var GraphQlOperationIdSchema = z2.string();
|
|
106
|
+
var GraphQlTypeCategorySchema = z2.enum(["object", "input", "enum", "scalar", "interface", "union"]);
|
|
106
107
|
var EnvironmentIdSchema = z2.string();
|
|
107
108
|
var PropertyKeySchema = z2.string();
|
|
108
109
|
var AuthSchemeIdSchema = z2.string();
|
|
@@ -319,12 +320,20 @@ var TypeReferenceSchema = z2.lazy(
|
|
|
319
320
|
})
|
|
320
321
|
])
|
|
321
322
|
);
|
|
323
|
+
var GraphQlArgumentSchema = z2.object({
|
|
324
|
+
description: z2.string().nullish(),
|
|
325
|
+
availability: AvailabilitySchema.nullish(),
|
|
326
|
+
name: z2.string(),
|
|
327
|
+
type: TypeReferenceSchema,
|
|
328
|
+
defaultValue: z2.unknown().nullish()
|
|
329
|
+
});
|
|
322
330
|
var ObjectPropertySchema = z2.object({
|
|
323
331
|
description: z2.string().nullish(),
|
|
324
332
|
availability: AvailabilitySchema.nullish(),
|
|
325
333
|
key: PropertyKeySchema,
|
|
326
334
|
valueType: TypeReferenceSchema,
|
|
327
|
-
propertyAccess: ObjectPropertyAccessSchema.nullish()
|
|
335
|
+
propertyAccess: ObjectPropertyAccessSchema.nullish(),
|
|
336
|
+
arguments: z2.array(GraphQlArgumentSchema).nullish()
|
|
328
337
|
});
|
|
329
338
|
var ObjectTypeSchema = z2.object({
|
|
330
339
|
extends: z2.array(TypeIdSchema),
|
|
@@ -472,13 +481,6 @@ var ErrorExampleSchema = z2.object({
|
|
|
472
481
|
responseBody: ExampleErrorResponseSchema
|
|
473
482
|
});
|
|
474
483
|
var GraphQlOperationTypeSchema = z2.enum(["QUERY", "MUTATION", "SUBSCRIPTION"]);
|
|
475
|
-
var GraphQlArgumentSchema = z2.object({
|
|
476
|
-
description: z2.string().nullish(),
|
|
477
|
-
availability: AvailabilitySchema.nullish(),
|
|
478
|
-
name: z2.string(),
|
|
479
|
-
type: TypeReferenceSchema,
|
|
480
|
-
defaultValue: z2.unknown().nullish()
|
|
481
|
-
});
|
|
482
484
|
var GraphQlExampleSchema = z2.object({
|
|
483
485
|
description: z2.string().nullish(),
|
|
484
486
|
name: z2.string().nullish(),
|
|
@@ -501,6 +503,7 @@ var GraphQlOperationSchema = z2.object({
|
|
|
501
503
|
operationType: GraphQlOperationTypeSchema,
|
|
502
504
|
name: z2.string(),
|
|
503
505
|
displayName: z2.string().nullish(),
|
|
506
|
+
fieldPath: z2.array(z2.string()).nullish(),
|
|
504
507
|
arguments: z2.array(GraphQlArgumentSchema).nullish(),
|
|
505
508
|
returnType: TypeReferenceSchema,
|
|
506
509
|
examples: z2.array(GraphQlExampleSchema).nullish(),
|
|
@@ -732,6 +735,7 @@ var RegisterErrorDeclarationV2Schema = z3.object({
|
|
|
732
735
|
});
|
|
733
736
|
var RegisterEndpointDefinitionSchema = z3.object({
|
|
734
737
|
description: z3.string().nullish(),
|
|
738
|
+
subtitle: z3.string().nullish(),
|
|
735
739
|
availability: AvailabilitySchema.nullish(),
|
|
736
740
|
slug: z3.string().nullish(),
|
|
737
741
|
auth: z3.boolean().nullish(),
|
|
@@ -947,7 +951,8 @@ var LatestObjectPropertySchema = z4.lazy(
|
|
|
947
951
|
availability: AvailabilitySchema.nullish(),
|
|
948
952
|
key: PropertyKeySchema,
|
|
949
953
|
valueShape: LatestTypeShapeSchema,
|
|
950
|
-
propertyAccess: LatestObjectPropertyAccessSchema.nullish()
|
|
954
|
+
propertyAccess: LatestObjectPropertyAccessSchema.nullish(),
|
|
955
|
+
arguments: z4.array(LatestGraphQlArgumentSchema).nullish()
|
|
951
956
|
})
|
|
952
957
|
);
|
|
953
958
|
var LatestParameterPropertySchema = z4.lazy(
|
|
@@ -1256,6 +1261,7 @@ var LatestExampleEndpointCallSchema = z4.object({
|
|
|
1256
1261
|
});
|
|
1257
1262
|
var LatestEndpointDefinitionSchema = z4.object({
|
|
1258
1263
|
description: z4.string().nullish(),
|
|
1264
|
+
subtitle: z4.string().nullish(),
|
|
1259
1265
|
availability: AvailabilitySchema.nullish(),
|
|
1260
1266
|
namespace: z4.array(z4.string()).nullish(),
|
|
1261
1267
|
id: EndpointIdSchema,
|
|
@@ -1298,6 +1304,7 @@ var LatestGraphQlOperationSchema = z4.object({
|
|
|
1298
1304
|
description: z4.string().nullish(),
|
|
1299
1305
|
availability: AvailabilitySchema.nullish(),
|
|
1300
1306
|
namespace: z4.array(z4.string()).nullish(),
|
|
1307
|
+
fieldPath: z4.array(z4.string()).nullish(),
|
|
1301
1308
|
id: GraphQlOperationIdSchema,
|
|
1302
1309
|
operationType: LatestGraphQlOperationTypeSchema,
|
|
1303
1310
|
name: z4.string(),
|
|
@@ -1568,6 +1575,7 @@ var ReadErrorDeclarationV2Schema = z5.object({
|
|
|
1568
1575
|
});
|
|
1569
1576
|
var ReadEndpointDefinitionSchema = z5.object({
|
|
1570
1577
|
description: z5.string().nullish(),
|
|
1578
|
+
subtitle: z5.string().nullish(),
|
|
1571
1579
|
availability: AvailabilitySchema.nullish(),
|
|
1572
1580
|
authed: z5.boolean(),
|
|
1573
1581
|
authV2: z5.array(AuthSchemeIdSchema).nullish(),
|