@regulaforensics/facesdk-webclient 4.1.3 → 4.1.4

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.
@@ -36,10 +36,11 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
36
36
  *
37
37
  * @summary Find person by image in groups.
38
38
  * @param {SearchRequest} searchRequest
39
+ * @param {string} [xRequestID]
39
40
  * @param {*} [options] Override http request option.
40
41
  * @throws {RequiredError}
41
42
  */
42
- search: async (searchRequest: SearchRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
+ search: async (searchRequest: SearchRequest, xRequestID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
43
44
  // verify required parameter 'searchRequest' is not null or undefined
44
45
  assertParamExists('search', 'searchRequest', searchRequest)
45
46
  const localVarPath = `/api/search`;
@@ -54,6 +55,10 @@ export const SearchApiAxiosParamCreator = function (configuration?: Configuratio
54
55
  const localVarHeaderParameter = {} as any;
55
56
  const localVarQueryParameter = {} as any;
56
57
 
58
+ if (xRequestID !== undefined && xRequestID !== null) {
59
+ localVarHeaderParameter['X-RequestID'] = String(xRequestID);
60
+ }
61
+
57
62
 
58
63
 
59
64
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -82,11 +87,12 @@ export const SearchApiFp = function(configuration?: Configuration) {
82
87
  *
83
88
  * @summary Find person by image in groups.
84
89
  * @param {SearchRequest} searchRequest
90
+ * @param {string} [xRequestID]
85
91
  * @param {*} [options] Override http request option.
86
92
  * @throws {RequiredError}
87
93
  */
88
- async search(searchRequest: SearchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResult>> {
89
- const localVarAxiosArgs = await localVarAxiosParamCreator.search(searchRequest, options);
94
+ async search(searchRequest: SearchRequest, xRequestID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchResult>> {
95
+ const localVarAxiosArgs = await localVarAxiosParamCreator.search(searchRequest, xRequestID, options);
90
96
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
91
97
  },
92
98
  }
@@ -103,11 +109,12 @@ export const SearchApiFactory = function (configuration?: Configuration, basePat
103
109
  *
104
110
  * @summary Find person by image in groups.
105
111
  * @param {SearchRequest} searchRequest
112
+ * @param {string} [xRequestID]
106
113
  * @param {*} [options] Override http request option.
107
114
  * @throws {RequiredError}
108
115
  */
109
- search(searchRequest: SearchRequest, options?: any): AxiosPromise<SearchResult> {
110
- return localVarFp.search(searchRequest, options).then((request) => request(axios, basePath));
116
+ search(searchRequest: SearchRequest, xRequestID?: string, options?: any): AxiosPromise<SearchResult> {
117
+ return localVarFp.search(searchRequest, xRequestID, options).then((request) => request(axios, basePath));
111
118
  },
112
119
  };
113
120
  };
@@ -123,11 +130,12 @@ export class SearchApi extends BaseAPI {
123
130
  *
124
131
  * @summary Find person by image in groups.
125
132
  * @param {SearchRequest} searchRequest
133
+ * @param {string} [xRequestID]
126
134
  * @param {*} [options] Override http request option.
127
135
  * @throws {RequiredError}
128
136
  * @memberof SearchApi
129
137
  */
130
- public search(searchRequest: SearchRequest, options?: AxiosRequestConfig) {
131
- return SearchApiFp(this.configuration).search(searchRequest, options).then((request) => request(this.axios, this.basePath));
138
+ public search(searchRequest: SearchRequest, xRequestID?: string, options?: AxiosRequestConfig) {
139
+ return SearchApiFp(this.configuration).search(searchRequest, xRequestID, options).then((request) => request(this.axios, this.basePath));
132
140
  }
133
141
  }
@@ -3,32 +3,32 @@ import {GroupToCreate, UpdateGroup} from "../models";
3
3
  import {AxiosRequestConfig} from "axios";
4
4
 
5
5
  export class GroupApi extends GenGroupApi {
6
- createGroup(groupToCreate: GroupToCreate, options?: AxiosRequestConfig): any {
7
- return super.createGroup(groupToCreate, options).then(r => r.data);
6
+ createGroup(groupToCreate: GroupToCreate, xRequestID?: string, options?: AxiosRequestConfig): any {
7
+ return super.createGroup(groupToCreate, xRequestID, options).then(r => r.data);
8
8
  }
9
9
 
10
- deleteGroup(groupId: number, options?: AxiosRequestConfig): any {
11
- return super.deleteGroup(groupId, options).then(r => r.data);
10
+ deleteGroup(groupId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
11
+ return super.deleteGroup(groupId, xRequestID, options).then(r => r.data);
12
12
  }
13
13
 
14
- getAllGroups(page: number, size: number, options?: AxiosRequestConfig): any {
15
- return super.getAllGroups(page, size, options).then(r => r.data);
14
+ getAllGroups(page: number, size: number, xRequestID?: string, options?: AxiosRequestConfig): any {
15
+ return super.getAllGroups(page, size, xRequestID, options).then(r => r.data);
16
16
  }
17
17
 
18
- getAllPersonsByGroupId(page: number, size: number, groupId: number, options?: AxiosRequestConfig): any {
19
- return super.getAllPersonsByGroupId(page, size, groupId, options).then(r => r.data);
18
+ getAllPersonsByGroupId(page: number, size: number, groupId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
19
+ return super.getAllPersonsByGroupId(page, size, groupId, xRequestID, options).then(r => r.data);
20
20
  }
21
21
 
22
- getGroup(groupId: number, options?: AxiosRequestConfig): any {
23
- return super.getGroup(groupId, options).then(r => r.data);
22
+ getGroup(groupId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
23
+ return super.getGroup(groupId, xRequestID, options).then(r => r.data);
24
24
  }
25
25
 
26
- updateGroup(groupId: number, groupToCreate: GroupToCreate, options?: AxiosRequestConfig): any {
27
- return super.updateGroup(groupId, groupToCreate, options).then(r => r.data);
26
+ updateGroup(groupId: number, groupToCreate: GroupToCreate, xRequestID?: string, options?: AxiosRequestConfig): any {
27
+ return super.updateGroup(groupId, groupToCreate, xRequestID, options).then(r => r.data);
28
28
  }
29
29
 
30
- updatePersonsInGroup(groupId: number, updateGroup: UpdateGroup, options?: AxiosRequestConfig): any {
31
- return super.updatePersonsInGroup(groupId, updateGroup, options).then(r => r.data);
30
+ updatePersonsInGroup(groupId: number, updateGroup: UpdateGroup, xRequestID?: string, options?: AxiosRequestConfig): any {
31
+ return super.updatePersonsInGroup(groupId, updateGroup, xRequestID, options).then(r => r.data);
32
32
  }
33
33
 
34
34
  }
@@ -6,7 +6,7 @@ import * as converter from "base64-arraybuffer";
6
6
 
7
7
  export class MatchingApi extends GenMatchingApi {
8
8
 
9
- match(compareRequest: MatchRequest, options?: any): any {
9
+ match(compareRequest: MatchRequest, xRequestID: string, options?: any): any {
10
10
  for (const image of compareRequest.images) {
11
11
  if (!image.type) {
12
12
  image.type = ImageSource.LIVE
@@ -16,13 +16,13 @@ export class MatchingApi extends GenMatchingApi {
16
16
  }
17
17
  }
18
18
 
19
- return super.match(compareRequest, options).then(r => r.data);
19
+ return super.match(compareRequest, xRequestID, options).then(r => r.data);
20
20
  }
21
21
 
22
- detect(detectRequest: DetectRequest, options?: any): any {
22
+ detect(detectRequest: DetectRequest, xRequestID? : string, options?: any): any {
23
23
  if (detectRequest.image && typeof detectRequest.image !== "string") {
24
24
  detectRequest.image = converter.encode(detectRequest.image)
25
25
  }
26
- return super.detect(detectRequest, options).then(r => r.data)
26
+ return super.detect(detectRequest, xRequestID, options).then(r => r.data)
27
27
  }
28
28
  }
@@ -6,46 +6,46 @@ import {ImageFields, PersonFields} from "../models";
6
6
  import {AxiosRequestConfig} from "axios";
7
7
 
8
8
  export class PersonApi extends GenPersonApi {
9
- createPerson(personFields: PersonFields, options?: AxiosRequestConfig): any {
10
- return super.createPerson(personFields, options).then(r => r.data);
9
+ createPerson(personFields: PersonFields, xRequestID?: string, options?: AxiosRequestConfig): any {
10
+ return super.createPerson(personFields, xRequestID, options).then(r => r.data);
11
11
  }
12
12
 
13
- addImageToPerson(personId: number, imageFields: ImageFields, options?: AxiosRequestConfig): any {
13
+ addImageToPerson(personId: number, imageFields: ImageFields, xRequestID?: string, options?: AxiosRequestConfig): any {
14
14
  if (imageFields.image.content && typeof imageFields.image.content !== "string") {
15
15
  imageFields.image.content = converter.encode(imageFields.image.content)
16
16
  }
17
- return super.addImageToPerson(personId, imageFields, options).then(r => r.data);
17
+ return super.addImageToPerson(personId, imageFields, xRequestID, options).then(r => r.data);
18
18
  }
19
19
 
20
- deleteImageOfPerson(imageId: number, personId: number, options?: AxiosRequestConfig): any {
21
- return super.deleteImageOfPerson(imageId, personId, options).then(r => r.data);
20
+ deleteImageOfPerson(imageId: number, personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
21
+ return super.deleteImageOfPerson(imageId, personId, xRequestID, options).then(r => r.data);
22
22
  }
23
23
 
24
- deletePerson(personId: number, options?: AxiosRequestConfig): any {
25
- return super.deletePerson(personId, options).then(r => r.data);
24
+ deletePerson(personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
25
+ return super.deletePerson(personId, xRequestID, options).then(r => r.data);
26
26
  }
27
27
 
28
- getAllGroupsByPersonId(page: number, size: number, personId: number, options?: AxiosRequestConfig): any {
29
- return super.getAllGroupsByPersonId(page, size, personId, options).then(r => r.data);
28
+ getAllGroupsByPersonId(page: number, size: number, personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
29
+ return super.getAllGroupsByPersonId(page, size, personId, xRequestID, options).then(r => r.data);
30
30
  }
31
31
 
32
- getAllImagesByPersonId(page: number, size: number, personId: number, options?: AxiosRequestConfig): any {
33
- return super.getAllImagesByPersonId(page, size, personId, options).then(r => r.data);
32
+ getAllImagesByPersonId(page: number, size: number, personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
33
+ return super.getAllImagesByPersonId(page, size, personId, xRequestID, options).then(r => r.data);
34
34
  }
35
35
 
36
- getAllPersons(page: number, size: number, options?: AxiosRequestConfig): any {
37
- return super.getAllPersons(page, size, options).then(r => r.data);
36
+ getAllPersons(page: number, size: number, xRequestID?: string, options?: AxiosRequestConfig): any {
37
+ return super.getAllPersons(page, size, xRequestID, options).then(r => r.data);
38
38
  }
39
39
 
40
- getImageOfPerson(imageId: number, personId: number, options?: AxiosRequestConfig): any {
41
- return super.getImageOfPerson(imageId, personId, options).then(r => r.data);
40
+ getImageOfPerson(imageId: number, personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
41
+ return super.getImageOfPerson(imageId, personId, xRequestID, options).then(r => r.data);
42
42
  }
43
43
 
44
- getPerson(personId: number, options?: AxiosRequestConfig): any {
45
- return super.getPerson(personId, options).then(r => r.data);
44
+ getPerson(personId: number, xRequestID?: string, options?: AxiosRequestConfig): any {
45
+ return super.getPerson(personId, xRequestID, options).then(r => r.data);
46
46
  }
47
47
 
48
- updatePerson(personId: number, personFields: PersonFields, options?: AxiosRequestConfig): any {
49
- return super.updatePerson(personId, personFields, options).then(r => r.data);
48
+ updatePerson(personId: number, personFields: PersonFields, xRequestID?: string, options?: AxiosRequestConfig): any {
49
+ return super.updatePerson(personId, personFields, xRequestID, options).then(r => r.data);
50
50
  }
51
51
  }
@@ -5,10 +5,10 @@ import {AxiosRequestConfig} from "axios";
5
5
 
6
6
 
7
7
  export class SearchApi extends GenSearchApi {
8
- search(searchRequest: SearchRequest, options?: AxiosRequestConfig): any {
8
+ search(searchRequest: SearchRequest, xRequestID?: string, options?: AxiosRequestConfig): any {
9
9
  if (searchRequest.image.content && typeof searchRequest.image.content !== "string") {
10
10
  searchRequest.image.content = converter.encode(searchRequest.image.content)
11
11
  }
12
- return super.search(searchRequest, options).then(r => r.data);
12
+ return super.search(searchRequest, xRequestID, options).then(r => r.data);
13
13
  }
14
14
  }