import * as tpy from "https://deno.land/x/tpy@v1.0.0-pre-release-4/mod.ts";
Tpy, a strongly typed Pylon API client.
The center of Tpy starts at the default Tpy
class,
defining the Pylon token and optionally a global deployment ID.
const client = new Tpy(Deno.env.get('PYLON_TOKEN')!, 'DEPLOYMENT_ID');
client.KV('NAMESPACE');
client.getDeployment();
client.publishDeployment({} as Deployment.POST.Request<false>);
// or
const client2 = new Tpy(Deno.env.get('PYLON_TOKEN')!);
client2.KV('NAMESPACE', 'DEPLOYMENT_ID');
client2.getDeployment('DEPLOYMENT_ID');
client2.publishDeployment(
{} as Deployment.POST.Request<false>,
'DEPLOYMENT_ID',
);
Even if a default is set, it can be overridden.
client2.publishDeployment(
{} as Deployment.POST.Request<false>,
'ANOTHER_DEPLOYMENT_ID',
);
Namespaces
Request and response structures related to the | |
Schemas for | |
Schemas for | |
Not an API resource, this namespace behaves as templates and other base types. | |
Request and response structures related to the | |
Schemas for | |
Not an API resource, this namespace behaves as templates and other base types. | |
N User | Request and response structures related to the |
Schemas for | |
Response schema for |
Classes
Provides parameter context about the current execution environment to provide error reporting
data to generate reports that include said information comprised inside the given | |
An error wrapper of | |
A KVNamespace interface that (almost) matches the Pylon KVNamespace SDK class. | |
This class forwards WebSocket recieving events to create a persistant stream to keep listeners active with automatic reconnection (with customizable timeouts). |
Enums
A deployment's 'up' status. Altered by Pylon administrators. | |
The type of deployment. |
Variables
The set of errors returned by |
Type Aliases
Response schema for | |
Request schema for | |
Response schema for | |
The base structure of some deployment related responses. | |
Deployment configurations; recieved as a string. | |
Pylon uses FastAPI, this is a FastAPI error. | |
Response schema for | |
Response schema for | |
Base guild payload. | |
Response schema for | |
Response schema for | |
Response schema for |