picked 0.0.101 → 0.0.102-next.2

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 (36) hide show
  1. package/docs/reference/dashboard/workflow-test-runs.md +40 -17
  2. package/docs/reference/management-api/schema/action.md +67 -79
  3. package/docs/reference/management-api/schema/analytics-session.md +77 -94
  4. package/docs/reference/management-api/schema/analytics.md +16 -14
  5. package/docs/reference/management-api/schema/api-key.md +43 -51
  6. package/docs/reference/management-api/schema/auth.md +271 -404
  7. package/docs/reference/management-api/schema/cms-fields.md +348 -245
  8. package/docs/reference/management-api/schema/cms-models.md +369 -378
  9. package/docs/reference/management-api/schema/common.md +69 -130
  10. package/docs/reference/management-api/schema/condition.md +63 -74
  11. package/docs/reference/management-api/schema/design-system.md +59 -51
  12. package/docs/reference/management-api/schema/experience.md +388 -364
  13. package/docs/reference/management-api/schema/external-api.md +153 -171
  14. package/docs/reference/management-api/schema/feature.md +85 -103
  15. package/docs/reference/management-api/schema/feedback.md +27 -31
  16. package/docs/reference/management-api/schema/field.md +117 -135
  17. package/docs/reference/management-api/schema/index.md +184 -184
  18. package/docs/reference/management-api/schema/integration.md +72 -78
  19. package/docs/reference/management-api/schema/label.md +81 -137
  20. package/docs/reference/management-api/schema/lead.md +80 -119
  21. package/docs/reference/management-api/schema/mcp-server.md +73 -71
  22. package/docs/reference/management-api/schema/metric.md +6 -9
  23. package/docs/reference/management-api/schema/operation.md +17 -26
  24. package/docs/reference/management-api/schema/organization.md +198 -220
  25. package/docs/reference/management-api/schema/project.md +177 -186
  26. package/docs/reference/management-api/schema/report.md +69 -65
  27. package/docs/reference/management-api/schema/saved-view.md +71 -71
  28. package/docs/reference/management-api/schema/shopify.md +331 -204
  29. package/docs/reference/management-api/schema/step.md +72 -80
  30. package/docs/reference/management-api/schema/tenant-branding.md +48 -70
  31. package/docs/reference/management-api/schema/workbench.md +54 -66
  32. package/docs/reference/management-api/schema/workflow-run.md +66 -79
  33. package/docs/reference/management-api/schema/workflow.md +310 -353
  34. package/docs/reference/management-api/schema/workspace-version.md +212 -261
  35. package/docs/reference/management-api/schema/workspace.md +275 -328
  36. package/package.json +4 -4
@@ -6,24 +6,29 @@ generated: true
6
6
 
7
7
  # Workspace schema
8
8
 
9
- The operations and types that `workspace.graphql` adds to the Management API. See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
9
+ See [Management API schema](/reference/management-api/schema) for every domain, the endpoint and authentication.
10
10
 
11
11
  ## Queries
12
12
 
13
13
  ### `workspace`
14
14
 
15
- Get a specific workspace. Requires authentication.
15
+ Reads a workspace.
16
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
16
17
 
17
18
  ```graphql
18
- workspace(id: ID!, projectId: ID!): Workspace @auth
19
+ workspace(
20
+ id: ID!
21
+ """Ignored. The workspace's ID identifies its project."""
22
+ projectId: ID!
23
+ ): Workspace @auth
19
24
  ```
20
25
 
21
26
  ### `workspaceExport`
22
27
 
23
- Export a workspace and every entity in it as a portable JSON bundle, with a
24
- manifest of the asset versions its content references. The asset bytes are
25
- not included; download each from its `downloadUrl`. Requires scope:
26
- `ORGANIZATION_PROJECTS_READ` on the workspace's project.
28
+ Exports a workspace and every entity in it as a JSON bundle that `workspaceImport` reads. The
29
+ bundle lists the asset versions its content references; download each file from its
30
+ `downloadUrl`.
31
+ Scope: `ORGANIZATION_WORKSPACE_READ`.
27
32
 
28
33
  ```graphql
29
34
  workspaceExport(input: WorkspaceExportInput!): WorkspaceExportPayload! @auth
@@ -33,7 +38,9 @@ workspaceExport(input: WorkspaceExportInput!): WorkspaceExportPayload! @auth
33
38
 
34
39
  ### `workspacePublish`
35
40
 
36
- Publish a workspace, creating an immutable version snapshot. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
41
+ Publishes a workspace: makes an immutable version of it and serves that version to visitors. The
42
+ workspace becomes `LIVE`, and an archived workspace returns to the default list.
43
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
37
44
 
38
45
  ```graphql
39
46
  workspacePublish(input: WorkspacePublishInput!): WorkspacePublishPayload! @auth
@@ -41,17 +48,10 @@ workspacePublish(input: WorkspacePublishInput!): WorkspacePublishPayload! @auth
41
48
 
42
49
  ### `workspaceVersionPublish`
43
50
 
44
- Promote a previously-published `WorkspaceVersion` to be its project's served
45
- (live) version by pointing `projects.live_workspace_version_id`
46
- at it and stamping the owning workspace's `publishedAt` with that version's
47
- original publish timestamp. Works for the latest version (re-publish) or an
48
- earlier one (rollback, in product terms). No new `WorkspaceVersion` row is
49
- appended. The target workspace becomes the project's live one (an archived
50
- workspace is un-archived). The draft state is NOT modified, so if the draft
51
- differs from the published snapshot it shows up as "unpublished changes" in
52
- the UI. Use `workspaceDiff` with `(baseWorkspaceId, compareWorkspaceVersionId)`
53
- to preview the impact before invoking this mutation. Requires scope:
54
- `ORGANIZATION_PROJECTS_UPDATE`.
51
+ Makes a published version the version its project serves. No new version is made and the
52
+ workspace's draft does not change; the workspace becomes `LIVE`, and an archived one returns to
53
+ the default list.
54
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
55
55
 
56
56
  ```graphql
57
57
  workspaceVersionPublish(input: WorkspaceVersionPublishInput!): WorkspaceVersionPublishPayload! @auth
@@ -59,7 +59,8 @@ workspaceVersionPublish(input: WorkspaceVersionPublishInput!): WorkspaceVersionP
59
59
 
60
60
  ### `workspaceCreate`
61
61
 
62
- Create a new workspace on a project. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
62
+ Creates an empty draft workspace in a project.
63
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
63
64
 
64
65
  ```graphql
65
66
  workspaceCreate(input: WorkspaceCreateInput!): WorkspaceCreatePayload! @auth
@@ -67,7 +68,8 @@ workspaceCreate(input: WorkspaceCreateInput!): WorkspaceCreatePayload! @auth
67
68
 
68
69
  ### `workspaceUpdate`
69
70
 
70
- Rename an existing workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
71
+ Renames a workspace.
72
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
71
73
 
