gumnut-sdk 0.73.0 → 0.75.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 +16 -0
- package/package.json +1 -1
- package/resources/album-assets.d.mts +23 -9
- package/resources/album-assets.d.mts.map +1 -1
- package/resources/album-assets.d.ts +23 -9
- package/resources/album-assets.d.ts.map +1 -1
- package/resources/album-assets.js +13 -5
- package/resources/album-assets.js.map +1 -1
- package/resources/album-assets.mjs +13 -5
- package/resources/album-assets.mjs.map +1 -1
- package/resources/albums/albums.d.mts +45 -13
- package/resources/albums/albums.d.mts.map +1 -1
- package/resources/albums/albums.d.ts +45 -13
- package/resources/albums/albums.d.ts.map +1 -1
- package/resources/albums/albums.js +22 -10
- package/resources/albums/albums.js.map +1 -1
- package/resources/albums/albums.mjs +22 -10
- package/resources/albums/albums.mjs.map +1 -1
- package/resources/albums/assets-associations.d.mts +28 -4
- package/resources/albums/assets-associations.d.mts.map +1 -1
- package/resources/albums/assets-associations.d.ts +28 -4
- package/resources/albums/assets-associations.d.ts.map +1 -1
- package/resources/albums/assets-associations.js +9 -4
- package/resources/albums/assets-associations.js.map +1 -1
- package/resources/albums/assets-associations.mjs +9 -4
- package/resources/albums/assets-associations.mjs.map +1 -1
- package/resources/assets.d.mts +49 -22
- package/resources/assets.d.mts.map +1 -1
- package/resources/assets.d.ts +49 -22
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +27 -10
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +27 -10
- package/resources/assets.mjs.map +1 -1
- package/resources/events.d.mts +40 -31
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +40 -31
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +24 -20
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +24 -20
- package/resources/events.mjs.map +1 -1
- package/resources/faces.d.mts +43 -17
- package/resources/faces.d.mts.map +1 -1
- package/resources/faces.d.ts +43 -17
- package/resources/faces.d.ts.map +1 -1
- package/resources/faces.js +26 -9
- package/resources/faces.js.map +1 -1
- package/resources/faces.mjs +26 -9
- package/resources/faces.mjs.map +1 -1
- package/resources/libraries.d.mts +34 -7
- package/resources/libraries.d.mts.map +1 -1
- package/resources/libraries.d.ts +34 -7
- package/resources/libraries.d.ts.map +1 -1
- package/resources/libraries.js +22 -7
- package/resources/libraries.js.map +1 -1
- package/resources/libraries.mjs +22 -7
- package/resources/libraries.mjs.map +1 -1
- package/resources/people.d.mts +86 -16
- package/resources/people.d.mts.map +1 -1
- package/resources/people.d.ts +86 -16
- package/resources/people.d.ts.map +1 -1
- package/resources/people.js +33 -8
- package/resources/people.js.map +1 -1
- package/resources/people.mjs +33 -8
- package/resources/people.mjs.map +1 -1
- package/resources/search.d.mts +58 -17
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +58 -17
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +20 -3
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +20 -3
- package/resources/search.mjs.map +1 -1
- package/resources/users.d.mts +4 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +4 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +4 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +4 -1
- package/resources/users.mjs.map +1 -1
- package/src/resources/album-assets.ts +23 -9
- package/src/resources/albums/albums.ts +45 -13
- package/src/resources/albums/assets-associations.ts +28 -4
- package/src/resources/assets.ts +49 -22
- package/src/resources/events.ts +40 -31
- package/src/resources/faces.ts +43 -17
- package/src/resources/libraries.ts +34 -7
- package/src/resources/people.ts +86 -16
- package/src/resources/search.ts +58 -17
- package/src/resources/users.ts +4 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.75.0 (2026-04-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.74.0...v0.75.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.74.0...v0.75.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([2628e0f](https://github.com/gumnut-ai/photos-sdk-typescript/commit/2628e0f763d152120cc4935098c7590516964707))
|
|
10
|
+
|
|
11
|
+
## 0.74.0 (2026-04-20)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.73.0...v0.74.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.73.0...v0.74.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([28ddbde](https://github.com/gumnut-ai/photos-sdk-typescript/commit/28ddbde251fff858fe84d59233d94ae4b4f95de9))
|
|
18
|
+
|
|
3
19
|
## 0.73.0 (2026-04-17)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.72.0...v0.73.0](https://github.com/gumnut-ai/photos-sdk-typescript/compare/v0.72.0...v0.73.0)
|
package/package.json
CHANGED
|
@@ -4,15 +4,23 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
5
|
export declare class AlbumAssets extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Returns paginated _link_ records describing which assets are in which albums —
|
|
8
|
+
* each row contains `album_id` + `asset_id` + link timestamps, not the full asset
|
|
9
|
+
* or album metadata. Use this when you specifically need the junction records (for
|
|
10
|
+
* sync or change tracking).
|
|
9
11
|
*
|
|
10
|
-
* **
|
|
11
|
-
*
|
|
12
|
+
* **For most use cases you want a different tool:** use `list_assets` with
|
|
13
|
+
* `album_id` to get the full asset metadata for a specific album; use
|
|
14
|
+
* `list_albums` with `asset_id` to find which albums contain an asset.
|
|
15
|
+
*
|
|
16
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
17
|
+
* last album-asset in `data` as `starting_after_id` to fetch the next page.
|
|
12
18
|
*/
|
|
13
19
|
list(query?: AlbumAssetListParams | null | undefined, options?: RequestOptions): PagePromise<AlbumAssetResponsesCursorPage, AlbumAssetResponse>;
|
|
14
20
|
/**
|
|
15
|
-
*
|
|
21
|
+
* Fetches one album-asset link record (the junction row between an album and an
|
|
22
|
+
* asset). Rarely needed directly; most callers want `get_asset` or `get_album`
|
|
23
|
+
* instead.
|
|
16
24
|
*/
|
|
17
25
|
get(albumAssetID: string, options?: RequestOptions): APIPromise<AlbumAssetResponse>;
|
|
18
26
|
}
|
|
@@ -44,19 +52,25 @@ export interface AlbumAssetResponse {
|
|
|
44
52
|
}
|
|
45
53
|
export interface AlbumAssetListParams extends CursorPageParams {
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* Return only link records for this album ID. Equivalent to 'list the assets in
|
|
56
|
+
* this album' — in most cases prefer `list_assets` with `album_id` to get the
|
|
57
|
+
* asset metadata directly instead of the lightweight link records.
|
|
48
58
|
*/
|
|
49
59
|
album_id?: string | null;
|
|
50
60
|
/**
|
|
51
|
-
*
|
|
61
|
+
* Return only link records for this asset ID. Equivalent to 'which albums contain
|
|
62
|
+
* this asset' — in most cases prefer `list_albums` with `asset_id` to get the
|
|
63
|
+
* album metadata directly.
|
|
52
64
|
*/
|
|
53
65
|
asset_id?: string | null;
|
|
54
66
|
/**
|
|
55
|
-
*
|
|
67
|
+
* Look up specific album-asset link records by ID (max 100). The ID has the
|
|
68
|
+
* `album_asset_` prefix.
|
|
56
69
|
*/
|
|
57
70
|
ids?: Array<string> | null;
|
|
58
71
|
/**
|
|
59
|
-
* Library
|
|
72
|
+
* Library to list from. Optional if the user has a single library; required when
|
|
73
|
+
* they have multiple.
|
|
60
74
|
*/
|
|
61
75
|
library_id?: string | null;
|
|
62
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"album-assets.d.mts","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"album-assets.d.mts","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,6BAA6B,EAAE,kBAAkB,CAAC;IAOjE;;;;OAIG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGpF;AAED,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -4,15 +4,23 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
5
|
export declare class AlbumAssets extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Returns paginated _link_ records describing which assets are in which albums —
|
|
8
|
+
* each row contains `album_id` + `asset_id` + link timestamps, not the full asset
|
|
9
|
+
* or album metadata. Use this when you specifically need the junction records (for
|
|
10
|
+
* sync or change tracking).
|
|
9
11
|
*
|
|
10
|
-
* **
|
|
11
|
-
*
|
|
12
|
+
* **For most use cases you want a different tool:** use `list_assets` with
|
|
13
|
+
* `album_id` to get the full asset metadata for a specific album; use
|
|
14
|
+
* `list_albums` with `asset_id` to find which albums contain an asset.
|
|
15
|
+
*
|
|
16
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
17
|
+
* last album-asset in `data` as `starting_after_id` to fetch the next page.
|
|
12
18
|
*/
|
|
13
19
|
list(query?: AlbumAssetListParams | null | undefined, options?: RequestOptions): PagePromise<AlbumAssetResponsesCursorPage, AlbumAssetResponse>;
|
|
14
20
|
/**
|
|
15
|
-
*
|
|
21
|
+
* Fetches one album-asset link record (the junction row between an album and an
|
|
22
|
+
* asset). Rarely needed directly; most callers want `get_asset` or `get_album`
|
|
23
|
+
* instead.
|
|
16
24
|
*/
|
|
17
25
|
get(albumAssetID: string, options?: RequestOptions): APIPromise<AlbumAssetResponse>;
|
|
18
26
|
}
|
|
@@ -44,19 +52,25 @@ export interface AlbumAssetResponse {
|
|
|
44
52
|
}
|
|
45
53
|
export interface AlbumAssetListParams extends CursorPageParams {
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* Return only link records for this album ID. Equivalent to 'list the assets in
|
|
56
|
+
* this album' — in most cases prefer `list_assets` with `album_id` to get the
|
|
57
|
+
* asset metadata directly instead of the lightweight link records.
|
|
48
58
|
*/
|
|
49
59
|
album_id?: string | null;
|
|
50
60
|
/**
|
|
51
|
-
*
|
|
61
|
+
* Return only link records for this asset ID. Equivalent to 'which albums contain
|
|
62
|
+
* this asset' — in most cases prefer `list_albums` with `asset_id` to get the
|
|
63
|
+
* album metadata directly.
|
|
52
64
|
*/
|
|
53
65
|
asset_id?: string | null;
|
|
54
66
|
/**
|
|
55
|
-
*
|
|
67
|
+
* Look up specific album-asset link records by ID (max 100). The ID has the
|
|
68
|
+
* `album_asset_` prefix.
|
|
56
69
|
*/
|
|
57
70
|
ids?: Array<string> | null;
|
|
58
71
|
/**
|
|
59
|
-
* Library
|
|
72
|
+
* Library to list from. Optional if the user has a single library; required when
|
|
73
|
+
* they have multiple.
|
|
60
74
|
*/
|
|
61
75
|
library_id?: string | null;
|
|
62
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"album-assets.d.ts","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"album-assets.d.ts","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE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"}
|
|
@@ -7,11 +7,17 @@ const pagination_1 = require("../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class AlbumAssets extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Returns paginated _link_ records describing which assets are in which albums —
|
|
11
|
+
* each row contains `album_id` + `asset_id` + link timestamps, not the full asset
|
|
12
|
+
* or album metadata. Use this when you specifically need the junction records (for
|
|
13
|
+
* sync or change tracking).
|
|
12
14
|
*
|
|
13
|
-
* **
|
|
14
|
-
*
|
|
15
|
+
* **For most use cases you want a different tool:** use `list_assets` with
|
|
16
|
+
* `album_id` to get the full asset metadata for a specific album; use
|
|
17
|
+
* `list_albums` with `asset_id` to find which albums contain an asset.
|
|
18
|
+
*
|
|
19
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
20
|
+
* last album-asset in `data` as `starting_after_id` to fetch the next page.
|
|
15
21
|
*/
|
|
16
22
|
list(query = {}, options) {
|
|
17
23
|
return this._client.getAPIList('/api/album-assets', (pagination_1.CursorPage), {
|
|
@@ -20,7 +26,9 @@ class AlbumAssets extends resource_1.APIResource {
|
|
|
20
26
|
});
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
29
|
+
* Fetches one album-asset link record (the junction row between an album and an
|
|
30
|
+
* asset). Rarely needed directly; most callers want `get_asset` or `get_album`
|
|
31
|
+
* instead.
|
|
24
32
|
*/
|
|
25
33
|
get(albumAssetID, options) {
|
|
26
34
|
return this._client.get((0, path_1.path) `/api/album-assets/${albumAssetID}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"album-assets.js","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"album-assets.js","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,uBAA8B,CAAA,EAAE;YAClF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,YAAoB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AAhCD,kCAgCC"}
|
|
@@ -4,11 +4,17 @@ import { CursorPage } from "../core/pagination.mjs";
|
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class AlbumAssets extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Returns paginated _link_ records describing which assets are in which albums —
|
|
8
|
+
* each row contains `album_id` + `asset_id` + link timestamps, not the full asset
|
|
9
|
+
* or album metadata. Use this when you specifically need the junction records (for
|
|
10
|
+
* sync or change tracking).
|
|
9
11
|
*
|
|
10
|
-
* **
|
|
11
|
-
*
|
|
12
|
+
* **For most use cases you want a different tool:** use `list_assets` with
|
|
13
|
+
* `album_id` to get the full asset metadata for a specific album; use
|
|
14
|
+
* `list_albums` with `asset_id` to find which albums contain an asset.
|
|
15
|
+
*
|
|
16
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
17
|
+
* last album-asset in `data` as `starting_after_id` to fetch the next page.
|
|
12
18
|
*/
|
|
13
19
|
list(query = {}, options) {
|
|
14
20
|
return this._client.getAPIList('/api/album-assets', (CursorPage), {
|
|
@@ -17,7 +23,9 @@ export class AlbumAssets extends APIResource {
|
|
|
17
23
|
});
|
|
18
24
|
}
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
26
|
+
* Fetches one album-asset link record (the junction row between an album and an
|
|
27
|
+
* asset). Rarely needed directly; most callers want `get_asset` or `get_album`
|
|
28
|
+
* instead.
|
|
21
29
|
*/
|
|
22
30
|
get(albumAssetID, options) {
|
|
23
31
|
return this._client.get(path `/api/album-assets/${albumAssetID}`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"album-assets.mjs","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"album-assets.mjs","sourceRoot":"","sources":["../src/resources/album-assets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,UAA8B,CAAA,EAAE;YAClF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,YAAoB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
|
@@ -7,29 +7,41 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
7
7
|
export declare class Albums extends APIResource {
|
|
8
8
|
assetsAssociations: AssetsAssociationsAPI.AssetsAssociations;
|
|
9
9
|
/**
|
|
10
|
-
* Creates
|
|
11
|
-
*
|
|
10
|
+
* Creates an album (with optional name and description) and returns it. The album
|
|
11
|
+
* starts empty — follow up with `add_assets_to_album` to populate it. To rename an
|
|
12
|
+
* existing album, use `update_album` instead of creating a new one.
|
|
12
13
|
*/
|
|
13
14
|
create(body: AlbumCreateParams, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Fetches one album's metadata (name, description, cover, counts). Use when you
|
|
17
|
+
* already have an album ID. Does not include the album's assets — use
|
|
18
|
+
* `list_album_assets` or `list_assets` with `album_id` for that.
|
|
16
19
|
*/
|
|
17
20
|
retrieve(albumID: string, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
18
21
|
/**
|
|
19
|
-
* Updates the name and/or description of
|
|
22
|
+
* Updates the `name` and/or `description` of an existing album. Only the fields
|
|
23
|
+
* included in the request body are changed. To modify the contents of an album,
|
|
24
|
+
* use `add_assets_to_album` / `remove_assets_from_album` instead — this tool only
|
|
25
|
+
* changes album metadata.
|
|
20
26
|
*/
|
|
21
27
|
update(albumID: string, body: AlbumUpdateParams, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
29
|
+
* Returns a paginated list of albums ordered by creation time (newest first). Use
|
|
30
|
+
* this to enumerate a user's albums or to find which albums contain a specific
|
|
31
|
+
* asset (via `asset_id`).
|
|
25
32
|
*
|
|
26
|
-
*
|
|
27
|
-
* `
|
|
33
|
+
* `list_albums` returns album metadata only — to list the assets inside a
|
|
34
|
+
* particular album, use `list_album_assets` or `list_assets` with `album_id`.
|
|
35
|
+
*
|
|
36
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
37
|
+
* last album in `data` as `starting_after_id` to fetch the next page.
|
|
28
38
|
*/
|
|
29
39
|
list(query?: AlbumListParams | null | undefined, options?: RequestOptions): PagePromise<AlbumResponsesCursorPage, AlbumResponse>;
|
|
30
40
|
/**
|
|
31
|
-
* Deletes
|
|
32
|
-
* album.
|
|
41
|
+
* Deletes the album itself. Assets that were in the album remain in the library —
|
|
42
|
+
* only the album and its asset-links are removed. Use `delete_asset` to delete the
|
|
43
|
+
* underlying assets, or `remove_assets_from_album` to detach specific assets from
|
|
44
|
+
* an album you want to keep.
|
|
33
45
|
*/
|
|
34
46
|
delete(albumID: string, options?: RequestOptions): APIPromise<void>;
|
|
35
47
|
}
|
|
@@ -101,25 +113,45 @@ export declare namespace AlbumResponse {
|
|
|
101
113
|
}
|
|
102
114
|
}
|
|
103
115
|
export interface AlbumCreateParams {
|
|
116
|
+
/**
|
|
117
|
+
* Optional free-form description shown alongside the album name.
|
|
118
|
+
*/
|
|
104
119
|
description?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Library to create the album in. Optional if the user has a single library;
|
|
122
|
+
* required when they have multiple. Use `list_libraries` to enumerate.
|
|
123
|
+
*/
|
|
105
124
|
library_id?: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* Display name for the new album. Optional; callers that need to name an album can
|
|
127
|
+
* set it here or via `update_album` after creation.
|
|
128
|
+
*/
|
|
106
129
|
name?: string | null;
|
|
107
130
|
}
|
|
108
131
|
export interface AlbumUpdateParams {
|
|
132
|
+
/**
|
|
133
|
+
* New free-form description for the album. Omit to leave unchanged.
|
|
134
|
+
*/
|
|
109
135
|
description?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* New display name for the album. Omit to leave unchanged.
|
|
138
|
+
*/
|
|
110
139
|
name?: string | null;
|
|
111
140
|
}
|
|
112
141
|
export interface AlbumListParams extends CursorPageParams {
|
|
113
142
|
/**
|
|
114
|
-
*
|
|
143
|
+
* Return only albums that contain this asset. Useful for answering 'which albums
|
|
144
|
+
* is this photo in?' without calling `list_album_assets`.
|
|
115
145
|
*/
|
|
116
146
|
asset_id?: string | null;
|
|
117
147
|
/**
|
|
118
|
-
*
|
|
148
|
+
* Look up specific albums by ID (max 100; each ID has the `album_` prefix). Use
|
|
149
|
+
* for bulk fetch when IDs are already known.
|
|
119
150
|
*/
|
|
120
151
|
ids?: Array<string> | null;
|
|
121
152
|
/**
|
|
122
|
-
* Library to list albums from
|
|
153
|
+
* Library to list albums from. Optional if the user has a single library; required
|
|
154
|
+
* when they have multiple. Use `list_libraries` to enumerate.
|
|
123
155
|
*/
|
|
124
156
|
library_id?: string | null;
|
|
125
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"albums.d.mts","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EACnB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,kBAAkB,EAAE,qBAAqB,CAAC,kBAAkB,CAE1D;IAEF
|
|
1
|
+
{"version":3,"file":"albums.d.mts","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EACnB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,kBAAkB,EAAE,qBAAqB,CAAC,kBAAkB,CAE1D;IAEF;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EA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KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -7,29 +7,41 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
7
7
|
export declare class Albums extends APIResource {
|
|
8
8
|
assetsAssociations: AssetsAssociationsAPI.AssetsAssociations;
|
|
9
9
|
/**
|
|
10
|
-
* Creates
|
|
11
|
-
*
|
|
10
|
+
* Creates an album (with optional name and description) and returns it. The album
|
|
11
|
+
* starts empty — follow up with `add_assets_to_album` to populate it. To rename an
|
|
12
|
+
* existing album, use `update_album` instead of creating a new one.
|
|
12
13
|
*/
|
|
13
14
|
create(body: AlbumCreateParams, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Fetches one album's metadata (name, description, cover, counts). Use when you
|
|
17
|
+
* already have an album ID. Does not include the album's assets — use
|
|
18
|
+
* `list_album_assets` or `list_assets` with `album_id` for that.
|
|
16
19
|
*/
|
|
17
20
|
retrieve(albumID: string, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
18
21
|
/**
|
|
19
|
-
* Updates the name and/or description of
|
|
22
|
+
* Updates the `name` and/or `description` of an existing album. Only the fields
|
|
23
|
+
* included in the request body are changed. To modify the contents of an album,
|
|
24
|
+
* use `add_assets_to_album` / `remove_assets_from_album` instead — this tool only
|
|
25
|
+
* changes album metadata.
|
|
20
26
|
*/
|
|
21
27
|
update(albumID: string, body: AlbumUpdateParams, options?: RequestOptions): APIPromise<AlbumResponse>;
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
29
|
+
* Returns a paginated list of albums ordered by creation time (newest first). Use
|
|
30
|
+
* this to enumerate a user's albums or to find which albums contain a specific
|
|
31
|
+
* asset (via `asset_id`).
|
|
25
32
|
*
|
|
26
|
-
*
|
|
27
|
-
* `
|
|
33
|
+
* `list_albums` returns album metadata only — to list the assets inside a
|
|
34
|
+
* particular album, use `list_album_assets` or `list_assets` with `album_id`.
|
|
35
|
+
*
|
|
36
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
37
|
+
* last album in `data` as `starting_after_id` to fetch the next page.
|
|
28
38
|
*/
|
|
29
39
|
list(query?: AlbumListParams | null | undefined, options?: RequestOptions): PagePromise<AlbumResponsesCursorPage, AlbumResponse>;
|
|
30
40
|
/**
|
|
31
|
-
* Deletes
|
|
32
|
-
* album.
|
|
41
|
+
* Deletes the album itself. Assets that were in the album remain in the library —
|
|
42
|
+
* only the album and its asset-links are removed. Use `delete_asset` to delete the
|
|
43
|
+
* underlying assets, or `remove_assets_from_album` to detach specific assets from
|
|
44
|
+
* an album you want to keep.
|
|
33
45
|
*/
|
|
34
46
|
delete(albumID: string, options?: RequestOptions): APIPromise<void>;
|
|
35
47
|
}
|
|
@@ -101,25 +113,45 @@ export declare namespace AlbumResponse {
|
|
|
101
113
|
}
|
|
102
114
|
}
|
|
103
115
|
export interface AlbumCreateParams {
|
|
116
|
+
/**
|
|
117
|
+
* Optional free-form description shown alongside the album name.
|
|
118
|
+
*/
|
|
104
119
|
description?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Library to create the album in. Optional if the user has a single library;
|
|
122
|
+
* required when they have multiple. Use `list_libraries` to enumerate.
|
|
123
|
+
*/
|
|
105
124
|
library_id?: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* Display name for the new album. Optional; callers that need to name an album can
|
|
127
|
+
* set it here or via `update_album` after creation.
|
|
128
|
+
*/
|
|
106
129
|
name?: string | null;
|
|
107
130
|
}
|
|
108
131
|
export interface AlbumUpdateParams {
|
|
132
|
+
/**
|
|
133
|
+
* New free-form description for the album. Omit to leave unchanged.
|
|
134
|
+
*/
|
|
109
135
|
description?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* New display name for the album. Omit to leave unchanged.
|
|
138
|
+
*/
|
|
110
139
|
name?: string | null;
|
|
111
140
|
}
|
|
112
141
|
export interface AlbumListParams extends CursorPageParams {
|
|
113
142
|
/**
|
|
114
|
-
*
|
|
143
|
+
* Return only albums that contain this asset. Useful for answering 'which albums
|
|
144
|
+
* is this photo in?' without calling `list_album_assets`.
|
|
115
145
|
*/
|
|
116
146
|
asset_id?: string | null;
|
|
117
147
|
/**
|
|
118
|
-
*
|
|
148
|
+
* Look up specific albums by ID (max 100; each ID has the `album_` prefix). Use
|
|
149
|
+
* for bulk fetch when IDs are already known.
|
|
119
150
|
*/
|
|
120
151
|
ids?: Array<string> | null;
|
|
121
152
|
/**
|
|
122
|
-
* Library to list albums from
|
|
153
|
+
* Library to list albums from. Optional if the user has a single library; required
|
|
154
|
+
* when they have multiple. Use `list_libraries` to enumerate.
|
|
123
155
|
*/
|
|
124
156
|
library_id?: string | null;
|
|
125
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"albums.d.ts","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EACnB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,kBAAkB,EAAE,qBAAqB,CAAC,kBAAkB,CAE1D;IAEF
|
|
1
|
+
{"version":3,"file":"albums.d.ts","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,qBAAqB;OAC1B,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EACnB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,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eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EACL,kBAAkB,IAAI,kBAAkB,EACxC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -15,37 +15,49 @@ class Albums extends resource_1.APIResource {
|
|
|
15
15
|
this.assetsAssociations = new AssetsAssociationsAPI.AssetsAssociations(this._client);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Creates
|
|
19
|
-
*
|
|
18
|
+
* Creates an album (with optional name and description) and returns it. The album
|
|
19
|
+
* starts empty — follow up with `add_assets_to_album` to populate it. To rename an
|
|
20
|
+
* existing album, use `update_album` instead of creating a new one.
|
|
20
21
|
*/
|
|
21
22
|
create(body, options) {
|
|
22
23
|
return this._client.post('/api/albums', { body, ...options });
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* Fetches one album's metadata (name, description, cover, counts). Use when you
|
|
27
|
+
* already have an album ID. Does not include the album's assets — use
|
|
28
|
+
* `list_album_assets` or `list_assets` with `album_id` for that.
|
|
26
29
|
*/
|
|
27
30
|
retrieve(albumID, options) {
|
|
28
31
|
return this._client.get((0, path_1.path) `/api/albums/${albumID}`, options);
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
|
-
* Updates the name and/or description of
|
|
34
|
+
* Updates the `name` and/or `description` of an existing album. Only the fields
|
|
35
|
+
* included in the request body are changed. To modify the contents of an album,
|
|
36
|
+
* use `add_assets_to_album` / `remove_assets_from_album` instead — this tool only
|
|
37
|
+
* changes album metadata.
|
|
32
38
|
*/
|
|
33
39
|
update(albumID, body, options) {
|
|
34
40
|
return this._client.patch((0, path_1.path) `/api/albums/${albumID}`, { body, ...options });
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
43
|
+
* Returns a paginated list of albums ordered by creation time (newest first). Use
|
|
44
|
+
* this to enumerate a user's albums or to find which albums contain a specific
|
|
45
|
+
* asset (via `asset_id`).
|
|
39
46
|
*
|
|
40
|
-
*
|
|
41
|
-
* `
|
|
47
|
+
* `list_albums` returns album metadata only — to list the assets inside a
|
|
48
|
+
* particular album, use `list_album_assets` or `list_assets` with `album_id`.
|
|
49
|
+
*
|
|
50
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
51
|
+
* last album in `data` as `starting_after_id` to fetch the next page.
|
|
42
52
|
*/
|
|
43
53
|
list(query = {}, options) {
|
|
44
54
|
return this._client.getAPIList('/api/albums', (pagination_1.CursorPage), { query, ...options });
|
|
45
55
|
}
|
|
46
56
|
/**
|
|
47
|
-
* Deletes
|
|
48
|
-
* album.
|
|
57
|
+
* Deletes the album itself. Assets that were in the album remain in the library —
|
|
58
|
+
* only the album and its asset-links are removed. Use `delete_asset` to delete the
|
|
59
|
+
* underlying assets, or `remove_assets_from_album` to detach specific assets from
|
|
60
|
+
* an album you want to keep.
|
|
49
61
|
*/
|
|
50
62
|
delete(albumID, options) {
|
|
51
63
|
return this._client.delete((0, path_1.path) `/api/albums/${albumID}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"albums.js","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,wFAA+D;AAC/D,kEAM+B;AAE/B,yDAAuF;AACvF,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"albums.js","sourceRoot":"","sources":["../../src/resources/albums/albums.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,wFAA+D;AAC/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C,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA/DD,wBA+DC;AAoID,MAAM,CAAC,kBAAkB,GAAG,wCAAkB,CAAC"}
|
|
@@ -11,37 +11,49 @@ export class Albums extends APIResource {
|
|
|
11
11
|
this.assetsAssociations = new AssetsAssociationsAPI.AssetsAssociations(this._client);
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Creates
|
|
15
|
-
*
|
|
14
|
+
* Creates an album (with optional name and description) and returns it. The album
|
|
15
|
+
* starts empty — follow up with `add_assets_to_album` to populate it. To rename an
|
|
16
|
+
* existing album, use `update_album` instead of creating a new one.
|
|
16
17
|
*/
|
|
17
18
|
create(body, options) {
|
|
18
19
|
return this._client.post('/api/albums', { body, ...options });
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Fetches one album's metadata (name, description, cover, counts). Use when you
|
|
23
|
+
* already have an album ID. Does not include the album's assets — use
|
|
24
|
+
* `list_album_assets` or `list_assets` with `album_id` for that.
|
|
22
25
|
*/
|
|
23
26
|
retrieve(albumID, options) {
|
|
24
27
|
return this._client.get(path `/api/albums/${albumID}`, options);
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
|
-
* Updates the name and/or description of
|
|
30
|
+
* Updates the `name` and/or `description` of an existing album. Only the fields
|
|
31
|
+
* included in the request body are changed. To modify the contents of an album,
|
|
32
|
+
* use `add_assets_to_album` / `remove_assets_from_album` instead — this tool only
|
|
33
|
+
* changes album metadata.
|
|
28
34
|
*/
|
|
29
35
|
update(albumID, body, options) {
|
|
30
36
|
return this._client.patch(path `/api/albums/${albumID}`, { body, ...options });
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
39
|
+
* Returns a paginated list of albums ordered by creation time (newest first). Use
|
|
40
|
+
* this to enumerate a user's albums or to find which albums contain a specific
|
|
41
|
+
* asset (via `asset_id`).
|
|
35
42
|
*
|
|
36
|
-
*
|
|
37
|
-
* `
|
|
43
|
+
* `list_albums` returns album metadata only — to list the assets inside a
|
|
44
|
+
* particular album, use `list_album_assets` or `list_assets` with `album_id`.
|
|
45
|
+
*
|
|
46
|
+
* **Pagination** is cursor-based: when `has_more` is true, pass the `id` of the
|
|
47
|
+
* last album in `data` as `starting_after_id` to fetch the next page.
|
|
38
48
|
*/
|
|
39
49
|
list(query = {}, options) {
|
|
40
50
|
return this._client.getAPIList('/api/albums', (CursorPage), { query, ...options });
|
|
41
51
|
}
|
|
42
52
|
/**
|
|
43
|
-
* Deletes
|
|
44
|
-
* album.
|
|
53
|
+
* Deletes the album itself. Assets that were in the album remain in the library —
|
|
54
|
+
* only the album and its asset-links are removed. Use `delete_asset` to delete the
|
|
55
|
+
* underlying assets, or `remove_assets_from_album` to detach specific assets from
|
|
56
|
+
* an album you want to keep.
|
|
45
57
|
*/
|
|
46
58
|
delete(albumID, options) {
|
|
47
59
|
return this._client.delete(path `/api/albums/${albumID}`, {
|