@mediaviz/sdk 1.5.0 → 1.6.0-dev.86

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 CHANGED
@@ -1331,9 +1331,9 @@ class Projects {
1331
1331
  return data;
1332
1332
  }
1333
1333
 
1334
- async getProjectDataExportUploadStatus(projectTableName, modelName) {
1334
+ async getProjectProcessStatus(projectTableName, modelName) {
1335
1335
  this._ctx.requireTokens();
1336
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_status/${encodeURIComponent(modelName)}`;
1336
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1337
1337
  const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1338
1338
  return data;
1339
1339
  }
@@ -1360,40 +1360,22 @@ class Projects {
1360
1360
  class Photoupload {
1361
1361
  constructor(ctx) { this._ctx = ctx; this._caches = {}; }
1362
1362
 
1363
- async uploadPhotoToMediaviz(companyId, userId, projectTableName, title, { fileContent, mimetype, filePath }, { clientSideId, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, ocr } = {}) {
1363
+ async uploadPhotoToMediaviz({ fileContent, mimetype, filePath, companyId, userId, projectTableName, clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, ocr }) {
1364
1364
  this._ctx.requireTokens();
1365
1365
  const baseUrl = this._ctx.requireHost('photoUpload');
1366
1366
  const headers = {
1367
1367
  'Content-Type': 'application/json',
1368
- 'Authorization': this._ctx.accessToken,
1369
- 'x-company-id': companyId,
1370
- 'x-user-id': userId,
1371
- 'x-project-table-name': projectTableName,
1372
- 'x-title': title,
1368
+ 'Authorization': `Bearer ${this._ctx.accessToken}`,
1373
1369
  };
1374
- if (clientSideId !== undefined) headers['x-client-side-id'] = clientSideId;
1375
- if (blur !== undefined) headers['x-blur'] = blur;
1376
- if (colors !== undefined) headers['x-colors'] = colors;
1377
- if (faceRecognition !== undefined) headers['x-face-recognition'] = faceRecognition;
1378
- if (imageDescribe !== undefined) headers['x-image-describe'] = imageDescribe;
1379
- if (imageClassification !== undefined) headers['x-image-classification'] = imageClassification;
1380
- if (imageComparison !== undefined) headers['x-image-comparison'] = imageComparison;
1381
- if (size !== undefined) headers['x-size'] = size;
1382
- if (sourceResolutionX !== undefined) headers['x-source-resolution-x'] = sourceResolutionX;
1383
- if (sourceResolutionY !== undefined) headers['x-source-resolution-y'] = sourceResolutionY;
1384
- if (dateTaken !== undefined) headers['x-date-taken'] = dateTaken;
1385
- if (latitude !== undefined) headers['x-latitude'] = latitude;
1386
- if (longitude !== undefined) headers['x-longitude'] = longitude;
1387
- if (ocr !== undefined) headers['x-ocr'] = ocr;
1388
1370
  const resp = await fetch(baseUrl + `/photo_upload`, {
1389
1371
  method: 'POST',
1390
1372
  headers,
1391
- body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath }),
1373
+ body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath, company_id: companyId, user_id: userId, project_table_name: projectTableName, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude, blur, colors, face_recognition: faceRecognition, image_describe: imageDescribe, image_classification: imageClassification, image_comparison: imageComparison, ocr }),
1392
1374
  });
1393
1375
  return handleResponse(resp);
1394
1376
  }
1395
1377
 
1396
- async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1378
+ async uploadPhoto(companyId, userId, projectTableName, photo) {
1397
1379
  this._ctx.requireTokens();
1398
1380
 
1399
1381
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1404,7 +1386,7 @@ class Photoupload {
1404
1386
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1405
1387
  }
1406
1388
 
1407
- const upload_result = await this.uploadPhotoToMediaviz(companyId, userId, projectTableName, photo.title, { fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath }, { clientSideId: photo.clientSideId, blur: template?.blur, colors: template?.colors, faceRecognition: template?.face_recognition, imageDescribe: template?.image_describe, imageClassification: template?.image_classification, imageComparison: template?.image_comparison, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: template?.ocr });
1389
+ const upload_result = await this.uploadPhotoToMediaviz({ fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath, companyId: companyId, userId: userId, projectTableName: projectTableName, clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, blur: ((template?.headers?.['blur'] === true || template?.headers?.['blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['colors'] === true || template?.headers?.['colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['face_recognition'] === true || template?.headers?.['face_recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['image_describe'] === true || template?.headers?.['image_describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['image_classification'] === true || template?.headers?.['image_classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['image_comparison'] === true || template?.headers?.['image_comparison'] === 'true') ? 'true' : undefined), ocr: ((template?.headers?.['ocr'] === true || template?.headers?.['ocr'] === 'true') ? 'true' : undefined) });
1408
1390
 
1409
1391
  return upload_result;
1410
1392
  }
package/dist/sdk.d.cts CHANGED
@@ -416,8 +416,8 @@ export class Person {
416
416
  }
417
417
 
418
418
  export class Photoupload {
419
- uploadPhotoToMediaviz(companyId: string, userId: string, projectTableName: string, title: string, body: { fileContent: string, mimetype: string, filePath: string }, headerOptions?: { clientSideId?: string, blur?: string, colors?: string, faceRecognition?: string, imageDescribe?: string, imageClassification?: string, imageComparison?: string, size?: string, sourceResolutionX?: string, sourceResolutionY?: string, dateTaken?: string, latitude?: string, longitude?: string, ocr?: string }): Promise<any>;
420
- uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, photo: Record<string, any>): Promise<any>;
419
+ uploadPhotoToMediaviz(body: { fileContent: string, mimetype: string, filePath: string, companyId: string, userId: string, projectTableName: string, clientSideId?: string, format?: string, size?: string, sourceResolutionX?: any, sourceResolutionY?: any, dateTaken?: string, latitude?: any, longitude?: any, blur: any, colors: any, faceRecognition: any, imageDescribe: any, imageClassification: any, imageComparison: any, ocr: any }): Promise<any>;
420
+ uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
421
421
  }
422
422
 
423
423
  export class Photos {
@@ -448,7 +448,7 @@ export class Projects {
448
448
  requestProjectPersonhoodQueue(projectTableName: string): Promise<Record<string, any>>;
449
449
  requestInsightsQueue(analysisLevel: string, identifier: string): Promise<Record<string, any>>;
450
450
  requestProjectExport(projectTableName: string): Promise<Record<string, any>>;
451
- getProjectDataExportUploadStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
452
452
  addProjectEvent(projectTableName: string, event: string, detail?: string): Promise<Record<string, any>>;
453
453
  deleteProject(projectId: string): Promise<Record<string, any>>;
454
454
  }
package/dist/sdk.d.ts CHANGED
@@ -416,8 +416,8 @@ export class Person {
416
416
  }
417
417
 
418
418
  export class Photoupload {
419
- uploadPhotoToMediaviz(companyId: string, userId: string, projectTableName: string, title: string, body: { fileContent: string, mimetype: string, filePath: string }, headerOptions?: { clientSideId?: string, blur?: string, colors?: string, faceRecognition?: string, imageDescribe?: string, imageClassification?: string, imageComparison?: string, size?: string, sourceResolutionX?: string, sourceResolutionY?: string, dateTaken?: string, latitude?: string, longitude?: string, ocr?: string }): Promise<any>;
420
- uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, photo: Record<string, any>): Promise<any>;
419
+ uploadPhotoToMediaviz(body: { fileContent: string, mimetype: string, filePath: string, companyId: string, userId: string, projectTableName: string, clientSideId?: string, format?: string, size?: string, sourceResolutionX?: any, sourceResolutionY?: any, dateTaken?: string, latitude?: any, longitude?: any, blur: any, colors: any, faceRecognition: any, imageDescribe: any, imageClassification: any, imageComparison: any, ocr: any }): Promise<any>;
420
+ uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
421
421
  }
422
422
 
423
423
  export class Photos {
@@ -448,7 +448,7 @@ export class Projects {
448
448
  requestProjectPersonhoodQueue(projectTableName: string): Promise<Record<string, any>>;
449
449
  requestInsightsQueue(analysisLevel: string, identifier: string): Promise<Record<string, any>>;
450
450
  requestProjectExport(projectTableName: string): Promise<Record<string, any>>;
451
- getProjectDataExportUploadStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
452
452
  addProjectEvent(projectTableName: string, event: string, detail?: string): Promise<Record<string, any>>;
453
453
  deleteProject(projectId: string): Promise<Record<string, any>>;
454
454
  }
package/dist/sdk.esm.d.ts CHANGED
@@ -416,8 +416,8 @@ export class Person {
416
416
  }
417
417
 
418
418
  export class Photoupload {
419
- uploadPhotoToMediaviz(companyId: string, userId: string, projectTableName: string, title: string, body: { fileContent: string, mimetype: string, filePath: string }, headerOptions?: { clientSideId?: string, blur?: string, colors?: string, faceRecognition?: string, imageDescribe?: string, imageClassification?: string, imageComparison?: string, size?: string, sourceResolutionX?: string, sourceResolutionY?: string, dateTaken?: string, latitude?: string, longitude?: string, ocr?: string }): Promise<any>;
420
- uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, photo: Record<string, any>): Promise<any>;
419
+ uploadPhotoToMediaviz(body: { fileContent: string, mimetype: string, filePath: string, companyId: string, userId: string, projectTableName: string, clientSideId?: string, format?: string, size?: string, sourceResolutionX?: any, sourceResolutionY?: any, dateTaken?: string, latitude?: any, longitude?: any, blur: any, colors: any, faceRecognition: any, imageDescribe: any, imageClassification: any, imageComparison: any, ocr: any }): Promise<any>;
420
+ uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
421
421
  }
422
422
 
423
423
  export class Photos {
@@ -448,7 +448,7 @@ export class Projects {
448
448
  requestProjectPersonhoodQueue(projectTableName: string): Promise<Record<string, any>>;
449
449
  requestInsightsQueue(analysisLevel: string, identifier: string): Promise<Record<string, any>>;
450
450
  requestProjectExport(projectTableName: string): Promise<Record<string, any>>;
451
- getProjectDataExportUploadStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
452
452
  addProjectEvent(projectTableName: string, event: string, detail?: string): Promise<Record<string, any>>;
453
453
  deleteProject(projectId: string): Promise<Record<string, any>>;
454
454
  }
package/dist/sdk.esm.js CHANGED
@@ -1329,9 +1329,9 @@ class Projects {
1329
1329
  return data;
1330
1330
  }
1331
1331
 
1332
- async getProjectDataExportUploadStatus(projectTableName, modelName) {
1332
+ async getProjectProcessStatus(projectTableName, modelName) {
1333
1333
  this._ctx.requireTokens();
1334
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_status/${encodeURIComponent(modelName)}`;
1334
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1335
1335
  const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1336
1336
  return data;
1337
1337
  }
@@ -1358,40 +1358,22 @@ class Projects {
1358
1358
  class Photoupload {
1359
1359
  constructor(ctx) { this._ctx = ctx; this._caches = {}; }
1360
1360
 
1361
- async uploadPhotoToMediaviz(companyId, userId, projectTableName, title, { fileContent, mimetype, filePath }, { clientSideId, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, ocr } = {}) {
1361
+ async uploadPhotoToMediaviz({ fileContent, mimetype, filePath, companyId, userId, projectTableName, clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, ocr }) {
1362
1362
  this._ctx.requireTokens();
1363
1363
  const baseUrl = this._ctx.requireHost('photoUpload');
1364
1364
  const headers = {
1365
1365
  'Content-Type': 'application/json',
1366
- 'Authorization': this._ctx.accessToken,
1367
- 'x-company-id': companyId,
1368
- 'x-user-id': userId,
1369
- 'x-project-table-name': projectTableName,
1370
- 'x-title': title,
1366
+ 'Authorization': `Bearer ${this._ctx.accessToken}`,
1371
1367
  };
1372
- if (clientSideId !== undefined) headers['x-client-side-id'] = clientSideId;
1373
- if (blur !== undefined) headers['x-blur'] = blur;
1374
- if (colors !== undefined) headers['x-colors'] = colors;
1375
- if (faceRecognition !== undefined) headers['x-face-recognition'] = faceRecognition;
1376
- if (imageDescribe !== undefined) headers['x-image-describe'] = imageDescribe;
1377
- if (imageClassification !== undefined) headers['x-image-classification'] = imageClassification;
1378
- if (imageComparison !== undefined) headers['x-image-comparison'] = imageComparison;
1379
- if (size !== undefined) headers['x-size'] = size;
1380
- if (sourceResolutionX !== undefined) headers['x-source-resolution-x'] = sourceResolutionX;
1381
- if (sourceResolutionY !== undefined) headers['x-source-resolution-y'] = sourceResolutionY;
1382
- if (dateTaken !== undefined) headers['x-date-taken'] = dateTaken;
1383
- if (latitude !== undefined) headers['x-latitude'] = latitude;
1384
- if (longitude !== undefined) headers['x-longitude'] = longitude;
1385
- if (ocr !== undefined) headers['x-ocr'] = ocr;
1386
1368
  const resp = await fetch(baseUrl + `/photo_upload`, {
1387
1369
  method: 'POST',
1388
1370
  headers,
1389
- body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath }),
1371
+ body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath, company_id: companyId, user_id: userId, project_table_name: projectTableName, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude, blur, colors, face_recognition: faceRecognition, image_describe: imageDescribe, image_classification: imageClassification, image_comparison: imageComparison, ocr }),
1390
1372
  });
1391
1373
  return handleResponse(resp);
1392
1374
  }
