humanos 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +310 -114
  2. package/dist/index.d.mts +3558 -1753
  3. package/dist/index.d.ts +3558 -1753
  4. package/dist/index.js +1621 -499
  5. package/dist/index.mjs +1578 -478
  6. package/generated/.openapi-generator/FILES +59 -33
  7. package/generated/api/actions-api.ts +273 -0
  8. package/generated/api/activity-api.ts +225 -0
  9. package/generated/api/{resource-api.ts → approval-api.ts} +65 -61
  10. package/generated/api/credentials-api.ts +365 -25
  11. package/generated/api/didapi.ts +138 -0
  12. package/generated/api/requests-api.ts +124 -134
  13. package/generated/api/user-api.ts +45 -36
  14. package/generated/api/webhooks-api.ts +84 -56
  15. package/generated/api.ts +5 -1
  16. package/generated/models/action-dto.ts +36 -0
  17. package/generated/models/action-entity.ts +57 -0
  18. package/generated/models/action-list-entity.ts +39 -0
  19. package/generated/models/action-query.ts +48 -0
  20. package/generated/models/action-ref-dto.ts +36 -0
  21. package/generated/models/action-version-detail-entity.ts +72 -0
  22. package/generated/models/action-version-list-entity.ts +39 -0
  23. package/generated/models/action-version-summary-entity.ts +48 -0
  24. package/generated/models/activities-entity.ts +39 -0
  25. package/generated/models/activity-entity.ts +90 -0
  26. package/generated/models/activity-query.ts +96 -0
  27. package/generated/models/consent.ts +36 -0
  28. package/generated/models/constraints-dto.ts +36 -0
  29. package/generated/models/{agent-detail-entity.ts → contact-entity.ts} +8 -8
  30. package/generated/models/create-presentation-dto.ts +30 -0
  31. package/generated/models/create-presentation400-response.ts +42 -0
  32. package/generated/models/create-presentation403-response.ts +42 -0
  33. package/generated/models/create-presentation404-response.ts +42 -0
  34. package/generated/models/create-subject-dto.ts +10 -4
  35. package/generated/models/create-subject-entity.ts +4 -4
  36. package/generated/models/{cancel-request404-response.ts → create400-response.ts} +5 -5
  37. package/generated/models/credential-dto-data-inner.ts +26 -0
  38. package/generated/models/credential-dto.ts +52 -6
  39. package/generated/models/credential-entity.ts +33 -7
  40. package/generated/models/{credential-subject.ts → credential-event-decision.ts} +13 -11
  41. package/generated/models/credential-event-user.ts +1 -1
  42. package/generated/models/credential-event.ts +15 -19
  43. package/generated/models/credential-placement-dto.ts +85 -0
  44. package/generated/models/credential-status.ts +5 -3
  45. package/generated/models/credentials-detail404-response.ts +42 -0
  46. package/generated/models/credentials-evidence404-response.ts +42 -0
  47. package/generated/models/credentials-issue-vp400-response.ts +42 -0
  48. package/generated/models/credentials-issue-vp403-response.ts +42 -0
  49. package/generated/models/credentials-issue-vp404-response.ts +42 -0
  50. package/generated/models/credentials-revoke400-response.ts +42 -0
  51. package/generated/models/credentials-revoke409-response.ts +42 -0
  52. package/generated/models/did-document-entity.ts +63 -0
  53. package/generated/models/evidence.ts +44 -0
  54. package/generated/models/generate-credential-entity.ts +2 -2
  55. package/generated/models/generate-request-dto.ts +18 -15
  56. package/generated/models/generate-request-entity.ts +6 -6
  57. package/generated/models/generate-subject-entity.ts +3 -3
  58. package/generated/models/get-evidence404-response.ts +42 -0
  59. package/generated/models/group-entity.ts +3 -3
  60. package/generated/models/groups-entity.ts +1 -1
  61. package/generated/models/identity-dto.ts +27 -27
  62. package/generated/models/identity-event-decision.ts +13 -1
  63. package/generated/models/{create-subject-user-entity.ts → identity-event-user.ts} +12 -12
  64. package/generated/models/identity-event.ts +14 -18
  65. package/generated/models/{identity-event-identity.ts → identity-payload.ts} +12 -12
  66. package/generated/models/index.ts +55 -32
  67. package/generated/models/{action-type.ts → json-value.ts} +6 -12
  68. package/generated/models/{mandate-data-dto-value.ts → organization-data-entity.ts} +9 -3
  69. package/generated/models/{issuer-detail-entity.ts → otp-error.ts} +8 -8
  70. package/generated/models/otp-failed-event-otp.ts +3 -3
  71. package/generated/models/otp-failed-event.ts +11 -15
  72. package/generated/models/partial-subject-entity.ts +42 -0
  73. package/generated/models/presentation-receipt-entity.ts +42 -0
  74. package/generated/models/presentation-response-entity.ts +39 -0
  75. package/generated/models/receipt-entity.ts +36 -0
  76. package/generated/models/request-credential-entity.ts +72 -0
  77. package/generated/models/request-detail-entity.ts +26 -20
  78. package/generated/models/request-detail-subject-entity.ts +87 -0
  79. package/generated/models/request-entity.ts +14 -8
  80. package/generated/models/request-query.ts +3 -21
  81. package/generated/models/request-subject-entity.ts +21 -6
  82. package/generated/models/requests-create400-response.ts +42 -0
  83. package/generated/models/requests-detail404-response.ts +42 -0
  84. package/generated/models/requests-entity.ts +1 -1
  85. package/generated/models/requests-resend-otp403-response.ts +42 -0
  86. package/generated/models/resend-otp403-response.ts +42 -0
  87. package/generated/models/resource-entity.ts +11 -3
  88. package/generated/models/{group-resource-entity.ts → resource-minimal-entity.ts} +13 -11
  89. package/generated/models/resource-query.ts +3 -1
  90. package/generated/models/resources-entity.ts +1 -1
  91. package/generated/models/revoke-credential-dto.ts +30 -0
  92. package/generated/models/revoke-credential-entity.ts +63 -0
  93. package/generated/models/revoke-credential400-response.ts +42 -0
  94. package/generated/models/revoke-credential409-response.ts +42 -0
  95. package/generated/models/revoke-receipt-entity.ts +42 -0
  96. package/generated/models/schema-entity.ts +57 -0
  97. package/generated/models/schema-list-entity.ts +39 -0
  98. package/generated/models/schema-query.ts +48 -0
  99. package/generated/models/schema-response-entity.ts +45 -0
  100. package/generated/models/schema-version-detail-entity.ts +72 -0
  101. package/generated/models/schema-version-list-entity.ts +39 -0
  102. package/generated/models/schema-version-response-entity.ts +54 -0
  103. package/generated/models/schema-version-summary-entity.ts +48 -0
  104. package/generated/models/subject-contact-entity.ts +7 -7
  105. package/generated/models/subject-issuer-entity.ts +69 -0
  106. package/generated/models/subject-query.ts +4 -4
  107. package/generated/models/test-event.ts +11 -15
  108. package/generated/models/user-create400-response.ts +42 -0
  109. package/generated/models/user-detail400-response.ts +42 -0
  110. package/generated/models/user-detail404-response.ts +42 -0
  111. package/generated/models/verification-method-entity.ts +48 -0
  112. package/generated/models/verify-allow-response-entity.ts +61 -0
  113. package/generated/models/verify-deny-response-entity.ts +79 -0
  114. package/generated/models/verify-evaluation-entity.ts +51 -0
  115. package/generated/models/verify-presentation-dto.ts +36 -0
  116. package/generated/models/verify-receipt-entity.ts +42 -0
  117. package/generated/models/w3-cverifiable-credential-credential-subject-mandate-action.ts +44 -0
  118. package/generated/models/w3-cverifiable-credential-credential-subject-mandate-constraint-constraint-schema.ts +44 -0
  119. package/generated/models/w3-cverifiable-credential-credential-subject-mandate-constraint.ts +41 -0
  120. package/generated/models/w3-cverifiable-credential-credential-subject-mandate-context.ts +32 -0
  121. package/generated/models/{mandate-data-type.ts → w3-cverifiable-credential-credential-subject-mandate-grantor.ts} +3 -16
  122. package/generated/models/w3-cverifiable-credential-credential-subject-mandate.ts +65 -0
  123. package/generated/models/w3-cverifiable-credential-credential-subject.ts +41 -0
  124. package/generated/models/w3-cverifiable-credential-evidences-inner.ts +42 -0
  125. package/generated/models/w3-cverifiable-credential-proofs-inner.ts +62 -0
  126. package/generated/models/w3-cverifiable-credential-valid-from.ts +24 -0
  127. package/generated/models/w3-cverifiable-credential-valid-until.ts +24 -0
  128. package/generated/models/w3-cverifiable-credential.ts +24 -25
  129. package/generated/models/webhook-call-event.ts +6 -12
  130. package/package.json +1 -1
  131. package/generated/models/credential-full-entity.ts +0 -82
  132. package/generated/models/get-credential-entity.ts +0 -48
  133. package/generated/models/identity-field-placement.ts +0 -73
  134. package/generated/models/identity-field-type.ts +0 -38
  135. package/generated/models/mandate-data-dto-type.ts +0 -73
  136. package/generated/models/mandate-data-dto.ts +0 -71
  137. package/generated/models/signature-placement-item-dto.ts +0 -72
  138. package/generated/models/signature-placement.ts +0 -56
  139. package/generated/models/subject-entity.ts +0 -48
  140. package/generated/models/w3-cproof.ts +0 -82
