export namespace MetatypeTypegraphUtils {
  export function genReduceb(supertypeId: TypeId, data: Reduce): TypeId;
  export function addGraphqlEndpoint(graphql: string): number;
  export function addAuth(data: Auth): number;
  export function addRawAuth(data: string): number;
  export function oauth2(serviceName: string, scopes: string): string;
  export function oauth2WithoutProfiler(serviceName: string, scopes: string): string;
  export function oauth2WithExtendedProfiler(serviceName: string, scopes: string, extension: string): string;
  export function oauth2WithCustomProfiler(serviceName: string, scopes: string, profiler: TypeId): string;
  export function gqlDeployQuery(params: QueryDeployParams): string;
  export function gqlRemoveQuery(tgName: string[]): string;
  export function unpackTarb64(tarB64: string, dest: string): void;
  export function removeInjections(typeId: TypeId): TypeId;
}
import type { Error } from '../interfaces/metatype-typegraph-core.js';
export { Error };
export type TypeId = number;
export interface ReduceValue {
  inherit: boolean,
  payload?: string,
}
export interface ReducePath {
  path: string[],
  value: ReduceValue,
}
export interface Reduce {
  paths: ReducePath[],
}
export type AuthProtocol = AuthProtocolOauth2 | AuthProtocolJwt | AuthProtocolBasic;
export interface AuthProtocolOauth2 {
  tag: 'oauth2',
}
export interface AuthProtocolJwt {
  tag: 'jwt',
}
export interface AuthProtocolBasic {
  tag: 'basic',
}
export interface Auth {
  name: string,
  protocol: AuthProtocol,
  authData: [string, string][],
}
export interface QueryDeployParams {
  tg: string,
  cliVersion: string,
  secrets?: [string, string][],
}