72
74
  ```graphql
73
75
  workspaceUpdate(input: WorkspaceUpdateInput!): WorkspaceUpdatePayload! @auth
@@ -75,7 +77,9 @@ workspaceUpdate(input: WorkspaceUpdateInput!): WorkspaceUpdatePayload! @auth
75
77
 
76
78
  ### `workspaceDuplicate`
77
79
 
78
- Duplicate an existing workspace with all of its child entities, including its workflows. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
80
+ Copies a workspace and every entity in it, workflows included, into a new draft workspace in the
81
+ same project.
82
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
79
83
 
80
84
  ```graphql
81
85
  workspaceDuplicate(input: WorkspaceDuplicateInput!): WorkspaceDuplicatePayload! @auth
@@ -83,9 +87,10 @@ workspaceDuplicate(input: WorkspaceDuplicateInput!): WorkspaceDuplicatePayload!
83
87
 
84
88
  ### `workspaceImport`
85
89
 
86
- Create a new draft workspace in a project from a bundle returned by
87
- `workspaceExport`, committing every entity in one transaction. Requires
88
- scope: `ORGANIZATION_PROJECTS_UPDATE` on the target project.
90
+ Creates a draft workspace in a project from a bundle that `workspaceExport` returned. Every entity
91
+ gets a new ID, and every reference between entities, assets through `assetMap` included, points at
92
+ the new IDs. Nothing is created when a `userError` is returned.
93
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
89
94
 
90
95
  ```graphql
91
96
  workspaceImport(input: WorkspaceImportInput!): WorkspaceImportPayload! @auth
@@ -93,7 +98,9 @@ workspaceImport(input: WorkspaceImportInput!): WorkspaceImportPayload! @auth
93
98
 
94
99
  ### `workspaceArchive`
95
100
 
96
- Archive a non-live workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
101
+ Archives a workspace, which moves it out of the default list. It stays editable. Archiving an
102
+ archived workspace changes nothing.
103
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
97
104
 
98
105
  ```graphql
99
106
  workspaceArchive(input: WorkspaceArchiveInput!): WorkspaceArchivePayload! @auth
@@ -101,7 +108,8 @@ workspaceArchive(input: WorkspaceArchiveInput!): WorkspaceArchivePayload! @auth
101
108
 
102
109
  ### `workspaceUnarchive`
103
110
 
104
- Unarchive an archived workspace (restores it to `DRAFT`). Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
111
+ Unarchives a workspace, which returns it to `DRAFT`.
112
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
105
113
 
106
114
  ```graphql
107
115
  workspaceUnarchive(input: WorkspaceUnarchiveInput!): WorkspaceUnarchivePayload! @auth
@@ -109,7 +117,8 @@ workspaceUnarchive(input: WorkspaceUnarchiveInput!): WorkspaceUnarchivePayload!
109
117
 
110
118
  ### `workspaceDelete`
111
119
 
112
- Soft-delete a non-live workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
120
+ Deletes a workspace that is not live.
121
+ Scope: `ORGANIZATION_WORKSPACE_UPDATE`.
113
122
 
114
123
  ```graphql
115
124
  workspaceDelete(input: WorkspaceDeleteInput!): WorkspaceDeletePayload! @auth
@@ -121,26 +130,17 @@ workspaceDelete(input: WorkspaceDeleteInput!): WorkspaceDeletePayload! @auth
121
130
 
122
131
  ```graphql
123
132
  """
124
- Lifecycle status of a workspace.
125
-
126
- `DRAFT` is the editable starting state. `ARCHIVED` is a read-only audit state;
127
- archived workspaces can be unarchived back to `DRAFT`. `LIVE` is derived, not a
128
- stored state: a workspace is `LIVE` when it owns the project's served version
129
- (set by publishing). A live workspace cannot be archived or deleted; make a
130
- different workspace live first. `HIDDEN` marks the per-publish snapshot copies
131
- that back Publish History's Restore action: excluded from `Project.workspaces`,
132
- reachable only via `WorkspaceVersion.snapshotWorkspace`, and flipped to `DRAFT`
133
- when published.
133
+ Where a workspace is in its lifecycle. A live workspace cannot be archived or deleted.
134
134
  """
135
135
  enum WorkspaceStatus {
136
- """Workspace is in draft mode: editable, not yet served by SDKs."""
136
+ """Editable, and not served to visitors."""
137
137
  DRAFT
138
- """Workspace owns the project's served version (derived, not stored)."""
138
+ """Published, and owner of the version the project serves."""
139
139
  LIVE
140
- """Workspace has been archived: read-only audit state."""
140
+ """Out of the default list. `workspaceUnarchive` returns it to `DRAFT`."""
141
141
  ARCHIVED
142
142
  """
143
- Per-publish snapshot copy: excluded from workspace listings, reachable via `WorkspaceVersion.snapshotWorkspace`.
143
+ The copy a publish makes, read through `WorkspaceVersion.snapshotWorkspace` and left out of workspace lists.
144
144
  """
145
145
  HIDDEN
146
146
  }
@@ -150,78 +150,64 @@ enum WorkspaceStatus {
150
150
 
151
151
  ```graphql
152
152
  """
153
- A workspace — a versioned container of features, experiences, conditions,
154
- actions, steps, fields, and CMS content for one project.
155
-
156
- Lifecycle: `DRAFT` → `LIVE` (via `workspacePublish`) → `ARCHIVED` (via
157
- `workspaceArchive`). At most one workspace per project may be `LIVE`.
158
- Publishing creates an immutable `WorkspaceVersion` snapshot; use
159
- `workspaceDiff` to preview changes before publishing.
160
-
161
- The connection fields (`conditions`, `steps`, `fields`, etc.) page over
162
- this workspace's draft state; the previously-published version is
163
- exposed via `latestVersion` and read through `workspaceDiff`.
153
+ One version of a project's configuration: its experiences, feature flags, steps, fields, actions,
154
+ conditions, workflows and content. Its connection fields read its current content; publishing it
155
+ makes an immutable `WorkspaceVersion`.
164
156
  """
