@mediaviz/sdk 1.10.0-dev.122 → 1.10.0-rc.6
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 +1 -30
- package/dist/sdk.d.cts +5 -10
- package/dist/sdk.d.ts +5 -10
- package/dist/sdk.esm.d.ts +5 -10
- package/dist/sdk.esm.js +2 -30
- package/dist/sdk.umd.js +1 -30
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -2022,7 +2022,7 @@ class Photoupload {
|
|
|
2022
2022
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined),
|
|
2025
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), undefined, { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2026
2026
|
|
|
2027
2027
|
return upload_result;
|
|
2028
2028
|
}
|
|
@@ -2436,32 +2436,6 @@ class Users {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
2438
2438
|
|
|
2439
|
-
class Webhookreceiver {
|
|
2440
|
-
constructor(ctx) { this._ctx = ctx; }
|
|
2441
|
-
|
|
2442
|
-
async listSubscriptionEvents(subscriptionId, { since, limit, wait, includeHeavy } = {}) {
|
|
2443
|
-
this._ctx.requireTokens();
|
|
2444
|
-
const baseUrl = this._ctx.requireHost('webhookReceiver');
|
|
2445
|
-
const headers = {
|
|
2446
|
-
'Content-Type': 'application/json',
|
|
2447
|
-
'Authorization': `Bearer ${this._ctx.accessToken}`,
|
|
2448
|
-
};
|
|
2449
|
-
let path = `/api/v1/subscriptions/${encodeURIComponent(subscriptionId)}/events`;
|
|
2450
|
-
const query = new URLSearchParams();
|
|
2451
|
-
if (since !== undefined) (Array.isArray(since) ? since : [since]).forEach(v => query.append('since', v));
|
|
2452
|
-
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2453
|
-
if (wait !== undefined) (Array.isArray(wait) ? wait : [wait]).forEach(v => query.append('wait', v));
|
|
2454
|
-
if (includeHeavy !== undefined) (Array.isArray(includeHeavy) ? includeHeavy : [includeHeavy]).forEach(v => query.append('include_heavy', v));
|
|
2455
|
-
const qs = query.toString();
|
|
2456
|
-
if (qs) path += '?' + qs;
|
|
2457
|
-
const resp = await fetch(baseUrl + path, {
|
|
2458
|
-
method: 'GET',
|
|
2459
|
-
headers,
|
|
2460
|
-
});
|
|
2461
|
-
return handleResponse(resp);
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
2439
|
// Auto-generated — do not edit
|
|
2466
2440
|
|
|
2467
2441
|
function _env(key) {
|
|
@@ -2508,7 +2482,6 @@ class MediaViz {
|
|
|
2508
2482
|
};
|
|
2509
2483
|
this._hosts = {
|
|
2510
2484
|
photoUpload: config.hosts?.photoUpload ?? _env('MEDIAVIZ_PHOTO_UPLOAD_URL'),
|
|
2511
|
-
webhookReceiver: config.hosts?.webhookReceiver ?? _env('MEDIAVIZ_WEBHOOK_RECEIVER_URL'),
|
|
2512
2485
|
...(config.hosts || {}),
|
|
2513
2486
|
};
|
|
2514
2487
|
this._accessToken = config.accessToken ?? null;
|
|
@@ -2542,7 +2515,6 @@ class MediaViz {
|
|
|
2542
2515
|
this.search = new Search(_ctx);
|
|
2543
2516
|
this.subscription = new Subscription(_ctx);
|
|
2544
2517
|
this.users = new Users(_ctx);
|
|
2545
|
-
this.webhookReceiver = new Webhookreceiver(_ctx);
|
|
2546
2518
|
this.webhooks = new WebhookConsumer(_ctx, this.subscription);
|
|
2547
2519
|
}
|
|
2548
2520
|
|
|
@@ -2604,7 +2576,6 @@ exports.ValidationError = ValidationError;
|
|
|
2604
2576
|
exports.WEBHOOK_MODEL_COLUMNS = WEBHOOK_MODEL_COLUMNS;
|
|
2605
2577
|
exports.WEBHOOK_OUTCOME_MODELS = WEBHOOK_OUTCOME_MODELS;
|
|
2606
2578
|
exports.WebhookConsumer = WebhookConsumer;
|
|
2607
|
-
exports.Webhookreceiver = Webhookreceiver;
|
|
2608
2579
|
exports.configureCrypto = configureCrypto;
|
|
2609
2580
|
exports.handleResponse = handleResponse;
|
|
2610
2581
|
exports.selectResultColumns = selectResultColumns;
|
package/dist/sdk.d.cts
CHANGED
|
@@ -494,7 +494,7 @@ export class Keywords {
|
|
|
494
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
495
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
496
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
497
|
-
getKeywordsAndIds(): Promise<
|
|
497
|
+
getKeywordsAndIds(): Promise<any>;
|
|
498
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
499
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
500
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -526,13 +526,13 @@ export class Person {
|
|
|
526
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
527
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
528
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
529
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
530
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
531
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
export class Photoupload {
|
|
535
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment:
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
536
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
537
537
|
}
|
|
538
538
|
|
|
@@ -572,9 +572,9 @@ export class Projects {
|
|
|
572
572
|
export class Search {
|
|
573
573
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
574
574
|
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>>;
|
|
575
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
576
576
|
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>>;
|
|
577
|
-
getProjectSavedSearches(projectTableName: string): Promise<
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
578
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
579
579
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
580
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
@@ -601,10 +601,6 @@ export class Users {
|
|
|
601
601
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
export class Webhookreceiver {
|
|
605
|
-
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[], wait?: number | number[], includeHeavy?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
604
|
export class MediaViz {
|
|
609
605
|
constructor(config?: MediaVizConfig);
|
|
610
606
|
authenticate(): Promise<TokenResponse>;
|
|
@@ -631,7 +627,6 @@ export class MediaViz {
|
|
|
631
627
|
readonly search: Search;
|
|
632
628
|
readonly subscription: Subscription;
|
|
633
629
|
readonly users: Users;
|
|
634
|
-
readonly webhookReceiver: Webhookreceiver;
|
|
635
630
|
readonly webhooks: WebhookConsumer;
|
|
636
631
|
}
|
|
637
632
|
|
package/dist/sdk.d.ts
CHANGED
|
@@ -494,7 +494,7 @@ export class Keywords {
|
|
|
494
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
495
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
496
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
497
|
-
getKeywordsAndIds(): Promise<
|
|
497
|
+
getKeywordsAndIds(): Promise<any>;
|
|
498
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
499
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
500
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -526,13 +526,13 @@ export class Person {
|
|
|
526
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
527
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
528
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
529
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
530
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
531
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
export class Photoupload {
|
|
535
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment:
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
536
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
537
537
|
}
|
|
538
538
|
|
|
@@ -572,9 +572,9 @@ export class Projects {
|
|
|
572
572
|
export class Search {
|
|
573
573
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
574
574
|
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>>;
|
|
575
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
576
576
|
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>>;
|
|
577
|
-
getProjectSavedSearches(projectTableName: string): Promise<
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
578
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
579
579
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
580
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
@@ -601,10 +601,6 @@ export class Users {
|
|
|
601
601
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
export class Webhookreceiver {
|
|
605
|
-
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[], wait?: number | number[], includeHeavy?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
604
|
export class MediaViz {
|
|
609
605
|
constructor(config?: MediaVizConfig);
|
|
610
606
|
authenticate(): Promise<TokenResponse>;
|
|
@@ -631,7 +627,6 @@ export class MediaViz {
|
|
|
631
627
|
readonly search: Search;
|
|
632
628
|
readonly subscription: Subscription;
|
|
633
629
|
readonly users: Users;
|
|
634
|
-
readonly webhookReceiver: Webhookreceiver;
|
|
635
630
|
readonly webhooks: WebhookConsumer;
|
|
636
631
|
}
|
|
637
632
|
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -494,7 +494,7 @@ export class Keywords {
|
|
|
494
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
495
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
496
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
497
|
-
getKeywordsAndIds(): Promise<
|
|
497
|
+
getKeywordsAndIds(): Promise<any>;
|
|
498
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
499
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
500
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -526,13 +526,13 @@ export class Person {
|
|
|
526
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
527
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
528
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
529
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
|
|
530
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
531
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
export class Photoupload {
|
|
535
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment:
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
536
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
537
537
|
}
|
|
538
538
|
|
|
@@ -572,9 +572,9 @@ export class Projects {
|
|
|
572
572
|
export class Search {
|
|
573
573
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
574
574
|
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>>;
|
|
575
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
576
576
|
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>>;
|
|
577
|
-
getProjectSavedSearches(projectTableName: string): Promise<
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
578
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
579
579
|
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[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
580
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
|
@@ -601,10 +601,6 @@ export class Users {
|
|
|
601
601
|
deleteUser(userId: number, options?: { newCompanyOwnerId?: number | number[] }): Promise<Record<string, any>>;
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
export class Webhookreceiver {
|
|
605
|
-
listSubscriptionEvents(subscriptionId: string, options?: { since?: string | string[], limit?: number | number[], wait?: number | number[], includeHeavy?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
604
|
export class MediaViz {
|
|
609
605
|
constructor(config?: MediaVizConfig);
|
|
610
606
|
authenticate(): Promise<TokenResponse>;
|
|
@@ -631,7 +627,6 @@ export class MediaViz {
|
|
|
631
627
|
readonly search: Search;
|
|
632
628
|
readonly subscription: Subscription;
|
|
633
629
|
readonly users: Users;
|
|
634
|
-
readonly webhookReceiver: Webhookreceiver;
|
|
635
630
|
readonly webhooks: WebhookConsumer;
|
|
636
631
|
}
|
|
637
632
|
|
package/dist/sdk.esm.js
CHANGED
|
@@ -2020,7 +2020,7 @@ class Photoupload {
|
|
|
2020
2020
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2021
2021
|
}
|
|
2022
2022
|
|
|
2023
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined),
|
|
2023
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), undefined, { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2024
2024
|
|
|
2025
2025
|
return upload_result;
|
|
2026
2026
|
}
|
|
@@ -2434,32 +2434,6 @@ class Users {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
2436
|
|
|
2437
|
-
class Webhookreceiver {
|
|
2438
|
-
constructor(ctx) { this._ctx = ctx; }
|
|
2439
|
-
|
|
2440
|
-
async listSubscriptionEvents(subscriptionId, { since, limit, wait, includeHeavy } = {}) {
|
|
2441
|
-
this._ctx.requireTokens();
|
|
2442
|
-
const baseUrl = this._ctx.requireHost('webhookReceiver');
|
|
2443
|
-
const headers = {
|
|
2444
|
-
'Content-Type': 'application/json',
|
|
2445
|
-
'Authorization': `Bearer ${this._ctx.accessToken}`,
|
|
2446
|
-
};
|
|
2447
|
-
let path = `/api/v1/subscriptions/${encodeURIComponent(subscriptionId)}/events`;
|
|
2448
|
-
const query = new URLSearchParams();
|
|
2449
|
-
if (since !== undefined) (Array.isArray(since) ? since : [since]).forEach(v => query.append('since', v));
|
|
2450
|
-
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2451
|
-
if (wait !== undefined) (Array.isArray(wait) ? wait : [wait]).forEach(v => query.append('wait', v));
|
|
2452
|
-
if (includeHeavy !== undefined) (Array.isArray(includeHeavy) ? includeHeavy : [includeHeavy]).forEach(v => query.append('include_heavy', v));
|
|
2453
|
-
const qs = query.toString();
|
|
2454
|
-
if (qs) path += '?' + qs;
|
|
2455
|
-
const resp = await fetch(baseUrl + path, {
|
|
2456
|
-
method: 'GET',
|
|
2457
|
-
headers,
|
|
2458
|
-
});
|
|
2459
|
-
return handleResponse(resp);
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
2437
|
// Auto-generated — do not edit
|
|
2464
2438
|
|
|
2465
2439
|
function _env(key) {
|
|
@@ -2506,7 +2480,6 @@ class MediaViz {
|
|
|
2506
2480
|
};
|
|
2507
2481
|
this._hosts = {
|
|
2508
2482
|
photoUpload: config.hosts?.photoUpload ?? _env('MEDIAVIZ_PHOTO_UPLOAD_URL'),
|
|
2509
|
-
webhookReceiver: config.hosts?.webhookReceiver ?? _env('MEDIAVIZ_WEBHOOK_RECEIVER_URL'),
|
|
2510
2483
|
...(config.hosts || {}),
|
|
2511
2484
|
};
|
|
2512
2485
|
this._accessToken = config.accessToken ?? null;
|
|
@@ -2540,7 +2513,6 @@ class MediaViz {
|
|
|
2540
2513
|
this.search = new Search(_ctx);
|
|
2541
2514
|
this.subscription = new Subscription(_ctx);
|
|
2542
2515
|
this.users = new Users(_ctx);
|
|
2543
|
-
this.webhookReceiver = new Webhookreceiver(_ctx);
|
|
2544
2516
|
this.webhooks = new WebhookConsumer(_ctx, this.subscription);
|
|
2545
2517
|
}
|
|
2546
2518
|
|
|
@@ -2571,4 +2543,4 @@ class MediaViz {
|
|
|
2571
2543
|
get refreshToken() { return this._refreshToken; }
|
|
2572
2544
|
}
|
|
2573
2545
|
|
|
2574
|
-
export { Admin, AiModelCredits, ApiError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer,
|
|
2546
|
+
export { Admin, AiModelCredits, ApiError, Company, CuratedAlbums, CustomAlbums, EmailTokens, Health, InMemoryWebhookStore, Keywords, MediaViz, NotFoundError, OAuthClient, OAuthError, OAuthErrorCode, OauthAuthorization, OauthLogin, OauthToken, Person, Photos, Photoupload, Projects, RateLimitError, Search, ServerError, Subscription, Users, ValidationError, WEBHOOK_MODEL_COLUMNS, WEBHOOK_OUTCOME_MODELS, WebhookConsumer, configureCrypto, handleResponse, selectResultColumns, signWebhookPayload, verifyWebhookSignature };
|
package/dist/sdk.umd.js
CHANGED
|
@@ -2026,7 +2026,7 @@
|
|
|
2026
2026
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined),
|
|
2029
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), undefined, { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2030
2030
|
|
|
2031
2031
|
return upload_result;
|
|
2032
2032
|
}
|
|
@@ -2440,32 +2440,6 @@
|
|
|
2440
2440
|
}
|
|
2441
2441
|
}
|
|
2442
2442
|
|
|
2443
|
-
class Webhookreceiver {
|
|
2444
|
-
constructor(ctx) { this._ctx = ctx; }
|
|
2445
|
-
|
|
2446
|
-
async listSubscriptionEvents(subscriptionId, { since, limit, wait, includeHeavy } = {}) {
|
|
2447
|
-
this._ctx.requireTokens();
|
|
2448
|
-
const baseUrl = this._ctx.requireHost('webhookReceiver');
|
|
2449
|
-
const headers = {
|
|
2450
|
-
'Content-Type': 'application/json',
|
|
2451
|
-
'Authorization': `Bearer ${this._ctx.accessToken}`,
|
|
2452
|
-
};
|
|
2453
|
-
let path = `/api/v1/subscriptions/${encodeURIComponent(subscriptionId)}/events`;
|
|
2454
|
-
const query = new URLSearchParams();
|
|
2455
|
-
if (since !== undefined) (Array.isArray(since) ? since : [since]).forEach(v => query.append('since', v));
|
|
2456
|
-
if (limit !== undefined) (Array.isArray(limit) ? limit : [limit]).forEach(v => query.append('limit', v));
|
|
2457
|
-
if (wait !== undefined) (Array.isArray(wait) ? wait : [wait]).forEach(v => query.append('wait', v));
|
|
2458
|
-
if (includeHeavy !== undefined) (Array.isArray(includeHeavy) ? includeHeavy : [includeHeavy]).forEach(v => query.append('include_heavy', v));
|
|
2459
|
-
const qs = query.toString();
|
|
2460
|
-
if (qs) path += '?' + qs;
|
|
2461
|
-
const resp = await fetch(baseUrl + path, {
|
|
2462
|
-
method: 'GET',
|
|
2463
|
-
headers,
|
|
2464
|
-
});
|
|
2465
|
-
return handleResponse(resp);
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
2443
|
// Auto-generated — do not edit
|
|
2470
2444
|
|
|
2471
2445
|
function _env(key) {
|
|
@@ -2512,7 +2486,6 @@
|
|
|
2512
2486
|
};
|
|
2513
2487
|
this._hosts = {
|
|
2514
2488
|
photoUpload: config.hosts?.photoUpload ?? _env('MEDIAVIZ_PHOTO_UPLOAD_URL'),
|
|
2515
|
-
webhookReceiver: config.hosts?.webhookReceiver ?? _env('MEDIAVIZ_WEBHOOK_RECEIVER_URL'),
|
|
2516
2489
|
...(config.hosts || {}),
|
|
2517
2490
|
};
|
|
2518
2491
|
this._accessToken = config.accessToken ?? null;
|
|
@@ -2546,7 +2519,6 @@
|
|
|
2546
2519
|
this.search = new Search(_ctx);
|
|
2547
2520
|
this.subscription = new Subscription(_ctx);
|
|
2548
2521
|
this.users = new Users(_ctx);
|
|
2549
|
-
this.webhookReceiver = new Webhookreceiver(_ctx);
|
|
2550
2522
|
this.webhooks = new WebhookConsumer(_ctx, this.subscription);
|
|
2551
2523
|
}
|
|
2552
2524
|
|
|
@@ -2608,7 +2580,6 @@
|
|
|
2608
2580
|
exports.WEBHOOK_MODEL_COLUMNS = WEBHOOK_MODEL_COLUMNS;
|
|
2609
2581
|
exports.WEBHOOK_OUTCOME_MODELS = WEBHOOK_OUTCOME_MODELS;
|
|
2610
2582
|
exports.WebhookConsumer = WebhookConsumer;
|
|
2611
|
-
exports.Webhookreceiver = Webhookreceiver;
|
|
2612
2583
|
exports.configureCrypto = configureCrypto;
|
|
2613
2584
|
exports.handleResponse = handleResponse;
|
|
2614
2585
|
exports.selectResultColumns = selectResultColumns;
|