@mediaviz/react-native-sdk 1.11.0-rc.9 → 1.12.0-dev.128
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/sdk.cjs +120 -30
- package/dist/sdk.d.cts +15 -2
- package/dist/sdk.d.ts +15 -2
- package/dist/sdk.esm.d.ts +15 -2
- package/dist/sdk.esm.js +120 -31
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -1115,7 +1115,7 @@ class AiModelCredits {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
|
|
1118
|
-
function stripUndef$
|
|
1118
|
+
function stripUndef$b(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1119
1119
|
|
|
1120
1120
|
class Admin {
|
|
1121
1121
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1130,7 +1130,7 @@ class Admin {
|
|
|
1130
1130
|
async adminSetCompanyCanManageApiClients(companyId, canManageApiClients) {
|
|
1131
1131
|
this._ctx.requireTokens();
|
|
1132
1132
|
const path = `/api/v1/admin/companies/${encodeURIComponent(companyId)}/can_manage_api_clients`;
|
|
1133
|
-
const body = stripUndef$
|
|
1133
|
+
const body = stripUndef$b({
|
|
1134
1134
|
can_manage_api_clients: canManageApiClients,
|
|
1135
1135
|
});
|
|
1136
1136
|
const { data } = await this._ctx.client.request(path, 'PATCH', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
@@ -1161,7 +1161,7 @@ class Company {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
-
function stripUndef$
|
|
1164
|
+
function stripUndef$a(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1165
1165
|
|
|
1166
1166
|
class CuratedAlbums {
|
|
1167
1167
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1169,7 +1169,7 @@ class CuratedAlbums {
|
|
|
1169
1169
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1170
1170
|
this._ctx.requireTokens();
|
|
1171
1171
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1172
|
-
const body = stripUndef$
|
|
1172
|
+
const body = stripUndef$a({
|
|
1173
1173
|
name: name,
|
|
1174
1174
|
description: description,
|
|
1175
1175
|
confidence_value: confidenceValue,
|
|
@@ -1223,7 +1223,7 @@ class CuratedAlbums {
|
|
|
1223
1223
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1224
1224
|
this._ctx.requireTokens();
|
|
1225
1225
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1226
|
-
const body = stripUndef$
|
|
1226
|
+
const body = stripUndef$a({
|
|
1227
1227
|
name: name,
|
|
1228
1228
|
description: description,
|
|
1229
1229
|
confidence_value: confidenceValue,
|
|
@@ -1247,7 +1247,7 @@ class CuratedAlbums {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
|
-
function stripUndef$
|
|
1250
|
+
function stripUndef$9(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1251
1251
|
|
|
1252
1252
|
class CustomAlbums {
|
|
1253
1253
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1295,7 +1295,7 @@ class CustomAlbums {
|
|
|
1295
1295
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1296
1296
|
this._ctx.requireTokens();
|
|
1297
1297
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1298
|
-
const body = stripUndef$
|
|
1298
|
+
const body = stripUndef$9({
|
|
1299
1299
|
name: name,
|
|
1300
1300
|
description: description,
|
|
1301
1301
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1308,7 +1308,7 @@ class CustomAlbums {
|
|
|
1308
1308
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1309
1309
|
this._ctx.requireTokens();
|
|
1310
1310
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1311
|
-
const body = stripUndef$
|
|
1311
|
+
const body = stripUndef$9({
|
|
1312
1312
|
name: name,
|
|
1313
1313
|
description: description,
|
|
1314
1314
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1408,7 +1408,7 @@ async function handleResponse(response) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
1410
|
|
|
1411
|
-
function stripUndef$
|
|
1411
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1412
1412
|
|
|
1413
1413
|
class EmailTokens {
|
|
1414
1414
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1439,7 +1439,7 @@ class EmailTokens {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
1441
|
async validateToken(token) {
|
|
1442
|
-
const body = stripUndef$
|
|
1442
|
+
const body = stripUndef$8({
|
|
1443
1443
|
token: token,
|
|
1444
1444
|
});
|
|
1445
1445
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1451,7 +1451,7 @@ class EmailTokens {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
1453
|
async resetPassword(token, newPassword) {
|
|
1454
|
-
const body = stripUndef$
|
|
1454
|
+
const body = stripUndef$8({
|
|
1455
1455
|
token: token,
|
|
1456
1456
|
new_password: newPassword,
|
|
1457
1457
|
});
|
|
@@ -1490,7 +1490,7 @@ class Health {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
|
|
1493
|
-
function stripUndef$
|
|
1493
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1494
1494
|
|
|
1495
1495
|
class Keywords {
|
|
1496
1496
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1498,7 +1498,7 @@ class Keywords {
|
|
|
1498
1498
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1499
1499
|
this._ctx.requireTokens();
|
|
1500
1500
|
const path = `/api/v1/keyword/`;
|
|
1501
|
-
const body = stripUndef$
|
|
1501
|
+
const body = stripUndef$7({
|
|
1502
1502
|
name: name,
|
|
1503
1503
|
project_list: projectList,
|
|
1504
1504
|
});
|
|
@@ -1551,7 +1551,7 @@ class Keywords {
|
|
|
1551
1551
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1552
1552
|
this._ctx.requireTokens();
|
|
1553
1553
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1554
|
-
const body = stripUndef$
|
|
1554
|
+
const body = stripUndef$7({
|
|
1555
1555
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1556
1556
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1557
1557
|
});
|
|
@@ -1562,7 +1562,7 @@ class Keywords {
|
|
|
1562
1562
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1563
1563
|
this._ctx.requireTokens();
|
|
1564
1564
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1565
|
-
const body = stripUndef$
|
|
1565
|
+
const body = stripUndef$7({
|
|
1566
1566
|
name: name,
|
|
1567
1567
|
project_list: projectList,
|
|
1568
1568
|
});
|
|
@@ -1695,7 +1695,7 @@ class OauthAuthorization {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
|
|
1698
|
-
function stripUndef$
|
|
1698
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1699
1699
|
|
|
1700
1700
|
class OauthClients {
|
|
1701
1701
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1703,7 +1703,7 @@ class OauthClients {
|
|
|
1703
1703
|
async createApiCredential(credentialName) {
|
|
1704
1704
|
this._ctx.requireTokens();
|
|
1705
1705
|
const path = `/oauth/clients/api-credentials`;
|
|
1706
|
-
const body = stripUndef$
|
|
1706
|
+
const body = stripUndef$6({
|
|
1707
1707
|
credential_name: credentialName,
|
|
1708
1708
|
});
|
|
1709
1709
|
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
@@ -1857,7 +1857,7 @@ class Person {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
1859
|
|
|
1860
|
-
function stripUndef$
|
|
1860
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1861
1861
|
|
|
1862
1862
|
class Projects {
|
|
1863
1863
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1870,7 +1870,7 @@ class Projects {
|
|
|
1870
1870
|
if (models !== undefined) (Array.isArray(models) ? models : [models]).forEach(v => query.append('models', v));
|
|
1871
1871
|
const qs = query.toString();
|
|
1872
1872
|
if (qs) path += '?' + qs;
|
|
1873
|
-
const body = stripUndef$
|
|
1873
|
+
const body = stripUndef$5({
|
|
1874
1874
|
name: name,
|
|
1875
1875
|
private: private_,
|
|
1876
1876
|
type: type,
|
|
@@ -1940,7 +1940,7 @@ class Projects {
|
|
|
1940
1940
|
async updateProject(projectId, { private: private_, type, description, directory, name, thumbnail } = {}) {
|
|
1941
1941
|
this._ctx.requireTokens();
|
|
1942
1942
|
const path = `/api/v1/projects/${encodeURIComponent(projectId)}`;
|
|
1943
|
-
const body = stripUndef$
|
|
1943
|
+
const body = stripUndef$5({
|
|
1944
1944
|
private: private_,
|
|
1945
1945
|
type: type,
|
|
1946
1946
|
description: description,
|
|
@@ -2019,7 +2019,7 @@ class Projects {
|
|
|
2019
2019
|
async addProjectEvent(projectTableName, event, detail = undefined) {
|
|
2020
2020
|
this._ctx.requireTokens();
|
|
2021
2021
|
const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/event`;
|
|
2022
|
-
const body = stripUndef$
|
|
2022
|
+
const body = stripUndef$5({
|
|
2023
2023
|
event: event,
|
|
2024
2024
|
detail: detail,
|
|
2025
2025
|
});
|
|
@@ -2070,7 +2070,7 @@ class Photoupload {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
2072
|
|
|
2073
|
-
function stripUndef$
|
|
2073
|
+
function stripUndef$4(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2074
2074
|
|
|
2075
2075
|
class Photos {
|
|
2076
2076
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -2136,7 +2136,7 @@ class Photos {
|
|
|
2136
2136
|
async updatePhotoInProject(tableName, photoId, { filePath, title, description, tags } = {}) {
|
|
2137
2137
|
this._ctx.requireTokens();
|
|
2138
2138
|
const path = `/api/v1/photos_update/${encodeURIComponent(tableName)}/id/${encodeURIComponent(photoId)}`;
|
|
2139
|
-
const body = stripUndef$
|
|
2139
|
+
const body = stripUndef$4({
|
|
2140
2140
|
file_path: filePath,
|
|
2141
2141
|
title: title,
|
|
2142
2142
|
description: description,
|
|
@@ -2165,12 +2165,12 @@ class Photos {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
2167
|
|
|
2168
|
-
function stripUndef$
|
|
2168
|
+
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2169
2169
|
|
|
2170
2170
|
class Search {
|
|
2171
2171
|
constructor(ctx) { this._ctx = ctx; }
|
|
2172
2172
|
|
|
2173
|
-
async searchProjectPhotos(projectTableName, { andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, curatedAlbumId, splitByTier } = {}) {
|
|
2173
|
+
async searchProjectPhotos(projectTableName, { andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, themedAlbumId, curatedAlbumId, splitByTier } = {}) {
|
|
2174
2174
|
this._ctx.requireTokens();
|
|
2175
2175
|
let path = `/api/v1/search/${encodeURIComponent(projectTableName)}/`;
|
|
2176
2176
|
const query = new URLSearchParams();
|
|
@@ -2187,6 +2187,7 @@ class Search {
|
|
|
2187
2187
|
if (dateOrder !== undefined) (Array.isArray(dateOrder) ? dateOrder : [dateOrder]).forEach(v => query.append('date_order', v));
|
|
2188
2188
|
if (customAlbumId !== undefined) (Array.isArray(customAlbumId) ? customAlbumId : [customAlbumId]).forEach(v => query.append('custom_album_id', v));
|
|
2189
2189
|
if (bestOfSimilarSetsOnly !== undefined) (Array.isArray(bestOfSimilarSetsOnly) ? bestOfSimilarSetsOnly : [bestOfSimilarSetsOnly]).forEach(v => query.append('best_of_similar_sets_only', v));
|
|
2190
|
+
if (themedAlbumId !== undefined) (Array.isArray(themedAlbumId) ? themedAlbumId : [themedAlbumId]).forEach(v => query.append('themed_album_id', v));
|
|
2190
2191
|
if (curatedAlbumId !== undefined) (Array.isArray(curatedAlbumId) ? curatedAlbumId : [curatedAlbumId]).forEach(v => query.append('curated_album_id', v));
|
|
2191
2192
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2192
2193
|
const qs = query.toString();
|
|
@@ -2247,7 +2248,7 @@ class Search {
|
|
|
2247
2248
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2248
2249
|
const qs = query.toString();
|
|
2249
2250
|
if (qs) path += '?' + qs;
|
|
2250
|
-
const body = stripUndef$
|
|
2251
|
+
const body = stripUndef$3({
|
|
2251
2252
|
search_text: searchText,
|
|
2252
2253
|
size: size,
|
|
2253
2254
|
});
|
|
@@ -2269,7 +2270,7 @@ class Search {
|
|
|
2269
2270
|
return data;
|
|
2270
2271
|
}
|
|
2271
2272
|
|
|
2272
|
-
async saveProjectPhotosSearch(projectTableName, { searchName, andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, curatedAlbumId, splitByTier } = {}) {
|
|
2273
|
+
async saveProjectPhotosSearch(projectTableName, { searchName, andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, themedAlbumId, curatedAlbumId, splitByTier } = {}) {
|
|
2273
2274
|
this._ctx.requireTokens();
|
|
2274
2275
|
let path = `/api/v1/search/${encodeURIComponent(projectTableName)}/`;
|
|
2275
2276
|
const query = new URLSearchParams();
|
|
@@ -2287,6 +2288,7 @@ class Search {
|
|
|
2287
2288
|
if (dateOrder !== undefined) (Array.isArray(dateOrder) ? dateOrder : [dateOrder]).forEach(v => query.append('date_order', v));
|
|
2288
2289
|
if (customAlbumId !== undefined) (Array.isArray(customAlbumId) ? customAlbumId : [customAlbumId]).forEach(v => query.append('custom_album_id', v));
|
|
2289
2290
|
if (bestOfSimilarSetsOnly !== undefined) (Array.isArray(bestOfSimilarSetsOnly) ? bestOfSimilarSetsOnly : [bestOfSimilarSetsOnly]).forEach(v => query.append('best_of_similar_sets_only', v));
|
|
2291
|
+
if (themedAlbumId !== undefined) (Array.isArray(themedAlbumId) ? themedAlbumId : [themedAlbumId]).forEach(v => query.append('themed_album_id', v));
|
|
2290
2292
|
if (curatedAlbumId !== undefined) (Array.isArray(curatedAlbumId) ? curatedAlbumId : [curatedAlbumId]).forEach(v => query.append('curated_album_id', v));
|
|
2291
2293
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2292
2294
|
const qs = query.toString();
|
|
@@ -2303,7 +2305,7 @@ class Search {
|
|
|
2303
2305
|
}
|
|
2304
2306
|
}
|
|
2305
2307
|
|
|
2306
|
-
function stripUndef$
|
|
2308
|
+
function stripUndef$2(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2307
2309
|
|
|
2308
2310
|
class Subscription {
|
|
2309
2311
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -2311,7 +2313,7 @@ class Subscription {
|
|
|
2311
2313
|
async createSubscription(projectTableName, targets, callbackUrl = undefined) {
|
|
2312
2314
|
this._ctx.requireTokens();
|
|
2313
2315
|
const path = `/api/v1/subscriptions`;
|
|
2314
|
-
const body = stripUndef$
|
|
2316
|
+
const body = stripUndef$2({
|
|
2315
2317
|
project_table_name: projectTableName,
|
|
2316
2318
|
callback_url: callbackUrl,
|
|
2317
2319
|
targets: targets,
|
|
@@ -2349,7 +2351,7 @@ class Subscription {
|
|
|
2349
2351
|
async updateSubscription(subscriptionId, { callbackUrl, targets } = {}) {
|
|
2350
2352
|
this._ctx.requireTokens();
|
|
2351
2353
|
const path = `/api/v1/subscriptions/${encodeURIComponent(subscriptionId)}`;
|
|
2352
|
-
const body = stripUndef$
|
|
2354
|
+
const body = stripUndef$2({
|
|
2353
2355
|
callback_url: callbackUrl,
|
|
2354
2356
|
targets: targets,
|
|
2355
2357
|
});
|
|
@@ -2372,6 +2374,92 @@ class Subscription {
|
|
|
2372
2374
|
}
|
|
2373
2375
|
}
|
|
2374
2376
|
|
|
2377
|
+
function stripUndef$1(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2378
|
+
|
|
2379
|
+
class ThemedAlbum {
|
|
2380
|
+
constructor(ctx) { this._ctx = ctx; }
|
|
2381
|
+
|
|
2382
|
+
async createThemedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
2383
|
+
this._ctx.requireTokens();
|
|
2384
|
+
const path = `/api/v1/themed_album/project/${encodeURIComponent(projectTableName)}`;
|
|
2385
|
+
const body = stripUndef$1({
|
|
2386
|
+
name: name,
|
|
2387
|
+
description: description,
|
|
2388
|
+
confidence_value: confidenceValue,
|
|
2389
|
+
});
|
|
2390
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2391
|
+
return data;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
async getAllProjectThemedAlbums(projectTableName) {
|
|
2395
|
+
this._ctx.requireTokens();
|
|
2396
|
+
const path = `/api/v1/themed_album/project/${encodeURIComponent(projectTableName)}`;
|
|
2397
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2398
|
+
return data;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
async getThemedAlbumPhotos(albumId, { ascOrDesc, lastId, limit, confidenceValue } = {}) {
|
|
2402
|
+
this._ctx.requireTokens();
|
|
2403
|
+
let path = `/api/v1/themed_album/photos/${encodeURIComponent(albumId)}/`;
|
|
2404
|
+
const query = new URLSearchParams();
|
|
2405
|
+
if (ascOrDesc !== undefined) (Array.isArray(ascOrDesc) ? ascOrDesc : [ascOrDesc]).forEach(v => query.append('asc_or_desc', v));
|
|
2406
|
+
if (lastId !== undefined) (Array.isArray(lastId) ? lastId : [lastId]).forEach(v => query.append('last_id', v));
|
|
2407
|
+
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2408
|
+
if (confidenceValue !== undefined) (Array.isArray(confidenceValue) ? confidenceValue : [confidenceValue]).forEach(v => query.append('confidence_value', v));
|
|
2409
|
+
const qs = query.toString();
|
|
2410
|
+
if (qs) path += '?' + qs;
|
|
2411
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2412
|
+
return data;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
async getThemedAlbumPhotosRanked(albumId, { ascOrDesc, lastId, limit, confidenceValue } = {}) {
|
|
2416
|
+
this._ctx.requireTokens();
|
|
2417
|
+
let path = `/api/v1/themed_album/photos/ranked/${encodeURIComponent(albumId)}/`;
|
|
2418
|
+
const query = new URLSearchParams();
|
|
2419
|
+
if (ascOrDesc !== undefined) (Array.isArray(ascOrDesc) ? ascOrDesc : [ascOrDesc]).forEach(v => query.append('asc_or_desc', v));
|
|
2420
|
+
if (lastId !== undefined) (Array.isArray(lastId) ? lastId : [lastId]).forEach(v => query.append('last_id', v));
|
|
2421
|
+
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2422
|
+
if (confidenceValue !== undefined) (Array.isArray(confidenceValue) ? confidenceValue : [confidenceValue]).forEach(v => query.append('confidence_value', v));
|
|
2423
|
+
const qs = query.toString();
|
|
2424
|
+
if (qs) path += '?' + qs;
|
|
2425
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2426
|
+
return data;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
async getThemedAlbumById(albumId) {
|
|
2430
|
+
this._ctx.requireTokens();
|
|
2431
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2432
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2433
|
+
return data;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
async updateThemedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
2437
|
+
this._ctx.requireTokens();
|
|
2438
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2439
|
+
const body = stripUndef$1({
|
|
2440
|
+
name: name,
|
|
2441
|
+
description: description,
|
|
2442
|
+
confidence_value: confidenceValue,
|
|
2443
|
+
});
|
|
2444
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2445
|
+
return data;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
async deleteThemedAlbum(albumId) {
|
|
2449
|
+
this._ctx.requireTokens();
|
|
2450
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2451
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2452
|
+
return data;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
async convertThemedAlbumToCustom(albumId) {
|
|
2456
|
+
this._ctx.requireTokens();
|
|
2457
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}/convert`;
|
|
2458
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2459
|
+
return data;
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2375
2463
|
function stripUndef(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2376
2464
|
|
|
2377
2465
|
class Users {
|
|
@@ -2584,6 +2672,7 @@ class MediaViz {
|
|
|
2584
2672
|
this.projects = new Projects(_ctx);
|
|
2585
2673
|
this.search = new Search(_ctx);
|
|
2586
2674
|
this.subscription = new Subscription(_ctx);
|
|
2675
|
+
this.themedAlbum = new ThemedAlbum(_ctx);
|
|
2587
2676
|
this.users = new Users(_ctx);
|
|
2588
2677
|
this.webhookReceiver = new Webhookreceiver(_ctx);
|
|
2589
2678
|
this.webhooks = new WebhookConsumer(_ctx, this.subscription);
|
|
@@ -3026,6 +3115,7 @@ exports.RateLimitError = RateLimitError;
|
|
|
3026
3115
|
exports.Search = Search;
|
|
3027
3116
|
exports.ServerError = ServerError;
|
|
3028
3117
|
exports.Subscription = Subscription;
|
|
3118
|
+
exports.ThemedAlbum = ThemedAlbum;
|
|
3029
3119
|
exports.Users = Users;
|
|
3030
3120
|
exports.ValidationError = ValidationError;
|
|
3031
3121
|
exports.WEBHOOK_MODEL_COLUMNS = WEBHOOK_MODEL_COLUMNS;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -418,6 +418,7 @@ export interface SearchDisplay {
|
|
|
418
418
|
date_order?: string;
|
|
419
419
|
custom_album_id?: number;
|
|
420
420
|
best_of_similar_sets_only?: boolean;
|
|
421
|
+
themed_album_id?: number;
|
|
421
422
|
curated_album_id?: number;
|
|
422
423
|
}
|
|
423
424
|
|
|
@@ -610,13 +611,13 @@ export class Projects {
|
|
|
610
611
|
}
|
|
611
612
|
|
|
612
613
|
export class Search {
|
|
613
|
-
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
614
|
+
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
614
615
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
615
616
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
616
617
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
617
618
|
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
618
619
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
619
|
-
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
620
|
+
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
620
621
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
621
622
|
}
|
|
622
623
|
|
|
@@ -630,6 +631,17 @@ export class Subscription {
|
|
|
630
631
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
631
632
|
}
|
|
632
633
|
|
|
634
|
+
export class ThemedAlbum {
|
|
635
|
+
createThemedAlbum(projectTableName: string, name: string, description?: string, confidenceValue?: number): Promise<CuratedAlbumDisplay>;
|
|
636
|
+
getAllProjectThemedAlbums(projectTableName: string): Promise<CuratedAlbumDisplay[]>;
|
|
637
|
+
getThemedAlbumPhotos(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<any[]>;
|
|
638
|
+
getThemedAlbumPhotosRanked(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<Record<string, any>>;
|
|
639
|
+
getThemedAlbumById(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
640
|
+
updateThemedAlbum(albumId: number, body?: { name?: string, description?: string, confidenceValue?: number }): Promise<CuratedAlbumDisplay>;
|
|
641
|
+
deleteThemedAlbum(albumId: number): Promise<Record<string, any>>;
|
|
642
|
+
convertThemedAlbumToCustom(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
643
|
+
}
|
|
644
|
+
|
|
633
645
|
export class Users {
|
|
634
646
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
635
647
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
@@ -671,6 +683,7 @@ export class MediaViz {
|
|
|
671
683
|
readonly projects: Projects;
|
|
672
684
|
readonly search: Search;
|
|
673
685
|
readonly subscription: Subscription;
|
|
686
|
+
readonly themedAlbum: ThemedAlbum;
|
|
674
687
|
readonly users: Users;
|
|
675
688
|
readonly webhookReceiver: Webhookreceiver;
|
|
676
689
|
readonly webhooks: WebhookConsumer;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -418,6 +418,7 @@ export interface SearchDisplay {
|
|
|
418
418
|
date_order?: string;
|
|
419
419
|
custom_album_id?: number;
|
|
420
420
|
best_of_similar_sets_only?: boolean;
|
|
421
|
+
themed_album_id?: number;
|
|
421
422
|
curated_album_id?: number;
|
|
422
423
|
}
|
|
423
424
|
|
|
@@ -610,13 +611,13 @@ export class Projects {
|
|
|
610
611
|
}
|
|
611
612
|
|
|
612
613
|
export class Search {
|
|
613
|
-
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
614
|
+
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
614
615
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
615
616
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
616
617
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
617
618
|
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
618
619
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
619
|
-
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
620
|
+
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
620
621
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
621
622
|
}
|
|
622
623
|
|
|
@@ -630,6 +631,17 @@ export class Subscription {
|
|
|
630
631
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
631
632
|
}
|
|
632
633
|
|
|
634
|
+
export class ThemedAlbum {
|
|
635
|
+
createThemedAlbum(projectTableName: string, name: string, description?: string, confidenceValue?: number): Promise<CuratedAlbumDisplay>;
|
|
636
|
+
getAllProjectThemedAlbums(projectTableName: string): Promise<CuratedAlbumDisplay[]>;
|
|
637
|
+
getThemedAlbumPhotos(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<any[]>;
|
|
638
|
+
getThemedAlbumPhotosRanked(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<Record<string, any>>;
|
|
639
|
+
getThemedAlbumById(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
640
|
+
updateThemedAlbum(albumId: number, body?: { name?: string, description?: string, confidenceValue?: number }): Promise<CuratedAlbumDisplay>;
|
|
641
|
+
deleteThemedAlbum(albumId: number): Promise<Record<string, any>>;
|
|
642
|
+
convertThemedAlbumToCustom(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
643
|
+
}
|
|
644
|
+
|
|
633
645
|
export class Users {
|
|
634
646
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
635
647
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
@@ -671,6 +683,7 @@ export class MediaViz {
|
|
|
671
683
|
readonly projects: Projects;
|
|
672
684
|
readonly search: Search;
|
|
673
685
|
readonly subscription: Subscription;
|
|
686
|
+
readonly themedAlbum: ThemedAlbum;
|
|
674
687
|
readonly users: Users;
|
|
675
688
|
readonly webhookReceiver: Webhookreceiver;
|
|
676
689
|
readonly webhooks: WebhookConsumer;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -418,6 +418,7 @@ export interface SearchDisplay {
|
|
|
418
418
|
date_order?: string;
|
|
419
419
|
custom_album_id?: number;
|
|
420
420
|
best_of_similar_sets_only?: boolean;
|
|
421
|
+
themed_album_id?: number;
|
|
421
422
|
curated_album_id?: number;
|
|
422
423
|
}
|
|
423
424
|
|
|
@@ -610,13 +611,13 @@ export class Projects {
|
|
|
610
611
|
}
|
|
611
612
|
|
|
612
613
|
export class Search {
|
|
613
|
-
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
614
|
+
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
614
615
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
615
616
|
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
616
617
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
617
618
|
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
618
619
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
619
|
-
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[],
|
|
620
|
+
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], themedAlbumId?: number | number[], curatedAlbumId?: any, splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
620
621
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
621
622
|
}
|
|
622
623
|
|
|
@@ -630,6 +631,17 @@ export class Subscription {
|
|
|
630
631
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
631
632
|
}
|
|
632
633
|
|
|
634
|
+
export class ThemedAlbum {
|
|
635
|
+
createThemedAlbum(projectTableName: string, name: string, description?: string, confidenceValue?: number): Promise<CuratedAlbumDisplay>;
|
|
636
|
+
getAllProjectThemedAlbums(projectTableName: string): Promise<CuratedAlbumDisplay[]>;
|
|
637
|
+
getThemedAlbumPhotos(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<any[]>;
|
|
638
|
+
getThemedAlbumPhotosRanked(albumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], confidenceValue?: number | number[] }): Promise<Record<string, any>>;
|
|
639
|
+
getThemedAlbumById(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
640
|
+
updateThemedAlbum(albumId: number, body?: { name?: string, description?: string, confidenceValue?: number }): Promise<CuratedAlbumDisplay>;
|
|
641
|
+
deleteThemedAlbum(albumId: number): Promise<Record<string, any>>;
|
|
642
|
+
convertThemedAlbumToCustom(albumId: number): Promise<CuratedAlbumDisplay>;
|
|
643
|
+
}
|
|
644
|
+
|
|
633
645
|
export class Users {
|
|
634
646
|
createUser(name: string, email: string, accountType: number, companyId?: number, profilePicture?: string, paymentPlanType?: string): Promise<UserDisplay>;
|
|
635
647
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
@@ -671,6 +683,7 @@ export class MediaViz {
|
|
|
671
683
|
readonly projects: Projects;
|
|
672
684
|
readonly search: Search;
|
|
673
685
|
readonly subscription: Subscription;
|
|
686
|
+
readonly themedAlbum: ThemedAlbum;
|
|
674
687
|
readonly users: Users;
|
|
675
688
|
readonly webhookReceiver: Webhookreceiver;
|
|
676
689
|
readonly webhooks: WebhookConsumer;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -1113,7 +1113,7 @@ class AiModelCredits {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
-
function stripUndef$
|
|
1116
|
+
function stripUndef$b(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1117
1117
|
|
|
1118
1118
|
class Admin {
|
|
1119
1119
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1128,7 +1128,7 @@ class Admin {
|
|
|
1128
1128
|
async adminSetCompanyCanManageApiClients(companyId, canManageApiClients) {
|
|
1129
1129
|
this._ctx.requireTokens();
|
|
1130
1130
|
const path = `/api/v1/admin/companies/${encodeURIComponent(companyId)}/can_manage_api_clients`;
|
|
1131
|
-
const body = stripUndef$
|
|
1131
|
+
const body = stripUndef$b({
|
|
1132
1132
|
can_manage_api_clients: canManageApiClients,
|
|
1133
1133
|
});
|
|
1134
1134
|
const { data } = await this._ctx.client.request(path, 'PATCH', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
@@ -1159,7 +1159,7 @@ class Company {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
function stripUndef$
|
|
1162
|
+
function stripUndef$a(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1163
1163
|
|
|
1164
1164
|
class CuratedAlbums {
|
|
1165
1165
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1167,7 +1167,7 @@ class CuratedAlbums {
|
|
|
1167
1167
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1168
1168
|
this._ctx.requireTokens();
|
|
1169
1169
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1170
|
-
const body = stripUndef$
|
|
1170
|
+
const body = stripUndef$a({
|
|
1171
1171
|
name: name,
|
|
1172
1172
|
description: description,
|
|
1173
1173
|
confidence_value: confidenceValue,
|
|
@@ -1221,7 +1221,7 @@ class CuratedAlbums {
|
|
|
1221
1221
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1222
1222
|
this._ctx.requireTokens();
|
|
1223
1223
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1224
|
-
const body = stripUndef$
|
|
1224
|
+
const body = stripUndef$a({
|
|
1225
1225
|
name: name,
|
|
1226
1226
|
description: description,
|
|
1227
1227
|
confidence_value: confidenceValue,
|
|
@@ -1245,7 +1245,7 @@ class CuratedAlbums {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
1248
|
-
function stripUndef$
|
|
1248
|
+
function stripUndef$9(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1249
1249
|
|
|
1250
1250
|
class CustomAlbums {
|
|
1251
1251
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1293,7 +1293,7 @@ class CustomAlbums {
|
|
|
1293
1293
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1294
1294
|
this._ctx.requireTokens();
|
|
1295
1295
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1296
|
-
const body = stripUndef$
|
|
1296
|
+
const body = stripUndef$9({
|
|
1297
1297
|
name: name,
|
|
1298
1298
|
description: description,
|
|
1299
1299
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1306,7 +1306,7 @@ class CustomAlbums {
|
|
|
1306
1306
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1307
1307
|
this._ctx.requireTokens();
|
|
1308
1308
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1309
|
-
const body = stripUndef$
|
|
1309
|
+
const body = stripUndef$9({
|
|
1310
1310
|
name: name,
|
|
1311
1311
|
description: description,
|
|
1312
1312
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1406,7 +1406,7 @@ async function handleResponse(response) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
|
-
function stripUndef$
|
|
1409
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1410
1410
|
|
|
1411
1411
|
class EmailTokens {
|
|
1412
1412
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1437,7 +1437,7 @@ class EmailTokens {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
|
|
1439
1439
|
async validateToken(token) {
|
|
1440
|
-
const body = stripUndef$
|
|
1440
|
+
const body = stripUndef$8({
|
|
1441
1441
|
token: token,
|
|
1442
1442
|
});
|
|
1443
1443
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1449,7 +1449,7 @@ class EmailTokens {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
1451
|
async resetPassword(token, newPassword) {
|
|
1452
|
-
const body = stripUndef$
|
|
1452
|
+
const body = stripUndef$8({
|
|
1453
1453
|
token: token,
|
|
1454
1454
|
new_password: newPassword,
|
|
1455
1455
|
});
|
|
@@ -1488,7 +1488,7 @@ class Health {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
|
|
1491
|
-
function stripUndef$
|
|
1491
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1492
1492
|
|
|
1493
1493
|
class Keywords {
|
|
1494
1494
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1496,7 +1496,7 @@ class Keywords {
|
|
|
1496
1496
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1497
1497
|
this._ctx.requireTokens();
|
|
1498
1498
|
const path = `/api/v1/keyword/`;
|
|
1499
|
-
const body = stripUndef$
|
|
1499
|
+
const body = stripUndef$7({
|
|
1500
1500
|
name: name,
|
|
1501
1501
|
project_list: projectList,
|
|
1502
1502
|
});
|
|
@@ -1549,7 +1549,7 @@ class Keywords {
|
|
|
1549
1549
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1550
1550
|
this._ctx.requireTokens();
|
|
1551
1551
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1552
|
-
const body = stripUndef$
|
|
1552
|
+
const body = stripUndef$7({
|
|
1553
1553
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1554
1554
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1555
1555
|
});
|
|
@@ -1560,7 +1560,7 @@ class Keywords {
|
|
|
1560
1560
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1561
1561
|
this._ctx.requireTokens();
|
|
1562
1562
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1563
|
-
const body = stripUndef$
|
|
1563
|
+
const body = stripUndef$7({
|
|
1564
1564
|
name: name,
|
|
1565
1565
|
project_list: projectList,
|
|
1566
1566
|
});
|
|
@@ -1693,7 +1693,7 @@ class OauthAuthorization {
|
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
1695
|
|
|
1696
|
-
function stripUndef$
|
|
1696
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1697
1697
|
|
|
1698
1698
|
class OauthClients {
|
|
1699
1699
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1701,7 +1701,7 @@ class OauthClients {
|
|
|
1701
1701
|
async createApiCredential(credentialName) {
|
|
1702
1702
|
this._ctx.requireTokens();
|
|
1703
1703
|
const path = `/oauth/clients/api-credentials`;
|
|
1704
|
-
const body = stripUndef$
|
|
1704
|
+
const body = stripUndef$6({
|
|
1705
1705
|
credential_name: credentialName,
|
|
1706
1706
|
});
|
|
1707
1707
|
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
@@ -1855,7 +1855,7 @@ class Person {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
|
|
1858
|
-
function stripUndef$
|
|
1858
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1859
1859
|
|
|
1860
1860
|
class Projects {
|
|
1861
1861
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1868,7 +1868,7 @@ class Projects {
|
|
|
1868
1868
|
if (models !== undefined) (Array.isArray(models) ? models : [models]).forEach(v => query.append('models', v));
|
|
1869
1869
|
const qs = query.toString();
|
|
1870
1870
|
if (qs) path += '?' + qs;
|
|
1871
|
-
const body = stripUndef$
|
|
1871
|
+
const body = stripUndef$5({
|
|
1872
1872
|
name: name,
|
|
1873
1873
|
private: private_,
|
|
1874
1874
|
type: type,
|
|
@@ -1938,7 +1938,7 @@ class Projects {
|
|
|
1938
1938
|
async updateProject(projectId, { private: private_, type, description, directory, name, thumbnail } = {}) {
|
|
1939
1939
|
this._ctx.requireTokens();
|
|
1940
1940
|
const path = `/api/v1/projects/${encodeURIComponent(projectId)}`;
|
|
1941
|
-
const body = stripUndef$
|
|
1941
|
+
const body = stripUndef$5({
|
|
1942
1942
|
private: private_,
|
|
1943
1943
|
type: type,
|
|
1944
1944
|
description: description,
|
|
@@ -2017,7 +2017,7 @@ class Projects {
|
|
|
2017
2017
|
async addProjectEvent(projectTableName, event, detail = undefined) {
|
|
2018
2018
|
this._ctx.requireTokens();
|
|
2019
2019
|
const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/event`;
|
|
2020
|
-
const body = stripUndef$
|
|
2020
|
+
const body = stripUndef$5({
|
|
2021
2021
|
event: event,
|
|
2022
2022
|
detail: detail,
|
|
2023
2023
|
});
|
|
@@ -2068,7 +2068,7 @@ class Photoupload {
|
|
|
2068
2068
|
}
|
|
2069
2069
|
}
|
|
2070
2070
|
|
|
2071
|
-
function stripUndef$
|
|
2071
|
+
function stripUndef$4(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2072
2072
|
|
|
2073
2073
|
class Photos {
|
|
2074
2074
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -2134,7 +2134,7 @@ class Photos {
|
|
|
2134
2134
|
async updatePhotoInProject(tableName, photoId, { filePath, title, description, tags } = {}) {
|
|
2135
2135
|
this._ctx.requireTokens();
|
|
2136
2136
|
const path = `/api/v1/photos_update/${encodeURIComponent(tableName)}/id/${encodeURIComponent(photoId)}`;
|
|
2137
|
-
const body = stripUndef$
|
|
2137
|
+
const body = stripUndef$4({
|
|
2138
2138
|
file_path: filePath,
|
|
2139
2139
|
title: title,
|
|
2140
2140
|
description: description,
|
|
@@ -2163,12 +2163,12 @@ class Photos {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
|
-
function stripUndef$
|
|
2166
|
+
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2167
2167
|
|
|
2168
2168
|
class Search {
|
|
2169
2169
|
constructor(ctx) { this._ctx = ctx; }
|
|
2170
2170
|
|
|
2171
|
-
async searchProjectPhotos(projectTableName, { andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, curatedAlbumId, splitByTier } = {}) {
|
|
2171
|
+
async searchProjectPhotos(projectTableName, { andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, themedAlbumId, curatedAlbumId, splitByTier } = {}) {
|
|
2172
2172
|
this._ctx.requireTokens();
|
|
2173
2173
|
let path = `/api/v1/search/${encodeURIComponent(projectTableName)}/`;
|
|
2174
2174
|
const query = new URLSearchParams();
|
|
@@ -2185,6 +2185,7 @@ class Search {
|
|
|
2185
2185
|
if (dateOrder !== undefined) (Array.isArray(dateOrder) ? dateOrder : [dateOrder]).forEach(v => query.append('date_order', v));
|
|
2186
2186
|
if (customAlbumId !== undefined) (Array.isArray(customAlbumId) ? customAlbumId : [customAlbumId]).forEach(v => query.append('custom_album_id', v));
|
|
2187
2187
|
if (bestOfSimilarSetsOnly !== undefined) (Array.isArray(bestOfSimilarSetsOnly) ? bestOfSimilarSetsOnly : [bestOfSimilarSetsOnly]).forEach(v => query.append('best_of_similar_sets_only', v));
|
|
2188
|
+
if (themedAlbumId !== undefined) (Array.isArray(themedAlbumId) ? themedAlbumId : [themedAlbumId]).forEach(v => query.append('themed_album_id', v));
|
|
2188
2189
|
if (curatedAlbumId !== undefined) (Array.isArray(curatedAlbumId) ? curatedAlbumId : [curatedAlbumId]).forEach(v => query.append('curated_album_id', v));
|
|
2189
2190
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2190
2191
|
const qs = query.toString();
|
|
@@ -2245,7 +2246,7 @@ class Search {
|
|
|
2245
2246
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2246
2247
|
const qs = query.toString();
|
|
2247
2248
|
if (qs) path += '?' + qs;
|
|
2248
|
-
const body = stripUndef$
|
|
2249
|
+
const body = stripUndef$3({
|
|
2249
2250
|
search_text: searchText,
|
|
2250
2251
|
size: size,
|
|
2251
2252
|
});
|
|
@@ -2267,7 +2268,7 @@ class Search {
|
|
|
2267
2268
|
return data;
|
|
2268
2269
|
}
|
|
2269
2270
|
|
|
2270
|
-
async saveProjectPhotosSearch(projectTableName, { searchName, andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, curatedAlbumId, splitByTier } = {}) {
|
|
2271
|
+
async saveProjectPhotosSearch(projectTableName, { searchName, andParams, andStringParams, orParams, orStringParams, notParams, notStringParams, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, customAlbumId, bestOfSimilarSetsOnly, themedAlbumId, curatedAlbumId, splitByTier } = {}) {
|
|
2271
2272
|
this._ctx.requireTokens();
|
|
2272
2273
|
let path = `/api/v1/search/${encodeURIComponent(projectTableName)}/`;
|
|
2273
2274
|
const query = new URLSearchParams();
|
|
@@ -2285,6 +2286,7 @@ class Search {
|
|
|
2285
2286
|
if (dateOrder !== undefined) (Array.isArray(dateOrder) ? dateOrder : [dateOrder]).forEach(v => query.append('date_order', v));
|
|
2286
2287
|
if (customAlbumId !== undefined) (Array.isArray(customAlbumId) ? customAlbumId : [customAlbumId]).forEach(v => query.append('custom_album_id', v));
|
|
2287
2288
|
if (bestOfSimilarSetsOnly !== undefined) (Array.isArray(bestOfSimilarSetsOnly) ? bestOfSimilarSetsOnly : [bestOfSimilarSetsOnly]).forEach(v => query.append('best_of_similar_sets_only', v));
|
|
2289
|
+
if (themedAlbumId !== undefined) (Array.isArray(themedAlbumId) ? themedAlbumId : [themedAlbumId]).forEach(v => query.append('themed_album_id', v));
|
|
2288
2290
|
if (curatedAlbumId !== undefined) (Array.isArray(curatedAlbumId) ? curatedAlbumId : [curatedAlbumId]).forEach(v => query.append('curated_album_id', v));
|
|
2289
2291
|
if (splitByTier !== undefined) (Array.isArray(splitByTier) ? splitByTier : [splitByTier]).forEach(v => query.append('split_by_tier', v));
|
|
2290
2292
|
const qs = query.toString();
|
|
@@ -2301,7 +2303,7 @@ class Search {
|
|
|
2301
2303
|
}
|
|
2302
2304
|
}
|
|
2303
2305
|
|
|
2304
|
-
function stripUndef$
|
|
2306
|
+
function stripUndef$2(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2305
2307
|
|
|
2306
2308
|
class Subscription {
|
|
2307
2309
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -2309,7 +2311,7 @@ class Subscription {
|
|
|
2309
2311
|
async createSubscription(projectTableName, targets, callbackUrl = undefined) {
|
|
2310
2312
|
this._ctx.requireTokens();
|
|
2311
2313
|
const path = `/api/v1/subscriptions`;
|
|
2312
|
-
const body = stripUndef$
|
|
2314
|
+
const body = stripUndef$2({
|
|
2313
2315
|
project_table_name: projectTableName,
|
|
2314
2316
|
callback_url: callbackUrl,
|
|
2315
2317
|
targets: targets,
|
|
@@ -2347,7 +2349,7 @@ class Subscription {
|
|
|
2347
2349
|
async updateSubscription(subscriptionId, { callbackUrl, targets } = {}) {
|
|
2348
2350
|
this._ctx.requireTokens();
|
|
2349
2351
|
const path = `/api/v1/subscriptions/${encodeURIComponent(subscriptionId)}`;
|
|
2350
|
-
const body = stripUndef$
|
|
2352
|
+
const body = stripUndef$2({
|
|
2351
2353
|
callback_url: callbackUrl,
|
|
2352
2354
|
targets: targets,
|
|
2353
2355
|
});
|
|
@@ -2370,6 +2372,92 @@ class Subscription {
|
|
|
2370
2372
|
}
|
|
2371
2373
|
}
|
|
2372
2374
|
|
|
2375
|
+
function stripUndef$1(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2376
|
+
|
|
2377
|
+
class ThemedAlbum {
|
|
2378
|
+
constructor(ctx) { this._ctx = ctx; }
|
|
2379
|
+
|
|
2380
|
+
async createThemedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
2381
|
+
this._ctx.requireTokens();
|
|
2382
|
+
const path = `/api/v1/themed_album/project/${encodeURIComponent(projectTableName)}`;
|
|
2383
|
+
const body = stripUndef$1({
|
|
2384
|
+
name: name,
|
|
2385
|
+
description: description,
|
|
2386
|
+
confidence_value: confidenceValue,
|
|
2387
|
+
});
|
|
2388
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2389
|
+
return data;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
async getAllProjectThemedAlbums(projectTableName) {
|
|
2393
|
+
this._ctx.requireTokens();
|
|
2394
|
+
const path = `/api/v1/themed_album/project/${encodeURIComponent(projectTableName)}`;
|
|
2395
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2396
|
+
return data;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
async getThemedAlbumPhotos(albumId, { ascOrDesc, lastId, limit, confidenceValue } = {}) {
|
|
2400
|
+
this._ctx.requireTokens();
|
|
2401
|
+
let path = `/api/v1/themed_album/photos/${encodeURIComponent(albumId)}/`;
|
|
2402
|
+
const query = new URLSearchParams();
|
|
2403
|
+
if (ascOrDesc !== undefined) (Array.isArray(ascOrDesc) ? ascOrDesc : [ascOrDesc]).forEach(v => query.append('asc_or_desc', v));
|
|
2404
|
+
if (lastId !== undefined) (Array.isArray(lastId) ? lastId : [lastId]).forEach(v => query.append('last_id', v));
|
|
2405
|
+
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2406
|
+
if (confidenceValue !== undefined) (Array.isArray(confidenceValue) ? confidenceValue : [confidenceValue]).forEach(v => query.append('confidence_value', v));
|
|
2407
|
+
const qs = query.toString();
|
|
2408
|
+
if (qs) path += '?' + qs;
|
|
2409
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2410
|
+
return data;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
async getThemedAlbumPhotosRanked(albumId, { ascOrDesc, lastId, limit, confidenceValue } = {}) {
|
|
2414
|
+
this._ctx.requireTokens();
|
|
2415
|
+
let path = `/api/v1/themed_album/photos/ranked/${encodeURIComponent(albumId)}/`;
|
|
2416
|
+
const query = new URLSearchParams();
|
|
2417
|
+
if (ascOrDesc !== undefined) (Array.isArray(ascOrDesc) ? ascOrDesc : [ascOrDesc]).forEach(v => query.append('asc_or_desc', v));
|
|
2418
|
+
if (lastId !== undefined) (Array.isArray(lastId) ? lastId : [lastId]).forEach(v => query.append('last_id', v));
|
|
2419
|
+
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2420
|
+
if (confidenceValue !== undefined) (Array.isArray(confidenceValue) ? confidenceValue : [confidenceValue]).forEach(v => query.append('confidence_value', v));
|
|
2421
|
+
const qs = query.toString();
|
|
2422
|
+
if (qs) path += '?' + qs;
|
|
2423
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2424
|
+
return data;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
async getThemedAlbumById(albumId) {
|
|
2428
|
+
this._ctx.requireTokens();
|
|
2429
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2430
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2431
|
+
return data;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
async updateThemedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
2435
|
+
this._ctx.requireTokens();
|
|
2436
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2437
|
+
const body = stripUndef$1({
|
|
2438
|
+
name: name,
|
|
2439
|
+
description: description,
|
|
2440
|
+
confidence_value: confidenceValue,
|
|
2441
|
+
});
|
|
2442
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2443
|
+
return data;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
async deleteThemedAlbum(albumId) {
|
|
2447
|
+
this._ctx.requireTokens();
|
|
2448
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}`;
|
|
2449
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2450
|
+
return data;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
async convertThemedAlbumToCustom(albumId) {
|
|
2454
|
+
this._ctx.requireTokens();
|
|
2455
|
+
const path = `/api/v1/themed_album/${encodeURIComponent(albumId)}/convert`;
|
|
2456
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2457
|
+
return data;
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2373
2461
|
function stripUndef(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2374
2462
|
|
|
2375
2463
|
class Users {
|
|
@@ -2582,6 +2670,7 @@ class MediaViz {
|
|
|
2582
2670
|
this.projects = new Projects(_ctx);
|
|
2583
2671
|
this.search = new Search(_ctx);
|
|
2584
2672
|
this.subscription = new Subscription(_ctx);
|
|
2673
|
+
this.themedAlbum = new ThemedAlbum(_ctx);
|
|
2585
2674
|
this.users = new Users(_ctx);
|
|
2586
2675
|
this.webhookReceiver = new Webhookreceiver(_ctx);
|
|
2587
2676
|
this.webhooks = new WebhookConsumer(_ctx, this.subscription);
|
|
@@ -2995,4 +3084,4 @@ var _react_native = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
|
2995
3084
|
// Auto-generated — do not edit
|
|
2996
3085
|
const { createCryptoProvider, MemoryTokenStore, createSecureTokenStore, createKeychainTokenStore, startAuthSession, parseRedirectUrl, AuthSessionError, createSession } = _react_native;
|
|
2997
3086
|
|
|
2998
|
-
export { Admin, AiModelCredits, ApiError, AuthSessionError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, MemoryTokenStore, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthClients, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer, Webhookreceiver, configureCrypto, createCryptoProvider, createKeychainTokenStore, createSecureTokenStore, createSession, handleResponse, parseRedirectUrl, selectResultColumns, signWebhookPayload, startAuthSession, verifyWebhookSignature };
|
|
3087
|
+
export { Admin, AiModelCredits, ApiError, AuthSessionError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, MemoryTokenStore, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthClients, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, ThemedAlbum, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer, Webhookreceiver, configureCrypto, createCryptoProvider, createKeychainTokenStore, createSecureTokenStore, createSession, handleResponse, parseRedirectUrl, selectResultColumns, signWebhookPayload, startAuthSession, verifyWebhookSignature };
|
package/package.json
CHANGED