Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mojito-inc/core-service

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mojito-inc/core-service - npm Package Compare versions

Comparing version 1.0.8-beta.19 to 1.0.8-beta.20

4

Claim/ClaimParam.d.ts

@@ -32,2 +32,6 @@ export interface RedeemClaimableCodeParam {

}
export interface CanRedeemClaimableParam {
claimableItemID: string;
destAddr: string;
}
export {};
import { Response } from '../data';
import { GetClaimInvoiceDetailData, RedeemClaimableCodeData, RedeemEarnableCodeData, RedeemEarnableItemData, GetContractDetailsData, CompleteOnchainClaimData } from './ClaimTokenData';
import { GetClaimInvoiceDetailData, RedeemClaimableCodeData, RedeemEarnableCodeData, RedeemEarnableItemData, GetContractDetailsData, CompleteOnchainClaimData, CanRedeemClaimableData, CanRedeemClaimableV2Data } from './ClaimTokenData';
import { QueryOptions, MutationOptions } from '../domain';
import { GetClaimInvoiceDetailParam, RedeemClaimableCodeParam, RedeemEarnableCodeParam, RedeemEarnableItemParam, GetContractDetailsParam, CompleteOnchainClaimParam } from './ClaimParam';
import { GetClaimInvoiceDetailParam, RedeemClaimableCodeParam, RedeemEarnableCodeParam, RedeemEarnableItemParam, GetContractDetailsParam, CompleteOnchainClaimParam, CanRedeemClaimableParam } from './ClaimParam';
export interface ClaimService {

@@ -78,2 +78,26 @@ /**

completeOnchainClaim: (param: CompleteOnchainClaimParam, options?: MutationOptions) => Promise<Response<CompleteOnchainClaimData>>;
/**
* Returns the boolean
*
* @remarks
* This method is part of claim 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>>;
/**
* Returns the invoice object
*
* @remarks
* This method is part of claim service
*
* @param param - param {@link CanRedeemClaimableParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CanRedeemClaimableV2Data} redeem data
*
*/
canRedeemClaimableItemV2: (param: CanRedeemClaimableParam, options?: QueryOptions) => Promise<Response<CanRedeemClaimableV2Data>>;
}

@@ -75,2 +75,16 @@ export interface RedeemClaimableCodeData {

}
export interface CanRedeemClaimableData {
canRedeemClaimableItem: boolean;
}
export interface CanRedeemClaimableV2Data {
canRedeemClaimableItemV2: {
canRedeem: boolean;
latestInvoice: {
invoiceID: string;
status: string;
onChainTokenId: number;
invoiceCreatedAt: string;
};
};
}
export {};

@@ -7,1 +7,3 @@ export declare const redeemClaimableCodeQueries: import("@apollo/client").DocumentNode;

export declare const CompleteOnchainClaimQuery: import("@apollo/client").DocumentNode;
export declare const canRedeemClaimableItemQueries: import("@apollo/client").DocumentNode;
export declare const canRedeemClaimableItemV2Queries: import("@apollo/client").DocumentNode;

@@ -83,3 +83,13 @@ import { gql } from '@apollo/client';

