Type Declarations
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
Floating API v2 Types
Was this helpful?