Shopvento UI - v0.2.0
    Preparing search index...

    Function createShopClient

    • Create the catalogue, quote and checkout transport. Use the same-origin host proxy so session cookies remain first party.

      Parameters

      • __namedParameters: { baseUrl?: string; fetcher?: ShopFetch } = {}
        • OptionalbaseUrl?: string

          Installation origin without /api/shop. Use an empty string for same-origin shop calls.

          ""
          
        • Optionalfetcher?: ShopFetch

          Optional host fetch implementation.

          fetch
          

      Returns {
          request: <K extends keyof ShopOperations>(
              operation: K,
              body?: ShopOperations[K]["body"],
              options?: {
                  orderId?: string;
                  query?: string;
                  signal?: AbortSignal;
                  slug?: string;
              },
          ) => Promise<ShopOperations[K]["response"]>;
      }

      • request: <K extends keyof ShopOperations>(
            operation: K,
            body?: ShopOperations[K]["body"],
            options?: {
                orderId?: string;
                query?: string;
                signal?: AbortSignal;
                slug?: string;
            },
        ) => Promise<ShopOperations[K]["response"]>

        Call one public shop operation with its typed body, optional slug/order identifier, query and abort signal.