@dynamic-labs/sdk-api 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/apis/KybApi.cjs +28 -0
- package/src/apis/KybApi.d.ts +13 -0
- package/src/apis/KybApi.js +29 -1
package/package.json
CHANGED
package/src/apis/KybApi.cjs
CHANGED
|
@@ -516,6 +516,34 @@ class KybApi extends runtime.BaseAPI {
|
|
|
516
516
|
const response = await this.uploadKybDocumentRaw(requestParameters, initOverrides);
|
|
517
517
|
return await response.value();
|
|
518
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
521
|
+
* Redirect a business officer to their identity verification session
|
|
522
|
+
*/
|
|
523
|
+
async verifyKybOfficerConsentRaw(requestParameters, initOverrides) {
|
|
524
|
+
if (requestParameters.token === null || requestParameters.token === undefined) {
|
|
525
|
+
throw new runtime.RequiredError('token', 'Required parameter requestParameters.token was null or undefined when calling verifyKybOfficerConsent.');
|
|
526
|
+
}
|
|
527
|
+
const queryParameters = {};
|
|
528
|
+
if (requestParameters.token !== undefined) {
|
|
529
|
+
queryParameters['token'] = requestParameters.token;
|
|
530
|
+
}
|
|
531
|
+
const headerParameters = {};
|
|
532
|
+
const response = await this.request({
|
|
533
|
+
path: `/kyb/officers/verify`,
|
|
534
|
+
method: 'GET',
|
|
535
|
+
headers: headerParameters,
|
|
536
|
+
query: queryParameters,
|
|
537
|
+
}, initOverrides);
|
|
538
|
+
return new runtime.VoidApiResponse(response);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
542
|
+
* Redirect a business officer to their identity verification session
|
|
543
|
+
*/
|
|
544
|
+
async verifyKybOfficerConsent(requestParameters, initOverrides) {
|
|
545
|
+
await this.verifyKybOfficerConsentRaw(requestParameters, initOverrides);
|
|
546
|
+
}
|
|
519
547
|
}
|
|
520
548
|
|
|
521
549
|
exports.KybApi = KybApi;
|
package/src/apis/KybApi.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ export interface UploadKybDocumentRequest {
|
|
|
47
47
|
file: Blob;
|
|
48
48
|
fileType?: string;
|
|
49
49
|
}
|
|
50
|
+
export interface VerifyKybOfficerConsentRequest {
|
|
51
|
+
token: string;
|
|
52
|
+
}
|
|
50
53
|
/**
|
|
51
54
|
*
|
|
52
55
|
*/
|
|
@@ -125,4 +128,14 @@ export declare class KybApi extends runtime.BaseAPI {
|
|
|
125
128
|
* Upload a single KYB business document
|
|
126
129
|
*/
|
|
127
130
|
uploadKybDocument(requestParameters: UploadKybDocumentRequest, initOverrides?: RequestInit): Promise<KybDocumentUploadResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
133
|
+
* Redirect a business officer to their identity verification session
|
|
134
|
+
*/
|
|
135
|
+
verifyKybOfficerConsentRaw(requestParameters: VerifyKybOfficerConsentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
|
|
136
|
+
/**
|
|
137
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
138
|
+
* Redirect a business officer to their identity verification session
|
|
139
|
+
*/
|
|
140
|
+
verifyKybOfficerConsent(requestParameters: VerifyKybOfficerConsentRequest, initOverrides?: RequestInit): Promise<void>;
|
|
128
141
|
}
|
package/src/apis/KybApi.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseAPI, RequiredError, JSONApiResponse, canConsumeForm } from '../runtime.js';
|
|
1
|
+
import { BaseAPI, RequiredError, JSONApiResponse, canConsumeForm, VoidApiResponse } from '../runtime.js';
|
|
2
2
|
import '../models/AccessOutcomeEnum.js';
|
|
3
3
|
import '../models/ExchangeKeyEnum.js';
|
|
4
4
|
import '../models/AssignableBusinessAccountMemberRole.js';
|
|
@@ -512,6 +512,34 @@ class KybApi extends BaseAPI {
|
|
|
512
512
|
const response = await this.uploadKybDocumentRaw(requestParameters, initOverrides);
|
|
513
513
|
return await response.value();
|
|
514
514
|
}
|
|
515
|
+
/**
|
|
516
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
517
|
+
* Redirect a business officer to their identity verification session
|
|
518
|
+
*/
|
|
519
|
+
async verifyKybOfficerConsentRaw(requestParameters, initOverrides) {
|
|
520
|
+
if (requestParameters.token === null || requestParameters.token === undefined) {
|
|
521
|
+
throw new RequiredError('token', 'Required parameter requestParameters.token was null or undefined when calling verifyKybOfficerConsent.');
|
|
522
|
+
}
|
|
523
|
+
const queryParameters = {};
|
|
524
|
+
if (requestParameters.token !== undefined) {
|
|
525
|
+
queryParameters['token'] = requestParameters.token;
|
|
526
|
+
}
|
|
527
|
+
const headerParameters = {};
|
|
528
|
+
const response = await this.request({
|
|
529
|
+
path: `/kyb/officers/verify`,
|
|
530
|
+
method: 'GET',
|
|
531
|
+
headers: headerParameters,
|
|
532
|
+
query: queryParameters,
|
|
533
|
+
}, initOverrides);
|
|
534
|
+
return new VoidApiResponse(response);
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Consumes the one-time token from an officer\'s invitation email and redirects to the vendor-hosted verification session. Deliberately unauthenticated: the officer is not a Dynamic user, so the signed token in the link is the credential. It is single-use, expires with the vendor session, and its redirect target is restricted to the vendor\'s own hosts.
|
|
538
|
+
* Redirect a business officer to their identity verification session
|
|
539
|
+
*/
|
|
540
|
+
async verifyKybOfficerConsent(requestParameters, initOverrides) {
|
|
541
|
+
await this.verifyKybOfficerConsentRaw(requestParameters, initOverrides);
|
|
542
|
+
}
|
|
515
543
|
}
|
|
516
544
|
|
|
517
545
|
export { KybApi };
|