Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate 0.2.0 #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 21 additions & 71 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ generation:
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
go:
version: 0.1.17
version: 0.2.0
additionalDependencies:
github.com/google/uuid: v1.6.0
allowUnknownFieldsInWeakUnions: false
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.484.1
speakeasyVersion: 1.517.0
sources:
novu-OAS:
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:4c24d7f0521c19a0dac957d4dd5d0fef332b7d5d78d3a3bdd61919c97f458985
sourceBlobDigest: sha256:ed8d604243cb071fbd8ccd32366dc185a7381706079566388a6fb1d014368863
sourceRevisionDigest: sha256:9fd52284a610154d1ba82d5a0bfb3e93c0f42edef9b457795d8cfc3d4cf1fb67
sourceBlobDigest: sha256:781dfb73f9f926de61c2d4ba88d8f28089f682f79772e5b08527e1d8ac1ebe52
tags:
- latest
- speakeasy-sdk-regen-1738714379
- speakeasy-sdk-regen-1738887199
- "1.0"
targets:
novu:
source: novu-OAS
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:4c24d7f0521c19a0dac957d4dd5d0fef332b7d5d78d3a3bdd61919c97f458985
sourceBlobDigest: sha256:ed8d604243cb071fbd8ccd32366dc185a7381706079566388a6fb1d014368863
sourceRevisionDigest: sha256:9fd52284a610154d1ba82d5a0bfb3e93c0f42edef9b457795d8cfc3d4cf1fb67
sourceBlobDigest: sha256:781dfb73f9f926de61c2d4ba88d8f28089f682f79772e5b08527e1d8ac1ebe52
codeSamplesNamespace: novu-oas-go-code-samples
codeSamplesRevisionDigest: sha256:adef743b4471ef98f4d3b1ce1497bd385f6c1be4551a1306bdc38bd30025725e
codeSamplesRevisionDigest: sha256:cbe51c37e6fedf8b9daa69bb5e7e4fb4a70ab817dd39f5153a2fad6fe3ddc6d7
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
60 changes: 19 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Developer-friendly & type-safe Go SDK specifically catered to leverage Novu API.
<!-- Start Summary [summary] -->
## Summary

Novu API: Novu REST API. Please see [Api reference](https://docs.novu.co/api-reference) for more details.
Novu API: Novu REST API. Please see https://docs.novu.co/api-reference for more details.

For more information about the API: [Novu Documentation](https://docs.novu.co)
<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [github.com/novuhq/novu-go](#githubcomnovuhqnovu-go)
* [Novu's API v2 Go SDK](#novus-api-v2-go-sdk)
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Authentication](#authentication)
Expand All @@ -36,7 +36,6 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)

<!-- End Table of Contents [toc] -->
Expand All @@ -63,14 +62,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -114,14 +112,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.TriggerBulk(ctx, components.BulkTriggerEventDto{
Expand Down Expand Up @@ -221,14 +218,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.TriggerBroadcast(ctx, components.TriggerEventToAllRequestDto{
Expand Down Expand Up @@ -259,14 +255,13 @@ import (
"context"
novugo "github.com/novuhq/novu-go"
"log"
"os"
)

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

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

res, err := s.Cancel(ctx, "<id>", nil)
Expand Down Expand Up @@ -301,14 +296,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -388,12 +382,9 @@ func main() {
### [Subscribers](docs/sdks/subscribers/README.md)

* [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
* [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
* [Create](docs/sdks/subscribers/README.md#create) - Create subscriber
* [Retrieve](docs/sdks/subscribers/README.md#retrieve) - Get subscriber
* [Patch](docs/sdks/subscribers/README.md#patch) - Patch subscriber
* [Delete](docs/sdks/subscribers/README.md#delete) - Delete subscriber
Expand Down Expand Up @@ -422,16 +413,9 @@ func main() {

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

* [~~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
* [List](docs/sdks/preferences/README.md#list) - 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 Expand Up @@ -468,14 +452,13 @@ import (
"context"
novugo "github.com/novuhq/novu-go"
"log"
"os"
)

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

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

res, err := s.Subscribers.List(ctx, nil, nil, nil)
Expand Down Expand Up @@ -518,14 +501,13 @@ import (
"github.com/novuhq/novu-go/retry"
"log"
"models/operations"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -579,7 +561,6 @@ import (
"github.com/novuhq/novu-go/models/components"
"github.com/novuhq/novu-go/retry"
"log"
"os"
)

func main() {
Expand All @@ -597,7 +578,7 @@ func main() {
},
RetryConnectionErrors: false,
}),
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
novugo.WithSecurity("YOUR_SECRET_KEY_HERE"),
)

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -661,14 +642,13 @@ import (
"github.com/novuhq/novu-go/models/apierrors"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -736,10 +716,10 @@ func main() {

You can override the default server globally using the `WithServerIndex(serverIndex int)` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server |
| --- | ------------------------ |
| 0 | `https://api.novu.co` |
| 1 | `https://eu.api.novu.co` |
| # | Server | Description |
| --- | ------------------------ | ----------- |
| 0 | `https://api.novu.co` | |
| 1 | `https://eu.api.novu.co` | |

#### Example

Expand All @@ -751,15 +731,14 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -804,15 +783,14 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

s := novugo.New(
novugo.WithServerURL("https://api.novu.co"),
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
novugo.WithSecurity("YOUR_SECRET_KEY_HERE"),
)

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,14 @@ Based on:
### Generated
- [go v0.1.17] .
### Releases
- [Go v0.1.17] https://github.com/novuhq/novu-go/releases/tag/v0.1.17 - .
- [Go v0.1.17] https://github.com/novuhq/novu-go/releases/tag/v0.1.17 - .

## 2025-03-12 00:13:15
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.517.0 (2.548.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.2.0] .
### Releases
- [Go v0.2.0] https://github.com/novuhq/novu-go/releases/tag/v0.2.0 - .
12 changes: 4 additions & 8 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.Trigger(ctx, components.TriggerEventRequestDto{
Expand Down Expand Up @@ -60,14 +59,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.TriggerBulk(ctx, components.BulkTriggerEventDto{
Expand Down Expand Up @@ -167,14 +165,13 @@ import (
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
"log"
"os"
)

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

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

res, err := s.TriggerBroadcast(ctx, components.TriggerEventToAllRequestDto{
Expand Down Expand Up @@ -205,14 +202,13 @@ import (
"context"
novugo "github.com/novuhq/novu-go"
"log"
"os"
)

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

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

res, err := s.Cancel(ctx, "<id>", nil)
Expand Down
Loading