@@ -22,20 +22,20 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
25
- import type { CancelRequest404Response } from '../models';
26
- // @ts-ignore
27
- import type { Generate400Response } from '../models';
28
- // @ts-ignore
29
25
  import type { GenerateRequestDto } from '../models';
30
26
  // @ts-ignore
31
27
  import type { GenerateRequestEntity } from '../models';
32
28
  // @ts-ignore
33
- import type { GetRequestDetail404Response } from '../models';
34
- // @ts-ignore
35
29
  import type { RequestDetailEntity } from '../models';
36
30
  // @ts-ignore
31
+ import type { RequestsCreate400Response } from '../models';
32
+ // @ts-ignore
33
+ import type { RequestsDetail404Response } from '../models';
34
+ // @ts-ignore
37
35
  import type { RequestsEntity } from '../models';
38
36
  // @ts-ignore
37
+ import type { RequestsResendOtp403Response } from '../models';
38
+ // @ts-ignore
39
39
  import type { SuccessEntity } from '../models';
40
40
  /**
41
41
  * RequestsApi - axios parameter creator
@@ -44,16 +44,16 @@ import type { SuccessEntity } from '../models';
44
44
  export const RequestsApiAxiosParamCreator = function (configuration?: Configuration) {
45
45
  return {
46
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
47
+ * This action will cancel a credential request. Once a request is canceled, it cannot be undone and will prevent the request from being completed by any subjects. A request can be canceled if it contains credentials in draft status.
48
+ * @summary Cancel Request
49
49
  * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
50
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
51
  * @param {*} [options] Override http request option.
52
52
  * @throws {RequiredError}
53
53
  */
