unfazed 0.6.1 → 0.8.1

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.
@@ -18,15 +18,35 @@ export declare const ListWorkspacesDocument: import("./index.js").TypedDocumentS
18
18
  /**
19
19
  * Deleting a workspace, with the deployment cascade made explicit.
20
20
  *
21
- * `withDeployments` is not decoration: without it the server REFUSES while the
22
- * workspace has any deployment history at all — including FAILED records —
23
- * with `workspace %q still has deployments; delete them first`. A workspace
24
- * that was ever deployed is therefore undeletable through the bare mutation,
25
- * so the SDK always sends the flag and lets the caller choose the value.
21
+ * Without `withDeployments` the server REFUSES while the workspace has any
22
+ * deployment record at all — FAILED ones included — with `workspace %q still
23
+ * has deployments; delete them first`. With it, the delete takes down every
24
+ * app the workspace serves, so `confirmAliases` must name exactly those apps
25
+ * (`Workspace.liveApps`); a missing or extra alias refuses the delete, deletes
26
+ * nothing, and the error lists the live apps. The SDK always sends the flag
27
+ * and never fills in the aliases: the caller names what goes.
26
28
  */
27
29
  export declare const DeleteWorkspaceDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeleteWorkspaceMutation, {
28
30
  workspaceID: string | number;
29
31
  withDeployments?: boolean | null | undefined | undefined;
32
+ confirmAliases?: string | string[] | null | undefined;
33
+ }>;
34
+ /**
35
+ * The apps a workspace serves right now: what `deleteWorkspace` with
36
+ * `withDeployments` takes offline, and exactly the list its `confirmAliases`
37
+ * must name. `workspace` is null when the id is absent or not the caller's.
38
+ */
39
+ export declare const WorkspaceLiveAppsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWorkspaceLiveAppsQuery, {
40
+ id: string | number;
41
+ }>;
42
+ /**
43
+ * Deleting ONE app of a workspace: every deployment of the alias there, its
44
+ * App State, app-scoped env and secrets, and integration bindings. The
45
+ * workspace, its files and its other apps keep serving.
46
+ */
47
+ export declare const DeleteAppDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeleteAppMutation, {
48
+ workspaceID: string | number;
49
+ alias: string;
30
50
  }>;
31
51
  export declare const WriteTextFileDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWriteTextFileMutation, {
32
52
  workspaceID: string | number;
@@ -38,6 +58,82 @@ export declare const WriteBase64FileDocument: import("./index.js").TypedDocument
38
58
  path: string;
39
59
  contentBase64: string;
40
60
  }>;
