debian-mirror-gitlab/spec/frontend/crm/mock_data.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

239 lines
6 KiB
JavaScript
Raw Normal View History

2021-12-11 22:18:48 +05:30
export const getGroupContactsQueryResponse = {
data: {
group: {
__typename: 'Group',
id: 'gid://gitlab/Group/26',
contacts: {
nodes: [
{
__typename: 'CustomerRelationsContact',
id: 'gid://gitlab/CustomerRelations::Contact/12',
firstName: 'Marty',
lastName: 'McFly',
email: 'example@gitlab.com',
phone: null,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
organization: {
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/2',
name: 'Tech Giant Inc',
},
},
{
__typename: 'CustomerRelationsContact',
id: 'gid://gitlab/CustomerRelations::Contact/16',
firstName: 'Boy',
lastName: 'George',
email: null,
phone: null,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
organization: null,
},
{
__typename: 'CustomerRelationsContact',
id: 'gid://gitlab/CustomerRelations::Contact/13',
firstName: 'Jane',
lastName: 'Doe',
email: 'jd@gitlab.com',
phone: '+44 44 4444 4444',
description: 'Vice President',
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
organization: null,
},
],
2022-08-27 11:52:29 +05:30
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
endCursor: 'eyJsYXN0X25hbWUiOiJMZWRuZXIiLCJpZCI6IjE3OSJ9',
hasPreviousPage: false,
startCursor: 'eyJsYXN0X25hbWUiOiJCYXJ0b24iLCJpZCI6IjE5MyJ9',
},
},
},
},
};
export const getGroupContactsCountQueryResponse = {
data: {
group: {
__typename: 'Group',
id: 'gid://gitlab/Group/26',
contactStateCounts: {
all: 241,
active: 239,
inactive: 2,
__typename: 'ContactStateCountsType',
2021-12-11 22:18:48 +05:30
},
},
},
};
export const getGroupOrganizationsQueryResponse = {
data: {
group: {
__typename: 'Group',
id: 'gid://gitlab/Group/26',
organizations: {
nodes: [
{
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/1',
name: 'Test Inc',
defaultRate: 100,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
},
{
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/2',
name: 'ABC Company',
defaultRate: 110,
description: 'VIP',
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
},
{
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/3',
name: 'GitLab',
defaultRate: 120,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2021-12-11 22:18:48 +05:30
},
],
2022-10-11 01:57:18 +05:30
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
endCursor: 'eyJsYXN0X25hbWUiOiJMZWRuZXIiLCJpZCI6IjE3OSJ9',
hasPreviousPage: false,
startCursor: 'eyJsYXN0X25hbWUiOiJCYXJ0b24iLCJpZCI6IjE5MyJ9',
},
2021-12-11 22:18:48 +05:30
},
},
},
};
2022-01-26 12:08:38 +05:30
export const createContactMutationResponse = {
data: {
customerRelationsContactCreate: {
contact: {
__typename: 'CustomerRelationsContact',
id: 'gid://gitlab/CustomerRelations::Contact/1',
firstName: 'A',
lastName: 'B',
email: 'C',
phone: null,
description: null,
organization: null,
2022-08-27 11:52:29 +05:30
active: true,
2022-01-26 12:08:38 +05:30
},
errors: [],
},
},
};
export const createContactMutationErrorResponse = {
data: {
customerRelationsContactCreate: {
contact: null,
2022-03-02 08:16:31 +05:30
errors: ['create contact is invalid.'],
2022-01-26 12:08:38 +05:30
},
},
};
export const updateContactMutationResponse = {
data: {
customerRelationsContactUpdate: {
__typeName: 'CustomerRelationsContactCreatePayload',
contact: {
__typename: 'CustomerRelationsContact',
id: 'gid://gitlab/CustomerRelations::Contact/1',
firstName: 'First',
lastName: 'Last',
email: 'email@example.com',
phone: null,
description: null,
organization: null,
2022-08-27 11:52:29 +05:30
active: true,
2022-01-26 12:08:38 +05:30
},
errors: [],
},
},
};
2022-10-11 01:57:18 +05:30
export const getGroupOrganizationsCountQueryResponse = {
data: {
group: {
__typename: 'Group',
id: 'gid://gitlab/Group/26',
organizationStateCounts: {
all: 24,
active: 21,
inactive: 3,
__typename: 'OrganizationStateCountsType',
},
},
},
};
2022-01-26 12:08:38 +05:30
export const updateContactMutationErrorResponse = {
data: {
customerRelationsContactUpdate: {
contact: null,
2022-03-02 08:16:31 +05:30
errors: ['update contact is invalid.'],
2022-01-26 12:08:38 +05:30
},
},
};
export const createOrganizationMutationResponse = {
data: {
customerRelationsOrganizationCreate: {
organization: {
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/2',
name: 'A',
defaultRate: null,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2022-01-26 12:08:38 +05:30
},
errors: [],
},
},
};
export const createOrganizationMutationErrorResponse = {
data: {
customerRelationsOrganizationCreate: {
organization: null,
2022-03-02 08:16:31 +05:30
errors: ['create organization is invalid.'],
2022-01-26 12:08:38 +05:30
},
},
};
2022-06-21 17:19:12 +05:30
export const updateOrganizationMutationResponse = {
data: {
customerRelationsOrganizationUpdate: {
__typeName: 'CustomerRelationsOrganizationUpdatePayload',
organization: {
__typename: 'CustomerRelationsOrganization',
id: 'gid://gitlab/CustomerRelations::Organization/2',
name: 'A',
defaultRate: null,
description: null,
2022-08-27 11:52:29 +05:30
active: true,
2022-06-21 17:19:12 +05:30
},
errors: [],
},
},
};
export const updateOrganizationMutationErrorResponse = {
data: {
customerRelationsOrganizationUpdate: {
organization: null,
errors: ['Description is invalid.'],
},
},
};