@simpleview/crm-client

1.0.6 • Public • Published

sv-crm-client

Client and tools for communicating with sv-graphql and crm-graphql-server.

installation

npm install @simpleview/sv-crm-client

crm_query

For all queries, a bearer token must be proved in Authorization header. To acquire your token, you must login first to get the token: { auth { login(email: String!, password: String!) { success token } } }

For all queries, acct_id must be passed at the root. { crm(acct_id: String!) { ... } }

  • get_contact
    • Returns an array of contacts, which can be filtered by recId.
    • See schema browser for all fields.
     query getContact {
     	crm(acct_id: String!) {
     		get_contact(filter: {
     			recId: Int
     		}) {
     			recId
     			FirstName
     			LastName
     			Email {
     				EmailAddress
     			}
     		}
     	}
     }
    

crm_mutation

For all mutations, a bearer token must be proved in Authorization header. To acquire your token, you must login first to get the token: { auth { login(email: String!, password: String!) { success token } } }

For all mutations, acct_id must be passed at the root. { crm(acct_id: String!) { ... } }

  • set_contact
    • Sets a contact, and returns the ID
    • See schema browser for all possible inputs.
     mutation setContact {
     	crm(acct_id: String!) {
     		set_contact(input: {
     			FirstName: "test",
     			LastName: "user",
     			Email: [
     				{
     					type: "contact",
     					EmailAddress: "test@test.com"
     				}
     			]
     		})
     	}
     }
    

Readme

Keywords

none

Package Sidebar

Install

npm i @simpleview/crm-client

Weekly Downloads

7

Version

1.0.6

License

MIT

Unpacked Size

11.4 kB

Total Files

9

Last publish

Collaborators

  • georgeyb-sv
  • sloutrel
  • dlford
  • korychinn_sv
  • sv-mikael
  • actionawesome
  • arkmuntasser
  • leandrodalmassoglb
  • kristian.gonzalez
  • davidlpons
  • mauriciodeleonc
  • mpcarolin
  • csarantidessv
  • mikesan789
  • owenallenaz
  • qman33
  • svjoshua
  • mkes99
  • colin.booen
  • ssmith_sv
  • aglazebrook
  • rmaynes