npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bellhop-partners-typescript

v0.1.4

Published

Client for partner-api

Downloads

1

Readme

Visit Bellhop

Bellhop

Bellhop's Partner API

npm More Info

Table of Contents

Installation

npm i bellhop-partners-typescript
pnpm i bellhop-partners-typescript
yarn add bellhop-partners-typescript

Getting Started

import { Bellhop } from "bellhop-partners-typescript";

const bellhop = new Bellhop({
  // Defining the base path is optional and defaults to https://partners.bellhops.dev/v5
  // basePath: "https://partners.bellhops.dev/v5",
  oauthClientId: "CLIENT_ID",
  oauthClientSecret: "CLIENT_SECRET",
});

const createResponse = await bellhop.lead.create({
  first_name: "first_name_example",
  last_name: "last_name_example",
  lead_type: "string_example",
  lead_record_type: "string_example",
  origin_postal_code: "85001",
  origin_state: "AZ",
  destination_postal_code: "85001",
  destination_state: "AZ",
  load_date: "2021-01-01",
  close_date: "2021-01-01",
});

console.log(createResponse);

Reference

bellhop.lead.create

Create Lead

🛠️ Usage

const createResponse = await bellhop.lead.create({
  first_name: "first_name_example",
  last_name: "last_name_example",
  lead_type: "string_example",
  lead_record_type: "string_example",
  origin_postal_code: "85001",
  origin_state: "AZ",
  destination_postal_code: "85001",
  destination_state: "AZ",
  load_date: "2021-01-01",
  close_date: "2021-01-01",
});

⚙️ Parameters

first_name: string
last_name: string
lead_type: LeadType
lead_record_type: LeadRecordType
description: string
external_id: string
lead_source: string
email: string
phone: string
origin_postal_code: string
origin_street: string
origin_city: string
origin_state: string
origin_square_feet: number
destination_postal_code: string
destination_street: string
destination_city: string
destination_state: string
clickid: string
gclid: string
utm_medium: string
utm_source: string
utm_campaign: string
msclkid: string
load_date: string
close_date: string

🔄 Return

LeadResponse

🌐 Endpoint

/leads POST

🔙 Back to Table of Contents


bellhop.lead.delete

Cancel Lead

🛠️ Usage

const deleteResponse = await bellhop.lead.delete({
  leadId: "leadId_example",
});

⚙️ Parameters

leadId: string

🌐 Endpoint

/leads/{lead_id} DELETE

🔙 Back to Table of Contents


bellhop.lead.get

Get Lead

🛠️ Usage

const getResponse = await bellhop.lead.get({
  leadId: "leadId_example",
});

⚙️ Parameters

leadId: string

🔄 Return

LeadResponse

🌐 Endpoint

/leads/{lead_id} GET

🔙 Back to Table of Contents


bellhop.lead.list

List Leads

🛠️ Usage

const listResponse = await bellhop.lead.list({});

⚙️ Parameters

email: string

🔄 Return

LeadResponse

🌐 Endpoint

/leads GET

🔙 Back to Table of Contents


bellhop.lead.update

Update attributes of a lead.

:lead_id: The ID of the lead to update. This can be either the bellhop id or the external_id.

🛠️ Usage

const updateResponse = await bellhop.lead.update({
  leadId: "leadId_example",
  description: "description_example",
});

⚙️ Parameters

description: string
leadId: string
close_date: string
load_date: string

🔄 Return

LeadResponse

🌐 Endpoint

/leads/{lead_id} PATCH

🔙 Back to Table of Contents


bellhop.location.create

Create quoting location object from address

Create Quoting Location standardizes input address via USPS and generates geo-location details Google Maps APIs. The location id is a hash of the required fields on the location object.

🛠️ Usage

const createResponse = await bellhop.location.create({
  line_1: "line_1_example",
  city: "city_example",
  state: "state_example",
  postal_code: "postal_code_example",
  country: "US",
  property_type: "string_example",
});

⚙️ Parameters

line_1: string
city: string
state: string
postal_code: string
property_type: PropertyType

Type of the property.

line_2: string
country: string
rooms: number

Number of rooms in the property.

area: number

Total area of the property in square feet.

garage: boolean

Indicates whether the property has a garage or not.

stories: number

Number of stories or floors in the property.

floor: number

Floor number of the property.

attic: boolean

Indicates whether the property has an attic or not.

basement: boolean

Indicates whether the property has a basement or not.

🔄 Return

LocationResponse

🌐 Endpoint

/locations POST

🔙 Back to Table of Contents


bellhop.order.create

Creates an order from a quote

🛠️ Usage

const createResponse = await bellhop.order.create({
  quoteId: "quoteId_example",
});

⚙️ Parameters

quoteId: string

Quote ID to generate order from

🔄 Return

OrderResponseV2

🌐 Endpoint

