@proveanything/smartlinks 1.13.2 → 1.13.3

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/api/asset.js CHANGED
@@ -316,7 +316,7 @@ export var asset;
316
316
  if (typeof options.offset === 'number')
317
317
  params.set('offset', String(options.offset));
318
318
  const qs = params.toString();
319
- const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/assets${qs ? `?${qs}` : ''}`;
319
+ const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/asset${qs ? `?${qs}` : ''}`;
320
320
  return request(path);
321
321
  }
322
322
  asset.listAdmin = listAdmin;
@@ -324,7 +324,7 @@ export var asset;
324
324
  * Get a single asset by ID (admin).
325
325
  */
326
326
  async function getAdmin(collectionId, assetId) {
327
- const path = `/admin/collection/${encodeURIComponent(collectionId)}/assets/${encodeURIComponent(assetId)}`;
327
+ const path = `/admin/collection/${encodeURIComponent(collectionId)}/asset/${encodeURIComponent(assetId)}`;
328
328
  return request(path);
329
329
  }
330
330
  asset.getAdmin = getAdmin;
@@ -332,7 +332,7 @@ export var asset;
332
332
  * Update asset metadata (admin). Use `replaceFile` to swap the file.
333
333
  */
334
334
  async function updateAdmin(options) {
335
- const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/assets/${encodeURIComponent(options.assetId)}`;
335
+ const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/asset/${encodeURIComponent(options.assetId)}`;
336
336
  const { collectionId: _c, assetId: _a } = options, body = __rest(options, ["collectionId", "assetId"]);
337
337
  return put(path, body);
338
338
  }
@@ -342,7 +342,7 @@ export var asset;
342
342
  * into `versions[]` on the asset.
343
343
  */
