unstructured-client
Version:
<h3 align="center"> <img src="https://raw.githubusercontent.com/Unstructured-IO/unstructured/main/img/unstructured_logo.png" height="200" > </h3>
40 lines • 1.4 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js";
/** @internal */
export const Security$inboundSchema = z.object({
ApiKeyAuth: z.string().optional(),
}).transform((v) => {
return remap$(v, {
"ApiKeyAuth": "apiKeyAuth",
});
});
/** @internal */
export const Security$outboundSchema = z.object({
apiKeyAuth: z.string().optional(),
}).transform((v) => {
return remap$(v, {
apiKeyAuth: "ApiKeyAuth",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var Security$;
(function (Security$) {
/** @deprecated use `Security$inboundSchema` instead. */
Security$.inboundSchema = Security$inboundSchema;
/** @deprecated use `Security$outboundSchema` instead. */
Security$.outboundSchema = Security$outboundSchema;
})(Security$ || (Security$ = {}));
export function securityToJSON(security) {
return JSON.stringify(Security$outboundSchema.parse(security));
}
export function securityFromJSON(jsonString) {
return safeParse(jsonString, (x) => Security$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Security' from JSON`);
}
//# sourceMappingURL=security.js.map