anymal-protocol 1.0.98 → 1.0.100
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -4
- package/dist/index.mjs +9 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -82,7 +82,7 @@ declare function useUpdateAnymalWithNFT(): (anymalPassportId: string, anymalDocI
|
|
|
82
82
|
success: boolean;
|
|
83
83
|
}>;
|
|
84
84
|
|
|
85
|
-
declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, publicKey: string, authServiceBaseUrl: string) => Promise<{
|
|
85
|
+
declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, publicKey: string, authServiceBaseUrl: string, petType: string, breed: string[], lifestage: string, anymalPid: string) => Promise<{
|
|
86
86
|
success: boolean;
|
|
87
87
|
message: string;
|
|
88
88
|
url: any;
|
|
@@ -274,6 +274,7 @@ interface ActionRecord {
|
|
|
274
274
|
claimedAt?: string | null;
|
|
275
275
|
claimQuantity?: number | null;
|
|
276
276
|
failure_reason?: string | null;
|
|
277
|
+
campaignStatus: string | null;
|
|
277
278
|
}
|
|
278
279
|
interface ActionDefinition {
|
|
279
280
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare function useUpdateAnymalWithNFT(): (anymalPassportId: string, anymalDocI
|
|
|
82
82
|
success: boolean;
|
|
83
83
|
}>;
|
|
84
84
|
|
|
85
|
-
declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, publicKey: string, authServiceBaseUrl: string) => Promise<{
|
|
85
|
+
declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, publicKey: string, authServiceBaseUrl: string, petType: string, breed: string[], lifestage: string, anymalPid: string) => Promise<{
|
|
86
86
|
success: boolean;
|
|
87
87
|
message: string;
|
|
88
88
|
url: any;
|
|
@@ -274,6 +274,7 @@ interface ActionRecord {
|
|
|
274
274
|
claimedAt?: string | null;
|
|
275
275
|
claimQuantity?: number | null;
|
|
276
276
|
failure_reason?: string | null;
|
|
277
|
+
campaignStatus: string | null;
|
|
277
278
|
}
|
|
278
279
|
interface ActionDefinition {
|
|
279
280
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -1549,7 +1549,7 @@ function toBase64(file) {
|
|
|
1549
1549
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
1550
1550
|
function useUploadAnymalImage() {
|
|
1551
1551
|
return (0, import_react15.useCallback)(
|
|
1552
|
-
async (imageFile, type, idToken, publicKey, authServiceBaseUrl) => {
|
|
1552
|
+
async (imageFile, type, idToken, publicKey, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
1553
1553
|
if (!imageFile || !idToken) {
|
|
1554
1554
|
return {
|
|
1555
1555
|
success: false,
|
|
@@ -1563,7 +1563,11 @@ function useUploadAnymalImage() {
|
|
|
1563
1563
|
const payload = {
|
|
1564
1564
|
appPubKey: publicKey,
|
|
1565
1565
|
imageData: base64Image,
|
|
1566
|
-
imageName: imageFile.name.split(".")[0]
|
|
1566
|
+
imageName: imageFile.name.split(".")[0],
|
|
1567
|
+
petType,
|
|
1568
|
+
breed,
|
|
1569
|
+
lifestage,
|
|
1570
|
+
anymalPid
|
|
1567
1571
|
};
|
|
1568
1572
|
const response = await fetch(`${authServiceBaseUrl}/process-image`, {
|
|
1569
1573
|
method: "POST",
|
|
@@ -1577,7 +1581,7 @@ function useUploadAnymalImage() {
|
|
|
1577
1581
|
if (response.ok) {
|
|
1578
1582
|
return {
|
|
1579
1583
|
success: true,
|
|
1580
|
-
message: "Image
|
|
1584
|
+
message: "Image process started",
|
|
1581
1585
|
url: data.ipfsUrl,
|
|
1582
1586
|
type
|
|
1583
1587
|
};
|
|
@@ -2222,7 +2226,8 @@ var convertToActionRecord = (fr) => {
|
|
|
2222
2226
|
claimIndex: fr.claimIndex ?? null,
|
|
2223
2227
|
claimedAt: fr.claimedAt ?? null,
|
|
2224
2228
|
claimQuantity: fr.claimQuantity ?? null,
|
|
2225
|
-
failure_reason: fr.failure_reason ?? null
|
|
2229
|
+
failure_reason: fr.failure_reason ?? null,
|
|
2230
|
+
campaignStatus: fr.campaignStatus ?? null
|
|
2226
2231
|
};
|
|
2227
2232
|
};
|
|
2228
2233
|
var convertToActionDefinition = (fr) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1486,7 +1486,7 @@ function toBase64(file) {
|
|
|
1486
1486
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
1487
1487
|
function useUploadAnymalImage() {
|
|
1488
1488
|
return useCallback15(
|
|
1489
|
-
async (imageFile, type, idToken, publicKey, authServiceBaseUrl) => {
|
|
1489
|
+
async (imageFile, type, idToken, publicKey, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
1490
1490
|
if (!imageFile || !idToken) {
|
|
1491
1491
|
return {
|
|
1492
1492
|
success: false,
|
|
@@ -1500,7 +1500,11 @@ function useUploadAnymalImage() {
|
|
|
1500
1500
|
const payload = {
|
|
1501
1501
|
appPubKey: publicKey,
|
|
1502
1502
|
imageData: base64Image,
|
|
1503
|
-
imageName: imageFile.name.split(".")[0]
|
|
1503
|
+
imageName: imageFile.name.split(".")[0],
|
|
1504
|
+
petType,
|
|
1505
|
+
breed,
|
|
1506
|
+
lifestage,
|
|
1507
|
+
anymalPid
|
|
1504
1508
|
};
|
|
1505
1509
|
const response = await fetch(`${authServiceBaseUrl}/process-image`, {
|
|
1506
1510
|
method: "POST",
|
|
@@ -1514,7 +1518,7 @@ function useUploadAnymalImage() {
|
|
|
1514
1518
|
if (response.ok) {
|
|
1515
1519
|
return {
|
|
1516
1520
|
success: true,
|
|
1517
|
-
message: "Image
|
|
1521
|
+
message: "Image process started",
|
|
1518
1522
|
url: data.ipfsUrl,
|
|
1519
1523
|
type
|
|
1520
1524
|
};
|
|
@@ -2079,7 +2083,8 @@ var convertToActionRecord = (fr) => {
|
|
|
2079
2083
|
claimIndex: fr.claimIndex ?? null,
|
|
2080
2084
|
claimedAt: fr.claimedAt ?? null,
|
|
2081
2085
|
claimQuantity: fr.claimQuantity ?? null,
|
|
2082
|
-
failure_reason: fr.failure_reason ?? null
|
|
2086
|
+
failure_reason: fr.failure_reason ?? null,
|
|
2087
|
+
campaignStatus: fr.campaignStatus ?? null
|
|
2083
2088
|
};
|
|
2084
2089
|
};
|
|
2085
2090
|
var convertToActionDefinition = (fr) => {
|
package/package.json
CHANGED