Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CC-28417: IG Missing BAPI Endpoints & Refactoring #1951

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -111,6 +117,9 @@ class GlueBackendApiApplicationAuthorizationConnectorConfig extends SprykerGlueB
'/push-notification-subscriptions' => [
'isRegularExpression' => false,
],
'/\/push-notification-providers.*/' => [
'isRegularExpression' => true,
],
];
}
}
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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**

Expand All @@ -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
{
Expand All @@ -352,6 +375,7 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA
{
return [
new PushNotificationSubscriptionsBackendResourcePlugin(),
new PushNotificationProvidersBackendResourcePlugin(),
];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
DmitryLymarenko marked this conversation as resolved.
Show resolved Hide resolved
| 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 |

Expand All @@ -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;

Expand All @@ -586,6 +588,7 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA
{
return [
new PickingListsBackendResourcePlugin(),
new PickingListStartPickingBackendResourcePlugin(),
new PickingListItemsBackendResourcePlugin()
];
}
Expand Down Expand Up @@ -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`.

Expand Down