diff --git a/apps/avatax/e2e/generated/types.ts b/apps/avatax/e2e/generated/types.ts index 4a7e82741..f9fe6fdea 100644 --- a/apps/avatax/e2e/generated/types.ts +++ b/apps/avatax/e2e/generated/types.ts @@ -8246,6 +8246,18 @@ export type Fulfillment = Node & ObjectWithMetadata & { privateMetafield?: Maybe; /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ privateMetafields?: Maybe; + /** + * Reason for returning this fulfillment. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; /** Amount of refunded shipping price. */ shippingRefundedAmount?: Maybe; /** Status of fulfillment. */ @@ -8398,6 +8410,18 @@ export type FulfillmentLine = Node & { orderLine?: Maybe; /** The number of items included in the fulfillment line. */ quantity: Scalars['Int']['output']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** Event sent when fulfillment metadata is updated. */ @@ -14004,6 +14028,22 @@ export type Mutation = { * - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested. */ requestPasswordReset?: Maybe; + /** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnReasonReferenceClear?: Maybe; + /** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnSettingsUpdate?: Maybe; /** * Deletes sales. * @@ -16017,6 +16057,11 @@ export type MutationRequestPasswordResetArgs = { }; +export type MutationReturnSettingsUpdateArgs = { + input: ReturnSettingsUpdateInput; +}; + + export type MutationSaleBulkDeleteArgs = { ids: Array; }; @@ -17931,6 +17976,7 @@ export enum OrderGrantRefundCreateErrorCode { AmountGreaterThanAvailable = 'AMOUNT_GREATER_THAN_AVAILABLE', GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', Required = 'REQUIRED', ShippingCostsAlreadyGranted = 'SHIPPING_COSTS_ALREADY_GRANTED' @@ -17975,6 +18021,8 @@ export type OrderGrantRefundCreateLineError = { export enum OrderGrantRefundCreateLineErrorCode { GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', QuantityGreaterThanAvailable = 'QUANTITY_GREATER_THAN_AVAILABLE' } @@ -17986,6 +18034,12 @@ export type OrderGrantRefundCreateLineInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; /** @@ -18020,6 +18074,7 @@ export enum OrderGrantRefundUpdateErrorCode { AmountGreaterThanAvailable = 'AMOUNT_GREATER_THAN_AVAILABLE', GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', Required = 'REQUIRED', ShippingCostsAlreadyGranted = 'SHIPPING_COSTS_ALREADY_GRANTED' @@ -18059,6 +18114,12 @@ export type OrderGrantRefundUpdateLineAddInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; export type OrderGrantRefundUpdateLineError = { @@ -18075,6 +18136,8 @@ export type OrderGrantRefundUpdateLineError = { export enum OrderGrantRefundUpdateLineErrorCode { GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', QuantityGreaterThanAvailable = 'QUANTITY_GREATER_THAN_AVAILABLE' } @@ -18139,6 +18202,12 @@ export type OrderGrantedRefundLine = { quantity: Scalars['Int']['output']; /** Reason for refunding the line. */ reason?: Maybe; + /** + * Reason Model (Page) reference for this refund line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** @@ -18600,6 +18669,18 @@ export type OrderReturnFulfillmentLineInput = { fulfillmentLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18609,6 +18690,18 @@ export type OrderReturnLineInput = { orderLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18622,6 +18715,18 @@ export type OrderReturnProductsInput = { includeShippingCosts?: InputMaybe; /** List of unfulfilled lines to return. */ orderLines?: InputMaybe>; + /** + * Reason for returning this order. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this return. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** If true, Saleor will call refund action for all lines. */ refund?: InputMaybe; }; @@ -25202,6 +25307,8 @@ export type Query = { * @deprecated Field no longer supported */ reportProductSales?: Maybe; + /** Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. */ + returnSettings: ReturnSettings; /** * Look up a sale by ID. * @@ -26118,6 +26225,89 @@ export type RequestPasswordReset = { errors: Array; }; +/** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnReasonReferenceTypeClear = { + __typename?: 'ReturnReasonReferenceTypeClear'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnReasonReferenceTypeClearError = { + __typename?: 'ReturnReasonReferenceTypeClearError'; + /** Failed to clear return reason reference type */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +/** + * Return related settings from site settings. + * + * Added in Saleor 3.23. + */ +export type ReturnSettings = { + __typename?: 'ReturnSettings'; + /** + * Model type used for return reasons. + * + * Added in Saleor 3.23. + */ + reasonReferenceType?: Maybe; +}; + +export enum ReturnSettingsErrorCode { + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED' +} + +/** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnSettingsUpdate = { + __typename?: 'ReturnSettingsUpdate'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnSettingsUpdateError = { + __typename?: 'ReturnSettingsUpdateError'; + /** Failed to update Return Settings */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +export type ReturnSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + * + * Added in Saleor 3.23. + */ + returnReasonReferenceType: Scalars['ID']['input']; +}; + export enum RewardTypeEnum { Gift = 'GIFT', SubtotalDiscount = 'SUBTOTAL_DISCOUNT' diff --git a/apps/dummy-payment-app/generated/graphql.ts b/apps/dummy-payment-app/generated/graphql.ts index cf24619cc..e1b3e885d 100644 --- a/apps/dummy-payment-app/generated/graphql.ts +++ b/apps/dummy-payment-app/generated/graphql.ts @@ -8250,6 +8250,18 @@ export type Fulfillment = Node & ObjectWithMetadata & { privateMetafield?: Maybe; /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ privateMetafields?: Maybe; + /** + * Reason for returning this fulfillment. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; /** Amount of refunded shipping price. */ shippingRefundedAmount?: Maybe; /** Status of fulfillment. */ @@ -8402,6 +8414,18 @@ export type FulfillmentLine = Node & { orderLine?: Maybe; /** The number of items included in the fulfillment line. */ quantity: Scalars['Int']['output']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** Event sent when fulfillment metadata is updated. */ @@ -14008,6 +14032,22 @@ export type Mutation = { * - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested. */ requestPasswordReset?: Maybe; + /** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnReasonReferenceClear?: Maybe; + /** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnSettingsUpdate?: Maybe; /** * Deletes sales. * @@ -16021,6 +16061,11 @@ export type MutationRequestPasswordResetArgs = { }; +export type MutationReturnSettingsUpdateArgs = { + input: ReturnSettingsUpdateInput; +}; + + export type MutationSaleBulkDeleteArgs = { ids: Array; }; @@ -17935,6 +17980,7 @@ export enum OrderGrantRefundCreateErrorCode { AmountGreaterThanAvailable = 'AMOUNT_GREATER_THAN_AVAILABLE', GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', Required = 'REQUIRED', ShippingCostsAlreadyGranted = 'SHIPPING_COSTS_ALREADY_GRANTED' @@ -17979,6 +18025,8 @@ export type OrderGrantRefundCreateLineError = { export enum OrderGrantRefundCreateLineErrorCode { GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', QuantityGreaterThanAvailable = 'QUANTITY_GREATER_THAN_AVAILABLE' } @@ -17990,6 +18038,12 @@ export type OrderGrantRefundCreateLineInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; /** @@ -18024,6 +18078,7 @@ export enum OrderGrantRefundUpdateErrorCode { AmountGreaterThanAvailable = 'AMOUNT_GREATER_THAN_AVAILABLE', GraphqlError = 'GRAPHQL_ERROR', Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', Required = 'REQUIRED', ShippingCostsAlreadyGranted = 'SHIPPING_COSTS_ALREADY_GRANTED' @@ -18063,6 +18118,12 @@ export type OrderGrantRefundUpdateLineAddInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; export type OrderGrantRefundUpdateLineError = { @@ -18079,6 +18140,8 @@ export type OrderGrantRefundUpdateLineError = { export enum OrderGrantRefundUpdateLineErrorCode { GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotConfigured = 'NOT_CONFIGURED', NotFound = 'NOT_FOUND', QuantityGreaterThanAvailable = 'QUANTITY_GREATER_THAN_AVAILABLE' } @@ -18143,6 +18206,12 @@ export type OrderGrantedRefundLine = { quantity: Scalars['Int']['output']; /** Reason for refunding the line. */ reason?: Maybe; + /** + * Reason Model (Page) reference for this refund line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** @@ -18604,6 +18673,18 @@ export type OrderReturnFulfillmentLineInput = { fulfillmentLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18613,6 +18694,18 @@ export type OrderReturnLineInput = { orderLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18626,6 +18719,18 @@ export type OrderReturnProductsInput = { includeShippingCosts?: InputMaybe; /** List of unfulfilled lines to return. */ orderLines?: InputMaybe>; + /** + * Reason for returning this order. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this return. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** If true, Saleor will call refund action for all lines. */ refund?: InputMaybe; }; @@ -25206,6 +25311,8 @@ export type Query = { * @deprecated Field no longer supported */ reportProductSales?: Maybe; + /** Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. */ + returnSettings: ReturnSettings; /** * Look up a sale by ID. * @@ -26122,6 +26229,89 @@ export type RequestPasswordReset = { errors: Array; }; +/** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnReasonReferenceTypeClear = { + __typename?: 'ReturnReasonReferenceTypeClear'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnReasonReferenceTypeClearError = { + __typename?: 'ReturnReasonReferenceTypeClearError'; + /** Failed to clear return reason reference type */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +/** + * Return related settings from site settings. + * + * Added in Saleor 3.23. + */ +export type ReturnSettings = { + __typename?: 'ReturnSettings'; + /** + * Model type used for return reasons. + * + * Added in Saleor 3.23. + */ + reasonReferenceType?: Maybe; +}; + +export enum ReturnSettingsErrorCode { + GraphqlError = 'GRAPHQL_ERROR', + Invalid = 'INVALID', + NotFound = 'NOT_FOUND', + Required = 'REQUIRED' +} + +/** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnSettingsUpdate = { + __typename?: 'ReturnSettingsUpdate'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnSettingsUpdateError = { + __typename?: 'ReturnSettingsUpdateError'; + /** Failed to update Return Settings */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +export type ReturnSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + * + * Added in Saleor 3.23. + */ + returnReasonReferenceType: Scalars['ID']['input']; +}; + export enum RewardTypeEnum { Gift = 'GIFT', SubtotalDiscount = 'SUBTOTAL_DISCOUNT' diff --git a/apps/np-atobarai/generated/graphql.ts b/apps/np-atobarai/generated/graphql.ts index 5347fd8b5..187056c19 100644 --- a/apps/np-atobarai/generated/graphql.ts +++ b/apps/np-atobarai/generated/graphql.ts @@ -7913,6 +7913,18 @@ export type Fulfillment = Node & ObjectWithMetadata & { readonly privateMetafield?: Maybe; /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ readonly privateMetafields?: Maybe; + /** + * Reason for returning this fulfillment. + * + * Added in Saleor 3.23. + */ + readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; /** Amount of refunded shipping price. */ readonly shippingRefundedAmount?: Maybe; /** Status of fulfillment. */ @@ -8059,6 +8071,18 @@ export type FulfillmentLine = Node & { readonly orderLine?: Maybe; /** The number of items included in the fulfillment line. */ readonly quantity: Scalars['Int']['output']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; }; /** Event sent when fulfillment metadata is updated. */ @@ -13560,6 +13584,22 @@ export type Mutation = { * - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested. */ readonly requestPasswordReset?: Maybe; + /** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly returnReasonReferenceClear?: Maybe; + /** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly returnSettingsUpdate?: Maybe; /** * Deletes sales. * @@ -15573,6 +15613,11 @@ export type MutationRequestPasswordResetArgs = { }; +export type MutationReturnSettingsUpdateArgs = { + input: ReturnSettingsUpdateInput; +}; + + export type MutationSaleBulkDeleteArgs = { ids: ReadonlyArray; }; @@ -17441,6 +17486,7 @@ export type OrderGrantRefundCreateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17483,6 +17529,8 @@ export type OrderGrantRefundCreateLineError = { export type OrderGrantRefundCreateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -17493,6 +17541,12 @@ export type OrderGrantRefundCreateLineInput = { readonly quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; }; /** @@ -17525,6 +17579,7 @@ export type OrderGrantRefundUpdateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17563,6 +17618,12 @@ export type OrderGrantRefundUpdateLineAddInput = { readonly quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; }; export type OrderGrantRefundUpdateLineError = { @@ -17578,6 +17639,8 @@ export type OrderGrantRefundUpdateLineError = { export type OrderGrantRefundUpdateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -17639,6 +17702,12 @@ export type OrderGrantedRefundLine = { readonly quantity: Scalars['Int']['output']; /** Reason for refunding the line. */ readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this refund line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; }; /** @@ -18080,6 +18149,18 @@ export type OrderReturnFulfillmentLineInput = { readonly fulfillmentLineId: Scalars['ID']['input']; /** The number of items to be returned. */ readonly quantity: Scalars['Int']['input']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ readonly replace?: InputMaybe; }; @@ -18089,6 +18170,18 @@ export type OrderReturnLineInput = { readonly orderLineId: Scalars['ID']['input']; /** The number of items to be returned. */ readonly quantity: Scalars['Int']['input']; + /** + * Reason for returning this line. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ readonly replace?: InputMaybe; }; @@ -18102,6 +18195,18 @@ export type OrderReturnProductsInput = { readonly includeShippingCosts?: InputMaybe; /** List of unfulfilled lines to return. */ readonly orderLines?: InputMaybe>; + /** + * Reason for returning this order. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this return. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** If true, Saleor will call refund action for all lines. */ readonly refund?: InputMaybe; }; @@ -24396,6 +24501,8 @@ export type Query = { * @deprecated Field no longer supported */ readonly reportProductSales?: Maybe; + /** Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. */ + readonly returnSettings: ReturnSettings; /** * Look up a sale by ID. * @@ -25301,6 +25408,83 @@ export type RequestPasswordReset = { readonly errors: ReadonlyArray; }; +/** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnReasonReferenceTypeClear = { + readonly errors: ReadonlyArray; + /** Return settings. */ + readonly returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly returnSettingsErrors: ReadonlyArray; +}; + +export type ReturnReasonReferenceTypeClearError = { + /** Failed to clear return reason reference type */ + readonly code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +/** + * Return related settings from site settings. + * + * Added in Saleor 3.23. + */ +export type ReturnSettings = { + /** + * Model type used for return reasons. + * + * Added in Saleor 3.23. + */ + readonly reasonReferenceType?: Maybe; +}; + +export type ReturnSettingsErrorCode = + | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_FOUND' + | 'REQUIRED'; + +/** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Return settings. */ + readonly returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly returnSettingsErrors: ReadonlyArray; +}; + +export type ReturnSettingsUpdateError = { + /** Failed to update Return Settings */ + readonly code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type ReturnSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + * + * Added in Saleor 3.23. + */ + readonly returnReasonReferenceType: Scalars['ID']['input']; +}; + export type RewardTypeEnum = | 'GIFT' | 'SUBTOTAL_DISCOUNT'; diff --git a/apps/onboarding/generated/graphql.ts b/apps/onboarding/generated/graphql.ts index 074a24cb2..0d609e9dd 100644 --- a/apps/onboarding/generated/graphql.ts +++ b/apps/onboarding/generated/graphql.ts @@ -7913,6 +7913,18 @@ export type Fulfillment = Node & ObjectWithMetadata & { readonly privateMetafield?: Maybe; /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ readonly privateMetafields?: Maybe; + /** + * Reason for returning this fulfillment. + * + * Added in Saleor 3.23. + */ + readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; /** Amount of refunded shipping price. */ readonly shippingRefundedAmount?: Maybe; /** Status of fulfillment. */ @@ -8059,6 +8071,18 @@ export type FulfillmentLine = Node & { readonly orderLine?: Maybe; /** The number of items included in the fulfillment line. */ readonly quantity: Scalars['Int']['output']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; }; /** Event sent when fulfillment metadata is updated. */ @@ -13560,6 +13584,22 @@ export type Mutation = { * - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested. */ readonly requestPasswordReset?: Maybe; + /** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly returnReasonReferenceClear?: Maybe; + /** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + readonly returnSettingsUpdate?: Maybe; /** * Deletes sales. * @@ -15573,6 +15613,11 @@ export type MutationRequestPasswordResetArgs = { }; +export type MutationReturnSettingsUpdateArgs = { + input: ReturnSettingsUpdateInput; +}; + + export type MutationSaleBulkDeleteArgs = { ids: ReadonlyArray; }; @@ -17441,6 +17486,7 @@ export type OrderGrantRefundCreateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17483,6 +17529,8 @@ export type OrderGrantRefundCreateLineError = { export type OrderGrantRefundCreateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -17493,6 +17541,12 @@ export type OrderGrantRefundCreateLineInput = { readonly quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; }; /** @@ -17525,6 +17579,7 @@ export type OrderGrantRefundUpdateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17563,6 +17618,12 @@ export type OrderGrantRefundUpdateLineAddInput = { readonly quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; }; export type OrderGrantRefundUpdateLineError = { @@ -17578,6 +17639,8 @@ export type OrderGrantRefundUpdateLineError = { export type OrderGrantRefundUpdateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -17639,6 +17702,12 @@ export type OrderGrantedRefundLine = { readonly quantity: Scalars['Int']['output']; /** Reason for refunding the line. */ readonly reason?: Maybe; + /** + * Reason Model (Page) reference for this refund line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: Maybe; }; /** @@ -18080,6 +18149,18 @@ export type OrderReturnFulfillmentLineInput = { readonly fulfillmentLineId: Scalars['ID']['input']; /** The number of items to be returned. */ readonly quantity: Scalars['Int']['input']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this fulfillment line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ readonly replace?: InputMaybe; }; @@ -18089,6 +18170,18 @@ export type OrderReturnLineInput = { readonly orderLineId: Scalars['ID']['input']; /** The number of items to be returned. */ readonly quantity: Scalars['Int']['input']; + /** + * Reason for returning this line. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this line. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ readonly replace?: InputMaybe; }; @@ -18102,6 +18195,18 @@ export type OrderReturnProductsInput = { readonly includeShippingCosts?: InputMaybe; /** List of unfulfilled lines to return. */ readonly orderLines?: InputMaybe>; + /** + * Reason for returning this order. + * + * Added in Saleor 3.23. + */ + readonly reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this return. + * + * Added in Saleor 3.23. + */ + readonly reasonReference?: InputMaybe; /** If true, Saleor will call refund action for all lines. */ readonly refund?: InputMaybe; }; @@ -24396,6 +24501,8 @@ export type Query = { * @deprecated Field no longer supported */ readonly reportProductSales?: Maybe; + /** Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. */ + readonly returnSettings: ReturnSettings; /** * Look up a sale by ID. * @@ -25301,6 +25408,83 @@ export type RequestPasswordReset = { readonly errors: ReadonlyArray; }; +/** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnReasonReferenceTypeClear = { + readonly errors: ReadonlyArray; + /** Return settings. */ + readonly returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly returnSettingsErrors: ReadonlyArray; +}; + +export type ReturnReasonReferenceTypeClearError = { + /** Failed to clear return reason reference type */ + readonly code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +/** + * Return related settings from site settings. + * + * Added in Saleor 3.23. + */ +export type ReturnSettings = { + /** + * Model type used for return reasons. + * + * Added in Saleor 3.23. + */ + readonly reasonReferenceType?: Maybe; +}; + +export type ReturnSettingsErrorCode = + | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_FOUND' + | 'REQUIRED'; + +/** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnSettingsUpdate = { + readonly errors: ReadonlyArray; + /** Return settings. */ + readonly returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + readonly returnSettingsErrors: ReadonlyArray; +}; + +export type ReturnSettingsUpdateError = { + /** Failed to update Return Settings */ + readonly code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + readonly field?: Maybe; + /** The error message. */ + readonly message?: Maybe; +}; + +export type ReturnSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + * + * Added in Saleor 3.23. + */ + readonly returnReasonReferenceType: Scalars['ID']['input']; +}; + export type RewardTypeEnum = | 'GIFT' | 'SUBTOTAL_DISCOUNT'; diff --git a/apps/stripe/e2e/generated/graphql.ts b/apps/stripe/e2e/generated/graphql.ts index ee8f36013..acdc81386 100644 --- a/apps/stripe/e2e/generated/graphql.ts +++ b/apps/stripe/e2e/generated/graphql.ts @@ -8193,6 +8193,18 @@ export type Fulfillment = Node & ObjectWithMetadata & { privateMetafield?: Maybe; /** Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. */ privateMetafields?: Maybe; + /** + * Reason for returning this fulfillment. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; /** Amount of refunded shipping price. */ shippingRefundedAmount?: Maybe; /** Status of fulfillment. */ @@ -8345,6 +8357,18 @@ export type FulfillmentLine = Node & { orderLine?: Maybe; /** The number of items included in the fulfillment line. */ quantity: Scalars['Int']['output']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: Maybe; + /** + * Reason Model (Page) reference for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** Event sent when fulfillment metadata is updated. */ @@ -13934,6 +13958,22 @@ export type Mutation = { * - STAFF_SET_PASSWORD_REQUESTED (async): Setting a new password for the staff account is requested. */ requestPasswordReset?: Maybe; + /** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnReasonReferenceClear?: Maybe; + /** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ + returnSettingsUpdate?: Maybe; /** * Deletes sales. * @@ -15947,6 +15987,11 @@ export type MutationRequestPasswordResetArgs = { }; +export type MutationReturnSettingsUpdateArgs = { + input: ReturnSettingsUpdateInput; +}; + + export type MutationSaleBulkDeleteArgs = { ids: Array; }; @@ -17850,6 +17895,7 @@ export type OrderGrantRefundCreateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17893,6 +17939,8 @@ export type OrderGrantRefundCreateLineError = { export type OrderGrantRefundCreateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -17903,6 +17951,12 @@ export type OrderGrantRefundCreateLineInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; /** @@ -17937,6 +17991,7 @@ export type OrderGrantRefundUpdateErrorCode = | 'AMOUNT_GREATER_THAN_AVAILABLE' | 'GRAPHQL_ERROR' | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'REQUIRED' | 'SHIPPING_COSTS_ALREADY_GRANTED'; @@ -17975,6 +18030,12 @@ export type OrderGrantRefundUpdateLineAddInput = { quantity: Scalars['Int']['input']; /** Reason of the granted refund for the line. */ reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for the line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; }; export type OrderGrantRefundUpdateLineError = { @@ -17991,6 +18052,8 @@ export type OrderGrantRefundUpdateLineError = { export type OrderGrantRefundUpdateLineErrorCode = | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_CONFIGURED' | 'NOT_FOUND' | 'QUANTITY_GREATER_THAN_AVAILABLE'; @@ -18054,6 +18117,12 @@ export type OrderGrantedRefundLine = { quantity: Scalars['Int']['output']; /** Reason for refunding the line. */ reason?: Maybe; + /** + * Reason Model (Page) reference for this refund line. + * + * Added in Saleor 3.23. + */ + reasonReference?: Maybe; }; /** @@ -18511,6 +18580,18 @@ export type OrderReturnFulfillmentLineInput = { fulfillmentLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this fulfillment line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this fulfillment line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18520,6 +18601,18 @@ export type OrderReturnLineInput = { orderLineId: Scalars['ID']['input']; /** The number of items to be returned. */ quantity: Scalars['Int']['input']; + /** + * Reason for returning this line. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this line. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** Determines, if the line should be added to replace order. */ replace?: InputMaybe; }; @@ -18533,6 +18626,18 @@ export type OrderReturnProductsInput = { includeShippingCosts?: InputMaybe; /** List of unfulfilled lines to return. */ orderLines?: InputMaybe>; + /** + * Reason for returning this order. + * + * Added in Saleor 3.23. + */ + reason?: InputMaybe; + /** + * ID of a `Page` (Model) to reference in reason for this return. + * + * Added in Saleor 3.23. + */ + reasonReference?: InputMaybe; /** If true, Saleor will call refund action for all lines. */ refund?: InputMaybe; }; @@ -25042,6 +25147,8 @@ export type Query = { * @deprecated Field no longer supported */ reportProductSales?: Maybe; + /** Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. */ + returnSettings: ReturnSettings; /** * Look up a sale by ID. * @@ -25956,6 +26063,88 @@ export type RequestPasswordReset = { errors: Array; }; +/** + * Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnReasonReferenceTypeClear = { + __typename?: 'ReturnReasonReferenceTypeClear'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnReasonReferenceTypeClearError = { + __typename?: 'ReturnReasonReferenceTypeClearError'; + /** Failed to clear return reason reference type */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +/** + * Return related settings from site settings. + * + * Added in Saleor 3.23. + */ +export type ReturnSettings = { + __typename?: 'ReturnSettings'; + /** + * Model type used for return reasons. + * + * Added in Saleor 3.23. + */ + reasonReferenceType?: Maybe; +}; + +export type ReturnSettingsErrorCode = + | 'GRAPHQL_ERROR' + | 'INVALID' + | 'NOT_FOUND' + | 'REQUIRED'; + +/** + * Update return settings across all channels. + * + * Added in Saleor 3.23. + * + * Requires one of the following permissions: MANAGE_SETTINGS. + */ +export type ReturnSettingsUpdate = { + __typename?: 'ReturnSettingsUpdate'; + errors: Array; + /** Return settings. */ + returnSettings?: Maybe; + /** @deprecated Use `errors` field instead. */ + returnSettingsErrors: Array; +}; + +export type ReturnSettingsUpdateError = { + __typename?: 'ReturnSettingsUpdateError'; + /** Failed to update Return Settings */ + code: ReturnSettingsErrorCode; + /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ + field?: Maybe; + /** The error message. */ + message?: Maybe; +}; + +export type ReturnSettingsUpdateInput = { + /** + * The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + * + * Added in Saleor 3.23. + */ + returnReasonReferenceType: Scalars['ID']['input']; +}; + export type RewardTypeEnum = | 'GIFT' | 'SUBTOTAL_DISCOUNT'; diff --git a/schema.graphql b/schema.graphql index 837198119..ea65478a8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -266,6 +266,11 @@ type Query { """ refundSettings: RefundSettings! @doc(category: "Shop") + """ + Returns related settings. Returns `ReturnSettings` configuration, global for the entire shop. + """ + returnSettings: ReturnSettings! @doc(category: "Shop") + """ Look up a shipping zone by ID. @@ -12164,6 +12169,20 @@ type Fulfillment implements Node & ObjectWithMetadata @doc(category: "Orders") { """Total refunded amount assigned to this fulfillment.""" totalRefundedAmount: Money + + """ + Reason for returning this fulfillment. + + Added in Saleor 3.23. + """ + reason: String + + """ + Reason Model (Page) reference for this fulfillment. + + Added in Saleor 3.23. + """ + reasonReference: Page } enum FulfillmentStatus @doc(category: "Orders") { @@ -12186,6 +12205,20 @@ type FulfillmentLine implements Node @doc(category: "Orders") { """The order line to which the fulfillment line is related.""" orderLine: OrderLine + + """ + Reason for returning this fulfillment line. + + Added in Saleor 3.23. + """ + reason: String + + """ + Reason Model (Page) reference for this fulfillment line. + + Added in Saleor 3.23. + """ + reasonReference: Page } """Represents order line of particular order.""" @@ -12430,6 +12463,215 @@ enum OrderDiscountType @doc(category: "Discounts") { ORDER_PROMOTION } +""" +A static page that can be manually added by a shop operator through the dashboard. +""" +type Page implements Node & ObjectWithMetadata & ObjectWithAttributes @doc(category: "Pages") { + """ID of the page.""" + id: ID! + + """List of private metadata items. Requires staff permissions to access.""" + privateMetadata: [MetadataItem!]! + + """ + A single key from private metadata. Requires staff permissions to access. + + Tip: Use GraphQL aliases to fetch multiple keys. + """ + privateMetafield(key: String!): String + + """ + Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. + """ + privateMetafields(keys: [String!]): Metadata + + """List of public metadata items. Can be accessed without permissions.""" + metadata: [MetadataItem!]! + + """ + A single key from public metadata. + + Tip: Use GraphQL aliases to fetch multiple keys. + """ + metafield(key: String!): String + + """ + Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. + """ + metafields(keys: [String!]): Metadata + + """ + Get a single attribute attached to page by attribute slug. + + Added in Saleor 3.22. + """ + assignedAttribute( + """Slug of the attribute""" + slug: String! + ): AssignedAttribute + + """ + List of attributes assigned to this page. + + Added in Saleor 3.22. + """ + assignedAttributes( + """Maximum number of attributes to return. Default is 100.""" + limit: PositiveInt = 100 + ): [AssignedAttribute!]! + + """Title of the page for SEO.""" + seoTitle: String + + """Description of the page for SEO.""" + seoDescription: String + + """Title of the page.""" + title: String! + + """ + Content of the page. + + Rich text format. For reference see https://editorjs.io/ + """ + content: JSONString + publicationDate: Date @deprecated(reason: "Use the `publishedAt` field to fetch the publication date.") + + """The page publication date.""" + publishedAt: DateTime + + """Determines if the page is published.""" + isPublished: Boolean! + + """Slug of the page.""" + slug: String! + + """Determines the type of page""" + pageType: PageType! + + """Date and time at which page was created.""" + created: DateTime! + + """ + Content of the page. + + Rich text format. For reference see https://editorjs.io/ + """ + contentJson: JSONString! @deprecated(reason: "Use the `content` field instead.") + + """Returns translated page fields for the given language code.""" + translation( + """A language code to return the translation for page.""" + languageCode: LanguageCodeEnum! + ): PageTranslation + + """Get a single attribute attached to page by attribute slug.""" + attribute( + """Slug of the attribute""" + slug: String! + ): SelectedAttribute @deprecated(reason: "Use `assignedAttribute` field instead.") + + """List of attributes assigned to this page.""" + attributes: [SelectedAttribute!]! @deprecated(reason: "Use `assignedAttributes` field instead.") +} + +"""Represents page translations.""" +type PageTranslation implements Node @doc(category: "Pages") { + """The ID of the page translation.""" + id: ID! + + """Translation language.""" + language: LanguageDisplay! + + """Translated SEO title.""" + seoTitle: String + + """Translated SEO description.""" + seoDescription: String + + """ + Translated page slug. + + Added in Saleor 3.21. + """ + slug: String + + """Translated page title.""" + title: String + + """ + Translated content of the page. + + Rich text format. For reference see https://editorjs.io/ + """ + content: JSONString + + """ + Translated description of the page. + + Rich text format. For reference see https://editorjs.io/ + """ + contentJson: JSONString @deprecated(reason: "Use the `content` field instead.") + + """Represents the page fields to translate.""" + translatableContent: PageTranslatableContent +} + +""" +Represents page's original translatable fields and related translations. +""" +type PageTranslatableContent implements Node @doc(category: "Pages") { + """The ID of the page translatable content.""" + id: ID! + + """The ID of the page to translate.""" + pageId: ID! + + """SEO title to translate.""" + seoTitle: String + + """SEO description to translate.""" + seoDescription: String + + """ + Slug to translate. + + Added in Saleor 3.21. + """ + slug: String + + """Page title to translate.""" + title: String! + + """ + Content of the page to translate. + + Rich text format. For reference see https://editorjs.io/ + """ + content: JSONString + + """ + Content of the page. + + Rich text format. For reference see https://editorjs.io/ + """ + contentJson: JSONString @deprecated(reason: "Use the `content` field instead.") + + """Returns translated page fields for the given language code.""" + translation( + """A language code to return the translation for page.""" + languageCode: LanguageCodeEnum! + ): PageTranslation + + """ + A static page that can be manually added by a shop operator through the dashboard. + """ + page: Page @deprecated(reason: "Get model fields from the root level queries.") + + """List of page content attribute values that can be translated.""" + attributeValues: [AttributeValueTranslatableContent!]! +} + enum OrderAction @doc(category: "Payments") { """Represents the capture action.""" CAPTURE @@ -13021,310 +13263,101 @@ enum OrderErrorCode @doc(category: "Orders") { NOT_EDITABLE FULFILL_ORDER_LINE GRAPHQL_ERROR - INVALID - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - NOT_FOUND - ORDER_NO_SHIPPING_ADDRESS - PAYMENT_ERROR - PAYMENT_MISSING - TRANSACTION_ERROR - REQUIRED - SHIPPING_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_REQUIRED - TAX_ERROR - UNIQUE - VOID_INACTIVE_PAYMENT - ZERO_QUANTITY - INVALID_QUANTITY - INSUFFICIENT_STOCK - DUPLICATED_INPUT_ITEM - NOT_AVAILABLE_IN_CHANNEL - CHANNEL_INACTIVE - INVALID_VOUCHER - INVALID_VOUCHER_CODE - NON_EDITABLE_GIFT_LINE - NON_REMOVABLE_GIFT_LINE - MISSING_ADDRESS_DATA -} - -enum AddressTypeEnum { - BILLING - SHIPPING -} - -"""The details of granted refund.""" -type OrderGrantedRefund @doc(category: "Orders") { - id: ID! - - """Time of creation.""" - createdAt: DateTime! - - """Time of last update.""" - updatedAt: DateTime! - - """Refund amount.""" - amount: Money! - - """ - Reason of the refund. - - Added in Saleor 3.22. - """ - reason: String - - """ - Reason Model (Page) reference for refund. - - Added in Saleor 3.22. - """ - reasonReference: Page - - """ - User who performed the action. Requires of of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER. - """ - user: User - - """App that performed the action.""" - app: App - - """ - If true, the refunded amount includes the shipping price.If false, the refunded amount does not include the shipping price. - """ - shippingCostsIncluded: Boolean! - - """Lines assigned to the granted refund.""" - lines: [OrderGrantedRefundLine!] - - """ - Status of the granted refund calculated based on transactionItem assigned to granted refund. - - Added in Saleor 3.20. - """ - status: OrderGrantedRefundStatusEnum! - - """ - List of refund events associated with the granted refund. - - Added in Saleor 3.20. - """ - transactionEvents: [TransactionEvent!] - - """ - The transaction assigned to the granted refund. - - Added in Saleor 3.20. - """ - transaction: TransactionItem -} - -""" -A static page that can be manually added by a shop operator through the dashboard. -""" -type Page implements Node & ObjectWithMetadata & ObjectWithAttributes @doc(category: "Pages") { - """ID of the page.""" - id: ID! - - """List of private metadata items. Requires staff permissions to access.""" - privateMetadata: [MetadataItem!]! - - """ - A single key from private metadata. Requires staff permissions to access. - - Tip: Use GraphQL aliases to fetch multiple keys. - """ - privateMetafield(key: String!): String - - """ - Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - """ - privateMetafields(keys: [String!]): Metadata - - """List of public metadata items. Can be accessed without permissions.""" - metadata: [MetadataItem!]! - - """ - A single key from public metadata. - - Tip: Use GraphQL aliases to fetch multiple keys. - """ - metafield(key: String!): String - - """ - Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - """ - metafields(keys: [String!]): Metadata - - """ - Get a single attribute attached to page by attribute slug. - - Added in Saleor 3.22. - """ - assignedAttribute( - """Slug of the attribute""" - slug: String! - ): AssignedAttribute - - """ - List of attributes assigned to this page. - - Added in Saleor 3.22. - """ - assignedAttributes( - """Maximum number of attributes to return. Default is 100.""" - limit: PositiveInt = 100 - ): [AssignedAttribute!]! - - """Title of the page for SEO.""" - seoTitle: String - - """Description of the page for SEO.""" - seoDescription: String - - """Title of the page.""" - title: String! - - """ - Content of the page. - - Rich text format. For reference see https://editorjs.io/ - """ - content: JSONString - publicationDate: Date @deprecated(reason: "Use the `publishedAt` field to fetch the publication date.") - - """The page publication date.""" - publishedAt: DateTime - - """Determines if the page is published.""" - isPublished: Boolean! - - """Slug of the page.""" - slug: String! - - """Determines the type of page""" - pageType: PageType! - - """Date and time at which page was created.""" - created: DateTime! - - """ - Content of the page. - - Rich text format. For reference see https://editorjs.io/ - """ - contentJson: JSONString! @deprecated(reason: "Use the `content` field instead.") - - """Returns translated page fields for the given language code.""" - translation( - """A language code to return the translation for page.""" - languageCode: LanguageCodeEnum! - ): PageTranslation - - """Get a single attribute attached to page by attribute slug.""" - attribute( - """Slug of the attribute""" - slug: String! - ): SelectedAttribute @deprecated(reason: "Use `assignedAttribute` field instead.") + INVALID + PRODUCT_NOT_PUBLISHED + PRODUCT_UNAVAILABLE_FOR_PURCHASE + NOT_FOUND + ORDER_NO_SHIPPING_ADDRESS + PAYMENT_ERROR + PAYMENT_MISSING + TRANSACTION_ERROR + REQUIRED + SHIPPING_METHOD_NOT_APPLICABLE + SHIPPING_METHOD_REQUIRED + TAX_ERROR + UNIQUE + VOID_INACTIVE_PAYMENT + ZERO_QUANTITY + INVALID_QUANTITY + INSUFFICIENT_STOCK + DUPLICATED_INPUT_ITEM + NOT_AVAILABLE_IN_CHANNEL + CHANNEL_INACTIVE + INVALID_VOUCHER + INVALID_VOUCHER_CODE + NON_EDITABLE_GIFT_LINE + NON_REMOVABLE_GIFT_LINE + MISSING_ADDRESS_DATA +} - """List of attributes assigned to this page.""" - attributes: [SelectedAttribute!]! @deprecated(reason: "Use `assignedAttributes` field instead.") +enum AddressTypeEnum { + BILLING + SHIPPING } -"""Represents page translations.""" -type PageTranslation implements Node @doc(category: "Pages") { - """The ID of the page translation.""" +"""The details of granted refund.""" +type OrderGrantedRefund @doc(category: "Orders") { id: ID! - """Translation language.""" - language: LanguageDisplay! + """Time of creation.""" + createdAt: DateTime! - """Translated SEO title.""" - seoTitle: String + """Time of last update.""" + updatedAt: DateTime! - """Translated SEO description.""" - seoDescription: String + """Refund amount.""" + amount: Money! """ - Translated page slug. + Reason of the refund. - Added in Saleor 3.21. + Added in Saleor 3.22. """ - slug: String - - """Translated page title.""" - title: String + reason: String """ - Translated content of the page. + Reason Model (Page) reference for refund. - Rich text format. For reference see https://editorjs.io/ + Added in Saleor 3.22. """ - content: JSONString + reasonReference: Page """ - Translated description of the page. - - Rich text format. For reference see https://editorjs.io/ + User who performed the action. Requires of of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER. """ - contentJson: JSONString @deprecated(reason: "Use the `content` field instead.") - - """Represents the page fields to translate.""" - translatableContent: PageTranslatableContent -} - -""" -Represents page's original translatable fields and related translations. -""" -type PageTranslatableContent implements Node @doc(category: "Pages") { - """The ID of the page translatable content.""" - id: ID! - - """The ID of the page to translate.""" - pageId: ID! - - """SEO title to translate.""" - seoTitle: String + user: User - """SEO description to translate.""" - seoDescription: String + """App that performed the action.""" + app: App """ - Slug to translate. - - Added in Saleor 3.21. + If true, the refunded amount includes the shipping price.If false, the refunded amount does not include the shipping price. """ - slug: String + shippingCostsIncluded: Boolean! - """Page title to translate.""" - title: String! + """Lines assigned to the granted refund.""" + lines: [OrderGrantedRefundLine!] """ - Content of the page to translate. + Status of the granted refund calculated based on transactionItem assigned to granted refund. - Rich text format. For reference see https://editorjs.io/ + Added in Saleor 3.20. """ - content: JSONString + status: OrderGrantedRefundStatusEnum! """ - Content of the page. + List of refund events associated with the granted refund. - Rich text format. For reference see https://editorjs.io/ + Added in Saleor 3.20. """ - contentJson: JSONString @deprecated(reason: "Use the `content` field instead.") - - """Returns translated page fields for the given language code.""" - translation( - """A language code to return the translation for page.""" - languageCode: LanguageCodeEnum! - ): PageTranslation + transactionEvents: [TransactionEvent!] """ - A static page that can be manually added by a shop operator through the dashboard. + The transaction assigned to the granted refund. + + Added in Saleor 3.20. """ - page: Page @deprecated(reason: "Get model fields from the root level queries.") - - """List of page content attribute values that can be translated.""" - attributeValues: [AttributeValueTranslatableContent!]! + transaction: TransactionItem } """Represents granted refund line.""" @@ -13339,6 +13372,13 @@ type OrderGrantedRefundLine { """Reason for refunding the line.""" reason: String + + """ + Reason Model (Page) reference for this refund line. + + Added in Saleor 3.23. + """ + reasonReference: Page } """ @@ -15283,6 +15323,20 @@ type RefundSettings @doc(category: "Orders") { reasonReferenceType: PageType } +""" +Return related settings from site settings. + +Added in Saleor 3.23. +""" +type ReturnSettings @doc(category: "Orders") { + """ + Model type used for return reasons. + + Added in Saleor 3.23. + """ + reasonReferenceType: PageType +} + input ShippingZoneFilterInput @doc(category: "Shipping") { search: String channels: [ID!] @@ -17807,6 +17861,27 @@ type Mutation { """ refundReasonReferenceClear: RefundReasonReferenceTypeClear @doc(category: "Orders") + """ + Update return settings across all channels. + + Added in Saleor 3.23. + + Requires one of the following permissions: MANAGE_SETTINGS. + """ + returnSettingsUpdate( + """Fields required to update return settings.""" + input: ReturnSettingsUpdateInput! + ): ReturnSettingsUpdate @doc(category: "Shop") + + """ + Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + + Added in Saleor 3.23. + + Requires one of the following permissions: MANAGE_SETTINGS. + """ + returnReasonReferenceClear: ReturnReasonReferenceTypeClear @doc(category: "Orders") + """ Calculates available delivery options for a checkout. @@ -23373,6 +23448,76 @@ type RefundReasonReferenceTypeClearError @doc(category: "Shop") { code: RefundSettingsErrorCode! } +""" +Update return settings across all channels. + +Added in Saleor 3.23. + +Requires one of the following permissions: MANAGE_SETTINGS. +""" +type ReturnSettingsUpdate @doc(category: "Shop") { + """Return settings.""" + returnSettings: ReturnSettings + returnSettingsErrors: [ReturnSettingsUpdateError!]! @deprecated(reason: "Use `errors` field instead.") + errors: [ReturnSettingsUpdateError!]! +} + +type ReturnSettingsUpdateError @doc(category: "Shop") { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """Failed to update Return Settings""" + code: ReturnSettingsErrorCode! +} + +enum ReturnSettingsErrorCode @doc(category: "Shop") { + INVALID + NOT_FOUND + REQUIRED + GRAPHQL_ERROR +} + +input ReturnSettingsUpdateInput @doc(category: "Shop") { + """ + The ID of a model type, that will be used to reference return reasons. All models of this type will be accepted as return reasons. + + Added in Saleor 3.23. + """ + returnReasonReferenceType: ID! +} + +""" +Updates ReturnSettings. The `Page` (Model) Type will be cleared from `reasonReferenceType`. When it's cleared, passing reason reference to return mutations is no longer accepted and will raise error. + +Added in Saleor 3.23. + +Requires one of the following permissions: MANAGE_SETTINGS. +""" +type ReturnReasonReferenceTypeClear @doc(category: "Orders") { + """Return settings.""" + returnSettings: ReturnSettings + returnSettingsErrors: [ReturnReasonReferenceTypeClearError!]! @deprecated(reason: "Use `errors` field instead.") + errors: [ReturnReasonReferenceTypeClearError!]! +} + +type ReturnReasonReferenceTypeClearError @doc(category: "Shop") { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """Failed to clear return reason reference type""" + code: ReturnSettingsErrorCode! +} + """ Calculates available delivery options for a checkout. @@ -27431,6 +27576,20 @@ input OrderReturnProductsInput @doc(category: "Orders") { """If true, Saleor will call refund action for all lines.""" refund: Boolean = false + + """ + Reason for returning this order. + + Added in Saleor 3.23. + """ + reason: String + + """ + ID of a `Page` (Model) to reference in reason for this return. + + Added in Saleor 3.23. + """ + reasonReference: ID } input OrderReturnLineInput @doc(category: "Orders") { @@ -27442,6 +27601,20 @@ input OrderReturnLineInput @doc(category: "Orders") { """Determines, if the line should be added to replace order.""" replace: Boolean = false + + """ + Reason for returning this line. + + Added in Saleor 3.23. + """ + reason: String + + """ + ID of a `Page` (Model) to reference in reason for this line. + + Added in Saleor 3.23. + """ + reasonReference: ID } input OrderReturnFulfillmentLineInput @doc(category: "Orders") { @@ -27453,6 +27626,20 @@ input OrderReturnFulfillmentLineInput @doc(category: "Orders") { """Determines, if the line should be added to replace order.""" replace: Boolean = false + + """ + Reason for returning this fulfillment line. + + Added in Saleor 3.23. + """ + reason: String + + """ + ID of a `Page` (Model) to reference in reason for this fulfillment line. + + Added in Saleor 3.23. + """ + reasonReference: ID } """ @@ -27488,6 +27675,7 @@ type OrderGrantRefundCreateError @doc(category: "Orders") { enum OrderGrantRefundCreateErrorCode @doc(category: "Orders") { GRAPHQL_ERROR NOT_FOUND + NOT_CONFIGURED SHIPPING_COSTS_ALREADY_GRANTED AMOUNT_GREATER_THAN_AVAILABLE REQUIRED @@ -27514,6 +27702,8 @@ enum OrderGrantRefundCreateLineErrorCode { GRAPHQL_ERROR NOT_FOUND QUANTITY_GREATER_THAN_AVAILABLE + INVALID + NOT_CONFIGURED } input OrderGrantRefundCreateInput @doc(category: "Orders") { @@ -27557,6 +27747,13 @@ input OrderGrantRefundCreateLineInput @doc(category: "Orders") { """Reason of the granted refund for the line.""" reason: String + + """ + ID of a `Page` (Model) to reference in reason for the line. + + Added in Saleor 3.23. + """ + reasonReference: ID } """ @@ -27595,6 +27792,7 @@ type OrderGrantRefundUpdateError @doc(category: "Orders") { enum OrderGrantRefundUpdateErrorCode @doc(category: "Orders") { GRAPHQL_ERROR NOT_FOUND + NOT_CONFIGURED REQUIRED INVALID AMOUNT_GREATER_THAN_AVAILABLE @@ -27621,6 +27819,8 @@ enum OrderGrantRefundUpdateLineErrorCode { GRAPHQL_ERROR NOT_FOUND QUANTITY_GREATER_THAN_AVAILABLE + INVALID + NOT_CONFIGURED } input OrderGrantRefundUpdateInput @doc(category: "Orders") { @@ -27667,6 +27867,13 @@ input OrderGrantRefundUpdateLineAddInput @doc(category: "Orders") { """Reason of the granted refund for the line.""" reason: String + + """ + ID of a `Page` (Model) to reference in reason for the line. + + Added in Saleor 3.23. + """ + reasonReference: ID } """