@pfantato/printful-ts
Version:
Typescript SDK to integrate with Printful
106 lines (105 loc) • 3.2 kB
TypeScript
import type { Options } from 'ky';
import { GetStoreStatisticsSearchParams } from '@printful-ts/schemas';
import { PrintfulApiService } from './printful-api.service';
export declare class StoresService extends PrintfulApiService {
listStores(store_id?: number, options?: Options): Promise<{
_links?: {
self?: {
href?: string;
};
first?: {
href?: string;
};
last?: {
href?: string;
};
next?: {
href?: string;
};
previous?: {
href?: string;
};
};
data?: {
type?: string;
name?: string;
id?: number;
}[];
paging?: {
total?: number;
offset?: number;
limit?: number;
};
}>;
getStore(store_id: number, options?: Options): Promise<{
data?: {
type?: string;
name?: string;
id?: number;
}[];
}>;
getStoreStatistics(store_id: number, params: GetStoreStatisticsSearchParams, options?: Options): Promise<{
data?: {
store_id?: number;
currency?: string;
sales_and_costs?: {
date?: string;
profit?: string;
sales?: string;
fulfillment?: string;
sales_discount?: string;
fulfillment_discount?: string;
sales_shipping?: string;
fulfillment_shipping?: string;
}[];
profit?: {
value?: string;
relative_difference?: string;
};
costs_by_amount?: {
date?: string;
total?: string;
discount?: string;
shipping?: string;
digitization?: string;
vat?: string;
product_amount?: string;
branding?: string;
sales_tax?: string;
}[];
costs_by_product?: {
quantity?: number;
sales?: string;
fulfillment?: string;
product_id?: number;
product_name?: string;
}[];
costs_by_variant?: {
quantity?: number;
sales?: string;
fulfillment?: string;
product_id?: number;
variant_id?: number;
variant_name?: string;
}[];
printful_costs?: {
value?: string;
relative_difference?: string;
};
sales_and_costs_summary?: {
date?: string;
costs?: string;
profit?: string;
order_count?: number;
}[];
total_paid_orders?: {
value?: string;
relative_difference?: string;
};
average_fulfillment_time?: {
value?: string;
relative_difference?: string;
};
};
}>;
}