Skip to content

Commit

Permalink
Merge pull request #3 from panoratech/speakeasy-sdk-regen-1722717540
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate SDK 0.2.0
  • Loading branch information
rflihxyz authored Aug 3, 2024
2 parents 49ffad9 + 9ceebb9 commit 53d305d
Show file tree
Hide file tree
Showing 601 changed files with 8,166 additions and 6,455 deletions.
193 changes: 24 additions & 169 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
go:
version: 0.1.0
version: 0.2.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
speakeasyVersion: 1.351.2
speakeasyVersion: 1.352.1
sources:
Panora-OAS:
sourceNamespace: go-sdk
sourceRevisionDigest: sha256:4b0bcb45d67cf7bda5fe6ec7c4603750d202e7a451584b56bca8703583665ef3
sourceBlobDigest: sha256:642b04c8cc237c73a6a5560286d5c6599983e796fbc4bde7ef22b87fe875cb4f
sourceRevisionDigest: sha256:c0e068c0068faf9843ee4305bca373cf5ac818a4d5c4a577fea9e678145b531e
sourceBlobDigest: sha256:72b1975e8ded26e4d4826e0418b9d42ab9f29c823fa83c9f27c62270d8534bbb
tags:
- latest
- main
targets:
panora:
source: Panora-OAS
sourceNamespace: go-sdk
sourceRevisionDigest: sha256:4b0bcb45d67cf7bda5fe6ec7c4603750d202e7a451584b56bca8703583665ef3
sourceBlobDigest: sha256:642b04c8cc237c73a6a5560286d5c6599983e796fbc4bde7ef22b87fe875cb4f
sourceRevisionDigest: sha256:c0e068c0068faf9843ee4305bca373cf5ac818a4d5c4a577fea9e678145b531e
sourceBlobDigest: sha256:72b1975e8ded26e4d4826e0418b9d42ab9f29c823fa83c9f27c62270d8534bbb
codeSamplesNamespace: go-sdk
codeSamplesRevisionDigest: sha256:7a0634fe56ae5440c6f0cb881bd10d3e86184fd5a8f39890e0af36919d520ff9
codeSamplesRevisionDigest: sha256:097242ddaf01f66813ad6731f18b7c903c57e34c1e255be6b94d709d7a23685a
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
85 changes: 67 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ import (
"context"
gosdk "github.com/panoratech/go-sdk"
"log"
"os"
)

