SpaceDeployCreatedPayload space.deploy.created@1

Generated at from openvibe-contracts v0.150.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
space
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-004
Schema
https://openvibe.network/contracts/events/payloads/space.deploy.created.v1.json

space.deploy.created v1 (OpenVibe.Space, subject deploy dpl_…, visibility internal): an upload or a Git ingest became an immutable, content-addressed deploy in the ready state. It is not yet serving: space.deploy.activated follows when it is made active. No file contents or paths.

Fields

FieldTypeRequiredDescriptionConstraints
project_idstringyes
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
site_idstringyes
  • pattern ^sit_[0-9A-HJKMNP-TV-Z]{26}$
sitestringyesthe site name (one DNS label; the site is served at <site>.openvibe.website)
  • pattern ^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,39}$
sourceenumyeshow the deploy arrived: an archive or individual files, a private preview upload, or a Git ingest (always a preview)
  • one of "archive", "files", "preview", "git"
file_countintegeryes
  • minimum 0
total_bytesintegeryes
  • minimum 0
manifest_sha256stringyessha256 of the deploy manifest (the content address of the whole deploy)
  • pattern ^[a-f0-9]{64}$

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: git-preview
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "source": "git",
  "file_count": 3,
  "total_bytes": 901,
  "manifest_sha256": "0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f"
}
Valid: upload
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "source": "archive",
  "file_count": 12,
  "total_bytes": 48213,
  "manifest_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Rejected: old-site-prefix
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "site_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "source": "files",
  "file_count": 1,
  "total_bytes": 1,
  "manifest_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Rejected: unknown-source
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "source": "ftp",
  "file_count": 1,
  "total_bytes": 1,
  "manifest_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('space.deploy.created@1', value);   // { valid, errors: [{ path, message }] }