@lizard-build/sdk 0.1.62 → 0.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -124,6 +124,10 @@ declare class AddonsAPI {
124
124
  pause(projectId: string, addonId: string): Promise<PauseState>;
125
125
  /** Resume a paused database: same host, port, password and data. */
126
126
  resume(projectId: string, addonId: string): Promise<PauseState>;
127
+ /** Serverless setting of a database (Postgres, Redis). */
128
+ getSleep(projectId: string, addonId: string): Promise<SleepSetting>;
129
+ /** Make a database serverless (sleep when idle, wake on the next connection) or always on. */
130
+ setSleep(projectId: string, addonId: string, opts: SleepOpts): Promise<SleepSetting>;
127
131
  rename(projectId: string, addonId: string, name: string): Promise<unknown>;
128
132
  secrets(projectId: string, addonId: string): Promise<Array<{
129
133
  key: string;
@@ -157,6 +161,26 @@ interface PauseResult {
157
161
  reason: string;
158
162
  }>;
159
163
  }
164
+ /**
165
+ * Serverless ("sleep when idle"): after `idleMinutes` with no traffic the service sleeps with
166
+ * its memory saved, and the next request or connection wakes it in about a second.
167
+ */
168
+ interface SleepSetting {
169
+ enabled: boolean;
170
+ idleMinutes: number;
171
+ lastSleptAt: number | null;
172
+ lastWokeAt: number | null;
173
+ lastError: string | null;
174
+ sleeps: number;
175
+ wakes: number;
176
+ /** On a change: whether the service restarted to apply it. */
177
+ restarted?: boolean;
178
+ }
179
+ /** Turn serverless on (`idleMinutes` 5-1440, default 15) or off. */
180
+ interface SleepOpts {
181
+ enabled: boolean;
182
+ idleMinutes?: number;
183
+ }
160
184
  /** What pausing or resuming one service answers. */
161
185
  interface PauseState {
162
186
  ok: boolean;
@@ -363,6 +387,13 @@ declare class ServicesAPI {
363
387
  pause(id: string): Promise<PauseState>;
364
388
  /** Resume a paused service: it starts again from the same image, with its data. */
365
389
  resume(id: string): Promise<PauseState>;
390
+ /** Serverless setting of a service: whether it sleeps when idle, and how often it did. */
391
+ getSleep(id: string): Promise<SleepSetting>;
392
+ /**
393
+ * Make a service serverless (sleep when idle, wake in about a second on the next request) or
394
+ * always on. Turning it on restarts it once. Needs one replica and a port.
395
+ */
396
+ setSleep(id: string, opts: SleepOpts): Promise<SleepSetting>;
366
397
  /** Scale a service. */
367
398
  scale(id: string, opts: ScaleOpts): Promise<void>;
368
399
  /**
@@ -1434,6 +1465,25 @@ interface Workspace {
1434
1465
  plan?: string;
1435
1466
  createdAt?: number | string;
1436
1467
  }
1468
+ /**
1469
+ * Resale prices: each resource's price as a multiple of Lizard's (1-100). API keys scoped
1470
+ * to the workspace see prices and costs multiplied by these; the owner's bill does not change.
1471
+ */
1472
+ interface ResaleMultipliers {
1473
+ cpu: number;
1474
+ memory: number;
1475
+ /** Volumes. */
1476
+ storage: number;
1477
+ egress: number;
1478
+ objectStorage: number;
1479
+ /** Sized sandboxes' flat price. */
1480
+ sandbox: number;
1481
+ }
1482
+ interface ResalePricing {
1483
+ /** False when every multiplier is 1: scoped keys see Lizard's prices. */
1484
+ enabled: boolean;
1485
+ multipliers: ResaleMultipliers;
1486
+ }
1437
1487
  interface CreateWorkspaceOpts {
1438
1488
  name: string;
1439
1489
  }
@@ -1479,6 +1529,26 @@ declare class WorkspacesAPI {
1479
1529
  pause(id: string): Promise<PauseResult>;
1480
1530
  /** Resume what was paused in a workspace (owner only; not what a billing freeze paused). */
1481
1531
  resume(id: string): Promise<PauseResult>;
1532
+ /**
1533
+ * The workspace's resale prices (owner only, key with no scopes).
1534
+ *
1535
+ * A scoped key gets HTTP 403 with `code: 'ACCOUNT_SCOPE_REQUIRED'`: the keys that see these
1536
+ * prices can neither read nor change them.
1537
+ */
1538
+ getResalePricing(id: string): Promise<ResalePricing>;
1539
+ /**
1540
+ * Set the workspace's resale prices (owner only, key with no scopes). Replaces them all:
1541
+ * a resource left out is 1. Every API key scoped to the workspace, or to one of its
1542
+ * projects, then sees each price and cost multiplied (sandbox `pricePerHour`, `metrics`
1543
+ * costs, billing summaries). Display only: what Lizard bills you is unchanged.
1544
+ *
1545
+ * ```ts
1546
+ * await lizard.workspaces.setResalePricing(ws.id, { cpu: 4, memory: 4, sandbox: 4 })
1547
+ * ```
1548
+ */
1549
+ setResalePricing(id: string, multipliers: Partial<ResaleMultipliers>): Promise<ResalePricing>;
1550
+ /** Turn resale prices off: scoped keys see Lizard's prices again (owner only). */
1551
+ clearResalePricing(id: string): Promise<ResalePricing>;
1482
1552
  /**
1483
1553
  * Delete a workspace.
1484
1554
  *
@@ -2313,4 +2383,4 @@ declare class LizardCLI {
2313
2383
  }): Promise<CLIResult>;
2314
2384
  }
2315
2385
 
2316
- export { type Account, type Addon, type AddonType, AddonsAPI, type ApiKey, type ApiKeyScope, ApiKeysAPI, AuthenticationError, type Balance, BillingAPI, type CLIOptions, type CLIResult, type CheckoutSession, type ClickOpts, type CodeContext, CodeSandbox, ConfigApplyError, type ConfigResult, ConflictError, type ConnectionOpts, type CostMetrics, type CreateAddonOpts, type CreateApiKeyOpts, type CreateContextOpts, type CreateProjectOpts, type CreateServiceOpts, type CreateVolumeOpts, type CreateWorkspaceOpts, type CreatedApiKey, type DeployEvent, DeployHandle, Desktop, type DesktopInfo, type DesktopStartOpts, type DomainInfo, type DomainStatus, DomainsAPI, Execution, ExecutionError, type ExposedPort, type FileInfo, type ForkResult, type FsEvent, type FsOpts, GitHubAPI, type ListTransactionsOpts, Lizard, LizardCLI, LizardError, type LizardOpts, type LogLine, type MetricPoint, type MetricRange, MetricsAPI, type MouseButton, NotFoundError, PaymentRequiredError, type Plan, PlatformClient, type ProcessInfo, type ProcessOpts, type ProcessResult, type ProcessSignal, type Project, type ProjectConfig, type ProjectCost, ProjectsAPI, type PromoRedemption, type RawMetrics, type Region, RegionsAPI, type RunCodeLanguage, type RunCodeOpts, Sandbox, type SandboxInfo, type SandboxOpts, type SandboxSnapshot, type ScaleOpts, type ScrollDirection, type Secret, SecretsAPI, type Service, type ServiceMetrics, type ServiceUpdate, ServicesAPI, type SetSecretOpts, type SnapshotOpts, type SnapshotScope, type SnapshotWaitOpts, type StartCheckoutOpts, type StartProNowResult, StorageAPI, type StreamEvent, type Subscription, type SubscriptionStatus, TimeoutError, type Transaction, type TransactionPage, Volume, type VolumeInfo, type Workspace, WorkspacesAPI, resolveProjectId };
2386
+ export { type Account, type Addon, type AddonType, AddonsAPI, type ApiKey, type ApiKeyScope, ApiKeysAPI, AuthenticationError, type Balance, BillingAPI, type CLIOptions, type CLIResult, type CheckoutSession, type ClickOpts, type CodeContext, CodeSandbox, ConfigApplyError, type ConfigResult, ConflictError, type ConnectionOpts, type CostMetrics, type CreateAddonOpts, type CreateApiKeyOpts, type CreateContextOpts, type CreateProjectOpts, type CreateServiceOpts, type CreateVolumeOpts, type CreateWorkspaceOpts, type CreatedApiKey, type DeployEvent, DeployHandle, Desktop, type DesktopInfo, type DesktopStartOpts, type DomainInfo, type DomainStatus, DomainsAPI, Execution, ExecutionError, type ExposedPort, type FileInfo, type ForkResult, type FsEvent, type FsOpts, GitHubAPI, type ListTransactionsOpts, Lizard, LizardCLI, LizardError, type LizardOpts, type LogLine, type MetricPoint, type MetricRange, MetricsAPI, type MouseButton, NotFoundError, PaymentRequiredError, type Plan, PlatformClient, type ProcessInfo, type ProcessOpts, type ProcessResult, type ProcessSignal, type Project, type ProjectConfig, type ProjectCost, ProjectsAPI, type PromoRedemption, type RawMetrics, type Region, RegionsAPI, type ResaleMultipliers, type ResalePricing, type RunCodeLanguage, type RunCodeOpts, Sandbox, type SandboxInfo, type SandboxOpts, type SandboxSnapshot, type ScaleOpts, type ScrollDirection, type Secret, SecretsAPI, type Service, type ServiceMetrics, type ServiceUpdate, ServicesAPI, type SetSecretOpts, type SnapshotOpts, type SnapshotScope, type SnapshotWaitOpts, type StartCheckoutOpts, type StartProNowResult, StorageAPI, type StreamEvent, type Subscription, type SubscriptionStatus, TimeoutError, type Transaction, type TransactionPage, Volume, type VolumeInfo, type Workspace, WorkspacesAPI, resolveProjectId };
package/dist/index.d.ts CHANGED
@@ -124,6 +124,10 @@ declare class AddonsAPI {
124
124
  pause(projectId: string, addonId: string): Promise<PauseState>;
125
125
  /** Resume a paused database: same host, port, password and data. */
126
126
  resume(projectId: string, addonId: string): Promise<PauseState>;
127
+ /** Serverless setting of a database (Postgres, Redis). */
128
+ getSleep(projectId: string, addonId: string): Promise<SleepSetting>;
129
+ /** Make a database serverless (sleep when idle, wake on the next connection) or always on. */
130
+ setSleep(projectId: string, addonId: string, opts: SleepOpts): Promise<SleepSetting>;
127
131
  rename(projectId: string, addonId: string, name: string): Promise<unknown>;
128
132
  secrets(projectId: string, addonId: string): Promise<Array<{
129
133
  key: string;
@@ -157,6 +161,26 @@ interface PauseResult {
157
161
  reason: string;
158
162
  }>;
159
163
  }
164
+ /**
165
+ * Serverless ("sleep when idle"): after `idleMinutes` with no traffic the service sleeps with
166
+ * its memory saved, and the next request or connection wakes it in about a second.
167
+ */
168
+ interface SleepSetting {
169
+ enabled: boolean;
170
+ idleMinutes: number;
171
+ lastSleptAt: number | null;
172
+ lastWokeAt: number | null;
173
+ lastError: string | null;
174
+ sleeps: number;
175
+ wakes: number;
176
+ /** On a change: whether the service restarted to apply it. */
177
+ restarted?: boolean;
178
+ }
179
+ /** Turn serverless on (`idleMinutes` 5-1440, default 15) or off. */
180
+ interface SleepOpts {
181
+ enabled: boolean;
182
+ idleMinutes?: number;
183
+ }
160
184
  /** What pausing or resuming one service answers. */
161
185
  interface PauseState {
162
186
  ok: boolean;
@@ -363,6 +387,13 @@ declare class ServicesAPI {
363
387
  pause(id: string): Promise<PauseState>;
364
388
  /** Resume a paused service: it starts again from the same image, with its data. */
365
389
  resume(id: string): Promise<PauseState>;
390
+ /** Serverless setting of a service: whether it sleeps when idle, and how often it did. */
391
+ getSleep(id: string): Promise<SleepSetting>;
392
+ /**
393
+ * Make a service serverless (sleep when idle, wake in about a second on the next request) or
394
+ * always on. Turning it on restarts it once. Needs one replica and a port.
395
+ */
396
+ setSleep(id: string, opts: SleepOpts): Promise<SleepSetting>;
366
397
  /** Scale a service. */
367
398
  scale(id: string, opts: ScaleOpts): Promise<void>;
368
399
  /**
@@ -1434,6 +1465,25 @@ interface Workspace {
1434
1465
  plan?: string;
1435
1466
  createdAt?: number | string;
1436
1467
  }
1468
+ /**
1469
+ * Resale prices: each resource's price as a multiple of Lizard's (1-100). API keys scoped
1470
+ * to the workspace see prices and costs multiplied by these; the owner's bill does not change.
1471
+ */
1472
+ interface ResaleMultipliers {
1473
+ cpu: number;
1474
+ memory: number;
1475
+ /** Volumes. */
1476
+ storage: number;
1477
+ egress: number;
1478
+ objectStorage: number;
1479
+ /** Sized sandboxes' flat price. */
1480
+ sandbox: number;
1481
+ }
1482
+ interface ResalePricing {
1483
+ /** False when every multiplier is 1: scoped keys see Lizard's prices. */
1484
+ enabled: boolean;
1485
+ multipliers: ResaleMultipliers;
1486
+ }
1437
1487
  interface CreateWorkspaceOpts {
1438
1488
  name: string;
1439
1489
  }
@@ -1479,6 +1529,26 @@ declare class WorkspacesAPI {
1479
1529
  pause(id: string): Promise<PauseResult>;
1480
1530
  /** Resume what was paused in a workspace (owner only; not what a billing freeze paused). */
1481
1531
  resume(id: string): Promise<PauseResult>;
1532
+ /**
1533
+ * The workspace's resale prices (owner only, key with no scopes).
1534
+ *
1535
+ * A scoped key gets HTTP 403 with `code: 'ACCOUNT_SCOPE_REQUIRED'`: the keys that see these
1536
+ * prices can neither read nor change them.
1537
+ */
1538
+ getResalePricing(id: string): Promise<ResalePricing>;
1539
+ /**
1540
+ * Set the workspace's resale prices (owner only, key with no scopes). Replaces them all:
1541
+ * a resource left out is 1. Every API key scoped to the workspace, or to one of its
1542
+ * projects, then sees each price and cost multiplied (sandbox `pricePerHour`, `metrics`
1543
+ * costs, billing summaries). Display only: what Lizard bills you is unchanged.
1544
+ *
1545
+ * ```ts
1546
+ * await lizard.workspaces.setResalePricing(ws.id, { cpu: 4, memory: 4, sandbox: 4 })
1547
+ * ```
1548
+ */
1549
+ setResalePricing(id: string, multipliers: Partial<ResaleMultipliers>): Promise<ResalePricing>;
1550
+ /** Turn resale prices off: scoped keys see Lizard's prices again (owner only). */
1551
+ clearResalePricing(id: string): Promise<ResalePricing>;
1482
1552
  /**
1483
1553
  * Delete a workspace.
1484
1554
  *
@@ -2313,4 +2383,4 @@ declare class LizardCLI {
2313
2383
  }): Promise<CLIResult>;
2314
2384
  }
2315
2385
 
2316
- export { type Account, type Addon, type AddonType, AddonsAPI, type ApiKey, type ApiKeyScope, ApiKeysAPI, AuthenticationError, type Balance, BillingAPI, type CLIOptions, type CLIResult, type CheckoutSession, type ClickOpts, type CodeContext, CodeSandbox, ConfigApplyError, type ConfigResult, ConflictError, type ConnectionOpts, type CostMetrics, type CreateAddonOpts, type CreateApiKeyOpts, type CreateContextOpts, type CreateProjectOpts, type CreateServiceOpts, type CreateVolumeOpts, type CreateWorkspaceOpts, type CreatedApiKey, type DeployEvent, DeployHandle, Desktop, type DesktopInfo, type DesktopStartOpts, type DomainInfo, type DomainStatus, DomainsAPI, Execution, ExecutionError, type ExposedPort, type FileInfo, type ForkResult, type FsEvent, type FsOpts, GitHubAPI, type ListTransactionsOpts, Lizard, LizardCLI, LizardError, type LizardOpts, type LogLine, type MetricPoint, type MetricRange, MetricsAPI, type MouseButton, NotFoundError, PaymentRequiredError, type Plan, PlatformClient, type ProcessInfo, type ProcessOpts, type ProcessResult, type ProcessSignal, type Project, type ProjectConfig, type ProjectCost, ProjectsAPI, type PromoRedemption, type RawMetrics, type Region, RegionsAPI, type RunCodeLanguage, type RunCodeOpts, Sandbox, type SandboxInfo, type SandboxOpts, type SandboxSnapshot, type ScaleOpts, type ScrollDirection, type Secret, SecretsAPI, type Service, type ServiceMetrics, type ServiceUpdate, ServicesAPI, type SetSecretOpts, type SnapshotOpts, type SnapshotScope, type SnapshotWaitOpts, type StartCheckoutOpts, type StartProNowResult, StorageAPI, type StreamEvent, type Subscription, type SubscriptionStatus, TimeoutError, type Transaction, type TransactionPage, Volume, type VolumeInfo, type Workspace, WorkspacesAPI, resolveProjectId };
2386
+ export { type Account, type Addon, type AddonType, AddonsAPI, type ApiKey, type ApiKeyScope, ApiKeysAPI, AuthenticationError, type Balance, BillingAPI, type CLIOptions, type CLIResult, type CheckoutSession, type ClickOpts, type CodeContext, CodeSandbox, ConfigApplyError, type ConfigResult, ConflictError, type ConnectionOpts, type CostMetrics, type CreateAddonOpts, type CreateApiKeyOpts, type CreateContextOpts, type CreateProjectOpts, type CreateServiceOpts, type CreateVolumeOpts, type CreateWorkspaceOpts, type CreatedApiKey, type DeployEvent, DeployHandle, Desktop, type DesktopInfo, type DesktopStartOpts, type DomainInfo, type DomainStatus, DomainsAPI, Execution, ExecutionError, type ExposedPort, type FileInfo, type ForkResult, type FsEvent, type FsOpts, GitHubAPI, type ListTransactionsOpts, Lizard, LizardCLI, LizardError, type LizardOpts, type LogLine, type MetricPoint, type MetricRange, MetricsAPI, type MouseButton, NotFoundError, PaymentRequiredError, type Plan, PlatformClient, type ProcessInfo, type ProcessOpts, type ProcessResult, type ProcessSignal, type Project, type ProjectConfig, type ProjectCost, ProjectsAPI, type PromoRedemption, type RawMetrics, type Region, RegionsAPI, type ResaleMultipliers, type ResalePricing, type RunCodeLanguage, type RunCodeOpts, Sandbox, type SandboxInfo, type SandboxOpts, type SandboxSnapshot, type ScaleOpts, type ScrollDirection, type Secret, SecretsAPI, type Service, type ServiceMetrics, type ServiceUpdate, ServicesAPI, type SetSecretOpts, type SnapshotOpts, type SnapshotScope, type SnapshotWaitOpts, type StartCheckoutOpts, type StartProNowResult, StorageAPI, type StreamEvent, type Subscription, type SubscriptionStatus, TimeoutError, type Transaction, type TransactionPage, Volume, type VolumeInfo, type Workspace, WorkspacesAPI, resolveProjectId };
package/dist/index.js CHANGED
@@ -418,6 +418,17 @@ var ServicesAPI = class {
418
418
  resume(id) {
419
419
  return this.client.post(`/api/apps/${id}/resume`, {});
420
420
  }
421
+ /** Serverless setting of a service: whether it sleeps when idle, and how often it did. */
422
+ getSleep(id) {
423
+ return this.client.get(`/api/apps/${id}/sleep`);
424
+ }
425
+ /**
426
+ * Make a service serverless (sleep when idle, wake in about a second on the next request) or
427
+ * always on. Turning it on restarts it once. Needs one replica and a port.
428
+ */
429
+ setSleep(id, opts) {
430
+ return this.client.put(`/api/apps/${id}/sleep`, opts);
431
+ }
421
432
  /** Scale a service. */
422
433
  async scale(id, opts) {
423
434
  if (opts.storageMi !== void 0) throw new LizardError("Storage scaling is only supported for addons");
@@ -1506,6 +1517,14 @@ var AddonsAPI = class {
1506
1517
  resume(projectId, addonId) {
1507
1518
  return this.client.post(`/api/projects/${projectId}/addons/${addonId}/resume`, {});
1508
1519
  }
1520
+ /** Serverless setting of a database (Postgres, Redis). */
1521
+ getSleep(projectId, addonId) {
1522
+ return this.client.get(`/api/projects/${projectId}/addons/${addonId}/sleep`);
1523
+ }
1524
+ /** Make a database serverless (sleep when idle, wake on the next connection) or always on. */
1525
+ setSleep(projectId, addonId, opts) {
1526
+ return this.client.put(`/api/projects/${projectId}/addons/${addonId}/sleep`, opts);
1527
+ }
1509
1528
  rename(projectId, addonId, name) {
1510
1529
  return this.client.patch(`/api/projects/${projectId}/addons/${addonId}`, { name });
1511
1530
  }
@@ -1707,6 +1726,32 @@ var WorkspacesAPI = class {
1707
1726
  resume(id) {
1708
1727
  return this.client.post(`/api/workspaces/${id}/resume`, {});
1709
1728
  }
1729
+ /**
1730
+ * The workspace's resale prices (owner only, key with no scopes).
1731
+ *
1732
+ * A scoped key gets HTTP 403 with `code: 'ACCOUNT_SCOPE_REQUIRED'`: the keys that see these
1733
+ * prices can neither read nor change them.
1734
+ */
1735
+ getResalePricing(id) {
1736
+ return this.client.get(`/api/workspaces/${id}/resale-pricing`);
1737
+ }
1738
+ /**
1739
+ * Set the workspace's resale prices (owner only, key with no scopes). Replaces them all:
1740
+ * a resource left out is 1. Every API key scoped to the workspace, or to one of its
1741
+ * projects, then sees each price and cost multiplied (sandbox `pricePerHour`, `metrics`
1742
+ * costs, billing summaries). Display only: what Lizard bills you is unchanged.
1743
+ *
1744
+ * ```ts
1745
+ * await lizard.workspaces.setResalePricing(ws.id, { cpu: 4, memory: 4, sandbox: 4 })
1746
+ * ```
1747
+ */
1748
+ setResalePricing(id, multipliers) {
1749
+ return this.client.put(`/api/workspaces/${id}/resale-pricing`, multipliers);
1750
+ }
1751
+ /** Turn resale prices off: scoped keys see Lizard's prices again (owner only). */
1752
+ clearResalePricing(id) {
1753
+ return this.client.put(`/api/workspaces/${id}/resale-pricing`, {});
1754
+ }
1710
1755
  /**
1711
1756
  * Delete a workspace.
1712
1757
  *
package/dist/index.mjs CHANGED
@@ -365,6 +365,17 @@ var ServicesAPI = class {
365
365
  resume(id) {
366
366
  return this.client.post(`/api/apps/${id}/resume`, {});
367
367
  }
368
+ /** Serverless setting of a service: whether it sleeps when idle, and how often it did. */
369
+ getSleep(id) {
370
+ return this.client.get(`/api/apps/${id}/sleep`);
371
+ }
372
+ /**
373
+ * Make a service serverless (sleep when idle, wake in about a second on the next request) or
374
+ * always on. Turning it on restarts it once. Needs one replica and a port.
375
+ */
376
+ setSleep(id, opts) {
377
+ return this.client.put(`/api/apps/${id}/sleep`, opts);
378
+ }
368
379
  /** Scale a service. */
369
380
  async scale(id, opts) {
370
381
  if (opts.storageMi !== void 0) throw new LizardError("Storage scaling is only supported for addons");
@@ -1453,6 +1464,14 @@ var AddonsAPI = class {
1453
1464
  resume(projectId, addonId) {
1454
1465
  return this.client.post(`/api/projects/${projectId}/addons/${addonId}/resume`, {});
1455
1466
  }
1467
+ /** Serverless setting of a database (Postgres, Redis). */
1468
+ getSleep(projectId, addonId) {
1469
+ return this.client.get(`/api/projects/${projectId}/addons/${addonId}/sleep`);
1470
+ }
1471
+ /** Make a database serverless (sleep when idle, wake on the next connection) or always on. */
1472
+ setSleep(projectId, addonId, opts) {
1473
+ return this.client.put(`/api/projects/${projectId}/addons/${addonId}/sleep`, opts);
1474
+ }
1456
1475
  rename(projectId, addonId, name) {
1457
1476
  return this.client.patch(`/api/projects/${projectId}/addons/${addonId}`, { name });
1458
1477
  }
@@ -1654,6 +1673,32 @@ var WorkspacesAPI = class {
1654
1673
  resume(id) {
1655
1674
  return this.client.post(`/api/workspaces/${id}/resume`, {});
1656
1675
  }
1676
+ /**
1677
+ * The workspace's resale prices (owner only, key with no scopes).
1678
+ *
1679
+ * A scoped key gets HTTP 403 with `code: 'ACCOUNT_SCOPE_REQUIRED'`: the keys that see these
1680
+ * prices can neither read nor change them.
1681
+ */
1682
+ getResalePricing(id) {
1683
+ return this.client.get(`/api/workspaces/${id}/resale-pricing`);
1684
+ }
1685
+ /**
1686
+ * Set the workspace's resale prices (owner only, key with no scopes). Replaces them all:
1687
+ * a resource left out is 1. Every API key scoped to the workspace, or to one of its
1688
+ * projects, then sees each price and cost multiplied (sandbox `pricePerHour`, `metrics`
1689
+ * costs, billing summaries). Display only: what Lizard bills you is unchanged.
1690
+ *
1691
+ * ```ts
1692
+ * await lizard.workspaces.setResalePricing(ws.id, { cpu: 4, memory: 4, sandbox: 4 })
1693
+ * ```
1694
+ */
1695
+ setResalePricing(id, multipliers) {
1696
+ return this.client.put(`/api/workspaces/${id}/resale-pricing`, multipliers);
1697
+ }
1698
+ /** Turn resale prices off: scoped keys see Lizard's prices again (owner only). */
1699
+ clearResalePricing(id) {
1700
+ return this.client.put(`/api/workspaces/${id}/resale-pricing`, {});
1701
+ }
1657
1702
  /**
1658
1703
  * Delete a workspace.
1659
1704
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lizard-build/sdk",
3
- "version": "0.1.62",
3
+ "version": "0.1.64",
4
4
  "description": "TypeScript SDK for Lizard: Firecracker microVM sandboxes, code execution and cloud apps.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",