54
- cancelRequest: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ cancel: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
55
55
  // verify required parameter 'requestId' is not null or undefined
56
- assertParamExists('cancelRequest', 'requestId', requestId)
56
+ assertParamExists('cancel', 'requestId', requestId)
57
57
  const localVarPath = `/request/{requestId}`
58
58
  .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
59
59
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -82,16 +82,17 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
82
82
  };
83
83
  },
84
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.
85
+ * Create a new request for one or more subjects (users). This endpoint will: - Create credentials from resources (via group IDs, resource IDs) or inline JSON data - Associate those credentials with subjects - Generate and send OTPs via email or SMS
86
+ * @summary Create Request
87
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and credentials to generate Resources can be specified via groupIds, resourcesIds, or inline credentials array.
88
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
88
89
  * @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
90
  * @param {*} [options] Override http request option.
90
91
  * @throws {RequiredError}
91
92
  */
92
- generate: async (generateRequestDto: GenerateRequestDto, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
93
+ create: async (generateRequestDto: GenerateRequestDto, idempotencyKey?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
93
94
  // verify required parameter 'generateRequestDto' is not null or undefined
94
- assertParamExists('generate', 'generateRequestDto', generateRequestDto)
95
+ assertParamExists('create', 'generateRequestDto', generateRequestDto)
95
96
  const localVarPath = `/request`;
96
97
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
98
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -108,6 +109,9 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
108
109
 
109
110
  localVarHeaderParameter['Content-Type'] = 'application/json';
110
111
 
112
+ if (idempotencyKey != null) {
113
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
114
+ }
111
115
  if (aPIVersion != null) {
112
116
  localVarHeaderParameter['API-Version'] = String(aPIVersion);
113
117
  }
@@ -122,16 +126,16 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
122
126
  };
123
127
  },
