Skip to content

Commit

Permalink
Merge pull request #7 from novuhq/speakeasy-sdk-regen-1738714379
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco authored Feb 6, 2025
2 parents 55b0477 + 44c5bfa commit 1a61715
Show file tree
Hide file tree
Showing 12 changed files with 500 additions and 441 deletions.
12 changes: 7 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 9bfe35dd-87f6-4b74-8789-134b7aa9c364
management:
docChecksum: 314933743cdc7df0fece4d1200534ba4
docChecksum: dd3f2cfbe8fe0d218524247e07b527e1
docVersion: "1.0"
speakeasyVersion: 1.483.0
generationVersion: 2.502.0
releaseVersion: 0.1.16
configChecksum: b6439fd84ac2eebaae9223470937aff3
speakeasyVersion: 1.484.1
generationVersion: 2.503.2
releaseVersion: 0.1.17
configChecksum: fa8159268cb04ff199d7f763a9ad7919
repoURL: https://github.com/novuhq/novu-go.git
installationURL: https://github.com/novuhq/novu-go
features:
Expand Down Expand Up @@ -540,6 +540,7 @@ generatedFiles:
- docs/sdks/authentication/README.md
- docs/sdks/credentials/README.md
- docs/sdks/integrations/README.md
- docs/sdks/legacy/README.md
- docs/sdks/messages/README.md
- docs/sdks/notifications/README.md
- docs/sdks/novu/README.md
Expand All @@ -566,6 +567,7 @@ generatedFiles:
- internal/utils/retries.go
- internal/utils/security.go
- internal/utils/utils.go
- legacy.go
- messages.go
- models/apierrors/apierror.go
- models/operations/options.go
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
go:
version: 0.1.16
version: 0.1.17
additionalDependencies:
github.com/google/uuid: v1.6.0
allowUnknownFieldsInWeakUnions: false
Expand Down
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.483.0
speakeasyVersion: 1.484.1
sources:
novu-OAS:
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:078d2447b35060a4781a54884ca8ba837705520ddc7877440e341fbe88b8d09c
sourceBlobDigest: sha256:01282feee062c1e6d3f5ef9c9bd81070220286d04706a6287dbd3f477a420fee
sourceRevisionDigest: sha256:4c24d7f0521c19a0dac957d4dd5d0fef332b7d5d78d3a3bdd61919c97f458985
sourceBlobDigest: sha256:ed8d604243cb071fbd8ccd32366dc185a7381706079566388a6fb1d014368863
tags:
- latest
- speakeasy-sdk-regen-1738672116
- speakeasy-sdk-regen-1738714379
- "1.0"
targets:
novu:
source: novu-OAS
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:078d2447b35060a4781a54884ca8ba837705520ddc7877440e341fbe88b8d09c
sourceBlobDigest: sha256:01282feee062c1e6d3f5ef9c9bd81070220286d04706a6287dbd3f477a420fee
sourceRevisionDigest: sha256:4c24d7f0521c19a0dac957d4dd5d0fef332b7d5d78d3a3bdd61919c97f458985
sourceBlobDigest: sha256:ed8d604243cb071fbd8ccd32366dc185a7381706079566388a6fb1d014368863
codeSamplesNamespace: novu-oas-go-code-samples
codeSamplesRevisionDigest: sha256:b5424883459f1810251fd7c135a1a4a04eff00940e990c40edb186f6d3017691
codeSamplesRevisionDigest: sha256:adef743b4471ef98f4d3b1ce1497bd385f6c1be4551a1306bdc38bd30025725e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -33,5 +33,5 @@ workflow:
registry:
location: registry.speakeasyapi.dev/novu/novu/novu-oas-go-code-samples
labelOverride:
fixedValue: Go (SDK)
fixedValue: Go
blocking: false
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func main() {
* [List](docs/sdks/subscribers/README.md#list) - Get subscribers
* [Create](docs/sdks/subscribers/README.md#create) - Create subscriber
* [RetrieveLegacy](docs/sdks/subscribers/README.md#retrievelegacy) - Get subscriber
* [Update](docs/sdks/subscribers/README.md#update) - Update subscriber
* [UpdateLegacy](docs/sdks/subscribers/README.md#updatelegacy) - Update subscriber
* [~~DeleteLegacy~~](docs/sdks/subscribers/README.md#deletelegacy) - Delete subscriber :warning: **Deprecated**
* [CreateBulk](docs/sdks/subscribers/README.md#createbulk) - Bulk create subscribers
* [Search](docs/sdks/subscribers/README.md#search) - Search for subscribers
Expand Down Expand Up @@ -420,13 +420,16 @@ func main() {

#### [Subscribers.Preferences](docs/sdks/preferences/README.md)

* [List](docs/sdks/preferences/README.md#list) - Get subscriber preferences
* [UpdateGlobal](docs/sdks/preferences/README.md#updateglobal) - Update subscriber global preferences
* [RetrieveByLevel](docs/sdks/preferences/README.md#retrievebylevel) - Get subscriber preferences by level
* [~~ListLegacy~~](docs/sdks/preferences/README.md#listlegacy) - Get subscriber preferences :warning: **Deprecated**
* [~~RetrieveByLevelLegacy~~](docs/sdks/preferences/README.md#retrievebylevellegacy) - Get subscriber preferences by level :warning: **Deprecated**
* [UpdateLegacy](docs/sdks/preferences/README.md#updatelegacy) - Update subscriber preference
* [Retrieve](docs/sdks/preferences/README.md#retrieve) - Get subscriber preferences
* [Update](docs/sdks/preferences/README.md#update) - Update subscriber global or workflow specific preferences

#### [Subscribers.Preferences.Legacy](docs/sdks/legacy/README.md)

* [UpdateGlobal](docs/sdks/legacy/README.md#updateglobal) - Update subscriber global preferences

#### [Subscribers.Properties](docs/sdks/properties/README.md)

* [UpdateOnlineFlag](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,14 @@ Based on:
### Generated
- [go v0.1.16] .
### Releases
- [Go v0.1.16] https://github.com/novuhq/novu-go/releases/tag/v0.1.16 - .
- [Go v0.1.16] https://github.com/novuhq/novu-go/releases/tag/v0.1.16 - .

## 2025-02-06 00:12:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.1.17] .
### Releases
- [Go v0.1.17] https://github.com/novuhq/novu-go/releases/tag/v0.1.17 - .
66 changes: 66 additions & 0 deletions docs/sdks/legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Legacy
(*Subscribers.Preferences.Legacy*)

## Overview

### Available Operations

* [UpdateGlobal](#updateglobal) - Update subscriber global preferences

## UpdateGlobal

Update subscriber global preferences

### Example Usage

```go
package main

import(
"context"
"os"
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
)

func main() {
ctx := context.Background()

s := novugo.New(
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Preferences.Legacy.UpdateGlobal(ctx, "<id>", components.UpdateSubscriberGlobalPreferencesRequestDto{}, nil)
if err != nil {
log.Fatal(err)
}
if res.UpdateSubscriberPreferenceGlobalResponseDto != nil {
// handle response
}
}
```

### Parameters

| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `subscriberID` | *string* | :heavy_check_mark: | N/A |
| `updateSubscriberGlobalPreferencesRequestDto` | [components.UpdateSubscriberGlobalPreferencesRequestDto](../../models/components/updatesubscriberglobalpreferencesrequestdto.md) | :heavy_check_mark: | N/A |
| `idempotencyKey` | **string* | :heavy_minus_sign: | A header for idempotency purposes |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |

### Response

**[*operations.SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse](../../models/operations/subscribersv1controllerupdatesubscriberglobalpreferencesresponse.md), error**

### Errors

| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| apierrors.ErrorDto | 414 | application/json |
| apierrors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| apierrors.ValidationErrorDto | 422 | application/json |
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |
75 changes: 10 additions & 65 deletions docs/sdks/preferences/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

### Available Operations

* [List](#list) - Get subscriber preferences
* [UpdateGlobal](#updateglobal) - Update subscriber global preferences
* [RetrieveByLevel](#retrievebylevel) - Get subscriber preferences by level
* [~~ListLegacy~~](#listlegacy) - Get subscriber preferences :warning: **Deprecated**
* [~~RetrieveByLevelLegacy~~](#retrievebylevellegacy) - Get subscriber preferences by level :warning: **Deprecated**
* [UpdateLegacy](#updatelegacy) - Update subscriber preference
* [Retrieve](#retrieve) - Get subscriber preferences
* [Update](#update) - Update subscriber global or workflow specific preferences

## List
## ~~ListLegacy~~

Get subscriber preferences

> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
### Example Usage

```go
Expand All @@ -35,7 +36,7 @@ func main() {
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Preferences.List(ctx, "<id>", nil, nil)
res, err := s.Subscribers.Preferences.ListLegacy(ctx, "<id>", nil, nil)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -69,68 +70,12 @@ func main() {
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |

## UpdateGlobal

Update subscriber global preferences

### Example Usage

```go
package main

import(
"context"
"os"
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
)

func main() {
ctx := context.Background()

s := novugo.New(
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Preferences.UpdateGlobal(ctx, "<id>", components.UpdateSubscriberGlobalPreferencesRequestDto{}, nil)
if err != nil {
log.Fatal(err)
}
if res.UpdateSubscriberPreferenceGlobalResponseDto != nil {
// handle response
}
}
```

### Parameters

| Parameter | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `subscriberID` | *string* | :heavy_check_mark: | N/A |
| `updateSubscriberGlobalPreferencesRequestDto` | [components.UpdateSubscriberGlobalPreferencesRequestDto](../../models/components/updatesubscriberglobalpreferencesrequestdto.md) | :heavy_check_mark: | N/A |
| `idempotencyKey` | **string* | :heavy_minus_sign: | A header for idempotency purposes |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |

### Response

**[*operations.SubscribersV1ControllerUpdateSubscriberGlobalPreferencesResponse](../../models/operations/subscribersv1controllerupdatesubscriberglobalpreferencesresponse.md), error**

### Errors

| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| apierrors.ErrorDto | 414 | application/json |
| apierrors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| apierrors.ValidationErrorDto | 422 | application/json |
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |

## RetrieveByLevel
## ~~RetrieveByLevelLegacy~~

Get subscriber preferences by level

> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
### Example Usage

```go
Expand All @@ -151,7 +96,7 @@ func main() {
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Preferences.RetrieveByLevel(ctx, operations.ParameterTemplate, "<id>", nil, nil)
res, err := s.Subscribers.Preferences.RetrieveByLevelLegacy(ctx, operations.ParameterTemplate, "<id>", nil, nil)
if err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions docs/sdks/subscribers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A subscriber in Novu represents someone who should receive a message. A subscrib
* [List](#list) - Get subscribers
* [Create](#create) - Create subscriber
* [RetrieveLegacy](#retrievelegacy) - Get subscriber
* [Update](#update) - Update subscriber
* [UpdateLegacy](#updatelegacy) - Update subscriber
* [~~DeleteLegacy~~](#deletelegacy) - Delete subscriber :warning: **Deprecated**
* [CreateBulk](#createbulk) - Bulk create subscribers
* [Search](#search) - Search for subscribers
Expand Down Expand Up @@ -204,7 +204,7 @@ func main() {
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |

## Update
## UpdateLegacy

Used to update the subscriber entity with new information

Expand All @@ -228,7 +228,7 @@ func main() {
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Update(ctx, "<id>", components.UpdateSubscriberRequestDto{
res, err := s.Subscribers.UpdateLegacy(ctx, "<id>", components.UpdateSubscriberRequestDto{
Email: novugo.String("[email protected]"),
FirstName: novugo.String("John"),
LastName: novugo.String("Doe"),
Expand Down
Loading

0 comments on commit 1a61715

Please sign in to comment.