diff --git a/docs/Models/Components/ChannelSettingsProviderId.md b/docs/Models/Components/ChannelSettingsDtoProviderId.md similarity index 96% rename from docs/Models/Components/ChannelSettingsProviderId.md rename to docs/Models/Components/ChannelSettingsDtoProviderId.md index 65d1d74..8082e48 100644 --- a/docs/Models/Components/ChannelSettingsProviderId.md +++ b/docs/Models/Components/ChannelSettingsDtoProviderId.md @@ -1,4 +1,4 @@ -# ChannelSettingsProviderId +# ChannelSettingsDtoProviderId The provider identifier for the credentials diff --git a/docs/Models/Components/ChannelSettings.md b/docs/Models/Operations/SubscribersControllerPatchSubscriberRequest.md similarity index 55% rename from docs/Models/Components/ChannelSettings.md rename to docs/Models/Operations/SubscribersControllerPatchSubscriberRequest.md index f4f6b4d..bfd7d89 100644 --- a/docs/Models/Components/ChannelSettings.md +++ b/docs/Models/Operations/SubscribersControllerPatchSubscriberRequest.md @@ -1,11 +1,10 @@ -# ChannelSettings +# SubscribersControllerPatchSubscriberRequest ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `providerId` | [Components\ChannelSettingsProviderId](../../Models/Components/ChannelSettingsProviderId.md) | :heavy_check_mark: | The provider identifier for the credentials | -| `credentials` | [Components\ChannelCredentials](../../Models/Components/ChannelCredentials.md) | :heavy_check_mark: | Credentials payload for the specified provider | -| `integrationId` | *string* | :heavy_check_mark: | The unique identifier of the integration associated with this channel. | -| `integrationIdentifier` | *?string* | :heavy_minus_sign: | The integration identifier | \ No newline at end of file +| `subscriberId` | *string* | :heavy_check_mark: | N/A | +| `patchSubscriberRequestDto` | [Components\PatchSubscriberRequestDto](../../Models/Components/PatchSubscriberRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberResponse.md b/docs/Models/Operations/SubscribersControllerPatchSubscriberResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberResponse.md rename to docs/Models/Operations/SubscribersControllerPatchSubscriberResponse.md index a20deb4..bbe299e 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberResponse.md +++ b/docs/Models/Operations/SubscribersControllerPatchSubscriberResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberResponse +# SubscribersControllerPatchSubscriberResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.md b/docs/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.md rename to docs/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.md index 781fac8..4b0554e 100644 --- a/docs/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerBulkCreateSubscribersResponse +# SubscribersV1ControllerBulkCreateSubscribersResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerChatAccessOauthRequest.md b/docs/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.md similarity index 83% rename from docs/Models/Operations/SubscribersControllerChatAccessOauthRequest.md rename to docs/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.md index 7419ea4..115bfff 100644 --- a/docs/Models/Operations/SubscribersControllerChatAccessOauthRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerChatAccessOauthRequest +# SubscribersV1ControllerChatAccessOauthRequest ## Fields @@ -9,4 +9,5 @@ | `providerId` | *mixed* | :heavy_check_mark: | N/A | | `hmacHash` | *string* | :heavy_check_mark: | HMAC hash for the request | | `environmentId` | *string* | :heavy_check_mark: | The ID of the environment, must be a valid MongoDB ID | -| `integrationIdentifier` | *?string* | :heavy_minus_sign: | Optional integration identifier | \ No newline at end of file +| `integrationIdentifier` | *?string* | :heavy_minus_sign: | Optional integration identifier | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerChatAccessOauthResponse.md b/docs/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerChatAccessOauthResponse.md rename to docs/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.md index cf11e1c..25e5e91 100644 --- a/docs/Models/Operations/SubscribersControllerChatAccessOauthResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerChatAccessOauthResponse +# SubscribersV1ControllerChatAccessOauthResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerChatOauthCallbackRequest.md b/docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.md similarity index 84% rename from docs/Models/Operations/SubscribersControllerChatOauthCallbackRequest.md rename to docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.md index d317f60..f6f81c3 100644 --- a/docs/Models/Operations/SubscribersControllerChatOauthCallbackRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerChatOauthCallbackRequest +# SubscribersV1ControllerChatOauthCallbackRequest ## Fields @@ -10,4 +10,5 @@ | `hmacHash` | *string* | :heavy_check_mark: | HMAC hash for the request | | `environmentId` | *string* | :heavy_check_mark: | The ID of the environment, must be a valid MongoDB ID | | `code` | *string* | :heavy_check_mark: | Optional authorization code returned from the OAuth provider | -| `integrationIdentifier` | *?string* | :heavy_minus_sign: | Optional integration identifier | \ No newline at end of file +| `integrationIdentifier` | *?string* | :heavy_minus_sign: | Optional integration identifier | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerChatOauthCallbackResponse.md b/docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerChatOauthCallbackResponse.md rename to docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.md index f04c457..30da97b 100644 --- a/docs/Models/Operations/SubscribersControllerChatOauthCallbackResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerChatOauthCallbackResponse +# SubscribersV1ControllerChatOauthCallbackResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerCreateSubscriberResponse.md b/docs/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerCreateSubscriberResponse.md rename to docs/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.md index cd4d0ea..bbffe69 100644 --- a/docs/Models/Operations/SubscribersControllerCreateSubscriberResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerCreateSubscriberResponse +# SubscribersV1ControllerCreateSubscriberResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.md b/docs/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.md similarity index 97% rename from docs/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.md rename to docs/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.md index 9de1762..d856a12 100644 --- a/docs/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerDeleteSubscriberCredentialsResponse +# SubscribersV1ControllerDeleteSubscriberCredentialsResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.md b/docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.md similarity index 87% rename from docs/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.md rename to docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.md index 1c31931..e490360 100644 --- a/docs/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetNotificationsFeedRequest +# SubscribersV1ControllerGetNotificationsFeedRequest ## Fields @@ -10,4 +10,5 @@ | `limit` | *?float* | :heavy_minus_sign: | N/A | | | `read` | *?bool* | :heavy_minus_sign: | N/A | | | `seen` | *?bool* | :heavy_minus_sign: | N/A | | -| `payload` | *?string* | :heavy_minus_sign: | Base64 encoded string of the partial payload JSON object | btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30= | \ No newline at end of file +| `payload` | *?string* | :heavy_minus_sign: | Base64 encoded string of the partial payload JSON object | btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30= | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.md b/docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.md rename to docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.md index 588edb8..8f22156 100644 --- a/docs/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetNotificationsFeedResponse +# SubscribersV1ControllerGetNotificationsFeedResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.md b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.md similarity index 80% rename from docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.md rename to docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.md index 851b57d..5a75e36 100644 --- a/docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetSubscriberPreferenceByLevelRequest +# SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest ## Fields @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `preferenceLevel` | [Operations\Parameter](../../Models/Operations/Parameter.md) | :heavy_check_mark: | the preferences level to be retrieved (template / global) | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `includeInactiveChannels` | *?bool* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | \ No newline at end of file +| `includeInactiveChannels` | *?bool* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.md b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.md rename to docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.md index 5ba4b93..ae2269d 100644 --- a/docs/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetSubscriberPreferenceByLevelResponse +# SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.md b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.md rename to docs/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.md index e424632..64bfbb4 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberChannelResponse +# SubscribersV1ControllerGetSubscriberResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerGetUnseenCountRequest.md b/docs/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.md similarity index 79% rename from docs/Models/Operations/SubscribersControllerGetUnseenCountRequest.md rename to docs/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.md index 760d8c0..01c0b0e 100644 --- a/docs/Models/Operations/SubscribersControllerGetUnseenCountRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetUnseenCountRequest +# SubscribersV1ControllerGetUnseenCountRequest ## Fields @@ -7,4 +7,5 @@ | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | | `seen` | *?bool* | :heavy_minus_sign: | Indicates whether to count seen notifications. | -| `limit` | *?float* | :heavy_minus_sign: | The maximum number of notifications to return. | \ No newline at end of file +| `limit` | *?float* | :heavy_minus_sign: | The maximum number of notifications to return. | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerGetUnseenCountResponse.md b/docs/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerGetUnseenCountResponse.md rename to docs/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.md index 0417476..c51dde3 100644 --- a/docs/Models/Operations/SubscribersControllerGetUnseenCountResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerGetUnseenCountResponse +# SubscribersV1ControllerGetUnseenCountResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.md b/docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.md similarity index 76% rename from docs/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.md rename to docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.md index 0ad20f3..ebf3975 100644 --- a/docs/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerListSubscriberPreferencesRequest +# SubscribersV1ControllerListSubscriberPreferencesRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `includeInactiveChannels` | *?bool* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | \ No newline at end of file +| `includeInactiveChannels` | *?bool* | :heavy_minus_sign: | A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.md b/docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.md rename to docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.md index be627e9..617bb2d 100644 --- a/docs/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerListSubscriberPreferencesResponse +# SubscribersV1ControllerListSubscriberPreferencesResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerListSubscribersResponseBody.md b/docs/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.md similarity index 97% rename from docs/Models/Operations/SubscribersControllerListSubscribersResponseBody.md rename to docs/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.md index e359341..e6f8dec 100644 --- a/docs/Models/Operations/SubscribersControllerListSubscribersResponseBody.md +++ b/docs/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.md @@ -1,4 +1,4 @@ -# SubscribersControllerListSubscribersResponseBody +# SubscribersV1ControllerListSubscribersResponseBody ## Fields diff --git a/docs/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.md b/docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.md similarity index 84% rename from docs/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.md rename to docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.md index 9ce0d8a..4368643 100644 --- a/docs/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkActionAsSeenRequest +# SubscribersV1ControllerMarkActionAsSeenRequest ## Fields @@ -8,4 +8,5 @@ | `messageId` | *string* | :heavy_check_mark: | N/A | | `type` | *mixed* | :heavy_check_mark: | N/A | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `markMessageActionAsSeenDto` | [Components\MarkMessageActionAsSeenDto](../../Models/Components/MarkMessageActionAsSeenDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `markMessageActionAsSeenDto` | [Components\MarkMessageActionAsSeenDto](../../Models/Components/MarkMessageActionAsSeenDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.md b/docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.md rename to docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.md index 02170b8..0d00ee3 100644 --- a/docs/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkActionAsSeenResponse +# SubscribersV1ControllerMarkActionAsSeenResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.md b/docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.md rename to docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.md index 220e83e..01458c8 100644 --- a/docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkAllUnreadAsReadRequest +# SubscribersV1ControllerMarkAllUnreadAsReadRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `markAllMessageAsRequestDto` | [Components\MarkAllMessageAsRequestDto](../../Models/Components/MarkAllMessageAsRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `markAllMessageAsRequestDto` | [Components\MarkAllMessageAsRequestDto](../../Models/Components/MarkAllMessageAsRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.md b/docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.md rename to docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.md index f306556..bacf933 100644 --- a/docs/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkAllUnreadAsReadResponse +# SubscribersV1ControllerMarkAllUnreadAsReadResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerMarkMessagesAsRequest.md b/docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerMarkMessagesAsRequest.md rename to docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.md index 2fab97b..05e4410 100644 --- a/docs/Models/Operations/SubscribersControllerMarkMessagesAsRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkMessagesAsRequest +# SubscribersV1ControllerMarkMessagesAsRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `messageMarkAsRequestDto` | [Components\MessageMarkAsRequestDto](../../Models/Components/MessageMarkAsRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `messageMarkAsRequestDto` | [Components\MessageMarkAsRequestDto](../../Models/Components/MessageMarkAsRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerMarkMessagesAsResponse.md b/docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerMarkMessagesAsResponse.md rename to docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.md index b3e198e..51ea38e 100644 --- a/docs/Models/Operations/SubscribersControllerMarkMessagesAsResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerMarkMessagesAsResponse +# SubscribersV1ControllerMarkMessagesAsResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.md b/docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.md rename to docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.md index 6adcf83..1f81df8 100644 --- a/docs/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerModifySubscriberChannelRequest +# SubscribersV1ControllerModifySubscriberChannelRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberChannelRequestDto` | [Components\UpdateSubscriberChannelRequestDto](../../Models/Components/UpdateSubscriberChannelRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberChannelRequestDto` | [Components\UpdateSubscriberChannelRequestDto](../../Models/Components/UpdateSubscriberChannelRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.md b/docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.md rename to docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.md index 1442b43..6784b35 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberOnlineFlagResponse +# SubscribersV1ControllerModifySubscriberChannelResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.md index 1515b1d..5201911 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberChannelRequest +# SubscribersV1ControllerUpdateSubscriberChannelRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberChannelRequestDto` | [Components\UpdateSubscriberChannelRequestDto](../../Models/Components/UpdateSubscriberChannelRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberChannelRequestDto` | [Components\UpdateSubscriberChannelRequestDto](../../Models/Components/UpdateSubscriberChannelRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.md index 2ddd8d9..9cf2837 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberGlobalPreferencesRequest +# SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberGlobalPreferencesRequestDto` | [Components\UpdateSubscriberGlobalPreferencesRequestDto](../../Models/Components/UpdateSubscriberGlobalPreferencesRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberGlobalPreferencesRequestDto` | [Components\UpdateSubscriberGlobalPreferencesRequestDto](../../Models/Components/UpdateSubscriberGlobalPreferencesRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.md index 307dbb0..009798b 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberGlobalPreferencesResponse +# SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.md index 8ee6f27..5ce52f0 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberOnlineFlagRequest +# SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberOnlineFlagRequestDto` | [Components\UpdateSubscriberOnlineFlagRequestDto](../../Models/Components/UpdateSubscriberOnlineFlagRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberOnlineFlagRequestDto` | [Components\UpdateSubscriberOnlineFlagRequestDto](../../Models/Components/UpdateSubscriberOnlineFlagRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.md similarity index 81% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.md index 4291600..37e1fa4 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberPreferenceRequest +# SubscribersV1ControllerUpdateSubscriberPreferenceRequest ## Fields @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `subscriberId` | *string* | :heavy_check_mark: | N/A | | `workflowId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberPreferenceRequestDto` | [Components\UpdateSubscriberPreferenceRequestDto](../../Models/Components/UpdateSubscriberPreferenceRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberPreferenceRequestDto` | [Components\UpdateSubscriberPreferenceRequestDto](../../Models/Components/UpdateSubscriberPreferenceRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.md index 864326b..e705edc 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberPreferenceResponse +# SubscribersV1ControllerUpdateSubscriberPreferenceResponse ## Fields diff --git a/docs/Models/Operations/SubscribersControllerUpdateSubscriberRequest.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.md similarity index 78% rename from docs/Models/Operations/SubscribersControllerUpdateSubscriberRequest.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.md index 6dbf62c..a3a7b62 100644 --- a/docs/Models/Operations/SubscribersControllerUpdateSubscriberRequest.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.md @@ -1,4 +1,4 @@ -# SubscribersControllerUpdateSubscriberRequest +# SubscribersV1ControllerUpdateSubscriberRequest ## Fields @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `subscriberId` | *string* | :heavy_check_mark: | N/A | -| `updateSubscriberRequestDto` | [Components\UpdateSubscriberRequestDto](../../Models/Components/UpdateSubscriberRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `updateSubscriberRequestDto` | [Components\UpdateSubscriberRequestDto](../../Models/Components/UpdateSubscriberRequestDto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *?string* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.md b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.md similarity index 98% rename from docs/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.md rename to docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.md index 776dbb9..eec1c6e 100644 --- a/docs/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.md +++ b/docs/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.md @@ -1,4 +1,4 @@ -# SubscribersControllerModifySubscriberChannelResponse +# SubscribersV1ControllerUpdateSubscriberResponse ## Fields diff --git a/src/Models/Components/ChannelSettings.php b/src/Models/Components/ChannelSettingsDto.php similarity index 79% rename from src/Models/Components/ChannelSettings.php rename to src/Models/Components/ChannelSettingsDto.php index f4fe78b..1072144 100644 --- a/src/Models/Components/ChannelSettings.php +++ b/src/Models/Components/ChannelSettingsDto.php @@ -9,16 +9,16 @@ namespace novu\Models\Components; -class ChannelSettings +class ChannelSettingsDto { /** * The provider identifier for the credentials * - * @var ChannelSettingsProviderId $providerId + * @var ChannelSettingsDtoProviderId $providerId */ #[\Speakeasy\Serializer\Annotation\SerializedName('providerId')] - #[\Speakeasy\Serializer\Annotation\Type('\novu\Models\Components\ChannelSettingsProviderId')] - public ChannelSettingsProviderId $providerId; + #[\Speakeasy\Serializer\Annotation\Type('\novu\Models\Components\ChannelSettingsDtoProviderId')] + public ChannelSettingsDtoProviderId $providerId; /** * Credentials payload for the specified provider @@ -47,12 +47,12 @@ class ChannelSettings public ?string $integrationIdentifier = null; /** - * @param ChannelSettingsProviderId $providerId + * @param ChannelSettingsDtoProviderId $providerId * @param ChannelCredentials $credentials * @param string $integrationId * @param ?string $integrationIdentifier */ - public function __construct(ChannelSettingsProviderId $providerId, ChannelCredentials $credentials, string $integrationId, ?string $integrationIdentifier = null) + public function __construct(ChannelSettingsDtoProviderId $providerId, ChannelCredentials $credentials, string $integrationId, ?string $integrationIdentifier = null) { $this->providerId = $providerId; $this->credentials = $credentials; diff --git a/src/Models/Components/ChannelSettingsProviderId.php b/src/Models/Components/ChannelSettingsDtoProviderId.php similarity index 94% rename from src/Models/Components/ChannelSettingsProviderId.php rename to src/Models/Components/ChannelSettingsDtoProviderId.php index 1c0b1d7..3f737d3 100644 --- a/src/Models/Components/ChannelSettingsProviderId.php +++ b/src/Models/Components/ChannelSettingsDtoProviderId.php @@ -10,7 +10,7 @@ /** The provider identifier for the credentials */ -enum ChannelSettingsProviderId: string +enum ChannelSettingsDtoProviderId: string { case Slack = 'slack'; case Discord = 'discord'; diff --git a/src/Models/Components/Customer.php b/src/Models/Components/PatchSubscriberRequestDtoData.php similarity index 62% rename from src/Models/Components/Customer.php rename to src/Models/Components/PatchSubscriberRequestDtoData.php index aa1e199..3aeffa4 100644 --- a/src/Models/Components/Customer.php +++ b/src/Models/Components/PatchSubscriberRequestDtoData.php @@ -9,7 +9,8 @@ namespace novu\Models\Components; -class Customer +/** PatchSubscriberRequestDtoData - Additional custom data for the subscriber */ +class PatchSubscriberRequestDtoData { public function __construct() diff --git a/src/Models/Operations/SupportControllerFetchUserOrganizationsResponseBody.php b/src/Models/Operations/OrderDirection.php similarity index 58% rename from src/Models/Operations/SupportControllerFetchUserOrganizationsResponseBody.php rename to src/Models/Operations/OrderDirection.php index d1c0a44..26b7e66 100644 --- a/src/Models/Operations/SupportControllerFetchUserOrganizationsResponseBody.php +++ b/src/Models/Operations/OrderDirection.php @@ -9,10 +9,9 @@ namespace novu\Models\Operations; -class SupportControllerFetchUserOrganizationsResponseBody -{ - public function __construct() - { - } -} \ No newline at end of file +enum OrderDirection: string +{ + case Asc = 'ASC'; + case Desc = 'DESC'; +} diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberResponse.php b/src/Models/Operations/SubscribersControllerPatchSubscriberResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberResponse.php rename to src/Models/Operations/SubscribersControllerPatchSubscriberResponse.php index 5d7fd30..9c5198a 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberResponse.php +++ b/src/Models/Operations/SubscribersControllerPatchSubscriberResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerUpdateSubscriberResponse +class SubscribersControllerPatchSubscriberResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.php b/src/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.php rename to src/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.php index 5d6e35f..d5a2282 100644 --- a/src/Models/Operations/SubscribersControllerBulkCreateSubscribersResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerBulkCreateSubscribersResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerBulkCreateSubscribersResponse +class SubscribersV1ControllerBulkCreateSubscribersResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerChatAccessOauthRequest.php b/src/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.php similarity index 80% rename from src/Models/Operations/SubscribersControllerChatAccessOauthRequest.php rename to src/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.php index 459120b..5d514d5 100644 --- a/src/Models/Operations/SubscribersControllerChatAccessOauthRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerChatAccessOauthRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerChatAccessOauthRequest +class SubscribersV1ControllerChatAccessOauthRequest { /** * @@ -49,19 +49,29 @@ class SubscribersControllerChatAccessOauthRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=integrationIdentifier')] public ?string $integrationIdentifier = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param mixed $providerId * @param string $hmacHash * @param string $environmentId * @param ?string $integrationIdentifier + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, mixed $providerId, string $hmacHash, string $environmentId, ?string $integrationIdentifier = null) + public function __construct(string $subscriberId, mixed $providerId, string $hmacHash, string $environmentId, ?string $integrationIdentifier = null, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->providerId = $providerId; $this->hmacHash = $hmacHash; $this->environmentId = $environmentId; $this->integrationIdentifier = $integrationIdentifier; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerChatAccessOauthResponse.php b/src/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.php similarity index 95% rename from src/Models/Operations/SubscribersControllerChatAccessOauthResponse.php rename to src/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.php index 5dee119..7f86b11 100644 --- a/src/Models/Operations/SubscribersControllerChatAccessOauthResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerChatAccessOauthResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; -class SubscribersControllerChatAccessOauthResponse +class SubscribersV1ControllerChatAccessOauthResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerChatOauthCallbackRequest.php b/src/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.php similarity index 82% rename from src/Models/Operations/SubscribersControllerChatOauthCallbackRequest.php rename to src/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.php index e0b8d92..ee02a3c 100644 --- a/src/Models/Operations/SubscribersControllerChatOauthCallbackRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerChatOauthCallbackRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerChatOauthCallbackRequest +class SubscribersV1ControllerChatOauthCallbackRequest { /** * @@ -57,6 +57,14 @@ class SubscribersControllerChatOauthCallbackRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=integrationIdentifier')] public ?string $integrationIdentifier = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param mixed $providerId @@ -64,8 +72,9 @@ class SubscribersControllerChatOauthCallbackRequest * @param string $environmentId * @param string $code * @param ?string $integrationIdentifier + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, mixed $providerId, string $hmacHash, string $environmentId, string $code, ?string $integrationIdentifier = null) + public function __construct(string $subscriberId, mixed $providerId, string $hmacHash, string $environmentId, string $code, ?string $integrationIdentifier = null, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->providerId = $providerId; @@ -73,5 +82,6 @@ public function __construct(string $subscriberId, mixed $providerId, string $hma $this->environmentId = $environmentId; $this->code = $code; $this->integrationIdentifier = $integrationIdentifier; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerChatOauthCallbackResponse.php b/src/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerChatOauthCallbackResponse.php rename to src/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.php index 8e4aa04..220db62 100644 --- a/src/Models/Operations/SubscribersControllerChatOauthCallbackResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerChatOauthCallbackResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; -class SubscribersControllerChatOauthCallbackResponse +class SubscribersV1ControllerChatOauthCallbackResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerCreateSubscriberResponse.php b/src/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerCreateSubscriberResponse.php rename to src/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.php index 101bdeb..b5a6a88 100644 --- a/src/Models/Operations/SubscribersControllerCreateSubscriberResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerCreateSubscriberResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerCreateSubscriberResponse +class SubscribersV1ControllerCreateSubscriberResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsRequest.php b/src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsRequest.php similarity index 64% rename from src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsRequest.php rename to src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsRequest.php index 949664e..7b362bc 100644 --- a/src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerDeleteSubscriberCredentialsRequest +class SubscribersV1ControllerDeleteSubscriberCredentialsRequest { /** * @@ -25,13 +25,23 @@ class SubscribersControllerDeleteSubscriberCredentialsRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=providerId')] public string $providerId; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param string $providerId + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, string $providerId) + public function __construct(string $subscriberId, string $providerId, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->providerId = $providerId; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.php b/src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.php similarity index 95% rename from src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.php rename to src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.php index c23c820..c6b8b2f 100644 --- a/src/Models/Operations/SubscribersControllerDeleteSubscriberCredentialsResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerDeleteSubscriberCredentialsResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; -class SubscribersControllerDeleteSubscriberCredentialsResponse +class SubscribersV1ControllerDeleteSubscriberCredentialsResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.php b/src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.php similarity index 79% rename from src/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.php rename to src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.php index d62ea94..f14d70f 100644 --- a/src/Models/Operations/SubscribersControllerGetNotificationsFeedRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerGetNotificationsFeedRequest +class SubscribersV1ControllerGetNotificationsFeedRequest { /** * @@ -47,6 +47,14 @@ class SubscribersControllerGetNotificationsFeedRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=payload')] public ?string $payload = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * * @var ?float $limit @@ -61,14 +69,16 @@ class SubscribersControllerGetNotificationsFeedRequest * @param ?bool $read * @param ?bool $seen * @param ?string $payload + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, ?float $page = null, ?bool $read = null, ?bool $seen = null, ?string $payload = null, ?float $limit = 10) + public function __construct(string $subscriberId, ?float $page = null, ?bool $read = null, ?bool $seen = null, ?string $payload = null, ?string $idempotencyKey = null, ?float $limit = 10) { $this->subscriberId = $subscriberId; $this->page = $page; $this->read = $read; $this->seen = $seen; $this->payload = $payload; + $this->idempotencyKey = $idempotencyKey; $this->limit = $limit; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.php b/src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.php rename to src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.php index 04f4ee0..e3f74c2 100644 --- a/src/Models/Operations/SubscribersControllerGetNotificationsFeedResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerGetNotificationsFeedResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerGetNotificationsFeedResponse +class SubscribersV1ControllerGetNotificationsFeedResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.php b/src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.php similarity index 73% rename from src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.php rename to src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.php index dd964af..1c3809f 100644 --- a/src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerGetSubscriberPreferenceByLevelRequest +class SubscribersV1ControllerGetSubscriberPreferenceByLevelRequest { /** * the preferences level to be retrieved (template / global) @@ -34,15 +34,25 @@ class SubscribersControllerGetSubscriberPreferenceByLevelRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=includeInactiveChannels')] public ?bool $includeInactiveChannels = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param Parameter $preferenceLevel * @param string $subscriberId * @param ?bool $includeInactiveChannels + * @param ?string $idempotencyKey */ - public function __construct(Parameter $preferenceLevel, string $subscriberId, ?bool $includeInactiveChannels = null) + public function __construct(Parameter $preferenceLevel, string $subscriberId, ?bool $includeInactiveChannels = null, ?string $idempotencyKey = null) { $this->preferenceLevel = $preferenceLevel; $this->subscriberId = $subscriberId; $this->includeInactiveChannels = $includeInactiveChannels; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.php b/src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.php rename to src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.php index 4b08a28..1d13f46 100644 --- a/src/Models/Operations/SubscribersControllerGetSubscriberPreferenceByLevelResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerGetSubscriberPreferenceByLevelResponse +class SubscribersV1ControllerGetSubscriberPreferenceByLevelResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.php b/src/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.php rename to src/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.php index 7e714de..aaf48c8 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberChannelResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerGetSubscriberResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerUpdateSubscriberChannelResponse +class SubscribersV1ControllerGetSubscriberResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerGetUnseenCountRequest.php b/src/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.php similarity index 66% rename from src/Models/Operations/SubscribersControllerGetUnseenCountRequest.php rename to src/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.php index d5efc56..a4f9372 100644 --- a/src/Models/Operations/SubscribersControllerGetUnseenCountRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerGetUnseenCountRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerGetUnseenCountRequest +class SubscribersV1ControllerGetUnseenCountRequest { /** * @@ -18,6 +18,14 @@ class SubscribersControllerGetUnseenCountRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=subscriberId')] public string $subscriberId; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * Indicates whether to count seen notifications. * @@ -38,10 +46,12 @@ class SubscribersControllerGetUnseenCountRequest * @param string $subscriberId * @param ?bool $seen * @param ?float $limit + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, ?bool $seen = false, ?float $limit = 100) + public function __construct(string $subscriberId, ?string $idempotencyKey = null, ?bool $seen = false, ?float $limit = 100) { $this->subscriberId = $subscriberId; + $this->idempotencyKey = $idempotencyKey; $this->seen = $seen; $this->limit = $limit; } diff --git a/src/Models/Operations/SubscribersControllerGetUnseenCountResponse.php b/src/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerGetUnseenCountResponse.php rename to src/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.php index a4f0cbd..118c88f 100644 --- a/src/Models/Operations/SubscribersControllerGetUnseenCountResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerGetUnseenCountResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerGetUnseenCountResponse +class SubscribersV1ControllerGetUnseenCountResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.php b/src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.php similarity index 69% rename from src/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.php rename to src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.php index fb23c81..be2044b 100644 --- a/src/Models/Operations/SubscribersControllerListSubscriberPreferencesRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerListSubscriberPreferencesRequest +class SubscribersV1ControllerListSubscriberPreferencesRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerListSubscriberPreferencesRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=includeInactiveChannels')] public ?bool $includeInactiveChannels = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param ?bool $includeInactiveChannels + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, ?bool $includeInactiveChannels = null) + public function __construct(string $subscriberId, ?bool $includeInactiveChannels = null, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->includeInactiveChannels = $includeInactiveChannels; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.php b/src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.php rename to src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.php index c8dfa08..994170f 100644 --- a/src/Models/Operations/SubscribersControllerListSubscriberPreferencesResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerListSubscriberPreferencesResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerListSubscriberPreferencesResponse +class SubscribersV1ControllerListSubscriberPreferencesResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerListSubscribersRequest.php b/src/Models/Operations/SubscribersV1ControllerListSubscribersRequest.php similarity index 57% rename from src/Models/Operations/SubscribersControllerListSubscribersRequest.php rename to src/Models/Operations/SubscribersV1ControllerListSubscribersRequest.php index e15df23..6ca7cee 100644 --- a/src/Models/Operations/SubscribersControllerListSubscribersRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerListSubscribersRequest.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerListSubscribersRequest +class SubscribersV1ControllerListSubscribersRequest { /** * @@ -18,6 +18,14 @@ class SubscribersControllerListSubscribersRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=page')] public ?float $page = null; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * * @var ?float $limit @@ -28,10 +36,12 @@ class SubscribersControllerListSubscribersRequest /** * @param ?float $page * @param ?float $limit + * @param ?string $idempotencyKey */ - public function __construct(?float $page = null, ?float $limit = 10) + public function __construct(?float $page = null, ?string $idempotencyKey = null, ?float $limit = 10) { $this->page = $page; + $this->idempotencyKey = $idempotencyKey; $this->limit = $limit; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerListSubscribersResponse.php b/src/Models/Operations/SubscribersV1ControllerListSubscribersResponse.php similarity index 72% rename from src/Models/Operations/SubscribersControllerListSubscribersResponse.php rename to src/Models/Operations/SubscribersV1ControllerListSubscribersResponse.php index 311bd34..d173358 100644 --- a/src/Models/Operations/SubscribersControllerListSubscribersResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerListSubscribersResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; -class SubscribersControllerListSubscribersResponse +class SubscribersV1ControllerListSubscribersResponse { /** * HTTP response content type for this operation @@ -41,12 +41,12 @@ class SubscribersControllerListSubscribersResponse /** * - * @var ?SubscribersControllerListSubscribersResponseBody $object + * @var ?SubscribersV1ControllerListSubscribersResponseBody $object */ - public ?SubscribersControllerListSubscribersResponseBody $object = null; + public ?SubscribersV1ControllerListSubscribersResponseBody $object = null; /** - * @var \Closure(string): ?SubscribersControllerListSubscribersResponse $next + * @var \Closure(string): ?SubscribersV1ControllerListSubscribersResponse $next */ public \Closure $next; /** @@ -54,9 +54,9 @@ class SubscribersControllerListSubscribersResponse * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse * @param array> $headers - * @param ?SubscribersControllerListSubscribersResponseBody $object + * @param ?SubscribersV1ControllerListSubscribersResponseBody $object */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?SubscribersControllerListSubscribersResponseBody $object = null, ?array $headers = []) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?SubscribersV1ControllerListSubscribersResponseBody $object = null, ?array $headers = []) { $this->contentType = $contentType; $this->statusCode = $statusCode; @@ -67,9 +67,9 @@ public function __construct(string $contentType, int $statusCode, \Psr\Http\Mess /** * @param string $name * @param array $args - * @return ?SubscribersControllerListSubscribersResponse + * @return ?SubscribersV1ControllerListSubscribersResponse */ - public function __call($name, $args): ?SubscribersControllerListSubscribersResponse + public function __call($name, $args): ?SubscribersV1ControllerListSubscribersResponse { if ($name === 'next') { return call_user_func_array($this->next, $args); diff --git a/src/Models/Operations/SubscribersControllerListSubscribersResponseBody.php b/src/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.php similarity index 96% rename from src/Models/Operations/SubscribersControllerListSubscribersResponseBody.php rename to src/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.php index 2c7db30..879b08e 100644 --- a/src/Models/Operations/SubscribersControllerListSubscribersResponseBody.php +++ b/src/Models/Operations/SubscribersV1ControllerListSubscribersResponseBody.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerListSubscribersResponseBody +class SubscribersV1ControllerListSubscribersResponseBody { /** * The current page of the paginated response diff --git a/src/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.php b/src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.php similarity index 77% rename from src/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.php rename to src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.php index c587630..9b0d40a 100644 --- a/src/Models/Operations/SubscribersControllerMarkActionAsSeenRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerMarkActionAsSeenRequest +class SubscribersV1ControllerMarkActionAsSeenRequest { /** * @@ -40,17 +40,27 @@ class SubscribersControllerMarkActionAsSeenRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\MarkMessageActionAsSeenDto $markMessageActionAsSeenDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $messageId * @param mixed $type * @param string $subscriberId * @param Components\MarkMessageActionAsSeenDto $markMessageActionAsSeenDto + * @param ?string $idempotencyKey */ - public function __construct(string $messageId, mixed $type, string $subscriberId, Components\MarkMessageActionAsSeenDto $markMessageActionAsSeenDto) + public function __construct(string $messageId, mixed $type, string $subscriberId, Components\MarkMessageActionAsSeenDto $markMessageActionAsSeenDto, ?string $idempotencyKey = null) { $this->messageId = $messageId; $this->type = $type; $this->subscriberId = $subscriberId; $this->markMessageActionAsSeenDto = $markMessageActionAsSeenDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.php b/src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.php rename to src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.php index 345b2b3..9789875 100644 --- a/src/Models/Operations/SubscribersControllerMarkActionAsSeenResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkActionAsSeenResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerMarkActionAsSeenResponse +class SubscribersV1ControllerMarkActionAsSeenResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.php b/src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.php similarity index 67% rename from src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.php rename to src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.php index 309428a..c5cc068 100644 --- a/src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerMarkAllUnreadAsReadRequest +class SubscribersV1ControllerMarkAllUnreadAsReadRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerMarkAllUnreadAsReadRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\MarkAllMessageAsRequestDto $markAllMessageAsRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\MarkAllMessageAsRequestDto $markAllMessageAsRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\MarkAllMessageAsRequestDto $markAllMessageAsRequestDto) + public function __construct(string $subscriberId, Components\MarkAllMessageAsRequestDto $markAllMessageAsRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->markAllMessageAsRequestDto = $markAllMessageAsRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.php b/src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.php rename to src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.php index c4bf3fb..521096e 100644 --- a/src/Models/Operations/SubscribersControllerMarkAllUnreadAsReadResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkAllUnreadAsReadResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; -class SubscribersControllerMarkAllUnreadAsReadResponse +class SubscribersV1ControllerMarkAllUnreadAsReadResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerMarkMessagesAsRequest.php b/src/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.php similarity index 67% rename from src/Models/Operations/SubscribersControllerMarkMessagesAsRequest.php rename to src/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.php index e35d98e..aa2bc5a 100644 --- a/src/Models/Operations/SubscribersControllerMarkMessagesAsRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkMessagesAsRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerMarkMessagesAsRequest +class SubscribersV1ControllerMarkMessagesAsRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerMarkMessagesAsRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\MessageMarkAsRequestDto $messageMarkAsRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\MessageMarkAsRequestDto $messageMarkAsRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\MessageMarkAsRequestDto $messageMarkAsRequestDto) + public function __construct(string $subscriberId, Components\MessageMarkAsRequestDto $messageMarkAsRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->messageMarkAsRequestDto = $messageMarkAsRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerMarkMessagesAsResponse.php b/src/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerMarkMessagesAsResponse.php rename to src/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.php index e0ad376..a49610a 100644 --- a/src/Models/Operations/SubscribersControllerMarkMessagesAsResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerMarkMessagesAsResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerMarkMessagesAsResponse +class SubscribersV1ControllerMarkMessagesAsResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.php b/src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.php similarity index 72% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.php rename to src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.php index e3320be..d1c984e 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberChannelRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerUpdateSubscriberChannelRequest +class SubscribersV1ControllerModifySubscriberChannelRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerUpdateSubscriberChannelRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto) + public function __construct(string $subscriberId, Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->updateSubscriberChannelRequestDto = $updateSubscriberChannelRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.php b/src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.php rename to src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.php index 7ca145d..95f57e9 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerModifySubscriberChannelResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerUpdateSubscriberOnlineFlagResponse +class SubscribersV1ControllerModifySubscriberChannelResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.php similarity index 72% rename from src/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.php index 6f0c335..01c0f9c 100644 --- a/src/Models/Operations/SubscribersControllerModifySubscriberChannelRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberChannelRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerModifySubscriberChannelRequest +class SubscribersV1ControllerUpdateSubscriberChannelRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerModifySubscriberChannelRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto) + public function __construct(string $subscriberId, Components\UpdateSubscriberChannelRequestDto $updateSubscriberChannelRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->updateSubscriberChannelRequestDto = $updateSubscriberChannelRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.php similarity index 72% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.php index 4cfe38a..d09310a 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerUpdateSubscriberGlobalPreferencesRequest +class SubscribersV1ControllerUpdateSubscriberGlobalPreferencesRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerUpdateSubscriberGlobalPreferencesRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberGlobalPreferencesRequestDto $updateSubscriberGlobalPreferencesRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\UpdateSubscriberGlobalPreferencesRequestDto $updateSubscriberGlobalPreferencesRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\UpdateSubscriberGlobalPreferencesRequestDto $updateSubscriberGlobalPreferencesRequestDto) + public function __construct(string $subscriberId, Components\UpdateSubscriberGlobalPreferencesRequestDto $updateSubscriberGlobalPreferencesRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->updateSubscriberGlobalPreferencesRequestDto = $updateSubscriberGlobalPreferencesRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.php index 20fe769..fd582a7 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberGlobalPreferencesResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerUpdateSubscriberGlobalPreferencesResponse +class SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.php similarity index 72% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.php index 1f5a1cd..3a9f5a2 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberOnlineFlagRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerUpdateSubscriberOnlineFlagRequest +class SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerUpdateSubscriberOnlineFlagRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto) + public function __construct(string $subscriberId, Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->updateSubscriberOnlineFlagRequestDto = $updateSubscriberOnlineFlagRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.php similarity index 75% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.php index 83e8c36..5794aba 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerUpdateSubscriberPreferenceRequest +class SubscribersV1ControllerUpdateSubscriberPreferenceRequest { /** * @@ -33,15 +33,25 @@ class SubscribersControllerUpdateSubscriberPreferenceRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberPreferenceRequestDto $updateSubscriberPreferenceRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param string $workflowId * @param Components\UpdateSubscriberPreferenceRequestDto $updateSubscriberPreferenceRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, string $workflowId, Components\UpdateSubscriberPreferenceRequestDto $updateSubscriberPreferenceRequestDto) + public function __construct(string $subscriberId, string $workflowId, Components\UpdateSubscriberPreferenceRequestDto $updateSubscriberPreferenceRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->workflowId = $workflowId; $this->updateSubscriberPreferenceRequestDto = $updateSubscriberPreferenceRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.php index 60e01d3..93344ab 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberPreferenceResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberPreferenceResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerUpdateSubscriberPreferenceResponse +class SubscribersV1ControllerUpdateSubscriberPreferenceResponse { /** * HTTP response content type for this operation diff --git a/src/Models/Operations/SubscribersControllerUpdateSubscriberRequest.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.php similarity index 67% rename from src/Models/Operations/SubscribersControllerUpdateSubscriberRequest.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.php index 4b92dc8..f02ec94 100644 --- a/src/Models/Operations/SubscribersControllerUpdateSubscriberRequest.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberRequest.php @@ -10,7 +10,7 @@ use novu\Models\Components; use novu\Utils\SpeakeasyMetadata; -class SubscribersControllerUpdateSubscriberRequest +class SubscribersV1ControllerUpdateSubscriberRequest { /** * @@ -26,13 +26,23 @@ class SubscribersControllerUpdateSubscriberRequest #[SpeakeasyMetadata('request:mediaType=application/json')] public Components\UpdateSubscriberRequestDto $updateSubscriberRequestDto; + /** + * A header for idempotency purposes + * + * @var ?string $idempotencyKey + */ + #[SpeakeasyMetadata('header:style=simple,explode=false,name=idempotency-key')] + public ?string $idempotencyKey = null; + /** * @param string $subscriberId * @param Components\UpdateSubscriberRequestDto $updateSubscriberRequestDto + * @param ?string $idempotencyKey */ - public function __construct(string $subscriberId, Components\UpdateSubscriberRequestDto $updateSubscriberRequestDto) + public function __construct(string $subscriberId, Components\UpdateSubscriberRequestDto $updateSubscriberRequestDto, ?string $idempotencyKey = null) { $this->subscriberId = $subscriberId; $this->updateSubscriberRequestDto = $updateSubscriberRequestDto; + $this->idempotencyKey = $idempotencyKey; } } \ No newline at end of file diff --git a/src/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.php b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.php similarity index 96% rename from src/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.php rename to src/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.php index 03d9c67..ba8bb9a 100644 --- a/src/Models/Operations/SubscribersControllerModifySubscriberChannelResponse.php +++ b/src/Models/Operations/SubscribersV1ControllerUpdateSubscriberResponse.php @@ -9,7 +9,7 @@ namespace novu\Models\Operations; use novu\Models\Components; -class SubscribersControllerModifySubscriberChannelResponse +class SubscribersV1ControllerUpdateSubscriberResponse { /** * HTTP response content type for this operation diff --git a/src/NovuSubscribersNotifications.php b/src/NovuNotifications.php similarity index 65% rename from src/NovuSubscribersNotifications.php rename to src/NovuNotifications.php index a4bf07d..b77cfc4 100644 --- a/src/NovuSubscribersNotifications.php +++ b/src/NovuNotifications.php @@ -15,7 +15,7 @@ use novu\Utils\Retry\RetryUtils; use Speakeasy\Serializer\DeserializationContext; -class NovuSubscribersNotifications +class NovuNotifications { private SDKConfiguration $sdkConfiguration; /** @@ -49,11 +49,11 @@ public function getUrl(string $baseUrl, array $urlVariables): string /** * Get in-app notification feed for a particular subscriber * - * @param Operations\SubscribersControllerGetNotificationsFeedRequest $request - * @return Operations\SubscribersControllerGetNotificationsFeedResponse + * @param Operations\SubscribersV1ControllerGetNotificationsFeedRequest $request + * @return Operations\SubscribersV1ControllerGetNotificationsFeedResponse * @throws \novu\Models\Errors\APIException */ - public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequest $request, ?Options $options = null): Operations\SubscribersControllerGetNotificationsFeedResponse + public function feed(Operations\SubscribersV1ControllerGetNotificationsFeedRequest $request, ?Options $options = null): Operations\SubscribersV1ControllerGetNotificationsFeedResponse { $retryConfig = null; if ($options) { @@ -63,7 +63,7 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ $retryConfig = $this->sdkConfiguration->retryConfig; } else { $retryConfig = new Retry\RetryConfigBackoff( - initialIntervalMs: 500, + initialIntervalMs: 1000, maxIntervalMs: 30000, exponent: 1.5, maxElapsedTimeMs: 3600000, @@ -83,15 +83,19 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ ]; } $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/v1/subscribers/{subscriberId}/notifications/feed', Operations\SubscribersControllerGetNotificationsFeedRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/v1/subscribers/{subscriberId}/notifications/feed', Operations\SubscribersV1ControllerGetNotificationsFeedRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $qp = Utils\Utils::getQueryParams(Operations\SubscribersControllerGetNotificationsFeedRequest::class, $request, $urlOverride); + $qp = Utils\Utils::getQueryParams(Operations\SubscribersV1ControllerGetNotificationsFeedRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - $hookContext = new HookContext('SubscribersController_getNotificationsFeed', null, $this->sdkConfiguration->securitySource); + $hookContext = new HookContext('SubscribersV1Controller_getNotificationsFeed', null, $this->sdkConfiguration->securitySource); $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); @@ -105,18 +109,18 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 404 || $statusCode == 409 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 503 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '414', '415', '422', '429', '4XX', '500', '503', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); $obj = $serializer->deserialize($responseData, '\novu\Models\Components\FeedResponseDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\SubscribersControllerGetNotificationsFeedResponse( + $response = new Operations\SubscribersV1ControllerGetNotificationsFeedResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, @@ -127,7 +131,18 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif (in_array($statusCode, [400, 404, 409])) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['414'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '415'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -138,7 +153,7 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 422) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -149,13 +164,24 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 429) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode == 503) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['503'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 400 && $statusCode < 500) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \novu\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -168,10 +194,11 @@ public function getFeed(Operations\SubscribersControllerGetNotificationsFeedRequ * @param string $subscriberId * @param ?bool $seen * @param ?float $limit - * @return Operations\SubscribersControllerGetUnseenCountResponse + * @param ?string $idempotencyKey + * @return Operations\SubscribersV1ControllerGetUnseenCountResponse * @throws \novu\Models\Errors\APIException */ - public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $limit = null, ?Options $options = null): Operations\SubscribersControllerGetUnseenCountResponse + public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $limit = null, ?string $idempotencyKey = null, ?Options $options = null): Operations\SubscribersV1ControllerGetUnseenCountResponse { $retryConfig = null; if ($options) { @@ -181,7 +208,7 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li $retryConfig = $this->sdkConfiguration->retryConfig; } else { $retryConfig = new Retry\RetryConfigBackoff( - initialIntervalMs: 500, + initialIntervalMs: 1000, maxIntervalMs: 30000, exponent: 1.5, maxElapsedTimeMs: 3600000, @@ -200,21 +227,26 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li '5XX', ]; } - $request = new Operations\SubscribersControllerGetUnseenCountRequest( + $request = new Operations\SubscribersV1ControllerGetUnseenCountRequest( subscriberId: $subscriberId, seen: $seen, limit: $limit, + idempotencyKey: $idempotencyKey, ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/v1/subscribers/{subscriberId}/notifications/unseen', Operations\SubscribersControllerGetUnseenCountRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/v1/subscribers/{subscriberId}/notifications/unseen', Operations\SubscribersV1ControllerGetUnseenCountRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $qp = Utils\Utils::getQueryParams(Operations\SubscribersControllerGetUnseenCountRequest::class, $request, $urlOverride); + $qp = Utils\Utils::getQueryParams(Operations\SubscribersV1ControllerGetUnseenCountRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - $hookContext = new HookContext('SubscribersController_getUnseenCount', null, $this->sdkConfiguration->securitySource); + $hookContext = new HookContext('SubscribersV1Controller_getUnseenCount', null, $this->sdkConfiguration->securitySource); $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); @@ -228,18 +260,18 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 404 || $statusCode == 409 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 503 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '414', '415', '422', '429', '4XX', '500', '503', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); $obj = $serializer->deserialize($responseData, '\novu\Models\Components\UnseenCountResponse', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\SubscribersControllerGetUnseenCountResponse( + $response = new Operations\SubscribersV1ControllerGetUnseenCountResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, @@ -250,7 +282,18 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif (in_array($statusCode, [400, 404, 409])) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['414'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '415'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -261,7 +304,7 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 422) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -272,13 +315,24 @@ public function unseenCount(string $subscriberId, ?bool $seen = null, ?float $li } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 429) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode == 503) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['503'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 400 && $statusCode < 500) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \novu\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/TopicsSubscribers.php b/src/Properties.php similarity index 60% rename from src/TopicsSubscribers.php rename to src/Properties.php index e8be631..0da5a9e 100644 --- a/src/TopicsSubscribers.php +++ b/src/Properties.php @@ -16,7 +16,7 @@ use novu\Utils\Retry\RetryUtils; use Speakeasy\Serializer\DeserializationContext; -class TopicsSubscribers +class Properties { private SDKConfiguration $sdkConfiguration; /** @@ -48,16 +48,17 @@ public function getUrl(string $baseUrl, array $urlVariables): string } /** - * Subscribers addition + * Update subscriber online status * - * Add subscribers to a topic by key + * Used to update the subscriber isOnline flag. * - * @param Components\AddSubscribersRequestDto $addSubscribersRequestDto - * @param string $topicKey - * @return Operations\TopicsControllerAssignResponse + * @param Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto + * @param string $subscriberId + * @param ?string $idempotencyKey + * @return Operations\SubscribersV1ControllerUpdateSubscriberOnlineFlagResponse * @throws \novu\Models\Errors\APIException */ - public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDto, string $topicKey, ?Options $options = null): Operations\TopicsControllerAssignResponse + public function updateOnlineFlag(Components\UpdateSubscriberOnlineFlagRequestDto $updateSubscriberOnlineFlagRequestDto, string $subscriberId, ?string $idempotencyKey = null, ?Options $options = null): Operations\SubscribersV1ControllerUpdateSubscriberOnlineFlagResponse { $retryConfig = null; if ($options) { @@ -67,7 +68,7 @@ public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDt $retryConfig = $this->sdkConfiguration->retryConfig; } else { $retryConfig = new Retry\RetryConfigBackoff( - initialIntervalMs: 500, + initialIntervalMs: 1000, maxIntervalMs: 30000, exponent: 1.5, maxElapsedTimeMs: 3600000, @@ -86,23 +87,28 @@ public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDt '5XX', ]; } - $request = new Operations\TopicsControllerAssignRequest( - topicKey: $topicKey, - addSubscribersRequestDto: $addSubscribersRequestDto, + $request = new Operations\SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest( + subscriberId: $subscriberId, + updateSubscriberOnlineFlagRequestDto: $updateSubscriberOnlineFlagRequestDto, + idempotencyKey: $idempotencyKey, ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/v1/topics/{topicKey}/subscribers', Operations\TopicsControllerAssignRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/v1/subscribers/{subscriberId}/online-status', Operations\SubscribersV1ControllerUpdateSubscriberOnlineFlagRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'addSubscribersRequestDto', 'json'); + $body = Utils\Utils::serializeRequestBody($request, 'updateSubscriberOnlineFlagRequestDto', 'json'); if ($body === null) { throw new \Exception('Request body is required'); } $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - $hookContext = new HookContext('TopicsController_assign', null, $this->sdkConfiguration->securitySource); + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + $hookContext = new HookContext('SubscribersV1Controller_updateSubscriberOnlineFlag', null, $this->sdkConfiguration->securitySource); $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); $httpRequest = Utils\Utils::removeHeaders($httpRequest); @@ -115,29 +121,40 @@ public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDt $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 400 || $statusCode == 404 || $statusCode == 409 || $statusCode == 422 || $statusCode == 429 || $statusCode >= 400 && $statusCode < 500 || $statusCode == 503 || $statusCode >= 500 && $statusCode < 600) { + if (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '414', '415', '422', '429', '4XX', '500', '503', '5XX'])) { $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); $httpResponse = $res; } - if ($statusCode == 200) { + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, '\novu\Models\Components\AssignSubscriberToTopicDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\TopicsControllerAssignResponse( + $obj = $serializer->deserialize($responseData, '\novu\Models\Components\SubscriberResponseDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\SubscribersV1ControllerUpdateSubscriberOnlineFlagResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, headers: $httpResponse->getHeaders(), - assignSubscriberToTopicDto: $obj); + subscriberResponseDto: $obj); return $response; } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif (in_array($statusCode, [400, 404, 409])) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['414'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400', '401', '403', '404', '405', '409', '413', '415'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -148,7 +165,7 @@ public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDt } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 422) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['422'])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); @@ -159,13 +176,24 @@ public function add(Components\AddSubscribersRequestDto $addSubscribersRequestDt } else { throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($statusCode == 429) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode == 503) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\novu\Models\Errors\ErrorDto', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \novu\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['503'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 400 && $statusCode < 500) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } elseif ($statusCode >= 500 && $statusCode < 600) { + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { throw new \novu\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { throw new \novu\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);