@nurama/sdk 1.4.6 → 1.4.7

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.
@@ -6023,6 +6023,66 @@
6023
6023
  params,
6024
6024
  sendJWT: true
6025
6025
  });
6026
+ },
6027
+ /**
6028
+ * What pruning the originals of a selection of the project's assets would
6029
+ * do, without doing it. Needs `canPruneAsset` on the project.
6030
+ * @param {string} projectId - The project ID.
6031
+ * @param {AssetPruneSelection} selection - Asset ids, creator-tree paths, or both.
6032
+ * @returns {Promise<AssetPrunePreview>} Each asset's eligibility, and the totals.
6033
+ */
6034
+ async previewPruneOriginals(projectId, selection) {
6035
+ if (!projectId) throw new Error("projectId is required.");
6036
+ return client._request({
6037
+ method: "POST",
6038
+ endpoint: `/v1/projects/${projectId}/original-pruning/preview`,
6039
+ body: selection,
6040
+ sendJWT: true
6041
+ });
6042
+ },
6043
+ /**
6044
+ * Requests prunes for every asset in the selection that can be pruned.
6045
+ * Needs `canPruneAsset` on the project.
6046
+ * @param {string} projectId - The project ID.
6047
+ * @param {AssetPruneSelection} selection - Asset ids, creator-tree paths, or both.
6048
+ * @returns {Promise<AssetPruneRequestResult>} The requested and skipped assets.
6049
+ */
6050
+ async pruneOriginals(projectId, selection) {
6051
+ if (!projectId) throw new Error("projectId is required.");
6052
+ return client._request({
6053
+ method: "POST",
6054
+ endpoint: `/v1/projects/${projectId}/original-pruning/prune`,
6055
+ body: selection,
6056
+ sendJWT: true
6057
+ });
6058
+ },
6059
+ /**
6060
+ * Cancels every waiting prune in the selection. Needs `canPruneAsset` on the project.
6061
+ * @param {string} projectId - The project ID.
6062
+ * @param {AssetPruneSelection} selection - Asset ids, creator-tree paths, or both.
6063
+ * @returns {Promise<AssetPruneCancelResult>} The cancelled assets, and those with nothing waiting.
6064
+ */
6065
+ async cancelPruneOriginals(projectId, selection) {
6066
+ if (!projectId) throw new Error("projectId is required.");
6067
+ return client._request({
6068
+ method: "POST",
6069
+ endpoint: `/v1/projects/${projectId}/original-pruning/cancel`,
6070
+ body: selection,
6071
+ sendJWT: true
6072
+ });
6073
+ },
6074
+ /**
6075
+ * The project's pruning policy and what it has done. Needs `canManageProjectSettings`.
6076
+ * @param {string} projectId - The project ID.
6077
+ * @returns {Promise<ProjectPruningSummary>} The summary.
6078
+ */
6079
+ async getOriginalPruningSummary(projectId) {
6080
+ if (!projectId) throw new Error("projectId is required.");
6081
+ return client._request({
6082
+ method: "GET",
6083
+ endpoint: `/v1/projects/${projectId}/original-pruning/summary`,
6084
+ sendJWT: true
6085
+ });
6026
6086
  }
6027
6087
  };
6028
6088
  }
@@ -6410,6 +6470,75 @@
6410
6470
  sendJWT: true
6411
6471
  });
6412
6472
  },
