listConnectionInvitations method

Future<ListConnectionInvitationsResponse> listConnectionInvitations({
  1. required String catalog,
  2. ConnectionType? connectionType,
  3. int? maxResults,
  4. String? nextToken,
  5. List<String>? otherParticipantIdentifiers,
  6. ParticipantType? participantType,
  7. InvitationStatus? status,
})

Lists connection invitations for the partner account, with optional filtering by status, type, and other criteria.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : The catalog identifier for the partner account.

Parameter connectionType : Filter results by connection type (e.g., reseller, distributor, technology partner).

Parameter maxResults : The maximum number of connection invitations to return in a single response.

Parameter nextToken : The token for retrieving the next page of results in paginated responses.

Parameter otherParticipantIdentifiers : Filter results by specific participant identifiers.

Parameter participantType : Filter results by participant type (inviter or invitee).

Parameter status : Filter results by invitation status (pending, accepted, rejected, canceled, expired).

Implementation

Future<ListConnectionInvitationsResponse> listConnectionInvitations({
  required String catalog,
  ConnectionType? connectionType,
  int? maxResults,
  String? nextToken,
  List<String>? otherParticipantIdentifiers,
  ParticipantType? participantType,
  InvitationStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralAccount.ListConnectionInvitations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      if (connectionType != null) 'ConnectionType': connectionType.value,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (otherParticipantIdentifiers != null)
        'OtherParticipantIdentifiers': otherParticipantIdentifiers,
      if (participantType != null) 'ParticipantType': participantType.value,
      if (status != null) 'Status': status.value,
    },
  );

  return ListConnectionInvitationsResponse.fromJson(jsonResponse.body);
}