@pantechdynamic/sdk 0.5.0 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -6,6 +6,49 @@ until then.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.6.1 (2026-11-25)
10
+
11
+ - The vendored spec is the one now published, and the `spec/pending` files it covers are gone; the
12
+ types are regenerated from it. `migrate.connections.enrollAgent` and `revokeAgent` work on every
13
+ connection: AWS, Google Cloud, Azure and Huawei Cloud connections can have an agent too, for
14
+ server copies, database imports and Kubernetes moves (Pantech still scans those clouds itself),
15
+ and enrollment no longer answers `409 CLOUD_CONNECTION_NOT_AGENT`. The doc comments say a
16
+ connection has one agent, and that revoking it also ends its server copy uploads in progress.
17
+ - The published spec gives two routes the id `putBucketObjectLock`; the SDK keeps its names
18
+ (`setBucketObjectLock` for an object's lock, `putBucketObjectLock` for the bucket's default) through
19
+ `scripts/renamed-operations.json`, so no type changes name.
20
+ - Operations in the published spec the SDK does not wrap yet (functions, email, instance password
21
+ reset and the database CA certificate) are listed in `scripts/not-in-sdk.json`; call them with
22
+ `client.request`.
23
+
24
+ ## 0.6.0 (2026-11-25)
25
+
26
+ - Pantech Migrate reads every cloud it supports, not only AWS: `migrate.providers.list()` lists
27
+ them and how each is read (`federated` for AWS, Google Cloud, Azure and Huawei Cloud; `agent`
28
+ for DigitalOcean, Hetzner, Linode, Vultr, Contabo and OpenStack). `migrate.connections.create`
29
+ takes a `provider`, `update` takes `gcp`, `azure` or `huawei` federation details, and
30
+ connections and scans report `external_account_id`, connections their `agent` and the provider's
31
+ `setup`, and scans their `provider` and `runner`.
32
+ - The Pantech Migrate agent: `migrate.connections.enrollAgent` (a one-time code, sent once and
33
+ never retried, since each call issues a new one) and `migrate.connections.revokeAgent`.
34
+ - People: a scan's `users` say where each person comes from (`source`), their `access_level` and
35
+ their `roles`, and `migrate.migrations.sendInvites` invites a plan's `user` items with their
36
+ roles. Plan item targets carry `image_slug` (Windows Server, on request) and `invite_id`.
37
+ - Buckets: `migrate.copyAccess` (`get`, `set`) and `migrate.bucketImports` (`list`, `listAll`,
38
+ `start`, `get`, `cancel`, `resync` with optional `mirror_deletes`).
39
+ - Servers: `migrate.serverCopies` (`start`, `getTemplate` for the AWS copy role, `list`, `listAll`,
40
+ `get`, `sync`, `cutOver`, `cancel`).
41
+ - Databases: `migrate.databaseImports` (`start`, `list`, `listAll`, `get`, `checkReadiness`,
42
+ `cutOver`, `cancel`, `revokeAccess`).
43
+ - Kubernetes: `migrate.kubernetesMoves` (`start`, `list`, `listAll`, `getSourceAccess`, `get`,
44
+ `preview`, `apply`, `syncVolumes`, `cutOver`, `cancel`, and `downloadManifests`, which returns
45
+ the YAML as a string). Scans report `kubernetes_clusters`, plans have `kubernetes_cluster` items,
46
+ and `migrate.migrations.updateItem` takes `allow_version_downgrade`.
47
+ - Type aliases for every new schema, such as `CloudProvider`, `CloudAgentEnrollment`, `CopyAccess`,
48
+ `BucketImport`, `ServerCopy`, `DatabaseImport`, `KubernetesMove` and `KubernetesMoveDetail`.
49
+ - `databases.getSnapshotSchedule` and `databases.setSnapshotSchedule`: automatic snapshots of a
50
+ database's data disk, as for instances and volumes.
51
+
9
52
  ## 0.5.0 (2026-11-24)
10
53
 
