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

ISSUE-8117: Company-related query names and attributes have been fixed #8120

Merged
merged 1 commit into from
Oct 23, 2020
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
30 changes: 15 additions & 15 deletions src/_data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,6 @@ pages:
- label: categoryList query
url: /graphql/queries/category-list.html

- label: checkCompanyAdminEmail query
url: /graphql/queries/check-company-admin-email.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: checkCompanyEmail query
url: /graphql/queries/check-company-email.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: checkCompanyUserEmail query
url: /graphql/queries/check-company-admin-email.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: checkoutAgreements query
url: /graphql/queries/checkout-agreements.html

Expand Down Expand Up @@ -135,6 +120,21 @@ pages:
url: /graphql/queries/giftcard-account.html
edition: ee-only

- label: isCompanyAdminEmailAvailable query
url: /graphql/queries/is-company-admin-email-available.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: isCompanyEmailAvailable query
url: /graphql/queries/is-company-email-available.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: isCompanyUserEmailAvailable query
url: /graphql/queries/is-company-user-email-available.html
edition: b2b-only
exclude_versions: ["2.3"]

- label: isEmailAvailable query
url: /graphql/queries/is-email-available.html

Expand Down
12 changes: 6 additions & 6 deletions src/_includes/graphql/company.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Attribute | Data type | Description
`team(id: ID!)` | CompanyTeam | Returns the specified company team
`user(id: ID!)` | Customer | Returns the specified company user
`users(filter: CompanyUsersFilterInput, pageSize: Int = 20, currentPage: Int = 1)`| 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
`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 @@ -28,7 +28,7 @@ Attribute | Data Type | Description
--- | --- | ---
`children` | [CompanyAclResource!] | An array of sub-resources
`id` | ID! | The ID assigned to the ACL resource
`sortOrder` | Int | ACL resource sort order
`sort_order` | Int | ACL resource sort order
`text` | String | The label assigned to the ACL resource

### CompanyAdmin attributes {#CompanyAdmin}
Expand Down Expand Up @@ -74,9 +74,9 @@ 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
`items` | [CompanyRole]! | A list of company roles that match the specified filter criteria
`page_info` | SearchResultPageInfo | Pagination meta data
`total_count` | Int | The total number of roles matching the specified filter
`total_count` | Int! | The total number of roles matching the specified filter

### CompanySalesRepresentative attributes {#CompanySalesRepresentative}

Expand All @@ -94,6 +94,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
`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
`total_count` | Int | The number of objects returned
`total_count` | Int! | The number of objects returned
54 changes: 0 additions & 54 deletions src/guides/v2.4/graphql/queries/check-company-admin-email.md

This file was deleted.

54 changes: 0 additions & 54 deletions src/guides/v2.4/graphql/queries/check-company-email.md

This file was deleted.

54 changes: 0 additions & 54 deletions src/guides/v2.4/graphql/queries/check-company-user-email.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
group: graphql
title: isCompanyAdminEmailAvailable query
b2b_only: true
---

The `isCompanyAdminEmailAvailable` query checks whether the specified email can be used to create a company administrator account. If the email matches an existing customer or another company administrator account, the query returns a `false` value. A value of `true` indicates the email address can be used to create a company administrator account.

## Syntax

`isCompanyAdminEmailAvailable ( email String! ) IsCompanyAdminEmailAvailableOutput`

## Example usage

The following example checks whether the email address `roni_cost@example.com` can be used to create a company administrator account.

**Request:**

```graphql
query{
isCompanyAdminEmailAvailable(email: "roni_cost@example.com"){
is_email_available
}
}
```

**Response:**

```json
{
"data": {
"isCompanyAdminEmailAvailable": {
"is_email_available": false
}
}
}
```

## Input attribute

Attribute | Data Type | Description
--- | --- | ---
`email` | String! | The email address to check

## Output attribute

Attribute | Data Type | Description
--- | --- | ---
`is_email_available` | Boolean! | A value of `true` indicates the email address is available

## Related topics

* [isCompanyEmailAvailable query]({{page.baseurl}}/graphql/queries/is-company-email-available.html)
* [isCompanyUserEmailAvailable query]({{page.baseurl}}/graphql/queries/is-company-user-email-available.html)
54 changes: 54 additions & 0 deletions src/guides/v2.4/graphql/queries/is-company-email-available.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
group: graphql
title: isCompanyEmailAvailable query
b2b_only: true
---

The `isCompanyEmailAvailable` query checks whether the specified email is valid for company registration. The specified email can be the same as an existing customer or company administrator. If the email matches an existing company email, the query returns a `false` value.

## Syntax

`isCompanyEmailAvailable ( email String! ) IsCompanyEmailAvailableOutput`

## Example usage

The following example checks whether the email address `roni_cost@example.com` can be used to register a company.

**Request:**

```graphql
query{
isCompanyEmailAvailable(email: "roni_cost@example.com"){
is_email_available
}
}
```

**Response:**

```json
{
"data": {
"isCompanyEmailAvailable": {
"is_email_available": true
}
}
}
```

## Input attribute

Attribute | Data Type | Description
--- | --- | ---
`email` | String! | The email address to check

## Output attribute

Attribute | Data Type | Description
--- | --- | ---
`is_email_available` | Boolean! | A value of `true` indicates the email address is available

## Related topics

* [isCompanyAdminEmailAvailable query]({{page.baseurl}}/graphql/queries/is-company-admin-email-available.html)
* [isCompanyUserEmailAvailable query]({{page.baseurl}}/graphql/queries/is-company-user-email-available.html)
Loading