registerPackageVersion method
Registers a package version.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ValidationException.
Parameter packageId :
A package ID.
Parameter packageVersion :
A package version.
Parameter patchVersion :
A patch version.
Parameter markLatest :
Whether to mark the new version as the latest version.
Parameter ownerAccount :
An owner account.
Implementation
Future<void> registerPackageVersion({
required String packageId,
required String packageVersion,
required String patchVersion,
bool? markLatest,
String? ownerAccount,
}) async {
final $payload = <String, dynamic>{
if (markLatest != null) 'MarkLatest': markLatest,
if (ownerAccount != null) 'OwnerAccount': ownerAccount,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/packages/${Uri.encodeComponent(packageId)}/versions/${Uri.encodeComponent(packageVersion)}/patch/${Uri.encodeComponent(patchVersion)}',
exceptionFnMap: _exceptionFns,
);
}