Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated SDKs #849

Merged
merged 1 commit into from
Nov 14, 2024
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: 2 additions & 0 deletions .changeset/changes_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<summary>Changed Property(s)</summary>

- :warning: changed property `value` of type `DirectDiscountDraft` from type `CartDiscountValue` to `CartDiscountValueDraft`
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `totalPrice` of type `OrderLineItemDiscountSetMessage` from type `Money` to `CentPrecisionMoney`
- :warning: changed property `value` of type `StandalonePriceValueChangedMessage` from type `Money` to `TypedMoney`
- :warning: changed property `oldValue` of type `StandalonePriceValueChangedMessage` from type `Money` to `TypedMoney`
Expand Down
2 changes: 2 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<summary>Changed Property(s)</summary>

- :warning: changed property `value` of type `DirectDiscountDraft` from type `CartDiscountValue` to `CartDiscountValueDraft`
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
- :warning: changed property `totalPrice` of type `OrderLineItemDiscountSetMessage` from type `Money` to `CentPrecisionMoney`
- :warning: changed property `value` of type `StandalonePriceValueChangedMessage` from type `Money` to `TypedMoney`
- :warning: changed property `oldValue` of type `StandalonePriceValueChangedMessage` from type `Money` to `TypedMoney`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ByProjectKeyGraphqlRequestBuilder {
}
) {}
/**
* Execute a GraphQL query
* Execute a GraphQL request.
*/
public post(methodArgs: {
body: GraphQLRequest
Expand All @@ -34,7 +34,7 @@ export class ByProjectKeyGraphqlRequestBuilder {
uriTemplate: '/{projectKey}/graphql',
pathVariables: this.args.pathArgs,
headers: {
'Content-Type': 'application/graphql',
'Content-Type': 'application/json',
...methodArgs?.headers,
},
body: methodArgs?.body,
Expand Down
28 changes: 27 additions & 1 deletion packages/platform-sdk/src/generated/models/graph-ql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,85 @@

import { GraphQLErrorObject } from './error'

/**
* Contains an error message, the location of the code that caused the error, and other information to help you correct the error.
*/
export interface GraphQLError {
/**
* Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error.
*
*/
readonly message: string
/**
* Location within your query where the error occurred.
*
*/
readonly locations: GraphQLErrorLocation[]
/**
* Query fields listed in order from the root of the query response up to the field in which the error occurred. `path` is displayed in the response only if an error is associated with a particular field in the query result.
*
*/
readonly path?: any[]
/**
* Represents a single error.
* Dictionary with additional information where applicable.
*
*/
readonly extensions: GraphQLErrorObject
}
/**
* Represents the location within your query where the error occurred.
*/
export interface GraphQLErrorLocation {
/**
* Line number of the query where the error occurred.
*
*/
readonly line: number
/**
* Position in `line` where the error occurred.
*
*/
readonly column: number
}
/**
* The query, operation name, and variables that are sent to the GraphQL API.
*/
export interface GraphQLRequest {
/**
* String representation of the _Source Text_ of the _Document_ that is specified in the [Language section of the GraphQL specification](https://spec.graphql.org/draft/#sec-Language).
*
*/
readonly query: string
/**
* Name of the operation, if you defined several operations in `query`.
*
*/
readonly operationName?: string
/**
* JSON object that contains key-value pairs in which the keys are variable names and the values are variable values.
*
*/
readonly variables?: GraphQLVariablesMap
}
/**
* `error` is present in the response only if the GraphQL query was unsuccessful.
*
*/
export interface GraphQLResponse {
/**
* JSON object that contains the results of a GraphQL query.
*
*/
readonly data?: any
/**
* Errors that the GraphQL query returns.
*
*/
readonly errors?: GraphQLError[]
}
/**
* The variables that the GraphQL query uses.
*/
export interface GraphQLVariablesMap {
[key: string]: any
}
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,4 @@ ccf4522140c12b0093aefe0e2a27d62bcc4834a6
8e09aa861a0ba58755289bc185dcb268ac4f1c13
0be69283d6aba9d3a2f895140378673f2f80f7b0
605a1ff5cf861ca0d8e2711ca79374804f180b50
f254d17f05343dcc4299fc53ff9b335b5ef63d69