Skip to content

Commit

Permalink
feat(sdk): Rework for use version in namespace (#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord authored Sep 2, 2024
1 parent 85976ca commit 07ccff2
Show file tree
Hide file tree
Showing 781 changed files with 42,616 additions and 28,187 deletions.
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sources:
speakeasy:
FROM core+base-image
RUN apk update && apk add yarn jq unzip curl
ARG VERSION=v1.292.0
ARG VERSION=v1.346.0
ARG TARGETARCH
RUN curl -fsSL https://github.com/speakeasy-api/speakeasy/releases/download/${VERSION}/speakeasy_linux_$TARGETARCH.zip -o /tmp/speakeasy_linux_$TARGETARCH.zip
RUN unzip /tmp/speakeasy_linux_$TARGETARCH.zip speakeasy
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (c *CreateController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
PostLogoutRedirectUris: fctl.GetStringSlice(cmd, c.postLogoutRedirectUriFlag),
Scopes: fctl.GetStringSlice(cmd, c.scopes),
}
response, err := store.Client().Auth.CreateClient(cmd.Context(), &request)
response, err := store.Client().Auth.V1.CreateClient(cmd.Context(), &request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (c *DeleteController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
request := operations.DeleteClientRequest{
ClientID: args[0],
}
response, err := store.Client().Auth.DeleteClient(cmd.Context(), request)
response, err := store.Client().Auth.V1.DeleteClient(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (c *ListController) GetStore() *ListStore {
func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

clients, err := store.Client().Auth.ListClients(cmd.Context())
clients, err := store.Client().Auth.V1.ListClients(cmd.Context())
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/secrets/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c *CreateController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
Metadata: nil,
},
}
response, err := store.Client().Auth.CreateSecret(cmd.Context(), request)
response, err := store.Client().Auth.V1.CreateSecret(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/secrets/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *DeleteController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
ClientID: args[0],
SecretID: args[1],
}
response, err := store.Client().Auth.DeleteSecret(cmd.Context(), request)
response, err := store.Client().Auth.V1.DeleteSecret(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *ShowController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
request := operations.ReadClientRequest{
ClientID: args[0],
}
response, err := store.Client().Auth.ReadClient(cmd.Context(), request)
response, err := store.Client().Auth.V1.ReadClient(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/clients/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (c *UpdateController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
Scopes: fctl.GetStringSlice(cmd, c.scopes),
},
}
response, err := store.Client().Auth.UpdateClient(cmd.Context(), request)
response, err := store.Client().Auth.V1.UpdateClient(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/users/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *ListController) GetStore() *ListStore {

func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())
listUsersResponse, err := store.Client().Auth.ListUsers(cmd.Context())
listUsersResponse, err := store.Client().Auth.V1.ListUsers(cmd.Context())
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/auth/users/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *ShowController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
request := operations.ReadUserRequest{
UserID: args[0],
}
readUserResponse, err := store.Client().Auth.ReadUser(cmd.Context(), request)
readUserResponse, err := store.Client().Auth.V1.ReadUser(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/accounts/delete_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *DeleteMetadataController) Run(cmd *cobra.Command, args []string) (fctl.
return nil, fctl.ErrMissingApproval
}

response, err := store.Client().Ledger.V2DeleteAccountMetadata(cmd.Context(), operations.V2DeleteAccountMetadataRequest{
response, err := store.Client().Ledger.V2.DeleteAccountMetadata(cmd.Context(), operations.V2DeleteAccountMetadataRequest{
Address: args[0],
Key: args[1],
Ledger: fctl.GetString(cmd, internal.LedgerFlag),
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/accounts/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
Ledger: fctl.GetString(cmd, internal.LedgerFlag),
Metadata: collectionutils.ConvertMap(metadata, collectionutils.ToAny[string]),
}
rsp, err := store.Client().Ledger.ListAccounts(cmd.Context(), request)
rsp, err := store.Client().Ledger.V1.ListAccounts(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/accounts/set_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *SetMetadataController) Run(cmd *cobra.Command, args []string) (fctl.Ren
Address: address,
RequestBody: collectionutils.ConvertMap(metadata, collectionutils.ToAny[string]),
}
response, err := store.Client().Ledger.AddMetadataToAccount(cmd.Context(), request)
response, err := store.Client().Ledger.V1.AddMetadataToAccount(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/accounts/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (c *ShowController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
store := fctl.GetStackStore(cmd.Context())

ledger := fctl.GetString(cmd, internal.LedgerFlag)
response, err := store.Client().Ledger.GetAccount(cmd.Context(), operations.GetAccountRequest{
response, err := store.Client().Ledger.V1.GetAccount(cmd.Context(), operations.GetAccountRequest{
Address: args[0],
Ledger: ledger,
})
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (c *CreateController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
return nil, err
}

_, err = store.Client().Ledger.V2CreateLedger(cmd.Context(), operations.V2CreateLedgerRequest{
_, err = store.Client().Ledger.V2.CreateLedger(cmd.Context(), operations.V2CreateLedgerRequest{
V2CreateLedgerRequest: &shared.V2CreateLedgerRequest{
Bucket: pointer.For(fctl.GetString(cmd, bucketNameFlag)),
Metadata: metadata,
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/delete_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *DeleteMetadataController) Run(cmd *cobra.Command, args []string) (fctl.
return nil, fctl.ErrMissingApproval
}

response, err := store.Client().Ledger.V2DeleteLedgerMetadata(cmd.Context(), operations.V2DeleteLedgerMetadataRequest{
response, err := store.Client().Ledger.V2.DeleteLedgerMetadata(cmd.Context(), operations.V2DeleteLedgerMetadataRequest{
Key: args[1],
Ledger: args[0],
})
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *ExportController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
ctx = context.WithValue(ctx, "path", out)
}

ret, err := store.Client().Ledger.V2ExportLogs(ctx, operations.V2ExportLogsRequest{
ret, err := store.Client().Ledger.V2.ExportLogs(ctx, operations.V2ExportLogsRequest{
Ledger: fctl.GetString(cmd, internal.LedgerFlag),
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (c *ImportController) GetStore() *ImportStore {
func (c *ImportController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

_, err := store.Client().Ledger.V2ImportLogs(cmd.Context(), operations.V2ImportLogsRequest{
_, err := store.Client().Ledger.V2.ImportLogs(cmd.Context(), operations.V2ImportLogsRequest{
Ledger: args[0],
RequestBody: pointer.For(fmt.Sprintf("file:%s", args[1])),
})
Expand Down
5 changes: 5 additions & 0 deletions components/fctl/cmd/ledger/internal/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ type v2Transaction struct {
shared.V2Transaction
}

func (t v2Transaction) GetID() *big.Int {
//TODO implement me
panic("implement me")
}

func (t v2Transaction) GetPostings() []shared.Posting {
return collectionutils.Map(t.V2Transaction.GetPostings(), func(from shared.V2Posting) shared.Posting {
return shared.Posting{
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/internal/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TransactionIDOrLastN(ctx context.Context, ledgerClient *formance.Formance,
Ledger: ledger,
PageSize: &pageSize,
}
response, err := ledgerClient.Ledger.ListTransactions(ctx, request)
response, err := ledgerClient.Ledger.V1.ListTransactions(ctx, request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *ListController) GetStore() *ListStore {
func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

response, err := store.Client().Ledger.V2ListLedgers(cmd.Context(), operations.V2ListLedgersRequest{})
response, err := store.Client().Ledger.V2.ListLedgers(cmd.Context(), operations.V2ListLedgersRequest{})
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *SendController) Run(cmd *cobra.Command, args []string) (fctl.Renderable

reference := fctl.GetString(cmd, c.referenceFlag)

response, err := store.Client().Ledger.CreateTransaction(cmd.Context(), operations.CreateTransactionRequest{
response, err := store.Client().Ledger.V1.CreateTransaction(cmd.Context(), operations.CreateTransactionRequest{
PostTransaction: shared.PostTransaction{
Metadata: collectionutils.ConvertMap(metadata, collectionutils.ToAny[string]),
Postings: []shared.Posting{
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/serverinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *ServerInfoController) GetStore() *ServerInfoStore {
func (c *ServerInfoController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

response, err := store.Client().Ledger.GetInfo(cmd.Context())
response, err := store.Client().Ledger.V1.GetInfo(cmd.Context())
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/set_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *SetMetadataController) Run(cmd *cobra.Command, args []string) (fctl.Ren
Ledger: args[0],
RequestBody: metadata,
}
response, err := store.Client().Ledger.V2UpdateLedgerMetadata(cmd.Context(), request)
response, err := store.Client().Ledger.V2.UpdateLedgerMetadata(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *StatsController) Run(cmd *cobra.Command, args []string) (fctl.Renderabl
request := operations.ReadStatsRequest{
Ledger: fctl.GetString(cmd, internal.LedgerFlag),
}
response, err := store.Client().Ledger.ReadStats(cmd.Context(), request)
response, err := store.Client().Ledger.V1.ReadStats(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/transactions/delete_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (c *DeleteMetadataController) Run(cmd *cobra.Command, args []string) (fctl.
return nil, fctl.ErrMissingApproval
}

response, err := store.Client().Ledger.V2DeleteTransactionMetadata(cmd.Context(), operations.V2DeleteTransactionMetadataRequest{
response, err := store.Client().Ledger.V2.DeleteTransactionMetadata(cmd.Context(), operations.V2DeleteTransactionMetadataRequest{
ID: transactionID,
Key: args[1],
Ledger: fctl.GetString(cmd, internal.LedgerFlag),
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/transactions/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
}
req.Metadata = collectionutils.ConvertMap(metadata, collectionutils.ToAny[string])

response, err := store.Client().Ledger.ListTransactions(cmd.Context(), req)
response, err := store.Client().Ledger.V1.ListTransactions(cmd.Context(), req)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/transactions/num.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (c *NumController) Run(cmd *cobra.Command, args []string) (fctl.Renderable,

ledger := fctl.GetString(cmd, internal.LedgerFlag)

response, err := store.Client().Ledger.CreateTransaction(cmd.Context(), operations.CreateTransactionRequest{
response, err := store.Client().Ledger.V1.CreateTransaction(cmd.Context(), operations.CreateTransactionRequest{
PostTransaction: shared.PostTransaction{
Metadata: collectionutils.ConvertMap(metadata, collectionutils.ToAny[string]),
Reference: &reference,
Expand Down
4 changes: 2 additions & 2 deletions components/fctl/cmd/ledger/transactions/revert.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (c *RevertController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
AtEffectiveDate: pointer.For(true),
}

response, err := store.Client().Ledger.V2RevertTransaction(cmd.Context(), request)
response, err := store.Client().Ledger.V2.RevertTransaction(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand All @@ -75,7 +75,7 @@ func (c *RevertController) Run(cmd *cobra.Command, args []string) (fctl.Renderab
Txid: txId,
}

response, err := store.Client().Ledger.RevertTransaction(cmd.Context(), request)
response, err := store.Client().Ledger.V1.RevertTransaction(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/transactions/set_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (c *SetMetadataController) Run(cmd *cobra.Command, args []string) (fctl.Ren
Txid: transactionID,
RequestBody: collectionutils.ConvertMap(metadata, collectionutils.ToAny[string]),
}
response, err := store.Client().Ledger.AddMetadataOnTransaction(cmd.Context(), request)
response, err := store.Client().Ledger.V1.AddMetadataOnTransaction(cmd.Context(), request)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/transactions/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (c *ShowController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
return nil, err
}

response, err := store.Client().Ledger.GetTransaction(cmd.Context(), operations.GetTransactionRequest{
response, err := store.Client().Ledger.V1.GetTransaction(cmd.Context(), operations.GetTransactionRequest{
Ledger: ledger,
Txid: txId,
})
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/ledger/volumes/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (c *ListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable
GroupBy: &groupBy,
}

response, err := store.Client().Ledger.V2GetVolumesWithBalances(cmd.Context(), request)
response, err := store.Client().Ledger.V2.GetVolumesWithBalances(cmd.Context(), request)

if err != nil {
return nil, errors.Wrap(err, "Get Volumes With Balances")
Expand Down
4 changes: 2 additions & 2 deletions components/fctl/cmd/orchestration/instances/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *InstancesDescribeController) GetStore() *InstancesDescribeStore {
func (c *InstancesDescribeController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

response, err := store.Client().Orchestration.GetInstanceHistory(cmd.Context(), operations.GetInstanceHistoryRequest{
response, err := store.Client().Orchestration.V1.GetInstanceHistory(cmd.Context(), operations.GetInstanceHistoryRequest{
InstanceID: args[0],
})
if err != nil {
Expand Down Expand Up @@ -142,7 +142,7 @@ func printStage(cmd *cobra.Command, i int, client *formance.Formance, id string,
stageDestinationName(history.Input.StageSend.Destination))
fctl.Println()

stageResponse, err := client.Orchestration.GetInstanceStageHistory(cmd.Context(), operations.GetInstanceStageHistoryRequest{
stageResponse, err := client.Orchestration.V1.GetInstanceStageHistory(cmd.Context(), operations.GetInstanceStageHistoryRequest{
InstanceID: id,
Number: int64(i),
})
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/instances/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (c *InstancesListController) GetStore() *InstancesListStore {
func (c *InstancesListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

response, err := store.Client().Orchestration.ListInstances(cmd.Context(), operations.ListInstancesRequest{
response, err := store.Client().Orchestration.V1.ListInstances(cmd.Context(), operations.ListInstancesRequest{
Running: fctl.Ptr(fctl.GetBool(cmd, c.runningFlag)),
WorkflowID: fctl.Ptr(fctl.GetString(cmd, c.workflowFlag)),
})
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/instances/send_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (c *InstancesSendEventController) GetStore() *InstancesSendEventStore {

func (c *InstancesSendEventController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())
_, err := store.Client().Orchestration.SendEvent(cmd.Context(), operations.SendEventRequest{
_, err := store.Client().Orchestration.V1.SendEvent(cmd.Context(), operations.SendEventRequest{
RequestBody: &operations.SendEventRequestBody{
Name: args[1],
},
Expand Down
4 changes: 2 additions & 2 deletions components/fctl/cmd/orchestration/instances/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ func (c *InstancesShowController) GetStore() *InstancesShowStore {
func (c *InstancesShowController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

res, err := store.Client().Orchestration.GetInstance(cmd.Context(), operations.GetInstanceRequest{
res, err := store.Client().Orchestration.V1.GetInstance(cmd.Context(), operations.GetInstanceRequest{
InstanceID: args[0],
})
if err != nil {
return nil, errors.Wrap(err, "reading instance")
}

c.store.WorkflowInstance = res.GetWorkflowInstanceResponse.Data
response, err := store.Client().Orchestration.GetWorkflow(cmd.Context(), operations.GetWorkflowRequest{
response, err := store.Client().Orchestration.V1.GetWorkflow(cmd.Context(), operations.GetWorkflowRequest{
FlowID: res.GetWorkflowInstanceResponse.Data.WorkflowID,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/instances/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *InstancesStopController) GetStore() *InstancesStopStore {
func (c *InstancesStopController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

_, err := store.Client().Orchestration.CancelEvent(cmd.Context(), operations.CancelEventRequest{
_, err := store.Client().Orchestration.V1.CancelEvent(cmd.Context(), operations.CancelEventRequest{
InstanceID: args[0],
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/triggers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c *TriggersCreateController) Run(cmd *cobra.Command, args []string) (fctl.
}
}

res, err := store.Client().Orchestration.CreateTrigger(cmd.Context(), data)
res, err := store.Client().Orchestration.V1.CreateTrigger(cmd.Context(), data)
if err != nil {
return nil, errors.Wrap(err, "reading trigger")
}
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/triggers/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *TriggersDeleteController) GetStore() *TriggersDeleteStore {

func (c *TriggersDeleteController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())
_, err := store.Client().Orchestration.DeleteTrigger(cmd.Context(), operations.DeleteTriggerRequest{
_, err := store.Client().Orchestration.V1.DeleteTrigger(cmd.Context(), operations.DeleteTriggerRequest{
TriggerID: args[0],
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion components/fctl/cmd/orchestration/triggers/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *TriggersListController) GetStore() *TriggersListStore {
func (c *TriggersListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())
var name = fctl.GetString(cmd, c.nameFlag)
response, err := store.Client().Orchestration.ListTriggers(cmd.Context(), operations.ListTriggersRequest{
response, err := store.Client().Orchestration.V1.ListTriggers(cmd.Context(), operations.ListTriggersRequest{
Name: &name,
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *OccurrencesListController) GetStore() *OccurrencesListStore {
func (c *OccurrencesListController) Run(cmd *cobra.Command, args []string) (fctl.Renderable, error) {
store := fctl.GetStackStore(cmd.Context())

response, err := store.Client().Orchestration.ListTriggersOccurrences(cmd.Context(), operations.ListTriggersOccurrencesRequest{
response, err := store.Client().Orchestration.V1.ListTriggersOccurrences(cmd.Context(), operations.ListTriggersOccurrencesRequest{
TriggerID: args[0],
})
if err != nil {
Expand Down
Loading

0 comments on commit 07ccff2

Please sign in to comment.