Extensions
Publish an extension version
Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version.
POST
Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version. A hosted manifest carries its bundle. Publishing a version again with the same manifest and bundle returns it; a different one conflicts, so bump the manifest's version. Only a person can publish, not an API key.
apiKeyheader
x-api-key<token>application/json- body
manifest*bundle?string|nullPublishExtensionVersionResponse
application/json- response
extension*version*import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.extensions.publish({ "manifest": { "name": "example", "displayName": "example", "version": "example", "runtime": "hosted", "events": [ "mailbox.message.received" ], "permissions": [ "read" ] }});Example Response
{ "extension": { "id": "string", "name": "string", "displayName": "string", "description": "string", "runtime": "hosted", "latestVersion": { "id": "string", "version": "string" }, "createdAt": "string", "updatedAt": "string" }, "version": { "id": "string", "version": "string", "runtime": "hosted", "bundle": { "sha256": "string", "sizeBytes": -9007199254740991 }, "publishedAt": "string", "manifest": { "name": "string", "displayName": "string", "description": "string", "version": "string", "runtime": "hosted", "events": [ "mailbox.message.received" ], "permissions": [ "read" ] } }}