@trinsic/api 0.3.0 → 0.4.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.
Files changed (52) hide show
  1. package/.openapi-generator/FILES +3 -3
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/AttachmentsApi.d.ts +13 -10
  5. package/dist/apis/AttachmentsApi.js +7 -5
  6. package/dist/apis/NetworkApi.d.ts +10 -4
  7. package/dist/apis/NetworkApi.js +4 -0
  8. package/dist/apis/SessionsApi.d.ts +45 -30
  9. package/dist/apis/SessionsApi.js +30 -20
  10. package/dist/esm/apis/AttachmentsApi.d.ts +13 -10
  11. package/dist/esm/apis/AttachmentsApi.js +8 -6
  12. package/dist/esm/apis/NetworkApi.d.ts +10 -4
  13. package/dist/esm/apis/NetworkApi.js +4 -0
  14. package/dist/esm/apis/SessionsApi.d.ts +45 -30
  15. package/dist/esm/apis/SessionsApi.js +31 -21
  16. package/dist/esm/models/GetAttachmentRequest.d.ts +31 -0
  17. package/dist/esm/models/{ExchangeAttachmentAccessKeyRequest.js → GetAttachmentRequest.js} +6 -6
  18. package/dist/esm/models/GetSessionResultRequest.d.ts +31 -0
  19. package/dist/esm/models/{ExchangeResultsKeyRequest.js → GetSessionResultRequest.js} +6 -6
  20. package/dist/esm/models/GetSessionResultResponse.d.ts +39 -0
  21. package/dist/esm/models/{ExchangeResultsKeyResponse.js → GetSessionResultResponse.js} +6 -6
  22. package/dist/esm/models/index.d.ts +3 -3
  23. package/dist/esm/models/index.js +3 -3
  24. package/dist/models/GetAttachmentRequest.d.ts +31 -0
  25. package/dist/models/{ExchangeAttachmentAccessKeyRequest.js → GetAttachmentRequest.js} +10 -10
  26. package/dist/models/GetSessionResultRequest.d.ts +31 -0
  27. package/dist/models/{ExchangeResultsKeyRequest.js → GetSessionResultRequest.js} +10 -10
  28. package/dist/models/GetSessionResultResponse.d.ts +39 -0
  29. package/dist/models/{ExchangeResultsKeyResponse.js → GetSessionResultResponse.js} +10 -10
  30. package/dist/models/index.d.ts +3 -3
  31. package/dist/models/index.js +3 -3
  32. package/package.json +1 -1
  33. package/src/apis/AttachmentsApi.ts +18 -15
  34. package/src/apis/NetworkApi.ts +10 -4
  35. package/src/apis/SessionsApi.ts +63 -48
  36. package/src/models/{ExchangeAttachmentAccessKeyRequest.ts → GetAttachmentRequest.ts} +9 -9
  37. package/src/models/{ExchangeResultsKeyRequest.ts → GetSessionResultRequest.ts} +9 -9
  38. package/src/models/{ExchangeResultsKeyResponse.ts → GetSessionResultResponse.ts} +10 -10
  39. package/src/models/OrderDirection.ts +1 -1
  40. package/src/models/Session.ts +2 -0
  41. package/src/models/SessionFailCode.ts +1 -1
  42. package/src/models/SessionOrdering.ts +1 -1
  43. package/src/models/SessionState.ts +1 -1
  44. package/src/models/Verification.ts +2 -0
  45. package/src/models/VerificationFailCode.ts +1 -1
  46. package/src/models/index.ts +3 -3
  47. package/dist/esm/models/ExchangeAttachmentAccessKeyRequest.d.ts +0 -31
  48. package/dist/esm/models/ExchangeResultsKeyRequest.d.ts +0 -31
  49. package/dist/esm/models/ExchangeResultsKeyResponse.d.ts +0 -39
  50. package/dist/models/ExchangeAttachmentAccessKeyRequest.d.ts +0 -31
  51. package/dist/models/ExchangeResultsKeyRequest.d.ts +0 -31
  52. package/dist/models/ExchangeResultsKeyResponse.d.ts +0 -39
