Resolve a template workspace conflict
Resolves one conflicted file by keeping the draft, using main, or supplying edited source.
POST
Resolves one conflicted file by keeping the draft, using main, or supplying edited source.
apiKeyheader
x-api-key<token>id*stringMatch
^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$idempotency-key*stringLength
1 <= length <= 255application/json- body
expectedRevision*stringpath*stringA relative path of 1–1024 characters with no backslash, . or .., or .git segments.
Length
1 <= length <= 1024resolution*||Success
application/json- response
workspace*files*import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.templates.resolveWorkspaceConflict({
"id": "example",
"expectedRevision": "example",
"path": "example",
"resolution": "draft"
});Example Response
{
"workspace": {
"projectId": "string",
"organizationId": "string",
"ownerEpoch": 0,
"repositoryName": "string",
"defaultBranch": "string",
"baseCommit": "string",
"remoteHead": "string",
"pendingRemoteHead": "string",
"revision": "string",
"overlay": {
"property1": "string",
"property2": "string"
},
"assetDigest": "string",
"assetChanges": [
{
"path": "string",
"status": "added"
}
],
"conflicts": [
{
"path": "string",
"base": "string",
"draft": "string",
"main": "string"
}
],
"provenance": {
"references": [
{
"kind": "string",
"digest": "string",
"locator": "string"
}
]
},
"mounts": [
{
"kind": "project",
"root": "/project",
"access": "read-write"
}
],
"libraryManifestDigest": "string",
"createdAt": "string",
"updatedAt": "string",
"createdBy": {
"userId": "string",
"via": "api"
},
"updatedBy": {
"userId": "string",
"via": "api"
}
},
"files": {
"property1": "string",
"property2": "string"
}
}