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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Signet Tech, inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # Signet API SDK
2
+
3
+ TypeScript/JavaScript SDK for the Signet API with built-in DPoP (Distributed Proof of Possession) authentication support.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @signet/sdk
9
+ # or
10
+ yarn add @signet/sdk
11
+ # or
12
+ pnpm add @signet/sdk
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Basic Example
18
+
19
+ ```typescript
20
+ import { Configuration, PartnerApi } from '@signet/sdk';
21
+ import { generateDPoPKeyPair, createDPoPProof } from '@signet/sdk/utils/dpop';
22
+
23
+ // Initialize SDK
24
+ const config = new Configuration({
25
+ basePath: 'https://api.getsignet.xyz',
26
+ });
27
+
28
+ // Generate DPoP key pair
29
+ const keyPair = await generateDPoPKeyPair();
30
+
31
+ // Create DPoP proof for token request
32
+ const dpopProof = await createDPoPProof(keyPair, {
33
+ method: 'POST',
34
+ url: 'https://api.getsignet.xyz/oauth/token',
35
+ });
36
+
37
+ // Use SDK with DPoP
38
+ const api = new PartnerApi(config);
39
+ // DPoP will be automatically included in requests
40
+ ```
41
+
42
+ ### JavaScript Example
43
+
44
+ ```javascript
45
+ const { Configuration, PartnerApi } = require('@signet/sdk');
46
+ const { generateDPoPKeyPair, createDPoPProof } = require('@signet/sdk/utils/dpop');
47
+
48
+ // Initialize SDK
49
+ const config = new Configuration({
50
+ basePath: 'https://api.getsignet.xyz',
51
+ });
52
+
53
+ // Generate DPoP key pair
54
+ const keyPair = await generateDPoPKeyPair();
55
+
56
+ // Create DPoP proof for token request
57
+ const dpopProof = await createDPoPProof(keyPair, {
58
+ method: 'POST',
59
+ url: 'https://api.getsignet.xyz/oauth/token',
60
+ });
61
+
62
+ // Use SDK with DPoP
63
+ const api = new PartnerApi(config);
64
+ ```
65
+
66
+ ### DPoP Authentication
67
+
68
+ The SDK includes DPoP utilities for secure token binding. See the [DPoP documentation](https://github.com/signet/sdks/blob/main/docs/DPOP.md) for detailed usage.
69
+
70
+ ## API Reference
71
+
72
+ This SDK provides access to the following API services:
73
+
74
+ - **Credentials API**: User enrollment and credential management
75
+ - **Fraud API**: Fraud detection and reporting
76
+ - **Partner API**: Partner and client management
77
+
78
+ ## License
79
+
80
+ MIT
81
+
82
+ ## Author
83
+
84
+ Rafal Zacher (CTO @ Signet Tech, inc.)
@@ -0,0 +1,312 @@
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
+ BlacklistControllerBlacklistClientRequest,
19
+ BlacklistControllerRemoveBlacklistClientRequest,
20
+ } from '../models/index';
21
+ import {
22
+ BlacklistControllerBlacklistClientRequestFromJSON,
23
+ BlacklistControllerBlacklistClientRequestToJSON,
24
+ BlacklistControllerRemoveBlacklistClientRequestFromJSON,
25
+ BlacklistControllerRemoveBlacklistClientRequestToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface BlacklistControllerBlacklistClientOperationRequest {
29
+ blacklistControllerBlacklistClientRequest: BlacklistControllerBlacklistClientRequest;
30
+ }
31
+
32
+ export interface BlacklistControllerCheckBlacklistRequest {
33
+ clientId: string;
34
+ }
35
+
36
+ export interface BlacklistControllerGetBlacklistedClientsRequest {
37
+ offset?: number;
38
+ limit?: number;
39
+ }
40
+
41
+ export interface BlacklistControllerRemoveBlacklistClientOperationRequest {
42
+ blacklistControllerRemoveBlacklistClientRequest: BlacklistControllerRemoveBlacklistClientRequest;
43
+ }
44
+
45
+ /**
46
+ * BlacklistApi - interface
47
+ *
48
+ * @export
49
+ * @interface BlacklistApiInterface
50
+ */
51
+ export interface BlacklistApiInterface {
52
+ /**
53
+ * Adds a client to the blacklist with specified reasons for fraud detection.
54
+ * @summary Add client to blacklist
55
+ * @param {BlacklistControllerBlacklistClientRequest} blacklistControllerBlacklistClientRequest Blacklist request with structured risk reasons
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ * @memberof BlacklistApiInterface
59
+ */
60
+ blacklistControllerBlacklistClientRaw(requestParameters: BlacklistControllerBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
61
+
62
+ /**
63
+ * Adds a client to the blacklist with specified reasons for fraud detection.
64
+ * Add client to blacklist
65
+ */
66
+ blacklistControllerBlacklistClient(requestParameters: BlacklistControllerBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
+
68
+ /**
69
+ * Checks if a specific client is blacklisted by the partner organization.
70
+ * @summary Check if client is blacklisted
71
+ * @param {string} clientId Client UUID to check
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ * @memberof BlacklistApiInterface
75
+ */
76
+ blacklistControllerCheckBlacklistRaw(requestParameters: BlacklistControllerCheckBlacklistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
77
+
78
+ /**
79
+ * Checks if a specific client is blacklisted by the partner organization.
80
+ * Check if client is blacklisted
81
+ */
82
+ blacklistControllerCheckBlacklist(requestParameters: BlacklistControllerCheckBlacklistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
+
84
+ /**
85
+ * Retrieves a paginated list of all blacklisted clients for the partner organization.
86
+ * @summary Get all blacklisted clients
87
+ * @param {number} [offset] Pagination offset (default: 0)
88
+ * @param {number} [limit] Maximum number of results (1-100, default: 20)
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ * @memberof BlacklistApiInterface
92
+ */
93
+ blacklistControllerGetBlacklistedClientsRaw(requestParameters: BlacklistControllerGetBlacklistedClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
94
+
95
+ /**
96
+ * Retrieves a paginated list of all blacklisted clients for the partner organization.
97
+ * Get all blacklisted clients
98
+ */
99
+ blacklistControllerGetBlacklistedClients(requestParameters: BlacklistControllerGetBlacklistedClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
100
+
101
+ /**
102
+ * Removes a client from the blacklist, allowing them to use services again.
103
+ * @summary Remove client from blacklist
104
+ * @param {BlacklistControllerRemoveBlacklistClientRequest} blacklistControllerRemoveBlacklistClientRequest Blacklist removal request
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ * @memberof BlacklistApiInterface
108
+ */
109
+ blacklistControllerRemoveBlacklistClientRaw(requestParameters: BlacklistControllerRemoveBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
110
+
111
+ /**
112
+ * Removes a client from the blacklist, allowing them to use services again.
113
+ * Remove client from blacklist
114
+ */
115
+ blacklistControllerRemoveBlacklistClient(requestParameters: BlacklistControllerRemoveBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
116
+
117
+ }
118
+
119
+ /**
120
+ *
121
+ */
122
+ export class BlacklistApi extends runtime.BaseAPI implements BlacklistApiInterface {
123
+
124
+ /**
125
+ * Adds a client to the blacklist with specified reasons for fraud detection.
126
+ * Add client to blacklist
127
+ */
128
+ async blacklistControllerBlacklistClientRaw(requestParameters: BlacklistControllerBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
129
+ if (requestParameters['blacklistControllerBlacklistClientRequest'] == null) {
130
+ throw new runtime.RequiredError(
131
+ 'blacklistControllerBlacklistClientRequest',
132
+ 'Required parameter "blacklistControllerBlacklistClientRequest" was null or undefined when calling blacklistControllerBlacklistClient().'
133
+ );
134
+ }
135
+
136
+ const queryParameters: any = {};
137
+
138
+ const headerParameters: runtime.HTTPHeaders = {};
139
+
140
+ headerParameters['Content-Type'] = 'application/json';
141
+
142
+ if (this.configuration && this.configuration.accessToken) {
143
+ const token = this.configuration.accessToken;
144
+ const tokenString = await token("DPoP", []);
145
+
146
+ if (tokenString) {
147
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
148
+ }
149
+ }
150
+
151
+ let urlPath = `/fraud/v1/blacklist`;
152
+
153
+ const response = await this.request({
154
+ path: urlPath,
155
+ method: 'POST',
156
+ headers: headerParameters,
157
+ query: queryParameters,
158
+ body: BlacklistControllerBlacklistClientRequestToJSON(requestParameters['blacklistControllerBlacklistClientRequest']),
159
+ }, initOverrides);
160
+
161
+ return new runtime.VoidApiResponse(response);
162
+ }
163
+
164
+ /**
165
+ * Adds a client to the blacklist with specified reasons for fraud detection.
166
+ * Add client to blacklist
167
+ */
168
+ async blacklistControllerBlacklistClient(requestParameters: BlacklistControllerBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
169
+ await this.blacklistControllerBlacklistClientRaw(requestParameters, initOverrides);
170
+ }
171
+
172
+ /**
173
+ * Checks if a specific client is blacklisted by the partner organization.
174
+ * Check if client is blacklisted
175
+ */
176
+ async blacklistControllerCheckBlacklistRaw(requestParameters: BlacklistControllerCheckBlacklistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
177
+ if (requestParameters['clientId'] == null) {
178
+ throw new runtime.RequiredError(
179
+ 'clientId',
180
+ 'Required parameter "clientId" was null or undefined when calling blacklistControllerCheckBlacklist().'
181
+ );
182
+ }
183
+
184
+ const queryParameters: any = {};
185
+
186
+ const headerParameters: runtime.HTTPHeaders = {};
187
+
188
+ if (this.configuration && this.configuration.accessToken) {
189
+ const token = this.configuration.accessToken;
190
+ const tokenString = await token("DPoP", []);
191
+
192
+ if (tokenString) {
193
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
194
+ }
195
+ }
196
+
197
+ let urlPath = `/fraud/v1/blacklist/client/{clientId}`;
198
+ urlPath = urlPath.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId'])));
199
+
200
+ const response = await this.request({
201
+ path: urlPath,
202
+ method: 'GET',
203
+ headers: headerParameters,
204
+ query: queryParameters,
205
+ }, initOverrides);
206
+
207
+ return new runtime.VoidApiResponse(response);
208
+ }
209
+
210
+ /**
211
+ * Checks if a specific client is blacklisted by the partner organization.
212
+ * Check if client is blacklisted
213
+ */
214
+ async blacklistControllerCheckBlacklist(requestParameters: BlacklistControllerCheckBlacklistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
215
+ await this.blacklistControllerCheckBlacklistRaw(requestParameters, initOverrides);
216
+ }
217
+
218
+ /**
219
+ * Retrieves a paginated list of all blacklisted clients for the partner organization.
220
+ * Get all blacklisted clients
221
+ */
222
+ async blacklistControllerGetBlacklistedClientsRaw(requestParameters: BlacklistControllerGetBlacklistedClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
223
+ const queryParameters: any = {};
224
+
225
+ if (requestParameters['offset'] != null) {
226
+ queryParameters['offset'] = requestParameters['offset'];
227
+ }
228
+
229
+ if (requestParameters['limit'] != null) {
230
+ queryParameters['limit'] = requestParameters['limit'];
231
+ }
232
+
233
+ const headerParameters: runtime.HTTPHeaders = {};
234
+
235
+ if (this.configuration && this.configuration.accessToken) {
236
+ const token = this.configuration.accessToken;
237
+ const tokenString = await token("DPoP", []);
238
+
239
+ if (tokenString) {
240
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
241
+ }
242
+ }
243
+
244
+ let urlPath = `/fraud/v1/blacklist/all`;
245
+
246
+ const response = await this.request({
247
+ path: urlPath,
248
+ method: 'GET',
249
+ headers: headerParameters,
250
+ query: queryParameters,
251
+ }, initOverrides);
252
+
253
+ return new runtime.VoidApiResponse(response);
254
+ }
255
+
256
+ /**
257
+ * Retrieves a paginated list of all blacklisted clients for the partner organization.
258
+ * Get all blacklisted clients
259
+ */
260
+ async blacklistControllerGetBlacklistedClients(requestParameters: BlacklistControllerGetBlacklistedClientsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
261
+ await this.blacklistControllerGetBlacklistedClientsRaw(requestParameters, initOverrides);
262
+ }
263
+
264
+ /**
265
+ * Removes a client from the blacklist, allowing them to use services again.
266
+ * Remove client from blacklist
267
+ */
268
+ async blacklistControllerRemoveBlacklistClientRaw(requestParameters: BlacklistControllerRemoveBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
269
+ if (requestParameters['blacklistControllerRemoveBlacklistClientRequest'] == null) {
270
+ throw new runtime.RequiredError(
271
+ 'blacklistControllerRemoveBlacklistClientRequest',
272
+ 'Required parameter "blacklistControllerRemoveBlacklistClientRequest" was null or undefined when calling blacklistControllerRemoveBlacklistClient().'
273
+ );
274
+ }
275
+
276
+ const queryParameters: any = {};
277
+
278
+ const headerParameters: runtime.HTTPHeaders = {};
279
+
280
+ headerParameters['Content-Type'] = 'application/json';
281
+
282
+ if (this.configuration && this.configuration.accessToken) {
283
+ const token = this.configuration.accessToken;
284
+ const tokenString = await token("DPoP", []);
285
+
286
+ if (tokenString) {
287
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
288
+ }
289
+ }
290
+
291
+ let urlPath = `/fraud/v1/blacklist`;
292
+
293
+ const response = await this.request({
294
+ path: urlPath,
295
+ method: 'DELETE',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ body: BlacklistControllerRemoveBlacklistClientRequestToJSON(requestParameters['blacklistControllerRemoveBlacklistClientRequest']),
299
+ }, initOverrides);
300
+
301
+ return new runtime.VoidApiResponse(response);
302
+ }
303
+
304
+ /**
305
+ * Removes a client from the blacklist, allowing them to use services again.
306
+ * Remove client from blacklist
307
+ */
308
+ async blacklistControllerRemoveBlacklistClient(requestParameters: BlacklistControllerRemoveBlacklistClientOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
309
+ await this.blacklistControllerRemoveBlacklistClientRaw(requestParameters, initOverrides);
310
+ }
311
+
312
+ }
@@ -0,0 +1,99 @@
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
+ CommsControllerCheckClientStatusRequest,
19
+ } from '../models/index';
20
+ import {
21
+ CommsControllerCheckClientStatusRequestFromJSON,
22
+ CommsControllerCheckClientStatusRequestToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface CommsControllerCheckClientStatusOperationRequest {
26
+ commsControllerCheckClientStatusRequest: CommsControllerCheckClientStatusRequest;
27
+ }
28
+
29
+ /**
30
+ * CommsApi - interface
31
+ *
32
+ * @export
33
+ * @interface CommsApiInterface
34
+ */
35
+ export interface CommsApiInterface {
36
+ /**
37
+ * Service-to-service endpoint to check if a client is blacklisted or has high risk score. Protected by service key authentication.
38
+ * @summary Check client blacklist and risk status
39
+ * @param {CommsControllerCheckClientStatusRequest} commsControllerCheckClientStatusRequest Client status check request
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ * @memberof CommsApiInterface
43
+ */
44
+ commsControllerCheckClientStatusRaw(requestParameters: CommsControllerCheckClientStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
45
+
46
+ /**
47
+ * Service-to-service endpoint to check if a client is blacklisted or has high risk score. Protected by service key authentication.
48
+ * Check client blacklist and risk status
49
+ */
50
+ commsControllerCheckClientStatus(requestParameters: CommsControllerCheckClientStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
51
+
52
+ }
53
+
54
+ /**
55
+ *
56
+ */
57
+ export class CommsApi extends runtime.BaseAPI implements CommsApiInterface {
58
+
59
+ /**
60
+ * Service-to-service endpoint to check if a client is blacklisted or has high risk score. Protected by service key authentication.
61
+ * Check client blacklist and risk status
62
+ */
63
+ async commsControllerCheckClientStatusRaw(requestParameters: CommsControllerCheckClientStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
64
+ if (requestParameters['commsControllerCheckClientStatusRequest'] == null) {
65
+ throw new runtime.RequiredError(
66
+ 'commsControllerCheckClientStatusRequest',
67
+ 'Required parameter "commsControllerCheckClientStatusRequest" was null or undefined when calling commsControllerCheckClientStatus().'
68
+ );
69
+ }
70
+
71
+ const queryParameters: any = {};
72
+
73
+ const headerParameters: runtime.HTTPHeaders = {};
74
+
75
+ headerParameters['Content-Type'] = 'application/json';
76
+
77
+
78
+ let urlPath = `/fraud/v1/comms/check-client-status`;
79
+
80
+ const response = await this.request({
81
+ path: urlPath,
82
+ method: 'POST',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ body: CommsControllerCheckClientStatusRequestToJSON(requestParameters['commsControllerCheckClientStatusRequest']),
86
+ }, initOverrides);
87
+
88
+ return new runtime.VoidApiResponse(response);
89
+ }
90
+
91
+ /**
92
+ * Service-to-service endpoint to check if a client is blacklisted or has high risk score. Protected by service key authentication.
93
+ * Check client blacklist and risk status
94
+ */
95
+ async commsControllerCheckClientStatus(requestParameters: CommsControllerCheckClientStatusOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
96
+ await this.commsControllerCheckClientStatusRaw(requestParameters, initOverrides);
97
+ }
98
+
99
+ }