@@ -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,4 +1,4 @@
1
- ## @trinsic/api@0.3.0
1
+ ## @trinsic/api@0.4.0
2
2
 
3
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:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @trinsic/api@0.3.0 --save
39
+ npm install @trinsic/api@0.4.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ExchangeAttachmentAccessKeyRequest } from '../models/index';
14
- export interface ExchangeAttachmentAccessKeyOperationRequest {
15
- exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest;
13
+ import type { GetAttachmentRequest } from '../models/index';
14
+ export interface GetAttachmentOperationRequest {
15
+ getAttachmentRequest?: GetAttachmentRequest;
16
16
  }
17
17
  /**
18
18
  * AttachmentsApi - interface
@@ -22,18 +22,19 @@ export interface ExchangeAttachmentAccessKeyOperationRequest {
22
22
  */
23
23
  export interface AttachmentsApiInterface {
24
24
  /**
25
- *
26
- * @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.
27
- * @param {ExchangeAttachmentAccessKeyRequest} [exchangeAttachmentAccessKeyRequest]
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
28
  * @param {*} [options] Override http request option.
29
29
  * @throws {RequiredError}
30
30
  * @memberof AttachmentsApiInterface
31
31
  */
32
- exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
32
+ getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
33
33
  /**
34
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
35
36
  */
36
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
37
+ getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
37
38
  }
38
39
  /**
39
40
  *
@@ -41,10 +42,12 @@ export interface AttachmentsApiInterface {
41
42
  export declare class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInterface {
42
43
  /**
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
44
46
  */
45
- exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
+ getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
46
48
  /**
47
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
48
51
  */
49
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
52
+ getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
50
53
  }
@@ -31,8 +31,9 @@ const index_1 = require("../models/index");
31
31
  class AttachmentsApi extends runtime.BaseAPI {
32
32
  /**
33
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
34
35
  */
35
- exchangeAttachmentAccessKeyRaw(requestParameters, initOverrides) {
36
+ getAttachmentRaw(requestParameters, initOverrides) {
36
37
  return __awaiter(this, void 0, void 0, function* () {
37
38
  const queryParameters = {};
38
39
  const headerParameters = {};
@@ -45,21 +46,22 @@ class AttachmentsApi extends runtime.BaseAPI {
45
46
  }
46
47
  }
47
48
  const response = yield this.request({
48
- path: `/api/v1/attachments/exchange`,
49
+ path: `/api/v1/attachments/attachment`,
49
50
  method: 'POST',
50
51
  headers: headerParameters,
51
52
  query: queryParameters,
52
- body: (0, index_1.ExchangeAttachmentAccessKeyRequestToJSON)(requestParameters['exchangeAttachmentAccessKeyRequest']),
53
+ body: (0, index_1.GetAttachmentRequestToJSON)(requestParameters['getAttachmentRequest']),
53
54
  }, initOverrides);
54
55
  return new runtime.VoidApiResponse(response);
55
56
  });
56
57
  }
57
58
  /**
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
59
61
  */
60
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest, initOverrides) {
62
+ getAttachment(getAttachmentRequest, initOverrides) {
61
63
  return __awaiter(this, void 0, void 0, function* () {
62
- yield this.exchangeAttachmentAccessKeyRaw({ exchangeAttachmentAccessKeyRequest: exchangeAttachmentAccessKeyRequest }, initOverrides);
64
+ yield this.getAttachmentRaw({ getAttachmentRequest: getAttachmentRequest }, initOverrides);
63
65
  });
64
66
  }
65
67
  }
