Floating API
class FloatingAPIv2 {
constructor(config: FloatingAPIConfig);
get tokenExpiryDate(): Dayjs;
setLogLevel(level: LogLevel);
getHardwareID(algorithm: HardwareIdAlgorithm = this.config.hardwareIDMethod ?? 0): string;
async ping(): boolean;
async authAddUser(user: User);
async authChangePassword(body: ChangePasswordReq): boolean;
async authInitialPassword(body: SetPasswordReq): boolean;
async authLogin(body: LoginUser): LoginResponse;
async authUsersList(): User[];
async authUserDelete(id: number): boolean;
async getConfig(): CloudConfig;
async patchConfig(input: CloudConfigUpdate): boolean;
async bundleActivate(body: BundleRequest): ActivateBundleResponse;
async bundleDeactivate(id: number): DeactivateBundleResponse;
async bundleOfflineActivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;
async bundleOfflineDeactivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;
async bundleOfflineActivationUpload(product: string, file: File | Blob): ActivateBundleResponse;
async listLicenses(params?: { product?: string }): LicenseData[];
async activateLicense(body: AddLicenseRequest): ActivateLicenseResponse;
async getLicenseById(id: string): LicenseData;
async deactivateLicense(id: number): boolean;
async addLicenseConsumption(id: number, body: AddConsumptionRequest): ConsumptionResponse;
async addFeatureConsumption(id: number, body: AddFeatureConsumptionRequest): FeatureConsumptionResponse;
async listLicenseFeatureUsers(id: number): AllFeatureUsersResponse;
async registerFeatureForUser(id: number, body: RegisterFeatureRequest): RegisterFeatureResponse;
async releaseFeatureForUser(id: number, body: UnregisterFeatureRequest): boolean;
async releaseFeatureForAllUsers(id: number, body: AllFeatureUsersRequest): FeatureReleasedAllResponse;
async listLicenseUsers(id: number): FloatingUser[];
async registerUserToLicense(id: number, body: RegisterRequestBody): LicenseData;
async unregisterUserFromLicense(id: number, body: UsernameRequest): boolean;
async unregisterAllUsersFromLicense(id: number): UnregisterAllUsersResponse;
async borrowLicenseForUser(id: number, body: BorrowUserRequest): BorrowResponse;
async offlineActivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;
async offlineActivationUpload(product: string, file: File | Blob): ActivateBundleResponse | ActivateLicenseResponse;
async offlineDeactivationGenerate(body: OfflineRequestInput): GenerateOfflineRequestResponse;
async airgapGenerateActivation(body: GenerateAirgapRequestBody): AirgapActivationCodeResponse;
async airgapGenerateDeactivation(body: GenerateAirgapDeactivationRequestBody): AirgapDeactivationCodeResponse;
async airgapDeactivate(body: DeactivateAirgapRequestBody): AirgapeDeactivatedResponse;
async airgapActivate(file: File | Blob, jsonFile: File | Blob): AirgapActivatedResponse;
async getSyncConfig(): SyncConfig;
async setSyncMode(body: SyncEnableReq): boolean;
async triggerSync(): boolean;
}
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
}
);
Last updated
Was this helpful?