Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/openregister-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
Expand All @@ -48,7 +48,7 @@ jobs:
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/openregister-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/openregister-cli' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.3"
".": "0.6.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openregister/openregister-9003cf9ba012f57f92e1dbcdec03aa0577f270632a92acd5aabcf65491fe278f.yml
openapi_spec_hash: 783638013b86f0777caae690a60c90f1
config_hash: 16c97c736c0b7de7fb3470f37f856206
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openregister/openregister-4bd4cc957806a1fc7250db66762de302ee6718d21ebe7159b8753af53acc68df.yml
openapi_spec_hash: 2ada6c644f88094e8e542e539643f724
config_hash: 42520b3d15dbe4a67577eb9c86e4ed01
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 0.6.0 (2026-07-28)

Full Changelog: [v0.5.3...v0.6.0](https://github.com/oregister/openregister-cli/compare/v0.5.3...v0.6.0)

### Features

* **api:** daily monitor updates for companies ([b73a291](https://github.com/oregister/openregister-cli/commit/b73a2915a51ad04979e8dbbf6ec79f3d277cebe4))
* **api:** insolvencies & m&a ([47ee27a](https://github.com/oregister/openregister-cli/commit/47ee27a1ed3b9d5f8bb08471af53d1a6243aed6c))
* **api:** manual updates ([52b28fa](https://github.com/oregister/openregister-cli/commit/52b28fae69706d5b33c5731fcaa1604a88c95644))
* **api:** manual updates ([1c383bc](https://github.com/oregister/openregister-cli/commit/1c383bc53a93ad236baa6517306adec27f89a34f))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([4d86d0c](https://github.com/oregister/openregister-cli/commit/4d86d0c35f1083ddb887fa3575ea9e7767240b3c))


### Bug Fixes

* **go:** remove a nonexistent release workflow from release-please extra-files ([c0408fe](https://github.com/oregister/openregister-cli/commit/c0408fe242001d365e48bec66a0e9e9245e4b919))


### Chores

* **internal:** codegen related update ([956a9dd](https://github.com/oregister/openregister-cli/commit/956a9dd634abf09be5cc1df1ac162d9549edd4f7))

## 0.5.3 (2026-07-15)

Full Changelog: [v0.5.2...v0.5.3](https://github.com/oregister/openregister-cli/compare/v0.5.2...v0.5.3)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/goccy/go-yaml v1.18.0
github.com/itchyny/json2yaml v0.1.4
github.com/muesli/reflow v0.3.0
github.com/oregister/openregister-go/v2 v2.8.0
github.com/oregister/openregister-go/v2 v2.10.0
github.com/stretchr/testify v1.10.0
github.com/tidwall/gjson v1.18.0
github.com/tidwall/pretty v1.2.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/oregister/openregister-go/v2 v2.8.0 h1:sMHkjw+rZhjRfnEN/V21DFIkrjgRPrqDb7hPAXI+OBw=
github.com/oregister/openregister-go/v2 v2.8.0/go.mod h1:CCIHIlKhI2GTYzCGjooEWb+Qmclab0n258lUEVuPKkA=
github.com/oregister/openregister-go/v2 v2.10.0 h1:SKV/Kco04Bd88vNo5jhO4WR2sw7swKsjokNV8ZspUZQ=
github.com/oregister/openregister-go/v2 v2.10.0/go.mod h1:CCIHIlKhI2GTYzCGjooEWb+Qmclab0n258lUEVuPKkA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
17 changes: 17 additions & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func init() {
Commands: []*cli.Command{
&searchAutocompleteCompaniesV1,
&searchFindCompaniesV1,
&searchFindInsolvenciesV1,
&searchFindPersonV1,
&searchLookupCompanyByURL,
},
Expand Down Expand Up @@ -155,6 +156,22 @@ func init() {
&transparenzregisterExtractGetV1,
},
},
{
Name: "usage",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&usageGetCreditsV1,
},
},
{
Name: "insolvency",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&insolvencyGetDetailsV1,
},
},
{
Name: "@manpages",
Usage: "Generate documentation for 'man'",
Expand Down
72 changes: 72 additions & 0 deletions pkg/cmd/insolvency.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package cmd

import (
"context"
"fmt"

"github.com/oregister/openregister-cli/internal/apiquery"
"github.com/oregister/openregister-cli/internal/requestflag"
"github.com/oregister/openregister-go/v2"
"github.com/oregister/openregister-go/v2/option"
"github.com/tidwall/gjson"
"github.com/urfave/cli/v3"
)

var insolvencyGetDetailsV1 = cli.Command{
Name: "get-details-v1",
Usage: "Get detailed insolvency proceeding information",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "insolvency-id",
Required: true,
PathParam: "insolvency_id",
},
},
Action: handleInsolvencyGetDetailsV1,
HideHelpCommand: true,
}

func handleInsolvencyGetDetailsV1(ctx context.Context, cmd *cli.Command) error {
client := openregister.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("insolvency-id") && len(unusedArgs) > 0 {
cmd.Set("insolvency-id", unusedArgs[0])
unusedArgs = unusedArgs[1:]
}
if len(unusedArgs) > 0 {
return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs)
}

options, err := flagOptions(
cmd,
apiquery.NestedQueryFormatBrackets,
apiquery.ArrayQueryFormatComma,
EmptyBody,
false,
)
if err != nil {
return err
}

var res []byte
options = append(options, option.WithResponseBodyInto(&res))
_, err = client.Insolvency.GetDetailsV1(ctx, cmd.Value("insolvency-id").(string), options...)
if err != nil {
return err
}

obj := gjson.ParseBytes(res)
format := cmd.Root().String("format")
explicitFormat := cmd.Root().IsSet("format")
transform := cmd.Root().String("transform")
return ShowJSON(obj, ShowJSONOpts{
ExplicitFormat: explicitFormat,
Format: format,
RawOutput: cmd.Root().Bool("raw-output"),
Title: "insolvency get-details-v1",
Transform: transform,
})
}
21 changes: 21 additions & 0 deletions pkg/cmd/insolvency_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package cmd

import (
"testing"

"github.com/oregister/openregister-cli/internal/mocktest"
)

func TestInsolvencyGetDetailsV1(t *testing.T) {
t.Skip("Mock server tests are disabled")
t.Run("regular flags", func(t *testing.T) {
mocktest.TestRunMockTestWithFlags(
t,
"--api-key", "string",
"insolvency", "get-details-v1",
"--insolvency-id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
})
}
6 changes: 6 additions & 0 deletions pkg/cmd/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ var monitorCreate = cli.Command{
Required: true,
BodyPath: "preferences",
},
&requestflag.Flag[string]{
Name: "update-frequency",
Usage: "How often the monitored company is checked for register updates.\nDefaults to `weekly` if not provided.\n\nOnly supported when `entity_type` is `company`. Requests for `person`\nmonitors that include this field are rejected with a validation error.\n\nDaily monitors are billed at a premium: 50 credits at creation and\n50 credits per month while active, instead of the standard 25.\n",
Default: "weekly",
BodyPath: "update_frequency",
},
},
Action: handleMonitorCreate,
HideHelpCommand: true,
Expand Down
4 changes: 3 additions & 1 deletion pkg/cmd/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func TestMonitorCreate(t *testing.T) {
"--entity-id", "entity_id",
"--entity-type", "company",
"--preference", "basic",
"--update-frequency", "daily",
)
})

Expand All @@ -27,7 +28,8 @@ func TestMonitorCreate(t *testing.T) {
"entity_id: entity_id\n" +
"entity_type: company\n" +
"preferences:\n" +
" - basic\n")
" - basic\n" +
"update_frequency: daily\n")
mocktest.TestRunMockTestWithPipeAndFlags(
t, pipeData,
"--api-key", "string",
Expand Down
85 changes: 85 additions & 0 deletions pkg/cmd/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,50 @@ var searchFindCompaniesV1 = requestflag.WithInnerFlags(cli.Command{
},
})

var searchFindInsolvenciesV1 = requestflag.WithInnerFlags(cli.Command{
Name: "find-insolvencies-v1",
Usage: "Search for insolvency proceedings",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[[]map[string]any]{
Name: "filter",
Usage: "Filters to filter insolvency proceedings.\n",
BodyPath: "filters",
},
&requestflag.Flag[map[string]any]{
Name: "pagination",
BodyPath: "pagination",
},
&requestflag.Flag[map[string]any]{
Name: "query",
Usage: "Search query to filter insolvency proceedings.\n",
BodyPath: "query",
},
},
Action: handleSearchFindInsolvenciesV1,
HideHelpCommand: true,
}, map[string][]requestflag.HasOuterFlag{
"pagination": {
&requestflag.InnerFlag[int64]{
Name: "pagination.page",
Usage: "Page number to return.\n",
InnerField: "page",
},
&requestflag.InnerFlag[int64]{
Name: "pagination.per-page",
Usage: "Number of results per page.\n",
InnerField: "per_page",
},
},
"query": {
&requestflag.InnerFlag[string]{
Name: "query.value",
Usage: "Search query to filter insolvency proceedings.\nMatches against debtor name, case number, administrator name and court.\n",
InnerField: "value",
},
},
})

var searchFindPersonV1 = requestflag.WithInnerFlags(cli.Command{
Name: "find-person-v1",
Usage: "Search for people",
Expand Down Expand Up @@ -238,6 +282,47 @@ func handleSearchFindCompaniesV1(ctx context.Context, cmd *cli.Command) error {
})
}

func handleSearchFindInsolvenciesV1(ctx context.Context, cmd *cli.Command) error {
client := openregister.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()

if len(unusedArgs) > 0 {
return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs)
}

options, err := flagOptions(
cmd,
apiquery.NestedQueryFormatBrackets,
apiquery.ArrayQueryFormatComma,
ApplicationJSON,
false,
)
if err != nil {
return err
}

params := openregister.SearchFindInsolvenciesV1Params{}

var res []byte
options = append(options, option.WithResponseBodyInto(&res))
_, err = client.Search.FindInsolvenciesV1(ctx, params, options...)
if err != nil {
return err
}

obj := gjson.ParseBytes(res)
format := cmd.Root().String("format")
explicitFormat := cmd.Root().IsSet("format")
transform := cmd.Root().String("transform")
return ShowJSON(obj, ShowJSONOpts{
ExplicitFormat: explicitFormat,
Format: format,
RawOutput: cmd.Root().Bool("raw-output"),
Title: "search find-insolvencies-v1",
Transform: transform,
})
}

func handleSearchFindPersonV1(ctx context.Context, cmd *cli.Command) error {
client := openregister.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
Expand Down
Loading
Loading