listContactReferences method

Future<ListContactReferencesResponse> listContactReferences({
  1. required String contactId,
  2. required String instanceId,
  3. required List<ReferenceType> referenceTypes,
  4. String? nextToken,
})

This API is in preview release for Connect Customer and is subject to change.

For the specified referenceTypes, returns a list of references associated with the contact. References are links to documents that are related to a contact, such as emails, attachments, or URLs.

May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter contactId : The identifier of the initial contact.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter referenceTypes : The type of reference.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Implementation

Future<ListContactReferencesResponse> listContactReferences({
  required String contactId,
  required String instanceId,
  required List<ReferenceType> referenceTypes,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    'referenceTypes': referenceTypes.map((e) => e.value).toList(),
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/contact/references/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(contactId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListContactReferencesResponse.fromJson(response);
}