Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
48 changes: 43 additions & 5 deletions schema-main.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5446,6 +5446,20 @@ type CheckoutSettings {
Added in Saleor 3.20.
"""
automaticallyCompleteFullyPaidCheckouts: Boolean!

"""
The time in minutes to wait after a checkout is fully paid before automatically completing it.

Added in Saleor 3.22.
"""
automaticCompletionDelay: Minute

"""
The date time defines the earliest checkout creation date on which fully paid checkouts can begin to be automatically completed.

Added in Saleor 3.22.
"""
automaticCompletionCutOffDate: DateTime
}

"""Represents the channel-specific payment settings."""
Expand Down Expand Up @@ -5794,13 +5808,13 @@ type Product implements Node & ObjectWithMetadata & ObjectWithAttributes @doc(ca
"""Get a single product media by ID."""
mediaById(
"""ID of a product media."""
id: ID
id: ID!
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be an unrelated change to the PR's purpose of adding checkout autocomplete settings. The change makes the id parameter required (non-nullable) for the mediaById field. This should be in a separate PR or explained in the PR description.

Suggested change
id: ID!
id: ID

Copilot uses AI. Check for mistakes.
): ProductMedia

"""Get a single product image by ID."""
imageById(
"""ID of a product image."""
id: ID
id: ID!
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be an unrelated change to the PR's purpose of adding checkout autocomplete settings. The change makes the id parameter required (non-nullable) for the deprecated imageById field. This should be in a separate PR or explained in the PR description.

Suggested change
id: ID!
id: ID

Copilot uses AI. Check for mistakes.
): ProductImage @deprecated(reason: "Use the `mediaById` field instead.")

"""Get a single variant by SKU or ID."""
Expand Down Expand Up @@ -28849,11 +28863,35 @@ input CheckoutSettingsInput @doc(category: "Checkout") {
useLegacyErrorFlow: Boolean @deprecated

"""
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `charge_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `authorize_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation mentions authorize_status but should refer to charge_status instead. This is inconsistent with the schema's own documentation for CheckoutAutoCompleteInput at line 28882, which correctly uses charge_status.

Suggested change
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `authorize_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions. When enabled, the checkout will be automatically completed once the checkout `charge_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after "transactions." before "When enabled". There should be a space between these two sentences for proper formatting.

Suggested change
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `authorize_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions. When enabled, the checkout will be automatically completed once the checkout `authorize_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.

Copilot uses AI. Check for mistakes.

Added in Saleor 3.20.
"""
automaticallyCompleteFullyPaidCheckouts: Boolean
automaticallyCompleteFullyPaidCheckouts: Boolean @deprecated(reason: "Use `automatic_completion` instead.")

"""
Settings for automatic completion of fully paid checkouts.

Added in Saleor 3.22.
"""
automaticCompletion: CheckoutAutoCompleteInput
}

input CheckoutAutoCompleteInput @doc(category: "Checkout") {
"""
Default `false`. Determines if the paid checkouts should be automatically completed. This setting applies only to checkouts where payment was processed through transactions.When enabled, the checkout will be automatically completed once the checkout `charge_status` reaches `FULL`. This occurs when the total sum of charged and authorized transaction amounts equals or exceeds the checkout's total amount.
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after "transactions." before "When enabled". There should be a space between these two sentences for proper formatting.

Copilot uses AI. Check for mistakes.
"""
enabled: Boolean!

"""
The time in minutes after which the fully paid checkout will be automatically completed. Default is 30. Set to 0 for immediate completion. Should be less than the threshold for the oldest modified checkout eligible for automatic completion.
"""
delay: Minute

"""
Specifies the earliest date on which fully paid checkouts can begin to be automatically completed. Fully paid checkouts dated before this cut-off will not be automatically completed. Must be less than the threshold of the oldest modified checkout eligible for automatic completion. Default is current date time.
"""
cutOffDate: DateTime
}

input PaymentSettingsInput @doc(category: "Payments") {
Expand Down Expand Up @@ -29350,7 +29388,7 @@ type AttributeBulkUpdateError @doc(category: "Attributes") {
code: AttributeBulkUpdateErrorCode!
}

enum AttributeBulkUpdateErrorCode {
enum AttributeBulkUpdateErrorCode @doc(category: "Attributes") {
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be an unrelated change to the PR's purpose of adding checkout autocomplete settings. Adding the @doc(category: "Attributes") directive to the AttributeBulkUpdateErrorCode enum should be in a separate PR or explained in the PR description.

Suggested change
enum AttributeBulkUpdateErrorCode @doc(category: "Attributes") {
enum AttributeBulkUpdateErrorCode {

Copilot uses AI. Check for mistakes.
ALREADY_EXISTS
BLANK
GRAPHQL_ERROR
Expand Down
2 changes: 2 additions & 0 deletions src/fragments/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export const channelDetailsFragment = gql`
}
checkoutSettings {
automaticallyCompleteFullyPaidCheckouts
automaticCompletionDelay
automaticCompletionCutOffDate
}
}
`;
2 changes: 2 additions & 0 deletions src/graphql/hooks.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ export const ChannelDetailsFragmentDoc = gql`
}
checkoutSettings {
automaticallyCompleteFullyPaidCheckouts
automaticCompletionDelay
automaticCompletionCutOffDate
}
}
${ChannelFragmentDoc}
Expand Down
4 changes: 3 additions & 1 deletion src/graphql/typePolicies.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1448,8 +1448,10 @@ export type CheckoutRemovePromoCodeFieldPolicy = {
checkoutErrors?: FieldPolicy<any> | FieldReadFunction<any>,
errors?: FieldPolicy<any> | FieldReadFunction<any>
};
export type CheckoutSettingsKeySpecifier = ('automaticallyCompleteFullyPaidCheckouts' | 'useLegacyErrorFlow' | CheckoutSettingsKeySpecifier)[];
export type CheckoutSettingsKeySpecifier = ('automaticCompletionCutOffDate' | 'automaticCompletionDelay' | 'automaticallyCompleteFullyPaidCheckouts' | 'useLegacyErrorFlow' | CheckoutSettingsKeySpecifier)[];
export type CheckoutSettingsFieldPolicy = {
automaticCompletionCutOffDate?: FieldPolicy<any> | FieldReadFunction<any>,
automaticCompletionDelay?: FieldPolicy<any> | FieldReadFunction<any>,
automaticallyCompleteFullyPaidCheckouts?: FieldPolicy<any> | FieldReadFunction<any>,
useLegacyErrorFlow?: FieldPolicy<any> | FieldReadFunction<any>
};
Expand Down
Loading
Loading