signet-core 1.0.0

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.
Files changed (70) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -0
  3. package/apis/BlacklistApi.ts +312 -0
  4. package/apis/CommsApi.ts +99 -0
  5. package/apis/DeviceApi.ts +322 -0
  6. package/apis/EnrollmentApi.ts +111 -0
  7. package/apis/GeoApi.ts +263 -0
  8. package/apis/IpApi.ts +322 -0
  9. package/apis/MandateApi.ts +529 -0
  10. package/apis/PartnerApi.ts +442 -0
  11. package/apis/ReportingApi.ts +312 -0
  12. package/apis/index.ts +11 -0
  13. package/index.ts +6 -0
  14. package/models/BlacklistControllerBlacklistClientRequest.ts +83 -0
  15. package/models/BlacklistControllerBlacklistClientRequestReasonsInner.ts +111 -0
  16. package/models/BlacklistControllerRemoveBlacklistClientRequest.ts +66 -0
  17. package/models/CommsControllerCheckClientStatusRequest.ts +75 -0
  18. package/models/DeviceControllerFlagDeviceRequest.ts +92 -0
  19. package/models/DeviceControllerFlagDeviceRequestReasonsInner.ts +111 -0
  20. package/models/DeviceControllerUnflagDeviceRequest.ts +75 -0
  21. package/models/EnrollmentControllerEnrollUser201Response.ts +89 -0
  22. package/models/EnrollmentControllerEnrollUser201ResponseData.ts +113 -0
  23. package/models/EnrollmentControllerEnrollUser201ResponseDataMetadata.ts +81 -0
  24. package/models/EnrollmentControllerEnrollUserRequest.ts +101 -0
  25. package/models/GeoControllerGeoVerifyRequest.ts +93 -0
  26. package/models/IpControllerFlagIpRequest.ts +92 -0
  27. package/models/IpControllerFlagIpRequestReasonsInner.ts +114 -0
  28. package/models/IpControllerUnflagIpRequest.ts +75 -0
  29. package/models/ManagementControllerAllClients200Response.ts +89 -0
  30. package/models/ManagementControllerAllClients200ResponseData.ts +88 -0
  31. package/models/ManagementControllerAllClients200ResponseDataPagination.ts +89 -0
  32. package/models/ManagementControllerAllClients400Response.ts +81 -0
  33. package/models/ManagementControllerAllClients404Response.ts +73 -0
  34. package/models/ManagementControllerAllClients500Response.ts +81 -0
  35. package/models/ManagementControllerGetClient200Response.ts +81 -0
  36. package/models/ManagementControllerGetClient400Response.ts +81 -0
  37. package/models/ManagementControllerGetClient404Response.ts +73 -0
  38. package/models/ManagementControllerGetClient500Response.ts +81 -0
  39. package/models/ManagementControllerRegisterClient201Response.ts +89 -0
  40. package/models/ManagementControllerRegisterClient201ResponseData.ts +105 -0
  41. package/models/ManagementControllerRegisterClient400Response.ts +81 -0
  42. package/models/ManagementControllerRegisterClient409Response.ts +89 -0
  43. package/models/ManagementControllerRegisterClient409ResponseError.ts +73 -0
  44. package/models/ManagementControllerRegisterClient500Response.ts +81 -0
  45. package/models/ManagementControllerRegisterClientRequest.ts +75 -0
  46. package/models/ManagementControllerRemoveClient200Response.ts +89 -0
  47. package/models/ManagementControllerRemoveClient200ResponseData.ts +65 -0
  48. package/models/ManagementControllerRemoveClient400Response.ts +81 -0
  49. package/models/ManagementControllerRemoveClient500Response.ts +81 -0
  50. package/models/ManagementControllerRemoveClientRequest.ts +66 -0
  51. package/models/ManagementControllerUpdateClient200Response.ts +89 -0
  52. package/models/ManagementControllerUpdateClient200ResponseData.ts +89 -0
  53. package/models/ManagementControllerUpdateClient400Response.ts +81 -0
  54. package/models/ManagementControllerUpdateClient500Response.ts +81 -0
  55. package/models/ManagementControllerUpdateClientRequest.ts +103 -0
  56. package/models/MandateControllerCreateCartMandate201Response.ts +89 -0
  57. package/models/MandateControllerCreateCartMandate201ResponseData.ts +137 -0
  58. package/models/MandateControllerCreateCartMandateRequest.ts +171 -0
  59. package/models/MandateControllerCreateCartMandateRequestItemsInner.ts +93 -0
  60. package/models/MandateControllerCreateIntentMandateRequest.ts +144 -0
  61. package/models/MandateControllerCreatePaymentMandateRequest.ts +189 -0
  62. package/models/MandateControllerCreateSignedPaymentMandateRequest.ts +137 -0
  63. package/models/MandateControllerCreateSignedPaymentMandateRequestUserAuthorization.ts +100 -0
  64. package/models/ReportingControllerRemoveReportRequest.ts +66 -0
  65. package/models/ReportingControllerReportClientRequest.ts +83 -0
  66. package/models/ReportingControllerReportClientRequestReasonsInner.ts +110 -0
  67. package/models/index.ts +55 -0
  68. package/package.json +65 -0
  69. package/runtime.ts +432 -0
  70. package/utils/dpop.ts +174 -0