165
157
  type Workspace {
166
- """Unique workspace identifier."""
158
+ """The ID of the workspace."""
167
159
  id: ID!
168
- """User-facing display name."""
160
+ """The workspace's name."""
169
161
  name: String!
170
- """Current status of the workspace."""
162
+ """Where the workspace is in its lifecycle."""
171
163
  status: WorkspaceStatus!
172
- """The project this workspace belongs to."""
164
+ """The project the workspace belongs to."""
173
165
  project: Project!
174
- """The project ID this workspace belongs to."""
166
+ """The ID of the project the workspace belongs to."""
175
167
  projectId: ID!
176
- """Conditions within this workspace."""
168
+ """The workspace's conditions."""
177
169
  conditions(first: Int, after: String, last: Int, before: String): ConditionConnection!
178
- """Steps within this workspace."""
170
+ """The workspace's steps."""
179
171
  steps(first: Int, after: String, last: Int, before: String): StepConnection!
180
- """Fields within this workspace."""
172
+ """The workspace's fields."""
181
173
  fields(first: Int, after: String, last: Int, before: String): FieldConnection!
182
- """Actions within this workspace."""
174
+ """The workspace's actions."""
183
175
  actions(first: Int, after: String, last: Int, before: String): ActionConnection!
184
- """Features within this workspace."""
176
+ """The workspace's feature flags."""
185
177
  features(first: Int, after: String, last: Int, before: String): FeatureConnection!
186
- """
187
- Experiences within this workspace, optionally filtered by type (`FLOW` / `PAGE`).
188
- """
178
+ """The workspace's experiences, of one type when `type` is set."""
189
179
  experiences(type: ExperienceType, first: Int, after: String, last: Int, before: String): ExperienceConnection!
190
- """Workflows within this workspace."""
180
+ """The workspace's workflows. `last` and `before` are ignored."""
191
181
  workflows(first: Int, after: String, last: Int, before: String): WorkflowConnection!
192
182
  """
193
- CMS Content Models within this workspace, optionally filtered by category.
183
+ The workspace's Content Models, of one category when `category` is set.
194
184
  """
195
185
  contentModels(category: ContentModelCategory, first: Int, after: String, last: Int, before: String): ContentModelConnection!
196
186
  """
197
- CMS Content Blocks within this workspace, optionally filtered by category.
187
+ The workspace's Content Blocks, of one category when `category` is set.
198
188
  """
199
189
  contentBlocks(category: ContentBlockCategory, first: Int, after: String, last: Int, before: String): ContentBlockConnection!
200
190
  """
201
- CMS Content Entries within this workspace, optionally filtered by parent Content Model.
191
+ The workspace's content entries, of one Content Model when `contentModelId` is set.
202
192
  """
203
193
  contentEntries(contentModelId: ID, first: Int, after: String, last: Int, before: String): ContentEntryConnection!
204
- """Preview token for previewing unpublished workspace changes in the SDK."""
194
+ """
195
+ The preview token that lets a Delivery API request read the workspace's unpublished content.
196
+ """
205
197
  previewToken: String!
206
- """When this workspace was created."""
198
+ """When the workspace was created."""
207
199
  createdAt: DateTime!
208
- """When this workspace was last published (null if never published)."""
209
- publishedAt: DateTime
210
200
  """
211
- When the workspace draft content was last modified (entity create/update/delete).
201
+ When the version the workspace last made live was published. Null when it has never been published.
212
202
  """
203
+ publishedAt: DateTime
204
+ """When an entity in the workspace was last created, changed or deleted."""
213
205
  draftChangedAt: DateTime!
214
206
  """
215
- The most recent published snapshot for this workspace, or null if it
216
- has never been published. Snapshot contents are only readable via
217
- `workspaceDiff`.
207
+ The workspace's most recent version. Null when it has never been published.
218
208
  """
219
209
  latestVersion: WorkspaceVersion
220
- """
221
- Published version history for this workspace, ordered newest-first.
222
- Supports forward (`first`/`after`) and backward (`last`/`before`)
223
- pagination with stable cursors over `(publishedAt, id)`.
224
- """
210
+ """The workspace's versions, newest first."""
225
211
  versions(first: Int, after: String, last: Int, before: String): WorkspaceVersionConnection!
226
212
  }
227
213
  ```
@@ -229,11 +215,11 @@ type Workspace {
229
215
  ### `WorkspaceEdge`
230
216
 
231
217
  ```graphql
232
- """Edge type for `WorkspaceConnection`."""
218
+ """A workspace in a page of results."""
233
219
  type WorkspaceEdge {
234
- """Pagination cursor for this edge."""
220
+ """The cursor of this edge."""
235
221
  cursor: String!
236
- """The workspace."""
222
+ """The item."""
237
223
  node: Workspace!
238
224
  }
239
225
  ```
@@ -241,13 +227,13 @@ type WorkspaceEdge {
241
227
  ### `WorkspaceConnection`
242
228
 
243
229
  ```graphql
244
- """Relay-style connection of workspaces."""
230
+ """A page of workspaces."""
245
231
  type WorkspaceConnection {
246
- """List of workspace edges."""
232
+ """The edges in this page."""
247
233
  edges: [WorkspaceEdge!]!
248
- """Pagination metadata."""
234
+ """Where this page sits in the list."""
249
235
  pageInfo: PageInfo!
250
- """Total number of workspaces."""
236
+ """The number of items across all pages."""
251
237
  totalCount: Int!
252
238
  }
253
239
  ```
@@ -255,15 +241,11 @@ type WorkspaceConnection {
255
241
  ### `WorkspacePublishInput`
256
242
 
257
243
  ```graphql
258
- """Input for `workspacePublish` — promote a draft workspace to live."""
244
+ """The input of `workspacePublish`."""
259
245
  input WorkspacePublishInput {
260
- """
261
- Project ID. Derived from `workspaceId`; kept for backwards compatibility.
262
- """
246
+ """Ignored. The workspace identifies its project."""
263
247
  projectId: ID @deprecated(reason: "Derived from workspace; no longer required.")
264
- """
265
- Workspace ID to publish. Must currently be in `DRAFT` or `LIVE` status (publishing a live workspace is a no-op rejection).
266
- """
248
+ """The ID of the workspace to publish."""
267
249
  workspaceId: ID!
268
250
  }
269
251
  ```
@@ -271,13 +253,13 @@ input WorkspacePublishInput {
271
253
  ### `WorkspacePublishPayload`
272
254
 
273
255
  ```graphql
274
- """Payload returned by `workspacePublish`."""
256
+ """The result of `workspacePublish`."""
275
257
  type WorkspacePublishPayload {
276
- """The published workspace, now in `LIVE` status."""
277
- workspace: Workspace
278
258
  """
279
- Validation errors encountered during publish. Empty array indicates success.
259
+ The published workspace, now `LIVE`. Null when a `userError` was returned.
280
260
  """
261
+ workspace: Workspace
262
+ """The problems that stopped the publish. Empty on success."""
281
263
  userErrors: [WorkspacePublishUserError!]!
282
264
  }
283
265
  ```
@@ -285,13 +267,11 @@ type WorkspacePublishPayload {
285
267
  ### `WorkspacePublishErrorCode`
286
268
 
287
269
  ```graphql
288
- """Machine-readable error codes for `workspacePublish`."""
270
+ """Why `workspacePublish` failed."""
289
271
  enum WorkspacePublishErrorCode {
290
- """The target workspace does not exist."""
272
+ """The workspace or its project does not exist."""
291
273
  WORKSPACE_NOT_FOUND
292
- """
293
- The target workspace is already live; publishing a live workspace is not allowed.
294
- """
274
+ """The workspace is live and has no unpublished changes."""
295
275
  WORKSPACE_ALREADY_LIVE
296
276
  }
297
277
  ```
@@ -299,13 +279,15 @@ enum WorkspacePublishErrorCode {
299
279
  ### `WorkspacePublishUserError`
300
280
 
301
281
  ```graphql
302
- """User-facing error for `workspacePublish`."""
282
+ """A problem that stopped `workspacePublish`."""
303
283
  type WorkspacePublishUserError {
304
- """Path to the offending input field, if applicable."""
284
+ """
285
+ The path to the input field at fault. Null when no single field is at fault.
286
+ """
305
287
  field: [String!]
306
- """Human-readable error message."""
288
+ """A message to show the user."""
307
289
  message: String!
308
- """Machine-readable error code."""
290
+ """The error's code."""
309
291
  code: WorkspacePublishErrorCode!
310
292
  }
