diff --git a/package.json b/package.json index 847c4058..8d7c5ca3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.18.3", + "version": "0.18.4", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/modules/people/index.ts b/src/modules/people/index.ts index 8305c570..93e6a4a3 100644 --- a/src/modules/people/index.ts +++ b/src/modules/people/index.ts @@ -28,7 +28,7 @@ export class People { ): Promise { const response = await this.client.mutate({ mutation: CREATE_PEOPLE_MUTATION, - variables: { input: input }, + variables: { input }, }); return response.data.createPeople as PeopleInterface; } @@ -39,7 +39,7 @@ export class People { ): Promise { const response = await this.client.mutate({ mutation: UPDATE_PEOPLE_MUTATION, - variables: { id: id, input: input }, + variables: { id, input }, }); return response.data.updatePeople as PeopleInterface; } @@ -47,7 +47,7 @@ export class People { public async deletePeople(id: string): Promise { const response = await this.client.mutate({ mutation: DELETE_PEOPLE_MUTATION, - variables: { id: id }, + variables: { id }, }); return response.data.deletePeople as Boolean; } @@ -55,7 +55,7 @@ export class People { public async restorePeople(id: string): Promise { const response = await this.client.mutate({ mutation: RESTORE_PEOPLE_MUTATION, - variables: { id: id }, + variables: { id }, }); return response.data.restorePeople as Boolean; } diff --git a/src/mutations/people.mutation.ts b/src/mutations/people.mutation.ts index 913d1776..3c328a78 100644 --- a/src/mutations/people.mutation.ts +++ b/src/mutations/people.mutation.ts @@ -7,6 +7,9 @@ export const CREATE_PEOPLE_MUTATION = gql` name firstname lastname + organizations { + name + } company { id name @@ -45,6 +48,9 @@ export const UPDATE_PEOPLE_MUTATION = gql` name firstname lastname + organizations { + name + } company { id name diff --git a/src/queries/people.query.ts b/src/queries/people.query.ts index ee78f618..7e21fc20 100644 --- a/src/queries/people.query.ts +++ b/src/queries/people.query.ts @@ -29,6 +29,9 @@ export const PEOPLE_QUERY = gql` name firstname lastname + organizations { + name + } company { id name diff --git a/src/types/people.ts b/src/types/people.ts index 5befde29..3beca100 100644 --- a/src/types/people.ts +++ b/src/types/people.ts @@ -16,6 +16,7 @@ export interface PeopleInputInterface { firstname: string; middlename?: string; lastname: string; + organization: string; facebook_contact_id?: string; twitter_contact_id?: string; linkedin_contact_id?: string; @@ -49,6 +50,7 @@ export interface PeopleInterface { name: string; firstname: string; lastname: string; + organizations: OrganizationInterface[]; company?: CompanyInterface; contacts: ContactInterface[]; address?: AddressInterface[];