@@ -0,0 +1,322 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Credentials Service API
5
+ * API documentation for the Credentials service - Mandate and Enrollment endpoints API documentation for the Fraud service - Blacklist, Device, Geo, IP, Reporting, and Risk endpoints API documentation for the Partner service - Management endpoints
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ DeviceControllerFlagDeviceRequest,
19
+ DeviceControllerUnflagDeviceRequest,
20
+ } from '../models/index';
21
+ import {
22
+ DeviceControllerFlagDeviceRequestFromJSON,
23
+ DeviceControllerFlagDeviceRequestToJSON,
24
+ DeviceControllerUnflagDeviceRequestFromJSON,
25
+ DeviceControllerUnflagDeviceRequestToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface DeviceControllerDeviceCheckForUserRequest {
29
+ deviceId: string;
30
+ userId: string;
31
+ }
32
+
33
+ export interface DeviceControllerFlagDeviceOperationRequest {
34
+ deviceControllerFlagDeviceRequest: DeviceControllerFlagDeviceRequest;
35
+ }
36
+
37
+ export interface DeviceControllerGetFlaggedDevicesRequest {
38
+ offset?: number;
39
+ limit?: number;
40
+ }
41
+
42
+ export interface DeviceControllerUnflagDeviceOperationRequest {
43
+ deviceControllerUnflagDeviceRequest: DeviceControllerUnflagDeviceRequest;
44
+ }
45
+
46
+ /**
47
+ * DeviceApi - interface
48
+ *
49
+ * @export
50
+ * @interface DeviceApiInterface
51
+ */
52
+ export interface DeviceApiInterface {
53
+ /**
54
+ * Checks if a device has been flagged for a specific user.
55
+ * @summary Check if device is flagged for user
56
+ * @param {string} deviceId
57
+ * @param {string} userId
58
+ * @param {*} [options] Override http request option.
59
+ * @throws {RequiredError}
60
+ * @memberof DeviceApiInterface
61
+ */
62
+ deviceControllerDeviceCheckForUserRaw(requestParameters: DeviceControllerDeviceCheckForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
63
+
64
+ /**
65
+ * Checks if a device has been flagged for a specific user.
66
+ * Check if device is flagged for user
67
+ */
68
+ deviceControllerDeviceCheckForUser(requestParameters: DeviceControllerDeviceCheckForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
+
70
+ /**
71
+ * Flags a device for suspicious activity with specified reasons.
72
+ * @summary Flag device
73
+ * @param {DeviceControllerFlagDeviceRequest} deviceControllerFlagDeviceRequest Device flag request with structured risk reasons
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ * @memberof DeviceApiInterface
77
+ */
78
+ deviceControllerFlagDeviceRaw(requestParameters: DeviceControllerFlagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
79
+
80
+ /**
81
+ * Flags a device for suspicious activity with specified reasons.
82
+ * Flag device
83
+ */
84
+ deviceControllerFlagDevice(requestParameters: DeviceControllerFlagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
85
+
86
+ /**
87
+ * Retrieves a paginated list of all flagged devices for the partner organization.
88
+ * @summary Get all flagged devices
89
+ * @param {number} [offset] Number of results to skip (default: 0)
90
+ * @param {number} [limit] Maximum number of results (1-100, default: 20)
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ * @memberof DeviceApiInterface
94
+ */
95
+ deviceControllerGetFlaggedDevicesRaw(requestParameters: DeviceControllerGetFlaggedDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
96
+
97
+ /**
98
+ * Retrieves a paginated list of all flagged devices for the partner organization.
99
+ * Get all flagged devices
100
+ */
101
+ deviceControllerGetFlaggedDevices(requestParameters: DeviceControllerGetFlaggedDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
102
+
103
+ /**
104
+ * Removes a flag from a device, clearing it from the flagged devices list.
105
+ * @summary Remove device flag
106
+ * @param {DeviceControllerUnflagDeviceRequest} deviceControllerUnflagDeviceRequest Device unflag request
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ * @memberof DeviceApiInterface
110
+ */
111
+ deviceControllerUnflagDeviceRaw(requestParameters: DeviceControllerUnflagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
112
+
113
+ /**
114
+ * Removes a flag from a device, clearing it from the flagged devices list.
115
+ * Remove device flag
116
+ */
117
+ deviceControllerUnflagDevice(requestParameters: DeviceControllerUnflagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
118
+
119
+ }
120
+
121
+ /**
122
+ *
123
+ */
124
+ export class DeviceApi extends runtime.BaseAPI implements DeviceApiInterface {
125
+
126
+ /**
127
+ * Checks if a device has been flagged for a specific user.
128
+ * Check if device is flagged for user
129
+ */
130
+ async deviceControllerDeviceCheckForUserRaw(requestParameters: DeviceControllerDeviceCheckForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
131
+ if (requestParameters['deviceId'] == null) {
132
+ throw new runtime.RequiredError(
133
+ 'deviceId',
134
+ 'Required parameter "deviceId" was null or undefined when calling deviceControllerDeviceCheckForUser().'
135
+ );
136
+ }
137
+
138
+ if (requestParameters['userId'] == null) {
139
+ throw new runtime.RequiredError(
140
+ 'userId',
141
+ 'Required parameter "userId" was null or undefined when calling deviceControllerDeviceCheckForUser().'
142
+ );
143
+ }
144
+
145
+ const queryParameters: any = {};
146
+
147
+ const headerParameters: runtime.HTTPHeaders = {};
148
+
149
+ if (this.configuration && this.configuration.accessToken) {
150
+ const token = this.configuration.accessToken;
151
+ const tokenString = await token("DPoP", []);
152
+
153
+ if (tokenString) {
154
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
155
+ }
156
+ }
157
+
158
+ let urlPath = `/fraud/v1/device/{deviceId}/{userId}`;
159
+ urlPath = urlPath.replace(`{${"deviceId"}}`, encodeURIComponent(String(requestParameters['deviceId'])));
160
+ urlPath = urlPath.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId'])));
161
+
162
+ const response = await this.request({
163
+ path: urlPath,
164
+ method: 'GET',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ }, initOverrides);
168
+
169
+ return new runtime.VoidApiResponse(response);
170
+ }
171
+
172
+ /**
173
+ * Checks if a device has been flagged for a specific user.
174
+ * Check if device is flagged for user
175
+ */
176
+ async deviceControllerDeviceCheckForUser(requestParameters: DeviceControllerDeviceCheckForUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
177
+ await this.deviceControllerDeviceCheckForUserRaw(requestParameters, initOverrides);
178
+ }
179
+
180
+ /**
181
+ * Flags a device for suspicious activity with specified reasons.
182
+ * Flag device
183
+ */
184
+ async deviceControllerFlagDeviceRaw(requestParameters: DeviceControllerFlagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
185
+ if (requestParameters['deviceControllerFlagDeviceRequest'] == null) {
186
+ throw new runtime.RequiredError(
187
+ 'deviceControllerFlagDeviceRequest',
188
+ 'Required parameter "deviceControllerFlagDeviceRequest" was null or undefined when calling deviceControllerFlagDevice().'
189
+ );
190
+ }
191
+
192
+ const queryParameters: any = {};
193
+
194
+ const headerParameters: runtime.HTTPHeaders = {};
195
+
196
+ headerParameters['Content-Type'] = 'application/json';
197
+
198
+ if (this.configuration && this.configuration.accessToken) {
199
+ const token = this.configuration.accessToken;
200
+ const tokenString = await token("DPoP", []);
201
+
202
+ if (tokenString) {
203
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
204
+ }
205
+ }
206
+
207
+ let urlPath = `/fraud/v1/device`;
208
+
209
+ const response = await this.request({
210
+ path: urlPath,
211
+ method: 'POST',
212
+ headers: headerParameters,
213
+ query: queryParameters,
214
+ body: DeviceControllerFlagDeviceRequestToJSON(requestParameters['deviceControllerFlagDeviceRequest']),
215
+ }, initOverrides);
216
+
217
+ return new runtime.VoidApiResponse(response);
218
+ }
219
+
220
+ /**
221
+ * Flags a device for suspicious activity with specified reasons.
222
+ * Flag device
223
+ */
224
+ async deviceControllerFlagDevice(requestParameters: DeviceControllerFlagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
225
+ await this.deviceControllerFlagDeviceRaw(requestParameters, initOverrides);
226
+ }
227
+
228
+ /**
229
+ * Retrieves a paginated list of all flagged devices for the partner organization.
230
+ * Get all flagged devices
231
+ */
232
+ async deviceControllerGetFlaggedDevicesRaw(requestParameters: DeviceControllerGetFlaggedDevicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
233
+ const queryParameters: any = {};
234
+
235
+ if (requestParameters['offset'] != null) {
236
+ queryParameters['offset'] = requestParameters['offset'];
237
+ }
238
+
239
+ if (requestParameters['limit'] != null) {
240
+ queryParameters['limit'] = requestParameters['limit'];
241
+ }
242
+
243
+ const headerParameters: runtime.HTTPHeaders = {};
244
+
245
+ if (this.configuration && this.configuration.accessToken) {
246
+ const token = this.configuration.accessToken;
247
+ const tokenString = await token("DPoP", []);
248
+
249
+ if (tokenString) {
250
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
251
+ }
252
+ }
253
+
254
+ let urlPath = `/fraud/v1/device/all`;
255
+
256
+ const response = await this.request({
257
+ path: urlPath,
258
+ method: 'GET',
259
+ headers: headerParameters,
260
+ query: queryParameters,
261
+ }, initOverrides);
262
+
263
+ return new runtime.VoidApiResponse(response);
264
+ }
265
+
266
+ /**
267
+ * Retrieves a paginated list of all flagged devices for the partner organization.
268
+ * Get all flagged devices
269
+ */
270
+ async deviceControllerGetFlaggedDevices(requestParameters: DeviceControllerGetFlaggedDevicesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
271
+ await this.deviceControllerGetFlaggedDevicesRaw(requestParameters, initOverrides);
272
+ }
273
+
274
+ /**
275
+ * Removes a flag from a device, clearing it from the flagged devices list.
276
+ * Remove device flag
277
+ */
278
+ async deviceControllerUnflagDeviceRaw(requestParameters: DeviceControllerUnflagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
279
+ if (requestParameters['deviceControllerUnflagDeviceRequest'] == null) {
280
+ throw new runtime.RequiredError(
281
+ 'deviceControllerUnflagDeviceRequest',
282
+ 'Required parameter "deviceControllerUnflagDeviceRequest" was null or undefined when calling deviceControllerUnflagDevice().'
283
+ );
284
+ }
285
+
286
+ const queryParameters: any = {};
287
+
288
+ const headerParameters: runtime.HTTPHeaders = {};
289
+
290
+ headerParameters['Content-Type'] = 'application/json';
291
+
292
+ if (this.configuration && this.configuration.accessToken) {
293
+ const token = this.configuration.accessToken;
294
+ const tokenString = await token("DPoP", []);
295
+
296
+ if (tokenString) {
297
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
298
+ }
299
+ }
300
+
301
+ let urlPath = `/fraud/v1/device`;
302
+
303
+ const response = await this.request({
304
+ path: urlPath,
305
+ method: 'DELETE',
306
+ headers: headerParameters,
307
+ query: queryParameters,
308
+ body: DeviceControllerUnflagDeviceRequestToJSON(requestParameters['deviceControllerUnflagDeviceRequest']),
309
+ }, initOverrides);
310
+
311
+ return new runtime.VoidApiResponse(response);
312
+ }
313
+
314
+ /**
315
+ * Removes a flag from a device, clearing it from the flagged devices list.
316
+ * Remove device flag
317
+ */
318
+ async deviceControllerUnflagDevice(requestParameters: DeviceControllerUnflagDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
319
+ await this.deviceControllerUnflagDeviceRaw(requestParameters, initOverrides);
320
+ }
321
+
322
+ }
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Credentials Service API
5
+ * API documentation for the Credentials service - Mandate and Enrollment endpoints API documentation for the Fraud service - Blacklist, Device, Geo, IP, Reporting, and Risk endpoints API documentation for the Partner service - Management endpoints
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ EnrollmentControllerEnrollUser201Response,
19
+ EnrollmentControllerEnrollUserRequest,
20
+ } from '../models/index';
21
+ import {
22
+ EnrollmentControllerEnrollUser201ResponseFromJSON,
23
+ EnrollmentControllerEnrollUser201ResponseToJSON,
24
+ EnrollmentControllerEnrollUserRequestFromJSON,
25
+ EnrollmentControllerEnrollUserRequestToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface EnrollmentControllerEnrollUserOperationRequest {
29
+ enrollmentControllerEnrollUserRequest: EnrollmentControllerEnrollUserRequest;
30
+ }
31
+
32
+ /**
33
+ * EnrollmentApi - interface
34
+ *
35
+ * @export
36
+ * @interface EnrollmentApiInterface
37
+ */
38
+ export interface EnrollmentApiInterface {
39
+ /**
40
+ * Enrolls a user into the Credentials system by generating a DID and keypair. The user\'s private key is generated but NOT returned in the response for security reasons.
41
+ * @summary Enroll a user
42
+ * @param {EnrollmentControllerEnrollUserRequest} enrollmentControllerEnrollUserRequest User enrollment request
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ * @memberof EnrollmentApiInterface
46
+ */
47
+ enrollmentControllerEnrollUserRaw(requestParameters: EnrollmentControllerEnrollUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnrollmentControllerEnrollUser201Response>>;
48
+
49
+ /**
50
+ * Enrolls a user into the Credentials system by generating a DID and keypair. The user\'s private key is generated but NOT returned in the response for security reasons.
51
+ * Enroll a user
52
+ */
53
+ enrollmentControllerEnrollUser(requestParameters: EnrollmentControllerEnrollUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnrollmentControllerEnrollUser201Response>;
54
+
55
+ }
56
+
57
+ /**
58
+ *
59
+ */
60
+ export class EnrollmentApi extends runtime.BaseAPI implements EnrollmentApiInterface {
61
+
62
+ /**
63
+ * Enrolls a user into the Credentials system by generating a DID and keypair. The user\'s private key is generated but NOT returned in the response for security reasons.
64
+ * Enroll a user
65
+ */
66
+ async enrollmentControllerEnrollUserRaw(requestParameters: EnrollmentControllerEnrollUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnrollmentControllerEnrollUser201Response>> {
67
+ if (requestParameters['enrollmentControllerEnrollUserRequest'] == null) {
68
+ throw new runtime.RequiredError(
69
+ 'enrollmentControllerEnrollUserRequest',
70
+ 'Required parameter "enrollmentControllerEnrollUserRequest" was null or undefined when calling enrollmentControllerEnrollUser().'
71
+ );
72
+ }
73
+
74
+ const queryParameters: any = {};
75
+
76
+ const headerParameters: runtime.HTTPHeaders = {};
77
+
78
+ headerParameters['Content-Type'] = 'application/json';
79
+
80
+ if (this.configuration && this.configuration.accessToken) {
81
+ const token = this.configuration.accessToken;
82
+ const tokenString = await token("DPoP", []);
83
+
84
+ if (tokenString) {
85
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
86
+ }
87
+ }
88
+
89
+ let urlPath = `/credentials/v1/enrollment/user`;
90
+
91
+ const response = await this.request({
92
+ path: urlPath,
93
+ method: 'POST',
94
+ headers: headerParameters,
95
+ query: queryParameters,
96
+ body: EnrollmentControllerEnrollUserRequestToJSON(requestParameters['enrollmentControllerEnrollUserRequest']),
97
+ }, initOverrides);
98
+
99
+ return new runtime.JSONApiResponse(response, (jsonValue) => EnrollmentControllerEnrollUser201ResponseFromJSON(jsonValue));
100
+ }
101
+
102
+ /**
103
+ * Enrolls a user into the Credentials system by generating a DID and keypair. The user\'s private key is generated but NOT returned in the response for security reasons.
104
+ * Enroll a user
105
+ */
106
+ async enrollmentControllerEnrollUser(requestParameters: EnrollmentControllerEnrollUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnrollmentControllerEnrollUser201Response> {
107
+ const response = await this.enrollmentControllerEnrollUserRaw(requestParameters, initOverrides);
108
+ return await response.value();
109
+ }
110
+
111
+ }
package/apis/GeoApi.ts ADDED
@@ -0,0 +1,263 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Credentials Service API
5
+ * API documentation for the Credentials service - Mandate and Enrollment endpoints API documentation for the Fraud service - Blacklist, Device, Geo, IP, Reporting, and Risk endpoints API documentation for the Partner service - Management endpoints
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ GeoControllerGeoVerifyRequest,
19
+ } from '../models/index';
20
+ import {
21
+ GeoControllerGeoVerifyRequestFromJSON,
22
+ GeoControllerGeoVerifyRequestToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface GeoControllerGeoVerifyOperationRequest {
26
+ geoControllerGeoVerifyRequest: GeoControllerGeoVerifyRequest;
27
+ }
28
+
29
+ export interface GeoControllerGetFailedVerificationsRequest {
30
+ clientId: string;
31
+ offset?: number;
32
+ limit?: number;
33
+ }
34
+
35
+ export interface GeoControllerGetSuccessfulVerificationsRequest {
36
+ clientId: string;
37
+ offset?: number;
38
+ limit?: number;
39
+ }
40
+
41
+ /**
42
+ * GeoApi - interface
43
+ *
44
+ * @export
45
+ * @interface GeoApiInterface
46
+ */
47
+ export interface GeoApiInterface {
48
+ /**
49
+ * Verifies if a client\'s IP address matches their expected geographic location (country and city).
50
+ * @summary Verify geographic location
51
+ * @param {GeoControllerGeoVerifyRequest} geoControllerGeoVerifyRequest Geo verification request
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ * @memberof GeoApiInterface
55
+ */
56
+ geoControllerGeoVerifyRaw(requestParameters: GeoControllerGeoVerifyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
57
+
58
+ /**
59
+ * Verifies if a client\'s IP address matches their expected geographic location (country and city).
60
+ * Verify geographic location
61
+ */
62
+ geoControllerGeoVerify(requestParameters: GeoControllerGeoVerifyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
63
+
64
+ /**
65
+ * Retrieves a paginated list of all failed geo verifications for a specific client.
66
+ * @summary Get failed geo verifications
67
+ * @param {string} clientId Client UUID
68
+ * @param {number} [offset] Number of records to skip (default: 0)
69
+ * @param {number} [limit] Maximum number of records (default: 20, max: 100)
70
+ * @param {*} [options] Override http request option.
71
+ * @throws {RequiredError}
72
+ * @memberof GeoApiInterface
73
+ */
74
+ geoControllerGetFailedVerificationsRaw(requestParameters: GeoControllerGetFailedVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
75
+
76
+ /**
77
+ * Retrieves a paginated list of all failed geo verifications for a specific client.
78
+ * Get failed geo verifications
79
+ */
80
+ geoControllerGetFailedVerifications(requestParameters: GeoControllerGetFailedVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
81
+
82
+ /**
83
+ * Retrieves a paginated list of all successful geo verifications for a specific client.
84
+ * @summary Get successful geo verifications
85
+ * @param {string} clientId Client UUID
86
+ * @param {number} [offset] Number of records to skip (default: 0)
87
+ * @param {number} [limit] Maximum number of records (default: 20, max: 100)
88
+ * @param {*} [options] Override http request option.
89
+ * @throws {RequiredError}
90
+ * @memberof GeoApiInterface
91
+ */
92
+ geoControllerGetSuccessfulVerificationsRaw(requestParameters: GeoControllerGetSuccessfulVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
93
+
94
+ /**
95
+ * Retrieves a paginated list of all successful geo verifications for a specific client.
96
+ * Get successful geo verifications
97
+ */
98
+ geoControllerGetSuccessfulVerifications(requestParameters: GeoControllerGetSuccessfulVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
99
+
100
+ }
101
+
102
+ /**
103
+ *
104
+ */
105
+ export class GeoApi extends runtime.BaseAPI implements GeoApiInterface {
106
+
107
+ /**
108
+ * Verifies if a client\'s IP address matches their expected geographic location (country and city).
109
+ * Verify geographic location
110
+ */
111
+ async geoControllerGeoVerifyRaw(requestParameters: GeoControllerGeoVerifyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
112
+ if (requestParameters['geoControllerGeoVerifyRequest'] == null) {
113
+ throw new runtime.RequiredError(
114
+ 'geoControllerGeoVerifyRequest',
115
+ 'Required parameter "geoControllerGeoVerifyRequest" was null or undefined when calling geoControllerGeoVerify().'
116
+ );
117
+ }
118
+
119
+ const queryParameters: any = {};
120
+
121
+ const headerParameters: runtime.HTTPHeaders = {};
122
+
123
+ headerParameters['Content-Type'] = 'application/json';
124
+
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = await token("DPoP", []);
128
+
129
+ if (tokenString) {
130
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
131
+ }
132
+ }
133
+
134
+ let urlPath = `/fraud/v1/geo/verify`;
135
+
136
+ const response = await this.request({
137
+ path: urlPath,
138
+ method: 'POST',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ body: GeoControllerGeoVerifyRequestToJSON(requestParameters['geoControllerGeoVerifyRequest']),
142
+ }, initOverrides);
143
+
144
+ return new runtime.VoidApiResponse(response);
145
+ }
146
+
147
+ /**
148
+ * Verifies if a client\'s IP address matches their expected geographic location (country and city).
149
+ * Verify geographic location
150
+ */
151
+ async geoControllerGeoVerify(requestParameters: GeoControllerGeoVerifyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
152
+ await this.geoControllerGeoVerifyRaw(requestParameters, initOverrides);
153
+ }
154
+
155
+ /**
156
+ * Retrieves a paginated list of all failed geo verifications for a specific client.
157
+ * Get failed geo verifications
158
+ */
159
+ async geoControllerGetFailedVerificationsRaw(requestParameters: GeoControllerGetFailedVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
160
+ if (requestParameters['clientId'] == null) {
161
+ throw new runtime.RequiredError(
162
+ 'clientId',
163
+ 'Required parameter "clientId" was null or undefined when calling geoControllerGetFailedVerifications().'
164
+ );
165
+ }
166
+
167
+ const queryParameters: any = {};
168
+
169
+ if (requestParameters['offset'] != null) {
170
+ queryParameters['offset'] = requestParameters['offset'];
171
+ }
172
+
173
+ if (requestParameters['limit'] != null) {
174
+ queryParameters['limit'] = requestParameters['limit'];
175
+ }
176
+
177
+ const headerParameters: runtime.HTTPHeaders = {};
178
+
179
+ if (this.configuration && this.configuration.accessToken) {
180
+ const token = this.configuration.accessToken;
181
+ const tokenString = await token("DPoP", []);
182
+
183
+ if (tokenString) {
184
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
185
+ }
186
+ }
187
+
188
+ let urlPath = `/fraud/v1/geo/failed/{clientId}`;
189
+ urlPath = urlPath.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId'])));
190
+
191
+ const response = await this.request({
192
+ path: urlPath,
193
+ method: 'GET',
194
+ headers: headerParameters,
195
+ query: queryParameters,
196
+ }, initOverrides);
197
+
198
+ return new runtime.VoidApiResponse(response);
199
+ }
200
+
201
+ /**
202
+ * Retrieves a paginated list of all failed geo verifications for a specific client.
203
+ * Get failed geo verifications
204
+ */
205
+ async geoControllerGetFailedVerifications(requestParameters: GeoControllerGetFailedVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
206
+ await this.geoControllerGetFailedVerificationsRaw(requestParameters, initOverrides);
207
+ }
208
+
209
+ /**
210
+ * Retrieves a paginated list of all successful geo verifications for a specific client.
211
+ * Get successful geo verifications
212
+ */
213
+ async geoControllerGetSuccessfulVerificationsRaw(requestParameters: GeoControllerGetSuccessfulVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
214
+ if (requestParameters['clientId'] == null) {
215
+ throw new runtime.RequiredError(
216
+ 'clientId',
217
+ 'Required parameter "clientId" was null or undefined when calling geoControllerGetSuccessfulVerifications().'
218
+ );
219
+ }
220
+
221
+ const queryParameters: any = {};
222
+
223
+ if (requestParameters['offset'] != null) {
224
+ queryParameters['offset'] = requestParameters['offset'];
225
+ }
226
+
227
+ if (requestParameters['limit'] != null) {
228
+ queryParameters['limit'] = requestParameters['limit'];
229
+ }
230
+
231
+ const headerParameters: runtime.HTTPHeaders = {};
232
+
233
+ if (this.configuration && this.configuration.accessToken) {
234
+ const token = this.configuration.accessToken;
235
+ const tokenString = await token("DPoP", []);
236
+
237
+ if (tokenString) {
238
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
239
+ }
240
+ }
241
+
242
+ let urlPath = `/fraud/v1/geo/successful/{clientId}`;
243
+ urlPath = urlPath.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId'])));
244
+
245
+ const response = await this.request({
246
+ path: urlPath,
247
+ method: 'GET',
248
+ headers: headerParameters,
249
+ query: queryParameters,
250
+ }, initOverrides);
251
+
252
+ return new runtime.VoidApiResponse(response);
253
+ }
254
+
255
+ /**
256
+ * Retrieves a paginated list of all successful geo verifications for a specific client.
257
+ * Get successful geo verifications
258
+ */
259
+ async geoControllerGetSuccessfulVerifications(requestParameters: GeoControllerGetSuccessfulVerificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
260
+ await this.geoControllerGetSuccessfulVerificationsRaw(requestParameters, initOverrides);
261
+ }
262
+
263
+ }