Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

GraphQL: Update schema descriptions for B2B companies #8507

Merged
merged 3 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_includes/graphql/company-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ The `CompanyTeam` object contains details about a company team. It contains the
Attribute | Data Type | Description
--- | --- | ---
`description` | String | An optional description of the team
`id` | ID! | A string that contains the encoded team ID
`id` | ID! | The unique ID for a `CompanyTeam` object
`name` | String | The display name of the team
34 changes: 17 additions & 17 deletions src/_includes/graphql/company.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ Attribute | Data type | Description
`credit` | CompanyCredit! | The company credit balance
`credit_history(filter: CompanyCreditHistoryFilterInput, pageSize: Int = 20, currentPage: Int = 1)` | CompanyCreditHistory! | A history of company credit operations
`email` | String | The email address of the company contact
`id` | ID! | The ID assigned to the company
`id` | ID! | The unique ID of a `Company` object
`legal_address` | [CompanyLegalAddress](#CompanyLegalAddress) | The address where the company is registered to conduct business
`legal_name` | String | The full legal name of the company
`name` | String | The name of the company
`payment_methods` | [String] | The list of payment methods available to a company
`reseller_id` | String | The resale number that is assigned to the company for tax reporting purposes
`role(id: ID!)` | [CompanyRole](#CompanyRole) | Returns information about the specified company role
`role(id: ID!)` | [CompanyRole](#CompanyRole) | Returns a company role filtered by the unique ID for a `CompanyRole` object
`roles(pageSize: Int = 20, currentPage: Int = 1 )` | [CompanyRoles!](#CompanyRoles) | Returns the list of company roles
`sales_representative` | [CompanySalesRepresentative](#CompanySalesRepresentative) | The company sales representative
`structure(rootId: ID = 0 depth: Int = 10 )` | [CompanyStructure](#CompanyStructure) | Returns the company structure of teams and customers in depth-first order
`team(id: ID!)` | [CompanyTeam](#CompanyTeam) | Returns the specified company team
`user(id: ID!)` | [Customer]({{page.baseurl}}/graphql/queries/customer.html) | Returns the specified company user
`users(filter: CompanyUsersFilterInput, pageSize: Int = 20, currentPage: Int = 1)`| [CompanyUsers](#CompanyUsers) | Returns the company users that match the specified filter
`vat_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes
`team(id: ID!)` | [CompanyTeam](#CompanyTeam) | Returns company team data filtered by the unique ID for a `CompanyTeam` object
`user(id: ID!)` | [Customer]({{page.baseurl}}/graphql/queries/customer.html) | Returns a company user filtered by the unique ID for a `Customer` object
`users(filter: CompanyUsersFilterInput, pageSize: Int = 20, currentPage: Int = 1)`| [CompanyUsers](#CompanyUsers) | Returns a list of company users based on activity status
`vat_tax_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes

### CompanyAclResource attributes {#CompanyAclResource}

Expand All @@ -29,8 +29,8 @@ The `CompanyAclResource` object can contain the following attributes.
Attribute | Data Type | Description
--- | --- | ---
`children` | [CompanyAclResource!] | An array of sub-resources
`id` | ID! | The ID assigned to the ACL resource
`sort_order` | Int | ACL resource sort order
`id` | ID! | The unique ID for a `CompanyAclResource` object
`sort_order` | Int | The sort order of an ACL resource
`text` | String | The label assigned to the ACL resource

### CompanyAdmin attributes {#CompanyAdmin}
Expand All @@ -42,7 +42,7 @@ Attribute | Data Type | Description
`email` | String! | The email address of the company administrator
`firstname` | String! | The company administrator's first name
`gender` | Int | The company administrator's gender (Male - 1, Female - 2, Not Specified - 3)
`id` | ID! | The ID assigned to the company administrator
`id` | ID! | The unique ID for a `CompanyAdmin` object
`job_title` | String | The job title of the company administrator
`lastname` | String! | The company administrator's last name

Expand Down Expand Up @@ -105,8 +105,8 @@ The `CompanyLegalAddress` object can contain the following attributes.
Attribute | Data Type | Description
--- | --- | ---
`city` | String! | The city where the company is registered to conduct business
`country_id` | CountryCodeEnum! | Company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
`postcode` | String! | The ZIP/postal code of the company
`country_code` | CountryCodeEnum! | Company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
`postcode` | String! | The company's postal code
`region` | CustomerAddressRegionInput! | An object containing the region name and/or region ID where the company is registered to conduct business
`street` | [String!]! | An array of strings that define the street address where the company is registered to conduct business
`telephone` | String! | The primary phone number of the company.
Expand All @@ -117,7 +117,7 @@ The `CompanyRole` object can contain the following attributes.

Attribute | Data Type | Description
--- | --- | ---
`id`| ID! | The ID assigned to the role
`id`| ID! | The unique ID for a `CompanyRole` object
`name` | String | The name assigned to the role
`permissions` | [CompanyAclResource] | A list of permission resources defined for a role
`users_count` | Int | The total number of users assigned the specified role
Expand All @@ -129,7 +129,7 @@ The `CompanyRoles` object can contain the following attributes.
Attribute | Data Type | Description
--- | --- | ---
`items` | [CompanyRole]! | A list of company roles that match the specified filter criteria
`page_info` | SearchResultPageInfo | Pagination meta data
`page_info` | SearchResultPageInfo | Pagination metadata
`total_count` | Int! | The total number of roles matching the specified filter

### CompanySalesRepresentative attributes {#CompanySalesRepresentative}
Expand Down Expand Up @@ -157,8 +157,8 @@ The `CompanyStructureItem` object can contain the following attributes.
Attribute | Data Type | Description
--- | --- | ---
`entity` | CompanyStructureEntity | A union of [CompanyTeam](#CompanyTeam) and [Customer]({{page.baseurl}}/graphql/queries/customer.html) objects
`id` | ID! | The ID of the item in the hierarchy
`parent_id` | ID | The ID of the parent item in the hierarchy
`id` | ID! | The unique ID for a `CompanyStructureItem` object
`parent_id` | ID | The ID of the parent item in the company hierarchy

### CompanyTeam attributes {#CompanyTeam}

Expand All @@ -169,6 +169,6 @@ The `CompanyUsers` object can contain the following attributes.

Attribute | Data Type | Description
--- | --- | ---
`items` | [[Customer]!]({{page.baseurl}}/graphql/queries/customer.html) | An array of `CompanyUser` objects that match the specified search criteria
`page_info` | SearchResultPageInfo | Pagination meta data
`items` | [[Customer]!]({{page.baseurl}}/graphql/queries/customer.html) | An array of `CompanyUser` objects that match the specified filter criteria
`page_info` | SearchResultPageInfo | Pagination metadata
`total_count` | Int! | The number of objects returned
4 changes: 2 additions & 2 deletions src/guides/v2.4/graphql/mutations/create-company-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ The `CompanyRoleCreateInput` object contains the following attributes:

Attribute | Data Type | Description
--- | --- | ---
`name` | String! | Role name.
`permissions` | [String!]! | A list of Role permission resources. Required array value for a field with strings as values of array.
`name` | String! | The name of the role to create
`permissions` | [String!]! | A list of resources the role can access

## Output attributes

Expand Down
4 changes: 2 additions & 2 deletions src/guides/v2.4/graphql/mutations/create-company.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ The `CompanyLegalAddressCreateInput` object can contain the following attributes
Attribute | Data Type | Description
--- | --- | ---
`city` | String! | The city where the company is registered to conduct business
`country_id` | CountryCodeEnum! | Company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
`postcode` | String! | The ZIP/postal code of the company
`country_id` | CountryCodeEnum! | The company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
`postcode` | String! | The postal code of the company
`region` | CustomerAddressRegionInput! | An object containing the region name and/or region ID where the company is registered to conduct business
`street` | [String!]! | An array of strings that define the street address where the company is registered to conduct business
`telephone` | String! | The primary phone number of the company
Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/delete-company-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ The `deleteCompanyRole` mutation returns a Boolean value that indicates whether

Attribute | Data Type | Description
--- | --- | ---
`success` | Boolean | A value of `true` indicates the company role has been deleted successfully, otherwise a value returns `false`
`success` | Boolean | Indicates whether the company role has been deleted successfully (`true` or `false`)
4 changes: 4 additions & 0 deletions src/guides/v2.4/graphql/mutations/delete-company-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ Attribute | Data Type | Description
## Output attributes

The `deleteCompanyTeam` mutation returns a Boolean value that indicates whether the operation was successful.

Attribute | Data Type | Description
--- | --- | ---
`success` | Boolean | Indicates whether the company team has been deleted successfully (`true` or `false`)
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/delete-company-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The `deleteCompanyUser` mutation returns a Boolean value that indicates whether

Attribute | Data Type | Description
--- | --- | ---
`success` | Boolean! | A value of `true` indicates the company user has been deactivated successfully, otherwise a value returns `false`
`success` | Boolean! | Indicates whether the company user has been deactivated successfully (`true` or `false`)

## Errors

Expand Down
2 changes: 1 addition & 1 deletion src/guides/v2.4/graphql/mutations/update-company-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The `CompanyTeamUpdateInput` object contains the following attributes:
Attribute | Data Type | Description
--- | --- | ---
`description` | String | An optional description of the team
`id` | ID! | The encoded team ID for updating
`id` | ID! | The unique ID for a `CompanyTeam` object
`name` | String | The display name of the team

You can get the team ID with the [`company`]({{page.baseurl}}/graphql/queries/company.html) query.
Expand Down
4 changes: 2 additions & 2 deletions src/guides/v2.4/graphql/mutations/update-company.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ The CompanyUpdateInput object defines the schema for updating a company.
Attribute | Data Type | Description
--- | --- | ---
`company_email` | String | The email address of the company contact
`company_name` | String | The company name
`legal_address` | [CompanyLegalAddressUpdateInput](#CompanyLegalAddressUpdateInput) | Defines legal address data of the company
`company_name` | String | The name of the company to update
`legal_address` | [CompanyLegalAddressUpdateInput](#CompanyLegalAddressUpdateInput) | Defines the legal address data of the company
`legal_name` | String | The full legal name of the company
`reseller_id` | String | The resale number that is assigned to the company for tax reporting purposes
`vat_tax_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes
Expand Down