Skip to main content

Misc Microservice

The Miscellaneous microservice provides endpoints for handling demo requests, user invitations, large language model (LLM) query logs, and document uploads associated with reports.


Models (models.go)

Demo

Captures demo form submissions from users.

FieldTypeDescription
IDuint32Auto-increment primary key
NamestringUser's full name
EmailstringContact email
PhonestringPhone number
DesignationstringJob title
OrganizationstringOrganization name
ApplicationstringTargeted application
CreatedAttime.TimeRecord creation timestamp
UpdatedAttime.TimeRecord last update timestamp

Invitation

Manages user invitation records.

FieldTypeDescription
IDuint32Primary key
InviteIDstringUnique invitation identifier
EmailstringEmail of the invitee
FirstNamestringInvitee's first name
LastNamestringInvitee's last name
PhonestringInvitee's phone number
OrgIDuint32Organization ID
CompanyIDuint32Company ID
DepartmentIDuint32Department ID
RoleIDuint32Role to be assigned on signup
CreatedAttime.TimeInvitation creation timestamp

LLMQueries

Tracks LLM query history for auditing or feedback purposes.

FieldTypeDescription
IDuint32Query record ID
TagstringQuery category/tag
QuestionstringUser question
ResponsestringLLM-generated response
CreatedByuint32User ID who made the request
CreatedAttime.TimeTimestamp of query

UploadedDocument

Manages documents uploaded against reports.

FieldTypeDescription
IDuint32Document record ID
DocIDstringUnique document identifier
ReportIDstringID of the report this doc belongs to
DocumentNamestringFile name
DocumentSizefloat64File size in MB/KB
DocumentURLstringLink to access the document
IsActiveboolWhether the document is currently used
CreatedByuint32Creator's user ID
CreatedAttime.TimeCreation timestamp
UpdatedByuint32Last modifier's user ID
UpdatedAttime.TimeLast update timestamp

gRPC API (misc.proto)

Provides endpoints for various utility and support tasks.

Services

Demos

  • CreateDemo(CreateDemoRequest): Submits a demo request.
  • ListAllDemos(ListAllDemosRequest): Lists all submitted demo requests with pagination.

Invitations

  • CreateInvitation(CreateInvitationRequest): Sends an invitation to a user.
  • GetInvitationByInviteID(GetInvitationByInviteIDRequest): Retrieves invitation details by unique invite ID.
  • ListAllInvitationsByOrgID(ListAllInvitationsByOrgIDRequest): Lists all invitations for an organization, with optional search.

LLM Queries

  • GetResponseFromLLM(GetResponseFromLLMRequest): Queries the LLM and stores the result.
    • Returns previous queries as well for tracking.

Document Uploads

  • UploadDocumentByReportID(UploadDocumentByReportIDRequest): Uploads a document linked to a specific report.
  • GetUploadedDocsByReportID(GetUploadedDocsByReportIDRequest): Fetches all documents uploaded for a report.
  • DeleteUploadedDocument(DeleteUploadedDocumentByIDRequest): Deletes a document by its ID.