@mojito-inc/core-service
Advanced tools
Comparing version 1.0.8-beta.18 to 1.0.8-beta.19
@@ -33,23 +33,2 @@ interface TokenDetailsData { | ||
status: string; | ||
currentBid: { | ||
id: string; | ||
marketplaceAuctionLotId: string; | ||
marketplaceUser: { | ||
id: string; | ||
username: string; | ||
avatar: string; | ||
}; | ||
amount: number; | ||
isCurrent: true; | ||
nextBidIncrement: number; | ||
createdAt: string; | ||
currentBid: number; | ||
}; | ||
myBid: { | ||
id: string; | ||
createdAt: string; | ||
marketplaceAuctionLotId: string; | ||
amount: number; | ||
}; | ||
startingBid: number; | ||
marketplaceAuctionOnChainSettings: { | ||
@@ -60,2 +39,4 @@ id: string; | ||
perWalletLimit: number; | ||
totalUnits: number; | ||
totalAvailableUnits: number; | ||
claimingType: string; | ||
@@ -66,18 +47,2 @@ marketplaceCollectionItem: { | ||
} | ||
interface MintOnDemandData { | ||
tokenContractAddress: string; | ||
description: string; | ||
onChainID: string; | ||
network: { | ||
id: string; | ||
name: string; | ||
chainID: number; | ||
}; | ||
tokenType: string; | ||
metaDataURI: string; | ||
carousel?: { | ||
carouselMedia: string; | ||
carouselCaption: string; | ||
}[]; | ||
} | ||
interface CollectionBySlugItems { | ||
@@ -90,7 +55,2 @@ id: string; | ||
collectionId: string; | ||
artist?: { | ||
id: string; | ||
artistName: string; | ||
slug: string; | ||
}; | ||
asset?: { | ||
@@ -107,3 +67,2 @@ currentVersion?: { | ||
deliveryMethod?: string; | ||
mintOnDemandData?: MintOnDemandData; | ||
} | ||
@@ -116,2 +75,5 @@ export interface CollectionBySlugData { | ||
} | ||
export interface CanRedeemClaimableData { | ||
canRedeemClaimableItem: boolean; | ||
} | ||
export {}; |
@@ -5,1 +5,5 @@ export interface CollectionBySlugParam { | ||
} | ||
export interface CanRedeemClaimableParam { | ||
claimableItemID: string; | ||
destAddr: string; | ||
} |
import { Response } from '../data'; | ||
import { CollectionBySlugData } from './CollectionData'; | ||
import { CollectionBySlugData, CanRedeemClaimableData } from './CollectionData'; | ||
import { QueryOptions } from '../domain'; | ||
import { CollectionBySlugParam } from './CollectionParam'; | ||
import { CollectionBySlugParam, CanRedeemClaimableParam } from './CollectionParam'; | ||
export interface CollectionService { | ||
@@ -18,2 +18,14 @@ /** | ||
collectionBySlug: (param: CollectionBySlugParam, options?: QueryOptions) => Promise<Response<CollectionBySlugData>>; | ||
/** | ||
* Returns the boolean | ||
* | ||
* @remarks | ||
* This method is part of collection service | ||
* | ||
* @param param - param {@link CanRedeemClaimableParam} | ||
* @param options - graphql fetch query options {@link QueryOptions} | ||
* @returns {@link CanRedeemClaimableData} redeem data | ||
* | ||
*/ | ||
canRedeemClaimableItem: (param: CanRedeemClaimableParam, options?: QueryOptions) => Promise<Response<CanRedeemClaimableData>>; | ||
} |
export declare const collectionBySlugQueries: import("@apollo/client").DocumentNode; | ||
export declare const canRedeemClaimableItemQueries: import("@apollo/client").DocumentNode; |
@@ -14,7 +14,2 @@ import { gql } from '@apollo/client'; | ||
collectionId | ||
artist { | ||
id | ||
artistName | ||
slug | ||
} | ||
asset { | ||
@@ -63,14 +58,2 @@ currentVersion { | ||
... on MarketplaceAuctionLot { | ||
feeStructure { | ||
buyersPremiumRate { | ||
from | ||
to | ||
rate | ||
} | ||
overheadPremiumRate { | ||
from | ||
to | ||
rate | ||
} | ||
} | ||
marketplaceCollectionItemId | ||
@@ -80,23 +63,2 @@ startDate | ||
status | ||
currentBid { | ||
id | ||
marketplaceAuctionLotId | ||
marketplaceUser { | ||
id | ||
username | ||
avatar | ||
} | ||
amount | ||
isCurrent | ||
nextBidIncrement | ||
createdAt | ||
currentBid | ||
} | ||
myBid { | ||
id | ||
createdAt | ||
marketplaceAuctionLotId | ||
amount | ||
} | ||
startingBid | ||
marketplaceAuctionOnChainSettings { | ||
@@ -121,18 +83,2 @@ id | ||
deliveryMethod | ||
mintOnDemandData { | ||
tokenContractAddress | ||
description | ||
onChainID | ||
network { | ||
id | ||
name | ||
chainID | ||
} | ||
tokenType | ||
metaDataURI | ||
carousel { | ||
carouselMedia | ||
carouselCaption | ||
} | ||
} | ||
} | ||
@@ -142,3 +88,8 @@ } | ||
`; | ||
const canRedeemClaimableItemQueries = gql ` | ||
query CanRedeemClaimableItem($claimableItemID: UUID1!, $destAddr: String!) { | ||
canRedeemClaimableItem(claimableItemID: $claimableItemID, destAddr: $destAddr) | ||
} | ||
`; | ||
export { collectionBySlugQueries }; | ||
export { canRedeemClaimableItemQueries, collectionBySlugQueries }; |
import { __awaiter } from '../_virtual/_tslib.js'; | ||
import { useCallback, useMemo } from 'react'; | ||
import { useApolloClient } from '@apollo/client'; | ||
import { collectionBySlugQueries } from './Queries.js'; | ||
import { collectionBySlugQueries, canRedeemClaimableItemQueries } from './Queries.js'; | ||
@@ -22,7 +22,12 @@ /** | ||
}), [client]); | ||
const canRedeemClaimableItem = useCallback((param, options) => __awaiter(void 0, void 0, void 0, function* () { | ||
const response = yield client.query(Object.assign(Object.assign({}, options), { query: canRedeemClaimableItemQueries, variables: param })); | ||
const responseData = response.data; | ||
return { data: responseData }; | ||
}), [client]); | ||
return useMemo(() => { | ||
return { collectionBySlug }; | ||
}, [collectionBySlug]); | ||
return { collectionBySlug, canRedeemClaimableItem }; | ||
}, [collectionBySlug, canRedeemClaimableItem]); | ||
}; | ||
export { useCollection as default }; |
{ | ||
"name": "@mojito-inc/core-service", | ||
"version": "1.0.8-beta.18", | ||
"version": "1.0.8-beta.19", | ||
"description": "Mojito Core API service for auction, payment, token", | ||
@@ -5,0 +5,0 @@ "main": "./index.cjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
425521
11355