[notification-hubs] Fix FCMV1 bugs (#29507)

### Packages impacted by this PR

- @azure/notification-hubs

### Issues associated with this PR

- #29465

### Describe the problem that is addressed by this PR

Fixes the right signatures for the FCM versus FCM Legacy.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
This commit is contained in:
Matthew Podwysocki 2024-04-29 18:27:07 -04:00 коммит произвёл GitHub
Родитель 3f3340d4af
Коммит e905eaf35a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 14 добавлений и 17 удалений

Просмотреть файл

@ -1,22 +1,17 @@
# Release History
## 1.2.2 (Unreleased)
### Features Added
### Breaking Changes
### Bugs Fixed
### Other Changes
## 1.2.1 (2024-04-25)
## 1.2.2 (2024-04-29)
### Bugs Fixed
- Fixed FirebaseV1 Notification to use the correct `data` and create the wrapper `message`.
- [#29404](https://github.com/Azure/azure-sdk-for-js/issues/29404)
- [#29371](https://github.com/Azure/azure-sdk-for-js/issues/29371)
## 1.2.1 (2024-04-25)
### Bugs Fixed
- Fixed Firebase query for `listRegistrationsByChannel` to use the correct `channel` query parameter.
- [#29372](https://github.com/Azure/azure-sdk-for-js/issues/29372)

Просмотреть файл

@ -381,10 +381,10 @@ export function createFcmV1RegistrationDescription(description: FcmV1Registratio
export function createFcmV1TemplateRegistrationDescription(description: FcmV1TemplateRegistrationDescriptionCommon): FcmV1TemplateRegistrationDescription;
// @public
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseLegacyNativeMessage): string;
// @public
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string;
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
// @public
export function createTagExpression(tags: string[]): string;

Просмотреть файл

@ -382,10 +382,10 @@ export function createFcmV1RegistrationDescription(description: FcmV1Registratio
export function createFcmV1TemplateRegistrationDescription(description: FcmV1TemplateRegistrationDescriptionCommon): FcmV1TemplateRegistrationDescription;
// @public
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseLegacyNativeMessage): string;
// @public
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string;
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
// @public
export function createTagExpression(tags: string[]): string;

Просмотреть файл

@ -427,7 +427,7 @@ export interface FirebaseLegacyWebNativePayload {
* @returns The JSON body to send to Notification Hubs.
*/
export function createFirebaseLegacyNotificationBody(
nativeMessage: FirebaseV1NativeMessageEnvelope,
nativeMessage: FirebaseLegacyNativeMessage,
): string {
return JSON.stringify(nativeMessage);
}
@ -874,7 +874,9 @@ export interface FirebaseV1FcmOptions {
* @param nativeMessage - The native message payload to send to Notification Hubs.
* @returns The JSON body to send to Notification Hubs.
*/
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string {
export function createFirebaseV1NotificationBody(
nativeMessage: FirebaseV1NativeMessageEnvelope,
): string {
return JSON.stringify(nativeMessage);
}