From cd23094b82bf63bd5fc5c2137082ab2ae729f636 Mon Sep 17 00:00:00 2001 From: Michael Knappe Date: Wed, 28 Jun 2023 18:01:33 +0200 Subject: [PATCH] CC-28417: IG Missing BAPI Endpoints & Refactoring --- .../install-the-push-notification-feature.md | 36 +++++++++++++++---- .../install-the-warehouse-picking-feature.md | 18 +++------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/_includes/pbc/all/install-features/202304.0/install-the-push-notification-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-push-notification-feature.md index a371ff52361..eaf17d8a837 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-push-notification-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-push-notification-feature.md @@ -84,12 +84,18 @@ Make sure that the following changes have been triggered in transfer objects: | PushNotificationConditions | class | created | src/Generated/Shared/Transfer/PushNotificationConditionsTransfer | | ApiPushNotificationSubscriptionsAttributes | class | created | src/Generated/Shared/Transfer/ApiPushNotificationSubscriptionsAttributesTransfer | | ApiPushNotificationGroupsAttributes | class | created | src/Generated/Shared/Transfer/ApiPushNotificationGroupsAttributesTransfer | +| GlueRequest | class | created | src/Generated/Shared/Transfer/GlueRequest | +| GlueResourceMethodCollection | class | created | src/Generated/Shared/Transfer/GlueResourceMethodCollection | +| Sort | class | created | src/Generated/Shared/Transfer/Sort | +| Pagination | class | created | src/Generated/Shared/Transfer/Pagination | +| ApiPushNotificationProvidersAttributes | class | created | src/Generated/Shared/Transfer/ApiPushNotificationProvidersAttributes | +| PushNotificationProviderCollectionDeleteCriteria | class | created | src/Generated/Shared/Transfer/ApiPushNotificationGroupsAttributesTransfer | {% endinfo_block %} ### 3) Set up configuration -1. To make the `push-notification-subscriptions` resource protected, adjust the protected paths configuration: +1. To make the `push-notification-subscriptions` and `push-notification-providers` resource protected, adjust the protected paths configuration: **src/Pyz/Shared/GlueBackendApiApplicationAuthorizationConnector/GlueBackendApiApplicationAuthorizationConnectorConfig.php** @@ -111,6 +117,9 @@ class GlueBackendApiApplicationAuthorizationConnectorConfig extends SprykerGlueB '/push-notification-subscriptions' => [ 'isRegularExpression' => false, ], + '/\/push-notification-providers.*/' => [ + 'isRegularExpression' => true, + ], ]; } } @@ -166,8 +175,8 @@ web-push generate-vapid-keys --json 1. Append glossary according to your configuration: ```csv -push_notification.validation.error.push_notification_provider_not_found,Push notification provider name is not found.,en_US -push_notification.validation.error.push_notification_provider_not_found,Der Anbietername der Push-Benachrichtigung wurde nicht gefundenn.,de_DE +push_notification.validation.error.push_notification_provider_not_found,The push notification provider was not found.,en_US +push_notification.validation.error.push_notification_provider_not_found,Der Push-Benachrichtigungsanbieters wurde nicht gefunden.,de_DE push_notification.validation.error.push_notification_not_found,Push notification not found.,en_US push_notification.validation.error.push_notification_not_found,Push-Nachricht nicht gefunden.,de_DE push_notification.validation.error.push_notification_provider_already_exists,Push notification provider already exists.,en_US @@ -180,6 +189,18 @@ push_notification_web_push_php.validation.error.invalid_payload_structure,Invali push_notification_web_push_php.validation.error.invalid_payload_structure,Ungültige Nutzlaststruktur.,de_DE push_notification_web_push_php.validation.error.payload_length_exceeded,The maximum payload length exceeded.,en_US push_notification_web_push_php.validation.error.payload_length_exceeded,Die maximale Länge der Nutzlast wurde überschritten.,de_DE +push_notification.validation.push_notification_provider_name_exists,A push notification provider with the same name already exists.,en_US +push_notification.validation.push_notification_provider_name_exists,Ein Push-Benachrichtigungsanbieter mit demselben Namen ist bereits vorhanden.,de_DE +push_notification.validation.push_notification_provider_name_wrong_length,A push notification provider name must have length from %min% to %max% characters.,en_US +push_notification.validation.push_notification_provider_name_wrong_length,Ein Push-Benachrichtigungsanbietername muss eine Länge von %min% bis %max% Zeichen haben.,de_DE +push_notification.validation.push_notification_provider_name_is_not_unique,A push notification provider with the same name already exists in request.,en_US +push_notification.validation.push_notification_provider_name_is_not_unique,Ein Push-Benachrichtigungsanbieter mit demselben Namen ist bereits in der Anfrage vorhanden.,de_DE +push_notification.validation.push_notification_exists,Unable to delete push notification provider while push notification exists.,en_US +push_notification.validation.push_notification_exists,Der Push-Benachrichtigungsanbieter kann nicht gelöscht werden solange Push-Benachrichtigungen vorhanden sind.,de_DE +push_notification.validation.push_notification_subscription_exists,Unable to delete push notification provider while push notification subscription exists.,en_US +push_notification.validation.push_notification_subscription_exists,Der Push-Benachrichtigungsanbieter kann nicht gelöscht werden solange Push-Benachrichtigungsabonnements vorhanden sind.,de_DE +push_notification.validation.wrong_request_body,Wrong request body.,en_US +push_notification.validation.wrong_request_body,Falscher Anforderungstext.,de_DE ``` 2. Import data: @@ -329,9 +350,10 @@ class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider 4. To enable the Backend API, register the plugin: -| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | -|--------------------------------------------|-----------------------------------------------------------|---------------|-----------------------------------------------------------------| -| PushNotificationSubscriptionResourcePlugin | Registers the `push-notification-subscriptions` resource. | | Spryker\Glue\PushNotificationsBackendApi\Plugin\GlueApplication | +| PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | +|----------------------------------------------------|------------------------------------------------------------|---------------|-----------------------------------------------------------------| +| PushNotificationSubscriptionsBackendResourcePlugin | Registers the `push-notification-subscriptions` resource. | | Spryker\Glue\PushNotificationsBackendApi\Plugin\GlueApplication | +| PushNotificationProvidersBackendResourcePlugin | Registers the `push-notification-providers` resource. | | Spryker\Glue\PushNotificationsBackendApi\Plugin\GlueApplication | **src/Pyz/Glue/GlueBackendApiApplication/GlueBackendApiApplicationDependencyProvider.php** @@ -342,6 +364,7 @@ namespace Pyz\Glue\GlueBackendApiApplication; use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider; use Spryker\Glue\PushNotificationsBackendApi\Plugin\GlueApplication\PushNotificationSubscriptionsBackendResourcePlugin; +use Spryker\Glue\PushNotificationsBackendApi\Plugin\GlueBackendApiApplication\PushNotificationProvidersBackendResourcePlugin; class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiApplicationDependencyProvider { @@ -352,6 +375,7 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA { return [ new PushNotificationSubscriptionsBackendResourcePlugin(), + new PushNotificationProvidersBackendResourcePlugin(), ]; } } diff --git a/_includes/pbc/all/install-features/202304.0/install-the-warehouse-picking-feature.md b/_includes/pbc/all/install-features/202304.0/install-the-warehouse-picking-feature.md index f632f46098a..0c8cf983bd1 100644 --- a/_includes/pbc/all/install-features/202304.0/install-the-warehouse-picking-feature.md +++ b/_includes/pbc/all/install-features/202304.0/install-the-warehouse-picking-feature.md @@ -563,6 +563,7 @@ class PickingListDependencyProvider extends SprykerPickingListDependencyProvider | PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE | |-----------------------------------------------------------------|--------------------------------------------------------------------------------------------|---------------|----------------------------------------------------------------------------------------------------| | PickingListsBackendResourcePlugin | Registers the `picking-lists` resource. | | Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication | +| PickingListStartPickingBackendResourcePlugin | Registers the `picking-lists` resources `start-picking` resource. | | Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication | | PickingListItemsBackendResourcePlugin | Registers the `picking-list-items` resource. | | Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication | | PickingListItemsByPickingListsBackendResourceRelationshipPlugin | Adds the `picking-list-items` resources as relationships to the `picking-lists` resources. | | Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplicationGlueJsonApiConventionConnector | @@ -574,6 +575,7 @@ class PickingListDependencyProvider extends SprykerPickingListDependencyProvider namespace Pyz\Glue\GlueBackendApiApplication; use Spryker\Glue\GlueBackendApiApplication\GlueBackendApiApplicationDependencyProvider as SprykerGlueBackendApiApplicationDependencyProvider; +use Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication\PickingListStartPickingBackendResourcePlugin; use Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication\PickingListsBackendResourcePlugin; use Spryker\Glue\PickingListsBackendApi\Plugin\GlueBackendApiApplication\PickingListItemsBackendResourcePlugin; @@ -586,6 +588,7 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA { return [ new PickingListsBackendResourcePlugin(), + new PickingListStartPickingBackendResourcePlugin(), new PickingListItemsBackendResourcePlugin() ]; } @@ -642,20 +645,7 @@ Make sure that you can send the following requests: * To get a single picking list for a warehouse user, send the request: `GET https://glue-backend.mysprykershop.com/picking-lists/{% raw %}{{{% endraw %}picking-list-uuid{% raw %}}{{% endraw %}`. -* To start a pick-up operation for a warehouse user, send the request: - -`PATCH https://glue-backend.mysprykershop.com/picking-lists/{% raw %}{{{% endraw %}picking-list-uuid{% raw %}}{{% endraw %}` - -```json -{ - "data": { - "type": "picking-lists", - "attributes": { - "action": "startPicking" - } - } -} -``` +* To start a pick-up operation for a warehouse user, send the request: `PATCH https://glue-backend.mysprykershop.com/picking-lists/{% raw %}{{{% endraw %}picking-list-uuid{% raw %}}{{% endraw %}/start-picking` * To get a collection of the picking list items for a particular picking list, send the request: `GET https://glue-backend.mysprykershop.com/picking-lists/{% raw %}{{{% endraw %}picking-list-uuid{% raw %}}{{% endraw %}/picking-list-items`.