Skip to content
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
71 changes: 3 additions & 68 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,9 @@
**Api changes**

<details>
<summary>Added Type(s)</summary>
<summary>Changed Property(s)</summary>

- added type `ApprovalRuleSetCustomFieldAction`
- added type `ApprovalRuleSetCustomTypeAction`
- added type `SearchNotReadyError`
- added type `GraphQLSearchNotReadyError`
- added type `ProductTailoringAttribute`
- added type `ProductTailoringSetAttributeAction`
- added type `ProductTailoringSetAttributeInAllVariantsAction`
- added type `ImageProcessingOngoingWarning`
- added type `WarningObject`
</details>


<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ProductSearchStatus`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `custom` to type `ApprovalRule`
- added property `staged` to type `ProductVariantDeletedMessage`
- added property `staged` to type `ProductVariantDeletedMessagePayload`
- added property `warnings` to type `ProductTailoring`
- added property `attributes` to type `ProductVariantTailoring`
- added property `attributes` to type `ProductVariantTailoringDraft`
- added property `attributes` to type `ProductTailoringAddVariantAction`
- added property `warnings` to type `Product`
- added property `customers` to type `SearchIndexingConfiguration`
- added property `source` to type `EventBridgeDestination`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `customer-group` to type `ExtensionResourceTypeId`
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
- added enum `approval-rule` to type `CustomFieldReferenceValue`
- added enum `approval-rule` to type `ResourceTypeId`
- added enum `product-tailoring` to type `ResourceTypeId`
</details>


<details>
<summary>Added Method(s)</summary>

- added method `$apiRoot->withProjectKey()->productTailoring()->head()`
</details>

**Import changes**

<details>
<summary>Added Type(s)</summary>

- added type `InvalidFieldsUpdateError`
- added type `NewMasterVariantAdditionNotAllowedError`
</details>

**History changes**

<details>
<summary>Required Property(s)</summary>

- changed property `id` of type `ModifiedBy` to be optional
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
</details>

2 changes: 1 addition & 1 deletion lib/commercetools-api/docs/RequestBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -3260,7 +3260,7 @@ $request = $builder
```
## `withProjectKey("projectKey")->graphql()->post(null)`

Execute a GraphQL query
Execute a GraphQL request.

