0.1.1 • Published 3 months ago

@drivly/commerce v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Drivly Commerce SDK (@drivly/commerce)

The Drivly Commerce SDK is a TypeScript library for interacting with the Drivly Commerce API.

Installation

Install the package via npm:

npm install @drivly/commerce

or yarn:

yarn add @drivly/commerce

Usage

First, import the SDK:

import { SDK } from '@drivly/commerce'

Then, create an instance of the SDK:

const { commerce } = SDK({ apiKey: 'your-api-key', environment: 'sandbox' })

Please replace 'your-api-key' with your actual API key, or omit if the DRIVLY_API_KEY environment variable is set. The DRIVLY_ENV environment variable could also be set to either 'sandbox' or 'production'

You can now use the sdk instance to interact with the API. For example, to fetch all consumers:

const consumers = await commerce.consumers.find()

API

The SDK provides the following normalized collections for commerce:

  • consumers
  • buyers
  • deals
  • vehicles
  • listings
  • taxesAndFees
  • dmvFees
  • fees
  • locations
  • companies
  • addresses
  • preApprovals
  • creditApplications
  • insurancePolicies
  • insuranceQuotes
  • serviceQuotes
  • serviceOrders
  • contacts
  • attachments
  • webhooks
  • tenants
  • trades
  • brands
  • documents

As well as the following normalized collections for crm:

  • leads
  • leadEvents
  • trades
  • preApprovals
  • searches
  • vehicles
  • vdpEmails
  • calls
  • meetings
  • messages
  • templates
  • holidays
  • quietHours
  • definitions
  • salesReps
  • webEvents

Each collection has the following methods:

  • find(): Fetch all items.
  • findOne(id: string): Fetch a single item by its ID.
  • create(data: object): Create a new item.
  • update(id: string, data: object): Update an existing item.
  • delete(id: string): Delete an item.

Contributing

Contributions are welcome. Please submit a pull request or create an issue to discuss your changes.

License

This project is licensed under the MIT License.

🚀 We're hiring!

Driv.ly is simple APIs to buy & sell cars online, funded by some of the biggest names in automotive and finance & insurance

We're building our entire infrastructure on Cloudflare Workers, Durable Objects, KV, R2, and PubSub. If you're as passionate about these transformational technologies as we are, we'd love for you to join our rapidly-growing team.

0.1.1

3 months ago

0.0.22-alpha.2

3 months ago

0.1.0

3 months ago

0.0.21

3 months ago

0.0.2-2.alpha-1

3 months ago

0.0.22-alpha.1

3 months ago

0.0.21-alpha.10

3 months ago

0.0.21-alpha.9

3 months ago

0.0.21-alpha.8

3 months ago

0.0.21-alpha.6

4 months ago

0.0.21-alpha.7

4 months ago

0.0.21-alpha.4

4 months ago

0.0.21-alpha.5

4 months ago

0.0.21-alpha.3

4 months ago

0.0.21-alpha.2

4 months ago

0.0.21-alpha.0

4 months ago

0.0.21-alpha.1

4 months ago

0.0.20

5 months ago

0.0.19

5 months ago

0.0.18

5 months ago

0.0.15

5 months ago

0.0.16

5 months ago

0.0.17

5 months ago

0.0.12

5 months ago

0.0.13

5 months ago

0.0.14

5 months ago

0.0.10

5 months ago

0.0.11

5 months ago

0.0.9

5 months ago

0.0.8

6 months ago

0.0.5

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.3

6 months ago

0.0.4

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago