@stonecrop/graphql-middleware 0.8.8 → 0.8.10

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/index.js CHANGED
@@ -1,135 +1,136 @@
1
- import { validateDoctype as D, parseDoctype as M } from "@stonecrop/schema";
2
- import { ActionDefinition as me, DoctypeMeta as ge, FieldMeta as he, FieldOptions as $e, FieldValidation as Se, GQL_SCALAR_MAP as we, StonecropFieldType as be, TYPE_MAP as Ne, WELL_KNOWN_SCALARS as Re, WorkflowMeta as De, camelToLabel as Me, camelToSnake as ke, classifyFieldType as Ae, convertGraphQLSchema as qe, defaultIsEntityField as Oe, defaultIsEntityType as Be, getDefaultComponent as Fe, parseDoctype as Ce, parseField as Ee, pascalToSnake as je, snakeToCamel as xe, snakeToLabel as Te, toPascalCase as Ie, toSlug as Je, validateDoctype as Le, validateField as _e } from "@stonecrop/schema";
3
- import { readdirSync as q, statSync as O, readFileSync as B } from "node:fs";
1
+ import { validateDoctype as N, parseDoctype as D, toPascalCase as R, snakeToCamel as k } from "@stonecrop/schema";
2
+ import { ActionDefinition as he, DoctypeMeta as Se, FieldMeta as $e, FieldOptions as we, FieldValidation as be, GQL_SCALAR_MAP as Ne, StonecropFieldType as De, TYPE_MAP as Re, WELL_KNOWN_SCALARS as Me, WorkflowMeta as ke, camelToLabel as Ae, camelToSnake as qe, classifyFieldType as Oe, convertGraphQLSchema as Fe, defaultIsEntityField as Ee, defaultIsEntityType as Be, getDefaultComponent as Te, parseDoctype as Ce, parseField as je, pascalToSnake as xe, snakeToCamel as Ie, snakeToLabel as Le, toPascalCase as Je, toSlug as _e, validateDoctype as Ge, validateField as Pe } from "@stonecrop/schema";
3
+ import { readdirSync as A, statSync as q, readFileSync as O } from "node:fs";
4
4
  import { join as F } from "node:path";
5
- import { extendSchema as C, gql as E } from "postgraphile/utils";
6
- import { loadOne as w, object as b, constant as j, lambda as x } from "postgraphile/grafast";
7
- const l = /* @__PURE__ */ new Map();
8
- class N extends Error {
9
- constructor(e, o) {
10
- const n = o.map((r) => ` ${r.path.join(".")}: ${r.message}`).join(`
5
+ import { extendSchema as E, gql as B } from "postgraphile/utils";
6
+ import { loadOne as S, object as $, constant as T, lambda as C } from "postgraphile/grafast";
7
+ import j from "pluralize";
8
+ const p = /* @__PURE__ */ new Map();
9
+ class w extends Error {
10
+ constructor(e, r) {
11
+ const n = r.map((o) => ` ${o.path.join(".")}: ${o.message}`).join(`
11
12
  `);
12
13
  super(`Invalid doctype definition in ${e}:
13
- ${n}`), this.file = e, this.errors = o, this.name = "DoctypeValidationError";
14
+ ${n}`), this.file = e, this.errors = r, this.name = "DoctypeValidationError";
14
15
  }
15
16
  }
