@glowlabs-org/utils 0.2.57 → 0.2.59

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,7 +1,9 @@
1
1
  import type { Kickstarter, CreateKickstarterPayload, KickstarterCreateResponse, CommitKickstarterPayload, CommitKickstarterResponse } from "../types";
2
2
  export declare function KickstarterRouter(baseUrl: string): {
3
3
  readonly fetchKickstarters: () => Promise<Kickstarter[]>;
4
- readonly fetchKickstarter: (idOrSlug: string) => Promise<Kickstarter>;
4
+ readonly fetchKickstarter: (idOrSlug: string) => Promise<Kickstarter & {
5
+ contributorsCount: number;
6
+ }>;
5
7
  readonly fetchKickstartersByWallet: (wallet: string) => Promise<Kickstarter[]>;
6
8
  readonly commitKickstarter: (kickstarterId: string, payload: CommitKickstarterPayload) => Promise<CommitKickstarterResponse>;
7
9
  readonly createKickstarter: (payload: CreateKickstarterPayload) => Promise<KickstarterCreateResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glowlabs-org/utils",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "description": "A library containing all typechain types and addresses relating to the glow guarded launch",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -63,11 +63,17 @@ export function KickstarterRouter(baseUrl: string) {
63
63
  }
64
64
  };
65
65
 
66
- const fetchKickstarter = async (idOrSlug: string): Promise<Kickstarter> => {
66
+ const fetchKickstarter = async (
67
+ idOrSlug: string
68
+ ): Promise<
69
+ Kickstarter & {
70
+ contributorsCount: number;
71
+ }
72
+ > => {
67
73
  try {
68
- const data = await request<{ kickstarter: Kickstarter }>(
69
- `/kickstarters/${encodeURIComponent(idOrSlug)}`
70
- );
74
+ const data = await request<{
75
+ kickstarter: Kickstarter & { contributorsCount: number };
76
+ }>(`/kickstarters/${encodeURIComponent(idOrSlug)}`);
71
77
  return data.kickstarter;
72
78
  } catch (error) {
73
79
  throw new Error(parseApiError(error));