the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add lexicons and handlers for prefs and resources

+2953 -139
+24
apps/api/lexicons/file/addFile.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.file.addFile", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "input": { 8 + "encoding": "application/json", 9 + "schema": { 10 + "type": "object", 11 + "required": [ 12 + "file" 13 + ], 14 + "properties": { 15 + "file": { 16 + "type": "ref", 17 + "ref": "io.pocketenv.file.defs#file" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + }
+24
apps/api/lexicons/file/deleteFile.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.file.deleteFile", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "input": { 8 + "encoding": "application/json", 9 + "schema": { 10 + "type": "object", 11 + "required": [ 12 + "file" 13 + ], 14 + "properties": { 15 + "file": { 16 + "type": "ref", 17 + "ref": "io.pocketenv.file.defs#file" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + }
+44
apps/api/lexicons/file/getFiles.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.file.getFiles", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "properties": { 10 + "limit": { 11 + "type": "integer", 12 + "description": "The maximum number of files to return.", 13 + "minimum": 1 14 + }, 15 + "offset": { 16 + "type": "integer", 17 + "description": "The number of files to skip before starting to collect the result set.", 18 + "minimum": 0 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "properties": { 27 + "files": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "io.pocketenv.file.defs#fileView" 32 + } 33 + }, 34 + "total": { 35 + "type": "integer", 36 + "description": "The total number of files available.", 37 + "minimum": 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + } 44 + }
+131
apps/api/lexicons/sandbox/defs.json
··· 178 178 "ref": "io.pocketenv.user.defs#userViewBasic" 179 179 } 180 180 } 181 + }, 182 + "sandboxDetailsPref": { 183 + "type": "object", 184 + "properties": { 185 + "name": { 186 + "type": "string", 187 + "description": "The name of the sandbox", 188 + "minLength": 1 189 + }, 190 + "description": { 191 + "type": "string", 192 + "description": "A description for the sandbox" 193 + }, 194 + "topics": { 195 + "type": "array", 196 + "description": "A list of topics/tags to associate with the sandbox", 197 + "items": { 198 + "type": "string", 199 + "maxLength": 50 200 + } 201 + }, 202 + "repo": { 203 + "type": "string", 204 + "description": "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.", 205 + "format": "uri" 206 + }, 207 + "vcpus": { 208 + "type": "integer", 209 + "description": "The number of virtual CPUs to allocate for the sandbox", 210 + "minimum": 1 211 + }, 212 + "memory": { 213 + "type": "integer", 214 + "description": "The amount of memory (in GB) to allocate for the sandbox", 215 + "minimum": 1 216 + }, 217 + "disk": { 218 + "type": "integer", 219 + "description": "The amount of disk space (in GB) to allocate for the sandbox", 220 + "minimum": 3 221 + }, 222 + "readme": { 223 + "type": "string", 224 + "description": "A URI to a README for the sandbox.", 225 + "format": "uri" 226 + } 227 + } 228 + }, 229 + "secretPref": { 230 + "type": "object", 231 + "properties": { 232 + "name": { 233 + "type": "string", 234 + "description": "The name of the secret", 235 + "minLength": 1 236 + }, 237 + "value": { 238 + "type": "string", 239 + "description": "The value of the secret. This will be encrypted at rest and redacted in any API responses." 240 + } 241 + } 242 + }, 243 + "variablePref": { 244 + "type": "object", 245 + "description": "A variable to add to the sandbox", 246 + "properties": { 247 + "name": { 248 + "type": "string", 249 + "description": "The name of the variable", 250 + "minLength": 1 251 + }, 252 + "value": { 253 + "type": "string", 254 + "description": "The value of the variable. This will be visible in API responses and should not contain sensitive information." 255 + } 256 + } 257 + }, 258 + "filePref": { 259 + "type": "object", 260 + "description": "A file to add to the sandbox", 261 + "properties": { 262 + "name": { 263 + "type": "string", 264 + "description": "The name of the file", 265 + "minLength": 1 266 + }, 267 + "content": { 268 + "type": "string", 269 + "description": "The content of the file." 270 + }, 271 + "encrypt": { 272 + "type": "boolean", 273 + "description": "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information." 274 + }, 275 + "path": { 276 + "type": "string", 277 + "description": "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox." 278 + } 279 + } 280 + }, 281 + "volumePref": { 282 + "type": "object", 283 + "description": "A volume to add to the sandbox", 284 + "properties": { 285 + "name": { 286 + "type": "string", 287 + "description": "The name of the volume", 288 + "minLength": 1 289 + }, 290 + "path": { 291 + "type": "string", 292 + "description": "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc." 293 + }, 294 + "readOnly": { 295 + "type": "boolean", 296 + "description": "Whether the volume should be mounted as read-only" 297 + } 298 + } 299 + }, 300 + "preferences": { 301 + "type": "array", 302 + "items": { 303 + "type": "union", 304 + "refs": [ 305 + "#sandboxDetailsPref", 306 + "#secretPref", 307 + "#variablePref", 308 + "#filePref", 309 + "#volumePref" 310 + ] 311 + } 181 312 } 182 313 } 183 314 }
+29
apps/api/lexicons/sandbox/getPreferences.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.sandbox.getPreferences", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Get sandbox preferences", 8 + "parameters": { 9 + "type": "params", 10 + "required": [ 11 + "id" 12 + ], 13 + "properties": { 14 + "id": { 15 + "type": "string", 16 + "description": "The sandbox ID or URI to retrieve" 17 + } 18 + } 19 + }, 20 + "output": { 21 + "encoding": "application/json", 22 + "schema": { 23 + "type": "ref", 24 + "ref": "io.pocketenv.sandbox.defs#preferences" 25 + } 26 + } 27 + } 28 + } 29 + }
+25
apps/api/lexicons/sandbox/putPreferences.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.sandbox.putPreferences", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Update sandbox preferences.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "preferences" 14 + ], 15 + "properties": { 16 + "preferences": { 17 + "type": "ref", 18 + "ref": "io.pocketenv.sandbox.defs#preferences" 19 + } 20 + } 21 + } 22 + } 23 + } 24 + } 25 + }
+24
apps/api/lexicons/secret/addSecret.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.secret.addSecret", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "input": { 8 + "encoding": "application/json", 9 + "schema": { 10 + "type": "object", 11 + "required": [ 12 + "secret" 13 + ], 14 + "properties": { 15 + "secret": { 16 + "type": "ref", 17 + "ref": "io.pocketenv.secret.defs#secret" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + }
+13
apps/api/lexicons/secret/defs.json
··· 2 2 "lexicon": 1, 3 3 "id": "io.pocketenv.secret.defs", 4 4 "defs": { 5 + "secretView": { 6 + "type": "object", 7 + "properties": { 8 + "id": { 9 + "type": "string", 10 + "description": "Unique identifier of the secret." 11 + }, 12 + "name": { 13 + "type": "string", 14 + "description": "Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc." 15 + } 16 + } 17 + }, 5 18 "secret": { 6 19 "type": "object", 7 20 "required": [
+21
apps/api/lexicons/secret/deleteSecret.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.secret.deleteSecret", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "parameters": { 8 + "type": "params", 9 + "required": [ 10 + "id" 11 + ], 12 + "properties": { 13 + "id": { 14 + "type": "string", 15 + "description": "The ID of the secret to delete" 16 + } 17 + } 18 + } 19 + } 20 + } 21 + }
+44
apps/api/lexicons/secret/getSecrets.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.secret.getSecrets", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "properties": { 10 + "limit": { 11 + "type": "integer", 12 + "description": "The maximum number of secrets to return.", 13 + "minimum": 1 14 + }, 15 + "offset": { 16 + "type": "integer", 17 + "description": "The number of secrets to skip before starting to collect the result set.", 18 + "minimum": 0 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "properties": { 27 + "secrets": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "io.pocketenv.secret.defs#secretView" 32 + } 33 + }, 34 + "total": { 35 + "type": "integer", 36 + "description": "The total number of secrets available.", 37 + "minimum": 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + } 44 + }
+24
apps/api/lexicons/variable/addVariable.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.variable.addVariable", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "input": { 8 + "encoding": "application/json", 9 + "schema": { 10 + "type": "object", 11 + "required": [ 12 + "variable" 13 + ], 14 + "properties": { 15 + "variable": { 16 + "type": "ref", 17 + "ref": "io.pocketenv.variable.defs#variable" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + }
+17
apps/api/lexicons/variable/defs.json
··· 2 2 "lexicon": 1, 3 3 "id": "io.pocketenv.variable.defs", 4 4 "defs": { 5 + "variableView": { 6 + "type": "object", 7 + "properties": { 8 + "id": { 9 + "type": "string", 10 + "description": "Unique identifier of the environment variable." 11 + }, 12 + "name": { 13 + "type": "string", 14 + "description": "Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc." 15 + }, 16 + "value": { 17 + "type": "string", 18 + "description": "Value of the environment variable. This will be visible in API responses and should not contain sensitive information." 19 + } 20 + } 21 + }, 5 22 "variable": { 6 23 "type": "object", 7 24 "required": [
+21
apps/api/lexicons/variable/deleteVariable.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.variable.deleteVariable", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "parameters": { 8 + "type": "params", 9 + "required": [ 10 + "id" 11 + ], 12 + "properties": { 13 + "id": { 14 + "type": "string", 15 + "description": "The ID of the environment variable to delete" 16 + } 17 + } 18 + } 19 + } 20 + } 21 + }
+44
apps/api/lexicons/variable/getVariables.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.variable.getVariables", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "properties": { 10 + "limit": { 11 + "type": "integer", 12 + "description": "The maximum number of variables to return.", 13 + "minimum": 1 14 + }, 15 + "offset": { 16 + "type": "integer", 17 + "description": "The number of variables to skip before starting to collect the result set.", 18 + "minimum": 0 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "properties": { 27 + "variables": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "io.pocketenv.variable.defs#variableView" 32 + } 33 + }, 34 + "total": { 35 + "type": "integer", 36 + "description": "The total number of variables available.", 37 + "minimum": 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + } 44 + }
+9
apps/api/lexicons/volume/addVolume.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.volume.addVolume", 4 + "defs": { 5 + "main": { 6 + "type": "procedure" 7 + } 8 + } 9 + }
+13 -8
apps/api/lexicons/volume/defs.json
··· 2 2 "lexicon": 1, 3 3 "id": "io.pocketenv.volume.defs", 4 4 "defs": { 5 + "volumeView": { 6 + "type": "object", 7 + "properties": { 8 + "id": { 9 + "type": "string", 10 + "description": "Unique identifier of the volume." 11 + }, 12 + "name": { 13 + "type": "string", 14 + "description": "Name of the volume, e.g. 'data-volume', 'logs', etc." 15 + } 16 + } 17 + }, 5 18 "volumes": { 6 19 "type": "array", 7 20 "items": { ··· 19 32 "name": { 20 33 "type": "string", 21 34 "description": "Name of the volume, e.g. 'data-volume', 'logs', etc." 22 - }, 23 - "path": { 24 - "type": "string", 25 - "description": "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc." 26 - }, 27 - "readOnly": { 28 - "type": "boolean", 29 - "description": "Whether the volume should be mounted as read-only" 30 35 } 31 36 } 32 37 }
+21
apps/api/lexicons/volume/deleteVolume.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.volume.deleteVolume", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "parameters": { 8 + "type": "params", 9 + "required": [ 10 + "id" 11 + ], 12 + "properties": { 13 + "id": { 14 + "type": "string", 15 + "description": "The ID of the volume to delete." 16 + } 17 + } 18 + } 19 + } 20 + } 21 + }
+44
apps/api/lexicons/volume/getVolumes.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "io.pocketenv.volume.getVolumes", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "properties": { 10 + "limit": { 11 + "type": "integer", 12 + "description": "The maximum number of volumes to return.", 13 + "minimum": 1 14 + }, 15 + "offset": { 16 + "type": "integer", 17 + "description": "The number of volumes to skip before starting to collect the result set.", 18 + "minimum": 0 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "properties": { 27 + "volumes": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "io.pocketenv.volume.defs#volumeView" 32 + } 33 + }, 34 + "total": { 35 + "type": "integer", 36 + "description": "The total number of volumes available.", 37 + "minimum": 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + } 44 + }
+22
apps/api/pkl/defs/file/addFile.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.file.addFile" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + input { 9 + encoding = "application/json" 10 + schema { 11 + type = "object" 12 + required = List("file") 13 + properties { 14 + ["file"] = new Ref { 15 + type = "ref" 16 + ref = "io.pocketenv.file.defs#file" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+22
apps/api/pkl/defs/file/deleteFile.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.file.deleteFile" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + input { 9 + encoding = "application/json" 10 + schema { 11 + type = "object" 12 + required = List("file") 13 + properties { 14 + ["file"] = new Ref { 15 + type = "ref" 16 + ref = "io.pocketenv.file.defs#file" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+43
apps/api/pkl/defs/file/getFiles.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.file.getFiles" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + parameters { 9 + type = "params" 10 + properties { 11 + ["limit"] = new IntegerType { 12 + type = "integer" 13 + description = "The maximum number of files to return." 14 + minimum = 1 15 + } 16 + ["offset"] = new IntegerType { 17 + type = "integer" 18 + description = "The number of files to skip before starting to collect the result set." 19 + minimum = 0 20 + } 21 + } 22 + } 23 + output { 24 + encoding = "application/json" 25 + schema = new ObjectType { 26 + type = "object" 27 + properties { 28 + ["files"] = new Array { 29 + type = "array" 30 + items = new Ref { 31 + ref = "io.pocketenv.file.defs#fileView" 32 + } 33 + } 34 + ["total"] = new IntegerType { 35 + type = "integer" 36 + description = "The total number of files available." 37 + minimum = 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + }
+135
apps/api/pkl/defs/sandbox/defs.pkl
··· 181 181 } 182 182 } 183 183 } 184 + ["sandboxDetailsPref"] = new ObjectType { 185 + type = "object" 186 + properties { 187 + ["name"] = new StringType { 188 + type = "string" 189 + description = "The name of the sandbox" 190 + minLength = 1 191 + } 192 + ["description"] = new StringType { 193 + type = "string" 194 + description = "A description for the sandbox" 195 + } 196 + ["topics"] = new Array { 197 + type = "array" 198 + description = "A list of topics/tags to associate with the sandbox" 199 + items = new StringType { 200 + type = "string" 201 + maxLength = 50 202 + } 203 + } 204 + ["repo"] = new StringType { 205 + type = "string" 206 + description = 207 + "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo." 208 + format = "uri" 209 + } 210 + ["vcpus"] = new IntegerType { 211 + type = "integer" 212 + description = "The number of virtual CPUs to allocate for the sandbox" 213 + minimum = 1 214 + } 215 + ["memory"] = new IntegerType { 216 + type = "integer" 217 + description = "The amount of memory (in GB) to allocate for the sandbox" 218 + minimum = 1 219 + } 220 + ["disk"] = new IntegerType { 221 + type = "integer" 222 + description = "The amount of disk space (in GB) to allocate for the sandbox" 223 + minimum = 3 224 + } 225 + ["readme"] = new StringType { 226 + type = "string" 227 + description = "A URI to a README for the sandbox." 228 + format = "uri" 229 + } 230 + } 231 + } 232 + ["secretPref"] = new ObjectType { 233 + type = "object" 234 + properties { 235 + ["name"] = new StringType { 236 + type = "string" 237 + description = "The name of the secret" 238 + minLength = 1 239 + } 240 + ["value"] = new StringType { 241 + type = "string" 242 + description = "The value of the secret. This will be encrypted at rest and redacted in any API responses." 243 + } 244 + } 245 + } 246 + ["variablePref"] = new ObjectType { 247 + type = "object" 248 + properties { 249 + ["name"] = new StringType { 250 + type = "string" 251 + description = "The name of the variable" 252 + minLength = 1 253 + } 254 + ["value"] = new StringType { 255 + type = "string" 256 + description = "The value of the variable. This will be visible in API responses and should not contain sensitive information." 257 + } 258 + } 259 + description = "A variable to add to the sandbox" 260 + } 261 + ["filePref"] = new ObjectType { 262 + type = "object" 263 + properties { 264 + ["name"] = new StringType { 265 + type = "string" 266 + description = "The name of the file" 267 + minLength = 1 268 + } 269 + ["content"] = new StringType { 270 + type = "string" 271 + description = "The content of the file." 272 + } 273 + ["encrypt"] = new BooleanType { 274 + type = "boolean" 275 + description = 276 + "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information." 277 + } 278 + ["path"] = new StringType { 279 + type = "string" 280 + description = 281 + "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox." 282 + } 283 + } 284 + description = "A file to add to the sandbox" 285 + } 286 + ["volumePref"] = new ObjectType { 287 + type = "object" 288 + properties { 289 + ["name"] = new StringType { 290 + type = "string" 291 + description = "The name of the volume" 292 + minLength = 1 293 + } 294 + ["path"] = new StringType { 295 + type = "string" 296 + description = 297 + "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc." 298 + } 299 + ["readOnly"] = new BooleanType { 300 + type = "boolean" 301 + description = "Whether the volume should be mounted as read-only" 302 + } 303 + } 304 + description = "A volume to add to the sandbox" 305 + } 306 + ["preferences"] = new Array { 307 + type = "array" 308 + items = new Union { 309 + type = "union" 310 + refs = List( 311 + "#sandboxDetailsPref", 312 + "#secretPref", 313 + "#variablePref", 314 + "#filePref", 315 + "#volumePref" 316 + ) 317 + } 318 + } 184 319 }
+27
apps/api/pkl/defs/sandbox/getPreferences.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.sandbox.getPreferences" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + description = "Get sandbox preferences" 9 + parameters { 10 + type = "params" 11 + required = List("id") 12 + properties { 13 + ["id"] = new StringType { 14 + type = "string" 15 + description = "The sandbox ID or URI to retrieve" 16 + } 17 + } 18 + } 19 + output { 20 + encoding = "application/json" 21 + schema = new Ref { 22 + type = "ref" 23 + ref = "io.pocketenv.sandbox.defs#preferences" 24 + } 25 + } 26 + } 27 + }
+23
apps/api/pkl/defs/sandbox/putPreferences.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.sandbox.putPreferences" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + description = "Update sandbox preferences." 9 + input { 10 + encoding = "application/json" 11 + schema = new ObjectType { 12 + type = "object" 13 + required = List("preferences") 14 + properties { 15 + ["preferences"] = new Ref { 16 + type = "ref" 17 + ref = "io.pocketenv.sandbox.defs#preferences" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + }
-88
apps/api/pkl/defs/sandbox/updateSandboxSettings.pkl
··· 1 - amends "../../schema/lexicon.pkl" 2 - 3 - lexicon = 1 4 - id = "io.pocketenv.sandbox.updateSandboxSettings" 5 - defs = new Mapping<String, Procedure> { 6 - ["main"] { 7 - type = "procedure" 8 - description = "Update sandbox settings" 9 - input { 10 - encoding = "application/json" 11 - schema { 12 - type = "object" 13 - properties { 14 - ["name"] = new StringType { 15 - type = "string" 16 - description = "The name of the sandbox" 17 - minLength = 1 18 - } 19 - ["description"] = new StringType { 20 - type = "string" 21 - description = "A description for the sandbox" 22 - } 23 - ["topics"] = new Array { 24 - type = "array" 25 - description = "A list of topics/tags to associate with the sandbox" 26 - items = new StringType { 27 - type = "string" 28 - maxLength = 50 29 - } 30 - } 31 - ["repo"] = new StringType { 32 - type = "string" 33 - description = 34 - "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo." 35 - format = "uri" 36 - } 37 - ["vcpus"] = new IntegerType { 38 - type = "integer" 39 - description = "The number of virtual CPUs to allocate for the sandbox" 40 - minimum = 1 41 - } 42 - ["memory"] = new IntegerType { 43 - type = "integer" 44 - description = "The amount of memory (in GB) to allocate for the sandbox" 45 - minimum = 1 46 - } 47 - ["disk"] = new IntegerType { 48 - type = "integer" 49 - description = "The amount of disk space (in GB) to allocate for the sandbox" 50 - minimum = 3 51 - } 52 - ["readme"] = new StringType { 53 - type = "string" 54 - description = "A URI to a README for the sandbox." 55 - format = "uri" 56 - } 57 - ["secrets"] = new Ref { 58 - type = "ref" 59 - ref = "io.pocketenv.secret.defs#secrets" 60 - description = "A list of secrets to add to the sandbox" 61 - } 62 - ["variables"] = new Ref { 63 - type = "ref" 64 - ref = "io.pocketenv.variable.defs#variables" 65 - description = "A list of environment variables to add to the sandbox" 66 - } 67 - ["files"] = new Ref { 68 - type = "ref" 69 - ref = "io.pocketenv.file.defs#file" 70 - description = "A list of files to add to the sandbox" 71 - } 72 - ["volumes"] = new Ref { 73 - type = "ref" 74 - ref = "io.pocketenv.volume.defs#volumes" 75 - description = "A list of volumes to add to the sandbox" 76 - } 77 - } 78 - } 79 - } 80 - output { 81 - encoding = "application/json" 82 - schema = new Ref { 83 - type = "ref" 84 - ref = "io.pocketenv.sandbox.defs#profileViewDetailed" 85 - } 86 - } 87 - } 88 - }
+22
apps/api/pkl/defs/secret/addSecret.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.secret.addSecret" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + input { 9 + encoding = "application/json" 10 + schema { 11 + type = "object" 12 + required = List("secret") 13 + properties { 14 + ["secret"] = new Ref { 15 + type = "ref" 16 + ref = "io.pocketenv.secret.defs#secret" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+13
apps/api/pkl/defs/secret/defs.pkl
··· 3 3 lexicon = 1 4 4 id = "io.pocketenv.secret.defs" 5 5 defs = new Mapping<String, ObjectType | StringType | Array> { 6 + ["secretView"] = new ObjectType { 7 + type = "object" 8 + properties { 9 + ["id"] = new StringType { 10 + type = "string" 11 + description = "Unique identifier of the secret." 12 + } 13 + ["name"] = new StringType { 14 + type = "string" 15 + description = "Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc." 16 + } 17 + } 18 + } 6 19 ["secret"] = new ObjectType { 7 20 type = "object" 8 21 required = List("name", "value")
+19
apps/api/pkl/defs/secret/deleteSecret.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.secret.deleteSecret" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + parameters { 9 + type = "params" 10 + required = List("id") 11 + properties { 12 + ["id"] = new StringType { 13 + type = "string" 14 + description = "The ID of the secret to delete" 15 + } 16 + } 17 + } 18 + } 19 + }
+43
apps/api/pkl/defs/secret/getSecrets.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.secret.getSecrets" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + parameters { 9 + type = "params" 10 + properties { 11 + ["limit"] = new IntegerType { 12 + type = "integer" 13 + description = "The maximum number of secrets to return." 14 + minimum = 1 15 + } 16 + ["offset"] = new IntegerType { 17 + type = "integer" 18 + description = "The number of secrets to skip before starting to collect the result set." 19 + minimum = 0 20 + } 21 + } 22 + } 23 + output { 24 + encoding = "application/json" 25 + schema = new ObjectType { 26 + type = "object" 27 + properties { 28 + ["secrets"] = new Array { 29 + type = "array" 30 + items = new Ref { 31 + ref = "io.pocketenv.secret.defs#secretView" 32 + } 33 + } 34 + ["total"] = new IntegerType { 35 + type = "integer" 36 + description = "The total number of secrets available." 37 + minimum = 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + }
+22
apps/api/pkl/defs/variable/addVariable.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.variable.addVariable" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + input { 9 + encoding = "application/json" 10 + schema { 11 + type = "object" 12 + required = List("variable") 13 + properties { 14 + ["variable"] = new Ref { 15 + type = "ref" 16 + ref = "io.pocketenv.variable.defs#variable" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+18
apps/api/pkl/defs/variable/defs.pkl
··· 3 3 lexicon = 1 4 4 id = "io.pocketenv.variable.defs" 5 5 defs = new Mapping<String, StringType | Array | ObjectType> { 6 + ["variableView"] = new ObjectType { 7 + type = "object" 8 + properties { 9 + ["id"] = new StringType { 10 + type = "string" 11 + description = "Unique identifier of the environment variable." 12 + } 13 + ["name"] = new StringType { 14 + type = "string" 15 + description = "Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc." 16 + } 17 + ["value"] = new StringType { 18 + type = "string" 19 + description = 20 + "Value of the environment variable. This will be visible in API responses and should not contain sensitive information." 21 + } 22 + } 23 + } 6 24 ["variable"] = new ObjectType { 7 25 type = "object" 8 26 required = List("name", "value")
+19
apps/api/pkl/defs/variable/deleteVariable.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.variable.deleteVariable" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + parameters { 9 + type = "params" 10 + required = List("id") 11 + properties { 12 + ["id"] = new StringType { 13 + type = "string" 14 + description = "The ID of the environment variable to delete" 15 + } 16 + } 17 + } 18 + } 19 + }
+43
apps/api/pkl/defs/variable/getVariables.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.variable.getVariables" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + parameters { 9 + type = "params" 10 + properties { 11 + ["limit"] = new IntegerType { 12 + type = "integer" 13 + description = "The maximum number of variables to return." 14 + minimum = 1 15 + } 16 + ["offset"] = new IntegerType { 17 + type = "integer" 18 + description = "The number of variables to skip before starting to collect the result set." 19 + minimum = 0 20 + } 21 + } 22 + } 23 + output { 24 + encoding = "application/json" 25 + schema = new ObjectType { 26 + type = "object" 27 + properties { 28 + ["variables"] = new Array { 29 + type = "array" 30 + items = new Ref { 31 + ref = "io.pocketenv.variable.defs#variableView" 32 + } 33 + } 34 + ["total"] = new IntegerType { 35 + type = "integer" 36 + description = "The total number of variables available." 37 + minimum = 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + }
+9
apps/api/pkl/defs/volume/addVolume.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.volume.addVolume" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + } 9 + }
+13 -9
apps/api/pkl/defs/volume/defs.pkl
··· 3 3 lexicon = 1 4 4 id = "io.pocketenv.volume.defs" 5 5 defs = new Mapping<String, Array | ObjectType | StringType | BooleanType> { 6 + ["volumeView"] = new ObjectType { 7 + type = "object" 8 + properties { 9 + ["id"] = new StringType { 10 + type = "string" 11 + description = "Unique identifier of the volume." 12 + } 13 + ["name"] = new StringType { 14 + type = "string" 15 + description = "Name of the volume, e.g. 'data-volume', 'logs', etc." 16 + } 17 + } 18 + } 6 19 ["volumes"] = new Array { 7 20 type = "array" 8 21 items = new Ref { ··· 19 32 type = "string" 20 33 description = "Name of the volume, e.g. 'data-volume', 'logs', etc." 21 34 } 22 - ["path"] = new StringType { 23 - type = "string" 24 - description = 25 - "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc." 26 - } 27 - ["readOnly"] = new BooleanType { 28 - type = "boolean" 29 - description = "Whether the volume should be mounted as read-only" 30 - } 31 35 } 32 36 } 33 37 }
+19
apps/api/pkl/defs/volume/deleteVolume.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.volume.deleteVolume" 5 + defs = new Mapping<String, Procedure> { 6 + ["main"] { 7 + type = "procedure" 8 + parameters { 9 + type = "params" 10 + required = List("id") 11 + properties { 12 + ["id"] = new StringType { 13 + type = "string" 14 + description = "The ID of the volume to delete." 15 + } 16 + } 17 + } 18 + } 19 + }
+43
apps/api/pkl/defs/volume/getVolumes.pkl
··· 1 + amends "../../schema/lexicon.pkl" 2 + 3 + lexicon = 1 4 + id = "io.pocketenv.volume.getVolumes" 5 + defs = new Mapping<String, Query> { 6 + ["main"] { 7 + type = "query" 8 + parameters { 9 + type = "params" 10 + properties { 11 + ["limit"] = new IntegerType { 12 + type = "integer" 13 + description = "The maximum number of volumes to return." 14 + minimum = 1 15 + } 16 + ["offset"] = new IntegerType { 17 + type = "integer" 18 + description = "The number of volumes to skip before starting to collect the result set." 19 + minimum = 0 20 + } 21 + } 22 + } 23 + output { 24 + encoding = "application/json" 25 + schema = new ObjectType { 26 + type = "object" 27 + properties { 28 + ["volumes"] = new Array { 29 + type = "array" 30 + items = new Ref { 31 + ref = "io.pocketenv.volume.defs#volumeView" 32 + } 33 + } 34 + ["total"] = new IntegerType { 35 + type = "integer" 36 + description = "The total number of volumes available." 37 + minimum = 0 38 + } 39 + } 40 + } 41 + } 42 + } 43 + }
+208
apps/api/src/lexicon/index.ts
··· 12 12 import type * as IoPocketenvActorGetActorSandboxes from "./types/io/pocketenv/actor/getActorSandboxes"; 13 13 import type * as IoPocketenvActorGetProfile from "./types/io/pocketenv/actor/getProfile"; 14 14 import type * as IoPocketenvActorGetTerminalToken from "./types/io/pocketenv/actor/getTerminalToken"; 15 + import type * as IoPocketenvFileAddFile from "./types/io/pocketenv/file/addFile"; 16 + import type * as IoPocketenvFileDeleteFile from "./types/io/pocketenv/file/deleteFile"; 17 + import type * as IoPocketenvFileGetFiles from "./types/io/pocketenv/file/getFiles"; 15 18 import type * as IoPocketenvSandboxClaimSandbox from "./types/io/pocketenv/sandbox/claimSandbox"; 16 19 import type * as IoPocketenvSandboxCreateSandbox from "./types/io/pocketenv/sandbox/createSandbox"; 17 20 import type * as IoPocketenvSandboxDeleteSandbox from "./types/io/pocketenv/sandbox/deleteSandbox"; 21 + import type * as IoPocketenvSandboxGetPreferences from "./types/io/pocketenv/sandbox/getPreferences"; 18 22 import type * as IoPocketenvSandboxGetSandbox from "./types/io/pocketenv/sandbox/getSandbox"; 19 23 import type * as IoPocketenvSandboxGetSandboxes from "./types/io/pocketenv/sandbox/getSandboxes"; 24 + import type * as IoPocketenvSandboxPutPreferences from "./types/io/pocketenv/sandbox/putPreferences"; 20 25 import type * as IoPocketenvSandboxStartSandbox from "./types/io/pocketenv/sandbox/startSandbox"; 21 26 import type * as IoPocketenvSandboxStopSandbox from "./types/io/pocketenv/sandbox/stopSandbox"; 22 27 import type * as IoPocketenvSandboxUpdateSandboxSettings from "./types/io/pocketenv/sandbox/updateSandboxSettings"; 28 + import type * as IoPocketenvSecretAddSecret from "./types/io/pocketenv/secret/addSecret"; 29 + import type * as IoPocketenvSecretDeleteSecret from "./types/io/pocketenv/secret/deleteSecret"; 30 + import type * as IoPocketenvSecretGetSecrets from "./types/io/pocketenv/secret/getSecrets"; 31 + import type * as IoPocketenvVariableAddVariable from "./types/io/pocketenv/variable/addVariable"; 32 + import type * as IoPocketenvVariableDeleteVariable from "./types/io/pocketenv/variable/deleteVariable"; 33 + import type * as IoPocketenvVariableGetVariables from "./types/io/pocketenv/variable/getVariables"; 34 + import type * as IoPocketenvVolumeAddVolume from "./types/io/pocketenv/volume/addVolume"; 35 + import type * as IoPocketenvVolumeDeleteVolume from "./types/io/pocketenv/volume/deleteVolume"; 36 + import type * as IoPocketenvVolumeGetVolumes from "./types/io/pocketenv/volume/getVolumes"; 23 37 24 38 export function createServer(options?: XrpcOptions): Server { 25 39 return new Server(options); ··· 52 66 export class IoPocketenvNS { 53 67 _server: Server; 54 68 actor: IoPocketenvActorNS; 69 + file: IoPocketenvFileNS; 55 70 sandbox: IoPocketenvSandboxNS; 71 + secret: IoPocketenvSecretNS; 72 + variable: IoPocketenvVariableNS; 73 + volume: IoPocketenvVolumeNS; 56 74 57 75 constructor(server: Server) { 58 76 this._server = server; 59 77 this.actor = new IoPocketenvActorNS(server); 78 + this.file = new IoPocketenvFileNS(server); 60 79 this.sandbox = new IoPocketenvSandboxNS(server); 80 + this.secret = new IoPocketenvSecretNS(server); 81 + this.variable = new IoPocketenvVariableNS(server); 82 + this.volume = new IoPocketenvVolumeNS(server); 61 83 } 62 84 } 63 85 ··· 102 124 } 103 125 } 104 126 127 + export class IoPocketenvFileNS { 128 + _server: Server; 129 + 130 + constructor(server: Server) { 131 + this._server = server; 132 + } 133 + 134 + addFile<AV extends AuthVerifier>( 135 + cfg: ConfigOf< 136 + AV, 137 + IoPocketenvFileAddFile.Handler<ExtractAuth<AV>>, 138 + IoPocketenvFileAddFile.HandlerReqCtx<ExtractAuth<AV>> 139 + >, 140 + ) { 141 + const nsid = "io.pocketenv.file.addFile"; // @ts-ignore 142 + return this._server.xrpc.method(nsid, cfg); 143 + } 144 + 145 + deleteFile<AV extends AuthVerifier>( 146 + cfg: ConfigOf< 147 + AV, 148 + IoPocketenvFileDeleteFile.Handler<ExtractAuth<AV>>, 149 + IoPocketenvFileDeleteFile.HandlerReqCtx<ExtractAuth<AV>> 150 + >, 151 + ) { 152 + const nsid = "io.pocketenv.file.deleteFile"; // @ts-ignore 153 + return this._server.xrpc.method(nsid, cfg); 154 + } 155 + 156 + getFiles<AV extends AuthVerifier>( 157 + cfg: ConfigOf< 158 + AV, 159 + IoPocketenvFileGetFiles.Handler<ExtractAuth<AV>>, 160 + IoPocketenvFileGetFiles.HandlerReqCtx<ExtractAuth<AV>> 161 + >, 162 + ) { 163 + const nsid = "io.pocketenv.file.getFiles"; // @ts-ignore 164 + return this._server.xrpc.method(nsid, cfg); 165 + } 166 + } 167 + 105 168 export class IoPocketenvSandboxNS { 106 169 _server: Server; 107 170 ··· 142 205 return this._server.xrpc.method(nsid, cfg); 143 206 } 144 207 208 + getPreferences<AV extends AuthVerifier>( 209 + cfg: ConfigOf< 210 + AV, 211 + IoPocketenvSandboxGetPreferences.Handler<ExtractAuth<AV>>, 212 + IoPocketenvSandboxGetPreferences.HandlerReqCtx<ExtractAuth<AV>> 213 + >, 214 + ) { 215 + const nsid = "io.pocketenv.sandbox.getPreferences"; // @ts-ignore 216 + return this._server.xrpc.method(nsid, cfg); 217 + } 218 + 145 219 getSandbox<AV extends AuthVerifier>( 146 220 cfg: ConfigOf< 147 221 AV, ··· 164 238 return this._server.xrpc.method(nsid, cfg); 165 239 } 166 240 241 + putPreferences<AV extends AuthVerifier>( 242 + cfg: ConfigOf< 243 + AV, 244 + IoPocketenvSandboxPutPreferences.Handler<ExtractAuth<AV>>, 245 + IoPocketenvSandboxPutPreferences.HandlerReqCtx<ExtractAuth<AV>> 246 + >, 247 + ) { 248 + const nsid = "io.pocketenv.sandbox.putPreferences"; // @ts-ignore 249 + return this._server.xrpc.method(nsid, cfg); 250 + } 251 + 167 252 startSandbox<AV extends AuthVerifier>( 168 253 cfg: ConfigOf< 169 254 AV, ··· 194 279 >, 195 280 ) { 196 281 const nsid = "io.pocketenv.sandbox.updateSandboxSettings"; // @ts-ignore 282 + return this._server.xrpc.method(nsid, cfg); 283 + } 284 + } 285 + 286 + export class IoPocketenvSecretNS { 287 + _server: Server; 288 + 289 + constructor(server: Server) { 290 + this._server = server; 291 + } 292 + 293 + addSecret<AV extends AuthVerifier>( 294 + cfg: ConfigOf< 295 + AV, 296 + IoPocketenvSecretAddSecret.Handler<ExtractAuth<AV>>, 297 + IoPocketenvSecretAddSecret.HandlerReqCtx<ExtractAuth<AV>> 298 + >, 299 + ) { 300 + const nsid = "io.pocketenv.secret.addSecret"; // @ts-ignore 301 + return this._server.xrpc.method(nsid, cfg); 302 + } 303 + 304 + deleteSecret<AV extends AuthVerifier>( 305 + cfg: ConfigOf< 306 + AV, 307 + IoPocketenvSecretDeleteSecret.Handler<ExtractAuth<AV>>, 308 + IoPocketenvSecretDeleteSecret.HandlerReqCtx<ExtractAuth<AV>> 309 + >, 310 + ) { 311 + const nsid = "io.pocketenv.secret.deleteSecret"; // @ts-ignore 312 + return this._server.xrpc.method(nsid, cfg); 313 + } 314 + 315 + getSecrets<AV extends AuthVerifier>( 316 + cfg: ConfigOf< 317 + AV, 318 + IoPocketenvSecretGetSecrets.Handler<ExtractAuth<AV>>, 319 + IoPocketenvSecretGetSecrets.HandlerReqCtx<ExtractAuth<AV>> 320 + >, 321 + ) { 322 + const nsid = "io.pocketenv.secret.getSecrets"; // @ts-ignore 323 + return this._server.xrpc.method(nsid, cfg); 324 + } 325 + } 326 + 327 + export class IoPocketenvVariableNS { 328 + _server: Server; 329 + 330 + constructor(server: Server) { 331 + this._server = server; 332 + } 333 + 334 + addVariable<AV extends AuthVerifier>( 335 + cfg: ConfigOf< 336 + AV, 337 + IoPocketenvVariableAddVariable.Handler<ExtractAuth<AV>>, 338 + IoPocketenvVariableAddVariable.HandlerReqCtx<ExtractAuth<AV>> 339 + >, 340 + ) { 341 + const nsid = "io.pocketenv.variable.addVariable"; // @ts-ignore 342 + return this._server.xrpc.method(nsid, cfg); 343 + } 344 + 345 + deleteVariable<AV extends AuthVerifier>( 346 + cfg: ConfigOf< 347 + AV, 348 + IoPocketenvVariableDeleteVariable.Handler<ExtractAuth<AV>>, 349 + IoPocketenvVariableDeleteVariable.HandlerReqCtx<ExtractAuth<AV>> 350 + >, 351 + ) { 352 + const nsid = "io.pocketenv.variable.deleteVariable"; // @ts-ignore 353 + return this._server.xrpc.method(nsid, cfg); 354 + } 355 + 356 + getVariables<AV extends AuthVerifier>( 357 + cfg: ConfigOf< 358 + AV, 359 + IoPocketenvVariableGetVariables.Handler<ExtractAuth<AV>>, 360 + IoPocketenvVariableGetVariables.HandlerReqCtx<ExtractAuth<AV>> 361 + >, 362 + ) { 363 + const nsid = "io.pocketenv.variable.getVariables"; // @ts-ignore 364 + return this._server.xrpc.method(nsid, cfg); 365 + } 366 + } 367 + 368 + export class IoPocketenvVolumeNS { 369 + _server: Server; 370 + 371 + constructor(server: Server) { 372 + this._server = server; 373 + } 374 + 375 + addVolume<AV extends AuthVerifier>( 376 + cfg: ConfigOf< 377 + AV, 378 + IoPocketenvVolumeAddVolume.Handler<ExtractAuth<AV>>, 379 + IoPocketenvVolumeAddVolume.HandlerReqCtx<ExtractAuth<AV>> 380 + >, 381 + ) { 382 + const nsid = "io.pocketenv.volume.addVolume"; // @ts-ignore 383 + return this._server.xrpc.method(nsid, cfg); 384 + } 385 + 386 + deleteVolume<AV extends AuthVerifier>( 387 + cfg: ConfigOf< 388 + AV, 389 + IoPocketenvVolumeDeleteVolume.Handler<ExtractAuth<AV>>, 390 + IoPocketenvVolumeDeleteVolume.HandlerReqCtx<ExtractAuth<AV>> 391 + >, 392 + ) { 393 + const nsid = "io.pocketenv.volume.deleteVolume"; // @ts-ignore 394 + return this._server.xrpc.method(nsid, cfg); 395 + } 396 + 397 + getVolumes<AV extends AuthVerifier>( 398 + cfg: ConfigOf< 399 + AV, 400 + IoPocketenvVolumeGetVolumes.Handler<ExtractAuth<AV>>, 401 + IoPocketenvVolumeGetVolumes.HandlerReqCtx<ExtractAuth<AV>> 402 + >, 403 + ) { 404 + const nsid = "io.pocketenv.volume.getVolumes"; // @ts-ignore 197 405 return this._server.xrpc.method(nsid, cfg); 198 406 } 199 407 }
+582 -7
apps/api/src/lexicon/lexicons.ts
··· 207 207 }, 208 208 }, 209 209 }, 210 + IoPocketenvFileAddFile: { 211 + lexicon: 1, 212 + id: "io.pocketenv.file.addFile", 213 + defs: { 214 + main: { 215 + type: "procedure", 216 + input: { 217 + encoding: "application/json", 218 + schema: { 219 + type: "object", 220 + required: ["file"], 221 + properties: { 222 + file: { 223 + type: "ref", 224 + ref: "lex:io.pocketenv.file.defs#file", 225 + }, 226 + }, 227 + }, 228 + }, 229 + }, 230 + }, 231 + }, 210 232 IoPocketenvFileDefs: { 211 233 lexicon: 1, 212 234 id: "io.pocketenv.file.defs", ··· 233 255 type: "ref", 234 256 description: "A file to add to the sandbox", 235 257 ref: "lex:io.pocketenv.file.defs#file", 258 + }, 259 + }, 260 + }, 261 + }, 262 + IoPocketenvFileDeleteFile: { 263 + lexicon: 1, 264 + id: "io.pocketenv.file.deleteFile", 265 + defs: { 266 + main: { 267 + type: "procedure", 268 + input: { 269 + encoding: "application/json", 270 + schema: { 271 + type: "object", 272 + required: ["file"], 273 + properties: { 274 + file: { 275 + type: "ref", 276 + ref: "lex:io.pocketenv.file.defs#file", 277 + }, 278 + }, 279 + }, 280 + }, 281 + }, 282 + }, 283 + }, 284 + IoPocketenvFileGetFiles: { 285 + lexicon: 1, 286 + id: "io.pocketenv.file.getFiles", 287 + defs: { 288 + main: { 289 + type: "query", 290 + parameters: { 291 + type: "params", 292 + properties: { 293 + limit: { 294 + type: "integer", 295 + description: "The maximum number of files to return.", 296 + minimum: 1, 297 + }, 298 + offset: { 299 + type: "integer", 300 + description: 301 + "The number of files to skip before starting to collect the result set.", 302 + minimum: 0, 303 + }, 304 + }, 305 + }, 306 + output: { 307 + encoding: "application/json", 308 + schema: { 309 + type: "object", 310 + properties: { 311 + files: { 312 + type: "array", 313 + items: { 314 + type: "ref", 315 + ref: "lex:io.pocketenv.file.defs#fileView", 316 + }, 317 + }, 318 + total: { 319 + type: "integer", 320 + description: "The total number of files available.", 321 + minimum: 0, 322 + }, 323 + }, 324 + }, 236 325 }, 237 326 }, 238 327 }, ··· 548 637 }, 549 638 }, 550 639 }, 640 + sandboxDetailsPref: { 641 + type: "object", 642 + properties: { 643 + name: { 644 + type: "string", 645 + description: "The name of the sandbox", 646 + minLength: 1, 647 + }, 648 + description: { 649 + type: "string", 650 + description: "A description for the sandbox", 651 + }, 652 + topics: { 653 + type: "array", 654 + description: "A list of topics/tags to associate with the sandbox", 655 + items: { 656 + type: "string", 657 + maxLength: 50, 658 + }, 659 + }, 660 + repo: { 661 + type: "string", 662 + description: 663 + "A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo.", 664 + format: "uri", 665 + }, 666 + vcpus: { 667 + type: "integer", 668 + description: 669 + "The number of virtual CPUs to allocate for the sandbox", 670 + minimum: 1, 671 + }, 672 + memory: { 673 + type: "integer", 674 + description: 675 + "The amount of memory (in GB) to allocate for the sandbox", 676 + minimum: 1, 677 + }, 678 + disk: { 679 + type: "integer", 680 + description: 681 + "The amount of disk space (in GB) to allocate for the sandbox", 682 + minimum: 3, 683 + }, 684 + readme: { 685 + type: "string", 686 + description: "A URI to a README for the sandbox.", 687 + format: "uri", 688 + }, 689 + }, 690 + }, 691 + secretPref: { 692 + type: "object", 693 + properties: { 694 + name: { 695 + type: "string", 696 + description: "The name of the secret", 697 + minLength: 1, 698 + }, 699 + value: { 700 + type: "string", 701 + description: 702 + "The value of the secret. This will be encrypted at rest and redacted in any API responses.", 703 + }, 704 + }, 705 + }, 706 + variablePref: { 707 + type: "object", 708 + description: "A variable to add to the sandbox", 709 + properties: { 710 + name: { 711 + type: "string", 712 + description: "The name of the variable", 713 + minLength: 1, 714 + }, 715 + value: { 716 + type: "string", 717 + description: 718 + "The value of the variable. This will be visible in API responses and should not contain sensitive information.", 719 + }, 720 + }, 721 + }, 722 + filePref: { 723 + type: "object", 724 + description: "A file to add to the sandbox", 725 + properties: { 726 + name: { 727 + type: "string", 728 + description: "The name of the file", 729 + minLength: 1, 730 + }, 731 + content: { 732 + type: "string", 733 + description: "The content of the file.", 734 + }, 735 + encrypt: { 736 + type: "boolean", 737 + description: 738 + "Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information.", 739 + }, 740 + path: { 741 + type: "string", 742 + description: 743 + "The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox.", 744 + }, 745 + }, 746 + }, 747 + volumePref: { 748 + type: "object", 749 + description: "A volume to add to the sandbox", 750 + properties: { 751 + name: { 752 + type: "string", 753 + description: "The name of the volume", 754 + minLength: 1, 755 + }, 756 + path: { 757 + type: "string", 758 + description: 759 + "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc.", 760 + }, 761 + readOnly: { 762 + type: "boolean", 763 + description: "Whether the volume should be mounted as read-only", 764 + }, 765 + }, 766 + }, 767 + preferences: { 768 + type: "array", 769 + items: { 770 + type: "union", 771 + refs: [ 772 + "lex:io.pocketenv.sandbox.defs#sandboxDetailsPref", 773 + "lex:io.pocketenv.sandbox.defs#secretPref", 774 + "lex:io.pocketenv.sandbox.defs#variablePref", 775 + "lex:io.pocketenv.sandbox.defs#filePref", 776 + "lex:io.pocketenv.sandbox.defs#volumePref", 777 + ], 778 + }, 779 + }, 551 780 }, 552 781 }, 553 782 IoPocketenvSandboxDeleteSandbox: { ··· 577 806 }, 578 807 }, 579 808 }, 809 + IoPocketenvSandboxGetPreferences: { 810 + lexicon: 1, 811 + id: "io.pocketenv.sandbox.getPreferences", 812 + defs: { 813 + main: { 814 + type: "query", 815 + description: "Get sandbox preferences", 816 + parameters: { 817 + type: "params", 818 + required: ["id"], 819 + properties: { 820 + id: { 821 + type: "string", 822 + description: "The sandbox ID or URI to retrieve", 823 + }, 824 + }, 825 + }, 826 + output: { 827 + encoding: "application/json", 828 + schema: { 829 + type: "ref", 830 + ref: "lex:io.pocketenv.sandbox.defs#preferences", 831 + }, 832 + }, 833 + }, 834 + }, 835 + }, 580 836 IoPocketenvSandboxGetSandbox: { 581 837 lexicon: 1, 582 838 id: "io.pocketenv.sandbox.getSandbox", ··· 643 899 type: "integer", 644 900 description: "The total number of sandboxes available.", 645 901 minimum: 0, 902 + }, 903 + }, 904 + }, 905 + }, 906 + }, 907 + }, 908 + }, 909 + IoPocketenvSandboxPutPreferences: { 910 + lexicon: 1, 911 + id: "io.pocketenv.sandbox.putPreferences", 912 + defs: { 913 + main: { 914 + type: "procedure", 915 + description: "Update sandbox preferences.", 916 + input: { 917 + encoding: "application/json", 918 + schema: { 919 + type: "object", 920 + required: ["preferences"], 921 + properties: { 922 + preferences: { 923 + type: "ref", 924 + ref: "lex:io.pocketenv.sandbox.defs#preferences", 646 925 }, 647 926 }, 648 927 }, ··· 914 1193 }, 915 1194 }, 916 1195 }, 1196 + IoPocketenvSecretAddSecret: { 1197 + lexicon: 1, 1198 + id: "io.pocketenv.secret.addSecret", 1199 + defs: { 1200 + main: { 1201 + type: "procedure", 1202 + input: { 1203 + encoding: "application/json", 1204 + schema: { 1205 + type: "object", 1206 + required: ["secret"], 1207 + properties: { 1208 + secret: { 1209 + type: "ref", 1210 + ref: "lex:io.pocketenv.secret.defs#secret", 1211 + }, 1212 + }, 1213 + }, 1214 + }, 1215 + }, 1216 + }, 1217 + }, 917 1218 IoPocketenvSecretDefs: { 918 1219 lexicon: 1, 919 1220 id: "io.pocketenv.secret.defs", 920 1221 defs: { 1222 + secretView: { 1223 + type: "object", 1224 + properties: { 1225 + id: { 1226 + type: "string", 1227 + description: "Unique identifier of the secret.", 1228 + }, 1229 + name: { 1230 + type: "string", 1231 + description: 1232 + "Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc.", 1233 + }, 1234 + }, 1235 + }, 921 1236 secret: { 922 1237 type: "object", 923 1238 required: ["name", "value"], ··· 944 1259 }, 945 1260 }, 946 1261 }, 1262 + IoPocketenvSecretDeleteSecret: { 1263 + lexicon: 1, 1264 + id: "io.pocketenv.secret.deleteSecret", 1265 + defs: { 1266 + main: { 1267 + type: "procedure", 1268 + parameters: { 1269 + type: "params", 1270 + required: ["id"], 1271 + properties: { 1272 + id: { 1273 + type: "string", 1274 + description: "The ID of the secret to delete", 1275 + }, 1276 + }, 1277 + }, 1278 + }, 1279 + }, 1280 + }, 1281 + IoPocketenvSecretGetSecrets: { 1282 + lexicon: 1, 1283 + id: "io.pocketenv.secret.getSecrets", 1284 + defs: { 1285 + main: { 1286 + type: "query", 1287 + parameters: { 1288 + type: "params", 1289 + properties: { 1290 + limit: { 1291 + type: "integer", 1292 + description: "The maximum number of secrets to return.", 1293 + minimum: 1, 1294 + }, 1295 + offset: { 1296 + type: "integer", 1297 + description: 1298 + "The number of secrets to skip before starting to collect the result set.", 1299 + minimum: 0, 1300 + }, 1301 + }, 1302 + }, 1303 + output: { 1304 + encoding: "application/json", 1305 + schema: { 1306 + type: "object", 1307 + properties: { 1308 + secrets: { 1309 + type: "array", 1310 + items: { 1311 + type: "ref", 1312 + ref: "lex:io.pocketenv.secret.defs#secretView", 1313 + }, 1314 + }, 1315 + total: { 1316 + type: "integer", 1317 + description: "The total number of secrets available.", 1318 + minimum: 0, 1319 + }, 1320 + }, 1321 + }, 1322 + }, 1323 + }, 1324 + }, 1325 + }, 1326 + IoPocketenvVariableAddVariable: { 1327 + lexicon: 1, 1328 + id: "io.pocketenv.variable.addVariable", 1329 + defs: { 1330 + main: { 1331 + type: "procedure", 1332 + input: { 1333 + encoding: "application/json", 1334 + schema: { 1335 + type: "object", 1336 + required: ["variable"], 1337 + properties: { 1338 + variable: { 1339 + type: "ref", 1340 + ref: "lex:io.pocketenv.variable.defs#variable", 1341 + }, 1342 + }, 1343 + }, 1344 + }, 1345 + }, 1346 + }, 1347 + }, 947 1348 IoPocketenvVariableDefs: { 948 1349 lexicon: 1, 949 1350 id: "io.pocketenv.variable.defs", 950 1351 defs: { 1352 + variableView: { 1353 + type: "object", 1354 + properties: { 1355 + id: { 1356 + type: "string", 1357 + description: "Unique identifier of the environment variable.", 1358 + }, 1359 + name: { 1360 + type: "string", 1361 + description: 1362 + "Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc.", 1363 + }, 1364 + value: { 1365 + type: "string", 1366 + description: 1367 + "Value of the environment variable. This will be visible in API responses and should not contain sensitive information.", 1368 + }, 1369 + }, 1370 + }, 951 1371 variable: { 952 1372 type: "object", 953 1373 required: ["name", "value"], ··· 974 1394 }, 975 1395 }, 976 1396 }, 1397 + IoPocketenvVariableDeleteVariable: { 1398 + lexicon: 1, 1399 + id: "io.pocketenv.variable.deleteVariable", 1400 + defs: { 1401 + main: { 1402 + type: "procedure", 1403 + parameters: { 1404 + type: "params", 1405 + required: ["id"], 1406 + properties: { 1407 + id: { 1408 + type: "string", 1409 + description: "The ID of the environment variable to delete", 1410 + }, 1411 + }, 1412 + }, 1413 + }, 1414 + }, 1415 + }, 1416 + IoPocketenvVariableGetVariables: { 1417 + lexicon: 1, 1418 + id: "io.pocketenv.variable.getVariables", 1419 + defs: { 1420 + main: { 1421 + type: "query", 1422 + parameters: { 1423 + type: "params", 1424 + properties: { 1425 + limit: { 1426 + type: "integer", 1427 + description: "The maximum number of variables to return.", 1428 + minimum: 1, 1429 + }, 1430 + offset: { 1431 + type: "integer", 1432 + description: 1433 + "The number of variables to skip before starting to collect the result set.", 1434 + minimum: 0, 1435 + }, 1436 + }, 1437 + }, 1438 + output: { 1439 + encoding: "application/json", 1440 + schema: { 1441 + type: "object", 1442 + properties: { 1443 + variables: { 1444 + type: "array", 1445 + items: { 1446 + type: "ref", 1447 + ref: "lex:io.pocketenv.variable.defs#variableView", 1448 + }, 1449 + }, 1450 + total: { 1451 + type: "integer", 1452 + description: "The total number of variables available.", 1453 + minimum: 0, 1454 + }, 1455 + }, 1456 + }, 1457 + }, 1458 + }, 1459 + }, 1460 + }, 1461 + IoPocketenvVolumeAddVolume: { 1462 + lexicon: 1, 1463 + id: "io.pocketenv.volume.addVolume", 1464 + defs: { 1465 + main: { 1466 + type: "procedure", 1467 + }, 1468 + }, 1469 + }, 977 1470 IoPocketenvVolumeDefs: { 978 1471 lexicon: 1, 979 1472 id: "io.pocketenv.volume.defs", 980 1473 defs: { 1474 + volumeView: { 1475 + type: "object", 1476 + properties: { 1477 + id: { 1478 + type: "string", 1479 + description: "Unique identifier of the volume.", 1480 + }, 1481 + name: { 1482 + type: "string", 1483 + description: "Name of the volume, e.g. 'data-volume', 'logs', etc.", 1484 + }, 1485 + }, 1486 + }, 981 1487 volumes: { 982 1488 type: "array", 983 1489 items: { ··· 994 1500 type: "string", 995 1501 description: "Name of the volume, e.g. 'data-volume', 'logs', etc.", 996 1502 }, 997 - path: { 998 - type: "string", 999 - description: 1000 - "The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc.", 1503 + }, 1504 + }, 1505 + }, 1506 + }, 1507 + IoPocketenvVolumeDeleteVolume: { 1508 + lexicon: 1, 1509 + id: "io.pocketenv.volume.deleteVolume", 1510 + defs: { 1511 + main: { 1512 + type: "procedure", 1513 + parameters: { 1514 + type: "params", 1515 + required: ["id"], 1516 + properties: { 1517 + id: { 1518 + type: "string", 1519 + description: "The ID of the volume to delete.", 1520 + }, 1521 + }, 1522 + }, 1523 + }, 1524 + }, 1525 + }, 1526 + IoPocketenvVolumeGetVolumes: { 1527 + lexicon: 1, 1528 + id: "io.pocketenv.volume.getVolumes", 1529 + defs: { 1530 + main: { 1531 + type: "query", 1532 + parameters: { 1533 + type: "params", 1534 + properties: { 1535 + limit: { 1536 + type: "integer", 1537 + description: "The maximum number of volumes to return.", 1538 + minimum: 1, 1539 + }, 1540 + offset: { 1541 + type: "integer", 1542 + description: 1543 + "The number of volumes to skip before starting to collect the result set.", 1544 + minimum: 0, 1545 + }, 1001 1546 }, 1002 - readOnly: { 1003 - type: "boolean", 1004 - description: "Whether the volume should be mounted as read-only", 1547 + }, 1548 + output: { 1549 + encoding: "application/json", 1550 + schema: { 1551 + type: "object", 1552 + properties: { 1553 + volumes: { 1554 + type: "array", 1555 + items: { 1556 + type: "ref", 1557 + ref: "lex:io.pocketenv.volume.defs#volumeView", 1558 + }, 1559 + }, 1560 + total: { 1561 + type: "integer", 1562 + description: "The total number of volumes available.", 1563 + minimum: 0, 1564 + }, 1565 + }, 1005 1566 }, 1006 1567 }, 1007 1568 }, ··· 1068 1629 IoPocketenvActorGetProfile: "io.pocketenv.actor.getProfile", 1069 1630 IoPocketenvActorGetTerminalToken: "io.pocketenv.actor.getTerminalToken", 1070 1631 AppBskyActorProfile: "app.bsky.actor.profile", 1632 + IoPocketenvFileAddFile: "io.pocketenv.file.addFile", 1071 1633 IoPocketenvFileDefs: "io.pocketenv.file.defs", 1634 + IoPocketenvFileDeleteFile: "io.pocketenv.file.deleteFile", 1635 + IoPocketenvFileGetFiles: "io.pocketenv.file.getFiles", 1072 1636 IoPocketenvSandboxClaimSandbox: "io.pocketenv.sandbox.claimSandbox", 1073 1637 IoPocketenvSandboxCreateSandbox: "io.pocketenv.sandbox.createSandbox", 1074 1638 IoPocketenvSandboxDefs: "io.pocketenv.sandbox.defs", 1075 1639 IoPocketenvSandboxDeleteSandbox: "io.pocketenv.sandbox.deleteSandbox", 1640 + IoPocketenvSandboxGetPreferences: "io.pocketenv.sandbox.getPreferences", 1076 1641 IoPocketenvSandboxGetSandbox: "io.pocketenv.sandbox.getSandbox", 1077 1642 IoPocketenvSandboxGetSandboxes: "io.pocketenv.sandbox.getSandboxes", 1643 + IoPocketenvSandboxPutPreferences: "io.pocketenv.sandbox.putPreferences", 1078 1644 IoPocketenvSandbox: "io.pocketenv.sandbox", 1079 1645 IoPocketenvSandboxStartSandbox: "io.pocketenv.sandbox.startSandbox", 1080 1646 IoPocketenvSandboxStopSandbox: "io.pocketenv.sandbox.stopSandbox", 1081 1647 IoPocketenvSandboxUpdateSandboxSettings: 1082 1648 "io.pocketenv.sandbox.updateSandboxSettings", 1649 + IoPocketenvSecretAddSecret: "io.pocketenv.secret.addSecret", 1083 1650 IoPocketenvSecretDefs: "io.pocketenv.secret.defs", 1651 + IoPocketenvSecretDeleteSecret: "io.pocketenv.secret.deleteSecret", 1652 + IoPocketenvSecretGetSecrets: "io.pocketenv.secret.getSecrets", 1653 + IoPocketenvVariableAddVariable: "io.pocketenv.variable.addVariable", 1084 1654 IoPocketenvVariableDefs: "io.pocketenv.variable.defs", 1655 + IoPocketenvVariableDeleteVariable: "io.pocketenv.variable.deleteVariable", 1656 + IoPocketenvVariableGetVariables: "io.pocketenv.variable.getVariables", 1657 + IoPocketenvVolumeAddVolume: "io.pocketenv.volume.addVolume", 1085 1658 IoPocketenvVolumeDefs: "io.pocketenv.volume.defs", 1659 + IoPocketenvVolumeDeleteVolume: "io.pocketenv.volume.deleteVolume", 1660 + IoPocketenvVolumeGetVolumes: "io.pocketenv.volume.getVolumes", 1086 1661 IoPocketenvPublicKey: "io.pocketenv.publicKey", 1087 1662 ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", 1088 1663 };
+40
apps/api/src/lexicon/types/io/pocketenv/file/addFile.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvFileDefs from "./defs"; 11 + 12 + export type QueryParams = {}; 13 + 14 + export interface InputSchema { 15 + file: IoPocketenvFileDefs.File; 16 + [k: string]: unknown; 17 + } 18 + 19 + export interface HandlerInput { 20 + encoding: "application/json"; 21 + body: InputSchema; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + } 28 + 29 + export type HandlerOutput = HandlerError | void; 30 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 + export type Handler<HA extends HandlerAuth = never> = ( 39 + ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+40
apps/api/src/lexicon/types/io/pocketenv/file/deleteFile.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvFileDefs from "./defs"; 11 + 12 + export type QueryParams = {}; 13 + 14 + export interface InputSchema { 15 + file: IoPocketenvFileDefs.File; 16 + [k: string]: unknown; 17 + } 18 + 19 + export interface HandlerInput { 20 + encoding: "application/json"; 21 + body: InputSchema; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + } 28 + 29 + export type HandlerOutput = HandlerError | void; 30 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 + export type Handler<HA extends HandlerAuth = never> = ( 39 + ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+52
apps/api/src/lexicon/types/io/pocketenv/file/getFiles.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvFileDefs from "./defs"; 11 + 12 + export interface QueryParams { 13 + /** The maximum number of files to return. */ 14 + limit?: number; 15 + /** The number of files to skip before starting to collect the result set. */ 16 + offset?: number; 17 + } 18 + 19 + export type InputSchema = undefined; 20 + 21 + export interface OutputSchema { 22 + files?: IoPocketenvFileDefs.FileView[]; 23 + /** The total number of files available. */ 24 + total?: number; 25 + [k: string]: unknown; 26 + } 27 + 28 + export type HandlerInput = undefined; 29 + 30 + export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 + } 35 + 36 + export interface HandlerError { 37 + status: number; 38 + message?: string; 39 + } 40 + 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 + export type Handler<HA extends HandlerAuth = never> = ( 51 + ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+130
apps/api/src/lexicon/types/io/pocketenv/sandbox/defs.ts
··· 94 94 export function validateSandboxViewDetailed(v: unknown): ValidationResult { 95 95 return lexicons.validate("io.pocketenv.sandbox.defs#sandboxViewDetailed", v); 96 96 } 97 + 98 + export interface SandboxDetailsPref { 99 + /** The name of the sandbox */ 100 + name?: string; 101 + /** A description for the sandbox */ 102 + description?: string; 103 + /** A list of topics/tags to associate with the sandbox */ 104 + topics?: string[]; 105 + /** A git repository URL to clone into the sandbox, e.g. a GitHub/Tangled repo. */ 106 + repo?: string; 107 + /** The number of virtual CPUs to allocate for the sandbox */ 108 + vcpus?: number; 109 + /** The amount of memory (in GB) to allocate for the sandbox */ 110 + memory?: number; 111 + /** The amount of disk space (in GB) to allocate for the sandbox */ 112 + disk?: number; 113 + /** A URI to a README for the sandbox. */ 114 + readme?: string; 115 + [k: string]: unknown; 116 + } 117 + 118 + export function isSandboxDetailsPref(v: unknown): v is SandboxDetailsPref { 119 + return ( 120 + isObj(v) && 121 + hasProp(v, "$type") && 122 + v.$type === "io.pocketenv.sandbox.defs#sandboxDetailsPref" 123 + ); 124 + } 125 + 126 + export function validateSandboxDetailsPref(v: unknown): ValidationResult { 127 + return lexicons.validate("io.pocketenv.sandbox.defs#sandboxDetailsPref", v); 128 + } 129 + 130 + export interface SecretPref { 131 + /** The name of the secret */ 132 + name?: string; 133 + /** The value of the secret. This will be encrypted at rest and redacted in any API responses. */ 134 + value?: string; 135 + [k: string]: unknown; 136 + } 137 + 138 + export function isSecretPref(v: unknown): v is SecretPref { 139 + return ( 140 + isObj(v) && 141 + hasProp(v, "$type") && 142 + v.$type === "io.pocketenv.sandbox.defs#secretPref" 143 + ); 144 + } 145 + 146 + export function validateSecretPref(v: unknown): ValidationResult { 147 + return lexicons.validate("io.pocketenv.sandbox.defs#secretPref", v); 148 + } 149 + 150 + /** A variable to add to the sandbox */ 151 + export interface VariablePref { 152 + /** The name of the variable */ 153 + name?: string; 154 + /** The value of the variable. This will be visible in API responses and should not contain sensitive information. */ 155 + value?: string; 156 + [k: string]: unknown; 157 + } 158 + 159 + export function isVariablePref(v: unknown): v is VariablePref { 160 + return ( 161 + isObj(v) && 162 + hasProp(v, "$type") && 163 + v.$type === "io.pocketenv.sandbox.defs#variablePref" 164 + ); 165 + } 166 + 167 + export function validateVariablePref(v: unknown): ValidationResult { 168 + return lexicons.validate("io.pocketenv.sandbox.defs#variablePref", v); 169 + } 170 + 171 + /** A file to add to the sandbox */ 172 + export interface FilePref { 173 + /** The name of the file */ 174 + name?: string; 175 + /** The content of the file. */ 176 + content?: string; 177 + /** Whether the file content should be encrypted at rest and redacted in API responses. This is useful for files that may contain sensitive information. */ 178 + encrypt?: boolean; 179 + /** The path within the sandbox where the file will be created, e.g. '/app/config.json'. If not provided, the file will be created in the root directory of the sandbox. */ 180 + path?: string; 181 + [k: string]: unknown; 182 + } 183 + 184 + export function isFilePref(v: unknown): v is FilePref { 185 + return ( 186 + isObj(v) && 187 + hasProp(v, "$type") && 188 + v.$type === "io.pocketenv.sandbox.defs#filePref" 189 + ); 190 + } 191 + 192 + export function validateFilePref(v: unknown): ValidationResult { 193 + return lexicons.validate("io.pocketenv.sandbox.defs#filePref", v); 194 + } 195 + 196 + /** A volume to add to the sandbox */ 197 + export interface VolumePref { 198 + /** The name of the volume */ 199 + name?: string; 200 + /** The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc. */ 201 + path?: string; 202 + /** Whether the volume should be mounted as read-only */ 203 + readOnly?: boolean; 204 + [k: string]: unknown; 205 + } 206 + 207 + export function isVolumePref(v: unknown): v is VolumePref { 208 + return ( 209 + isObj(v) && 210 + hasProp(v, "$type") && 211 + v.$type === "io.pocketenv.sandbox.defs#volumePref" 212 + ); 213 + } 214 + 215 + export function validateVolumePref(v: unknown): ValidationResult { 216 + return lexicons.validate("io.pocketenv.sandbox.defs#volumePref", v); 217 + } 218 + 219 + export type Preferences = ( 220 + | SandboxDetailsPref 221 + | SecretPref 222 + | VariablePref 223 + | FilePref 224 + | VolumePref 225 + | { $type: string; [k: string]: unknown } 226 + )[];
+43
apps/api/src/lexicon/types/io/pocketenv/sandbox/getPreferences.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvSandboxDefs from "./defs"; 11 + 12 + export interface QueryParams { 13 + /** The sandbox ID or URI to retrieve */ 14 + id: string; 15 + } 16 + 17 + export type InputSchema = undefined; 18 + export type OutputSchema = IoPocketenvSandboxDefs.Preferences; 19 + export type HandlerInput = undefined; 20 + 21 + export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 + } 26 + 27 + export interface HandlerError { 28 + status: number; 29 + message?: string; 30 + } 31 + 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 + export type Handler<HA extends HandlerAuth = never> = ( 42 + ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+40
apps/api/src/lexicon/types/io/pocketenv/sandbox/putPreferences.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvSandboxDefs from "./defs"; 11 + 12 + export type QueryParams = {}; 13 + 14 + export interface InputSchema { 15 + preferences: IoPocketenvSandboxDefs.Preferences; 16 + [k: string]: unknown; 17 + } 18 + 19 + export interface HandlerInput { 20 + encoding: "application/json"; 21 + body: InputSchema; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + } 28 + 29 + export type HandlerOutput = HandlerError | void; 30 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 + export type Handler<HA extends HandlerAuth = never> = ( 39 + ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+40
apps/api/src/lexicon/types/io/pocketenv/secret/addSecret.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvSecretDefs from "./defs"; 11 + 12 + export type QueryParams = {}; 13 + 14 + export interface InputSchema { 15 + secret: IoPocketenvSecretDefs.Secret; 16 + [k: string]: unknown; 17 + } 18 + 19 + export interface HandlerInput { 20 + encoding: "application/json"; 21 + body: InputSchema; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + } 28 + 29 + export type HandlerOutput = HandlerError | void; 30 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 + export type Handler<HA extends HandlerAuth = never> = ( 39 + ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+20
apps/api/src/lexicon/types/io/pocketenv/secret/defs.ts
··· 6 6 import { isObj, hasProp } from "../../../../util"; 7 7 import { CID } from "multiformats/cid"; 8 8 9 + export interface SecretView { 10 + /** Unique identifier of the secret. */ 11 + id?: string; 12 + /** Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc. */ 13 + name?: string; 14 + [k: string]: unknown; 15 + } 16 + 17 + export function isSecretView(v: unknown): v is SecretView { 18 + return ( 19 + isObj(v) && 20 + hasProp(v, "$type") && 21 + v.$type === "io.pocketenv.secret.defs#secretView" 22 + ); 23 + } 24 + 25 + export function validateSecretView(v: unknown): ValidationResult { 26 + return lexicons.validate("io.pocketenv.secret.defs#secretView", v); 27 + } 28 + 9 29 export interface Secret { 10 30 /** Name of the secret, e.g. 'DATABASE_URL', 'SSH_KEY', etc. */ 11 31 name: string;
+35
apps/api/src/lexicon/types/io/pocketenv/secret/deleteSecret.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + 11 + export interface QueryParams { 12 + /** The ID of the secret to delete */ 13 + id: string; 14 + } 15 + 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 + 19 + export interface HandlerError { 20 + status: number; 21 + message?: string; 22 + } 23 + 24 + export type HandlerOutput = HandlerError | void; 25 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 + export type Handler<HA extends HandlerAuth = never> = ( 34 + ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+52
apps/api/src/lexicon/types/io/pocketenv/secret/getSecrets.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvSecretDefs from "./defs"; 11 + 12 + export interface QueryParams { 13 + /** The maximum number of secrets to return. */ 14 + limit?: number; 15 + /** The number of secrets to skip before starting to collect the result set. */ 16 + offset?: number; 17 + } 18 + 19 + export type InputSchema = undefined; 20 + 21 + export interface OutputSchema { 22 + secrets?: IoPocketenvSecretDefs.SecretView[]; 23 + /** The total number of secrets available. */ 24 + total?: number; 25 + [k: string]: unknown; 26 + } 27 + 28 + export type HandlerInput = undefined; 29 + 30 + export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 + } 35 + 36 + export interface HandlerError { 37 + status: number; 38 + message?: string; 39 + } 40 + 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 + export type Handler<HA extends HandlerAuth = never> = ( 51 + ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+40
apps/api/src/lexicon/types/io/pocketenv/variable/addVariable.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvVariableDefs from "./defs"; 11 + 12 + export type QueryParams = {}; 13 + 14 + export interface InputSchema { 15 + variable: IoPocketenvVariableDefs.Variable; 16 + [k: string]: unknown; 17 + } 18 + 19 + export interface HandlerInput { 20 + encoding: "application/json"; 21 + body: InputSchema; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + } 28 + 29 + export type HandlerOutput = HandlerError | void; 30 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 + export type Handler<HA extends HandlerAuth = never> = ( 39 + ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+22
apps/api/src/lexicon/types/io/pocketenv/variable/defs.ts
··· 6 6 import { isObj, hasProp } from "../../../../util"; 7 7 import { CID } from "multiformats/cid"; 8 8 9 + export interface VariableView { 10 + /** Unique identifier of the environment variable. */ 11 + id?: string; 12 + /** Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc. */ 13 + name?: string; 14 + /** Value of the environment variable. This will be visible in API responses and should not contain sensitive information. */ 15 + value?: string; 16 + [k: string]: unknown; 17 + } 18 + 19 + export function isVariableView(v: unknown): v is VariableView { 20 + return ( 21 + isObj(v) && 22 + hasProp(v, "$type") && 23 + v.$type === "io.pocketenv.variable.defs#variableView" 24 + ); 25 + } 26 + 27 + export function validateVariableView(v: unknown): ValidationResult { 28 + return lexicons.validate("io.pocketenv.variable.defs#variableView", v); 29 + } 30 + 9 31 export interface Variable { 10 32 /** Name of the environment variable, e.g. 'NODE_ENV', 'PORT', etc. */ 11 33 name: string;
+35
apps/api/src/lexicon/types/io/pocketenv/variable/deleteVariable.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + 11 + export interface QueryParams { 12 + /** The ID of the environment variable to delete */ 13 + id: string; 14 + } 15 + 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 + 19 + export interface HandlerError { 20 + status: number; 21 + message?: string; 22 + } 23 + 24 + export type HandlerOutput = HandlerError | void; 25 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 + export type Handler<HA extends HandlerAuth = never> = ( 34 + ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+52
apps/api/src/lexicon/types/io/pocketenv/variable/getVariables.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvVariableDefs from "./defs"; 11 + 12 + export interface QueryParams { 13 + /** The maximum number of variables to return. */ 14 + limit?: number; 15 + /** The number of variables to skip before starting to collect the result set. */ 16 + offset?: number; 17 + } 18 + 19 + export type InputSchema = undefined; 20 + 21 + export interface OutputSchema { 22 + variables?: IoPocketenvVariableDefs.VariableView[]; 23 + /** The total number of variables available. */ 24 + total?: number; 25 + [k: string]: unknown; 26 + } 27 + 28 + export type HandlerInput = undefined; 29 + 30 + export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 + } 35 + 36 + export interface HandlerError { 37 + status: number; 38 + message?: string; 39 + } 40 + 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 + export type Handler<HA extends HandlerAuth = never> = ( 51 + ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+32
apps/api/src/lexicon/types/io/pocketenv/volume/addVolume.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + 11 + export type QueryParams = {}; 12 + 13 + export type InputSchema = undefined; 14 + export type HandlerInput = undefined; 15 + 16 + export interface HandlerError { 17 + status: number; 18 + message?: string; 19 + } 20 + 21 + export type HandlerOutput = HandlerError | void; 22 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 + auth: HA; 24 + params: QueryParams; 25 + input: HandlerInput; 26 + req: express.Request; 27 + res: express.Response; 28 + resetRouteRateLimits: () => Promise<void>; 29 + }; 30 + export type Handler<HA extends HandlerAuth = never> = ( 31 + ctx: HandlerReqCtx<HA>, 32 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -4
apps/api/src/lexicon/types/io/pocketenv/volume/defs.ts
··· 6 6 import { isObj, hasProp } from "../../../../util"; 7 7 import { CID } from "multiformats/cid"; 8 8 9 + export interface VolumeView { 10 + /** Unique identifier of the volume. */ 11 + id?: string; 12 + /** Name of the volume, e.g. 'data-volume', 'logs', etc. */ 13 + name?: string; 14 + [k: string]: unknown; 15 + } 16 + 17 + export function isVolumeView(v: unknown): v is VolumeView { 18 + return ( 19 + isObj(v) && 20 + hasProp(v, "$type") && 21 + v.$type === "io.pocketenv.volume.defs#volumeView" 22 + ); 23 + } 24 + 25 + export function validateVolumeView(v: unknown): ValidationResult { 26 + return lexicons.validate("io.pocketenv.volume.defs#volumeView", v); 27 + } 28 + 9 29 export type Volumes = Volume[]; 10 30 11 31 export interface Volume { 12 32 /** Name of the volume, e.g. 'data-volume', 'logs', etc. */ 13 33 name: string; 14 - /** The mount path within the sandbox where the volume will be attached, e.g. '/data', '/logs', etc. */ 15 - path?: string; 16 - /** Whether the volume should be mounted as read-only */ 17 - readOnly?: boolean; 18 34 [k: string]: unknown; 19 35 } 20 36
+35
apps/api/src/lexicon/types/io/pocketenv/volume/deleteVolume.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + 11 + export interface QueryParams { 12 + /** The ID of the volume to delete. */ 13 + id: string; 14 + } 15 + 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 + 19 + export interface HandlerError { 20 + status: number; 21 + message?: string; 22 + } 23 + 24 + export type HandlerOutput = HandlerError | void; 25 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 + export type Handler<HA extends HandlerAuth = never> = ( 34 + ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+52
apps/api/src/lexicon/types/io/pocketenv/volume/getVolumes.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import type * as IoPocketenvVolumeDefs from "./defs"; 11 + 12 + export interface QueryParams { 13 + /** The maximum number of volumes to return. */ 14 + limit?: number; 15 + /** The number of volumes to skip before starting to collect the result set. */ 16 + offset?: number; 17 + } 18 + 19 + export type InputSchema = undefined; 20 + 21 + export interface OutputSchema { 22 + volumes?: IoPocketenvVolumeDefs.VolumeView[]; 23 + /** The total number of volumes available. */ 24 + total?: number; 25 + [k: string]: unknown; 26 + } 27 + 28 + export type HandlerInput = undefined; 29 + 30 + export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 + } 35 + 36 + export interface HandlerError { 37 + status: number; 38 + message?: string; 39 + } 40 + 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 + export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 + export type Handler<HA extends HandlerAuth = never> = ( 51 + ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+18
apps/api/src/xrpc/index.ts
··· 10 10 import getProfile from "./io/pocketenv/actor/getProfile"; 11 11 import getActorSandboxes from "./io/pocketenv/actor/getActorSandboxes"; 12 12 import getTerminalToken from "./io/pocketenv/actor/getTerminalToken"; 13 + import addFile from "./io/pocketenv/file/addFile"; 14 + import deleteFile from "./io/pocketenv/file/deleteFile"; 15 + import getFiles from "./io/pocketenv/file/getFiles"; 16 + import addSecret from "./io/pocketenv/secret/addSecret"; 17 + import deleteSecret from "./io/pocketenv/secret/deleteSecret"; 18 + import getSecrets from "./io/pocketenv/secret/getSecrets"; 19 + import addVolume from "./io/pocketenv/volume/addVolume"; 20 + import deleteVolume from "./io/pocketenv/volume/deleteVolume"; 21 + import getVolumes from "./io/pocketenv/volume/getVolumes"; 13 22 14 23 export default function (server: Server, ctx: Context) { 15 24 // io.pocketenv ··· 23 32 claimSandbox(server, ctx); 24 33 getProfile(server, ctx); 25 34 getTerminalToken(server, ctx); 35 + addFile(server, ctx); 36 + deleteFile(server, ctx); 37 + getFiles(server, ctx); 38 + addSecret(server, ctx); 39 + deleteSecret(server, ctx); 40 + getSecrets(server, ctx); 41 + addVolume(server, ctx); 42 + deleteVolume(server, ctx); 43 + getVolumes(server, ctx); 26 44 27 45 return server; 28 46 }
+16
apps/api/src/xrpc/io/pocketenv/file/addFile.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/file/addFile"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const addFile = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.file.addFile({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await addFile(input, auth); 14 + }, 15 + }); 16 + }
+16
apps/api/src/xrpc/io/pocketenv/file/deleteFile.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/file/deleteFile"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const deleteFile = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.file.deleteFile({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await deleteFile(input, auth); 14 + }, 15 + }); 16 + }
+20
apps/api/src/xrpc/io/pocketenv/file/getFiles.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/file/getFiles"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const getFiles = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.file.getFiles({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + const result = await getFiles(params, auth); 14 + return { 15 + encoding: "application/json", 16 + body: result, 17 + }; 18 + }, 19 + }); 20 + }
+20
apps/api/src/xrpc/io/pocketenv/sandbox/getPreferences.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/sandbox/getPreferences"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const getPreferences = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.sandbox.getPreferences({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + const result = await getPreferences(params, auth); 14 + return { 15 + encoding: "application/json", 16 + body: result as any, // TODO: Implement getPreferences 17 + }; 18 + }, 19 + }); 20 + }
+16
apps/api/src/xrpc/io/pocketenv/sandbox/putPreferences.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/sandbox/putPreferences"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const putPreferences = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.sandbox.putPreferences({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await putPreferences(input, auth); 14 + }, 15 + }); 16 + }
-23
apps/api/src/xrpc/io/pocketenv/sandbox/updateSandboxSettings.ts
··· 1 - import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 - import type { Context } from "context"; 3 - import type { Server } from "lexicon"; 4 - import type { HandlerInput } from "lexicon/types/io/pocketenv/sandbox/updateSandboxSettings"; 5 - 6 - export default function (server: Server, ctx: Context) { 7 - const updateSandboxSettings = async ( 8 - input: HandlerInput, 9 - auth: HandlerAuth, 10 - ) => { 11 - return {}; 12 - }; 13 - server.io.pocketenv.sandbox.updateSandboxSettings({ 14 - auth: ctx.authVerifier, 15 - handler: async ({ input, auth }) => { 16 - const result = await updateSandboxSettings(input, auth); 17 - return { 18 - encoding: "application/json", 19 - body: result, 20 - }; 21 - }, 22 - }); 23 - }
+16
apps/api/src/xrpc/io/pocketenv/secret/addSecret.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/secret/addSecret"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const addSecret = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.secret.addSecret({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await addSecret(input, auth); 14 + }, 15 + }); 16 + }
+16
apps/api/src/xrpc/io/pocketenv/secret/deleteSecret.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/secret/deleteSecret"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const deleteSecret = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.secret.deleteSecret({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + await deleteSecret(params, auth); 14 + }, 15 + }); 16 + }
+20
apps/api/src/xrpc/io/pocketenv/secret/getSecrets.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/secret/getSecrets"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const getSecrets = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.secret.getSecrets({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + const result = await getSecrets(params, auth); 14 + return { 15 + encoding: "application/json", 16 + body: result as any, // TODO: Implement getSecrets 17 + }; 18 + }, 19 + }); 20 + }
+16
apps/api/src/xrpc/io/pocketenv/variable/addVariable.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/variable/addVariable"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const addVariable = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.variable.addVariable({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await addVariable(input, auth); 14 + }, 15 + }); 16 + }
+16
apps/api/src/xrpc/io/pocketenv/variable/deleteVariable.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/variable/deleteVariable"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const deleteVariable = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.variable.deleteVariable({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + await deleteVariable(params, auth); 14 + }, 15 + }); 16 + }
+17
apps/api/src/xrpc/io/pocketenv/variable/getVariables.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/variable/getVariables"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const getVariables = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.variable.getVariables({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + const result = await getVariables(params, auth); 14 + return result as any; // TODO: Implement getVariables handler 15 + }, 16 + }); 17 + }
+16
apps/api/src/xrpc/io/pocketenv/volume/addVolume.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { HandlerInput } from "lexicon/types/io/pocketenv/volume/addVolume"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const addVolume = async (input: HandlerInput, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.volume.addVolume({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ input, auth }) => { 13 + await addVolume(input, auth); 14 + }, 15 + }); 16 + }
+16
apps/api/src/xrpc/io/pocketenv/volume/deleteVolume.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/volume/deleteVolume"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const deleteVolume = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.volume.deleteVolume({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + await deleteVolume(params, auth); 14 + }, 15 + }); 16 + }
+17
apps/api/src/xrpc/io/pocketenv/volume/getVolumes.ts
··· 1 + import { XRPCError, type HandlerAuth } from "@atproto/xrpc-server"; 2 + import type { Context } from "context"; 3 + import type { Server } from "lexicon"; 4 + import type { QueryParams } from "lexicon/types/io/pocketenv/volume/getVolumes"; 5 + 6 + export default function (server: Server, ctx: Context) { 7 + const getVolumes = async (params: QueryParams, auth: HandlerAuth) => { 8 + return {}; 9 + }; 10 + server.io.pocketenv.volume.getVolumes({ 11 + auth: ctx.authVerifier, 12 + handler: async ({ params, auth }) => { 13 + const result = await getVolumes(params, auth); 14 + return result as any; // TODO: Implement getVolumes handler 15 + }, 16 + }); 17 + }