@deenruv/admin-types 1.0.15 → 1.0.17-dev.4
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/scalars.d.ts.map +1 -1
- package/dist/typedDocumentNode.d.ts +2 -1
- package/dist/typedDocumentNode.d.ts.map +1 -1
- package/dist/zeus/index.d.ts +17 -17
- package/dist/zeus/index.d.ts.map +1 -1
- package/dist/zeus/typedDocumentNode.d.ts +2 -1
- package/dist/zeus/typedDocumentNode.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/scalars.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../src/scalars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAE1E,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../src/scalars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAE1E,eAAO,MAAM,OAAO;;gCAEI,MAAM;gCACN,MAAM;;;gCAGN,MAAM;;;oBAGd,OAAO;;;oBAGP,OAAO;oBAKP,OAAO;;CAIrB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,OAAO,CAAC;AAEzC,MAAM,MAAM,uBAAuB,CACjC,QAAQ,EACR,IAAI,SAAS,MAAM,YAAY,IAC7B,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
2
2
|
import { ValueTypes, GenericOperation, OperationOptions, GraphQLTypes, InputType, ScalarDefinition, ThunderGraphQLOptions, ExtractVariables } from "./index.js";
|
|
3
|
-
|
|
3
|
+
import { Ops } from "./zeus/const.js";
|
|
4
|
+
export declare const typedGql: <O extends keyof typeof Ops, SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR>) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions) => TypedDocumentNode<InputType<GraphQLTypes[R], Z, SCLR>, ExtractVariables<Z>>;
|
|
4
5
|
//# sourceMappingURL=typedDocumentNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedDocumentNode.d.ts","sourceRoot":"","sources":["../src/typedDocumentNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EAErB,gBAAgB,EACjB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"typedDocumentNode.d.ts","sourceRoot":"","sources":["../src/typedDocumentNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EAErB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,eAAO,MAAM,QAAQ,GAEjB,CAAC,SAAS,MAAM,OAAO,GAAG,EAC1B,IAAI,SAAS,gBAAgB,EAC7B,CAAC,SAAS,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAEhD,WAAW,CAAC,EACZ,iBAAiB,qBAAqB,CAAC,IAAI,CAAC,MAE7C,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,EACtB,GAAG,CAAC,GAAG,GACJ,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAC7D,EACD,MAAM,gBAAgB,KAMH,iBAAiB,CAClC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EACnC,gBAAgB,CAAC,CAAC,CAAC,CAEtB,CAAC"}
|
package/dist/zeus/index.d.ts
CHANGED
|
@@ -8,38 +8,38 @@ export declare const apiSubscription: (options: chainOptions) => (query: string)
|
|
|
8
8
|
error: (e: (args: any) => void) => void;
|
|
9
9
|
open: (e: () => void) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const apiFetch: (options:
|
|
11
|
+
export declare const apiFetch: (options: fetchOptions) => (query: string, variables?: Record<string, unknown>) => Promise<Record<string, any> | undefined>;
|
|
12
12
|
export declare const InternalsBuildQuery: ({ ops, props, returns, options, scalars, }: {
|
|
13
13
|
props: AllTypesPropsType;
|
|
14
14
|
returns: ReturnTypesType;
|
|
15
15
|
ops: Operations;
|
|
16
|
-
options?: OperationOptions
|
|
17
|
-
scalars?: ScalarDefinition
|
|
16
|
+
options?: OperationOptions;
|
|
17
|
+
scalars?: ScalarDefinition;
|
|
18
18
|
}) => (k: string, o: InputValueType | VType, p?: string, root?: boolean, vars?: Array<{
|
|
19
19
|
name: string;
|
|
20
20
|
graphQLType: string;
|
|
21
21
|
}>) => string;
|
|
22
22
|
type UnionOverrideKeys<T, U> = Omit<T, keyof U> & U;
|
|
23
|
-
export declare const Thunder: <SCLR extends ScalarDefinition>(fn: FetchFunction, thunderGraphQLOptions?: ThunderGraphQLOptions<SCLR>
|
|
23
|
+
export declare const Thunder: <SCLR extends ScalarDefinition>(fn: FetchFunction, thunderGraphQLOptions?: ThunderGraphQLOptions<SCLR>) => <O extends keyof typeof Ops, OVERRIDESCLR extends SCLR, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<OVERRIDESCLR>) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions & {
|
|
24
24
|
variables?: Record<string, unknown>;
|
|
25
25
|
}) => Promise<InputType<GraphQLTypes[R], Z, UnionOverrideKeys<SCLR, OVERRIDESCLR>>>;
|
|
26
|
-
export declare const Chain: (...options: chainOptions) => <O extends
|
|
26
|
+
export declare const Chain: (...options: chainOptions) => <O extends keyof typeof Ops, OVERRIDESCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<OVERRIDESCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions & {
|
|
27
27
|
variables?: Record<string, unknown>;
|
|
28
28
|
}) => Promise<InputType<GraphQLTypes[R], Z, UnionOverrideKeys<ScalarDefinition, OVERRIDESCLR>>>;
|
|
29
|
-
export declare const SubscriptionThunder: <SCLR extends ScalarDefinition>(fn: SubscriptionFunction, thunderGraphQLOptions?: ThunderGraphQLOptions<SCLR>
|
|
30
|
-
variables?: ExtractVariables<Z
|
|
31
|
-
})
|
|
32
|
-
export declare const Subscription: (...options: chainOptions) => <O extends
|
|
33
|
-
variables?: ExtractVariables<Z
|
|
34
|
-
})
|
|
35
|
-
export declare const Zeus: <Z extends ValueTypes[R], O extends
|
|
29
|
+
export declare const SubscriptionThunder: <SCLR extends ScalarDefinition>(fn: SubscriptionFunction, thunderGraphQLOptions?: ThunderGraphQLOptions<SCLR>) => <O extends keyof typeof Ops, OVERRIDESCLR extends SCLR, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<OVERRIDESCLR>) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions & {
|
|
30
|
+
variables?: ExtractVariables<Z>;
|
|
31
|
+
}) => SubscriptionToGraphQL<Z, GraphQLTypes[R], UnionOverrideKeys<SCLR, OVERRIDESCLR>>;
|
|
32
|
+
export declare const Subscription: (...options: chainOptions) => <O extends keyof typeof Ops, OVERRIDESCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<OVERRIDESCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions & {
|
|
33
|
+
variables?: ExtractVariables<Z>;
|
|
34
|
+
}) => SubscriptionToGraphQL<Z, GraphQLTypes[R], UnionOverrideKeys<ScalarDefinition, OVERRIDESCLR>>;
|
|
35
|
+
export declare const Zeus: <Z extends ValueTypes[R], O extends keyof typeof Ops, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, o: Z, ops?: {
|
|
36
36
|
operationOptions?: OperationOptions;
|
|
37
37
|
scalars?: ScalarDefinition;
|
|
38
38
|
}) => string;
|
|
39
39
|
export declare const ZeusSelect: <T>() => SelectionFunction<T>;
|
|
40
40
|
export declare const Selector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
|
|
41
41
|
export declare const TypeFromSelector: <T extends keyof ValueTypes>(key: T) => SelectionFunction<ValueTypes[T]>;
|
|
42
|
-
export declare const Gql: <O extends
|
|
42
|
+
export declare const Gql: <O extends keyof typeof Ops, OVERRIDESCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<OVERRIDESCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions & {
|
|
43
43
|
variables?: Record<string, unknown>;
|
|
44
44
|
}) => Promise<InputType<GraphQLTypes[R], Z, UnionOverrideKeys<ScalarDefinition, OVERRIDESCLR>>>;
|
|
45
45
|
export declare const ZeusScalars: SelectionFunction<ScalarCoders>;
|
|
@@ -54,7 +54,7 @@ export declare const decodeScalarsInResponse: <O extends Operations>({ response,
|
|
|
54
54
|
ops: O;
|
|
55
55
|
response: any;
|
|
56
56
|
returns: ReturnTypesType;
|
|
57
|
-
scalars?: Record<string, ScalarResolver | undefined
|
|
57
|
+
scalars?: Record<string, ScalarResolver | undefined>;
|
|
58
58
|
initialOp: keyof O;
|
|
59
59
|
initialZeusQuery: InputValueType | VType;
|
|
60
60
|
}) => any;
|
|
@@ -126,18 +126,18 @@ export declare const PrepareScalarPaths: ({ ops, returns }: {
|
|
|
126
126
|
[x: string]: `scalar.${string}`;
|
|
127
127
|
} | undefined;
|
|
128
128
|
export declare const purifyGraphQLKey: (k: string) => string;
|
|
129
|
-
export declare const ResolveFromPath: (props: AllTypesPropsType, returns: ReturnTypesType, ops: Operations) => (path: string) =>
|
|
129
|
+
export declare const ResolveFromPath: (props: AllTypesPropsType, returns: ReturnTypesType, ops: Operations) => (path: string) => "enum" | "not" | `scalar.${string}`;
|
|
130
130
|
export declare const InternalArgsBuilt: ({ props, ops, returns, scalars, vars, }: {
|
|
131
131
|
props: AllTypesPropsType;
|
|
132
132
|
returns: ReturnTypesType;
|
|
133
133
|
ops: Operations;
|
|
134
|
-
scalars?: ScalarDefinition
|
|
134
|
+
scalars?: ScalarDefinition;
|
|
135
135
|
vars: Array<{
|
|
136
136
|
name: string;
|
|
137
137
|
graphQLType: string;
|
|
138
138
|
}>;
|
|
139
139
|
}) => (a: ZeusArgsType, p?: string, root?: boolean) => string;
|
|
140
|
-
export declare const resolverFor: <X, T extends keyof ResolverInputTypes, Z extends keyof ResolverInputTypes[T]>(type: T, field: Z, fn: (args: Required<ResolverInputTypes[T]>[Z] extends [infer Input, any] ? Input : any, source: any) => Z extends keyof ModelTypes[T] ?
|
|
140
|
+
export declare const resolverFor: <X, T extends keyof ResolverInputTypes, Z extends keyof ResolverInputTypes[T]>(type: T, field: Z, fn: (args: Required<ResolverInputTypes[T]>[Z] extends [infer Input, any] ? Input : any, source: any) => Z extends keyof ModelTypes[T] ? ModelTypes[T][Z] | Promise<ModelTypes[T][Z]> | X : never) => (args?: any, source?: any) => ReturnType<typeof fn>;
|
|
141
141
|
export type UnwrapPromise<T> = T extends Promise<infer R> ? R : T;
|
|
142
142
|
export type ZeusState<T extends (...args: any[]) => Promise<any>> = NonNullable<UnwrapPromise<ReturnType<T>>>;
|
|
143
143
|
export type ZeusHook<T extends (...args: any[]) => Record<string, (...args: any[]) => Promise<any>>, N extends keyof ReturnType<T>> = ZeusState<ReturnType<T>[N]>;
|