humanos 1.0.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.
Files changed (89) hide show
  1. package/README.md +246 -0
  2. package/dist/index.d.mts +3898 -0
  3. package/dist/index.d.ts +3898 -0
  4. package/dist/index.js +1526 -0
  5. package/dist/index.mjs +1437 -0
  6. package/generated/.openapi-generator/FILES +82 -0
  7. package/generated/.openapi-generator/VERSION +1 -0
  8. package/generated/.openapi-generator-ignore +23 -0
  9. package/generated/README.md +46 -0
  10. package/generated/api/credentials-api.ts +148 -0
  11. package/generated/api/requests-api.ts +577 -0
  12. package/generated/api/resource-api.ts +318 -0
  13. package/generated/api/user-api.ts +241 -0
  14. package/generated/api/webhooks-api.ts +352 -0
  15. package/generated/api.ts +21 -0
  16. package/generated/base.ts +86 -0
  17. package/generated/common.ts +150 -0
  18. package/generated/configuration.ts +110 -0
  19. package/generated/git_push.sh +57 -0
  20. package/generated/index.ts +18 -0
  21. package/generated/models/action-type.ts +33 -0
  22. package/generated/models/agent-detail-entity.ts +36 -0
  23. package/generated/models/cancel-request404-response.ts +42 -0
  24. package/generated/models/create-subject-dto.ts +45 -0
  25. package/generated/models/create-subject-entity.ts +59 -0
  26. package/generated/models/credential-dto.ts +57 -0
  27. package/generated/models/credential-entity.ts +64 -0
  28. package/generated/models/credential-event-user.ts +42 -0
  29. package/generated/models/credential-event.ts +94 -0
  30. package/generated/models/credential-full-entity.ts +82 -0
  31. package/generated/models/credential-status.ts +33 -0
  32. package/generated/models/credential-subject.ts +39 -0
  33. package/generated/models/delivery-action-type.ts +31 -0
  34. package/generated/models/generate-credential-entity.ts +42 -0
  35. package/generated/models/generate-request-dto.ts +106 -0
  36. package/generated/models/generate-request-entity.ts +48 -0
  37. package/generated/models/generate-subject-entity.ts +48 -0
  38. package/generated/models/generate400-response.ts +42 -0
  39. package/generated/models/get-credential-entity.ts +48 -0
  40. package/generated/models/get-credential404-response.ts +42 -0
  41. package/generated/models/get-request-detail404-response.ts +42 -0
  42. package/generated/models/get-subject400-response.ts +42 -0
  43. package/generated/models/get-subject404-response.ts +42 -0
  44. package/generated/models/group-entity.ts +63 -0
  45. package/generated/models/group-resource-entity.ts +64 -0
  46. package/generated/models/groups-entity.ts +39 -0
  47. package/generated/models/identity-dto.ts +132 -0
  48. package/generated/models/identity-event-decision.ts +48 -0
  49. package/generated/models/identity-event-identity.ts +84 -0
  50. package/generated/models/identity-event.ts +94 -0
  51. package/generated/models/identity-field-placement.ts +73 -0
  52. package/generated/models/identity-field-type.ts +38 -0
  53. package/generated/models/index.ts +64 -0
  54. package/generated/models/issuer-detail-entity.ts +36 -0
  55. package/generated/models/mandate-data-dto-type.ts +73 -0
  56. package/generated/models/mandate-data-dto-value.ts +24 -0
  57. package/generated/models/mandate-data-dto.ts +71 -0
  58. package/generated/models/mandate-data-type.ts +37 -0
  59. package/generated/models/otp-failed-event-otp-error.ts +36 -0
  60. package/generated/models/otp-failed-event-otp.ts +39 -0
  61. package/generated/models/otp-failed-event.ts +85 -0
  62. package/generated/models/request-detail-entity.ts +94 -0
  63. package/generated/models/request-entity.ts +94 -0
  64. package/generated/models/request-query.ts +100 -0
  65. package/generated/models/request-subject-entity.ts +48 -0
  66. package/generated/models/requests-entity.ts +39 -0
  67. package/generated/models/resource-entity.ts +94 -0
  68. package/generated/models/resource-query.ts +70 -0
  69. package/generated/models/resources-entity.ts +39 -0
  70. package/generated/models/signature-placement-item-dto.ts +72 -0
  71. package/generated/models/signature-placement.ts +56 -0
  72. package/generated/models/subject-contact-entity.ts +42 -0
  73. package/generated/models/subject-entity.ts +48 -0
  74. package/generated/models/subject-query.ts +42 -0
  75. package/generated/models/subject.ts +42 -0
  76. package/generated/models/success-entity.ts +30 -0
  77. package/generated/models/test-event.ts +82 -0
  78. package/generated/models/w3-cproof.ts +82 -0
  79. package/generated/models/w3-cverifiable-credential.ts +90 -0
  80. package/generated/models/webhook-call-event.ts +56 -0
  81. package/generated/models/webhook-event-type-credential.ts +30 -0
  82. package/generated/models/webhook-event-type-identity.ts +30 -0
  83. package/generated/models/webhook-event-type-otpfailed.ts +30 -0
  84. package/generated/models/webhook-event-type-test.ts +30 -0
  85. package/generated/models/webhook-event-type.ts +33 -0
  86. package/generated/package.json +33 -0
  87. package/generated/tsconfig.esm.json +7 -0
  88. package/generated/tsconfig.json +18 -0
  89. package/package.json +68 -0
