UNPKG

@shopify/cli-kit

Version:

A set of utilities, interfaces, and models that are common across all the platform features

26 lines (25 loc) 1.03 kB
import { UnauthorizedHandler } from './graphql.js'; import { Variables } from 'graphql-request'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; /** * @param query - GraphQL query to execute. * @param shopFqdn - The shop fqdn. * @param token - Partners token. * @param variables - GraphQL variables to pass to the query. * @param unauthorizedHandler - Unauthorized handler to use. */ export interface AppDevRequestOptions<TResult, TVariables extends Variables> { query: TypedDocumentNode<TResult, TVariables>; shopFqdn: string; token: string; unauthorizedHandler: UnauthorizedHandler; variables?: TVariables; } /** * Executes an org-scoped GraphQL query against the App Management API. * Uses typed documents. * * @param options - The options for the request. * @returns The response of the query of generic type <T>. */ export declare function appDevRequestDoc<TResult, TVariables extends Variables>(options: AppDevRequestOptions<TResult, TVariables>): Promise<TResult>;