@mediaviz/react-native-sdk 1.10.0-rc.8 → 1.11.0-dev.126
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 +57 -13
- package/dist/sdk.d.cts +70 -39
- package/dist/sdk.d.ts +70 -39
- package/dist/sdk.esm.d.ts +70 -39
- package/dist/sdk.esm.js +57 -14
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -1115,6 +1115,8 @@ class AiModelCredits {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
|
|
1118
|
+
function stripUndef$a(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1119
|
+
|
|
1118
1120
|
class Admin {
|
|
1119
1121
|
constructor(ctx) { this._ctx = ctx; }
|
|
1120
1122
|
|
|
@@ -1124,6 +1126,16 @@ class Admin {
|
|
|
1124
1126
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1125
1127
|
return data;
|
|
1126
1128
|
}
|
|
1129
|
+
|
|
1130
|
+
async adminSetCompanyCanManageApiClients(companyId, canManageApiClients) {
|
|
1131
|
+
this._ctx.requireTokens();
|
|
1132
|
+
const path = `/api/v1/admin/companies/${encodeURIComponent(companyId)}/can_manage_api_clients`;
|
|
1133
|
+
const body = stripUndef$a({
|
|
1134
|
+
can_manage_api_clients: canManageApiClients,
|
|
1135
|
+
});
|
|
1136
|
+
const { data } = await this._ctx.client.request(path, 'PATCH', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1137
|
+
return data;
|
|
1138
|
+
}
|
|
1127
1139
|
}
|
|
1128
1140
|
|
|
1129
1141
|
class Company {
|
|
@@ -1149,7 +1161,7 @@ class Company {
|
|
|
1149
1161
|
}
|
|
1150
1162
|
}
|
|
1151
1163
|
|
|
1152
|
-
function stripUndef$
|
|
1164
|
+
function stripUndef$9(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1153
1165
|
|
|
1154
1166
|
class CuratedAlbums {
|
|
1155
1167
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1157,7 +1169,7 @@ class CuratedAlbums {
|
|
|
1157
1169
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1158
1170
|
this._ctx.requireTokens();
|
|
1159
1171
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1160
|
-
const body = stripUndef$
|
|
1172
|
+
const body = stripUndef$9({
|
|
1161
1173
|
name: name,
|
|
1162
1174
|
description: description,
|
|
1163
1175
|
confidence_value: confidenceValue,
|
|
@@ -1211,7 +1223,7 @@ class CuratedAlbums {
|
|
|
1211
1223
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1212
1224
|
this._ctx.requireTokens();
|
|
1213
1225
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1214
|
-
const body = stripUndef$
|
|
1226
|
+
const body = stripUndef$9({
|
|
1215
1227
|
name: name,
|
|
1216
1228
|
description: description,
|
|
1217
1229
|
confidence_value: confidenceValue,
|
|
@@ -1235,7 +1247,7 @@ class CuratedAlbums {
|
|
|
1235
1247
|
}
|
|
1236
1248
|
}
|
|
1237
1249
|
|
|
1238
|
-
function stripUndef$
|
|
1250
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1239
1251
|
|
|
1240
1252
|
class CustomAlbums {
|
|
1241
1253
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1283,7 +1295,7 @@ class CustomAlbums {
|
|
|
1283
1295
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1284
1296
|
this._ctx.requireTokens();
|
|
1285
1297
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1286
|
-
const body = stripUndef$
|
|
1298
|
+
const body = stripUndef$8({
|
|
1287
1299
|
name: name,
|
|
1288
1300
|
description: description,
|
|
1289
1301
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1296,7 +1308,7 @@ class CustomAlbums {
|
|
|
1296
1308
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1297
1309
|
this._ctx.requireTokens();
|
|
1298
1310
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1299
|
-
const body = stripUndef$
|
|
1311
|
+
const body = stripUndef$8({
|
|
1300
1312
|
name: name,
|
|
1301
1313
|
description: description,
|
|
1302
1314
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1396,7 +1408,7 @@ async function handleResponse(response) {
|
|
|
1396
1408
|
}
|
|
1397
1409
|
}
|
|
1398
1410
|
|
|
1399
|
-
function stripUndef$
|
|
1411
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1400
1412
|
|
|
1401
1413
|
class EmailTokens {
|
|
1402
1414
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1427,7 +1439,7 @@ class EmailTokens {
|
|
|
1427
1439
|
}
|
|
1428
1440
|
|
|
1429
1441
|
async validateToken(token) {
|
|
1430
|
-
const body = stripUndef$
|
|
1442
|
+
const body = stripUndef$7({
|
|
1431
1443
|
token: token,
|
|
1432
1444
|
});
|
|
1433
1445
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1439,7 +1451,7 @@ class EmailTokens {
|
|
|
1439
1451
|
}
|
|
1440
1452
|
|
|
1441
1453
|
async resetPassword(token, newPassword) {
|
|
1442
|
-
const body = stripUndef$
|
|
1454
|
+
const body = stripUndef$7({
|
|
1443
1455
|
token: token,
|
|
1444
1456
|
new_password: newPassword,
|
|
1445
1457
|
});
|
|
@@ -1478,7 +1490,7 @@ class Health {
|
|
|
1478
1490
|
}
|
|
1479
1491
|
}
|
|
1480
1492
|
|
|
1481
|
-
function stripUndef$
|
|
1493
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1482
1494
|
|
|
1483
1495
|
class Keywords {
|
|
1484
1496
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1486,7 +1498,7 @@ class Keywords {
|
|
|
1486
1498
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1487
1499
|
this._ctx.requireTokens();
|
|
1488
1500
|
const path = `/api/v1/keyword/`;
|
|
1489
|
-
const body = stripUndef$
|
|
1501
|
+
const body = stripUndef$6({
|
|
1490
1502
|
name: name,
|
|
1491
1503
|
project_list: projectList,
|
|
1492
1504
|
});
|
|
@@ -1539,7 +1551,7 @@ class Keywords {
|
|
|
1539
1551
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1540
1552
|
this._ctx.requireTokens();
|
|
1541
1553
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1542
|
-
const body = stripUndef$
|
|
1554
|
+
const body = stripUndef$6({
|
|
1543
1555
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1544
1556
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1545
1557
|
});
|
|
@@ -1550,7 +1562,7 @@ class Keywords {
|
|
|
1550
1562
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1551
1563
|
this._ctx.requireTokens();
|
|
1552
1564
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1553
|
-
const body = stripUndef$
|
|
1565
|
+
const body = stripUndef$6({
|
|
1554
1566
|
name: name,
|
|
1555
1567
|
project_list: projectList,
|
|
1556
1568
|
});
|
|
@@ -1683,6 +1695,36 @@ class OauthAuthorization {
|
|
|
1683
1695
|
}
|
|
1684
1696
|
}
|
|
1685
1697
|
|
|
1698
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1699
|
+
|
|
1700
|
+
class OauthClients {
|
|
1701
|
+
constructor(ctx) { this._ctx = ctx; }
|
|
1702
|
+
|
|
1703
|
+
async createApiCredential(credentialName) {
|
|
1704
|
+
this._ctx.requireTokens();
|
|
1705
|
+
const path = `/oauth/clients/api-credentials`;
|
|
1706
|
+
const body = stripUndef$5({
|
|
1707
|
+
credential_name: credentialName,
|
|
1708
|
+
});
|
|
1709
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1710
|
+
return data;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
async getCompanyApiCredentials() {
|
|
1714
|
+
this._ctx.requireTokens();
|
|
1715
|
+
const path = `/oauth/clients/api-credentials`;
|
|
1716
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1717
|
+
return data;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
async revokeApiCredential(clientId) {
|
|
1721
|
+
this._ctx.requireTokens();
|
|
1722
|
+
const path = `/oauth/clients/api-credentials/${encodeURIComponent(clientId)}/revoke`;
|
|
1723
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1724
|
+
return data;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1686
1728
|
class OauthToken {
|
|
1687
1729
|
constructor(ctx) { this._ctx = ctx; }
|
|
1688
1730
|
|
|
@@ -2533,6 +2575,7 @@ class MediaViz {
|
|
|
2533
2575
|
this.health = new Health(_ctx);
|
|
2534
2576
|
this.keywords = new Keywords(_ctx);
|
|
2535
2577
|
this.oAuthAuthorization = new OauthAuthorization(_ctx);
|
|
2578
|
+
this.oAuthClients = new OauthClients(_ctx);
|
|
2536
2579
|
this.oAuthToken = new OauthToken(_ctx);
|
|
2537
2580
|
this.oauthLogin = new OauthLogin(_ctx);
|
|
2538
2581
|
this.person = new Person(_ctx);
|
|
@@ -2972,6 +3015,7 @@ exports.OAuthClient = OAuthClient;
|
|
|
2972
3015
|
exports.OAuthError = OAuthError;
|
|
2973
3016
|
exports.OAuthErrorCode = OAuthErrorCode;
|
|
2974
3017
|
exports.OauthAuthorization = OauthAuthorization;
|
|
3018
|
+
exports.OauthClients = OauthClients;
|
|
2975
3019
|
exports.OauthLogin = OauthLogin;
|
|
2976
3020
|
exports.OauthToken = OauthToken;
|
|
2977
3021
|
exports.Person = Person;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -152,7 +152,7 @@ export interface CompanyDisplay {
|
|
|
152
152
|
name: string;
|
|
153
153
|
id: number;
|
|
154
154
|
owner_id: number;
|
|
155
|
-
users?:
|
|
155
|
+
users?: any;
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
158
|
}
|
|
@@ -162,7 +162,12 @@ export interface CompanyKeywordListOverview {
|
|
|
162
162
|
name: string;
|
|
163
163
|
active_keywords: number;
|
|
164
164
|
excluded_keywords: number;
|
|
165
|
-
project_ids?:
|
|
165
|
+
project_ids?: any;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface CredentialSelfServiceEnablementDisplay {
|
|
169
|
+
company_id: number;
|
|
170
|
+
can_manage_api_clients: boolean;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
export interface CreditBalanceOutput {
|
|
@@ -181,7 +186,7 @@ export interface CuratedAlbumDisplay {
|
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
export interface EventPage {
|
|
184
|
-
events:
|
|
189
|
+
events: any;
|
|
185
190
|
next_cursor?: string;
|
|
186
191
|
}
|
|
187
192
|
|
|
@@ -202,7 +207,7 @@ export interface KeywordListDisplayWithList {
|
|
|
202
207
|
gsheet_view_link?: string;
|
|
203
208
|
gsheet_csv_link?: string;
|
|
204
209
|
gsheet_xlsx_link?: string;
|
|
205
|
-
list_keywords_included_or_excluded?:
|
|
210
|
+
list_keywords_included_or_excluded?: any;
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
export interface KeywordListDisplayWithProjects {
|
|
@@ -213,7 +218,19 @@ export interface KeywordListDisplayWithProjects {
|
|
|
213
218
|
date_created: string;
|
|
214
219
|
date_last_updated: string;
|
|
215
220
|
is_inclusion?: boolean;
|
|
216
|
-
list_projects_associated?:
|
|
221
|
+
list_projects_associated?: any;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface OrganizationCredentialCreated {
|
|
225
|
+
client_id: string;
|
|
226
|
+
client_secret: string;
|
|
227
|
+
credential_name: string;
|
|
228
|
+
created_at: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface OrganizationCredentialRevoked {
|
|
232
|
+
client_id: string;
|
|
233
|
+
revoked_at: string;
|
|
217
234
|
}
|
|
218
235
|
|
|
219
236
|
export interface PhotoDisplay {
|
|
@@ -222,7 +239,7 @@ export interface PhotoDisplay {
|
|
|
222
239
|
moment_id?: number;
|
|
223
240
|
file_path?: string;
|
|
224
241
|
image_metadata?: Record<string, any>;
|
|
225
|
-
tags?:
|
|
242
|
+
tags?: any;
|
|
226
243
|
title?: string;
|
|
227
244
|
description?: string;
|
|
228
245
|
format?: string;
|
|
@@ -247,17 +264,17 @@ export interface PhotoDisplay {
|
|
|
247
264
|
reference_1_average_distance?: number;
|
|
248
265
|
reference_2_average_distance?: number;
|
|
249
266
|
reference_3_average_distance?: number;
|
|
250
|
-
main_color_palette?:
|
|
251
|
-
color_averages?:
|
|
267
|
+
main_color_palette?: any;
|
|
268
|
+
color_averages?: any;
|
|
252
269
|
labels_from_classifications_model?: Record<string, any>;
|
|
253
270
|
ocr_output?: Record<string, any>;
|
|
254
|
-
bounding_boxes_from_faces_model?:
|
|
271
|
+
bounding_boxes_from_faces_model?: any;
|
|
255
272
|
number_of_faces?: number;
|
|
256
273
|
blur_value?: number;
|
|
257
|
-
feature_extraction_output?:
|
|
258
|
-
similar_photo_ids_high?:
|
|
259
|
-
similar_photo_ids_medium?:
|
|
260
|
-
similar_photo_ids_low?:
|
|
274
|
+
feature_extraction_output?: any;
|
|
275
|
+
similar_photo_ids_high?: any;
|
|
276
|
+
similar_photo_ids_medium?: any;
|
|
277
|
+
similar_photo_ids_low?: any;
|
|
261
278
|
evidence_score?: number;
|
|
262
279
|
face_score?: number;
|
|
263
280
|
content_score?: number;
|
|
@@ -265,9 +282,9 @@ export interface PhotoDisplay {
|
|
|
265
282
|
similarity_set_ranking?: number;
|
|
266
283
|
topic?: string;
|
|
267
284
|
rank?: number;
|
|
268
|
-
hue_values?:
|
|
269
|
-
light_values?:
|
|
270
|
-
saturation_values?:
|
|
285
|
+
hue_values?: any;
|
|
286
|
+
light_values?: any;
|
|
287
|
+
saturation_values?: any;
|
|
271
288
|
aesthetic_appeal?: number;
|
|
272
289
|
lighting?: number;
|
|
273
290
|
subject_significance?: number;
|
|
@@ -384,23 +401,16 @@ export interface ProjectRunDisplay {
|
|
|
384
401
|
is_continuous_upload?: boolean;
|
|
385
402
|
}
|
|
386
403
|
|
|
387
|
-
export interface PullEvent {
|
|
388
|
-
event_id: string;
|
|
389
|
-
photo_id: number;
|
|
390
|
-
target: string;
|
|
391
|
-
completed_at: string;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
404
|
export interface SearchDisplay {
|
|
395
405
|
id: number;
|
|
396
406
|
project_table_name: string;
|
|
397
407
|
search_name: string;
|
|
398
|
-
and_params?:
|
|
399
|
-
and_string_params?:
|
|
400
|
-
or_params?:
|
|
401
|
-
or_string_params?:
|
|
402
|
-
not_params?:
|
|
403
|
-
not_string_params?:
|
|
408
|
+
and_params?: any;
|
|
409
|
+
and_string_params?: any;
|
|
410
|
+
or_params?: any;
|
|
411
|
+
or_string_params?: any;
|
|
412
|
+
not_params?: any;
|
|
413
|
+
not_string_params?: any;
|
|
404
414
|
date_min?: string;
|
|
405
415
|
date_max?: string;
|
|
406
416
|
date_null_and?: boolean;
|
|
@@ -421,7 +431,7 @@ export interface SubscriptionDisplay {
|
|
|
421
431
|
id: string;
|
|
422
432
|
project_table_name: string;
|
|
423
433
|
callback_url?: string;
|
|
424
|
-
targets:
|
|
434
|
+
targets: any;
|
|
425
435
|
status: string;
|
|
426
436
|
consecutive_failures: number;
|
|
427
437
|
last_delivery_at?: string;
|
|
@@ -441,12 +451,26 @@ export interface UserDisplay {
|
|
|
441
451
|
profile_picture?: string;
|
|
442
452
|
}
|
|
443
453
|
|
|
454
|
+
export interface UserDisplayWithCompanyPermissions {
|
|
455
|
+
id: number;
|
|
456
|
+
company_id: number;
|
|
457
|
+
name: string;
|
|
458
|
+
email: string;
|
|
459
|
+
account_type: number;
|
|
460
|
+
location?: string;
|
|
461
|
+
phone_number?: string;
|
|
462
|
+
birthday?: string;
|
|
463
|
+
profile_picture?: string;
|
|
464
|
+
can_manage_api_clients?: boolean;
|
|
465
|
+
}
|
|
466
|
+
|
|
444
467
|
export class AiModelCredits {
|
|
445
468
|
getModelCreditRelationship(modelName: string): Promise<Record<string, any>>;
|
|
446
469
|
}
|
|
447
470
|
|
|
448
471
|
export class Admin {
|
|
449
472
|
getCategoryLabels(category: string): Promise<Record<string, any>>;
|
|
473
|
+
adminSetCompanyCanManageApiClients(companyId: number, canManageApiClients: boolean): Promise<CredentialSelfServiceEnablementDisplay>;
|
|
450
474
|
}
|
|
451
475
|
|
|
452
476
|
export class Company {
|
|
@@ -470,8 +494,8 @@ export class CustomAlbums {
|
|
|
470
494
|
getAllProjectCustomAlbums(projectTableName: string): Promise<AlbumDisplay[]>;
|
|
471
495
|
getCustomAlbumPhotosById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
472
496
|
getRankedCustomAlbumById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
473
|
-
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
474
|
-
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
497
|
+
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
498
|
+
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
475
499
|
deleteCustomAlbum(albumId: number): Promise<Record<string, any>>;
|
|
476
500
|
}
|
|
477
501
|
|
|
@@ -491,15 +515,15 @@ export class Health {
|
|
|
491
515
|
}
|
|
492
516
|
|
|
493
517
|
export class Keywords {
|
|
494
|
-
createKeywordFilteringList(name: string, projectList?:
|
|
518
|
+
createKeywordFilteringList(name: string, projectList?: any): Promise<KeywordListDisplayWithProjects>;
|
|
495
519
|
getUserKeywordFilteringLists(): Promise<KeywordListDisplayWithProjects[]>;
|
|
496
520
|
getCompanyKeywordLists(companyId: number): Promise<CompanyKeywordListOverview[]>;
|
|
497
521
|
getKeywordFilteringListAndProjectsById(keywordListId: number): Promise<KeywordListDisplayWithProjects>;
|
|
498
522
|
getKeywordFilteringListById(keywordListId: number): Promise<KeywordListDisplayWithList>;
|
|
499
523
|
getExistingKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
500
524
|
getDefaultKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
501
|
-
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude:
|
|
502
|
-
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?:
|
|
525
|
+
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: any, listKeywordsToExclude: any): Promise<KeywordListDisplayWithList>;
|
|
526
|
+
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: any }): Promise<KeywordListDisplayWithProjects>;
|
|
503
527
|
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
504
528
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
505
529
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -518,6 +542,12 @@ export class OauthAuthorization {
|
|
|
518
542
|
getSwitchUser(sessionId: string, options?: { restartUrl?: string | string[] }): Promise<any>;
|
|
519
543
|
}
|
|
520
544
|
|
|
545
|
+
export class OauthClients {
|
|
546
|
+
createApiCredential(credentialName: string): Promise<OrganizationCredentialCreated>;
|
|
547
|
+
getCompanyApiCredentials(): Promise<any>;
|
|
548
|
+
revokeApiCredential(clientId: string): Promise<OrganizationCredentialRevoked>;
|
|
549
|
+
}
|
|
550
|
+
|
|
521
551
|
export class OauthToken {
|
|
522
552
|
token(body: { grantType: string, code: string, redirectUri: string, clientId: string, codeVerifier: string, refreshToken: string, clientSecret: string }): Promise<Record<string, any>>;
|
|
523
553
|
adminRevokeUserTokens(userId: number): Promise<Record<string, any>>;
|
|
@@ -552,7 +582,7 @@ export class Photos {
|
|
|
552
582
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
553
583
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
554
584
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
555
|
-
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?:
|
|
585
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: any }): Promise<PhotoDisplay>;
|
|
556
586
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
557
587
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
558
588
|
}
|
|
@@ -591,11 +621,11 @@ export class Search {
|
|
|
591
621
|
}
|
|
592
622
|
|
|
593
623
|
export class Subscription {
|
|
594
|
-
createSubscription(projectTableName: string, targets:
|
|
624
|
+
createSubscription(projectTableName: string, targets: any, callbackUrl?: string): Promise<SubscriptionActivated>;
|
|
595
625
|
verifySubscription(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
596
626
|
listSubscriptions(): Promise<SubscriptionDisplay[]>;
|
|
597
627
|
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[] }): Promise<EventPage>;
|
|
598
|
-
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?:
|
|
628
|
+
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?: any }): Promise<SubscriptionDisplay>;
|
|
599
629
|
deleteSubscription(subscriptionId: string): Promise<Record<string, any>>;
|
|
600
630
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
601
631
|
}
|
|
@@ -605,7 +635,7 @@ export class Users {
|
|
|
605
635
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
606
636
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
607
637
|
getUserId(): Promise<Record<string, any>>;
|
|
608
|
-
getUser(userId: number): Promise<
|
|
638
|
+
getUser(userId: number): Promise<UserDisplayWithCompanyPermissions>;
|
|
609
639
|
getAllUsersByCompany(companyId: number): Promise<UserDisplay[]>;
|
|
610
640
|
updateUser(userId: number, body?: { name?: string, email?: string, password?: string, companyId?: number, accountType?: number, profilePicture?: string, location?: string, phoneNumber?: string, birthday?: string }): Promise<UserDisplay>;
|
|
611
641
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
@@ -632,6 +662,7 @@ export class MediaViz {
|
|
|
632
662
|
readonly health: Health;
|
|
633
663
|
readonly keywords: Keywords;
|
|
634
664
|
readonly oAuthAuthorization: OauthAuthorization;
|
|
665
|
+
readonly oAuthClients: OauthClients;
|
|
635
666
|
readonly oAuthToken: OauthToken;
|
|
636
667
|
readonly oauthLogin: OauthLogin;
|
|
637
668
|
readonly person: Person;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ export interface CompanyDisplay {
|
|
|
152
152
|
name: string;
|
|
153
153
|
id: number;
|
|
154
154
|
owner_id: number;
|
|
155
|
-
users?:
|
|
155
|
+
users?: any;
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
158
|
}
|
|
@@ -162,7 +162,12 @@ export interface CompanyKeywordListOverview {
|
|
|
162
162
|
name: string;
|
|
163
163
|
active_keywords: number;
|
|
164
164
|
excluded_keywords: number;
|
|
165
|
-
project_ids?:
|
|
165
|
+
project_ids?: any;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface CredentialSelfServiceEnablementDisplay {
|
|
169
|
+
company_id: number;
|
|
170
|
+
can_manage_api_clients: boolean;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
export interface CreditBalanceOutput {
|
|
@@ -181,7 +186,7 @@ export interface CuratedAlbumDisplay {
|
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
export interface EventPage {
|
|
184
|
-
events:
|
|
189
|
+
events: any;
|
|
185
190
|
next_cursor?: string;
|
|
186
191
|
}
|
|
187
192
|
|
|
@@ -202,7 +207,7 @@ export interface KeywordListDisplayWithList {
|
|
|
202
207
|
gsheet_view_link?: string;
|
|
203
208
|
gsheet_csv_link?: string;
|
|
204
209
|
gsheet_xlsx_link?: string;
|
|
205
|
-
list_keywords_included_or_excluded?:
|
|
210
|
+
list_keywords_included_or_excluded?: any;
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
export interface KeywordListDisplayWithProjects {
|
|
@@ -213,7 +218,19 @@ export interface KeywordListDisplayWithProjects {
|
|
|
213
218
|
date_created: string;
|
|
214
219
|
date_last_updated: string;
|
|
215
220
|
is_inclusion?: boolean;
|
|
216
|
-
list_projects_associated?:
|
|
221
|
+
list_projects_associated?: any;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface OrganizationCredentialCreated {
|
|
225
|
+
client_id: string;
|
|
226
|
+
client_secret: string;
|
|
227
|
+
credential_name: string;
|
|
228
|
+
created_at: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface OrganizationCredentialRevoked {
|
|
232
|
+
client_id: string;
|
|
233
|
+
revoked_at: string;
|
|
217
234
|
}
|
|
218
235
|
|
|
219
236
|
export interface PhotoDisplay {
|
|
@@ -222,7 +239,7 @@ export interface PhotoDisplay {
|
|
|
222
239
|
moment_id?: number;
|
|
223
240
|
file_path?: string;
|
|
224
241
|
image_metadata?: Record<string, any>;
|
|
225
|
-
tags?:
|
|
242
|
+
tags?: any;
|
|
226
243
|
title?: string;
|
|
227
244
|
description?: string;
|
|
228
245
|
format?: string;
|
|
@@ -247,17 +264,17 @@ export interface PhotoDisplay {
|
|
|
247
264
|
reference_1_average_distance?: number;
|
|
248
265
|
reference_2_average_distance?: number;
|
|
249
266
|
reference_3_average_distance?: number;
|
|
250
|
-
main_color_palette?:
|
|
251
|
-
color_averages?:
|
|
267
|
+
main_color_palette?: any;
|
|
268
|
+
color_averages?: any;
|
|
252
269
|
labels_from_classifications_model?: Record<string, any>;
|
|
253
270
|
ocr_output?: Record<string, any>;
|
|
254
|
-
bounding_boxes_from_faces_model?:
|
|
271
|
+
bounding_boxes_from_faces_model?: any;
|
|
255
272
|
number_of_faces?: number;
|
|
256
273
|
blur_value?: number;
|
|
257
|
-
feature_extraction_output?:
|
|
258
|
-
similar_photo_ids_high?:
|
|
259
|
-
similar_photo_ids_medium?:
|
|
260
|
-
similar_photo_ids_low?:
|
|
274
|
+
feature_extraction_output?: any;
|
|
275
|
+
similar_photo_ids_high?: any;
|
|
276
|
+
similar_photo_ids_medium?: any;
|
|
277
|
+
similar_photo_ids_low?: any;
|
|
261
278
|
evidence_score?: number;
|
|
262
279
|
face_score?: number;
|
|
263
280
|
content_score?: number;
|
|
@@ -265,9 +282,9 @@ export interface PhotoDisplay {
|
|
|
265
282
|
similarity_set_ranking?: number;
|
|
266
283
|
topic?: string;
|
|
267
284
|
rank?: number;
|
|
268
|
-
hue_values?:
|
|
269
|
-
light_values?:
|
|
270
|
-
saturation_values?:
|
|
285
|
+
hue_values?: any;
|
|
286
|
+
light_values?: any;
|
|
287
|
+
saturation_values?: any;
|
|
271
288
|
aesthetic_appeal?: number;
|
|
272
289
|
lighting?: number;
|
|
273
290
|
subject_significance?: number;
|
|
@@ -384,23 +401,16 @@ export interface ProjectRunDisplay {
|
|
|
384
401
|
is_continuous_upload?: boolean;
|
|
385
402
|
}
|
|
386
403
|
|
|
387
|
-
export interface PullEvent {
|
|
388
|
-
event_id: string;
|
|
389
|
-
photo_id: number;
|
|
390
|
-
target: string;
|
|
391
|
-
completed_at: string;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
404
|
export interface SearchDisplay {
|
|
395
405
|
id: number;
|
|
396
406
|
project_table_name: string;
|
|
397
407
|
search_name: string;
|
|
398
|
-
and_params?:
|
|
399
|
-
and_string_params?:
|
|
400
|
-
or_params?:
|
|
401
|
-
or_string_params?:
|
|
402
|
-
not_params?:
|
|
403
|
-
not_string_params?:
|
|
408
|
+
and_params?: any;
|
|
409
|
+
and_string_params?: any;
|
|
410
|
+
or_params?: any;
|
|
411
|
+
or_string_params?: any;
|
|
412
|
+
not_params?: any;
|
|
413
|
+
not_string_params?: any;
|
|
404
414
|
date_min?: string;
|
|
405
415
|
date_max?: string;
|
|
406
416
|
date_null_and?: boolean;
|
|
@@ -421,7 +431,7 @@ export interface SubscriptionDisplay {
|
|
|
421
431
|
id: string;
|
|
422
432
|
project_table_name: string;
|
|
423
433
|
callback_url?: string;
|
|
424
|
-
targets:
|
|
434
|
+
targets: any;
|
|
425
435
|
status: string;
|
|
426
436
|
consecutive_failures: number;
|
|
427
437
|
last_delivery_at?: string;
|
|
@@ -441,12 +451,26 @@ export interface UserDisplay {
|
|
|
441
451
|
profile_picture?: string;
|
|
442
452
|
}
|
|
443
453
|
|
|
454
|
+
export interface UserDisplayWithCompanyPermissions {
|
|
455
|
+
id: number;
|
|
456
|
+
company_id: number;
|
|
457
|
+
name: string;
|
|
458
|
+
email: string;
|
|
459
|
+
account_type: number;
|
|
460
|
+
location?: string;
|
|
461
|
+
phone_number?: string;
|
|
462
|
+
birthday?: string;
|
|
463
|
+
profile_picture?: string;
|
|
464
|
+
can_manage_api_clients?: boolean;
|
|
465
|
+
}
|
|
466
|
+
|
|
444
467
|
export class AiModelCredits {
|
|
445
468
|
getModelCreditRelationship(modelName: string): Promise<Record<string, any>>;
|
|
446
469
|
}
|
|
447
470
|
|
|
448
471
|
export class Admin {
|
|
449
472
|
getCategoryLabels(category: string): Promise<Record<string, any>>;
|
|
473
|
+
adminSetCompanyCanManageApiClients(companyId: number, canManageApiClients: boolean): Promise<CredentialSelfServiceEnablementDisplay>;
|
|
450
474
|
}
|
|
451
475
|
|
|
452
476
|
export class Company {
|
|
@@ -470,8 +494,8 @@ export class CustomAlbums {
|
|
|
470
494
|
getAllProjectCustomAlbums(projectTableName: string): Promise<AlbumDisplay[]>;
|
|
471
495
|
getCustomAlbumPhotosById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
472
496
|
getRankedCustomAlbumById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
473
|
-
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
474
|
-
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
497
|
+
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
498
|
+
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
475
499
|
deleteCustomAlbum(albumId: number): Promise<Record<string, any>>;
|
|
476
500
|
}
|
|
477
501
|
|
|
@@ -491,15 +515,15 @@ export class Health {
|
|
|
491
515
|
}
|
|
492
516
|
|
|
493
517
|
export class Keywords {
|
|
494
|
-
createKeywordFilteringList(name: string, projectList?:
|
|
518
|
+
createKeywordFilteringList(name: string, projectList?: any): Promise<KeywordListDisplayWithProjects>;
|
|
495
519
|
getUserKeywordFilteringLists(): Promise<KeywordListDisplayWithProjects[]>;
|
|
496
520
|
getCompanyKeywordLists(companyId: number): Promise<CompanyKeywordListOverview[]>;
|
|
497
521
|
getKeywordFilteringListAndProjectsById(keywordListId: number): Promise<KeywordListDisplayWithProjects>;
|
|
498
522
|
getKeywordFilteringListById(keywordListId: number): Promise<KeywordListDisplayWithList>;
|
|
499
523
|
getExistingKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
500
524
|
getDefaultKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
501
|
-
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude:
|
|
502
|
-
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?:
|
|
525
|
+
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: any, listKeywordsToExclude: any): Promise<KeywordListDisplayWithList>;
|
|
526
|
+
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: any }): Promise<KeywordListDisplayWithProjects>;
|
|
503
527
|
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
504
528
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
505
529
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -518,6 +542,12 @@ export class OauthAuthorization {
|
|
|
518
542
|
getSwitchUser(sessionId: string, options?: { restartUrl?: string | string[] }): Promise<any>;
|
|
519
543
|
}
|
|
520
544
|
|
|
545
|
+
export class OauthClients {
|
|
546
|
+
createApiCredential(credentialName: string): Promise<OrganizationCredentialCreated>;
|
|
547
|
+
getCompanyApiCredentials(): Promise<any>;
|
|
548
|
+
revokeApiCredential(clientId: string): Promise<OrganizationCredentialRevoked>;
|
|
549
|
+
}
|
|
550
|
+
|
|
521
551
|
export class OauthToken {
|
|
522
552
|
token(body: { grantType: string, code: string, redirectUri: string, clientId: string, codeVerifier: string, refreshToken: string, clientSecret: string }): Promise<Record<string, any>>;
|
|
523
553
|
adminRevokeUserTokens(userId: number): Promise<Record<string, any>>;
|
|
@@ -552,7 +582,7 @@ export class Photos {
|
|
|
552
582
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
553
583
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
554
584
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
555
|
-
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?:
|
|
585
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: any }): Promise<PhotoDisplay>;
|
|
556
586
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
557
587
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
558
588
|
}
|
|
@@ -591,11 +621,11 @@ export class Search {
|
|
|
591
621
|
}
|
|
592
622
|
|
|
593
623
|
export class Subscription {
|
|
594
|
-
createSubscription(projectTableName: string, targets:
|
|
624
|
+
createSubscription(projectTableName: string, targets: any, callbackUrl?: string): Promise<SubscriptionActivated>;
|
|
595
625
|
verifySubscription(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
596
626
|
listSubscriptions(): Promise<SubscriptionDisplay[]>;
|
|
597
627
|
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[] }): Promise<EventPage>;
|
|
598
|
-
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?:
|
|
628
|
+
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?: any }): Promise<SubscriptionDisplay>;
|
|
599
629
|
deleteSubscription(subscriptionId: string): Promise<Record<string, any>>;
|
|
600
630
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
601
631
|
}
|
|
@@ -605,7 +635,7 @@ export class Users {
|
|
|
605
635
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
606
636
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
607
637
|
getUserId(): Promise<Record<string, any>>;
|
|
608
|
-
getUser(userId: number): Promise<
|
|
638
|
+
getUser(userId: number): Promise<UserDisplayWithCompanyPermissions>;
|
|
609
639
|
getAllUsersByCompany(companyId: number): Promise<UserDisplay[]>;
|
|
610
640
|
updateUser(userId: number, body?: { name?: string, email?: string, password?: string, companyId?: number, accountType?: number, profilePicture?: string, location?: string, phoneNumber?: string, birthday?: string }): Promise<UserDisplay>;
|
|
611
641
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
@@ -632,6 +662,7 @@ export class MediaViz {
|
|
|
632
662
|
readonly health: Health;
|
|
633
663
|
readonly keywords: Keywords;
|
|
634
664
|
readonly oAuthAuthorization: OauthAuthorization;
|
|
665
|
+
readonly oAuthClients: OauthClients;
|
|
635
666
|
readonly oAuthToken: OauthToken;
|
|
636
667
|
readonly oauthLogin: OauthLogin;
|
|
637
668
|
readonly person: Person;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ export interface CompanyDisplay {
|
|
|
152
152
|
name: string;
|
|
153
153
|
id: number;
|
|
154
154
|
owner_id: number;
|
|
155
|
-
users?:
|
|
155
|
+
users?: any;
|
|
156
156
|
active: boolean;
|
|
157
157
|
payment_plan_type: string;
|
|
158
158
|
}
|
|
@@ -162,7 +162,12 @@ export interface CompanyKeywordListOverview {
|
|
|
162
162
|
name: string;
|
|
163
163
|
active_keywords: number;
|
|
164
164
|
excluded_keywords: number;
|
|
165
|
-
project_ids?:
|
|
165
|
+
project_ids?: any;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface CredentialSelfServiceEnablementDisplay {
|
|
169
|
+
company_id: number;
|
|
170
|
+
can_manage_api_clients: boolean;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
export interface CreditBalanceOutput {
|
|
@@ -181,7 +186,7 @@ export interface CuratedAlbumDisplay {
|
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
export interface EventPage {
|
|
184
|
-
events:
|
|
189
|
+
events: any;
|
|
185
190
|
next_cursor?: string;
|
|
186
191
|
}
|
|
187
192
|
|
|
@@ -202,7 +207,7 @@ export interface KeywordListDisplayWithList {
|
|
|
202
207
|
gsheet_view_link?: string;
|
|
203
208
|
gsheet_csv_link?: string;
|
|
204
209
|
gsheet_xlsx_link?: string;
|
|
205
|
-
list_keywords_included_or_excluded?:
|
|
210
|
+
list_keywords_included_or_excluded?: any;
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
export interface KeywordListDisplayWithProjects {
|
|
@@ -213,7 +218,19 @@ export interface KeywordListDisplayWithProjects {
|
|
|
213
218
|
date_created: string;
|
|
214
219
|
date_last_updated: string;
|
|
215
220
|
is_inclusion?: boolean;
|
|
216
|
-
list_projects_associated?:
|
|
221
|
+
list_projects_associated?: any;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface OrganizationCredentialCreated {
|
|
225
|
+
client_id: string;
|
|
226
|
+
client_secret: string;
|
|
227
|
+
credential_name: string;
|
|
228
|
+
created_at: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface OrganizationCredentialRevoked {
|
|
232
|
+
client_id: string;
|
|
233
|
+
revoked_at: string;
|
|
217
234
|
}
|
|
218
235
|
|
|
219
236
|
export interface PhotoDisplay {
|
|
@@ -222,7 +239,7 @@ export interface PhotoDisplay {
|
|
|
222
239
|
moment_id?: number;
|
|
223
240
|
file_path?: string;
|
|
224
241
|
image_metadata?: Record<string, any>;
|
|
225
|
-
tags?:
|
|
242
|
+
tags?: any;
|
|
226
243
|
title?: string;
|
|
227
244
|
description?: string;
|
|
228
245
|
format?: string;
|
|
@@ -247,17 +264,17 @@ export interface PhotoDisplay {
|
|
|
247
264
|
reference_1_average_distance?: number;
|
|
248
265
|
reference_2_average_distance?: number;
|
|
249
266
|
reference_3_average_distance?: number;
|
|
250
|
-
main_color_palette?:
|
|
251
|
-
color_averages?:
|
|
267
|
+
main_color_palette?: any;
|
|
268
|
+
color_averages?: any;
|
|
252
269
|
labels_from_classifications_model?: Record<string, any>;
|
|
253
270
|
ocr_output?: Record<string, any>;
|
|
254
|
-
bounding_boxes_from_faces_model?:
|
|
271
|
+
bounding_boxes_from_faces_model?: any;
|
|
255
272
|
number_of_faces?: number;
|
|
256
273
|
blur_value?: number;
|
|
257
|
-
feature_extraction_output?:
|
|
258
|
-
similar_photo_ids_high?:
|
|
259
|
-
similar_photo_ids_medium?:
|
|
260
|
-
similar_photo_ids_low?:
|
|
274
|
+
feature_extraction_output?: any;
|
|
275
|
+
similar_photo_ids_high?: any;
|
|
276
|
+
similar_photo_ids_medium?: any;
|
|
277
|
+
similar_photo_ids_low?: any;
|
|
261
278
|
evidence_score?: number;
|
|
262
279
|
face_score?: number;
|
|
263
280
|
content_score?: number;
|
|
@@ -265,9 +282,9 @@ export interface PhotoDisplay {
|
|
|
265
282
|
similarity_set_ranking?: number;
|
|
266
283
|
topic?: string;
|
|
267
284
|
rank?: number;
|
|
268
|
-
hue_values?:
|
|
269
|
-
light_values?:
|
|
270
|
-
saturation_values?:
|
|
285
|
+
hue_values?: any;
|
|
286
|
+
light_values?: any;
|
|
287
|
+
saturation_values?: any;
|
|
271
288
|
aesthetic_appeal?: number;
|
|
272
289
|
lighting?: number;
|
|
273
290
|
subject_significance?: number;
|
|
@@ -384,23 +401,16 @@ export interface ProjectRunDisplay {
|
|
|
384
401
|
is_continuous_upload?: boolean;
|
|
385
402
|
}
|
|
386
403
|
|
|
387
|
-
export interface PullEvent {
|
|
388
|
-
event_id: string;
|
|
389
|
-
photo_id: number;
|
|
390
|
-
target: string;
|
|
391
|
-
completed_at: string;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
404
|
export interface SearchDisplay {
|
|
395
405
|
id: number;
|
|
396
406
|
project_table_name: string;
|
|
397
407
|
search_name: string;
|
|
398
|
-
and_params?:
|
|
399
|
-
and_string_params?:
|
|
400
|
-
or_params?:
|
|
401
|
-
or_string_params?:
|
|
402
|
-
not_params?:
|
|
403
|
-
not_string_params?:
|
|
408
|
+
and_params?: any;
|
|
409
|
+
and_string_params?: any;
|
|
410
|
+
or_params?: any;
|
|
411
|
+
or_string_params?: any;
|
|
412
|
+
not_params?: any;
|
|
413
|
+
not_string_params?: any;
|
|
404
414
|
date_min?: string;
|
|
405
415
|
date_max?: string;
|
|
406
416
|
date_null_and?: boolean;
|
|
@@ -421,7 +431,7 @@ export interface SubscriptionDisplay {
|
|
|
421
431
|
id: string;
|
|
422
432
|
project_table_name: string;
|
|
423
433
|
callback_url?: string;
|
|
424
|
-
targets:
|
|
434
|
+
targets: any;
|
|
425
435
|
status: string;
|
|
426
436
|
consecutive_failures: number;
|
|
427
437
|
last_delivery_at?: string;
|
|
@@ -441,12 +451,26 @@ export interface UserDisplay {
|
|
|
441
451
|
profile_picture?: string;
|
|
442
452
|
}
|
|
443
453
|
|
|
454
|
+
export interface UserDisplayWithCompanyPermissions {
|
|
455
|
+
id: number;
|
|
456
|
+
company_id: number;
|
|
457
|
+
name: string;
|
|
458
|
+
email: string;
|
|
459
|
+
account_type: number;
|
|
460
|
+
location?: string;
|
|
461
|
+
phone_number?: string;
|
|
462
|
+
birthday?: string;
|
|
463
|
+
profile_picture?: string;
|
|
464
|
+
can_manage_api_clients?: boolean;
|
|
465
|
+
}
|
|
466
|
+
|
|
444
467
|
export class AiModelCredits {
|
|
445
468
|
getModelCreditRelationship(modelName: string): Promise<Record<string, any>>;
|
|
446
469
|
}
|
|
447
470
|
|
|
448
471
|
export class Admin {
|
|
449
472
|
getCategoryLabels(category: string): Promise<Record<string, any>>;
|
|
473
|
+
adminSetCompanyCanManageApiClients(companyId: number, canManageApiClients: boolean): Promise<CredentialSelfServiceEnablementDisplay>;
|
|
450
474
|
}
|
|
451
475
|
|
|
452
476
|
export class Company {
|
|
@@ -470,8 +494,8 @@ export class CustomAlbums {
|
|
|
470
494
|
getAllProjectCustomAlbums(projectTableName: string): Promise<AlbumDisplay[]>;
|
|
471
495
|
getCustomAlbumPhotosById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
472
496
|
getRankedCustomAlbumById(customAlbumId: number, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
473
|
-
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
474
|
-
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?:
|
|
497
|
+
createProjectCustomAlbum(projectTableName: string, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
498
|
+
updateCustomAlbum(albumId: number, body?: { name?: string, description?: string, photoIdInclusionList?: any, photoIdRemovalList?: any }): Promise<AlbumDisplay>;
|
|
475
499
|
deleteCustomAlbum(albumId: number): Promise<Record<string, any>>;
|
|
476
500
|
}
|
|
477
501
|
|
|
@@ -491,15 +515,15 @@ export class Health {
|
|
|
491
515
|
}
|
|
492
516
|
|
|
493
517
|
export class Keywords {
|
|
494
|
-
createKeywordFilteringList(name: string, projectList?:
|
|
518
|
+
createKeywordFilteringList(name: string, projectList?: any): Promise<KeywordListDisplayWithProjects>;
|
|
495
519
|
getUserKeywordFilteringLists(): Promise<KeywordListDisplayWithProjects[]>;
|
|
496
520
|
getCompanyKeywordLists(companyId: number): Promise<CompanyKeywordListOverview[]>;
|
|
497
521
|
getKeywordFilteringListAndProjectsById(keywordListId: number): Promise<KeywordListDisplayWithProjects>;
|
|
498
522
|
getKeywordFilteringListById(keywordListId: number): Promise<KeywordListDisplayWithList>;
|
|
499
523
|
getExistingKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
500
524
|
getDefaultKeywordFilteringListByProject(projectTableName: string): Promise<Record<string, any>>;
|
|
501
|
-
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude:
|
|
502
|
-
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?:
|
|
525
|
+
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: any, listKeywordsToExclude: any): Promise<KeywordListDisplayWithList>;
|
|
526
|
+
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: any }): Promise<KeywordListDisplayWithProjects>;
|
|
503
527
|
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
504
528
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
505
529
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -518,6 +542,12 @@ export class OauthAuthorization {
|
|
|
518
542
|
getSwitchUser(sessionId: string, options?: { restartUrl?: string | string[] }): Promise<any>;
|
|
519
543
|
}
|
|
520
544
|
|
|
545
|
+
export class OauthClients {
|
|
546
|
+
createApiCredential(credentialName: string): Promise<OrganizationCredentialCreated>;
|
|
547
|
+
getCompanyApiCredentials(): Promise<any>;
|
|
548
|
+
revokeApiCredential(clientId: string): Promise<OrganizationCredentialRevoked>;
|
|
549
|
+
}
|
|
550
|
+
|
|
521
551
|
export class OauthToken {
|
|
522
552
|
token(body: { grantType: string, code: string, redirectUri: string, clientId: string, codeVerifier: string, refreshToken: string, clientSecret: string }): Promise<Record<string, any>>;
|
|
523
553
|
adminRevokeUserTokens(userId: number): Promise<Record<string, any>>;
|
|
@@ -552,7 +582,7 @@ export class Photos {
|
|
|
552
582
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
553
583
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
554
584
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
555
|
-
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?:
|
|
585
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: any }): Promise<PhotoDisplay>;
|
|
556
586
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
557
587
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
558
588
|
}
|
|
@@ -591,11 +621,11 @@ export class Search {
|
|
|
591
621
|
}
|
|
592
622
|
|
|
593
623
|
export class Subscription {
|
|
594
|
-
createSubscription(projectTableName: string, targets:
|
|
624
|
+
createSubscription(projectTableName: string, targets: any, callbackUrl?: string): Promise<SubscriptionActivated>;
|
|
595
625
|
verifySubscription(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
596
626
|
listSubscriptions(): Promise<SubscriptionDisplay[]>;
|
|
597
627
|
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[] }): Promise<EventPage>;
|
|
598
|
-
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?:
|
|
628
|
+
updateSubscription(subscriptionId: string, body?: { callbackUrl?: string, targets?: any }): Promise<SubscriptionDisplay>;
|
|
599
629
|
deleteSubscription(subscriptionId: string): Promise<Record<string, any>>;
|
|
600
630
|
rotateSubscriptionSecret(subscriptionId: string): Promise<SubscriptionActivated>;
|
|
601
631
|
}
|
|
@@ -605,7 +635,7 @@ export class Users {
|
|
|
605
635
|
createUserAndCompany(name: string, email: string, password: string, companyId?: number, profilePicture?: string, paymentPlanType?: string, companyName?: string, credits?: number, options?: { inviteToken?: string | string[] }): Promise<UserDisplay>;
|
|
606
636
|
changePassword(oldPassword: string, newPassword: string): Promise<Record<string, any>>;
|
|
607
637
|
getUserId(): Promise<Record<string, any>>;
|
|
608
|
-
getUser(userId: number): Promise<
|
|
638
|
+
getUser(userId: number): Promise<UserDisplayWithCompanyPermissions>;
|
|
609
639
|
getAllUsersByCompany(companyId: number): Promise<UserDisplay[]>;
|
|
610
640
|
updateUser(userId: number, body?: { name?: string, email?: string, password?: string, companyId?: number, accountType?: number, profilePicture?: string, location?: string, phoneNumber?: string, birthday?: string }): Promise<UserDisplay>;
|
|
611
641
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
@@ -632,6 +662,7 @@ export class MediaViz {
|
|
|
632
662
|
readonly health: Health;
|
|
633
663
|
readonly keywords: Keywords;
|
|
634
664
|
readonly oAuthAuthorization: OauthAuthorization;
|
|
665
|
+
readonly oAuthClients: OauthClients;
|
|
635
666
|
readonly oAuthToken: OauthToken;
|
|
636
667
|
readonly oauthLogin: OauthLogin;
|
|
637
668
|
readonly person: Person;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -1113,6 +1113,8 @@ class AiModelCredits {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
+
function stripUndef$a(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1117
|
+
|
|
1116
1118
|
class Admin {
|
|
1117
1119
|
constructor(ctx) { this._ctx = ctx; }
|
|
1118
1120
|
|
|
@@ -1122,6 +1124,16 @@ class Admin {
|
|
|
1122
1124
|
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1123
1125
|
return data;
|
|
1124
1126
|
}
|
|
1127
|
+
|
|
1128
|
+
async adminSetCompanyCanManageApiClients(companyId, canManageApiClients) {
|
|
1129
|
+
this._ctx.requireTokens();
|
|
1130
|
+
const path = `/api/v1/admin/companies/${encodeURIComponent(companyId)}/can_manage_api_clients`;
|
|
1131
|
+
const body = stripUndef$a({
|
|
1132
|
+
can_manage_api_clients: canManageApiClients,
|
|
1133
|
+
});
|
|
1134
|
+
const { data } = await this._ctx.client.request(path, 'PATCH', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1135
|
+
return data;
|
|
1136
|
+
}
|
|
1125
1137
|
}
|
|
1126
1138
|
|
|
1127
1139
|
class Company {
|
|
@@ -1147,7 +1159,7 @@ class Company {
|
|
|
1147
1159
|
}
|
|
1148
1160
|
}
|
|
1149
1161
|
|
|
1150
|
-
function stripUndef$
|
|
1162
|
+
function stripUndef$9(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1151
1163
|
|
|
1152
1164
|
class CuratedAlbums {
|
|
1153
1165
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1155,7 +1167,7 @@ class CuratedAlbums {
|
|
|
1155
1167
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1156
1168
|
this._ctx.requireTokens();
|
|
1157
1169
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1158
|
-
const body = stripUndef$
|
|
1170
|
+
const body = stripUndef$9({
|
|
1159
1171
|
name: name,
|
|
1160
1172
|
description: description,
|
|
1161
1173
|
confidence_value: confidenceValue,
|
|
@@ -1209,7 +1221,7 @@ class CuratedAlbums {
|
|
|
1209
1221
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1210
1222
|
this._ctx.requireTokens();
|
|
1211
1223
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1212
|
-
const body = stripUndef$
|
|
1224
|
+
const body = stripUndef$9({
|
|
1213
1225
|
name: name,
|
|
1214
1226
|
description: description,
|
|
1215
1227
|
confidence_value: confidenceValue,
|
|
@@ -1233,7 +1245,7 @@ class CuratedAlbums {
|
|
|
1233
1245
|
}
|
|
1234
1246
|
}
|
|
1235
1247
|
|
|
1236
|
-
function stripUndef$
|
|
1248
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1237
1249
|
|
|
1238
1250
|
class CustomAlbums {
|
|
1239
1251
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1281,7 +1293,7 @@ class CustomAlbums {
|
|
|
1281
1293
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1282
1294
|
this._ctx.requireTokens();
|
|
1283
1295
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1284
|
-
const body = stripUndef$
|
|
1296
|
+
const body = stripUndef$8({
|
|
1285
1297
|
name: name,
|
|
1286
1298
|
description: description,
|
|
1287
1299
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1294,7 +1306,7 @@ class CustomAlbums {
|
|
|
1294
1306
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1295
1307
|
this._ctx.requireTokens();
|
|
1296
1308
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1297
|
-
const body = stripUndef$
|
|
1309
|
+
const body = stripUndef$8({
|
|
1298
1310
|
name: name,
|
|
1299
1311
|
description: description,
|
|
1300
1312
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1394,7 +1406,7 @@ async function handleResponse(response) {
|
|
|
1394
1406
|
}
|
|
1395
1407
|
}
|
|
1396
1408
|
|
|
1397
|
-
function stripUndef$
|
|
1409
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1398
1410
|
|
|
1399
1411
|
class EmailTokens {
|
|
1400
1412
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1425,7 +1437,7 @@ class EmailTokens {
|
|
|
1425
1437
|
}
|
|
1426
1438
|
|
|
1427
1439
|
async validateToken(token) {
|
|
1428
|
-
const body = stripUndef$
|
|
1440
|
+
const body = stripUndef$7({
|
|
1429
1441
|
token: token,
|
|
1430
1442
|
});
|
|
1431
1443
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1437,7 +1449,7 @@ class EmailTokens {
|
|
|
1437
1449
|
}
|
|
1438
1450
|
|
|
1439
1451
|
async resetPassword(token, newPassword) {
|
|
1440
|
-
const body = stripUndef$
|
|
1452
|
+
const body = stripUndef$7({
|
|
1441
1453
|
token: token,
|
|
1442
1454
|
new_password: newPassword,
|
|
1443
1455
|
});
|
|
@@ -1476,7 +1488,7 @@ class Health {
|
|
|
1476
1488
|
}
|
|
1477
1489
|
}
|
|
1478
1490
|
|
|
1479
|
-
function stripUndef$
|
|
1491
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1480
1492
|
|
|
1481
1493
|
class Keywords {
|
|
1482
1494
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1484,7 +1496,7 @@ class Keywords {
|
|
|
1484
1496
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1485
1497
|
this._ctx.requireTokens();
|
|
1486
1498
|
const path = `/api/v1/keyword/`;
|
|
1487
|
-
const body = stripUndef$
|
|
1499
|
+
const body = stripUndef$6({
|
|
1488
1500
|
name: name,
|
|
1489
1501
|
project_list: projectList,
|
|
1490
1502
|
});
|
|
@@ -1537,7 +1549,7 @@ class Keywords {
|
|
|
1537
1549
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1538
1550
|
this._ctx.requireTokens();
|
|
1539
1551
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1540
|
-
const body = stripUndef$
|
|
1552
|
+
const body = stripUndef$6({
|
|
1541
1553
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1542
1554
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1543
1555
|
});
|
|
@@ -1548,7 +1560,7 @@ class Keywords {
|
|
|
1548
1560
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1549
1561
|
this._ctx.requireTokens();
|
|
1550
1562
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1551
|
-
const body = stripUndef$
|
|
1563
|
+
const body = stripUndef$6({
|
|
1552
1564
|
name: name,
|
|
1553
1565
|
project_list: projectList,
|
|
1554
1566
|
});
|
|
@@ -1681,6 +1693,36 @@ class OauthAuthorization {
|
|
|
1681
1693
|
}
|
|
1682
1694
|
}
|
|
1683
1695
|
|
|
1696
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1697
|
+
|
|
1698
|
+
class OauthClients {
|
|
1699
|
+
constructor(ctx) { this._ctx = ctx; }
|
|
1700
|
+
|
|
1701
|
+
async createApiCredential(credentialName) {
|
|
1702
|
+
this._ctx.requireTokens();
|
|
1703
|
+
const path = `/oauth/clients/api-credentials`;
|
|
1704
|
+
const body = stripUndef$5({
|
|
1705
|
+
credential_name: credentialName,
|
|
1706
|
+
});
|
|
1707
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1708
|
+
return data;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
async getCompanyApiCredentials() {
|
|
1712
|
+
this._ctx.requireTokens();
|
|
1713
|
+
const path = `/oauth/clients/api-credentials`;
|
|
1714
|
+
const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1715
|
+
return data;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
async revokeApiCredential(clientId) {
|
|
1719
|
+
this._ctx.requireTokens();
|
|
1720
|
+
const path = `/oauth/clients/api-credentials/${encodeURIComponent(clientId)}/revoke`;
|
|
1721
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
1722
|
+
return data;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1684
1726
|
class OauthToken {
|
|
1685
1727
|
constructor(ctx) { this._ctx = ctx; }
|
|
1686
1728
|
|
|
@@ -2531,6 +2573,7 @@ class MediaViz {
|
|
|
2531
2573
|
this.health = new Health(_ctx);
|
|
2532
2574
|
this.keywords = new Keywords(_ctx);
|
|
2533
2575
|
this.oAuthAuthorization = new OauthAuthorization(_ctx);
|
|
2576
|
+
this.oAuthClients = new OauthClients(_ctx);
|
|
2534
2577
|
this.oAuthToken = new OauthToken(_ctx);
|
|
2535
2578
|
this.oauthLogin = new OauthLogin(_ctx);
|
|
2536
2579
|
this.person = new Person(_ctx);
|
|
@@ -2952,4 +2995,4 @@ var _react_native = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
|
2952
2995
|
// Auto-generated — do not edit
|
|
2953
2996
|
const { createCryptoProvider, MemoryTokenStore, createSecureTokenStore, createKeychainTokenStore, startAuthSession, parseRedirectUrl, AuthSessionError, createSession } = _react_native;
|
|
2954
2997
|
|
|
2955
|
-
export { Admin, AiModelCredits, ApiError, AuthSessionError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, MemoryTokenStore, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, 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 };
|
|
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 };
|
package/package.json
CHANGED