picked 0.0.101-next.2 → 0.0.101
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 +27 -12
- package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
- package/docs/explanation/content-references.md +99 -0
- package/docs/explanation/feature-flag-allocation.md +218 -0
- package/docs/explanation/how-picked-works.md +124 -0
- package/docs/explanation/how-pickedql-works.md +76 -0
- package/docs/explanation/pages-and-flows.md +64 -0
- package/docs/explanation/the-content-model.md +87 -0
- package/docs/explanation/the-two-apis.md +68 -0
- package/docs/explanation/why-server-side-rendering.md +76 -0
- package/docs/explanation/workspaces-and-versions.md +71 -0
- package/docs/how-to/add-a-step-field-or-action.md +56 -0
- package/docs/how-to/analytics/index.md +324 -0
- package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
- package/docs/how-to/authenticate-the-cli.md +101 -0
- package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
- package/docs/how-to/authenticate-with-a-password.md +68 -0
- package/docs/how-to/authenticate-with-an-api-key.md +60 -0
- package/docs/how-to/authenticate-with-oauth.md +49 -0
- package/docs/how-to/build-a-flow.md +106 -0
- package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
- package/docs/how-to/connect-the-mcp-server.md +46 -0
- package/docs/how-to/create-a-content-entry.md +58 -0
- package/docs/how-to/create-a-project.md +40 -0
- package/docs/how-to/create-an-experience.md +51 -0
- package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
- package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
- package/docs/how-to/define-a-page-layout.md +54 -0
- package/docs/how-to/fill-and-publish-a-page.md +82 -0
- package/docs/how-to/install-the-gtm-template.md +84 -0
- package/docs/how-to/install-the-sdk.md +93 -0
- package/docs/how-to/install-the-vite-plugin.md +69 -0
- package/docs/how-to/invite-and-remove-members.md +45 -0
- package/docs/how-to/point-one-entry-at-another.md +75 -0
- package/docs/how-to/preview-a-workspace.md +39 -0
- package/docs/how-to/publish-a-workspace.md +42 -0
- package/docs/how-to/read-a-feature-flag.md +113 -0
- package/docs/how-to/read-a-referenced-entry.md +109 -0
- package/docs/how-to/register-a-component.md +55 -0
- package/docs/how-to/register-an-action-handler.md +85 -0
- package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
- package/docs/how-to/render-a-step-form.md +131 -0
- package/docs/how-to/render-an-unpublished-preview.md +41 -0
- package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
- package/docs/how-to/reuse-a-section.md +64 -0
- package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
- package/docs/how-to/roll-back-a-published-version.md +39 -0
- package/docs/how-to/run-an-ab-test.md +59 -0
- package/docs/how-to/run-code-on-a-form-submission.md +125 -0
- package/docs/how-to/server-render-a-page.md +81 -0
- package/docs/how-to/set-a-content-security-policy.md +32 -0
- package/docs/how-to/set-up-mfa.md +126 -0
- package/docs/how-to/switch-workspaces.md +122 -0
- package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
- package/docs/how-to/validate-a-field.md +52 -0
- package/docs/how-to/wait-for-an-action-response.md +182 -0
- package/docs/how-to/write-a-condition.md +57 -0
- package/docs/how-to/write-a-predicate.md +60 -0
- package/docs/index.md +59 -0
- package/docs/reference/dashboard/actions.mdx +65 -0
- package/docs/reference/dashboard/api-keys.mdx +47 -0
- package/docs/reference/dashboard/conditions.mdx +51 -0
- package/docs/reference/dashboard/content/asset-library.mdx +74 -0
- package/docs/reference/dashboard/content/blocks.mdx +66 -0
- package/docs/reference/dashboard/content/content-entries.mdx +109 -0
- package/docs/reference/dashboard/content/models.mdx +119 -0
- package/docs/reference/dashboard/content/pages.mdx +72 -0
- package/docs/reference/dashboard/experiences.mdx +61 -0
- package/docs/reference/dashboard/external-apis.md +182 -0
- package/docs/reference/dashboard/features.mdx +165 -0
- package/docs/reference/dashboard/fields.mdx +120 -0
- package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
- package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
- package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
- package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
- package/docs/reference/dashboard/labels.md +321 -0
- package/docs/reference/dashboard/lead-search.md +235 -0
- package/docs/reference/dashboard/projects.mdx +53 -0
- package/docs/reference/dashboard/reports.mdx +53 -0
- package/docs/reference/dashboard/steps.mdx +47 -0
- package/docs/reference/dashboard/team-management.md +38 -0
- package/docs/reference/dashboard/workflow-runs.md +157 -0
- package/docs/reference/dashboard/workflow-templates.md +182 -0
- package/docs/reference/dashboard/workflow-test-runs.md +85 -0
- package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
- package/docs/reference/dashboard/workspaces.mdx +91 -0
- package/docs/reference/delivery-api/experience-content.md +152 -0
- package/docs/reference/delivery-api/index.md +45 -0
- package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
- package/docs/reference/delivery-api/project-config.md +65 -0
- package/docs/reference/delivery-api/workspace-schema.md +107 -0
- package/docs/reference/glossary.md +201 -0
- package/docs/reference/management-api/authentication.md +87 -0
- package/docs/reference/management-api/authorization-and-scopes.md +291 -0
- package/docs/reference/management-api/error-handling.md +232 -0
- package/docs/reference/management-api/pagination.md +192 -0
- package/docs/reference/management-api/schema/action.md +261 -0
- package/docs/reference/management-api/schema/analytics-session.md +363 -0
- package/docs/reference/management-api/schema/analytics.md +73 -0
- package/docs/reference/management-api/schema/api-key.md +170 -0
- package/docs/reference/management-api/schema/auth.md +1177 -0
- package/docs/reference/management-api/schema/cms-fields.md +954 -0
- package/docs/reference/management-api/schema/cms-models.md +1155 -0
- package/docs/reference/management-api/schema/common.md +362 -0
- package/docs/reference/management-api/schema/condition.md +254 -0
- package/docs/reference/management-api/schema/design-system.md +199 -0
- package/docs/reference/management-api/schema/experience.md +1098 -0
- package/docs/reference/management-api/schema/external-api.md +637 -0
- package/docs/reference/management-api/schema/feature.md +350 -0
- package/docs/reference/management-api/schema/feedback.md +103 -0
- package/docs/reference/management-api/schema/field.md +400 -0
- package/docs/reference/management-api/schema/index.md +243 -0
- package/docs/reference/management-api/schema/integration.md +272 -0
- package/docs/reference/management-api/schema/label.md +349 -0
- package/docs/reference/management-api/schema/lead.md +340 -0
- package/docs/reference/management-api/schema/mcp-server.md +299 -0
- package/docs/reference/management-api/schema/metric.md +223 -0
- package/docs/reference/management-api/schema/operation.md +96 -0
- package/docs/reference/management-api/schema/organization.md +749 -0
- package/docs/reference/management-api/schema/project.md +607 -0
- package/docs/reference/management-api/schema/report.md +243 -0
- package/docs/reference/management-api/schema/saved-view.md +288 -0
- package/docs/reference/management-api/schema/shopify.md +795 -0
- package/docs/reference/management-api/schema/step.md +273 -0
- package/docs/reference/management-api/schema/tenant-branding.md +185 -0
- package/docs/reference/management-api/schema/workbench.md +246 -0
- package/docs/reference/management-api/schema/workflow-run.md +263 -0
- package/docs/reference/management-api/schema/workflow.md +1110 -0
- package/docs/reference/management-api/schema/workspace-version.md +823 -0
- package/docs/reference/management-api/schema/workspace.md +917 -0
- package/docs/reference/pickedql/data-sources.md +174 -0
- package/docs/reference/pickedql/dimensions.md +103 -0
- package/docs/reference/pickedql/filtering.md +64 -0
- package/docs/reference/pickedql/index.md +18 -0
- package/docs/reference/pickedql/schema.md +172 -0
- package/docs/reference/pickedql/virtual-functions.md +248 -0
- package/docs/reference/sdk/actions.md +154 -0
- package/docs/reference/sdk/analytics-events.md +453 -0
- package/docs/reference/sdk/conditions.md +147 -0
- package/docs/reference/sdk/content-security-policy.md +21 -0
- package/docs/reference/sdk/content.md +253 -0
- package/docs/reference/sdk/experiences.md +51 -0
- package/docs/reference/sdk/features.md +256 -0
- package/docs/reference/sdk/fields.md +255 -0
- package/docs/reference/sdk/index.md +68 -0
- package/docs/reference/sdk/plugins/create-experience.md +123 -0
- package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
- package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
- package/docs/reference/sdk/plugins/hotjar.md +60 -0
- package/docs/reference/sdk/plugins/index.md +33 -0
- package/docs/reference/sdk/plugins/sentry.md +51 -0
- package/docs/reference/sdk/plugins/shopify.md +109 -0
- package/docs/reference/sdk/plugins/window-object.md +25 -0
- package/docs/reference/sdk/predicates.md +43 -0
- package/docs/reference/sdk/react.md +61 -0
- package/docs/reference/sdk/ssr/index.md +33 -0
- package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
- package/docs/reference/sdk/ssr/serialize.md +80 -0
- package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
- package/docs/reference/sdk/steps.md +86 -0
- package/docs/reference/sdk/svelte.md +74 -0
- package/docs/reference/sdk/type-generation.md +265 -0
- package/docs/reference/tools/admin-api-client.md +89 -0
- package/docs/reference/tools/chrome-extension.md +16 -0
- package/docs/reference/tools/cli.md +319 -0
- package/docs/reference/tools/delivery-api-client.md +60 -0
- package/docs/reference/tools/image-optimisation-service.md +104 -0
- package/docs/reference/tools/mcp-run.md +121 -0
- package/docs/reference/tools/mcp.md +391 -0
- package/docs/reference/tools/vite-plugin.md +163 -0
- package/docs/tutorials/first-api-call.md +253 -0
- package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
- package/docs/tutorials/first-experience.mdx +254 -0
- package/docs/tutorials/first-server-rendered-page.mdx +186 -0
- package/package.json +8 -7
|
@@ -0,0 +1,917 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
layout: docs
|
|
4
|
+
generated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workspace schema
|
|
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.
|
|
10
|
+
|
|
11
|
+
## Queries
|
|
12
|
+
|
|
13
|
+
### `workspace`
|
|
14
|
+
|
|
15
|
+
Get a specific workspace. Requires authentication.
|
|
16
|
+
|
|
17
|
+
```graphql
|
|
18
|
+
workspace(id: ID!, projectId: ID!): Workspace @auth
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### `workspaceExport`
|
|
22
|
+
|
|
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.
|
|
27
|
+
|
|
28
|
+
```graphql
|
|
29
|
+
workspaceExport(input: WorkspaceExportInput!): WorkspaceExportPayload! @auth
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Mutations
|
|
33
|
+
|
|
34
|
+
### `workspacePublish`
|
|
35
|
+
|
|
36
|
+
Publish a workspace, creating an immutable version snapshot. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
37
|
+
|
|
38
|
+
```graphql
|
|
39
|
+
workspacePublish(input: WorkspacePublishInput!): WorkspacePublishPayload! @auth
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `workspaceVersionPublish`
|
|
43
|
+
|
|
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`.
|
|
55
|
+
|
|
56
|
+
```graphql
|
|
57
|
+
workspaceVersionPublish(input: WorkspaceVersionPublishInput!): WorkspaceVersionPublishPayload! @auth
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### `workspaceCreate`
|
|
61
|
+
|
|
62
|
+
Create a new workspace on a project. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
63
|
+
|
|
64
|
+
```graphql
|
|
65
|
+
workspaceCreate(input: WorkspaceCreateInput!): WorkspaceCreatePayload! @auth
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### `workspaceUpdate`
|
|
69
|
+
|
|
70
|
+
Rename an existing workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
71
|
+
|
|
72
|
+
```graphql
|
|
73
|
+
workspaceUpdate(input: WorkspaceUpdateInput!): WorkspaceUpdatePayload! @auth
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `workspaceDuplicate`
|
|
77
|
+
|
|
78
|
+
Duplicate an existing workspace with all of its child entities, including its workflows. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
79
|
+
|
|
80
|
+
```graphql
|
|
81
|
+
workspaceDuplicate(input: WorkspaceDuplicateInput!): WorkspaceDuplicatePayload! @auth
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### `workspaceImport`
|
|
85
|
+
|
|
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.
|
|
89
|
+
|
|
90
|
+
```graphql
|
|
91
|
+
workspaceImport(input: WorkspaceImportInput!): WorkspaceImportPayload! @auth
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### `workspaceArchive`
|
|
95
|
+
|
|
96
|
+
Archive a non-live workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
97
|
+
|
|
98
|
+
```graphql
|
|
99
|
+
workspaceArchive(input: WorkspaceArchiveInput!): WorkspaceArchivePayload! @auth
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### `workspaceUnarchive`
|
|
103
|
+
|
|
104
|
+
Unarchive an archived workspace (restores it to `DRAFT`). Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
105
|
+
|
|
106
|
+
```graphql
|
|
107
|
+
workspaceUnarchive(input: WorkspaceUnarchiveInput!): WorkspaceUnarchivePayload! @auth
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### `workspaceDelete`
|
|
111
|
+
|
|
112
|
+
Soft-delete a non-live workspace. Requires scope: `ORGANIZATION_PROJECTS_UPDATE`.
|
|
113
|
+
|
|
114
|
+
```graphql
|
|
115
|
+
workspaceDelete(input: WorkspaceDeleteInput!): WorkspaceDeletePayload! @auth
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Types
|
|
119
|
+
|
|
120
|
+
### `WorkspaceStatus`
|
|
121
|
+
|
|
122
|
+
```graphql
|
|
123
|
+
"""
|
|
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.
|
|
134
|
+
"""
|
|
135
|
+
enum WorkspaceStatus {
|
|
136
|
+
"""Workspace is in draft mode: editable, not yet served by SDKs."""
|
|
137
|
+
DRAFT
|
|
138
|
+
"""Workspace owns the project's served version (derived, not stored)."""
|
|
139
|
+
LIVE
|
|
140
|
+
"""Workspace has been archived: read-only audit state."""
|
|
141
|
+
ARCHIVED
|
|
142
|
+
"""
|
|
143
|
+
Per-publish snapshot copy: excluded from workspace listings, reachable via `WorkspaceVersion.snapshotWorkspace`.
|
|
144
|
+
"""
|
|
145
|
+
HIDDEN
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### `Workspace`
|
|
150
|
+
|
|
151
|
+
```graphql
|
|
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`.
|
|
164
|
+
"""
|
|
165
|
+
type Workspace {
|
|
166
|
+
"""Unique workspace identifier."""
|
|
167
|
+
id: ID!
|
|
168
|
+
"""User-facing display name."""
|
|
169
|
+
name: String!
|
|
170
|
+
"""Current status of the workspace."""
|
|
171
|
+
status: WorkspaceStatus!
|
|
172
|
+
"""The project this workspace belongs to."""
|
|
173
|
+
project: Project!
|
|
174
|
+
"""The project ID this workspace belongs to."""
|
|
175
|
+
projectId: ID!
|
|
176
|
+
"""Conditions within this workspace."""
|
|
177
|
+
conditions(first: Int, after: String, last: Int, before: String): ConditionConnection!
|
|
178
|
+
"""Steps within this workspace."""
|
|
179
|
+
steps(first: Int, after: String, last: Int, before: String): StepConnection!
|
|
180
|
+
"""Fields within this workspace."""
|
|
181
|
+
fields(first: Int, after: String, last: Int, before: String): FieldConnection!
|
|
182
|
+
"""Actions within this workspace."""
|
|
183
|
+
actions(first: Int, after: String, last: Int, before: String): ActionConnection!
|
|
184
|
+
"""Features within this workspace."""
|
|
185
|
+
features(first: Int, after: String, last: Int, before: String): FeatureConnection!
|
|
186
|
+
"""
|
|
187
|
+
Experiences within this workspace, optionally filtered by type (`FLOW` / `PAGE`).
|
|
188
|
+
"""
|
|
189
|
+
experiences(type: ExperienceType, first: Int, after: String, last: Int, before: String): ExperienceConnection!
|
|
190
|
+
"""Workflows within this workspace."""
|
|
191
|
+
workflows(first: Int, after: String, last: Int, before: String): WorkflowConnection!
|
|
192
|
+
"""
|
|
193
|
+
CMS Content Models within this workspace, optionally filtered by category.
|
|
194
|
+
"""
|
|
195
|
+
contentModels(category: ContentModelCategory, first: Int, after: String, last: Int, before: String): ContentModelConnection!
|
|
196
|
+
"""
|
|
197
|
+
CMS Content Blocks within this workspace, optionally filtered by category.
|
|
198
|
+
"""
|
|
199
|
+
contentBlocks(category: ContentBlockCategory, first: Int, after: String, last: Int, before: String): ContentBlockConnection!
|
|
200
|
+
"""
|
|
201
|
+
CMS Content Entries within this workspace, optionally filtered by parent Content Model.
|
|
202
|
+
"""
|
|
203
|
+
contentEntries(contentModelId: ID, first: Int, after: String, last: Int, before: String): ContentEntryConnection!
|
|
204
|
+
"""Preview token for previewing unpublished workspace changes in the SDK."""
|
|
205
|
+
previewToken: String!
|
|
206
|
+
"""When this workspace was created."""
|
|
207
|
+
createdAt: DateTime!
|
|
208
|
+
"""When this workspace was last published (null if never published)."""
|
|
209
|
+
publishedAt: DateTime
|
|
210
|
+
"""
|
|
211
|
+
When the workspace draft content was last modified (entity create/update/delete).
|
|
212
|
+
"""
|
|
213
|
+
draftChangedAt: DateTime!
|
|
214
|
+
"""
|
|
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`.
|
|
218
|
+
"""
|
|
219
|
+
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
|
+
"""
|
|
225
|
+
versions(first: Int, after: String, last: Int, before: String): WorkspaceVersionConnection!
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### `WorkspaceEdge`
|
|
230
|
+
|
|
231
|
+
```graphql
|
|
232
|
+
"""Edge type for `WorkspaceConnection`."""
|
|
233
|
+
type WorkspaceEdge {
|
|
234
|
+
"""Pagination cursor for this edge."""
|
|
235
|
+
cursor: String!
|
|
236
|
+
"""The workspace."""
|
|
237
|
+
node: Workspace!
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### `WorkspaceConnection`
|
|
242
|
+
|
|
243
|
+
```graphql
|
|
244
|
+
"""Relay-style connection of workspaces."""
|
|
245
|
+
type WorkspaceConnection {
|
|
246
|
+
"""List of workspace edges."""
|
|
247
|
+
edges: [WorkspaceEdge!]!
|
|
248
|
+
"""Pagination metadata."""
|
|
249
|
+
pageInfo: PageInfo!
|
|
250
|
+
"""Total number of workspaces."""
|
|
251
|
+
totalCount: Int!
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### `WorkspacePublishInput`
|
|
256
|
+
|
|
257
|
+
```graphql
|
|
258
|
+
"""Input for `workspacePublish` — promote a draft workspace to live."""
|
|
259
|
+
input WorkspacePublishInput {
|
|
260
|
+
"""
|
|
261
|
+
Project ID. Derived from `workspaceId`; kept for backwards compatibility.
|
|
262
|
+
"""
|
|
263
|
+
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
|
+
"""
|
|
267
|
+
workspaceId: ID!
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### `WorkspacePublishPayload`
|
|
272
|
+
|
|
273
|
+
```graphql
|
|
274
|
+
"""Payload returned by `workspacePublish`."""
|
|
275
|
+
type WorkspacePublishPayload {
|
|
276
|
+
"""The published workspace, now in `LIVE` status."""
|
|
277
|
+
workspace: Workspace
|
|
278
|
+
"""
|
|
279
|
+
Validation errors encountered during publish. Empty array indicates success.
|
|
280
|
+
"""
|
|
281
|
+
userErrors: [WorkspacePublishUserError!]!
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### `WorkspacePublishErrorCode`
|
|
286
|
+
|
|
287
|
+
```graphql
|
|
288
|
+
"""Machine-readable error codes for `workspacePublish`."""
|
|
289
|
+
enum WorkspacePublishErrorCode {
|
|
290
|
+
"""The target workspace does not exist."""
|
|
291
|
+
WORKSPACE_NOT_FOUND
|
|
292
|
+
"""
|
|
293
|
+
The target workspace is already live; publishing a live workspace is not allowed.
|
|
294
|
+
"""
|
|
295
|
+
WORKSPACE_ALREADY_LIVE
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### `WorkspacePublishUserError`
|
|
300
|
+
|
|
301
|
+
```graphql
|
|
302
|
+
"""User-facing error for `workspacePublish`."""
|
|
303
|
+
type WorkspacePublishUserError {
|
|
304
|
+
"""Path to the offending input field, if applicable."""
|
|
305
|
+
field: [String!]
|
|
306
|
+
"""Human-readable error message."""
|
|
307
|
+
message: String!
|
|
308
|
+
"""Machine-readable error code."""
|
|
309
|
+
code: WorkspacePublishErrorCode!
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### `WorkspaceVersionPublishInput`
|
|
314
|
+
|
|
315
|
+
```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
|
+
"""
|
|
326
|
+
input WorkspaceVersionPublishInput {
|
|
327
|
+
"""
|
|
328
|
+
A previously-published `WorkspaceVersion` to make its project's served version.
|
|
329
|
+
"""
|
|
330
|
+
workspaceVersionId: ID!
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### `WorkspaceVersionPublishPayload`
|
|
335
|
+
|
|
336
|
+
```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
|
+
"""
|
|
345
|
+
type WorkspaceVersionPublishPayload {
|
|
346
|
+
"""
|
|
347
|
+
The workspace now serving the published version, or null if a `userError` was returned.
|
|
348
|
+
"""
|
|
349
|
+
workspace: Workspace
|
|
350
|
+
"""
|
|
351
|
+
Validation errors encountered while publishing the version. Empty array indicates success.
|
|
352
|
+
"""
|
|
353
|
+
userErrors: [WorkspaceVersionPublishUserError!]!
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### `WorkspaceVersionPublishErrorCode`
|
|
358
|
+
|
|
359
|
+
```graphql
|
|
360
|
+
"""Machine-readable error codes for `workspaceVersionPublish`."""
|
|
361
|
+
enum WorkspaceVersionPublishErrorCode {
|
|
362
|
+
"""The version's owning workspace no longer exists (e.g. it was deleted)."""
|
|
363
|
+
WORKSPACE_NOT_FOUND
|
|
364
|
+
"""The target `workspaceVersionId` does not exist."""
|
|
365
|
+
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
|
+
"""
|
|
369
|
+
WORKSPACE_VERSION_ALREADY_LIVE
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### `WorkspaceVersionPublishUserError`
|
|
374
|
+
|
|
375
|
+
```graphql
|
|
376
|
+
"""User-facing error for `workspaceVersionPublish`."""
|
|
377
|
+
type WorkspaceVersionPublishUserError {
|
|
378
|
+
"""Path to the offending input field, if applicable."""
|
|
379
|
+
field: [String!]
|
|
380
|
+
"""Human-readable error message."""
|
|
381
|
+
message: String!
|
|
382
|
+
"""Machine-readable error code."""
|
|
383
|
+
code: WorkspaceVersionPublishErrorCode!
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### `WorkspaceCreateInput`
|
|
388
|
+
|
|
389
|
+
```graphql
|
|
390
|
+
"""Input for `workspaceCreate`."""
|
|
391
|
+
input WorkspaceCreateInput {
|
|
392
|
+
"""Project to create the workspace in."""
|
|
393
|
+
projectId: ID!
|
|
394
|
+
"""User-facing display name for the new workspace."""
|
|
395
|
+
name: String!
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### `WorkspaceCreatePayload`
|
|
400
|
+
|
|
401
|
+
```graphql
|
|
402
|
+
"""Payload returned by `workspaceCreate`."""
|
|
403
|
+
type WorkspaceCreatePayload {
|
|
404
|
+
"""The newly created workspace (in `DRAFT` status)."""
|
|
405
|
+
workspace: Workspace
|
|
406
|
+
"""Validation errors encountered while creating the workspace."""
|
|
407
|
+
userErrors: [WorkspaceCreateUserError!]!
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### `WorkspaceCreateErrorCode`
|
|
412
|
+
|
|
413
|
+
```graphql
|
|
414
|
+
"""Machine-readable error codes for `workspaceCreate`."""
|
|
415
|
+
enum WorkspaceCreateErrorCode {
|
|
416
|
+
"""The provided name was empty."""
|
|
417
|
+
NAME_REQUIRED
|
|
418
|
+
"""The target project does not exist."""
|
|
419
|
+
PROJECT_NOT_FOUND
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### `WorkspaceCreateUserError`
|
|
424
|
+
|
|
425
|
+
```graphql
|
|
426
|
+
"""User-facing error for `workspaceCreate`."""
|
|
427
|
+
type WorkspaceCreateUserError {
|
|
428
|
+
"""Path to the offending input field, if applicable."""
|
|
429
|
+
field: [String!]
|
|
430
|
+
"""Human-readable error message."""
|
|
431
|
+
message: String!
|
|
432
|
+
"""Machine-readable error code."""
|
|
433
|
+
code: WorkspaceCreateErrorCode!
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### `WorkspaceUpdateInput`
|
|
438
|
+
|
|
439
|
+
```graphql
|
|
440
|
+
"""Input for `workspaceUpdate` — only the display name is mutable."""
|
|
441
|
+
input WorkspaceUpdateInput {
|
|
442
|
+
"""Workspace to rename."""
|
|
443
|
+
workspaceId: ID!
|
|
444
|
+
"""New display name."""
|
|
445
|
+
name: String!
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### `WorkspaceUpdatePayload`
|
|
450
|
+
|
|
451
|
+
```graphql
|
|
452
|
+
"""Payload returned by `workspaceUpdate`."""
|
|
453
|
+
type WorkspaceUpdatePayload {
|
|
454
|
+
"""The updated workspace."""
|
|
455
|
+
workspace: Workspace
|
|
456
|
+
"""Validation errors encountered while updating the workspace."""
|
|
457
|
+
userErrors: [WorkspaceUpdateUserError!]!
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### `WorkspaceUpdateErrorCode`
|
|
462
|
+
|
|
463
|
+
```graphql
|
|
464
|
+
"""Machine-readable error codes for `workspaceUpdate`."""
|
|
465
|
+
enum WorkspaceUpdateErrorCode {
|
|
466
|
+
"""The provided name was empty."""
|
|
467
|
+
NAME_REQUIRED
|
|
468
|
+
"""The target workspace does not exist."""
|
|
469
|
+
WORKSPACE_NOT_FOUND
|
|
470
|
+
}
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### `WorkspaceUpdateUserError`
|
|
474
|
+
|
|
475
|
+
```graphql
|
|
476
|
+
"""User-facing error for `workspaceUpdate`."""
|
|
477
|
+
type WorkspaceUpdateUserError {
|
|
478
|
+
"""Path to the offending input field, if applicable."""
|
|
479
|
+
field: [String!]
|
|
480
|
+
"""Human-readable error message."""
|
|
481
|
+
message: String!
|
|
482
|
+
"""Machine-readable error code."""
|
|
483
|
+
code: WorkspaceUpdateErrorCode!
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### `WorkspaceDuplicateInput`
|
|
488
|
+
|
|
489
|
+
```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
|
+
"""
|
|
495
|
+
input WorkspaceDuplicateInput {
|
|
496
|
+
"""Workspace to duplicate."""
|
|
497
|
+
sourceWorkspaceId: ID!
|
|
498
|
+
"""
|
|
499
|
+
Optional display name for the new workspace (defaults to `<source> (Copy)`).
|
|
500
|
+
"""
|
|
501
|
+
name: String
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### `WorkspaceDuplicatePayload`
|
|
506
|
+
|
|
507
|
+
```graphql
|
|
508
|
+
"""Payload returned by `workspaceDuplicate`."""
|
|
509
|
+
type WorkspaceDuplicatePayload {
|
|
510
|
+
"""The newly created workspace (in `DRAFT` status)."""
|
|
511
|
+
workspace: Workspace
|
|
512
|
+
"""The source workspace the new one was copied from."""
|
|
513
|
+
sourceWorkspace: Workspace
|
|
514
|
+
"""Validation errors encountered while duplicating the workspace."""
|
|
515
|
+
userErrors: [WorkspaceDuplicateUserError!]!
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### `WorkspaceDuplicateErrorCode`
|
|
520
|
+
|
|
521
|
+
```graphql
|
|
522
|
+
"""Machine-readable error codes for `workspaceDuplicate`."""
|
|
523
|
+
enum WorkspaceDuplicateErrorCode {
|
|
524
|
+
"""The source workspace does not exist."""
|
|
525
|
+
SOURCE_NOT_FOUND
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### `WorkspaceDuplicateUserError`
|
|
530
|
+
|
|
531
|
+
```graphql
|
|
532
|
+
"""User-facing error for `workspaceDuplicate`."""
|
|
533
|
+
type WorkspaceDuplicateUserError {
|
|
534
|
+
"""Path to the offending input field, if applicable."""
|
|
535
|
+
field: [String!]
|
|
536
|
+
"""Human-readable error message."""
|
|
537
|
+
message: String!
|
|
538
|
+
"""Machine-readable error code."""
|
|
539
|
+
code: WorkspaceDuplicateErrorCode!
|
|
540
|
+
}
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### `WorkspaceArchiveInput`
|
|
544
|
+
|
|
545
|
+
```graphql
|
|
546
|
+
"""
|
|
547
|
+
Input for `workspaceArchive` — move a non-live workspace to `ARCHIVED` status.
|
|
548
|
+
"""
|
|
549
|
+
input WorkspaceArchiveInput {
|
|
550
|
+
"""Workspace to archive."""
|
|
551
|
+
workspaceId: ID!
|
|
552
|
+
}
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### `WorkspaceArchivePayload`
|
|
556
|
+
|
|
557
|
+
```graphql
|
|
558
|
+
"""Payload returned by `workspaceArchive`."""
|
|
559
|
+
type WorkspaceArchivePayload {
|
|
560
|
+
"""The archived workspace, or null if a `userError` was returned."""
|
|
561
|
+
workspace: Workspace
|
|
562
|
+
"""Validation errors encountered while archiving the workspace."""
|
|
563
|
+
userErrors: [WorkspaceArchiveUserError!]!
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### `WorkspaceArchiveErrorCode`
|
|
568
|
+
|
|
569
|
+
```graphql
|
|
570
|
+
"""Machine-readable error codes for `workspaceArchive`."""
|
|
571
|
+
enum WorkspaceArchiveErrorCode {
|
|
572
|
+
"""The workspace does not exist."""
|
|
573
|
+
WORKSPACE_NOT_FOUND
|
|
574
|
+
"""
|
|
575
|
+
Live workspaces cannot be archived — publish a different workspace first.
|
|
576
|
+
"""
|
|
577
|
+
WORKSPACE_IS_LIVE
|
|
578
|
+
}
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### `WorkspaceArchiveUserError`
|
|
582
|
+
|
|
583
|
+
```graphql
|
|
584
|
+
"""User-facing error for `workspaceArchive`."""
|
|
585
|
+
type WorkspaceArchiveUserError {
|
|
586
|
+
"""Path to the offending input field, if applicable."""
|
|
587
|
+
field: [String!]
|
|
588
|
+
"""Human-readable error message."""
|
|
589
|
+
message: String!
|
|
590
|
+
"""Machine-readable error code."""
|
|
591
|
+
code: WorkspaceArchiveErrorCode!
|
|
592
|
+
}
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### `WorkspaceUnarchiveInput`
|
|
596
|
+
|
|
597
|
+
```graphql
|
|
598
|
+
"""
|
|
599
|
+
Input for `workspaceUnarchive` — restore an archived workspace to `DRAFT`.
|
|
600
|
+
"""
|
|
601
|
+
input WorkspaceUnarchiveInput {
|
|
602
|
+
"""Workspace to unarchive."""
|
|
603
|
+
workspaceId: ID!
|
|
604
|
+
}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
### `WorkspaceUnarchivePayload`
|
|
608
|
+
|
|
609
|
+
```graphql
|
|
610
|
+
"""Payload returned by `workspaceUnarchive`."""
|
|
611
|
+
type WorkspaceUnarchivePayload {
|
|
612
|
+
"""
|
|
613
|
+
The unarchived workspace (now `DRAFT`), or null if a `userError` was returned.
|
|
614
|
+
"""
|
|
615
|
+
workspace: Workspace
|
|
616
|
+
"""Validation errors encountered while unarchiving the workspace."""
|
|
617
|
+
userErrors: [WorkspaceUnarchiveUserError!]!
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### `WorkspaceUnarchiveErrorCode`
|
|
622
|
+
|
|
623
|
+
```graphql
|
|
624
|
+
"""Machine-readable error codes for `workspaceUnarchive`."""
|
|
625
|
+
enum WorkspaceUnarchiveErrorCode {
|
|
626
|
+
"""The workspace does not exist."""
|
|
627
|
+
WORKSPACE_NOT_FOUND
|
|
628
|
+
"""Only `ARCHIVED` workspaces can be unarchived."""
|
|
629
|
+
WORKSPACE_NOT_ARCHIVED
|
|
630
|
+
}
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
### `WorkspaceUnarchiveUserError`
|
|
634
|
+
|
|
635
|
+
```graphql
|
|
636
|
+
"""User-facing error for `workspaceUnarchive`."""
|
|
637
|
+
type WorkspaceUnarchiveUserError {
|
|
638
|
+
"""Path to the offending input field, if applicable."""
|
|
639
|
+
field: [String!]
|
|
640
|
+
"""Human-readable error message."""
|
|
641
|
+
message: String!
|
|
642
|
+
"""Machine-readable error code."""
|
|
643
|
+
code: WorkspaceUnarchiveErrorCode!
|
|
644
|
+
}
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
### `WorkspaceDeleteInput`
|
|
648
|
+
|
|
649
|
+
```graphql
|
|
650
|
+
"""Input for `workspaceDelete` — soft-delete a non-live workspace."""
|
|
651
|
+
input WorkspaceDeleteInput {
|
|
652
|
+
"""Workspace to delete."""
|
|
653
|
+
workspaceId: ID!
|
|
654
|
+
}
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### `WorkspaceDeletePayload`
|
|
658
|
+
|
|
659
|
+
```graphql
|
|
660
|
+
"""Payload returned by `workspaceDelete`."""
|
|
661
|
+
type WorkspaceDeletePayload {
|
|
662
|
+
"""
|
|
663
|
+
The ID of the deleted workspace, or null if a `userError` was returned.
|
|
664
|
+
"""
|
|
665
|
+
deletedWorkspaceId: ID
|
|
666
|
+
"""Validation errors encountered while deleting the workspace."""
|
|
667
|
+
userErrors: [WorkspaceDeleteUserError!]!
|
|
668
|
+
}
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### `WorkspaceDeleteErrorCode`
|
|
672
|
+
|
|
673
|
+
```graphql
|
|
674
|
+
"""Machine-readable error codes for `workspaceDelete`."""
|
|
675
|
+
enum WorkspaceDeleteErrorCode {
|
|
676
|
+
"""The workspace does not exist."""
|
|
677
|
+
WORKSPACE_NOT_FOUND
|
|
678
|
+
"""
|
|
679
|
+
Live workspaces cannot be deleted — publish a different workspace first.
|
|
680
|
+
"""
|
|
681
|
+
WORKSPACE_IS_LIVE
|
|
682
|
+
}
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
### `WorkspaceDeleteUserError`
|
|
686
|
+
|
|
687
|
+
```graphql
|
|
688
|
+
"""User-facing error for `workspaceDelete`."""
|
|
689
|
+
type WorkspaceDeleteUserError {
|
|
690
|
+
"""Path to the offending input field, if applicable."""
|
|
691
|
+
field: [String!]
|
|
692
|
+
"""Human-readable error message."""
|
|
693
|
+
message: String!
|
|
694
|
+
"""Machine-readable error code."""
|
|
695
|
+
code: WorkspaceDeleteErrorCode!
|
|
696
|
+
}
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
### `WorkspaceExportInput`
|
|
700
|
+
|
|
701
|
+
```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
|
+
"""
|
|
707
|
+
input WorkspaceExportInput {
|
|
708
|
+
"""Workspace to export."""
|
|
709
|
+
workspaceId: ID!
|
|
710
|
+
}
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### `WorkspaceExportPayload`
|
|
714
|
+
|
|
715
|
+
````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
|
+
"""
|
|
746
|
+
type WorkspaceExportPayload {
|
|
747
|
+
"""The bundle, or null if a `userError` was returned."""
|
|
748
|
+
bundle: JSON
|
|
749
|
+
"""Errors that stopped the export. Empty on success."""
|
|
750
|
+
userErrors: [WorkspaceExportUserError!]!
|
|
751
|
+
}
|
|
752
|
+
````
|
|
753
|
+
|
|
754
|
+
### `WorkspaceExportErrorCode`
|
|
755
|
+
|
|
756
|
+
```graphql
|
|
757
|
+
"""Machine-readable error codes for `workspaceExport`."""
|
|
758
|
+
enum WorkspaceExportErrorCode {
|
|
759
|
+
"""The workspace does not exist."""
|
|
760
|
+
WORKSPACE_NOT_FOUND
|
|
761
|
+
"""
|
|
762
|
+
A Content Entry references an asset version that no longer exists in the project. The message names the entry and the asset.
|
|
763
|
+
"""
|
|
764
|
+
ASSET_NOT_FOUND
|
|
765
|
+
"""
|
|
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`.
|
|
767
|
+
"""
|
|
768
|
+
INVALID_SOURCE_ROW
|
|
769
|
+
"""
|
|
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.
|
|
776
|
+
"""
|
|
777
|
+
UNRESOLVED_REFERENCE
|
|
778
|
+
}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
### `WorkspaceExportUserError`
|
|
782
|
+
|
|
783
|
+
```graphql
|
|
784
|
+
"""User-facing error for `workspaceExport`."""
|
|
785
|
+
type WorkspaceExportUserError {
|
|
786
|
+
"""Path to the offending input field, if applicable."""
|
|
787
|
+
field: [String!]
|
|
788
|
+
"""Human-readable error message."""
|
|
789
|
+
message: String!
|
|
790
|
+
"""Machine-readable error code."""
|
|
791
|
+
code: WorkspaceExportErrorCode!
|
|
792
|
+
}
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### `WorkspaceImportAssetMappingInput`
|
|
796
|
+
|
|
797
|
+
```graphql
|
|
798
|
+
"""
|
|
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`.
|
|
804
|
+
"""
|
|
805
|
+
input WorkspaceImportAssetMappingInput {
|
|
806
|
+
"""
|
|
807
|
+
The asset version id as it appears in the bundle (`assets[].versionId`).
|
|
808
|
+
"""
|
|
809
|
+
sourceVersionId: ID!
|
|
810
|
+
"""The target project's Asset."""
|
|
811
|
+
assetId: ID!
|
|
812
|
+
"""
|
|
813
|
+
The committed version of `assetId` to reference in place of `sourceVersionId`.
|
|
814
|
+
"""
|
|
815
|
+
versionId: ID!
|
|
816
|
+
}
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
### `WorkspaceImportInput`
|
|
820
|
+
|
|
821
|
+
```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
|
+
"""
|
|
833
|
+
input WorkspaceImportInput {
|
|
834
|
+
"""
|
|
835
|
+
The project to create the workspace in. May belong to a different organization than the bundle's source.
|
|
836
|
+
"""
|
|
837
|
+
projectId: ID!
|
|
838
|
+
"""
|
|
839
|
+
Display name for the new workspace. Defaults to the bundle's `workspace.name`.
|
|
840
|
+
"""
|
|
841
|
+
name: String
|
|
842
|
+
"""The bundle returned by `workspaceExport` (`formatVersion: 1`)."""
|
|
843
|
+
bundle: JSON!
|
|
844
|
+
"""
|
|
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`.
|
|
848
|
+
"""
|
|
849
|
+
assetMap: [WorkspaceImportAssetMappingInput!]
|
|
850
|
+
}
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
### `WorkspaceImportPayload`
|
|
854
|
+
|
|
855
|
+
```graphql
|
|
856
|
+
"""Payload returned by `workspaceImport`."""
|
|
857
|
+
type WorkspaceImportPayload {
|
|
858
|
+
"""
|
|
859
|
+
The new workspace (in `DRAFT` status), or null if a `userError` was returned.
|
|
860
|
+
"""
|
|
861
|
+
workspace: Workspace
|
|
862
|
+
"""
|
|
863
|
+
Errors that stopped the import. When any is returned, nothing was created.
|
|
864
|
+
"""
|
|
865
|
+
userErrors: [WorkspaceImportUserError!]!
|
|
866
|
+
}
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
### `WorkspaceImportErrorCode`
|
|
870
|
+
|
|
871
|
+
```graphql
|
|
872
|
+
"""Machine-readable error codes for `workspaceImport`."""
|
|
873
|
+
enum WorkspaceImportErrorCode {
|
|
874
|
+
"""The target project does not exist."""
|
|
875
|
+
PROJECT_NOT_FOUND
|
|
876
|
+
"""
|
|
877
|
+
Neither `name` nor the bundle's `workspace.name` holds a non-blank name.
|
|
878
|
+
"""
|
|
879
|
+
NAME_REQUIRED
|
|
880
|
+
"""The bundle's `formatVersion` is not one this server reads."""
|
|
881
|
+
UNSUPPORTED_FORMAT_VERSION
|
|
882
|
+
"""
|
|
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.
|
|
884
|
+
"""
|
|
885
|
+
INVALID_BUNDLE
|
|
886
|
+
"""
|
|
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.
|
|
888
|
+
"""
|
|
889
|
+
UNRESOLVED_REFERENCE
|
|
890
|
+
"""
|
|
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.
|
|
892
|
+
"""
|
|
893
|
+
INVALID_ASSET_MAPPING
|
|
894
|
+
"""
|
|
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.
|
|
896
|
+
"""
|
|
897
|
+
UNMAPPED_ASSET
|
|
898
|
+
"""
|
|
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.
|
|
900
|
+
"""
|
|
901
|
+
WORKFLOW_SCOPES_NOT_HELD
|
|
902
|
+
}
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
### `WorkspaceImportUserError`
|
|
906
|
+
|
|
907
|
+
```graphql
|
|
908
|
+
"""User-facing error for `workspaceImport`."""
|
|
909
|
+
type WorkspaceImportUserError {
|
|
910
|
+
"""Path to the offending input field, if applicable."""
|
|
911
|
+
field: [String!]
|
|
912
|
+
"""Human-readable error message."""
|
|
913
|
+
message: String!
|
|
914
|
+
"""Machine-readable error code."""
|
|
915
|
+
code: WorkspaceImportErrorCode!
|
|
916
|
+
}
|
|
917
|
+
```
|