@stonecrop/graphql-client 0.2.24 → 0.2.26
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.
- package/dist/gql/schema.js +49 -0
- package/dist/graphql-client.d.ts +28 -0
- package/dist/graphql-client.js +354 -400
- package/dist/graphql-client.js.map +1 -1
- package/dist/graphql-client.umd.cjs +59 -13
- package/dist/graphql-client.umd.cjs.map +1 -1
- package/dist/graphql_client/src/tsdoc-metadata.json +11 -0
- package/dist/graphql_client.tsbuildinfo +1 -0
- package/dist/index.js +59 -0
- package/dist/queries.js +15 -0
- package/dist/src/gql/schema.d.ts +3 -0
- package/dist/src/gql/schema.d.ts.map +1 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/queries.d.ts +5 -0
- package/dist/src/queries.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +29 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/types/index.js +0 -0
- package/package.json +22 -20
- package/src/index.ts +12 -2
- package/src/types/index.ts +31 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { gql } from 'graphql-request';
|
|
2
|
+
const typeDefs = gql `
|
|
3
|
+
type Doctype {
|
|
4
|
+
id: ID!
|
|
5
|
+
name: String!
|
|
6
|
+
workflow: String!
|
|
7
|
+
schema: String!
|
|
8
|
+
actions: String!
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type DoctypeField {
|
|
12
|
+
id: ID!
|
|
13
|
+
label: String!
|
|
14
|
+
fieldtype: String
|
|
15
|
+
component: String
|
|
16
|
+
required: Boolean
|
|
17
|
+
readonly: Boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type DoctypeWorkflow {
|
|
21
|
+
name: String!
|
|
22
|
+
machine: StateMachine!
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type StateMachine {
|
|
26
|
+
id: ID!
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type DoctypeAction {
|
|
30
|
+
eventName: String!
|
|
31
|
+
callback: String
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type Query {
|
|
35
|
+
getMeta(doctype: String!): Doctype # ∪ error
|
|
36
|
+
getRecords(doctype: String!, filters: [String]): [String] # ∪ error
|
|
37
|
+
getRecord(doctype: String!, id: ID!): String # ∪ error
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type Mutation {
|
|
41
|
+
runAction(doctype: String!, id: [ID!]!, functionName: String!): [String!]! # ∪ error
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
schema {
|
|
45
|
+
query: Query
|
|
46
|
+
mutation: Mutation
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
export default typeDefs;
|
|
@@ -0,0 +1,28 @@
|
|
|
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';
|
|
6
|
+
|
|
7
|
+
export { Meta }
|
|
8
|
+
|
|
9
|
+
export { MetaParser }
|
|
10
|
+
|
|
11
|
+
export { MetaResponse }
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get meta information for a doctype
|
|
15
|
+
* @param doctype - The doctype to get meta information for
|
|
16
|
+
* @param url - The URL to send the request to
|
|
17
|
+
* @returns The meta information for the doctype
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare const methods: {
|
|
21
|
+
getMeta: (doctype: string, url?: string) => Promise<MetaResponse>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { queries }
|
|
25
|
+
|
|
26
|
+
export { typeDefs }
|
|
27
|
+
|
|
28
|
+
export { }
|