Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.423.5
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Oct 31, 2024
1 parent b688c72 commit ea7fa7a
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.423.3
speakeasyVersion: 1.423.5
sources:
accounting-source:
sourceNamespace: accounting-source
Expand Down Expand Up @@ -93,8 +93,8 @@ sources:
- main
sync-for-payables-source:
sourceNamespace: sync-for-payables-source
sourceRevisionDigest: sha256:9417873280d26018f4595b4fb72fd2632491ea18f0a9d5536b63336754509d85
sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5
sourceRevisionDigest: sha256:892b8874967cecc96433bb77727c4944a9ddda9c921bcb57da4e87867bda2090
sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693
tags:
- latest
- main
Expand Down Expand Up @@ -181,8 +181,8 @@ targets:
sync-for-payables-library:
source: sync-for-payables-source
sourceNamespace: sync-for-payables-source
sourceRevisionDigest: sha256:9417873280d26018f4595b4fb72fd2632491ea18f0a9d5536b63336754509d85
sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5
sourceRevisionDigest: sha256:892b8874967cecc96433bb77727c4944a9ddda9c921bcb57da4e87867bda2090
sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693
sync-for-payables-version-1-library:
source: sync-for-payables-version-1-source
sourceNamespace: sync-for-payables-version-1-source
Expand Down
28 changes: 23 additions & 5 deletions sync-for-payables/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 402c5670-2c12-44b7-81b8-9ee7a4664285
management:
docChecksum: 16c2aba5060738f14671556b6526c400
docChecksum: c0f4a56a46c488781ea9be7def894f8c
docVersion: 3.0.0
speakeasyVersion: 1.423.3
generationVersion: 2.442.11
releaseVersion: 4.0.0
configChecksum: 9eef78c4d50dd14f3910f087335269d7
speakeasyVersion: 1.423.5
generationVersion: 2.445.1
releaseVersion: 4.0.1
configChecksum: b5db3ce48fa12d8fb6a4f6603ae6216c
repoURL: https://github.com/codatio/client-sdk-go.git
repoSubDirectory: sync-for-payables
installationURL: https://github.com/codatio/client-sdk-go/sync-for-payables
Expand Down Expand Up @@ -709,6 +709,15 @@ examples:
responses:
"400":
application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0}
Attachment metadata:
parameters:
path:
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
billId: "EILBDVJVNUAGVKRQ"
responses:
"201":
application/json: {"id": "422f093f-e556-4bf3-91c0-93af70c3e850", "name": "receipt.png", "contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "includeWhenSent": true, "sourceModifiedDate": "2022-05-26T10:34:10Z"}
list-bill-attachments:
Info:
parameters:
Expand All @@ -728,6 +737,15 @@ examples:
responses:
"401":
application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0}
Attachments:
parameters:
path:
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002"
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171"
billId: "EILBDVJVNUAGVKRQ"
responses:
"200":
application/json: [{"id": "422f093f-e556-4bf3-91c0-93af70c3e850", "name": "receipt.png", "contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "includeWhenSent": true, "sourceModifiedDate": "2022-05-26T10:34:10Z"}, {"id": "20cfd269-2f0f-44ef-a28c-7b5f725cf1aa", "name": "another_receipt.png", "contentType": "image/png", "dateCreated": "2022-10-24T00:00:00.000Z", "fileSize": 98, "includeWhenSent": true, "sourceModifiedDate": "2022-05-27T12:38:10Z"}]
download-bill-attachment:
Unauthorized:
parameters:
Expand Down
2 changes: 1 addition & 1 deletion sync-for-payables/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
telemetryEnabled: true
go:
version: 4.0.0
version: 4.0.1
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
12 changes: 11 additions & 1 deletion sync-for-payables/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ Based on:
### Generated
- [go v4.0.0] sync-for-payables
### Releases
- [Go v4.0.0] https://github.com/codatio/client-sdk-go/releases/tag/sync-for-payables/v4.0.0 - sync-for-payables
- [Go v4.0.0] https://github.com/codatio/client-sdk-go/releases/tag/sync-for-payables/v4.0.0 - sync-for-payables

## 2024-10-31 13:42:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.423.5 (2.445.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v4.0.1] sync-for-payables
### Releases
- [Go v4.0.1] https://github.com/codatio/client-sdk-go/releases/tag/sync-for-payables/v4.0.1 - sync-for-payables
26 changes: 23 additions & 3 deletions sync-for-payables/bills.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,26 @@ func (s *Bills) UploadAttachment(ctx context.Context, request operations.UploadB

switch {
case httpRes.StatusCode == 201:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}

var out shared.Attachment
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.Attachment = &out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
return nil, err
}
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
fallthrough
case httpRes.StatusCode == 401:
Expand Down Expand Up @@ -978,7 +998,7 @@ func (s *Bills) ListAttachments(ctx context.Context, request operations.ListBill
}

baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/companies/{companyId}/connections/{connectionId}/bills/{billId}/attachments", request, nil)
opURL, err := utils.GenerateURL(ctx, baseURL, "/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}/attachments", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
Expand Down Expand Up @@ -1114,12 +1134,12 @@ func (s *Bills) ListAttachments(ctx context.Context, request operations.ListBill
return nil, err
}

var out shared.Attachment
var out []shared.Attachment
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.Attachment = &out
res.Attachments = out
default:
rawBody, err := utils.ConsumeRawBody(httpRes)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions sync-for-payables/codatsyncpayables.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ func New(opts ...SDKOption) *CodatSyncPayables {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "3.0.0",
SDKVersion: "4.0.0",
GenVersion: "2.442.11",
UserAgent: "speakeasy-sdk/go 4.0.0 2.442.11 3.0.0 github.com/codatio/client-sdk-go/sync-for-payables",
SDKVersion: "4.0.1",
GenVersion: "2.445.1",
UserAgent: "speakeasy-sdk/go 4.0.1 2.445.1 3.0.0 github.com/codatio/client-sdk-go/sync-for-payables",
Hooks: hooks.New(),
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
| Field | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `HTTPMeta` | [shared.HTTPMetadata](../../../pkg/models/shared/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Attachment` | [*shared.Attachment](../../../pkg/models/shared/attachment.md) | :heavy_minus_sign: | Success |
| `Attachments` | [][shared.Attachment](../../../pkg/models/shared/attachment.md) | :heavy_minus_sign: | Success |
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

| Field | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `HTTPMeta` | [shared.HTTPMetadata](../../../pkg/models/shared/httpmetadata.md) | :heavy_check_mark: | N/A |
| `HTTPMeta` | [shared.HTTPMetadata](../../../pkg/models/shared/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Attachment` | [*shared.Attachment](../../../pkg/models/shared/attachment.md) | :heavy_minus_sign: | Created |
4 changes: 2 additions & 2 deletions sync-for-payables/docs/sdks/bills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
if res != nil {
if res.Attachment != nil {
// handle response
}
}
Expand Down Expand Up @@ -354,7 +354,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
if res.Attachment != nil {
if res.Attachments != nil {
// handle response
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (o *ListBillAttachmentsRequest) GetBillID() string {
type ListBillAttachmentsResponse struct {
HTTPMeta shared.HTTPMetadata `json:"-"`
// Success
Attachment *shared.Attachment
Attachments []shared.Attachment
}

func (o *ListBillAttachmentsResponse) GetHTTPMeta() shared.HTTPMetadata {
Expand All @@ -49,9 +49,9 @@ func (o *ListBillAttachmentsResponse) GetHTTPMeta() shared.HTTPMetadata {
return o.HTTPMeta
}

func (o *ListBillAttachmentsResponse) GetAttachment() *shared.Attachment {
func (o *ListBillAttachmentsResponse) GetAttachments() []shared.Attachment {
if o == nil {
return nil
}
return o.Attachment
return o.Attachments
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func (o *UploadBillAttachmentRequest) GetAttachmentUpload() *shared.AttachmentUp

type UploadBillAttachmentResponse struct {
HTTPMeta shared.HTTPMetadata `json:"-"`
// Created
Attachment *shared.Attachment
}

func (o *UploadBillAttachmentResponse) GetHTTPMeta() shared.HTTPMetadata {
Expand All @@ -54,3 +56,10 @@ func (o *UploadBillAttachmentResponse) GetHTTPMeta() shared.HTTPMetadata {
}
return o.HTTPMeta
}

func (o *UploadBillAttachmentResponse) GetAttachment() *shared.Attachment {
if o == nil {
return nil
}
return o.Attachment
}

0 comments on commit ea7fa7a

Please sign in to comment.