@pantechdynamic/sdk 0.6.0 → 0.7.0

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,44 @@ until then.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 0.7.0 (2026-11-28)
10
+
11
+ - Object Storage parity across settings, uploads, versioning, multipart, sharing, notifications,
12
+ and custom domains:
13
+ - `objectStorage.updateSettings({ block_public_access })` (`PATCH /object-storage/settings`),
14
+ with `ObjectStorageSettings` and `UpdateObjectStorageSettingsRequest` type aliases and
15
+ `block_public_access` on `ObjectStorageStatus`.
16
+ - Scoped S3 access keys (`permissions`: `read_only` | `read_write` | `write_only`, `prefixes`,
17
+ and `expires_at`) and default bucket server-side encryption (`encryption`: `none` | `sse_s3`,
18
+ `server_side_encryption` on object metadata).
19
+ - `buckets.objects.createUploadForm(bucketId, ...)` (`POST /buckets/{bucket_id}/objects/upload-form`)
20
+ for direct browser POST uploads and `buckets.objects.restoreVersion(bucketId, ...)`
21
+ (`POST /buckets/{bucket_id}/objects/restore-version`) to restore historical versions or remove
22
+ delete markers.
23
+ - `buckets.multipart.list(bucketId)` (`GET /buckets/{bucket_id}/objects/multipart`) and
24
+ `buckets.multipart.signParts(bucketId, ...)` (`POST /buckets/{bucket_id}/objects/multipart/sign-parts`)
25
+ to inspect in-progress uploads and batch-sign up to 100 part URLs at once.
26
+ - Cross-organization bucket sharing: `buckets.listShared()` (`GET /buckets/shared`) and
27
+ `buckets.shares` (`list`, `create`, `revoke`).
28
+ - Bucket event notifications: `buckets.notifications` (`list`, `create`, `update`, `delete`).
29
+ - Bucket custom domains and static websites: `buckets.domains` (`list`, `create`, `update`, `delete`).
30
+ - Vendored OpenAPI spec synced to the current public API and types regenerated.
31
+
32
+ ## 0.6.1 (2026-11-25)
33
+
34
+ - The vendored spec is the one now published, and the `spec/pending` files it covers are gone; the
35
+ types are regenerated from it. `migrate.connections.enrollAgent` and `revokeAgent` work on every
36
+ connection: AWS, Google Cloud, Azure and Huawei Cloud connections can have an agent too, for
37
+ server copies, database imports and Kubernetes moves (Pantech still scans those clouds itself),
38
+ and enrollment no longer answers `409 CLOUD_CONNECTION_NOT_AGENT`. The doc comments say a
39
+ connection has one agent, and that revoking it also ends its server copy uploads in progress.
40
+ - The published spec gives two routes the id `putBucketObjectLock`; the SDK keeps its names
41
+ (`setBucketObjectLock` for an object's lock, `putBucketObjectLock` for the bucket's default) through
42
+ `scripts/renamed-operations.json`, so no type changes name.
43
+ - Operations in the published spec the SDK does not wrap yet (functions, email, instance password
44
+ reset and the database CA certificate) are listed in `scripts/not-in-sdk.json`; call them with
45
+ `client.request`.
46
+
9
47
  ## 0.6.0 (2026-11-25)
10
48
 
11
49
  - Pantech Migrate reads every cloud it supports, not only AWS: `migrate.providers.list()` lists
package/README.md CHANGED
@@ -73,7 +73,7 @@ Every method takes per-call options last: `{ signal, timeout, maxRetries, idempo
73
73
  | Kubernetes | `kubernetes.*`, `kubernetes.nodePools.*`, `kubernetes.addons.toggle(...)` |
74
74
  | Security groups | `securityGroups.*`, `securityGroups.replaceRules(id, {...})` |
75
75
  | Volumes and snapshots | `volumes.*`, `volumes.snapshots.*`, `snapshots.*` |
76
- | Object storage | `objectStorage.getStatus/getUsage`, `objectStorage.keys.*`, `buckets.*`, `buckets.objects.*`, `buckets.multipart.*` |
76
+ | Object storage | `objectStorage.getStatus/getUsage/updateSettings`, `objectStorage.keys.*`, `buckets.*` (`listShared`), `buckets.objects.*` (`createUploadForm`, `restoreVersion`), `buckets.multipart.*` (`list`, `signParts`), `buckets.shares.*`, `buckets.notifications.*`, `buckets.domains.*` |
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()` |
@@ -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
 