61
+ /** The commit a file write made on an app with platform git (MCP's `commit`). */
62
+ export declare const FileCommitFieldsFragment: import("./index.js").TypedDocumentString<import("./index.js").FileCommitFieldsFragment, unknown>;
63
+ /**
64
+ * The batch write (MCP `write_workspace_files`): every file in ONE request
65
+ * and, on an app with platform git, ONE commit for the whole call.
66
+ */
67
+ export declare const WriteFilesDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWriteFilesMutation, {
68
+ workspaceID: string | number;
69
+ files: Array<import("./index.js").WorkspaceFileWriteInput> | import("./index.js").WorkspaceFileWriteInput;
70
+ commitMessage?: string | null | undefined | undefined;
71
+ }>;
72
+ /** One page of an app's platform git history, newest first (MCP `list_commits`). */
73
+ export declare const AppCommitsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAppCommitsQuery, {
74
+ workspaceID: string | number;
75
+ limit?: number | null | undefined | undefined;
76
+ before?: string | null | undefined | undefined;
77
+ }>;
78
+ /** Only what `waitForCommit` reads: whether writes still wait, and the head. */
79
+ export declare const AppCommitsWaitingDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAppCommitsWaitingQuery, {
80
+ workspaceID: string | number;
81
+ }>;
82
+ /**
83
+ * The app's git link as the last import left it: what `restoreVersion` waits
84
+ * on, since the deploy a restore queues is an import of the branch head.
85
+ */
86
+ export declare const WorkspaceGitSourceDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWorkspaceGitSourceQuery, {
87
+ id: string | number;
88
+ }>;
89
+ /** One commit with its diff (MCP `get_commit`). */
90
+ export declare const AppCommitDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAppCommitQuery, {
91
+ workspaceID: string | number;
92
+ sha: string;
93
+ }>;
94
+ /** Give the app back an earlier commit's files (MCP `restore_version`). */
95
+ export declare const RestoreVersionDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkRestoreVersionMutation, {
96
+ workspaceID: string | number;
97
+ sha: string;
98
+ expectedHead?: string | null | undefined | undefined;
99
+ message?: string | null | undefined | undefined;
100
+ }>;
101
+ /** A service app's error group, as MCP `list_errors` shows it. */
102
+ export declare const AppErrorGroupFieldsFragment: import("./index.js").TypedDocumentString<import("./index.js").AppErrorGroupFieldsFragment, unknown>;
103
+ export declare const AppErrorsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAppErrorsQuery, {
104
+ workspaceID: string | number;
105
+ alias: string;
106
+ status?: string | null | undefined | undefined;
107
+ limit?: number | null | undefined | undefined;
108
+ cursor?: string | null | undefined | undefined;
109
+ }>;
110
+ export declare const AppErrorGroupDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkAppErrorGroupQuery, {
111
+ workspaceID: string | number;
112
+ alias: string;
113
+ groupID: string | number;
114
+ }>;
115
+ export declare const ResolveErrorGroupDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkResolveErrorGroupMutation, {
116
+ input: import("./index.js").AppErrorGroupInput;
117
+ }>;
118
+ export declare const MuteErrorGroupDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkMuteErrorGroupMutation, {
119
+ input: import("./index.js").AppErrorGroupInput;
120
+ }>;
121
+ export declare const ReopenErrorGroupDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkReopenErrorGroupMutation, {
122
+ input: import("./index.js").AppErrorGroupInput;
123
+ }>;
124
+ /** The event types pollEvents/waitForEvents read (MCP `list_event_types`). */
125
+ export declare const EventTypesDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkEventTypesQuery, {
126
+ [x: string]: never;
127
+ }>;
128
+ /** MCP `poll_events`: the same feed, cursors and filters. */
129
+ export declare const PollEventsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkPollEventsQuery, {
130
+ input?: import("./index.js").PlatformEventsInput | null | undefined;
131
+ }>;
132
+ /** MCP `wait_for_events`: pollEvents that blocks server-side (at most 50 s). */
133
+ export declare const WaitForEventsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWaitForEventsQuery, {
134
+ input?: import("./index.js").PlatformEventsInput | null | undefined;
135
+ timeoutSeconds?: number | null | undefined | undefined;
136
+ }>;
41
137
  export declare const ListFilesDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkListFilesQuery, {
42
138
  input: import("./index.js").ListWorkspaceFilesInput;
43
139
  }>;
@@ -88,10 +184,53 @@ export declare const ServiceLogsDocument: import("./index.js").TypedDocumentStri
88
184
  deploymentID: string | number;
89
185
  tailBytes?: number | null | undefined | undefined;
90
186
  }>;
187
+ /** A deploy's measured timeline in milliseconds, as the platform parsed it. */
188
+ export declare const DeploymentTimingsFieldsFragment: import("./index.js").TypedDocumentString<import("./index.js").DeploymentTimingsFieldsFragment, unknown>;
189
+ /**
190
+ * Deployment events with their metadata: the timing events
191
+ * (`deployment.phases`, `deployment.build_finished`) carry their phases there
192
+ * as `*_ms` strings and, parsed by the platform, as `timings`, which
193
+ * `parseDeploymentTimings` prefers.
194
+ */
91
195
  export declare const DeploymentEventsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeploymentEventsQuery, {
92
196
  deploymentID: string | number;
93
197
  limit?: number | null | undefined | undefined;
94
198
  }>;
199
+ /**
200
+ * A deployment's timeline as the platform reads it from ALL its events (the
201
+ * latest of each timing event), not just a page of them.
202
+ */
203
+ export declare const DeploymentTimingsDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeploymentTimingsQuery, {
204
+ id: string | number;
205
+ }>;
206
+ /**
207
+ * The server-side wait (MCP `wait_for_deployment`): the control plane blocks
208
+ * until the deployment leaves BUILDING — woken by the deploy pipeline itself,
209
+ * not a timer — or its budget (at most 50 s) runs out. One round trip after
210
+ * READY instead of a poll interval, and the full deployment in the answer.
211
+ *
212
+ * By id it asks only for what every platform with the wait answers, so a
213
+ * deploy's wait works on one from before the wait by commit too.
214
+ */
215
+ export declare const WaitForDeploymentDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWaitForDeploymentQuery, {
216
+ id: string | number;
217
+ timeoutSeconds?: number | null | undefined | undefined;
218
+ }>;
219
+ /**
220
+ * The same wait for the deploy a git import makes of a commit, which has no
221
+ * id yet when a restore, push or sync answers: `deployment` is null until the
222
+ * import made it (`status` IMPORTING), and stays null with `status` FAILED
223
+ * and `importError` once the import failed on the commit. `after` counts only
224
+ * deployments begun after that point of the platform's deployment order
225
+ * (RestoreAppVersionPayload.waitAfter).
226
+ */
227
+ export declare const WaitForCommitDeploymentDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWaitForCommitDeploymentQuery, {
228
+ workspaceID: string | number;
229
+ gitCommit: string;
230
+ alias?: string | null | undefined | undefined;
231
+ after?: number | null | undefined | undefined;
232
+ timeoutSeconds?: number | null | undefined | undefined;
233
+ }>;
95
234
  export declare const RestartServiceDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkRestartServiceMutation, {
96
235
  deploymentID: string | number;
97
236
  }>;