311
293
  ```
@@ -313,20 +295,9 @@ type WorkspacePublishUserError {
313
295
  ### `WorkspaceVersionPublishInput`
314
296
 
315
297
  ```graphql
316
- """
317
- Input for `workspaceVersionPublish`. Promotes a previously-published
318
- `WorkspaceVersion` to be its project's served (live) version. The target may
319
- be the most recent version (a straight re-publish) or an earlier one (a
320
- rollback, in product terms).
321
-
322
- The version is the sole identifier: its owning workspace and project are
323
- resolved from it. Publishing makes that workspace the project's live one,
324
- un-archiving it if it was archived.
325
- """
298
+ """The input of `workspaceVersionPublish`."""
326
299
  input WorkspaceVersionPublishInput {
327
- """
328
- A previously-published `WorkspaceVersion` to make its project's served version.
329
- """
300
+ """The ID of the version to serve."""
330
301
  workspaceVersionId: ID!
331
302
  }
332
303
  ```
@@ -334,22 +305,13 @@ input WorkspaceVersionPublishInput {
334
305
  ### `WorkspaceVersionPublishPayload`
335
306
 
336
307
  ```graphql
337
- """
338
- Payload returned by `workspaceVersionPublish`. On success, `workspace` is the
339
- workspace that now owns the project's served version:
340
- `projects.live_workspace_version_id` points at the target version and the
341
- workspace's `publishedAt` is stamped with that version's original publish
342
- timestamp (the workspace is un-archived if it was archived). No new
343
- `WorkspaceVersion` row is created and the draft state is NOT modified.
344
- """
308
+ """The result of `workspaceVersionPublish`."""
345
309
  type WorkspaceVersionPublishPayload {
346
310
  """
347
- The workspace now serving the published version, or null if a `userError` was returned.
311
+ The workspace that owns the version, now `LIVE`. Null when a `userError` was returned.
348
312
  """
349
313
  workspace: Workspace
350
- """
351
- Validation errors encountered while publishing the version. Empty array indicates success.
352
- """
314
+ """The problems that stopped the publish. Empty on success."""
353
315
  userErrors: [WorkspaceVersionPublishUserError!]!
354
316
  }
355
317
  ```
@@ -357,15 +319,13 @@ type WorkspaceVersionPublishPayload {
357
319
  ### `WorkspaceVersionPublishErrorCode`
358
320
 
359
321
  ```graphql
360
- """Machine-readable error codes for `workspaceVersionPublish`."""
322
+ """Why `workspaceVersionPublish` failed."""
361
323
  enum WorkspaceVersionPublishErrorCode {
362
- """The version's owning workspace no longer exists (e.g. it was deleted)."""
324
+ """The workspace the version was published from has been deleted."""
363
325
  WORKSPACE_NOT_FOUND
364
- """The target `workspaceVersionId` does not exist."""
326
+ """The version does not exist."""
365
327
  WORKSPACE_VERSION_NOT_FOUND
366
- """
367
- The target `workspaceVersionId` is already the project's served version; publishing it again would be a no-op.
368
- """
328
+ """The project already serves the version."""
369
329
  WORKSPACE_VERSION_ALREADY_LIVE
370
330
  }
371
331
  ```
@@ -373,13 +333,15 @@ enum WorkspaceVersionPublishErrorCode {
373
333
  ### `WorkspaceVersionPublishUserError`
374
334
 
375
335
  ```graphql
376
- """User-facing error for `workspaceVersionPublish`."""
336
+ """A problem that stopped `workspaceVersionPublish`."""
377
337
  type WorkspaceVersionPublishUserError {
378
- """Path to the offending input field, if applicable."""
338
+ """
339
+ The path to the input field at fault. Null when no single field is at fault.
340
+ """
379
341
  field: [String!]
380
- """Human-readable error message."""
342
+ """A message to show the user."""
381
343
  message: String!
382
- """Machine-readable error code."""
344
+ """The error's code."""
383
345
  code: WorkspaceVersionPublishErrorCode!
384
346
  }
385
347
  ```
@@ -387,11 +349,11 @@ type WorkspaceVersionPublishUserError {
387
349
  ### `WorkspaceCreateInput`
388
350
 
389
351
  ```graphql
390
- """Input for `workspaceCreate`."""
352
+ """The input of `workspaceCreate`."""
391
353
  input WorkspaceCreateInput {
392
- """Project to create the workspace in."""
354
+ """The ID of the project to create the workspace in."""
393
355
  projectId: ID!
394
- """User-facing display name for the new workspace."""
356
+ """The workspace's name. Leading and trailing spaces are trimmed."""
395
357
  name: String!
396
358
  }
397
359
  ```
@@ -399,11 +361,11 @@ input WorkspaceCreateInput {
399
361
  ### `WorkspaceCreatePayload`
400
362
 
401
363
  ```graphql
402
- """Payload returned by `workspaceCreate`."""
364
+ """The result of `workspaceCreate`."""
403
365
  type WorkspaceCreatePayload {
404
- """The newly created workspace (in `DRAFT` status)."""
366
+ """The new workspace, in `DRAFT`. Null when a `userError` was returned."""
405
367
  workspace: Workspace
406
- """Validation errors encountered while creating the workspace."""
368
+ """The problems that stopped the create. Empty on success."""
407
369
  userErrors: [WorkspaceCreateUserError!]!
408
370
  }
409
371
  ```
@@ -411,11 +373,11 @@ type WorkspaceCreatePayload {
411
373
  ### `WorkspaceCreateErrorCode`
412
374
 
413
375
  ```graphql
414
- """Machine-readable error codes for `workspaceCreate`."""
376
+ """Why `workspaceCreate` failed."""
415
377
  enum WorkspaceCreateErrorCode {
416
- """The provided name was empty."""
378
+ """The name is blank."""
417
379
  NAME_REQUIRED
418
- """The target project does not exist."""
380
+ """The project does not exist."""
419
381
  PROJECT_NOT_FOUND
420
382
  }
421
383
  ```
@@ -423,13 +385,15 @@ enum WorkspaceCreateErrorCode {
423
385
  ### `WorkspaceCreateUserError`
424
386
 
425
387
  ```graphql
426
- """User-facing error for `workspaceCreate`."""
388
+ """A problem that stopped `workspaceCreate`."""
427
389
  type WorkspaceCreateUserError {
428
- """Path to the offending input field, if applicable."""
390
+ """
391
+ The path to the input field at fault. Null when no single field is at fault.
392
+ """
429
393
  field: [String!]
430
- """Human-readable error message."""
394
+ """A message to show the user."""
431
395
  message: String!
432
- """Machine-readable error code."""
396
+ """The error's code."""
433
397
  code: WorkspaceCreateErrorCode!
434
398
  }
435
399
  ```
@@ -437,11 +401,11 @@ type WorkspaceCreateUserError {
437
401
  ### `WorkspaceUpdateInput`
438
402
 
439
403
  ```graphql