`;
const canRedeemClaimableItemQueries = gql `
query CanRedeemClaimableItem($claimableItemID: UUID1!, $destAddr: String!) {
canRedeemClaimableItem(claimableItemID: $claimableItemID, destAddr: $destAddr)
}
`;
const canRedeemClaimableItemV2Queries = gql `
query CanRedeemClaimableItemV2($claimableItemID: UUID1!, $destAddr: String!) {
canRedeemClaimableItemV2(claimableItemID: $claimableItemID, destAddr: $destAddr)
}
`;
export { CompleteOnchainClaimQuery, getContractDetailsQuery, getInvoiceDetailsQuery, redeemClaimableCodeQueries, redeemEarnableCodeQuery, redeemEarnableItemQuery };
export { CompleteOnchainClaimQuery, canRedeemClaimableItemQueries, canRedeemClaimableItemV2Queries, getContractDetailsQuery, getInvoiceDetailsQuery, redeemClaimableCodeQueries, redeemEarnableCodeQuery, redeemEarnableItemQuery };
import { __awaiter } from '../_virtual/_tslib.js';
import { useCallback, useMemo } from 'react';
import { useApolloClient } from '@apollo/client';
import { redeemClaimableCodeQueries, redeemEarnableCodeQuery, redeemEarnableItemQuery, getInvoiceDetailsQuery, getContractDetailsQuery, CompleteOnchainClaimQuery } from './Queries.js';
import { redeemClaimableCodeQueries, redeemEarnableCodeQuery, redeemEarnableItemQuery, getInvoiceDetailsQuery, getContractDetailsQuery, CompleteOnchainClaimQuery, canRedeemClaimableItemQueries, canRedeemClaimableItemV2Queries } from './Queries.js';

@@ -66,7 +66,33 @@ /**

}), [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]);
const canRedeemClaimableItemV2 = useCallback((param, options) => __awaiter(void 0, void 0, void 0, function* () {
const response = yield client.query(Object.assign(Object.assign({}, options), { query: canRedeemClaimableItemV2Queries, variables: param }));
const responseData = response.data;
return { data: responseData };
}), [client]);
return useMemo(() => {
return { redeemClaimableCode, redeemEarnableItem, redeemEarnableCode, getInvoiceDetails, getContractDetails, completeOnchainClaim };
}, [redeemClaimableCode, redeemEarnableItem, redeemEarnableCode, getInvoiceDetails, getContractDetails, completeOnchainClaim]);
return {
redeemClaimableCode,
redeemEarnableItem,
redeemEarnableCode,
getInvoiceDetails,
getContractDetails,
completeOnchainClaim,
canRedeemClaimableItem,
canRedeemClaimableItemV2,
};
}, [redeemClaimableCode,
redeemEarnableItem,
redeemEarnableCode,
getInvoiceDetails,
getContractDetails,
completeOnchainClaim,
canRedeemClaimableItem,
canRedeemClaimableItemV2]);
};
export { useClaims as default };

3

Collection/CollectionData.d.ts

@@ -70,5 +70,2 @@ interface TokenDetailsData {

}
export interface CanRedeemClaimableData {
canRedeemClaimableItem: boolean;
}
export {};

@@ -5,5 +5,1 @@ export interface CollectionBySlugParam {

}
export interface CanRedeemClaimableParam {
claimableItemID: string;
destAddr: string;
}
import { Response } from '../data';
import { CollectionBySlugData, CanRedeemClaimableData } from './CollectionData';
import { CollectionBySlugData } from './CollectionData';
import { QueryOptions } from '../domain';
import { CollectionBySlugParam, CanRedeemClaimableParam } from './CollectionParam';
import { CollectionBySlugParam } from './CollectionParam';
export interface CollectionService {

@@ -18,14 +18,2 @@ /**

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;

@@ -22,26 +22,2 @@ import { gql } from '@apollo/client';

isReserved
NFTDetails {
contractAddress
tokenId
tokenType
network {
id
name
chainID
}
metadata {
name
image
video
description
animationURL
openSeaImageType
media {
uri
dimensions
mimeType
size
}
}
}
details {

@@ -85,8 +61,3 @@ ... on MarketplaceBuyNowOutput {

`;
const canRedeemClaimableItemQueries = gql `
query CanRedeemClaimableItem($claimableItemID: UUID1!, $destAddr: String!) {
canRedeemClaimableItem(claimableItemID: $claimableItemID, destAddr: $destAddr)
}
`;
export { canRedeemClaimableItemQueries, collectionBySlugQueries };
export { collectionBySlugQueries };
import { __awaiter } from '../_virtual/_tslib.js';
import { useCallback, useMemo } from 'react';
import { useApolloClient } from '@apollo/client';
import { collectionBySlugQueries, canRedeemClaimableItemQueries } from './Queries.js';
import { collectionBySlugQueries } from './Queries.js';

@@ -22,12 +22,7 @@ /**

}), [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, canRedeemClaimableItem };
}, [collectionBySlug, canRedeemClaimableItem]);
return { collectionBySlug };
}, [collectionBySlug]);
};
export { useCollection as default };

@@ -6,2 +6,3 @@ export interface GetAllInvoicesParam {

offset: number;
status?: string[];
}

@@ -9,2 +9,3 @@ import { gql } from '@apollo/client';

$offset: Int!
$status: [InvoiceStatus!]
) {

@@ -16,2 +17,3 @@ getAllInvoices(

offset: $offset
status: $status
) {

@@ -18,0 +20,0 @@ count

{
"name": "@mojito-inc/core-service",
"version": "1.0.8-beta.19",
"version": "1.0.8-beta.20",
"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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc