@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.
Files changed (60) hide show
  1. package/dist/cli/cli.js +11656 -2919
  2. package/dist/declarations/cli/platform/apply/index.d.ts +3 -0
  3. package/dist/declarations/cli/platform/client/deploy-server.d.ts +16 -0
  4. package/dist/declarations/cli/platform/client/platform-api.d.ts +397 -0
  5. package/dist/declarations/cli/platform/config.d.ts +20 -0
  6. package/dist/declarations/cli/platform/errors.d.ts +16 -0
  7. package/dist/declarations/cli/platform/helpers/backend-packaging.d.ts +11 -0
  8. package/dist/declarations/cli/platform/helpers/deploy-artifact-hash.d.ts +14 -0
  9. package/dist/declarations/cli/platform/helpers/dev-portal-backend-job.d.ts +25 -0
  10. package/dist/declarations/cli/platform/helpers/dev-portal-backend.d.ts +11 -0
  11. package/dist/declarations/cli/platform/helpers/dev-portal-landing.d.ts +99 -0
  12. package/dist/declarations/cli/platform/helpers/dev-portal-manifest.d.ts +167 -0
  13. package/dist/declarations/cli/platform/helpers/dev-portal-plan-sync.d.ts +20 -0
  14. package/dist/declarations/cli/platform/helpers/dev-portal-secrets.d.ts +61 -0
  15. package/dist/declarations/cli/platform/helpers/dev-portal-settings-kinds.d.ts +8 -0
  16. package/dist/declarations/cli/platform/helpers/dev-portal-site-api-url.d.ts +12 -0
  17. package/dist/declarations/cli/platform/helpers/dev-portal-site-validation.d.ts +22 -0
  18. package/dist/declarations/cli/platform/helpers/dev-portal-urls.d.ts +17 -0
  19. package/dist/declarations/cli/platform/helpers/fetch-retry.d.ts +17 -0
  20. package/dist/declarations/cli/platform/helpers/free-projects-quota.d.ts +14 -0
  21. package/dist/declarations/cli/platform/helpers/gateway-plan-sync.d.ts +26 -0
  22. package/dist/declarations/cli/platform/helpers/gateway-readiness.d.ts +11 -0
  23. package/dist/declarations/cli/platform/helpers/job-status.d.ts +12 -0
  24. package/dist/declarations/cli/platform/helpers/merge-dev-portal-settings.d.ts +26 -0
  25. package/dist/declarations/cli/platform/helpers/npm-build.d.ts +34 -0
  26. package/dist/declarations/cli/platform/helpers/openapi-gateway-servers.d.ts +23 -0
  27. package/dist/declarations/cli/platform/helpers/openapi.d.ts +24 -0
  28. package/dist/declarations/cli/platform/helpers/package-files.d.ts +1 -0
  29. package/dist/declarations/cli/platform/helpers/paid-gateway-platform-compat.d.ts +22 -0
  30. package/dist/declarations/cli/platform/helpers/platform-plan-catalog.d.ts +27 -0
  31. package/dist/declarations/cli/platform/helpers/platform-plan.d.ts +17 -0
  32. package/dist/declarations/cli/platform/helpers/poll.d.ts +21 -0
  33. package/dist/declarations/cli/platform/helpers/progress.d.ts +45 -0
  34. package/dist/declarations/cli/platform/helpers/project-name.d.ts +8 -0
  35. package/dist/declarations/cli/platform/helpers/public-routes.d.ts +4 -0
  36. package/dist/declarations/cli/platform/helpers/publish-ledger.d.ts +30 -0
  37. package/dist/declarations/cli/platform/helpers/publish-preflight.d.ts +60 -0
  38. package/dist/declarations/cli/platform/helpers/status.d.ts +7 -0
  39. package/dist/declarations/cli/platform/helpers/stripe-webhook.d.ts +3 -0
  40. package/dist/declarations/cli/platform/helpers/tarball.d.ts +11 -0
  41. package/dist/declarations/cli/platform/helpers/validate-dev-portal-readiness.d.ts +48 -0
  42. package/dist/declarations/cli/platform/helpers/wait-for-gateway-actions.d.ts +9 -0
  43. package/dist/declarations/cli/platform/helpers/warm-pool.d.ts +35 -0
  44. package/dist/declarations/cli/platform/helpers/zip.d.ts +6 -0
  45. package/dist/declarations/cli/platform/tools/backend.d.ts +45 -0
  46. package/dist/declarations/cli/platform/tools/dev-portal-bootstrap-shared.d.ts +25 -0
  47. package/dist/declarations/cli/platform/tools/dev-portal-publish.d.ts +45 -0
  48. package/dist/declarations/cli/platform/tools/dev-portal-site-build.d.ts +12 -0
  49. package/dist/declarations/cli/platform/tools/dev-portal.d.ts +84 -0
  50. package/dist/declarations/cli/platform/tools/gateway.d.ts +140 -0
  51. package/dist/declarations/cli/platform/tools/infrastructure.d.ts +47 -0
  52. package/dist/declarations/cli/platform/tools/lifecycle.d.ts +40 -0
  53. package/dist/declarations/cli/platform/tools/platform-plan.d.ts +43 -0
  54. package/dist/declarations/cli/platform/tools/projects.d.ts +27 -0
  55. package/dist/declarations/cli/platform/tools/subscription.d.ts +13 -0
  56. package/docs/cli/commands.md +14 -9
  57. package/docs/cli/go-live.md +2 -2
  58. package/docs/cli/setup.md +1 -1
  59. package/docs/guides/environment-variables.md +1 -1
  60. package/package.json +14 -2