440
- """Input for `workspaceUpdate` — only the display name is mutable."""
404
+ """The input of `workspaceUpdate`. Every field is required."""
441
405
  input WorkspaceUpdateInput {
442
- """Workspace to rename."""
406
+ """The ID of the workspace to rename."""
443
407
  workspaceId: ID!
444
- """New display name."""
408
+ """The workspace's new name. Leading and trailing spaces are trimmed."""
445
409
  name: String!
446
410
  }
447
411
  ```
@@ -449,11 +413,11 @@ input WorkspaceUpdateInput {
449
413
  ### `WorkspaceUpdatePayload`
450
414
 
451
415
  ```graphql
452
- """Payload returned by `workspaceUpdate`."""
416
+ """The result of `workspaceUpdate`."""
453
417
  type WorkspaceUpdatePayload {
454
- """The updated workspace."""
418
+ """The updated workspace. Null when a `userError` was returned."""
455
419
  workspace: Workspace
456
- """Validation errors encountered while updating the workspace."""
420
+ """The problems that stopped the update. Empty on success."""
457
421
  userErrors: [WorkspaceUpdateUserError!]!
458
422
  }
459
423
  ```
@@ -461,11 +425,11 @@ type WorkspaceUpdatePayload {
461
425
  ### `WorkspaceUpdateErrorCode`
462
426
 
463
427
  ```graphql
464
- """Machine-readable error codes for `workspaceUpdate`."""
428
+ """Why `workspaceUpdate` failed."""
465
429
  enum WorkspaceUpdateErrorCode {
466
- """The provided name was empty."""
430
+ """The name is blank."""
467
431
  NAME_REQUIRED
468
- """The target workspace does not exist."""
432
+ """The workspace does not exist."""
469
433
  WORKSPACE_NOT_FOUND
470
434
  }
471
435
  ```
@@ -473,13 +437,15 @@ enum WorkspaceUpdateErrorCode {
473
437
  ### `WorkspaceUpdateUserError`
474
438
 
475
439
  ```graphql
476
- """User-facing error for `workspaceUpdate`."""
440
+ """A problem that stopped `workspaceUpdate`."""
477
441
  type WorkspaceUpdateUserError {
478
- """Path to the offending input field, if applicable."""
442
+ """
443
+ The path to the input field at fault. Null when no single field is at fault.
444
+ """
479
445
  field: [String!]
480
- """Human-readable error message."""
446
+ """A message to show the user."""
481
447
  message: String!
482
- """Machine-readable error code."""
448
+ """The error's code."""
483
449
  code: WorkspaceUpdateErrorCode!
484
450
  }
485
451
  ```
@@ -487,16 +453,12 @@ type WorkspaceUpdateUserError {
487
453
  ### `WorkspaceDuplicateInput`
488
454
 
489
455
  ```graphql
490
- """
491
- Input for `workspaceDuplicate`. Copies the source workspace and every
492
- child entity (features, conditions, actions, steps, fields, experiences,
493
- CMS content) into a new draft workspace on the same project.
494
- """
456
+ """The input of `workspaceDuplicate`."""
495
457
  input WorkspaceDuplicateInput {
496
- """Workspace to duplicate."""
458
+ """The ID of the workspace to copy."""
497
459
  sourceWorkspaceId: ID!
498
460
  """
499
- Optional display name for the new workspace (defaults to `<source> (Copy)`).
461
+ The new workspace's name. When it is null or blank, the source's name followed by ` (Copy)`.
500
462
  """
501
463
  name: String
502
464
  }
