@stonecrop/graphql-client 0.2.64 → 0.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,8 @@
1
1
  import { gql } from 'graphql-request';
2
+ /**
3
+ * This is the schema for the GraphQL API.
4
+ * @public
5
+ */
2
6
  const typeDefs = gql `
3
7
  type Doctype {
4
8
  id: ID!
@@ -1,14 +1,51 @@
1
- import type { Meta } from '@/types';
2
- import type { MetaParser } from '@/types';
3
- import type { MetaResponse } from '@/types';
4
- import { queries } from './queries';
5
- import typeDefs from './gql/schema';
1
+ /**
2
+ * @file This file contains all the types that are used in the application.
3
+ * @public
4
+ */
5
+
6
+ /**
7
+ * The type of the response from the `getMeta` query.
8
+ * @public
9
+ */
10
+ export declare type Meta = {
11
+ variables: {
12
+ doctype: string
13
+ }
6
14
 
7
- export { Meta }
15
+ response: {
16
+ getMeta: MetaResponse
17
+ }
18
+ }
8
19
 
9
- export { MetaParser }
20
+ /**
21
+ * The type of the response from the `getMeta` query.
22
+ * @public
23
+ */
24
+ export declare type MetaParser = {
25
+ data: Meta['response']
26
+ }
10
27
 
11
- export { MetaResponse }
28
+ /**
29
+ * The type of the response from the `getRecords` query.
30
+ * @public
31
+ */
32
+ export declare type MetaResponse = {
33
+ id: string
34
+ name: string
35
+ workflow: {
36
+ id: string
37
+ name: string
38
+ machineId?: string
39
+ }
40
+ schema: {
41
+ id: string
42
+ label: string
43
+ }[]
44
+ actions: {
45
+ id: string
46
+ eventName: string
47
+ }[]
48
+ }
12
49
 
13
50
  /**
14
51
  * Get meta information for a doctype
@@ -21,8 +58,18 @@ export declare const methods: {
21
58
  getMeta: (doctype: string, url?: string) => Promise<MetaResponse>;
22
59
  };
23
60
 
24
- export { queries }
61
+ /**
62
+ * Queries for the GraphQL API.
63
+ * @public
64
+ */
65
+ export declare const queries: {
66
+ getMeta: string;
67
+ };
25
68
 
26
- export { typeDefs }
69
+ /**
70
+ * This is the schema for the GraphQL API.
71
+ * @public
72
+ */
73
+ export declare const typeDefs: string;
27
74
 
28
75
  export { }