npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@globalscoutme/api-client

v1.1.1

Published

GlobalScoutMe API client (generated)

Downloads

1,716

Readme

@globalscoutme/api-client

Auto-generated TypeScript HTTP client for the GlobalScoutMe API, built with @hey-api/openapi-ts and axios.

Install

npm install @globalscoutme/api-client

Setup

Configure the client once at app startup with your API base URL and auth token:

import { client } from '@globalscoutme/api-client';

client.setConfig({
  baseURL: 'https://your-api-url.com',
  headers: {
    Authorization: `Bearer ${yourSupabaseAccessToken}`,
  },
});

Usage

All endpoints are grouped by controller and fully typed:

import {
  Auth,
  Dashboard,
  Players,
  Profile,
  Documents,
  Videos,
  Achievements,
  Body,
  Index,
  Kyc,
  Offers,
  Organizations,
  Clubs,
  Challenges,
  Training,
  Invitations,
  Storage,
  Subscriptions,
} from '@globalscoutme/api-client';

// Auth
const authMe = await Auth.getAuthMe();
// Returns { id: string, userType: string | null }

// Players
const player = await Players.getMe();
await Players.patchMe({ body: { fullName: 'John Doe' } });
await Players.deleteMe();
const dashboard = await Players.getMyDashboard();
await Players.heartbeat({ body: { timezone: 'Europe/Bucharest' } });
const results = await Players.searchPlayers({
  body: {
    search: 'John',
    page: 1,
    pageSize: 20,
    sortBy: 'age_asc',
    nationalities: ['EG', 'MA'],
    positions: ['CM', 'CB'],
    baseFoot: 'right',
    isFreeAgent: true,
    hasVideo: true,
    heightOperator: 'gte',
    heightCm: 180,
  },
});
const playerProfile = await Players.getPlayerById({
  path: { id: 'player-uuid' },
});

// Profile
const profile = await Profile.getProfileMe();
await Profile.updateProfileMe({ body: { dominantFoot: 'Right' } });

// Documents
const docs = await Documents.getMyDocuments();
await Documents.createDocument({ body: { type: 'license' } });

// Videos
const videos = await Videos.getMyVideos();
await Videos.createVideo({
  body: { type: 'cmj', storagePath: 'path/to/video' },
});
const playUrl = await Videos.getVideoPlayUrl({ path: { id: 'video-uuid' } });
await Videos.deleteVideo({ path: { id: 'video-uuid' } });

// Achievements
const catalog = await Achievements.getAchievementsCatalog();
const myAchievements = await Achievements.getMyAchievements();

// Body measurements
const measurement = await Body.getMyMeasurements();
await Body.createMeasurement({ body: { heightCm: 180 } });

// Index (lookup tables)
const positions = await Index.getIndexItems({
  path: { tableName: 'positions' },
});
const countries = await Index.getCountries();
// Returns [{ code: 'BR', name: 'Brazil', nationalityName: 'Brazilian', flagEmoji: '🇧🇷' }, ...]

// Dashboard (scout/club portal — single aggregated call)
const dashboard = await Dashboard.getScoutDashboard();
// Returns: stats (watchlisted, offersSent, playersViewed, videosWatched),
//          lastPlayersViewed (last 6 distinct players),
//          lastVideosWatched (last 6 distinct videos with player info)

const videoUrl = await Dashboard.getScoutVideoPlayUrl({
  path: { id: 'video-uuid' },
});
// Returns signed play URL + records the view in video_views

// Offers (conversations between scouts and players)
const conversations = await Offers.listConversations({
  query: { filter: 'all', page: 1, pageSize: 20 },
});
const conversation = await Offers.createConversation({
  body: { playerId: 'player-uuid', initialMessage: 'Hi!' },
});
const messages = await Offers.listMessages({
  path: { id: 'conversation-uuid' },
  query: { page: 1, pageSize: 20 },
});
await Offers.sendMessage({
  path: { id: 'conversation-uuid' },
  body: { body: 'Looking forward to it!' },
});
await Offers.markConversationRead({ path: { id: 'conversation-uuid' } });

// Organizations
const org = await Organizations.getMyOrganization();
await Organizations.updateMyOrganization({ body: { name: 'FC Example' } });
await Organizations.registerClub({
  body: { name: 'FC Example', email: '[email protected]' },
});

