import { GuidString } from "@bentley/bentleyjs-core"; import { UsageLogEntry, FeatureLogEntry } from "./UlasClient"; import { AuthorizedClientRequestContext } from "../AuthorizedClientRequestContext"; /** Specifies the JSON format for a UsageLogEntry as expected by the ULAS REST API * (see https://qa-connect-ulastm.bentley.com/Bentley.ULAS.SwaggerUI/SwaggerWebApp/?urls.primaryName=ULAS%20Posting%20Service%20v1) * @internal */ export interface UsageLogEntryJson { /** Ultimate ID, i.e. company ID in SAP */ ultID?: number; /** The ID of the Principal that was granted access to the application */ pid?: GuidString; /** The GUID of the IMS user accessing the product, maybe the same as the Principal. */ imsID?: GuidString; /** The client’s machine name excluding domain information. */ hID: string; /** The client’s login name excluding domain information */ uID?: string; /** The GUID embedded in the policy file that allows us to track the entitlement history. */ polID: GuidString; /** The ID of the securable. */ secID: string; /** The product ID for which usage is being submitted. It is a 4-digit Product ID from the GPR. */ prdid: number; /** A feature string further identifying the product for which available usage is being submitted. Not to be confused with feature IDs. */ fstr: string; /** The version of the application producing the usage. * Format: Pad all sections out to 4 digits padding is with zeros, e.g. 9.10.2.113 becomes 9001000020113. */ ver: number; /** The GUID of the project that the usage should be associated with. * If no project is selected, omit the field. */ projID?: GuidString; /** The GUID that identifies a unique usage session, used to correlate data between feature usage and usage logs. */ corID?: GuidString; /** The UTC time of the event. */ evTimeZ?: string; /** The version of the schema which this log entry represents. */ lVer: number; /** Identifies the source of the usage log entry: RealTime, Offline, Checkout */ lSrc: string; /** Identifies the country where the client reporting the usage belongs to. */ country?: string; /** The type of usage that occurred on the client. It is acting as a filter to eliminate records from log processing that * should not count towards a customer’s peak processing. One of: Production, Trial, Beta, HomeUse, PreActivation */ uType: string; } /** @internal */ export interface FeatureLogEntryAttributeJson { name: string; value: string; } /** Specifies the JSON format for a FeatureLogEntry as expected by the ULAS REST API * (see https://qa-connect-ulastm.bentley.com/Bentley.ULAS.SwaggerUI/SwaggerWebApp/?urls.primaryName=ULAS%20Posting%20Service%20v1) * @internal */ export interface FeatureLogEntryJson extends UsageLogEntryJson { /** Gets the ID of the feature used (from the Global Feature Registry) */ ftrID: GuidString; /** The start date in UTC when feature usage has started (for duration feature log entries) */ sDateZ: string; /** The end date in UTC when feature usage has started (for duration feature log entries) */ eDateZ: string; /** Additional user-defined metadata for the feature usage */ uData: FeatureLogEntryAttributeJson[]; } /** @internal */ export declare class LogEntryConverter { private static readonly _logEntryVersion; private static readonly _logPostingSource; private static readonly _featureString; private static readonly _policyFileId; private static readonly _securableId; /** * Extracts the application version from the supplied request context * @param requestContext The client request context * @returns The application version for the request context */ private static getApplicationVersion; /** * Extracts the application id from the supplied request context * @param requestContext The client request context * @returns The application id for the request context */ private static getApplicationId; /** * Extracts the session id from the supplied request context * @param requestContext The client request context * @returns The session id for the request context */ private static getSessionId; static toUsageLogJson(requestContext: AuthorizedClientRequestContext, entry: UsageLogEntry): UsageLogEntryJson; static toFeatureLogJson(requestContext: AuthorizedClientRequestContext, entries: FeatureLogEntry[]): FeatureLogEntryJson[]; private static toVersionNumber; private static prepareMachineName; private static usageTypeToString; } //# sourceMappingURL=LogEntryConverter.d.ts.map