@trinsic/api 0.3.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.
Files changed (154) hide show
  1. package/.openapi-generator/FILES +3 -3
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +39 -29
  4. package/package.json +1 -1
  5. package/src/apis/AttachmentsApi.ts +18 -15
  6. package/src/apis/NetworkApi.ts +10 -4
  7. package/src/apis/SessionsApi.ts +63 -48
  8. package/src/models/{ExchangeAttachmentAccessKeyRequest.ts → GetAttachmentRequest.ts} +9 -9
  9. package/src/models/{ExchangeResultsKeyRequest.ts → GetSessionResultRequest.ts} +9 -9
  10. package/src/models/{ExchangeResultsKeyResponse.ts → GetSessionResultResponse.ts} +10 -10
  11. package/src/models/OrderDirection.ts +1 -1
  12. package/src/models/Session.ts +2 -0
  13. package/src/models/SessionFailCode.ts +1 -1
  14. package/src/models/SessionOrdering.ts +1 -1
  15. package/src/models/SessionState.ts +1 -1
  16. package/src/models/Verification.ts +2 -0
  17. package/src/models/VerificationFailCode.ts +1 -1
  18. package/src/models/index.ts +3 -3
  19. package/dist/apis/AttachmentsApi.d.ts +0 -50
  20. package/dist/apis/AttachmentsApi.js +0 -66
  21. package/dist/apis/NetworkApi.d.ts +0 -70
  22. package/dist/apis/NetworkApi.js +0 -100
  23. package/dist/apis/SessionsApi.d.ts +0 -178
  24. package/dist/apis/SessionsApi.js +0 -252
  25. package/dist/apis/index.d.ts +0 -3
  26. package/dist/apis/index.js +0 -21
  27. package/dist/esm/apis/AttachmentsApi.d.ts +0 -50
  28. package/dist/esm/apis/AttachmentsApi.js +0 -62
  29. package/dist/esm/apis/NetworkApi.d.ts +0 -70
  30. package/dist/esm/apis/NetworkApi.js +0 -96
  31. package/dist/esm/apis/SessionsApi.d.ts +0 -178
  32. package/dist/esm/apis/SessionsApi.js +0 -248
  33. package/dist/esm/apis/index.d.ts +0 -3
  34. package/dist/esm/apis/index.js +0 -5
  35. package/dist/esm/index.d.ts +0 -3
  36. package/dist/esm/index.js +0 -5
  37. package/dist/esm/models/Address.d.ts +0 -73
  38. package/dist/esm/models/Address.js +0 -52
  39. package/dist/esm/models/Attachments.d.ts +0 -51
  40. package/dist/esm/models/Attachments.js +0 -44
  41. package/dist/esm/models/CancelSessionResponse.d.ts +0 -32
  42. package/dist/esm/models/CancelSessionResponse.js +0 -41
  43. package/dist/esm/models/CreateSessionRequest.d.ts +0 -52
  44. package/dist/esm/models/CreateSessionRequest.js +0 -43
  45. package/dist/esm/models/CreateSessionResponse.d.ts +0 -45
  46. package/dist/esm/models/CreateSessionResponse.js +0 -43
  47. package/dist/esm/models/DisclosedFields.d.ts +0 -97
  48. package/dist/esm/models/DisclosedFields.js +0 -84
  49. package/dist/esm/models/DisclosedFieldsRequest.d.ts +0 -97
  50. package/dist/esm/models/DisclosedFieldsRequest.js +0 -60
  51. package/dist/esm/models/DocumentData.d.ts +0 -61
  52. package/dist/esm/models/DocumentData.js +0 -48
  53. package/dist/esm/models/ExchangeAttachmentAccessKeyRequest.d.ts +0 -31
  54. package/dist/esm/models/ExchangeAttachmentAccessKeyRequest.js +0 -40
  55. package/dist/esm/models/ExchangeResultsKeyRequest.d.ts +0 -31
  56. package/dist/esm/models/ExchangeResultsKeyRequest.js +0 -40
  57. package/dist/esm/models/ExchangeResultsKeyResponse.d.ts +0 -39
  58. package/dist/esm/models/ExchangeResultsKeyResponse.js +0 -44
  59. package/dist/esm/models/FailureMessage.d.ts +0 -31
  60. package/dist/esm/models/FailureMessage.js +0 -40
  61. package/dist/esm/models/GetSessionResponse.d.ts +0 -32
  62. package/dist/esm/models/GetSessionResponse.js +0 -41
  63. package/dist/esm/models/IdentityData.d.ts +0 -52
  64. package/dist/esm/models/IdentityData.js +0 -47
  65. package/dist/esm/models/IdentityLookupResponse.d.ts +0 -31
  66. package/dist/esm/models/IdentityLookupResponse.js +0 -40
  67. package/dist/esm/models/ListProvidersResponse.d.ts +0 -32
  68. package/dist/esm/models/ListProvidersResponse.js +0 -41
  69. package/dist/esm/models/ListSessionsResponse.d.ts +0 -44
  70. package/dist/esm/models/ListSessionsResponse.js +0 -49
  71. package/dist/esm/models/OrderDirection.d.ts +0 -24
  72. package/dist/esm/models/OrderDirection.js +0 -40
  73. package/dist/esm/models/PersonData.d.ts +0 -82
  74. package/dist/esm/models/PersonData.js +0 -55
  75. package/dist/esm/models/ProviderInfo.d.ts +0 -43
  76. package/dist/esm/models/ProviderInfo.js +0 -48
  77. package/dist/esm/models/Session.d.ts +0 -71
  78. package/dist/esm/models/Session.js +0 -66
  79. package/dist/esm/models/SessionFailCode.d.ts +0 -29
  80. package/dist/esm/models/SessionFailCode.js +0 -45
  81. package/dist/esm/models/SessionOrdering.d.ts +0 -25
  82. package/dist/esm/models/SessionOrdering.js +0 -41
  83. package/dist/esm/models/SessionState.d.ts +0 -28
  84. package/dist/esm/models/SessionState.js +0 -44
  85. package/dist/esm/models/ValidationResult.d.ts +0 -37
  86. package/dist/esm/models/ValidationResult.js +0 -41
  87. package/dist/esm/models/Verification.d.ts +0 -38
  88. package/dist/esm/models/Verification.js +0 -41
  89. package/dist/esm/models/VerificationFailCode.d.ts +0 -27
  90. package/dist/esm/models/VerificationFailCode.js +0 -43
  91. package/dist/esm/models/index.d.ts +0 -27
  92. package/dist/esm/models/index.js +0 -29
  93. package/dist/esm/runtime.d.ts +0 -181
  94. package/dist/esm/runtime.js +0 -326
  95. package/dist/index.d.ts +0 -3
  96. package/dist/index.js +0 -21
  97. package/dist/models/Address.d.ts +0 -73
  98. package/dist/models/Address.js +0 -58
  99. package/dist/models/Attachments.d.ts +0 -51
  100. package/dist/models/Attachments.js +0 -50
  101. package/dist/models/CancelSessionResponse.d.ts +0 -32
  102. package/dist/models/CancelSessionResponse.js +0 -47
  103. package/dist/models/CreateSessionRequest.d.ts +0 -52
  104. package/dist/models/CreateSessionRequest.js +0 -49
  105. package/dist/models/CreateSessionResponse.d.ts +0 -45
  106. package/dist/models/CreateSessionResponse.js +0 -49
  107. package/dist/models/DisclosedFields.d.ts +0 -97
  108. package/dist/models/DisclosedFields.js +0 -90
  109. package/dist/models/DisclosedFieldsRequest.d.ts +0 -97
  110. package/dist/models/DisclosedFieldsRequest.js +0 -66
  111. package/dist/models/DocumentData.d.ts +0 -61
  112. package/dist/models/DocumentData.js +0 -54
  113. package/dist/models/ExchangeAttachmentAccessKeyRequest.d.ts +0 -31
  114. package/dist/models/ExchangeAttachmentAccessKeyRequest.js +0 -46
  115. package/dist/models/ExchangeResultsKeyRequest.d.ts +0 -31
  116. package/dist/models/ExchangeResultsKeyRequest.js +0 -46
  117. package/dist/models/ExchangeResultsKeyResponse.d.ts +0 -39
  118. package/dist/models/ExchangeResultsKeyResponse.js +0 -50
  119. package/dist/models/FailureMessage.d.ts +0 -31
  120. package/dist/models/FailureMessage.js +0 -46
  121. package/dist/models/GetSessionResponse.d.ts +0 -32
  122. package/dist/models/GetSessionResponse.js +0 -47
  123. package/dist/models/IdentityData.d.ts +0 -52
  124. package/dist/models/IdentityData.js +0 -53
  125. package/dist/models/IdentityLookupResponse.d.ts +0 -31
  126. package/dist/models/IdentityLookupResponse.js +0 -46
  127. package/dist/models/ListProvidersResponse.d.ts +0 -32
  128. package/dist/models/ListProvidersResponse.js +0 -47
  129. package/dist/models/ListSessionsResponse.d.ts +0 -44
  130. package/dist/models/ListSessionsResponse.js +0 -55
  131. package/dist/models/OrderDirection.d.ts +0 -24
  132. package/dist/models/OrderDirection.js +0 -47
  133. package/dist/models/PersonData.d.ts +0 -82
  134. package/dist/models/PersonData.js +0 -61
  135. package/dist/models/ProviderInfo.d.ts +0 -43
  136. package/dist/models/ProviderInfo.js +0 -54
  137. package/dist/models/Session.d.ts +0 -71
  138. package/dist/models/Session.js +0 -72
  139. package/dist/models/SessionFailCode.d.ts +0 -29
  140. package/dist/models/SessionFailCode.js +0 -52
  141. package/dist/models/SessionOrdering.d.ts +0 -25
  142. package/dist/models/SessionOrdering.js +0 -48
  143. package/dist/models/SessionState.d.ts +0 -28
  144. package/dist/models/SessionState.js +0 -51
  145. package/dist/models/ValidationResult.d.ts +0 -37
  146. package/dist/models/ValidationResult.js +0 -47
  147. package/dist/models/Verification.d.ts +0 -38
  148. package/dist/models/Verification.js +0 -47
  149. package/dist/models/VerificationFailCode.d.ts +0 -27
  150. package/dist/models/VerificationFailCode.js +0 -50
  151. package/dist/models/index.d.ts +0 -27
  152. package/dist/models/index.js +0 -45
  153. package/dist/runtime.d.ts +0 -181
  154. package/dist/runtime.js +0 -341
