Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

144 lines
3.1 KiB
Plaintext

package alga:extension;
interface types {
record context-data {
request-id: option<string>,
tenant-id: string,
extension-id: string,
install-id: option<string>,
version-id: option<string>,
}
enum secret-error {
missing,
denied,
expired,
internal,
}
record http-header {
name: string,
value: string,
}
record http-request {
method: string,
url: string,
headers: list<http-header>,
body: option<list<u8>>,
}
record http-response {
status: u16,
headers: list<http-header>,
body: option<list<u8>>,
}
enum http-error {
invalid-url,
not-allowed,
transport,
internal,
}
enum storage-error {
missing,
conflict,
denied,
internal,
}
record storage-entry {
namespace: string,
key: string,
value: list<u8>,
revision: option<u64>,
}
enum proxy-error {
route-not-found,
denied,
bad-request,
internal,
}
record user-data {
tenant-id: string,
client-name: string,
user-id: string,
user-email: string,
user-name: string,
user-type: string,
}
enum user-error {
not-available,
not-allowed,
}
record execute-request {
context: context-data,
http: http-request,
}
record execute-response {
status: u16,
headers: list<http-header>,
body: option<list<u8>>,
}
}
interface context {
use types.{context-data};
get-context: func() -> context-data;
}
interface secrets {
use types.{secret-error};
get: func(key: string) -> result<string, secret-error>;
list-keys: func() -> list<string>;
}
interface http {
use types.{http-request, http-response, http-error};
fetch: func(request: http-request) -> result<http-response, http-error>;
}
interface storage {
use types.{storage-entry, storage-error};
get: func(namespace: string, key: string) -> result<storage-entry, storage-error>;
put: func(entry: storage-entry) -> result<storage-entry, storage-error>;
delete: func(namespace: string, key: string) -> result<_, storage-error>;
list-entries: func(namespace: string, cursor: option<string>) -> result<list<storage-entry>, storage-error>;
}
interface logging {
log-info: func(message: string);
log-warn: func(message: string);
log-error: func(message: string);
}
interface ui-proxy {
use types.{proxy-error};
call-route: func(route: string, payload: option<list<u8>>) -> result<list<u8>, proxy-error>;
}
interface user {
use types.{user-data, user-error};
get-user: func() -> result<user-data, user-error>;
}
world runner {
use types.{execute-request, execute-response};
import context;
import secrets;
import http;
import storage;
import logging;
import ui-proxy;
import user;
export handler: func(request: execute-request) -> execute-response;
}