@stonecrop/graphql-client 0.10.1 → 0.10.3
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/client.js +17 -1
- package/dist/graphql-client.d.ts +7 -6
- package/dist/graphql-client.js +17 -1
- package/dist/graphql-client.js.map +1 -1
- package/dist/src/client.d.ts +5 -5
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/client.ts +21 -5
- package/src/index.ts +1 -1
package/dist/client.js
CHANGED
|
@@ -40,7 +40,7 @@ export class StonecropClient {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Get doctype metadata
|
|
43
|
-
* @param context -
|
|
43
|
+
* @param context - Doctype context containing doctype name
|
|
44
44
|
*/
|
|
45
45
|
async getMeta(context) {
|
|
46
46
|
const cached = this.metaCache.get(context.doctype);
|
|
@@ -57,11 +57,19 @@ export class StonecropClient {
|
|
|
57
57
|
fieldtype
|
|
58
58
|
component
|
|
59
59
|
label
|
|
60
|
+
width
|
|
61
|
+
align
|
|
60
62
|
required
|
|
61
63
|
readOnly
|
|
64
|
+
edit
|
|
65
|
+
hidden
|
|
66
|
+
default
|
|
62
67
|
options
|
|
68
|
+
mask
|
|
63
69
|
precision
|
|
64
70
|
scale
|
|
71
|
+
mode
|
|
72
|
+
validation
|
|
65
73
|
}
|
|
66
74
|
workflow {
|
|
67
75
|
states
|
|
@@ -93,11 +101,19 @@ export class StonecropClient {
|
|
|
93
101
|
fieldtype
|
|
94
102
|
component
|
|
95
103
|
label
|
|
104
|
+
width
|
|
105
|
+
align
|
|
96
106
|
required
|
|
97
107
|
readOnly
|
|
108
|
+
edit
|
|
109
|
+
hidden
|
|
110
|
+
default
|
|
98
111
|
options
|
|
112
|
+
mask
|
|
99
113
|
precision
|
|
100
114
|
scale
|
|
115
|
+
mode
|
|
116
|
+
validation
|
|
101
117
|
}
|
|
102
118
|
workflow {
|
|
103
119
|
states
|
package/dist/graphql-client.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { DataClient } from '@stonecrop/schema';
|
|
2
|
+
import type { DoctypeContext } from '@stonecrop/schema';
|
|
1
3
|
import { DoctypeMeta } from '@stonecrop/schema';
|
|
2
|
-
|
|
4
|
+
|
|
5
|
+
export { DoctypeContext }
|
|
3
6
|
|
|
4
7
|
export { DoctypeMeta }
|
|
5
8
|
|
|
@@ -69,13 +72,11 @@ export declare const queries: {
|
|
|
69
72
|
getMeta: string;
|
|
70
73
|
};
|
|
71
74
|
|
|
72
|
-
export { RouteContext }
|
|
73
|
-
|
|
74
75
|
/**
|
|
75
76
|
* Client for interacting with Stonecrop GraphQL API
|
|
76
77
|
* @public
|
|
77
78
|
*/
|
|
78
|
-
export declare class StonecropClient {
|
|
79
|
+
export declare class StonecropClient implements DataClient {
|
|
79
80
|
private endpoint;
|
|
80
81
|
private headers;
|
|
81
82
|
private metaCache;
|
|
@@ -94,9 +95,9 @@ export declare class StonecropClient {
|
|
|
94
95
|
mutate<T = unknown>(mutation: string, variables?: Record<string, unknown>): Promise<T>;
|
|
95
96
|
/**
|
|
96
97
|
* Get doctype metadata
|
|
97
|
-
* @param context -
|
|
98
|
+
* @param context - Doctype context containing doctype name
|
|
98
99
|
*/
|
|
99
|
-
getMeta(context:
|
|
100
|
+
getMeta(context: DoctypeContext): Promise<DoctypeMeta | null>;
|
|
100
101
|
/**
|
|
101
102
|
* Get all doctype metadata
|
|
102
103
|
*/
|
package/dist/graphql-client.js
CHANGED
|
@@ -4104,7 +4104,7 @@ class Li {
|
|
|
4104
4104
|
}
|
|
4105
4105
|
/**
|
|
4106
4106
|
* Get doctype metadata
|
|
4107
|
-
* @param context -
|
|
4107
|
+
* @param context - Doctype context containing doctype name
|
|
4108
4108
|
*/
|
|
4109
4109
|
async getMeta(t) {
|
|
4110
4110
|
const n = this.metaCache.get(t.doctype);
|
|
@@ -4121,11 +4121,19 @@ class Li {
|
|
|
4121
4121
|
fieldtype
|
|
4122
4122
|
component
|
|
4123
4123
|
label
|
|
4124
|
+
width
|
|
4125
|
+
align
|
|
4124
4126
|
required
|
|
4125
4127
|
readOnly
|
|
4128
|
+
edit
|
|
4129
|
+
hidden
|
|
4130
|
+
default
|
|
4126
4131
|
options
|
|
4132
|
+
mask
|
|
4127
4133
|
precision
|
|
4128
4134
|
scale
|
|
4135
|
+
mode
|
|
4136
|
+
validation
|
|
4129
4137
|
}
|
|
4130
4138
|
workflow {
|
|
4131
4139
|
states
|
|
@@ -4157,11 +4165,19 @@ class Li {
|
|
|
4157
4165
|
fieldtype
|
|
4158
4166
|
component
|
|
4159
4167
|
label
|
|
4168
|
+
width
|
|
4169
|
+
align
|
|
4160
4170
|
required
|
|
4161
4171
|
readOnly
|
|
4172
|
+
edit
|
|
4173
|
+
hidden
|
|
4174
|
+
default
|
|
4162
4175
|
options
|
|
4176
|
+
mask
|
|
4163
4177
|
precision
|
|
4164
4178
|
scale
|
|
4179
|
+
mode
|
|
4180
|
+
validation
|
|
4165
4181
|
}
|
|
4166
4182
|
workflow {
|
|
4167
4183
|
states
|