/** * Production `DeployApiClient` factory for the Sitecore Cloud Deploy API. * * Like `createSitesApiClient` in `recipe/`, this is an options-bound * adapter over the function-style Deploy API surface. It exposes a * curated 80%-use-case subset of the operations exported from * `@sitecoreai-labs/sitecoreai-cli/deploy`: * * - `fetchOrganization*` for org metadata + license * - `fetchProject*` + `createProject` for project navigation * - `fetchEnvironment*` + `createEnvironmentDeployment` for the * environment lifecycle * - `fetchDeployment*` + `deployDeployment` + `uploadDeploymentSource` * for the deploy flow * - `fetchLogList` for environment log access * - `fetchSourceControlIntegrations` + `fetchSourceControlRepository` * for source-control discovery * * The full operation set (60+ functions) remains exported from * `@sitecoreai-labs/sitecoreai-cli/deploy` for callers that need the * long-tail surface (env vars, regenerate context, source-control * provider management, etc.) — bind them yourself by passing * `options` as the first argument. * * This factory exists primarily for shape uniformity with the recipe * surface; it does not add retry, caching, or path-resolution behavior * beyond what the underlying functions already do. * * Note: a few deploy operations are intentionally NOT on this interface * because their signatures don't take a `DeployApiClientOptions`: * - `probeEnvironmentHealth(host, timeoutMs)` — direct HTTP probe by URL * - `resolveHostFromEnvironment(env)` — pure object accessor * - `fetchDeploymentLogs(deploymentId, accessToken)` — takes the access * token directly rather than the full options object * Import these directly from `@sitecoreai-labs/sitecoreai-cli/deploy`. */ import { cancelDeployment, deployDeployment, fetchDeployment, fetchDeploymentStatus, fetchDeployments, uploadDeploymentSource } from "./deployments.js"; import { createEnvironmentDeployment, fetchAllEnvironments, fetchEnvironment, fetchEnvironmentDeployments, fetchEnvironments } from "./environments.js"; import { fetchLogList } from "./logs.js"; import { createOrganizationDemoSolution, fetchOrganization, fetchOrganizationHealth, fetchOrganizationLicense } from "./organizations.js"; import { createProject, fetchAllProjects, fetchProject, fetchProjectEnvironments, fetchProjects } from "./projects.js"; import { fetchSourceControlIntegrations, fetchSourceControlRepository } from "./source-control.js"; import type { DeployApiClientOptions } from "./common/types.js"; type Tail = F extends (head: DeployApiClientOptions, ...rest: infer R) => infer X ? (...args: R) => X : never; export interface DeployApiClient { readonly options: DeployApiClientOptions; fetchOrganization: Tail; fetchOrganizationHealth: Tail; fetchOrganizationLicense: Tail; createOrganizationDemoSolution: Tail; fetchProjects: Tail; fetchAllProjects: Tail; fetchProject: Tail; createProject: Tail; fetchProjectEnvironments: Tail; fetchEnvironments: Tail; fetchAllEnvironments: Tail; fetchEnvironment: Tail; fetchEnvironmentDeployments: Tail; createEnvironmentDeployment: Tail; fetchDeployments: Tail; fetchDeployment: Tail; fetchDeploymentStatus: Tail; deployDeployment: Tail; cancelDeployment: Tail; uploadDeploymentSource: Tail; fetchLogList: Tail; fetchSourceControlIntegrations: () => ReturnType; fetchSourceControlRepository: Tail; } export declare const createDeployApiClient: (options: DeployApiClientOptions) => DeployApiClient; export {};