@@ -145,9 +147,11 @@ await client.instances.dynamicIp.disable("vm_…");
145
147
 
146
148
  ## Object storage
147
149
 
148
- `client.objectStorage` and `client.buckets` manage S3-compatible buckets, access keys, binary
149
- uploads and downloads, per-object visibility, multipart uploads, and bucket rules (CORS, lifecycle,
150
- tags, and object lock).
150
+ `client.objectStorage` and `client.buckets` manage S3-compatible buckets, org-wide Block All Public
151
+ Access settings, scoped access keys, binary uploads and downloads, browser POST upload forms,
152
+ version restore, per-object visibility, multipart uploads (including listing and batch part
153
+ signing), cross-organization shares, event notifications, custom domains, and bucket rules (CORS,
154
+ lifecycle, tags, encryption, and object lock).
151
155
 
152
156
  ```ts
153
157
  const status = await client.objectStorage.getStatus();
@@ -187,7 +191,9 @@ price comparison and a Terraform export. Nothing is created on Pantech until you
187
191
  Terraform or start a copy. `migrate.providers.list()` names every cloud it can read and how:
188
192
  AWS, Google Cloud, Azure and Huawei Cloud are `federated` (Pantech signs short-lived tokens your
189
193
  cloud trusts, so no keys are shared); DigitalOcean, Hetzner, Linode, Vultr, Contabo and OpenStack
190
- are read by the Pantech Migrate `agent`, which keeps your read-only token on your machine.
194
+ are read by the Pantech Migrate `agent`, which keeps your read-only token on your machine. Any
195
+ connection, federated ones included, can have one agent for the copy steps that read from inside
196
+ your network: server copies, database imports and Kubernetes moves.
191
197
 
192
198
  ```ts
193
199
  let conn = await client.migrate.connections.create({ name: "Production AWS" });