@@ -100,19 +100,66 @@ export const ListWorkspacesDocument = graphql(`
100
100
  /**
101
101
  * Deleting a workspace, with the deployment cascade made explicit.
102
102
  *
103
- * `withDeployments` is not decoration: without it the server REFUSES while the
104
- * workspace has any deployment history at all — including FAILED records —
105
- * with `workspace %q still has deployments; delete them first`. A workspace
106
- * that was ever deployed is therefore undeletable through the bare mutation,
107
- * so the SDK always sends the flag and lets the caller choose the value.
103
+ * Without `withDeployments` the server REFUSES while the workspace has any
104
+ * deployment record at all — FAILED ones included — with `workspace %q still
105
+ * has deployments; delete them first`. With it, the delete takes down every
106
+ * app the workspace serves, so `confirmAliases` must name exactly those apps
107
+ * (`Workspace.liveApps`); a missing or extra alias refuses the delete, deletes
108
+ * nothing, and the error lists the live apps. The SDK always sends the flag
109
+ * and never fills in the aliases: the caller names what goes.
108
110
  */
109
111
  export const DeleteWorkspaceDocument = graphql(`
110
- mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {
111
- deleteWorkspace(input: { workspaceID: $workspaceID, withDeployments: $withDeployments }) {
112
+ mutation SdkDeleteWorkspace(
113
+ $workspaceID: ID!
114
+ $withDeployments: Boolean
115
+ $confirmAliases: [String!]
116
+ ) {
117
+ deleteWorkspace(
118
+ input: {
119
+ workspaceID: $workspaceID
120
+ withDeployments: $withDeployments
121
+ confirmAliases: $confirmAliases
122
+ }
123
+ ) {
112
124
  ok
113
125
  }
114
126
  }
115
127
  `);
128
+ /**
129
+ * The apps a workspace serves right now: what `deleteWorkspace` with
130
+ * `withDeployments` takes offline, and exactly the list its `confirmAliases`
131
+ * must name. `workspace` is null when the id is absent or not the caller's.
132
+ */
133
+ export const WorkspaceLiveAppsDocument = graphql(`
134
+ query SdkWorkspaceLiveApps($id: ID!) {
135
+ workspace(id: $id) {
136
+ id
137
+ liveApps {
138
+ alias
139
+ deploymentID
140
+ domains
141
+ }
142
+ }
143
+ }
144
+ `);
145
+ /**
146
+ * Deleting ONE app of a workspace: every deployment of the alias there, its
147
+ * App State, app-scoped env and secrets, and integration bindings. The
148
+ * workspace, its files and its other apps keep serving.
149
+ */
150
+ export const DeleteAppDocument = graphql(`
151
+ mutation SdkDeleteApp($workspaceID: ID!, $alias: String!) {
152
+ deleteApp(input: { workspaceID: $workspaceID, alias: $alias }) {
153
+ ok
154
+ alias
155
+ deployments
156
+ domains
157
+ envEntries
158
+ skippedOnSync
159
+ otherApps
160
+ }
161
+ }
162
+ `);
116
163
  export const WriteTextFileDocument = graphql(`
117
164
  mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {
118
165
  writeWorkspaceTextFile(input: { workspaceID: $workspaceID, path: $path, text: $text }) {
@@ -141,6 +188,309 @@ export const WriteBase64FileDocument = graphql(`
141
188
  }
142
189
  }
143
190
  `);
191
+ /** The commit a file write made on an app with platform git (MCP's `commit`). */
192
+ export const FileCommitFieldsFragment = graphql(`
193
+ fragment FileCommitFields on FileCommit {
194
+ sha
195
+ branch
196
+ message
197
+ committed
198
+ waiting
199
+ waitingCount
200
+ deploys
201
+ conflicts
202
+ writeSHA
203
+ paused
204
+ }
205
+ `);
206
+ /**
207
+ * The batch write (MCP `write_workspace_files`): every file in ONE request
208
+ * and, on an app with platform git, ONE commit for the whole call.
209
+ */
210
+ export const WriteFilesDocument = graphql(`
211
+ mutation SdkWriteFiles(
212
+ $workspaceID: ID!
213
+ $files: [WorkspaceFileWriteInput!]!
214
+ $commitMessage: String
215
+ ) {
216
+ writeWorkspaceFiles(
217
+ input: { workspaceID: $workspaceID, files: $files, commitMessage: $commitMessage }
218
+ ) {
219
+ workspaceID
220
+ written
221
+ failed
222
+ totalBytes
223
+ files {
224
+ path
225
+ ok
226
+ error
227
+ file {
228
+ path
229
+ sizeBytes
230
+ size
231
+ sha256
232
+ updatedAt
233
+ }
234
+ }
235
+ commit {
236
+ ...FileCommitFields
237
+ }
238
+ }
239
+ }
240
+ `);
241
+ /** One page of an app's platform git history, newest first (MCP `list_commits`). */
242
+ export const AppCommitsDocument = graphql(`
243
+ query SdkAppCommits($workspaceID: ID!, $limit: Int, $before: String) {
244
+ appCommits(workspaceID: $workspaceID, limit: $limit, before: $before) {
245
+ branch
246
+ head
247
+ nextBefore
248
+ autoDeploy
249
+ waitingCommits
250
+ waitingSince
251
+ commits {
252
+ sha
253
+ message
254
+ authorName
255
+ authorEmail
256
+ authoredAt
257
+ filesChanged
258
+ deployedTo
259
+ }
260
+ deployed {
261
+ alias
262
+ sha
263
+ deploymentID
264
+ }
265
+ }
266
+ }
267
+ `);
268
+ /** Only what `waitForCommit` reads: whether writes still wait, and the head. */
269
+ export const AppCommitsWaitingDocument = graphql(`
270
+ query SdkAppCommitsWaiting($workspaceID: ID!) {
271
+ appCommits(workspaceID: $workspaceID, limit: 1) {
272
+ branch
273
+ head
274
+ waitingCommits
275
+ waitingSince
276
+ }
277
+ }
278
+ `);
279
+ /**
280
+ * The app's git link as the last import left it: what `restoreVersion` waits
281
+ * on, since the deploy a restore queues is an import of the branch head.
282
+ */
283
+ export const WorkspaceGitSourceDocument = graphql(`
284
+ query SdkWorkspaceGitSource($id: ID!) {
285
+ workspace(id: $id) {
286
+ id
287
+ gitSource {
288
+ branch
289
+ autoDeploy
290
+ deployAlias
291
+ lastImportedCommit
292
+ lastImportedAt
293
+ lastImportStatus
294
+ lastImportError
295
+ }
296
+ }
297
+ }
298
+ `);
299
+ /** One commit with its diff (MCP `get_commit`). */
300
+ export const AppCommitDocument = graphql(`
301
+ query SdkAppCommit($workspaceID: ID!, $sha: String!) {
302
+ appCommit(workspaceID: $workspaceID, sha: $sha) {
303
+ commit {
304
+ sha
305
+ message
306
+ authorName
307
+ authorEmail
308
+ authoredAt
309
+ filesChanged
310
+ deployedTo
311
+ }
312
+ files {
313
+ path
314
+ status
315
+ }
316
+ patch
317
+ truncated
318
+ additions
319
+ deletions
320
+ }
321
+ }
322
+ `);
323
+ /** Give the app back an earlier commit's files (MCP `restore_version`). */
324
+ export const RestoreVersionDocument = graphql(`
325
+ mutation SdkRestoreVersion(
326
+ $workspaceID: ID!
327
+ $sha: String!
328
+ $expectedHead: String
329
+ $message: String
330
+ ) {
331
+ restoreAppVersion(
332
+ input: { workspaceID: $workspaceID, sha: $sha, expectedHead: $expectedHead, message: $message }
333
+ ) {
334
+ sha
335
+ committed
336
+ deploys
337
+ message
338
+ workspaceID
339
+ branch
340
+ deployAlias
341
+ restoredFrom
342
+ parent
343
+ waitAfter
344
+ }
345
+ }
346
+ `);
347
+ /** A service app's error group, as MCP `list_errors` shows it. */
348
+ export const AppErrorGroupFieldsFragment = graphql(`
349
+ fragment AppErrorGroupFields on AppErrorGroup {
350
+ id
351
+ title
352
+ type
353
+ culprit
354
+ level
355
+ status
356
+ count
357
+ storedEvents
358
+ firstSeen
359
+ lastSeen
360
+ firstDeploymentID
361
+ firstGitCommit
362
+ lastDeploymentID
363
+ lastGitCommit
364
+ resolvedInDeploymentID
365
+ resolvedAt
366
+ mutedAt
367
+ regressedAt
368
+ }
369
+ `);
370
+ export const AppErrorsDocument = graphql(`
371
+ query SdkAppErrors(
372
+ $workspaceID: ID!
373
+ $alias: String!
374
+ $status: String
375
+ $limit: Int
376
+ $cursor: String
377
+ ) {
378
+ appErrors(
379
+ workspaceID: $workspaceID
380
+ alias: $alias
381
+ status: $status
382
+ limit: $limit
383
+ cursor: $cursor
384
+ ) {
385
+ groups {
386
+ ...AppErrorGroupFields
387
+ }
388
+ nextCursor
389
+ note
390
+ }
391
+ }
392
+ `);
393
+ export const AppErrorGroupDocument = graphql(`
394
+ query SdkAppErrorGroup($workspaceID: ID!, $alias: String!, $groupID: ID!) {
395
+ appErrorGroup(workspaceID: $workspaceID, alias: $alias, groupID: $groupID) {
396
+ group {
397
+ ...AppErrorGroupFields
398
+ }
399
+ latestEvent
400
+ firstEvent {
401
+ eventID
402
+ at
403
+ deploymentID
404
+ level
405
+ }
406
+ recentEvents {
407
+ eventID
408
+ at
409
+ deploymentID
410
+ level
411
+ }
412
+ deployments {
413
+ deploymentID
414
+ gitCommit
415
+ current
416
+ count
417
+ firstSeen
418
+ lastSeen
419
+ }
420
+ fatal
421
+ vmID
422
+ }
423
+ }
424
+ `);
425
+ export const ResolveErrorGroupDocument = graphql(`
426
+ mutation SdkResolveErrorGroup($input: AppErrorGroupInput!) {
427
+ resolveAppErrorGroup(input: $input) {
428
+ ...AppErrorGroupFields
429
+ }
430
+ }
431
+ `);
432
+ export const MuteErrorGroupDocument = graphql(`
433
+ mutation SdkMuteErrorGroup($input: AppErrorGroupInput!) {
434
+ muteAppErrorGroup(input: $input) {
435
+ ...AppErrorGroupFields
436
+ }
437
+ }
438
+ `);
439
+ export const ReopenErrorGroupDocument = graphql(`
440
+ mutation SdkReopenErrorGroup($input: AppErrorGroupInput!) {
441
+ reopenAppErrorGroup(input: $input) {
442
+ ...AppErrorGroupFields
443
+ }
444
+ }
445
+ `);
446
+ /** The event types pollEvents/waitForEvents read (MCP `list_event_types`). */
447
+ export const EventTypesDocument = graphql(`
448
+ query SdkEventTypes {
449
+ platformEventTypes {
450
+ name
451
+ description
452
+ delivery
453
+ inputSchema
454
+ payloadSchema
455
+ }
456
+ }
457
+ `);
458
+ /** MCP `poll_events`: the same feed, cursors and filters. */
459
+ export const PollEventsDocument = graphql(`
460
+ query SdkPollEvents($input: PlatformEventsInput) {
461
+ pollEvents(input: $input) {
462
+ cursor
463
+ truncated
464
+ hasMore
465
+ nextPollMs
466
+ timedOut
467
+ events {
468
+ eventID
469
+ name
470
+ timestamp
471
+ data
472
+ }
473
+ }
474
+ }
475
+ `);
476
+ /** MCP `wait_for_events`: pollEvents that blocks server-side (at most 50 s). */
477
+ export const WaitForEventsDocument = graphql(`
478
+ query SdkWaitForEvents($input: PlatformEventsInput, $timeoutSeconds: Int) {
479
+ waitForEvents(input: $input, timeoutSeconds: $timeoutSeconds) {
480
+ cursor
481
+ truncated
482
+ hasMore
483
+ nextPollMs
484
+ timedOut
485
+ events {
486
+ eventID
487
+ name
488
+ timestamp
489
+ data
490
+ }
491
+ }
492
+ }
493
+ `);
144
494
  export const ListFilesDocument = graphql(`
145
495
  query SdkListFiles($input: ListWorkspaceFilesInput!) {
146
496
  workspaceFilesPage(input: $input) {
@@ -307,6 +657,24 @@ export const ServiceLogsDocument = graphql(`
307
657
  }
308
658
  }
309
659
  `);
660
+ /** A deploy's measured timeline in milliseconds, as the platform parsed it. */
661
+ export const DeploymentTimingsFieldsFragment = graphql(`
662
+ fragment DeploymentTimingsFields on DeploymentTimings {
663
+ totalMs
664
+ buildMs
665
+ promoteMs
666
+ phases
667
+ buildMode
668
+ artifactTransport
669
+ buildMemoryMiB
670
+ }
671
+ `);
672
+ /**
673
+ * Deployment events with their metadata: the timing events
674
+ * (`deployment.phases`, `deployment.build_finished`) carry their phases there
675
+ * as `*_ms` strings and, parsed by the platform, as `timings`, which
676
+ * `parseDeploymentTimings` prefers.
677
+ */
310
678
  export const DeploymentEventsDocument = graphql(`
311
679
  query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {
312
680
  deploymentEvents(deploymentID: $deploymentID, limit: $limit) {
@@ -317,10 +685,83 @@ export const DeploymentEventsDocument = graphql(`
317
685
  severity
318
686
  message
319
687
  vmID
688
+ metadata
689
+ timings {
690
+ ...DeploymentTimingsFields
691
+ }
320
692
  createdAt
321
693
  }
322
694
  }
323
695
  `);
696
+ /**
697
+ * A deployment's timeline as the platform reads it from ALL its events (the
698
+ * latest of each timing event), not just a page of them.
699
+ */
700
+ export const DeploymentTimingsDocument = graphql(`
701
+ query SdkDeploymentTimings($id: ID!) {
702
+ deployment(id: $id) {
703
+ id
704
+ timings {
705
+ ...DeploymentTimingsFields
706
+ }
707
+ }
708
+ }
709
+ `);
710
+ /**
711
+ * The server-side wait (MCP `wait_for_deployment`): the control plane blocks
712
+ * until the deployment leaves BUILDING — woken by the deploy pipeline itself,
713
+ * not a timer — or its budget (at most 50 s) runs out. One round trip after
714
+ * READY instead of a poll interval, and the full deployment in the answer.
715
+ *
716
+ * By id it asks only for what every platform with the wait answers, so a
717
+ * deploy's wait works on one from before the wait by commit too.
718
+ */
719
+ export const WaitForDeploymentDocument = graphql(`
720
+ query SdkWaitForDeployment($id: ID!, $timeoutSeconds: Int) {
721
+ waitForDeployment(id: $id, timeoutSeconds: $timeoutSeconds) {
722
+ timedOut
723
+ waitedMs
724
+ placement
725
+ deployment {
726
+ ...DeploymentFields
727
+ }
728
+ }
729
+ }
730
+ `);
731
+ /**
732
+ * The same wait for the deploy a git import makes of a commit, which has no
733
+ * id yet when a restore, push or sync answers: `deployment` is null until the
734
+ * import made it (`status` IMPORTING), and stays null with `status` FAILED
735
+ * and `importError` once the import failed on the commit. `after` counts only
736
+ * deployments begun after that point of the platform's deployment order
737
+ * (RestoreAppVersionPayload.waitAfter).
738
+ */
739
+ export const WaitForCommitDeploymentDocument = graphql(`
740
+ query SdkWaitForCommitDeployment(
741
+ $workspaceID: ID!
742
+ $gitCommit: String!
743
+ $alias: String
744
+ $after: Int
745
+ $timeoutSeconds: Int
746
+ ) {
747
+ waitForDeployment(
748
+ workspaceID: $workspaceID
749
+ gitCommit: $gitCommit
750
+ alias: $alias
751
+ after: $after
752
+ timeoutSeconds: $timeoutSeconds
753
+ ) {
754
+ status
755
+ importStatus
756
+ importError
757
+ timedOut
758
+ waitedMs
759
+ deployment {
760
+ ...DeploymentFields
761
+ }
762
+ }
763
+ }
764
+ `);
324
765
  export const RestartServiceDocument = graphql(`
325
766
  mutation SdkRestartService($deploymentID: ID!) {
326
767
  restartService(input: { deploymentID: $deploymentID }) {