UNPKG

@shopify/shopify-app-remix

Version:

Shopify Remix - to simplify the building of Shopify Apps with Remix

31 lines 1.33 kB
import { DeleteRequestParams, GetRequestParams, PostRequestParams, PutRequestParams, RequestParams, Session, ShopifyRestResources } from '@shopify/shopify-api'; import type { AdminClientOptions } from './types'; export type RestClientWithResources<Resources extends ShopifyRestResources> = RemixRestClient & { resources: Resources; }; export declare function restClientFactory<Resources extends ShopifyRestResources = ShopifyRestResources>({ params, handleClientError, session, }: AdminClientOptions): RestClientWithResources<Resources>; declare class RemixRestClient { session: Session; private params; private handleClientError; constructor({ params, session, handleClientError }: AdminClientOptions); /** * Performs a GET request on the given path. */ get(params: GetRequestParams): Promise<Response>; /** * Performs a POST request on the given path. */ post(params: PostRequestParams): Promise<Response>; /** * Performs a PUT request on the given path. */ put(params: PutRequestParams): Promise<Response>; /** * Performs a DELETE request on the given path. */ delete(params: DeleteRequestParams): Promise<Response>; protected makeRequest(params: RequestParams): Promise<Response>; } export {}; //# sourceMappingURL=rest.d.ts.map