@gphone/sdk
    Preparing search index...

    Function useMarketplace

    • OS Service Hook for Marketplace.

      Returns {
          feedStore: Writable<ListingPage>;
          loadFeed: () => Promise<void>;
          loadMine: () => Promise<void>;
          markSold: (id: number) => Promise<boolean>;
          mineStore: Writable<ListingPage>;
          postListing: (input: CreateListingInput) => Promise<Listing>;
          removeListing: (id: number) => Promise<boolean>;
          searchListings: (q: string) => Promise<ListingPage>;
          viewListing: (
              id: number,
          ) => Promise<
              Listing & { contactPhone: string | null; isOwn: boolean }
              | null,
          >;
      }

      • feedStore: Writable<ListingPage>

        The public feed — active listings, newest first.

      • loadFeed: () => Promise<void>
      • loadMine: () => Promise<void>
      • markSold: (id: number) => Promise<boolean>
      • mineStore: Writable<ListingPage>

        The caller's own listings, every status.

      • postListing: (input: CreateListingInput) => Promise<Listing>
      • removeListing: (id: number) => Promise<boolean>
      • searchListings: (q: string) => Promise<ListingPage>
      • viewListing: (
            id: number,
        ) => Promise<
            Listing & { contactPhone: string | null; isOwn: boolean }
            | null,
        >