UNPKG

2.46 kBTypeScriptView Raw
1import { IngesterOptions, SubscriptionOptions } from "../internal/graph/graphQL";
2export declare class ParameterEnum {
3 value: string | string[];
4 constructor(value: string | string[]);
5}
6export declare function enumValue(value: string | string[]): ParameterEnum;
7/**
8 * Prepare a GraphQL subscription string for the use with Apollo or EventHandlers.
9 *
10 * Subscription can be provided by the following options:
11 *
12 * * subscription: string containing the subscription GraphQL, or
13 * * path: absolute or relative path to a .graphql file to load; if provided a relative
14 * path this will resolve the relative path to an absolute given the location of
15 * the calling script.
16 * * name: name GraphQL subscription operation to load; this will walk up the directory
17 * structure starting at the location of the calling script and look for a folder
18 * called 'graphql'. Once that folder is found, the subscription named 'name' is
19 * being looked for.
20 * * fragmentsDir: location of fragment .graphql files
21 * * inline: remove any unneeded whitespace and line breaks from returned GraphQL string
22 * * variables: the variables to bind into the subscription
23 * * operationName: name of the subscription to use in the generated GraphQL string
24 *
25 * @param {{subscription?: string; path?: string; name?: string; fragmentDir?: string; inline?: boolean;
26 * variables?: {[p: string]: string | boolean | number | ParameterEnum}}} options
27 * @returns {string}
28 */
29export declare function subscription(optionsOrName: SubscriptionOptions | string): string;
30/**
31 * Prepare a GraphQL ingester SDL string for the register with the automation client.
32 *
33 * Ingester can be provided by the following options:
34 *
35 * * path: absolute or relative path to a .graphql file to load; if provided a relative
36 * path this will resolve the relative path to an absolute given the location of
37 * the calling script.
38 * * name: name of the .graphql file to load; this will walk up the directory structure
39 * starting a t the location of the calling script and look for a folder called
40 * 'graphql'. Once that folder is found, by convention name is being looked for
41 * in the 'ingester' sub directory.
42 *
43 * @param {IngesterOptions | string} optionsOrName
44 * @returns {string}
45 */
46export declare function ingester(optionsOrName: IngesterOptions | string): string;
47//# sourceMappingURL=graphQL.d.ts.map
\No newline at end of file