@@ -16,11 +16,11 @@ src/models/CreateSessionResponse.ts
16
16
  src/models/DisclosedFields.ts
17
17
  src/models/DisclosedFieldsRequest.ts
18
18
  src/models/DocumentData.ts
19
- src/models/ExchangeAttachmentAccessKeyRequest.ts
20
- src/models/ExchangeResultsKeyRequest.ts
21
- src/models/ExchangeResultsKeyResponse.ts
22
19
  src/models/FailureMessage.ts
20
+ src/models/GetAttachmentRequest.ts
23
21
  src/models/GetSessionResponse.ts
22
+ src/models/GetSessionResultRequest.ts
23
+ src/models/GetSessionResultResponse.ts
24
24
  src/models/IdentityData.ts
25
25
  src/models/IdentityLookupResponse.ts
26
26
  src/models/ListProvidersResponse.ts
@@ -1 +1 @@
1
- 7.7.0
1
+ 7.8.0
package/README.md CHANGED
@@ -1,46 +1,56 @@
1
- ## @trinsic/api@0.3.0
1
+ # Trinsic API TypeScript Library
2
2
 
3
- This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
3
+ [![Version](https://img.shields.io/npm/v/@trinsic/api.svg)](https://www.npmjs.org/package/@trinsic/api)
4
+ [![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-typescript-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)
4
5
 
5
- Environment
6
- * Node.js
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
- Language level
11
- * ES5 - you must have a Promises/A+ library installed
12
- * ES6
9
+ ## Documentation
13
10
 
14
- Module system
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
- It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
13
+ ## Installation
19
14
 
20
- ### Building
15
+ Install the package with:
21
16
 
22
- To build and compile the typescript sources to javascript use:
23
- ```
24
- npm install
25
- npm run build
17
+ ```sh
18
+ npm install @trinsic/api
26
19
  ```
27
20
 
28
- ### Publishing
21
+ ## Usage
29
22
 
30
- First build the package then run `npm publish`
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
- ### Consuming
26
+ <!-- prettier-ignore -->
27
+ ```ts
28
+ import { AttachmentsApi, Configuration, NetworkApi, SessionsApi } from "@trinsic/api";
33
29
 
34
- navigate to the folder of your consuming project and run one of the following commands.
30
+ const config = new Configuration({ accessToken: "your-access-token" });
35
31
 
36
- _published:_
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.3.0 --save
36
+ const session = await sessionsApi.createSession();
40
37
  ```
41
38
 
42
- _unPublished (not recommended):_
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
- npm install PATH_TO_GENERATED_PACKAGE --save
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@trinsic/api",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "OpenAPI client for @trinsic/api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- ExchangeAttachmentAccessKeyRequest,
19
18
  FailureMessage,
19
+ GetAttachmentRequest,
20
20
  ValidationResult,
21
21
  } from '../models/index';
22
22
  import {
23
- ExchangeAttachmentAccessKeyRequestFromJSON,
24
- ExchangeAttachmentAccessKeyRequestToJSON,
25
23
  FailureMessageFromJSON,
26
24
  FailureMessageToJSON,
25
+ GetAttachmentRequestFromJSON,
26
+ GetAttachmentRequestToJSON,
27
27
  ValidationResultFromJSON,
28
28
  ValidationResultToJSON,
29
29
  } from '../models/index';
30
30
 
31
- export interface ExchangeAttachmentAccessKeyOperationRequest {
32
- exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest;
31
+ export interface GetAttachmentOperationRequest {
32
+ getAttachmentRequest?: GetAttachmentRequest;
33
33
  }
34
34
 
35
35
  /**
@@ -40,19 +40,20 @@ export interface ExchangeAttachmentAccessKeyOperationRequest {
40
40
  */
41
41
  export interface AttachmentsApiInterface {
42
42
  /**
43
- *
44
- * @summary 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
- * @param {ExchangeAttachmentAccessKeyRequest} [exchangeAttachmentAccessKeyRequest]
43
+ * 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.
44
+ * @summary Get Attachment
45
+ * @param {GetAttachmentRequest} [getAttachmentRequest]
46
46
  * @param {*} [options] Override http request option.
47
47
  * @throws {RequiredError}
48
48
  * @memberof AttachmentsApiInterface
49
49
  */
50
- exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
50
+ getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
51
51
 
52
52
  /**
53
53
  * 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.
54
+ * Get Attachment
54
55
  */
55
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
56
+ getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
56
57
 
57
58
  }
58
59
 
@@ -63,8 +64,9 @@ export class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInt
63
64
 
64
65
  /**
65
66
  * 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.
67
+ * Get Attachment
66
68
  */
67
- async exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
69
+ async getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
68
70
  const queryParameters: any = {};
69
71
 
70
72
  const headerParameters: runtime.HTTPHeaders = {};
@@ -80,11 +82,11 @@ export class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInt
80
82
  }
81
83
  }
82
84
  const response = await this.request({
83
- path: `/api/v1/attachments/exchange`,
85
+ path: `/api/v1/attachments/attachment`,
84
86
  method: 'POST',
85
87
  headers: headerParameters,
86
88
  query: queryParameters,
87
- body: ExchangeAttachmentAccessKeyRequestToJSON(requestParameters['exchangeAttachmentAccessKeyRequest']),
89
+ body: GetAttachmentRequestToJSON(requestParameters['getAttachmentRequest']),
88
90
  }, initOverrides);
89
91
 
90
92
  return new runtime.VoidApiResponse(response);
@@ -92,9 +94,10 @@ export class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInt
92
94
 
93
95
  /**
94
96
  * 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.
97
+ * Get Attachment
95
98
  */
96
- async exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
97
- await this.exchangeAttachmentAccessKeyRaw({ exchangeAttachmentAccessKeyRequest: exchangeAttachmentAccessKeyRequest }, initOverrides);
99
+ async getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
100
+ await this.getAttachmentRaw({ getAttachmentRequest: getAttachmentRequest }, initOverrides);
98
101
  }
99
102
 
100
103
  }
@@ -43,8 +43,8 @@ export interface IdentityLookupRequest {
43
43
  */
44
44
  export interface NetworkApiInterface {
45
45
  /**
46
- *
47
- * @summary Query the availability of an identity in the Trinsic Network by phone number
46
+ * Query the availability of an identity in the Trinsic Network by phone number
47
+ * @summary Lookup Identity
48
48
  * @param {string} phoneNumber
49
49
  * @param {*} [options] Override http request option.
50
50
  * @throws {RequiredError}
@@ -54,12 +54,13 @@ export interface NetworkApiInterface {
54
54
 
55
55
  /**
56
56
  * Query the availability of an identity in the Trinsic Network by phone number
57
+ * Lookup Identity
57
58
  */
58
59
  identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
59
60
 
60
61
  /**
61
- *
62
- * @summary List all identity providers available for use
62
+ * List all identity providers available for use
63
+ * @summary List Identity Providers
63
64
  * @param {*} [options] Override http request option.
64
65
  * @throws {RequiredError}
65
66
  * @memberof NetworkApiInterface
@@ -68,6 +69,7 @@ export interface NetworkApiInterface {
68
69
 
69
70
  /**
70
71
  * List all identity providers available for use
72
+ * List Identity Providers
71
73
  */
72
74
  listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
73
75
 
@@ -80,6 +82,7 @@ export class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
80
82
 
81
83
  /**
82
84
  * Query the availability of an identity in the Trinsic Network by phone number
85
+ * Lookup Identity
83
86
  */
84
87
  async identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>> {
85
88
  if (requestParameters['phoneNumber'] == null) {
@@ -113,6 +116,7 @@ export class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
113
116
 
114
117
  /**
115
118
  * Query the availability of an identity in the Trinsic Network by phone number
119
+ * Lookup Identity
116
120
  */
117
121
  async identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse> {
118
122
  const response = await this.identityLookupRaw({ phoneNumber: phoneNumber }, initOverrides);
@@ -121,6 +125,7 @@ export class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
121
125
 
122
126
  /**
123
127
  * List all identity providers available for use
128
+ * List Identity Providers
124
129
  */
125
130
  async listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>> {
126
131
  const queryParameters: any = {};
@@ -147,6 +152,7 @@ export class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
147
152
 
148
153
  /**
149
154
  * List all identity providers available for use
155
+ * List Identity Providers
150
156
  */
151
157
  async listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse> {
152
158
  const response = await this.listProvidersRaw(initOverrides);
@@ -18,10 +18,10 @@ import type {
18
18
  CancelSessionResponse,
19
19
  CreateSessionRequest,
20
20
  CreateSessionResponse,
21
- ExchangeResultsKeyRequest,
22
- ExchangeResultsKeyResponse,
23
21
  FailureMessage,
24
22
  GetSessionResponse,
23
+ GetSessionResultRequest,
24
+ GetSessionResultResponse,
25
25
  ListSessionsResponse,
26
26
  OrderDirection,
27
27
  SessionOrdering,
@@ -34,14 +34,14 @@ import {
34
34
  CreateSessionRequestToJSON,
35
35
  CreateSessionResponseFromJSON,
36
36
  CreateSessionResponseToJSON,
37
- ExchangeResultsKeyRequestFromJSON,
38
- ExchangeResultsKeyRequestToJSON,
39
- ExchangeResultsKeyResponseFromJSON,
40
- ExchangeResultsKeyResponseToJSON,
41
37
  FailureMessageFromJSON,
42
38
  FailureMessageToJSON,
43
39
  GetSessionResponseFromJSON,
44
40
  GetSessionResponseToJSON,
41
+ GetSessionResultRequestFromJSON,
42
+ GetSessionResultRequestToJSON,
43
+ GetSessionResultResponseFromJSON,
44
+ GetSessionResultResponseToJSON,
45
45
  ListSessionsResponseFromJSON,
46
46
  ListSessionsResponseToJSON,
47
47
  OrderDirectionFromJSON,
@@ -60,13 +60,13 @@ export interface CreateSessionOperationRequest {
60
60
  createSessionRequest?: CreateSessionRequest;
61
61
  }
62
62
 
63
- export interface ExchangeResultsKeyOperationRequest {
63
+ export interface GetSessionRequest {
64
64
  sessionId: string;
65
- exchangeResultsKeyRequest?: ExchangeResultsKeyRequest;
66
65
  }
67
66
 
68
- export interface GetSessionRequest {
67
+ export interface GetSessionResultOperationRequest {
69
68
  sessionId: string;
69
+ getSessionResultRequest?: GetSessionResultRequest;
70
70
  }
71
71
 
72
72
  export interface ListSessionsRequest {
@@ -88,8 +88,8 @@ export interface RedactSessionRequest {
88
88
  */
89
89
  export interface SessionsApiInterface {
90
90
  /**
91
- *
92
- * @summary Cancel a Session by its ID
91
+ * Cancel a Session by its ID
92
+ * @summary Cancel Session
93
93
  * @param {string} sessionId
94
94
  * @param {*} [options] Override http request option.
95
95
  * @throws {RequiredError}
@@ -99,12 +99,13 @@ export interface SessionsApiInterface {
99
99
 
100
100
  /**
101
101
  * Cancel a Session by its ID
102
+ * Cancel Session
102
103
  */
103
104
  cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse>;
104
105
 
105
106
  /**
106
- *
107
- * @summary Create a Session to verify a user\'s identity
107
+ * Create a Session to verify a user\'s identity
108
+ * @summary Create Session
108
109
  * @param {CreateSessionRequest} [createSessionRequest]
109
110
  * @param {*} [options] Override http request option.
110
111
  * @throws {RequiredError}
@@ -114,43 +115,45 @@ export interface SessionsApiInterface {
114
115
 
115
116
  /**
116
117
  * Create a Session to verify a user\'s identity
118
+ * Create Session
117
119
  */
118
120
  createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse>;
119
121
 
120
122
  /**
121
- *
122
- * @summary Exchange a Results Access Key for Identity Data
123
+ * Get a Session by its ID
124
+ * @summary Get Session
123
125
  * @param {string} sessionId
124
- * @param {ExchangeResultsKeyRequest} [exchangeResultsKeyRequest]
125
126
  * @param {*} [options] Override http request option.
126
127
  * @throws {RequiredError}
127
128
  * @memberof SessionsApiInterface
128
129
  */
129
- exchangeResultsKeyRaw(requestParameters: ExchangeResultsKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExchangeResultsKeyResponse>>;
130
+ getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
130
131
 
131
132
  /**
132
- * Exchange a Results Access Key for Identity Data
133
+ * Get a Session by its ID
134
+ * Get Session
133
135
  */
134
- exchangeResultsKey(sessionId: string, exchangeResultsKeyRequest?: ExchangeResultsKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExchangeResultsKeyResponse>;
136
+ getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
135
137
 
136
138
  /**
137
139
  *
138
- * @summary Get a Session by its ID
140
+ * @summary Get Session Results
139
141
  * @param {string} sessionId
142
+ * @param {GetSessionResultRequest} [getSessionResultRequest]
140
143
  * @param {*} [options] Override http request option.
141
144
  * @throws {RequiredError}
142
145
  * @memberof SessionsApiInterface
143
146
  */
144
- getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
147
+ getSessionResultRaw(requestParameters: GetSessionResultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResultResponse>>;
145
148
 
146
149
  /**
147
- * Get a Session by its ID
150
+ * Get Session Results
148
151
  */
149
- getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
152
+ getSessionResult(sessionId: string, getSessionResultRequest?: GetSessionResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResultResponse>;
150
153
 
151
154
  /**
152
- *
153
- * @summary List Sessions created by your account
155
+ * List Sessions created by your account
156
+ * @summary List Sessions
154
157
  * @param {SessionOrdering} [orderBy] The field by which sessions should be ordered
155
158
  * @param {OrderDirection} [orderDirection]
156
159
  * @param {number} [pageSize] The number of items to return per page -- must be between &#x60;1&#x60; and &#x60;50&#x60;
@@ -163,12 +166,13 @@ export interface SessionsApiInterface {
163
166
 
164
167
  /**
165
168
  * List Sessions created by your account
169
+ * List Sessions
166
170
  */
167
171
  listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse>;
168
172
 
169
173
  /**
170
- *
171
- * @summary 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.
174
+ * 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.
175
+ * @summary Redact Session
172
176
  * @param {string} sessionId
173
177
  * @param {*} [options] Override http request option.
174
178
  * @throws {RequiredError}
@@ -178,6 +182,7 @@ export interface SessionsApiInterface {
178
182
 
179
183
  /**
180
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
181
186
  */
182
187
  redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
183
188
 
@@ -190,6 +195,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
190
195
 
191
196
  /**
192
197
  * Cancel a Session by its ID
198
+ * Cancel Session
193
199
  */
194
200
  async cancelSessionRaw(requestParameters: CancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelSessionResponse>> {
195
201
  if (requestParameters['sessionId'] == null) {
@@ -223,6 +229,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
223
229
 
224
230
  /**
225
231
  * Cancel a Session by its ID
232
+ * Cancel Session
226
233
  */
227
234
  async cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse> {
228
235
  const response = await this.cancelSessionRaw({ sessionId: sessionId }, initOverrides);
@@ -231,6 +238,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
231
238
 
232
239
  /**
233
240
  * Create a Session to verify a user\'s identity
241
+ * Create Session
234
242
  */
235
243
  async createSessionRaw(requestParameters: CreateSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateSessionResponse>> {
236
244
  const queryParameters: any = {};
@@ -260,6 +268,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
260
268
 
261
269
  /**
262
270
  * Create a Session to verify a user\'s identity
271
+ * Create Session
263
272
  */
264
273
  async createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse> {
265
274
  const response = await this.createSessionRaw({ createSessionRequest: createSessionRequest }, initOverrides);
@@ -267,13 +276,14 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
267
276
  }
268
277
 
269
278
  /**
270
- * Exchange a Results Access Key for Identity Data
279
+ * Get a Session by its ID
280
+ * Get Session
271
281
  */
272
- async exchangeResultsKeyRaw(requestParameters: ExchangeResultsKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExchangeResultsKeyResponse>> {
282
+ async getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>> {
273
283
  if (requestParameters['sessionId'] == null) {
274
284
  throw new runtime.RequiredError(
275
285
  'sessionId',
276
- 'Required parameter "sessionId" was null or undefined when calling exchangeResultsKey().'
286
+ 'Required parameter "sessionId" was null or undefined when calling getSession().'
277
287
  );
278
288
  }
279
289
 
@@ -281,8 +291,6 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
281
291
 
282
292
  const headerParameters: runtime.HTTPHeaders = {};
283
293
 
284
- headerParameters['Content-Type'] = 'application/json';
285
-
286
294
  if (this.configuration && this.configuration.accessToken) {
287
295
  const token = this.configuration.accessToken;
288
296
  const tokenString = await token("Bearer", []);
@@ -292,32 +300,32 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
292
300
  }
293
301
  }
294
302
  const response = await this.request({
295
- path: `/api/v1/sessions/{sessionId}/results/exchange`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
296
- method: 'POST',
303
+ path: `/api/v1/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
304
+ method: 'GET',
297
305
  headers: headerParameters,
298
306
  query: queryParameters,
299
- body: ExchangeResultsKeyRequestToJSON(requestParameters['exchangeResultsKeyRequest']),
300
307
  }, initOverrides);
301
308
 
302
- return new runtime.JSONApiResponse(response, (jsonValue) => ExchangeResultsKeyResponseFromJSON(jsonValue));
309
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSessionResponseFromJSON(jsonValue));
303
310
  }