/orders/{quote_id} POST

🔙 Back to Table of Contents


bellhop.postalCode.serviceability

Get Postal Codes Serviceability V5

🛠️ Usage

const serviceabilityResponse = await bellhop.postalCode.serviceability({
  originPostalCode: "originPostalCode_example",
});

⚙️ Parameters

originPostalCode: string
destinationPostalCode: string

🔄 Return

PostalCodesServiceabilityResponse

🌐 Endpoint

/postal-codes/serviceability GET

🔙 Back to Table of Contents


bellhop.quote.create

Creates a quote

Creates a quote for a given customer using the provided locations and service code. The LOCALFULLSERVICE service code will generate a service group with LOADINGUNLOADING and TRANSIT services. All other service codes generate service groups with a single service.

🛠️ Usage

const createResponse = await bellhop.quote.create({
  customer: {
    first_name: "first_name_example",
    last_name: "last_name_example",
    phone: "phone_example",
    email: "email_example",
  },
  start_datetime: "2024-02-06T20:20:06.515155",
  service_code: "LOCALFULLSERVICE",
  locations: {
    key: {
      line_1: "line_1_example",
      city: "city_example",
      state: "state_example",
      postal_code: "postal_code_example",
      country: "US",
    },
  },
});

⚙️ Parameters

customer: CreateQuoteRequestCustomer
start_datetime: string

Start date and time of the quote

service_code: string

Services to be quoted

locations: Record<string, LocationRequest>

Mapping locations and their sequence

inventory: SetQuoteInventoryRequestNullable

🔄 Return

QuoteResponse

🌐 Endpoint

/quotes POST

🔙 Back to Table of Contents


bellhop.quote.deleteInventory

Delete Quote Inventory

🛠️ Usage

const deleteInventoryResponse = await bellhop.quote.deleteInventory({
  quoteId: "quoteId_example",
});

⚙️ Parameters

quoteId: string

UUID of the inventory

🌐 Endpoint

/quotes/{quote_id}/inventory DELETE

🔙 Back to Table of Contents


bellhop.quote.get

Fetch a quote by ID

🛠️ Usage

const getResponse = await bellhop.quote.get({
  quoteId: "quoteId_example",
});

⚙️ Parameters

quoteId: string

UUID of the quote

🔄 Return

QuoteResponse

🌐 Endpoint

/quotes/{quote_id} GET

🔙 Back to Table of Contents


bellhop.quote.getInventory

Get Quote Inventory

🛠️ Usage

const getInventoryResponse = await bellhop.quote.getInventory({
  quoteId: "quoteId_example",
});

⚙️ Parameters

quoteId: string

UUID of the source quote

🔄 Return

QuoteInventoryResponse

🌐 Endpoint

/quotes/{quote_id}/inventory GET

🔙 Back to Table of Contents


bellhop.quote.updateInventory

Update Quote Inventory

🛠️ Usage

const updateInventoryResponse = await bellhop.quote.updateInventory({
  quoteId: "quoteId_example",
  area: 1000,
  rooms: [
    {
      slug: "string_example",
      count: 1,
    },
  ],
  access_flags: {
    elevator: true,
    elevator_reserved: true,
    long_walk_to_truck: true,
    stair_flights: 1,
  },
  additional_items: [
    {
      slug: "string_example",
      count: 1,
    },
  ],
});

⚙️ Parameters

area: number

The area of the property in square feet.

rooms: QuoteInventoryRoom[]

List of rooms in the property.

access_flags: SetQuoteInventoryRequestAccessFlags
quoteId: string

UUID of the inventory

intent: MovingIntentNullable

The estimated amount of belongings to move.

additional_items: QuoteInventoryItem[]

List of additional bulky items in the property.

🔄 Return

QuoteInventoryResponse

🌐 Endpoint

/quotes/{quote_id}/inventory PUT

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.changeLocations

Overwrite the locations on a service group

The locations included in the request are overwritten as the locations on the service group maintaining the sequence in the request. This action triggers a re-estimation of the service group using the new locations.

🛠️ Usage

const changeLocationsResponse = await bellhop.quoteServiceGroup.changeLocations(
  {
    serviceGroupId: "service_group_id_example",
    requestBody: [
      "7fec6c0eeb4a44f290b24edb3abe4b9b",
      "1b6664f3d42b4edea302a4c2dc18dbd9",
    ],
  }
);

⚙️ Parameters

serviceGroupId: string

UUID of the service group

requestBody: string[]

🔄 Return

ServiceGroupResponse

🌐 Endpoint

/quotes/service_groups/{service_group_id}/locations PUT

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.create

Creates a new service group

A service group is a collection of services that are performed at the same time and location. The created service group will be created with the provided services, locations, and start date time. The workers, duration, and end date time will be estimated based on the locations and inventory attached to the quote.

