@authme/id-recognition 2.2.1 → 2.3.1-rc.3

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/index.cjs CHANGED
@@ -201,9 +201,21 @@ function confirmScan(scanId, details) {
201
201
  body: JSON.stringify(body)
202
202
  });
203
203
  }
204
+ function saveExtraDoc(params) {
205
+ const formData = new FormData();
206
+ formData.append('file', params.file);
207
+ Object.keys(params.info).forEach(key => {
208
+ if (!(params === null || params === void 0 ? void 0 : params.info[key])) return;
209
+ formData.append(`info[${key}]`, params === null || params === void 0 ? void 0 : params.info[key]);
210
+ });
211
+ return core.sendRequest('/api/identity-verification/v1/verification/extra-document/file', 'POST', {
212
+ body: formData,
213
+ contentType: 'multipart/form-data'
214
+ });
215
+ }
204
216
 
205
217
  var name = "@authme/id-recognition";
206
- var version$1 = "2.2.1";
218
+ var version$1 = "2.3.1-rc.3";
207
219
  var peerDependencies = {
208
220
  "core-js": "^3.6.0"
209
221
  };
@@ -258,6 +270,7 @@ exports.getRecognitionColumnOrder = getRecognitionColumnOrder;
258
270
  exports.init = init;
259
271
  exports.initScanDocument = initScanDocument;
260
272
  exports.recognition = recognition;
273
+ exports.saveExtraDoc = saveExtraDoc;
261
274
  exports.saveResourceImage = saveResourceImage;
262
275
  exports.twoWayAuthmeCardClassMap = twoWayAuthmeCardClassMap;
263
276
  exports.version = version;
package/index.js CHANGED
@@ -198,9 +198,21 @@ function confirmScan(scanId, details) {
198
198
  body: JSON.stringify(body)
199
199
  });
200
200
  }
201
+ function saveExtraDoc(params) {
202
+ const formData = new FormData();
203
+ formData.append('file', params.file);
204
+ Object.keys(params.info).forEach(key => {
205
+ if (!(params === null || params === void 0 ? void 0 : params.info[key])) return;
206
+ formData.append(`info[${key}]`, params === null || params === void 0 ? void 0 : params.info[key]);
207
+ });
208
+ return sendRequest('/api/identity-verification/v1/verification/extra-document/file', 'POST', {
209
+ body: formData,
210
+ contentType: 'multipart/form-data'
211
+ });
212
+ }
201
213
 
202
214
  var name = "@authme/id-recognition";
203
- var version$1 = "2.2.1";
215
+ var version$1 = "2.3.1-rc.3";
204
216
  var peerDependencies = {
205
217
  "core-js": "^3.6.0"
206
218
  };
@@ -216,4 +228,4 @@ const version = packageInfo.version;
216
228
  (_a = (_b = window)[_c = Symbol.for('authme-sdk')]) !== null && _a !== void 0 ? _a : _b[_c] = {};
217
229
  window[Symbol.for('authme-sdk')][packageInfo.name] = version;
218
230
 
219
- export { CardOCR, CountryCode, IdCardAntiFraudService, IdRecognitionCardType, IdType, IdTypeConfig, MRZService, ResourceImageType, ServerSideEAuthMeCardClass, confirmScan, finishScanDocument, getCardSubTypes, getRecognitionColumnOrder, init, initScanDocument, recognition, saveResourceImage, twoWayAuthmeCardClassMap, version };
231
+ export { CardOCR, CountryCode, IdCardAntiFraudService, IdRecognitionCardType, IdType, IdTypeConfig, MRZService, ResourceImageType, ServerSideEAuthMeCardClass, confirmScan, finishScanDocument, getCardSubTypes, getRecognitionColumnOrder, init, initScanDocument, recognition, saveExtraDoc, saveResourceImage, twoWayAuthmeCardClassMap, version };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@authme/id-recognition",
3
- "version": "2.2.1",
3
+ "version": "2.3.1-rc.3",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
- "@authme/core": "2.2.1",
7
- "@authme/engine": "2.2.1"
6
+ "@authme/core": "2.3.1-rc.3",
7
+ "@authme/engine": "2.3.1-rc.3"
8
8
  },
9
9
  "module": "./index.js",
10
10
  "main": "./index.cjs",
@@ -17,3 +17,9 @@ export declare function finishScanDocument(documentId: string, details: {
17
17
  export declare function confirmScan(scanId: string, details: {
18
18
  [key: string]: string | null;
19
19
  }): Promise<any>;
20
+ export declare function saveExtraDoc(params: {
21
+ file: Blob;
22
+ info: {
23
+ [key: string]: string | null;
24
+ };
25
+ }): Promise<any>;