Small getAll fixes

This commit is contained in:
Dominic Ferrando
2026-06-24 16:38:00 -04:00
parent 1d184ca615
commit 5d643e883e
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ class ProductsClient {
this.Variants = new VariantsClient(creds);
}
async getAll(opt: PagingOptions): Promise<Printful.Products.SyncProduct[]> {
async getAll(opt: PagingOptions = {}): Promise<Printful.Products.SyncProduct[]> {
const allSyncProducts: Printful.Products.SyncProduct[] = [];
let offset = opt.offset ?? 0;
do {
@@ -103,7 +103,7 @@ class OrdersClient {
if (!res.ok) throw new PrintfulError("Failed to create Printful order", res.status, await parsePayload(res));
}
async getAll(opt: PagingOptions): Promise<Printful.Orders.Order[]> {
async getAll(opt: PagingOptions = {}): Promise<Printful.Orders.Order[]> {
const allPrintfulOrders: Printful.Orders.Order[] = [];
let offset = opt.offset ?? 0;
do {