11
54
  - Dynamic IP for instances: `instances.dynamicIp` (`get`, `set`, `disable`, and non-retrying
package/README.md CHANGED
@@ -77,7 +77,7 @@ Every method takes per-call options last: `{ signal, timeout, maxRetries, idempo
77
77
  | Databases | `databases.*`, `databases.snapshots.*`, `databaseOrders.wait(order)` |
78
78
  | SSH keys, webhooks | `sshKeys.*`, `webhooks.*`, `webhooks.deliveries.*` |
79
79
  | Billing and usage | `billing.credit.get()`, `billing.credit.purchases.create(...)`, `billing.receipts.getPdf(id)`, `usage.get()` |
80
- | Move from another cloud | `migrate.connections.*`, `migrate.scans.*`, `migrate.migrations.*` |
80
+ | Move from another cloud | `migrate.providers.list()`, `migrate.connections.*` (`enrollAgent`, `revokeAgent`), `migrate.scans.*`, `migrate.migrations.*` (`sendInvites`), `migrate.copyAccess.get/set`, `migrate.bucketImports.*`, `migrate.serverCopies.*`, `migrate.databaseImports.*`, `migrate.kubernetesMoves.*` |
81
81
  | DNS | `dns.zones.*` (`exportZoneFile`, `importZoneFile`, `verify`, `wait`), `dns.records.*` (`batch`, `wait`) |
82
82
  | Certificates | `certificates.request/import/get/list/update/verify/reimport/export/revoke/delete`, `certificates.wait(id)` |
83
83
  | Teams and access policies | `iam.members.list()`, `iam.actions.list()`, `iam.settings.*`, `iam.teams.*`, `iam.teams.members.*`, `iam.policies.*`, `iam.policies.attachments.*`, `iam.effectiveAccess(userId)`, `iam.simulate({...})` |
@@ -86,7 +86,9 @@ Every method takes per-call options last: `{ signal, timeout, maxRetries, idempo
86
86
  | Operations | `operations.get(id)`, `operations.wait(id)`, `operations.stream(id)` |
87
87
 
88
88
  Every operation in the public spec has a method, except agent sessions, which answer only AI apps
89
- connected through Pantech's MCP server; `test/coverage.test.ts` fails if one is missing.
89
+ connected through Pantech's MCP server, and the functions, email, instance password reset and
90
+ database CA certificate endpoints, which have no method yet (`scripts/not-in-sdk.json`);
91
+ `test/coverage.test.ts` fails if one is missing.
90
92
  For anything else, `client.request({ method, path, query, body })` sends a raw request with the
91
93
  same auth, retries and errors.
92
94
 
@@ -182,9 +184,14 @@ await client.buckets.multipart.complete(bucket.id, {
182
184
 
183
185
  ## Move from another cloud
184
186
 
185
- `client.migrate` connects an AWS account through a read-only role that only Pantech can assume (no
186
- access keys are shared), scans what runs there, and plans the move with a price comparison and a
187
- Terraform export. Nothing is created on Pantech until you apply the Terraform.
187
+ `client.migrate` connects another cloud read-only, scans what runs there, and plans the move with a
188
+ price comparison and a Terraform export. Nothing is created on Pantech until you apply the
189
+ Terraform or start a copy. `migrate.providers.list()` names every cloud it can read and how:
190
+ AWS, Google Cloud, Azure and Huawei Cloud are `federated` (Pantech signs short-lived tokens your
191
+ cloud trusts, so no keys are shared); DigitalOcean, Hetzner, Linode, Vultr, Contabo and OpenStack
192
+ are read by the Pantech Migrate `agent`, which keeps your read-only token on your machine. Any
193
+ connection, federated ones included, can have one agent for the copy steps that read from inside
194
+ your network: server copies, database imports and Kubernetes moves.
188
195
 
189
196
  ```ts
190
197
  let conn = await client.migrate.connections.create({ name: "Production AWS" });
@@ -201,6 +208,65 @@ const { files } = await client.migrate.migrations.exportTerraform(plan.id); // m
201
208
  `migrate.migrations.updateItem(id, { key, excluded: true })` leaves an item out, or changes its
202
209
  plan, size, address range or role, before you export. See `examples/migrate-from-aws.ts`.
203
210
 
211
+ Other clouds connect the same way. For Google Cloud, Azure and Huawei Cloud, run the script in
212
+ `conn.setup.template` and send what it prints with `update`; for an agent provider, enroll the
213
+ agent where it will run:
214
+
215
+ ```ts
216
+ const gcp = await client.migrate.connections.create({ provider: "gcp", name: "Production GCP" });
217
+ await client.migrate.connections.update(gcp.id, {
218
+ gcp: { project_number: "…", pool_id: "…", provider_id: "…", service_account_email: "…", project_ids: ["…"] },
219
+ });
220
+
221
+ const hetzner = await client.migrate.connections.create({ provider: "hetzner", name: "Hetzner" });
222
+ const { enroll_command } = await client.migrate.connections.enrollAgent(hetzner.id); // shown once
223
+ await client.migrate.connections.wait(hetzner.id); // connected once the agent has enrolled
224
+ ```
225
+
226
+ `enrollAgent` works on every connection and is sent once and never retried, since each call
227
+ issues a new code; `revokeAgent(id)` ends the agent at once. A plan lists the people it found as items of kind
228
+ `user`; `migrate.migrations.sendInvites(planId, { keys })` invites them with their roles, and is
229
+ safe to repeat.
230
+
231
+ Then move the data across. Each copy is free; what it creates bills as usual.
232
+
233
+ ```ts
234
+ // Buckets: choose them, deploy the copy role, then import.
235
+ await client.migrate.copyAccess.set(conn.id, { buckets: ["assets"] }); // returns the copy role template
236
+ await client.migrate.copyAccess.set(conn.id, { role_arn: "arn:aws:iam::…:role/…" }); // CopyRoleArn output
237
+ const imp = await client.migrate.bucketImports.start({
238
+ connection_id: conn.id,
239
+ source_bucket: "assets",
240
+ destination_bucket_name: "assets",
241
+ });
242
+ await client.migrate.bucketImports.resync(imp.id); // copies only what changed
243
+
244
+ // Servers: copy the disks, copy what changed, then cut over to a new instance.
245
+ const copy = await client.migrate.serverCopies.start(plan.id, { item_key: "…", subnet_id: "…" });
246
+ await client.migrate.serverCopies.sync(copy.id);
247
+ await client.migrate.serverCopies.cutOver(copy.id); // stop the application first
248
+
249
+ // Databases, through the Migrate agent: the source's credentials stay on it.
250
+ const dbi = await client.migrate.databaseImports.start(plan.id, {
251
+ item_key: "…",
252
+ destination_database_id: "…",
253
+ source_ref: "prod-db",
254
+ mode: "replicate",
255
+ });
256
+ await client.migrate.databaseImports.cutOver(dbi.id); // stop writes to the source first
257
+
258
+ // Kubernetes: preview, apply, then cut over.
259
+ const move = await client.migrate.kubernetesMoves.start(plan.id, { item_key: "…", cluster_id: "…" });
260
+ await client.migrate.kubernetesMoves.preview(move.id);
261
+ await client.migrate.kubernetesMoves.apply(move.id);
262
+ await client.migrate.kubernetesMoves.cutOver(move.id, { source_writes_stopped: true });
263
+ const manifests = await client.migrate.kubernetesMoves.downloadManifests(move.id); // YAML, for GitOps
264
+ ```
265
+
266
+ Each step is asynchronous: follow it with `get` (`bucketImports.get`, `serverCopies.get`,
267
+ `databaseImports.get`, `kubernetesMoves.get`) until its `status` says it is ready for the next.
268
+ Windows servers are copied with the agent only, once Windows is enabled for your organization.
269
+
204
270
  ## Certificates
205
271
 
206
272
  `client.certificates` issues TLS certificates through a publicly trusted CA and renews them by
package/dist/index.cjs CHANGED
@@ -702,6 +702,12 @@ var Databases = class extends APIResource {
702
702
  resizeStorage(databaseId, body, options) {
703
703
  return this._post(path`/databases/${databaseId}/resize-storage`, body, options);
704
704
  }
705
+ getSnapshotSchedule(databaseId, options) {
706
+ return this._get(path`/databases/${databaseId}/snapshot-schedule`, void 0, options);
707
+ }
708
+ setSnapshotSchedule(databaseId, body, options) {
709
+ return this._put(path`/databases/${databaseId}/snapshot-schedule`, body, options);
710
+ }
705
711
  };
706
712
  var DatabaseSnapshots = class extends APIResource {
707
713
  list(databaseId, params = {}, options) {
@@ -1450,12 +1456,33 @@ function cloudFailed(kind, id, failure, resource) {
1450
1456
  );
1451
1457
  }
1452
1458
  var Migrate = class extends APIResource {
1453
- /** Connections to AWS accounts through a read-only role only Pantech can assume. */
1459
+ /** The clouds Migrate can connect, and how it reads each. */
1460
+ providers = new CloudProviders(this._client);
1461
+ /** Read-only connections to your accounts in other clouds. */
1454
1462
  connections = new CloudConnections(this._client);
1455
- /** Reads of everything a connection's role can see. */
1463
+ /** Reads of everything a connection can see. */
1456
1464
  scans = new CloudScans(this._client);
1457
- /** Plans to move what a scan found to Pantech. Nothing is created until you apply the Terraform. */
1465
+ /** Plans to move what a scan found to Pantech. Nothing is created until you apply the Terraform or start a copy. */
1458
1466
  migrations = new Migrations(this._client);
1467
+ /** A connection's opt-in copy access: the buckets Pantech may copy, through a separate copy role. */
1468
+ copyAccess = new CopyAccessResource(this._client);
1469
+ /** Copies of a source bucket's objects into a Pantech bucket. */
1470
+ bucketImports = new BucketImports(this._client);
1471
+ /** Copies of a planned server's disks into a new Pantech instance. */
1472
+ serverCopies = new ServerCopies(this._client);
1473
+ /** Moves of a planned database into one of your Pantech databases, through the Migrate agent. */
1474
+ databaseImports = new DatabaseImports(this._client);
1475
+ /** Moves of a planned Kubernetes cluster into one of your Pantech clusters. */
1476
+ kubernetesMoves = new KubernetesMoves(this._client);
1477
+ };
1478
+ var CloudProviders = class extends APIResource {
1479
+ /**
1480
+ * Every cloud Migrate can connect: how it reads each (`federated` or
1481
+ * `agent`), and whether a scan reads its spend and its people.
1482
+ */
1483
+ list(options) {
1484
+ return this._get("/cloud-providers", void 0, options);
1485
+ }
1459
1486
  };
1460
1487
  var CloudConnections = class extends APIResource {
1461
1488
  list(params = {}, options) {
@@ -1465,9 +1492,13 @@ var CloudConnections = class extends APIResource {
1465
1492
  return this._listAll("/cloud-connections", params, options);
1466
1493
  }
1467
1494
  /**
1468
- * Starts a connection. Its `setup` holds the CloudFormation template (and,
1495
+ * Starts a connection to `provider` (`aws` when left out). Its `setup` says
1496
+ * what to run in your cloud: for AWS, the CloudFormation template (and,
1469
1497
  * when offered, a one-click `quick_create_url`) that creates the read-only
1470
- * role in your AWS account; send the stack's `RoleArn` output with `update`.
1498
+ * role, whose `RoleArn` output you send with `update`; for Google Cloud,
1499
+ * Azure and Huawei Cloud, a script whose output you send as `gcp`, `azure`
1500
+ * or `huawei` with `update`; for agent providers, how to make a read-only
1501
+ * token, then `enrollAgent`.
1471
1502
  */
1472
1503
  create(body, options) {
1473
1504
  return this._post("/cloud-connections", body, options);
@@ -1475,7 +1506,10 @@ var CloudConnections = class extends APIResource {
1475
1506
  get(connectionId, options) {
1476
1507
  return this._get(path`/cloud-connections/${connectionId}`, void 0, options);
1477
1508
  }
1478
- /** Renames the connection, sets its `role_arn`, or retries a failed check (`retry: true`). */
1509
+ /**
1510
+ * Renames the connection, sets its `role_arn` (AWS) or its `gcp`, `azure`
1511
+ * or `huawei` federation details, or retries a failed check (`retry: true`).
1512
+ */
1479
1513
  update(connectionId, body, options) {
1480
1514
  return this._patch(path`/cloud-connections/${connectionId}`, body, options);
1481
1515
  }
@@ -1483,10 +1517,33 @@ var CloudConnections = class extends APIResource {
1483
1517
  delete(connectionId, options) {
1484
1518
  return this._delete(path`/cloud-connections/${connectionId}`, options);
1485
1519
  }
1520
+ /**
1521
+ * A one-time enrollment code for the connection's Pantech Migrate agent,
1522
+ * valid once for an hour and shown only in this response. Any connection may
1523
+ * have an agent: on AWS, Google Cloud, Azure and Huawei Cloud it runs server
1524
+ * copies, database imports and Kubernetes moves (Pantech scans those clouds
1525
+ * itself); on the other clouds it scans too. A connection has one agent, so
1526
+ * using the code replaces the earlier one. Run its `enroll_command` where the
1527
+ * agent will run. Each call issues a new code (replacing any unused one), so
1528
+ * it is sent once and not retried.
1529
+ */
1530
+ enrollAgent(connectionId, options) {
1531
+ return this._post(path`/cloud-connections/${connectionId}/agent-enrollments`, void 0, options, {
1532
+ noRetry: true
1533
+ });
1534
+ }
1535
+ /**
1536
+ * Ends the connection's agent at once, and any server copy upload it was
1537
+ * running; the connection waits for a new one. Revoking again changes nothing.
1538
+ */
1539
+ revokeAgent(connectionId, options) {
1540
+ return this._delete(path`/cloud-connections/${connectionId}/agent`, options);
1541
+ }
1486
1542
  /**
1487
1543
  * Polls the connection until it is `connected` (resolves with it) or its
1488
- * check fails (rejects with CloudFailedError). Set the role ARN with
1489
- * `update` first. Default timeout 10 minutes, polling every 5 seconds.
1544
+ * check fails (rejects with CloudFailedError). Set the role ARN or the
1545
+ * federation details with `update`, or enroll the agent, first. Default
1546
+ * timeout 10 minutes, polling every 5 seconds.
1490
1547
  */
1491
1548
  wait(connectionId, options = {}) {
1492
1549
  return poll(
@@ -1564,6 +1621,199 @@ var Migrations = class extends APIResource {
1564
1621
  exportTerraform(migrationId, options) {
1565
1622
  return this._get(path`/migrations/${migrationId}/terraform`, void 0, options);
1566
1623
  }
1624
+ /**
1625
+ * Sends Pantech invites to the people the plan lists (items of kind
1626
+ * `user`), by key, each with its item's role. Safe to repeat: anyone
1627
+ * already invited or already a member is reported, never invited twice.
1628
+ */
1629
+ sendInvites(migrationId, body, options) {
1630
+ return this._post(path`/migrations/${migrationId}/invites`, body, options);
1631
+ }
1632
+ };
1633
+ var CopyAccessResource = class extends APIResource {
1634
+ /** The connection's copy access: the chosen buckets, the copy role and its last verification, and its template. */
1635
+ get(connectionId, options) {
1636
+ return this._get(path`/cloud-connections/${connectionId}/copy-access`, void 0, options);
1637
+ }
1638
+ /**
1639
+ * Chooses the buckets Pantech may copy (`buckets`, needed the first time)
1640
+ * and returns the CloudFormation template for a copy role that may read
1641
+ * only those. Deploy it, then set `role_arn` to its `CopyRoleArn` output;
1642
+ * `retry: true` verifies again.
1643
+ */
1644
+ set(connectionId, body, options) {
1645
+ return this._put(path`/cloud-connections/${connectionId}/copy-access`, body, options);
1646
+ }
1647
+ };
1648
+ var BucketImports = class extends APIResource {
1649
+ /** The organization's bucket imports, newest first. */
1650
+ list(params = {}, options) {
1651
+ return this._get("/bucket-imports", params, options);
1652
+ }
1653
+ listAll(params = {}, options) {
1654
+ return this._listAll("/bucket-imports", params, options);
1655
+ }
1656
+ /**
1657
+ * Copies one source bucket (with verified copy access) into a new Pantech
1658
+ * bucket (`destination_bucket_name`) or one you have (`destination_bucket_id`).
1659
+ * Nothing is deleted on either side. Follow it with `get`.
1660
+ */
1661
+ start(body, options) {
1662
+ return this._post("/bucket-imports", body, options);
1663
+ }
1664
+ /** An import's status and progress, the first objects that failed it, and its audit trail. */
1665
+ get(importId, options) {
1666
+ return this._get(path`/bucket-imports/${importId}`, void 0, options);
1667
+ }
1668
+ /** Stops the import: a queued one at once, a running one at its next checkpoint. Objects already copied stay. */
1669
+ cancel(importId, options) {
1670
+ return this._post(path`/bucket-imports/${importId}/cancel`, void 0, options);
1671
+ }
1672
+ /**
1673
+ * Queues another pass that copies only what changed. `mirror_deletes: true`
1674
+ * (that pass only, needs the `delete` scope) also deletes the objects this
1675
+ * import copied that the source no longer has.
1676
+ */
1677
+ resync(importId, body = {}, options) {
1678
+ return this._post(path`/bucket-imports/${importId}/resync`, body, options);
1679
+ }
1680
+ };
1681
+ var ServerCopies = class extends APIResource {
1682
+ /** Every server copy in your organization, newest first, with its progress. */
1683
+ list(params = {}, options) {
1684
+ return this._get("/server-copies", params, options);
1685
+ }
1686
+ listAll(params = {}, options) {
1687
+ return this._listAll("/server-copies", params, options);
1688
+ }
1689
+ /**
1690
+ * Starts copying one planned server's disks (`item_key`) into a new Pantech
1691
+ * instance. The first pass copies every disk; `sync` copies what changed and
1692
+ * `cutOver` runs the last pass and builds the instance. `source` is `agent`
1693
+ * (the default) or `aws_snapshot`, with a copy role from `getTemplate`.
1694
+ */
1695
+ start(migrationId, body, options) {
1696
+ return this._post(path`/migrations/${migrationId}/server-copies`, body, options);
1697
+ }
1698
+ /**
1699
+ * The CloudFormation template of the AWS copy role for one planned server
1700
+ * (`item_key`); with `create_snapshots: true` it may also snapshot that
1701
+ * server's own volumes.
1702
+ */
1703
+ getTemplate(migrationId, params, options) {
1704
+ return this._get(path`/migrations/${migrationId}/server-copy-template`, params, options);
1705
+ }
1706
+ /** A copy's status, pre-flight findings, running pass and progress, and the instance once it is being created. */
1707
+ get(copyId, options) {
1708
+ return this._get(path`/server-copies/${copyId}`, void 0, options);
1709
+ }
1710
+ /** Asks for a pass that copies only what changed. An AWS copy that makes no snapshots names each disk's new one in `snapshots`. */
1711
+ sync(copyId, body = {}, options) {
1712
+ return this._post(path`/server-copies/${copyId}/sync`, body, options);
1713
+ }
1714
+ /** Asks for the last pass, then builds the instance. Stop the application first. */
1715
+ cutOver(copyId, body = {}, options) {
1716
+ return this._post(path`/server-copies/${copyId}/cutover`, body, options);
1717
+ }
1718
+ /** Stops the copy and deletes what Pantech staged for it. Refused once the instance is being created. */
1719
+ cancel(copyId, body = {}, options) {
1720
+ return this._post(path`/server-copies/${copyId}/cancel`, body, options);
1721
+ }
1722
+ };
1723
+ var DatabaseImports = class extends APIResource {
1724
+ /** Your organization's database imports, newest first, without their tables. */
1725
+ list(params = {}, options) {
1726
+ return this._get("/database-imports", params, options);
1727
+ }
1728
+ listAll(params = {}, options) {
1729
+ return this._listAll("/database-imports", params, options);
1730
+ }
1731
+ /**
1732
+ * Starts moving one of the plan's databases (`item_key`) into one of your
1733
+ * Pantech databases, through the Migrate agent, which keeps the source's
1734
+ * credentials. `dump` copies once; `replicate` (PostgreSQL) follows changes
1735
+ * until you cut over.
1736
+ */
1737
+ start(migrationId, body, options) {
1738
+ return this._post(path`/migrations/${migrationId}/database-imports`, body, options);
1739
+ }
1740
+ /** An import with its readiness report, per-table progress and verification. */
1741
+ get(importId, options) {
1742
+ return this._get(path`/database-imports/${importId}`, void 0, options);
1743
+ }
1744
+ /** Runs the pre-flight again, for example after fixing what it reported. Allowed before the copy starts. */
1745
+ checkReadiness(importId, options) {
1746
+ return this._post(path`/database-imports/${importId}/readiness`, void 0, options);
1747
+ }
1748
+ /** Finishes the import. For `replicate`, stop writes to the source first. */
1749
+ cutOver(importId, options) {
1750
+ return this._post(path`/database-imports/${importId}/cutover`, void 0, options);
1751
+ }
1752
+ /** Stops the import and removes its access to your Pantech database. What was copied stays. */
1753
+ cancel(importId, options) {
1754
+ return this._post(path`/database-imports/${importId}/cancel`, void 0, options);
1755
+ }
1756
+ /** Removes the import's login and access from your Pantech database now, keeping the data. */
1757
+ revokeAccess(importId, options) {
1758
+ return this._post(path`/database-imports/${importId}/revoke-access`, void 0, options);
1759
+ }
1760
+ };
1761
+ var KubernetesMoves = class extends APIResource {
1762
+ /** Your organization's moves, newest first, without their resources and volumes. */
1763
+ list(params = {}, options) {
1764
+ return this._get("/kubernetes-moves", params, options);
1765
+ }
1766
+ listAll(params = {}, options) {
1767
+ return this._listAll("/kubernetes-moves", params, options);
1768
+ }
1769
+ /**
1770
+ * Starts moving a plan's `kubernetes_cluster` item into one of your running
1771
+ * Pantech clusters. Secrets move only with `include_secrets`, volume data
1772
+ * only with `copy_volumes`. Then `preview`, `apply`, and `cutOver`.
1773
+ */
1774
+ start(migrationId, body, options) {
1775
+ return this._post(path`/migrations/${migrationId}/kubernetes-moves`, body, options);
1776
+ }
1777
+ /** The manifests to apply to the source cluster: a read-only reader, and optional Secrets reader and volume copier roles. */
1778
+ getSourceAccess(options) {
1779
+ return this._get("/kubernetes-moves/source-access", void 0, options);
1780
+ }
1781
+ /** A move with its report: every source object and what the move does with it, the volumes, images and held workloads. */
1782
+ get(moveId, options) {
1783
+ return this._get(path`/kubernetes-moves/${moveId}`, void 0, options);
1784
+ }
1785
+ /** Queues a server-side dry run against the target cluster. `allow_privileged` names refused workloads to include anyway. */
1786
+ preview(moveId, body = {}, options) {
1787
+ return this._post(path`/kubernetes-moves/${moveId}/preview`, body, options);
1788
+ }
1789
+ /** Queues the apply of what the last successful preview checked. */
1790
+ apply(moveId, options) {
1791
+ return this._post(path`/kubernetes-moves/${moveId}/apply`, void 0, options);
1792
+ }
1793
+ /** Queues the next copy of every volume; only what changed is sent. */
1794
+ syncVolumes(moveId, options) {
1795
+ return this._post(path`/kubernetes-moves/${moveId}/sync-volumes`, void 0, options);
1796
+ }
1797
+ /**
1798
+ * Once writes on the source have stopped (`source_writes_stopped: true`),
1799
+ * takes the final copy of every volume and scales the held workloads up.
1800
+ */
1801
+ cutOver(moveId, body, options) {
1802
+ return this._post(path`/kubernetes-moves/${moveId}/cutover`, body, options);
1803
+ }
1804
+ /** Stops the move and removes its copy pods, staged data and export. Objects already applied stay. */
1805
+ cancel(moveId, options) {
1806
+ return this._post(path`/kubernetes-moves/${moveId}/cancel`, void 0, options);
1807
+ }
1808
+ /** The transformed manifests as one YAML file, for GitOps. Secret values are never included. */
1809
+ downloadManifests(moveId, options) {
1810
+ return this._request(
1811
+ "GET",
1812
+ path`/kubernetes-moves/${moveId}/manifests`,
1813
+ { responseType: "text" },
1814
+ { ...options, headers: { Accept: "application/yaml", ...options?.headers } }
1815
+ );
1816
+ }
1567
1817
  };
1568
1818
 
1569
1819
  // src/resources/networks.ts
@@ -2245,7 +2495,7 @@ var WebhookDeliveries = class extends APIResource {
2245
2495
  };
2246
2496
 
2247
2497
  // src/version.ts
2248
- var VERSION = "0.5.0";
2498
+ var VERSION = "0.6.1";
2249
2499
 
2250
2500
  // src/client.ts
2251
2501
  var DEFAULT_BASE_URL = "https://api.pantechdynamics.com/public/v1";