### Example
```php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface GraphQLErrorObject extends JsonObject
public const FIELD_PATTERN1 = '//';

/**
* <p>Error identifier.</p>
* <p>One of the error codes that is listed on the <a href="/errors">Errors</a> page.</p>
*

* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function __construct(
}

/**
* <p>Error identifier.</p>
* <p>One of the error codes that is listed on the <a href="/errors">Errors</a> page.</p>
*
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
}

/**
* <p>Error identifier.</p>
* <p>One of the error codes that is listed on the <a href="/errors">Errors</a> page.</p>
*
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
}

/**
* <p>Error identifier.</p>
* <p>One of the error codes that is listed on the <a href="/errors">Errors</a> page.</p>
*
*
* @return null|string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
}

/**
* <p>Error identifier.</p>
* <p>One of the error codes that is listed on the <a href="/errors">Errors</a> page.</p>
*
*
* @return null|string
Expand Down
8 changes: 7 additions & 1 deletion lib/commercetools-api/src/Models/GraphQl/GraphQLError.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,31 @@ interface GraphQLError extends JsonObject
public const FIELD_EXTENSIONS = 'extensions';

/**
* <p>Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error.</p>
*

* @return null|string
*/
public function getMessage();

/**
* <p>Location within your query where the error occurred.</p>
*

* @return null|GraphQLErrorLocationCollection
*/
public function getLocations();

/**
* <p>Query fields listed in order from the root of the query response up to the field in which the error occurred. <code>path</code> is displayed in the response only if an error is associated with a particular field in the query result.</p>
*

* @return null|array
*/
public function getPath();

/**
* <p>Represents a single error.</p>
* <p>Dictionary with additional information where applicable.</p>
*

* @return null|GraphQLErrorObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ final class GraphQLErrorBuilder implements Builder
private $extensions;

/**
* <p>Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error.</p>
*

* @return null|string
*/
Expand All @@ -56,6 +58,8 @@ public function getMessage()
}

/**
* <p>Location within your query where the error occurred.</p>
*

* @return null|GraphQLErrorLocationCollection
*/
Expand All @@ -65,6 +69,8 @@ public function getLocations()
}

/**
* <p>Query fields listed in order from the root of the query response up to the field in which the error occurred. <code>path</code> is displayed in the response only if an error is associated with a particular field in the query result.</p>
*

* @return null|array
*/
Expand All @@ -74,7 +80,7 @@ public function getPath()
}

/**
* <p>Represents a single error.</p>
* <p>Dictionary with additional information where applicable.</p>
*

* @return null|GraphQLErrorObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ interface GraphQLErrorLocation extends JsonObject
public const FIELD_COLUMN = 'column';

/**
* <p>Line number of the query where the error occurred.</p>
*

* @return null|int
*/
public function getLine();

/**
* <p>Position in <code>line</code> where the error occurred.</p>
*

* @return null|int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ final class GraphQLErrorLocationBuilder implements Builder
private $column;

/**
* <p>Line number of the query where the error occurred.</p>
*

* @return null|int
*/
Expand All @@ -42,6 +44,8 @@ public function getLine()
}

/**
* <p>Position in <code>line</code> where the error occurred.</p>
*

* @return null|int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function __construct(
}

/**
* <p>Line number of the query where the error occurred.</p>
*
*
* @return null|int
*/
Expand All @@ -62,6 +64,8 @@ public function getLine()
}

/**
* <p>Position in <code>line</code> where the error occurred.</p>
*
*
* @return null|int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public function __construct(
}

/**
* <p>Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error.</p>
*
*
* @return null|string
*/
Expand All @@ -80,6 +82,8 @@ public function getMessage()
}

/**
* <p>Location within your query where the error occurred.</p>
*
*
* @return null|GraphQLErrorLocationCollection
*/
Expand All @@ -98,6 +102,8 @@ public function getLocations()
}

/**
* <p>Query fields listed in order from the root of the query response up to the field in which the error occurred. <code>path</code> is displayed in the response only if an error is associated with a particular field in the query result.</p>
*
*
* @return null|array
*/
Expand All @@ -116,7 +122,7 @@ public function getPath()
}

/**
* <p>Represents a single error.</p>
* <p>Dictionary with additional information where applicable.</p>
*
*
* @return null|GraphQLErrorObject
Expand Down
6 changes: 6 additions & 0 deletions lib/commercetools-api/src/Models/GraphQl/GraphQLRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,24 @@ interface GraphQLRequest extends JsonObject
public const FIELD_VARIABLES = 'variables';

/**
* <p>String representation of the <em>Source Text</em> of the <em>Document</em> that is specified in the <a href="https://spec.graphql.org/draft/#sec-Language">Language section of the GraphQL specification</a>.</p>
*

* @return null|string
*/
public function getQuery();

/**
* <p>Name of the operation, if you defined several operations in <code>query</code>.</p>
*

* @return null|string
*/
public function getOperationName();

/**
* <p>JSON object that contains key-value pairs in which the keys are variable names and the values are variable values.</p>
*

* @return null|GraphQLVariablesMap
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ final class GraphQLRequestBuilder implements Builder
private $variables;

/**
* <p>String representation of the <em>Source Text</em> of the <em>Document</em> that is specified in the <a href="https://spec.graphql.org/draft/#sec-Language">Language section of the GraphQL specification</a>.</p>
*

* @return null|string
*/
Expand All @@ -48,6 +50,8 @@ public function getQuery()
}

/**
* <p>Name of the operation, if you defined several operations in <code>query</code>.</p>
*

* @return null|string
*/
Expand All @@ -57,6 +61,8 @@ public function getOperationName()
}

/**
* <p>JSON object that contains key-value pairs in which the keys are variable names and the values are variable values.</p>
*

* @return null|GraphQLVariablesMap
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public function __construct(
}

/**
* <p>String representation of the <em>Source Text</em> of the <em>Document</em> that is specified in the <a href="https://spec.graphql.org/draft/#sec-Language">Language section of the GraphQL specification</a>.</p>
*
*
* @return null|string
*/
Expand All @@ -70,6 +72,8 @@ public function getQuery()
}

/**
* <p>Name of the operation, if you defined several operations in <code>query</code>.</p>
*
*
* @return null|string
*/
Expand All @@ -88,6 +92,8 @@ public function getOperationName()
}

/**
* <p>JSON object that contains key-value pairs in which the keys are variable names and the values are variable values.</p>
*
*
* @return null|GraphQLVariablesMap
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ interface GraphQLResponse extends JsonObject
public const FIELD_ERRORS = 'errors';

/**
* <p>JSON object that contains the results of a GraphQL query.</p>
*

* @return null|mixed
*/
public function getData();

/**
* <p>Errors that the GraphQL query returns.</p>
*

* @return null|GraphQLErrorCollection
*/
Expand Down
Loading