@conduit-client/lwc-types 3.8.0 → 3.10.0

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.
@@ -7,4 +7,4 @@
7
7
  * These types are compatible with the LWC wire service and can be used
8
8
  * to implement wire adapters that work with LWC components.
9
9
  */
10
- export { type WireAdapter, type WireAdapterConstructor, type ConfigValue as WireConfigValue, type ContextValue as WireContextValue, type DataCallback as WireDataCallback, } from './wire-adapter-types';
10
+ export { type WireAdapter, type WireAdapterConstructor, type WireAdapterResult, type GraphQLWireAdapterResult, type ConfigValue as WireConfigValue, type ContextValue as WireContextValue, type DataCallback as WireDataCallback, } from './wire-adapter-types';
@@ -14,6 +14,24 @@ export interface WireAdapterConstructor<Config extends ConfigValue = ConfigValue
14
14
  configSchema?: Record<keyof Config, WireAdapterSchemaValue>;
15
15
  contextSchema?: Record<keyof Context, WireAdapterSchemaValue>;
16
16
  }
17
+ export type WireAdapterResult<Data, Error = unknown> = {
18
+ data?: Data;
19
+ error?: Error;
20
+ refresh?: () => Promise<void>;
21
+ };
22
+ export type GraphQLWireAdapterResult = {
23
+ data?: Record<string, any> | null;
24
+ errors?: ReadonlyArray<{
25
+ message: string;
26
+ locations?: ReadonlyArray<{
27
+ line: number;
28
+ column: number;
29
+ }>;
30
+ path?: ReadonlyArray<string | number>;
31
+ extensions?: Record<string, any>;
32
+ }>;
33
+ refresh?: () => Promise<void>;
34
+ };
17
35
  export interface WireDef {
18
36
  method?: (data: any) => void;
19
37
  adapter: WireAdapterConstructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduit-client/lwc-types",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "private": false,
5
5
  "description": "OneStore LWC Wire Adapter Types",
6
6
  "type": "module",