anymal-protocol 1.0.15 → 1.0.17
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +11 -4
- package/dist/index.mjs +11 -4
- package/package.json +1 -1
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<
|
|
63
|
+
declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<{
|
|
64
|
+
success: boolean;
|
|
65
|
+
data: any;
|
|
66
|
+
}>;
|
|
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<
|
|
63
|
+
declare function useCreateUserAppData(): (appId: string, pid: string, dbAuthToken: string, endpoint: string) => Promise<{
|
|
64
|
+
success: boolean;
|
|
65
|
+
data: any;
|
|
66
|
+
}>;
|
|
64
67
|
|
|
65
68
|
declare function useFetchBalance(): (publicClient: any, walletAddress: string, kibbleTokenAddress: string) => Promise<number | undefined>;
|
|
66
69
|
|
package/dist/index.js
CHANGED
|
@@ -1242,7 +1242,11 @@ var import_uuid = require("uuid");
|
|
|
1242
1242
|
function useCreateUserAppData() {
|
|
1243
1243
|
return (0, import_react15.useCallback)(
|
|
1244
1244
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
1245
|
-
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint)
|
|
1245
|
+
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint)
|
|
1246
|
+
return {
|
|
1247
|
+
success: false,
|
|
1248
|
+
data: null
|
|
1249
|
+
};
|
|
1246
1250
|
const appValues = {
|
|
1247
1251
|
id: (0, import_uuid.v4)(),
|
|
1248
1252
|
userPid: pid,
|
|
@@ -1278,12 +1282,15 @@ function useCreateUserAppData() {
|
|
|
1278
1282
|
}
|
|
1279
1283
|
const { data, errors } = await response.json();
|
|
1280
1284
|
if (errors) {
|
|
1281
|
-
return
|
|
1285
|
+
return { success: false, data: null };
|
|
1282
1286
|
}
|
|
1283
|
-
return
|
|
1287
|
+
return {
|
|
1288
|
+
success: true,
|
|
1289
|
+
data: data.create_UserAppSettings[0]
|
|
1290
|
+
};
|
|
1284
1291
|
} catch (error) {
|
|
1285
1292
|
console.error("Error creating application:", error);
|
|
1286
|
-
return
|
|
1293
|
+
return { success: false, data: null };
|
|
1287
1294
|
}
|
|
1288
1295
|
},
|
|
1289
1296
|
[]
|
package/dist/index.mjs
CHANGED
|
@@ -1201,7 +1201,11 @@ import { v4 as uuid } from "uuid";
|
|
|
1201
1201
|
function useCreateUserAppData() {
|
|
1202
1202
|
return useCallback15(
|
|
1203
1203
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
1204
|
-
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint)
|
|
1204
|
+
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint)
|
|
1205
|
+
return {
|
|
1206
|
+
success: false,
|
|
1207
|
+
data: null
|
|
1208
|
+
};
|
|
1205
1209
|
const appValues = {
|
|
1206
1210
|
id: uuid(),
|
|
1207
1211
|
userPid: pid,
|
|
@@ -1237,12 +1241,15 @@ function useCreateUserAppData() {
|
|
|
1237
1241
|
}
|
|
1238
1242
|
const { data, errors } = await response.json();
|
|
1239
1243
|
if (errors) {
|
|
1240
|
-
return
|
|
1244
|
+
return { success: false, data: null };
|
|
1241
1245
|
}
|
|
1242
|
-
return
|
|
1246
|
+
return {
|
|
1247
|
+
success: true,
|
|
1248
|
+
data: data.create_UserAppSettings[0]
|
|
1249
|
+
};
|
|
1243
1250
|
} catch (error) {
|
|
1244
1251
|
console.error("Error creating application:", error);
|
|
1245
|
-
return
|
|
1252
|
+
return { success: false, data: null };
|
|
1246
1253
|
}
|
|
1247
1254
|
},
|
|
1248
1255
|
[]
|
package/package.json
CHANGED