swagger part 1

This commit is contained in:
jay brown
2025-08-05 07:03:35 -07:00
parent 56fb9b4ab6
commit 3de3d0a7b3
27 changed files with 3128 additions and 92 deletions
+301
View File
@@ -26,6 +26,81 @@ func (_m *MockClientInterface) EXPECT() *MockClientInterface_Expecter {
return &MockClientInterface_Expecter{mock: &_m.Mock}
}
// CancelDocumentBatch provides a mock function with given fields: ctx, id, batchId, reqEditors
func (_m *MockClientInterface) CancelDocumentBatch(ctx context.Context, id queryapi.ClientID, batchId queryapi.BatchID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
for _i := range reqEditors {
_va[_i] = reqEditors[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, id, batchId)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for CancelDocumentBatch")
}
var r0 *http.Response
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
return rf(ctx, id, batchId, reqEditors...)
}
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) *http.Response); ok {
r0 = rf(ctx, id, batchId, reqEditors...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) error); ok {
r1 = rf(ctx, id, batchId, reqEditors...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClientInterface_CancelDocumentBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelDocumentBatch'
type MockClientInterface_CancelDocumentBatch_Call struct {
*mock.Call
}
// CancelDocumentBatch is a helper method to define mock.On call
// - ctx context.Context
// - id queryapi.ClientID
// - batchId queryapi.BatchID
// - reqEditors ...queryapi.RequestEditorFn
func (_e *MockClientInterface_Expecter) CancelDocumentBatch(ctx interface{}, id interface{}, batchId interface{}, reqEditors ...interface{}) *MockClientInterface_CancelDocumentBatch_Call {
return &MockClientInterface_CancelDocumentBatch_Call{Call: _e.mock.On("CancelDocumentBatch",
append([]interface{}{ctx, id, batchId}, reqEditors...)...)}
}
func (_c *MockClientInterface_CancelDocumentBatch_Call) Run(run func(ctx context.Context, id queryapi.ClientID, batchId queryapi.BatchID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CancelDocumentBatch_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
for i, a := range args[3:] {
if a != nil {
variadicArgs[i] = a.(queryapi.RequestEditorFn)
}
}
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.BatchID), variadicArgs...)
})
return _c
}
func (_c *MockClientInterface_CancelDocumentBatch_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_CancelDocumentBatch_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClientInterface_CancelDocumentBatch_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CancelDocumentBatch_Call {
_c.Call.Return(run)
return _c
}
// CreateClient provides a mock function with given fields: ctx, body, reqEditors
func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
@@ -620,6 +695,81 @@ func (_c *MockClientInterface_GetDocument_Call) RunAndReturn(run func(context.Co
return _c
}
// GetDocumentBatch provides a mock function with given fields: ctx, id, batchId, reqEditors
func (_m *MockClientInterface) GetDocumentBatch(ctx context.Context, id queryapi.ClientID, batchId queryapi.BatchID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
for _i := range reqEditors {
_va[_i] = reqEditors[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, id, batchId)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetDocumentBatch")
}
var r0 *http.Response
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
return rf(ctx, id, batchId, reqEditors...)
}
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) *http.Response); ok {
r0 = rf(ctx, id, batchId, reqEditors...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) error); ok {
r1 = rf(ctx, id, batchId, reqEditors...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClientInterface_GetDocumentBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDocumentBatch'
type MockClientInterface_GetDocumentBatch_Call struct {
*mock.Call
}
// GetDocumentBatch is a helper method to define mock.On call
// - ctx context.Context
// - id queryapi.ClientID
// - batchId queryapi.BatchID
// - reqEditors ...queryapi.RequestEditorFn
func (_e *MockClientInterface_Expecter) GetDocumentBatch(ctx interface{}, id interface{}, batchId interface{}, reqEditors ...interface{}) *MockClientInterface_GetDocumentBatch_Call {
return &MockClientInterface_GetDocumentBatch_Call{Call: _e.mock.On("GetDocumentBatch",
append([]interface{}{ctx, id, batchId}, reqEditors...)...)}
}
func (_c *MockClientInterface_GetDocumentBatch_Call) Run(run func(ctx context.Context, id queryapi.ClientID, batchId queryapi.BatchID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetDocumentBatch_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
for i, a := range args[3:] {
if a != nil {
variadicArgs[i] = a.(queryapi.RequestEditorFn)
}
}
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.BatchID), variadicArgs...)
})
return _c
}
func (_c *MockClientInterface_GetDocumentBatch_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_GetDocumentBatch_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClientInterface_GetDocumentBatch_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.BatchID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetDocumentBatch_Call {
_c.Call.Return(run)
return _c
}
// GetHomePage provides a mock function with given fields: ctx, reqEditors
func (_m *MockClientInterface) GetHomePage(ctx context.Context, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
@@ -841,6 +991,81 @@ func (_c *MockClientInterface_GetStatusByClientId_Call) RunAndReturn(run func(co
return _c
}
// ListDocumentBatches provides a mock function with given fields: ctx, id, params, reqEditors
func (_m *MockClientInterface) ListDocumentBatches(ctx context.Context, id queryapi.ClientID, params *queryapi.ListDocumentBatchesParams, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
for _i := range reqEditors {
_va[_i] = reqEditors[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, id, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for ListDocumentBatches")
}
var r0 *http.Response
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, *queryapi.ListDocumentBatchesParams, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
return rf(ctx, id, params, reqEditors...)
}
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, *queryapi.ListDocumentBatchesParams, ...queryapi.RequestEditorFn) *http.Response); ok {
r0 = rf(ctx, id, params, reqEditors...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, *queryapi.ListDocumentBatchesParams, ...queryapi.RequestEditorFn) error); ok {
r1 = rf(ctx, id, params, reqEditors...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClientInterface_ListDocumentBatches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDocumentBatches'
type MockClientInterface_ListDocumentBatches_Call struct {
*mock.Call
}
// ListDocumentBatches is a helper method to define mock.On call
// - ctx context.Context
// - id queryapi.ClientID
// - params *queryapi.ListDocumentBatchesParams
// - reqEditors ...queryapi.RequestEditorFn
func (_e *MockClientInterface_Expecter) ListDocumentBatches(ctx interface{}, id interface{}, params interface{}, reqEditors ...interface{}) *MockClientInterface_ListDocumentBatches_Call {
return &MockClientInterface_ListDocumentBatches_Call{Call: _e.mock.On("ListDocumentBatches",
append([]interface{}{ctx, id, params}, reqEditors...)...)}
}
func (_c *MockClientInterface_ListDocumentBatches_Call) Run(run func(ctx context.Context, id queryapi.ClientID, params *queryapi.ListDocumentBatchesParams, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ListDocumentBatches_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3)
for i, a := range args[3:] {
if a != nil {
variadicArgs[i] = a.(queryapi.RequestEditorFn)
}
}
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(*queryapi.ListDocumentBatchesParams), variadicArgs...)
})
return _c
}
func (_c *MockClientInterface_ListDocumentBatches_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_ListDocumentBatches_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClientInterface_ListDocumentBatches_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, *queryapi.ListDocumentBatchesParams, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ListDocumentBatches_Call {
_c.Call.Return(run)
return _c
}
// ListDocumentsByClientId provides a mock function with given fields: ctx, id, reqEditors
func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
@@ -1963,6 +2188,82 @@ func (_c *MockClientInterface_UpdateQueryWithBody_Call) RunAndReturn(run func(co
return _c
}
// UploadDocumentBatchWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
func (_m *MockClientInterface) UploadDocumentBatchWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))
for _i := range reqEditors {
_va[_i] = reqEditors[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, id, contentType, body)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for UploadDocumentBatchWithBody")
}
var r0 *http.Response
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok {
return rf(ctx, id, contentType, body, reqEditors...)
}
if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok {
r0 = rf(ctx, id, contentType, body, reqEditors...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok {
r1 = rf(ctx, id, contentType, body, reqEditors...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClientInterface_UploadDocumentBatchWithBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UploadDocumentBatchWithBody'
type MockClientInterface_UploadDocumentBatchWithBody_Call struct {
*mock.Call
}
// UploadDocumentBatchWithBody is a helper method to define mock.On call
// - ctx context.Context
// - id queryapi.ClientID
// - contentType string
// - body io.Reader
// - reqEditors ...queryapi.RequestEditorFn
func (_e *MockClientInterface_Expecter) UploadDocumentBatchWithBody(ctx interface{}, id interface{}, contentType interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UploadDocumentBatchWithBody_Call {
return &MockClientInterface_UploadDocumentBatchWithBody_Call{Call: _e.mock.On("UploadDocumentBatchWithBody",
append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)}
}
func (_c *MockClientInterface_UploadDocumentBatchWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UploadDocumentBatchWithBody_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4)
for i, a := range args[4:] {
if a != nil {
variadicArgs[i] = a.(queryapi.RequestEditorFn)
}
}
run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...)
})
return _c
}
func (_c *MockClientInterface_UploadDocumentBatchWithBody_Call) Return(_a0 *http.Response, _a1 error) *MockClientInterface_UploadDocumentBatchWithBody_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClientInterface_UploadDocumentBatchWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UploadDocumentBatchWithBody_Call {
_c.Call.Return(run)
return _c
}
// UploadDocumentWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors
func (_m *MockClientInterface) UploadDocumentWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) {
_va := make([]interface{}, len(reqEditors))