UNPKG

@interopio/iocd-cli

Version:

CLI tool for setting up, building and packaging io.Connect Desktop platforms

105 lines 3.52 kB
export declare const prodPublicKey = "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAoaL0vbGVpI6fw/YY6vvf\nQFHA097QBPIzLf+8LccaFaN7kz/pvX70V3clnmtE/vY5yhzGksypOX9CfcZpyH1/\nnHmeJNWugts9SaO/+/SYC9iVmi34M/DjRQnKmhmAcd9/X6hxCwtf6nR32Igy2Z0X\niBvdUcstTrDT55YpHf+g2myVWqPfyv5+q9KlqrySb7Po/PGsdpth4Jqkqhl49hQv\n6D0sp2wRHEqjtblOz4ZYyh++02Xir+mhAYxPPrhx4ymm4jPmiqYP5aUky4udPydF\nlBHj/sKGzlU/kcd/jiws7l0Iy7DDV0ajRkbJ3C18hW7rs0xRxhGdySaj0VBA7vtR\nZ7zjDADNm9KqLQPB9nKGPSBLzQBYW+mQP92seyKRd2f29g4hFkX+kkZnS7CAvfLs\njIBw7GlHuTiZCMAgiPatU/7WxneD8Qs/s+cMMk5CTImWL/BWdtd18TMjL1G/LiTA\n3uNFnbdzrRYAC33/02W73dyk64uYtZ9rPkMJnYMMWMU8zpauQxzezxuSYCEtp2N8\n6YsWnPaZkrdZKQxUsQ2AoDJ+GWYlMJZoNh+wj0pyZcZ/BEAGCvK3DcGlgjb2mgJX\nSBAqI8x0afhfXqckthbsIaqi+0kdAgQV0VDKI0OCZgesrjwPlawmBbpgCdZ28oc3\n4w1zLjAq74LInPITHxMzaaECAwEAAQ==\n-----END PUBLIC KEY-----\n"; export declare class LicenseService { private logger; private publicKey; validateLicense(license?: string): LicenseInfo; private validateJWT; /** * Only called in unit tests. */ setProdPublicKey(): void; /** * Only called in unit tests. */ setTestPublicKey(publicKey: string): void; } export declare class LicenseError extends Error { readonly licensePayload: LicensePayload; constructor(message: string, licensePayload: LicensePayload); } export declare class LicenseOrganization { /** * Organization display name. Used in logs. * @example "InteropIO" */ displayName: string; /** * Organization identifier. Unused. * @example "interopio" */ identifier: string; } interface LicensePayload { type: "paid" | "trial"; expiration?: number; extraComponents: { insights: { enabled: boolean; }; bbgv2: { enabled: boolean; }; bbgv3: { enabled: boolean; }; excel: { enabled: boolean; }; outlook: { enabled: boolean; }; word: { enabled: boolean; }; teams: { enabled: boolean; }; fidessa: { enabled: boolean; }; salesforce: { enabled: boolean; }; }; issuedBy: string; email: string; iat: number; licensee: string; organization: { identifier: string; displayName: string; }; meta?: any; } export interface LicenseInfo { /** * Invalid – missing or improperly signed certificate * Inactive – valid certificate but no longer usable (e.g. expired, revoked) * Active – valid and can be used * * Note that paid licenses are always "valid" in practice, even if they have an expiration date. The expiration date is used for informational purposes only. **/ status: "Invalid" | "Inactive" | "Active"; type: "Trial" | "Paid"; /** * If `true` the license is expired. */ isExpired: boolean; /** * Error message related to invalid or inactive license. * Undefined if the license is valid and active. */ errorMessage?: string | undefined; /** * License JWT payload. * Only there if the license is present and correctly signed. */ licensePayload?: LicensePayload | undefined; } export declare enum LicenseType { paid = "paid", trail = "trail" } declare const _default: LicenseService; export default _default; //# sourceMappingURL=license.service.d.ts.map