Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ vendor/bundle
CLAUDE.local.md
.env
.idea/
plugin-host/dist/
plugin-host/node_modules/
/plugins/
*.spx
examples/plugins/superplane-plugin-github-issues/node_modules/
examples/plugins/superplane-plugin-github-issues/dist/
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ check.build.ui:
check.build.app:
docker compose $(DOCKER_COMPOSE_OPTS) exec app go build cmd/server/main.go

#
# Plugin Host targets
#

plugin-host.setup:
cd plugin-host && npm install

plugin-host.build:
cd plugin-host && npm install && npm run build

storybook:
docker compose $(DOCKER_COMPOSE_OPTS) exec app /bin/bash -c "cd web_src && npm install && npm run storybook"
Expand Down Expand Up @@ -227,8 +236,8 @@ gen.components.local.update: gen.components.docs
rm -rf ../docs/src/content/docs/components
cp -R docs/components ../docs/src/content/docs/components

MODULES := authorization,organizations,integrations,secrets,users,groups,roles,me,configuration,components,triggers,widgets,blueprints,canvases,service_accounts
REST_API_MODULES := authorization,organizations,integrations,secrets,users,groups,roles,me,configuration,components,triggers,widgets,blueprints,canvases,service_accounts
MODULES := authorization,organizations,integrations,secrets,users,groups,roles,me,configuration,components,triggers,widgets,blueprints,canvases,service_accounts,scripts
REST_API_MODULES := authorization,organizations,integrations,secrets,users,groups,roles,me,configuration,components,triggers,widgets,blueprints,canvases,service_accounts,scripts
pb.gen:
docker compose $(DOCKER_COMPOSE_OPTS) run --rm --no-deps app /app/scripts/protoc.sh $(MODULES)
docker compose $(DOCKER_COMPOSE_OPTS) run --rm --no-deps app /app/scripts/protoc_gateway.sh $(REST_API_MODULES)
Expand Down
319 changes: 319 additions & 0 deletions api/swagger/superplane.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
},
{
"name": "ServiceAccounts"
},
{
"name": "Scripts"
}
],
"schemes": [
Expand Down Expand Up @@ -2412,6 +2415,202 @@
]
}
},
"/api/v1/scripts": {
"get": {
"summary": "List scripts",
"description": "Returns a list of all scripts in the organization",
"operationId": "Scripts_ListScripts",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsListScriptsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"tags": [
"Script"
]
},
"post": {
"summary": "Create script",
"description": "Creates a new in-app script",
"operationId": "Scripts_CreateScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsCreateScriptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ScriptsCreateScriptRequest"
}
}
],
"tags": [
"Script"
]
}
},
"/api/v1/scripts/{id}": {
"get": {
"summary": "Describe script",
"description": "Returns a script",
"operationId": "Scripts_DescribeScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsDescribeScriptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Script"
]
},
"delete": {
"summary": "Delete script",
"description": "Deletes an existing script",
"operationId": "Scripts_DeleteScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsDeleteScriptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Script"
]
},
"patch": {
"summary": "Update script",
"description": "Updates an existing script",
"operationId": "Scripts_UpdateScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsUpdateScriptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ScriptsUpdateScriptBody"
}
}
],
"tags": [
"Script"
]
}
},
"/api/v1/scripts/{scriptId}/generate": {
"post": {
"summary": "Generate script",
"description": "Uses AI to generate or update script code based on a user prompt",
"operationId": "Scripts_GenerateScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ScriptsGenerateScriptResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "scriptId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ScriptsGenerateScriptBody"
}
}
],
"tags": [
"Script"
]
}
},
"/api/v1/secrets": {
"get": {
"summary": "List secrets",
Expand Down Expand Up @@ -3920,6 +4119,9 @@
},
"exampleOutput": {
"type": "object"
},
"source": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -5179,6 +5381,120 @@
}
}
},
"ScriptsCreateScriptRequest": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/ScriptsScript"
}
}
},
"ScriptsCreateScriptResponse": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/ScriptsScript"
}
}
},
"ScriptsDeleteScriptResponse": {
"type": "object"
},
"ScriptsDescribeScriptResponse": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/ScriptsScript"
}
}
},
"ScriptsGenerateScriptBody": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"ScriptsGenerateScriptResponse": {
"type": "object",
"properties": {
"response": {
"type": "string"
},
"source": {
"type": "string"
}
}
},
"ScriptsListScriptsResponse": {
"type": "object",
"properties": {
"scripts": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/ScriptsScript"
}
}
}
},
"ScriptsScript": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"organizationId": {
"type": "string"
},
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"source": {
"type": "string"
},
"manifestJson": {
"type": "string"
},
"status": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"ScriptsUpdateScriptBody": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/ScriptsScript"
}
}
},
"ScriptsUpdateScriptResponse": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/ScriptsScript"
}
}
},
"SecretLocal": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -5626,6 +5942,9 @@
},
"exampleData": {
"type": "object"
},
"source": {
"type": "string"
}
}
},
Expand Down
Empty file.
Loading
Loading