@atomist/automation-client
Version:
Atomist API for software low-level client
47 lines • 2.46 kB
TypeScript
import { IngesterOptions, SubscriptionOptions } from "../internal/graph/graphQL";
export declare class ParameterEnum {
value: string | string[];
constructor(value: string | string[]);
}
export declare function enumValue(value: string | string[]): ParameterEnum;
/**
* Prepare a GraphQL subscription string for the use with Apollo or EventHandlers.
*
* Subscription can be provided by the following options:
*
* * subscription: string containing the subscription GraphQL, or
* * path: absolute or relative path to a .graphql file to load; if provided a relative
* path this will resolve the relative path to an absolute given the location of
* the calling script.
* * name: name GraphQL subscription operation to load; this will walk up the directory
* structure starting at the location of the calling script and look for a folder
* called 'graphql'. Once that folder is found, the subscription named 'name' is
* being looked for.
* * fragmentsDir: location of fragment .graphql files
* * inline: remove any unneeded whitespace and line breaks from returned GraphQL string
* * variables: the variables to bind into the subscription
* * operationName: name of the subscription to use in the generated GraphQL string
*
* @param {{subscription?: string; path?: string; name?: string; fragmentDir?: string; inline?: boolean;
* variables?: {[p: string]: string | boolean | number | ParameterEnum}}} options
* @returns {string}
*/
export declare function subscription(optionsOrName: SubscriptionOptions | string): string;
/**
* Prepare a GraphQL ingester SDL string for the register with the automation client.
*
* Ingester can be provided by the following options:
*
* * path: absolute or relative path to a .graphql file to load; if provided a relative
* path this will resolve the relative path to an absolute given the location of
* the calling script.
* * name: name of the .graphql file to load; this will walk up the directory structure
* starting a t the location of the calling script and look for a folder called
* 'graphql'. Once that folder is found, by convention name is being looked for
* in the 'ingester' sub directory.
*
* @param {IngesterOptions | string} optionsOrName
* @returns {string}
*/
export declare function ingester(optionsOrName: IngesterOptions | string): string;
//# sourceMappingURL=graphQL.d.ts.map