@trinsic/api 0.4.0 → 0.4.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.
- package/README.md +39 -29
- package/package.json +1 -1
- package/dist/apis/AttachmentsApi.d.ts +0 -53
- package/dist/apis/AttachmentsApi.js +0 -68
- package/dist/apis/NetworkApi.d.ts +0 -76
- package/dist/apis/NetworkApi.js +0 -104
- package/dist/apis/SessionsApi.d.ts +0 -193
- package/dist/apis/SessionsApi.js +0 -262
- package/dist/apis/index.d.ts +0 -3
- package/dist/apis/index.js +0 -21
- package/dist/esm/apis/AttachmentsApi.d.ts +0 -53
- package/dist/esm/apis/AttachmentsApi.js +0 -64
- package/dist/esm/apis/NetworkApi.d.ts +0 -76
- package/dist/esm/apis/NetworkApi.js +0 -100
- package/dist/esm/apis/SessionsApi.d.ts +0 -193
- package/dist/esm/apis/SessionsApi.js +0 -258
- package/dist/esm/apis/index.d.ts +0 -3
- package/dist/esm/apis/index.js +0 -5
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +0 -5
- package/dist/esm/models/Address.d.ts +0 -73
- package/dist/esm/models/Address.js +0 -52
- package/dist/esm/models/Attachments.d.ts +0 -51
- package/dist/esm/models/Attachments.js +0 -44
- package/dist/esm/models/CancelSessionResponse.d.ts +0 -32
- package/dist/esm/models/CancelSessionResponse.js +0 -41
- package/dist/esm/models/CreateSessionRequest.d.ts +0 -52
- package/dist/esm/models/CreateSessionRequest.js +0 -43
- package/dist/esm/models/CreateSessionResponse.d.ts +0 -45
- package/dist/esm/models/CreateSessionResponse.js +0 -43
- package/dist/esm/models/DisclosedFields.d.ts +0 -97
- package/dist/esm/models/DisclosedFields.js +0 -84
- package/dist/esm/models/DisclosedFieldsRequest.d.ts +0 -97
- package/dist/esm/models/DisclosedFieldsRequest.js +0 -60
- package/dist/esm/models/DocumentData.d.ts +0 -61
- package/dist/esm/models/DocumentData.js +0 -48
- package/dist/esm/models/FailureMessage.d.ts +0 -31
- package/dist/esm/models/FailureMessage.js +0 -40
- package/dist/esm/models/GetAttachmentRequest.d.ts +0 -31
- package/dist/esm/models/GetAttachmentRequest.js +0 -40
- package/dist/esm/models/GetSessionResponse.d.ts +0 -32
- package/dist/esm/models/GetSessionResponse.js +0 -41
- package/dist/esm/models/GetSessionResultRequest.d.ts +0 -31
- package/dist/esm/models/GetSessionResultRequest.js +0 -40
- package/dist/esm/models/GetSessionResultResponse.d.ts +0 -39
- package/dist/esm/models/GetSessionResultResponse.js +0 -44
- package/dist/esm/models/IdentityData.d.ts +0 -52
- package/dist/esm/models/IdentityData.js +0 -47
- package/dist/esm/models/IdentityLookupResponse.d.ts +0 -31
- package/dist/esm/models/IdentityLookupResponse.js +0 -40
- package/dist/esm/models/ListProvidersResponse.d.ts +0 -32
- package/dist/esm/models/ListProvidersResponse.js +0 -41
- package/dist/esm/models/ListSessionsResponse.d.ts +0 -44
- package/dist/esm/models/ListSessionsResponse.js +0 -49
- package/dist/esm/models/OrderDirection.d.ts +0 -24
- package/dist/esm/models/OrderDirection.js +0 -40
- package/dist/esm/models/PersonData.d.ts +0 -82
- package/dist/esm/models/PersonData.js +0 -55
- package/dist/esm/models/ProviderInfo.d.ts +0 -43
- package/dist/esm/models/ProviderInfo.js +0 -48
- package/dist/esm/models/Session.d.ts +0 -71
- package/dist/esm/models/Session.js +0 -66
- package/dist/esm/models/SessionFailCode.d.ts +0 -29
- package/dist/esm/models/SessionFailCode.js +0 -45
- package/dist/esm/models/SessionOrdering.d.ts +0 -25
- package/dist/esm/models/SessionOrdering.js +0 -41
- package/dist/esm/models/SessionState.d.ts +0 -28
- package/dist/esm/models/SessionState.js +0 -44
- package/dist/esm/models/ValidationResult.d.ts +0 -37
- package/dist/esm/models/ValidationResult.js +0 -41
- package/dist/esm/models/Verification.d.ts +0 -38
- package/dist/esm/models/Verification.js +0 -41
- package/dist/esm/models/VerificationFailCode.d.ts +0 -27
- package/dist/esm/models/VerificationFailCode.js +0 -43
- package/dist/esm/models/index.d.ts +0 -27
- package/dist/esm/models/index.js +0 -29
- package/dist/esm/runtime.d.ts +0 -181
- package/dist/esm/runtime.js +0 -326
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -21
- package/dist/models/Address.d.ts +0 -73
- package/dist/models/Address.js +0 -58
- package/dist/models/Attachments.d.ts +0 -51
- package/dist/models/Attachments.js +0 -50
- package/dist/models/CancelSessionResponse.d.ts +0 -32
- package/dist/models/CancelSessionResponse.js +0 -47
- package/dist/models/CreateSessionRequest.d.ts +0 -52
- package/dist/models/CreateSessionRequest.js +0 -49
- package/dist/models/CreateSessionResponse.d.ts +0 -45
- package/dist/models/CreateSessionResponse.js +0 -49
- package/dist/models/DisclosedFields.d.ts +0 -97
- package/dist/models/DisclosedFields.js +0 -90
- package/dist/models/DisclosedFieldsRequest.d.ts +0 -97
- package/dist/models/DisclosedFieldsRequest.js +0 -66
- package/dist/models/DocumentData.d.ts +0 -61
- package/dist/models/DocumentData.js +0 -54
- package/dist/models/FailureMessage.d.ts +0 -31
- package/dist/models/FailureMessage.js +0 -46
- package/dist/models/GetAttachmentRequest.d.ts +0 -31
- package/dist/models/GetAttachmentRequest.js +0 -46
- package/dist/models/GetSessionResponse.d.ts +0 -32
- package/dist/models/GetSessionResponse.js +0 -47
- package/dist/models/GetSessionResultRequest.d.ts +0 -31
- package/dist/models/GetSessionResultRequest.js +0 -46
- package/dist/models/GetSessionResultResponse.d.ts +0 -39
- package/dist/models/GetSessionResultResponse.js +0 -50
- package/dist/models/IdentityData.d.ts +0 -52
- package/dist/models/IdentityData.js +0 -53
- package/dist/models/IdentityLookupResponse.d.ts +0 -31
- package/dist/models/IdentityLookupResponse.js +0 -46
- package/dist/models/ListProvidersResponse.d.ts +0 -32
- package/dist/models/ListProvidersResponse.js +0 -47
- package/dist/models/ListSessionsResponse.d.ts +0 -44
- package/dist/models/ListSessionsResponse.js +0 -55
- package/dist/models/OrderDirection.d.ts +0 -24
- package/dist/models/OrderDirection.js +0 -47
- package/dist/models/PersonData.d.ts +0 -82
- package/dist/models/PersonData.js +0 -61
- package/dist/models/ProviderInfo.d.ts +0 -43
- package/dist/models/ProviderInfo.js +0 -54
- package/dist/models/Session.d.ts +0 -71
- package/dist/models/Session.js +0 -72
- package/dist/models/SessionFailCode.d.ts +0 -29
- package/dist/models/SessionFailCode.js +0 -52
- package/dist/models/SessionOrdering.d.ts +0 -25
- package/dist/models/SessionOrdering.js +0 -48
- package/dist/models/SessionState.d.ts +0 -28
- package/dist/models/SessionState.js +0 -51
- package/dist/models/ValidationResult.d.ts +0 -37
- package/dist/models/ValidationResult.js +0 -47
- package/dist/models/Verification.d.ts +0 -38
- package/dist/models/Verification.js +0 -47
- package/dist/models/VerificationFailCode.d.ts +0 -27
- package/dist/models/VerificationFailCode.js +0 -50
- package/dist/models/index.d.ts +0 -27
- package/dist/models/index.js +0 -45
- package/dist/runtime.d.ts +0 -181
- package/dist/runtime.js +0 -341
package/README.md
CHANGED
|
@@ -1,46 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
# Trinsic API TypeScript Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.org/package/@trinsic/api)
|
|
4
|
+
[](https://github.com/trinsic-id/sdk/actions?query=branch%main)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* Webpack
|
|
8
|
-
* Browserify
|
|
6
|
+
The Trinsic API TypeScript library provides convenient access to the Trinsic API from
|
|
7
|
+
applications written in server-side JavaScript/TypeScript.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
-
* ES6
|
|
9
|
+
## Documentation
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
* CommonJS
|
|
16
|
-
* ES6 module system
|
|
11
|
+
See the [Trinsic docs](https://connect.docs.trinsic.id/docs/) for more detailed information on how to start integrating with our identity acceptance network.
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
## Installation
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
Install the package with:
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
npm install
|
|
25
|
-
npm run build
|
|
17
|
+
```sh
|
|
18
|
+
npm install @trinsic/api
|
|
26
19
|
```
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
## Usage
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
The package needs to be configured with your app's access token, which is
|
|
24
|
+
available in the [Trinsic Dashboard](https://dashboard.trinsic.id).
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
<!-- prettier-ignore -->
|
|
27
|
+
```ts
|
|
28
|
+
import { AttachmentsApi, Configuration, NetworkApi, SessionsApi } from "@trinsic/api";
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
const config = new Configuration({ accessToken: "your-access-token" });
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
const attachments = new NetworkApi(config);
|
|
33
|
+
const network = new NetworkApi(config);
|
|
34
|
+
const sessions = new SessionsApi(config);
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
npm install @trinsic/api@0.4.0 --save
|
|
36
|
+
const session = await sessionsApi.createSession();
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
You can find a full TS server example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-typescript/samples) folder.
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
## SDK Versioning
|
|
42
|
+
|
|
43
|
+
Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.
|
|
44
|
+
|
|
45
|
+
## Support
|
|
46
|
+
|
|
47
|
+
New features and bug fixes are released on the latest major version of the `@trinsic/api` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
|
48
|
+
|
|
49
|
+
Any issues, inquiries, and feature requests can be sent to [support@trinsic.id](mailto:support@trinsic.id), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).
|
|
50
|
+
|
|
51
|
+
## More Information
|
|
52
|
+
|
|
53
|
+
- [API Reference](https://connect.docs.trinsic.id/reference)
|
|
54
|
+
- [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
|
|
55
|
+
- [Our Blog](https://trinsic.id/blog/)
|
|
56
|
+
- [Schedule a demo](https://trinsic.id/contact/)
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: v1
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetAttachmentRequest } from '../models/index';
|
|
14
|
-
export interface GetAttachmentOperationRequest {
|
|
15
|
-
getAttachmentRequest?: GetAttachmentRequest;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* AttachmentsApi - interface
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
* @interface AttachmentsApiInterface
|
|
22
|
-
*/
|
|
23
|
-
export interface AttachmentsApiInterface {
|
|
24
|
-
/**
|
|
25
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
26
|
-
* @summary Get Attachment
|
|
27
|
-
* @param {GetAttachmentRequest} [getAttachmentRequest]
|
|
28
|
-
* @param {*} [options] Override http request option.
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
* @memberof AttachmentsApiInterface
|
|
31
|
-
*/
|
|
32
|
-
getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
33
|
-
/**
|
|
34
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
35
|
-
* Get Attachment
|
|
36
|
-
*/
|
|
37
|
-
getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
export declare class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInterface {
|
|
43
|
-
/**
|
|
44
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
45
|
-
* Get Attachment
|
|
46
|
-
*/
|
|
47
|
-
getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
48
|
-
/**
|
|
49
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
50
|
-
* Get Attachment
|
|
51
|
-
*/
|
|
52
|
-
getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
53
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Connect API
|
|
6
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: v1
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.AttachmentsApi = void 0;
|
|
26
|
-
const runtime = require("../runtime");
|
|
27
|
-
const index_1 = require("../models/index");
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class AttachmentsApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
34
|
-
* Get Attachment
|
|
35
|
-
*/
|
|
36
|
-
getAttachmentRaw(requestParameters, initOverrides) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const queryParameters = {};
|
|
39
|
-
const headerParameters = {};
|
|
40
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
41
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
42
|
-
const token = this.configuration.accessToken;
|
|
43
|
-
const tokenString = yield token("Bearer", []);
|
|
44
|
-
if (tokenString) {
|
|
45
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const response = yield this.request({
|
|
49
|
-
path: `/api/v1/attachments/attachment`,
|
|
50
|
-
method: 'POST',
|
|
51
|
-
headers: headerParameters,
|
|
52
|
-
query: queryParameters,
|
|
53
|
-
body: (0, index_1.GetAttachmentRequestToJSON)(requestParameters['getAttachmentRequest']),
|
|
54
|
-
}, initOverrides);
|
|
55
|
-
return new runtime.VoidApiResponse(response);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
60
|
-
* Get Attachment
|
|
61
|
-
*/
|
|
62
|
-
getAttachment(getAttachmentRequest, initOverrides) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
yield this.getAttachmentRaw({ getAttachmentRequest: getAttachmentRequest }, initOverrides);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.AttachmentsApi = AttachmentsApi;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: v1
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { IdentityLookupResponse, ListProvidersResponse } from '../models/index';
|
|
14
|
-
export interface IdentityLookupRequest {
|
|
15
|
-
phoneNumber: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* NetworkApi - interface
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
* @interface NetworkApiInterface
|
|
22
|
-
*/
|
|
23
|
-
export interface NetworkApiInterface {
|
|
24
|
-
/**
|
|
25
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
26
|
-
* @summary Lookup Identity
|
|
27
|
-
* @param {string} phoneNumber
|
|
28
|
-
* @param {*} [options] Override http request option.
|
|
29
|
-
* @throws {RequiredError}
|
|
30
|
-
* @memberof NetworkApiInterface
|
|
31
|
-
*/
|
|
32
|
-
identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
|
|
33
|
-
/**
|
|
34
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
35
|
-
* Lookup Identity
|
|
36
|
-
*/
|
|
37
|
-
identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* List all identity providers available for use
|
|
40
|
-
* @summary List Identity Providers
|
|
41
|
-
* @param {*} [options] Override http request option.
|
|
42
|
-
* @throws {RequiredError}
|
|
43
|
-
* @memberof NetworkApiInterface
|
|
44
|
-
*/
|
|
45
|
-
listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
|
|
46
|
-
/**
|
|
47
|
-
* List all identity providers available for use
|
|
48
|
-
* List Identity Providers
|
|
49
|
-
*/
|
|
50
|
-
listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
export declare class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
|
|
56
|
-
/**
|
|
57
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
58
|
-
* Lookup Identity
|
|
59
|
-
*/
|
|
60
|
-
identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
|
|
61
|
-
/**
|
|
62
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
63
|
-
* Lookup Identity
|
|
64
|
-
*/
|
|
65
|
-
identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* List all identity providers available for use
|
|
68
|
-
* List Identity Providers
|
|
69
|
-
*/
|
|
70
|
-
listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
|
|
71
|
-
/**
|
|
72
|
-
* List all identity providers available for use
|
|
73
|
-
* List Identity Providers
|
|
74
|
-
*/
|
|
75
|
-
listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
|
|
76
|
-
}
|
package/dist/apis/NetworkApi.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Connect API
|
|
6
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: v1
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.NetworkApi = void 0;
|
|
26
|
-
const runtime = require("../runtime");
|
|
27
|
-
const index_1 = require("../models/index");
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class NetworkApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
34
|
-
* Lookup Identity
|
|
35
|
-
*/
|
|
36
|
-
identityLookupRaw(requestParameters, initOverrides) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (requestParameters['phoneNumber'] == null) {
|
|
39
|
-
throw new runtime.RequiredError('phoneNumber', 'Required parameter "phoneNumber" was null or undefined when calling identityLookup().');
|
|
40
|
-
}
|
|
41
|
-
const queryParameters = {};
|
|
42
|
-
const headerParameters = {};
|
|
43
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
-
const token = this.configuration.accessToken;
|
|
45
|
-
const tokenString = yield token("Bearer", []);
|
|
46
|
-
if (tokenString) {
|
|
47
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const response = yield this.request({
|
|
51
|
-
path: `/api/v1/network/identities/{phoneNumber}`.replace(`{${"phoneNumber"}}`, encodeURIComponent(String(requestParameters['phoneNumber']))),
|
|
52
|
-
method: 'GET',
|
|
53
|
-
headers: headerParameters,
|
|
54
|
-
query: queryParameters,
|
|
55
|
-
}, initOverrides);
|
|
56
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.IdentityLookupResponseFromJSON)(jsonValue));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Query the availability of an identity in the Trinsic Network by phone number
|
|
61
|
-
* Lookup Identity
|
|
62
|
-
*/
|
|
63
|
-
identityLookup(phoneNumber, initOverrides) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const response = yield this.identityLookupRaw({ phoneNumber: phoneNumber }, initOverrides);
|
|
66
|
-
return yield response.value();
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* List all identity providers available for use
|
|
71
|
-
* List Identity Providers
|
|
72
|
-
*/
|
|
73
|
-
listProvidersRaw(initOverrides) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const queryParameters = {};
|
|
76
|
-
const headerParameters = {};
|
|
77
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
78
|
-
const token = this.configuration.accessToken;
|
|
79
|
-
const tokenString = yield token("Bearer", []);
|
|
80
|
-
if (tokenString) {
|
|
81
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const response = yield this.request({
|
|
85
|
-
path: `/api/v1/network/providers`,
|
|
86
|
-
method: 'GET',
|
|
87
|
-
headers: headerParameters,
|
|
88
|
-
query: queryParameters,
|
|
89
|
-
}, initOverrides);
|
|
90
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListProvidersResponseFromJSON)(jsonValue));
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* List all identity providers available for use
|
|
95
|
-
* List Identity Providers
|
|
96
|
-
*/
|
|
97
|
-
listProviders(initOverrides) {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const response = yield this.listProvidersRaw(initOverrides);
|
|
100
|
-
return yield response.value();
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.NetworkApi = NetworkApi;
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Connect API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: v1
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { CancelSessionResponse, CreateSessionRequest, CreateSessionResponse, GetSessionResponse, GetSessionResultRequest, GetSessionResultResponse, ListSessionsResponse, OrderDirection, SessionOrdering } from '../models/index';
|
|
14
|
-
export interface CancelSessionRequest {
|
|
15
|
-
sessionId: string;
|
|
16
|
-
}
|
|
17
|
-
export interface CreateSessionOperationRequest {
|
|
18
|
-
createSessionRequest?: CreateSessionRequest;
|
|
19
|
-
}
|
|
20
|
-
export interface GetSessionRequest {
|
|
21
|
-
sessionId: string;
|
|
22
|
-
}
|
|
23
|
-
export interface GetSessionResultOperationRequest {
|
|
24
|
-
sessionId: string;
|
|
25
|
-
getSessionResultRequest?: GetSessionResultRequest;
|
|
26
|
-
}
|
|
27
|
-
export interface ListSessionsRequest {
|
|
28
|
-
orderBy?: SessionOrdering;
|
|
29
|
-
orderDirection?: OrderDirection;
|
|
30
|
-
pageSize?: number;
|
|
31
|
-
page?: number;
|
|
32
|
-
}
|
|
33
|
-
export interface RedactSessionRequest {
|
|
34
|
-
sessionId: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* SessionsApi - interface
|
|
38
|
-
*
|
|
39
|
-
* @export
|
|
40
|
-
* @interface SessionsApiInterface
|
|
41
|
-
*/
|
|
42
|
-
export interface SessionsApiInterface {
|
|
43
|
-
/**
|
|
44
|
-
* Cancel a Session by its ID
|
|
45
|
-
* @summary Cancel Session
|
|
46
|
-
* @param {string} sessionId
|
|
47
|
-
* @param {*} [options] Override http request option.
|
|
48
|
-
* @throws {RequiredError}
|
|
49
|
-
* @memberof SessionsApiInterface
|
|
50
|
-
*/
|
|
51
|
-
cancelSessionRaw(requestParameters: CancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelSessionResponse>>;
|
|
52
|
-
/**
|
|
53
|
-
* Cancel a Session by its ID
|
|
54
|
-
* Cancel Session
|
|
55
|
-
*/
|
|
56
|
-
cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Create a Session to verify a user\'s identity
|
|
59
|
-
* @summary Create Session
|
|
60
|
-
* @param {CreateSessionRequest} [createSessionRequest]
|
|
61
|
-
* @param {*} [options] Override http request option.
|
|
62
|
-
* @throws {RequiredError}
|
|
63
|
-
* @memberof SessionsApiInterface
|
|
64
|
-
*/
|
|
65
|
-
createSessionRaw(requestParameters: CreateSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateSessionResponse>>;
|
|
66
|
-
/**
|
|
67
|
-
* Create a Session to verify a user\'s identity
|
|
68
|
-
* Create Session
|
|
69
|
-
*/
|
|
70
|
-
createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse>;
|
|
71
|
-
/**
|
|
72
|
-
* Get a Session by its ID
|
|
73
|
-
* @summary Get Session
|
|
74
|
-
* @param {string} sessionId
|
|
75
|
-
* @param {*} [options] Override http request option.
|
|
76
|
-
* @throws {RequiredError}
|
|
77
|
-
* @memberof SessionsApiInterface
|
|
78
|
-
*/
|
|
79
|
-
getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
|
|
80
|
-
/**
|
|
81
|
-
* Get a Session by its ID
|
|
82
|
-
* Get Session
|
|
83
|
-
*/
|
|
84
|
-
getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @summary Get Session Results
|
|
88
|
-
* @param {string} sessionId
|
|
89
|
-
* @param {GetSessionResultRequest} [getSessionResultRequest]
|
|
90
|
-
* @param {*} [options] Override http request option.
|
|
91
|
-
* @throws {RequiredError}
|
|
92
|
-
* @memberof SessionsApiInterface
|
|
93
|
-
*/
|
|
94
|
-
getSessionResultRaw(requestParameters: GetSessionResultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResultResponse>>;
|
|
95
|
-
/**
|
|
96
|
-
* Get Session Results
|
|
97
|
-
*/
|
|
98
|
-
getSessionResult(sessionId: string, getSessionResultRequest?: GetSessionResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResultResponse>;
|
|
99
|
-
/**
|
|
100
|
-
* List Sessions created by your account
|
|
101
|
-
* @summary List Sessions
|
|
102
|
-
* @param {SessionOrdering} [orderBy] The field by which sessions should be ordered
|
|
103
|
-
* @param {OrderDirection} [orderDirection]
|
|
104
|
-
* @param {number} [pageSize] The number of items to return per page -- must be between `1` and `50`
|
|
105
|
-
* @param {number} [page] The page number to return -- starts at `1`
|
|
106
|
-
* @param {*} [options] Override http request option.
|
|
107
|
-
* @throws {RequiredError}
|
|
108
|
-
* @memberof SessionsApiInterface
|
|
109
|
-
*/
|
|
110
|
-
listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListSessionsResponse>>;
|
|
111
|
-
/**
|
|
112
|
-
* List Sessions created by your account
|
|
113
|
-
* List Sessions
|
|
114
|
-
*/
|
|
115
|
-
listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse>;
|
|
116
|
-
/**
|
|
117
|
-
* Redact a Session, removing all identity data from Trinsic\'s servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
118
|
-
* @summary Redact Session
|
|
119
|
-
* @param {string} sessionId
|
|
120
|
-
* @param {*} [options] Override http request option.
|
|
121
|
-
* @throws {RequiredError}
|
|
122
|
-
* @memberof SessionsApiInterface
|
|
123
|
-
*/
|
|
124
|
-
redactSessionRaw(requestParameters: RedactSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
125
|
-
/**
|
|
126
|
-
* Redact a Session, removing all identity data from Trinsic\'s servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
127
|
-
* Redact Session
|
|
128
|
-
*/
|
|
129
|
-
redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
export declare class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface {
|
|
135
|
-
/**
|
|
136
|
-
* Cancel a Session by its ID
|
|
137
|
-
* Cancel Session
|
|
138
|
-
*/
|
|
139
|
-
cancelSessionRaw(requestParameters: CancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelSessionResponse>>;
|
|
140
|
-
/**
|
|
141
|
-
* Cancel a Session by its ID
|
|
142
|
-
* Cancel Session
|
|
143
|
-
*/
|
|
144
|
-
cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse>;
|
|
145
|
-
/**
|
|
146
|
-
* Create a Session to verify a user\'s identity
|
|
147
|
-
* Create Session
|
|
148
|
-
*/
|
|
149
|
-
createSessionRaw(requestParameters: CreateSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateSessionResponse>>;
|
|
150
|
-
/**
|
|
151
|
-
* Create a Session to verify a user\'s identity
|
|
152
|
-
* Create Session
|
|
153
|
-
*/
|
|
154
|
-
createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse>;
|
|
155
|
-
/**
|
|
156
|
-
* Get a Session by its ID
|
|
157
|
-
* Get Session
|
|
158
|
-
*/
|
|
159
|
-
getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
|
|
160
|
-
/**
|
|
161
|
-
* Get a Session by its ID
|
|
162
|
-
* Get Session
|
|
163
|
-
*/
|
|
164
|
-
getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
|
|
165
|
-
/**
|
|
166
|
-
* Get Session Results
|
|
167
|
-
*/
|
|
168
|
-
getSessionResultRaw(requestParameters: GetSessionResultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResultResponse>>;
|
|
169
|
-
/**
|
|
170
|
-
* Get Session Results
|
|
171
|
-
*/
|
|
172
|
-
getSessionResult(sessionId: string, getSessionResultRequest?: GetSessionResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResultResponse>;
|
|
173
|
-
/**
|
|
174
|
-
* List Sessions created by your account
|
|
175
|
-
* List Sessions
|
|
176
|
-
*/
|
|
177
|
-
listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListSessionsResponse>>;
|
|
178
|
-
/**
|
|
179
|
-
* List Sessions created by your account
|
|
180
|
-
* List Sessions
|
|
181
|
-
*/
|
|
182
|
-
listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse>;
|
|
183
|
-
/**
|
|
184
|
-
* Redact a Session, removing all identity data from Trinsic\'s servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
185
|
-
* Redact Session
|
|
186
|
-
*/
|
|
187
|
-
redactSessionRaw(requestParameters: RedactSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
188
|
-
/**
|
|
189
|
-
* Redact a Session, removing all identity data from Trinsic\'s servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
190
|
-
* Redact Session
|
|
191
|
-
*/
|
|
192
|
-
redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
193
|
-
}
|