UNPKG

@bitzonegaming/roleplay-engine-sdk

Version:
225 lines (224 loc) 13.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CharacterApi = void 0; class CharacterApi { constructor(client) { this.client = client; } /** * Creates a new character nationality<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Create character nationality * @param {CreateCharacterNationalityRequest} request * @param {*} [options] Override http request option. * @throws {EngineError} */ createCharacterNationality(request, options) { return this.client.post({ url: 'characters/nationalities', data: request, options, }); } /** * Retrieves all character nationalities<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:read:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: read:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Get character nationalities * @param {Object} [query] Query parameters * @param {boolean} [query.noCache] If `true`, bypass server cache and fetch fresh data. * @param {boolean} [query.enabled] Filter by enabled status. * @param {*} [options] Override http request option. * @throws {EngineError} */ getCharacterNationalities(query, options) { return this.client.get({ url: 'characters/nationalities', query, options, }); } /** * Retrieves a character nationality by its unique identifier<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:read:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: read:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Get character nationality by ID * @param {string} characterNationalityId * @param {Object} [query] Query parameters * @param {boolean} [query.noCache] If `true`, bypass server cache and fetch fresh data. * @param {*} [options] Override http request option. * @throws {EngineError} */ getCharacterNationalityById(characterNationalityId, query, options) { return this.client.get({ url: `characters/nationalities/${characterNationalityId}`, query, options, }); } /** * Enables a character nationality, making it available for use<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Enable character nationality * @param {string} characterNationalityId * @param {*} [options] Override http request option. * @throws {EngineError} */ enableCharacterNationality(characterNationalityId, options) { return this.client.put({ url: `characters/nationalities/${characterNationalityId}/enabled`, options, }); } /** * Disables a character nationality, making it unavailable for use<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Disable character nationality * @param {string} characterNationalityId * @param {*} [options] Override http request option. * @throws {EngineError} */ disableCharacterNationality(characterNationalityId, options) { return this.client.put({ url: `characters/nationalities/${characterNationalityId}/disabled`, options, }); } /** * Updates the order of a character nationality<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Update character nationality order * @param {string} characterNationalityId * @param {UpdateCharacterNationalityOrderRequest} request * @param {*} [options] Override http request option. * @throws {EngineError} */ updateCharacterNationalityOrder(characterNationalityId, request, options) { return this.client.put({ url: `characters/nationalities/${characterNationalityId}/order`, data: request, options, }); } /** * Creates a new character gender<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Create character gender * @param {CreateCharacterNationalityRequest} request * @param {*} [options] Override http request option. * @throws {EngineError} */ createCharacterGender(request, options) { return this.client.post({ url: 'characters/genders', data: request, options, }); } /** * Retrieves all character genders<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:read:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: read:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Get character genders * @param {Object} [query] Query parameters * @param {boolean} [query.noCache] If `true`, bypass server cache and fetch fresh data. * @param {boolean} [query.enabled] Filter by enabled status. * @param {*} [options] Override http request option. * @throws {EngineError} */ getCharacterGenders(query, options) { return this.client.get({ url: 'characters/genders', query, options, }); } /** * Retrieves a character gender by its unique identifier<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:read:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: read:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Get character gender by ID * @param {string} characterGenderId * @param {Object} [query] Query parameters * @param {boolean} [query.noCache] If `true`, bypass server cache and fetch fresh data. * @param {*} [options] Override http request option. * @throws {EngineError} */ getCharacterGenderById(characterGenderId, query, options) { return this.client.get({ url: `characters/genders/${characterGenderId}`, query, options, }); } /** * Enables a character gender, making it available for use<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Enable character gender * @param {string} characterGenderId * @param {*} [options] Override http request option. * @throws {EngineError} */ enableCharacterGender(characterGenderId, options) { return this.client.put({ url: `characters/genders/${characterGenderId}/enabled`, options, }); } /** * Disables a character gender, making it unavailable for use<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Disable character gender * @param {string} characterGenderId * @param {*} [options] Override http request option. * @throws {EngineError} */ disableCharacterGender(characterGenderId, options) { return this.client.put({ url: `characters/genders/${characterGenderId}/disabled`, options, }); } /** * Updates the order of a character gender<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:configuration<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:configuration<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Update character gender order * @param {string} characterGenderId * @param {UpdateCharacterGenderOrderRequest} request * @param {*} [options] Override http request option. * @throws {EngineError} */ updateCharacterGenderOrder(characterGenderId, request, options) { return this.client.put({ url: `characters/genders/${characterGenderId}/order`, data: request, options, }); } /** * Updates the basic information of a character<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:character<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:character<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Update character basic info * @param {string} characterId * @param {UpdateCharacterBasicInfoRequest} request * @param {*} [options] Override http request option. * @throws {EngineError} */ updateCharacterBasicInfo(characterId, request, options) { return this.client.patch({ url: `characters/${characterId}/basic-info`, data: request, options, }); } /** * Activates a character, making it available for gameplay<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:character<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:character<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Activate character * @param {string} characterId * @param {*} [options] Override http request option. * @throws {EngineError} */ activateCharacter(characterId, options) { return this.client.put({ url: `characters/${characterId}/activated`, options, }); } /** * Deactivates a character, making it unavailable for gameplay<br/>This endpoint performs server-level operations. The token does not need to be associated with any account or character.<br/><b>Account Policies</b>: account_policy:write:character<br/><br/> This endpoint requires authorization, and supports following token types:<br/>🔓 [API Key] <b>Required Scopes</b>: write:character<br/>🔓 [SSO Token]<br/>🔓 [Access Token]<br/>🔓 [Session Token] * @summary Deactivate character * @param {string} characterId * @param {*} [options] Override http request option. * @throws {EngineError} */ deactivateCharacter(characterId, options) { return this.client.put({ url: `characters/${characterId}/deactivated`, options, }); } } exports.CharacterApi = CharacterApi;