344
344
  async function replaceFile(options) {
345
- const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/assets/${encodeURIComponent(options.assetId)}/replace`;
345
+ const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/asset/${encodeURIComponent(options.assetId)}/replace`;
346
346
  const formData = new FormData();
347
347
  formData.append('file', options.file);
348
348
  if (options.onProgress && typeof window !== 'undefined' && !isProxyEnabled()) {
@@ -395,7 +395,7 @@ export var asset;
395
395
  if (typeof options.graceDays === 'number')
396
396
  params.set('graceDays', String(options.graceDays));
397
397
  const qs = params.toString();
398
- const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/assets/${encodeURIComponent(options.assetId)}${qs ? `?${qs}` : ''}`;
398
+ const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/asset/${encodeURIComponent(options.assetId)}${qs ? `?${qs}` : ''}`;
399
399
  return del(path);
400
400
  }
401
401
  asset.deleteAdmin = deleteAdmin;
@@ -403,7 +403,7 @@ export var asset;
403
403
  * Restore a soft-deleted asset (clears `deletedAt`).
404
404
  */
405
405
  async function restoreAdmin(collectionId, assetId) {
406
- const path = `/admin/collection/${encodeURIComponent(collectionId)}/assets/${encodeURIComponent(assetId)}/restore`;
406
+ const path = `/admin/collection/${encodeURIComponent(collectionId)}/asset/${encodeURIComponent(assetId)}/restore`;
407
407
  return post(path, {});
408
408
  }
409
409
  asset.restoreAdmin = restoreAdmin;
@@ -411,7 +411,7 @@ export var asset;
411
411
  * Soft-delete multiple assets in one request.
412
412
  */
413
413
  async function bulkDelete(options) {
414
- const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/assets/bulk-delete`;
414
+ const path = `/admin/collection/${encodeURIComponent(options.collectionId)}/asset/bulk-delete`;
415
415
  const body = { assetIds: options.assetIds };
416
416
  if (typeof options.graceDays === 'number')
417
417
  body.graceDays = options.graceDays;
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.13.2 | Generated: 2026-05-08T09:09:55.295Z
3
+ Version: 1.13.3 | Generated: 2026-05-08T10:30:25.776Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -103,7 +103,7 @@ All admin endpoints require authentication. Base path: `/api/admin/collection/:c
103
103
  ### List assets
104
104
 
105
105
  ```
106
- GET /assets
106
+ GET /asset
107
107
  ```
108
108
 
109
109
  | Parameter | Type | Description |
@@ -140,7 +140,7 @@ const { data, total } = await Api.asset.listAdmin({
140
140
  ### Get asset
141
141
 
142
142
  ```
143
- GET /assets/:assetId
143
+ GET /asset/:assetId
144
144
  ```
145
145
 
146
146
  Returns `Asset` or `404`.
@@ -152,7 +152,7 @@ Returns `Asset` or `404`.
152
152
  ### Upload asset
153
153
 
154
154
  ```
155
- POST /assets
155
+ POST /asset
156
156
  ```
157
157
 
158
158
  Use the existing `Api.asset.upload()` method (file) or `Api.asset.uploadFromUrl()` (URL import).
@@ -162,7 +162,7 @@ Use the existing `Api.asset.upload()` method (file) or `Api.asset.uploadFromUrl(
162
162
  ### Update asset metadata
163
163
 
164
164
  ```
165
- PUT /assets/:assetId
165
+ PUT /asset/:assetId
166
166
  ```
167
167
 
168
168
  Updates metadata only. Use `/replace` to swap the file.
@@ -182,7 +182,7 @@ await Api.asset.updateAdmin({
182
182
  ### Replace file
183
183
 
184
184
  ```
185
- POST /assets/:assetId/replace
185
+ POST /asset/:assetId/replace
186
186
  ```
187
187
 
188
188
  Replaces the file; the previous URL is snapshotted into `versions[]`.
@@ -201,7 +201,7 @@ await Api.asset.replaceFile({
201
201
  ### Delete asset (soft)
202
202
 
203
203
  ```
204
- DELETE /assets/:assetId?graceDays=30
204
+ DELETE /asset/:assetId?graceDays=30
205
205
  ```
206
206
 
207
207
  Sets `deletedAt` and schedules CDN purge after `graceDays` (default 30). Recoverable until purge.
@@ -215,7 +215,7 @@ await Api.asset.deleteAdmin({ collectionId: 'my-collection', assetId: 'abc123',
215
215
  ### Restore asset
216
216
 
217
217
  ```
218
- POST /assets/:assetId/restore
218
+ POST /asset/:assetId/restore
219
219
  ```
220
220
 
221
221
  Clears `deletedAt`. Asset becomes active again.
@@ -229,7 +229,7 @@ await Api.asset.restoreAdmin('my-collection', 'abc123')
229
229
  ### Bulk delete
230
230
 
231
231
  ```
232
- POST /assets/bulk-delete
232
+ POST /asset/bulk-delete
233
233
  ```
234
234
 
235
235
  ```typescript
package/dist/openapi.yaml CHANGED
@@ -105,7 +105,7 @@ paths:
105
105
  application/json:
106
106
  schema:
107
107
  $ref: "#/components/schemas/CollectionCreateRequest"
108
- /admin/collection/assets:
108
+ /admin/collection/asset:
109
109
  get:
110
110
  tags:
111
111
  - asset
@@ -216,7 +216,7 @@ paths:
216
216
  application/json:
217
217
  schema:
218
218
  $ref: "#/components/schemas/UpdateAssetOptions"
219
- /admin/collection/assets/replace:
219
+ /admin/collection/asset/replace:
220
220
  post:
221
221
  tags:
222
222
  - asset
@@ -1050,7 +1050,7 @@ paths:
1050
1050
  application/json:
1051
1051
  schema:
1052
1052
  $ref: "#/components/schemas/ResponsesRequest"
1053
- /admin/collection/{collectionId}/assets/{assetId}:
1053
+ /admin/collection/{collectionId}/asset/{assetId}:
1054
1054
  get:
1055
1055
  tags:
1056
1056
  - asset
@@ -1082,7 +1082,7 @@ paths:
1082
1082
  description: Unauthorized
1083
1083
  404:
1084
1084
  description: Not found
1085
- /admin/collection/{collectionId}/assets/{assetId}/restore:
1085
+ /admin/collection/{collectionId}/asset/{assetId}/restore:
1086
1086
  post:
1087
1087
  tags:
1088
1088
  - asset
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.13.2 | Generated: 2026-05-08T09:09:55.295Z
3
+ Version: 1.13.3 | Generated: 2026-05-08T10:30:25.776Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/docs/assets.md CHANGED
@@ -103,7 +103,7 @@ All admin endpoints require authentication. Base path: `/api/admin/collection/:c
103
103
  ### List assets
104
104
 
105
105
  ```
106
- GET /assets
106
+ GET /asset
107
107
  ```
108
108
 
109
109
  | Parameter | Type | Description |
@@ -140,7 +140,7 @@ const { data, total } = await Api.asset.listAdmin({
140
140
  ### Get asset
141
141
 
142
142
  ```
143
- GET /assets/:assetId
143
+ GET /asset/:assetId
144
144
  ```
145
145
 
146
146
  Returns `Asset` or `404`.
@@ -152,7 +152,7 @@ Returns `Asset` or `404`.
152
152
  ### Upload asset
153
153
 
154
154
  ```
155
- POST /assets
155
+ POST /asset
156
156
  ```
157
157
 
158
158
  Use the existing `Api.asset.upload()` method (file) or `Api.asset.uploadFromUrl()` (URL import).
@@ -162,7 +162,7 @@ Use the existing `Api.asset.upload()` method (file) or `Api.asset.uploadFromUrl(
162
162
  ### Update asset metadata
163
163
 
164
164
  ```
165
- PUT /assets/:assetId
165
+ PUT /asset/:assetId
166
166
  ```
167
167
 
168
168
  Updates metadata only. Use `/replace` to swap the file.
@@ -182,7 +182,7 @@ await Api.asset.updateAdmin({
182
182
  ### Replace file
183
183
 
184
184
  ```
185
- POST /assets/:assetId/replace
185
+ POST /asset/:assetId/replace
186
186
  ```
187
187
 
188
188
  Replaces the file; the previous URL is snapshotted into `versions[]`.
@@ -201,7 +201,7 @@ await Api.asset.replaceFile({
201
201
  ### Delete asset (soft)
202
202
 
203
203
  ```
204
- DELETE /assets/:assetId?graceDays=30
204
+ DELETE /asset/:assetId?graceDays=30
205
205
  ```
206
206
 
207
207
  Sets `deletedAt` and schedules CDN purge after `graceDays` (default 30). Recoverable until purge.
@@ -215,7 +215,7 @@ await Api.asset.deleteAdmin({ collectionId: 'my-collection', assetId: 'abc123',
215
215
  ### Restore asset
216
216
 
217
217
  ```
218
- POST /assets/:assetId/restore
218
+ POST /asset/:assetId/restore
219
219
  ```
220
220
 
221
221
  Clears `deletedAt`. Asset becomes active again.
@@ -229,7 +229,7 @@ await Api.asset.restoreAdmin('my-collection', 'abc123')
229
229
  ### Bulk delete
230
230
 
231
231
  ```
232
- POST /assets/bulk-delete
232
+ POST /asset/bulk-delete
233
233
  ```
234
234
 
235
235
  ```typescript
package/openapi.yaml CHANGED
@@ -105,7 +105,7 @@ paths:
105
105
  application/json:
106
106
  schema:
107
107
  $ref: "#/components/schemas/CollectionCreateRequest"
108
- /admin/collection/assets:
108
+ /admin/collection/asset:
109
109
  get:
110
110
  tags:
111
111
  - asset
@@ -216,7 +216,7 @@ paths:
216
216
  application/json:
217
217
  schema:
218
218
  $ref: "#/components/schemas/UpdateAssetOptions"
219
- /admin/collection/assets/replace:
219
+ /admin/collection/asset/replace:
220
220
  post:
221
221
  tags:
222
222
  - asset
@@ -1050,7 +1050,7 @@ paths:
1050
1050
  application/json:
1051
1051
  schema:
1052
1052
  $ref: "#/components/schemas/ResponsesRequest"
1053
- /admin/collection/{collectionId}/assets/{assetId}:
1053
+ /admin/collection/{collectionId}/asset/{assetId}:
1054
1054
  get:
1055
1055
  tags:
1056
1056
  - asset
@@ -1082,7 +1082,7 @@ paths:
1082
1082
  description: Unauthorized
1083
1083
  404:
1084
1084
  description: Not found
1085
- /admin/collection/{collectionId}/assets/{assetId}/restore:
1085
+ /admin/collection/{collectionId}/asset/{assetId}/restore:
1086
1086
  post:
1087
1087
  tags:
1088
1088
  - asset
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.13.2",
3
+ "version": "1.13.3",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",