@sleeperhq/mini-core 1.5.3 → 1.5.5

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.
@@ -1,3 +1,4 @@
1
+ import type { LeagueId, PlayerId, RosterId, TransactionId } from '..';
1
2
  export type NavigationParams = {
2
3
  LeaguesIndexScreen: undefined;
3
4
  LeaguesDetailScreen: LeaguesDetailScreenParams;
@@ -14,16 +15,16 @@ export type NavigationParams = {
14
15
  };
15
16
  export type NavigationScreen = keyof NavigationParams;
16
17
  export type LeaguesDetailScreenParams = {
17
- leagueId: string;
18
+ leagueId: LeagueId;
18
19
  };
19
20
  export type TradeCenterTransactionScreenParams = {
20
- leagueId: string;
21
- transactionId: string;
21
+ leagueId: LeagueId;
22
+ transactionId: TransactionId;
22
23
  };
23
24
  export type TradeCenterPlayersScreenParams = {
24
- leagueId: string;
25
- myRosterId: string;
26
- rosterIds?: string[];
27
- addMap?: any;
28
- dropMap?: any;
25
+ leagueId: LeagueId;
26
+ myRosterId: RosterId;
27
+ rosterIds?: RosterId[];
28
+ addMap?: Record<RosterId, PlayerId[]>;
29
+ dropMap?: Record<RosterId, PlayerId[]>;
29
30
  };
@@ -1,6 +1,6 @@
1
1
  import { NavigationParams, NavigationScreen, ToastConfig } from './types';
2
2
  export type SleeperActions = {
3
- navigate: <T extends NavigationScreen>(screen: T, params: NavigationParams[T]) => void;
3
+ navigate: <T extends NavigationScreen>(screen: T, params?: NavigationParams[T]) => void;
4
4
  requestLocation: () => void;
5
5
  showToast: (toastData: ToastConfig) => void;
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleeperhq/mini-core",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Core library frameworks for developing Sleeper Mini Apps.",
5
5
  "main": "index.ts",
6
6
  "types": "index.d.ts",
@@ -1,10 +1,7 @@
1
- import type SleeperEntitlement from '../../declarations/sleeper_entitlement.d';
2
- import type SleeperHeaderOptions from '../../declarations/sleeper_header_options.d';
1
+ import type { HeaderOptions, Entitlement } from '../../declarations/types';
3
2
 
4
3
  export * from '../../declarations/types/index.d';
5
4
  export type { default as Context } from '../../declarations/sleeper_context.d';
6
- export type { default as Entitlements } from '../../declarations/sleeper_entitlement.d';
7
- export type { default as HeaderOptions } from '../../declarations/sleeper_header_options.d';
8
5
  export type { default as SocketMessage } from '../../declarations/sleeper_message.d';
9
6
 
10
7
  export type Config = {
@@ -14,6 +11,6 @@ export type Config = {
14
11
  remoteSocketPort?: number,
15
12
  dev?: boolean,
16
13
  logsEnabled?: boolean,
17
- entitlements?: SleeperEntitlement[],
18
- headerOptions?: SleeperHeaderOptions,
14
+ entitlements?: Entitlement[],
15
+ headerOptions?: HeaderOptions,
19
16
  };