Vairified TypeScript SDK - v0.3.1
    Preparing search index...

    Class MatchesResource

    Match submission — one call submits a full batch.

    Index

    Methods - Matches

    Methods - Other

    Methods - Matches

    • Import tournament results.

      The request body is a free-form JSON object whose structure is defined by the Vairified tournament import schema. Set body.dryRun = true to validate without persisting.

      Parameters

      • body: Record<string, unknown>

        Tournament import payload.

      Returns Promise<TournamentImportResult>

      TournamentImportResult with match/game counts.

      const result = await client.matches.tournamentImport({
      sport: 'pickleball',
      tournamentName: 'Spring Classic',
      matches: [...],
      });
      if (result.ok) {
      console.log(`Imported ${result.matchesImported} matches`);
      }

    Methods - Other

    • Submit a MatchBatch for rating calculation.

      All players in every match must have granted the user:match:submit scope via OAuth (unless your API key has the user:match:submit:trusted scope, which skips per-player consent).

      Set batch.dryRun = true to validate without persisting.

      const result = await client.matches.submit({
      sport: 'pickleball',
      winScore: 11,
      winBy: 2,
      bracket: '4.0 Doubles',
      event: 'Weekly League',
      matchDate: '2026-04-11T14:00:00Z',
      matches: [
      {
      identifier: 'm1',
      teams: [['vair_mem_aaa', 'vair_mem_bbb'],
      ['vair_mem_ccc', 'vair_mem_ddd']],
      games: [{ scores: [11, 8] }, { scores: [11, 5] }],
      },
      ],
      });
      if (result.ok) {
      console.log(`Submitted ${result.numGames} games`);
      }

      Parameters

      Returns Promise<MatchBatchResult>

    • Send a test payload to a webhook URL.

      Parameters

      • webhookUrl: string

      Returns Promise<Record<string, unknown>>