@lukoweb/apitogo 0.1.86 → 0.1.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +11656 -2919
- package/dist/declarations/cli/platform/apply/index.d.ts +3 -0
- package/dist/declarations/cli/platform/client/deploy-server.d.ts +16 -0
- package/dist/declarations/cli/platform/client/platform-api.d.ts +397 -0
- package/dist/declarations/cli/platform/config.d.ts +20 -0
- package/dist/declarations/cli/platform/errors.d.ts +16 -0
- package/dist/declarations/cli/platform/helpers/backend-packaging.d.ts +11 -0
- package/dist/declarations/cli/platform/helpers/deploy-artifact-hash.d.ts +14 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-backend-job.d.ts +25 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-backend.d.ts +11 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-landing.d.ts +99 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-manifest.d.ts +167 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-plan-sync.d.ts +20 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-secrets.d.ts +61 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-settings-kinds.d.ts +8 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-site-api-url.d.ts +12 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-site-validation.d.ts +22 -0
- package/dist/declarations/cli/platform/helpers/dev-portal-urls.d.ts +17 -0
- package/dist/declarations/cli/platform/helpers/fetch-retry.d.ts +17 -0
- package/dist/declarations/cli/platform/helpers/free-projects-quota.d.ts +14 -0
- package/dist/declarations/cli/platform/helpers/gateway-plan-sync.d.ts +26 -0
- package/dist/declarations/cli/platform/helpers/gateway-readiness.d.ts +11 -0
- package/dist/declarations/cli/platform/helpers/job-status.d.ts +12 -0
- package/dist/declarations/cli/platform/helpers/merge-dev-portal-settings.d.ts +26 -0
- package/dist/declarations/cli/platform/helpers/npm-build.d.ts +34 -0
- package/dist/declarations/cli/platform/helpers/openapi-gateway-servers.d.ts +23 -0
- package/dist/declarations/cli/platform/helpers/openapi.d.ts +24 -0
- package/dist/declarations/cli/platform/helpers/package-files.d.ts +1 -0
- package/dist/declarations/cli/platform/helpers/paid-gateway-platform-compat.d.ts +22 -0
- package/dist/declarations/cli/platform/helpers/platform-plan-catalog.d.ts +27 -0
- package/dist/declarations/cli/platform/helpers/platform-plan.d.ts +17 -0
- package/dist/declarations/cli/platform/helpers/poll.d.ts +21 -0
- package/dist/declarations/cli/platform/helpers/progress.d.ts +45 -0
- package/dist/declarations/cli/platform/helpers/project-name.d.ts +8 -0
- package/dist/declarations/cli/platform/helpers/public-routes.d.ts +4 -0
- package/dist/declarations/cli/platform/helpers/publish-ledger.d.ts +30 -0
- package/dist/declarations/cli/platform/helpers/publish-preflight.d.ts +60 -0
- package/dist/declarations/cli/platform/helpers/status.d.ts +7 -0
- package/dist/declarations/cli/platform/helpers/stripe-webhook.d.ts +3 -0
- package/dist/declarations/cli/platform/helpers/tarball.d.ts +11 -0
- package/dist/declarations/cli/platform/helpers/validate-dev-portal-readiness.d.ts +48 -0
- package/dist/declarations/cli/platform/helpers/wait-for-gateway-actions.d.ts +9 -0
- package/dist/declarations/cli/platform/helpers/warm-pool.d.ts +35 -0
- package/dist/declarations/cli/platform/helpers/zip.d.ts +6 -0
- package/dist/declarations/cli/platform/tools/backend.d.ts +45 -0
- package/dist/declarations/cli/platform/tools/dev-portal-bootstrap-shared.d.ts +25 -0
- package/dist/declarations/cli/platform/tools/dev-portal-publish.d.ts +45 -0
- package/dist/declarations/cli/platform/tools/dev-portal-site-build.d.ts +12 -0
- package/dist/declarations/cli/platform/tools/dev-portal.d.ts +84 -0
- package/dist/declarations/cli/platform/tools/gateway.d.ts +140 -0
- package/dist/declarations/cli/platform/tools/infrastructure.d.ts +47 -0
- package/dist/declarations/cli/platform/tools/lifecycle.d.ts +40 -0
- package/dist/declarations/cli/platform/tools/platform-plan.d.ts +43 -0
- package/dist/declarations/cli/platform/tools/projects.d.ts +27 -0
- package/dist/declarations/cli/platform/tools/subscription.d.ts +13 -0
- package/docs/cli/commands.md +14 -9
- package/docs/cli/go-live.md +2 -2
- package/docs/cli/setup.md +1 -1
- package/docs/guides/environment-variables.md +1 -1
- package/package.json +14 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function normalizeProjectName(name: string): string;
|
|
2
|
+
export declare function projectNamesMatch(left: string, right: string): boolean;
|
|
3
|
+
export declare function findProjectByNormalizedName<T extends {
|
|
4
|
+
name: string;
|
|
5
|
+
}>(projects: T[], name: string): T | undefined;
|
|
6
|
+
export declare function findProjectByNormalizedNames<T extends {
|
|
7
|
+
name: string;
|
|
8
|
+
}>(projects: T[], names: Array<string | undefined>): T | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DevPortalLocalManifest } from "./dev-portal-manifest.js";
|
|
2
|
+
export declare function normalizeActionKeyFormat(actionKey: string): string;
|
|
3
|
+
export declare function normalizePublicRoute(route: string): string;
|
|
4
|
+
export declare function collectManifestPublicActionKeys(gateway: DevPortalLocalManifest["gateway"] | undefined): string[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface PublishLedgerStep {
|
|
2
|
+
step: string;
|
|
3
|
+
status: "succeeded" | "skipped" | "failed" | "pending";
|
|
4
|
+
startedAt?: string;
|
|
5
|
+
finishedAt?: string;
|
|
6
|
+
durationMs?: number;
|
|
7
|
+
detail?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface PublishLedger {
|
|
10
|
+
version: 1;
|
|
11
|
+
projectId?: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
backendArtifactHash?: string | null;
|
|
14
|
+
backendDeploymentId?: string | null;
|
|
15
|
+
siteArtifactHash?: string | null;
|
|
16
|
+
lastSuccessfulStep?: string | null;
|
|
17
|
+
steps: PublishLedgerStep[];
|
|
18
|
+
}
|
|
19
|
+
export declare const PUBLISH_LEDGER_RELATIVE_PATH = ".apitogo/publish-state.json";
|
|
20
|
+
export declare function publishLedgerPath(siteDirectory: string): string;
|
|
21
|
+
export declare function readPublishLedger(siteDirectory: string): Promise<PublishLedger | null>;
|
|
22
|
+
export declare function writePublishLedger(siteDirectory: string, ledger: PublishLedger): Promise<string>;
|
|
23
|
+
export declare function resolveResumeStepFromLedger(ledger: PublishLedger | null, orderedSteps: readonly string[]): string | undefined;
|
|
24
|
+
export declare function createEmptyPublishLedger(projectId?: string): PublishLedger;
|
|
25
|
+
export declare class StepTimer {
|
|
26
|
+
private readonly startedAt;
|
|
27
|
+
private readonly startedAtIso;
|
|
28
|
+
constructor();
|
|
29
|
+
finish(detail?: unknown): Omit<PublishLedgerStep, "step" | "status">;
|
|
30
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const ALLOWED_RUNTIME_VERSIONS: readonly ["DOTNET_10", "DOTNET_9", "DOTNET_8", "NODE_24_LTS", "NODE_22_LTS", "PYTHON_314", "PYTHON_313", "PYTHON_312", "PYTHON_311", "PYTHON_310"];
|
|
2
|
+
export type AllowedRuntimeVersion = (typeof ALLOWED_RUNTIME_VERSIONS)[number];
|
|
3
|
+
export interface PublishPlanInput {
|
|
4
|
+
sku: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
priceAmount?: number;
|
|
7
|
+
priceCurrency?: string;
|
|
8
|
+
billingPeriod?: string;
|
|
9
|
+
limitsJson?: string;
|
|
10
|
+
includedActionKeys?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface PublishBackendInput {
|
|
13
|
+
sourceDirectory?: string;
|
|
14
|
+
publishDirectory?: string;
|
|
15
|
+
openApiPath?: string;
|
|
16
|
+
runtime?: string;
|
|
17
|
+
runtimeVersion?: string;
|
|
18
|
+
deployed?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface PublishManifestLike {
|
|
21
|
+
plans?: PublishPlanInput[];
|
|
22
|
+
backend?: PublishBackendInput;
|
|
23
|
+
gateway?: {
|
|
24
|
+
limitsJson?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface PublishManifestIssue {
|
|
28
|
+
field: string;
|
|
29
|
+
message: string;
|
|
30
|
+
normalizedValue?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface PublishManifestValidation {
|
|
33
|
+
issues: PublishManifestIssue[];
|
|
34
|
+
corrections: PublishManifestIssue[];
|
|
35
|
+
valid: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare function normalizeBillingPeriodForPlatform(period?: string): string;
|
|
38
|
+
export declare function normalizePriceCurrency(value?: string | null): string;
|
|
39
|
+
export declare function tryNormalizePriceCurrency(value?: string | null): {
|
|
40
|
+
ok: true;
|
|
41
|
+
value: string;
|
|
42
|
+
} | {
|
|
43
|
+
ok: false;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function normalizeRuntimeVersionSlug(runtime?: string | null, version?: string | null): AllowedRuntimeVersion;
|
|
47
|
+
export declare function tryNormalizeRuntimeVersionSlug(runtime?: string | null, version?: string | null): {
|
|
48
|
+
ok: true;
|
|
49
|
+
value: AllowedRuntimeVersion;
|
|
50
|
+
} | {
|
|
51
|
+
ok: false;
|
|
52
|
+
message: string;
|
|
53
|
+
};
|
|
54
|
+
export declare function normalizeRuntime(runtime?: string | null): "dotnet" | "nodejs" | "python";
|
|
55
|
+
export declare function normalizePlanForGatewayApi<T extends PublishPlanInput>(plan: T): T;
|
|
56
|
+
export declare function normalizeManifestForPlatform<T extends PublishManifestLike>(manifest: T): {
|
|
57
|
+
manifest: T;
|
|
58
|
+
corrections: PublishManifestIssue[];
|
|
59
|
+
};
|
|
60
|
+
export declare function validateManifestForPlatformPublish(manifest: PublishManifestLike): PublishManifestValidation;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AgentStatus = "pending" | "running" | "succeeded" | "failed";
|
|
2
|
+
export declare function normalizeInfrastructureStatus(platformStatus: string): AgentStatus;
|
|
3
|
+
export declare function normalizeDeploymentStatus(platformStatus: string): AgentStatus;
|
|
4
|
+
export declare function isTerminalInfrastructureStatus(platformStatus: string): boolean;
|
|
5
|
+
export declare function isTerminalDeploymentStatus(platformStatus: string): boolean;
|
|
6
|
+
export declare const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
7
|
+
export declare const DEFAULT_POLL_TIMEOUT_MS: number;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const STRIPE_WEBHOOK_EVENTS: readonly ["checkout.session.completed", "customer.subscription.updated", "customer.subscription.deleted", "invoice.payment_failed"];
|
|
2
|
+
export type StripeWebhookEvent = (typeof STRIPE_WEBHOOK_EVENTS)[number];
|
|
3
|
+
export declare function formatStripeWebhookEvents(events?: readonly string[]): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEV_PORTAL_DEPLOY_ARCHIVE_ROOT = "dist";
|
|
2
|
+
export interface PackageTarGzOptions {
|
|
3
|
+
archiveRoot?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PackageTarGzResult {
|
|
6
|
+
archivePath: string;
|
|
7
|
+
byteSize: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function packageDirectoryAsTarGz(sourceDirectory: string, options?: PackageTarGzOptions): Promise<PackageTarGzResult>;
|
|
10
|
+
export declare function cleanupArchive(archivePath: string): Promise<void>;
|
|
11
|
+
export declare function isTarGzPath(filePath: string): boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PlatformApiClient, ProjectDto } from "../client/platform-api.js";
|
|
2
|
+
export type ReadinessCheckSeverity = "error" | "warning" | "info";
|
|
3
|
+
export interface ReadinessCheck {
|
|
4
|
+
name: string;
|
|
5
|
+
severity: ReadinessCheckSeverity;
|
|
6
|
+
passed: boolean;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DevPortalManualSteps {
|
|
10
|
+
oidcRedirectUris: Array<{
|
|
11
|
+
providerId: string;
|
|
12
|
+
redirectUri: string;
|
|
13
|
+
}>;
|
|
14
|
+
oidcRedirectUri: string;
|
|
15
|
+
stripeWebhookUrl: string;
|
|
16
|
+
stripeWebhookEvents: readonly string[];
|
|
17
|
+
stripeSuccessUrl: string;
|
|
18
|
+
stripeCancelUrl: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ValidateDevPortalReadinessResult {
|
|
21
|
+
checks: ReadinessCheck[];
|
|
22
|
+
passed: boolean;
|
|
23
|
+
warnings: string[];
|
|
24
|
+
manualSteps: DevPortalManualSteps;
|
|
25
|
+
}
|
|
26
|
+
export interface PostPublishChecklistItem {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
required: boolean;
|
|
30
|
+
completed: boolean;
|
|
31
|
+
url?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function buildPostPublishChecklist(args: {
|
|
34
|
+
stripeRequired: boolean;
|
|
35
|
+
manualSteps: DevPortalManualSteps;
|
|
36
|
+
swaUrl: string | null;
|
|
37
|
+
backendFqdn: string;
|
|
38
|
+
gatewayUrl: string | null;
|
|
39
|
+
}): PostPublishChecklistItem[];
|
|
40
|
+
export declare function appendSetupInProgressChecklistItem(items: PostPublishChecklistItem[], setupStatus: string | undefined, userMessage: string | undefined): PostPublishChecklistItem[];
|
|
41
|
+
export interface ValidateDevPortalReadinessOptions {
|
|
42
|
+
backendFqdn: string;
|
|
43
|
+
project: ProjectDto;
|
|
44
|
+
postDeploy?: boolean;
|
|
45
|
+
expectedPlanCount?: number;
|
|
46
|
+
fetchImpl?: typeof fetch;
|
|
47
|
+
}
|
|
48
|
+
export declare function validateDevPortalReadiness(client: PlatformApiClient, projectId: string, options: ValidateDevPortalReadinessOptions): Promise<ValidateDevPortalReadinessResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
export declare function waitForGatewayActionsRegistered(client: PlatformApiClient, projectId: string, options?: {
|
|
3
|
+
minActionCount?: number;
|
|
4
|
+
timeoutMs?: number;
|
|
5
|
+
pollIntervalMs?: number;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
actionCount: number;
|
|
8
|
+
timedOut: boolean;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CreateProjectRequest, DeployStatusResponse, PlatformApiClient, ProjectDto } from "../client/platform-api.js";
|
|
2
|
+
import type { ProgressReporter } from "./progress.js";
|
|
3
|
+
export declare const WARM_POOL_CAPACITY_TEMPORARILY_UNAVAILABLE = "WARM_POOL_CAPACITY_TEMPORARILY_UNAVAILABLE";
|
|
4
|
+
export declare const WARM_POOL_CREATE_RETRY_BUDGET_MS: number;
|
|
5
|
+
export declare function warmPoolRetryDelayMs(): number;
|
|
6
|
+
export declare function isWarmPoolCapacityUnavailableError(error: unknown): boolean;
|
|
7
|
+
export declare function isWarmPoolInfrastructureReady(project: ProjectDto): boolean;
|
|
8
|
+
export declare function isWarmPoolInfrastructureFailed(project: ProjectDto): boolean;
|
|
9
|
+
export declare function isWarmPoolInfrastructureTerminal(project: ProjectDto): boolean;
|
|
10
|
+
export declare function shouldSkipColdModuleInfrastructureWait(project: ProjectDto, infraStatus?: Pick<DeployStatusResponse, "resourceType" | "status"> | null): boolean;
|
|
11
|
+
export declare function resolvePortalBackendFqdn(project: ProjectDto): string | null;
|
|
12
|
+
export declare const RESERVED_ENDPOINT_URL_AGENT_INSTRUCTION = "Do not share siteUrl, portalApiUrl, gatewayUrl, or any warm-pool hostnames with the user yet \u2014 those addresses are reserved infrastructure and show Azure's default page until the site or backend is actually deployed. Share live URLs only after publish_dev_portal, deploy_backend, or verify_dev_portal_live succeeds.";
|
|
13
|
+
export type ProjectWithoutReservedEndpointUrls<T extends {
|
|
14
|
+
siteUrl?: string | null;
|
|
15
|
+
portalApiUrl?: string | null;
|
|
16
|
+
gatewayUrl?: string | null;
|
|
17
|
+
}> = Omit<T, "siteUrl" | "portalApiUrl" | "gatewayUrl">;
|
|
18
|
+
export declare function omitReservedEndpointUrls<T extends {
|
|
19
|
+
siteUrl?: string | null;
|
|
20
|
+
portalApiUrl?: string | null;
|
|
21
|
+
gatewayUrl?: string | null;
|
|
22
|
+
}>(project: T): ProjectWithoutReservedEndpointUrls<T>;
|
|
23
|
+
export interface WarmPoolBindingWaitResult {
|
|
24
|
+
status: "succeeded" | "failed" | "running";
|
|
25
|
+
timedOut: boolean;
|
|
26
|
+
project: ProjectDto;
|
|
27
|
+
}
|
|
28
|
+
export declare function waitForWarmPoolBinding(client: PlatformApiClient, projectId: string, options?: {
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
pollIntervalMs?: number;
|
|
31
|
+
progress?: ProgressReporter;
|
|
32
|
+
}): Promise<WarmPoolBindingWaitResult>;
|
|
33
|
+
export declare function createProjectWithWarmPoolRetry(client: PlatformApiClient, body: CreateProjectRequest, options?: {
|
|
34
|
+
maxRetryMs?: number;
|
|
35
|
+
}): Promise<ProjectDto>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
import type { ProgressReporter } from "../helpers/progress.js";
|
|
4
|
+
export declare function handleGetBackendSummary(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
5
|
+
projectId?: string;
|
|
6
|
+
}): Promise<string>;
|
|
7
|
+
export declare function handleGetDeploymentStatus(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
8
|
+
projectId?: string;
|
|
9
|
+
deploymentId: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
export declare function handlePackageBackend(args: {
|
|
12
|
+
sourceDirectory: string;
|
|
13
|
+
runtime?: string;
|
|
14
|
+
publishDirectory?: string;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
export declare function handleValidateOpenApi(args: {
|
|
17
|
+
openApiPath: string;
|
|
18
|
+
}): Promise<string>;
|
|
19
|
+
export declare function resolveDeployBackendOpenApiPath(args: {
|
|
20
|
+
openApiPath?: string;
|
|
21
|
+
sourceDirectory: string;
|
|
22
|
+
siteDirectory?: string;
|
|
23
|
+
}): string | undefined;
|
|
24
|
+
export declare function handleDeployBackend(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
25
|
+
projectId?: string;
|
|
26
|
+
sourceDirectory: string;
|
|
27
|
+
siteDirectory?: string;
|
|
28
|
+
publishDirectory?: string;
|
|
29
|
+
openApiPath?: string;
|
|
30
|
+
runtime: string;
|
|
31
|
+
runtimeVersion: string;
|
|
32
|
+
startupCommand?: string;
|
|
33
|
+
healthCheckPath?: string;
|
|
34
|
+
environmentVariables?: Record<string, string>;
|
|
35
|
+
secrets?: Record<string, string>;
|
|
36
|
+
forceRedeploy?: boolean;
|
|
37
|
+
wait?: boolean;
|
|
38
|
+
timeoutMs?: number;
|
|
39
|
+
pollIntervalMs?: number;
|
|
40
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
41
|
+
export declare function handleUpdateOpenApi(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
42
|
+
projectId?: string;
|
|
43
|
+
openApiPath: string;
|
|
44
|
+
}): Promise<string>;
|
|
45
|
+
export declare function isBackendDeploymentHealthy(client: PlatformApiClient, projectId: string): Promise<boolean>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
import type { ProgressReporter } from "../helpers/progress.js";
|
|
4
|
+
export interface StepRecord {
|
|
5
|
+
step: string;
|
|
6
|
+
status: string;
|
|
7
|
+
detail?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare class BootstrapStepError extends Error {
|
|
10
|
+
readonly failedStep: string;
|
|
11
|
+
readonly recoveryHint: string;
|
|
12
|
+
constructor(failedStep: string, message: string, recoveryHint: string);
|
|
13
|
+
}
|
|
14
|
+
export declare function parseHandlerResult<T extends {
|
|
15
|
+
status: string;
|
|
16
|
+
}>(json: string, step: string): T;
|
|
17
|
+
export declare function ensureModuleProvisioned(client: PlatformApiClient, config: ApitogoConfig, projectId: string, moduleType: string, wait: boolean, timeoutMs?: number, pollIntervalMs?: number, progress?: ProgressReporter): Promise<void>;
|
|
18
|
+
export declare function ensureModulesProvisioned(client: PlatformApiClient, config: ApitogoConfig, projectId: string, moduleTypes: string[], wait: boolean, timeoutMs?: number, pollIntervalMs?: number, progress?: ProgressReporter): Promise<void>;
|
|
19
|
+
export declare function resolveProjectIdForPublish(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
20
|
+
projectId?: string;
|
|
21
|
+
projectName?: string;
|
|
22
|
+
}, wait: boolean, progress?: ProgressReporter, timeoutMs?: number, pollIntervalMs?: number): Promise<{
|
|
23
|
+
projectId: string;
|
|
24
|
+
completedSteps: StepRecord[];
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
import { type DevPortalLocalManifest } from "../helpers/dev-portal-manifest.js";
|
|
4
|
+
import { type DevPortalLocalSecrets } from "../helpers/dev-portal-secrets.js";
|
|
5
|
+
import type { ProgressReporter } from "../helpers/progress.js";
|
|
6
|
+
import { type PlatformPlanChoice } from "./platform-plan.js";
|
|
7
|
+
export declare const PUBLISH_STEPS: readonly ["resolve_project", "upsert_gateway_plans", "update_dev_portal_settings", "configure_gateway_baseline", "deploy_backend", "sync_gateway_plan_actions", "apply_public_routes", "sync_dev_portal_plan_catalog", "build_dev_portal_site", "deploy_dev_portal"];
|
|
8
|
+
export type PublishStepId = (typeof PUBLISH_STEPS)[number];
|
|
9
|
+
export declare const APPLY_RESOURCES: readonly ["apihub", "portal-backend", "portal-frontend"];
|
|
10
|
+
export type ApplyResource = (typeof APPLY_RESOURCES)[number];
|
|
11
|
+
export declare const PUBLISH_STEPS_BY_RESOURCE: Record<ApplyResource, readonly PublishStepId[]>;
|
|
12
|
+
export declare function parseApplyResources(raw: string | string[] | undefined): ApplyResource[] | undefined;
|
|
13
|
+
export declare function resolveApplyResources(only?: ApplyResource[]): Set<ApplyResource>;
|
|
14
|
+
export declare function resourceForPublishStep(step: PublishStepId): ApplyResource | null;
|
|
15
|
+
export interface PublishDevPortalArgs {
|
|
16
|
+
sourceDirectory: string;
|
|
17
|
+
projectId?: string;
|
|
18
|
+
projectName?: string;
|
|
19
|
+
platformPlan?: PlatformPlanChoice;
|
|
20
|
+
wait?: boolean;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
pollIntervalMs?: number;
|
|
23
|
+
only?: ApplyResource[];
|
|
24
|
+
force?: boolean;
|
|
25
|
+
resumeFromStep?: PublishStepId;
|
|
26
|
+
}
|
|
27
|
+
export type ApplyFromSiteDirectoryArgs = PublishDevPortalArgs;
|
|
28
|
+
export declare function validateManifestForPublish(manifest: DevPortalLocalManifest, secrets: DevPortalLocalSecrets, emailOptions?: {
|
|
29
|
+
platformManagedEmail?: boolean;
|
|
30
|
+
emailDomainStatus?: string;
|
|
31
|
+
}): DevPortalLocalManifest;
|
|
32
|
+
export declare function runApplyFromSiteDirectory(client: PlatformApiClient, config: ApitogoConfig, args: ApplyFromSiteDirectoryArgs, progress?: ProgressReporter): Promise<string>;
|
|
33
|
+
export declare function handlePublishDevPortal(client: PlatformApiClient, config: ApitogoConfig, args: PublishDevPortalArgs, progress?: ProgressReporter): Promise<string>;
|
|
34
|
+
export declare function handleSyncGatewayPlansFromManifest(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
35
|
+
sourceDirectory: string;
|
|
36
|
+
projectId?: string;
|
|
37
|
+
syncActionsOnly?: boolean;
|
|
38
|
+
}): Promise<string>;
|
|
39
|
+
export declare function handleVerifyDevPortalLive(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
40
|
+
projectId?: string;
|
|
41
|
+
sourceDirectory?: string;
|
|
42
|
+
backendFqdn?: string;
|
|
43
|
+
retries?: number;
|
|
44
|
+
retryDelayMs?: number;
|
|
45
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import type { ApitogoConfig } from "../config.js";
|
|
3
|
+
import { patchSiteApiBaseUrl } from "../helpers/dev-portal-site-api-url.js";
|
|
4
|
+
import type { ProgressReporter } from "../helpers/progress.js";
|
|
5
|
+
export { patchSiteApiBaseUrl };
|
|
6
|
+
export declare function handleBuildDevPortalSite(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
7
|
+
sourceDirectory: string;
|
|
8
|
+
projectId?: string;
|
|
9
|
+
apiBaseUrl?: string;
|
|
10
|
+
gatewayUrl?: string;
|
|
11
|
+
nodeVersion?: string;
|
|
12
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
import { type PatchDevPortalSettingsInput } from "../helpers/merge-dev-portal-settings.js";
|
|
4
|
+
import type { ProgressReporter } from "../helpers/progress.js";
|
|
5
|
+
export declare function handleGetDevPortalBackend(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
6
|
+
projectId?: string;
|
|
7
|
+
}): Promise<string>;
|
|
8
|
+
export declare function handleGetDevPortalSettings(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
9
|
+
projectId?: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
export declare function handleUpdateDevPortalSettings(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
12
|
+
projectId?: string;
|
|
13
|
+
gitHubOwner: string;
|
|
14
|
+
gitHubRepo: string;
|
|
15
|
+
defaultBranch?: string;
|
|
16
|
+
pagesPath: string;
|
|
17
|
+
logoValue?: string;
|
|
18
|
+
logoDarkValue?: string;
|
|
19
|
+
logoKind: string;
|
|
20
|
+
openApiSourceKind: string;
|
|
21
|
+
openApiValue?: string;
|
|
22
|
+
authConfigJson?: string;
|
|
23
|
+
authSecretsJson?: string;
|
|
24
|
+
stripeSecretKey?: string;
|
|
25
|
+
stripeWebhookSecret?: string;
|
|
26
|
+
stripeSuccessUrl?: string;
|
|
27
|
+
stripeCancelUrl?: string;
|
|
28
|
+
wait?: boolean;
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
pollIntervalMs?: number;
|
|
31
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
32
|
+
export declare function handlePatchDevPortalSettings(client: PlatformApiClient, config: ApitogoConfig, args: PatchDevPortalSettingsInput & {
|
|
33
|
+
projectId?: string;
|
|
34
|
+
wait?: boolean;
|
|
35
|
+
timeoutMs?: number;
|
|
36
|
+
pollIntervalMs?: number;
|
|
37
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
38
|
+
export declare function handleWaitForDevPortalBackendUpdate(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
39
|
+
projectId?: string;
|
|
40
|
+
jobId?: string;
|
|
41
|
+
timeoutMs?: number;
|
|
42
|
+
pollIntervalMs?: number;
|
|
43
|
+
baselineJobIds?: Set<string>;
|
|
44
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
45
|
+
export declare function resolveDevPortalApiBaseUrl(client: PlatformApiClient, projectId: string, apiBaseUrl?: string): Promise<string>;
|
|
46
|
+
export declare function handleGetDevPortalDeployConfig(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
47
|
+
projectId?: string;
|
|
48
|
+
}): Promise<string>;
|
|
49
|
+
export declare function handleTriggerDevPortalDeploy(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
50
|
+
projectId?: string;
|
|
51
|
+
wait?: boolean;
|
|
52
|
+
timeoutMs?: number;
|
|
53
|
+
pollIntervalMs?: number;
|
|
54
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
55
|
+
export declare function handleDeployDevPortal(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
56
|
+
projectId?: string;
|
|
57
|
+
archivePath?: string;
|
|
58
|
+
sourceDirectory?: string;
|
|
59
|
+
env?: string;
|
|
60
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
61
|
+
export declare function handleGetDevPortalDeployStatus(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
62
|
+
projectId?: string;
|
|
63
|
+
jobId: string;
|
|
64
|
+
}): Promise<string>;
|
|
65
|
+
export declare function handleListDevPortalPages(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
66
|
+
projectId?: string;
|
|
67
|
+
}): Promise<string>;
|
|
68
|
+
export declare function handleCreateDevPortalPage(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
69
|
+
projectId?: string;
|
|
70
|
+
name: string;
|
|
71
|
+
}): Promise<string>;
|
|
72
|
+
export declare function handleDeleteDevPortalPage(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
73
|
+
projectId?: string;
|
|
74
|
+
path: string;
|
|
75
|
+
}): Promise<string>;
|
|
76
|
+
export declare function handleRenameDevPortalPage(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
77
|
+
projectId?: string;
|
|
78
|
+
path: string;
|
|
79
|
+
newName: string;
|
|
80
|
+
}): Promise<string>;
|
|
81
|
+
export declare function handleReorderDevPortalPages(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
82
|
+
projectId?: string;
|
|
83
|
+
paths: string[];
|
|
84
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { GatewayActionDto, GatewayAuthConfigDto, PlatformApiClient, UpdateGatewayAuthRequest } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
export type EnsureGatewayAuthResult = {
|
|
4
|
+
auth: GatewayAuthConfigDto;
|
|
5
|
+
created: boolean;
|
|
6
|
+
updated: boolean;
|
|
7
|
+
skipped: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function ensureGatewayAuthConfigured(client: PlatformApiClient, projectId: string, desired: UpdateGatewayAuthRequest): Promise<EnsureGatewayAuthResult>;
|
|
10
|
+
export type WaitForGatewayEntraResult = {
|
|
11
|
+
auth: GatewayAuthConfigDto;
|
|
12
|
+
status: "ready" | "failed" | "timeout" | "not_applicable";
|
|
13
|
+
};
|
|
14
|
+
export declare function waitForGatewayEntraProvision(client: PlatformApiClient, projectId: string, options?: {
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
pollIntervalMs?: number;
|
|
17
|
+
}): Promise<WaitForGatewayEntraResult>;
|
|
18
|
+
export declare function normalizeActionKey(actionKey: string): string;
|
|
19
|
+
export interface ApplyPublicRoutesResult {
|
|
20
|
+
applied: GatewayActionDto[];
|
|
21
|
+
unresolved: Array<{
|
|
22
|
+
route: string;
|
|
23
|
+
actionKey?: string;
|
|
24
|
+
error: string;
|
|
25
|
+
}>;
|
|
26
|
+
warnings: string[];
|
|
27
|
+
}
|
|
28
|
+
export declare function applyGatewayPublicRoutes(client: PlatformApiClient, projectId: string, routes: string[], options?: {
|
|
29
|
+
knownActions?: GatewayActionDto[];
|
|
30
|
+
}): Promise<ApplyPublicRoutesResult>;
|
|
31
|
+
export declare function handleListGatewayPlans(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
32
|
+
projectId?: string;
|
|
33
|
+
}): Promise<string>;
|
|
34
|
+
export declare function handleCreateGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
35
|
+
projectId?: string;
|
|
36
|
+
sku: string;
|
|
37
|
+
displayName: string;
|
|
38
|
+
limitsJson?: string;
|
|
39
|
+
includedActionKeys?: string[];
|
|
40
|
+
priceAmount?: number;
|
|
41
|
+
priceCurrency?: string;
|
|
42
|
+
billingPeriod?: string;
|
|
43
|
+
sortOrder?: number;
|
|
44
|
+
}): Promise<string>;
|
|
45
|
+
export declare function handleGetGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
46
|
+
projectId?: string;
|
|
47
|
+
planId: string;
|
|
48
|
+
}): Promise<string>;
|
|
49
|
+
export declare function handleUpdateGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
50
|
+
projectId?: string;
|
|
51
|
+
planId: string;
|
|
52
|
+
displayName: string;
|
|
53
|
+
isActive: boolean;
|
|
54
|
+
limitsJson?: string;
|
|
55
|
+
includedActionKeys?: string[];
|
|
56
|
+
priceAmount?: number;
|
|
57
|
+
priceCurrency?: string;
|
|
58
|
+
billingPeriod?: string;
|
|
59
|
+
sortOrder?: number;
|
|
60
|
+
}): Promise<string>;
|
|
61
|
+
export declare function handlePatchGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
62
|
+
projectId?: string;
|
|
63
|
+
planId: string;
|
|
64
|
+
displayName?: string;
|
|
65
|
+
isActive?: boolean;
|
|
66
|
+
limitsJson?: string | null;
|
|
67
|
+
includedActionKeys?: string[];
|
|
68
|
+
priceAmount?: number;
|
|
69
|
+
priceCurrency?: string;
|
|
70
|
+
billingPeriod?: string;
|
|
71
|
+
sortOrder?: number;
|
|
72
|
+
}): Promise<string>;
|
|
73
|
+
export declare function handleAddActionsToGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
74
|
+
projectId?: string;
|
|
75
|
+
planId: string;
|
|
76
|
+
actionKeys: string[];
|
|
77
|
+
}): Promise<string>;
|
|
78
|
+
export declare function handleRemoveActionsFromGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
79
|
+
projectId?: string;
|
|
80
|
+
planId: string;
|
|
81
|
+
actionKeys: string[];
|
|
82
|
+
}): Promise<string>;
|
|
83
|
+
export declare function handleDeleteGatewayPlan(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
84
|
+
projectId?: string;
|
|
85
|
+
planId: string;
|
|
86
|
+
}): Promise<string>;
|
|
87
|
+
export declare function handleGetGatewaySettings(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
88
|
+
projectId?: string;
|
|
89
|
+
}): Promise<string>;
|
|
90
|
+
export declare function handleUpdateGatewaySettings(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
91
|
+
projectId?: string;
|
|
92
|
+
limitsJson?: string | null;
|
|
93
|
+
subscriptionRequired?: boolean;
|
|
94
|
+
}): Promise<string>;
|
|
95
|
+
export declare function handleGetGatewayAuth(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
96
|
+
projectId?: string;
|
|
97
|
+
}): Promise<string>;
|
|
98
|
+
export declare function handleUpdateGatewayAuth(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
99
|
+
projectId?: string;
|
|
100
|
+
authMode: string;
|
|
101
|
+
oidcMetadataUrl?: string;
|
|
102
|
+
oidcAllowedIssuers?: string[];
|
|
103
|
+
oidcAudiences?: string[];
|
|
104
|
+
}): Promise<string>;
|
|
105
|
+
export declare function handleListGatewayActions(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
106
|
+
projectId?: string;
|
|
107
|
+
page?: number;
|
|
108
|
+
pageSize?: number;
|
|
109
|
+
fetchAll?: boolean;
|
|
110
|
+
}): Promise<string>;
|
|
111
|
+
export declare function handleSetActionPublic(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
112
|
+
projectId?: string;
|
|
113
|
+
actionKey: string;
|
|
114
|
+
isPublic: boolean;
|
|
115
|
+
}): Promise<string>;
|
|
116
|
+
export declare function handleUpsertEntitlement(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
117
|
+
projectId?: string;
|
|
118
|
+
operation?: string;
|
|
119
|
+
planSku?: string;
|
|
120
|
+
externalUserId?: string;
|
|
121
|
+
idpIssuer?: string;
|
|
122
|
+
idpSubject?: string;
|
|
123
|
+
idempotencyKey?: string;
|
|
124
|
+
}): Promise<string>;
|
|
125
|
+
export declare function handleConfigureGatewayBaseline(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
126
|
+
projectId?: string;
|
|
127
|
+
authMode?: string;
|
|
128
|
+
oidcMetadataUrl?: string;
|
|
129
|
+
oidcAllowedIssuers?: string[];
|
|
130
|
+
oidcAudiences?: string[];
|
|
131
|
+
limitsJson?: string;
|
|
132
|
+
publicHealthActionKey?: string;
|
|
133
|
+
publicRoutes?: string[];
|
|
134
|
+
waitForEntra?: boolean;
|
|
135
|
+
timeoutMs?: number;
|
|
136
|
+
pollIntervalMs?: number;
|
|
137
|
+
}): Promise<string>;
|
|
138
|
+
export declare function handleGetGatewayReadiness(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
139
|
+
projectId?: string;
|
|
140
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { PlatformApiClient } from "../client/platform-api.js";
|
|
2
|
+
import { type ApitogoConfig } from "../config.js";
|
|
3
|
+
import { recentJobMessages, type ProgressReporter } from "../helpers/progress.js";
|
|
4
|
+
export type WaitForJobKind = "module" | "deployment" | "azureInfrastructure" | "projectDeletion" | "devPortalDeploy" | "devPortalBackendUpdate";
|
|
5
|
+
export declare function waitForJobStepLabel(kind: WaitForJobKind, moduleType?: string): string;
|
|
6
|
+
export declare function handleActivateModule(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
7
|
+
projectId?: string;
|
|
8
|
+
moduleType: string;
|
|
9
|
+
}): Promise<string>;
|
|
10
|
+
export declare function handleGetInfrastructureStatus(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
11
|
+
projectId?: string;
|
|
12
|
+
moduleType: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
export declare function handleGetAzureInfrastructureStatus(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
15
|
+
projectId?: string;
|
|
16
|
+
jobId?: string;
|
|
17
|
+
}): Promise<string>;
|
|
18
|
+
export declare function handleRetryAzureInfrastructure(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
19
|
+
projectId?: string;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
export declare function handleListProvisioningJobs(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
22
|
+
projectId?: string;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
export declare function handleGetDeploymentToken(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
25
|
+
projectId?: string;
|
|
26
|
+
regenerate?: boolean;
|
|
27
|
+
}): Promise<string>;
|
|
28
|
+
export declare function handleGetCustomDomain(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
29
|
+
projectId?: string;
|
|
30
|
+
}): Promise<string>;
|
|
31
|
+
export declare function handleSetCustomDomain(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
32
|
+
projectId?: string;
|
|
33
|
+
hostname: string;
|
|
34
|
+
}): Promise<string>;
|
|
35
|
+
export declare function handleDeleteCustomDomain(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
36
|
+
projectId?: string;
|
|
37
|
+
}): Promise<string>;
|
|
38
|
+
export declare function handleWaitForJob(client: PlatformApiClient, config: ApitogoConfig, args: {
|
|
39
|
+
projectId?: string;
|
|
40
|
+
kind: WaitForJobKind;
|
|
41
|
+
moduleType?: string;
|
|
42
|
+
deploymentId?: string;
|
|
43
|
+
jobId?: string;
|
|
44
|
+
timeoutMs?: number;
|
|
45
|
+
pollIntervalMs?: number;
|
|
46
|
+
}, progress?: ProgressReporter): Promise<string>;
|
|
47
|
+
export { recentJobMessages };
|