/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
export const View = {
    Account: "account",
    Project: "project",
};
export const InstallationType = {
    Marketplace: "marketplace",
    External: "external",
};
/**
 * Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics.
 */
export const GetConfigurationsResponseBodyIntegrationsSource = {
    Marketplace: "marketplace",
    DeployButton: "deploy-button",
    External: "external",
};
export const GetConfigurationsResponseBodyIntegrationsType = {
    IntegrationConfiguration: "integration-configuration",
};
export const ResponseBodyDisabledReason = {
    DisabledByOwner: "disabled-by-owner",
    FeatureNotAvailable: "feature-not-available",
    DisabledByAdmin: "disabled-by-admin",
    OriginalOwnerLeftTheTeam: "original-owner-left-the-team",
    AccountPlanDowngrade: "account-plan-downgrade",
    OriginalOwnerRoleDowngraded: "original-owner-role-downgraded",
};
/**
 * Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external'
 */
export const GetConfigurationsResponseBodyInstallationType = {
    Marketplace: "marketplace",
    External: "external",
};
export const GetConfigurationsResponseBodyIntegrationsResponse200Type = {
    Prepayment: "prepayment",
    Subscription: "subscription",
};
export const GetConfigurationsResponseBodyScope = {
    Installation: "installation",
    Resource: "resource",
};
/**
 * Source defines where the configuration was installed from. It is used to analyze user engagement for integration installations in product metrics.
 */
export const GetConfigurationsResponseBodySource = {
    Marketplace: "marketplace",
    DeployButton: "deploy-button",
    External: "external",
};
export const GetConfigurationsResponseBodyType = {
    IntegrationConfiguration: "integration-configuration",
};
export const GetConfigurationsResponseBodyDisabledReason = {
    DisabledByOwner: "disabled-by-owner",
    FeatureNotAvailable: "feature-not-available",
    DisabledByAdmin: "disabled-by-admin",
    OriginalOwnerLeftTheTeam: "original-owner-left-the-team",
    AccountPlanDowngrade: "account-plan-downgrade",
    OriginalOwnerRoleDowngraded: "original-owner-role-downgraded",
};
/**
 * Defines the installation type. - 'external' integrations are installed via the existing integrations flow - 'marketplace' integrations are natively installed: - when accepting the TOS of a partner during the store creation process - if undefined, assume 'external'
 */
