-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from novuhq/speakeasy-sdk-regen-1738714379
- Loading branch information
Showing
12 changed files
with
500 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | \*/\* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|
@@ -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"), | ||
|
Oops, something went wrong.