@mpgd/game-services 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,3 +5,5 @@ export * from './progress-link';
5
5
  export * from './runtime.js';
6
6
  export * from './server';
7
7
  export * from './types';
8
+ export * from './verified-leaderboard';
9
+ export * from './verified-leaderboard-transport';
package/dist/index.js CHANGED
@@ -5,3 +5,5 @@ export * from './progress-link';
5
5
  export * from './runtime.js';
6
6
  export * from './server';
7
7
  export * from './types';
8
+ export * from './verified-leaderboard';
9
+ export * from './verified-leaderboard-transport';
@@ -0,0 +1,29 @@
1
+ import { type VerifiedLeaderboardService } from './verified-leaderboard';
2
+ export declare const verifiedLeaderboardConformanceScenarios: readonly ['first-selection-and-snapshot', 'best-selection-and-retry', 'deterministic-ties', 'identity-and-definition-conflicts', 'concurrent-idempotency', 'mutation-isolation', 'runtime-validation'];
3
+ export type VerifiedLeaderboardConformanceScenario = (typeof verifiedLeaderboardConformanceScenarios)[number];
4
+ export interface CreateVerifiedLeaderboardConformanceFixtureInput {
5
+ readonly scenario: VerifiedLeaderboardConformanceScenario;
6
+ readonly now: string;
7
+ }
8
+ export interface VerifiedLeaderboardConformanceFixture {
9
+ readonly service: VerifiedLeaderboardService;
10
+ readonly dispose?: () => Promise<void> | void;
11
+ }
12
+ export type CreateVerifiedLeaderboardConformanceFixture = (input: CreateVerifiedLeaderboardConformanceFixtureInput) => Promise<VerifiedLeaderboardConformanceFixture> | VerifiedLeaderboardConformanceFixture;
13
+ export interface RunVerifiedLeaderboardConformanceInput {
14
+ /**
15
+ * Return an isolated provider fixture for each scenario. Durable adapters may
16
+ * instead namespace every fixture in a shared test database.
17
+ */
18
+ readonly createFixture: CreateVerifiedLeaderboardConformanceFixture;
19
+ readonly now?: string;
20
+ }
21
+ export interface VerifiedLeaderboardConformanceReport {
22
+ readonly passedScenarios: readonly VerifiedLeaderboardConformanceScenario[];
23
+ }
24
+ /**
25
+ * Runs the provider-neutral verified leaderboard contract against an adapter.
26
+ * The helper is test-framework independent and throws with the failed scenario
27
+ * name when a provider diverges from the public service semantics.
28
+ */
29
+ export declare function runVerifiedLeaderboardConformance(input: RunVerifiedLeaderboardConformanceInput): Promise<VerifiedLeaderboardConformanceReport>;