supaglue-crm
v0.0.1
Published
<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/supaglue-labs/supaglue/main/docs/static/img/logo-dark.png"> <source media="(prefers-color-scheme: light)" srcset="https:/
Downloads
3
Readme
SDK Installation
NPM
npm add supaglue-crm
Yarn
yarn add supaglue-crm
SDK Example Usage
import {
CreateAccountRequest,
CreateAccountResponse
} from "supaglue-crm/dist/sdk/models/operations";
import {
PhoneNumbersPhoneNumberTypeEnum,
AddressesAddressTypeEnum,
} from "supaglue-crm/dist/sdk/models/shared";
import { AxiosError } from "axios";
import { Supaglue } from "supaglue-crm";
const sdk = new Supaglue({
security: {
apiKeyAuth: "YOUR_API_KEY_HERE",
},
});
const req: CreateAccountRequest = {
requestBody: {
model: {
addresses: [
{
addressType: AddressesAddressTypeEnum.Other,
city: "San Francisco",
country: "USA",
postalCode: "94107",
state: "CA",
street1: "525 Brannan",
street2: "null",
},
{
addressType: AddressesAddressTypeEnum.Billing,
city: "San Francisco",
country: "USA",
postalCode: "94107",
state: "CA",
street1: "525 Brannan",
street2: "null",
},
{
addressType: AddressesAddressTypeEnum.Shipping,
city: "San Francisco",
country: "USA",
postalCode: "94107",
state: "CA",
street1: "525 Brannan",
street2: "null",
},
],
customFields: {
"vero": "perspiciatis",
"nulla": "nihil",
"fuga": "facilis",
},
description: "Integration API",
industry: "API's",
name: "Sample Customer",
numberOfEmployees: 276000,
ownerId: "9f3e97fd-4d5d-4efc-959d-bbebfac079f5",
phoneNumbers: [
{
phoneNumber: "+14151234567",
phoneNumberType: PhoneNumbersPhoneNumberTypeEnum.Mobile,
},
{
phoneNumber: "+14151234567",
phoneNumberType: PhoneNumbersPhoneNumberTypeEnum.Primary,
},
],
website: "https://supaglue.com/",
},
},
xCustomerId: "my-customer-1",
xProviderName: "salesforce",
};
sdk.accounts.create(req).then((res: CreateAccountResponse | AxiosError) => {
// handle response
});
SDK Available Operations
accounts
create
- Create accountget
- Get accountlist
- List accountssearch
- Search accountsupdate
- Update account
contacts
create
- Create contactget
- Get contactlist
- List contactssearch
- Search contactsupdate
- Update contact
leads
create
- Create leadget
- Get leadlist
- List leadsupdate
- Update lead
opportunities
create
- Create opportunityget
- Get opportunitylist
- List opportunitiessearch
- Search Opportunitiesupdate
- Update opportunity
passthrough
send
- Send passthrough request
users
get
- Get userlist
- List users