Skip to content

What publishing a version, or removing the library, would do

POST
/orgs/{org}/libraries/{namespace}/impact
curl --request POST \
--url https://api.sloose.com/orgs/org_9f3c/libraries/acme/impact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "manifest": { "functions": [ { "name": "example" } ] }, "remove": true }'

Send { "remove": true } instead of a manifest to ask what removing the library would do: the answer is the same shape, with every function it has as the functions taken away (those of a Sloose library it was shadowing excepted), and an import that keeps a version of it counted as broken, since the keep goes with the library (kept names them either way).

Before a publish: the functions the manifest sent takes away from the version current now, who uses the library — the organisation’s templates, its imports not finished, its connections’ own defaults, its runs in progress — and which of them call a function taken away. Read from each formula’s syntax tree, so a name inside a string is not a call; a formula that reaches helpers by a name it works out (helpers[name]), or a recipe that cannot be read, is answered as one that may call it, never as one that does not. A formula that is listed may be one a run skips — a mapping to a field the connection no longer offers — but none a run evaluates is left out. A template private to somebody else, and a connection that is somebody else’s own, are counted in hidden and never described. A run in progress keeps the version it started with until it ends. Administrators only, as publishing is. Nothing is written.

org
required

The organisation id the session was issued for. A token for one organisation can never read another.

string
Example
org_9f3c

The organisation id the session was issued for. A token for one organisation can never read another.

namespace
required

The library namespace, as it appears in expressions.

string
Example
acme

The library namespace, as it appears in expressions.

Media typeapplication/json
object
manifest
object
functions
required
Array<object>
object
name
required
string
key
additional properties
key
additional properties
remove
boolean
key
additional properties
Examplegenerated
{
"manifest": {
"functions": [
{
"name": "example"
}
]
},
"remove": true
}

What the publish would do.

Media typeapplication/json
object
namespace
required
string
templates
required

The organisation’s templates, which each run whichever version is current.

object
uses
required

How many call one of its functions by name.

number
mayUse
required

How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.

number
imports
required

Its imports not finished.

object
uses
required

How many call one of its functions by name.

number
mayUse
required

How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.

number
connections
required

Its connections, by their own defaults: a module’s default match rule and a field’s default mapping, which a run takes from the connection rather than its recipe. A connection that is somebody else’s own is counted, never named.

object
uses
required

How many call one of its functions by name.

number
mayUse
required

How many may reach it without naming the function (helpers[name], or the library read whole), or could not be read: never counted as not using it.

number
running
required

The organisation’s runs in progress.

Array<object>
object
importId
required
string | null
importName
required
string | null
version
required

The version of this library the run started with, which it keeps until it ends — 0 for what came before v1 (the one Sloose ships, or one stored before versions were kept); null when the run did not say which libraries it holds. A run that said, and named no version of this one, holds none of it and is not listed.

number | null
removed
required

True when what the run holds is of a library since removed — its record names another library’s id — so version is no version of this one.

boolean
kept
required

Imports not finished that keep an older version of this library instead of the current one (“Keep v3 for this import”): counted in no use of the current version, and broken by no publish.

Array<object>
object
importId
required
string
importName
required
string
version
required

The version it keeps.

number
usesShipped

Only on the answer to a removal where Sloose ships a library under the same name: the functions this import calls that the Sloose library also has, which it will use instead of the version it keeps.

Array<string>
removed
required

The functions the version current now has and the manifest sent does not.

Array<string>
breaks
required
object
templates
required
Array<object>
object
id
required
string
name
required
string
calls
required

The functions it calls that the new version does not have, and where.

Array<object>
object
fn
required
string
places
required
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
may
required
Any of:
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
imports
required
Array<object>
object
id
required
string
name
required
string
calls
required

The functions it calls that the new version does not have, and where.

Array<object>
object
fn
required
string
places
required
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
may
required
Any of:
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
connections
required

Connections whose own defaults call a function taken away, or may.

Array<object>
object
id
required
string
name
required
string
calls
required

The functions it calls that the new version does not have, and where.

Array<object>
object
fn
required
string
places
required
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
may
required
Any of:
Array<object>
object
kind
required

In a recipe — row-filter: which rows take part. gate: a module’s which rows. guard: a module’s update-only-when. field: a field’s formula. search: a lookup’s search value. key: the value a module’s match compares. In a connection’s own defaults — default-match: a module’s default match rule. default-field, default-search, default-key: the same three parts of a field’s default mapping.

string
Allowed values: row-filter gate guard field search key default-match default-field default-search default-key
flowId

The flow, for a place in a recipe.

string
module
string
field
string
hidden
required

How many more break that are not the caller’s to see: templates private to somebody else, connections that are somebody else’s own. Counted, never described.

object
templates
required
number
connections
required
number
token
required

What was found to break, as one string. Sent back as impactToken with the publish, it is checked again as the publish is made, and a publish that would now break something this answer did not name is refused (409 IMPACT_CHANGED) — saving a template moves no configuration version, so If-Match alone cannot see one saved while the person was deciding.

string
Example
{
"breaks": {
"templates": [
{
"calls": [
{
"places": [
{
"kind": "row-filter"
}
]
}
],
"may": "unreadable"
}
],
"imports": [
{
"calls": [
{
"places": [
{
"kind": "row-filter"
}
]
}
],
"may": "unreadable"
}
],
"connections": [
{
"calls": [
{
"places": [
{
"kind": "row-filter"
}
]
}
],
"may": "unreadable"
}
]
}
}

The request — its body or its query — did not match the schema. issues carries the Zod issue list.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com