@@ -505,13 +467,13 @@ input WorkspaceDuplicateInput {
505
467
  ### `WorkspaceDuplicatePayload`
506
468
 
507
469
  ```graphql
508
- """Payload returned by `workspaceDuplicate`."""
470
+ """The result of `workspaceDuplicate`."""
509
471
  type WorkspaceDuplicatePayload {
510
- """The newly created workspace (in `DRAFT` status)."""
472
+ """The new workspace, in `DRAFT`. Null when a `userError` was returned."""
511
473
  workspace: Workspace
512
- """The source workspace the new one was copied from."""
474
+ """The workspace that was copied. Null when a `userError` was returned."""
513
475
  sourceWorkspace: Workspace
514
- """Validation errors encountered while duplicating the workspace."""
476
+ """The problems that stopped the copy. Empty on success."""
515
477
  userErrors: [WorkspaceDuplicateUserError!]!
516
478
  }
517
479
  ```
@@ -519,9 +481,9 @@ type WorkspaceDuplicatePayload {
519
481
  ### `WorkspaceDuplicateErrorCode`
520
482
 
521
483
  ```graphql
522
- """Machine-readable error codes for `workspaceDuplicate`."""
484
+ """Why `workspaceDuplicate` failed."""
523
485
  enum WorkspaceDuplicateErrorCode {
524
- """The source workspace does not exist."""
486
+ """The workspace to copy does not exist."""
525
487
  SOURCE_NOT_FOUND
526
488
  }
527
489
  ```
@@ -529,13 +491,15 @@ enum WorkspaceDuplicateErrorCode {
529
491
  ### `WorkspaceDuplicateUserError`
530
492
 
531
493
  ```graphql
532
- """User-facing error for `workspaceDuplicate`."""
494
+ """A problem that stopped `workspaceDuplicate`."""
533
495
  type WorkspaceDuplicateUserError {
534
- """Path to the offending input field, if applicable."""
496
+ """
497
+ The path to the input field at fault. Null when no single field is at fault.
498
+ """
535
499
  field: [String!]
536
- """Human-readable error message."""
500
+ """A message to show the user."""
537
501
  message: String!
538
- """Machine-readable error code."""
502
+ """The error's code."""
539
503
  code: WorkspaceDuplicateErrorCode!
540
504
  }
541
505
  ```
@@ -543,11 +507,9 @@ type WorkspaceDuplicateUserError {
543
507
  ### `WorkspaceArchiveInput`
544
508
 
545
509
  ```graphql
546
- """
547
- Input for `workspaceArchive` — move a non-live workspace to `ARCHIVED` status.
548
- """
510
+ """The input of `workspaceArchive`."""
549
511
  input WorkspaceArchiveInput {
550
- """Workspace to archive."""
512
+ """The ID of the workspace to archive."""
551
513
  workspaceId: ID!
552
514
  }
553
515
  ```
@@ -555,11 +517,11 @@ input WorkspaceArchiveInput {
555
517
  ### `WorkspaceArchivePayload`
556
518
 
557
519
  ```graphql
558
- """Payload returned by `workspaceArchive`."""
520
+ """The result of `workspaceArchive`."""
559
521
  type WorkspaceArchivePayload {
560
- """The archived workspace, or null if a `userError` was returned."""
522
+ """The archived workspace. Null when a `userError` was returned."""
561
523
  workspace: Workspace
562
- """Validation errors encountered while archiving the workspace."""
524
+ """The problems that stopped the archive. Empty on success."""
563
525
  userErrors: [WorkspaceArchiveUserError!]!
564
526
  }
565
527
  ```
@@ -567,13 +529,11 @@ type WorkspaceArchivePayload {
567
529
  ### `WorkspaceArchiveErrorCode`
568
530
 
569
531
  ```graphql
570
- """Machine-readable error codes for `workspaceArchive`."""
532
+ """Why `workspaceArchive` failed."""
571
533
  enum WorkspaceArchiveErrorCode {
572
534
  """The workspace does not exist."""
573
535
  WORKSPACE_NOT_FOUND
574
- """
575
- Live workspaces cannot be archived — publish a different workspace first.
576
- """
536
+ """The workspace is live."""
577
537
  WORKSPACE_IS_LIVE
578
538
  }
579
539
  ```
@@ -581,13 +541,15 @@ enum WorkspaceArchiveErrorCode {
581
541
  ### `WorkspaceArchiveUserError`
582
542
 
583
543
  ```graphql
584
- """User-facing error for `workspaceArchive`."""
544
+ """A problem that stopped `workspaceArchive`."""
585
545
  type WorkspaceArchiveUserError {
586
- """Path to the offending input field, if applicable."""
546
+ """
547
+ The path to the input field at fault. Null when no single field is at fault.
548
+ """
587
549
  field: [String!]
588
- """Human-readable error message."""
550
+ """A message to show the user."""
589
551
  message: String!
590
- """Machine-readable error code."""
552
+ """The error's code."""
591
553
  code: WorkspaceArchiveErrorCode!
592
554
  }
593
555
  ```
@@ -595,11 +557,9 @@ type WorkspaceArchiveUserError {
595
557
  ### `WorkspaceUnarchiveInput`
596
558
 
597
559
  ```graphql
598
- """
599
- Input for `workspaceUnarchive` — restore an archived workspace to `DRAFT`.
600
- """
560
+ """The input of `workspaceUnarchive`."""
601
561
  input WorkspaceUnarchiveInput {
602
- """Workspace to unarchive."""
562
+ """The ID of the workspace to unarchive."""
603
563
  workspaceId: ID!
604
564
  }
605
565
  ```
@@ -607,13 +567,11 @@ input WorkspaceUnarchiveInput {
607
567
  ### `WorkspaceUnarchivePayload`
608
568
 
609
569
  ```graphql
610
- """Payload returned by `workspaceUnarchive`."""
570
+ """The result of `workspaceUnarchive`."""
611
571
  type WorkspaceUnarchivePayload {
612
- """
613
- The unarchived workspace (now `DRAFT`), or null if a `userError` was returned.
614
- """
572
+ """The workspace, now `DRAFT`. Null when a `userError` was returned."""
615
573
  workspace: Workspace
616
- """Validation errors encountered while unarchiving the workspace."""
574
+ """The problems that stopped the unarchive. Empty on success."""
617
575
  userErrors: [WorkspaceUnarchiveUserError!]!
618
576
  }
619
577
  ```
@@ -621,11 +579,11 @@ type WorkspaceUnarchivePayload {
621
579
  ### `WorkspaceUnarchiveErrorCode`
622
580
 
623
581
  ```graphql
624
- """Machine-readable error codes for `workspaceUnarchive`."""
582
+ """Why `workspaceUnarchive` failed."""
625
583
  enum WorkspaceUnarchiveErrorCode {
626
584
  """The workspace does not exist."""
627
585
  WORKSPACE_NOT_FOUND
628
- """Only `ARCHIVED` workspaces can be unarchived."""
586
+ """The workspace is not `ARCHIVED`."""
629
587
  WORKSPACE_NOT_ARCHIVED
630
588
  }
631
589
  ```
@@ -633,13 +591,15 @@ enum WorkspaceUnarchiveErrorCode {
633
591
  ### `WorkspaceUnarchiveUserError`
634
592
 
635
593
  ```graphql
636
- """User-facing error for `workspaceUnarchive`."""
594
+ """A problem that stopped `workspaceUnarchive`."""
637
595
  type WorkspaceUnarchiveUserError {
638
- """Path to the offending input field, if applicable."""
596
+ """
597
+ The path to the input field at fault. Null when no single field is at fault.
598
+ """
639
599
  field: [String!]
640
- """Human-readable error message."""
600
+ """A message to show the user."""
641
601
  message: String!
642
- """Machine-readable error code."""
602
+ """The error's code."""
643
603
  code: WorkspaceUnarchiveErrorCode!
644
604
  }
645
605
  ```
@@ -647,9 +607,9 @@ type WorkspaceUnarchiveUserError {
647
607
  ### `WorkspaceDeleteInput`
648
608
 
649
609
  ```graphql
650
- """Input for `workspaceDelete` — soft-delete a non-live workspace."""
610
+ """The input of `workspaceDelete`."""
651
611
  input WorkspaceDeleteInput {
652
- """Workspace to delete."""
612
+ """The ID of the workspace to delete."""
653
613
  workspaceId: ID!
654
614
  }
655
615
  ```
@@ -657,13 +617,11 @@ input WorkspaceDeleteInput {
657
617
  ### `WorkspaceDeletePayload`
658
618
 
659
619
  ```graphql
660
- """Payload returned by `workspaceDelete`."""
620
+ """The result of `workspaceDelete`."""
661
621
  type WorkspaceDeletePayload {
662
- """
663
- The ID of the deleted workspace, or null if a `userError` was returned.
664
- """
622
+ """The ID of the deleted workspace. Null when a `userError` was returned."""
665
623
  deletedWorkspaceId: ID
666
- """Validation errors encountered while deleting the workspace."""
624
+ """The problems that stopped the delete. Empty on success."""
667
625
  userErrors: [WorkspaceDeleteUserError!]!
668
626
  }
669
627
  ```
@@ -671,13 +629,11 @@ type WorkspaceDeletePayload {
671
629
  ### `WorkspaceDeleteErrorCode`
672
630
 
673
631
  ```graphql
674
- """Machine-readable error codes for `workspaceDelete`."""
632
+ """Why `workspaceDelete` failed."""
675
633
  enum WorkspaceDeleteErrorCode {
676
634
  """The workspace does not exist."""
677
635
  WORKSPACE_NOT_FOUND
678
- """
679
- Live workspaces cannot be deleted — publish a different workspace first.
680
- """
636
+ """The workspace is live."""
681
637
  WORKSPACE_IS_LIVE
682
638
  }
683
639
  ```
@@ -685,13 +641,15 @@ enum WorkspaceDeleteErrorCode {
685
641
  ### `WorkspaceDeleteUserError`
686
642
 
687
643
  ```graphql
688
- """User-facing error for `workspaceDelete`."""
644
+ """A problem that stopped `workspaceDelete`."""
689
645
  type WorkspaceDeleteUserError {
690
- """Path to the offending input field, if applicable."""
646
+ """
647
+ The path to the input field at fault. Null when no single field is at fault.
648
+ """
691
649
  field: [String!]
692
- """Human-readable error message."""
650
+ """A message to show the user."""
693
651
  message: String!
694
- """Machine-readable error code."""
652
+ """The error's code."""
695
653
  code: WorkspaceDeleteErrorCode!
696
654
  }
697
655
  ```
@@ -699,13 +657,12 @@ type WorkspaceDeleteUserError {
699
657
  ### `WorkspaceExportInput`
700
658
 
701
659
  ```graphql
702
- """
703
- Input for `workspaceExport`. To export exactly what a project serves, pass the
704
- id of the live `WorkspaceVersion.snapshotWorkspace`: a published version's
705
- snapshot workspace holds no draft changes made after it was published.
706
- """
660
+ """The input of `workspaceExport`."""
707
661
  input WorkspaceExportInput {
708
- """Workspace to export."""
662
+ """
663
+ The ID of the workspace to export. To export exactly what a project serves, pass the ID of the live
664
+ version's `snapshotWorkspace`.
665
+ """
709
666
  workspaceId: ID!
710
667
  }
711
668
  ```
@@ -713,40 +670,37 @@ input WorkspaceExportInput {
713
670
  ### `WorkspaceExportPayload`
714
671
 
715
672
  ````graphql
716
- """
717
- Payload returned by `workspaceExport`.
718
-
719
- `bundle` is a JSON document (`formatVersion: 1`) that `workspaceImport` reads:
720
-
721
- ```json
722
- {
723
- "formatVersion": 1,
724
- "source": { "apiUrl": "...", "projectId": "...", "workspaceId": "...",
725
- "workspaceVersionId": "..." | null, "exportedAt": "..." },
726
- "workspace": { "name": "..." },
727
- "features": [], "featureVariants": [], "steps": [], "fields": [],
728
- "stepFields": [], "actions": [], "actionFields": [], "conditions": [],
729
- "experiences": [], "contentModels": [], "contentBlocks": [],
730
- "contentEntries": [], "workflows": [],
731
- "assets": [{ "id": "...", "versionId": "...", "fileName": "...",
732
- "mimeType": "...", "sizeBytes": 0, "width": null, "height": null,
733
- "sha256": "..." | null, "downloadUrl": "..." }]
734
- }
735
- ```
736
-
737
- Entity rows use database column names and carry their source `id`, which is a
738
- handle inside the bundle only. Organization, project, workspace and user ids,
739
- timestamps and deleted rows are left out. A workflow carries its `trigger` and
740
- its `workflow_json` graph; its `scopes` are left out, since import derives
741
- them from the tools the graph names. Every asset version the Content
742
- Entries reference is listed once in `assets`; an asset reference without a
743
- version pin is pinned to the version delivery serves for it. `source` is
744
- provenance only.
745
- """
673
+ """The result of `workspaceExport`."""
746
674
  type WorkspaceExportPayload {
747
- """The bundle, or null if a `userError` was returned."""
675
+ """
676
+ The bundle: a JSON document (`formatVersion: 1`) that `workspaceImport` reads. Null when a
677
+ `userError` was returned.
678
+
679
+ ```json
680
+ {
681
+ "formatVersion": 1,
682
+ "source": { "apiUrl": "...", "projectId": "...", "workspaceId": "...",
683
+ "workspaceVersionId": "..." | null, "exportedAt": "..." },
684
+ "workspace": { "name": "..." },
685
+ "features": [], "featureVariants": [], "steps": [], "fields": [],
686
+ "stepFields": [], "actions": [], "actionFields": [], "conditions": [],
687
+ "experiences": [], "contentModels": [], "contentBlocks": [],
688
+ "contentEntries": [], "workflows": [],
689
+ "assets": [{ "id": "...", "versionId": "...", "fileName": "...",
690
+ "mimeType": "...", "sizeBytes": 0, "width": null, "height": null,
691
+ "sha256": "..." | null, "downloadUrl": "..." }]
692
+ }
693
+ ```
694
+
695
+ Entities use snake_case keys and carry their source `id`, which is a handle inside the bundle
696
+ only. Organisation, project, workspace and user IDs, timestamps and deleted entities are left out.
697
+ A workflow carries its `trigger` and its `workflow_json` graph, without its scopes. Every asset
698
+ version the content entries reference is listed once in `assets`; a reference that pins no version
699
+ is pinned to the version the Delivery API serves for it. `source` records where the bundle came
700
+ from.
701
+ """
748
702
  bundle: JSON
749
- """Errors that stopped the export. Empty on success."""
703
+ """The problems that stopped the export. Empty on success."""
750
704
  userErrors: [WorkspaceExportUserError!]!
751
705
  }
752
706
  ````
@@ -754,25 +708,26 @@ type WorkspaceExportPayload {
754
708
  ### `WorkspaceExportErrorCode`
755
709
 
756
710
  ```graphql
757
- """Machine-readable error codes for `workspaceExport`."""
711
+ """Why `workspaceExport` failed."""
758
712
  enum WorkspaceExportErrorCode {
759
713
  """The workspace does not exist."""
760
714
  WORKSPACE_NOT_FOUND
761
715
  """
762
- A Content Entry references an asset version that no longer exists in the project. The message names the entry and the asset.
716
+ A content entry references an asset version that does not exist in the project. The message
717
+ names the entry and the asset.
763
718
  """
764
719
  ASSET_NOT_FOUND
765
720
  """
766
- A stored row does not fit the bundle format, even after experience `flow_json` is read the way the app serves it, or a Content Entry holds an asset version where its schema places no asset field, which `workspaceImport` cannot remap. The message names the entity and the offending column or place in `data`.
721
+ An entity does not fit the bundle format, or a content entry holds an asset version where its
722
+ schema has no asset field, which `workspaceImport` cannot remap. The message names the entity
723
+ and the place at fault.
767
724
  """
768
725
  INVALID_SOURCE_ROW
769
726
  """
770
- A row references an entity the workspace does not hold, such as a Content
771
- Entry that embeds a deleted Content Block, a flow node whose target
772
- Experience is deleted, or a workflow whose trigger or tool argument names a
773
- deleted Action, so `workspaceImport` would reject the bundle. One
774
- error is returned per reference; its message names the entity, its key when
775
- it has one, where in the entity the reference sits, and the id it references.
727
+ An entity references one the workspace does not hold, such as a content entry that embeds a
728
+ deleted Content Block, a flow node whose experience is deleted, or a workflow whose trigger or
729
+ tool argument names a deleted action. One error is returned per reference; its message names the
730
+ entity, its key when it has one, where the reference sits and the ID it references.
776
731
  """
777
732
  UNRESOLVED_REFERENCE
778
733
  }
@@ -781,13 +736,15 @@ enum WorkspaceExportErrorCode {
781
736
  ### `WorkspaceExportUserError`
782
737
 
783
738
  ```graphql
784
- """User-facing error for `workspaceExport`."""
739
+ """A problem that stopped `workspaceExport`."""
785
740
  type WorkspaceExportUserError {
786
- """Path to the offending input field, if applicable."""
741
+ """
742
+ The path to the input field at fault. Null when no single field is at fault.
743
+ """
787
744
  field: [String!]
788
- """Human-readable error message."""
745
+ """A message to show the user."""
789
746
  message: String!
790
- """Machine-readable error code."""
747
+ """The error's code."""
791
748
  code: WorkspaceExportErrorCode!
792
749
  }
793
750
  ```
@@ -796,21 +753,17 @@ type WorkspaceExportUserError {
796
753
 
797
754
  ```graphql
798
755
  """
799
- Maps one asset version a bundle references to the asset version that stands in
800
- for it in the target project. Upload the bytes from the bundle's `downloadUrl`
801
- with `assetUploadInit` (passing `sha256`, so bytes already in the project are
802
- reused) and `assetCommit`, then map the bundle's `versionId` to the resulting
803
- `assetId` and `versionId`.
756
+ The asset version that stands in for one a bundle references. Upload the file from the bundle's
757
+ `downloadUrl` with `assetUploadInit`, passing `sha256` so a file the project holds is reused, and
758
+ `assetCommit`, then map the bundle's `versionId` to the result.
804
759
  """
805
760
  input WorkspaceImportAssetMappingInput {
806
- """
807
- The asset version id as it appears in the bundle (`assets[].versionId`).
808
- """
761
+ """The asset version's ID in the bundle (`assets[].versionId`)."""
809
762
  sourceVersionId: ID!
810
- """The target project's Asset."""
763
+ """The ID of the asset in the target project."""
811
764
  assetId: ID!
812
765
  """
813
- The committed version of `assetId` to reference in place of `sourceVersionId`.
766
+ The ID of the committed version of `assetId` that replaces `sourceVersionId`.
814
767
  """
815
768
  versionId: ID!
816
769
  }
@@ -819,32 +772,19 @@ input WorkspaceImportAssetMappingInput {
819
772
  ### `WorkspaceImportInput`
820
773
 
821
774
  ```graphql
822
- """
823
- Input for `workspaceImport`. Creates a new `DRAFT` workspace in `projectId`
824
- holding one copy of every entity in `bundle`, as produced by
825
- `workspaceExport`. Every entity gets a new id, and every reference between
826
- entities, including asset references through `assetMap` and the Actions a
827
- workflow's trigger and tool arguments name, is rewritten to the new ids. A
828
- workflow's graph keeps its node and edge ids, and its scopes are derived from
829
- the tools the graph names; the caller must be able to grant each of them, as
830
- when saving the graph. No existing workspace, entity or live version changes;
831
- publish the new workspace with `workspacePublish`.
832
- """
775
+ """The input of `workspaceImport`."""
833
776
  input WorkspaceImportInput {
834
777
  """
835
- The project to create the workspace in. May belong to a different organization than the bundle's source.
778
+ The ID of the project to create the workspace in. It can belong to another organisation than the bundle's source.
836
779
  """
837
780
  projectId: ID!
838
- """
839
- Display name for the new workspace. Defaults to the bundle's `workspace.name`.
840
- """
781
+ """The new workspace's name. Null for the bundle's `workspace.name`."""
841
782
  name: String
842
- """The bundle returned by `workspaceExport` (`formatVersion: 1`)."""
783
+ """The bundle `workspaceExport` returned (`formatVersion: 1`)."""
843
784
  bundle: JSON!
844
785
  """
845
- The target asset version for every asset version the bundle references.
846
- Every mapped target must be a committed version of a non-deleted Asset in
847
- `projectId`.
786
+ The stand-in for every asset version the bundle references. Each must be a committed version of an
787
+ asset in `projectId`.
848
788
  """
849
789
  assetMap: [WorkspaceImportAssetMappingInput!]
850
790
  }
@@ -853,14 +793,12 @@ input WorkspaceImportInput {
853
793
  ### `WorkspaceImportPayload`
854
794
 
855
795
  ```graphql
856
- """Payload returned by `workspaceImport`."""
796
+ """The result of `workspaceImport`."""
857
797
  type WorkspaceImportPayload {
858
- """
859
- The new workspace (in `DRAFT` status), or null if a `userError` was returned.
860
- """
798
+ """The new workspace, in `DRAFT`. Null when a `userError` was returned."""
861
799
  workspace: Workspace
862
800
  """
863
- Errors that stopped the import. When any is returned, nothing was created.
801
+ The problems that stopped the import. When any is returned, nothing was created.
864
802
  """
865
803
  userErrors: [WorkspaceImportUserError!]!
866
804
  }
@@ -869,7 +807,7 @@ type WorkspaceImportPayload {
869
807
  ### `WorkspaceImportErrorCode`
870
808
 
871
809
  ```graphql
872
- """Machine-readable error codes for `workspaceImport`."""
810
+ """Why `workspaceImport` failed."""
873
811
  enum WorkspaceImportErrorCode {
874
812
  """The target project does not exist."""
875
813
  PROJECT_NOT_FOUND
@@ -880,23 +818,30 @@ enum WorkspaceImportErrorCode {
880
818
  """The bundle's `formatVersion` is not one this server reads."""
881
819
  UNSUPPORTED_FORMAT_VERSION
882
820
  """
883
- The bundle does not match its format: a missing or unknown collection or column, a value of the wrong type, a content model or block schema that does not parse, a repeated id, or a workflow whose visit cap or loops the workflow save check refuses. `field` points into the bundle.
821
+ The bundle does not match its format: a missing or unknown collection or key, a value of the
822
+ wrong type, a Content Model or Content Block schema that does not parse, a repeated ID, or a
823
+ workflow whose visit cap or loops a workflow save refuses. `field` points into the bundle.
884
824
  """
885
825
  INVALID_BUNDLE
886
826
  """
887
- An entity references an id that is not in the bundle. One error is returned per reference; its message names the entity, its key when it has one, where in the entity the reference sits, and the id it references.
827
+ An entity references an ID that is not in the bundle. One error is returned per reference; its
828
+ message names the entity, its key when it has one, where the reference sits and the ID it
829
+ references.
888
830
  """
889
831
  UNRESOLVED_REFERENCE
890
832
  """
891
- An `assetMap` item names an asset version that is not a committed version of a non-deleted Asset in the target project, or maps one source version to two targets.
833
+ An `assetMap` item names an asset version that is not a committed version of an asset in the
834
+ target project, or maps one source version to two targets.
892
835
  """
893
836
  INVALID_ASSET_MAPPING
894
837
  """
895
- A Content Entry references an asset version that `assetMap` does not map, or holds a bundle asset version where its schema places no asset field, so the reference cannot be remapped.
838
+ A content entry references an asset version that `assetMap` does not map, or holds one where its
839
+ schema has no asset field.
896
840
  """
897
841
  UNMAPPED_ASSET
898
842
  """
899
- A workflow's tools need a scope the caller neither holds nor gets by default, so the caller could not save its graph. The message names the workflow, each tool and the scope it needs.
843
+ A workflow's tools need a scope the caller cannot grant. The message names the workflow, each
844
+ tool and the scope it needs.
900
845
  """
901
846
  WORKFLOW_SCOPES_NOT_HELD
902
847
  }
@@ -905,13 +850,15 @@ enum WorkspaceImportErrorCode {
905
850
  ### `WorkspaceImportUserError`
906
851
 
907
852
  ```graphql
908
- """User-facing error for `workspaceImport`."""
853
+ """A problem that stopped `workspaceImport`."""
909
854
  type WorkspaceImportUserError {
910
- """Path to the offending input field, if applicable."""
855
+ """
856
+ The path to the input field at fault. Null when no single field is at fault.
857
+ """
911
858
  field: [String!]
912
- """Human-readable error message."""
859
+ """A message to show the user."""
913
860
  message: String!
914
- """Machine-readable error code."""
861
+ """The error's code."""
915
862
  code: WorkspaceImportErrorCode!
916
863
  }
917
864
  ```