@@ -0,0 +1,577 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Humanos API
5
+ * Humanos API
6
+ *
7
+ * The version of the OpenAPI document: 1.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 type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { CancelRequest404Response } from '../models';
26
+ // @ts-ignore
27
+ import type { Generate400Response } from '../models';
28
+ // @ts-ignore
29
+ import type { GenerateRequestDto } from '../models';
30
+ // @ts-ignore
31
+ import type { GenerateRequestEntity } from '../models';
32
+ // @ts-ignore
33
+ import type { GetRequestDetail404Response } from '../models';
34
+ // @ts-ignore
35
+ import type { RequestDetailEntity } from '../models';
36
+ // @ts-ignore
37
+ import type { RequestsEntity } from '../models';
38
+ // @ts-ignore
39
+ import type { SuccessEntity } from '../models';
40
+ /**
41
+ * RequestsApi - axios parameter creator
42
+ * @export
43
+ */
44
+ export const RequestsApiAxiosParamCreator = function (configuration?: Configuration) {
45
+ return {
46
+ /**
47
+ * This action will cancel a credential request, by setting the canceledAt timestamp on the request. This operation is irreversible, and will prevent the request from being processed further by the subjects
48
+ * @summary Cancel
49
+ * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
50
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\'s date.
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ */
54
+ cancelRequest: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
55
+ // verify required parameter 'requestId' is not null or undefined
56
+ assertParamExists('cancelRequest', 'requestId', requestId)
57
+ const localVarPath = `/request/{requestId}`
58
+ .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
59
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
60
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
61
+ let baseOptions;
62
+ if (configuration) {
63
+ baseOptions = configuration.baseOptions;
64
+ }
65
+
66
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
67
+ const localVarHeaderParameter = {} as any;
68
+ const localVarQueryParameter = {} as any;
69
+
70
+
71
+
72
+ if (aPIVersion != null) {
73
+ localVarHeaderParameter['API-Version'] = String(aPIVersion);
74
+ }
75
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
76
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
77
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ /**
85
+ * Create a new credential request for one or more subjects (users). This endpoint will: - Create credentials from resources or inline JSON data - Associate credentials with subjects - Generate and send OTPs for approval via email or SMS Request details: - Resources can be specified via group IDs, resource IDs, or as inline JSON credentials - Maximum 30 credentials per request - Maximum 20 contacts per request - OTPs are automatically sent to all subjects after creation
86
+ * @summary Create
87
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and resources to create credentials from. Resources can be specified via groupIds, resourcesIds, or inline credentials array.
88
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ generate: async (generateRequestDto: GenerateRequestDto, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
93
+ // verify required parameter 'generateRequestDto' is not null or undefined
94
+ assertParamExists('generate', 'generateRequestDto', generateRequestDto)
95
+ const localVarPath = `/request`;
96
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
98
+ let baseOptions;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ }
102
+
103
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
104
+ const localVarHeaderParameter = {} as any;
105
+ const localVarQueryParameter = {} as any;
106
+
107
+
108
+
109
+ localVarHeaderParameter['Content-Type'] = 'application/json';
110
+
111
+ if (aPIVersion != null) {
112
+ localVarHeaderParameter['API-Version'] = String(aPIVersion);
113
+ }
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
117
+ localVarRequestOptions.data = serializeDataIfNeeded(generateRequestDto, localVarRequestOptions, configuration)
118
+
119
+ return {
120
+ url: toPathString(localVarUrlObj),
121
+ options: localVarRequestOptions,
122
+ };
123
+ },
124
+ /**
125
+ * Retrieve detailed information about a specific credential request This includes complete W3C Verifiable Credential data for each credential, subject information, agent details (if applicable), and issuer information The credentials are returned in W3C-compliant format and can be cryptographically verified
126
+ * @summary Get Detail
127
+ * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
128
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ */
132
+ getRequestDetail: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
133
+ // verify required parameter 'requestId' is not null or undefined
134
+ assertParamExists('getRequestDetail', 'requestId', requestId)
135
+ const localVarPath = `/request/{requestId}`
136
+ .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+
144
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
145
+ const localVarHeaderParameter = {} as any;
146
+ const localVarQueryParameter = {} as any;
147
+
148
+
149
+
150
+ if (aPIVersion != null) {
151
+ localVarHeaderParameter['API-Version'] = String(aPIVersion);
152
+ }
153
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
154
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
155
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
156
+
157
+ return {
158
+ url: toPathString(localVarUrlObj),
159
+ options: localVarRequestOptions,
160
+ };
161
+ },
162
+ /**
163
+ * Retrieve a paginated list of credential requests for your organization Each request includes information about the credentials, subjects (users), security level, and creation date. One exact search query must be provided
164
+ * @summary Get
165
+ * @param {number} [pageIndex] Page number
166
+ * @param {number} [pageSize] Number of items per page
167
+ * @param {string} [search] Search query to filter by. Is case-insensitive and does not need to match the entire value.
168
+ * @param {string} [contact] Contact value (email or phone)
169
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
170
+ * @param {string} [subjectInternalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
171
+ * @param {string} [internalId] Filter by internal ID.
172
+ * @param {string} [credentialInternalId] Filter by credential internal ID.
173
+ * @param {Array<GetRequestsSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
174
+ * @param {string} [dateFrom] Filter from date (will be converted to start of day)
175
+ * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
176
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ getRequests: async (pageIndex?: number, pageSize?: number, search?: string, contact?: string, did?: string, subjectInternalId?: string, internalId?: string, credentialInternalId?: string, securityLevel?: Array<GetRequestsSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
181
+ const localVarPath = `/request`;
182
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
183
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
184
+ let baseOptions;
185
+ if (configuration) {
186
+ baseOptions = configuration.baseOptions;
187
+ }
188
+
189
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
190
+ const localVarHeaderParameter = {} as any;
191
+ const localVarQueryParameter = {} as any;
192
+
193
+ if (pageIndex !== undefined) {
194
+ localVarQueryParameter['pageIndex'] = pageIndex;
195
+ }
196
+
197
+ if (pageSize !== undefined) {
198
+ localVarQueryParameter['pageSize'] = pageSize;
199
+ }
200
+
201
+ if (search !== undefined) {
202
+ localVarQueryParameter['search'] = search;
203
+ }
204
+
205
+ if (contact !== undefined) {
206
+ localVarQueryParameter['contact'] = contact;
207
+ }
208
+
209
+ if (did !== undefined) {
210
+ localVarQueryParameter['did'] = did;
211
+ }
212
+
213
+ if (subjectInternalId !== undefined) {
214
+ localVarQueryParameter['subjectInternalId'] = subjectInternalId;
215
+ }
216
+
217
+ if (internalId !== undefined) {
218
+ localVarQueryParameter['internalId'] = internalId;
219
+ }
220
+
221
+ if (credentialInternalId !== undefined) {
222
+ localVarQueryParameter['credentialInternalId'] = credentialInternalId;
223
+ }
224
+
225
+ if (securityLevel) {
226
+ localVarQueryParameter['securityLevel'] = securityLevel;
227
+ }
228
+
229
+ if (dateFrom !== undefined) {
230
+ localVarQueryParameter['dateFrom'] = (dateFrom as any instanceof Date) ?
231
+ (dateFrom as any).toISOString() :
232
+ dateFrom;
233
+ }
234
+
235
+ if (dateTo !== undefined) {
236
+ localVarQueryParameter['dateTo'] = (dateTo as any instanceof Date) ?
237
+ (dateTo as any).toISOString() :
238
+ dateTo;
239
+ }
240
+
241
+
242
+
243
+ if (aPIVersion != null) {
244
+ localVarHeaderParameter['API-Version'] = String(aPIVersion);
245
+ }
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
249
+
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ },
255
+ /**
256
+ * Resend a One-Time Password (OTP) to a subject for credential approval, via email or SMS (depending on their contact type) with a code and a signing URL One exact search query must be provided The endpoint validates: - The request is not canceled - Maximum attempts have not been reached, only successful OTP sends count towards resend limits - Sufficient time has passed since the last successful resend - Billing restrictions apply
257
+ * @summary Resend OTP
258
+ * @param {string} requestId Unique identifier of the request.
259
+ * @param {string} [contact] Contact value (email or phone)
260
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
261
+ * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
262
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ resendOtp: async (requestId: string, contact?: string, did?: string, internalId?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
267
+ // verify required parameter 'requestId' is not null or undefined
268
+ assertParamExists('resendOtp', 'requestId', requestId)
269
+ const localVarPath = `/request/resend/{requestId}`
270
+ .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
271
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
272
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
273
+ let baseOptions;
274
+ if (configuration) {
275
+ baseOptions = configuration.baseOptions;
276
+ }
277
+
278
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
279
+ const localVarHeaderParameter = {} as any;
280
+ const localVarQueryParameter = {} as any;
281
+
282
+ if (contact !== undefined) {
283
+ localVarQueryParameter['contact'] = contact;
284
+ }
285
+
286
+ if (did !== undefined) {
287
+ localVarQueryParameter['did'] = did;
288
+ }
289
+
290
+ if (internalId !== undefined) {
291
+ localVarQueryParameter['internalId'] = internalId;
292
+ }
293
+
294
+
295
+
296
+ if (aPIVersion != null) {
297
+ localVarHeaderParameter['API-Version'] = String(aPIVersion);
298
+ }
299
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
300
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
302
+
303
+ return {
304
+ url: toPathString(localVarUrlObj),
305
+ options: localVarRequestOptions,
306
+ };
307
+ },
308
+ }
309
+ };
310
+
311
+ /**
312
+ * RequestsApi - functional programming interface
313
+ * @export
314
+ */
315
+ export const RequestsApiFp = function(configuration?: Configuration) {
316
+ const localVarAxiosParamCreator = RequestsApiAxiosParamCreator(configuration)
317
+ return {
318
+ /**
319
+ * This action will cancel a credential request, by setting the canceledAt timestamp on the request. This operation is irreversible, and will prevent the request from being processed further by the subjects
320
+ * @summary Cancel
321
+ * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
322
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ async cancelRequest(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessEntity>> {
327
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelRequest(requestId, aPIVersion, options);
328
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
329
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.cancelRequest']?.[localVarOperationServerIndex]?.url;
330
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
331
+ },
332
+ /**
333
+ * Create a new credential request for one or more subjects (users). This endpoint will: - Create credentials from resources or inline JSON data - Associate credentials with subjects - Generate and send OTPs for approval via email or SMS Request details: - Resources can be specified via group IDs, resource IDs, or as inline JSON credentials - Maximum 30 credentials per request - Maximum 20 contacts per request - OTPs are automatically sent to all subjects after creation
334
+ * @summary Create
335
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and resources to create credentials from. Resources can be specified via groupIds, resourcesIds, or inline credentials array.
336
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ async generate(generateRequestDto: GenerateRequestDto, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerateRequestEntity>> {
341
+ const localVarAxiosArgs = await localVarAxiosParamCreator.generate(generateRequestDto, aPIVersion, options);
342
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
343
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.generate']?.[localVarOperationServerIndex]?.url;
344
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
345
+ },
346
+ /**
347
+ * Retrieve detailed information about a specific credential request This includes complete W3C Verifiable Credential data for each credential, subject information, agent details (if applicable), and issuer information The credentials are returned in W3C-compliant format and can be cryptographically verified
348
+ * @summary Get Detail
349
+ * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
350
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ */
354
+ async getRequestDetail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestDetailEntity>> {
355
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRequestDetail(requestId, aPIVersion, options);
356
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
357
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.getRequestDetail']?.[localVarOperationServerIndex]?.url;
358
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
359
+ },
360
+ /**
361
+ * Retrieve a paginated list of credential requests for your organization Each request includes information about the credentials, subjects (users), security level, and creation date. One exact search query must be provided
362
+ * @summary Get
363
+ * @param {number} [pageIndex] Page number
364
+ * @param {number} [pageSize] Number of items per page
365
+ * @param {string} [search] Search query to filter by. Is case-insensitive and does not need to match the entire value.
366
+ * @param {string} [contact] Contact value (email or phone)
367
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
368
+ * @param {string} [subjectInternalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
369
+ * @param {string} [internalId] Filter by internal ID.
370
+ * @param {string} [credentialInternalId] Filter by credential internal ID.
371
+ * @param {Array<GetRequestsSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
372
+ * @param {string} [dateFrom] Filter from date (will be converted to start of day)
373
+ * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
374
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ async getRequests(pageIndex?: number, pageSize?: number, search?: string, contact?: string, did?: string, subjectInternalId?: string, internalId?: string, credentialInternalId?: string, securityLevel?: Array<GetRequestsSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestsEntity>> {
379
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRequests(pageIndex, pageSize, search, contact, did, subjectInternalId, internalId, credentialInternalId, securityLevel, dateFrom, dateTo, aPIVersion, options);
380
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
381
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.getRequests']?.[localVarOperationServerIndex]?.url;
382
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
383
+ },
384
+ /**
385
+ * Resend a One-Time Password (OTP) to a subject for credential approval, via email or SMS (depending on their contact type) with a code and a signing URL One exact search query must be provided The endpoint validates: - The request is not canceled - Maximum attempts have not been reached, only successful OTP sends count towards resend limits - Sufficient time has passed since the last successful resend - Billing restrictions apply
386
+ * @summary Resend OTP
387
+ * @param {string} requestId Unique identifier of the request.
388
+ * @param {string} [contact] Contact value (email or phone)
389
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
390
+ * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
391
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
392
+ * @param {*} [options] Override http request option.
393
+ * @throws {RequiredError}
394
+ */
395
+ async resendOtp(requestId: string, contact?: string, did?: string, internalId?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessEntity>> {
396
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resendOtp(requestId, contact, did, internalId, aPIVersion, options);
397
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
398
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.resendOtp']?.[localVarOperationServerIndex]?.url;
399
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
400
+ },
401
+ }
402
+ };
403
+
404
+ /**
405
+ * RequestsApi - factory interface
406
+ * @export
407
+ */
408
+ export const RequestsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
409
+ const localVarFp = RequestsApiFp(configuration)
410
+ return {
411
+ /**
412
+ * This action will cancel a credential request, by setting the canceledAt timestamp on the request. This operation is irreversible, and will prevent the request from being processed further by the subjects
413
+ * @summary Cancel
414
+ * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
415
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ cancelRequest(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<SuccessEntity> {
420
+ return localVarFp.cancelRequest(requestId, aPIVersion, options).then((request) => request(axios, basePath));
421
+ },
422
+ /**
423
+ * Create a new credential request for one or more subjects (users). This endpoint will: - Create credentials from resources or inline JSON data - Associate credentials with subjects - Generate and send OTPs for approval via email or SMS Request details: - Resources can be specified via group IDs, resource IDs, or as inline JSON credentials - Maximum 30 credentials per request - Maximum 20 contacts per request - OTPs are automatically sent to all subjects after creation
424
+ * @summary Create
425
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and resources to create credentials from. Resources can be specified via groupIds, resourcesIds, or inline credentials array.
426
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ */
430
+ generate(generateRequestDto: GenerateRequestDto, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerateRequestEntity> {
431
+ return localVarFp.generate(generateRequestDto, aPIVersion, options).then((request) => request(axios, basePath));
432
+ },
433
+ /**
434
+ * Retrieve detailed information about a specific credential request This includes complete W3C Verifiable Credential data for each credential, subject information, agent details (if applicable), and issuer information The credentials are returned in W3C-compliant format and can be cryptographically verified
435
+ * @summary Get Detail
436
+ * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
437
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ getRequestDetail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<RequestDetailEntity> {
442
+ return localVarFp.getRequestDetail(requestId, aPIVersion, options).then((request) => request(axios, basePath));
443
+ },
444
+ /**
445
+ * Retrieve a paginated list of credential requests for your organization Each request includes information about the credentials, subjects (users), security level, and creation date. One exact search query must be provided
446
+ * @summary Get
447
+ * @param {number} [pageIndex] Page number
448
+ * @param {number} [pageSize] Number of items per page
449
+ * @param {string} [search] Search query to filter by. Is case-insensitive and does not need to match the entire value.
450
+ * @param {string} [contact] Contact value (email or phone)
451
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
452
+ * @param {string} [subjectInternalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
453
+ * @param {string} [internalId] Filter by internal ID.
454
+ * @param {string} [credentialInternalId] Filter by credential internal ID.
455
+ * @param {Array<GetRequestsSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
456
+ * @param {string} [dateFrom] Filter from date (will be converted to start of day)
457
+ * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
458
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ getRequests(pageIndex?: number, pageSize?: number, search?: string, contact?: string, did?: string, subjectInternalId?: string, internalId?: string, credentialInternalId?: string, securityLevel?: Array<GetRequestsSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<RequestsEntity> {
463
+ return localVarFp.getRequests(pageIndex, pageSize, search, contact, did, subjectInternalId, internalId, credentialInternalId, securityLevel, dateFrom, dateTo, aPIVersion, options).then((request) => request(axios, basePath));
464
+ },
465
+ /**
466
+ * Resend a One-Time Password (OTP) to a subject for credential approval, via email or SMS (depending on their contact type) with a code and a signing URL One exact search query must be provided The endpoint validates: - The request is not canceled - Maximum attempts have not been reached, only successful OTP sends count towards resend limits - Sufficient time has passed since the last successful resend - Billing restrictions apply
467
+ * @summary Resend OTP
468
+ * @param {string} requestId Unique identifier of the request.
469
+ * @param {string} [contact] Contact value (email or phone)
470
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
471
+ * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
472
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ resendOtp(requestId: string, contact?: string, did?: string, internalId?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<SuccessEntity> {
477
+ return localVarFp.resendOtp(requestId, contact, did, internalId, aPIVersion, options).then((request) => request(axios, basePath));
478
+ },
479
+ };
480
+ };
481
+
482
+ /**
483
+ * RequestsApi - object-oriented interface
484
+ * @export
485
+ * @class RequestsApi
486
+ * @extends {BaseAPI}
487
+ */
488
+ export class RequestsApi extends BaseAPI {
489
+ /**
490
+ * This action will cancel a credential request, by setting the canceledAt timestamp on the request. This operation is irreversible, and will prevent the request from being processed further by the subjects
491
+ * @summary Cancel
492
+ * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
493
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ * @memberof RequestsApi
497
+ */
498
+ public cancelRequest(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
499
+ return RequestsApiFp(this.configuration).cancelRequest(requestId, aPIVersion, options).then((request) => request(this.axios, this.basePath));
500
+ }
501
+
502
+ /**
503
+ * Create a new credential request for one or more subjects (users). This endpoint will: - Create credentials from resources or inline JSON data - Associate credentials with subjects - Generate and send OTPs for approval via email or SMS Request details: - Resources can be specified via group IDs, resource IDs, or as inline JSON credentials - Maximum 30 credentials per request - Maximum 20 contacts per request - OTPs are automatically sent to all subjects after creation
504
+ * @summary Create
505
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and resources to create credentials from. Resources can be specified via groupIds, resourcesIds, or inline credentials array.
506
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ * @memberof RequestsApi
510
+ */
511
+ public generate(generateRequestDto: GenerateRequestDto, aPIVersion?: string, options?: RawAxiosRequestConfig) {
512
+ return RequestsApiFp(this.configuration).generate(generateRequestDto, aPIVersion, options).then((request) => request(this.axios, this.basePath));
513
+ }
514
+
515
+ /**
516
+ * Retrieve detailed information about a specific credential request This includes complete W3C Verifiable Credential data for each credential, subject information, agent details (if applicable), and issuer information The credentials are returned in W3C-compliant format and can be cryptographically verified
517
+ * @summary Get Detail
518
+ * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
519
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ * @memberof RequestsApi
523
+ */
524
+ public getRequestDetail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
525
+ return RequestsApiFp(this.configuration).getRequestDetail(requestId, aPIVersion, options).then((request) => request(this.axios, this.basePath));
526
+ }
527
+
528
+ /**
529
+ * Retrieve a paginated list of credential requests for your organization Each request includes information about the credentials, subjects (users), security level, and creation date. One exact search query must be provided
530
+ * @summary Get
531
+ * @param {number} [pageIndex] Page number
532
+ * @param {number} [pageSize] Number of items per page
533
+ * @param {string} [search] Search query to filter by. Is case-insensitive and does not need to match the entire value.
534
+ * @param {string} [contact] Contact value (email or phone)
535
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
536
+ * @param {string} [subjectInternalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
537
+ * @param {string} [internalId] Filter by internal ID.
538
+ * @param {string} [credentialInternalId] Filter by credential internal ID.
539
+ * @param {Array<GetRequestsSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
540
+ * @param {string} [dateFrom] Filter from date (will be converted to start of day)
541
+ * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
542
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ * @memberof RequestsApi
546
+ */
547
+ public getRequests(pageIndex?: number, pageSize?: number, search?: string, contact?: string, did?: string, subjectInternalId?: string, internalId?: string, credentialInternalId?: string, securityLevel?: Array<GetRequestsSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
548
+ return RequestsApiFp(this.configuration).getRequests(pageIndex, pageSize, search, contact, did, subjectInternalId, internalId, credentialInternalId, securityLevel, dateFrom, dateTo, aPIVersion, options).then((request) => request(this.axios, this.basePath));
549
+ }
550
+
551
+ /**
552
+ * Resend a One-Time Password (OTP) to a subject for credential approval, via email or SMS (depending on their contact type) with a code and a signing URL One exact search query must be provided The endpoint validates: - The request is not canceled - Maximum attempts have not been reached, only successful OTP sends count towards resend limits - Sufficient time has passed since the last successful resend - Billing restrictions apply
553
+ * @summary Resend OTP
554
+ * @param {string} requestId Unique identifier of the request.
555
+ * @param {string} [contact] Contact value (email or phone)
556
+ * @param {string} [did] Public Decentralized Identifier (DID) of the user
557
+ * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
558
+ * @param {string} [aPIVersion] Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today\&#39;s date.
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ * @memberof RequestsApi
562
+ */
563
+ public resendOtp(requestId: string, contact?: string, did?: string, internalId?: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
564
+ return RequestsApiFp(this.configuration).resendOtp(requestId, contact, did, internalId, aPIVersion, options).then((request) => request(this.axios, this.basePath));
565
+ }
566
+ }
567
+
568
+ /**
569
+ * @export
570
+ */
571
+ export const GetRequestsSecurityLevelEnum = {
572
+ Contact: 'CONTACT',
573
+ OrganizationKyc: 'ORGANIZATION_KYC',
574
+ HumanosKyc: 'HUMANOS_KYC',
575
+ HumanosRevalidation: 'HUMANOS_REVALIDATION'
576
+ } as const;
577
+ export type GetRequestsSecurityLevelEnum = typeof GetRequestsSecurityLevelEnum[keyof typeof GetRequestsSecurityLevelEnum];