Tracking changes for PteroJS and extensions from v2 onwards (using SemVer 2).
WebSocketManager#getAuth()
method for getting websocket auth datatype
query parameter forClientServerManager#fetch()
(takes "admin", "admin-all", or "owner")
- Switch
Shard
class to useWebSocketManager#getAuth()
- Fix & ensure
NodeAllocationManager#fetchAvailable()
fetches all allocations
A lot of bug fixes and some new useful QOL features for the library and developers.
Dict#update()
updates the dict instance in place with another dictShard#request()
method for making sendable requests to the serverWebSocketManager#broadcast()
method to broadcast events to all shards and collect the responsesApplicationServer#container
propertyClientServer#internalId
propertyClientServer#eggFeatures
optional propertyClientServer#invocation
propertyClientServer#transferring
boolean propertyUserBuilder
classServerBuilder
classNodeBuilder
class- Activity logs support (
Account#fetchActivities()
) - SSH keys support (
Account#fetchSSHKeys()
,Account#createSSHKey()
,Account#removeSSHKey()
) - Jest testing instead of custom testing
- Additional documentation and examples for application API
- Support including servers for
UserManager
- Documentation with examples for the application and client API
- Include
token
field from metadata when creating API keys - Cache metadata from all
fetch()
methods in the application API - Support
origin
header for websocket connections
- All managers with caches now uses the
Dict#update()
method ClientServer#state
->ClientServer#status
matches API data- Overloaded
PteroClient#addSocketServer()
to not return an array if only one ID is present
Node#daemon
now shows the actual daemon data objectcaseConv
functions handling arrays incorrectly- Node creation method now uses the correct endpoint
NodeCreationOptions
is now updated to use actual creation options in the APIApplicationServerManager#updateBuild()
applies missing limits and feature limitsUserManager#query()
now uses the correct endpoint (previously servers)- Export missing type/interface members for documentation
UserUpdateOptions#externalId
now acceptsnull
to remove the external IDUserManager#update()
now checks ifexternalId
is set before defaulting
A huge turning point for the PteroJS library, having a new TypeScript look, updated classes/methods, and proper documentation. Thanks to everyone that contributed! :D
- Global types and interfaces to
/src/common
- Expandable query option types
- "page" and "perPage" query options support
BaseManager
with abstract query properties- Additional parse options for
caseConv
util - Support sometimes "meta" property for API errors
FileManager#getDownloadURL()
replaces olddownload()
methodFileManager#getUploadURL()
replaces oldupload()
methodFileManager#chmod()
methodFileChmodData
type for chmod requestsNodeManager#fetchDeployable()
method with typesBackupManager#getDownloadURL()
replaces olddownload()
methodWebSocketManager#active
for checking active created shardsClientServerManager#fetchResources()
methodClientServer#fetchResources()
method- Support for
skipScripts
,oomDisabled
,allocation.additional
,deploy
, andstartOnCompletion
with server creation - Added warning doc for
oomDisabled
broken behaviour ClientServerManager#setDockerImage()
methodClientServer#setDockerImage()
methodClientServerManager#rename()
methodClientServer#rename()
methodClientServerManager#reinstall()
methodClientServer#reinstall()
methodValidationError
class (implemented in managers), will come with additional uses in future versions- Guard API requests from unexpected
null_resource
response objects Dict#clone()
method for deep cloning the existing dict- Typings for
RequestManager
events - Static getters for grouped permissions
- Support startup viewing and modification endpoints
ClientServerManager#fetchStartup()
methodClientServer#fetchStartup()
methodClientServerManager#setVariable()
methodClientServer#setVariable()
method- Support
external
option for fetching application servers by external ID PteroClient#fetchPermissions()
method to return the raw permission group descriptors (separate from thePermissions
utility class).
- All application and client managers now extend
BaseManager
- Renamed user classes to reflect the API
PteroUser
is nowUser
PteroSubUser
is nowSubUser
ClientUser
is nowAccount
- Renamed
ClientServerManager#pageData
to#meta
PteroFile
->File
(typing change)FileManager#download()
now downloads the fileBackupManager#download()
now downloads the backupRequestManager
uses axios with internal parsing- Nost structures now use its manager for API requests in its group
- Changeed
env
toenvironment
for server creation - Changed
image
todockerImage
for server creation Permissions#has()
is now split intohasAny()
andhasAll()
- Refactored
Permissions
andFlags
to only use the API's string-based permissions. Numbers wont be parsed anymore Permissions#raw
->Permissions#value
Account#get2faCode()
->Account#get2FACode()
Account#enable2fa()
->Account#enable2FA()
Account#disable2fa()
->Account#disable2FA()
UserManager#fetchExternal()
: useUserManager#fetch()
with theexternal
option instead
- Useless value return types (e.g.
Promise<true>
which should bePromise<void>
) - Most union string/number & instance type parameters
ClientServer#addWebsocket()
: use the client directly insteadFile#isEditable
: never existed in the API, issue from the docsWebSocketManager#readyAt
: no longer centralised, replaced byactive
NestEggsManager#for()
: use cache methods insteadApplicationServer#delete()
: conflicts with cache; use manager insteadNode#delete()
: conflicts with cache; use manager insteadSchedule#delete()
: conflicts with cache; use manager insteadPermissionResolvable
type: all permissions are strings now making it redundantPermissions#toArray()
: redundant; usePermissions#value
insteadPermissions#toStrings()
: redundant; all permission values are now stringsPermissions#fromStrings():
redundant; dittoPermissions#DEFAULT
: control permissions are now grouped underPermissions#CONTROL
- Export all endpoints properly
Dict#join()
now actually joins the other dicts to the existing dict