// Clubs (coach/admin club entries within an organization)
const clubs = await Clubs.getMyClubs();
const club = await Clubs.createMyClub({ body: { name: 'U19 Team' } });
await Clubs.updateMyClub({
  path: { id: 'club-uuid' },
  body: { name: 'U21 Team' },
});
await Clubs.deleteMyClub({ path: { id: 'club-uuid' } });

// Challenges
const challengeCatalog = await Challenges.getChallengesCatalog();
const myChallenges = await Challenges.getMyChallenges();

// Training
const grouped = await Training.getTrainingGrouped();
const trainingList = await Training.getTrainingList({
  query: { categoryCode: 'fitness', page: 1, pageSize: 20 },
});
const trainingItem = await Training.getTrainingById({
  path: { id: 'training-uuid' },
});

// Invitations (org admin invites members)
await Invitations.sendInvitation({
  body: { email: '[email protected]', role: 'coach' },
});
const invitations = await Invitations.listInvitations();
await Invitations.resendInvitation({ path: { id: 'invitation-uuid' } });
await Invitations.deleteInvitation({ path: { id: 'invitation-uuid' } });
await Invitations.acceptInvitation(); // called after Supabase auth callback

// KYC — SmileID Enhanced Document Verification
const kycResult = await Kyc.startKyc({
  body: { country: 'gh', channel: 'web' },
});
// kycResult: { token, partnerId, jobId, status, retriesRemaining }
// Pass token + partnerId to the SmileID web SDK widget to start document capture.
// After the SDK reports successful submission, call markSubmittedKyc with jobId.
await Kyc.markSubmittedKyc({ body: { jobId: kycResult.jobId! } });
// SmileID also calls POST /kyc/webhook with final processing results.

const kycStatus = await Kyc.getKycStatus({
  path: { userId: supabaseAuthUuid },
});
// kycStatus: { status, retryCount, retriesRemaining }
// status: 'pending' | 'capture_started' | 'processing' | 'approved' | 'rejected' | 'blocked'
// Older API clients may still see legacy 'in_progress', which maps to 'capture_started'.

// Subscriptions (Stripe recurring billing)
const plans = await Subscriptions.getSubscriptionPlans();
// Returns: { plans: [{ id, code, name, price, currency, billingInterval, trialDays, features, displayOrder }] }

const mySubscription = await Subscriptions.getMySubscription();
// Returns: { status, isActive, planId, planName, billingInterval,
//            currentPeriodStart, currentPeriodEnd, cancelAtPeriodEnd, canceledAt, gracePeriodUntil }
// status: 'inactive' when the user has never subscribed

// Start a subscription — redirect the user to the returned URL
const checkout = await Subscriptions.createCheckout({
  body: {
    providerProductId: 'billing-provider-products-uuid', // pick from billing_provider_products table
    successUrl: 'https://yourapp.com/subscription/success', // or a mobile deep-link
    cancelUrl: 'https://yourapp.com/subscription/cancel',
  },
});
// redirect user to checkout.url

// Open the Stripe Billing Portal (manage / cancel subscription)
const portal = await Subscriptions.createPortal({
  body: { returnUrl: 'https://yourapp.com/account' },
});
// redirect user to portal.url

// Storage — get a signed upload URL, then PUT the file directly to Supabase Storage
const { uploadUrl, token, path, bucket, expiresIn } =
  await Storage.createUploadUrl({
    body: { bucket: 'avatars', contentType: 'image/jpeg', sizeBytes: 204800 },
  });
await fetch(uploadUrl, {
  method: 'PUT',
  body: fileBlob,
  headers: { 'Content-Type': 'image/jpeg' },
});
// persist `path` on the player record (e.g. patchMe with avatarPath: path)

Updating auth token

Update the Bearer token after sign-in or token refresh:

client.setConfig({
  headers: {
    Authorization: `Bearer ${newAccessToken}`,
  },
});

Versioning

This package is auto-generated from the backend OpenAPI spec. Version increments follow semver:

  • patch — no API shape changes
  • minor — new endpoints added
  • major — breaking changes (renamed/removed endpoints or fields)

Package format

The published package ships compiled JavaScript (dist/) alongside the raw TypeScript source. main points to dist/index.js so all bundlers work without extra configuration.