@graph8/sdk 0.251.0 → 0.260.0
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/README.md +9 -2
- package/dist/cli.js +216 -0
- package/dist/index.d.mts +104 -7
- package/dist/index.d.ts +104 -7
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +102 -7
- package/dist/react.d.ts +102 -7
- package/dist/react.js +62 -11
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +53 -12
- package/dist/react.mjs.map +1 -1
- package/dist/types/README.md +7 -0
- package/dist/types/agency.d.ts +20 -0
- package/dist/types/agentSetup.d.ts +57 -0
- package/dist/types/api.d.ts +127 -0
- package/dist/types/appClient.d.ts +99 -0
- package/dist/types/appPlatform.d.ts +269 -0
- package/dist/types/appTokens.d.ts +125 -0
- package/dist/types/apps.d.ts +130 -0
- package/dist/types/audiences.d.ts +88 -0
- package/dist/types/calendar.d.ts +55 -0
- package/dist/types/campaigns.d.ts +61 -0
- package/dist/types/chat.d.ts +35 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/companies.d.ts +123 -0
- package/dist/types/contacts.d.ts +200 -0
- package/dist/types/copilot.d.ts +31 -0
- package/dist/types/core.d.ts +1052 -0
- package/dist/types/deals.d.ts +215 -0
- package/dist/types/enrich.d.ts +51 -0
- package/dist/types/fields.d.ts +84 -0
- package/dist/types/forms.d.ts +16 -0
- package/dist/types/http.d.ts +141 -0
- package/dist/types/inbox.d.ts +123 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/intent.d.ts +196 -0
- package/dist/types/lists.d.ts +44 -0
- package/dist/types/mailboxes.d.ts +240 -0
- package/dist/types/marketplace.d.ts +62 -0
- package/dist/types/meetings.d.ts +70 -0
- package/dist/types/newsletter.d.ts +212 -0
- package/dist/types/notes.d.ts +57 -0
- package/dist/types/objects.d.ts +281 -0
- package/dist/types/pipelines.d.ts +135 -0
- package/dist/types/quotes.d.ts +143 -0
- package/dist/types/react.d.ts +978 -0
- package/dist/types/search.d.ts +99 -0
- package/dist/types/sequences.d.ts +255 -0
- package/dist/types/signals.d.ts +28 -0
- package/dist/types/skills.d.ts +176 -0
- package/dist/types/snippet.d.ts +24 -0
- package/dist/types/studio.d.ts +161 -0
- package/dist/types/tasks.d.ts +101 -0
- package/dist/types/types.d.ts +45 -0
- package/dist/types/utils.d.ts +21 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types/visitors.d.ts +29 -0
- package/dist/types/voice.d.ts +304 -0
- package/dist/types/webhooks.d.ts +71 -0
- package/dist/types/workflows.d.ts +229 -0
- package/docs/agents.md +748 -0
- package/docs/api/README.md +165 -0
- package/docs/api/accounts.d.ts +396 -0
- package/docs/api/accounts.md +644 -0
- package/docs/api/adCampaigns.d.ts +707 -0
- package/docs/api/adCampaigns.md +1091 -0
- package/docs/api/adCreatives.d.ts +996 -0
- package/docs/api/adCreatives.md +1708 -0
- package/docs/api/agency.d.ts +556 -0
- package/docs/api/agency.md +845 -0
- package/docs/api/agent.d.ts +330 -0
- package/docs/api/agent.md +514 -0
- package/docs/api/agents.d.ts +1622 -0
- package/docs/api/agents.md +2860 -0
- package/docs/api/aiInbox.d.ts +1984 -0
- package/docs/api/aiInbox.md +3490 -0
- package/docs/api/analytics.d.ts +1273 -0
- package/docs/api/analytics.md +2095 -0
- package/docs/api/apiKeys.d.ts +252 -0
- package/docs/api/apiKeys.md +318 -0
- package/docs/api/appDeployments.d.ts +236 -0
- package/docs/api/appDeployments.md +471 -0
- package/docs/api/appDomains.d.ts +171 -0
- package/docs/api/appDomains.md +281 -0
- package/docs/api/appLogs.d.ts +120 -0
- package/docs/api/appLogs.md +159 -0
- package/docs/api/appObjects.d.ts +415 -0
- package/docs/api/appObjects.md +568 -0
- package/docs/api/appPages.d.ts +557 -0
- package/docs/api/appPages.md +796 -0
- package/docs/api/appPlatformTokens.d.ts +123 -0
- package/docs/api/appPlatformTokens.md +172 -0
- package/docs/api/appointments.d.ts +2361 -0
- package/docs/api/appointments.md +3917 -0
- package/docs/api/apps.d.ts +822 -0
- package/docs/api/apps.md +1342 -0
- package/docs/api/assertUpsert.d.ts +286 -0
- package/docs/api/assertUpsert.md +370 -0
- package/docs/api/audienceSyncs.d.ts +259 -0
- package/docs/api/audienceSyncs.md +395 -0
- package/docs/api/brandKit.d.ts +686 -0
- package/docs/api/brandKit.md +1133 -0
- package/docs/api/bugReports.d.ts +181 -0
- package/docs/api/bugReports.md +268 -0
- package/docs/api/by-path.md +3260 -0
- package/docs/api/calendarInvites.d.ts +117 -0
- package/docs/api/calendarInvites.md +148 -0
- package/docs/api/campaignWorkflows.d.ts +152 -0
- package/docs/api/campaignWorkflows.md +200 -0
- package/docs/api/campaigns.d.ts +721 -0
- package/docs/api/campaigns.md +1236 -0
- package/docs/api/channels.d.ts +171 -0
- package/docs/api/channels.md +235 -0
- package/docs/api/cliCampaigns.d.ts +205 -0
- package/docs/api/cliCampaigns.md +256 -0
- package/docs/api/cliPipelines.d.ts +324 -0
- package/docs/api/cliPipelines.md +562 -0
- package/docs/api/clickHouse.d.ts +115 -0
- package/docs/api/clickHouse.md +138 -0
- package/docs/api/companies.d.ts +1636 -0
- package/docs/api/companies.md +2211 -0
- package/docs/api/companyIntelligence.d.ts +299 -0
- package/docs/api/companyIntelligence.md +488 -0
- package/docs/api/contacts.d.ts +2173 -0
- package/docs/api/contacts.md +3143 -0
- package/docs/api/content.d.ts +968 -0
- package/docs/api/content.md +1667 -0
- package/docs/api/contentGridSkills.d.ts +177 -0
- package/docs/api/contentGridSkills.md +271 -0
- package/docs/api/copilot.d.ts +1017 -0
- package/docs/api/copilot.md +1765 -0
- package/docs/api/crmSyncs.d.ts +215 -0
- package/docs/api/crmSyncs.md +301 -0
- package/docs/api/customerSuccess.d.ts +491 -0
- package/docs/api/customerSuccess.md +776 -0
- package/docs/api/deals.d.ts +1696 -0
- package/docs/api/deals.md +2432 -0
- package/docs/api/deliverability.d.ts +418 -0
- package/docs/api/deliverability.md +677 -0
- package/docs/api/desk.d.ts +1765 -0
- package/docs/api/desk.md +3007 -0
- package/docs/api/dialer.d.ts +1185 -0
- package/docs/api/dialer.md +2166 -0
- package/docs/api/dialerAnalytics.d.ts +187 -0
- package/docs/api/dialerAnalytics.md +257 -0
- package/docs/api/documents.d.ts +895 -0
- package/docs/api/documents.md +1440 -0
- package/docs/api/duplicates.d.ts +195 -0
- package/docs/api/duplicates.md +315 -0
- package/docs/api/eSign.d.ts +38 -0
- package/docs/api/eSign.md +54 -0
- package/docs/api/eSignature.d.ts +242 -0
- package/docs/api/eSignature.md +341 -0
- package/docs/api/enrichment.d.ts +3207 -0
- package/docs/api/enrichment.md +5225 -0
- package/docs/api/events.d.ts +115 -0
- package/docs/api/events.md +105 -0
- package/docs/api/fields.d.ts +482 -0
- package/docs/api/fields.md +566 -0
- package/docs/api/forms.d.ts +1012 -0
- package/docs/api/forms.md +1542 -0
- package/docs/api/gtmCampaigns.d.ts +662 -0
- package/docs/api/gtmCampaigns.md +1044 -0
- package/docs/api/gtmContext.d.ts +1187 -0
- package/docs/api/gtmContext.md +2112 -0
- package/docs/api/gtmDeliverability.d.ts +60 -0
- package/docs/api/gtmDeliverability.md +63 -0
- package/docs/api/gtmKnowledgeBase.d.ts +76 -0
- package/docs/api/gtmKnowledgeBase.md +91 -0
- package/docs/api/gtmLaunchHelpers.d.ts +123 -0
- package/docs/api/gtmLaunchHelpers.md +148 -0
- package/docs/api/gtmLibrary.d.ts +448 -0
- package/docs/api/gtmLibrary.md +780 -0
- package/docs/api/health.d.ts +39 -0
- package/docs/api/health.md +58 -0
- package/docs/api/imageLibrary.d.ts +341 -0
- package/docs/api/imageLibrary.md +569 -0
- package/docs/api/imports.d.ts +157 -0
- package/docs/api/imports.md +174 -0
- package/docs/api/inbox.d.ts +709 -0
- package/docs/api/inbox.md +1067 -0
- package/docs/api/install.d.ts +213 -0
- package/docs/api/install.md +317 -0
- package/docs/api/installedApps.d.ts +131 -0
- package/docs/api/installedApps.md +241 -0
- package/docs/api/integrationStatus.d.ts +142 -0
- package/docs/api/integrationStatus.md +205 -0
- package/docs/api/integrations.d.ts +2327 -0
- package/docs/api/integrations.md +3791 -0
- package/docs/api/intent.d.ts +482 -0
- package/docs/api/intent.md +858 -0
- package/docs/api/knowledge.d.ts +501 -0
- package/docs/api/knowledge.md +843 -0
- package/docs/api/knowledgeBase.d.ts +84 -0
- package/docs/api/knowledgeBase.md +96 -0
- package/docs/api/landingPages.d.ts +1411 -0
- package/docs/api/landingPages.md +2488 -0
- package/docs/api/leads.d.ts +133 -0
- package/docs/api/leads.md +180 -0
- package/docs/api/library.d.ts +217 -0
- package/docs/api/library.md +338 -0
- package/docs/api/linkedIn.d.ts +227 -0
- package/docs/api/linkedIn.md +289 -0
- package/docs/api/linkedInOutreach.d.ts +727 -0
- package/docs/api/linkedInOutreach.md +990 -0
- package/docs/api/lists.d.ts +1106 -0
- package/docs/api/lists.md +1609 -0
- package/docs/api/logs.d.ts +71 -0
- package/docs/api/logs.md +70 -0
- package/docs/api/mailboxes.d.ts +1050 -0
- package/docs/api/mailboxes.md +1690 -0
- package/docs/api/marketingIntelligence.d.ts +256 -0
- package/docs/api/marketingIntelligence.md +454 -0
- package/docs/api/marketplace.d.ts +3173 -0
- package/docs/api/marketplace.md +5953 -0
- package/docs/api/mcp.d.ts +69 -0
- package/docs/api/mcp.md +69 -0
- package/docs/api/me.d.ts +54 -0
- package/docs/api/me.md +56 -0
- package/docs/api/meetings.d.ts +539 -0
- package/docs/api/meetings.md +747 -0
- package/docs/api/newsletter.d.ts +1613 -0
- package/docs/api/newsletter.md +2746 -0
- package/docs/api/notes.d.ts +517 -0
- package/docs/api/notes.md +888 -0
- package/docs/api/notifications.d.ts +94 -0
- package/docs/api/notifications.md +105 -0
- package/docs/api/objects.d.ts +621 -0
- package/docs/api/objects.md +1098 -0
- package/docs/api/openSearch.d.ts +234 -0
- package/docs/api/openSearch.md +297 -0
- package/docs/api/ops.d.ts +299 -0
- package/docs/api/ops.md +339 -0
- package/docs/api/orgGovernance.d.ts +393 -0
- package/docs/api/orgGovernance.md +623 -0
- package/docs/api/orgVideos.d.ts +184 -0
- package/docs/api/orgVideos.md +252 -0
- package/docs/api/organizationSettings.d.ts +626 -0
- package/docs/api/organizationSettings.md +911 -0
- package/docs/api/phoneNumbers.d.ts +484 -0
- package/docs/api/phoneNumbers.md +777 -0
- package/docs/api/profile.d.ts +329 -0
- package/docs/api/profile.md +540 -0
- package/docs/api/programmaticPages.d.ts +400 -0
- package/docs/api/programmaticPages.md +626 -0
- package/docs/api/providerDomains.d.ts +866 -0
- package/docs/api/providerDomains.md +1446 -0
- package/docs/api/providerUsage.d.ts +129 -0
- package/docs/api/providerUsage.md +186 -0
- package/docs/api/public.d.ts +69 -0
- package/docs/api/public.md +78 -0
- package/docs/api/publicCopilot.d.ts +67 -0
- package/docs/api/publicCopilot.md +80 -0
- package/docs/api/publicSignals.d.ts +66 -0
- package/docs/api/publicSignals.md +71 -0
- package/docs/api/publicVisitors.d.ts +97 -0
- package/docs/api/publicVisitors.md +118 -0
- package/docs/api/quotes.d.ts +1564 -0
- package/docs/api/quotes.md +2553 -0
- package/docs/api/radar.d.ts +808 -0
- package/docs/api/radar.md +1431 -0
- package/docs/api/radarReports.d.ts +208 -0
- package/docs/api/radarReports.md +306 -0
- package/docs/api/recordRoles.d.ts +143 -0
- package/docs/api/recordRoles.md +175 -0
- package/docs/api/repos.d.ts +146 -0
- package/docs/api/repos.md +211 -0
- package/docs/api/research.d.ts +295 -0
- package/docs/api/research.md +534 -0
- package/docs/api/revenue.d.ts +402 -0
- package/docs/api/revenue.md +608 -0
- package/docs/api/revenueAnalytics.d.ts +147 -0
- package/docs/api/revenueAnalytics.md +212 -0
- package/docs/api/revenueLifecycle.d.ts +207 -0
- package/docs/api/revenueLifecycle.md +274 -0
- package/docs/api/revenueRecords.d.ts +372 -0
- package/docs/api/revenueRecords.md +563 -0
- package/docs/api/roles.d.ts +431 -0
- package/docs/api/roles.md +812 -0
- package/docs/api/salesCoach.d.ts +877 -0
- package/docs/api/salesCoach.md +1540 -0
- package/docs/api/sandbox.d.ts +210 -0
- package/docs/api/sandbox.md +380 -0
- package/docs/api/scans.d.ts +104 -0
- package/docs/api/scans.md +136 -0
- package/docs/api/scheduleBuy.d.ts +293 -0
- package/docs/api/scheduleBuy.md +431 -0
- package/docs/api/scraping.d.ts +266 -0
- package/docs/api/scraping.md +383 -0
- package/docs/api/sdrAnalytics.d.ts +138 -0
- package/docs/api/sdrAnalytics.md +246 -0
- package/docs/api/search.d.ts +598 -0
- package/docs/api/search.md +866 -0
- package/docs/api/seo.d.ts +447 -0
- package/docs/api/seo.md +660 -0
- package/docs/api/sequenceLifecycle.d.ts +439 -0
- package/docs/api/sequenceLifecycle.md +513 -0
- package/docs/api/sequences.d.ts +1936 -0
- package/docs/api/sequences.md +3232 -0
- package/docs/api/settings.d.ts +448 -0
- package/docs/api/settings.md +731 -0
- package/docs/api/signals.d.ts +1441 -0
- package/docs/api/signals.md +2526 -0
- package/docs/api/signatures.d.ts +719 -0
- package/docs/api/signatures.md +1247 -0
- package/docs/api/skills.d.ts +230 -0
- package/docs/api/skills.md +466 -0
- package/docs/api/snippet.d.ts +85 -0
- package/docs/api/snippet.md +106 -0
- package/docs/api/socialPublishing.d.ts +824 -0
- package/docs/api/socialPublishing.md +1245 -0
- package/docs/api/studioDocuments.d.ts +244 -0
- package/docs/api/studioDocuments.md +348 -0
- package/docs/api/support.d.ts +90 -0
- package/docs/api/support.md +76 -0
- package/docs/api/suppressions.d.ts +241 -0
- package/docs/api/suppressions.md +343 -0
- package/docs/api/surveys.d.ts +847 -0
- package/docs/api/surveys.md +1223 -0
- package/docs/api/tasks.d.ts +813 -0
- package/docs/api/tasks.md +1344 -0
- package/docs/api/teamMembers.d.ts +668 -0
- package/docs/api/teamMembers.md +1040 -0
- package/docs/api/teams.d.ts +784 -0
- package/docs/api/teams.md +1395 -0
- package/docs/api/usage.d.ts +277 -0
- package/docs/api/usage.md +389 -0
- package/docs/api/visitors.d.ts +690 -0
- package/docs/api/visitors.md +1075 -0
- package/docs/api/voice.d.ts +4661 -0
- package/docs/api/voice.md +7905 -0
- package/docs/api/webAnalytics.d.ts +964 -0
- package/docs/api/webAnalytics.md +1452 -0
- package/docs/api/webChat.d.ts +1704 -0
- package/docs/api/webChat.md +2048 -0
- package/docs/api/webhooks.d.ts +251 -0
- package/docs/api/webhooks.md +386 -0
- package/docs/api/websiteEditor.d.ts +324 -0
- package/docs/api/websiteEditor.md +517 -0
- package/docs/api/work.d.ts +2298 -0
- package/docs/api/work.md +3096 -0
- package/docs/api/workbench.d.ts +2962 -0
- package/docs/api/workbench.md +4884 -0
- package/docs/api/workflows.d.ts +1218 -0
- package/docs/api/workflows.md +2302 -0
- package/docs/sdk-clients.md +4339 -0
- package/package.json +10 -3
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
<!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
|
|
2
|
+
|
|
3
|
+
# `g8.api.appDeployments`: App Deployments
|
|
4
|
+
|
|
5
|
+
7 operations (3 read, 4 write).
|
|
6
|
+
|
|
7
|
+
6 of these also have a hand-written method (`g8.appPlatform`), marked **★** below. Prefer the hand-written method when one exists: it unwraps the `data` envelope and takes friendlier arguments. See [../sdk-clients.md](../sdk-clients.md).
|
|
8
|
+
|
|
9
|
+
Every example below assumes this setup (server-side, API key):
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { g8 } from "@graph8/sdk";
|
|
13
|
+
|
|
14
|
+
g8.init({ apiKey: process.env.G8_API_KEY! });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Example values are placeholders that match each field's type. Only required fields are shown. Every example is type-checked against the SDK in CI.
|
|
18
|
+
|
|
19
|
+
Exact TypeScript types for every operation on this page, and every schema they use: [appDeployments.d.ts](appDeployments.d.ts).
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
| Call | HTTP | Tier | Scope | Summary |
|
|
24
|
+
|---|---|---|---|---|
|
|
25
|
+
| [`createAppDeployment`](#op-createappdeployment) ★ | `POST /api/v1/apps/{app_id}/deployments` | write | `apps:write` | Create App Deployment |
|
|
26
|
+
| [`getActiveDeployment`](#op-getactivedeployment) ★ | `GET /api/v1/apps/{app_id}/deployments/active` | read | `apps:read` | Get Active Deployment |
|
|
27
|
+
| [`getDeployment`](#op-getdeployment) ★ | `GET /api/v1/apps/{app_id}/deployments/{deployment_id}` | read | `apps:read` | Get Deployment |
|
|
28
|
+
| [`listAppDeployments`](#op-listappdeployments) ★ | `GET /api/v1/apps/{app_id}/deployments` | read | `apps:read` | List App Deployments |
|
|
29
|
+
| [`promoteDeployment`](#op-promotedeployment) ★ | `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/promote` | write | `apps:write` | Promote Deployment |
|
|
30
|
+
| [`reportDeploymentProgress`](#op-reportdeploymentprogress) | `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/status` | write | | Report Deployment Progress |
|
|
31
|
+
| [`rollbackDeployment`](#op-rollbackdeployment) ★ | `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/rollback` | write | `apps:write` | Rollback Deployment |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
<a id="op-createappdeployment"></a>
|
|
36
|
+
|
|
37
|
+
### `g8.api.appDeployments.createAppDeployment(input)`
|
|
38
|
+
|
|
39
|
+
**Create App Deployment**
|
|
40
|
+
|
|
41
|
+
- HTTP: `POST /api/v1/apps/{app_id}/deployments`
|
|
42
|
+
- operationId: `create_app_deployment_apps__app_id__deployments_post` (also callable as `g8.api.call("create_app_deployment_apps__app_id__deployments_post", input)`)
|
|
43
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
44
|
+
- API-key scope: `apps:write`
|
|
45
|
+
- ★ Hand-written: [`g8.appPlatform.deploy()`](../sdk-clients.md#g8-appplatform-deploy)
|
|
46
|
+
|
|
47
|
+
Queue a deployment from a pinned source ref.
|
|
48
|
+
|
|
49
|
+
Returns `queued`. Nothing builds yet -- the provisioner (M6-8) is what moves
|
|
50
|
+
it to `building`. Recording the intent before any infrastructure exists is
|
|
51
|
+
deliberate: it makes the control plane the source of truth for what SHOULD be
|
|
52
|
+
running, which is what a reconciler needs to exist against.
|
|
53
|
+
|
|
54
|
+
**Input**
|
|
55
|
+
|
|
56
|
+
| Field | Type | Required | Description |
|
|
57
|
+
|---|---|---|---|
|
|
58
|
+
| `path.app_id` | `string` | yes | |
|
|
59
|
+
| `body` | `CreateDeploymentRequest` | yes | Request body; fields below. |
|
|
60
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
61
|
+
|
|
62
|
+
Body fields (`CreateDeploymentRequest`):
|
|
63
|
+
|
|
64
|
+
| Field | Type | Required | Description |
|
|
65
|
+
|---|---|---|---|
|
|
66
|
+
| `body.source_ref` | `string` | yes | Immutable source reference (commit SHA). Branches move; deployments must not. min length 1, max length 255 |
|
|
67
|
+
| `body.schema_version_id` | `string \| null` | no | Schema version this build expects. Pinned so a rollback restores the matching schema, not merely the matching image. |
|
|
68
|
+
|
|
69
|
+
**Returns** `ApiResponse_DeploymentResponse_`: the envelope `{ data: DeploymentResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
70
|
+
|
|
71
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
72
|
+
|
|
73
|
+
`DeploymentResponse` fields:
|
|
74
|
+
|
|
75
|
+
| Field | Type | Required | Description |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| `app_id` | `string` | yes | |
|
|
78
|
+
| `deployment_id` | `string` | yes | |
|
|
79
|
+
| `status` | `string` | yes | |
|
|
80
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
81
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
82
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
83
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
84
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
85
|
+
| `image_digest` | `string \| null` | no | |
|
|
86
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
87
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
88
|
+
| `source_ref` | `string \| null` | no | |
|
|
89
|
+
|
|
90
|
+
**Example**
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
const result = await g8.api.appDeployments.createAppDeployment({ path: { app_id: "id" }, body: { source_ref: "example" } });
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
<a id="op-getactivedeployment"></a>
|
|
99
|
+
|
|
100
|
+
### `g8.api.appDeployments.getActiveDeployment(input)`
|
|
101
|
+
|
|
102
|
+
**Get Active Deployment**
|
|
103
|
+
|
|
104
|
+
- HTTP: `GET /api/v1/apps/{app_id}/deployments/active`
|
|
105
|
+
- operationId: `get_active_deployment_apps__app_id__deployments_active_get` (also callable as `g8.api.call("get_active_deployment_apps__app_id__deployments_active_get", input)`)
|
|
106
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
107
|
+
- API-key scope: `apps:read`
|
|
108
|
+
- ★ Hand-written: [`g8.appPlatform.activeDeployment()`](../sdk-clients.md#g8-appplatform-activedeployment)
|
|
109
|
+
|
|
110
|
+
What is serving traffic right now, or null.
|
|
111
|
+
|
|
112
|
+
null rather than 404 when nothing is deployed: "this app has never shipped"
|
|
113
|
+
is an answer, and a 404 would read as "no such app".
|
|
114
|
+
|
|
115
|
+
**Input**
|
|
116
|
+
|
|
117
|
+
| Field | Type | Required | Description |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| `path.app_id` | `string` | yes | |
|
|
120
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
121
|
+
|
|
122
|
+
**Returns** `ApiResponse_Union_DeploymentResponse__NoneType__`: the envelope `{ data: DeploymentResponse | null, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
123
|
+
|
|
124
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
125
|
+
|
|
126
|
+
`data` fields:
|
|
127
|
+
|
|
128
|
+
| Field | Type | Required | Description |
|
|
129
|
+
|---|---|---|---|
|
|
130
|
+
| `app_id` | `string` | yes | |
|
|
131
|
+
| `deployment_id` | `string` | yes | |
|
|
132
|
+
| `status` | `string` | yes | |
|
|
133
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
134
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
135
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
136
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
137
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
138
|
+
| `image_digest` | `string \| null` | no | |
|
|
139
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
140
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
141
|
+
| `source_ref` | `string \| null` | no | |
|
|
142
|
+
|
|
143
|
+
**Example**
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
const result = await g8.api.appDeployments.getActiveDeployment({ path: { app_id: "id" } });
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
<a id="op-getdeployment"></a>
|
|
152
|
+
|
|
153
|
+
### `g8.api.appDeployments.getDeployment(input)`
|
|
154
|
+
|
|
155
|
+
**Get Deployment**
|
|
156
|
+
|
|
157
|
+
- HTTP: `GET /api/v1/apps/{app_id}/deployments/{deployment_id}`
|
|
158
|
+
- operationId: `get_deployment_apps__app_id__deployments__deployment_id__get` (also callable as `g8.api.call("get_deployment_apps__app_id__deployments__deployment_id__get", input)`)
|
|
159
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
160
|
+
- API-key scope: `apps:read`
|
|
161
|
+
- ★ Hand-written: [`g8.appPlatform.getDeployment()`](../sdk-clients.md#g8-appplatform-getdeployment)
|
|
162
|
+
|
|
163
|
+
Fetch one deployment.
|
|
164
|
+
|
|
165
|
+
Polling a build is the most common loop in a deploy flow, and without this it
|
|
166
|
+
required listing every deployment and filtering client-side.
|
|
167
|
+
|
|
168
|
+
REGISTERED AFTER `GET /{app_id}/deployments/active`, and the order is
|
|
169
|
+
load-bearing rather than cosmetic. Both are three segments with a literal or a
|
|
170
|
+
parameter in the same position, so declaring this first would capture `active`
|
|
171
|
+
as a deployment id and that endpoint would 404 for everyone. `GET
|
|
172
|
+
/workflows/dispositions` spent months doing exactly that in production.
|
|
173
|
+
|
|
174
|
+
404 rather than 403 for a deployment belonging to someone else's app, because
|
|
175
|
+
a 403 confirms the id exists. `_own_deployment` is the only way this module
|
|
176
|
+
loads one, so a new route cannot skip the ownership check without also having
|
|
177
|
+
nothing to work with.
|
|
178
|
+
|
|
179
|
+
**Input**
|
|
180
|
+
|
|
181
|
+
| Field | Type | Required | Description |
|
|
182
|
+
|---|---|---|---|
|
|
183
|
+
| `path.app_id` | `string` | yes | |
|
|
184
|
+
| `path.deployment_id` | `string` | yes | |
|
|
185
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
186
|
+
|
|
187
|
+
**Returns** `ApiResponse_DeploymentResponse_`: the envelope `{ data: DeploymentResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
188
|
+
|
|
189
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
190
|
+
|
|
191
|
+
`DeploymentResponse` fields:
|
|
192
|
+
|
|
193
|
+
| Field | Type | Required | Description |
|
|
194
|
+
|---|---|---|---|
|
|
195
|
+
| `app_id` | `string` | yes | |
|
|
196
|
+
| `deployment_id` | `string` | yes | |
|
|
197
|
+
| `status` | `string` | yes | |
|
|
198
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
199
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
200
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
201
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
202
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
203
|
+
| `image_digest` | `string \| null` | no | |
|
|
204
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
205
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
206
|
+
| `source_ref` | `string \| null` | no | |
|
|
207
|
+
|
|
208
|
+
**Example**
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
const result = await g8.api.appDeployments.getDeployment({ path: { app_id: "id", deployment_id: "id" } });
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
<a id="op-listappdeployments"></a>
|
|
217
|
+
|
|
218
|
+
### `g8.api.appDeployments.listAppDeployments(input)`
|
|
219
|
+
|
|
220
|
+
**List App Deployments**
|
|
221
|
+
|
|
222
|
+
- HTTP: `GET /api/v1/apps/{app_id}/deployments`
|
|
223
|
+
- operationId: `list_app_deployments_apps__app_id__deployments_get` (also callable as `g8.api.call("list_app_deployments_apps__app_id__deployments_get", input)`)
|
|
224
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
225
|
+
- API-key scope: `apps:read`
|
|
226
|
+
- ★ Hand-written: [`g8.appPlatform.listDeployments()`](../sdk-clients.md#g8-appplatform-listdeployments)
|
|
227
|
+
|
|
228
|
+
Every deployment for this app, newest first.
|
|
229
|
+
|
|
230
|
+
**Input**
|
|
231
|
+
|
|
232
|
+
| Field | Type | Required | Description |
|
|
233
|
+
|---|---|---|---|
|
|
234
|
+
| `path.app_id` | `string` | yes | |
|
|
235
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
236
|
+
|
|
237
|
+
**Returns** `ApiResponse_list_DeploymentResponse__`: the envelope `{ data: Array<DeploymentResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
238
|
+
|
|
239
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
240
|
+
|
|
241
|
+
`DeploymentResponse` fields:
|
|
242
|
+
|
|
243
|
+
| Field | Type | Required | Description |
|
|
244
|
+
|---|---|---|---|
|
|
245
|
+
| `app_id` | `string` | yes | |
|
|
246
|
+
| `deployment_id` | `string` | yes | |
|
|
247
|
+
| `status` | `string` | yes | |
|
|
248
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
249
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
250
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
251
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
252
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
253
|
+
| `image_digest` | `string \| null` | no | |
|
|
254
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
255
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
256
|
+
| `source_ref` | `string \| null` | no | |
|
|
257
|
+
|
|
258
|
+
**Example**
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
const result = await g8.api.appDeployments.listAppDeployments({ path: { app_id: "id" } });
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
<a id="op-promotedeployment"></a>
|
|
267
|
+
|
|
268
|
+
### `g8.api.appDeployments.promoteDeployment(input)`
|
|
269
|
+
|
|
270
|
+
**Promote Deployment**
|
|
271
|
+
|
|
272
|
+
- HTTP: `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/promote`
|
|
273
|
+
- operationId: `promote_deployment_apps__app_id__deployments__deployment_id__promote_post` (also callable as `g8.api.call("promote_deployment_apps__app_id__deployments__deployment_id__promote_post", input)`)
|
|
274
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
275
|
+
- API-key scope: `apps:write`
|
|
276
|
+
- ★ Hand-written: [`g8.appPlatform.promote()`](../sdk-clients.md#g8-appplatform-promote)
|
|
277
|
+
|
|
278
|
+
Promote a built deployment to serve traffic.
|
|
279
|
+
|
|
280
|
+
409 when the state machine forbids it -- a deployment cannot become
|
|
281
|
+
`deployed` without having been built, and a `failed` one cannot be revived.
|
|
282
|
+
|
|
283
|
+
**Input**
|
|
284
|
+
|
|
285
|
+
| Field | Type | Required | Description |
|
|
286
|
+
|---|---|---|---|
|
|
287
|
+
| `path.app_id` | `string` | yes | |
|
|
288
|
+
| `path.deployment_id` | `string` | yes | |
|
|
289
|
+
| `body` | `PromoteDeploymentRequest` | yes | Request body; fields below. |
|
|
290
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
291
|
+
|
|
292
|
+
Body fields (`PromoteDeploymentRequest`):
|
|
293
|
+
|
|
294
|
+
| Field | Type | Required | Description |
|
|
295
|
+
|---|---|---|---|
|
|
296
|
+
| `body.image_digest` | `string` | yes | The built image digest being promoted. Recorded so a rollback targets an artifact rather than a rebuild. min length 7, max length 128 |
|
|
297
|
+
|
|
298
|
+
**Returns** `ApiResponse_DeploymentResponse_`: the envelope `{ data: DeploymentResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
299
|
+
|
|
300
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
301
|
+
|
|
302
|
+
`DeploymentResponse` fields:
|
|
303
|
+
|
|
304
|
+
| Field | Type | Required | Description |
|
|
305
|
+
|---|---|---|---|
|
|
306
|
+
| `app_id` | `string` | yes | |
|
|
307
|
+
| `deployment_id` | `string` | yes | |
|
|
308
|
+
| `status` | `string` | yes | |
|
|
309
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
310
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
311
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
312
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
313
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
314
|
+
| `image_digest` | `string \| null` | no | |
|
|
315
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
316
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
317
|
+
| `source_ref` | `string \| null` | no | |
|
|
318
|
+
|
|
319
|
+
**Example**
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
const result = await g8.api.appDeployments.promoteDeployment({
|
|
323
|
+
path: { app_id: "id", deployment_id: "id" },
|
|
324
|
+
body: { image_digest: "example" },
|
|
325
|
+
});
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
<a id="op-reportdeploymentprogress"></a>
|
|
331
|
+
|
|
332
|
+
### `g8.api.appDeployments.reportDeploymentProgress(input)`
|
|
333
|
+
|
|
334
|
+
**Report Deployment Progress**
|
|
335
|
+
|
|
336
|
+
- HTTP: `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/status`
|
|
337
|
+
- operationId: `report_deployment_progress_apps__app_id__deployments__deployment_id__status_post` (also callable as `g8.api.call("report_deployment_progress_apps__app_id__deployments__deployment_id__status_post", input)`)
|
|
338
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
339
|
+
- API-key scope: none published
|
|
340
|
+
|
|
341
|
+
The build controller reports progress. THE KEYSTONE (M9 item J2).
|
|
342
|
+
|
|
343
|
+
Without this, every deploy route below is inert. `POST /deployments` writes
|
|
344
|
+
`queued`, and the state machine allows `queued -> building -> promoting ->
|
|
345
|
+
deployed`. Nothing anywhere wrote `building` or `promoting`, so promote asked
|
|
346
|
+
for `queued -> deployed`, which is illegal, and **every real deployment that
|
|
347
|
+
has ever existed 409s on promote** while `deployments/active` returns null for
|
|
348
|
+
every builder.
|
|
349
|
+
|
|
350
|
+
AUTHENTICATED AS THE CONTROLLER, NOT THE BUILDER, and that is the whole point.
|
|
351
|
+
A builder's own key must not be able to walk their deployment to `promoting`
|
|
352
|
+
with no build having run, then promote it: the machine would read green and
|
|
353
|
+
the image would be whatever was there before, or nothing. So this route takes
|
|
354
|
+
no `user` at all. See `dependencies/build_controller_auth.py`.
|
|
355
|
+
|
|
356
|
+
`deployed` IS NOT SETTABLE HERE. The controller knows when a build finished; it
|
|
357
|
+
does not decide the app should take traffic. That is promote, a separate act
|
|
358
|
+
by the builder. Collapsing them would let whichever pod ran the build put an
|
|
359
|
+
app in front of users.
|
|
360
|
+
|
|
361
|
+
409 on an illegal transition rather than a silent no-op, so a controller that
|
|
362
|
+
reports out of order learns it rather than leaving a deployment wedged in a
|
|
363
|
+
state nobody wrote.
|
|
364
|
+
|
|
365
|
+
404 for an unknown deployment, and 404 for a wrong or absent controller token,
|
|
366
|
+
deliberately indistinguishable. The controller is not a tenant and has no org,
|
|
367
|
+
so there is no ownership check to make here: the deployment id is resolved
|
|
368
|
+
against the control plane rather than trusted, and it is the only thing this
|
|
369
|
+
credential can act on.
|
|
370
|
+
|
|
371
|
+
**Input**
|
|
372
|
+
|
|
373
|
+
| Field | Type | Required | Description |
|
|
374
|
+
|---|---|---|---|
|
|
375
|
+
| `path.app_id` | `string` | yes | |
|
|
376
|
+
| `path.deployment_id` | `string` | yes | |
|
|
377
|
+
| `body` | `DeploymentProgressRequest` | yes | Request body; fields below. |
|
|
378
|
+
| `headers.x-build-controller-token` | `string \| null` | no | |
|
|
379
|
+
|
|
380
|
+
Body fields (`DeploymentProgressRequest`):
|
|
381
|
+
|
|
382
|
+
| Field | Type | Required | Description |
|
|
383
|
+
|---|---|---|---|
|
|
384
|
+
| `body.status` | `"building" \| "promoting" \| "failed"` | yes | Where the build has reached. `deployed` is not settable here -- taking traffic is a separate, builder-initiated promote. |
|
|
385
|
+
| `body.image_digest` | `string \| null` | no | The pushed image digest, once there is one. Reported with `promoting`. max length 200 |
|
|
386
|
+
| `body.last_error_sanitized` | `string \| null` | no | A short, ALREADY-SANITIZED failure reason, surfaced to the builder. Build logs carry secrets and other tenants' identifiers, so the controller sanitizes before sending and this field is truncated here. max length 4000 |
|
|
387
|
+
|
|
388
|
+
**Returns** `ApiResponse_DeploymentResponse_`: the envelope `{ data: DeploymentResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
389
|
+
|
|
390
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
391
|
+
|
|
392
|
+
`DeploymentResponse` fields:
|
|
393
|
+
|
|
394
|
+
| Field | Type | Required | Description |
|
|
395
|
+
|---|---|---|---|
|
|
396
|
+
| `app_id` | `string` | yes | |
|
|
397
|
+
| `deployment_id` | `string` | yes | |
|
|
398
|
+
| `status` | `string` | yes | |
|
|
399
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
400
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
401
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
402
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
403
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
404
|
+
| `image_digest` | `string \| null` | no | |
|
|
405
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
406
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
407
|
+
| `source_ref` | `string \| null` | no | |
|
|
408
|
+
|
|
409
|
+
**Example**
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
const result = await g8.api.appDeployments.reportDeploymentProgress({
|
|
413
|
+
path: { app_id: "id", deployment_id: "id" },
|
|
414
|
+
body: { status: "building" },
|
|
415
|
+
});
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
<a id="op-rollbackdeployment"></a>
|
|
421
|
+
|
|
422
|
+
### `g8.api.appDeployments.rollbackDeployment(input)`
|
|
423
|
+
|
|
424
|
+
**Rollback Deployment**
|
|
425
|
+
|
|
426
|
+
- HTTP: `POST /api/v1/apps/{app_id}/deployments/{deployment_id}/rollback`
|
|
427
|
+
- operationId: `rollback_deployment_apps__app_id__deployments__deployment_id__rollback_post` (also callable as `g8.api.call("rollback_deployment_apps__app_id__deployments__deployment_id__rollback_post", input)`)
|
|
428
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
429
|
+
- API-key scope: `apps:write`
|
|
430
|
+
- ★ Hand-written: [`g8.appPlatform.rollback()`](../sdk-clients.md#g8-appplatform-rollback)
|
|
431
|
+
|
|
432
|
+
Roll back a deployment that is currently serving.
|
|
433
|
+
|
|
434
|
+
Only a `deployed` deployment may be rolled back. Rolling back one that never
|
|
435
|
+
served is meaningless, and permitting it would let a builder mark a failed
|
|
436
|
+
build `rolled_back` and hide the failure.
|
|
437
|
+
|
|
438
|
+
**Input**
|
|
439
|
+
|
|
440
|
+
| Field | Type | Required | Description |
|
|
441
|
+
|---|---|---|---|
|
|
442
|
+
| `path.app_id` | `string` | yes | |
|
|
443
|
+
| `path.deployment_id` | `string` | yes | |
|
|
444
|
+
| `headers.X-Org-Id` | `string \| null` | no | |
|
|
445
|
+
|
|
446
|
+
**Returns** `ApiResponse_DeploymentResponse_`: the envelope `{ data: DeploymentResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
447
|
+
|
|
448
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
449
|
+
|
|
450
|
+
`DeploymentResponse` fields:
|
|
451
|
+
|
|
452
|
+
| Field | Type | Required | Description |
|
|
453
|
+
|---|---|---|---|
|
|
454
|
+
| `app_id` | `string` | yes | |
|
|
455
|
+
| `deployment_id` | `string` | yes | |
|
|
456
|
+
| `status` | `string` | yes | |
|
|
457
|
+
| `build_finished_at` | `string (date-time) \| null` | no | When the build ended, at `promoting` or at `failed`. Not at `deployed`: that is reached after traffic is taken, so measuring to it would count promotion and rollout as build time. |
|
|
458
|
+
| `build_seconds` | `number \| null` | no | Measured build duration. `null` means NOT MEASURED, never zero: a build whose transitions were not reported has no duration, and a metering pipeline reading 0 would bill nothing and look correct. |
|
|
459
|
+
| `build_started_at` | `string (date-time) \| null` | no | When the build started. `null` means it was not measured. |
|
|
460
|
+
| `created_at` | `string (date-time) \| null` | no | |
|
|
461
|
+
| `deployed_at` | `string (date-time) \| null` | no | |
|
|
462
|
+
| `image_digest` | `string \| null` | no | |
|
|
463
|
+
| `last_error_sanitized` | `string \| null` | no | Sanitized at the write. Build logs carry secrets and other tenants' ids. |
|
|
464
|
+
| `schema_version_id` | `string \| null` | no | |
|
|
465
|
+
| `source_ref` | `string \| null` | no | |
|
|
466
|
+
|
|
467
|
+
**Example**
|
|
468
|
+
|
|
469
|
+
```ts
|
|
470
|
+
const result = await g8.api.appDeployments.rollbackDeployment({ path: { app_id: "id", deployment_id: "id" } });
|
|
471
|
+
```
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Types for `g8.api.appDomains` (App Domains): 5 operations.
|
|
5
|
+
*
|
|
6
|
+
* For reading. In code, import from the package instead:
|
|
7
|
+
* import type { ApiInput, ApiOutput, G8Contract } from "@graph8/sdk";
|
|
8
|
+
* type In = ApiInput<"claim_app_domain_apps__app_id__domains_post">;
|
|
9
|
+
*
|
|
10
|
+
* Reference with examples: appDomains.md
|
|
11
|
+
*/
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
|
|
14
|
+
/** `g8.api.appDomains.<member>` -> the operationId it calls. */
|
|
15
|
+
export interface AppDomainsMembers {
|
|
16
|
+
claimAppDomain: "claim_app_domain_apps__app_id__domains_post";
|
|
17
|
+
listAppDomains: "list_app_domains_apps__app_id__domains_get";
|
|
18
|
+
releaseAppDomain: "release_app_domain_apps__app_id__domains__hostname__delete";
|
|
19
|
+
tlsAuthorize: "tls_authorize_app_platform_tls_authorize_get";
|
|
20
|
+
verifyAppDomain: "verify_app_domain_apps__app_id__domains__hostname__verify_post";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Input and output of every `g8.api.appDomains` operation, keyed by operationId. */
|
|
24
|
+
export interface AppDomainsOperations {
|
|
25
|
+
/**
|
|
26
|
+
* POST /apps/{app_id}/domains
|
|
27
|
+
* Claim App Domain
|
|
28
|
+
* tier: write · scope: apps:write
|
|
29
|
+
*/
|
|
30
|
+
claim_app_domain_apps__app_id__domains_post: {
|
|
31
|
+
input: {
|
|
32
|
+
path: {
|
|
33
|
+
app_id: string;
|
|
34
|
+
};
|
|
35
|
+
headers?: {
|
|
36
|
+
"X-Org-Id"?: string | null;
|
|
37
|
+
};
|
|
38
|
+
body: ClaimDomainRequest;
|
|
39
|
+
};
|
|
40
|
+
output: ApiResponse_DomainVerificationInstructions_;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* GET /apps/{app_id}/domains
|
|
44
|
+
* List App Domains
|
|
45
|
+
* tier: read · scope: apps:read
|
|
46
|
+
*/
|
|
47
|
+
list_app_domains_apps__app_id__domains_get: {
|
|
48
|
+
input: {
|
|
49
|
+
path: {
|
|
50
|
+
app_id: string;
|
|
51
|
+
};
|
|
52
|
+
headers?: {
|
|
53
|
+
"X-Org-Id"?: string | null;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
output: ApiResponse_list_DomainResponse__;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* DELETE /apps/{app_id}/domains/{hostname}
|
|
60
|
+
* Release App Domain
|
|
61
|
+
* tier: destructive · scope: apps:delete
|
|
62
|
+
*/
|
|
63
|
+
release_app_domain_apps__app_id__domains__hostname__delete: {
|
|
64
|
+
input: {
|
|
65
|
+
path: {
|
|
66
|
+
app_id: string;
|
|
67
|
+
hostname: string;
|
|
68
|
+
};
|
|
69
|
+
headers?: {
|
|
70
|
+
"X-Org-Id"?: string | null;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
output: ApiResponse_dict_;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* GET /app-platform/tls-authorize
|
|
77
|
+
* Tls Authorize
|
|
78
|
+
* tier: read · scope: n/a
|
|
79
|
+
*/
|
|
80
|
+
tls_authorize_app_platform_tls_authorize_get: {
|
|
81
|
+
input: {
|
|
82
|
+
query: {
|
|
83
|
+
domain: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
output: unknown;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* POST /apps/{app_id}/domains/{hostname}/verify
|
|
90
|
+
* Verify App Domain
|
|
91
|
+
* tier: write · scope: apps:write
|
|
92
|
+
*/
|
|
93
|
+
verify_app_domain_apps__app_id__domains__hostname__verify_post: {
|
|
94
|
+
input: {
|
|
95
|
+
path: {
|
|
96
|
+
app_id: string;
|
|
97
|
+
hostname: string;
|
|
98
|
+
};
|
|
99
|
+
headers?: {
|
|
100
|
+
"X-Org-Id"?: string | null;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
output: ApiResponse_DomainResponse_;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 8 schemas referenced above (the same as G8Contract.<Name>).
|
|
108
|
+
|
|
109
|
+
export interface ApiResponse_DomainResponse_ {
|
|
110
|
+
data: DomainResponse;
|
|
111
|
+
pagination?: PaginationMeta | null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface ApiResponse_DomainVerificationInstructions_ {
|
|
115
|
+
data: DomainVerificationInstructions;
|
|
116
|
+
pagination?: PaginationMeta | null;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface ApiResponse_dict_ {
|
|
120
|
+
data: Record<string, unknown>;
|
|
121
|
+
pagination?: PaginationMeta | null;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface ApiResponse_list_DomainResponse__ {
|
|
125
|
+
data: Array<DomainResponse>;
|
|
126
|
+
pagination?: PaginationMeta | null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ClaimDomainRequest {
|
|
130
|
+
/** The hostname to serve this app on. Normalized server-side: case, a trailing dot and unicode all resolve to one canonical form. */
|
|
131
|
+
hostname: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface DomainResponse {
|
|
135
|
+
app_id: string;
|
|
136
|
+
created_at?: string | null;
|
|
137
|
+
domain_id: string;
|
|
138
|
+
/** The canonical, normalized form -- not necessarily what was submitted. */
|
|
139
|
+
hostname: string;
|
|
140
|
+
status: string;
|
|
141
|
+
verified_at?: string | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Everything the builder needs to prove control, and nothing else.
|
|
146
|
+
*
|
|
147
|
+
* The token is returned ONLY here, at claim time. It is also stored, but there
|
|
148
|
+
* is deliberately no route that reads it back: a token readable on demand is a
|
|
149
|
+
* token an attacker with a stolen read-only key can harvest for every pending
|
|
150
|
+
* domain on the platform.
|
|
151
|
+
*/
|
|
152
|
+
export interface DomainVerificationInstructions {
|
|
153
|
+
domain: DomainResponse;
|
|
154
|
+
/** Create the record at this name, e.g. _graph8-challenge.app.example.com */
|
|
155
|
+
record_name: string;
|
|
156
|
+
record_type?: string;
|
|
157
|
+
record_value: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface PaginationMeta {
|
|
161
|
+
/** Whether there are more pages */
|
|
162
|
+
has_next: boolean;
|
|
163
|
+
/** Items per page */
|
|
164
|
+
limit: number;
|
|
165
|
+
/** Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers. */
|
|
166
|
+
next_cursor?: string | null;
|
|
167
|
+
/** Current page number (1-indexed) */
|
|
168
|
+
page: number;
|
|
169
|
+
/** Total number of items */
|
|
170
|
+
total: number;
|
|
171
|
+
}
|