Skip to content

Commit

Permalink
feat(rest-api-client): Change to optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi committed Sep 3, 2024
1 parent b869767 commit 0e75c38
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe("AppSettings", () => {
},
theme: "WHITE" as const,
titleField: {
selectionMode: "AUTO" as const,
selectionMode: "MANUAL" as const,
code: "titleFieldCode",
},
enableThumbnails: true,
Expand Down
32 changes: 18 additions & 14 deletions packages/rest-api-client/src/client/types/app/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ type Theme =
| "YELLOW"
| "BLACK";

type TitleField = {
selectionMode: "AUTO" | "MANUAL";
code: string;
};
type TitleField =
| {
selectionMode: "AUTO";
}
| {
selectionMode: "MANUAL";
code: string;
};

export type GetAppSettingsForRequest = {
app: AppID;
Expand Down Expand Up @@ -64,17 +68,17 @@ export type UpdateAppSettingsForRequest = {
}
| { type: "PRESET"; key: string };
theme?: Theme;
titleField: TitleField;
enableThumbnails: boolean;
enableBulkDeletion: boolean;
enableComments: boolean;
enableDuplicateRecord: boolean;
numberPrecision: {
digits: string | number;
decimalPlaces: string | number;
roundingMode: "HALF_EVEN" | "UP" | "DOWN";
titleField?: TitleField;
enableThumbnails?: boolean;
enableBulkDeletion?: boolean;
enableComments?: boolean;
enableDuplicateRecord?: boolean;
numberPrecision?: {
digits?: string | number;
decimalPlaces?: string | number;
roundingMode?: "HALF_EVEN" | "UP" | "DOWN";
};
firstMonthOfFiscalYear: string | number;
firstMonthOfFiscalYear?: string | number;
revision?: Revision;
};

Expand Down

0 comments on commit 0e75c38

Please sign in to comment.