🛠️ Usage

const createResponse = await bellhop.quoteServiceGroup.create({
  quoteId: "quoteId_example",
  service_codes: ["LOADINGUNLOADING"],
  locations: [
    "a4cef656c2a04ca4aa6d19cee4eb9b7e",
    "b4cef656c2a04ca4aa6d19cee4eb9b7e",
  ],
  start_datetime: "2021-01-01T12:00:00",
});

⚙️ Parameters

quoteId: string

UUID of the quote

service_codes: ServiceType[]

List of service codes

locations: string[]

List of location ids

start_datetime: string

Start datetime of service group

🔄 Return

ServiceGroupResponse

🌐 Endpoint

/quotes/{quote_id}/service-groups POST

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.createEstimate

Get Service Group Estimate

🛠️ Usage

const createEstimateResponse = await bellhop.quoteServiceGroup.createEstimate({
  serviceGroupId: "serviceGroupId_example",
});

⚙️ Parameters

serviceGroupId: string

UUID of the service group

🔄 Return

EstimationResponse

🌐 Endpoint

/quotes/service-groups/{service_group_id}/estimate POST

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.createFlexible

Creates an array of flexible service groups from a service group

Generate an array of flexible service groups. The services and locations will be copied from the source service group. One flexible service group will be created for each day and hour combination in the input.

🛠️ Usage

const createFlexibleResponse = await bellhop.quoteServiceGroup.createFlexible({
  quoteId: "quoteId_example",
  serviceGroupId: "serviceGroupId_example",
  start_date: "1970-01-01",
  end_date: "1970-01-01",
  local_hours: [8, 9, 10, 11, 12],
});

⚙️ Parameters

start_date: string

Date of earliest flexible service quote to generate

end_date: string

Date of latest flexible service quote to generate

quoteId: string

UUID of the source quote

serviceGroupId: string

UUID of the Service Group to use as a template for the flexible service groups

local_hours: number[]

List of hours in local time to generate quotes for: [8, 9, 10, 11, 12]

🔄 Return

FlexibleQuoteResponse

🌐 Endpoint

/quotes/{quote_id}/service-groups/{service_group_id}/flexible POST

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.delete

Delete a service group by quote ID and service group ID

🛠️ Usage

const deleteResponse = await bellhop.quoteServiceGroup.delete({
  quoteId: "quoteId_example",
  serviceGroupId: "serviceGroupId_example",
});

⚙️ Parameters

quoteId: string

UUID of the quote

serviceGroupId: string

UUID of the service group to be deleted

🌐 Endpoint

/quotes/{quote_id}/service-group/{service_group_id} DELETE

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.get

Fetch a service group by quote ID and service group ID

🛠️ Usage

const getResponse = await bellhop.quoteServiceGroup.get({
  quoteId: "quoteId_example",
  serviceGroupId: "serviceGroupId_example",
});

⚙️ Parameters

quoteId: string

UUID of the quote

serviceGroupId: string

UUID of the service group

🔄 Return

ServiceGroupResponse

🌐 Endpoint

/quotes/{quote_id}/service-group/{service_group_id} GET

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.update

Replaces a service group with a flexible service group

Replaces the existing service group with the selected flexible service group.

🛠️ Usage

const updateResponse = await bellhop.quoteServiceGroup.update({
  quoteId: "quoteId_example",
  serviceGroupId: "serviceGroupId_example",
  flexible_quote_id: "flexible_quote_id_example",
});

⚙️ Parameters

flexible_quote_id: string
quoteId: string

UUID of the quote

serviceGroupId: string

UUID of the service group

🔄 Return

ServiceGroupResponse

🌐 Endpoint

/quotes/{quote_id}/service-groups/{service_group_id} PATCH

🔙 Back to Table of Contents


bellhop.quoteServiceGroup.updateServices

Update the service configuration on a service group

Update services, workers and duration on a service group. the service_workers object is a mapping of service code and number of workers.

Only the included service codes will be retained on the service group.

Any excluded services will be removed.

🛠️ Usage

const updateServicesResponse = await bellhop.quoteServiceGroup.updateServices({
  quoteId: "quoteId_example",
  serviceGroupId: "serviceGroupId_example",
  service_workers: [
    {
      service_code: "string_example",
      workers: 1,
    },
  ],
});

⚙️ Parameters

service_workers: ServiceWorkers[]

Mapping of service code and number of workers. Only the included service codes will be retained on the service group. Any excluded services will be removed.

quoteId: string

UUID of the quote

serviceGroupId: string

UUID of the service group

duration: number

Duration for all services in group

🔄 Return

ServiceGroupResponse

🌐 Endpoint

/quotes/{quote_id}/service-groups/{service_group_id}/services PUT

🔙 Back to Table of Contents


Author

This TypeScript package is automatically generated by Konfig