From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1741185664; bh=26vk7EYPjdzRt7ShXC2+XOdAnta8X0/NiHfCZI0itOw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=TbKLxt0dQipJOjdEWgeB2H/J5AUbZiIGzQBx4oDpWGTAP1xqKlggMgDLe6PudGbdM JC4TbxRhwZzyu6VG8J9nJC8oPpohbNNs403Sa2XZD1Ts7lW2hj6nTJCgitu4R3P0XW yDx0xzIlhxWW4+YOBq5hMC2zrhdHhIQixvqYzUYZBh/ND8G0BhQwbQ8ycnOH8HV0f4 /jCZsBUic3YCRAxguRg0sqwsCxsjPwZFX9GevLT+vECx8QysDFSm9VqSGzURxxa7iY wFG/D9bT4WIIBqpBOHeRgsVwcCuk9yYFnLA/pB2WFezvyRg4mAlAbUS8B2MGvfx6fn +7OXjeTzzbAyw== Received: from localhost.localdomain (unknown [203.217.140.198]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id C292920B4833; Wed, 5 Mar 2025 14:41:03 +0000 (UTC) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v1 12/17] feat(typing/enum): add Gender and IsActive enum Date: Wed, 5 Mar 2025 21:40:11 +0700 Message-ID: <20250305144018.267-13-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.46.0.windows.1 In-Reply-To: <20250305144018.267-1-kiizuha@gnuweeb.org> References: <20250305144018.267-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Added Gender and IsActive enum to make it readable and increase developer experience. Signed-off-by: Muhammad Rizki --- src/lib/typings/common.d.ts | 10 ++++++++++ src/lib/typings/index.ts | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/lib/typings/common.d.ts b/src/lib/typings/common.d.ts index 1f4a795..6aaf661 100644 --- a/src/lib/typings/common.d.ts +++ b/src/lib/typings/common.d.ts @@ -2,6 +2,16 @@ import type { Icon as IconType } from "lucide-svelte"; export type RecordString = Record; +export enum Gender { + MALE = "m", + FEMALE = "f" +} + +export enum IsActive { + ACTIVE = "1", + INACTIVE = "0" +} + export interface Navigations { name: string; description?: string; diff --git a/src/lib/typings/index.ts b/src/lib/typings/index.ts index 1855c2b..7f0c04d 100644 --- a/src/lib/typings/index.ts +++ b/src/lib/typings/index.ts @@ -1,8 +1,17 @@ -import type { RecordString, Navigations, LabelAndValue, MailConfig } from "./common"; +import type { + RecordString, + Navigations, + LabelAndValue, + MailConfig, + Gender, + IsActive +} from "./common"; import type { ResponseAPI, LoginResponse, RenewTokenResponse } from "./http"; import type { User } from "./credential"; export type { + Gender, + IsActive, RecordString, Navigations, LabelAndValue, -- Muhammad Rizki