Small getAll fixes
This commit is contained in:
@@ -95,7 +95,7 @@ class ProductsClient {
|
||||
return payload.product.id;
|
||||
}
|
||||
|
||||
async getAll(opt: PagingOptions): Promise<Webflow.Products.ProductAndSkus[]> {
|
||||
async getAll(opt: PagingOptions = {}): Promise<Webflow.Products.ProductAndSkus[]> {
|
||||
const allWebflowProducts: Webflow.Products.ProductAndSkus[] = [];
|
||||
let offset = opt.offset ?? 0;
|
||||
do {
|
||||
@@ -156,7 +156,7 @@ class ProductsClient {
|
||||
class OrdersClient {
|
||||
constructor(private creds: Credentials) { }
|
||||
|
||||
async getAll(opt: PagingOptions & { status?: Webflow.Orders.Order["status"] }): Promise<Webflow.Orders.Order[]> {
|
||||
async getAll(opt: PagingOptions & { status?: Webflow.Orders.Order["status"] } = {}): Promise<Webflow.Orders.Order[]> {
|
||||
const allOrders: Webflow.Orders.Order[] = [];
|
||||
let offset = opt.offset ?? 0;
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user