Skip to content

hailer.product

Create and manage your own marketplace products.

MethodHost opReturns
list(filter?, options?)product.listPromise<ProductListResponse>
get(id)product.getPromise<Product | undefined>
create(product)product.createPromise<Product>
update(id, product)product.updatePromise<Product>
remove(id)product.removePromise<boolean>
setPublic(id, isPublic)product.setPublicPromise<boolean>

list(filter?, options?)

ts
const { products, totalCount } = await hailer.product.list(
  { type: 'app' },
  { limit: 20 },
);

filter is a ProductSearchFilter; options a ProductSearchOption.

get(id)

ts
const product = await hailer.product.get(productId);

create(product)

ts
const product = await hailer.product.create({
  name: 'My App',
  description: 'Does a thing',
  type: 'app',
});

Accepts { targetId?, name, description?, icon?, images?, externalUrl?, publisher?, type? }.

update(id, product)

ts
await hailer.product.update(productId, { description: 'Updated', public: true });

Accepts a partial of the create fields except targetId, plus public?: boolean.

setPublic(id, isPublic)

ts
await hailer.product.setPublic(productId, true);

For public (logged-out) marketplace reads, see hailer.public.product.

Hailer Developer Documentation