@copass/core
Advanced tools
+48
-4
@@ -59,2 +59,3 @@ "use strict"; | ||
| RetryConfigSchema: () => RetryConfigSchema, | ||
| SandboxConnectionsResource: () => SandboxConnectionsResource, | ||
| SandboxesResource: () => SandboxesResource, | ||
@@ -791,2 +792,41 @@ ScoreThresholdsSchema: () => ScoreThresholdsSchema, | ||
| // src/resources/sandbox-connections.ts | ||
| var BASE2 = "/api/v1/storage/sandboxes"; | ||
| var SandboxConnectionsResource = class extends BaseResource { | ||
| /** Grant a connection on a sandbox you own. Owner-only. */ | ||
| async create(sandboxId, request) { | ||
| return this.post( | ||
| `${BASE2}/${sandboxId}/connections`, | ||
| request | ||
| ); | ||
| } | ||
| /** List all grants on a sandbox you own. Owner-only. */ | ||
| async list(sandboxId, options = {}) { | ||
| return this.get(`${BASE2}/${sandboxId}/connections`, { | ||
| query: { | ||
| include_revoked: options.include_revoked ? "true" : void 0 | ||
| } | ||
| }); | ||
| } | ||
| /** | ||
| * Revoke (soft-delete) a grant. Cascades to API keys bound to this | ||
| * connection so no key outlives its grant. | ||
| */ | ||
| async revoke(sandboxId, connectionId) { | ||
| return this.delete( | ||
| `${BASE2}/${sandboxId}/connections/${connectionId}` | ||
| ); | ||
| } | ||
| /** | ||
| * Spawn a connection-scoped API key for an existing grant. The | ||
| * plaintext key is returned **exactly once** — persist it | ||
| * immediately or rotate. | ||
| */ | ||
| async spawnApiKey(sandboxId, connectionId) { | ||
| return this.post( | ||
| `${BASE2}/${sandboxId}/connections/${connectionId}/api-keys` | ||
| ); | ||
| } | ||
| }; | ||
| // src/resources/sources.ts | ||
@@ -972,5 +1012,5 @@ var base2 = (sandboxId) => `/api/v1/storage/sandboxes/${sandboxId}/sources`; | ||
| // src/resources/agents.ts | ||
| var BASE2 = "/api/v1/storage/sandboxes"; | ||
| var BASE3 = "/api/v1/storage/sandboxes"; | ||
| function agentsBase(sandboxId) { | ||
| return `${BASE2}/${sandboxId}/agents`; | ||
| return `${BASE3}/${sandboxId}/agents`; | ||
| } | ||
@@ -1164,5 +1204,5 @@ var AgentTriggersResource = class extends BaseResource { | ||
| // src/resources/concierge.ts | ||
| var BASE3 = "/api/v1/storage/sandboxes"; | ||
| var BASE4 = "/api/v1/storage/sandboxes"; | ||
| function conciergeBase(sandboxId) { | ||
| return `${BASE3}/${sandboxId}/concierge`; | ||
| return `${BASE4}/${sandboxId}/concierge`; | ||
| } | ||
@@ -1348,2 +1388,4 @@ var ConciergeResource = class extends BaseResource { | ||
| sandboxes; | ||
| /** Cross-user sandbox grants — invite teammates into a sandbox you own. */ | ||
| sandboxConnections; | ||
| sources; | ||
@@ -1379,2 +1421,3 @@ projects; | ||
| this.sandboxes = new SandboxesResource(http); | ||
| this.sandboxConnections = new SandboxConnectionsResource(http); | ||
| this.sources = new SourcesResource(http); | ||
@@ -1687,2 +1730,3 @@ this.projects = new ProjectsResource(http); | ||
| RetryConfigSchema, | ||
| SandboxConnectionsResource, | ||
| SandboxesResource, | ||
@@ -1689,0 +1733,0 @@ ScoreThresholdsSchema, |
+47
-4
@@ -704,2 +704,41 @@ // src/auth/api-key.ts | ||
| // src/resources/sandbox-connections.ts | ||
| var BASE2 = "/api/v1/storage/sandboxes"; | ||
| var SandboxConnectionsResource = class extends BaseResource { | ||
| /** Grant a connection on a sandbox you own. Owner-only. */ | ||
| async create(sandboxId, request) { | ||
| return this.post( | ||
| `${BASE2}/${sandboxId}/connections`, | ||
| request | ||
| ); | ||
| } | ||
| /** List all grants on a sandbox you own. Owner-only. */ | ||
| async list(sandboxId, options = {}) { | ||
| return this.get(`${BASE2}/${sandboxId}/connections`, { | ||
| query: { | ||
| include_revoked: options.include_revoked ? "true" : void 0 | ||
| } | ||
| }); | ||
| } | ||
| /** | ||
| * Revoke (soft-delete) a grant. Cascades to API keys bound to this | ||
| * connection so no key outlives its grant. | ||
| */ | ||
| async revoke(sandboxId, connectionId) { | ||
| return this.delete( | ||
| `${BASE2}/${sandboxId}/connections/${connectionId}` | ||
| ); | ||
| } | ||
| /** | ||
| * Spawn a connection-scoped API key for an existing grant. The | ||
| * plaintext key is returned **exactly once** — persist it | ||
| * immediately or rotate. | ||
| */ | ||
| async spawnApiKey(sandboxId, connectionId) { | ||
| return this.post( | ||
| `${BASE2}/${sandboxId}/connections/${connectionId}/api-keys` | ||
| ); | ||
| } | ||
| }; | ||
| // src/resources/sources.ts | ||
@@ -885,5 +924,5 @@ var base2 = (sandboxId) => `/api/v1/storage/sandboxes/${sandboxId}/sources`; | ||
| // src/resources/agents.ts | ||
| var BASE2 = "/api/v1/storage/sandboxes"; | ||
| var BASE3 = "/api/v1/storage/sandboxes"; | ||
| function agentsBase(sandboxId) { | ||
| return `${BASE2}/${sandboxId}/agents`; | ||
| return `${BASE3}/${sandboxId}/agents`; | ||
| } | ||
@@ -1077,5 +1116,5 @@ var AgentTriggersResource = class extends BaseResource { | ||
| // src/resources/concierge.ts | ||
| var BASE3 = "/api/v1/storage/sandboxes"; | ||
| var BASE4 = "/api/v1/storage/sandboxes"; | ||
| function conciergeBase(sandboxId) { | ||
| return `${BASE3}/${sandboxId}/concierge`; | ||
| return `${BASE4}/${sandboxId}/concierge`; | ||
| } | ||
@@ -1261,2 +1300,4 @@ var ConciergeResource = class extends BaseResource { | ||
| sandboxes; | ||
| /** Cross-user sandbox grants — invite teammates into a sandbox you own. */ | ||
| sandboxConnections; | ||
| sources; | ||
@@ -1292,2 +1333,3 @@ projects; | ||
| this.sandboxes = new SandboxesResource(http); | ||
| this.sandboxConnections = new SandboxConnectionsResource(http); | ||
| this.sources = new SourcesResource(http); | ||
@@ -1599,2 +1641,3 @@ this.projects = new ProjectsResource(http); | ||
| RetryConfigSchema, | ||
| SandboxConnectionsResource, | ||
| SandboxesResource, | ||
@@ -1601,0 +1644,0 @@ ScoreThresholdsSchema, |
+2
-2
| { | ||
| "name": "@copass/core", | ||
| "version": "0.3.3", | ||
| "version": "0.3.4", | ||
| "description": "Core client SDK for the Copass platform", | ||
@@ -64,3 +64,3 @@ "publishConfig": { | ||
| }, | ||
| "gitHead": "95d36e21da93ab35e112fab4dacc4134ed8b488c" | ||
| "gitHead": "92119a24bccb8c4cff350e495ba58404a57a9665" | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
553621
3.46%5547
3.51%