anymal-protocol 1.0.15 → 1.0.16

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.mts CHANGED
@@ -60,7 +60,10 @@ declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken
60
60
  type: string;
61
61
  }>;
62
62
 
63
- declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<any>;
63
+ declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<{
64
+ success: boolean;
65
+ data: any;
66
+ } | undefined>;
64
67
 
65
68
  declare function useFetchBalance(): (publicClient: any, walletAddress: string, kibbleTokenAddress: string) => Promise<number | undefined>;
66
69
 
package/dist/index.d.ts CHANGED
@@ -60,7 +60,10 @@ declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken
60
60
  type: string;
61
61
  }>;
62
62
 
63
- declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<any>;
63
+ declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<{
64
+ success: boolean;
65
+ data: any;
66
+ } | undefined>;
64
67
 
65
68
  declare function useFetchBalance(): (publicClient: any, walletAddress: string, kibbleTokenAddress: string) => Promise<number | undefined>;
66
69
 
package/dist/index.js CHANGED
@@ -1278,12 +1278,15 @@ function useCreateUserAppData() {
1278
1278
  }
1279
1279
  const { data, errors } = await response.json();
1280
1280
  if (errors) {
1281
- return [];
1281
+ return { success: false, data: null };
1282
1282
  }
1283
- return data.create_UserAppSettings[0];
1283
+ return {
1284
+ success: true,
1285
+ data: data.create_UserAppSettings[0]
1286
+ };
1284
1287
  } catch (error) {
1285
1288
  console.error("Error creating application:", error);
1286
- return [];
1289
+ return { success: false, data: null };
1287
1290
  }
1288
1291
  },
1289
1292
  []
package/dist/index.mjs CHANGED
@@ -1237,12 +1237,15 @@ function useCreateUserAppData() {
1237
1237
  }
1238
1238
  const { data, errors } = await response.json();
1239
1239
  if (errors) {
1240
- return [];
1240
+ return { success: false, data: null };
1241
1241
  }
1242
- return data.create_UserAppSettings[0];
1242
+ return {
1243
+ success: true,
1244
+ data: data.create_UserAppSettings[0]
1245
+ };
1243
1246
  } catch (error) {
1244
1247
  console.error("Error creating application:", error);
1245
- return [];
1248
+ return { success: false, data: null };
1246
1249
  }
1247
1250
  },
1248
1251
  []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymal-protocol",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "A React/TypeScript-based utility library for reusable functions and hooks inside of the Anymal Ecosystem.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",