/** * @class HostLicenseMeterAttribute * @constructor */ export declare class HostLicenseMeterAttribute { /** The name of the meter attribute. */ name: string; /** The allowed uses of the meter attribute. A value of -1 indicates unlimited allowed uses. */ allowedUses: number; /** The total uses of the meter attribute. */ totalUses: number; /** The gross uses of the meter attribute. */ grossUses: number; /** * @param name The name of the meter attribute. * @param allowedUses The allowed uses of the meter attribute. A value of -1 indicates unlimited allowed uses. * @param totalUses The total uses of the meter attribute. * @param grossUses The gross uses of the meter attribute. */ constructor(name: string, allowedUses: number, totalUses: number, grossUses: number); } /** * @class PermissionFlags * @constructor */ export declare const PermissionFlags: { LF_USER: number; LF_ALL_USERS: number; }; /** * @class HostProductVersionFeatureFlag * @constructor */ export declare class HostProductVersionFeatureFlag { /** The name of the feature flag. */ name: string; /** Status of the feature flag. */ enabled: boolean; /** Data associated to the feature flag. */ data: string; /** * @param name The name of the feature flag. * @param enabled Status of the feature flag. * @param data Data associated to the feature flag. */ constructor(name: string, enabled: boolean, data: string); } /** * @class HostFeatureEntitlement * @constructor * @property {string} featureName The name of the feature. * @property {string} featureDisplayName The display name of the feature. * @property {string} value Effective value of the feature. Contains the overridden value if set at the license level; otherwise, the entitlement set value. * @property {string} baseValue Default value of the feature defined in the entitlement set; empty for features not inherited from an entitlement set. * @property {number} expiresAt The timestamp at which license feature entitlement will expire. */ export declare class HostFeatureEntitlement { featureName: string; featureDisplayName: string; value: string; baseValue: string; expiresAt: number; constructor(featureName: string, featureDisplayName: string, value: string, baseValue: string, expiresAt: number); } /** * @class HostConfig * @constructor */ export declare class HostConfig { maxOfflineLeaseDuration: number; constructor(maxOfflineLeaseDuration: number); } /** * @class LexFloatClient */ export declare class LexFloatClient { /** * Sets the product id of your application. * * @param {string} productId the unique product id of your application as mentioned on * the product page in the dashboard. * @throws {LexFloatClientException} */ static SetHostProductId(productId: string): void; /** * Sets the network address of the LexFloatServer. * * The url format should be: http://[ip or hostname]:[port] * * @param {string} hostUrl url string having the correct format * @throws {LexFloatClientException} */ static SetHostUrl(hostUrl: string): void; /** * Sets the renew license callback function. * * Whenever the license lease is about to expire, a renew request is sent to * the server. When the request completes, the license callback function * gets invoked with one of the following status codes: * * LexFloatStatusCodes.LF_OK, LexFloatStatusCodes.LF_E_INET, LexFloatStatusCodes.LF_E_LICENSE_EXPIRED_INET, LexFloatStatusCodes.LF_E_LICENSE_NOT_FOUND, * LexFloatStatusCodes.LF_E_CLIENT, LexFloatStatusCodes.LF_E_IP, LexFloatStatusCodes.LF_E_SERVER, LexFloatStatusCodes.LF_E_TIME, * LexFloatStatusCodes.LF_E_SERVER_LICENSE_NOT_ACTIVATED,LexFloatStatusCodes.LF_E_SERVER_TIME_MODIFIED, * LexFloatStatusCodes.LF_E_SERVER_LICENSE_SUSPENDED, LexFloatStatusCodes.LF_E_SERVER_LICENSE_EXPIRED, * LexFloatStatusCodes.LF_E_SERVER_LICENSE_GRACE_PERIOD_OVER * * @param {function(int)} licenseCallback callback function * @throws {LexFloatClientException} */ static SetFloatingLicenseCallback(licenseCallback: () => number): void; /** * Sets the floating client metadata. * * The metadata appears along with the license details of the license in * LexFloatServer dashboard. * * @param {string} key string of maximum length 256 characters with utf-8 encoding. * encoding. * @param {string} value string of maximum length 4096 characters with utf-8 encoding. * encoding. * @throws {LexFloatClientException} */ static SetFloatingClientMetadata(key: string, value: string): void; /** * Sets the permission flag for your application. * * This function must be called on every start of your program after the SetHostProductId() * function if the application allows borrowing of licenses or system-wide activation. * * @param {PermissionFlags} flag - depending on your application's requirements, choose one of * the following values: LF_USER, LF_ALL_USERS. * - LF_USER: This flag indicates that the application does not require admin or root permissions to run. * - LF_ALL_USERS: This flag is specifically designed for Windows and should be used for system-wide activations. * @throws {LexFloatClientException} */ static SetPermissionFlag(flag: typeof PermissionFlags[keyof typeof PermissionFlags]): void; /** * Gets the product version name. * @deprecated This function is deprecated. Use GetHostLicenseEntitlementSetName() instead. * @returns Returns the product version name. * @throws {LexFloatClientException} */ static GetHostProductVersionName(): string; /** * Gets the product version display name. * @deprecated This function is deprecated. Use GetHostLicenseEntitlementSetDisplayName() instead. * @returns Returns the product version display name. * @throws {LexFloatClientException} */ static GetHostProductVersionDisplayName(): string; /** * Gets the mode of the floating license (online or offline). * @returns floating license mode. * @throws {LexFloatClientException} */ static GetFloatingLicenseMode(): string; /** * Gets the product version feature flag. * @deprecated This function is deprecated. Use GetHostFeatureEntitlement() instead. * @param {string} name * @returns Returns the product version feature flag. * @throws {LexFloatClientException} */ static GetHostProductVersionFeatureFlag(name: string): HostProductVersionFeatureFlag; /** * Gets the name of the entitlement set associated with the LexFloatServer license. * @return {string} Returns the host license entitlement set name. * @throws {LexFloatClientException} */ static GetHostLicenseEntitlementSetName(): string; /** * Gets the display name of the entitlement set associated with the LexFloatServer license. * @return {string} Returns the host license entitlement set display name. * @throws {LexFloatClientException} */ static GetHostLicenseEntitlementSetDisplayName(): string; /** * Gets the tier of the entitlement set associated with the LexFloatServer license. * @return {number} Returns the host license entitlement tier. * @throws {LexFloatClientException} */ static GetHostLicenseEntitlementSetTier(): number; /** * Gets the feature entitlements associated with the LexFloatServer license. * @return {HostFeatureEntitlement[]} Returns the host license feature entitlements. * @throws {LexFloatClientException} */ static GetHostFeatureEntitlements(): HostFeatureEntitlement[]; /** * Gets the feature entitlement associated with the LexFloatServer license. * @param {string} featureName The name of the feature. * @return {HostFeatureEntitlement} Returns the host license feature entitlement. * @throws {LexFloatClientException} */ static GetHostFeatureEntitlement(featureName: string): HostFeatureEntitlement; /** * Gets the value of the product metadata. * * * @param {string} key key of the metadata field whose value you want to get * @return Returns the metadata key value * @throws {LexFloatClientException} */ static GetHostProductMetadata(key: string): string; /** * Get the value of the license metadata field associated with the * LexFloatServer license key. * * @param {string} key key of the metadata field whose value you want to get * @return Returns the metadata key value * @throws {LexFloatClientException} */ static GetHostLicenseMetadata(key: string): string; /** * Gets the license meter attribute allowed uses and total uses associated * with the LexFloatServer license. * * @param {string} name name of the meter attribute * @return Returns the values of meter attribute allowed and total uses. * @throws {LexFloatClientException} */ static GetHostLicenseMeterAttribute(name: string): HostLicenseMeterAttribute; /** * Gets the license expiry date timestamp of the LexFloatServer license. * * @return Returns the timestamp * @throws {LexFloatClientException} */ static GetHostLicenseExpiryDate(): number; /** * This function sends a network request to LexFloatServer to get the configuration details. * * @return Configuration details * @throws {LexActivatorException} */ static GetHostConfig(): HostConfig | null; /** * Gets the meter attribute uses consumed by the floating client. * * @param {string} name name of the meter attribute * @return Returns the value of meter attribute uses by the floating client. * @throws {LexFloatClientException} */ static GetFloatingClientMeterAttributeUses(name: string): number; /** * Gets the value of the floating client metadata. * * @param {string} key key of the metadata field whose value you want to get * @return Returns the metadata key value * @throws {LexFloatClientException} */ static GetFloatingClientMetadata(key: string): string; /** * Gets the library version. * @returns Returns the library version. * @throws {LexFloatClientException} */ static GetFloatingClientLibraryVersion(): string; /** * Sends the request to lease the license from the LexFloatServer. * * @throws {LexFloatClientException} */ static RequestFloatingLicense(): void; /** * Sends the request to lease the license from the LexFloatServer for offline usage. * The maximum value of lease duration is configured in the config.yml of LexFloatServer * * @param {number} leaseDuration value of the lease duration. * @throws {LexFloatClientException} */ static RequestOfflineFloatingLicense(leaseDuration: number): void; /** * Sends the request to the LexFloatServer to free the license. * * Call this function before you exit your application to prevent zombie * licenses. * * @throws {LexFloatClientException} */ static DropFloatingLicense(): void; /** * Checks whether any license has been leased or not. * * @return true or false * @throws {LexFloatClientException} */ static HasFloatingLicense(): boolean; /** * Gets the lease expiry date timestamp of the floating client. * * @return Returns the timestamp * @throws {LexFloatClientException} */ static GetFloatingClientLeaseExpiryDate(): number; /** * Increments the meter attribute uses of the floating client. * * @param {string} name name of the meter attribute * @param {number} increment the increment value * @throws {LexFloatClientException} */ static IncrementFloatingClientMeterAttributeUses(name: string, increment: number): void; /** * Decrements the meter attribute uses of the floating client. * * @param {string} name name of the meter attribute * @param {number} decrement the decrement value * @throws {LexFloatClientException} */ static DecrementFloatingClientMeterAttributeUses(name: string, decrement: number): void; /** * Resets the meter attribute uses of the floating client. * * @param {string} name name of the meter attribute * @throws {LexFloatClientException} */ static ResetFloatingClientMeterAttributeUses(name: string): void; } //# sourceMappingURL=lexfloatclient.d.ts.map