@@ -0,0 +1,3 @@
1
+ export { runApplyFromSiteDirectory, handlePublishDevPortal, APPLY_RESOURCES, PUBLISH_STEPS, PUBLISH_STEPS_BY_RESOURCE, parseApplyResources, resolveApplyResources, validateManifestForPublish, type ApplyResource, type PublishDevPortalArgs, type ApplyFromSiteDirectoryArgs, type PublishStepId, } from "../tools/dev-portal-publish.js";
2
+ export { PlatformApiClient } from "../client/platform-api.js";
3
+ export { loadConfig, type ApitogoConfig } from "../config.js";
@@ -0,0 +1,16 @@
1
+ export interface UploadDevPortalArchiveParams {
2
+ endpointUrl: string;
3
+ apiKey: string;
4
+ deploymentToken: string;
5
+ env: string;
6
+ archivePath: string;
7
+ }
8
+ export interface UploadDevPortalArchiveResult {
9
+ statusCode: number;
10
+ body?: string;
11
+ }
12
+ export declare class DeployServerError extends Error {
13
+ readonly statusCode: number;
14
+ constructor(message: string, statusCode: number);
15
+ }
16
+ export declare function uploadDevPortalArchive(params: UploadDevPortalArchiveParams): Promise<UploadDevPortalArchiveResult>;
@@ -0,0 +1,397 @@
1
+ import type { ApitogoConfig } from "../config.js";
2
+ export interface TenantDto {
3
+ id: string;
4
+ email: string;
5
+ displayName: string;
6
+ userName?: string;
7
+ name?: string | null;
8
+ freeProjectsAllowance?: number;
9
+ freeProjectsUsed?: number;
10
+ freeProjectsRemaining?: number;
11
+ apiKey?: {
12
+ id: string;
13
+ name: string;
14
+ scopes: string[];
15
+ };
16
+ }
17
+ export interface ProjectModuleStateDto {
18
+ type: string;
19
+ status: string;
20
+ }
21
+ export interface ProjectDto {
22
+ id: string;
23
+ ownerTenantId: string;
24
+ ownerDisplayName: string;
25
+ name: string;
26
+ description?: string | null;
27
+ planTier: string;
28
+ subscriptionLifecycle: string;
29
+ modules: ProjectModuleStateDto[];
30
+ azureStaticWebDefaultHostname?: string | null;
31
+ userCustomDomain?: string | null;
32
+ azureInfrastructureStatus?: string | null;
33
+ siteUrl?: string | null;
34
+ portalApiUrl?: string | null;
35
+ gatewayUrl?: string | null;
36
+ infrastructureMode?: string | null;
37
+ infrastructureStatus?: string | null;
38
+ activationJobId?: string | null;
39
+ setupStatus?: string | null;
40
+ }
41
+ export interface ActivateModuleResponse {
42
+ jobId: string;
43
+ statusUrl: string;
44
+ }
45
+ export interface DeployStatusResponse {
46
+ status: string;
47
+ messages: Array<{
48
+ timestamp: string;
49
+ level: string;
50
+ message: string;
51
+ }>;
52
+ resultUrl?: string | null;
53
+ error?: string | null;
54
+ jobId?: string | null;
55
+ resourceType?: string | null;
56
+ }
57
+ export interface StartBackendDeploymentResponse {
58
+ deploymentId: string;
59
+ jobId: string;
60
+ statusUrl: string;
61
+ reused?: boolean;
62
+ inProgress?: boolean;
63
+ artifactContentSha256?: string | null;
64
+ }
65
+ export interface BackendSummaryDto {
66
+ activeDeploymentId?: string | null;
67
+ lastDeploymentStatus?: string | null;
68
+ runtime?: string | null;
69
+ runtimeVersion?: string | null;
70
+ healthCheckPath: string;
71
+ backendUrl?: string | null;
72
+ artifactContentSha256?: string | null;
73
+ }
74
+ export interface BackendDeployStatusResponse {
75
+ status: string;
76
+ messages: Array<{
77
+ timestamp: string;
78
+ level: string;
79
+ message: string;
80
+ }>;
81
+ resultUrl?: string | null;
82
+ error?: string | null;
83
+ jobId?: string | null;
84
+ deploymentId?: string | null;
85
+ phase?: string | null;
86
+ gatewayUrl?: string | null;
87
+ }
88
+ export interface DeployBackendOptions {
89
+ archivePath: string;
90
+ runtime: string;
91
+ runtimeVersion: string;
92
+ openApiPath?: string;
93
+ startupCommand?: string;
94
+ healthCheckPath?: string;
95
+ environmentVariables?: Record<string, string>;
96
+ secrets?: Record<string, string>;
97
+ forceRedeploy?: boolean;
98
+ }
99
+ export interface GatewayPlanActionDto {
100
+ actionKey: string;
101
+ }
102
+ export interface GatewayPlanDto {
103
+ id: string;
104
+ sku: string;
105
+ sortOrder: number;
106
+ displayName: string;
107
+ isActive: boolean;
108
+ priceAmount?: number;
109
+ priceCurrency?: string;
110
+ billingPeriod?: string;
111
+ limitsJson?: string | null;
112
+ apimProductId?: string | null;
113
+ createdAtUtc: string;
114
+ updatedAtUtc: string;
115
+ includedActions: GatewayPlanActionDto[];
116
+ }
117
+ export interface CreateGatewayPlanRequest {
118
+ sku: string;
119
+ displayName: string;
120
+ limitsJson?: string | null;
121
+ includedActionKeys: string[];
122
+ priceAmount?: number;
123
+ priceCurrency?: string;
124
+ billingPeriod?: string;
125
+ sortOrder?: number;
126
+ }
127
+ export interface GatewayAuthConfigDto {
128
+ authMode: string;
129
+ oidcMetadataUrl?: string | null;
130
+ oidcAllowedIssuers: string[];
131
+ oidcAudiences: string[];
132
+ platformEntraApplicationClientId?: string | null;
133
+ platformEntraProvisionStatus?: string | null;
134
+ platformEntraProvisionError?: string | null;
135
+ updatedAtUtc: string;
136
+ }
137
+ export interface UpdateGatewayAuthRequest {
138
+ authMode: string;
139
+ oidcMetadataUrl?: string | null;
140
+ oidcAllowedIssuers?: string[] | null;
141
+ oidcAudiences?: string[] | null;
142
+ }
143
+ export interface GatewaySettingsDto {
144
+ limitsJson?: string | null;
145
+ subscriptionRequired: boolean;
146
+ updatedAtUtc: string;
147
+ }
148
+ export interface UpdateGatewaySettingsRequest {
149
+ limitsJson?: string | null;
150
+ subscriptionRequired?: boolean | null;
151
+ }
152
+ export interface GatewayActionDto {
153
+ actionKey: string;
154
+ httpMethod: string;
155
+ pathTemplate: string;
156
+ sourceReleaseId?: string | null;
157
+ discoveredAtUtc: string;
158
+ isPublic: boolean;
159
+ }
160
+ export interface GatewayActionPageDto {
161
+ items: GatewayActionDto[];
162
+ page: number;
163
+ pageSize: number;
164
+ totalCount: number;
165
+ }
166
+ export interface GatewayEntitlementOperationRequest {
167
+ operation: string;
168
+ planSku?: string | null;
169
+ externalUserId?: string | null;
170
+ idpIssuer?: string | null;
171
+ idpSubject?: string | null;
172
+ }
173
+ export interface GatewayEntitlementResponse {
174
+ entitlementId: string;
175
+ apimSubscriptionId?: string | null;
176
+ primaryKey?: string | null;
177
+ secondaryKey?: string | null;
178
+ gatewayBaseUrl: string;
179
+ state: string;
180
+ }
181
+ export interface CreateProjectRequest {
182
+ name: string;
183
+ description?: string | null;
184
+ activatedModules?: string[] | null;
185
+ ownerTenantId?: string | null;
186
+ }
187
+ export interface UpdateProjectRequest {
188
+ name: string;
189
+ description?: string | null;
190
+ activatedModules?: string[] | null;
191
+ }
192
+ export interface StartDeployResponse {
193
+ jobId: string;
194
+ }
195
+ export interface ProjectSubscriptionDto {
196
+ planTier: string;
197
+ subscriptionLifecycle: string;
198
+ currentPeriodEnd?: string | null;
199
+ availableCurrencies: string[];
200
+ }
201
+ export interface CheckoutSessionResponse {
202
+ url: string;
203
+ }
204
+ export interface DeploymentTokenResponse {
205
+ token: string;
206
+ }
207
+ export interface ProvisioningJobListItemDto {
208
+ id: string;
209
+ resourceType: string;
210
+ status: string;
211
+ createdAt: string;
212
+ completedAt?: string | null;
213
+ resultUrl?: string | null;
214
+ errorMessage?: string | null;
215
+ }
216
+ export interface ProvisioningJobListResponse {
217
+ jobs: ProvisioningJobListItemDto[];
218
+ }
219
+ export interface UserCustomDomainDnsRecordDto {
220
+ type: string;
221
+ name: string;
222
+ value: string;
223
+ purpose?: string | null;
224
+ }
225
+ export interface UserCustomDomainResponse {
226
+ hostname?: string | null;
227
+ status: string;
228
+ validationMethod: string;
229
+ defaultAzureHostname?: string | null;
230
+ validationToken?: string | null;
231
+ txtRecordFqdn?: string | null;
232
+ cnameName?: string | null;
233
+ cnameTarget?: string | null;
234
+ errorMessage?: string | null;
235
+ dnsRecords: UserCustomDomainDnsRecordDto[];
236
+ }
237
+ export interface SetUserCustomDomainRequest {
238
+ hostname: string;
239
+ }
240
+ export interface DevPortalEmailDnsRecordDto {
241
+ recordType: string;
242
+ name: string;
243
+ value: string;
244
+ ttlSeconds?: number | null;
245
+ }
246
+ export interface DevPortalBackendDto {
247
+ fqdn: string | null;
248
+ containerAppName: string;
249
+ databaseName: string;
250
+ backendConfigured: boolean;
251
+ platformManagedEmail: boolean;
252
+ emailDomainStatus: string;
253
+ emailSenderAddress?: string | null;
254
+ pendingEmailDomainFqdn?: string | null;
255
+ emailDomainError?: string | null;
256
+ isPlatformHostname: boolean;
257
+ platformSiteUrl?: string | null;
258
+ platformPortalApiUrl?: string | null;
259
+ emailDnsRecords: DevPortalEmailDnsRecordDto[];
260
+ }
261
+ export interface DevPortalSetupPhaseDto {
262
+ id: string;
263
+ label: string;
264
+ status: string;
265
+ url?: string | null;
266
+ }
267
+ export interface DevPortalSetupStatusDto {
268
+ overallStatus: string;
269
+ userMessage: string;
270
+ estimatedMinutesRemaining?: number | null;
271
+ phases: DevPortalSetupPhaseDto[];
272
+ isUsingPlatformHostnames: boolean;
273
+ lastUpdatedAtUtc: string;
274
+ }
275
+ export interface DevPortalSettingsDto {
276
+ gitHubOwner: string;
277
+ gitHubRepo: string;
278
+ defaultBranch?: string | null;
279
+ pagesPath: string;
280
+ logoValue?: string | null;
281
+ logoDarkValue?: string | null;
282
+ logoKind: string;
283
+ openApiSourceKind: string;
284
+ openApiValue?: string | null;
285
+ authConfigJson?: string | null;
286
+ hasAuthSecrets: boolean;
287
+ hasStripeSecretKey: boolean;
288
+ hasStripeWebhookSecret: boolean;
289
+ stripeSuccessUrl?: string | null;
290
+ stripeCancelUrl?: string | null;
291
+ backendConfiguredAt?: string | null;
292
+ }
293
+ export interface UpsertDevPortalSettingsRequest {
294
+ gitHubOwner: string;
295
+ gitHubRepo: string;
296
+ defaultBranch?: string | null;
297
+ pagesPath: string;
298
+ logoValue?: string | null;
299
+ logoDarkValue?: string | null;
300
+ logoKind: string;
301
+ openApiSourceKind: string;
302
+ openApiValue?: string | null;
303
+ authConfigJson?: string | null;
304
+ authSecretsJson?: string | null;
305
+ stripeSecretKey?: string | null;
306
+ stripeWebhookSecret?: string | null;
307
+ stripeSuccessUrl?: string | null;
308
+ stripeCancelUrl?: string | null;
309
+ }
310
+ export interface PageFileDto {
311
+ path: string;
312
+ name: string;
313
+ sha: string;
314
+ isFile: boolean;
315
+ order: number;
316
+ }
317
+ export interface DeployConfigDto {
318
+ envVars: Record<string, string>;
319
+ dockerRun: string;
320
+ dockerComposeSnippet?: string | null;
321
+ }
322
+ export interface UpdateGatewayPlanRequest {
323
+ displayName: string;
324
+ isActive: boolean;
325
+ limitsJson?: string | null;
326
+ includedActionKeys: string[];
327
+ priceAmount?: number;
328
+ priceCurrency?: string;
329
+ billingPeriod?: string;
330
+ sortOrder?: number;
331
+ }
332
+ export interface BackendDeploymentDetailDto {
333
+ deploymentId: string;
334
+ projectId: string;
335
+ status: string;
336
+ runtime: string;
337
+ runtimeVersion: string;
338
+ backendUrl?: string | null;
339
+ }
340
+ export declare class PlatformApiClient {
341
+ private readonly config;
342
+ constructor(config: ApitogoConfig);
343
+ private url;
344
+ private headers;
345
+ private request;
346
+ whoami(): Promise<TenantDto>;
347
+ listProjects(): Promise<ProjectDto[]>;
348
+ getProject(projectId: string): Promise<ProjectDto>;
349
+ createProject(body: CreateProjectRequest): Promise<ProjectDto>;
350
+ updateProject(projectId: string, body: UpdateProjectRequest): Promise<ProjectDto>;
351
+ deleteProject(projectId: string): Promise<StartDeployResponse>;
352
+ getSubscription(projectId: string): Promise<ProjectSubscriptionDto>;
353
+ selectFreePlan(projectId: string): Promise<void>;
354
+ createCheckoutSession(projectId: string, body: {
355
+ planSlug: string;
356
+ currency?: string;
357
+ }): Promise<CheckoutSessionResponse>;
358
+ getLatestAzureInfrastructureStatus(projectId: string): Promise<DeployStatusResponse>;
359
+ retryAzureInfrastructure(projectId: string): Promise<StartDeployResponse>;
360
+ getAzureInfrastructureDeployStatus(projectId: string, jobId: string): Promise<DeployStatusResponse>;
361
+ listProvisioningJobs(projectId: string): Promise<ProvisioningJobListResponse>;
362
+ getDeploymentToken(projectId: string, regenerate?: boolean): Promise<DeploymentTokenResponse>;
363
+ getCustomDomain(projectId: string): Promise<UserCustomDomainResponse>;
364
+ setCustomDomain(projectId: string, body: SetUserCustomDomainRequest): Promise<UserCustomDomainResponse>;
365
+ deleteCustomDomain(projectId: string): Promise<void>;
366
+ updateBackendOpenApi(projectId: string, openApiPath: string): Promise<BackendDeploymentDetailDto>;
367
+ getDevPortalBackend(projectId: string): Promise<DevPortalBackendDto | null>;
368
+ getDevPortalSetupStatus(projectId: string): Promise<DevPortalSetupStatusDto>;
369
+ getDevPortalSettings(projectId: string): Promise<DevPortalSettingsDto | null>;
370
+ updateDevPortalSettings(projectId: string, body: UpsertDevPortalSettingsRequest): Promise<DevPortalSettingsDto>;
371
+ getDevPortalDeployConfig(projectId: string): Promise<DeployConfigDto>;
372
+ triggerDevPortalDeploy(projectId: string): Promise<StartDeployResponse>;
373
+ getDevPortalDeployStatus(projectId: string, jobId: string): Promise<DeployStatusResponse>;
374
+ listDevPortalPages(projectId: string): Promise<PageFileDto[]>;
375
+ createDevPortalPage(projectId: string, name: string): Promise<PageFileDto>;
376
+ deleteDevPortalPage(projectId: string, path: string): Promise<void>;
377
+ renameDevPortalPage(projectId: string, path: string, newName: string): Promise<PageFileDto>;
378
+ reorderDevPortalPages(projectId: string, paths: string[]): Promise<void>;
379
+ activateModule(projectId: string, moduleType: string): Promise<ActivateModuleResponse>;
380
+ getInfrastructureStatus(projectId: string, moduleType: string): Promise<DeployStatusResponse>;
381
+ getBackendSummary(projectId: string): Promise<BackendSummaryDto>;
382
+ getDeploymentStatus(projectId: string, deploymentId: string): Promise<BackendDeployStatusResponse>;
383
+ deployBackend(projectId: string, options: DeployBackendOptions): Promise<StartBackendDeploymentResponse>;
384
+ listGatewayPlans(projectId: string): Promise<GatewayPlanDto[]>;
385
+ createGatewayPlan(projectId: string, body: CreateGatewayPlanRequest): Promise<GatewayPlanDto>;
386
+ getGatewayPlan(projectId: string, planId: string): Promise<GatewayPlanDto>;
387
+ updateGatewayPlan(projectId: string, planId: string, body: UpdateGatewayPlanRequest): Promise<GatewayPlanDto>;
388
+ deleteGatewayPlan(projectId: string, planId: string): Promise<void>;
389
+ getGatewayAuth(projectId: string): Promise<GatewayAuthConfigDto>;
390
+ updateGatewayAuth(projectId: string, body: UpdateGatewayAuthRequest): Promise<GatewayAuthConfigDto>;
391
+ getGatewaySettings(projectId: string): Promise<GatewaySettingsDto>;
392
+ updateGatewaySettings(projectId: string, body: UpdateGatewaySettingsRequest): Promise<GatewaySettingsDto>;
393
+ listGatewayActions(projectId: string, page: number, pageSize: number): Promise<GatewayActionPageDto>;
394
+ setGatewayActionPublic(projectId: string, actionKey: string, isPublic: boolean): Promise<GatewayActionDto>;
395
+ upsertGatewayEntitlement(projectId: string, idempotencyKey: string, body: GatewayEntitlementOperationRequest): Promise<GatewayEntitlementResponse>;
396
+ }
397
+ export declare function isNotFoundError(error: unknown): boolean;
@@ -0,0 +1,20 @@
1
+ export interface ApitogoConfig {
2
+ apiUrl: string;
3
+ apiKeyId: string;
4
+ apiSecret: string;
5
+ defaultProjectId?: string;
6
+ devPortalDeployUrl: string;
7
+ devPortalDeployApiKey: string;
8
+ devPortalDeployEnv: string;
9
+ docToolPath?: string;
10
+ createApitogoPackage: string;
11
+ }
12
+ export interface DevPortalDeployConfig {
13
+ endpointUrl: string;
14
+ apiKey: string;
15
+ defaultEnv: string;
16
+ }
17
+ export declare function loadConfig(): ApitogoConfig;
18
+ export declare function resolveProjectId(explicit?: string, config?: ApitogoConfig): string;
19
+ export declare function resolveDevPortalDeployConfig(config: ApitogoConfig): DevPortalDeployConfig;
20
+ export declare const resolveDocDeployConfig: typeof resolveDevPortalDeployConfig;
@@ -0,0 +1,16 @@
1
+ export interface ProblemDetails {
2
+ type?: string;
3
+ title?: string;
4
+ status?: number;
5
+ detail?: string;
6
+ instance?: string;
7
+ [key: string]: unknown;
8
+ }
9
+ export declare class PlatformApiError extends Error {
10
+ readonly status: number;
11
+ readonly problem?: ProblemDetails;
12
+ constructor(message: string, status: number, problem?: ProblemDetails);
13
+ }
14
+ export declare function formatProblemDetails(problem: ProblemDetails): string;
15
+ export declare function parseErrorResponse(response: Response): Promise<PlatformApiError>;
16
+ export declare function toolErrorPayload(error: unknown): string;
@@ -0,0 +1,11 @@
1
+ export type BackendPackagingMode = "source" | "published";
2
+ export interface PrepareBackendPackagingResult {
3
+ directory: string;
4
+ packagingMode: BackendPackagingMode;
5
+ cleanup?: () => Promise<void>;
6
+ }
7
+ export declare function prepareBackendPackagingDirectory(args: {
8
+ sourceDirectory: string;
9
+ runtime: string;
10
+ publishDirectory?: string;
11
+ }): Promise<PrepareBackendPackagingResult>;
@@ -0,0 +1,14 @@
1
+ export declare function sha256File(filePath: string): Promise<string>;
2
+ export declare function sha256Buffer(data: Buffer | string): Promise<string>;
3
+ export declare function hashDirectoryContents(rootDirectory: string): Promise<string>;
4
+ export declare function hashDevPortalSiteSources(siteDirectory: string, options?: {
5
+ gatewayUrl?: string | null;
6
+ }): Promise<string>;
7
+ export declare function buildBackendConfigFingerprint(input: {
8
+ runtime: string;
9
+ runtimeVersion: string;
10
+ startupCommand?: string | null;
11
+ healthCheckPath?: string | null;
12
+ environmentVariables?: Record<string, string> | null;
13
+ secrets?: Record<string, string> | null;
14
+ }): string;
@@ -0,0 +1,25 @@
1
+ import type { PlatformApiClient, ProvisioningJobListItemDto } from "../client/platform-api.js";
2
+ export declare const DEV_PORTAL_BACKEND_UPDATE_RESOURCE_TYPE = "DevPortalBackendUpdate";
3
+ export declare const BACKEND_UPDATE_JOB_APPEARANCE_TIMEOUT_MS = 30000;
4
+ export declare function findBackendUpdateJob(jobs: ProvisioningJobListItemDto[], options?: {
5
+ jobId?: string;
6
+ baselineJobIds?: Set<string>;
7
+ }): ProvisioningJobListItemDto | null;
8
+ export interface DiscoverBackendUpdateJobOptions {
9
+ client: PlatformApiClient;
10
+ projectId: string;
11
+ jobId?: string;
12
+ baselineJobIds?: Set<string>;
13
+ timeoutMs?: number;
14
+ pollIntervalMs?: number;
15
+ }
16
+ export interface DiscoverBackendUpdateJobResult {
17
+ job: ProvisioningJobListItemDto | null;
18
+ timedOut: boolean;
19
+ }
20
+ export declare function discoverBackendUpdateJob(options: DiscoverBackendUpdateJobOptions): Promise<DiscoverBackendUpdateJobResult>;
21
+ export declare function pollBackendUpdateJobStatus(client: PlatformApiClient, projectId: string, jobId: string, options?: {
22
+ timeoutMs?: number;
23
+ pollIntervalMs?: number;
24
+ }): Promise<import("./poll.js").PollResult<import("../client/platform-api.js").DeployStatusResponse>>;
25
+ export declare function snapshotBackendUpdateJobIds(client: PlatformApiClient, projectId: string): Promise<Set<string>>;
@@ -0,0 +1,11 @@
1
+ import type { DevPortalBackendDto, PlatformApiClient } from "../client/platform-api.js";
2
+ export type DevPortalProvisioningState = "not_provisioned" | "provisioned_pending_config" | "ready";
3
+ export type DevPortalEmailOptions = {
4
+ platformManagedEmail?: boolean;
5
+ emailDomainStatus?: string;
6
+ };
7
+ export declare function deriveProvisioningState(backend: DevPortalBackendDto | null): DevPortalProvisioningState;
8
+ export declare function toApiBaseUrl(fqdn: string | null | undefined): string | null;
9
+ export declare function emailOptionsFromBackend(backend: DevPortalBackendDto | null | undefined): DevPortalEmailOptions;
10
+ export declare function resolveEmailOptionsForPublish(client: PlatformApiClient, projectId: string | undefined): Promise<DevPortalEmailOptions | undefined>;
11
+ export declare function formatDevPortalBackendResponse(projectId: string, backend: DevPortalBackendDto | null): Record<string, unknown>;
@@ -0,0 +1,99 @@
1
+ export type LandingLinkInput = {
2
+ label: string;
3
+ href: string;
4
+ };
5
+ export type LandingFeatureInput = {
6
+ title: string;
7
+ description: string;
8
+ icon?: string;
9
+ };
10
+ export type LandingCodeExampleInput = {
11
+ filename?: string;
12
+ language?: string;
13
+ code: string;
14
+ };
15
+ export type LandingHeroInput = {
16
+ title?: string;
17
+ titleAccent?: string;
18
+ subtitle?: string;
19
+ description?: string;
20
+ badge?: string;
21
+ highlights?: string[];
22
+ codeExample?: LandingCodeExampleInput;
23
+ };
24
+ export type LandingFeaturesSectionInput = {
25
+ label?: string;
26
+ title?: string;
27
+ description?: string;
28
+ };
29
+ export type LandingTrustInput = {
30
+ enabled?: boolean;
31
+ title?: string;
32
+ logos?: string[];
33
+ };
34
+ export type LandingApiShowcaseItemInput = {
35
+ name: string;
36
+ path: string;
37
+ icon?: string;
38
+ latency?: string;
39
+ summary?: string;
40
+ };
41
+ export type LandingApiShowcaseInput = {
42
+ enabled?: boolean;
43
+ title?: string;
44
+ subtitle?: string;
45
+ browseAllHref?: string;
46
+ browseAllLabel?: string;
47
+ autoFromOpenApi?: boolean;
48
+ items?: LandingApiShowcaseItemInput[];
49
+ };
50
+ export type LandingPricingCtaInput = {
51
+ enabled?: boolean;
52
+ title?: string;
53
+ description?: string;
54
+ primaryAction?: LandingLinkInput;
55
+ secondaryAction?: LandingLinkInput;
56
+ };
57
+ export type LandingContentInput = {
58
+ hero?: LandingHeroInput;
59
+ featuresSection?: LandingFeaturesSectionInput;
60
+ features?: LandingFeatureInput[];
61
+ primaryAction?: LandingLinkInput;
62
+ secondaryAction?: LandingLinkInput;
63
+ trust?: LandingTrustInput;
64
+ apiShowcase?: LandingApiShowcaseInput;
65
+ pricingCta?: LandingPricingCtaInput;
66
+ showPoweredBy?: boolean;
67
+ };
68
+ export type LandingManifestInput = {
69
+ enabled?: boolean;
70
+ content?: LandingContentInput;
71
+ };
72
+ export type LandingDesignSectionId = "hero" | "trust" | "features" | "apiShowcase" | "pricingCta";
73
+ export type LandingDesignSectionStatus = "empty" | "configured" | "skipped";
74
+ export interface LandingDesignGuideEntry {
75
+ id: LandingDesignSectionId;
76
+ title: string;
77
+ agentPrompt: string;
78
+ status: LandingDesignSectionStatus;
79
+ }
80
+ export declare const LANDING_DESIGN_SECTION_ORDER: LandingDesignSectionId[];
81
+ export declare const LANDING_DESIGN_SECTION_META: Record<LandingDesignSectionId, {
82
+ title: string;
83
+ agentPrompt: string;
84
+ }>;
85
+ type UnknownRecord = Record<string, unknown>;
86
+ export declare function normalizeLandingContentInput(raw: UnknownRecord): LandingContentInput;
87
+ export declare function collectLandingDocLinks(content: LandingContentInput | undefined): string[];
88
+ export declare function mergeLandingContent(existing: LandingContentInput | undefined, patch: LandingContentInput | undefined): LandingContentInput | undefined;
89
+ export declare function mergeLandingManifest(existing: LandingManifestInput | undefined, patch: LandingManifestInput | undefined): LandingManifestInput | undefined;
90
+ export declare function buildLandingDesignGuide(landing: LandingManifestInput | undefined): {
91
+ sections: LandingDesignGuideEntry[];
92
+ nextSection: LandingDesignSectionId | null;
93
+ agentPrompt: string | null;
94
+ };
95
+ export declare function readLandingFromConfig(config: Record<string, unknown>): LandingManifestInput | undefined;
96
+ export declare function applyLandingToConfig(config: Record<string, unknown>, landing: LandingManifestInput | undefined): void;
97
+ export declare function buildSectionLandingPatch(section: LandingDesignSectionId, content: LandingContentInput): LandingManifestInput;
98
+ export declare function resetLandingSection(content: LandingContentInput | undefined, section: LandingDesignSectionId): LandingContentInput;
99
+ export {};