@futureverse/asset-registry-sdk
Advanced tools
@@ -117,2 +117,5 @@ import * as Operations from './operations'; | ||
}; | ||
export type ConfigInput = { | ||
webhook: WebhookConfig; | ||
}; | ||
export type CreateSchemaError = ErrorInterface & { | ||
@@ -144,2 +147,3 @@ __typename: 'CreateSchemaError'; | ||
retries: Scalars['Float']; | ||
subscriptionId: Scalars['String']; | ||
url: Scalars['String']; | ||
@@ -174,2 +178,3 @@ }; | ||
createWebhookSubscription: CreateWebhookSubscriptionResponse; | ||
deleteWebhook: WebhookDeleteResponse; | ||
registerCollection: SchemaCollectionResponse; | ||
@@ -187,2 +192,5 @@ registerOffChainAsset: RegisterOffChainAssetUnion; | ||
}; | ||
export type MutationDeleteWebhookArgs = { | ||
input: WebhookDeleteInput; | ||
}; | ||
export type MutationRegisterCollectionArgs = { | ||
@@ -211,2 +219,3 @@ input: CollectionInput; | ||
getTransaction: GetTransactionResponse; | ||
getWebhookList: WebhookSubscriptionListResponse; | ||
schemaById: SchemaResponse; | ||
@@ -290,7 +299,34 @@ }; | ||
}; | ||
/** GraphQL input type WebhookInput */ | ||
export type WebhookInput = { | ||
export type Webhook = { | ||
__typename: 'Webhook'; | ||
apiKey: Scalars['String']; | ||
createdAt: Scalars['Float']; | ||
retries: Scalars['Float']; | ||
subscriber: Scalars['ChainAddress']; | ||
subscriptionId: Scalars['String']; | ||
url: Scalars['String']; | ||
}; | ||
export type WebhookConfig = { | ||
retries?: InputMaybe<Scalars['Float']>; | ||
url: Scalars['String']; | ||
}; | ||
/** GraphQL input type WebhookDeleteInput */ | ||
export type WebhookDeleteInput = { | ||
id: Scalars['String']; | ||
}; | ||
export type WebhookDeleteResponse = { | ||
__typename: 'WebhookDeleteResponse'; | ||
success: Scalars['Boolean']; | ||
}; | ||
/** GraphQL input type WebhookInput */ | ||
export type WebhookInput = { | ||
actions: Array<Scalars['String']>; | ||
collectionId: Scalars['CollectionId']; | ||
config: ConfigInput; | ||
type: Scalars['String']; | ||
}; | ||
export type WebhookSubscriptionListResponse = { | ||
__typename: 'WebhookSubscriptionListResponse'; | ||
webhooks: Array<Webhook>; | ||
}; | ||
export declare const SchemaFragmentFragmentDoc = "\n fragment schemaFragment on Schema {\n id\n version\n schema\n}\n "; | ||
@@ -321,3 +357,3 @@ export declare const AssetMutationDocument = "\n mutation assetMutation($input: AssetInput!) {\n assetMutation(input: $input) {\n __typename\n ... on AssetOperationResultSuccess {\n transactionHash\n }\n ... on AssetOperationResultFailure {\n errors {\n ... on AssetOperationResultError {\n message\n }\n }\n }\n }\n}\n "; | ||
}>, TContext>; | ||
export declare const CreateWebhookSubscriptionDocument = "\n mutation CreateWebhookSubscription($input: WebhookInput!) {\n createWebhookSubscription(input: $input) {\n url\n retries\n apiKey\n }\n}\n "; | ||
export declare const CreateWebhookSubscriptionDocument = "\n mutation CreateWebhookSubscription($input: WebhookInput!) {\n createWebhookSubscription(input: $input) {\n subscriptionId\n url\n retries\n apiKey\n }\n}\n "; | ||
export declare const useCreateWebhookSubscriptionMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<Operations.CreateWebhookSubscriptionMutation, TError, Operations.Exact<{ | ||
@@ -328,2 +364,8 @@ input: Operations.WebhookInput; | ||
}>, TContext>; | ||
export declare const DeleteWebhookDocument = "\n mutation DeleteWebhook($input: WebhookDeleteInput!) {\n deleteWebhook(input: $input) {\n success\n }\n}\n "; | ||
export declare const useDeleteWebhookMutation: <TError = unknown, TContext = unknown>(options?: UseMutationOptions<Operations.DeleteWebhookMutation, TError, Operations.Exact<{ | ||
input: Operations.WebhookDeleteInput; | ||
}>, TContext> | undefined) => import("@tanstack/react-query").UseMutationResult<Operations.DeleteWebhookMutation, TError, Operations.Exact<{ | ||
input: Operations.WebhookDeleteInput; | ||
}>, TContext>; | ||
export declare const GetAssetTreeDocument = "\n query GetAssetTree($input: AssetTreeInput!) {\n getAssetTree(input: $input) {\n __typename\n ... on AssetTreeResultSuccess {\n data\n }\n ... on AssetTreeResultFailure {\n errors {\n ... on AssetTreeResultError {\n message\n }\n }\n }\n }\n}\n "; | ||
@@ -337,1 +379,3 @@ export declare const useGetAssetTreeQuery: <TData = Operations.GetAssetTreeQuery, TError = unknown>(variables: Operations.GetAssetTreeQueryVariables, options?: UseQueryOptions<Operations.GetAssetTreeQuery, TError, TData, import("@tanstack/react-query").QueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<TData, TError>; | ||
export declare const useGetTransactionQuery: <TData = Operations.GetTransactionQuery, TError = unknown>(variables: Operations.GetTransactionQueryVariables, options?: UseQueryOptions<Operations.GetTransactionQuery, TError, TData, import("@tanstack/react-query").QueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<TData, TError>; | ||
export declare const GetWebhookListDocument = "\n query GetWebhookList {\n getWebhookList {\n webhooks {\n subscriptionId\n subscriber\n url\n retries\n apiKey\n createdAt\n }\n }\n}\n "; | ||
export declare const useGetWebhookListQuery: <TData = Operations.GetWebhookListQuery, TError = unknown>(variables?: Operations.GetWebhookListQueryVariables, options?: UseQueryOptions<Operations.GetWebhookListQuery, TError, TData, import("@tanstack/react-query").QueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<TData, TError>; |
@@ -116,2 +116,5 @@ import { AssetTransactionMessage } from '../types'; | ||
}; | ||
export type ConfigInput = { | ||
readonly webhook: WebhookConfig; | ||
}; | ||
export type CreateSchemaError = ErrorInterface & { | ||
@@ -143,2 +146,3 @@ readonly __typename: 'CreateSchemaError'; | ||
readonly retries: Scalars['Float']; | ||
readonly subscriptionId: Scalars['String']; | ||
readonly url: Scalars['String']; | ||
@@ -173,2 +177,3 @@ }; | ||
readonly createWebhookSubscription: CreateWebhookSubscriptionResponse; | ||
readonly deleteWebhook: WebhookDeleteResponse; | ||
readonly registerCollection: SchemaCollectionResponse; | ||
@@ -186,2 +191,5 @@ readonly registerOffChainAsset: RegisterOffChainAssetUnion; | ||
}; | ||
export type MutationDeleteWebhookArgs = { | ||
input: WebhookDeleteInput; | ||
}; | ||
export type MutationRegisterCollectionArgs = { | ||
@@ -210,2 +218,3 @@ input: CollectionInput; | ||
readonly getTransaction: GetTransactionResponse; | ||
readonly getWebhookList: WebhookSubscriptionListResponse; | ||
readonly schemaById: SchemaResponse; | ||
@@ -289,7 +298,34 @@ }; | ||
}; | ||
/** GraphQL input type WebhookInput */ | ||
export type WebhookInput = { | ||
export type Webhook = { | ||
readonly __typename: 'Webhook'; | ||
readonly apiKey: Scalars['String']; | ||
readonly createdAt: Scalars['Float']; | ||
readonly retries: Scalars['Float']; | ||
readonly subscriber: Scalars['ChainAddress']; | ||
readonly subscriptionId: Scalars['String']; | ||
readonly url: Scalars['String']; | ||
}; | ||
export type WebhookConfig = { | ||
readonly retries?: InputMaybe<Scalars['Float']>; | ||
readonly url: Scalars['String']; | ||
}; | ||
/** GraphQL input type WebhookDeleteInput */ | ||
export type WebhookDeleteInput = { | ||
readonly id: Scalars['String']; | ||
}; | ||
export type WebhookDeleteResponse = { | ||
readonly __typename: 'WebhookDeleteResponse'; | ||
readonly success: Scalars['Boolean']; | ||
}; | ||
/** GraphQL input type WebhookInput */ | ||
export type WebhookInput = { | ||
readonly actions: ReadonlyArray<Scalars['String']>; | ||
readonly collectionId: Scalars['CollectionId']; | ||
readonly config: ConfigInput; | ||
readonly type: Scalars['String']; | ||
}; | ||
export type WebhookSubscriptionListResponse = { | ||
readonly __typename: 'WebhookSubscriptionListResponse'; | ||
readonly webhooks: ReadonlyArray<Webhook>; | ||
}; | ||
export type SchemaFragmentFragment = { | ||
@@ -386,2 +422,3 @@ readonly __typename: 'Schema'; | ||
readonly __typename: 'CreateWebhookSubscriptionResponse'; | ||
readonly subscriptionId: string; | ||
readonly url: string; | ||
@@ -392,2 +429,12 @@ readonly retries: number; | ||
}; | ||
export type DeleteWebhookMutationVariables = Exact<{ | ||
input: WebhookDeleteInput; | ||
}>; | ||
export type DeleteWebhookMutation = { | ||
readonly __typename: 'Mutation'; | ||
readonly deleteWebhook: { | ||
readonly __typename: 'WebhookDeleteResponse'; | ||
readonly success: boolean; | ||
}; | ||
}; | ||
export type GetAssetTreeQueryVariables = Exact<{ | ||
@@ -465,1 +512,19 @@ input: AssetTreeInput; | ||
}; | ||
export type GetWebhookListQueryVariables = Exact<{ | ||
[key: string]: never; | ||
}>; | ||
export type GetWebhookListQuery = { | ||
readonly __typename: 'Query'; | ||
readonly getWebhookList: { | ||
readonly __typename: 'WebhookSubscriptionListResponse'; | ||
readonly webhooks: ReadonlyArray<{ | ||
readonly __typename: 'Webhook'; | ||
readonly subscriptionId: string; | ||
readonly subscriber: ChainAddress; | ||
readonly url: string; | ||
readonly retries: number; | ||
readonly apiKey: string; | ||
readonly createdAt: number; | ||
}>; | ||
}; | ||
}; |
import * as t from 'io-ts'; | ||
import { AssetInput, AssetTreeCollectionInput, AssetTreeInput, CollectionInput, CreateSchemaInput, GetTransactionInput, NonceInput, RegisterOffChainAssetInput, SchemaIdInput, WebhookInput } from './index'; | ||
import { AssetInput, AssetTreeCollectionInput, AssetTreeInput, CollectionInput, ConfigInput, CreateSchemaInput, GetTransactionInput, NonceInput, RegisterOffChainAssetInput, SchemaIdInput, WebhookConfig, WebhookDeleteInput, WebhookInput } from './index'; | ||
export declare const definedNonNullAnySchema: t.UnknownC; | ||
@@ -8,2 +8,3 @@ export declare function AssetInputSchema(): t.Type<AssetInput>; | ||
export declare function CollectionInputSchema(): t.Type<CollectionInput>; | ||
export declare function ConfigInputSchema(): t.Type<ConfigInput>; | ||
export declare function CreateSchemaInputSchema(): t.Type<CreateSchemaInput>; | ||
@@ -14,2 +15,4 @@ export declare function GetTransactionInputSchema(): t.Type<GetTransactionInput>; | ||
export declare function SchemaIdInputSchema(): t.Type<SchemaIdInput>; | ||
export declare function WebhookConfigSchema(): t.Type<WebhookConfig>; | ||
export declare function WebhookDeleteInputSchema(): t.Type<WebhookDeleteInput>; | ||
export declare function WebhookInputSchema(): t.Type<WebhookInput>; |
@@ -1,6 +0,6 @@ | ||
import { Wallet } from 'ethers'; | ||
import { Signer } from 'ethers'; | ||
import { Namespace } from '../types'; | ||
interface CreateShaclSchemaParams { | ||
schemaId: string; | ||
wallet: Wallet; | ||
signer: Signer; | ||
schema: string; | ||
@@ -18,3 +18,3 @@ version: number; | ||
*/ | ||
export declare const useCreateShaclSchema: (variables: CreateShaclSchemaParams) => import("@tanstack/react-query").UseMutationResult<import("../generated/operations").CreateSchemaMutation, unknown, void, unknown>; | ||
export declare const useCreateShaclSchema: () => import("@tanstack/react-query").UseMutationResult<import("../generated/operations").CreateSchemaMutation, unknown, CreateShaclSchemaParams, unknown>; | ||
export {}; |
{ | ||
"name": "@futureverse/asset-registry-sdk", | ||
"version": "0.22.0", | ||
"version": "0.23.0", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
@@ -1,3 +0,3 @@ | ||
import { Wallet } from 'ethers'; | ||
export declare const createSiweMessageWithHeader: (wallet: Wallet, domain: string, origin: string, schema: string, chainId?: number) => Promise<{ | ||
import { Signer } from 'ethers'; | ||
export declare const createSiweMessageWithHeader: (signer: Signer, domain: string, origin: string, schema: string, chainId?: number) => Promise<{ | ||
headers: { | ||
@@ -4,0 +4,0 @@ Authorization: string; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2064249
-21.03%37450
-21.58%3
50%48
4700%2
Infinity%