16
- function T(t, e = {}) {
17
- const o = q(t);
18
- for (const n of o) {
19
- const r = F(t, n);
20
- O(r).isDirectory() ? T(r, e) : n.endsWith(".json") && I(r, e);
17
+ function x(t, e = {}) {
18
+ const r = A(t);
19
+ for (const n of r) {
20
+ const o = F(t, n);
21
+ q(o).isDirectory() ? x(o, e) : n.endsWith(".json") && I(o, e);
21
22
  }
22
23
  }
23
24
  function I(t, e) {
24
- const o = B(t, "utf-8");
25
+ const r = O(t, "utf-8");
25
26
  let n;
26
27
  try {
27
- n = JSON.parse(o);
28
- } catch (c) {
29
- const s = {
28
+ n = JSON.parse(r);
29
+ } catch (s) {
30
+ const c = {
30
31
  path: [],
31
- message: `Invalid JSON: ${c instanceof Error ? c.message : String(c)}`
32
+ message: `Invalid JSON: ${s instanceof Error ? s.message : String(s)}`
32
33
  };
33
34
  if (e.continueOnError) {
34
- e.onError?.(t, [s]);
35
+ e.onError?.(t, [c]);
35
36
  return;
36
37
  }
37
- throw new N(t, [s]);
38
+ throw new w(t, [c]);
38
39
  }
39
- const r = D(n);
40
- if (!r.success) {
40
+ const o = N(n);
41
+ if (!o.success) {
41
42
  if (e.continueOnError) {
42
- e.onError?.(t, r.errors);
43
+ e.onError?.(t, o.errors);
43
44
  return;
44
45
  }
45
- throw new N(t, r.errors);
46
+ throw new w(t, o.errors);
46
47
  }
47
- const a = M(n);
48
- l.set(a.name, a);
48
+ const a = D(n);
49
+ p.set(a.name, a);
49
50
  }
50
- function ne(t, e = {}) {
51
- for (const [o, n] of Object.entries(t)) {
52
- const r = { ...n, name: o }, a = D(r);
51
+ function se(t, e = {}) {
52
+ for (const [r, n] of Object.entries(t)) {
53
+ const o = { ...n, name: r }, a = N(o);
53
54
  if (!a.success) {
54
55
  if (e.continueOnError) {
55
- e.onError?.(o, a.errors);
56
+ e.onError?.(r, a.errors);
56
57
  continue;
57
58
  }
58
- throw new N(o, a.errors);
59
+ throw new w(r, a.errors);
59
60
  }
60
- const c = M(r);
61
- l.set(c.name, c);
61
+ const s = D(o);
62
+ p.set(s.name, s);
62
63
  }
63
64
  }
64
- function h(t) {
65
- return l.get(t);
65
+ function m(t) {
66
+ return p.get(t);
66
67
  }
67
- function J() {
68
- return Array.from(l.values());
68
+ function L() {
69
+ return Array.from(p.values());
69
70
  }
70
- function ae(t) {
71
- return l.has(t);
71
+ function ce(t) {
72
+ return p.has(t);
72
73
  }
73
- function ce() {
74
- l.clear();
74
+ function ie() {
75
+ p.clear();
75
76
  }
76
- function se() {
77
+ function de() {
77
78
  const t = [];
78
- for (const e of l.values()) {
79
- e.inherits && !l.has(e.inherits) && t.push({
79
+ for (const e of p.values()) {
80
+ e.inherits && !p.has(e.inherits) && t.push({
80
81
  path: [e.name, "inherits"],
81
82
  message: `References unknown doctype: ${e.inherits}`
82
- }), e.listDoctype && !l.has(e.listDoctype) && t.push({
83
+ }), e.listDoctype && !p.has(e.listDoctype) && t.push({
83
84
  path: [e.name, "listDoctype"],
84
85
  message: `References unknown doctype: ${e.listDoctype}`
85
- }), e.parentDoctype && !l.has(e.parentDoctype) && t.push({
86
+ }), e.parentDoctype && !p.has(e.parentDoctype) && t.push({
86
87
  path: [e.name, "parentDoctype"],
87
88
  message: `References unknown doctype: ${e.parentDoctype}`
88
89
  });
89
- for (const o of e.fields)
90
- o.fieldtype === "Link" && typeof o.options == "string" && (l.has(o.options) || t.push({
91
- path: [e.name, "fields", o.fieldname, "options"],
92
- message: `Link references unknown doctype: ${o.options}`
90
+ for (const r of e.fields)
91
+ r.fieldtype === "Link" && typeof r.options == "string" && (p.has(r.options) || t.push({
92
+ path: [e.name, "fields", r.fieldname, "options"],
93
+ message: `Link references unknown doctype: ${r.options}`
93
94
  }));
94
95
  }
95
96
  return t;
96
97
  }
97
- const $ = /* @__PURE__ */ new Map();
98
- function L(t, e) {
99
- $.set(t, e);
98
+ const g = /* @__PURE__ */ new Map();
99
+ function J(t, e) {
100
+ g.set(t, e);
100
101
  }
101
102
  function _(t) {
102
- return $.get(t);
103
+ return g.get(t);
103
104
  }
104
- function ie(t) {
105
- return $.has(t);
105
+ function le(t) {
106
+ return g.has(t);
106
107
  }
107
- function de() {
108
- $.clear();
108
+ function pe() {
109
+ g.clear();
109
110
  }
110
111
  const G = async (t, e) => {
111
- const [o] = t, { doctype: n } = e, r = [];
112
+ const [r] = t, { doctype: n } = e, o = [];
112
113
  for (const a of n.fields)
113
- a.required && (o[a.fieldname] === void 0 || o[a.fieldname] === null) && r.push(a.label ?? a.fieldname);
114
- if (r.length > 0)
115
- throw new Error(`Missing required fields: ${r.join(", ")}`);
114
+ a.required && (r[a.fieldname] === void 0 || r[a.fieldname] === null) && o.push(a.label ?? a.fieldname);
115
+ if (o.length > 0)
116
+ throw new Error(`Missing required fields: ${o.join(", ")}`);
116
117
  return { valid: !0 };
117
- }, U = async (t, e) => {
118
- const [o] = t, { doctype: n } = e, r = [];
118
+ }, P = async (t, e) => {
119
+ const [r] = t, { doctype: n } = e, o = [];
119
120
  for (const a of n.fields) {
120
- const c = o[a.fieldname];
121
- if (c == null) continue;
122
- const s = H(a.fieldname, c, a.fieldtype);
123
- s && r.push(s);
121
+ const s = r[a.fieldname];
122
+ if (s == null) continue;
123
+ const c = H(a.fieldname, s, a.fieldtype);
124
+ c && o.push(c);
124
125
  }
125
- if (r.length > 0)
126
+ if (o.length > 0)
126
127
  throw new Error(`Field type validation failed:
127
- ${r.join(`
128
+ ${o.join(`
128
129
  `)}`);
129
130
  return { valid: !0 };
130
131
  };
131
- function H(t, e, o) {
132
- switch (o) {
132
+ function H(t, e, r) {
133
+ switch (r) {
133
134
  case "Int":
134
135
  if (typeof e != "number" || !Number.isInteger(e))
135
136
  return `${t}: expected integer, got ${typeof e}`;
@@ -169,19 +170,19 @@ function H(t, e, o) {
169
170
  }
170
171
  return null;
171
172
  }
172
- const P = async () => ({ ok: !0 }), Q = {
173
+ const Q = async () => ({ ok: !0 }), U = {
173
174
  validateRequiredFields: G,
174
- validateFieldTypes: U,
175
- noop: P
175
+ validateFieldTypes: P,
176
+ noop: Q
176
177
  };
177
- function le() {
178
- for (const [t, e] of Object.entries(Q))
179
- L(t, e);
178
+ function ye() {
179
+ for (const [t, e] of Object.entries(U))
180
+ J(t, e);
180
181
  }
181
- const pe = (t) => {
182
- const e = t.inflection?.recordFieldName ?? W, o = t.inflection?.connectionFieldName ?? V, n = t.inflection?.orderByTypeName ?? v;
183
- return C(() => ({
184
- typeDefs: E`
182
+ const ue = (t) => {
183
+ const e = t.inflection?.recordFieldName ?? W, r = t.inflection?.connectionFieldName ?? v, n = t.inflection?.orderByTypeName ?? V;
184
+ return E(() => ({
185
+ typeDefs: B`
185
186
  type StonecropFieldMeta {
186
187
  fieldname: String!
187
188
  fieldtype: String!
@@ -250,65 +251,62 @@ const pe = (t) => {
250
251
  objects: {
251
252
  Query: {
252
253
  plans: {
253
- stonecropMeta(r, a) {
254
- const c = a.getRaw().doctype;
255
- return x(c, (s) => h(s) ?? null);
254
+ stonecropMeta(o, { $doctype: a }) {
255
+ return C(a, (s) => m(s) ?? null);
256
256
  },
257
257
  stonecropAllMeta() {
258
- return j(J());
258
+ return T(L());
259
259
  },
260
- stonecropRecord(r, a) {
261
- const c = a.getRaw().doctype, s = a.getRaw().id;
262
- return w(b({ doctype: c, id: s }), async (y) => await Promise.all(
263
- y.map(async (d) => {
264
- const u = h(d.doctype);
265
- if (!u)
260
+ stonecropRecord(o, { $doctype: a, $id: s }) {
261
+ return S($({ doctype: a, id: s }), async (c) => await Promise.all(
262
+ c.map(async (d) => {
263
+ const l = m(d.doctype);
264
+ if (!l)
266
265
  throw new Error(`Unknown doctype: ${d.doctype}`);
267
- if (!u.tableName)
266
+ if (!l.tableName)
268
267
  throw new Error(`Doctype ${d.doctype} has no table mapping`);
269
- const p = z(u, e), f = await t.executor.query(p, { id: d.id });
268
+ const y = z(l, e), i = await t.executor.query(y, { id: d.id });
270
269
  return {
271
- data: Y(f, u, e),
270
+ data: X(i, l, e),
272
271
  doctype: d.doctype
273
272
  };
274
273
  })
275
274
  ));
276
275
  },
277
- stonecropRecords(r, a) {
278
- const c = a.getRaw(), s = c.doctype, y = c.filters, d = c.orderBy, u = c.limit, p = c.offset;
279
- return w(
280
- b({
281
- doctype: s,
282
- filters: y,
283
- orderBy: d,
284
- limit: u,
285
- offset: p
276
+ stonecropRecords(o, { $doctype: a, $filters: s, $orderBy: c, $limit: d, $offset: l }) {
277
+ return S(
278
+ $({
279
+ doctype: a,
280
+ filters: s,
281
+ orderBy: c,
282
+ limit: d,
283
+ offset: l
286
284
  }),
287
- async (f) => await Promise.all(
288
- f.map(async (i) => {
289
- const m = h(i.doctype);
290
- if (!m)
285
+ async (y) => await Promise.all(
286
+ y.map(async (i) => {
287
+ const u = m(i.doctype);
288
+ if (!u)
291
289
  throw new Error(`Unknown doctype: ${i.doctype}`);
292
- if (!m.tableName)
290
+ if (!u.tableName)
293
291
  throw new Error(`Doctype ${i.doctype} has no table mapping`);
294
- const S = K(
295
- m,
292
+ const h = K(
293
+ u,
296
294
  {
297
295
  limit: i.limit,
298
296
  offset: i.offset,
299
297
  orderBy: i.orderBy
300
298
  },
301
- o,
299
+ r,
302
300
  n
303
- ), g = await t.executor.query(S, {
301
+ ), f = await t.executor.query(h, {
304
302
  limit: i.limit,
305
303
  offset: i.offset,
306
304
  orderBy: i.orderBy
307
- }), R = X(g, m, o);
305
+ }), b = Z(f, u, r);
308
306
  return {
309
- data: R,
307
+ data: b,
310
308
  doctype: i.doctype,
311
- count: R.length
309
+ count: b.length
312
310
  };
313
311
  })
314
312
  )
@@ -318,52 +316,51 @@ const pe = (t) => {
318
316
  },
319
317
  Mutation: {
320
318
  plans: {
321
- stonecropAction(r, a) {
322
- const c = a.getRaw(), s = c.doctype, y = c.action, d = c.args;
323
- return w(
324
- b({
325
- doctype: s,
326
- action: y,
327
- actionArgs: d
319
+ stonecropAction(o, { $doctype: a, $action: s, $args: c }) {
320
+ return S(
321
+ $({
322
+ doctype: a,
323
+ action: s,
324
+ actionArgs: c
328
325
  }),
329
- async (u) => await Promise.all(
330
- u.map(async (p) => {
331
- const f = h(p.doctype);
332
- if (!f)
326
+ async (d) => await Promise.all(
327
+ d.map(async (l) => {
328
+ const y = m(l.doctype);
329
+ if (!y)
333
330
  return {
334
331
  success: !1,
335
332
  data: null,
336
- error: `Unknown doctype: ${p.doctype}`
333
+ error: `Unknown doctype: ${l.doctype}`
337
334
  };
338
- const i = f.workflow?.actions?.[p.action];
335
+ const i = y.workflow?.actions?.[l.action];
339
336
  if (!i)
340
337
  return {
341
338
  success: !1,
342
339
  data: null,
343
- error: `Unknown action: ${p.action} on ${p.doctype}`
340
+ error: `Unknown action: ${l.action} on ${l.doctype}`
344
341
  };
345
- const m = _(i.handler);
346
- if (!m)
342
+ const u = _(i.handler);
343
+ if (!u)
347
344
  return {
348
345
  success: !1,
349
346
  data: null,
350
347
  error: `Handler not registered: ${i.handler}`
351
348
  };
352
- const S = {
353
- doctype: f,
349
+ const h = {
350
+ doctype: y,
354
351
  executor: t.executor
355
352
  };
356
353
  try {
357
354
  return {
358
355
  success: !0,
359
- data: await m(p.actionArgs ?? [], S),
356
+ data: await u(l.actionArgs ?? [], h),
360
357
  error: null
361
358
  };
362
- } catch (g) {
359
+ } catch (f) {
363
360
  return {
364
361
  success: !1,
365
362
  data: null,
366
- error: g instanceof Error ? g.message : String(g)
363
+ error: f instanceof Error ? f.message : String(f)
367
364
  };
368
365
  }
369
366
  })
@@ -375,58 +372,54 @@ const pe = (t) => {
375
372
  }
376
373
  }));
377
374
  };
378
- function k(t) {
379
- return t.replace(/_([a-z])/g, (e, o) => o.toUpperCase());
380
- }
381
- function A(t) {
382
- const e = k(t);
383
- return e.charAt(0).toUpperCase() + e.slice(1);
384
- }
385
375
  function W(t) {
386
- const e = t.replace(/s$/, "");
376
+ const e = j.singular(t);
387
377
  return `${k(e)}ById`;
388
378
  }
379
+ function v(t) {
380
+ return `all${R(t)}`;
381
+ }
389
382
  function V(t) {
390
- return `all${A(t)}`;
383
+ return `${R(t)}OrderBy`;
391
384
  }
392
- function v(t) {
393
- return `${A(t)}OrderBy`;
385
+ const Y = /* @__PURE__ */ new Set(["Link", "Doctype"]);
386
+ function M(t) {
387
+ return t.fields.filter((e) => !Y.has(e.fieldtype)).map((e) => e.fieldname).join(`
388
+ `);
394
389
  }
395
390
  function z(t, e) {
396
- const o = t.fields.map((r) => r.fieldname).join(`
397
- `);
391
+ const r = M(t);
398
392
  return `
399
393
  query GetRecord($id: UUID!) {
400
394
  ${e(t.tableName)}(id: $id) {
401
- ${o}
395
+ ${r}
402
396
  }
403
397
  }
404
398
  `;
405
399
  }
406
- function K(t, e, o, n) {
407
- const r = t.fields.map((d) => d.fieldname).join(`
408
- `), a = o(t.tableName), c = n(t.tableName), s = [];
409
- e.limit && s.push("first: $limit"), e.offset && s.push("offset: $offset"), e.orderBy && s.push("orderBy: $orderBy");
410
- const y = s.length > 0 ? `(${s.join(", ")})` : "";
400
+ function K(t, e, r, n) {
401
+ const o = M(t), a = r(t.tableName), s = n(t.tableName), c = [], d = [];
402
+ e.limit && (c.push("$limit: Int"), d.push("first: $limit")), e.offset && (c.push("$offset: Int"), d.push("offset: $offset")), e.orderBy && (c.push(`$orderBy: [${s}!]`), d.push("orderBy: $orderBy"));
403
+ const l = c.length > 0 ? `(${c.join(", ")})` : "", y = d.length > 0 ? `(${d.join(", ")})` : "";
411
404
  return `
412
- query GetRecords($limit: Int, $offset: Int, $orderBy: [${c}!]) {
405
+ query GetRecords${l} {
413
406
  ${a}${y} {
414
407
  nodes {
415
- ${r}
408
+ ${o}
416
409
  }
417
410
  }
418
411
  }
419
412
  `;
420
413
  }
421
- function Y(t, e, o) {
422
- const n = o(e.tableName);
414
+ function X(t, e, r) {
415
+ const n = r(e.tableName);
423
416
  return t[n];
424
417
  }
425
- function X(t, e, o) {
426
- const n = o(e.tableName);
418
+ function Z(t, e, r) {
419
+ const n = r(e.tableName);
427
420
  return t[n]?.nodes ?? [];
428
421
  }
429
- class ye {
422
+ class fe {
430
423
  endpoint;
431
424
  headers;
432
425
  metaCache = /* @__PURE__ */ new Map();
@@ -441,31 +434,31 @@ class ye {
441
434
  * @param query - GraphQL query string
442
435
  * @param variables - Query variables
443
436
  */
444
- async query(e, o) {
445
- const r = await (await fetch(this.endpoint, {
437
+ async query(e, r) {
438
+ const o = await (await fetch(this.endpoint, {
446
439
  method: "POST",
447
440
  headers: this.headers,
448
- body: JSON.stringify({ query: e, variables: o })
441
+ body: JSON.stringify({ query: e, variables: r })
449
442
  })).json();
450
- if (r.errors?.length)
451
- throw new Error(r.errors[0].message);
452
- return r.data;
443
+ if (o.errors?.length)
444
+ throw new Error(o.errors[0].message);
445
+ return o.data;
453
446
  }
454
447
  /**
455
448
  * Execute a GraphQL mutation
456
449
  * @param mutation - GraphQL mutation string
457
450
  * @param variables - Mutation variables
458
451
  */
459
- async mutate(e, o) {
460
- return this.query(e, o);
452
+ async mutate(e, r) {
453
+ return this.query(e, r);
461
454
  }
462
455
  /**
463
456
  * Get doctype metadata
464
457
  * @param context - Route context containing doctype name
465
458
  */
466
459
  async getMeta(e) {
467
- const o = this.metaCache.get(e.doctype);
468
- if (o) return o;
460
+ const r = this.metaCache.get(e.doctype);
461
+ if (r) return r;
469
462
  const n = await this.query(
470
463
  `
471
464
  query GetMeta($doctype: String!) {
@@ -531,8 +524,8 @@ class ye {
531
524
  }
532
525
  `
533
526
  );
534
- for (const o of e.stonecropAllMeta)
535
- this.metaCache.set(o.name, o);
527
+ for (const r of e.stonecropAllMeta)
528
+ this.metaCache.set(r.name, r);
536
529
  return e.stonecropAllMeta;
537
530
  }
538
531
  /**
@@ -540,7 +533,7 @@ class ye {
540
533
  * @param doctype - Doctype metadata
541
534
  * @param recordId - Record ID to fetch
542
535
  */
543
- async getRecord(e, o) {
536
+ async getRecord(e, r) {
544
537
  return (await this.query(
545
538
  `
546
539
  query GetRecord($doctype: String!, $id: String!) {
@@ -549,7 +542,7 @@ class ye {
549
542
  }
550
543
  }
551
544
  `,
552
- { doctype: e.name, id: o }
545
+ { doctype: e.name, id: r }
553
546
  )).stonecropRecord.data;
554
547
  }
555
548
  /**
@@ -557,7 +550,7 @@ class ye {
557
550
  * @param doctype - Doctype metadata
558
551
  * @param options - Query options (filters, orderBy, limit, offset)
559
552
  */
560
- async getRecords(e, o) {
553
+ async getRecords(e, r) {
561
554
  return (await this.query(
562
555
  `
563
556
  query GetRecords(
@@ -581,7 +574,7 @@ class ye {
581
574
  `,
582
575
  {
583
576
  doctype: e.name,
584
- ...o
577
+ ...r
585
578
  }
586
579
  )).stonecropRecords.data;
587
580
  }
@@ -591,7 +584,7 @@ class ye {
591
584
  * @param action - Action name to execute
592
585
  * @param args - Action arguments
593
586
  */
594
- async runAction(e, o, n) {
587
+ async runAction(e, r, n) {
595
588
  return (await this.query(
596
589
  `
597
590
  mutation RunAction($doctype: String!, $action: String!, $args: JSON) {
@@ -604,7 +597,7 @@ class ye {
604
597
  `,
605
598
  {
606
599
  doctype: e.name,
607
- action: o,
600
+ action: r,
608
601
  args: n
609
602
  }
610
603
  )).stonecropAction;
@@ -617,46 +610,54 @@ class ye {
617
610
  }
618
611
  }
619
612
  export {
620
- me as ActionDefinition,
621
- ge as DoctypeMeta,
622
- N as DoctypeValidationError,
623
- he as FieldMeta,
624
- $e as FieldOptions,
625
- Se as FieldValidation,
626
- we as GQL_SCALAR_MAP,
627
- ye as StonecropClient,
628
- be as StonecropFieldType,
629
- Ne as TYPE_MAP,
630
- Re as WELL_KNOWN_SCALARS,
631
- De as WorkflowMeta,
632
- Q as builtinHandlers,
633
- Me as camelToLabel,
634
- ke as camelToSnake,
635
- Ae as classifyFieldType,
636
- de as clearHandlers,
637
- ce as clearRegistry,
638
- qe as convertGraphQLSchema,
639
- pe as createStonecropPlugin,
640
- Oe as defaultIsEntityField,
613
+ he as ActionDefinition,
614
+ Se as DoctypeMeta,
615
+ w as DoctypeValidationError,
616
+ $e as FieldMeta,
617
+ we as FieldOptions,
618
+ be as FieldValidation,
619
+ Ne as GQL_SCALAR_MAP,
620
+ Y as RELATION_FIELDTYPES,
621
+ fe as StonecropClient,
622
+ De as StonecropFieldType,
623
+ Re as TYPE_MAP,
624
+ Me as WELL_KNOWN_SCALARS,
625
+ ke as WorkflowMeta,
626
+ K as buildListQuery,
627
+ z as buildRecordQuery,
628
+ U as builtinHandlers,
629
+ Ae as camelToLabel,
630
+ qe as camelToSnake,
631
+ Oe as classifyFieldType,
632
+ pe as clearHandlers,
633
+ ie as clearRegistry,
634
+ Fe as convertGraphQLSchema,
635
+ ue as createStonecropPlugin,
636
+ v as defaultConnectionFieldName,
637
+ Ee as defaultIsEntityField,
641
638
  Be as defaultIsEntityType,
642
- J as getAllMeta,
643
- Fe as getDefaultComponent,
639
+ V as defaultOrderByTypeName,
640
+ W as defaultRecordFieldName,
641
+ L as getAllMeta,
642
+ Te as getDefaultComponent,
644
643
  _ as getHandler,
645
- h as getMeta,
646
- ie as hasHandler,
647
- ae as hasMeta,
648
- T as loadDoctypes,
649
- ne as loadDoctypesFromObject,
644
+ m as getMeta,
645
+ le as hasHandler,
646
+ ce as hasMeta,
647
+ x as loadDoctypes,
648
+ se as loadDoctypesFromObject,
650
649
  Ce as parseDoctype,
651
- Ee as parseField,
652
- je as pascalToSnake,
653
- le as registerBuiltinHandlers,
654
- L as registerHandler,
655
- xe as snakeToCamel,
656
- Te as snakeToLabel,
657
- Ie as toPascalCase,
658
- Je as toSlug,
659
- Le as validateDoctype,
660
- _e as validateField,
661
- se as validateReferences
650
+ je as parseField,
651
+ xe as pascalToSnake,
652
+ M as queryableFieldNames,
653
+ ye as registerBuiltinHandlers,
654
+ J as registerHandler,
655
+ Ie as snakeToCamel,
656
+ Le as snakeToLabel,
657
+ Je as toPascalCase,
658
+ _e as toSlug,
659
+ Ge as validateDoctype,
660
+ Pe as validateField,
661
+ de as validateReferences
662
662
  };
663
+ //# sourceMappingURL=index.js.map