@@ -22,8 +22,8 @@ export interface IdentityLookupRequest {
22
22
  */
23
23
  export interface NetworkApiInterface {
24
24
  /**
25
- *
26
- * @summary Query the availability of an identity in the Trinsic Network by phone number
25
+ * Query the availability of an identity in the Trinsic Network by phone number
26
+ * @summary Lookup Identity
27
27
  * @param {string} phoneNumber
28
28
  * @param {*} [options] Override http request option.
29
29
  * @throws {RequiredError}
@@ -32,11 +32,12 @@ export interface NetworkApiInterface {
32
32
  identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
33
33
  /**
34
34
  * Query the availability of an identity in the Trinsic Network by phone number
35
+ * Lookup Identity
35
36
  */
36
37
  identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
37
38
  /**
38
- *
39
- * @summary List all identity providers available for use
39
+ * List all identity providers available for use
40
+ * @summary List Identity Providers
40
41
  * @param {*} [options] Override http request option.
41
42
  * @throws {RequiredError}
42
43
  * @memberof NetworkApiInterface
@@ -44,6 +45,7 @@ export interface NetworkApiInterface {
44
45
  listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
45
46
  /**
46
47
  * List all identity providers available for use
48
+ * List Identity Providers
47
49
  */
48
50
  listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
49
51
  }
@@ -53,18 +55,22 @@ export interface NetworkApiInterface {
53
55
  export declare class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
54
56
  /**
55
57
  * Query the availability of an identity in the Trinsic Network by phone number
58
+ * Lookup Identity
56
59
  */
57
60
  identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
58
61
  /**
59
62
  * Query the availability of an identity in the Trinsic Network by phone number
63
+ * Lookup Identity
60
64
  */
61
65
  identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
62
66
  /**
63
67
  * List all identity providers available for use
68
+ * List Identity Providers
64
69
  */
65
70
  listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
66
71
  /**
67
72
  * List all identity providers available for use
73
+ * List Identity Providers
68
74
  */
69
75
  listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
70
76
  }
@@ -31,6 +31,7 @@ const index_1 = require("../models/index");
31
31
  class NetworkApi extends runtime.BaseAPI {
32
32
  /**
33
33
  * Query the availability of an identity in the Trinsic Network by phone number
34
+ * Lookup Identity
34
35
  */
35
36
  identityLookupRaw(requestParameters, initOverrides) {
36
37
  return __awaiter(this, void 0, void 0, function* () {
@@ -57,6 +58,7 @@ class NetworkApi extends runtime.BaseAPI {
57
58
  }
58
59
  /**
59
60
  * Query the availability of an identity in the Trinsic Network by phone number
61
+ * Lookup Identity
60
62
  */
61
63
  identityLookup(phoneNumber, initOverrides) {
62
64
  return __awaiter(this, void 0, void 0, function* () {
@@ -66,6 +68,7 @@ class NetworkApi extends runtime.BaseAPI {
66
68
  }
67
69
  /**
68
70
  * List all identity providers available for use
71
+ * List Identity Providers
69
72
  */
70
73
  listProvidersRaw(initOverrides) {
71
74
  return __awaiter(this, void 0, void 0, function* () {
@@ -89,6 +92,7 @@ class NetworkApi extends runtime.BaseAPI {
89
92
  }
90
93
  /**
91
94
  * List all identity providers available for use
95
+ * List Identity Providers
92
96
  */
93
97
  listProviders(initOverrides) {
94
98
  return __awaiter(this, void 0, void 0, function* () {
@@ -10,19 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CancelSessionResponse, CreateSessionRequest, CreateSessionResponse, ExchangeResultsKeyRequest, ExchangeResultsKeyResponse, GetSessionResponse, ListSessionsResponse, OrderDirection, SessionOrdering } from '../models/index';
13
+ import type { CancelSessionResponse, CreateSessionRequest, CreateSessionResponse, GetSessionResponse, GetSessionResultRequest, GetSessionResultResponse, ListSessionsResponse, OrderDirection, SessionOrdering } from '../models/index';
14
14
  export interface CancelSessionRequest {
15
15
  sessionId: string;
16
16
  }
17
17
  export interface CreateSessionOperationRequest {
18
18
  createSessionRequest?: CreateSessionRequest;
19
19
  }
20
- export interface ExchangeResultsKeyOperationRequest {
20
+ export interface GetSessionRequest {
21
21
  sessionId: string;
22
- exchangeResultsKeyRequest?: ExchangeResultsKeyRequest;
23
22
  }
24
- export interface GetSessionRequest {
23
+ export interface GetSessionResultOperationRequest {
25
24
  sessionId: string;
25
+ getSessionResultRequest?: GetSessionResultRequest;
26
26
  }
27
27
  export interface ListSessionsRequest {
28
28
  orderBy?: SessionOrdering;
@@ -41,8 +41,8 @@ export interface RedactSessionRequest {
41
41
  */
42
42
  export interface SessionsApiInterface {
43
43
  /**
44
- *
45
- * @summary Cancel a Session by its ID
44
+ * Cancel a Session by its ID
45
+ * @summary Cancel Session
46
46
  * @param {string} sessionId
47
47
  * @param {*} [options] Override http request option.
48
48
  * @throws {RequiredError}
@@ -51,11 +51,12 @@ export interface SessionsApiInterface {
51
51
  cancelSessionRaw(requestParameters: CancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelSessionResponse>>;
52
52
  /**
53
53
  * Cancel a Session by its ID
54
+ * Cancel Session
54
55
  */
55
56
  cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse>;
56
57
  /**
57
- *
58
- * @summary Create a Session to verify a user\'s identity
58
+ * Create a Session to verify a user\'s identity
59
+ * @summary Create Session
59
60
  * @param {CreateSessionRequest} [createSessionRequest]
60
61
  * @param {*} [options] Override http request option.
61
62
  * @throws {RequiredError}
@@ -64,38 +65,40 @@ export interface SessionsApiInterface {
64
65
  createSessionRaw(requestParameters: CreateSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateSessionResponse>>;
65
66
  /**
66
67
  * Create a Session to verify a user\'s identity
68
+ * Create Session
67
69
  */
68
70
  createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse>;
69
71
  /**
70
- *
71
- * @summary Exchange a Results Access Key for Identity Data
72
+ * Get a Session by its ID
73
+ * @summary Get Session
72
74
  * @param {string} sessionId
73
- * @param {ExchangeResultsKeyRequest} [exchangeResultsKeyRequest]
74
75
  * @param {*} [options] Override http request option.
75
76
  * @throws {RequiredError}
76
77
  * @memberof SessionsApiInterface
77
78
  */
78
- exchangeResultsKeyRaw(requestParameters: ExchangeResultsKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExchangeResultsKeyResponse>>;
79
+ getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
79
80
  /**
80
- * Exchange a Results Access Key for Identity Data
81
+ * Get a Session by its ID
82
+ * Get Session
81
83
  */
82
- exchangeResultsKey(sessionId: string, exchangeResultsKeyRequest?: ExchangeResultsKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExchangeResultsKeyResponse>;
84
+ getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
83
85
  /**
84
86
  *
85
- * @summary Get a Session by its ID
87
+ * @summary Get Session Results
86
88
  * @param {string} sessionId
89
+ * @param {GetSessionResultRequest} [getSessionResultRequest]
87
90
  * @param {*} [options] Override http request option.
88
91
  * @throws {RequiredError}
89
92
  * @memberof SessionsApiInterface
90
93
  */
91
- getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
94
+ getSessionResultRaw(requestParameters: GetSessionResultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResultResponse>>;
92
95
  /**
93
- * Get a Session by its ID
96
+ * Get Session Results
94
97
  */
95
- getSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResponse>;
98
+ getSessionResult(sessionId: string, getSessionResultRequest?: GetSessionResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSessionResultResponse>;
96
99
  /**
97
- *
98
- * @summary List Sessions created by your account
100
+ * List Sessions created by your account
101
+ * @summary List Sessions
99
102
  * @param {SessionOrdering} [orderBy] The field by which sessions should be ordered
100
103
  * @param {OrderDirection} [orderDirection]
101
104
  * @param {number} [pageSize] The number of items to return per page -- must be between &#x60;1&#x60; and &#x60;50&#x60;
@@ -107,11 +110,12 @@ export interface SessionsApiInterface {
107
110
  listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListSessionsResponse>>;
108
111
  /**
109
112
  * List Sessions created by your account
113
+ * List Sessions
110
114
  */
111
115
  listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse>;
112
116
  /**
113
- *
114
- * @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.
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
115
119
  * @param {string} sessionId
116
120
  * @param {*} [options] Override http request option.
117
121
  * @throws {RequiredError}
@@ -120,6 +124,7 @@ export interface SessionsApiInterface {
120
124
  redactSessionRaw(requestParameters: RedactSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
121
125
  /**
122
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
123
128
  */
124
129
  redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
125
130
  }
@@ -129,50 +134,60 @@ export interface SessionsApiInterface {
129
134
  export declare class SessionsApi extends runtime.BaseAPI implements SessionsApiInterface {
130
135
  /**
131
136
  * Cancel a Session by its ID
137
+ * Cancel Session
132
138
  */
133
139
  cancelSessionRaw(requestParameters: CancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CancelSessionResponse>>;
134
140
  /**
135
141
  * Cancel a Session by its ID
142
+ * Cancel Session
136
143
  */
137
144
  cancelSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CancelSessionResponse>;
138
145
  /**
139
146
  * Create a Session to verify a user\'s identity
147
+ * Create Session
140
148
  */
141
149
  createSessionRaw(requestParameters: CreateSessionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateSessionResponse>>;
142
150
  /**
143
151
  * Create a Session to verify a user\'s identity
152
+ * Create Session
144
153
  */
145
154
  createSession(createSessionRequest?: CreateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateSessionResponse>;
146
- /**
147
- * Exchange a Results Access Key for Identity Data
148
- */
149
- exchangeResultsKeyRaw(requestParameters: ExchangeResultsKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExchangeResultsKeyResponse>>;
150
- /**
151
- * Exchange a Results Access Key for Identity Data
152
- */
153
- exchangeResultsKey(sessionId: string, exchangeResultsKeyRequest?: ExchangeResultsKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExchangeResultsKeyResponse>;
154
155
  /**
155
156
  * Get a Session by its ID
157
+ * Get Session
156
158
  */
157
159
  getSessionRaw(requestParameters: GetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSessionResponse>>;
158
160
  /**
159
161
  * Get a Session by its ID
162
+ * Get Session
160
163
  */
161
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>;
162
173
  /**
163
174
  * List Sessions created by your account
175
+ * List Sessions
164
176
  */
165
177
  listSessionsRaw(requestParameters: ListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListSessionsResponse>>;
166
178
  /**
167
179
  * List Sessions created by your account
180
+ * List Sessions
168
181
  */
169
182
  listSessions(orderBy?: SessionOrdering, orderDirection?: OrderDirection, pageSize?: number, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListSessionsResponse>;
170
183
  /**
171
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
172
186
  */
173
187
  redactSessionRaw(requestParameters: RedactSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
174
188
  /**
175
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
176
191
  */
177
192
  redactSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
178
193
  }
@@ -31,6 +31,7 @@ const index_1 = require("../models/index");
31
31
  class SessionsApi extends runtime.BaseAPI {
32
32
  /**
33
33
  * Cancel a Session by its ID
34
+ * Cancel Session
34
35
  */
35
36
  cancelSessionRaw(requestParameters, initOverrides) {
36
37
  return __awaiter(this, void 0, void 0, function* () {
@@ -57,6 +58,7 @@ class SessionsApi extends runtime.BaseAPI {
57
58
  }
58
59
  /**
59
60
  * Cancel a Session by its ID
61
+ * Cancel Session
60
62
  */
61
63
  cancelSession(sessionId, initOverrides) {
62
64
  return __awaiter(this, void 0, void 0, function* () {
@@ -66,6 +68,7 @@ class SessionsApi extends runtime.BaseAPI {
66
68
  }
67
69
  /**
68
70
  * Create a Session to verify a user\'s identity
71
+ * Create Session
69
72
  */
70
73
  createSessionRaw(requestParameters, initOverrides) {
71
74
  return __awaiter(this, void 0, void 0, function* () {
@@ -91,6 +94,7 @@ class SessionsApi extends runtime.BaseAPI {
91
94
  }
92
95
  /**
93
96
  * Create a Session to verify a user\'s identity
97
+ * Create Session
94
98
  */
95
99
  createSession(createSessionRequest, initOverrides) {
96
100
  return __awaiter(this, void 0, void 0, function* () {
@@ -99,16 +103,16 @@ class SessionsApi extends runtime.BaseAPI {
99
103
  });
100
104
  }
101
105
  /**
102
- * Exchange a Results Access Key for Identity Data
106
+ * Get a Session by its ID
107
+ * Get Session
103
108
  */
104
- exchangeResultsKeyRaw(requestParameters, initOverrides) {
109
+ getSessionRaw(requestParameters, initOverrides) {
105
110
  return __awaiter(this, void 0, void 0, function* () {
106
111
  if (requestParameters['sessionId'] == null) {
107
- throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling exchangeResultsKey().');
112
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getSession().');
108
113
  }
109
114
  const queryParameters = {};
110
115
  const headerParameters = {};
111
- headerParameters['Content-Type'] = 'application/json';
112
116
  if (this.configuration && this.configuration.accessToken) {
113
117
  const token = this.configuration.accessToken;
114
118
  const tokenString = yield token("Bearer", []);
@@ -117,34 +121,35 @@ class SessionsApi extends runtime.BaseAPI {
117
121
  }
118
122
  }
119
123
  const response = yield this.request({
120
- path: `/api/v1/sessions/{sessionId}/results/exchange`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
121
- method: 'POST',
124
+ path: `/api/v1/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
125
+ method: 'GET',
122
126
  headers: headerParameters,
123
127
  query: queryParameters,
124
- body: (0, index_1.ExchangeResultsKeyRequestToJSON)(requestParameters['exchangeResultsKeyRequest']),
125
128
  }, initOverrides);
126
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExchangeResultsKeyResponseFromJSON)(jsonValue));
129
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSessionResponseFromJSON)(jsonValue));
127
130
  });
128
131
  }
129
132
  /**
130
- * Exchange a Results Access Key for Identity Data
133
+ * Get a Session by its ID
134
+ * Get Session
131
135
  */
132
- exchangeResultsKey(sessionId, exchangeResultsKeyRequest, initOverrides) {
136
+ getSession(sessionId, initOverrides) {
133
137
  return __awaiter(this, void 0, void 0, function* () {
134
- const response = yield this.exchangeResultsKeyRaw({ sessionId: sessionId, exchangeResultsKeyRequest: exchangeResultsKeyRequest }, initOverrides);
138
+ const response = yield this.getSessionRaw({ sessionId: sessionId }, initOverrides);
135
139
  return yield response.value();
136
140
  });
137
141
  }
138
142
  /**
139
- * Get a Session by its ID
143
+ * Get Session Results
140
144
  */
141
- getSessionRaw(requestParameters, initOverrides) {
145
+ getSessionResultRaw(requestParameters, initOverrides) {
142
146
  return __awaiter(this, void 0, void 0, function* () {
143
147
  if (requestParameters['sessionId'] == null) {
144
- throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getSession().');
148
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getSessionResult().');
145
149
  }
146
150
  const queryParameters = {};
147
151
  const headerParameters = {};
152
+ headerParameters['Content-Type'] = 'application/json';
148
153
  if (this.configuration && this.configuration.accessToken) {
149
154
  const token = this.configuration.accessToken;
150
155
  const tokenString = yield token("Bearer", []);
@@ -153,25 +158,27 @@ class SessionsApi extends runtime.BaseAPI {
153
158
  }
154
159
  }
155
160
  const response = yield this.request({
156
- path: `/api/v1/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
157
- method: 'GET',
161
+ path: `/api/v1/sessions/{sessionId}/results`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
162
+ method: 'POST',
158
163
  headers: headerParameters,
159
164
  query: queryParameters,
165
+ body: (0, index_1.GetSessionResultRequestToJSON)(requestParameters['getSessionResultRequest']),
160
166
  }, initOverrides);
161
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSessionResponseFromJSON)(jsonValue));
167
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSessionResultResponseFromJSON)(jsonValue));
162
168
  });
163
169
  }
164
170
  /**
165
- * Get a Session by its ID
171
+ * Get Session Results
166
172
  */
167
- getSession(sessionId, initOverrides) {
173
+ getSessionResult(sessionId, getSessionResultRequest, initOverrides) {
168
174
  return __awaiter(this, void 0, void 0, function* () {
169
- const response = yield this.getSessionRaw({ sessionId: sessionId }, initOverrides);
175
+ const response = yield this.getSessionResultRaw({ sessionId: sessionId, getSessionResultRequest: getSessionResultRequest }, initOverrides);
170
176
  return yield response.value();
171
177
  });
172
178
  }
173
179
  /**
174
180
  * List Sessions created by your account
181
+ * List Sessions
175
182
  */
176
183
  listSessionsRaw(requestParameters, initOverrides) {
177
184
  return __awaiter(this, void 0, void 0, function* () {
@@ -207,6 +214,7 @@ class SessionsApi extends runtime.BaseAPI {
207
214
  }
208
215
  /**
209
216
  * List Sessions created by your account
217
+ * List Sessions
210
218
  */
211
219
  listSessions(orderBy, orderDirection, pageSize, page, initOverrides) {
212
220
  return __awaiter(this, void 0, void 0, function* () {
@@ -216,6 +224,7 @@ class SessionsApi extends runtime.BaseAPI {
216
224
  }
217
225
  /**
218
226
  * 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.
227
+ * Redact Session
219
228
  */
220
229
  redactSessionRaw(requestParameters, initOverrides) {
221
230
  return __awaiter(this, void 0, void 0, function* () {
@@ -242,6 +251,7 @@ class SessionsApi extends runtime.BaseAPI {
242
251
  }
243
252
  /**
244
253
  * 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.
254
+ * Redact Session
245
255
  */
246
256
  redactSession(sessionId, initOverrides) {
247
257
  return __awaiter(this, void 0, void 0, function* () {
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ExchangeAttachmentAccessKeyRequest } from '../models/index';
14
- export interface ExchangeAttachmentAccessKeyOperationRequest {
15
- exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest;
13
+ import type { GetAttachmentRequest } from '../models/index';
14
+ export interface GetAttachmentOperationRequest {
15
+ getAttachmentRequest?: GetAttachmentRequest;
16
16
  }
17
17
  /**
18
18
  * AttachmentsApi - interface
@@ -22,18 +22,19 @@ export interface ExchangeAttachmentAccessKeyOperationRequest {
22
22
  */
23
23
  export interface AttachmentsApiInterface {
24
24
  /**
25
- *
26
- * @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.
27
- * @param {ExchangeAttachmentAccessKeyRequest} [exchangeAttachmentAccessKeyRequest]
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
28
  * @param {*} [options] Override http request option.
29
29
  * @throws {RequiredError}
30
30
  * @memberof AttachmentsApiInterface
31
31
  */
32
- exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
32
+ getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
33
33
  /**
34
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
35
36
  */
36
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
37
+ getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
37
38
  }
38
39
  /**
39
40
  *
@@ -41,10 +42,12 @@ export interface AttachmentsApiInterface {
41
42
  export declare class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInterface {
42
43
  /**
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
44
46
  */
45
- exchangeAttachmentAccessKeyRaw(requestParameters: ExchangeAttachmentAccessKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
+ getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
46
48
  /**
47
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
48
51
  */
49
- exchangeAttachmentAccessKey(exchangeAttachmentAccessKeyRequest?: ExchangeAttachmentAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
52
+ getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
50
53
  }