import type { RequestOptions } from "../base-client"; import { RequestBuilder } from "../request-builder"; export interface VelocityReport { app_id: string; generated_at: string; workspaces: Array<{ workspace_id: string; active_project_count: number; average_health_score: number; projects_at_risk: number; }>; } export interface TimeReport { app_id: string; period_start: string; period_end: string; total_billable_hours: number; total_hours: number; by_project: Array<{ project_id: string; project_name: string; billable_hours: number; total_hours: number; }>; } export interface ProjectTemplate { id: string; app_id: string; name: string; description?: string; milestone_templates: MilestoneTemplate[]; task_templates: TaskTemplate[]; is_default: boolean; source_project_id?: string; inserted_at: string; updated_at: string; } export interface MilestoneTemplate { name: string; description?: string; position: number; relative_days_offset?: number; tasks: TaskTemplate[]; } export interface TaskTemplate { name: string; description?: string; estimated_hours?: number; labels: string[]; position: number; } export interface CreateTemplateInput { name: string; description?: string; milestone_templates: MilestoneTemplate[]; is_default?: boolean; } /** * Admin projects namespace — ISV template management and cross-workspace analytics. * * @param rb - The request builder used for API communication. * @returns Admin projects namespace with templates, velocity, time, risks, and capabilities sub-namespaces. */ export declare function createProjectsAdminNamespace(rb: RequestBuilder): { /** * Template management sub-namespace (app-scoped project templates). */ templates: { /** * List project templates for an application. * * @param appId - The application UUID. * @param options - Optional request options. * @returns Array of ProjectTemplate entries. * * @example * ```typescript * const admin = new GptAdmin({ apiKey: 'sk_srv_...' }); * const templates = await admin.projects.templates.list('app-uuid'); * ``` */ list(appId: string, options?: RequestOptions): Promise; /** * Create a project template for an application. * * @param appId - The application UUID. * @param data - Template creation input. * @param options - Optional request options. * @returns The created ProjectTemplate. * * @example * ```typescript * const tmpl = await admin.projects.templates.create('app-uuid', { * name: 'Sprint Template', * milestone_templates: [], * }); * ``` */ create(appId: string, data: CreateTemplateInput, options?: RequestOptions): Promise; /** * Update a project template. * * @param templateId - The template UUID. * @param data - Partial update input. * @param options - Optional request options. * @returns The updated ProjectTemplate. */ update(templateId: string, data: Partial, options?: RequestOptions): Promise; /** * Delete a project template. * * @param templateId - The template UUID. * @param options - Optional request options. */ destroy(templateId: string, options?: RequestOptions): Promise; /** * Set a template as the default for an application. * * @param templateId - The template UUID. * @param options - Optional request options. * @returns The updated ProjectTemplate. */ setDefault(templateId: string, options?: RequestOptions): Promise; }; /** * Cross-workspace velocity analytics. */ velocity: { /** * Get velocity report across workspaces for an application. * * @param appId - The application UUID. * @param params - Optional filter parameters. * @param options - Optional request options. * @returns VelocityReport with per-workspace metrics. * * @example * ```typescript * const report = await admin.projects.velocity.report('app-uuid'); * console.log(report.workspaces); * ``` */ report(appId: string, params?: { workspace_ids?: string[]; }, options?: RequestOptions): Promise; }; /** * Cross-workspace time tracking analytics. */ time: { /** * Get time tracking report across workspaces for an application. * * @param appId - The application UUID. * @param params - Optional date range parameters. * @param options - Optional request options. * @returns TimeReport with per-project billable hours. * * @example * ```typescript * const report = await admin.projects.time.report('app-uuid', { * start_date: '2026-01-01', * end_date: '2026-03-31', * }); * ``` */ report(appId: string, params?: { start_date?: string; end_date?: string; }, options?: RequestOptions): Promise; }; /** * Cross-workspace risk management. */ risks: { /** * List all open risks across workspaces for an application. * * @param appId - The application UUID. * @param options - Optional request options. * @returns Array of risk records. * * @example * ```typescript * const risks = await admin.projects.risks.listOpen('app-uuid'); * ``` */ listOpen(appId: string, options?: RequestOptions): Promise; }; /** * Capability management for the projects domain. */ capabilities: { /** * Enable the projects capability for an application. * * @param appId - The application UUID. * @param options - Optional request options. */ enable(appId: string, options?: RequestOptions): Promise; /** * Disable the projects capability for an application. * * @param appId - The application UUID. * @param options - Optional request options. */ disable(appId: string, options?: RequestOptions): Promise; /** * Enable the projects AI capability for an application. * * @param appId - The application UUID. * @param options - Optional request options. */ enableAi(appId: string, options?: RequestOptions): Promise; /** * Disable the projects AI capability for an application. * * @param appId - The application UUID. * @param options - Optional request options. */ disableAi(appId: string, options?: RequestOptions): Promise; }; }; /** Named type for the admin projects namespace return value */ export type ProjectsAdminNamespace = ReturnType; //# sourceMappingURL=projects.d.ts.map