From 8f26ccfefedb9dae730e7c0451d64ea749dddf37 Mon Sep 17 00:00:00 2001 From: "Jordan.#2139" <65438497+Jordan2139@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:23:11 -0500 Subject: [PATCH 1/3] Add new actions for banning and kicking accounts --- src/libs/rest/src/lib/REST.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libs/rest/src/lib/REST.ts b/src/libs/rest/src/lib/REST.ts index d3ec614..9454dfb 100644 --- a/src/libs/rest/src/lib/REST.ts +++ b/src/libs/rest/src/lib/REST.ts @@ -233,6 +233,18 @@ export class REST extends EventEmitter { newStageId: args[2], }; } + case 'BAN_ACCOUNT': { + return { + apiId: args[0], + accId: args[1], + }; + } + case 'KICK_ACCOUNT': { + return { + apiId: args[0], + accId: args[1], + }; + } default: { return args; } From 4a3537785a89969be04249d397860a3cd3e215cd Mon Sep 17 00:00:00 2001 From: "Jordan.#2139" <65438497+Jordan2139@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:24:15 -0500 Subject: [PATCH 2/3] Bump version to 1.0.24 in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83e923b..9453fc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sonoransoftware/sonoran.js", - "version": "1.0.23", + "version": "1.0.24", "description": "Sonoran.js is a library that allows you to interact with the Sonoran CAD and Sonoran CMS API. Based off of and utilizes several Discord.js library techniques for ease of use.", "main": "dist/index.js", "types": "dist/index.d.ts", From 8229e6d50cd0b9670de7272de1fcbe921fea5241 Mon Sep 17 00:00:00 2001 From: "Jordan.#2139" <65438497+Jordan2139@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:26:35 -0500 Subject: [PATCH 3/3] Update AllAPITypesType with new API types --- src/libs/rest/src/lib/utils/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/rest/src/lib/utils/constants.ts b/src/libs/rest/src/lib/utils/constants.ts index b4021f9..0d1ea9d 100644 --- a/src/libs/rest/src/lib/utils/constants.ts +++ b/src/libs/rest/src/lib/utils/constants.ts @@ -447,7 +447,7 @@ function formatForAll(array: APITypeData[], product: productEnums): AllAPITypeDa export const AllAPITypes: AllAPITypeData[] = [ ...formatForAll(GeneralCADAPITypes, productEnums.CAD), ...formatForAll(CivilianCADAPITypes, productEnums.CAD), ...formatForAll(EmergencyCADAPITypes, productEnums.CAD), ...formatForAll(GeneralCMSAPITypes, productEnums.CMS), ...formatForAll(ServersCMSAPITypes, productEnums.CMS), ...formatForAll(EventsCMSAPITypes, productEnums.CMS), ...formatForAll(FormsCMSAPITypes, productEnums.CMS) ]; -export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'EDIT_RECORD' | 'REMOVE_RECORD' | 'LOOKUP_INT' | 'LOOKUP' | 'GET_ACCOUNT' | 'CHECK_APIID' | 'APPLY_PERMISSION_KEY' | 'SET_ACCOUNT_PERMISSIONS' | 'BAN_USER' | 'VERIFY_SECRET' | 'AUTH_STREETSIGNS' | 'SET_POSTALS' | 'SEND_PHOTO' | 'GET_CHARACTERS' | 'NEW_CHARACTER' | 'EDIT_CHARACTER' | 'REMOVE_CHARACTER' | 'GET_IDENTIFIERS' | 'MODIFY_IDENTIFIER' | 'SET_IDENTIFIER' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_ACTIVE_UNITS' | 'KICK_UNIT' | 'NEW_DISPATCH' | 'ATTACH_UNIT' | 'DETACH_UNIT' | 'SET_CALL_POSTAL' | 'SET_CALL_PRIMARY' | 'ADD_CALL_NOTE' | 'CLOSE_CALL' | 'UNIT_LOCATION' | 'SET_STREETSIGN_CONFIG' | 'UPDATE_STREETSIGN' | 'GET_COM_ACCOUNT' | 'GET_DEPARTMENTS' | 'GET_SUB_VERSION' | 'CHECK_COM_APIID' | 'VERIFY_WHITELIST' | 'CLOCK_IN_OUT' | 'FULL_WHITELIST' | 'GET_ACCOUNT_RANKS' | 'SET_ACCOUNT_RANKS' | 'RSVP' | 'CHANGE_FORM_STAGE'; +export type AllAPITypesType = 'GET_SERVERS' | 'SET_SERVERS' | 'GET_VERSION' | 'SET_PENAL_CODES' | 'SET_API_ID' | 'GET_TEMPLATES' | 'NEW_RECORD' | 'EDIT_RECORD' | 'REMOVE_RECORD' | 'LOOKUP_INT' | 'LOOKUP' | 'GET_ACCOUNT' | 'CHECK_APIID' | 'APPLY_PERMISSION_KEY' | 'SET_ACCOUNT_PERMISSIONS' | 'BAN_USER' | 'VERIFY_SECRET' | 'AUTH_STREETSIGNS' | 'SET_POSTALS' | 'SEND_PHOTO' | 'GET_CHARACTERS' | 'NEW_CHARACTER' | 'EDIT_CHARACTER' | 'REMOVE_CHARACTER' | 'GET_IDENTIFIERS' | 'MODIFY_IDENTIFIER' | 'SET_IDENTIFIER' | 'UNIT_PANIC' | 'UNIT_STATUS' | 'GET_BLIPS' | 'ADD_BLIP' | 'MODIFY_BLIP' | 'REMOVE_BLIP' | '911_CALL' | 'REMOVE_911' | 'GET_CALLS' | 'GET_ACTIVE_UNITS' | 'KICK_UNIT' | 'NEW_DISPATCH' | 'ATTACH_UNIT' | 'DETACH_UNIT' | 'SET_CALL_POSTAL' | 'SET_CALL_PRIMARY' | 'ADD_CALL_NOTE' | 'CLOSE_CALL' | 'UNIT_LOCATION' | 'SET_STREETSIGN_CONFIG' | 'UPDATE_STREETSIGN' | 'GET_COM_ACCOUNT' | 'GET_DEPARTMENTS' | 'GET_SUB_VERSION' | 'CHECK_COM_APIID' | 'VERIFY_WHITELIST' | 'CLOCK_IN_OUT' | 'FULL_WHITELIST' | 'GET_ACCOUNT_RANKS' | 'SET_ACCOUNT_RANKS' | 'RSVP' | 'CHANGE_FORM_STAGE' | 'KICK_ACCOUNT' | 'BAN_ACCOUNT'; export interface CMSServerAPIStruct { id: number;