124
128
  /**
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
129
+ * Retrieve detailed information about a specific credential request Just like the list requests endpoint, this endpoint includes information about the request, credentials, subjects (users) and chosen security level However, this endpoint includes the full W3C Verifiable Credential data for each credential, and the latest status of all grantor decisions
126
130
  * @summary Get Detail
127
131
  * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
128
132
  * @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
133
  * @param {*} [options] Override http request option.
130
134
  * @throws {RequiredError}
131
135
  */
132
- getRequestDetail: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
136
+ detail: async (requestId: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
133
137
  // verify required parameter 'requestId' is not null or undefined
134
- assertParamExists('getRequestDetail', 'requestId', requestId)
138
+ assertParamExists('detail', 'requestId', requestId)
135
139
  const localVarPath = `/request/{requestId}`
136
140
  .replace(`{${"requestId"}}`, encodeURIComponent(String(requestId)));
137
141
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -160,24 +164,21 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
160
164
  };
161
165
  },
162
166
  /**
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
167
+ * Retrieve a paginated list of your credential requests Each request includes information about the request, credentials, subjects (users) and chosen security level
168
+ * @summary List Requests
165
169
  * @param {number} [pageIndex] Page number
166
170
  * @param {number} [pageSize] Number of items per page
167
171
  * @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
172
+ * @param {string} [subject] Filter by subject (nested object with contact, id, or internalId).
173
+ * @param {string} [internalId] Identifier to help you identify the request in your own system. We recommend using a unique value.
174
+ * @param {Array<ListSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
174
175
  * @param {string} [dateFrom] Filter from date (will be converted to start of day)
175
176
  * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
176
177
  * @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
178
  * @param {*} [options] Override http request option.
178
179
  * @throws {RequiredError}
179
180
  */
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
+ list: async (pageIndex?: number, pageSize?: number, search?: string, subject?: string, internalId?: string, securityLevel?: Array<ListSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
181
182
  const localVarPath = `/request`;
182
183
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
183
184
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -202,26 +203,14 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
202
203
  localVarQueryParameter['search'] = search;
203
204
  }
204
205
 
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;
206
+ if (subject !== undefined) {
207
+ localVarQueryParameter['subject'] = subject;
215
208
  }
216
209
 
217
210
  if (internalId !== undefined) {
218
211
  localVarQueryParameter['internalId'] = internalId;
219
212
  }
220
213
 
221
- if (credentialInternalId !== undefined) {
222
- localVarQueryParameter['credentialInternalId'] = credentialInternalId;
223
- }
224
-
225
214
  if (securityLevel) {
226
215
  localVarQueryParameter['securityLevel'] = securityLevel;
227
216
  }
@@ -253,17 +242,18 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
253
242
  };
254
243
  },
255
244
  /**
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
245
+ * 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. 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
246
  * @summary Resend OTP
258
247
  * @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
248
+ * @param {string} [contact] Verified contact value (email or phone)
249
+ * @param {string} [id] Users VIA identifier
261
250
  * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
251
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
262
252
  * @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
253
  * @param {*} [options] Override http request option.
264
254
  * @throws {RequiredError}
265
255
  */