1393
1375
 
1394
- async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1376
+ async uploadPhoto(companyId, userId, projectTableName, photo) {
1395
1377
  this._ctx.requireTokens();
1396
1378
 
1397
1379
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1402,7 +1384,7 @@ class Photoupload {
1402
1384
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1403
1385
  }
1404
1386
 
1405
- const upload_result = await this.uploadPhotoToMediaviz(companyId, userId, projectTableName, photo.title, { fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath }, { clientSideId: photo.clientSideId, blur: template?.blur, colors: template?.colors, faceRecognition: template?.face_recognition, imageDescribe: template?.image_describe, imageClassification: template?.image_classification, imageComparison: template?.image_comparison, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: template?.ocr });
1387
+ const upload_result = await this.uploadPhotoToMediaviz({ fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath, companyId: companyId, userId: userId, projectTableName: projectTableName, clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, blur: ((template?.headers?.['blur'] === true || template?.headers?.['blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['colors'] === true || template?.headers?.['colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['face_recognition'] === true || template?.headers?.['face_recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['image_describe'] === true || template?.headers?.['image_describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['image_classification'] === true || template?.headers?.['image_classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['image_comparison'] === true || template?.headers?.['image_comparison'] === 'true') ? 'true' : undefined), ocr: ((template?.headers?.['ocr'] === true || template?.headers?.['ocr'] === 'true') ? 'true' : undefined) });
1406
1388
 
1407
1389
  return upload_result;
1408
1390
  }
package/dist/sdk.umd.js CHANGED
@@ -1335,9 +1335,9 @@
1335
1335
  return data;
1336
1336
  }
1337
1337
 
1338
- async getProjectDataExportUploadStatus(projectTableName, modelName) {
1338
+ async getProjectProcessStatus(projectTableName, modelName) {
1339
1339
  this._ctx.requireTokens();
1340
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_status/${encodeURIComponent(modelName)}`;
1340
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1341
1341
  const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1342
1342
  return data;
1343
1343
  }
@@ -1364,40 +1364,22 @@
1364
1364
  class Photoupload {
1365
1365
  constructor(ctx) { this._ctx = ctx; this._caches = {}; }
1366
1366
 
1367
- async uploadPhotoToMediaviz(companyId, userId, projectTableName, title, { fileContent, mimetype, filePath }, { clientSideId, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, ocr } = {}) {
1367
+ async uploadPhotoToMediaviz({ fileContent, mimetype, filePath, companyId, userId, projectTableName, clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude, blur, colors, faceRecognition, imageDescribe, imageClassification, imageComparison, ocr }) {
1368
1368
  this._ctx.requireTokens();
1369
1369
  const baseUrl = this._ctx.requireHost('photoUpload');
1370
1370
  const headers = {
1371
1371
  'Content-Type': 'application/json',
1372
- 'Authorization': this._ctx.accessToken,
1373
- 'x-company-id': companyId,
1374
- 'x-user-id': userId,
1375
- 'x-project-table-name': projectTableName,
1376
- 'x-title': title,
1372
+ 'Authorization': `Bearer ${this._ctx.accessToken}`,
1377
1373
  };
1378
- if (clientSideId !== undefined) headers['x-client-side-id'] = clientSideId;
1379
- if (blur !== undefined) headers['x-blur'] = blur;
1380
- if (colors !== undefined) headers['x-colors'] = colors;
1381
- if (faceRecognition !== undefined) headers['x-face-recognition'] = faceRecognition;
1382
- if (imageDescribe !== undefined) headers['x-image-describe'] = imageDescribe;
1383
- if (imageClassification !== undefined) headers['x-image-classification'] = imageClassification;
1384
- if (imageComparison !== undefined) headers['x-image-comparison'] = imageComparison;
1385
- if (size !== undefined) headers['x-size'] = size;
1386
- if (sourceResolutionX !== undefined) headers['x-source-resolution-x'] = sourceResolutionX;
1387
- if (sourceResolutionY !== undefined) headers['x-source-resolution-y'] = sourceResolutionY;
1388
- if (dateTaken !== undefined) headers['x-date-taken'] = dateTaken;
1389
- if (latitude !== undefined) headers['x-latitude'] = latitude;
1390
- if (longitude !== undefined) headers['x-longitude'] = longitude;
1391
- if (ocr !== undefined) headers['x-ocr'] = ocr;
1392
1374
  const resp = await fetch(baseUrl + `/photo_upload`, {
1393
1375
  method: 'POST',
1394
1376
  headers,
1395
- body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath }),
1377
+ body: JSON.stringify({ file_content: fileContent, mimetype, file_path: filePath, company_id: companyId, user_id: userId, project_table_name: projectTableName, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude, blur, colors, face_recognition: faceRecognition, image_describe: imageDescribe, image_classification: imageClassification, image_comparison: imageComparison, ocr }),
1396
1378
  });
1397
1379
  return handleResponse(resp);
1398
1380
  }
1399
1381
 
1400
- async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1382
+ async uploadPhoto(companyId, userId, projectTableName, photo) {
1401
1383
  this._ctx.requireTokens();
1402
1384
 
1403
1385
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1408,7 +1390,7 @@
1408
1390
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1409
1391
  }
1410
1392
 
1411
- const upload_result = await this.uploadPhotoToMediaviz(companyId, userId, projectTableName, photo.title, { fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath }, { clientSideId: photo.clientSideId, blur: template?.blur, colors: template?.colors, faceRecognition: template?.face_recognition, imageDescribe: template?.image_describe, imageClassification: template?.image_classification, imageComparison: template?.image_comparison, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: template?.ocr });
1393
+ const upload_result = await this.uploadPhotoToMediaviz({ fileContent: photo.fileContent, mimetype: photo.mimetype, filePath: photo.filePath, companyId: companyId, userId: userId, projectTableName: projectTableName, clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, blur: ((template?.headers?.['blur'] === true || template?.headers?.['blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['colors'] === true || template?.headers?.['colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['face_recognition'] === true || template?.headers?.['face_recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['image_describe'] === true || template?.headers?.['image_describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['image_classification'] === true || template?.headers?.['image_classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['image_comparison'] === true || template?.headers?.['image_comparison'] === 'true') ? 'true' : undefined), ocr: ((template?.headers?.['ocr'] === true || template?.headers?.['ocr'] === 'true') ? 'true' : undefined) });
1412
1394
 
1413
1395
  return upload_result;
1414
1396
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaviz/sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.0-dev.86",
4
4
  "description": "MediaViz JavaScript SDK \u2014 auto-generated public endpoint client.",
5
5
  "license": "MIT",
6
6
  "repository": {