import * as HttpClient from "@effect/platform/HttpClient";
import * as Effect from "effect/Effect";
import * as Option from "effect/Option";
import * as Schema from "effect/Schema";
import * as Auth from "./Auth.ts";
import type * as ManifestContext from "./ManifestContext.ts";
import * as Model from "./Model.ts";
declare const AmpRegistryService_base: Effect.Service.Class<AmpRegistryService, "Amp/Services/AmpRegistryService", {
    readonly dependencies: readonly [import("effect/Layer").Layer<HttpClient.HttpClient, never, never>, import("effect/Layer").Layer<Auth.AuthService, import("@effect/platform/Error").PlatformError, import("@effect/platform/Path").Path | import("@effect/platform/FileSystem").FileSystem>];
    readonly effect: Effect.Effect<{
        readonly getDataset: (namespace: Model.DatasetNamespace, name: Model.DatasetName) => Effect.Effect<Option.Option<AmpRegistryDatasetDto>, RegistryApiError, never>;
        readonly getOwnedDataset: (auth: Auth.AuthStorageSchema, namespace: Model.DatasetNamespace, name: Model.DatasetName) => Effect.Effect<Option.Option<AmpRegistryDatasetDto>, RegistryApiError, never>;
        readonly publishDataset: (auth: Auth.AuthStorageSchema, dto: AmpRegistryInsertDatasetDto) => Effect.Effect<AmpRegistryDatasetDto, RegistryApiError, never>;
        readonly publishVersion: (auth: Auth.AuthStorageSchema, namespace: Model.DatasetNamespace, name: Model.DatasetName, dto: AmpRegistryInsertDatasetVersionDto) => Effect.Effect<AmpRegistryDatasetVersionDto, RegistryApiError, never>;
        readonly updateDatasetMetadata: (auth: Auth.AuthStorageSchema, namespace: Model.DatasetNamespace, name: Model.DatasetName, dto: AmpRegistryUpdateDatasetMetadataDto) => Effect.Effect<AmpRegistryDatasetDto, RegistryApiError, never>;
        readonly publishFlow: (args: Readonly<{
            auth: Auth.AuthStorageSchema;
            context: ManifestContext.DatasetContext;
            versionTag: Model.DatasetRevision;
            changelog?: string | undefined;
        }>) => Effect.Effect<Model.DatasetReference, RegistryApiError | DatasetOwnershipError | VersionAlreadyExistsError, never>;
    }, never, HttpClient.HttpClient>;
}>;
export declare class AmpRegistryService extends AmpRegistryService_base {
}
export declare const layer: import("effect/Layer").Layer<AmpRegistryService, import("@effect/platform/Error").PlatformError, import("@effect/platform/Path").Path | import("@effect/platform/FileSystem").FileSystem>;
declare const AmpRegistryDatasetVersionAncestryDto_base: Schema.Class<AmpRegistryDatasetVersionAncestryDto, {
    dataset_reference: Schema.refine<string, typeof Schema.String>;
}, Schema.Struct.Encoded<{
    dataset_reference: Schema.refine<string, typeof Schema.String>;
}>, never, {
    readonly dataset_reference: string;
}, {}, {}>;
export declare class AmpRegistryDatasetVersionAncestryDto extends AmpRegistryDatasetVersionAncestryDto_base {
}
declare const AmpRegistryDatasetVersionDto_base: Schema.Class<AmpRegistryDatasetVersionDto, {
    status: Schema.Literal<["draft", "published", "deprecated", "archived"]>;
    created_at: typeof Schema.String;
    version_tag: Schema.Union<[Schema.brand<Schema.refine<string, typeof Schema.String>, "DatasetVersion">, Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetHash">, Schema.brand<Schema.Literal<["latest", "dev"]>, "DatasetTag">]>;
    dataset_reference: Schema.refine<string, typeof Schema.String>;
    changelog: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
    ancestors: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionAncestryDto>, {
        nullable: true;
    }>;
    descendants: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionAncestryDto>, {
        nullable: true;
    }>;
}, Schema.Struct.Encoded<{
    status: Schema.Literal<["draft", "published", "deprecated", "archived"]>;
    created_at: typeof Schema.String;
    version_tag: Schema.Union<[Schema.brand<Schema.refine<string, typeof Schema.String>, "DatasetVersion">, Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetHash">, Schema.brand<Schema.Literal<["latest", "dev"]>, "DatasetTag">]>;
    dataset_reference: Schema.refine<string, typeof Schema.String>;
    changelog: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
    ancestors: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionAncestryDto>, {
        nullable: true;
    }>;
    descendants: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionAncestryDto>, {
        nullable: true;
    }>;
}>, never, {
    readonly status: "draft" | "published" | "deprecated" | "archived";
} & {
    readonly created_at: string;
} & {
    readonly changelog?: string | undefined;
} & {
    readonly version_tag: (string & import("effect/Brand").Brand<"DatasetVersion">) | (string & import("effect/Brand").Brand<"DatasetHash">) | (("latest" | "dev") & import("effect/Brand").Brand<"DatasetTag">);
} & {
    readonly ancestors?: readonly AmpRegistryDatasetVersionAncestryDto[] | undefined;
} & {
    readonly dataset_reference: string;
} & {
    readonly descendants?: readonly AmpRegistryDatasetVersionAncestryDto[] | undefined;
}, {}, {}>;
export declare class AmpRegistryDatasetVersionDto extends AmpRegistryDatasetVersionDto_base {
}
declare const AmpRegistryDatasetDto_base: Schema.Class<AmpRegistryDatasetDto, {
    namespace: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetNamespace">;
    name: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetName">;
    created_at: typeof Schema.String;
    updated_at: typeof Schema.String;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    indexing_chains: Schema.Array$<typeof Schema.String>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
    visibility: Schema.Literal<["private", "public"]>;
    owner: Schema.Union<[typeof Schema.NonEmptyTrimmedString, Schema.refine<`0x${string}`, Schema.Schema<string, string, never>>]>;
    dataset_reference: Schema.optionalWith<Schema.refine<string, typeof Schema.String>, {
        nullable: true;
    }>;
    latest_version: Schema.optionalWith<typeof AmpRegistryDatasetVersionDto, {
        nullable: true;
    }>;
    versions: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionDto>, {
        nullable: true;
    }>;
}, Schema.Struct.Encoded<{
    namespace: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetNamespace">;
    name: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetName">;
    created_at: typeof Schema.String;
    updated_at: typeof Schema.String;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    indexing_chains: Schema.Array$<typeof Schema.String>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
    visibility: Schema.Literal<["private", "public"]>;
    owner: Schema.Union<[typeof Schema.NonEmptyTrimmedString, Schema.refine<`0x${string}`, Schema.Schema<string, string, never>>]>;
    dataset_reference: Schema.optionalWith<Schema.refine<string, typeof Schema.String>, {
        nullable: true;
    }>;
    latest_version: Schema.optionalWith<typeof AmpRegistryDatasetVersionDto, {
        nullable: true;
    }>;
    versions: Schema.optionalWith<Schema.Array$<typeof AmpRegistryDatasetVersionDto>, {
        nullable: true;
    }>;
}>, never, {
    readonly description?: string | undefined;
} & {
    readonly namespace: string & import("effect/Brand").Brand<"DatasetNamespace">;
} & {
    readonly name: string & import("effect/Brand").Brand<"DatasetName">;
} & {
    readonly source?: readonly string[] | undefined;
} & {
    readonly readme?: string | undefined;
} & {
    readonly keywords?: readonly string[] | undefined;
} & {
    readonly license?: string | undefined;
} & {
    readonly visibility: "public" | "private";
} & {
    readonly created_at: string;
} & {
    readonly updated_at: string;
} & {
    readonly latest_version?: AmpRegistryDatasetVersionDto | undefined;
} & {
    readonly versions?: readonly AmpRegistryDatasetVersionDto[] | undefined;
} & {
    readonly indexing_chains: readonly string[];
} & {
    readonly repository_url?: URL | undefined;
} & {
    readonly owner: string;
} & {
    readonly dataset_reference?: string | undefined;
}, {}, {}>;
export declare class AmpRegistryDatasetDto extends AmpRegistryDatasetDto_base {
}
declare const AmpRegistryErrorResponseDto_base: Schema.Class<AmpRegistryErrorResponseDto, {
    error_code: typeof Schema.String;
    error_message: typeof Schema.String;
    request_id: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
}, Schema.Struct.Encoded<{
    error_code: typeof Schema.String;
    error_message: typeof Schema.String;
    request_id: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
}>, never, {
    readonly error_code: string;
} & {
    readonly error_message: string;
} & {
    readonly request_id?: string | undefined;
}, {}, {}>;
export declare class AmpRegistryErrorResponseDto extends AmpRegistryErrorResponseDto_base {
}
declare const DatasetAlreadyExistsError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "Amp/Registry/Errors/DatasetAlreadyExistsError";
} & Readonly<A>;
export declare class DatasetAlreadyExistsError extends DatasetAlreadyExistsError_base<{
    readonly namespace: string;
    readonly name: string;
}> {
}
declare const DatasetNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "Amp/Registry/Errors/DatasetNotFoundError";
} & Readonly<A>;
export declare class DatasetNotFoundError extends DatasetNotFoundError_base<{
    readonly namespace: string;
    readonly name: string;
}> {
}
declare const VersionAlreadyExistsError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "Amp/Registry/Errors/VersionAlreadyExistsError";
} & Readonly<A>;
export declare class VersionAlreadyExistsError extends VersionAlreadyExistsError_base<{
    readonly namespace: string;
    readonly name: string;
    readonly versionTag: string;
}> {
}
declare const DatasetOwnershipError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "Amp/Registry/Errors/DatasetOwnershipError";
} & Readonly<A>;
export declare class DatasetOwnershipError extends DatasetOwnershipError_base<{
    readonly namespace: string;
    readonly name: string;
    readonly actualOwner: string;
    readonly userAddresses: ReadonlyArray<string>;
}> {
}
declare const RegistryApiError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
    readonly _tag: "Amp/Registry/Errors/RegistryApiError";
} & Readonly<A>;
export declare class RegistryApiError extends RegistryApiError_base<{
    readonly status: number;
    readonly errorCode: string;
    readonly message: string;
    readonly requestId?: string | null | undefined;
}> {
}
declare const AmpRegistryInsertDatasetVersionDto_base: Schema.Class<AmpRegistryInsertDatasetVersionDto, {
    status: Schema.Literal<["draft", "published"]>;
    changelog: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
    version_tag: Schema.Union<[Schema.brand<Schema.refine<string, typeof Schema.String>, "DatasetVersion">, Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetHash">, Schema.brand<Schema.Literal<["latest", "dev"]>, "DatasetTag">]>;
    manifest: Schema.Union<[typeof Model.DatasetDerived, typeof Model.DatasetEvmRpc, typeof Model.DatasetEthBeacon, typeof Model.DatasetFirehose]>;
    kind: Schema.Literal<["manifest", "evm-rpc", "eth-beacon", "firehose"]>;
    ancestors: Schema.Array$<Schema.refine<string, typeof Schema.String>>;
}, Schema.Struct.Encoded<{
    status: Schema.Literal<["draft", "published"]>;
    changelog: Schema.optionalWith<typeof Schema.String, {
        nullable: true;
    }>;
    version_tag: Schema.Union<[Schema.brand<Schema.refine<string, typeof Schema.String>, "DatasetVersion">, Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetHash">, Schema.brand<Schema.Literal<["latest", "dev"]>, "DatasetTag">]>;
    manifest: Schema.Union<[typeof Model.DatasetDerived, typeof Model.DatasetEvmRpc, typeof Model.DatasetEthBeacon, typeof Model.DatasetFirehose]>;
    kind: Schema.Literal<["manifest", "evm-rpc", "eth-beacon", "firehose"]>;
    ancestors: Schema.Array$<Schema.refine<string, typeof Schema.String>>;
}>, never, {
    readonly manifest: Model.DatasetDerived | Model.DatasetEvmRpc | Model.DatasetEthBeacon | Model.DatasetFirehose;
} & {
    readonly kind: "manifest" | "evm-rpc" | "eth-beacon" | "firehose";
} & {
    readonly status: "draft" | "published";
} & {
    readonly changelog?: string | undefined;
} & {
    readonly version_tag: (string & import("effect/Brand").Brand<"DatasetVersion">) | (string & import("effect/Brand").Brand<"DatasetHash">) | (("latest" | "dev") & import("effect/Brand").Brand<"DatasetTag">);
} & {
    readonly ancestors: readonly string[];
}, {}, {}>;
export declare class AmpRegistryInsertDatasetVersionDto extends AmpRegistryInsertDatasetVersionDto_base {
}
declare const AmpRegistryInsertDatasetDto_base: Schema.Class<AmpRegistryInsertDatasetDto, {
    namespace: Schema.optionalWith<Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetNamespace">, {
        nullable: true;
    }>;
    name: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetName">;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    indexing_chains: Schema.Array$<typeof Schema.String>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    visibility: Schema.Literal<["public", "private"]>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    version: typeof AmpRegistryInsertDatasetVersionDto;
}, Schema.Struct.Encoded<{
    namespace: Schema.optionalWith<Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetNamespace">, {
        nullable: true;
    }>;
    name: Schema.brand<Schema.refine<string, Schema.filter<typeof Schema.String>>, "DatasetName">;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    indexing_chains: Schema.Array$<typeof Schema.String>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    visibility: Schema.Literal<["public", "private"]>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    version: typeof AmpRegistryInsertDatasetVersionDto;
}>, never, {
    readonly description?: string | undefined;
} & {
    readonly namespace?: (string & import("effect/Brand").Brand<"DatasetNamespace">) | undefined;
} & {
    readonly name: string & import("effect/Brand").Brand<"DatasetName">;
} & {
    readonly source?: readonly string[] | undefined;
} & {
    readonly readme?: string | undefined;
} & {
    readonly keywords?: readonly string[] | undefined;
} & {
    readonly license?: string | undefined;
} & {
    readonly visibility: "public" | "private";
} & {
    readonly version: AmpRegistryInsertDatasetVersionDto;
} & {
    readonly indexing_chains: readonly string[];
} & {
    readonly repository_url?: URL | undefined;
}, {}, {}>;
export declare class AmpRegistryInsertDatasetDto extends AmpRegistryInsertDatasetDto_base {
}
declare const AmpRegistryUpdateDatasetMetadataDto_base: Schema.Class<AmpRegistryUpdateDatasetMetadataDto, {
    indexing_chains: Schema.Array$<typeof Schema.String>;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
}, Schema.Struct.Encoded<{
    indexing_chains: Schema.Array$<typeof Schema.String>;
    description: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    keywords: Schema.optionalWith<Schema.Array$<Schema.SchemaClass<string, string, never>>, {
        nullable: true;
    }>;
    readme: Schema.optionalWith<Schema.Schema<string, string, never>, {
        nullable: true;
    }>;
    repository_url: Schema.optionalWith<Schema.Schema<URL, string, never>, {
        nullable: true;
    }>;
    license: Schema.optionalWith<Schema.SchemaClass<string, string, never>, {
        nullable: true;
    }>;
    source: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
        nullable: true;
    }>;
}>, never, {
    readonly description?: string | undefined;
} & {
    readonly source?: readonly string[] | undefined;
} & {
    readonly readme?: string | undefined;
} & {
    readonly keywords?: readonly string[] | undefined;
} & {
    readonly license?: string | undefined;
} & {
    readonly indexing_chains: readonly string[];
} & {
    readonly repository_url?: URL | undefined;
}, {}, {}>;
export declare class AmpRegistryUpdateDatasetMetadataDto extends AmpRegistryUpdateDatasetMetadataDto_base {
}
export {};
//# sourceMappingURL=AmpRegistry.d.ts.map