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

Commit c8bfa76

Browse files
authored
Merge pull request #8507 from magento/kh_company-schema-edits
GraphQL: Update schema descriptions for B2B companies
2 parents 43a70d1 + 695e184 commit c8bfa76

9 files changed

+31
-27
lines changed

src/_includes/graphql/company-team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ The `CompanyTeam` object contains details about a company team. It contains the
33
Attribute | Data Type | Description
44
--- | --- | ---
55
`description` | String | An optional description of the team
6-
`id` | ID! | A string that contains the encoded team ID
6+
`id` | ID! | The unique ID for a `CompanyTeam` object
77
`name` | String | The display name of the team

src/_includes/graphql/company.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ Attribute | Data type | Description
77
`credit` | CompanyCredit! | The company credit balance
88
`credit_history(filter: CompanyCreditHistoryFilterInput, pageSize: Int = 20, currentPage: Int = 1)` | CompanyCreditHistory! | A history of company credit operations
99
`email` | String | The email address of the company contact
10-
`id` | ID! | The ID assigned to the company
10+
`id` | ID! | The unique ID of a `Company` object
1111
`legal_address` | [CompanyLegalAddress](#CompanyLegalAddress) | The address where the company is registered to conduct business
1212
`legal_name` | String | The full legal name of the company
1313
`name` | String | The name of the company
1414
`payment_methods` | [String] | The list of payment methods available to a company
1515
`reseller_id` | String | The resale number that is assigned to the company for tax reporting purposes
16-
`role(id: ID!)` | [CompanyRole](#CompanyRole) | Returns information about the specified company role
16+
`role(id: ID!)` | [CompanyRole](#CompanyRole) | Returns a company role filtered by the unique ID for a `CompanyRole` object
1717
`roles(pageSize: Int = 20, currentPage: Int = 1 )` | [CompanyRoles!](#CompanyRoles) | Returns the list of company roles
1818
`sales_representative` | [CompanySalesRepresentative](#CompanySalesRepresentative) | The company sales representative
1919
`structure(rootId: ID = 0 depth: Int = 10 )` | [CompanyStructure](#CompanyStructure) | Returns the company structure of teams and customers in depth-first order
20-
`team(id: ID!)` | [CompanyTeam](#CompanyTeam) | Returns the specified company team
21-
`user(id: ID!)` | [Customer]({{page.baseurl}}/graphql/queries/customer.html) | Returns the specified company user
22-
`users(filter: CompanyUsersFilterInput, pageSize: Int = 20, currentPage: Int = 1)`| [CompanyUsers](#CompanyUsers) | Returns the company users that match the specified filter
23-
`vat_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes
20+
`team(id: ID!)` | [CompanyTeam](#CompanyTeam) | Returns company team data filtered by the unique ID for a `CompanyTeam` object
21+
`user(id: ID!)` | [Customer]({{page.baseurl}}/graphql/queries/customer.html) | Returns a company user filtered by the unique ID for a `Customer` object
22+
`users(filter: CompanyUsersFilterInput, pageSize: Int = 20, currentPage: Int = 1)`| [CompanyUsers](#CompanyUsers) | Returns a list of company users based on activity status
23+
`vat_tax_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes
2424

2525
### CompanyAclResource attributes {#CompanyAclResource}
2626

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

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

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

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

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

163163
### CompanyTeam attributes {#CompanyTeam}
164164

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

170170
Attribute | Data Type | Description
171171
--- | --- | ---
172-
`items` | [[Customer]!]({{page.baseurl}}/graphql/queries/customer.html) | An array of `CompanyUser` objects that match the specified search criteria
173-
`page_info` | SearchResultPageInfo | Pagination meta data
172+
`items` | [[Customer]!]({{page.baseurl}}/graphql/queries/customer.html) | An array of `CompanyUser` objects that match the specified filter criteria
173+
`page_info` | SearchResultPageInfo | Pagination metadata
174174
`total_count` | Int! | The number of objects returned

src/guides/v2.4/graphql/mutations/create-company-role.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ The `CompanyRoleCreateInput` object contains the following attributes:
122122

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

128128
## Output attributes
129129

src/guides/v2.4/graphql/mutations/create-company.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ The `CompanyLegalAddressCreateInput` object can contain the following attributes
137137
Attribute | Data Type | Description
138138
--- | --- | ---
139139
`city` | String! | The city where the company is registered to conduct business
140-
`country_id` | CountryCodeEnum! | Company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
141-
`postcode` | String! | The ZIP/postal code of the company
140+
`country_id` | CountryCodeEnum! | The company's country ID. See the [`countries` query]({{page.baseurl}}/graphql/queries/directory-countries.html)
141+
`postcode` | String! | The postal code of the company
142142
`region` | CustomerAddressRegionInput! | An object containing the region name and/or region ID where the company is registered to conduct business
143143
`street` | [String!]! | An array of strings that define the street address where the company is registered to conduct business
144144
`telephone` | String! | The primary phone number of the company

src/guides/v2.4/graphql/mutations/delete-company-role.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ The `deleteCompanyRole` mutation returns a Boolean value that indicates whether
6464

6565
Attribute | Data Type | Description
6666
--- | --- | ---
67-
`success` | Boolean | A value of `true` indicates the company role has been deleted successfully, otherwise a value returns `false`
67+
`success` | Boolean | Indicates whether the company role has been deleted successfully (`true` or `false`)

src/guides/v2.4/graphql/mutations/delete-company-team.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ Attribute | Data Type | Description
5959
## Output attributes
6060

6161
The `deleteCompanyTeam` mutation returns a Boolean value that indicates whether the operation was successful.
62+
63+
Attribute | Data Type | Description
64+
--- | --- | ---
65+
`success` | Boolean | Indicates whether the company team has been deleted successfully (`true` or `false`)

src/guides/v2.4/graphql/mutations/delete-company-user.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The `deleteCompanyUser` mutation returns a Boolean value that indicates whether
6464

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

6969
## Errors
7070

src/guides/v2.4/graphql/mutations/update-company-team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The `CompanyTeamUpdateInput` object contains the following attributes:
7171
Attribute | Data Type | Description
7272
--- | --- | ---
7373
`description` | String | An optional description of the team
74-
`id` | ID! | The encoded team ID for updating
74+
`id` | ID! | The unique ID for a `CompanyTeam` object
7575
`name` | String | The display name of the team
7676

7777
You can get the team ID with the [`company`]({{page.baseurl}}/graphql/queries/company.html) query.

src/guides/v2.4/graphql/mutations/update-company.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ The CompanyUpdateInput object defines the schema for updating a company.
8282
Attribute | Data Type | Description
8383
--- | --- | ---
8484
`company_email` | String | The email address of the company contact
85-
`company_name` | String | The company name
86-
`legal_address` | [CompanyLegalAddressUpdateInput](#CompanyLegalAddressUpdateInput) | Defines legal address data of the company
85+
`company_name` | String | The name of the company to update
86+
`legal_address` | [CompanyLegalAddressUpdateInput](#CompanyLegalAddressUpdateInput) | Defines the legal address data of the company
8787
`legal_name` | String | The full legal name of the company
8888
`reseller_id` | String | The resale number that is assigned to the company for tax reporting purposes
8989
`vat_tax_id` | String | The value-added tax number that is assigned to the company by some jurisdictions for tax reporting purposes

0 commit comments

Comments
 (0)