···11+{
22+ "lexicon": 1,
33+ "id": "io.pocketenv.sandbox.putTailscaleToken",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Store a Tailscale token for the sandbox. This token will be used to authenticate with the Tailscale API and manage the sandbox's Tailscale node.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": [
1313+ "id",
1414+ "token"
1515+ ],
1616+ "properties": {
1717+ "id": {
1818+ "type": "string",
1919+ "description": "The sandbox ID."
2020+ },
2121+ "token": {
2222+ "type": "string",
2323+ "description": "The Tailscale token (encrypted) to store for the sandbox."
2424+ }
2525+ }
2626+ }
2727+ },
2828+ "output": {
2929+ "encoding": "application/json",
3030+ "schema": {
3131+ "type": "ref",
3232+ "ref": "io.pocketenv.sandbox.defs#tailscaleTokenView"
3333+ }
3434+ }
3535+ }
3636+ }
3737+}
+34
apps/api/pkl/defs/sandbox/createIntegration.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.createIntegration"
55+defs = new Mapping<String, Procedure> {
66+ ["main"] {
77+ type = "procedure"
88+ description = "Create a new integration for the sandbox."
99+ input {
1010+ encoding = "application/json"
1111+ schema {
1212+ type = "object"
1313+ required = List("id", "name")
1414+ properties {
1515+ ["id"] = new StringType {
1616+ type = "string"
1717+ description = "The sandbox ID."
1818+ }
1919+ ["name"] = new StringType {
2020+ type = "string"
2121+ description = "The name of the integration."
2222+ }
2323+ }
2424+ }
2525+ }
2626+ output {
2727+ encoding = "application/json"
2828+ schema = new Ref {
2929+ type = "ref"
3030+ ref = "io.pocketenv.sandbox.defs#integrationView"
3131+ }
3232+ }
3333+ }
3434+}
+87
apps/api/pkl/defs/sandbox/defs.pkl
···316316 )
317317 }
318318 }
319319+ ["sshKeysView"] = new ObjectType {
320320+ type = "object"
321321+ properties {
322322+ ["id"] = new StringType {
323323+ type = "string"
324324+ description = "Unique identifier of the SSH key."
325325+ }
326326+ ["publicKey"] = new StringType {
327327+ type = "string"
328328+ description = "The public SSH key."
329329+ }
330330+ ["privateKey"] = new StringType {
331331+ type = "string"
332332+ description = "The private SSH key (redacted in API responses)"
333333+ }
334334+ ["createdAt"] = new StringType {
335335+ type = "string"
336336+ description = "The timestamp when the SSH key was created."
337337+ format = "datetime"
338338+ }
339339+ ["updatedAt"] = new StringType {
340340+ type = "string"
341341+ description = "The timestamp when the SSH key was last updated."
342342+ format = "datetime"
343343+ }
344344+ }
345345+ }
346346+ ["tailscaleTokenView"] = new ObjectType {
347347+ type = "object"
348348+ properties {
349349+ ["id"] = new StringType {
350350+ type = "string"
351351+ description = "Unique identifier of the Tailscale token."
352352+ }
353353+ ["token"] = new StringType {
354354+ type = "string"
355355+ description = "The Tailscale auth token (redacted in API responses)"
356356+ }
357357+ ["createdAt"] = new StringType {
358358+ type = "string"
359359+ description = "The timestamp when the Tailscale token was created."
360360+ format = "datetime"
361361+ }
362362+ ["updatedAt"] = new StringType {
363363+ type = "string"
364364+ description = "The timestamp when the Tailscale token was last updated."
365365+ format = "datetime"
366366+ }
367367+ }
368368+ }
369369+ ["integrationView"] = new ObjectType {
370370+ type = "object"
371371+ properties {
372372+ ["id"] = new StringType {
373373+ type = "string"
374374+ description = "Unique identifier of the integration."
375375+ }
376376+ ["name"] = new StringType {
377377+ type = "string"
378378+ description = "The name of the integration, e.g. 'GitHub', 'Slack', 'Trello', etc."
379379+ }
380380+ ["webhookUrl"] = new StringType {
381381+ type = "string"
382382+ description = "The webhook URL of the integration."
383383+ format = "uri"
384384+ }
385385+ ["createdAt"] = new StringType {
386386+ type = "string"
387387+ description = "The timestamp when the integration was created."
388388+ format = "datetime"
389389+ }
390390+ ["updatedAt"] = new StringType {
391391+ type = "string"
392392+ description = "The timestamp when the integration was last updated."
393393+ format = "datetime"
394394+ }
395395+ }
396396+ }
397397+ ["integrationsView"] = new Array {
398398+ type = "array"
399399+ items = new Ref {
400400+ type = "ref"
401401+ ref = "io.pocketenv.sandbox.defs#integrationView"
402402+ description = "An integration connected to the sandbox"
403403+ }
404404+ }
319405}
406406+
+27
apps/api/pkl/defs/sandbox/getIntegrations.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.getIntegrations"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get the integrations for a sandbox."
99+ parameters {
1010+ type = "params"
1111+ required = List("id")
1212+ properties {
1313+ ["id"] = new StringType {
1414+ type = "string"
1515+ description = "The sandbox ID."
1616+ }
1717+ }
1818+ }
1919+ output {
2020+ encoding = "application/json"
2121+ schema = new Ref {
2222+ type = "ref"
2323+ ref = "io.pocketenv.sandbox.defs#integrationsView"
2424+ }
2525+ }
2626+ }
2727+}
+27
apps/api/pkl/defs/sandbox/getSshKeys.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.getSshKeys"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get the SSH keys for a sandbox."
99+ parameters {
1010+ type = "params"
1111+ required = List("id")
1212+ properties {
1313+ ["id"] = new StringType {
1414+ type = "string"
1515+ description = "The sandbox ID."
1616+ }
1717+ }
1818+ }
1919+ output {
2020+ encoding = "application/json"
2121+ schema = new Ref {
2222+ type = "ref"
2323+ ref = "io.pocketenv.sandbox.defs#sshKeysView"
2424+ }
2525+ }
2626+ }
2727+}
+27
apps/api/pkl/defs/sandbox/getTailscaleToken.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.getTailscaleToken"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get the Tailscale token for a sandbox."
99+ parameters {
1010+ type = "params"
1111+ required = List("id")
1212+ properties {
1313+ ["id"] = new StringType {
1414+ type = "string"
1515+ description = "The sandbox ID."
1616+ }
1717+ }
1818+ }
1919+ output {
2020+ encoding = "application/json"
2121+ schema = new Ref {
2222+ type = "ref"
2323+ ref = "io.pocketenv.sandbox.defs#tailscaleTokenView"
2424+ }
2525+ }
2626+ }
2727+}
+38
apps/api/pkl/defs/sandbox/putSshKeys.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.putSshKeys"
55+defs = new Mapping<String, Procedure> {
66+ ["main"] {
77+ type = "procedure"
88+ description = "Add or update SSH keys for a sandbox."
99+ input {
1010+ encoding = "application/json"
1111+ schema = new ObjectType {
1212+ type = "object"
1313+ required = List("id", "privateKey", "publicKey")
1414+ properties {
1515+ ["id"] = new StringType {
1616+ type = "string"
1717+ description = "The sandbox ID."
1818+ }
1919+ ["privateKey"] = new StringType {
2020+ type = "string"
2121+ description = "The private SSH key (encrypted)"
2222+ }
2323+ ["publicKey"] = new StringType {
2424+ type = "string"
2525+ description = "The public SSH key."
2626+ }
2727+ }
2828+ }
2929+ }
3030+ output {
3131+ encoding = "application/json"
3232+ schema = new Ref {
3333+ type = "ref"
3434+ ref = "io.pocketenv.sandbox.defs#sshKeysView"
3535+ }
3636+ }
3737+ }
3838+}
+34
apps/api/pkl/defs/sandbox/putTailscaleToken.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "io.pocketenv.sandbox.putTailscaleToken"
55+defs = new Mapping<String, Procedure> {
66+ ["main"] {
77+ type = "procedure"
88+ description = "Store a Tailscale token for the sandbox. This token will be used to authenticate with the Tailscale API and manage the sandbox's Tailscale node."
99+ input {
1010+ encoding = "application/json"
1111+ schema = new ObjectType {
1212+ type = "object"
1313+ required = List("id", "token")
1414+ properties {
1515+ ["id"] = new StringType {
1616+ type = "string"
1717+ description = "The sandbox ID."
1818+ }
1919+ ["token"] = new StringType {
2020+ type = "string"
2121+ description = "The Tailscale token (encrypted) to store for the sandbox."
2222+ }
2323+ }
2424+ }
2525+ }
2626+ output {
2727+ encoding = "application/json"
2828+ schema = new Ref {
2929+ type = "ref"
3030+ ref = "io.pocketenv.sandbox.defs#tailscaleTokenView"
3131+ }
3232+ }
3333+ }
3434+}
+72
apps/api/src/lexicon/index.ts
···1616import type * as IoPocketenvFileDeleteFile from "./types/io/pocketenv/file/deleteFile";
1717import type * as IoPocketenvFileGetFiles from "./types/io/pocketenv/file/getFiles";
1818import type * as IoPocketenvSandboxClaimSandbox from "./types/io/pocketenv/sandbox/claimSandbox";
1919+import type * as IoPocketenvSandboxCreateIntegration from "./types/io/pocketenv/sandbox/createIntegration";
1920import type * as IoPocketenvSandboxCreateSandbox from "./types/io/pocketenv/sandbox/createSandbox";
2021import type * as IoPocketenvSandboxDeleteSandbox from "./types/io/pocketenv/sandbox/deleteSandbox";
2222+import type * as IoPocketenvSandboxGetIntegrations from "./types/io/pocketenv/sandbox/getIntegrations";
2123import type * as IoPocketenvSandboxGetPreferences from "./types/io/pocketenv/sandbox/getPreferences";
2224import type * as IoPocketenvSandboxGetSandbox from "./types/io/pocketenv/sandbox/getSandbox";
2325import type * as IoPocketenvSandboxGetSandboxes from "./types/io/pocketenv/sandbox/getSandboxes";
2626+import type * as IoPocketenvSandboxGetSshKeys from "./types/io/pocketenv/sandbox/getSshKeys";
2727+import type * as IoPocketenvSandboxGetTailscaleToken from "./types/io/pocketenv/sandbox/getTailscaleToken";
2428import type * as IoPocketenvSandboxPutPreferences from "./types/io/pocketenv/sandbox/putPreferences";
2929+import type * as IoPocketenvSandboxPutSshKeys from "./types/io/pocketenv/sandbox/putSshKeys";
3030+import type * as IoPocketenvSandboxPutTailscaleToken from "./types/io/pocketenv/sandbox/putTailscaleToken";
2531import type * as IoPocketenvSandboxStartSandbox from "./types/io/pocketenv/sandbox/startSandbox";
2632import type * as IoPocketenvSandboxStopSandbox from "./types/io/pocketenv/sandbox/stopSandbox";
2733import type * as IoPocketenvSandboxUpdateSandboxSettings from "./types/io/pocketenv/sandbox/updateSandboxSettings";
···183189 return this._server.xrpc.method(nsid, cfg);
184190 }
185191192192+ createIntegration<AV extends AuthVerifier>(
193193+ cfg: ConfigOf<
194194+ AV,
195195+ IoPocketenvSandboxCreateIntegration.Handler<ExtractAuth<AV>>,
196196+ IoPocketenvSandboxCreateIntegration.HandlerReqCtx<ExtractAuth<AV>>
197197+ >,
198198+ ) {
199199+ const nsid = "io.pocketenv.sandbox.createIntegration"; // @ts-ignore
200200+ return this._server.xrpc.method(nsid, cfg);
201201+ }
202202+186203 createSandbox<AV extends AuthVerifier>(
187204 cfg: ConfigOf<
188205 AV,
···205222 return this._server.xrpc.method(nsid, cfg);
206223 }
207224225225+ getIntegrations<AV extends AuthVerifier>(
226226+ cfg: ConfigOf<
227227+ AV,
228228+ IoPocketenvSandboxGetIntegrations.Handler<ExtractAuth<AV>>,
229229+ IoPocketenvSandboxGetIntegrations.HandlerReqCtx<ExtractAuth<AV>>
230230+ >,
231231+ ) {
232232+ const nsid = "io.pocketenv.sandbox.getIntegrations"; // @ts-ignore
233233+ return this._server.xrpc.method(nsid, cfg);
234234+ }
235235+208236 getPreferences<AV extends AuthVerifier>(
209237 cfg: ConfigOf<
210238 AV,
···238266 return this._server.xrpc.method(nsid, cfg);
239267 }
240268269269+ getSshKeys<AV extends AuthVerifier>(
270270+ cfg: ConfigOf<
271271+ AV,
272272+ IoPocketenvSandboxGetSshKeys.Handler<ExtractAuth<AV>>,
273273+ IoPocketenvSandboxGetSshKeys.HandlerReqCtx<ExtractAuth<AV>>
274274+ >,
275275+ ) {
276276+ const nsid = "io.pocketenv.sandbox.getSshKeys"; // @ts-ignore
277277+ return this._server.xrpc.method(nsid, cfg);
278278+ }
279279+280280+ getTailscaleToken<AV extends AuthVerifier>(
281281+ cfg: ConfigOf<
282282+ AV,
283283+ IoPocketenvSandboxGetTailscaleToken.Handler<ExtractAuth<AV>>,
284284+ IoPocketenvSandboxGetTailscaleToken.HandlerReqCtx<ExtractAuth<AV>>
285285+ >,
286286+ ) {
287287+ const nsid = "io.pocketenv.sandbox.getTailscaleToken"; // @ts-ignore
288288+ return this._server.xrpc.method(nsid, cfg);
289289+ }
290290+241291 putPreferences<AV extends AuthVerifier>(
242292 cfg: ConfigOf<
243293 AV,
···246296 >,
247297 ) {
248298 const nsid = "io.pocketenv.sandbox.putPreferences"; // @ts-ignore
299299+ return this._server.xrpc.method(nsid, cfg);
300300+ }
301301+302302+ putSshKeys<AV extends AuthVerifier>(
303303+ cfg: ConfigOf<
304304+ AV,
305305+ IoPocketenvSandboxPutSshKeys.Handler<ExtractAuth<AV>>,
306306+ IoPocketenvSandboxPutSshKeys.HandlerReqCtx<ExtractAuth<AV>>
307307+ >,
308308+ ) {
309309+ const nsid = "io.pocketenv.sandbox.putSshKeys"; // @ts-ignore
310310+ return this._server.xrpc.method(nsid, cfg);
311311+ }
312312+313313+ putTailscaleToken<AV extends AuthVerifier>(
314314+ cfg: ConfigOf<
315315+ AV,
316316+ IoPocketenvSandboxPutTailscaleToken.Handler<ExtractAuth<AV>>,
317317+ IoPocketenvSandboxPutTailscaleToken.HandlerReqCtx<ExtractAuth<AV>>
318318+ >,
319319+ ) {
320320+ const nsid = "io.pocketenv.sandbox.putTailscaleToken"; // @ts-ignore
249321 return this._server.xrpc.method(nsid, cfg);
250322 }
251323