Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.462.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jan 6, 2025
1 parent 37e62f9 commit 5e7b8fc
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 44 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.speakeasy/reports
# .gitignore
15 changes: 9 additions & 6 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 1773e9c7-1931-4663-8ac8-4deaf8db76f5
management:
docChecksum: b6c3f376c48f7905069b63adb30d9d19
docChecksum: e904bd8a77ea57b3ba18586e860e5b93
docVersion: 0.0.1
speakeasyVersion: 1.460.3
generationVersion: 2.484.0
releaseVersion: 0.13.3
configChecksum: 3fb1e16bfafa43fb1137a149ef4edde8
speakeasyVersion: 1.462.2
generationVersion: 2.486.1
releaseVersion: 0.13.4
configChecksum: 8e14469f54e0e59c899c824d04cdda01
repoURL: https://github.com/dubinc/dub-go.git
installationURL: https://github.com/dubinc/dub-go
features:
Expand All @@ -15,7 +15,7 @@ features:
constsAndDefaults: 0.1.6
core: 3.6.2
defaultEnabledRetries: 0.2.0
deprecations: 2.81.1
deprecations: 2.81.2
envVarSecurityUsage: 0.3.2
errors: 2.83.0
examples: 2.81.3
Expand Down Expand Up @@ -249,6 +249,7 @@ generatedFiles:
- docs/models/operations/getcustomerrequest.md
- docs/models/operations/getcustomerresponsebody.md
- docs/models/operations/getcustomersinterval.md
- docs/models/operations/getcustomersrequest.md
- docs/models/operations/getcustomertype.md
- docs/models/operations/getlinkinforequest.md
- docs/models/operations/getlinkscountqueryparamtagids.md
Expand Down Expand Up @@ -1127,6 +1128,7 @@ examples:
parameters:
path:
id: "<id>"
query: {}
responses:
"200":
application/json: {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "<value>"}
Expand All @@ -1153,6 +1155,7 @@ examples:
parameters:
path:
id: "<id>"
query: {}
responses:
"200":
application/json: {"id": "<id>", "externalId": "<id>", "name": "<value>", "createdAt": "<value>"}
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
go:
version: 0.13.3
version: 0.13.4
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
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.460.3
speakeasyVersion: 1.462.2
sources:
dub:
sourceNamespace: dub
sourceRevisionDigest: sha256:df0afe8371e9f335f41eccd86c23915cc0d71718327fff64dc3f42dc39063655
sourceBlobDigest: sha256:1b42a9880bdb51e5cadcf56873c1b05492c0ba24bf82cd416493f71c289830fa
sourceRevisionDigest: sha256:a29305c2227f352d9976fa2065cc2646c76be676f6afd09d6f78a07f9508edc0
sourceBlobDigest: sha256:92f1737af067df0a426e19c6f461d5f97f94768ba5dcf52752994c635240ed36
tags:
- latest
- speakeasy-sdk-regen-1735517571
- speakeasy-sdk-regen-1735949521
- 0.0.1
targets:
my-first-target:
source: dub
sourceNamespace: dub
sourceRevisionDigest: sha256:df0afe8371e9f335f41eccd86c23915cc0d71718327fff64dc3f42dc39063655
sourceBlobDigest: sha256:1b42a9880bdb51e5cadcf56873c1b05492c0ba24bf82cd416493f71c289830fa
sourceRevisionDigest: sha256:a29305c2227f352d9976fa2065cc2646c76be676f6afd09d6f78a07f9508edc0
sourceBlobDigest: sha256:92f1737af067df0a426e19c6f461d5f97f94768ba5dcf52752994c635240ed36
codeSamplesNamespace: code-samples-go-my-first-target
codeSamplesRevisionDigest: sha256:5946b5460268081a20f0c0f4a718f122cce93090667a6d14584ef1d4765fd88c
codeSamplesRevisionDigest: sha256:428e874286ba7fb7ceff3b9a41d6571690adb71d7067f5c844af7b25d1f702de
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,14 @@ Based on:
### Generated
- [go v0.13.3] .
### Releases
- [Go v0.13.3] https://github.com/dubinc/dub-go/releases/tag/v0.13.3 - .
- [Go v0.13.3] https://github.com/dubinc/dub-go/releases/tag/v0.13.3 - .

