types.ts
1 // SPDX-FileCopyrightText: 2024 Mass Labs 2 // 3 // SPDX-License-Identifier: GPL-3.0-or-later 4 5 import { ListingViewState, OrderState } from "@massmarket/schema"; 6 export { ListingViewState, OrderState }; 7 export type KeyCard = `0x${string}`; 8 export type ListingId = number; 9 export type TagId = `0x${string}`; 10 export type OrderId = number; 11 export type TokenAddress = `0x${string}`; 12 export type ShopId = bigint; 13 14 export enum Status { 15 Failed = "FAILED", 16 Pending = "PENDING", 17 Complete = "COMPLETE", 18 } 19 20 export interface ShopDetails { 21 name: string; 22 profilePictureUrl: string; 23 } 24 25 export type CurrencyChainOption = { 26 label: string; 27 value: string | number; 28 chainId: number; 29 address: Uint8Array; 30 }; 31 32 export enum SearchShopStep { 33 Search = "SEARCH", 34 Connect = "CONNECT", 35 Confirm = "CONFIRM", 36 } 37 export enum CreateShopStep { 38 ManifestForm = "MANIFEST_FORM", 39 ConnectWallet = "CONNECT_WALLET", 40 Confirmation = "CONFIRMATION", 41 } 42 43 export type ShopForm = { 44 shopName: string; 45 description: string; 46 avatar: FormData | null; 47 paymentAddress: string; 48 }; 49 50 export enum KeycardRole { 51 NEW_GUEST = "new-guest", 52 RETURNING_GUEST = "returning-guest", 53 MERCHANT = "merchant", 54 } 55 56 export type CookieConsent = "accepted" | "rejected" | null;