Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bakaphp/kanvas-core-js into feat/up…
Browse files Browse the repository at this point in the history
…date-get-status-query
  • Loading branch information
jerlyrosa committed Nov 14, 2023
2 parents ffdd8d0 + b2b58ee commit fb11393
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{

"version": "0.0.57",
"version": "0.0.58",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
13 changes: 0 additions & 13 deletions src/modules/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
UPDATE_USER_MUTATION,
INVITE_USER_MUTATION,
SWITCH_COMPANY_BRANCH_MUTATION,
MULTIPLE_UPLOAD_FILES,
} from '../../mutations';
import {
UserInterface,
Expand All @@ -18,7 +17,6 @@ import {
InviteUserParams,
WhereCondition,
RoleData,
MultiUpload,
RolesEnum,
} from '../../types';

Expand Down Expand Up @@ -101,17 +99,6 @@ export class Users {
return response.data;
}

public async multiUpload(files: []): Promise<MultiUpload> {
const response = await this.client.mutate({
mutation: MULTIPLE_UPLOAD_FILES,
variables: {
files,
},
});

return response.data;
}

public isAdmin(user: UserData): boolean {
const roles = user.roles;
if (Array.isArray(roles)) {
Expand Down
6 changes: 6 additions & 0 deletions src/queries/leads.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ export const GET_LEAD_BY_UUID_QUERY = gql`
value
}
}
files {
data {
name
url
}
}
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/types/leads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface Receiver {
uuid: string;
}

interface File {
interface LeadAttachment {
name: string;
url: string;
}
Expand Down Expand Up @@ -97,7 +97,7 @@ export interface CreateLeadData {
people?: People;
followers?: { data: Follower[] };
paginatorInfo?: PaginatorInfo;
files?: File[];
files?: { data: LeadAttachment[] };
}

export interface LeadInput {
Expand All @@ -114,7 +114,7 @@ export interface LeadInput {
reason_lost: string;
pipeline_stage_id: number;
custom_fields: CustomFieldInput[];
files?: File[];
files?: LeadAttachment[];
}

export interface WhereCondition {
Expand Down

0 comments on commit fb11393

Please sign in to comment.