Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions apps/customer-portal/backend/modules/entity/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,22 @@ public type ProjectResponse record {|
string 'type;
# Salesforce ID
string sfId;
# Subscription information
Subscription? subscription;
json...;
|};

# Project subscription information.
public type Subscription record {|
# Subscription start date
string? startDate;
# Subscription end date
string? endDate;
# Support tier
string? supportTier;
# Account information
record {|
# System ID of the account
IdString id;
# Name of the account
string? name;
# Activation date
string? activationDate;
# Deactivation date
string? deactivationDate;
# Support tier
string? supportTier;
# Region
string? region;
json...;
|}? account;
json...;
|};

Expand All @@ -143,6 +146,10 @@ public type CaseCreatePayload record {|
int issueTypeKey;
# Severity key
int severityKey;
# Related case ID (if the case is related to an existing case)
IdString parentCaseId?;
# Chat ID (if the case is related to a chat)
IdString chatId?;
|};

# Response from creating a case.
Expand Down Expand Up @@ -225,6 +232,10 @@ public type Case record {|
ReferenceTableItem? deployment;
# Deployed product information
ReferenceTableItem? deployedProduct;
# Related case information (if the case is related to an existing case)
ReferenceTableItem? parentCase;
# Related chat information (if the case is related to a chat)
ReferenceTableItem? chat;
# issue type of the case
ChoiceListItem? issueType;
# Status information
Expand Down Expand Up @@ -934,7 +945,7 @@ public type CallRequestCreatePayload record {|
# Case ID
IdString caseId;
# Reason for the call request
string reason;
string reason?;
# Preferred UTC times for the call
@constraint:Array {minLength: 1}
Date[] utcTimes;
Expand Down
4 changes: 4 additions & 0 deletions apps/customer-portal/backend/modules/types/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public type Case record {|
ReferenceItem? 'type;
# Deployed product information
ReferenceItem? deployedProduct;
# Related case information (if the case is related to an existing case)
ReferenceItem? parentCase;
# Related chat information (if the case is related to a chat)
ReferenceItem? chat;
# issueType of the case
ReferenceItem? issueType;
# Deployment
Expand Down
4 changes: 4 additions & 0 deletions apps/customer-portal/backend/utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public isolated function searchCases(string idToken, string projectId, types:Cas
let entity:ChoiceListItem? issueType = case.issueType
let entity:ReferenceTableItem? deployment = case.deployment
let entity:ReferenceTableItem? assignedEngineer = case.assignedEngineer
let entity:ReferenceTableItem? parentCase = case.parentCase
let entity:ReferenceTableItem? chat = case.chat
let entity:ChoiceListItem? severity = case.severity
let entity:ChoiceListItem? state = case.state
select {
Expand All @@ -67,6 +69,8 @@ public isolated function searchCases(string idToken, string projectId, types:Cas
issueType: issueType != () ? {id: issueType.id.toString(), label: issueType.label} : (),
deployment: deployment != () ? {id: deployment.id, label: deployment.name} : (),
assignedEngineer: assignedEngineer != () ? {id: assignedEngineer.id, label: assignedEngineer.name} : (),
parentCase: parentCase != () ? {id: parentCase.id, label: parentCase.name} : (),
chat: chat != () ? {id: chat.id, label: chat.name} : (),
severity: severity != () ? {id: severity.id.toString(), label: severity.label} : (),
status: state != () ? {id: state.id.toString(), label: state.label} : ()
};
Expand Down