@mediaviz/sdk 1.5.0-dev.84 → 1.5.0-rc.1

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 getProjectProcessStatus(projectTableName, modelName) {
1334
+ async getProjectDataExportUploadStatus(projectTableName, modelName) {
1335
1335
  this._ctx.requireTokens();
1336
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1336
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_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
  }
@@ -1365,7 +1365,7 @@ class Photoupload {
1365
1365
  const baseUrl = this._ctx.requireHost('photoUpload');
1366
1366
  const headers = {
1367
1367
  'Content-Type': 'application/json',
1368
- 'Authorization': `Bearer ${this._ctx.accessToken}`,
1368
+ 'Authorization': this._ctx.accessToken,
1369
1369
  'x-company-id': companyId,
1370
1370
  'x-user-id': userId,
1371
1371
  'x-project-table-name': projectTableName,
@@ -1393,7 +1393,7 @@ class Photoupload {
1393
1393
  return handleResponse(resp);
1394
1394
  }
1395
1395
 
1396
- async uploadPhoto(companyId, userId, projectTableName, photo) {
1396
+ async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1397
1397
  this._ctx.requireTokens();
1398
1398
 
1399
1399
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1404,7 +1404,7 @@ class Photoupload {
1404
1404
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1405
1405
  }
1406
1406
 
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?.headers?.['x-blur'] === true || template?.headers?.['x-blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['x-colors'] === true || template?.headers?.['x-colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['x-face-recognition'] === true || template?.headers?.['x-face-recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['x-image-describe'] === true || template?.headers?.['x-image-describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['x-image-classification'] === true || template?.headers?.['x-image-classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['x-image-comparison'] === true || template?.headers?.['x-image-comparison'] === 'true') ? 'true' : undefined), size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: ((template?.headers?.['x-ocr'] === true || template?.headers?.['x-ocr'] === 'true') ? 'true' : undefined) });
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 });
1408
1408
 
1409
1409
  return upload_result;
1410
1410
  }
package/dist/sdk.d.cts CHANGED
@@ -417,7 +417,7 @@ export class Person {
417
417
 
418
418
  export class Photoupload {
419
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(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
420
+ uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, 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
- getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectDataExportUploadStatus(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
@@ -417,7 +417,7 @@ export class Person {
417
417
 
418
418
  export class Photoupload {
419
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(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
420
+ uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, 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
- getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectDataExportUploadStatus(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
@@ -417,7 +417,7 @@ export class Person {
417
417
 
418
418
  export class Photoupload {
419
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(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
420
+ uploadPhoto(projectTableName: string, companyId: string, userId: string, photoIndex: number, 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
- getProjectProcessStatus(projectTableName: string, modelName: string): Promise<AnalysisStatusResponse>;
451
+ getProjectDataExportUploadStatus(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 getProjectProcessStatus(projectTableName, modelName) {
1332
+ async getProjectDataExportUploadStatus(projectTableName, modelName) {
1333
1333
  this._ctx.requireTokens();
1334
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1334
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_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
  }
@@ -1363,7 +1363,7 @@ class Photoupload {
1363
1363
  const baseUrl = this._ctx.requireHost('photoUpload');
1364
1364
  const headers = {
1365
1365
  'Content-Type': 'application/json',
1366
- 'Authorization': `Bearer ${this._ctx.accessToken}`,
1366
+ 'Authorization': this._ctx.accessToken,
1367
1367
  'x-company-id': companyId,
1368
1368
  'x-user-id': userId,
1369
1369
  'x-project-table-name': projectTableName,
@@ -1391,7 +1391,7 @@ class Photoupload {
1391
1391
  return handleResponse(resp);
1392
1392
  }
1393
1393
 
1394
- async uploadPhoto(companyId, userId, projectTableName, photo) {
1394
+ async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1395
1395
  this._ctx.requireTokens();
1396
1396
 
1397
1397
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1402,7 +1402,7 @@ class Photoupload {
1402
1402
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1403
1403
  }
1404
1404
 
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?.headers?.['x-blur'] === true || template?.headers?.['x-blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['x-colors'] === true || template?.headers?.['x-colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['x-face-recognition'] === true || template?.headers?.['x-face-recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['x-image-describe'] === true || template?.headers?.['x-image-describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['x-image-classification'] === true || template?.headers?.['x-image-classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['x-image-comparison'] === true || template?.headers?.['x-image-comparison'] === 'true') ? 'true' : undefined), size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: ((template?.headers?.['x-ocr'] === true || template?.headers?.['x-ocr'] === 'true') ? 'true' : undefined) });
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 });
1406
1406
 
1407
1407
  return upload_result;
1408
1408
  }
package/dist/sdk.umd.js CHANGED
@@ -1335,9 +1335,9 @@
1335
1335
  return data;
1336
1336
  }
1337
1337
 
1338
- async getProjectProcessStatus(projectTableName, modelName) {
1338
+ async getProjectDataExportUploadStatus(projectTableName, modelName) {
1339
1339
  this._ctx.requireTokens();
1340
- const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/process_status/${encodeURIComponent(modelName)}`;
1340
+ const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/upload_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
  }
@@ -1369,7 +1369,7 @@
1369
1369
  const baseUrl = this._ctx.requireHost('photoUpload');
1370
1370
  const headers = {
1371
1371
  'Content-Type': 'application/json',
1372
- 'Authorization': `Bearer ${this._ctx.accessToken}`,
1372
+ 'Authorization': this._ctx.accessToken,
1373
1373
  'x-company-id': companyId,
1374
1374
  'x-user-id': userId,
1375
1375
  'x-project-table-name': projectTableName,
@@ -1397,7 +1397,7 @@
1397
1397
  return handleResponse(resp);
1398
1398
  }
1399
1399
 
1400
- async uploadPhoto(companyId, userId, projectTableName, photo) {
1400
+ async uploadPhoto(projectTableName, companyId, userId, photoIndex, photo) {
1401
1401
  this._ctx.requireTokens();
1402
1402
 
1403
1403
  if (!this._caches['_get_template']) this._caches['_get_template'] = new Map();
@@ -1408,7 +1408,7 @@
1408
1408
  this._caches['_get_template'].set(_cacheKey_get_template, template);
1409
1409
  }
1410
1410
 
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?.headers?.['x-blur'] === true || template?.headers?.['x-blur'] === 'true') ? 'true' : undefined), colors: ((template?.headers?.['x-colors'] === true || template?.headers?.['x-colors'] === 'true') ? 'true' : undefined), faceRecognition: ((template?.headers?.['x-face-recognition'] === true || template?.headers?.['x-face-recognition'] === 'true') ? 'true' : undefined), imageDescribe: ((template?.headers?.['x-image-describe'] === true || template?.headers?.['x-image-describe'] === 'true') ? 'true' : undefined), imageClassification: ((template?.headers?.['x-image-classification'] === true || template?.headers?.['x-image-classification'] === 'true') ? 'true' : undefined), imageComparison: ((template?.headers?.['x-image-comparison'] === true || template?.headers?.['x-image-comparison'] === 'true') ? 'true' : undefined), size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude, ocr: ((template?.headers?.['x-ocr'] === true || template?.headers?.['x-ocr'] === 'true') ? 'true' : undefined) });
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 });
1412
1412
 
1413
1413
  return upload_result;
1414
1414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaviz/sdk",
3
- "version": "1.5.0-dev.84",
3
+ "version": "1.5.0-rc.1",
4
4
  "description": "MediaViz JavaScript SDK \u2014 auto-generated public endpoint client.",
5
5
  "license": "MIT",
6
6
  "repository": {