shopify-admin-api
Version:
Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.
39 lines (38 loc) • 1.29 kB
TypeScript
import * as Options from '../options';
import { BaseService } from '../infrastructure';
import { Webhook } from '../interfaces';
/**
* A service for manipulating Shopify webhooks.
*/
export declare class Webhooks extends BaseService {
constructor(shopDomain: string, accessToken: string);
/**
* Gets a count of all of the shop's webhooks.
* @param options Options for filtering the results.
*/
count(options?: Options.WebhookCountOptions): Promise<number>;
/**
* Gets a list of up to 250 of the shop's webhooks.
* @param options Options for filtering the results.
*/
list(options?: Options.WebhookListOptions): Promise<Webhook[]>;
/**
* Retrieves the webhook with the given id.
* @param options Options for filtering the results.
*/
get(id: number, options?: Options.WebhookGetOptions): Promise<Webhook>;
/**
* Creates a new webhook.
*/
create(webhook: Partial<Webhook>): Promise<Webhook>;
/**
* Updates the webhook with the given id.
* @param webhook The updated webhook.
*/
update(id: number, webhook: Partial<Webhook>): Promise<Webhook>;
/**
* Deletes the webhook with the given id.
*/
delete(id: number): Promise<undefined>;
}
export default Webhooks;