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 @@ -48,7 +48,7 @@ jobs:
- name: Link staging branch
if: github.repository == 'CaseMark/casedev-cli-staging'
env:
GO_BRANCH: ${{ github.ref_name }}
GO_BRANCH: ${{ github.head_ref || github.ref_name }}
GO_MODULE_REPO: CaseMark/casedev-go-staging
run: |
./scripts/link "github.com/${GO_MODULE_REPO}@${GO_BRANCH}"
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Link staging branch
if: github.repository == 'CaseMark/casedev-cli-staging'
env:
GO_BRANCH: ${{ github.ref_name }}
GO_BRANCH: ${{ github.head_ref || github.ref_name }}
GO_MODULE_REPO: CaseMark/casedev-go-staging
run: |
./scripts/link "github.com/${GO_MODULE_REPO}@${GO_BRANCH}"
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
- name: Link staging branch
if: github.repository == 'CaseMark/casedev-cli-staging'
env:
GO_BRANCH: ${{ github.ref_name }}
GO_BRANCH: ${{ github.head_ref || github.ref_name }}
GO_MODULE_REPO: CaseMark/casedev-go-staging
run: |
./scripts/link "github.com/${GO_MODULE_REPO}@${GO_BRANCH}"
Expand Down
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 195
configured_endpoints: 215
48 changes: 48 additions & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,27 @@ func init() {
&databaseV1ProjectsListBranches,
},
},
{
Name: "document-templates",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&documentTemplatesCreate,
&documentTemplatesRetrieve,
&documentTemplatesUpdate,
&documentTemplatesList,
&documentTemplatesDelete,
&documentTemplatesConfirm,
},
},
{
Name: "document-templates:from-vault-object",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&documentTemplatesFromVaultObjectCreate,
},
},
{
Name: "format:v1:templates",
Category: "API RESOURCE",
Expand Down Expand Up @@ -237,6 +258,21 @@ func init() {
&legalV1Verify,
},
},
{
Name: "linc:v1:sessions",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&lincV1SessionsCreate,
&lincV1SessionsDelete,
&lincV1SessionsCancel,
&lincV1SessionsIngestEvents,
&lincV1SessionsRetrieveEvents,
&lincV1SessionsRetrieveMessages,
&lincV1SessionsRetrieveState,
&lincV1SessionsSendRpc,
},
},
{
Name: "matters:v1",
Category: "API RESOURCE",
Expand Down Expand Up @@ -386,6 +422,14 @@ func init() {
&mediaV1TranscriptsSearchCreate,
},
},
{
Name: "media:v1:transcripts:retrieve",
Category: "API RESOURCE",
Suggest: true,
Commands: []*cli.Command{
&mediaV1TranscriptsRetrieveCreate,
},
},
{
Name: "ocr:v1",
Category: "API RESOURCE",
Expand Down Expand Up @@ -541,7 +585,9 @@ func init() {
Suggest: true,
Commands: []*cli.Command{
&vaultMultipartAbort,
&vaultMultipartComplete,
&vaultMultipartGetPartURLs,
&vaultMultipartInit,
},
},
{
Expand All @@ -553,13 +599,15 @@ func init() {
&vaultObjectsUpdate,
&vaultObjectsList,
&vaultObjectsDelete,
&vaultObjectsAppend,
&vaultObjectsCreatePresignedURL,
&vaultObjectsDownload,
&vaultObjectsGetChunks,
&vaultObjectsGetOcrWords,
&vaultObjectsGetPages,
&vaultObjectsGetSummarizeJob,
&vaultObjectsGetText,
&vaultObjectsSummarize,
},
},
{
Expand Down
235 changes: 235 additions & 0 deletions pkg/cmd/documenttemplate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package cmd

import (
"context"
"fmt"

"github.com/CaseMark/casedev-cli/internal/apiquery"
"github.com/CaseMark/casedev-cli/internal/requestflag"
"github.com/CaseMark/casedev-go"
"github.com/urfave/cli/v3"
)

var documentTemplatesCreate = cli.Command{
Name: "create",
Usage: "Create document template upload",
Suggest: true,
Flags: []cli.Flag{},
Action: handleDocumentTemplatesCreate,
HideHelpCommand: true,
}

var documentTemplatesRetrieve = cli.Command{
Name: "retrieve",
Usage: "Get document template",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "id",
Required: true,
PathParam: "id",
},
},
Action: handleDocumentTemplatesRetrieve,
HideHelpCommand: true,
}

var documentTemplatesUpdate = cli.Command{
Name: "update",
Usage: "Update document template metadata",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "id",
Required: true,
PathParam: "id",
},
},
Action: handleDocumentTemplatesUpdate,
HideHelpCommand: true,
}

var documentTemplatesList = cli.Command{
Name: "list",
Usage: "List document templates",
Suggest: true,
Flags: []cli.Flag{},
Action: handleDocumentTemplatesList,
HideHelpCommand: true,
}

var documentTemplatesDelete = cli.Command{
Name: "delete",
Usage: "Delete document template",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "id",
Required: true,
PathParam: "id",
},
},
Action: handleDocumentTemplatesDelete,
HideHelpCommand: true,
}

var documentTemplatesConfirm = cli.Command{
Name: "confirm",
Usage: "Confirm document template upload",
Suggest: true,
Flags: []cli.Flag{
&requestflag.Flag[string]{
Name: "id",
Required: true,
PathParam: "id",
},
},
Action: handleDocumentTemplatesConfirm,
HideHelpCommand: true,
}

func handleDocumentTemplatesCreate(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.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,
EmptyBody,
false,
)
if err != nil {
return err
}

return client.DocumentTemplates.New(ctx, options...)

Check failure on line 112 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 112 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 112 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 112 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}

func handleDocumentTemplatesRetrieve(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("id") && len(unusedArgs) > 0 {
cmd.Set("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
}

return client.DocumentTemplates.Get(ctx, cmd.Value("id").(string), options...)

Check failure on line 137 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 137 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 137 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 137 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}

func handleDocumentTemplatesUpdate(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("id") && len(unusedArgs) > 0 {
cmd.Set("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
}

return client.DocumentTemplates.Update(ctx, cmd.Value("id").(string), options...)

Check failure on line 162 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 162 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 162 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 162 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}

func handleDocumentTemplatesList(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.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,
EmptyBody,
false,
)
if err != nil {
return err
}

return client.DocumentTemplates.List(ctx, options...)

Check failure on line 184 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 184 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 184 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 184 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}

func handleDocumentTemplatesDelete(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("id") && len(unusedArgs) > 0 {
cmd.Set("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
}

return client.DocumentTemplates.Delete(ctx, cmd.Value("id").(string), options...)

Check failure on line 209 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 209 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 209 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 209 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}

func handleDocumentTemplatesConfirm(ctx context.Context, cmd *cli.Command) error {
client := githubcomcasemarkcasedevgo.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("id") && len(unusedArgs) > 0 {
cmd.Set("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
}

return client.DocumentTemplates.Confirm(ctx, cmd.Value("id").(string), options...)

Check failure on line 234 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 234 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / lint

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 234 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)

Check failure on line 234 in pkg/cmd/documenttemplate.go

View workflow job for this annotation

GitHub Actions / test

client.DocumentTemplates undefined (type *githubcomcasemarkcasedevgo.Client has no field or method DocumentTemplates)
}
Loading
Loading