Skip to content

Commit

Permalink
Update Connect Swagger (#1727)
Browse files Browse the repository at this point in the history
Co-authored-by: geel9 <[email protected]>
Co-authored-by: mewmba <[email protected]>
  • Loading branch information
3 people authored Aug 13, 2024
1 parent 1866a46 commit 9c4d476
Show file tree
Hide file tree
Showing 177 changed files with 7,721 additions and 1,389 deletions.
39 changes: 30 additions & 9 deletions connect/dart/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,38 @@
README.md
analysis_options.yaml
doc/Address.md
doc/Attachments.md
doc/AttachmentsApi.md
doc/CancelSessionResponse.md
doc/CreateSessionRequest.md
doc/CreateSessionResponse.md
doc/DisclosedFields.md
doc/DisclosedFieldsRequest.md
doc/DocumentData.md
doc/ExchangeResultsKeyRequest.md
doc/ExchangeResultsKeyResponse.md
doc/FailureMessage.md
doc/GetSessionResponseV1.md
doc/IDVSessionState.md
doc/GetSessionResponse.md
doc/IdentityData.md
doc/IdentityLookupResponse.md
doc/Integration.md
doc/ListProvidersResponse.md
doc/ListSessionsResponse.md
doc/NetworkApi.md
doc/OrderDirection.md
doc/PersonData.md
doc/Session.md
doc/SessionFailCode.md
doc/SessionOrdering.md
doc/SessionState.md
doc/SessionsApi.md
doc/ValidationResult.md
doc/Verification.md
doc/VerificationFailCode.md
doc/VerificationState.md
git_push.sh
lib/api.dart
lib/api/attachments_api.dart
lib/api/network_api.dart
lib/api/sessions_api.dart
lib/api_client.dart
lib/api_exception.dart
Expand All @@ -37,46 +46,58 @@ lib/auth/http_basic_auth.dart
lib/auth/http_bearer_auth.dart
lib/auth/oauth.dart
lib/model/address.dart
lib/model/attachments.dart
lib/model/cancel_session_response.dart
lib/model/create_session_request.dart
lib/model/create_session_response.dart
lib/model/disclosed_fields.dart
lib/model/disclosed_fields_request.dart
lib/model/document_data.dart
lib/model/exchange_results_key_request.dart
lib/model/exchange_results_key_response.dart
lib/model/failure_message.dart
lib/model/get_session_response_v1.dart
lib/model/get_session_response.dart
lib/model/identity_data.dart
lib/model/idv_session_state.dart
lib/model/identity_lookup_response.dart
lib/model/integration.dart
lib/model/list_providers_response.dart
lib/model/list_sessions_response.dart
lib/model/order_direction.dart
lib/model/person_data.dart
lib/model/session.dart
lib/model/session_fail_code.dart
lib/model/session_ordering.dart
lib/model/session_state.dart
lib/model/validation_result.dart
lib/model/verification.dart
lib/model/verification_fail_code.dart
lib/model/verification_state.dart
pubspec.yaml
test/address_test.dart
test/attachments_api_test.dart
test/attachments_test.dart
test/cancel_session_response_test.dart
test/create_session_request_test.dart
test/create_session_response_test.dart
test/disclosed_fields_request_test.dart
test/disclosed_fields_test.dart
test/document_data_test.dart
test/exchange_results_key_request_test.dart
test/exchange_results_key_response_test.dart
test/failure_message_test.dart
test/get_session_response_v1_test.dart
test/get_session_response_test.dart
test/identity_data_test.dart
test/idv_session_state_test.dart
test/identity_lookup_response_test.dart
test/integration_test.dart
test/list_providers_response_test.dart
test/list_sessions_response_test.dart
test/network_api_test.dart
test/order_direction_test.dart
test/person_data_test.dart
test/session_fail_code_test.dart
test/session_ordering_test.dart
test/session_state_test.dart
test/session_test.dart
test/sessions_api_test.dart
test/validation_result_test.dart
test/verification_fail_code_test.dart
test/verification_state_test.dart
test/verification_test.dart
34 changes: 21 additions & 13 deletions connect/dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ import 'package:TrinsicConnect/api.dart';
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = SessionsApi();
final sessionId = sessionId_example; // String |
final api_instance = AttachmentsApi();
final attachmentAccessKey = attachmentAccessKey_example; // String |
try {
final result = api_instance.cancelSession(sessionId);
print(result);
api_instance.getAttachment(attachmentAccessKey);
} catch (e) {
print('Exception when calling SessionsApi->cancelSession: $e\n');
print('Exception when calling AttachmentsApi->getAttachment: $e\n');
}
```
Expand All @@ -65,36 +64,45 @@ All URIs are relative to *https://connect.trinsic.id*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*SessionsApi* | [**cancelSession**](doc//SessionsApi.md#cancelsession) | **POST** /api/v1/sessions/{sessionId}/cancel |
*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /api/v1/sessions |
*SessionsApi* | [**getSession**](doc//SessionsApi.md#getsession) | **GET** /api/v1/sessions/{sessionId} |
*SessionsApi* | [**listSessions**](doc//SessionsApi.md#listsessions) | **GET** /api/v1/sessions |
*SessionsApi* | [**redactSession**](doc//SessionsApi.md#redactsession) | **POST** /api/v1/sessions/{sessionId}/redact |
*AttachmentsApi* | [**getAttachment**](doc//AttachmentsApi.md#getattachment) | **GET** /api/v1/attachments/fetch | Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the linked resource. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant.
*NetworkApi* | [**identityLookup**](doc//NetworkApi.md#identitylookup) | **GET** /api/v1/network/identities/{phoneNumber} | Query the availability of an identity in the Trinsic Network by phone number
*NetworkApi* | [**listProviders**](doc//NetworkApi.md#listproviders) | **GET** /api/v1/network/providers | List all identity providers available for use
*SessionsApi* | [**cancelSession**](doc//SessionsApi.md#cancelsession) | **POST** /api/v1/sessions/{sessionId}/cancel | Cancel a Session by its ID
*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /api/v1/sessions | Create a Session to verify a user's identity
*SessionsApi* | [**exchangeResultsKey**](doc//SessionsApi.md#exchangeresultskey) | **POST** /api/v1/sessions/{sessionId}/results | Exchange a Results Access Key for Identity Data
*SessionsApi* | [**getSession**](doc//SessionsApi.md#getsession) | **GET** /api/v1/sessions/{sessionId} | Get a Session by its ID
*SessionsApi* | [**listSessions**](doc//SessionsApi.md#listsessions) | **GET** /api/v1/sessions | List Sessions created by your account
*SessionsApi* | [**redactSession**](doc//SessionsApi.md#redactsession) | **POST** /api/v1/sessions/{sessionId}/redact | 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.


## Documentation For Models

- [Address](doc//Address.md)
- [Attachments](doc//Attachments.md)
- [CancelSessionResponse](doc//CancelSessionResponse.md)
- [CreateSessionRequest](doc//CreateSessionRequest.md)
- [CreateSessionResponse](doc//CreateSessionResponse.md)
- [DisclosedFields](doc//DisclosedFields.md)
- [DisclosedFieldsRequest](doc//DisclosedFieldsRequest.md)
- [DocumentData](doc//DocumentData.md)
- [ExchangeResultsKeyRequest](doc//ExchangeResultsKeyRequest.md)
- [ExchangeResultsKeyResponse](doc//ExchangeResultsKeyResponse.md)
- [FailureMessage](doc//FailureMessage.md)
- [GetSessionResponseV1](doc//GetSessionResponseV1.md)
- [IDVSessionState](doc//IDVSessionState.md)
- [GetSessionResponse](doc//GetSessionResponse.md)
- [IdentityData](doc//IdentityData.md)
- [IdentityLookupResponse](doc//IdentityLookupResponse.md)
- [Integration](doc//Integration.md)
- [ListProvidersResponse](doc//ListProvidersResponse.md)
- [ListSessionsResponse](doc//ListSessionsResponse.md)
- [OrderDirection](doc//OrderDirection.md)
- [PersonData](doc//PersonData.md)
- [Session](doc//Session.md)
- [SessionFailCode](doc//SessionFailCode.md)
- [SessionOrdering](doc//SessionOrdering.md)
- [SessionState](doc//SessionState.md)
- [ValidationResult](doc//ValidationResult.md)
- [Verification](doc//Verification.md)
- [VerificationFailCode](doc//VerificationFailCode.md)
- [VerificationState](doc//VerificationState.md)


## Documentation For Authorization
Expand Down
2 changes: 1 addition & 1 deletion connect/dart/doc/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**state** | **String** | | [optional]
**postalCode** | **String** | | [optional]
**country** | **String** | | [optional]
**fullAddress** | **String** | | [optional]
**fullAddress** | **String** | The full address as a single string | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
18 changes: 18 additions & 0 deletions connect/dart/doc/Attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TrinsicConnect.model.Attachments

## Load the model package
```dart
import 'package:TrinsicConnect/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**selfie** | **String** | Key to access the selfie image (if relevant) for this verification | [optional]
**documentFront** | **String** | Key to access the document front image (if relevant) for this verification | [optional]
**documentBack** | **String** | Key to access the document back image (if relevant) for this verification | [optional]
**documentPortrait** | **String** | Key to access the document portrait image (if relevant and available) for this verification. Specifically, this is a cropped version of the document front image which includes only the portrait on the document. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


60 changes: 60 additions & 0 deletions connect/dart/doc/AttachmentsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# TrinsicConnect.api.AttachmentsApi

## Load the API package
```dart
import 'package:TrinsicConnect/api.dart';
```

All URIs are relative to *https://connect.trinsic.id*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getAttachment**](AttachmentsApi.md#getattachment) | **GET** /api/v1/attachments/fetch | Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the linked resource. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant.


# **getAttachment**
> getAttachment(attachmentAccessKey)
Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the linked resource. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant.

### Example
```dart
import 'package:TrinsicConnect/api.dart';
// TODO Configure HTTP Bearer authorization: Bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('Bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AttachmentsApi();
final attachmentAccessKey = attachmentAccessKey_example; // String |
try {
api_instance.getAttachment(attachmentAccessKey);
} catch (e) {
print('Exception when calling AttachmentsApi->getAttachment: $e\n');
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**attachmentAccessKey** | **String**| | [optional]

### Return type

void (empty response body)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

5 changes: 4 additions & 1 deletion connect/dart/doc/CreateSessionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import 'package:TrinsicConnect/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**fields** | [**DisclosedFieldsRequest**](DisclosedFieldsRequest.md) | | [optional]
**direct** | **bool** | Whether to create this Session in Direct mode. Direct mode is used to execute a verification against a specific identity provider. Users will not be shown the Connect Widget; therefore, reuse of Connect credentials, selection of an identity provider, and saving a verification for future reuse are not available to the end user in direct mode. Sessions created in direct mode must be created with a `RedirectUrl` specified, and cannot be invoked using the frontend SDK at this time. | [optional]
**redirectUrl** | **String** | The URL to redirect to after the user has completed the identity verification process. If `Direct` is set to `true`, this field is required. | [optional]
**providers** | **List<String>** | The list of allowed identity providers. If not specified, all available providers will be allowed. If `Direct` is `true`, this field must be set, and must have only a single entry. If `Direct` is not specified or is `false`, this field may have any number of entries. | [optional] [default to const []]
**disclosedFields** | [**DisclosedFieldsRequest**](DisclosedFieldsRequest.md) | Specific identity attributes to request. If not provided, all available attributes will be requested. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
3 changes: 2 additions & 1 deletion connect/dart/doc/CreateSessionResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'package:TrinsicConnect/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**session** | [**Session**](Session.md) | |
**session** | [**Session**](Session.md) | The created Acceptance Session |
**launchUrl** | **String** | The URL that should be used to invoke the Acceptance Session on your user's device. If the Session was created in `direct` mode, you should redirect your user's browser to this URL. The frontend SDK cannot presently be used to invoke direct mode Sessions. If the Session was not created in `direct` mode, you should pass this URL to your user's frontend and use the frontend SDK to invoke the Session. This URL is sensitive and as such can only be obtained once. If you need to obtain it again, you will need to create a new Acceptance Session. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 4 additions & 0 deletions connect/dart/doc/DisclosedFields.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Name | Type | Description | Notes
**country** | **bool** | |
**issueDate** | **bool** | |
**expirationDate** | **bool** | |
**documentFront** | **bool** | |
**documentBack** | **bool** | |
**documentPortrait** | **bool** | |
**selfie** | **bool** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 4 additions & 0 deletions connect/dart/doc/DisclosedFieldsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Name | Type | Description | Notes
**country** | **bool** | | [optional]
**issueDate** | **bool** | | [optional]
**expirationDate** | **bool** | | [optional]
**documentFront** | **bool** | | [optional]
**documentBack** | **bool** | | [optional]
**documentPortrait** | **bool** | | [optional]
**selfie** | **bool** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 0 additions & 1 deletion connect/dart/doc/DocumentData.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Name | Type | Description | Notes
**issueDate** | **String** | | [optional]
**expirationDate** | **String** | | [optional]
**issuingCountry** | **String** | | [optional]
**portrait** | **String** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TrinsicConnect.model.VerificationState
# TrinsicConnect.model.ExchangeResultsKeyRequest

## Load the model package
```dart
Expand All @@ -8,6 +8,7 @@ import 'package:TrinsicConnect/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resultsAccessKey** | **String** | The Results Access Key to exchange |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
16 changes: 16 additions & 0 deletions connect/dart/doc/ExchangeResultsKeyResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TrinsicConnect.model.ExchangeResultsKeyResponse

## Load the model package
```dart
import 'package:TrinsicConnect/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**session** | [**Session**](Session.md) | |
**identityData** | [**IdentityData**](IdentityData.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TrinsicConnect.model.GetSessionResponseV1
# TrinsicConnect.model.GetSessionResponse

## Load the model package
```dart
Expand Down
7 changes: 4 additions & 3 deletions connect/dart/doc/IdentityData.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import 'package:TrinsicConnect/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**originatingIntegrationId** | **String** | | [optional]
**person** | [**PersonData**](PersonData.md) | | [optional]
**document** | [**DocumentData**](DocumentData.md) | | [optional]
**originatingProviderId** | **String** | The ID of the integration from which this data originated (eg \"yoti\", \"clear\") | [optional]
**person** | [**PersonData**](PersonData.md) | Identity data of the individual who was verified | [optional]
**document** | [**DocumentData**](DocumentData.md) | Identity data of the document involved in verification, if relevant | [optional]
**attachments** | [**Attachments**](Attachments.md) | Access keys for attachments (eg document/selfie images) | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
15 changes: 15 additions & 0 deletions connect/dart/doc/IdentityLookupResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TrinsicConnect.model.IdentityLookupResponse

## Load the model package
```dart
import 'package:TrinsicConnect/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identityInNetwork** | **bool** | Whether the given phone number is known to have an identity in the network. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 9c4d476

Please sign in to comment.