304
311
 
305
312
  /**
306
- * Exchange a Results Access Key for Identity Data
313
+ * Get a Session by its ID
314
+ * Get Session
307
315
  */
308
- async exchangeResultsKey(sessionId: string, exchangeResultsKeyRequest?: ExchangeResultsKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExchangeResultsKeyResponse> {
309
- const response = await this.exchangeResultsKeyRaw({ sessionId: sessionId, exchangeResultsKeyRequest: exchangeResultsKeyRequest }, initOverrides);
316
+ async getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse> {
317
+ const response = await this.getSessionRaw({ sessionId: sessionId }, initOverrides);
310
318
  return await response.value();
311
319
  }
312
320
 
313
321
  /**
314
- * Get a Session by its ID
322
+ * Get Session Results
315
323
  */
316
- async getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>> {
324
+ async getSessionResultRaw(requestParameters: GetSessionResultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResultResponse>> {
317
325
  if (requestParameters['sessionId'] == null) {
318
326
  throw new runtime.RequiredError(
319
327
  'sessionId',
320
- 'Required parameter "sessionId" was null or undefined when calling getSession().'
328
+ 'Required parameter "sessionId" was null or undefined when calling getSessionResult().'
321
329
  );
322
330
  }
323
331
 
@@ -325,6 +333,8 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
325
333
 
326
334
  const headerParameters: runtime.HTTPHeaders = {};
327
335
 
336
+ headerParameters['Content-Type'] = 'application/json';
337
+
328
338
  if (this.configuration && this.configuration.accessToken) {
329
339
  const token = this.configuration.accessToken;
330
340
  const tokenString = await token("Bearer", []);
@@ -334,25 +344,27 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
334
344
  }
335
345
  }
336
346
  const response = await this.request({
337
- path: `/api/v1/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
338
- method: 'GET',
347
+ path: `/api/v1/sessions/{sessionId}/results`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
348
+ method: 'POST',
339
349
  headers: headerParameters,
340
350
  query: queryParameters,
351
+ body: GetSessionResultRequestToJSON(requestParameters['getSessionResultRequest']),
341
352
  }, initOverrides);
342
353
 
343
- return new runtime.JSONApiResponse(response, (jsonValue) => GetSessionResponseFromJSON(jsonValue));
354
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSessionResultResponseFromJSON(jsonValue));
344
355
  }
345
356
 
346
357
  /**
347
- * Get a Session by its ID
358
+ * Get Session Results
348
359
  */
349
- async getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse> {
350
- const response = await this.getSessionRaw({ sessionId: sessionId }, initOverrides);
360
+ async getSessionResult(sessionId: string, getSessionResultRequest?: GetSessionResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResultResponse> {
361
+ const response = await this.getSessionResultRaw({ sessionId: sessionId, getSessionResultRequest: getSessionResultRequest }, initOverrides);
351
362
  return await response.value();
352
363
  }
353
364
 
354
365
  /**
355
366
  * List Sessions created by your account
367
+ * List Sessions
356
368
  */
357
369
  async listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListSessionsResponse>> {
358
370
  const queryParameters: any = {};
@@ -395,6 +407,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
395
407
 
396
408
  /**
397
409
  * List Sessions created by your account
410
+ * List Sessions
398
411
  */
399
412
  async listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse> {
400
413
  const response = await this.listSessionsRaw({ orderBy: orderBy, orderDirection: orderDirection, pageSize: pageSize, page: page }, initOverrides);
@@ -403,6 +416,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
403
416
 
404
417
  /**
405
418
  * 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.
419
+ * Redact Session
406
420
  */
407
421
  async redactSessionRaw(requestParameters: RedactSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
408
422
  if (requestParameters['sessionId'] == null) {
@@ -436,6 +450,7 @@ export class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface
436
450
 
437
451
  /**
438
452
  * 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.
453
+ * Redact Session
439
454
  */
440
455
  async redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
441
456
  await this.redactSessionRaw({ sessionId: sessionId }, initOverrides);
@@ -16,30 +16,30 @@ import { mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
19
- * @interface ExchangeAttachmentAccessKeyRequest
19
+ * @interface GetAttachmentRequest
20
20
  */
21
- export interface ExchangeAttachmentAccessKeyRequest {
21
+ export interface GetAttachmentRequest {
22
22
  /**
23
23
  * The Attachment Access Key to exchange for the raw file contents of the related Attachment
24
24
  * @type {string}
25
- * @memberof ExchangeAttachmentAccessKeyRequest
25
+ * @memberof GetAttachmentRequest
26
26
  */
27
27
  attachmentAccessKey: string;
28
28
  }
29
29
 
30
30
  /**
31
- * Check if a given object implements the ExchangeAttachmentAccessKeyRequest interface.
31
+ * Check if a given object implements the GetAttachmentRequest interface.
32
32
  */
33
- export function instanceOfExchangeAttachmentAccessKeyRequest(value: object): value is ExchangeAttachmentAccessKeyRequest {
33
+ export function instanceOfGetAttachmentRequest(value: object): value is GetAttachmentRequest {
34
34
  if (!('attachmentAccessKey' in value) || value['attachmentAccessKey'] === undefined) return false;
35
35
  return true;
36
36
  }
37
37
 
38
- export function ExchangeAttachmentAccessKeyRequestFromJSON(json: any): ExchangeAttachmentAccessKeyRequest {
39
- return ExchangeAttachmentAccessKeyRequestFromJSONTyped(json, false);
38
+ export function GetAttachmentRequestFromJSON(json: any): GetAttachmentRequest {
39
+ return GetAttachmentRequestFromJSONTyped(json, false);
40
40
  }
41
41
 
42
- export function ExchangeAttachmentAccessKeyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeAttachmentAccessKeyRequest {
42
+ export function GetAttachmentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAttachmentRequest {
43
43
  if (json == null) {
44
44
  return json;
45
45
  }
@@ -49,7 +49,7 @@ export function ExchangeAttachmentAccessKeyRequestFromJSONTyped(json: any, ignor
49
49
  };
50
50
  }
51
51
 
52
- export function ExchangeAttachmentAccessKeyRequestToJSON(value?: ExchangeAttachmentAccessKeyRequest | null): any {
52
+ export function GetAttachmentRequestToJSON(value?: GetAttachmentRequest | null): any {
53
53
  if (value == null) {
54
54
  return value;
55
55
  }