forked from crowetic/commerce
21 lines
450 B
TypeScript
21 lines
450 B
TypeScript
export interface CommerceAPIConfig {
|
|
commerceUrl: string
|
|
apiToken: string
|
|
cartCookie: string
|
|
fetch<Q, V = any>(
|
|
query: string,
|
|
queryData?: CommerceAPIFetchOptions<V>
|
|
): Promise<Q>
|
|
}
|
|
|
|
export interface CommerceAPIFetchOptions<V> {
|
|
variables?: V
|
|
preview?: boolean
|
|
}
|
|
|
|
// TODO: define interfaces for all the available operations
|
|
|
|
// export interface CommerceAPI {
|
|
// getAllProducts(options?: { query: string }): Promise<any>;
|
|
// }
|