## 2025-01-06 00:13:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.462.2 (2.486.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.13.4] .
### Releases
- [Go v0.13.4] https://github.com/dubinc/dub-go/releases/tag/v0.13.4 - .
4 changes: 2 additions & 2 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ actions:
"x-codeSamples":
- "lang": "go"
"label": "getCustomers"
"source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Customers.List(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
"source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Customers.List(ctx, operations.GetCustomersRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
- target: $["paths"]["/customers"]["post"]
update:
"x-codeSamples":
Expand All @@ -38,7 +38,7 @@ actions:
"x-codeSamples":
- "lang": "go"
"label": "updateCustomer"
"source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Customers.Update(ctx, \"<id>\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
"source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Customers.Update(ctx, operations.UpdateCustomerRequest{\n ID: \"<id>\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"
- target: $["paths"]["/domains"]["get"]
update:
"x-codeSamples":
Expand Down
21 changes: 14 additions & 7 deletions customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func newCustomers(sdkConfig sdkConfiguration) *Customers {

// List - Retrieve a list of customers
// Retrieve a list of customers for the authenticated workspace.
func (s *Customers) List(ctx context.Context, opts ...operations.Option) ([]operations.ResponseBody, error) {
func (s *Customers) List(ctx context.Context, request operations.GetCustomersRequest, opts ...operations.Option) ([]operations.ResponseBody, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getCustomers",
Expand Down Expand Up @@ -76,6 +76,10 @@ func (s *Customers) List(ctx context.Context, opts ...operations.Option) ([]oper
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)

if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
Expand Down Expand Up @@ -840,6 +844,10 @@ func (s *Customers) Get(ctx context.Context, request operations.GetCustomerReque
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)

if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
Expand Down Expand Up @@ -1170,19 +1178,14 @@ func (s *Customers) Get(ctx context.Context, request operations.GetCustomerReque

// Update a customer
// Update a customer for the authenticated workspace.
func (s *Customers) Update(ctx context.Context, id string, requestBody *operations.UpdateCustomerRequestBody, opts ...operations.Option) (*operations.UpdateCustomerResponseBody, error) {
func (s *Customers) Update(ctx context.Context, request operations.UpdateCustomerRequest, opts ...operations.Option) (*operations.UpdateCustomerResponseBody, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "updateCustomer",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}

request := operations.UpdateCustomerRequest{
ID: id,
RequestBody: requestBody,
}

o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
Expand Down Expand Up @@ -1230,6 +1233,10 @@ func (s *Customers) Update(ctx context.Context, id string, requestBody *operatio
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
req.Header.Set("Content-Type", reqContentType)

if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}

if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
Expand Down
7 changes: 4 additions & 3 deletions docs/models/operations/getcustomerrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## Fields

| Field | Type | Required | Description |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| `ID` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `ID` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. |
| `IncludeExpandedFields` | **bool* | :heavy_minus_sign: | Whether to include expanded fields on the customer (`link`, `partner`, `discount`). |
10 changes: 10 additions & 0 deletions docs/models/operations/getcustomersrequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GetCustomersRequest


## Fields

| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `Email` | **string* | :heavy_minus_sign: | A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. |
| `ExternalID` | **string* | :heavy_minus_sign: | A case-sensitive filter on the list based on the customer's `externalId` field. The value must be a string. |
| `IncludeExpandedFields` | **bool* | :heavy_minus_sign: | Whether to include expanded fields on the customer (`link`, `partner`, `discount`). |
1 change: 1 addition & 0 deletions docs/models/operations/updatecustomerrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `ID` | *string* | :heavy_check_mark: | The unique identifier of the customer in Dub. |
| `IncludeExpandedFields` | **bool* | :heavy_minus_sign: | Whether to include expanded fields on the customer (`link`, `partner`, `discount`). |
| `RequestBody` | [*operations.UpdateCustomerRequestBody](../../models/operations/updatecustomerrequestbody.md) | :heavy_minus_sign: | N/A |
Loading

0 comments on commit 5e7b8fc

Please sign in to comment.