Rename getAll to list

This commit is contained in:
Dominic Ferrando
2026-06-24 16:41:38 -04:00
parent 5d643e883e
commit 968afb5789
5 changed files with 9 additions and 9 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 list(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 list(opt: PagingOptions = {}): Promise<Printful.Orders.Order[]> {
const allPrintfulOrders: Printful.Orders.Order[] = [];
let offset = opt.offset ?? 0;
do {
+2 -2
View File
@@ -42,10 +42,10 @@ export class ProductSyncer {
await this.setState({ isSyncing: true, syncingIds: [] });
this.log.debug("populating webflow products");
const webflowProducts: Webflow.Products.ProductAndSkus[] = await this.webflow.Products.getAll({ forceAll: true });
const webflowProducts: Webflow.Products.ProductAndSkus[] = await this.webflow.Products.list({ forceAll: true });
this.log.debug("populating printful products");
let printfulProducts = await this.printful.Products.getAll({ forceAll: true });
let printfulProducts = await this.printful.Products.list({ forceAll: true });
if (printfulProductId) {
const printfulProduct = printfulProducts.find((p) => p.id === printfulProductId);
if (printfulProduct) {
+2 -2
View File
@@ -95,7 +95,7 @@ class ProductsClient {
return payload.product.id;
}
async getAll(opt: PagingOptions = {}): Promise<Webflow.Products.ProductAndSkus[]> {
async list(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 list(opt: PagingOptions & { status?: Webflow.Orders.Order["status"] } = {}): Promise<Webflow.Orders.Order[]> {
const allOrders: Webflow.Orders.Order[] = [];
let offset = opt.offset ?? 0;
do {