@nurama/sdk 1.4.5 → 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.
@@ -5973,6 +5973,39 @@
5973
5973
  sendJWT: true
5974
5974
  });
5975
5975
  },
5976
+ /**
5977
+ * Gets your reading position in a project's highlights: when you last
5978
+ * caught up, and how many messages others have highlighted since. If you
5979
+ * have never caught up, it counts from when read tracking began.
5980
+ * @param {string} projectId - The project ID.
5981
+ * @param {'creator' | 'reviewer'} visibility - Which highlights.
5982
+ * @returns {Promise<ReadState>} Your reading position.
5983
+ */
5984
+ async getHighlightsReadState(projectId, visibility) {
5985
+ if (!projectId) throw new Error("projectId is required.");
5986
+ if (!visibility) throw new Error("visibility is required.");
5987
+ return client._request({
5988
+ method: "GET",
5989
+ endpoint: `/v1/projects/${projectId}/${visibility}/highlighted-messages/read-state`,
5990
+ sendJWT: true
5991
+ });
5992
+ },
5993
+ /**
5994
+ * Marks a project's highlights as read. Pass `lastReadAt` (epoch ms) — the
5995
+ * `highlightedAt` of the newest highlight you had loaded; omit it to catch
5996
+ * up to now. The marker only moves forward and never past the present.
5997
+ * @returns {Promise<ReadState>} Your updated reading position.
5998
+ */
5999
+ async markHighlightsCaughtUp(projectId, visibility, lastReadAt) {
6000
+ if (!projectId) throw new Error("projectId is required.");
6001
+ if (!visibility) throw new Error("visibility is required.");
6002
+ return client._request({
6003
+ method: "POST",
6004
+ endpoint: `/v1/projects/${projectId}/${visibility}/highlighted-messages/read-state`,
6005
+ body: lastReadAt === void 0 ? {} : { lastReadAt },
6006
+ sendJWT: true
6007
+ });
6008
+ },
5976
6009
  /**
5977
6010
  * Top-N assets in a project by access-activity event type (plays, downloads, embeds).
5978
6011
  * Requires project read access. Returns asset IDs and counts only; hydrate names and
@@ -5990,6 +6023,66 @@
5990
6023
  params,
5991
6024
  sendJWT: true
5992
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
+ });
5993
6086
  }
5994
6087
  };
5995
6088
  }
@@ -6377,6 +6470,75 @@
6377
6470
  sendJWT: true
6378
6471
  });
6379
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
+ },
6380
6542
  /**
6381
6543
  * Updates an asset.
6382
6544
  * @param {string} assetId - The ID of the asset to update.
@@ -8589,11 +8751,12 @@
8589
8751
  });
8590
8752
  },
8591
8753
  /**
8592
- * List active starter-package "plans" available to the caller,
8593
- * scoped by user-level restrictions but NOT bound to a workspace.
8594
- * Used by the post-signup plan-selection overlay before any
8595
- * workspace exists.
8596
- * @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.
8597
8760
  */
8598
8761
  async listPlans() {
8599
8762
  return client._request({
@@ -11556,10 +11719,10 @@
11556
11719
 
11557
11720
  // src/version.ts
11558
11721
  var SDK_VERSION = {
11559
- version: "1.4.5",
11560
- buildTimestamp: "2026-10-29T06:59:31.498Z",
11561
- buildHash: "b0bbfd265120e5fd826237cc63c5bf7d",
11562
- gitCommit: "9307f8f",
11722
+ version: "1.4.7",
11723
+ buildTimestamp: "2026-11-11T06:13:04.718Z",
11724
+ buildHash: "18b104b8bee310a1409fe4e5ca11eb33",
11725
+ gitCommit: "dccf5ca",
11563
11726
  dirty: false
11564
11727
  };
11565
11728