SDKs
node.js SDK
Type Declarations
3 min
the package provides typescript declarations for classes, methods and properties response types export type activatebundleresponse = activatelicenseresponse\[]; export type activatelicenseresponse = licenseresponsebase & { request string, active boolean, device id number, validity period string | null, is expired boolean, hardware id string, username? string, max license users? number, is floating cloud boolean, floating in use? boolean, license signature string, variables? ({ value string; device id number; variable string; created at string | null; })\[]; } export type activateofflinebundleresponse = { licenses activateofflineresponsesublicense\[]; bundle signature v2 string; } export type activateofflineresponsesublicense = activatelicenseresponse & { date string, offline signature string, }; export type activateofflineresponse = activateofflineresponsesublicense & { date string, offline signature string, license signature v2 string, }; export type addconsumptionresponse = { id number; max consumptions number; allow unlimited consumptions boolean; allow negative consumptions boolean; allow overages boolean; max overages number; reset consumption boolean; consumption period consumptionperiod | undefined; total consumptions number; company { id number; }; }; export type addfeatureconsumptionresponse = { id number; license id number; company { id number; }; total consumptions number; max consumptions number; allow negative consumptions boolean; allow unlimited consumptions boolean; allow overages boolean; max overages number; reset consumption boolean; consumption period consumptionperiod; is floating boolean; is floating cloud boolean; floating timeout? number; floating users? number; }; export type changepasswordresponse = 'password changed'; export type checkbundleresponse = checklicenseresponse\[]; export type checklicensefeatureresponse = { id number; license id number; code string; name string; metadata jsonobjectrequired, metadata string? string; is floating boolean; is floating cloud boolean; floating in use devices? number; expiry date string | null; feature type 'activation'; } | { id number; license id number; code string; name string; metadata jsonobjectrequired, metadata string? string; is floating boolean; is floating cloud boolean; floating in use devices? number; expiry date string | null; feature type 'consumption'; consumption period consumptionperiod; allow negative consumptions boolean; allow overages boolean; allow unlimited consumptions boolean; max consumption number; max overages number; reset consumption boolean; total consumptions number; }; export type checklicenseresponse = licenseresponse & { license active boolean, license enabled boolean, license signature string, license signature v2? string, // isfromplatform only }; export type customerlicenseusersresponse = { company { id number; }; customer customerresponse; users ({ email string | undefined; allow unlimited activations boolean; first name string; initial password string; is active boolean; is initial password boolean; last name string; license id number; max activations number; order id number; order store id string; phone number string; total activations number; })\[]; }; export type deactivatebundleresponse = 'license deactivated'; export type deactivatelicenseresponse = 'license deactivated'; export type deactivateofflinebundleresponse = 'license deactivated'; export type deactivateofflineresponse = 'license deactivated'; export type devicelicensesresponse = formatlicenseresponse & { user? licenseuserresponse }; export type floatingborrowresponse = { borrowed until string | null; max borrow time number; device id number; license id number; company { id number; }; }; export type getdevicevariablesresponse = { id number; created at string; variable? string; value? string; device id number; }\[]; export type getuserlicensesresponse = ({ license formatlicenseresponse, user licenseuserresponse, })\[]; export type installationfileresponse = { id number; version string | undefined; installation file string | undefined; release date string | null; hash md5 string | undefined; environment string; eula link string | undefined; release notes link string | undefined; size string | undefined; requires version string | undefined; channel string | undefined; company { id number; }; }; export type oauthurlresponse = { url string; login type string; }; export type getproductdetailsresponse = { product id number, product name string, short code string, allow trial boolean, trial days number, authorization method authorizationmethod, floating timeout number, allow overages boolean, max overages number, prevent vm boolean, metadata jsonobjectrequired, metadata string? string, company { id number }, latest version? { id number; version string | undefined; full link string | undefined; filename string | undefined; release date string | null; hash md5 string | undefined; environment string; eula link string | undefined; release notes link string | undefined; size string | undefined; requires version string | undefined; channel string | undefined; created at string | null; updated at string | null; enabled boolean; product id number; } | null, custom fields? { id number, name string, default value string }\[] }; export type productsresponse = ({ id number; created at date; product name string; short code string; active boolean; valid duration? string; trial days number; max activations? number; hardware id required boolean; is upgrade boolean; company id number; allow trial boolean; enable maintenance period? boolean; floating users number; is floating boolean; is node locked boolean; is user locked boolean; maintenance duration? string; subscription duration? string; default license type licensetypes, max consumptions number; authorization method authorizationmethod; prevent vm boolean; allow overages boolean; consumption period? consumptionperiod; max overages number; reset consumption boolean; is archived boolean; is floating cloud boolean; floating timeout number; is bundle boolean; metadata jsonobjectrequired, features { id number; code string; feature type 'activation' | 'consumption'; max consumption number; metadata jsonobjectrequired, metadata string? string; }\[]; })\[]; export type ssourlresponse = { url string; openid configuration { \[key string] string | number | boolean; }; }; export type trackdevicevariablesresponse = { variable string; value string; device id number; created at number; }\[]; export type trialexistingresponse = { license type licensetypes, is trial boolean, license string, } | { license type licensetypes, is trial boolean, license user string, }; export type trialnewresponse = { id number; order id number; product id number; created at number; updated at number; active boolean; enable maintenance period boolean; enabled boolean; is floating boolean; is hardware key auth boolean; is trial boolean; license type licensetypes; maintenance duration string | null; max activations number; max transfers number; metadata string string | undefined; metadata jsonobjectrequired, prevent vm boolean; times activated number; trial days number; validity period? string; company { id number; }; licenseproductfeatures ({ id number; product feature id number; max consumption number; allow overages boolean; max overages number; reset consumption boolean; consumption period? consumptionperiod; is floating boolean; is floating cloud boolean; metadata jsonobjectrequired, metadata string? string; floating timeout? number; floating users? number; })\[]; licensecustomfields ({ product custom field id number; value string | undefined; })\[]; is floating cloud boolean; floating users number; floating timeout number; allow overages boolean; max overages number; max consumptions number; valid duration null; consumption period consumptionperiod | null; reset consumption? boolean; grace period number; allow grace period boolean; } & ({ license string; license key string; } | { license user string; initial password string; license user id number | null; max license users number; }); export type trialresponse = trialexistingresponse | trialnewresponse; export type versionsresponse = ({ version string | undefined; release date string | null; })\[]; export type licenseuserresponse = { id number, email string, first name string, is initial password boolean, last name string, phone number string, allow unlimited activations? boolean, max activations? number, total activations? number, }; export type licenseresponsebase = { id number, allow grace period boolean, allow overages boolean, allow unlimited activations boolean, allow offline activation boolean, can borrow boolean, custom fields customfield\[], customer customerresponse, enable maintenance period boolean, floating timeout number, floating users? number | null, grace period number | null, is air gapped boolean, is floating boolean, is floating cloud boolean, is hardware key auth boolean, license key string | undefined, license template id? number | null, maintenance period string | null, max activations number, max borrow time number, max license users? number, max overages number, max transfers? number, metadata jsonobjectrequired, metadata string? string, order store id? string | null, prevent vm boolean, company { id number, }, product details? productdetailsresponse, product features featureresponse\[], start date string | null, times activated number, transfer count number, validity period string | null, is trial boolean, trial days? number, user? licenseuserresponse, license type licensetypes, allow negative consumptions? boolean, allow unlimited consumptions? boolean, consumption period? 'daily' | 'weekly' | 'monthly' | 'annually' | null, max consumptions? number, reset consumption? boolean, total consumptions? number, } export type formatlicenseresponse = licenseresponsebase & { license active boolean, license enabled boolean, }; export type licenseresponse = licenseresponsebase & { borrowed until string | null, floating in use devices? number, is borrowed boolean, is expired boolean, }; export type featureresponse = { id number, code string, name? string, expiry date string | null, is floating boolean, is floating cloud boolean, floating timeout? number, floating users? number, metadata jsonobjectrequired, metadata string? string, } & ({ feature type 'activation', } | { feature type 'consumption', allow negative consumptions boolean, allow overages boolean, allow unlimited consumptions boolean, consumption period 'daily' | 'weekly' | 'monthly' | 'annually', max consumption number, max overages number, reset consumption boolean, total consumptions number, }); export type customerresponse = { email string | undefined; company name string | undefined; reference string | undefined; phone string | undefined; first name string | undefined; last name string | undefined; city string | undefined; postcode string | undefined; state string | undefined; country string | undefined; address string | undefined; customer account { id number; name string; code string; } | null; metadata jsonobjectrequired; metadata string? string; }; export type customfield = { name string, data type 'numer' | 'text' | 'date/time', value string | undefined; }; export type productdetailsresponse = { product id number, product name? string, short code string, authorization method 'license key' | 'user', metadata jsonobjectrequired, metadata string? string, } export type authorizationmethod = 'license key' | 'user'; export type consumptionperiod = 'daily' | 'weekly' | 'monthly' | 'annually'; export enum licensetypes { perpetual = 'perpetual', time limited = 'time limited', consumption = 'consumption', subscription = 'subscription', }; // eslint disable next line @typescript eslint/no empty object type export type jsonobjectrequired = { \[key string] jsonvalue } | {}; type jsonvalue = \| string \| number \| boolean \| null \| jsonvalue\[] \| { \[key string] jsonvalue }; parameters and internal types export type licensespringclientauth = ({ apikey string, sharedkey string, } | { clientid string, clientsecret string, tokenurl string, }); export type licensespringconfig = licensespringclientauth & { apipath string, publickey string, productcode string, appname string, appversion string, filepath string, filename string, graceperiod number, filekey string, airgapkey? string, isguardfileenabled boolean, hardwareidmethod number, sdkversion string, proxy? axiosproxyconfig, loglevel? loglevel, }; export type licensespringapiconfig = licensespringclientauth & omit\<licensespringconfig, 'productcode'>; export type licensespringconfigdef = pick\<licensespringconfig, 'productcode'|'appname'|'appversion'|'airgapkey'> & licensespringclientauth & { apipath? string, proxy? axiosproxyconfig, publickey? string, filename? string, filepath? string, graceperiod? number, filekey? string, isguardfileenabled? boolean, hardwareidmethod? number, loglevel? loglevel, hardwareid? string, }; export type licensespringapiconfigdef = pick\<licensespringconfig, 'appname'|'appversion'|'airgapkey'> & licensespringclientauth & { apipath? string, proxy? axiosproxyconfig, publickey? string, filename? string, filepath? string, graceperiod? number, filekey? string, isguardfileenabled? boolean, hardwareidmethod? number, loglevel? loglevel, hardwareid? string, }; export type licensespringfloatingconfig = { apipath string, appversion string, hardwareidmethod number, sdkversion string, proxy? axiosproxyconfig, }; export type licensespringfloatingconfigdef = omit\<licensespringfloatingconfig, 'hardwareidmethod'|'sdkversion'> & { hardwareidmethod? number, }; type licenseidentificatorkeybased = { license key string, }; type licenseidentificatoruserbased = { username string, }; type licenseactivationidentificatoruserbased = { username string, password string, }; type licenseidentificatoruserssobased = ({ id token string, } | { code string, }) & { customer account code string, }; type licenseidentificatiorrequired = { hardware id string, product string, bundle code? string, license id? number, }; export type managed\<t> = omit\<t, 'product' | 'hardware id'>; / @type {licenseidentificator} an object that identifies a license using either a license key, user credentials or single sign on credentials optionally can include a `license id` property to force a specific license is being selected / export type licenseidentificator = ( xor\<licenseidentificatorkeybased, licenseidentificatoruserbased> ) & licenseidentificatiorrequired; export type licenseactivationidentificator = ( xor\<licenseidentificatorkeybased, licenseactivationidentificatoruserbased, licenseidentificatoruserssobased> ) & licenseidentificatiorrequired; / @type {licenseuser} an object describing a user associated to a specific license / export type licenseuser = { id number, email string, first name string, last name string, phone number string, is initial password boolean, allow unlimited activations boolean, max activations number, total activations number, }; / @type {productdetails} an object describing the basic properties of a product / export type productdetails = { product id number, product name? string, short code string, authorization method 'license key' | 'user', metadata json, }; / @type {customer} an object describing a customer / export type customer = { email string, company name string, reference string, phone string, first name string, last name string, city string, postcode string, state string, country string, address string, customer account string|null, metadata json, }; / @type {customfield} an object describing a custom field these are key value pairs assigned to a product and inherited by that product's licenses they can be overriden on the license level / export type customfield = { name string, data type 'numer' | 'text' | 'date/time', value string, }; / @type {productfeature} an object describing a product feature these are custom attributes assigned to a product and inherited by that product's licenses / export type productfeature = { id number, code string, name string, expiry date string, metadata json, is floating cloud boolean, } & xor<{ feature type 'activation', }, { feature type 'consumption', max consumption number, allow unlimited consumptions boolean, total consumptions number, allow overages number, max overages number, reset consumption boolean, consumption period 'daily' | 'weekly' | 'monthly' | 'annualy' | null, }> & xor<{ is floating false }, { is floating true, floating users number, floating timeout? number, }>; / @type {licensetype} declares the type of license which is always one of the following perpetual a perpetual license does not expire the `is expired` field on such a license will always be `false` note that a perpetual trial license (`is trial` flag is set to `true`) does have an `validity period`, which refers to the end of the trial period time limited has a `validity period` set as a calendar date after the date has passed, the `is expired` flag will be set to `true` subscription uses an external source of truth such as a 3rd party service to determine the state of the license consumption permits usage metering these licenses set a value the vendor wishes to meter, and then record the times that resource has been used includes the following properties `max consumptions`, `total consumptions`, `allow unlimited consumptions`, `allow overages`, `max overages`, `reset consumption` and `consumption period` / export type licensetype = 'perpetual' | 'time limited' | 'consumption' | 'subscription'; export type licensefilepayload = activateofflineresponse & { offline signature string, }; export type licensesaved = licenseresponse & { policy id string; }; export type licensedata = { id number; allow grace period boolean, allow overages? boolean, allow unlimited activations boolean, allow unlimited consumptions? boolean, borrowed until string | null, can borrow boolean, channel string, consumption period? consumptionperiod, custom fields customfield\[], customer customer, device id number, enable maintenance period boolean environment string, eula link string, floating in use devices? number, floating timeout number, floating users? number, grace period number, hardware id string, hash md5 string, installation file string, is air gapped boolean, is borrowed boolean, is expired boolean, is floating cloud boolean, is floating boolean, is hardware key auth boolean, is trial boolean, license active boolean, license enabled boolean, license signature string, license type licensetype, maintenance period string | null, max activations number, max borrow time number, max consumptions? number, max license users number, max overages? number, max transfers? number, metadata json, order store id string, prevent vm boolean, product details productdetails, product features productfeature\[], release date string, release notes link string, requires version string, reset consumption? boolean, size string, start date string | null, times activated number, total consumptions? number, transfer count number, trial days? number, validity period dateiso8601utc | null, version string, } & ({ license key string, } | { user licenseuser, }); export type guardfiledata = { id string, device id string, date created string, }; export type devicevariable = { id number, device id number, created at dateiso8601utc, variable string, value string, }; export type licenseproductfeature = { id number, product feature id number, max consumption number, allow overages boolean, max overages number, reset consumption number, consumption period 'daily' | 'weekly' | 'monthly' | 'annually' | null, expiry date dateiso8601utc | null, is floating boolean, is floating cloud boolean, metadata json, } & xor<({ is floating true } | { is floating cloud true }) & { floating timeout number, floating users number, }, {}>; export type createofflineactivationrequestpayload = { bundle code? string, hardware id string, hostname? string, ip? string, mac address? string, os ver? string, product string, variables? record\<string, any>, vm info? string, } & ({ license key? string, } | { username? string, password? string, }); export type createofflinedeactivationrequestpayload = { bundle code? string, hardware id string, hostname? string, ip? string, mac address? string, os ver? string, product string, vm info? string, consumptions? number, } & ({ license key? string, } | { username? string, password? string, }); export enum hardwareidalgorithm { default = 0, windowshardwarefingerprintid = 1, windowscomputersystemproductid = 2, windowscryptographyid = 3, linuxmachineid = 4, cloudplatformsid = 5, }; / date string in iso 8601 format (always in utc timezone) with optional separators and optional time component, e g "2024 09 27t23 30 48 016z" "2024 09 27 23 30 48 016" "2024 09 27 23 30 48" "2024 09 27 23 30" "2024 09 27" / export type dateinputstring = string; / date string in full iso 8601 format, e g "2024 09 27t23 30 48 016z" note this is always in utc timezone / export type dateiso8601utc = string; / date string in rfc 7231 format, e g "fri, 27 sep 2024 23 30 48 gmt" note this is always in gmt timezone / export type daterfc7231 = string; / length of time expressed in days, months or years, e g 5d, 2m, 3y / export type timelength = string; export type loglevel = 'debug' | 'info' | 'warn' | 'error' | 'off'; floating api v2 types type floatingapiconfig = { apipath string, hardwareid? string, hardwareidmethod? number, loglevel? loglevel, proxy? axiosproxyconfig, certchain string, disableuserauth? boolean, } & ( { apikey string, sharedkey string } | { clientid string, clientsecret string, tokenurl string } ); type anyjson = record\<string, any>; type rfc3339 = string; // rfc3339 (utc), e g "2025 06 01t12 00 00z" interface pingresponse { message string; version string; } interface loginresponse { token string; expires at rfc3339; expires in number; // seconds (float) } interface user { id number; username string; role 'admin' | 'user'; created at rfc3339; updated at rfc3339; } interface loginuser { username string; password string; } interface changepasswordreq { username string; old password string; new password string; } interface setpasswordreq { password string; } type authmesuccessbody = { expires at? rfc3339; expiresat? rfc3339; \[key string] unknown; }; interface cloudconfig { airgappublickey string; apikey string; apiprefix string; baseurl string; cacertificatepath string; certificatepath string; clientid string; clientsecret string; disablesync boolean; id number; privatekeypath string; serverpublickey string; sharedkey string; syncintervalhours number; syncintervalminutes number; usehardwarekey boolean; useoauth boolean; } interface cloudconfigupdate { airgap public key? string; api key? string; api prefix? string; base url? string; client id? string; client secret? string; server public key? string; shared key? string; use oauth? boolean; } interface addlicenserequest { product? string; license key? string; } interface company { id number; } interface licenseuser { id number; email string; is active? boolean; first name string; last name string; phone number string; is initial password boolean; initial password? string; license id? number; order store id? string; order id? number; max activations number; allow unlimited activations boolean; total activations number; } interface productdetails { product id number; product name string; short code string; authorization method string; metadata anyjson | null; company id number; trial days? number; allow overages? boolean; max overages? number; prevent vm? boolean; floating timeout? number; validity period? string | null; } interface customeraccount { code string; id number; name string; } interface customer { email string; first name string; last name string; company name string; phone string; reference string; address string; postcode string; city string; country string; state string; customer account? customeraccount; metadata anyjson | null; } interface customfield { name string, value string, data type string, } interface licensedata { product? string; hardware id? string; policy id number; // air gapped is licensed? boolean; is unlicensed copy? boolean; is valid? boolean; is dirty? boolean; local consumptions? number; last check? rfc3339; last usage date? rfc3339; grace period start? rfc3339; floating vp? rfc3339; custom fields customfield\[] | null; user data? record\<string, string>; metadata anyjson | null; // license info id number; license active boolean; license enabled boolean; is expired boolean; license type string; start date rfc3339 | null; signature? string; is trial? boolean; trial days number; validity period rfc3339 | null; maintenance period rfc3339 | null; // consumption allow overages boolean; max overages number; max consumptions number; total consumptions number; allow unlimited consumptions boolean; allow negative consumptions? boolean; reset consumption boolean; consumption period string | null; // floating is floating cloud boolean; is floating boolean; floating timeout number; floating in use devices number; floating users number; // borrowing / transfer max borrow time number; prevent vm boolean; is air gapped boolean; times activated number; max activations number; transfer count number; max transfers number; is borrowed boolean; offline activated? boolean; grace period number; // bundle is bundle activated? boolean; bundle license id? number; bundle licenses? licensedata\[]; is bundle? boolean; customer customer; user? licenseuser; product details productdetails; license features licensefeature\[]; company? company; variables devicevariable\[]; channel string; enable maintenance period boolean; environment string; eula link string; hash md5 string; installation file string; is hardware key auth boolean; offline signature string; license signature v2 string; release date string; release notes link string; requires version string; size string; version string; max license users number; allow grace period boolean; allow unlimited activations boolean; can borrow boolean; device id number; license signature string; order store id string; } interface devicevariable { id? number; name? string; value? string; variable? string; created at rfc3339; device id? number; } interface licensefeature { id number; code string; name string; feature type string; expiry date string; max consumption number; total consumptions number; local consumptions? number; allow overages boolean; max overages number; allow unlimited consumptions boolean; allow negative consumptions? boolean; reset consumption boolean; consumption period string | null; is floating cloud boolean; is floating boolean; floating timeout? number; floating users? number; floating in use devices? number; floating start? rfc3339; floating end? rfc3339; metadata anyjson | null; } interface activatebundleresponse { status 'ok'; message 'bundle added'; license ids number\[]; bundle license id number; } interface deactivatebundleresponse { status 'ok'; message 'bundle deactivated'; } interface floatinguser { id? number; // ommited? username string; email string; license id number; product string; product id number; floating amount number; floating end time rfc3339; created at rfc3339; last check rfc3339; vendor id number; is borrowed boolean; } interface activatelicenseresponse { status 'ok'; message 'license added'; product string; license id number; } interface addconsumptionrequest { consumptions number; allow overages? boolean; max overages? number; } interface consumptionresponse { id number; max consumptions number; total consumptions number; allow unlimited consumptions boolean; allow negative consumptions boolean; allow overages boolean; max overages number; reset consumption boolean; consumption period string | null; license signature string; } interface featureconsumptionresponse extends consumptionresponse { is floating cloud boolean; is floating boolean; floating timeout number; floating users number; } interface addfeatureconsumptionrequest { consumptions number; feature string; } interface registerfeaturerequest { username string; feature? string; email? string; } interface unregisterfeaturerequest { username? string; feature? string; } interface allfeatureusersrequest { feature? string; } interface registerrequestbody { username string, role? string, password string, } interface registerrequestbodyinternal { username string, role string, password string, } interface usernamerequest { username string; } interface borrowuserrequest { username string; borrowed until? rfc3339; } interface borrowresponse { license id? number; device id? string; borrowed until? string; license signature? string; max borrow time? number; } interface offlinerequestinput { product? string; license key? string; } interface bundlerequest { bundle string; license key string; } interface generateofflinerequestresponse { status 'ok'; request data string; // base64 payload } interface generateairgaprequestbody { initialization code string; license key string; product string; } interface generateairgapdeactivationrequestbody { initialization code string; license key string; } interface deactivateairgaprequestbody { confirmation code string; license key string; } interface syncconfig { enabled boolean; hours number; minutes number; } interface syncenablereq { enabled boolean; hours? number; minutes? number; } interface floatingfeatureuser { feature id number; username string; email string; license id number; feature string; product string; floating amount number; floating end time rfc3339; created at rfc3339; last check rfc3339; vendor code string; vendor id number; } interface featurecodeid { feature id number; feature code string; users list floatingfeatureuser\[]; } type allfeatureusersresponse = featurecodeid\[]; interface registerfeatureresponse extends licensefeature { license id number, } interface featurereleasedallresponse { status 'ok'; message 'all features released'; license id number; feature string; } interface unregisterallusersresponse { status 'ok'; message 'all users unregistered'; license id number; } interface airgapactivationcoderesponse { status 'ok'; hardware id string, activation code string, } interface airgapdeactivationcoderesponse { status 'ok'; hardware id string, deactivation code string, } interface airgapedeactivatedresponse { status 'ok'; message 'license deactivated'; } interface airgapactivatedresponse { status 'ok'; message 'airgap license activated'; license id number; }