6473
+ /**
6474
+ * Where an asset's original is, what the project's pruning policy will do
6475
+ * with it, and whether it can be pruned by hand now. Needs `canGetAssetOriginal`.
6476
+ * @param {string} assetId - The ID of the asset.
6477
+ * @returns {Promise<AssetOriginalStatus>} The original's state.
6478
+ */
6479
+ async getOriginal(assetId) {
6480
+ if (!assetId) throw new Error("assetId is required.");
6481
+ return client._request({
6482
+ method: "GET",
6483
+ endpoint: `/v1/assets/${assetId}/original`,
6484
+ sendJWT: true
6485
+ });
6486
+ },
6487
+ /**
6488
+ * The history of an asset's original, newest first. Needs `canGetAssetOriginal`.
6489
+ * @param {string} assetId - The ID of the asset.
6490
+ * @returns {Promise<{ results: AssetOriginalHistoryEntry[] }>} The history.
6491
+ */
6492
+ async getOriginalHistory(assetId) {
6493
+ if (!assetId) throw new Error("assetId is required.");
6494
+ return client._request({
6495
+ method: "GET",
6496
+ endpoint: `/v1/assets/${assetId}/original/history`,
6497
+ sendJWT: true
6498
+ });
6499
+ },
6500
+ /**
6501
+ * Requests that an asset's original be pruned once the undo window has
6502
+ * passed (`pruneAfter`). Needs `canPruneAsset`.
6503
+ * @param {string} assetId - The ID of the asset.
6504
+ * @returns {Promise<Asset>} The asset, now waiting to be pruned.
6505
+ */
6506
+ async pruneOriginal(assetId) {
6507
+ if (!assetId) throw new Error("assetId is required.");
6508
+ return client._request({
6509
+ method: "POST",
6510
+ endpoint: `/v1/assets/${assetId}/original/prune`,
6511
+ sendJWT: true
6512
+ });
6513
+ },
6514
+ /**
6515
+ * Cancels a requested prune before it runs. Needs `canPruneAsset`.
6516
+ * @param {string} assetId - The ID of the asset.
6517
+ * @returns {Promise<Asset>} The asset, with its original back to `stored`.
6518
+ */
6519
+ async cancelPruneOriginal(assetId) {
6520
+ if (!assetId) throw new Error("assetId is required.");
6521
+ return client._request({
6522
+ method: "DELETE",
6523
+ endpoint: `/v1/assets/${assetId}/original/prune`,
6524
+ sendJWT: true
6525
+ });
6526
+ },
6527
+ /**
6528
+ * Exempts an asset from pruning, or lifts the exemption. Needs `canPruneAsset`.
6529
+ * @param {string} assetId - The ID of the asset.
6530
+ * @param {boolean} keepOriginal - True to exempt the asset.
6531
+ * @returns {Promise<Asset>} The asset.
6532
+ */
6533
+ async setKeepOriginal(assetId, keepOriginal) {
6534
+ if (!assetId) throw new Error("assetId is required.");
6535
+ return client._request({
6536
+ method: "PUT",
6537
+ endpoint: `/v1/assets/${assetId}/original/keep`,
6538
+ body: { keepOriginal },
6539
+ sendJWT: true
6540
+ });
6541
+ },
6413
6542
  /**
6414
6543
  * Updates an asset.
6415
6544
  * @param {string} assetId - The ID of the asset to update.
@@ -8622,11 +8751,12 @@
8622
8751
  });
8623
8752
  },
8624
8753
  /**
8625
- * List active starter-package "plans" available to the caller,
8626
- * scoped by user-level restrictions but NOT bound to a workspace.
8627
- * Used by the post-signup plan-selection overlay before any
8628
- * workspace exists.
8629
- * @returns {Promise<ProductResponse[]>} Active starter-package plans.
8754
+ * The base-plan catalogue. Works signed out: without a session it is the
8755
+ * public catalogue (active, unrestricted plans). With one it also has the
8756
+ * promo plans restricted to the caller (`restricted: true`) and leaves out
8757
+ * a Demo they've already used. Plans carry only their public fields —
8758
+ * no `restrictTo`, `notes` or payment-provider ids.
8759
+ * @returns {Promise<ProductResponse[]>} Base plans available to the caller.
8630
8760
  */
8631
8761
  async listPlans() {
8632
8762
  return client._request({
@@ -11589,10 +11719,10 @@
11589
11719
 
11590
11720
  // src/version.ts
11591
11721
  var SDK_VERSION = {
11592
- version: "1.4.6",
11593
- buildTimestamp: "2026-10-30T09:37:39.703Z",
11594
- buildHash: "591a47b7ee697e4b2fd756a50b5b647e",
11595
- gitCommit: "e46370d",
11722
+ version: "1.4.7",
11723
+ buildTimestamp: "2026-11-11T06:13:04.718Z",
11724
+ buildHash: "18b104b8bee310a1409fe4e5ca11eb33",
11725
+ gitCommit: "dccf5ca",
11596
11726
  dirty: false
11597
11727
  };
11598
11728