@@ -219,8 +225,8 @@ const { enroll_command } = await client.migrate.connections.enrollAgent(hetzner.
219
225
  await client.migrate.connections.wait(hetzner.id); // connected once the agent has enrolled
220
226
  ```
221
227
 
222
- `enrollAgent` is sent once and never retried, since each call issues a new code;
223
- `revokeAgent(id)` ends the agent at once. A plan lists the people it found as items of kind
228
+ `enrollAgent` works on every connection and is sent once and never retried, since each call
229
+ issues a new code; `revokeAgent(id)` ends the agent at once. A plan lists the people it found as items of kind
224
230
  `user`; `migrate.migrations.sendInvites(planId, { keys })` invites them with their roles, and is
225
231
  safe to repeat.
226
232
 
package/dist/index.cjs CHANGED
@@ -1518,17 +1518,24 @@ var CloudConnections = class extends APIResource {
1518
1518
  return this._delete(path`/cloud-connections/${connectionId}`, options);
1519
1519
  }
1520
1520
  /**
1521
- * For a connection read by the Pantech Migrate agent: a one-time enrollment
1522
- * code, valid once for an hour and shown only in this response. Run its
1523
- * `enroll_command` where the agent will run. Each call issues a new code
1524
- * (replacing any unused one), so it is sent once and not retried.
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.
1525
1529
  */
1526
1530
  enrollAgent(connectionId, options) {
1527
1531
  return this._post(path`/cloud-connections/${connectionId}/agent-enrollments`, void 0, options, {
1528
1532
  noRetry: true
1529
1533
  });
1530
1534
  }
1531
- /** Ends the connection's agent at once; the connection waits for a new one. Revoking again changes nothing. */
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
+ */
1532
1539
  revokeAgent(connectionId, options) {
1533
1540
  return this._delete(path`/cloud-connections/${connectionId}/agent`, options);
1534
1541
  }
@@ -1884,6 +1891,10 @@ var ObjectStorage = class extends APIResource {
1884
1891
  getUsage(params = {}, options) {
1885
1892
  return this._get("/object-storage/usage", params, options);
1886
1893
  }
1894
+ /** Turns Block All Public Access on or off for your organization. */
1895
+ updateSettings(body, options) {
1896
+ return this._patch("/object-storage/settings", body, options);
1897
+ }
1887
1898
  };
1888
1899
  var ObjectStorageKeys = class extends APIResource {
1889
1900
  /** Lists your S3 access keys without their secrets. */
@@ -1910,10 +1921,20 @@ var Buckets = class extends APIResource {
1910
1921
  objects = new BucketObjects(this._client);
1911
1922
  /** Multipart uploads for large objects. */
1912
1923
  multipart = new BucketMultipart(this._client);
1924
+ /** Cross-organization shares configured on a bucket. */
1925
+ shares = new BucketShares(this._client);
1926
+ /** Object event notification rules on a bucket. */
1927
+ notifications = new BucketNotifications(this._client);
1928
+ /** Custom domain bindings and static website settings on a bucket. */
1929
+ domains = new BucketDomains(this._client);
1913
1930
  /** Lists every bucket in your organization. */
1914
1931
  list(options) {
1915
1932
  return this._get("/buckets", void 0, options);
1916
1933
  }
1934
+ /** Lists buckets shared with your organization by other Pantech organizations. */
1935
+ listShared(options) {
1936
+ return this._get("/buckets/shared", void 0, options);
1937
+ }
1917
1938
  /** Creates a new bucket. */
1918
1939
  create(body, options) {
1919
1940
  return this._post("/buckets", body, options);
@@ -2005,6 +2026,10 @@ var BucketObjects = class extends APIResource {
2005
2026
  presignUpload(bucketId, body, options) {
2006
2027
  return this._post(path`/buckets/${bucketId}/objects/upload-url`, body, options);
2007
2028
  }
2029
+ /** Signs an HTML POST upload form (S3 POST policy) so a browser can upload directly into the bucket. */
2030
+ createUploadForm(bucketId, body, options) {
2031
+ return this._post(path`/buckets/${bucketId}/objects/upload-form`, body, options);
2032
+ }
2008
2033
  /** Creates a folder marker object ending with `/`. */
2009
2034
  createFolder(bucketId, body, options) {
2010
2035
  return this._post(path`/buckets/${bucketId}/objects/folder`, body, options);
@@ -2029,8 +2054,16 @@ var BucketObjects = class extends APIResource {
2029
2054
  setVisibility(bucketId, body, options) {
2030
2055
  return this._put(path`/buckets/${bucketId}/objects/visibility`, body, options);
2031
2056
  }
2057
+ /** Restores a previous object version as the latest version, or removes a delete marker. */
2058
+ restoreVersion(bucketId, body, options) {
2059
+ return this._post(path`/buckets/${bucketId}/objects/restore-version`, body, options);
2060
+ }
2032
2061
  };
2033
2062
  var BucketMultipart = class extends APIResource {
2063
+ /** Lists active in-progress multipart uploads in the bucket. */
2064
+ list(bucketId, options) {
2065
+ return this._get(path`/buckets/${bucketId}/objects/multipart`, void 0, options);
2066
+ }
2034
2067
  /** Starts a multipart upload session for a large object. Sent once: not retried on error. */
2035
2068
  start(bucketId, body, options) {
2036
2069
  return this._post(path`/buckets/${bucketId}/objects/multipart/start`, body, options, { noRetry: true });
@@ -2039,6 +2072,10 @@ var BucketMultipart = class extends APIResource {
2039
2072
  signPart(bucketId, body, options) {
2040
2073
  return this._post(path`/buckets/${bucketId}/objects/multipart/sign-part`, body, options);
2041
2074
  }
2075
+ /** Batch-signs short-lived upload URLs for up to 100 parts of an active multipart upload. */
2076
+ signParts(bucketId, body, options) {
2077
+ return this._post(path`/buckets/${bucketId}/objects/multipart/sign-parts`, body, options);
2078
+ }
2042
2079
  /** Uploads one part of an active multipart upload as raw bytes. */
2043
2080
  uploadPart(bucketId, params, body, options) {
2044
2081
  return this._request(
@@ -2057,6 +2094,56 @@ var BucketMultipart = class extends APIResource {
2057
2094
  return this._post(path`/buckets/${bucketId}/objects/multipart/abort`, body, options);
2058
2095
  }
2059
2096
  };
2097
+ var BucketShares = class extends APIResource {
2098
+ /** Lists active cross-organization shares configured on a bucket. */
2099
+ list(bucketId, options) {
2100
+ return this._get(path`/buckets/${bucketId}/shares`, void 0, options);
2101
+ }
2102
+ /** Grants another Pantech organization access to this bucket or specific key prefixes. */
2103
+ create(bucketId, body, options) {
2104
+ return this._post(path`/buckets/${bucketId}/shares`, body, options);
2105
+ }
2106
+ /** Revokes another organization's cross-account access to this bucket. */
2107
+ revoke(bucketId, shareId, options) {
2108
+ return this._delete(path`/buckets/${bucketId}/shares/${shareId}`, options);
2109
+ }
2110
+ };
2111
+ var BucketNotifications = class extends APIResource {
2112
+ /** Lists object event notification rules configured on this bucket. */
2113
+ list(bucketId, options) {
2114
+ return this._get(path`/buckets/${bucketId}/notifications`, void 0, options);
2115
+ }
2116
+ /** Subscribes a webhook endpoint or function to object events in this bucket. */
2117
+ create(bucketId, body, options) {
2118
+ return this._post(path`/buckets/${bucketId}/notifications`, body, options);
2119
+ }
2120
+ /** Updates events, prefix/suffix filters, or enabled state of a notification rule. */
2121
+ update(bucketId, notificationId, body, options) {
2122
+ return this._patch(path`/buckets/${bucketId}/notifications/${notificationId}`, body, options);
2123
+ }
2124
+ /** Deletes an object notification rule. */
2125
+ delete(bucketId, notificationId, options) {
2126
+ return this._delete(path`/buckets/${bucketId}/notifications/${notificationId}`, options);
2127
+ }
2128
+ };
2129
+ var BucketDomains = class extends APIResource {
2130
+ /** Lists custom domain bindings and static website settings on a bucket. */
2131
+ list(bucketId, options) {
2132
+ return this._get(path`/buckets/${bucketId}/domains`, void 0, options);
2133
+ }
2134
+ /** Binds a custom hostname with a Certificate Manager TLS certificate and static website settings. */
2135
+ create(bucketId, body, options) {
2136
+ return this._post(path`/buckets/${bucketId}/domains`, body, options);
2137
+ }
2138
+ /** Updates the TLS certificate or static website routing and cache settings on a custom domain. */
2139
+ update(bucketId, domainId, body, options) {
2140
+ return this._patch(path`/buckets/${bucketId}/domains/${domainId}`, body, options);
2141
+ }
2142
+ /** Detaches a custom domain from a bucket. */
2143
+ delete(bucketId, domainId, options) {
2144
+ return this._delete(path`/buckets/${bucketId}/domains/${domainId}`, options);
2145
+ }
2146
+ };
2060
2147
 
2061
2148
  // src/resources/operations.ts
2062
2149
  function operationId(ref) {
@@ -2488,7 +2575,7 @@ var WebhookDeliveries = class extends APIResource {
2488
2575
  };
2489
2576
 
2490
2577
  // src/version.ts
2491
- var VERSION = "0.6.0";
2578
+ var VERSION = "0.7.0";
2492
2579
 
2493
2580
  // src/client.ts
2494
2581
  var DEFAULT_BASE_URL = "https://api.pantechdynamics.com/public/v1";