@medusajs/types 1.12.0-snapshot-20240906131500 → 1.12.0-snapshot-20240907131855
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,28 +1,10 @@
|
|
1
|
-
import { Prettify } from "../common";
|
2
1
|
import { RemoteJoinerOptions, RemoteJoinerQuery } from "../joiner";
|
3
|
-
import { RemoteQueryEntryPoints } from "./remote-query-entry-points";
|
4
2
|
import { RemoteQueryObjectConfig, RemoteQueryObjectFromStringResult } from "./remote-query-object-from-string";
|
5
3
|
export type RemoteQueryFunctionReturnPagination = {
|
6
4
|
skip: number;
|
7
5
|
take: number;
|
8
6
|
count: number;
|
9
7
|
};
|
10
|
-
/**
|
11
|
-
* The GraphResultSet presents a typed output for the
|
12
|
-
* result returned by the underlying remote query
|
13
|
-
*/
|
14
|
-
export type GraphResultSet<TEntry extends string> = {
|
15
|
-
rows: TEntry extends keyof RemoteQueryEntryPoints ? RemoteQueryEntryPoints[TEntry][] : any[];
|
16
|
-
meta?: any;
|
17
|
-
};
|
18
|
-
/**
|
19
|
-
* QueryGraphFunction is a wrapper on top of remoteQuery
|
20
|
-
* that simplifies the input it accepts and returns
|
21
|
-
* a normalized/consistent output.
|
22
|
-
*/
|
23
|
-
export type QueryGraphFunction = {
|
24
|
-
<const TEntry extends string>(queryConfig: RemoteQueryObjectConfig<TEntry>, options?: RemoteJoinerOptions): Promise<Prettify<GraphResultSet<TEntry>>>;
|
25
|
-
};
|
26
8
|
export type RemoteQueryFunction = {
|
27
9
|
/**
|
28
10
|
* Query wrapper to provide specific API's and pre processing around remoteQuery.query
|
@@ -42,11 +24,6 @@ export type RemoteQueryFunction = {
|
|
42
24
|
* @param options
|
43
25
|
*/
|
44
26
|
(query: RemoteJoinerQuery, options?: RemoteJoinerOptions): Promise<any>;
|
45
|
-
/**
|
46
|
-
* Graph function uses the remoteQuery under the hood and
|
47
|
-
* returns a result set
|
48
|
-
*/
|
49
|
-
graph: QueryGraphFunction;
|
50
27
|
/**
|
51
28
|
* Query wrapper to provide specific GraphQL like API around remoteQuery.query
|
52
29
|
* @param query
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"remote-query.d.ts","sourceRoot":"","sources":["../../src/modules-sdk/remote-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"remote-query.d.ts","sourceRoot":"","sources":["../../src/modules-sdk/remote-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EAClC,MAAM,mCAAmC,CAAA;AAI1C,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAiCD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,CAAC,KAAK,CAAC,MAAM,SAAS,MAAM,EAC1B,WAAW,EAAE,uBAAuB,CAAC,MAAM,CAAC,EAC5C,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,GAAG,CAAC,CAAA;IAEf;;;;OAIG;IACH,CAAC,KAAK,CAAC,OAAO,SAAS,iCAAiC,CAAC,GAAG,CAAC,EAC3D,WAAW,EAAE,OAAO,EACpB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,GAAG,CAAC,CAAA;IACf;;;;OAIG;IACH,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IACvE;;;;;OAKG;IACH,GAAG,EAAE,CACH,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,OAAO,CAAC,EAAE,mBAAmB,KAC1B,OAAO,CAAC,GAAG,CAAC,CAAA;CAClB,CAAA"}
|