266
- resendOtp: async (requestId: string, contact?: string, did?: string, internalId?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
256
+ resendOtp: async (requestId: string, contact?: string, id?: string, internalId?: string, idempotencyKey?: string, aPIVersion?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
267
257
  // verify required parameter 'requestId' is not null or undefined
268
258
  assertParamExists('resendOtp', 'requestId', requestId)
269
259
  const localVarPath = `/request/resend/{requestId}`
@@ -283,8 +273,8 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
283
273
  localVarQueryParameter['contact'] = contact;
284
274
  }
285
275
 
286
- if (did !== undefined) {
287
- localVarQueryParameter['did'] = did;
276
+ if (id !== undefined) {
277
+ localVarQueryParameter['id'] = id;
288
278
  }
289
279
 
290
280
  if (internalId !== undefined) {
@@ -293,6 +283,9 @@ export const RequestsApiAxiosParamCreator = function (configuration?: Configurat
293
283
 
294
284
 
295
285
 
286
+ if (idempotencyKey != null) {
287
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
288
+ }
296
289
  if (aPIVersion != null) {
297
290
  localVarHeaderParameter['API-Version'] = String(aPIVersion);
298
291
  }
@@ -316,84 +309,83 @@ export const RequestsApiFp = function(configuration?: Configuration) {
316
309
  const localVarAxiosParamCreator = RequestsApiAxiosParamCreator(configuration)
317
310
  return {
318
311
  /**
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
312
+ * This action will cancel a credential request. Once a request is canceled, it cannot be undone and will prevent the request from being completed by any subjects. A request can be canceled if it contains credentials in draft status.
313
+ * @summary Cancel Request
321
314
  * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
322
315
  * @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
316
  * @param {*} [options] Override http request option.
324
317
  * @throws {RequiredError}
325
318
  */
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);
319
+ async cancel(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessEntity>> {
320
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(requestId, aPIVersion, options);
328
321
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
329
- const localVarOperationServerBasePath = operationServerMap['RequestsApi.cancelRequest']?.[localVarOperationServerIndex]?.url;
322
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.cancel']?.[localVarOperationServerIndex]?.url;
330
323
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
331
324
  },
332
325
  /**
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.
326
+ * Create a new request for one or more subjects (users). This endpoint will: - Create credentials from resources (via group IDs, resource IDs) or inline JSON data - Associate those credentials with subjects - Generate and send OTPs via email or SMS
327
+ * @summary Create Request
328
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and credentials to generate Resources can be specified via groupIds, resourcesIds, or inline credentials array.
329
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
336
330
  * @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
331
  * @param {*} [options] Override http request option.
338
332
  * @throws {RequiredError}
339
333
  */
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);
334
+ async create(generateRequestDto: GenerateRequestDto, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerateRequestEntity>> {
335
+ const localVarAxiosArgs = await localVarAxiosParamCreator.create(generateRequestDto, idempotencyKey, aPIVersion, options);
342
336
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
343
- const localVarOperationServerBasePath = operationServerMap['RequestsApi.generate']?.[localVarOperationServerIndex]?.url;
337
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.create']?.[localVarOperationServerIndex]?.url;
344
338
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
345
339
  },
346
340
  /**
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
341
+ * Retrieve detailed information about a specific credential request Just like the list requests endpoint, this endpoint includes information about the request, credentials, subjects (users) and chosen security level However, this endpoint includes the full W3C Verifiable Credential data for each credential, and the latest status of all grantor decisions
348
342
  * @summary Get Detail
349
343
  * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
350
344
  * @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
345
  * @param {*} [options] Override http request option.
352
346
  * @throws {RequiredError}
353
347
  */
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);
348
+ async detail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestDetailEntity>> {
349
+ const localVarAxiosArgs = await localVarAxiosParamCreator.detail(requestId, aPIVersion, options);
356
350
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
357
- const localVarOperationServerBasePath = operationServerMap['RequestsApi.getRequestDetail']?.[localVarOperationServerIndex]?.url;
351
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.detail']?.[localVarOperationServerIndex]?.url;
358
352
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
359
353
  },
360
354
  /**
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
355
+ * Retrieve a paginated list of your credential requests Each request includes information about the request, credentials, subjects (users) and chosen security level
356
+ * @summary List Requests
363
357
  * @param {number} [pageIndex] Page number
364
358
  * @param {number} [pageSize] Number of items per page
365
359
  * @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
360
+ * @param {string} [subject] Filter by subject (nested object with contact, id, or internalId).
361
+ * @param {string} [internalId] Identifier to help you identify the request in your own system. We recommend using a unique value.
362
+ * @param {Array<ListSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
372
363
  * @param {string} [dateFrom] Filter from date (will be converted to start of day)
373
364
  * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
374
365
  * @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
366
  * @param {*} [options] Override http request option.
376
367
  * @throws {RequiredError}
377
368
  */
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);
369
+ async list(pageIndex?: number, pageSize?: number, search?: string, subject?: string, internalId?: string, securityLevel?: Array<ListSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestsEntity>> {
370
+ const localVarAxiosArgs = await localVarAxiosParamCreator.list(pageIndex, pageSize, search, subject, internalId, securityLevel, dateFrom, dateTo, aPIVersion, options);
380
371
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
381
- const localVarOperationServerBasePath = operationServerMap['RequestsApi.getRequests']?.[localVarOperationServerIndex]?.url;
372
+ const localVarOperationServerBasePath = operationServerMap['RequestsApi.list']?.[localVarOperationServerIndex]?.url;
382
373
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
383
374
  },
384
375
  /**
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
376
+ * 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. 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
377
  * @summary Resend OTP
387
378
  * @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
379
+ * @param {string} [contact] Verified contact value (email or phone)
380
+ * @param {string} [id] Users VIA identifier
390
381
  * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
382
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
391
383
  * @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
384
  * @param {*} [options] Override http request option.
393
385
  * @throws {RequiredError}
394
386
  */
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);
387
+ async resendOtp(requestId: string, contact?: string, id?: string, internalId?: string, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessEntity>> {
388
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resendOtp(requestId, contact, id, internalId, idempotencyKey, aPIVersion, options);
397
389
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
398
390
  const localVarOperationServerBasePath = operationServerMap['RequestsApi.resendOtp']?.[localVarOperationServerIndex]?.url;
399
391
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -409,72 +401,71 @@ export const RequestsApiFactory = function (configuration?: Configuration, baseP
409
401
  const localVarFp = RequestsApiFp(configuration)
410
402
  return {
411
403
  /**
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
404
+ * This action will cancel a credential request. Once a request is canceled, it cannot be undone and will prevent the request from being completed by any subjects. A request can be canceled if it contains credentials in draft status.
405
+ * @summary Cancel Request
414
406
  * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
415
407
  * @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
408
  * @param {*} [options] Override http request option.
417
409
  * @throws {RequiredError}
418
410
  */
419
- cancelRequest(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<SuccessEntity> {
420
- return localVarFp.cancelRequest(requestId, aPIVersion, options).then((request) => request(axios, basePath));
411
+ cancel(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<SuccessEntity> {
412
+ return localVarFp.cancel(requestId, aPIVersion, options).then((request) => request(axios, basePath));
421
413
  },
422
414
  /**
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.
415
+ * Create a new request for one or more subjects (users). This endpoint will: - Create credentials from resources (via group IDs, resource IDs) or inline JSON data - Associate those credentials with subjects - Generate and send OTPs via email or SMS
416
+ * @summary Create Request
417
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and credentials to generate Resources can be specified via groupIds, resourcesIds, or inline credentials array.
418
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
426
419
  * @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
420
  * @param {*} [options] Override http request option.
428
421
  * @throws {RequiredError}
429
422
  */
430
- generate(generateRequestDto: GenerateRequestDto, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerateRequestEntity> {
431
- return localVarFp.generate(generateRequestDto, aPIVersion, options).then((request) => request(axios, basePath));
423
+ create(generateRequestDto: GenerateRequestDto, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerateRequestEntity> {
424
+ return localVarFp.create(generateRequestDto, idempotencyKey, aPIVersion, options).then((request) => request(axios, basePath));
432
425
  },
433
426
  /**
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
427
+ * Retrieve detailed information about a specific credential request Just like the list requests endpoint, this endpoint includes information about the request, credentials, subjects (users) and chosen security level However, this endpoint includes the full W3C Verifiable Credential data for each credential, and the latest status of all grantor decisions
435
428
  * @summary Get Detail
436
429
  * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
437
430
  * @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
431
  * @param {*} [options] Override http request option.
439
432
  * @throws {RequiredError}
440
433
  */
441
- getRequestDetail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<RequestDetailEntity> {
442
- return localVarFp.getRequestDetail(requestId, aPIVersion, options).then((request) => request(axios, basePath));
434
+ detail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<RequestDetailEntity> {
435
+ return localVarFp.detail(requestId, aPIVersion, options).then((request) => request(axios, basePath));
443
436
  },
444
437
  /**
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
438
+ * Retrieve a paginated list of your credential requests Each request includes information about the request, credentials, subjects (users) and chosen security level
439
+ * @summary List Requests
447
440
  * @param {number} [pageIndex] Page number
448
441
  * @param {number} [pageSize] Number of items per page
449
442
  * @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
443
+ * @param {string} [subject] Filter by subject (nested object with contact, id, or internalId).
444
+ * @param {string} [internalId] Identifier to help you identify the request in your own system. We recommend using a unique value.
445
+ * @param {Array<ListSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
456
446
  * @param {string} [dateFrom] Filter from date (will be converted to start of day)
457
447
  * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
458
448
  * @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
449
  * @param {*} [options] Override http request option.
460
450
  * @throws {RequiredError}
461
451
  */
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));
452
+ list(pageIndex?: number, pageSize?: number, search?: string, subject?: string, internalId?: string, securityLevel?: Array<ListSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<RequestsEntity> {
453
+ return localVarFp.list(pageIndex, pageSize, search, subject, internalId, securityLevel, dateFrom, dateTo, aPIVersion, options).then((request) => request(axios, basePath));
464
454
  },
465
455
  /**
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
456
+ * 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. 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
457
  * @summary Resend OTP
468
458
  * @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
459
+ * @param {string} [contact] Verified contact value (email or phone)
460
+ * @param {string} [id] Users VIA identifier
471
461
  * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
462
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
472
463
  * @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
464
  * @param {*} [options] Override http request option.
474
465
  * @throws {RequiredError}
475
466
  */
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));
467
+ resendOtp(requestId: string, contact?: string, id?: string, internalId?: string, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig): AxiosPromise<SuccessEntity> {
468
+ return localVarFp.resendOtp(requestId, contact, id, internalId, idempotencyKey, aPIVersion, options).then((request) => request(axios, basePath));
478
469
  },
479
470
  };
480
471
  };
@@ -487,33 +478,34 @@ export const RequestsApiFactory = function (configuration?: Configuration, baseP
487
478
  */
488
479
  export class RequestsApi extends BaseAPI {
489
480
  /**
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
481
+ * This action will cancel a credential request. Once a request is canceled, it cannot be undone and will prevent the request from being completed by any subjects. A request can be canceled if it contains credentials in draft status.
482
+ * @summary Cancel Request
492
483
  * @param {string} requestId Unique identifier of the credential request to cancel. Must be a valid MongoDB ObjectId.
493
484
  * @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
485
  * @param {*} [options] Override http request option.
495
486
  * @throws {RequiredError}
496
487
  * @memberof RequestsApi
497
488
  */
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));
489
+ public cancel(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
490
+ return RequestsApiFp(this.configuration).cancel(requestId, aPIVersion, options).then((request) => request(this.axios, this.basePath));
500
491
  }
501
492
 
502
493
  /**
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.
494
+ * Create a new request for one or more subjects (users). This endpoint will: - Create credentials from resources (via group IDs, resource IDs) or inline JSON data - Associate those credentials with subjects - Generate and send OTPs via email or SMS
495
+ * @summary Create Request
496
+ * @param {GenerateRequestDto} generateRequestDto Request body containing contacts (subjects), security level, and credentials to generate Resources can be specified via groupIds, resourcesIds, or inline credentials array.
497
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
506
498
  * @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
499
  * @param {*} [options] Override http request option.
508
500
  * @throws {RequiredError}
509
501
  * @memberof RequestsApi
510
502
  */
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));
503
+ public create(generateRequestDto: GenerateRequestDto, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
504
+ return RequestsApiFp(this.configuration).create(generateRequestDto, idempotencyKey, aPIVersion, options).then((request) => request(this.axios, this.basePath));
513
505
  }
514
506
 
515
507
  /**
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
508
+ * Retrieve detailed information about a specific credential request Just like the list requests endpoint, this endpoint includes information about the request, credentials, subjects (users) and chosen security level However, this endpoint includes the full W3C Verifiable Credential data for each credential, and the latest status of all grantor decisions
517
509
  * @summary Get Detail
518
510
  * @param {string} requestId Unique identifier of the credential request. Must be a valid MongoDB ObjectId.
519
511
  * @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.
@@ -521,22 +513,19 @@ export class RequestsApi extends BaseAPI {
521
513
  * @throws {RequiredError}
522
514
  * @memberof RequestsApi
523
515
  */
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));
516
+ public detail(requestId: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
517
+ return RequestsApiFp(this.configuration).detail(requestId, aPIVersion, options).then((request) => request(this.axios, this.basePath));
526
518
  }
527
519
 
528
520
  /**
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
521
+ * Retrieve a paginated list of your credential requests Each request includes information about the request, credentials, subjects (users) and chosen security level
522
+ * @summary List Requests
531
523
  * @param {number} [pageIndex] Page number
532
524
  * @param {number} [pageSize] Number of items per page
533
525
  * @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
526
+ * @param {string} [subject] Filter by subject (nested object with contact, id, or internalId).
527
+ * @param {string} [internalId] Identifier to help you identify the request in your own system. We recommend using a unique value.
528
+ * @param {Array<ListSecurityLevelEnum>} [securityLevel] Filter by security level. Can be a single value or array
540
529
  * @param {string} [dateFrom] Filter from date (will be converted to start of day)
541
530
  * @param {string} [dateTo] Filter to date (will be converted to end of day). Requires dateFrom.
542
531
  * @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.
@@ -544,34 +533,35 @@ export class RequestsApi extends BaseAPI {
544
533
  * @throws {RequiredError}
545
534
  * @memberof RequestsApi
546
535
  */
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));
536
+ public list(pageIndex?: number, pageSize?: number, search?: string, subject?: string, internalId?: string, securityLevel?: Array<ListSecurityLevelEnum>, dateFrom?: string, dateTo?: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
537
+ return RequestsApiFp(this.configuration).list(pageIndex, pageSize, search, subject, internalId, securityLevel, dateFrom, dateTo, aPIVersion, options).then((request) => request(this.axios, this.basePath));
549
538
  }
550
539
 
551
540
  /**
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
541
+ * 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. 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
542
  * @summary Resend OTP
554
543
  * @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
544
+ * @param {string} [contact] Verified contact value (email or phone)
545
+ * @param {string} [id] Users VIA identifier
557
546
  * @param {string} [internalId] Identifier to help you identify the user in your own system. We recommend using a unique value.
547
+ * @param {string} [idempotencyKey] Optional key used to safely retry the same create/initiate request without duplicating side effects.
558
548
  * @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
549
  * @param {*} [options] Override http request option.
560
550
  * @throws {RequiredError}
561
551
  * @memberof RequestsApi
562
552
  */
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));
553
+ public resendOtp(requestId: string, contact?: string, id?: string, internalId?: string, idempotencyKey?: string, aPIVersion?: string, options?: RawAxiosRequestConfig) {
554
+ return RequestsApiFp(this.configuration).resendOtp(requestId, contact, id, internalId, idempotencyKey, aPIVersion, options).then((request) => request(this.axios, this.basePath));
565
555
  }
566
556
  }
567
557
 
568
558
  /**
569
559
  * @export
570
560
  */
571
- export const GetRequestsSecurityLevelEnum = {
561
+ export const ListSecurityLevelEnum = {
572
562
  Contact: 'CONTACT',
573
563
  OrganizationKyc: 'ORGANIZATION_KYC',
574
564
  HumanosKyc: 'HUMANOS_KYC',
575
565
  HumanosRevalidation: 'HUMANOS_REVALIDATION'
576
566
  } as const;
577
- export type GetRequestsSecurityLevelEnum = typeof GetRequestsSecurityLevelEnum[keyof typeof GetRequestsSecurityLevelEnum];
567
+ export type ListSecurityLevelEnum = typeof ListSecurityLevelEnum[keyof typeof ListSecurityLevelEnum];