66import { BigNumberish } from '@ethersproject/bignumber' ;
77import { ConnectionInfo } from '@ethersproject/web' ;
88
9+ import { NotifyNamespace } from '../api/notify-namespace' ;
910import {
1011 ERC1155Metadata ,
1112 NftRefreshState ,
@@ -1129,6 +1130,8 @@ export interface Webhook {
11291130 * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook}
11301131 */
11311132 appId ?: string ;
1133+ /** The name of the webhook. */
1134+ name ?: string ;
11321135}
11331136
11341137/** The version of the webhook. All newly created webhooks default to V2. */
@@ -1235,6 +1238,14 @@ export interface CustomGraphqlWebhookConfig {
12351238 graphqlQuery : string ;
12361239}
12371240
1241+ /**
1242+ * Base interface for all webhook parameters that includes common fields.
1243+ */
1244+ export interface BaseWebhookParams {
1245+ /** Optional name for the webhook. */
1246+ name ?: string ;
1247+ }
1248+
12381249/**
12391250 * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order
12401251 * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}.
@@ -1246,7 +1257,7 @@ export interface CustomGraphqlWebhookConfig {
12461257 * This is a temporary workaround for now. We're planning on detecting the app
12471258 * id from the provided api key directly. Stay tuned!
12481259 */
1249- export interface TransactionWebhookParams {
1260+ export interface TransactionWebhookParams extends BaseWebhookParams {
12501261 /** The app id of the project to create the webhook on. */
12511262 appId : string ;
12521263}
@@ -1255,7 +1266,7 @@ export interface TransactionWebhookParams {
12551266 * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order
12561267 * to create a {@link NftActivityWebhook} or {@link NftMetadataUpdateWebhook}.
12571268 */
1258- export interface NftWebhookParams {
1269+ export interface NftWebhookParams extends BaseWebhookParams {
12591270 /** Array of NFT filters the webhook should track. */
12601271 filters : NftFilter [ ] ;
12611272 /**
@@ -1269,7 +1280,7 @@ export interface NftWebhookParams {
12691280 * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order
12701281 * to create a {@link CustomGraphqlWebhook}
12711282 */
1272- export interface CustomGraphqlWebhookParams {
1283+ export interface CustomGraphqlWebhookParams extends BaseWebhookParams {
12731284 /** GraphQL query */
12741285 graphqlQuery : string ;
12751286 /**
@@ -1302,7 +1313,7 @@ export interface CustomGraphqlWebhookParams {
13021313 * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order
13031314 * to create a {@link AddressActivityWebhook}.
13041315 */
1305- export interface AddressWebhookParams {
1316+ export interface AddressWebhookParams extends BaseWebhookParams {
13061317 /** Array of addresses the webhook should activity for. */
13071318 addresses : string [ ] ;
13081319 /**
0 commit comments