@symanticreative/vendure-admin-client
Version:
A TypeScript GraphQL client for Vendure Admin API to create custom dashboards
67 lines (66 loc) • 2.07 kB
TypeScript
import { BasePaginatedRepository } from './base.repository';
import { GraphQLClientService } from '../core/graphql/graphql-client.service';
import { Order, OrderStatusUpdateInput } from '../models/order.model';
/**
* Repository for order operations
*/
export declare class OrderRepository extends BasePaginatedRepository<Order, string> {
constructor(graphqlClient: GraphQLClientService);
/**
* Get the GraphQL query for finding by ID
*/
protected getFindByIdQuery(): string;
/**
* Get the GraphQL query for finding all
*/
protected getFindAllQuery(): string;
/**
* Get the GraphQL mutation for creating
* Note: Orders are typically created through the storefront, not admin
*/
protected getCreateMutation(): string;
/**
* Get the GraphQL mutation for updating
* Note: Instead of a general update, we'll use status updates
*/
protected getUpdateMutation(): string;
/**
* Get the GraphQL mutation for deleting
* Note: Orders are typically not deleted but canceled
*/
protected getDeleteMutation(): string;
/**
* Get the GraphQL query for pagination
*/
protected getFindWithPaginationQuery(): string;
/**
* Get the result path for finding by ID
*/
protected getFindByIdResultPath(): string;
/**
* Get the result path for finding all
*/
protected getFindAllResultPath(): string;
/**
* Get the result path for creating
*/
protected getCreateResultPath(): string;
/**
* Get the result path for updating
*/
protected getUpdateResultPath(): string;
/**
* Get the result path for deleting
*/
protected getDeleteResultPath(): string;
/**
* Get the result path for pagination
*/
protected getFindWithPaginationResultPath(): string;
/**
* Update order status
* @param input - Order status update input
* @returns Promise resolving to updated order
*/
updateOrderStatus(input: OrderStatusUpdateInput): Promise<Order>;
}