@stonecrop/graphql-middleware 0.7.0 → 0.7.1

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,29 +1,75 @@
1
1
  import { DoctypeMeta, RouteContext, GraphQLExecutor } from '../types';
2
+ /**
3
+ * Options for creating a Stonecrop client
4
+ * @public
5
+ */
2
6
  export interface StonecropClientOptions {
7
+ /** GraphQL endpoint URL */
3
8
  endpoint: string;
9
+ /** Additional HTTP headers to include in requests */
4
10
  headers?: Record<string, string>;
5
11
  }
12
+ /**
13
+ * Client for interacting with Stonecrop GraphQL API
14
+ * @public
15
+ */
6
16
  export declare class StonecropClient implements GraphQLExecutor {
7
17
  private endpoint;
8
18
  private headers;
9
19
  private metaCache;
10
20
  constructor(options: StonecropClientOptions);
21
+ /**
22
+ * Execute a GraphQL query
23
+ * @param query - GraphQL query string
24
+ * @param variables - Query variables
25
+ */
11
26
  query<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<T>;
27
+ /**
28
+ * Execute a GraphQL mutation
29
+ * @param mutation - GraphQL mutation string
30
+ * @param variables - Mutation variables
31
+ */
12
32
  mutate<T = unknown>(mutation: string, variables?: Record<string, unknown>): Promise<T>;
33
+ /**
34
+ * Get doctype metadata
35
+ * @param context - Route context containing doctype name
36
+ */
13
37
  getMeta(context: RouteContext): Promise<DoctypeMeta | null>;
38
+ /**
39
+ * Get all doctype metadata
40
+ */
14
41
  getAllMeta(): Promise<DoctypeMeta[]>;
42
+ /**
43
+ * Get a single record by ID
44
+ * @param doctype - Doctype metadata
45
+ * @param recordId - Record ID to fetch
46
+ */
15
47
  getRecord(doctype: DoctypeMeta, recordId: string): Promise<Record<string, unknown> | null>;
48
+ /**
49
+ * Get multiple records with optional filtering and pagination
50
+ * @param doctype - Doctype metadata
51
+ * @param options - Query options (filters, orderBy, limit, offset)
52
+ */
16
53
  getRecords(doctype: DoctypeMeta, options?: {
17
54
  filters?: Record<string, unknown>;
18
55
  orderBy?: string;
19
56
  limit?: number;
20
57
  offset?: number;
21
58
  }): Promise<Record<string, unknown>[]>;
59
+ /**
60
+ * Execute a doctype action
61
+ * @param doctype - Doctype metadata
62
+ * @param action - Action name to execute
63
+ * @param args - Action arguments
64
+ */
22
65
  runAction(doctype: DoctypeMeta, action: string, args?: unknown[]): Promise<{
23
66
  success: boolean;
24
67
  data: unknown;
25
68
  error: string | null;
26
69
  }>;
70
+ /**
71
+ * Clear the cached doctype metadata
72
+ */
27
73
  clearMetaCache(): void;
28
74
  }
29
75
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1E,MAAM,WAAW,sBAAsB;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,qBAAa,eAAgB,YAAW,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,SAAS,CAAsC;gBAE3C,OAAO,EAAE,sBAAsB;IAQrC,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAmBlF,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAItF,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IA0C3D,UAAU,IAAI,OAAO,CAAC,WAAW,EAA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,18 @@
1
+ import { GraphileConfig } from 'postgraphile/graphile-build';
1
2
  import { GraphQLExecutor } from '../types';
3
+ /**
4
+ * Options for creating a Stonecrop PostGraphile plugin
5
+ * @public
6
+ */
2
7
  export interface StonecropPluginOptions {
8
+ /** GraphQL executor for running queries/mutations */
3
9
  executor: GraphQLExecutor;
4
10
  }
11
+ /**
12
+ * Create a PostGraphile plugin that extends the GraphQL schema with Stonecrop functionality
13
+ * @param options - Plugin configuration options
14
+ * @returns A PostGraphile plugin
15
+ * @public
16
+ */
5
17
  export declare const createStonecropPlugin: (options: StonecropPluginOptions) => GraphileConfig.Plugin;
6
18
  //# sourceMappingURL=postgraphile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgraphile.d.ts","sourceRoot":"","sources":["../../../src/plugin/postgraphile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAA8B,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,MAAM,WAAW,sBAAsB;IACtC,QAAQ,EAAE,eAAe,CAAA;CACzB;AAED,eAAO,MAAM,qBAAqB,GAAI,SAAS,sBAAsB,0BAmLpE,CAAA"}
