// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Standard Library using System; // GameKit using AWS.GameKit.Runtime.Models; namespace AWS.GameKit.Editor.AchievementsAdmin { /// /// Interface for the AWS GameKit Achievements feature's admin APIs. /// public interface IAchievementsAdminProvider { /// /// Lists non-hidden achievements, and will call delegates after every page.

/// /// Secret achievements will be included, and developers will be responsible for processing those as they see fit.

/// /// Result status codes returned in the callback function (from GameKitErrors.cs):
/// - GAMEKIT_SUCCESS: The API call was successful.
/// - GAMEKIT_ERROR_NO_ID_TOKEN: The player is not logged in. You must login the player through the Identity and Authentication feature (AwsGameKitIdentity) before calling this method.
/// - GAMEKIT_ERROR_HTTP_REQUEST_FAILED: The backend HTTP request failed. Check the logs to see what the HTTP response code was.
/// - GAMEKIT_ERROR_PARSE_JSON_FAILED: The backend returned a malformed JSON payload. This should not happen. If it does, it indicates there is a bug in the backend code. ///
/// Object containing call preferences /// Delegate that is called while the function is executing, once for each page of achievements /// Delegate that is called once the function has finished executing public void ListAchievementsForGame(ListAchievementsDesc listAchievementsDesc, Action callback, Action onCompleteCallback); /// /// Add all achievements passed to the games dynamoDB achievements table.

/// /// Result status codes returned in the callback function (from GameKitErrors.cs):
/// - GAMEKIT_SUCCESS: The API call was successful.
/// - GAMEKIT_ERROR_ACHIEVEMENTS_ICON_UPLOAD_FAILED: Was unable to take the local path given of an image and upload it to S3.
/// - GAMEKIT_ERROR_REGION_CODE_CONVERSION_FAILED: The current region isn't in our template of shorthand region codes, unknown if the region is supported.
/// - GAMEKIT_ERROR_SIGN_REQUEST_FAILED: Was unable to sign the internal http request with account credentials and info, possibly because they do not have sufficient permissions.
/// - GAMEKIT_ERROR_HTTP_REQUEST_FAILED: The backend HTTP request failed. Check the logs to see what the HTTP response code was.
/// - GAMEKIT_ERROR_PARSE_JSON_FAILED: The backend returned a malformed JSON payload. This should not happen. If it does, it indicates there is a bug in the backend code. ///
/// Object containing a list of achievements to add /// Delegate that is called once the function has finished executing public void AddAchievementsForGame(AddAchievementDesc addAchievementDesc, Action callback); /// /// Deletes the set of achievements metadata from the game's DynamoDB.

/// /// Result status codes returned in the callback function (from GameKitErrors.cs):
/// - GAMEKIT_SUCCESS: The API call was successful.
/// - GAMEKIT_ERROR_REGION_CODE_CONVERSION_FAILED: The current region isn't in our template of shorthand region codes, unknown if the region is supported.
/// - GAMEKIT_ERROR_SIGN_REQUEST_FAILED: Was unable to sign the internal http request with account credentials and info, possibly because they do not have sufficient permissions.
/// - GAMEKIT_ERROR_HTTP_REQUEST_FAILED: The backend HTTP request failed. Check the logs to see what the HTTP response code was.
/// - GAMEKIT_ERROR_PARSE_JSON_FAILED: The backend returned a malformed JSON payload. This should not happen. If it does, it indicates there is a bug in the backend code. ///
/// Object containing a list of achievement identifiers to delete /// Delegate that is called once the function has finished executing public void DeleteAchievementsForGame(DeleteAchievementsDesc deleteAchievementsDesc, Action callback); /// /// Changes the credentials used to sign requests and retrieve session tokens for admin requests.

/// /// No result delegate as this isn't a blocking method, only possible failure is an invalid region code which will be logged. ///
/// Object containing information about the new credentials and the account /// Delegate that is called once the function has finished executing public void ChangeCredentials(ChangeCredentialsDesc changeCredentialsDesc, Action callback); /// /// Checks whether the passed in ID has invalid characters or length.

/// /// No result delegate as this isn't a blocking method. ///
/// achievement identifier to validate /// Delegate that is called once the function has finished executing public void IsAchievementIdValid(string achievementId, Action callback); /// /// Gets the AWS CloudFront url which all achievement icons for this game/environment can be accessed from.

/// /// Result status codes returned in the callback function (from GameKitErrors.cs):
/// - GAMEKIT_SUCCESS: The API call was successful. ///
/// Delegate that is called once the function has finished executing public void GetAchievementIconBaseUrl(Action callback); } }