@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.
- package/dist/browser/nurama-bot-sdk.js +139 -9
- package/dist/browser/nurama-bot-sdk.min.js +1 -1
- package/dist/browser/nurama-sdk.js +139 -9
- package/dist/browser/nurama-sdk.min.js +1 -1
- package/dist/routes/asset.d.ts +36 -1
- package/dist/routes/asset.d.ts.map +1 -1
- package/dist/routes/asset.js +74 -0
- package/dist/routes/asset.js.map +1 -1
- package/dist/routes/product.d.ts +6 -5
- package/dist/routes/product.d.ts.map +1 -1
- package/dist/routes/product.js +6 -5
- package/dist/routes/product.js.map +1 -1
- package/dist/routes/project.d.ts +30 -1
- package/dist/routes/project.d.ts.map +1 -1
- package/dist/routes/project.js +64 -0
- package/dist/routes/project.js.map +1 -1
- package/dist/version.js +4 -4
- package/package.json +2 -2
- package/src/routes/asset.ts +81 -1
- package/src/routes/product.ts +6 -5
- package/src/routes/project.ts +69 -0
- package/src/version.ts +4 -4
|
@@ -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
|
-
*
|
|
8626
|
-
*
|
|
8627
|
-
*
|
|
8628
|
-
*
|
|
8629
|
-
*
|
|
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.
|
|
11593
|
-
buildTimestamp: "2026-
|
|
11594
|
-
buildHash: "
|
|
11595
|
-
gitCommit: "
|
|
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
|
|