feat: expose readable submission choices
This commit is contained in:
+15
-1
@@ -77,7 +77,8 @@ export interface XftSubmissionField {
|
||||
required: boolean;
|
||||
description?: string;
|
||||
multiple?: boolean;
|
||||
options?: unknown[];
|
||||
options?: XftSubmissionOption[];
|
||||
enumLabels?: Record<string, string>;
|
||||
moduleType?: string;
|
||||
valueFormat?: string;
|
||||
itemFields?: Array<Record<string, unknown>>;
|
||||
@@ -85,6 +86,7 @@ export interface XftSubmissionField {
|
||||
tool: "approval_get_submission_options";
|
||||
kind: XftSubmissionOptionKind;
|
||||
};
|
||||
selectionCapability?: XftSubmissionSelectionCapability;
|
||||
}
|
||||
|
||||
export type XftSubmissionOptionKind = "department" | "city" | "expense_type";
|
||||
@@ -94,6 +96,18 @@ export interface XftSubmissionOption {
|
||||
label: string;
|
||||
}
|
||||
|
||||
export type XftSubmissionSelectionCapability =
|
||||
| {
|
||||
status: "supported";
|
||||
userInput: "label";
|
||||
submitValue: "code";
|
||||
exposeInternalValue: false;
|
||||
}
|
||||
| {
|
||||
status: "client_only";
|
||||
reason: string;
|
||||
};
|
||||
|
||||
export interface XftApprovalProvider {
|
||||
authStatus(user: AuthenticatedDingTalkUser): Promise<{
|
||||
authenticated: true;
|
||||
|
||||
Reference in New Issue
Block a user