export const ResponseBodyInstallationType = {
    Marketplace: "marketplace",
    External: "external",
};
export const GetConfigurationsResponseBodyIntegrationsResponseType = {
    Prepayment: "prepayment",
    Subscription: "subscription",
};
export const ResponseBodyScope = {
    Installation: "installation",
    Resource: "resource",
};
/** @internal */
export const View$inboundSchema = z.nativeEnum(View);
/** @internal */
export const View$outboundSchema = View$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var View$;
(function (View$) {
    /** @deprecated use `View$inboundSchema` instead. */
    View$.inboundSchema = View$inboundSchema;
    /** @deprecated use `View$outboundSchema` instead. */
    View$.outboundSchema = View$outboundSchema;
})(View$ || (View$ = {}));
/** @internal */
export const InstallationType$inboundSchema = z.nativeEnum(InstallationType);
/** @internal */
export const InstallationType$outboundSchema = InstallationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InstallationType$;
(function (InstallationType$) {
    /** @deprecated use `InstallationType$inboundSchema` instead. */
    InstallationType$.inboundSchema = InstallationType$inboundSchema;
    /** @deprecated use `InstallationType$outboundSchema` instead. */
    InstallationType$.outboundSchema = InstallationType$outboundSchema;
})(InstallationType$ || (InstallationType$ = {}));
/** @internal */
export const GetConfigurationsRequest$inboundSchema = z.object({
    view: View$inboundSchema,
    installationType: InstallationType$inboundSchema.optional(),
    integrationIdOrSlug: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetConfigurationsRequest$outboundSchema = z.object({
    view: View$outboundSchema,
    installationType: InstallationType$outboundSchema.optional(),
    integrationIdOrSlug: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsRequest$;
(function (GetConfigurationsRequest$) {
    /** @deprecated use `GetConfigurationsRequest$inboundSchema` instead. */
    GetConfigurationsRequest$.inboundSchema = GetConfigurationsRequest$inboundSchema;
    /** @deprecated use `GetConfigurationsRequest$outboundSchema` instead. */
    GetConfigurationsRequest$.outboundSchema = GetConfigurationsRequest$outboundSchema;
})(GetConfigurationsRequest$ || (GetConfigurationsRequest$ = {}));
export function getConfigurationsRequestToJSON(getConfigurationsRequest) {
    return JSON.stringify(GetConfigurationsRequest$outboundSchema.parse(getConfigurationsRequest));
}
export function getConfigurationsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetConfigurationsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsRequest' from JSON`);
}
/** @internal */
export const Integration$inboundSchema = z.object({
    name: z.string(),
    icon: z.string(),
    category: z.string(),
    isLegacy: z.boolean(),
    flags: z.array(z.string()).optional(),
    assignedBetaLabelAt: z.number().optional(),
});
/** @internal */
export const Integration$outboundSchema = z.object({
    name: z.string(),
    icon: z.string(),
    category: z.string(),
    isLegacy: z.boolean(),
    flags: z.array(z.string()).optional(),
    assignedBetaLabelAt: z.number().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Integration$;
(function (Integration$) {
    /** @deprecated use `Integration$inboundSchema` instead. */
    Integration$.inboundSchema = Integration$inboundSchema;
    /** @deprecated use `Integration$outboundSchema` instead. */
    Integration$.outboundSchema = Integration$outboundSchema;
})(Integration$ || (Integration$ = {}));
export function integrationToJSON(integration) {
    return JSON.stringify(Integration$outboundSchema.parse(integration));
}
export function integrationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Integration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Integration' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsSource$inboundSchema = z
    .nativeEnum(GetConfigurationsResponseBodyIntegrationsSource);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsSource$outboundSchema = GetConfigurationsResponseBodyIntegrationsSource$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyIntegrationsSource$;
(function (GetConfigurationsResponseBodyIntegrationsSource$) {
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsSource$inboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsSource$.inboundSchema = GetConfigurationsResponseBodyIntegrationsSource$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsSource$outboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsSource$.outboundSchema = GetConfigurationsResponseBodyIntegrationsSource$outboundSchema;
})(GetConfigurationsResponseBodyIntegrationsSource$ || (GetConfigurationsResponseBodyIntegrationsSource$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsType$inboundSchema = z
    .nativeEnum(GetConfigurationsResponseBodyIntegrationsType);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsType$outboundSchema = GetConfigurationsResponseBodyIntegrationsType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyIntegrationsType$;
(function (GetConfigurationsResponseBodyIntegrationsType$) {
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsType$inboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsType$.inboundSchema = GetConfigurationsResponseBodyIntegrationsType$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsType$outboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsType$.outboundSchema = GetConfigurationsResponseBodyIntegrationsType$outboundSchema;
})(GetConfigurationsResponseBodyIntegrationsType$ || (GetConfigurationsResponseBodyIntegrationsType$ = {}));
/** @internal */
export const ResponseBodyDisabledReason$inboundSchema = z.nativeEnum(ResponseBodyDisabledReason);
/** @internal */
export const ResponseBodyDisabledReason$outboundSchema = ResponseBodyDisabledReason$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyDisabledReason$;
(function (ResponseBodyDisabledReason$) {
    /** @deprecated use `ResponseBodyDisabledReason$inboundSchema` instead. */
    ResponseBodyDisabledReason$.inboundSchema = ResponseBodyDisabledReason$inboundSchema;
    /** @deprecated use `ResponseBodyDisabledReason$outboundSchema` instead. */
    ResponseBodyDisabledReason$.outboundSchema = ResponseBodyDisabledReason$outboundSchema;
})(ResponseBodyDisabledReason$ || (ResponseBodyDisabledReason$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyInstallationType$inboundSchema = z
    .nativeEnum(GetConfigurationsResponseBodyInstallationType);
/** @internal */
export const GetConfigurationsResponseBodyInstallationType$outboundSchema = GetConfigurationsResponseBodyInstallationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyInstallationType$;
(function (GetConfigurationsResponseBodyInstallationType$) {
    /** @deprecated use `GetConfigurationsResponseBodyInstallationType$inboundSchema` instead. */
    GetConfigurationsResponseBodyInstallationType$.inboundSchema = GetConfigurationsResponseBodyInstallationType$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyInstallationType$outboundSchema` instead. */
    GetConfigurationsResponseBodyInstallationType$.outboundSchema = GetConfigurationsResponseBodyInstallationType$outboundSchema;
})(GetConfigurationsResponseBodyInstallationType$ || (GetConfigurationsResponseBodyInstallationType$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsResponse200Type$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyIntegrationsResponse200Type);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsResponse200Type$outboundSchema = GetConfigurationsResponseBodyIntegrationsResponse200Type$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyIntegrationsResponse200Type$;
(function (GetConfigurationsResponseBodyIntegrationsResponse200Type$) {
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsResponse200Type$inboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsResponse200Type$.inboundSchema = GetConfigurationsResponseBodyIntegrationsResponse200Type$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsResponse200Type$outboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsResponse200Type$.outboundSchema = GetConfigurationsResponseBodyIntegrationsResponse200Type$outboundSchema;
})(GetConfigurationsResponseBodyIntegrationsResponse200Type$ || (GetConfigurationsResponseBodyIntegrationsResponse200Type$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyScope$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyScope);
/** @internal */
export const GetConfigurationsResponseBodyScope$outboundSchema = GetConfigurationsResponseBodyScope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyScope$;
(function (GetConfigurationsResponseBodyScope$) {
    /** @deprecated use `GetConfigurationsResponseBodyScope$inboundSchema` instead. */
    GetConfigurationsResponseBodyScope$.inboundSchema = GetConfigurationsResponseBodyScope$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyScope$outboundSchema` instead. */
    GetConfigurationsResponseBodyScope$.outboundSchema = GetConfigurationsResponseBodyScope$outboundSchema;
})(GetConfigurationsResponseBodyScope$ || (GetConfigurationsResponseBodyScope$ = {}));
/** @internal */
export const ResponseBodyDetails$inboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/** @internal */
export const ResponseBodyDetails$outboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyDetails$;
(function (ResponseBodyDetails$) {
    /** @deprecated use `ResponseBodyDetails$inboundSchema` instead. */
    ResponseBodyDetails$.inboundSchema = ResponseBodyDetails$inboundSchema;
    /** @deprecated use `ResponseBodyDetails$outboundSchema` instead. */
    ResponseBodyDetails$.outboundSchema = ResponseBodyDetails$outboundSchema;
})(ResponseBodyDetails$ || (ResponseBodyDetails$ = {}));
export function responseBodyDetailsToJSON(responseBodyDetails) {
    return JSON.stringify(ResponseBodyDetails$outboundSchema.parse(responseBodyDetails));
}
export function responseBodyDetailsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyDetails' from JSON`);
}
/** @internal */
export const ResponseBodyHeightlightedDetails$inboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/** @internal */
export const ResponseBodyHeightlightedDetails$outboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyHeightlightedDetails$;
(function (ResponseBodyHeightlightedDetails$) {
    /** @deprecated use `ResponseBodyHeightlightedDetails$inboundSchema` instead. */
    ResponseBodyHeightlightedDetails$.inboundSchema = ResponseBodyHeightlightedDetails$inboundSchema;
    /** @deprecated use `ResponseBodyHeightlightedDetails$outboundSchema` instead. */
    ResponseBodyHeightlightedDetails$.outboundSchema = ResponseBodyHeightlightedDetails$outboundSchema;
})(ResponseBodyHeightlightedDetails$ || (ResponseBodyHeightlightedDetails$ = {}));
export function responseBodyHeightlightedDetailsToJSON(responseBodyHeightlightedDetails) {
    return JSON.stringify(ResponseBodyHeightlightedDetails$outboundSchema.parse(responseBodyHeightlightedDetails));
}
export function responseBodyHeightlightedDetailsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyHeightlightedDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyHeightlightedDetails' from JSON`);
}
/** @internal */
export const ResponseBodyQuote$inboundSchema = z.object({
    line: z.string(),
    amount: z.string(),
});
/** @internal */
export const ResponseBodyQuote$outboundSchema = z.object({
    line: z.string(),
    amount: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyQuote$;
(function (ResponseBodyQuote$) {
    /** @deprecated use `ResponseBodyQuote$inboundSchema` instead. */
    ResponseBodyQuote$.inboundSchema = ResponseBodyQuote$inboundSchema;
    /** @deprecated use `ResponseBodyQuote$outboundSchema` instead. */
    ResponseBodyQuote$.outboundSchema = ResponseBodyQuote$outboundSchema;
})(ResponseBodyQuote$ || (ResponseBodyQuote$ = {}));
export function responseBodyQuoteToJSON(responseBodyQuote) {
    return JSON.stringify(ResponseBodyQuote$outboundSchema.parse(responseBodyQuote));
}
export function responseBodyQuoteFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyQuote$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyQuote' from JSON`);
}
/** @internal */
export const ResponseBodyBillingPlan$inboundSchema = z.object({
    id: z.string(),
    type: GetConfigurationsResponseBodyIntegrationsResponse200Type$inboundSchema,
    name: z.string(),
    scope: GetConfigurationsResponseBodyScope$inboundSchema.optional(),
    description: z.string(),
    paymentMethodRequired: z.boolean().optional(),
    preauthorizationAmount: z.number().optional(),
    cost: z.string().optional(),
    details: z.array(z.lazy(() => ResponseBodyDetails$inboundSchema)).optional(),
    heightlightedDetails: z.array(z.lazy(() => ResponseBodyHeightlightedDetails$inboundSchema)).optional(),
    quote: z.array(z.lazy(() => ResponseBodyQuote$inboundSchema)).optional(),
    effectiveDate: z.string().optional(),
});
/** @internal */
export const ResponseBodyBillingPlan$outboundSchema = z.object({
    id: z.string(),
    type: GetConfigurationsResponseBodyIntegrationsResponse200Type$outboundSchema,
    name: z.string(),
    scope: GetConfigurationsResponseBodyScope$outboundSchema.optional(),
    description: z.string(),
    paymentMethodRequired: z.boolean().optional(),
    preauthorizationAmount: z.number().optional(),
    cost: z.string().optional(),
    details: z.array(z.lazy(() => ResponseBodyDetails$outboundSchema)).optional(),
    heightlightedDetails: z.array(z.lazy(() => ResponseBodyHeightlightedDetails$outboundSchema)).optional(),
    quote: z.array(z.lazy(() => ResponseBodyQuote$outboundSchema)).optional(),
    effectiveDate: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyBillingPlan$;
(function (ResponseBodyBillingPlan$) {
    /** @deprecated use `ResponseBodyBillingPlan$inboundSchema` instead. */
    ResponseBodyBillingPlan$.inboundSchema = ResponseBodyBillingPlan$inboundSchema;
    /** @deprecated use `ResponseBodyBillingPlan$outboundSchema` instead. */
    ResponseBodyBillingPlan$.outboundSchema = ResponseBodyBillingPlan$outboundSchema;
})(ResponseBodyBillingPlan$ || (ResponseBodyBillingPlan$ = {}));
export function responseBodyBillingPlanToJSON(responseBodyBillingPlan) {
    return JSON.stringify(ResponseBodyBillingPlan$outboundSchema.parse(responseBodyBillingPlan));
}
export function responseBodyBillingPlanFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyBillingPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBillingPlan' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBody2$inboundSchema = z.object({
    integration: z.lazy(() => Integration$inboundSchema),
    completedAt: z.number().optional(),
    createdAt: z.number(),
    id: z.string(),
    integrationId: z.string(),
    ownerId: z.string(),
    projects: z.array(z.string()).optional(),
    source: GetConfigurationsResponseBodyIntegrationsSource$inboundSchema
        .optional(),
    slug: z.string(),
    teamId: z.nullable(z.string()).optional(),
    type: GetConfigurationsResponseBodyIntegrationsType$inboundSchema,
    updatedAt: z.number(),
    userId: z.string(),
    scopes: z.array(z.string()),
    disabledAt: z.number().optional(),
    deletedAt: z.nullable(z.number()).optional(),
    deleteRequestedAt: z.nullable(z.number()).optional(),
    disabledReason: ResponseBodyDisabledReason$inboundSchema.optional(),
    installationType: GetConfigurationsResponseBodyInstallationType$inboundSchema
        .optional(),
    billingPlan: z.lazy(() => ResponseBodyBillingPlan$inboundSchema).optional(),
    billingTotal: z.string().optional(),
    periodStart: z.string().optional(),
    periodEnd: z.string().optional(),
});
/** @internal */
export const GetConfigurationsResponseBody2$outboundSchema = z.object({
    integration: z.lazy(() => Integration$outboundSchema),
    completedAt: z.number().optional(),
    createdAt: z.number(),
    id: z.string(),
    integrationId: z.string(),
    ownerId: z.string(),
    projects: z.array(z.string()).optional(),
    source: GetConfigurationsResponseBodyIntegrationsSource$outboundSchema
        .optional(),
    slug: z.string(),
    teamId: z.nullable(z.string()).optional(),
    type: GetConfigurationsResponseBodyIntegrationsType$outboundSchema,
    updatedAt: z.number(),
    userId: z.string(),
    scopes: z.array(z.string()),
    disabledAt: z.number().optional(),
    deletedAt: z.nullable(z.number()).optional(),
    deleteRequestedAt: z.nullable(z.number()).optional(),
    disabledReason: ResponseBodyDisabledReason$outboundSchema.optional(),
    installationType: GetConfigurationsResponseBodyInstallationType$outboundSchema
        .optional(),
    billingPlan: z.lazy(() => ResponseBodyBillingPlan$outboundSchema).optional(),
    billingTotal: z.string().optional(),
    periodStart: z.string().optional(),
    periodEnd: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBody2$;
(function (GetConfigurationsResponseBody2$) {
    /** @deprecated use `GetConfigurationsResponseBody2$inboundSchema` instead. */
    GetConfigurationsResponseBody2$.inboundSchema = GetConfigurationsResponseBody2$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBody2$outboundSchema` instead. */
    GetConfigurationsResponseBody2$.outboundSchema = GetConfigurationsResponseBody2$outboundSchema;
})(GetConfigurationsResponseBody2$ || (GetConfigurationsResponseBody2$ = {}));
export function getConfigurationsResponseBody2ToJSON(getConfigurationsResponseBody2) {
    return JSON.stringify(GetConfigurationsResponseBody2$outboundSchema.parse(getConfigurationsResponseBody2));
}
export function getConfigurationsResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetConfigurationsResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody2' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBodySource$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodySource);
/** @internal */
export const GetConfigurationsResponseBodySource$outboundSchema = GetConfigurationsResponseBodySource$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodySource$;
(function (GetConfigurationsResponseBodySource$) {
    /** @deprecated use `GetConfigurationsResponseBodySource$inboundSchema` instead. */
    GetConfigurationsResponseBodySource$.inboundSchema = GetConfigurationsResponseBodySource$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodySource$outboundSchema` instead. */
    GetConfigurationsResponseBodySource$.outboundSchema = GetConfigurationsResponseBodySource$outboundSchema;
})(GetConfigurationsResponseBodySource$ || (GetConfigurationsResponseBodySource$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyType$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyType);
/** @internal */
export const GetConfigurationsResponseBodyType$outboundSchema = GetConfigurationsResponseBodyType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyType$;
(function (GetConfigurationsResponseBodyType$) {
    /** @deprecated use `GetConfigurationsResponseBodyType$inboundSchema` instead. */
    GetConfigurationsResponseBodyType$.inboundSchema = GetConfigurationsResponseBodyType$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyType$outboundSchema` instead. */
    GetConfigurationsResponseBodyType$.outboundSchema = GetConfigurationsResponseBodyType$outboundSchema;
})(GetConfigurationsResponseBodyType$ || (GetConfigurationsResponseBodyType$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyDisabledReason$inboundSchema = z
    .nativeEnum(GetConfigurationsResponseBodyDisabledReason);
/** @internal */
export const GetConfigurationsResponseBodyDisabledReason$outboundSchema = GetConfigurationsResponseBodyDisabledReason$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyDisabledReason$;
(function (GetConfigurationsResponseBodyDisabledReason$) {
    /** @deprecated use `GetConfigurationsResponseBodyDisabledReason$inboundSchema` instead. */
    GetConfigurationsResponseBodyDisabledReason$.inboundSchema = GetConfigurationsResponseBodyDisabledReason$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyDisabledReason$outboundSchema` instead. */
    GetConfigurationsResponseBodyDisabledReason$.outboundSchema = GetConfigurationsResponseBodyDisabledReason$outboundSchema;
})(GetConfigurationsResponseBodyDisabledReason$ || (GetConfigurationsResponseBodyDisabledReason$ = {}));
/** @internal */
export const ResponseBodyInstallationType$inboundSchema = z.nativeEnum(ResponseBodyInstallationType);
/** @internal */
export const ResponseBodyInstallationType$outboundSchema = ResponseBodyInstallationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyInstallationType$;
(function (ResponseBodyInstallationType$) {
    /** @deprecated use `ResponseBodyInstallationType$inboundSchema` instead. */
    ResponseBodyInstallationType$.inboundSchema = ResponseBodyInstallationType$inboundSchema;
    /** @deprecated use `ResponseBodyInstallationType$outboundSchema` instead. */
    ResponseBodyInstallationType$.outboundSchema = ResponseBodyInstallationType$outboundSchema;
})(ResponseBodyInstallationType$ || (ResponseBodyInstallationType$ = {}));
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsResponseType$inboundSchema = z.nativeEnum(GetConfigurationsResponseBodyIntegrationsResponseType);
/** @internal */
export const GetConfigurationsResponseBodyIntegrationsResponseType$outboundSchema = GetConfigurationsResponseBodyIntegrationsResponseType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBodyIntegrationsResponseType$;
(function (GetConfigurationsResponseBodyIntegrationsResponseType$) {
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsResponseType$inboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsResponseType$.inboundSchema = GetConfigurationsResponseBodyIntegrationsResponseType$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBodyIntegrationsResponseType$outboundSchema` instead. */
    GetConfigurationsResponseBodyIntegrationsResponseType$.outboundSchema = GetConfigurationsResponseBodyIntegrationsResponseType$outboundSchema;
})(GetConfigurationsResponseBodyIntegrationsResponseType$ || (GetConfigurationsResponseBodyIntegrationsResponseType$ = {}));
/** @internal */
export const ResponseBodyScope$inboundSchema = z.nativeEnum(ResponseBodyScope);
/** @internal */
export const ResponseBodyScope$outboundSchema = ResponseBodyScope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyScope$;
(function (ResponseBodyScope$) {
    /** @deprecated use `ResponseBodyScope$inboundSchema` instead. */
    ResponseBodyScope$.inboundSchema = ResponseBodyScope$inboundSchema;
    /** @deprecated use `ResponseBodyScope$outboundSchema` instead. */
    ResponseBodyScope$.outboundSchema = ResponseBodyScope$outboundSchema;
})(ResponseBodyScope$ || (ResponseBodyScope$ = {}));
/** @internal */
export const Details$inboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/** @internal */
export const Details$outboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Details$;
(function (Details$) {
    /** @deprecated use `Details$inboundSchema` instead. */
    Details$.inboundSchema = Details$inboundSchema;
    /** @deprecated use `Details$outboundSchema` instead. */
    Details$.outboundSchema = Details$outboundSchema;
})(Details$ || (Details$ = {}));
export function detailsToJSON(details) {
    return JSON.stringify(Details$outboundSchema.parse(details));
}
export function detailsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Details$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Details' from JSON`);
}
/** @internal */
export const HeightlightedDetails$inboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/** @internal */
export const HeightlightedDetails$outboundSchema = z.object({
    label: z.string(),
    value: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var HeightlightedDetails$;
(function (HeightlightedDetails$) {
    /** @deprecated use `HeightlightedDetails$inboundSchema` instead. */
    HeightlightedDetails$.inboundSchema = HeightlightedDetails$inboundSchema;
    /** @deprecated use `HeightlightedDetails$outboundSchema` instead. */
    HeightlightedDetails$.outboundSchema = HeightlightedDetails$outboundSchema;
})(HeightlightedDetails$ || (HeightlightedDetails$ = {}));
export function heightlightedDetailsToJSON(heightlightedDetails) {
    return JSON.stringify(HeightlightedDetails$outboundSchema.parse(heightlightedDetails));
}
export function heightlightedDetailsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => HeightlightedDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HeightlightedDetails' from JSON`);
}
/** @internal */
export const Quote$inboundSchema = z
    .object({
    line: z.string(),
    amount: z.string(),
});
/** @internal */
export const Quote$outboundSchema = z.object({
    line: z.string(),
    amount: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Quote$;
(function (Quote$) {
    /** @deprecated use `Quote$inboundSchema` instead. */
    Quote$.inboundSchema = Quote$inboundSchema;
    /** @deprecated use `Quote$outboundSchema` instead. */
    Quote$.outboundSchema = Quote$outboundSchema;
})(Quote$ || (Quote$ = {}));
export function quoteToJSON(quote) {
    return JSON.stringify(Quote$outboundSchema.parse(quote));
}
export function quoteFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Quote$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Quote' from JSON`);
}
/** @internal */
export const BillingPlan$inboundSchema = z.object({
    id: z.string(),
    type: GetConfigurationsResponseBodyIntegrationsResponseType$inboundSchema,
    name: z.string(),
    scope: ResponseBodyScope$inboundSchema.optional(),
    description: z.string(),
    paymentMethodRequired: z.boolean().optional(),
    preauthorizationAmount: z.number().optional(),
    cost: z.string().optional(),
    details: z.array(z.lazy(() => Details$inboundSchema)).optional(),
    heightlightedDetails: z.array(z.lazy(() => HeightlightedDetails$inboundSchema)).optional(),
    quote: z.array(z.lazy(() => Quote$inboundSchema)).optional(),
    effectiveDate: z.string().optional(),
});
/** @internal */
export const BillingPlan$outboundSchema = z.object({
    id: z.string(),
    type: GetConfigurationsResponseBodyIntegrationsResponseType$outboundSchema,
    name: z.string(),
    scope: ResponseBodyScope$outboundSchema.optional(),
    description: z.string(),
    paymentMethodRequired: z.boolean().optional(),
    preauthorizationAmount: z.number().optional(),
    cost: z.string().optional(),
    details: z.array(z.lazy(() => Details$outboundSchema)).optional(),
    heightlightedDetails: z.array(z.lazy(() => HeightlightedDetails$outboundSchema)).optional(),
    quote: z.array(z.lazy(() => Quote$outboundSchema)).optional(),
    effectiveDate: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BillingPlan$;
(function (BillingPlan$) {
    /** @deprecated use `BillingPlan$inboundSchema` instead. */
    BillingPlan$.inboundSchema = BillingPlan$inboundSchema;
    /** @deprecated use `BillingPlan$outboundSchema` instead. */
    BillingPlan$.outboundSchema = BillingPlan$outboundSchema;
})(BillingPlan$ || (BillingPlan$ = {}));
export function billingPlanToJSON(billingPlan) {
    return JSON.stringify(BillingPlan$outboundSchema.parse(billingPlan));
}
export function billingPlanFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BillingPlan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BillingPlan' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBody1$inboundSchema = z.object({
    completedAt: z.number().optional(),
    createdAt: z.number().optional(),
    id: z.string().optional(),
    integrationId: z.string().optional(),
    ownerId: z.string().optional(),
    projects: z.array(z.string()).optional(),
    source: GetConfigurationsResponseBodySource$inboundSchema.optional(),
    slug: z.string().optional(),
    teamId: z.nullable(z.string()).optional(),
    type: GetConfigurationsResponseBodyType$inboundSchema.optional(),
    updatedAt: z.number().optional(),
    userId: z.string().optional(),
    scopes: z.array(z.string()).optional(),
    disabledAt: z.number().optional(),
    deletedAt: z.nullable(z.number()).optional(),
    deleteRequestedAt: z.nullable(z.number()).optional(),
    disabledReason: GetConfigurationsResponseBodyDisabledReason$inboundSchema
        .optional(),
    installationType: ResponseBodyInstallationType$inboundSchema.optional(),
    billingPlan: z.lazy(() => BillingPlan$inboundSchema).optional(),
    billingTotal: z.string().optional(),
    periodStart: z.string().optional(),
    periodEnd: z.string().optional(),
});
/** @internal */
export const GetConfigurationsResponseBody1$outboundSchema = z.object({
    completedAt: z.number().optional(),
    createdAt: z.number().optional(),
    id: z.string().optional(),
    integrationId: z.string().optional(),
    ownerId: z.string().optional(),
    projects: z.array(z.string()).optional(),
    source: GetConfigurationsResponseBodySource$outboundSchema.optional(),
    slug: z.string().optional(),
    teamId: z.nullable(z.string()).optional(),
    type: GetConfigurationsResponseBodyType$outboundSchema.optional(),
    updatedAt: z.number().optional(),
    userId: z.string().optional(),
    scopes: z.array(z.string()).optional(),
    disabledAt: z.number().optional(),
    deletedAt: z.nullable(z.number()).optional(),
    deleteRequestedAt: z.nullable(z.number()).optional(),
    disabledReason: GetConfigurationsResponseBodyDisabledReason$outboundSchema
        .optional(),
    installationType: ResponseBodyInstallationType$outboundSchema.optional(),
    billingPlan: z.lazy(() => BillingPlan$outboundSchema).optional(),
    billingTotal: z.string().optional(),
    periodStart: z.string().optional(),
    periodEnd: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBody1$;
(function (GetConfigurationsResponseBody1$) {
    /** @deprecated use `GetConfigurationsResponseBody1$inboundSchema` instead. */
    GetConfigurationsResponseBody1$.inboundSchema = GetConfigurationsResponseBody1$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBody1$outboundSchema` instead. */
    GetConfigurationsResponseBody1$.outboundSchema = GetConfigurationsResponseBody1$outboundSchema;
})(GetConfigurationsResponseBody1$ || (GetConfigurationsResponseBody1$ = {}));
export function getConfigurationsResponseBody1ToJSON(getConfigurationsResponseBody1) {
    return JSON.stringify(GetConfigurationsResponseBody1$outboundSchema.parse(getConfigurationsResponseBody1));
}
export function getConfigurationsResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetConfigurationsResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody1' from JSON`);
}
/** @internal */
export const GetConfigurationsResponseBody$inboundSchema = z.union([
    z.array(z.lazy(() => GetConfigurationsResponseBody1$inboundSchema)),
    z.array(z.lazy(() => GetConfigurationsResponseBody2$inboundSchema)),
]);
/** @internal */
export const GetConfigurationsResponseBody$outboundSchema = z.union([
    z.array(z.lazy(() => GetConfigurationsResponseBody1$outboundSchema)),
    z.array(z.lazy(() => GetConfigurationsResponseBody2$outboundSchema)),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetConfigurationsResponseBody$;
(function (GetConfigurationsResponseBody$) {
    /** @deprecated use `GetConfigurationsResponseBody$inboundSchema` instead. */
    GetConfigurationsResponseBody$.inboundSchema = GetConfigurationsResponseBody$inboundSchema;
    /** @deprecated use `GetConfigurationsResponseBody$outboundSchema` instead. */
    GetConfigurationsResponseBody$.outboundSchema = GetConfigurationsResponseBody$outboundSchema;
})(GetConfigurationsResponseBody$ || (GetConfigurationsResponseBody$ = {}));
export function getConfigurationsResponseBodyToJSON(getConfigurationsResponseBody) {
    return JSON.stringify(GetConfigurationsResponseBody$outboundSchema.parse(getConfigurationsResponseBody));
}
export function getConfigurationsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetConfigurationsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetConfigurationsResponseBody' from JSON`);
}
//# sourceMappingURL=getconfigurationsop.js.map