1
+ {"version":3,"file":"postgraphile.d.ts","sourceRoot":"","sources":["../../../src/plugin/postgraphile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAI5D,OAAO,KAAK,EAA8B,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACtC,qDAAqD;IACrD,QAAQ,EAAE,eAAe,CAAA;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,sBAAsB,KAAG,cAAc,CAAC,MA2OtF,CAAA"}
@@ -1,26 +1,36 @@
1
1
  import { ActionHandler } from '../types';
2
2
  /**
3
3
  * Register an action handler
4
+ * @param name - Unique name for the action handler
5
+ * @param handler - Action handler function to register
6
+ * @public
4
7
  */
5
8
  export declare function registerHandler(name: string, handler: ActionHandler): void;
6
9
  /**
7
10
  * Get a registered handler by name
11
+ * @param name - Name of the action handler to retrieve
12
+ * @public
8
13
  */
9
14
  export declare function getHandler(name: string): ActionHandler | undefined;
10
15
  /**
11
16
  * Check if a handler is registered
17
+ * @param name - Name of the action handler to check
18
+ * @public
12
19
  */
13
20
  export declare function hasHandler(name: string): boolean;
14
21
  /**
15
22
  * Clear all registered handlers
23
+ * @public
16
24
  */
17
25
  export declare function clearHandlers(): void;
18
26
  /**
19
27
  * Built-in handlers available for registration
28
+ * @public
20
29
  */
21
30
  export declare const builtinHandlers: Record<string, ActionHandler>;
22
31
  /**
23
32
  * Register all built-in handlers
33
+ * @public
24
34
  */
25
35
  export declare function registerBuiltinHandlers(): void;
26
36
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/registry/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAA8B,MAAM,UAAU,CAAA;AAIzE;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAE1E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAElE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAqHD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAIzD,CAAA;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/registry/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAA8B,MAAM,UAAU,CAAA;AAIzE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAElE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAqHD;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAIzD,CAAA;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C"}
@@ -1,9 +1,23 @@
1
1
  import { DoctypeMeta, ValidationError } from '../types';
2
+ /**
3
+ * Error thrown when a doctype definition fails validation
4
+ * @public
5
+ */
2
6
  export declare class DoctypeValidationError extends Error {
7
+ /** File path or name where the validation error occurred */
3
8
  readonly file: string;
9
+ /** List of validation errors found */
4
10
  readonly errors: ValidationError[];
5
- constructor(file: string, errors: ValidationError[]);
11
+ constructor(
12
+ /** File path or name where the validation error occurred */
13
+ file: string,
14
+ /** List of validation errors found */
15
+ errors: ValidationError[]);
6
16
  }
17
+ /**
18
+ * Options for loading doctype definitions
19
+ * @public
20
+ */
7
21
  export interface LoadDoctypesOptions {
8
22
  /** Continue loading other files if one fails validation */
9
23
  continueOnError?: boolean;
@@ -12,31 +26,44 @@ export interface LoadDoctypesOptions {
12
26
  }
13
27
  /**
14
28
  * Load doctype definitions from a directory of JSON files
29
+ * @param dir - Directory path containing doctype JSON files
30
+ * @param options - Options for loading doctypes (continueOnError, onError callback)
31
+ * @public
15
32
  */
16
33
  export declare function loadDoctypes(dir: string, options?: LoadDoctypesOptions): void;
17
34
  /**
18
35
  * Load doctypes from an object (for programmatic use)
36
+ * @param doctypes - Object mapping doctype names to doctype definitions
37
+ * @param options - Options for loading doctypes (continueOnError, onError callback)
38
+ * @public
19
39
  */
20
40
  export declare function loadDoctypesFromObject(doctypes: Record<string, unknown>, options?: LoadDoctypesOptions): void;
21
41
  /**
22
42
  * Get a doctype by name
43
+ * @param name - Name of the doctype to retrieve
44
+ * @public
23
45
  */
24
46
  export declare function getMeta(name: string): DoctypeMeta | undefined;
25
47
  /**
26
48
  * Get all loaded doctypes
49
+ * @public
27
50
  */
28
51
  export declare function getAllMeta(): DoctypeMeta[];
29
52
  /**
30
53
  * Check if a doctype is registered
54
+ * @param name - Name of the doctype to check
55
+ * @public
31
56
  */
32
57
  export declare function hasMeta(name: string): boolean;
33
58
  /**
34
59
  * Clear all registered doctypes
60
+ * @public
35
61
  */
36
62
  export declare function clearRegistry(): void;
37
63
  /**
38
64
  * Validate cross-doctype references (Link fields, inherits, etc.)
39
65
  * Call after all doctypes are loaded.
66
+ * @public
40
67
  */
41
68
  export declare function validateReferences(): ValidationError[];
42
69
  //# sourceMappingURL=doctypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctypes.d.ts","sourceRoot":"","sources":["../../../src/registry/doctypes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI5D,qBAAa,sBAAuB,SAAQ,KAAK;aACpB,IAAI,EAAE,MAAM;aAAkB,MAAM,EAAE,eAAe,EAAE;gBAAvD,IAAI,EAAE,MAAM,EAAkB,MAAM,EAAE,eAAe,EAAE;CAKnF;AAED,MAAM,WAAW,mBAAmB;IACnC,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kEAAkE;IAClE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAA;CAC3D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAajF;AAsCD;;GAEG;AACH,wBAAgB,s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AO,GAAE,mBAAwB,GAAG,IAAI,CAgBjH;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,WAAW,EAAE,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,EAAE,CA0CtD"}
@@ -3,29 +3,41 @@ export { StonecropFieldType, FieldOptions, FieldMeta, ActionDefinition, Workflow
3
3
  export type { ValidationResult, ValidationError, ConversionFieldMeta, ParsedColumn, ParsedTable, ConversionOptions, PostgresType, } from '@stonecrop/schema';
4
4
  /**
5
5
  * Route context for identifying what doctype/record we're working with
6
+ * @public
6
7
  */
7
8
  export interface RouteContext {
9
+ /** Doctype name (e.g., 'Task', 'Customer') */
8
10
  doctype: string;
11
+ /** Optional record ID for viewing/editing a specific record */
9
12
  recordId?: string;
13
+ /** Additional context properties */
10
14
  [key: string]: unknown;
11
15
  }
12
16
  /**
13
17
  * GraphQL executor interface for running queries/mutations
18
+ * @public
14
19
  */
15
20
  export interface GraphQLExecutor {
21
+ /** Execute a GraphQL query */
16
22
  query<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<T>;
23
+ /** Execute a GraphQL mutation */
17
24
  mutate<T = unknown>(mutation: string, variables?: Record<string, unknown>): Promise<T>;
18
25
  }
19
26
  /**
20
27
  * Context passed to action handlers
28
+ * @public
21
29
  */
22
30
  export interface ActionContext {
31
+ /** Doctype metadata for the action being executed */
23
32
  doctype: DoctypeMeta;
33
+ /** GraphQL executor for running queries/mutations within the action */
24
34
  executor: GraphQLExecutor;
35
+ /** Additional context properties */
25
36
  [key: string]: unknown;
26
37
  }
27
38
  /**
28
39
  * Action handler function signature
40
+ * @public
29
41
  */
30
42
  export type ActionHandler = (args: unknown[], context: ActionContext) => Promise<unknown>;
31
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,mBAAmB,CAAA;AAE1B,YAAY,EACX,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,GACZ,MAAM,mBAAmB,CAAA;AAM1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAClF,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CACtF;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,eAAe,CAAA;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EA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AC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/graphql-middleware",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -18,20 +18,22 @@
18
18
  "dependencies": {
19
19
  "graphql": "^16.12.0",
20
20
  "postgraphile": "^5.0.0-rc.3",
21
- "zod": "^3.25.76",
22
- "@stonecrop/schema": "0.7.0"
21
+ "@stonecrop/schema": "0.7.1"
23
22
  },
24
23
  "devDependencies": {
24
+ "@rushstack/heft": "^1.1.7",
25
25
  "@types/node": "^22.19.5",
26
26
  "typescript": "^5.9.3",
27
27
  "vite": "^7.3.1",
28
28
  "vite-plugin-dts": "^4.5.4",
29
- "vitest": "^4.0.17"
29
+ "vitest": "^4.0.17",
30
+ "stonecrop-rig": "0.7.0"
30
31
  },
31
32
  "scripts": {
32
- "_phase:build": "vite build",
33
- "prepublish": "vite build",
34
- "build": "vite build",
33
+ "_phase:build": "heft build && vite build && rushx docs",
34
+ "prepublish": "heft build && vite build && rushx docs",
35
+ "build": "heft build && vite build && rushx docs",
36
+ "docs": "bash ../common/scripts/run-docs.sh graphql_middleware",
35
37
  "test": "vitest run",
36
38
  "test:watch": "vitest"
37
39
  }