Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into owners-get-by-id
Browse files Browse the repository at this point in the history
  • Loading branch information
pcothenet authored Aug 20, 2019
2 parents d118931 + 3360789 commit c5e0ca9
Show file tree
Hide file tree
Showing 15 changed files with 675 additions and 277 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ hubspot.contacts.getRecentlyCreated()
hubspot.contacts.getRecentlyModified()
hubspot.contacts.createOrUpdate(email, data)
hubspot.contacts.delete(id)
hubspot.contacts.merge(primaryId, secondaryId)
```

### Contact properties
Expand Down Expand Up @@ -285,6 +286,20 @@ hubspot.files.get()
hubspot.files.getOne(id)
```

### Forms

```javascript
hubspot.forms.get(opts)
hubspot.forms.getById(id)
hubspot.forms.getSingleField(guid, fieldname)
hubspot.forms.getSubmissions(guid, opts)
hubspot.forms.create(data)
hubspot.forms.update(id, data)
hubspot.forms.delete(id)

hubspot.forms.submit(portalId, formId, data)
```

### Email

```javascript
Expand Down
14 changes: 13 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ import { Page } from './lib/typescript/page'
import { OAuth } from './lib/typescript/oauth'
import { Deal } from './lib/typescript/deal'
import { Engagement } from './lib/typescript/engagement'
import { Integrations } from './lib/typescript/integrations'
import { Owner } from './lib/typescript/owner'
import { Pipeline } from './lib/typescript/pipeline'
import { List } from './lib/typescript/list'
import { File } from './lib/typescript/file'
import { Subscription } from './lib/typescript/subscription'
import { Campaign } from './lib/typescript/campaign'
import { Broadcast } from './lib/typescript/broadcast'
import { Emails } from './lib/typescript/emails'


interface BaseOptions {
baseUrl?: string
Expand All @@ -30,6 +33,13 @@ export interface AccessTokenOptions extends BaseOptions {
accessToken: string
}

export interface AppOptions extends BaseOptions {
clientId: string
clientSecret: string
redirectUri: string
refreshToken: string
}

export interface HubspotError {
status: string
message: string
Expand All @@ -38,12 +48,13 @@ export interface HubspotError {
}

declare class Hubspot {
constructor(options?: ApiOptions | AccessTokenOptions)
constructor(options?: ApiOptions | AccessTokenOptions | AppOptions)
companies: Company
contacts: Contact
pages: Page
deals: Deal
engagements: Engagement
integrations: Integrations
owners: Owner
oauth: OAuth
pipelines: Pipeline
Expand All @@ -52,6 +63,7 @@ declare class Hubspot {
subscriptions: Subscription
campaigns: Campaign
broadcasts: Broadcast
emails: Emails
}

export default Hubspot
Loading

0 comments on commit c5e0ca9

Please sign in to comment.