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.
| Field | Type | Description |
|---|---|---|
ID | uint32 | Auto-increment primary key |
Name | string | User's full name |
Email | string | Contact email |
Phone | string | Phone number |
Designation | string | Job title |
Organization | string | Organization name |
Application | string | Targeted application |
CreatedAt | time.Time | Record creation timestamp |
UpdatedAt | time.Time | Record last update timestamp |
Invitation
Manages user invitation records.
| Field | Type | Description |
|---|---|---|
ID | uint32 | Primary key |
InviteID | string | Unique invitation identifier |
Email | string | Email of the invitee |
FirstName | string | Invitee's first name |
LastName | string | Invitee's last name |
Phone | string | Invitee's phone number |
OrgID | uint32 | Organization ID |
CompanyID | uint32 | Company ID |
DepartmentID | uint32 | Department ID |
RoleID | uint32 | Role to be assigned on signup |
CreatedAt | time.Time | Invitation creation timestamp |
LLMQueries
Tracks LLM query history for auditing or feedback purposes.
| Field | Type | Description |
|---|---|---|
ID | uint32 | Query record ID |
Tag | string | Query category/tag |
Question | string | User question |
Response | string | LLM-generated response |
CreatedBy | uint32 | User ID who made the request |
CreatedAt | time.Time | Timestamp of query |
UploadedDocument
Manages documents uploaded against reports.
| Field | Type | Description |
|---|---|---|
ID | uint32 | Document record ID |
DocID | string | Unique document identifier |
ReportID | string | ID of the report this doc belongs to |
DocumentName | string | File name |
DocumentSize | float64 | File size in MB/KB |
DocumentURL | string | Link to access the document |
IsActive | bool | Whether the document is currently used |
CreatedBy | uint32 | Creator's user ID |
CreatedAt | time.Time | Creation timestamp |
UpdatedBy | uint32 | Last modifier's user ID |
UpdatedAt | time.Time | Last 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.