func main() {
s := gosdk.New()
s := gosdk.New(
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand All @@ -66,15 +69,9 @@ func main() {

* [List](docs/sdks/webhooks/README.md#list) - List webhooks
* [Create](docs/sdks/webhooks/README.md#create) - Add webhook metadata

### [Webhooks.{id}](docs/sdks/id/README.md)

* [Delete](docs/sdks/id/README.md#delete) - Delete Webhook
* [UpdateStatus](docs/sdks/id/README.md#updatestatus) - Update webhook status

### [Webhooks.Verifyevent](docs/sdks/verifyevent/README.md)

* [VerifyEvent](docs/sdks/verifyevent/README.md#verifyevent) - Verify payload signature of the webhook
* [Delete](docs/sdks/webhooks/README.md#delete) - Delete Webhook
* [UpdateStatus](docs/sdks/webhooks/README.md#updatestatus) - Update webhook status
* [VerifyEvent](docs/sdks/webhooks/README.md#verifyevent) - Verify payload signature of the webhook


### [Ticketing.Tickets](docs/sdks/tickets/README.md)
Expand Down Expand Up @@ -133,7 +130,7 @@ func main() {

### [Crm.Companies](docs/sdks/companies/README.md)

* [List](docs/sdks/companies/README.md#list) - List Companies
* [List](docs/sdks/companies/README.md#list) - List Companies
* [Create](docs/sdks/companies/README.md#create) - Create Companies
* [Retrieve](docs/sdks/companies/README.md#retrieve) - Retrieve Companies

Expand Down Expand Up @@ -572,10 +569,13 @@ import (
"github.com/panoratech/go-sdk/retry"
"log"
"models/operations"
"os"
)

func main() {
s := gosdk.New()
s := gosdk.New(
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx, operations.WithRetries(
Expand All @@ -592,7 +592,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand All @@ -608,6 +608,7 @@ import (
gosdk "github.com/panoratech/go-sdk"
"github.com/panoratech/go-sdk/retry"
"log"
"os"
)

func main() {
Expand All @@ -623,14 +624,15 @@ func main() {
},
RetryConnectionErrors: false,
}),
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand Down Expand Up @@ -658,10 +660,13 @@ import (
gosdk "github.com/panoratech/go-sdk"
"github.com/panoratech/go-sdk/models/sdkerrors"
"log"
"os"
)

func main() {
s := gosdk.New()
s := gosdk.New(
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
Expand Down Expand Up @@ -700,19 +705,21 @@ import (
"context"
gosdk "github.com/panoratech/go-sdk"
"log"
"os"
)

func main() {
s := gosdk.New(
gosdk.WithServerIndex(2),
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand All @@ -730,19 +737,21 @@ import (
"context"
gosdk "github.com/panoratech/go-sdk"
"log"
"os"
)

func main() {
s := gosdk.New(
gosdk.WithServerURL("https://api.panora.dev"),
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand Down Expand Up @@ -785,6 +794,46 @@ This can be a convenient way to configure timeouts, cookies, proxies, custom hea

<!-- End Special Types [types] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| -------- | -------- | -------- |
| `APIKey` | apiKey | API key |

You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
```go
package main

import (
"context"
gosdk "github.com/panoratech/go-sdk"
"log"
"os"
)

func main() {
s := gosdk.New(
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.Res != nil {
// handle response
}
}

```
<!-- End Authentication [security] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@ Based on:
### Generated
- [go v0.1.0] .
### Releases
- [Go v0.1.0] https://github.com/panoratech/go-sdk/releases/tag/v0.1.0 - .
- [Go v0.1.0] https://github.com/panoratech/go-sdk/releases/tag/v0.1.0 - .

## 2024-08-03 20:38:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.352.1 (2.385.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.2.0] .
### Releases
- [Go v0.2.0] https://github.com/panoratech/go-sdk/releases/tag/v0.2.0 - .
7 changes: 5 additions & 2 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ import (
"context"
gosdk "github.com/panoratech/go-sdk"
"log"
"os"
)

func main() {
s := gosdk.New()
s := gosdk.New(
gosdk.WithSecurity(os.Getenv("API_KEY")),
)

ctx := context.Background()
res, err := s.Hello(ctx)
if err != nil {
log.Fatal(err)
}
if res.String != nil {
if res.Res != nil {
// handle response
}
}
Expand Down
12 changes: 10 additions & 2 deletions accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *Accounts) List(ctx context.Context, xConnectionToken string, remoteData
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "listTicketingAccount",
SecuritySource: nil,
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.ListTicketingAccountRequest{
Expand Down Expand Up @@ -84,6 +84,10 @@ func (s *Accounts) List(ctx context.Context, xConnectionToken string, remoteData
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -214,7 +218,7 @@ func (s *Accounts) Retrieve(ctx context.Context, xConnectionToken string, id str
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "retrieveTicketingAccount",
SecuritySource: nil,
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.RetrieveTicketingAccountRequest{
Expand Down Expand Up @@ -265,6 +269,10 @@ func (s *Accounts) Retrieve(ctx context.Context, xConnectionToken string, id str
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down
18 changes: 15 additions & 3 deletions actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *Actions) List(ctx context.Context, xConnectionToken string, remoteData
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "listMarketingautomationAction",
SecuritySource: nil,
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.ListMarketingautomationActionRequest{
Expand Down Expand Up @@ -84,6 +84,10 @@ func (s *Actions) List(ctx context.Context, xConnectionToken string, remoteData
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -214,7 +218,7 @@ func (s *Actions) Create(ctx context.Context, xConnectionToken string, unifiedMa
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "createMarketingautomationAction",
SecuritySource: nil,
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.CreateMarketingautomationActionRequest{
Expand Down Expand Up @@ -271,6 +275,10 @@ func (s *Actions) Create(ctx context.Context, xConnectionToken string, unifiedMa
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down Expand Up @@ -401,7 +409,7 @@ func (s *Actions) Retrieve(ctx context.Context, xConnectionToken string, id stri
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "retrieveMarketingautomationAction",
SecuritySource: nil,
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.RetrieveMarketingautomationActionRequest{
Expand Down Expand Up @@ -452,6 +460,10 @@ func (s *Actions) Retrieve(ctx context.Context, xConnectionToken string, id stri
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}

globalRetryConfig := s.sdkConfiguration.RetryConfig
retryConfig := o.Retries
if retryConfig == nil {
Expand Down
Loading

0 comments on commit 53d305d

Please sign in to comment.