Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add missing descriptions to app types (#13163)
Filip Owczarek1a0c82da07d7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5e62f4dc6f..14ea7d7231 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,10 +20,10 @@ All notable, unreleased changes to this project will be documented in this file.- Fix Error Cannot return null for non-nullable field Webhook.name. - #12989 by @cyborg7898- Remove unused `django-versatileimagefield` package - #13148 by @SzymJ- Remove unused `google-measurement-protocol` package - #13146 by @SzymJ+- Add missing descriptions to App module. - #13163 by @fowczarek- Drop TranslationProxy and replace `translated` model property with `get_translation` function where needed. - #13156 by @zedzior- Add missing descriptions to Account module. - #13155 by @fowczarek-# 3.14.0### Breaking changesdiff --git a/saleor/app/management/commands/create_app.py b/saleor/app/management/commands/create_app.pyindex ae3f2eee24..ff1759a485 100644--- a/saleor/app/management/commands/create_app.py+++ b/saleor/app/management/commands/create_app.py@@ -37,7 +37,7 @@ class Command(BaseCommand):parser.add_argument("--target-url",dest="target_url",- help="Url which will receive newly created data of app object. "+ help="URL which will receive newly created data of app object. ""Command doesn't return app data to stdout when this ""argument is provided.",)diff --git a/saleor/app/management/commands/install_app.py b/saleor/app/management/commands/install_app.pyindex 0400b5d4cc..a1229ac525 100644--- a/saleor/app/management/commands/install_app.py+++ b/saleor/app/management/commands/install_app.py@@ -16,7 +16,7 @@ class Command(BaseCommand):help = "Used to install new app."def add_arguments(self, parser: CommandParser) -> None:- parser.add_argument("manifest-url", help="Url with app manifest.", type=str)+ parser.add_argument("manifest-url", help="URL with app manifest.", type=str)parser.add_argument("--activate",action="store_true",diff --git a/saleor/graphql/app/mutations/app_fetch_manifest.py b/saleor/graphql/app/mutations/app_fetch_manifest.pyindex 617c72e74f..7298ee6b3b 100644--- a/saleor/graphql/app/mutations/app_fetch_manifest.py+++ b/saleor/graphql/app/mutations/app_fetch_manifest.py@@ -17,10 +17,12 @@ FETCH_BRAND_DATA_TIMEOUT = 5class AppFetchManifest(BaseMutation):- manifest = graphene.Field(Manifest)+ manifest = graphene.Field(Manifest, description="The validated manifest.")class Arguments:- manifest_url = graphene.String(required=True)+ manifest_url = graphene.String(+ required=True, description="URL to app's manifest in JSON format."+ )class Meta:description = "Fetch and validate manifest."diff --git a/saleor/graphql/app/mutations/app_install.py b/saleor/graphql/app/mutations/app_install.pyindex fc7b91ca03..b5c5b8e812 100644--- a/saleor/graphql/app/mutations/app_install.py+++ b/saleor/graphql/app/mutations/app_install.py@@ -16,7 +16,7 @@ from ..utils import ensure_can_manage_permissionsclass AppInstallInput(BaseInputObjectType):app_name = graphene.String(description="Name of the app to install.")- manifest_url = graphene.String(description="Url to app's manifest in JSON format.")+ manifest_url = graphene.String(description="URL to app's manifest in JSON format.")activate_after_installation = graphene.Boolean(default_value=True,required=False,diff --git a/saleor/graphql/app/types.py b/saleor/graphql/app/types.pyindex 55e84aa874..c3efe9dc19 100644--- a/saleor/graphql/app/types.py+++ b/saleor/graphql/app/types.py@@ -132,10 +132,14 @@ class AppManifestExtension(BaseObjectType):class AppExtension(AppManifestExtension, ModelObjectType[models.AppExtension]):- id = graphene.GlobalID(required=True)- app = graphene.Field("saleor.graphql.app.types.App", required=True)+ id = graphene.GlobalID(required=True, description="The ID of the app extension.")+ app = graphene.Field(+ "saleor.graphql.app.types.App",+ required=True,+ description="The app assigned to app extension.",+ )access_token = graphene.String(- description="JWT token used to authenticate by thridparty app extension."+ description="JWT token used to authenticate by third-party app extension.")class Meta:@@ -272,7 +276,7 @@ class AppManifestBrandLogo(BaseObjectType):_info: ResolveInfo,*,size: Optional[int] = None,- format: Optional[str] = None+ format: Optional[str] = None,):format = get_icon_thumbnail_format(format)# limit thumbnail max size as it is transferred@@ -377,25 +381,50 @@ class AppManifestBrand(BaseObjectType):class Manifest(BaseObjectType):- identifier = graphene.String(required=True)- version = graphene.String(required=True)- name = graphene.String(required=True)- about = graphene.String()- permissions = NonNullList(Permission)- app_url = graphene.String()+ identifier = graphene.String(+ required=True, description="The identifier of the manifest for the app."+ )+ version = graphene.String(+ required=True, description="The version of the manifest for the app."+ )+ name = graphene.String(+ required=True, description="The name of the manifest for the app ."+ )+ about = graphene.String(+ description="Description of the app displayed in the dashboard."+ )+ permissions = NonNullList(+ Permission, description="The array permissions required for the app."+ )+ app_url = graphene.String(description="App website rendered in the dashboard.")configuration_url = graphene.String(description="URL to iframe with the configuration for the app.",deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `appUrl` instead.",)- token_target_url = graphene.String()+ token_target_url = graphene.String(+ description=(+ "Endpoint used during process of app installation, [see installing an app.]"+ "(https://docs.saleor.io/docs/3.x/developer/extending/apps/installing-apps#installing-an-app)"+ )+ )data_privacy = graphene.String(description="Description of the data privacy defined for this app.",deprecation_reason=f"{DEPRECATED_IN_3X_FIELD} Use `dataPrivacyUrl` instead.",)- data_privacy_url = graphene.String()- homepage_url = graphene.String()- support_url = graphene.String()- extensions = NonNullList(AppManifestExtension, required=True)+ data_privacy_url = graphene.String(description="URL to the full privacy policy.")+ homepage_url = graphene.String(description="External URL to the app homepage.")+ support_url = graphene.String(+ description="External URL to the page where app users can find support."+ )+ extensions = NonNullList(+ AppManifestExtension,+ required=True,+ description=(+ "List of extensions that will be mounted in Saleor's dashboard. "+ "For details, please [see the extension section.]"+ "(https://docs.saleor.io/docs/3.x/developer/extending/apps/extending-dashboard-with-apps#key-concepts)"+ ),+ )webhooks = NonNullList(AppManifestWebhook,description="List of the app's webhooks." + ADDED_IN_35,@@ -435,7 +464,7 @@ class Manifest(BaseObjectType):class AppToken(BaseObjectType):- id = graphene.GlobalID(required=True)+ id = graphene.GlobalID(required=True, description="The ID of the app token.")name = graphene.String(description="Name of the authenticated token.")auth_token = graphene.String(description="Last 4 characters of the token.")@@ -459,7 +488,7 @@ class AppToken(BaseObjectType):@federated_entity("id")class App(ModelObjectType[models.App]):- id = graphene.GlobalID(required=True)+ id = graphene.GlobalID(required=True, description="The ID of the app.")permissions = NonNullList(Permission, description="List of the app's permissions.")created = graphene.DateTime(description="The date and time when the app was created."@@ -600,9 +629,14 @@ class AppCountableConnection(CountableConnection):class AppInstallation(ModelObjectType[models.AppInstallation]):- id = graphene.GlobalID(required=True)- app_name = graphene.String(required=True)- manifest_url = graphene.String(required=True)+ id = graphene.GlobalID(required=True, description="The ID of the app installation.")+ app_name = graphene.String(+ required=True, description="The name of the app installation."+ )+ manifest_url = graphene.String(+ required=True,+ description="The URL address of manifest for the app installation.",+ )brand = graphene.Field(AppBrand, description="App's brand data." + ADDED_IN_314 + PREVIEW_FEATURE)diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex b35fcc9485..0193993a45 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -2778,6 +2778,7 @@ enum WebhookEventTypeAsyncEnum @doc(category: "Webhooks") {"""Represents app data."""type App implements Node & ObjectWithMetadata @doc(category: "Apps") {+ """The ID of the app."""id: ID!"""List of private metadata items. Requires staff permissions to access."""@@ -3027,6 +3028,7 @@ enum AppTypeEnum @doc(category: "Apps") {"""Represents token data."""type AppToken implements Node @doc(category: "Apps") {+ """The ID of the app token."""id: ID!"""Name of the authenticated token."""@@ -3038,6 +3040,7 @@ type AppToken implements Node @doc(category: "Apps") {"""Represents app data."""type AppExtension implements Node @doc(category: "Apps") {+ """The ID of the app extension."""id: ID!"""List of the app extension's permissions."""@@ -3054,9 +3057,11 @@ type AppExtension implements Node @doc(category: "Apps") {"""Type of way how app extension will be opened."""target: AppExtensionTargetEnum!++ """The app assigned to app extension."""app: App!- """JWT token used to authenticate by thridparty app extension."""+ """JWT token used to authenticate by third-party app extension."""accessToken: String}@@ -13066,6 +13071,7 @@ enum AttributeSortField @doc(category: "Attributes") {"""Represents ongoing installation of app."""type AppInstallation implements Node & Job @doc(category: "Apps") {+ """The ID of the app installation."""id: ID!"""Job status."""@@ -13079,7 +13085,11 @@ type AppInstallation implements Node & Job @doc(category: "Apps") {"""Job message."""message: String++ """The name of the app installation."""appName: String!++ """The URL address of manifest for the app installation."""manifestUrl: String!"""@@ -16987,7 +16997,10 @@ type Mutation {Requires one of the following permissions: MANAGE_APPS."""- appFetchManifest(manifestUrl: String!): AppFetchManifest @doc(category: "Apps")+ appFetchManifest(+ """URL to app's manifest in JSON format."""+ manifestUrl: String!+ ): AppFetchManifest @doc(category: "Apps")"""Activate the app.@@ -26066,7 +26079,7 @@ input AppInstallInput @doc(category: "Apps") {"""Name of the app to install."""appName: String- """Url to app's manifest in JSON format."""+ """URL to app's manifest in JSON format."""manifestUrl: String"""Determine if app will be set active or not."""@@ -26104,6 +26117,7 @@ Fetch and validate manifest.Requires one of the following permissions: MANAGE_APPS."""type AppFetchManifest @doc(category: "Apps") {+ """The validated manifest."""manifest: ManifestappErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")errors: [AppError!]!@@ -26111,22 +26125,47 @@ type AppFetchManifest @doc(category: "Apps") {"""The manifest definition."""type Manifest @doc(category: "Apps") {+ """The identifier of the manifest for the app."""identifier: String!++ """The version of the manifest for the app."""version: String!++ """The name of the manifest for the app ."""name: String!++ """Description of the app displayed in the dashboard."""about: String++ """The array permissions required for the app."""permissions: [Permission!]++ """App website rendered in the dashboard."""appUrl: String"""URL to iframe with the configuration for the app."""configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.")++ """+ Endpoint used during process of app installation, [see installing an app.](https://docs.saleor.io/docs/3.x/developer/extending/apps/installing-apps#installing-an-app)+ """tokenTargetUrl: String"""Description of the data privacy defined for this app."""dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.")++ """URL to the full privacy policy."""dataPrivacyUrl: String++ """External URL to the app homepage."""homepageUrl: String++ """External URL to the page where app users can find support."""supportUrl: String++ """+ List of extensions that will be mounted in Saleor's dashboard. For details, please [see the extension section.](https://docs.saleor.io/docs/3.x/developer/extending/apps/extending-dashboard-with-apps#key-concepts)+ """extensions: [AppManifestExtension!]!"""