Function: answerApproval()
ts
function answerApproval(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
_links?: {
[key: string]: unknown;
self?: string;
};
approvers?: object[];
canAnswerApproval?: boolean;
completedDate?: {
[key: string]: unknown;
epochMillis?: number;
friendly?: string;
iso8601?: string;
jira?: string;
};
createdDate?: {
[key: string]: unknown;
epochMillis?: number;
friendly?: string;
iso8601?: string;
jira?: string;
};
finalDecision?: "pending" | string & object | "approved" | "declined";
id?: string;
name?: string;
}>;Defined in: src/serviceDesk/api/request.ts:260
This method enables a user to Approve or Decline an approval on a customer request. The approval is assumed to be owned by the user making the call.
Permissions required: User is assigned to the approval request.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { approvalId: number; decision?: string & object | "approve" | "decline"; issueIdOrKey: string; } | - |
parameters.approvalId | number | The ID of the approval to be updated. |
parameters.decision? | string & object | "approve" | "decline" | Response to the approval request. |
parameters.issueIdOrKey? | string | The ID or key of the customer request to be updated. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; _links?: { [key: string]: unknown; self?: string; }; approvers?: object[]; canAnswerApproval?: boolean; completedDate?: { [key: string]: unknown; epochMillis?: number; friendly?: string; iso8601?: string; jira?: string; }; createdDate?: { [key: string]: unknown; epochMillis?: number; friendly?: string; iso8601?: string; jira?: string; }; finalDecision?: "pending" | string & object | "approved" | "declined"; id?: string; name?: string; }>