v0.1.1
Vernon Keenan 2023-09-12 03:49:57 +00:00
parent e2d3ad3a4e
commit 2471c0520f
43 changed files with 6425 additions and 14860 deletions

View File

@ -23,7 +23,7 @@ var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "auth.vernonkeenan.com:8080"
DefaultHost string = "auth.work.tnxs.net:8080"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
DefaultBasePath string = "/v1"

View File

@ -18,7 +18,7 @@ import (
"github.com/go-openapi/swag"
)
// UserResponse An array Taxnexus user objects
// UserResponse An array user objects
//
// swagger:model UserResponse
type UserResponse struct {

View File

@ -0,0 +1,86 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package app_log
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new app log API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for app log API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
PostAppLogs(params *PostAppLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAppLogsOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
PostAppLogs posts app log messages
Insert app log messages into workflow storage
*/
func (a *Client) PostAppLogs(params *PostAppLogsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAppLogsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostAppLogsParams()
}
op := &runtime.ClientOperation{
ID: "postAppLogs",
Method: "POST",
PathPattern: "/applogs",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostAppLogsReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*PostAppLogsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for postAppLogs: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -0,0 +1,157 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package app_log
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
)
// NewPostAppLogsParams creates a new PostAppLogsParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewPostAppLogsParams() *PostAppLogsParams {
return &PostAppLogsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostAppLogsParamsWithTimeout creates a new PostAppLogsParams object
// with the ability to set a timeout on a request.
func NewPostAppLogsParamsWithTimeout(timeout time.Duration) *PostAppLogsParams {
return &PostAppLogsParams{
timeout: timeout,
}
}
// NewPostAppLogsParamsWithContext creates a new PostAppLogsParams object
// with the ability to set a context for a request.
func NewPostAppLogsParamsWithContext(ctx context.Context) *PostAppLogsParams {
return &PostAppLogsParams{
Context: ctx,
}
}
// NewPostAppLogsParamsWithHTTPClient creates a new PostAppLogsParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostAppLogsParamsWithHTTPClient(client *http.Client) *PostAppLogsParams {
return &PostAppLogsParams{
HTTPClient: client,
}
}
/*
PostAppLogsParams contains all the parameters to send to the API endpoint
for the post app logs operation.
Typically these are written to a http.Request.
*/
type PostAppLogsParams struct {
/* AppLogRequest.
An array of new AppLog records
*/
AppLogRequest *workflow_models.AppLogRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post app logs params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAppLogsParams) WithDefaults() *PostAppLogsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post app logs params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAppLogsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post app logs params
func (o *PostAppLogsParams) WithTimeout(timeout time.Duration) *PostAppLogsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post app logs params
func (o *PostAppLogsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post app logs params
func (o *PostAppLogsParams) WithContext(ctx context.Context) *PostAppLogsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post app logs params
func (o *PostAppLogsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post app logs params
func (o *PostAppLogsParams) WithHTTPClient(client *http.Client) *PostAppLogsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post app logs params
func (o *PostAppLogsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAppLogRequest adds the appLogRequest to the post app logs params
func (o *PostAppLogsParams) WithAppLogRequest(appLogRequest *workflow_models.AppLogRequest) *PostAppLogsParams {
o.SetAppLogRequest(appLogRequest)
return o
}
// SetAppLogRequest adds the appLogRequest to the post app logs params
func (o *PostAppLogsParams) SetAppLogRequest(appLogRequest *workflow_models.AppLogRequest) {
o.AppLogRequest = appLogRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostAppLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.AppLogRequest != nil {
if err := r.SetBodyParam(o.AppLogRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,531 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package app_log
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
)
// PostAppLogsReader is a Reader for the PostAppLogs structure.
type PostAppLogsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostAppLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostAppLogsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostAppLogsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostAppLogsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostAppLogsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostAppLogsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostAppLogsInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewPostAppLogsOK creates a PostAppLogsOK with default headers values
func NewPostAppLogsOK() *PostAppLogsOK {
return &PostAppLogsOK{}
}
/*
PostAppLogsOK describes a response with status code 200, with default header values.
Array of AppLogs
*/
type PostAppLogsOK struct {
AccessControlAllowOrigin string
Payload *workflow_models.AppLogResponse
}
// IsSuccess returns true when this post app logs o k response has a 2xx status code
func (o *PostAppLogsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post app logs o k response has a 3xx status code
func (o *PostAppLogsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs o k response has a 4xx status code
func (o *PostAppLogsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post app logs o k response has a 5xx status code
func (o *PostAppLogsOK) IsServerError() bool {
return false
}
// IsCode returns true when this post app logs o k response a status code equal to that given
func (o *PostAppLogsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post app logs o k response
func (o *PostAppLogsOK) Code() int {
return 200
}
func (o *PostAppLogsOK) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsOK %+v", 200, o.Payload)
}
func (o *PostAppLogsOK) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsOK %+v", 200, o.Payload)
}
func (o *PostAppLogsOK) GetPayload() *workflow_models.AppLogResponse {
return o.Payload
}
func (o *PostAppLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.AppLogResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostAppLogsUnauthorized creates a PostAppLogsUnauthorized with default headers values
func NewPostAppLogsUnauthorized() *PostAppLogsUnauthorized {
return &PostAppLogsUnauthorized{}
}
/*
PostAppLogsUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostAppLogsUnauthorized struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post app logs unauthorized response has a 2xx status code
func (o *PostAppLogsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post app logs unauthorized response has a 3xx status code
func (o *PostAppLogsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs unauthorized response has a 4xx status code
func (o *PostAppLogsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post app logs unauthorized response has a 5xx status code
func (o *PostAppLogsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post app logs unauthorized response a status code equal to that given
func (o *PostAppLogsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post app logs unauthorized response
func (o *PostAppLogsUnauthorized) Code() int {
return 401
}
func (o *PostAppLogsUnauthorized) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnauthorized %+v", 401, o.Payload)
}
func (o *PostAppLogsUnauthorized) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnauthorized %+v", 401, o.Payload)
}
func (o *PostAppLogsUnauthorized) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostAppLogsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostAppLogsForbidden creates a PostAppLogsForbidden with default headers values
func NewPostAppLogsForbidden() *PostAppLogsForbidden {
return &PostAppLogsForbidden{}
}
/*
PostAppLogsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostAppLogsForbidden struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post app logs forbidden response has a 2xx status code
func (o *PostAppLogsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post app logs forbidden response has a 3xx status code
func (o *PostAppLogsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs forbidden response has a 4xx status code
func (o *PostAppLogsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post app logs forbidden response has a 5xx status code
func (o *PostAppLogsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post app logs forbidden response a status code equal to that given
func (o *PostAppLogsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post app logs forbidden response
func (o *PostAppLogsForbidden) Code() int {
return 403
}
func (o *PostAppLogsForbidden) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsForbidden %+v", 403, o.Payload)
}
func (o *PostAppLogsForbidden) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsForbidden %+v", 403, o.Payload)
}
func (o *PostAppLogsForbidden) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostAppLogsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostAppLogsNotFound creates a PostAppLogsNotFound with default headers values
func NewPostAppLogsNotFound() *PostAppLogsNotFound {
return &PostAppLogsNotFound{}
}
/*
PostAppLogsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostAppLogsNotFound struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post app logs not found response has a 2xx status code
func (o *PostAppLogsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post app logs not found response has a 3xx status code
func (o *PostAppLogsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs not found response has a 4xx status code
func (o *PostAppLogsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post app logs not found response has a 5xx status code
func (o *PostAppLogsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post app logs not found response a status code equal to that given
func (o *PostAppLogsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post app logs not found response
func (o *PostAppLogsNotFound) Code() int {
return 404
}
func (o *PostAppLogsNotFound) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsNotFound %+v", 404, o.Payload)
}
func (o *PostAppLogsNotFound) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsNotFound %+v", 404, o.Payload)
}
func (o *PostAppLogsNotFound) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostAppLogsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostAppLogsUnprocessableEntity creates a PostAppLogsUnprocessableEntity with default headers values
func NewPostAppLogsUnprocessableEntity() *PostAppLogsUnprocessableEntity {
return &PostAppLogsUnprocessableEntity{}
}
/*
PostAppLogsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostAppLogsUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post app logs unprocessable entity response has a 2xx status code
func (o *PostAppLogsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post app logs unprocessable entity response has a 3xx status code
func (o *PostAppLogsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs unprocessable entity response has a 4xx status code
func (o *PostAppLogsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post app logs unprocessable entity response has a 5xx status code
func (o *PostAppLogsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post app logs unprocessable entity response a status code equal to that given
func (o *PostAppLogsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post app logs unprocessable entity response
func (o *PostAppLogsUnprocessableEntity) Code() int {
return 422
}
func (o *PostAppLogsUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostAppLogsUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostAppLogsUnprocessableEntity) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostAppLogsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostAppLogsInternalServerError creates a PostAppLogsInternalServerError with default headers values
func NewPostAppLogsInternalServerError() *PostAppLogsInternalServerError {
return &PostAppLogsInternalServerError{}
}
/*
PostAppLogsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostAppLogsInternalServerError struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post app logs internal server error response has a 2xx status code
func (o *PostAppLogsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post app logs internal server error response has a 3xx status code
func (o *PostAppLogsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post app logs internal server error response has a 4xx status code
func (o *PostAppLogsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post app logs internal server error response has a 5xx status code
func (o *PostAppLogsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post app logs internal server error response a status code equal to that given
func (o *PostAppLogsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post app logs internal server error response
func (o *PostAppLogsInternalServerError) Code() int {
return 500
}
func (o *PostAppLogsInternalServerError) Error() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsInternalServerError %+v", 500, o.Payload)
}
func (o *PostAppLogsInternalServerError) String() string {
return fmt.Sprintf("[POST /applogs][%d] postAppLogsInternalServerError %+v", 500, o.Payload)
}
func (o *PostAppLogsInternalServerError) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostAppLogsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}

View File

@ -0,0 +1,132 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewAppLogOptionsParams creates a new AppLogOptionsParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewAppLogOptionsParams() *AppLogOptionsParams {
return &AppLogOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewAppLogOptionsParamsWithTimeout creates a new AppLogOptionsParams object
// with the ability to set a timeout on a request.
func NewAppLogOptionsParamsWithTimeout(timeout time.Duration) *AppLogOptionsParams {
return &AppLogOptionsParams{
timeout: timeout,
}
}
// NewAppLogOptionsParamsWithContext creates a new AppLogOptionsParams object
// with the ability to set a context for a request.
func NewAppLogOptionsParamsWithContext(ctx context.Context) *AppLogOptionsParams {
return &AppLogOptionsParams{
Context: ctx,
}
}
// NewAppLogOptionsParamsWithHTTPClient creates a new AppLogOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewAppLogOptionsParamsWithHTTPClient(client *http.Client) *AppLogOptionsParams {
return &AppLogOptionsParams{
HTTPClient: client,
}
}
/*
AppLogOptionsParams contains all the parameters to send to the API endpoint
for the app log options operation.
Typically these are written to a http.Request.
*/
type AppLogOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the app log options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AppLogOptionsParams) WithDefaults() *AppLogOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the app log options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *AppLogOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the app log options params
func (o *AppLogOptionsParams) WithTimeout(timeout time.Duration) *AppLogOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the app log options params
func (o *AppLogOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the app log options params
func (o *AppLogOptionsParams) WithContext(ctx context.Context) *AppLogOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the app log options params
func (o *AppLogOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the app log options params
func (o *AppLogOptionsParams) WithHTTPClient(client *http.Client) *AppLogOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the app log options params
func (o *AppLogOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *AppLogOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,148 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// AppLogOptionsReader is a Reader for the AppLogOptions structure.
type AppLogOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *AppLogOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewAppLogOptionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewAppLogOptionsOK creates a AppLogOptionsOK with default headers values
func NewAppLogOptionsOK() *AppLogOptionsOK {
return &AppLogOptionsOK{}
}
/*
AppLogOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type AppLogOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this app log options o k response has a 2xx status code
func (o *AppLogOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this app log options o k response has a 3xx status code
func (o *AppLogOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this app log options o k response has a 4xx status code
func (o *AppLogOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this app log options o k response has a 5xx status code
func (o *AppLogOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this app log options o k response a status code equal to that given
func (o *AppLogOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the app log options o k response
func (o *AppLogOptionsOK) Code() int {
return 200
}
func (o *AppLogOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /applogs][%d] appLogOptionsOK ", 200)
}
func (o *AppLogOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /applogs][%d] appLogOptionsOK ", 200)
}
func (o *AppLogOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Credentials
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
if hdrAccessControlAllowCredentials != "" {
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
}
// hydrates response header Access-Control-Allow-Headers
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
if hdrAccessControlAllowHeaders != "" {
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
}
// hydrates response header Access-Control-Allow-Methods
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
if hdrAccessControlAllowMethods != "" {
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
}
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Access-Control-Expose-Headers
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
if hdrAccessControlExposeHeaders != "" {
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
}
// hydrates response header Access-Control-Max-Age
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
if hdrAccessControlMaxAge != "" {
o.AccessControlMaxAge = hdrAccessControlMaxAge
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
return nil
}

View File

@ -0,0 +1,163 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new cors API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for cors API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
AppLogOptions(params *AppLogOptionsParams, opts ...ClientOption) (*AppLogOptionsOK, error)
EmailMessageOptions(params *EmailMessageOptionsParams, opts ...ClientOption) (*EmailMessageOptionsOK, error)
OutgoingEmailMessageOptions(params *OutgoingEmailMessageOptionsParams, opts ...ClientOption) (*OutgoingEmailMessageOptionsOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
AppLogOptions CORS support
*/
func (a *Client) AppLogOptions(params *AppLogOptionsParams, opts ...ClientOption) (*AppLogOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewAppLogOptionsParams()
}
op := &runtime.ClientOperation{
ID: "appLogOptions",
Method: "OPTIONS",
PathPattern: "/applogs",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &AppLogOptionsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*AppLogOptionsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for appLogOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
EmailMessageOptions CORS support
*/
func (a *Client) EmailMessageOptions(params *EmailMessageOptionsParams, opts ...ClientOption) (*EmailMessageOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewEmailMessageOptionsParams()
}
op := &runtime.ClientOperation{
ID: "emailMessageOptions",
Method: "OPTIONS",
PathPattern: "/emailmessages",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &EmailMessageOptionsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*EmailMessageOptionsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for emailMessageOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
OutgoingEmailMessageOptions CORS support
*/
func (a *Client) OutgoingEmailMessageOptions(params *OutgoingEmailMessageOptionsParams, opts ...ClientOption) (*OutgoingEmailMessageOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewOutgoingEmailMessageOptionsParams()
}
op := &runtime.ClientOperation{
ID: "outgoingEmailMessageOptions",
Method: "OPTIONS",
PathPattern: "/outgoingemailmessages",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &OutgoingEmailMessageOptionsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*OutgoingEmailMessageOptionsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for outgoingEmailMessageOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -0,0 +1,132 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewEmailMessageOptionsParams creates a new EmailMessageOptionsParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewEmailMessageOptionsParams() *EmailMessageOptionsParams {
return &EmailMessageOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewEmailMessageOptionsParamsWithTimeout creates a new EmailMessageOptionsParams object
// with the ability to set a timeout on a request.
func NewEmailMessageOptionsParamsWithTimeout(timeout time.Duration) *EmailMessageOptionsParams {
return &EmailMessageOptionsParams{
timeout: timeout,
}
}
// NewEmailMessageOptionsParamsWithContext creates a new EmailMessageOptionsParams object
// with the ability to set a context for a request.
func NewEmailMessageOptionsParamsWithContext(ctx context.Context) *EmailMessageOptionsParams {
return &EmailMessageOptionsParams{
Context: ctx,
}
}
// NewEmailMessageOptionsParamsWithHTTPClient creates a new EmailMessageOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewEmailMessageOptionsParamsWithHTTPClient(client *http.Client) *EmailMessageOptionsParams {
return &EmailMessageOptionsParams{
HTTPClient: client,
}
}
/*
EmailMessageOptionsParams contains all the parameters to send to the API endpoint
for the email message options operation.
Typically these are written to a http.Request.
*/
type EmailMessageOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the email message options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *EmailMessageOptionsParams) WithDefaults() *EmailMessageOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the email message options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *EmailMessageOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the email message options params
func (o *EmailMessageOptionsParams) WithTimeout(timeout time.Duration) *EmailMessageOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the email message options params
func (o *EmailMessageOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the email message options params
func (o *EmailMessageOptionsParams) WithContext(ctx context.Context) *EmailMessageOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the email message options params
func (o *EmailMessageOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the email message options params
func (o *EmailMessageOptionsParams) WithHTTPClient(client *http.Client) *EmailMessageOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the email message options params
func (o *EmailMessageOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *EmailMessageOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,148 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// EmailMessageOptionsReader is a Reader for the EmailMessageOptions structure.
type EmailMessageOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *EmailMessageOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewEmailMessageOptionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewEmailMessageOptionsOK creates a EmailMessageOptionsOK with default headers values
func NewEmailMessageOptionsOK() *EmailMessageOptionsOK {
return &EmailMessageOptionsOK{}
}
/*
EmailMessageOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type EmailMessageOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this email message options o k response has a 2xx status code
func (o *EmailMessageOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this email message options o k response has a 3xx status code
func (o *EmailMessageOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this email message options o k response has a 4xx status code
func (o *EmailMessageOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this email message options o k response has a 5xx status code
func (o *EmailMessageOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this email message options o k response a status code equal to that given
func (o *EmailMessageOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the email message options o k response
func (o *EmailMessageOptionsOK) Code() int {
return 200
}
func (o *EmailMessageOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /emailmessages][%d] emailMessageOptionsOK ", 200)
}
func (o *EmailMessageOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /emailmessages][%d] emailMessageOptionsOK ", 200)
}
func (o *EmailMessageOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Credentials
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
if hdrAccessControlAllowCredentials != "" {
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
}
// hydrates response header Access-Control-Allow-Headers
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
if hdrAccessControlAllowHeaders != "" {
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
}
// hydrates response header Access-Control-Allow-Methods
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
if hdrAccessControlAllowMethods != "" {
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
}
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Access-Control-Expose-Headers
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
if hdrAccessControlExposeHeaders != "" {
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
}
// hydrates response header Access-Control-Max-Age
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
if hdrAccessControlMaxAge != "" {
o.AccessControlMaxAge = hdrAccessControlMaxAge
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
return nil
}

View File

@ -0,0 +1,132 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewOutgoingEmailMessageOptionsParams creates a new OutgoingEmailMessageOptionsParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewOutgoingEmailMessageOptionsParams() *OutgoingEmailMessageOptionsParams {
return &OutgoingEmailMessageOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewOutgoingEmailMessageOptionsParamsWithTimeout creates a new OutgoingEmailMessageOptionsParams object
// with the ability to set a timeout on a request.
func NewOutgoingEmailMessageOptionsParamsWithTimeout(timeout time.Duration) *OutgoingEmailMessageOptionsParams {
return &OutgoingEmailMessageOptionsParams{
timeout: timeout,
}
}
// NewOutgoingEmailMessageOptionsParamsWithContext creates a new OutgoingEmailMessageOptionsParams object
// with the ability to set a context for a request.
func NewOutgoingEmailMessageOptionsParamsWithContext(ctx context.Context) *OutgoingEmailMessageOptionsParams {
return &OutgoingEmailMessageOptionsParams{
Context: ctx,
}
}
// NewOutgoingEmailMessageOptionsParamsWithHTTPClient creates a new OutgoingEmailMessageOptionsParams object
// with the ability to set a custom HTTPClient for a request.
func NewOutgoingEmailMessageOptionsParamsWithHTTPClient(client *http.Client) *OutgoingEmailMessageOptionsParams {
return &OutgoingEmailMessageOptionsParams{
HTTPClient: client,
}
}
/*
OutgoingEmailMessageOptionsParams contains all the parameters to send to the API endpoint
for the outgoing email message options operation.
Typically these are written to a http.Request.
*/
type OutgoingEmailMessageOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the outgoing email message options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *OutgoingEmailMessageOptionsParams) WithDefaults() *OutgoingEmailMessageOptionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the outgoing email message options params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *OutgoingEmailMessageOptionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) WithTimeout(timeout time.Duration) *OutgoingEmailMessageOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) WithContext(ctx context.Context) *OutgoingEmailMessageOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) WithHTTPClient(client *http.Client) *OutgoingEmailMessageOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the outgoing email message options params
func (o *OutgoingEmailMessageOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *OutgoingEmailMessageOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,148 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// OutgoingEmailMessageOptionsReader is a Reader for the OutgoingEmailMessageOptions structure.
type OutgoingEmailMessageOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *OutgoingEmailMessageOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewOutgoingEmailMessageOptionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewOutgoingEmailMessageOptionsOK creates a OutgoingEmailMessageOptionsOK with default headers values
func NewOutgoingEmailMessageOptionsOK() *OutgoingEmailMessageOptionsOK {
return &OutgoingEmailMessageOptionsOK{}
}
/*
OutgoingEmailMessageOptionsOK describes a response with status code 200, with default header values.
CORS OPTIONS response
*/
type OutgoingEmailMessageOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
// IsSuccess returns true when this outgoing email message options o k response has a 2xx status code
func (o *OutgoingEmailMessageOptionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this outgoing email message options o k response has a 3xx status code
func (o *OutgoingEmailMessageOptionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this outgoing email message options o k response has a 4xx status code
func (o *OutgoingEmailMessageOptionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this outgoing email message options o k response has a 5xx status code
func (o *OutgoingEmailMessageOptionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this outgoing email message options o k response a status code equal to that given
func (o *OutgoingEmailMessageOptionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the outgoing email message options o k response
func (o *OutgoingEmailMessageOptionsOK) Code() int {
return 200
}
func (o *OutgoingEmailMessageOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /outgoingemailmessages][%d] outgoingEmailMessageOptionsOK ", 200)
}
func (o *OutgoingEmailMessageOptionsOK) String() string {
return fmt.Sprintf("[OPTIONS /outgoingemailmessages][%d] outgoingEmailMessageOptionsOK ", 200)
}
func (o *OutgoingEmailMessageOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Credentials
hdrAccessControlAllowCredentials := response.GetHeader("Access-Control-Allow-Credentials")
if hdrAccessControlAllowCredentials != "" {
o.AccessControlAllowCredentials = hdrAccessControlAllowCredentials
}
// hydrates response header Access-Control-Allow-Headers
hdrAccessControlAllowHeaders := response.GetHeader("Access-Control-Allow-Headers")
if hdrAccessControlAllowHeaders != "" {
o.AccessControlAllowHeaders = hdrAccessControlAllowHeaders
}
// hydrates response header Access-Control-Allow-Methods
hdrAccessControlAllowMethods := response.GetHeader("Access-Control-Allow-Methods")
if hdrAccessControlAllowMethods != "" {
o.AccessControlAllowMethods = hdrAccessControlAllowMethods
}
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Access-Control-Expose-Headers
hdrAccessControlExposeHeaders := response.GetHeader("Access-Control-Expose-Headers")
if hdrAccessControlExposeHeaders != "" {
o.AccessControlExposeHeaders = hdrAccessControlExposeHeaders
}
// hydrates response header Access-Control-Max-Age
hdrAccessControlMaxAge := response.GetHeader("Access-Control-Max-Age")
if hdrAccessControlMaxAge != "" {
o.AccessControlMaxAge = hdrAccessControlMaxAge
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
return nil
}

View File

@ -0,0 +1,86 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new email message API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for email message API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetEmailMessages(params *GetEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEmailMessagesOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
GetEmailMessages gets email messages from data store
Retrieves email messages from workflow storage
*/
func (a *Client) GetEmailMessages(params *GetEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetEmailMessagesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetEmailMessagesParams()
}
op := &runtime.ClientOperation{
ID: "getEmailMessages",
Method: "GET",
PathPattern: "/emailmessages",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetEmailMessagesReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*GetEmailMessagesOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for getEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -0,0 +1,167 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewGetEmailMessagesParams creates a new GetEmailMessagesParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewGetEmailMessagesParams() *GetEmailMessagesParams {
return &GetEmailMessagesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetEmailMessagesParamsWithTimeout creates a new GetEmailMessagesParams object
// with the ability to set a timeout on a request.
func NewGetEmailMessagesParamsWithTimeout(timeout time.Duration) *GetEmailMessagesParams {
return &GetEmailMessagesParams{
timeout: timeout,
}
}
// NewGetEmailMessagesParamsWithContext creates a new GetEmailMessagesParams object
// with the ability to set a context for a request.
func NewGetEmailMessagesParamsWithContext(ctx context.Context) *GetEmailMessagesParams {
return &GetEmailMessagesParams{
Context: ctx,
}
}
// NewGetEmailMessagesParamsWithHTTPClient creates a new GetEmailMessagesParams object
// with the ability to set a custom HTTPClient for a request.
func NewGetEmailMessagesParamsWithHTTPClient(client *http.Client) *GetEmailMessagesParams {
return &GetEmailMessagesParams{
HTTPClient: client,
}
}
/*
GetEmailMessagesParams contains all the parameters to send to the API endpoint
for the get email messages operation.
Typically these are written to a http.Request.
*/
type GetEmailMessagesParams struct {
/* EmailMessageID.
Email Message ID
*/
EmailMessageID *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get email messages params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEmailMessagesParams) WithDefaults() *GetEmailMessagesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get email messages params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetEmailMessagesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get email messages params
func (o *GetEmailMessagesParams) WithTimeout(timeout time.Duration) *GetEmailMessagesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get email messages params
func (o *GetEmailMessagesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get email messages params
func (o *GetEmailMessagesParams) WithContext(ctx context.Context) *GetEmailMessagesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get email messages params
func (o *GetEmailMessagesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get email messages params
func (o *GetEmailMessagesParams) WithHTTPClient(client *http.Client) *GetEmailMessagesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get email messages params
func (o *GetEmailMessagesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithEmailMessageID adds the emailMessageID to the get email messages params
func (o *GetEmailMessagesParams) WithEmailMessageID(emailMessageID *string) *GetEmailMessagesParams {
o.SetEmailMessageID(emailMessageID)
return o
}
// SetEmailMessageID adds the emailMessageId to the get email messages params
func (o *GetEmailMessagesParams) SetEmailMessageID(emailMessageID *string) {
o.EmailMessageID = emailMessageID
}
// WriteToRequest writes these params to a swagger request
func (o *GetEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.EmailMessageID != nil {
// query param emailMessageId
var qrEmailMessageID string
if o.EmailMessageID != nil {
qrEmailMessageID = *o.EmailMessageID
}
qEmailMessageID := qrEmailMessageID
if qEmailMessageID != "" {
if err := r.SetQueryParam("emailMessageId", qEmailMessageID); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,531 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
)
// GetEmailMessagesReader is a Reader for the GetEmailMessages structure.
type GetEmailMessagesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetEmailMessagesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetEmailMessagesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetEmailMessagesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetEmailMessagesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetEmailMessagesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetEmailMessagesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewGetEmailMessagesOK creates a GetEmailMessagesOK with default headers values
func NewGetEmailMessagesOK() *GetEmailMessagesOK {
return &GetEmailMessagesOK{}
}
/*
GetEmailMessagesOK describes a response with status code 200, with default header values.
Array of Email Messages
*/
type GetEmailMessagesOK struct {
AccessControlAllowOrigin string
Payload *workflow_models.EmailMessagesResponse
}
// IsSuccess returns true when this get email messages o k response has a 2xx status code
func (o *GetEmailMessagesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get email messages o k response has a 3xx status code
func (o *GetEmailMessagesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages o k response has a 4xx status code
func (o *GetEmailMessagesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get email messages o k response has a 5xx status code
func (o *GetEmailMessagesOK) IsServerError() bool {
return false
}
// IsCode returns true when this get email messages o k response a status code equal to that given
func (o *GetEmailMessagesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get email messages o k response
func (o *GetEmailMessagesOK) Code() int {
return 200
}
func (o *GetEmailMessagesOK) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesOK %+v", 200, o.Payload)
}
func (o *GetEmailMessagesOK) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesOK %+v", 200, o.Payload)
}
func (o *GetEmailMessagesOK) GetPayload() *workflow_models.EmailMessagesResponse {
return o.Payload
}
func (o *GetEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.EmailMessagesResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEmailMessagesUnauthorized creates a GetEmailMessagesUnauthorized with default headers values
func NewGetEmailMessagesUnauthorized() *GetEmailMessagesUnauthorized {
return &GetEmailMessagesUnauthorized{}
}
/*
GetEmailMessagesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetEmailMessagesUnauthorized struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this get email messages unauthorized response has a 2xx status code
func (o *GetEmailMessagesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get email messages unauthorized response has a 3xx status code
func (o *GetEmailMessagesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages unauthorized response has a 4xx status code
func (o *GetEmailMessagesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get email messages unauthorized response has a 5xx status code
func (o *GetEmailMessagesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get email messages unauthorized response a status code equal to that given
func (o *GetEmailMessagesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get email messages unauthorized response
func (o *GetEmailMessagesUnauthorized) Code() int {
return 401
}
func (o *GetEmailMessagesUnauthorized) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEmailMessagesUnauthorized) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload)
}
func (o *GetEmailMessagesUnauthorized) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *GetEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEmailMessagesForbidden creates a GetEmailMessagesForbidden with default headers values
func NewGetEmailMessagesForbidden() *GetEmailMessagesForbidden {
return &GetEmailMessagesForbidden{}
}
/*
GetEmailMessagesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetEmailMessagesForbidden struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this get email messages forbidden response has a 2xx status code
func (o *GetEmailMessagesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get email messages forbidden response has a 3xx status code
func (o *GetEmailMessagesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages forbidden response has a 4xx status code
func (o *GetEmailMessagesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get email messages forbidden response has a 5xx status code
func (o *GetEmailMessagesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get email messages forbidden response a status code equal to that given
func (o *GetEmailMessagesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get email messages forbidden response
func (o *GetEmailMessagesForbidden) Code() int {
return 403
}
func (o *GetEmailMessagesForbidden) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesForbidden %+v", 403, o.Payload)
}
func (o *GetEmailMessagesForbidden) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesForbidden %+v", 403, o.Payload)
}
func (o *GetEmailMessagesForbidden) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *GetEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEmailMessagesNotFound creates a GetEmailMessagesNotFound with default headers values
func NewGetEmailMessagesNotFound() *GetEmailMessagesNotFound {
return &GetEmailMessagesNotFound{}
}
/*
GetEmailMessagesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetEmailMessagesNotFound struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this get email messages not found response has a 2xx status code
func (o *GetEmailMessagesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get email messages not found response has a 3xx status code
func (o *GetEmailMessagesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages not found response has a 4xx status code
func (o *GetEmailMessagesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get email messages not found response has a 5xx status code
func (o *GetEmailMessagesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get email messages not found response a status code equal to that given
func (o *GetEmailMessagesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get email messages not found response
func (o *GetEmailMessagesNotFound) Code() int {
return 404
}
func (o *GetEmailMessagesNotFound) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesNotFound %+v", 404, o.Payload)
}
func (o *GetEmailMessagesNotFound) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesNotFound %+v", 404, o.Payload)
}
func (o *GetEmailMessagesNotFound) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *GetEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEmailMessagesUnprocessableEntity creates a GetEmailMessagesUnprocessableEntity with default headers values
func NewGetEmailMessagesUnprocessableEntity() *GetEmailMessagesUnprocessableEntity {
return &GetEmailMessagesUnprocessableEntity{}
}
/*
GetEmailMessagesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetEmailMessagesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this get email messages unprocessable entity response has a 2xx status code
func (o *GetEmailMessagesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get email messages unprocessable entity response has a 3xx status code
func (o *GetEmailMessagesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages unprocessable entity response has a 4xx status code
func (o *GetEmailMessagesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get email messages unprocessable entity response has a 5xx status code
func (o *GetEmailMessagesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get email messages unprocessable entity response a status code equal to that given
func (o *GetEmailMessagesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get email messages unprocessable entity response
func (o *GetEmailMessagesUnprocessableEntity) Code() int {
return 422
}
func (o *GetEmailMessagesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEmailMessagesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetEmailMessagesUnprocessableEntity) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *GetEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetEmailMessagesInternalServerError creates a GetEmailMessagesInternalServerError with default headers values
func NewGetEmailMessagesInternalServerError() *GetEmailMessagesInternalServerError {
return &GetEmailMessagesInternalServerError{}
}
/*
GetEmailMessagesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetEmailMessagesInternalServerError struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this get email messages internal server error response has a 2xx status code
func (o *GetEmailMessagesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get email messages internal server error response has a 3xx status code
func (o *GetEmailMessagesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get email messages internal server error response has a 4xx status code
func (o *GetEmailMessagesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get email messages internal server error response has a 5xx status code
func (o *GetEmailMessagesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get email messages internal server error response a status code equal to that given
func (o *GetEmailMessagesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get email messages internal server error response
func (o *GetEmailMessagesInternalServerError) Code() int {
return 500
}
func (o *GetEmailMessagesInternalServerError) Error() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEmailMessagesInternalServerError) String() string {
return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload)
}
func (o *GetEmailMessagesInternalServerError) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *GetEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}

View File

@ -0,0 +1,86 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package outgoing_email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new outgoing email message API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for outgoing email message API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostOutgoingEmailMessagesOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
PostOutgoingEmailMessages adds new email messages to the outgoing queue
Insert new email messages into workflow storage
*/
func (a *Client) PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostOutgoingEmailMessagesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostOutgoingEmailMessagesParams()
}
op := &runtime.ClientOperation{
ID: "postOutgoingEmailMessages",
Method: "POST",
PathPattern: "/outgoingemailmessages",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &PostOutgoingEmailMessagesReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
if err != nil {
return nil, err
}
success, ok := result.(*PostOutgoingEmailMessagesOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for postOutgoingEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -0,0 +1,157 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package outgoing_email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
)
// NewPostOutgoingEmailMessagesParams creates a new PostOutgoingEmailMessagesParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewPostOutgoingEmailMessagesParams() *PostOutgoingEmailMessagesParams {
return &PostOutgoingEmailMessagesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostOutgoingEmailMessagesParamsWithTimeout creates a new PostOutgoingEmailMessagesParams object
// with the ability to set a timeout on a request.
func NewPostOutgoingEmailMessagesParamsWithTimeout(timeout time.Duration) *PostOutgoingEmailMessagesParams {
return &PostOutgoingEmailMessagesParams{
timeout: timeout,
}
}
// NewPostOutgoingEmailMessagesParamsWithContext creates a new PostOutgoingEmailMessagesParams object
// with the ability to set a context for a request.
func NewPostOutgoingEmailMessagesParamsWithContext(ctx context.Context) *PostOutgoingEmailMessagesParams {
return &PostOutgoingEmailMessagesParams{
Context: ctx,
}
}
// NewPostOutgoingEmailMessagesParamsWithHTTPClient creates a new PostOutgoingEmailMessagesParams object
// with the ability to set a custom HTTPClient for a request.
func NewPostOutgoingEmailMessagesParamsWithHTTPClient(client *http.Client) *PostOutgoingEmailMessagesParams {
return &PostOutgoingEmailMessagesParams{
HTTPClient: client,
}
}
/*
PostOutgoingEmailMessagesParams contains all the parameters to send to the API endpoint
for the post outgoing email messages operation.
Typically these are written to a http.Request.
*/
type PostOutgoingEmailMessagesParams struct {
/* OutgoingEmailMessageRequest.
An array of new Outgoing Email Message records
*/
OutgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post outgoing email messages params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostOutgoingEmailMessagesParams) WithDefaults() *PostOutgoingEmailMessagesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post outgoing email messages params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostOutgoingEmailMessagesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) WithTimeout(timeout time.Duration) *PostOutgoingEmailMessagesParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) WithContext(ctx context.Context) *PostOutgoingEmailMessagesParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) WithHTTPClient(client *http.Client) *PostOutgoingEmailMessagesParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithOutgoingEmailMessageRequest adds the outgoingEmailMessageRequest to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) WithOutgoingEmailMessageRequest(outgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest) *PostOutgoingEmailMessagesParams {
o.SetOutgoingEmailMessageRequest(outgoingEmailMessageRequest)
return o
}
// SetOutgoingEmailMessageRequest adds the outgoingEmailMessageRequest to the post outgoing email messages params
func (o *PostOutgoingEmailMessagesParams) SetOutgoingEmailMessageRequest(outgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest) {
o.OutgoingEmailMessageRequest = outgoingEmailMessageRequest
}
// WriteToRequest writes these params to a swagger request
func (o *PostOutgoingEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.OutgoingEmailMessageRequest != nil {
if err := r.SetBodyParam(o.OutgoingEmailMessageRequest); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -0,0 +1,531 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package outgoing_email_message
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
)
// PostOutgoingEmailMessagesReader is a Reader for the PostOutgoingEmailMessages structure.
type PostOutgoingEmailMessagesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostOutgoingEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostOutgoingEmailMessagesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostOutgoingEmailMessagesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostOutgoingEmailMessagesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostOutgoingEmailMessagesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostOutgoingEmailMessagesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostOutgoingEmailMessagesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
}
}
// NewPostOutgoingEmailMessagesOK creates a PostOutgoingEmailMessagesOK with default headers values
func NewPostOutgoingEmailMessagesOK() *PostOutgoingEmailMessagesOK {
return &PostOutgoingEmailMessagesOK{}
}
/*
PostOutgoingEmailMessagesOK describes a response with status code 200, with default header values.
Array of Email Messages
*/
type PostOutgoingEmailMessagesOK struct {
AccessControlAllowOrigin string
Payload *workflow_models.EmailMessagesResponse
}
// IsSuccess returns true when this post outgoing email messages o k response has a 2xx status code
func (o *PostOutgoingEmailMessagesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post outgoing email messages o k response has a 3xx status code
func (o *PostOutgoingEmailMessagesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages o k response has a 4xx status code
func (o *PostOutgoingEmailMessagesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post outgoing email messages o k response has a 5xx status code
func (o *PostOutgoingEmailMessagesOK) IsServerError() bool {
return false
}
// IsCode returns true when this post outgoing email messages o k response a status code equal to that given
func (o *PostOutgoingEmailMessagesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post outgoing email messages o k response
func (o *PostOutgoingEmailMessagesOK) Code() int {
return 200
}
func (o *PostOutgoingEmailMessagesOK) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload)
}
func (o *PostOutgoingEmailMessagesOK) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload)
}
func (o *PostOutgoingEmailMessagesOK) GetPayload() *workflow_models.EmailMessagesResponse {
return o.Payload
}
func (o *PostOutgoingEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.EmailMessagesResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostOutgoingEmailMessagesUnauthorized creates a PostOutgoingEmailMessagesUnauthorized with default headers values
func NewPostOutgoingEmailMessagesUnauthorized() *PostOutgoingEmailMessagesUnauthorized {
return &PostOutgoingEmailMessagesUnauthorized{}
}
/*
PostOutgoingEmailMessagesUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostOutgoingEmailMessagesUnauthorized struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post outgoing email messages unauthorized response has a 2xx status code
func (o *PostOutgoingEmailMessagesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post outgoing email messages unauthorized response has a 3xx status code
func (o *PostOutgoingEmailMessagesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages unauthorized response has a 4xx status code
func (o *PostOutgoingEmailMessagesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post outgoing email messages unauthorized response has a 5xx status code
func (o *PostOutgoingEmailMessagesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post outgoing email messages unauthorized response a status code equal to that given
func (o *PostOutgoingEmailMessagesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post outgoing email messages unauthorized response
func (o *PostOutgoingEmailMessagesUnauthorized) Code() int {
return 401
}
func (o *PostOutgoingEmailMessagesUnauthorized) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload)
}
func (o *PostOutgoingEmailMessagesUnauthorized) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload)
}
func (o *PostOutgoingEmailMessagesUnauthorized) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostOutgoingEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostOutgoingEmailMessagesForbidden creates a PostOutgoingEmailMessagesForbidden with default headers values
func NewPostOutgoingEmailMessagesForbidden() *PostOutgoingEmailMessagesForbidden {
return &PostOutgoingEmailMessagesForbidden{}
}
/*
PostOutgoingEmailMessagesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostOutgoingEmailMessagesForbidden struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post outgoing email messages forbidden response has a 2xx status code
func (o *PostOutgoingEmailMessagesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post outgoing email messages forbidden response has a 3xx status code
func (o *PostOutgoingEmailMessagesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages forbidden response has a 4xx status code
func (o *PostOutgoingEmailMessagesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post outgoing email messages forbidden response has a 5xx status code
func (o *PostOutgoingEmailMessagesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post outgoing email messages forbidden response a status code equal to that given
func (o *PostOutgoingEmailMessagesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post outgoing email messages forbidden response
func (o *PostOutgoingEmailMessagesForbidden) Code() int {
return 403
}
func (o *PostOutgoingEmailMessagesForbidden) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload)
}
func (o *PostOutgoingEmailMessagesForbidden) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload)
}
func (o *PostOutgoingEmailMessagesForbidden) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostOutgoingEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostOutgoingEmailMessagesNotFound creates a PostOutgoingEmailMessagesNotFound with default headers values
func NewPostOutgoingEmailMessagesNotFound() *PostOutgoingEmailMessagesNotFound {
return &PostOutgoingEmailMessagesNotFound{}
}
/*
PostOutgoingEmailMessagesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostOutgoingEmailMessagesNotFound struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post outgoing email messages not found response has a 2xx status code
func (o *PostOutgoingEmailMessagesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post outgoing email messages not found response has a 3xx status code
func (o *PostOutgoingEmailMessagesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages not found response has a 4xx status code
func (o *PostOutgoingEmailMessagesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post outgoing email messages not found response has a 5xx status code
func (o *PostOutgoingEmailMessagesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post outgoing email messages not found response a status code equal to that given
func (o *PostOutgoingEmailMessagesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post outgoing email messages not found response
func (o *PostOutgoingEmailMessagesNotFound) Code() int {
return 404
}
func (o *PostOutgoingEmailMessagesNotFound) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload)
}
func (o *PostOutgoingEmailMessagesNotFound) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload)
}
func (o *PostOutgoingEmailMessagesNotFound) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostOutgoingEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostOutgoingEmailMessagesUnprocessableEntity creates a PostOutgoingEmailMessagesUnprocessableEntity with default headers values
func NewPostOutgoingEmailMessagesUnprocessableEntity() *PostOutgoingEmailMessagesUnprocessableEntity {
return &PostOutgoingEmailMessagesUnprocessableEntity{}
}
/*
PostOutgoingEmailMessagesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostOutgoingEmailMessagesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post outgoing email messages unprocessable entity response has a 2xx status code
func (o *PostOutgoingEmailMessagesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post outgoing email messages unprocessable entity response has a 3xx status code
func (o *PostOutgoingEmailMessagesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages unprocessable entity response has a 4xx status code
func (o *PostOutgoingEmailMessagesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post outgoing email messages unprocessable entity response has a 5xx status code
func (o *PostOutgoingEmailMessagesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post outgoing email messages unprocessable entity response a status code equal to that given
func (o *PostOutgoingEmailMessagesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post outgoing email messages unprocessable entity response
func (o *PostOutgoingEmailMessagesUnprocessableEntity) Code() int {
return 422
}
func (o *PostOutgoingEmailMessagesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostOutgoingEmailMessagesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostOutgoingEmailMessagesUnprocessableEntity) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostOutgoingEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostOutgoingEmailMessagesInternalServerError creates a PostOutgoingEmailMessagesInternalServerError with default headers values
func NewPostOutgoingEmailMessagesInternalServerError() *PostOutgoingEmailMessagesInternalServerError {
return &PostOutgoingEmailMessagesInternalServerError{}
}
/*
PostOutgoingEmailMessagesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostOutgoingEmailMessagesInternalServerError struct {
AccessControlAllowOrigin string
Payload *workflow_models.Error
}
// IsSuccess returns true when this post outgoing email messages internal server error response has a 2xx status code
func (o *PostOutgoingEmailMessagesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post outgoing email messages internal server error response has a 3xx status code
func (o *PostOutgoingEmailMessagesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post outgoing email messages internal server error response has a 4xx status code
func (o *PostOutgoingEmailMessagesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post outgoing email messages internal server error response has a 5xx status code
func (o *PostOutgoingEmailMessagesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post outgoing email messages internal server error response a status code equal to that given
func (o *PostOutgoingEmailMessagesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post outgoing email messages internal server error response
func (o *PostOutgoingEmailMessagesInternalServerError) Code() int {
return 500
}
func (o *PostOutgoingEmailMessagesInternalServerError) Error() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload)
}
func (o *PostOutgoingEmailMessagesInternalServerError) String() string {
return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload)
}
func (o *PostOutgoingEmailMessagesInternalServerError) GetPayload() *workflow_models.Error {
return o.Payload
}
func (o *PostOutgoingEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
o.Payload = new(workflow_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}

View File

@ -0,0 +1,131 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_client
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/app_log"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/cors"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/email_message"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/outgoing_email_message"
)
// Default workflow HTTP client.
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "workflow.work.tnxs.net:8080"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
DefaultBasePath string = "/v1"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
var DefaultSchemes = []string{"http"}
// NewHTTPClient creates a new workflow HTTP client.
func NewHTTPClient(formats strfmt.Registry) *Workflow {
return NewHTTPClientWithConfig(formats, nil)
}
// NewHTTPClientWithConfig creates a new workflow HTTP client,
// using a customizable transport config.
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Workflow {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
}
// New creates a new workflow client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Workflow {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(Workflow)
cli.Transport = transport
cli.AppLog = app_log.New(transport, formats)
cli.Cors = cors.New(transport, formats)
cli.EmailMessage = email_message.New(transport, formats)
cli.OutgoingEmailMessage = outgoing_email_message.New(transport, formats)
return cli
}
// DefaultTransportConfig creates a TransportConfig with the
// default settings taken from the meta section of the spec file.
func DefaultTransportConfig() *TransportConfig {
return &TransportConfig{
Host: DefaultHost,
BasePath: DefaultBasePath,
Schemes: DefaultSchemes,
}
}
// TransportConfig contains the transport related info,
// found in the meta section of the spec file.
type TransportConfig struct {
Host string
BasePath string
Schemes []string
}
// WithHost overrides the default host,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
}
// WithBasePath overrides the default basePath,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
}
// WithSchemes overrides the default schemes,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
}
// Workflow is a client for workflow
type Workflow struct {
AppLog app_log.ClientService
Cors cors.ClientService
EmailMessage email_message.ClientService
OutgoingEmailMessage outgoing_email_message.ClientService
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *Workflow) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.AppLog.SetTransport(transport)
c.Cors.SetTransport(transport)
c.EmailMessage.SetTransport(transport)
c.OutgoingEmailMessage.SetTransport(transport)
}

View File

@ -0,0 +1,84 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// AppLog Application Log for human consumption
//
// swagger:model AppLog
type AppLog struct {
// account ID
AccountID string `json:"AccountID,omitempty"`
// company ID
CompanyID string `json:"CompanyID,omitempty"`
// created by ID
CreatedByID string `json:"CreatedByID,omitempty"`
// created date
CreatedDate string `json:"CreatedDate,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// message
Message string `json:"Message,omitempty"`
// object ID
ObjectID string `json:"ObjectID,omitempty"`
// object type
ObjectType string `json:"ObjectType,omitempty"`
// severity
Severity string `json:"Severity,omitempty"`
// source
Source string `json:"Source,omitempty"`
// source timestamp
SourceTimestamp string `json:"SourceTimestamp,omitempty"`
}
// Validate validates this app log
func (m *AppLog) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this app log based on context it is used
func (m *AppLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *AppLog) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AppLog) UnmarshalBinary(b []byte) error {
var res AppLog
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// AppLogRequest An array Application Log objects
//
// swagger:model AppLogRequest
type AppLogRequest struct {
// data
Data []*AppLog `json:"data"`
// meta
Meta *RequestMeta `json:"meta,omitempty"`
}
// Validate validates this app log request
func (m *AppLogRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if err := m.validateMeta(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AppLogRequest) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *AppLogRequest) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// ContextValidate validate this app log request based on the context it is used
func (m *AppLogRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AppLogRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *AppLogRequest) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AppLogRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AppLogRequest) UnmarshalBinary(b []byte) error {
var res AppLogRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// AppLogResponse An array Application Log objects
//
// swagger:model AppLogResponse
type AppLogResponse struct {
// data
Data []*AppLog `json:"data"`
// meta
Meta *ResponseMeta `json:"meta,omitempty"`
}
// Validate validates this app log response
func (m *AppLogResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if err := m.validateMeta(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AppLogResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *AppLogResponse) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// ContextValidate validate this app log response based on the context it is used
func (m *AppLogResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AppLogResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *AppLogResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *AppLogResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AppLogResponse) UnmarshalBinary(b []byte) error {
var res AppLogResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,233 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Document Document
//
// swagger:model Document
type Document struct {
// archived by ID
ArchivedByID string `json:"ArchivedByID,omitempty"`
// archived date
ArchivedDate string `json:"ArchivedDate,omitempty"`
// author ID
AuthorID string `json:"AuthorID,omitempty"`
// body
// Format: byte
Body strfmt.Base64 `json:"Body,omitempty"`
// body length
BodyLength int64 `json:"BodyLength,omitempty"`
// comment count
CommentCount int64 `json:"CommentCount,omitempty"`
// connection ID
ConnectionID string `json:"ConnectionID,omitempty"`
// content asset ID
ContentAssetID string `json:"ContentAssetID,omitempty"`
// content modification date
ContentModificationDate string `json:"ContentModificationDate,omitempty"`
// content size
ContentSize int64 `json:"ContentSize,omitempty"`
// content type
ContentType string `json:"ContentType,omitempty"`
// content version document ID
ContentVersionDocumentID string `json:"ContentVersionDocumentID,omitempty"`
// contnet document ID
ContnetDocumentID string `json:"ContnetDocumentID,omitempty"`
// created by ID
CreatedByID string `json:"CreatedByID,omitempty"`
// created date
CreatedDate string `json:"CreatedDate,omitempty"`
// d date
DDate string `json:"DDate,omitempty"`
// description
Description string `json:"Description,omitempty"`
// developer name
DeveloperName string `json:"DeveloperName,omitempty"`
// discount
Discount float64 `json:"Discount,omitempty"`
// document
// Format: byte
Document strfmt.Base64 `json:"Document,omitempty"`
// document ID
DocumentID string `json:"DocumentID,omitempty"`
// document sequence
DocumentSequence int64 `json:"DocumentSequence,omitempty"`
// field
Field string `json:"Field,omitempty"`
// file extension
FileExtension string `json:"FileExtension,omitempty"`
// file type
FileType string `json:"FileType,omitempty"`
// folder ID
FolderID string `json:"FolderID,omitempty"`
// grand total
GrandTotal string `json:"GrandTotal,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// inserted by ID
InsertedByID string `json:"InsertedByID,omitempty"`
// is archived
IsArchived bool `json:"IsArchived,omitempty"`
// is body searchable
IsBodySearchable bool `json:"IsBodySearchable,omitempty"`
// is comment sub
IsCommentSub bool `json:"IsCommentSub,omitempty"`
// is document sub
IsDocumentSub bool `json:"IsDocumentSub,omitempty"`
// is internal use only
IsInternalUseOnly bool `json:"IsInternalUseOnly,omitempty"`
// is public
IsPublic bool `json:"IsPublic,omitempty"`
// is rich text
IsRichText bool `json:"IsRichText,omitempty"`
// keywords
Keywords string `json:"Keywords,omitempty"`
// last modified by ID
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
// last modified date
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
// last viewed date
LastViewedDate string `json:"LastViewedDate,omitempty"`
// latst published version ID
LatstPublishedVersionID string `json:"LatstPublishedVersionID,omitempty"`
// like count
LikeCount int64 `json:"LikeCount,omitempty"`
// link URL
LinkURL string `json:"LinkURL,omitempty"`
// linked entity ID
LinkedEntityID string `json:"LinkedEntityID,omitempty"`
// name
Name string `json:"Name,omitempty"`
// namespace prefix
NamespacePrefix string `json:"NamespacePrefix,omitempty"`
// network scope
NetworkScope string `json:"NetworkScope,omitempty"`
// owner ID
OwnerID string `json:"OwnerID,omitempty"`
// parent ID
ParentID string `json:"ParentID,omitempty"`
// publishstatus
Publishstatus string `json:"Publishstatus,omitempty"`
// quote ID
QuoteID string `json:"QuoteID,omitempty"`
// related record ID
RelatedRecordID string `json:"RelatedRecordID,omitempty"`
// share type
ShareType string `json:"ShareType,omitempty"`
// sharing option
SharingOption string `json:"SharingOption,omitempty"`
// sharing privacy
SharingPrivacy string `json:"SharingPrivacy,omitempty"`
// title
Title string `json:"Title,omitempty"`
// type
Type string `json:"Type,omitempty"`
// URL
URL string `json:"URL,omitempty"`
// user ID
UserID string `json:"UserID,omitempty"`
// visibility
Visibility string `json:"Visibility,omitempty"`
}
// Validate validates this document
func (m *Document) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this document based on context it is used
func (m *Document) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Document) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Document) UnmarshalBinary(b []byte) error {
var res Document
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,203 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EmailMessage email message
//
// swagger:model EmailMessage
type EmailMessage struct {
// activity ID
ActivityID string `json:"ActivityID,omitempty"`
// b c c address
BCCAddress string `json:"BCCAddress,omitempty"`
// c c address
CCAddress string `json:"CCAddress,omitempty"`
// created by ID
CreatedByID string `json:"CreatedByID,omitempty"`
// created date
CreatedDate string `json:"CreatedDate,omitempty"`
// email message ID
EmailMessageID string `json:"EmailMessageID,omitempty"`
// from address
FromAddress string `json:"FromAddress,omitempty"`
// from name
FromName string `json:"FromName,omitempty"`
// HTML
// Format: byte
HTML strfmt.Base64 `json:"HTML,omitempty"`
// has attachment
HasAttachment bool `json:"HasAttachment,omitempty"`
// headers
Headers *Headers `json:"Headers,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// incoming
Incoming bool `json:"Incoming,omitempty"`
// is client managed
IsClientManaged bool `json:"IsClientManaged,omitempty"`
// is externally managed
IsExternallyManaged bool `json:"IsExternallyManaged,omitempty"`
// last modified by ID
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
// last modified date
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
// message date
MessageDate string `json:"MessageDate,omitempty"`
// message identifier
MessageIdentifier string `json:"MessageIdentifier,omitempty"`
// parent ID
ParentID string `json:"ParentID,omitempty"`
// related to ID
RelatedToID string `json:"RelatedToID,omitempty"`
// relation address
RelationAddress string `json:"RelationAddress,omitempty"`
// relation ID
RelationID string `json:"RelationID,omitempty"`
// relation object type
RelationObjectType string `json:"RelationObjectType,omitempty"`
// relation type
RelationType string `json:"RelationType,omitempty"`
// reply to email message ID
ReplyToEmailMessageID string `json:"ReplyToEmailMessageID,omitempty"`
// status
Status string `json:"Status,omitempty"`
// subject
Subject string `json:"Subject,omitempty"`
// text
// Format: byte
Text strfmt.Base64 `json:"Text,omitempty"`
// thread identifier
ThreadIdentifier string `json:"ThreadIdentifier,omitempty"`
// to address
ToAddress string `json:"ToAddress,omitempty"`
// validated from address
ValidatedFromAddress string `json:"ValidatedFromAddress,omitempty"`
}
// Validate validates this email message
func (m *EmailMessage) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateHeaders(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessage) validateHeaders(formats strfmt.Registry) error {
if swag.IsZero(m.Headers) { // not required
return nil
}
if m.Headers != nil {
if err := m.Headers.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Headers")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Headers")
}
return err
}
}
return nil
}
// ContextValidate validate this email message based on the context it is used
func (m *EmailMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateHeaders(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessage) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error {
if m.Headers != nil {
if err := m.Headers.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Headers")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Headers")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *EmailMessage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EmailMessage) UnmarshalBinary(b []byte) error {
var res EmailMessage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EmailMessageRequest An array Send Email Message objects
//
// swagger:model EmailMessageRequest
type EmailMessageRequest struct {
// data
Data []*EmailMessage `json:"data"`
// meta
Meta *RequestMeta `json:"meta,omitempty"`
}
// Validate validates this email message request
func (m *EmailMessageRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if err := m.validateMeta(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessageRequest) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *EmailMessageRequest) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// ContextValidate validate this email message request based on the context it is used
func (m *EmailMessageRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessageRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *EmailMessageRequest) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *EmailMessageRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EmailMessageRequest) UnmarshalBinary(b []byte) error {
var res EmailMessageRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// EmailMessagesResponse An array user objects
//
// swagger:model EmailMessagesResponse
type EmailMessagesResponse struct {
// data
Data []*EmailMessage `json:"data"`
// meta
Meta *ResponseMeta `json:"meta,omitempty"`
}
// Validate validates this email messages response
func (m *EmailMessagesResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if err := m.validateMeta(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessagesResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *EmailMessagesResponse) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// ContextValidate validate this email messages response based on the context it is used
func (m *EmailMessagesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EmailMessagesResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *EmailMessagesResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *EmailMessagesResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EmailMessagesResponse) UnmarshalBinary(b []byte) error {
var res EmailMessagesResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,60 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Error error
//
// swagger:model Error
type Error struct {
// code
Code int32 `json:"Code,omitempty"`
// fields
Fields string `json:"Fields,omitempty"`
// message
Message string `json:"Message,omitempty"`
}
// Validate validates this error
func (m *Error) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this error based on context it is used
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Error) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Error) UnmarshalBinary(b []byte) error {
var res Error
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,57 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Headers headers
//
// swagger:model Headers
type Headers struct {
// key
Key string `json:"Key,omitempty"`
// values
Values [][]string `json:"Values"`
}
// Validate validates this headers
func (m *Headers) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this headers based on context it is used
func (m *Headers) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Headers) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Headers) UnmarshalBinary(b []byte) error {
var res Headers
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,153 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// OutgoingEmailMessage A new email message to be sent
//
// swagger:model OutgoingEmailMessage
type OutgoingEmailMessage struct {
// b c c address
BCCAddress string `json:"BCCAddress,omitempty"`
// c c address
CCAddress string `json:"CCAddress,omitempty"`
// email message ID
EmailMessageID string `json:"EmailMessageID,omitempty"`
// email template ID
EmailTemplateID string `json:"EmailTemplateID,omitempty"`
// external ID
ExternalID string `json:"ExternalID,omitempty"`
// from contact ID
FromContactID string `json:"FromContactID,omitempty"`
// from name
FromName string `json:"FromName,omitempty"`
// HTML
HTML string `json:"HTML,omitempty"`
// headers
Headers *Headers `json:"Headers,omitempty"`
// ID
ID string `json:"ID,omitempty"`
// subject
Subject string `json:"Subject,omitempty"`
// text
Text string `json:"Text,omitempty"`
// to address
ToAddress string `json:"ToAddress,omitempty"`
// to name
ToName string `json:"ToName,omitempty"`
// validated from address
ValidatedFromAddress string `json:"ValidatedFromAddress,omitempty"`
// who ID
WhoID string `json:"WhoID,omitempty"`
}
// Validate validates this outgoing email message
func (m *OutgoingEmailMessage) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateHeaders(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *OutgoingEmailMessage) validateHeaders(formats strfmt.Registry) error {
if swag.IsZero(m.Headers) { // not required
return nil
}
if m.Headers != nil {
if err := m.Headers.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Headers")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Headers")
}
return err
}
}
return nil
}
// ContextValidate validate this outgoing email message based on the context it is used
func (m *OutgoingEmailMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateHeaders(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *OutgoingEmailMessage) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error {
if m.Headers != nil {
if err := m.Headers.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Headers")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("Headers")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *OutgoingEmailMessage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OutgoingEmailMessage) UnmarshalBinary(b []byte) error {
var res OutgoingEmailMessage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,166 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// OutgoingEmailMessageRequest An array New Email Message objects
//
// swagger:model OutgoingEmailMessageRequest
type OutgoingEmailMessageRequest struct {
// data
Data []*OutgoingEmailMessage `json:"data"`
// meta
Meta *RequestMeta `json:"meta,omitempty"`
}
// Validate validates this outgoing email message request
func (m *OutgoingEmailMessageRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if err := m.validateMeta(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *OutgoingEmailMessageRequest) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *OutgoingEmailMessageRequest) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
if m.Meta != nil {
if err := m.Meta.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// ContextValidate validate this outgoing email message request based on the context it is used
func (m *OutgoingEmailMessageRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *OutgoingEmailMessageRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *OutgoingEmailMessageRequest) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("meta")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *OutgoingEmailMessageRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OutgoingEmailMessageRequest) UnmarshalBinary(b []byte) error {
var res OutgoingEmailMessageRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,75 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// RequestMeta request meta
//
// swagger:model RequestMeta
type RequestMeta struct {
// Account Number of the Reseller or OEM
// Required: true
TaxnexusAccount *string `json:"TaxnexusAccount"`
}
// Validate validates this request meta
func (m *RequestMeta) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateTaxnexusAccount(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error {
if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil {
return err
}
return nil
}
// ContextValidate validates this request meta based on context it is used
func (m *RequestMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *RequestMeta) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *RequestMeta) UnmarshalBinary(b []byte) error {
var res RequestMeta
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -0,0 +1,84 @@
// Code generated by go-swagger; DO NOT EDIT.
// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package workflow_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// ResponseMeta response meta
//
// swagger:model ResponseMeta
type ResponseMeta struct {
// Microservice Contact Info
Contact string `json:"Contact,omitempty"`
// Copyright Info
Copyright string `json:"Copyright,omitempty"`
// License Information and Restrictions
License string `json:"License,omitempty"`
// Operation ID
OperationID string `json:"OperationID,omitempty"`
// Request IP Address
RequestIP string `json:"RequestIP,omitempty"`
// Request Type
RequestType string `json:"RequestType,omitempty"`
// Request URL
RequestURL string `json:"RequestURL,omitempty"`
// Data Server Info
ServerInfo string `json:"ServerInfo,omitempty"`
// Data Server Response Time (ms)
ServerResponseTime string `json:"ServerResponseTime,omitempty"`
// Backend Server Timestamp
ServerTimestamp string `json:"ServerTimestamp,omitempty"`
// Account Number used for recording transactions
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
}
// Validate validates this response meta
func (m *ResponseMeta) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this response meta based on context it is used
func (m *ResponseMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ResponseMeta) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ResponseMeta) UnmarshalBinary(b []byte) error {
var res ResponseMeta
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -3,9 +3,9 @@ info:
version: 0.3.0
title: "auth"
description: "Authentication Microservice"
termsOfService: "https://salesforcedevops.net/terms/"
termsOfService: "https://workdifferentwithai.com/terms/"
contact:
email: "vern@vernonkeenan.com"
email: "vern@workdifferentwithai.com"
license:
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions:
@ -18,7 +18,7 @@ security:
schemes:
- "http"
basePath: "/v1"
host: "auth.vernonkeenan.com:8080"
host: "auth.work.tnxs.net:8080"
consumes:
- "application/json"
produces:
@ -327,7 +327,7 @@ definitions:
type: array
type: object
UserResponse:
description: An array Taxnexus user objects
description: An array user objects
properties:
Data:
items:

View File

@ -3,9 +3,9 @@ info:
version: 0.3.0
title: "auth"
description: "Authentication Microservice"
termsOfService: "https://salesforcedevops.net/terms/"
termsOfService: "https://workdifferentwithai.com/terms/"
contact:
email: "vern@vernonkeenan.com"
email: "vern@workdifferentwithai.com"
license:
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions:
@ -18,7 +18,7 @@ security:
schemes:
- "https"
basePath: "/vk/auth/v1"
host: "gw.tnxs.net"
host: "auth.work.tnxs.net:8080"
consumes:
- "application/json"
produces:
@ -327,7 +327,7 @@ definitions:
type: array
type: object
UserResponse:
description: An array Taxnexus user objects
description: An array user objects
properties:
Data:
items:

View File

@ -1,822 +0,0 @@
swagger: "2.0"
info:
version: 0.3.4
title: "crm"
description: "Customer Information Microservice"
termsOfService: "https://salesforcedevops.net/terms/"
contact:
email: "vern@vernonkeenan.com"
license:
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
schemes:
- "https"
basePath: "/vk/crm/v1"
host: "gw.tnxs.net"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
accountIdQuery:
description: Record Id of an Account
in: query
name: accountId
required: false
type: string
assetIdQuery:
description: Record Id of an Asset
in: query
name: assetId
required: false
type: string
accountRequest:
description: An array of new Account records
in: body
name: accountRequest
required: true
schema:
$ref: "#/definitions/AccountRequest"
assetRequest:
description: An array of new Asset records
in: body
name: assetRequest
required: true
schema:
$ref: "#/definitions/AssetRequest"
activeQuery:
description: Only retrieve active records?
in: query
name: active
required: false
type: boolean
companyIdQuery:
description: Company record ID
in: query
name: companyId
required: false
type: string
leadIdQuery:
description: Lead record ID
in: query
name: leadId
required: false
type: string
contactIdQuery:
description: Contact record ID
in: query
name: contactId
required: false
type: string
contractIdQuery:
description: Contact record ID
in: query
name: contractId
required: false
type: string
emailQuery:
description: Email address used for identity lookup
in: query
name: email
required: false
type: string
contactRequest:
description: An array of new Contact records
in: body
name: contactsRequest
required: true
schema:
$ref: "#/definitions/ContactRequest"
contractRequest:
description: An array of new Contract records
in: body
name: contractsRequest
required: true
schema:
$ref: "#/definitions/ContractRequest"
leadRequest:
description: An array of new Lead records
in: body
name: leadRequest
required: true
schema:
$ref: "#/definitions/LeadRequest"
limitQuery:
description: "How many objects to return at one time"
format: int64
in: query
name: limit
required: false
type: integer
nameQuery:
description: The Name of this Object
in: query
name: name
required: false
type: string
offsetQuery:
description: How many objects to skip?
format: int64
in: query
name: offset
required: false
type: integer
slugQuery:
description: The Slug of this Object
in: query
name: slug
required: false
type: string
typeQuery:
description: The Type of this Object
in: query
name: type
required: false
type: string
responses:
AccessForbidden:
description: "Access forbidden, account lacks access"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
AccountResponse:
description: Response with Account objects with Contacts
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/AccountResponse"
AssetResponse:
description: Response with Asset objects with Contacts
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/AssetResponse"
Conflict:
description: Conflict
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ContactResponse:
description: Response with an array of Contact objects
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/ContactResponse"
ContractResponse:
description: Response with an array of Contract objects
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/ContractResponse"
LeadResponse:
description: Response with an array of Lead objects
headers:
Access-Control-Allow-Origin:
type: string
Cache-Control:
type: string
schema:
$ref: "#/definitions/LeadResponse"
DeleteResponse:
description: Response with Message Objects with Delete Status
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/DeleteResponse"
InvalidDataError:
headers:
Access-Control-Allow-Origin:
type: string
description: Invalid data was sent
schema:
$ref: "#/definitions/InvalidError"
NotFound:
description: Resource was not found
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ServerError:
description: Server Internal Error
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
Unauthorized:
description: "Access unauthorized, invalid API-KEY was used"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
description: "Unprocessable Entity, likely a bad parameter"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
paths:
/accounts:
delete:
description: Delete SalesforceDevops.net Account record
operationId: deleteAccount
parameters:
- $ref: "#/parameters/accountIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Account
tags:
- Accounts
get:
description: Return a list of all available Accounts
operationId: getAccounts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/nameQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/accountIdQuery"
- $ref: "#/parameters/slugQuery"
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of accounts
tags:
- Accounts
post:
description: Account record to be added
operationId: postAccounts
parameters:
- $ref: "#/parameters/accountRequest"
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new account to SalesforceDevops.net
tags:
- Accounts
put:
description: Update one or more accounts
operationId: putAccounts
parameters:
- $ref: "#/parameters/accountRequest"
responses:
"200":
$ref: "#/responses/AccountResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single account
tags:
- Accounts
/assets:
delete:
description: Delete SalesforceDevops.net Asset record
operationId: deleteAsset
parameters:
- $ref: "#/parameters/assetIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Asset
tags:
- Assets
get:
description: Return a list of all available Assets
operationId: getAssets
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/accountIdQuery"
- $ref: "#/parameters/assetIdQuery"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of assets
tags:
- Assets
post:
description: Asset record to be added
operationId: postAssets
parameters:
- $ref: "#/parameters/assetRequest"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new asset to SalesforceDevops.net
tags:
- Assets
put:
description: Update a single asset specified by assetId
operationId: putAsset
parameters:
- $ref: "#/parameters/assetRequest"
responses:
"200":
$ref: "#/responses/AssetResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single asset
tags:
- Assets
/contracts:
delete:
description: Delete SalesforceDevops.net Contract record
operationId: deleteContract
parameters:
- $ref: "#/parameters/contractIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete An Contract
tags:
- Contracts
get:
description: Return a list of all available Contracts
operationId: getContracts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/contractIdQuery"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contracts
tags:
- Contracts
post:
description: Contract record to be added
operationId: postContracts
parameters:
- $ref: "#/parameters/contractRequest"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add a new contract to SalesforceDevops.net
tags:
- Contracts
put:
description: Update a single contract specified by contractId
operationId: putContract
parameters:
- $ref: "#/parameters/contractRequest"
responses:
"200":
$ref: "#/responses/ContractResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update a single contract
tags:
- Contracts
/contacts:
delete:
description: Delete SalesforceDevops.net Contact record
operationId: deleteContact
parameters:
- $ref: "#/parameters/contactIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete a Contact
tags:
- Contacts
get:
description: Return a list of all available Contacts
operationId: getContacts
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/contactIdQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/slugQuery"
- $ref: "#/parameters/emailQuery"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contacts
tags:
- Contacts
post:
description: Contact record to be added
operationId: postContacts
parameters:
- $ref: "#/parameters/contactRequest"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add new contacts
tags:
- Contacts
put:
description: Update Contact records
operationId: putContacts
parameters:
- $ref: "#/parameters/contactRequest"
responses:
"200":
$ref: "#/responses/ContactResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update Contact
tags:
- Contacts
/leads:
delete:
description: Delete SalesforceDevops.net Lead record
operationId: deleteLead
parameters:
- $ref: "#/parameters/leadIdQuery"
responses:
"200":
$ref: "#/responses/DeleteResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Delete a Contact
tags:
- Leads
get:
description: Return a list of all available Leads
operationId: getLeads
parameters:
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/leadIdQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/nameQuery"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of contacts
tags:
- Leads
post:
description: Lead records to be added
operationId: postLeads
parameters:
- $ref: "#/parameters/leadRequest"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Add new Leads
tags:
- Leads
put:
description: Update Lead records
operationId: putLeads
parameters:
- $ref: "#/parameters/leadRequest"
responses:
"200":
$ref: "#/responses/LeadResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Update Leads
tags:
- Leads
definitions:
AccountRequest:
description: An array of Account objects with Contacts
properties:
Data:
items:
$ref: "../../lib/swagger/defs/account.yaml#/Account"
type: array
type: object
AccountResponse:
description: An array of Account objects with Contacts
properties:
Data:
items:
$ref: "../../lib/swagger/defs/account.yaml#/Account"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
AssetRequest:
description: An array of Asset objects with Contacts
properties:
Data:
items:
$ref: "../../lib/swagger/defs/asset.yaml#/Asset"
type: array
type: object
AssetResponse:
description: An array of Asset objects with Contacts
properties:
Data:
items:
$ref: "../../lib/swagger/defs/asset.yaml#/Asset"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
ContactRequest:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/contact.yaml#/Contact"
type: array
type: object
ContactResponse:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/contact.yaml#/Contact"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
ContractRequest:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/contract.yaml#/Contract"
type: array
type: object
ContractResponse:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/contract.yaml#/Contract"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
DeleteResponse:
$ref: "../../lib/swagger/defs/delete-response.yaml#/DeleteResponse"
Error:
$ref: "../../lib/swagger/defs/error.yaml#/Error"
InvalidError:
$ref: "../../lib/swagger/defs/invalid-error.yaml#/InvalidError"
LeadRequest:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/lead.yaml#/Lead"
type: array
type: object
LeadResponse:
properties:
Data:
items:
$ref: "../../lib/swagger/defs/lead.yaml#/Lead"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
Message:
$ref: "../../lib/swagger/defs/message.yaml#/Message"
RequestMeta:
$ref: "../../lib/swagger/defs/request-meta.yaml#/RequestMeta"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,596 +0,0 @@
swagger: "2.0"
info:
version: 0.3.4
title: "plex"
description: "Cross-Schema Retrieval Microservice"
termsOfService: "https://salesforcedevops.net/terms/"
contact:
email: "vern@vernonkeenan.com"
license:
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
schemes:
- "https"
basePath: "/vk/plex/v1"
host: "gw.tnxs.net"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
slugQuery:
description: The slug of the item to retrieve
in: query
name: slug
required: false
type: string
CompanyIdQuery:
description: Record Id of an Company
in: query
name: companyId
required: false
type: string
limitQuery:
description: "How many objects to return at one time"
format: int64
in: query
name: limit
required: false
type: integer
offsetQuery:
description: How many objects to skip?
format: int64
in: query
name: offset
required: false
type: integer
responses:
AccessForbidden:
description: "Access forbidden, Company lacks access"
schema:
$ref: "#/definitions/Error"
InvalidDataError:
description: Invalid data was sent
schema:
$ref: "#/definitions/InvalidError"
NotFound:
description: Resource was not found
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ServerError:
description: Server Internal Error
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
Unauthorized:
description: "Access unauthorized, invalid API-KEY was used"
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
description: "Unprocessable Entity, likely a bad parameter"
schema:
$ref: "#/definitions/Error"
CompanyResponse:
description: The SalesforceDevops.net Company Object
schema:
$ref: "#/definitions/CompanyResponse"
paths:
/companies:
get:
description: Return all or a single company fully hydrated object
operationId: getCompanies
parameters:
- $ref: "#/parameters/CompanyIdQuery"
- $ref: "#/parameters/slugQuery"
responses:
"200":
$ref: "#/responses/CompanyResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Get a list of companies
tags:
- Companies
definitions:
Address:
properties:
City:
description: City
type: string
x-nullable: true
Country:
description: Country full name
type: string
x-nullable: true
CountryCode:
description: Country Code
type: string
x-nullable: true
PostalCode:
description: Postal Code
type: string
x-nullable: true
State:
description: State full name
type: string
x-nullable: true
StateCode:
description: State Code
type: string
x-nullable: true
Street:
description: Street number and name
type: string
x-nullable: true
type: object
Company:
properties:
ID:
description: Company Id
type: string
AccountID:
description: Account Id
type: string
x-nullable: true
AccountNumber:
description: Company Number
type: string
x-nullable: true
AccountSource:
description: The marketing origin of this Company
type: string
x-nullable: true
Active:
type: boolean
x-nullable: true
AnnualRevenue:
x-nullable: true
description: Annual Revenue Estimate
format: double
type: number
CloudRevenueTotal:
x-nullable: true
type: number
CloudType:
x-nullable: true
description: The type of cloud company
type: string
CloudYear:
description: The year company started cloud revenue
type: string
x-nullable: true
CrunchbaseURL:
description: Company Crunchbase URL
type: string
x-nullable: true
Description:
description: Description of the Company
type: string
x-nullable: true
EarningsCall:
description: Earnings Call Date
type: string
x-nullable: true
Email:
description: Main Company Email
type: string
x-nullable: true
EquityFunding:
description: The amount of equity EquityFunding
type: number
x-nullable: true
Facebook:
description: Company Facebook URL
type: string
x-nullable: true
Fax:
description: Fax number
type: string
x-nullable: true
FoundedDate:
description: Date company founded
type: string
x-nullable: true
IPODate:
description: IPO Date
type: string
x-nullable: true
ImageAltText:
type: string
x-nullable: true
ImageURL:
x-nullable: true
type: string
Industries:
x-nullable: true
description: Industries
type: string
Industry:
x-nullable: true
description: Industry
type: string
LinkedIn:
x-nullable: true
description: Company LinkedIn URL
type: string
ListingAddress:
x-nullable: true
$ref: "#/definitions/Address"
Location:
x-nullable: true
description: Headquarters Location Description
type: string
Logo:
x-nullable: true
description: Company Logo URL
type: string
MarketCapitalization:
x-nullable: true
description: Market Capitalization
type: number
Name:
x-nullable: true
description: Company Name
type: string
NumberInvestments:
x-nullable: true
description: Number of Investments
type: number
NumberOfEmployees:
x-nullable: true
description: Employee Count Estimate
format: int64
type: number
Ownership:
x-nullable: true
description: Ownership
type: string
ParentID:
x-nullable: true
description: Parent Company
type: string
Phone:
x-nullable: true
description: Phone
type: string
Publish:
x-nullable: true
description: Publish this record?
type: boolean
SalesforceFirst:
x-nullable: true
description: A Salesforce-First company?
type: boolean
Slug:
x-nullable: true
description: Slug
type: string
TagLine:
x-nullable: true
description: Company tagline
type: string
TickerSymbol:
x-nullable: true
description: Ticker Symbol
type: string
Twitter:
x-nullable: true
description: Twitter URL
type: string
Type:
x-nullable: true
description: Type
type: string
Website:
x-nullable: true
description: Website
type: string
YearStarted:
x-nullable: true
description: Year Started
type: string
CompanyProducts:
description: Company Products
x-nullable: true
type: array
items:
$ref: "#/definitions/CompanyProduct"
FinancialStatements:
description: Financial Statements
x-nullable: true
type: array
items:
$ref: "#/definitions/FinancialStatement"
IndustryCompanies:
description: Similar Companies
x-nullable: true
type: array
items:
$ref: "#/definitions/IndustryCompany"
type: object
FinancialStatement:
type: object
description: A financial statement for a company
properties:
ID:
description: Record Id
type: string
AccessNumber:
description: EDGAR Access Number
type: string
AccountID:
description: Account ID
type: string
CloudRevenue:
description: Cloud Revenue
type: number
CreatedByID:
description: Created By User ID
type: string
CreatedDate:
description: Created Date
type: string
Description:
description: Description
type: string
EdgarURL:
description: EDGAR URL
type: string
FilingType:
description: Filing Type
type: string
GrossProfit:
description: Gross Profit
type: number
LastModifiedByID:
description: Last Modified By User ID
type: string
LastModifiedDate:
description: Last Modified Date
type: string
NetIncome:
description: Net Income
type: number
PeriodEndDate:
description: Period End Date
type: string
TotalRevenue:
description: Total Revenue
type: number
Year:
description: Year
type: string
CompanyProduct:
description: A software product or service vended by a Company
properties:
ID:
description: Record Id
type: string
AccountID:
description: ID of the Company that owns this Product
type: string
x-nullable: true
CreatedByID:
description: Created By User ID
type: string
x-nullable: true
CreatedDate:
description: Created Date
type: string
x-nullable: true
Description:
description: Description of product
type: string
x-nullable: true
FullDescription:
description: Full Description of product
type: string
x-nullable: true
ImageAltText:
description: Image Alt Text
type: string
x-nullable: true
ImageURL:
description: Image URL
type: string
x-nullable: true
Industries:
x-nullable: true
description: Industries
type: array
items:
$ref: "#/definitions/Industry"
LastModifiedByID:
x-nullable: true
description: Last Modified By User ID
type: string
LastModifiedDate:
x-nullable: true
description: Last Modified Date
type: string
Logo:
x-nullable: true
description: Logo
type: string
Name:
x-nullable: true
description: Product Name
type: string
ProductVideoID:
x-nullable: true
description: Product Video ID
type: string
Published:
x-nullable: true
description: Published
type: boolean
SalesforceSpecific:
x-nullable: true
description: Salesforce Specific
type: boolean
Slug:
x-nullable: true
description: Slug
type: string
TagLine:
x-nullable: true
description: TagLine
type: string
URL:
x-nullable: true
description: Website
type: string
type: object
Industry:
description: An industry that is being researched
properties:
ID:
description: Record Id
type: string
Companies:
x-nullable: true
description: The AccountIDs of the Companies in this Industry
type: array
items:
type: string
CompanyProducts:
x-nullable: true
description: The list of Products in this industry
type: array
items:
$ref: "#/definitions/CompanyProduct"
CreatedByID:
x-nullable: true
description: Created By User ID
type: string
CreatedDate:
x-nullable: true
description: Created Date
type: string
Description:
x-nullable: true
description: Industry Description
type: string
ImageAltText:
x-nullable: true
description: Image Alt Text
type: string
ImageURL:
x-nullable: true
description: Image URL
type: string
LastModifiedByID:
x-nullable: true
description: Last Modified By User ID
type: string
LastModifiedDate:
x-nullable: true
description: Last Modified Date
type: string
Level:
x-nullable: true
description: The hierarchical level of this Industry
type: string
Logo:
x-nullable: true
description: Logo
type: string
Name:
x-nullable: true
description: Industry Name
type: string
ParentIndustryID:
x-nullable: true
description: The ID of the Parent Industry
type: string
Path:
x-nullable: true
description: The full path of this industry, including Parent
type: string
Slug:
x-nullable: true
description: The CMS Slug for this Industry
type: string
TagLine:
x-nullable: true
description: TagLine
type: string
type: object
IndustryCompany:
description: Junction object between Industry and Company
properties:
ID:
description: Record Id
type: string
CompanyID:
type: string
CompanyName:
type: string
CompanySlug:
type: string
CompanyWebsite:
type: string
IndustryID:
type: string
IndustryName:
type: string
IndustrySlug:
type: string
IndustryTagLine:
type: string
LastModifiedByID:
description: Last Modified By User ID
type: string
LastModifiedDate:
description: Last Modified Date
type: string
Path:
type: string
type: object
CompanyRequest:
description: An array of Company objects with Contacts
properties:
Data:
items:
$ref: "#/definitions/Company"
type: array
type: object
CompanyResponse:
description: An array of Company objects with Contacts
properties:
Data:
items:
$ref: "#/definitions/Company"
type: array
Meta:
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
type: object
Error:
$ref: "../../lib/swagger/defs/error.yaml#/Error"
InvalidError:
allOf:
- $ref: "#/definitions/Error"
- properties:
details:
items:
type: string
type: array
type: object

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,215 +0,0 @@
swagger: "2.0"
info:
version: 0.3.0
title: "stash"
description: "PDF Storage Microservice"
termsOfService: "https://salesforcedevops.net/terms/"
contact:
email: "vern@vernonkeenan.com"
license:
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
security:
- ApiKeyAuth: []
schemes:
- "https"
basePath: "/vk/stash/v1"
host: "gw.tnxs.net"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
X-API-Key:
name: X-API-Key
in: "header"
required: true
type: string
PDFRequest:
description: An array of new PDF records
in: body
name: PDFRequest
required: true
schema:
$ref: "#/definitions/PDFRequest"
pdfIdQueryRequired:
description: PDF record ID
in: query
name: pdfId
required: true
type: string
responses:
AccessForbidden:
description: "Access forbidden, account lacks access"
schema:
$ref: "#/definitions/Error"
NotFound:
description: Resource was not found
schema:
$ref: "#/definitions/Error"
PdfResponse:
description: Response with an array of pdfs
schema:
$ref: "#/definitions/DocumentResponse"
ServerError:
description: Server Internal Error
schema:
$ref: "#/definitions/Error"
Unauthorized:
description: "Access Unauthorized, invalid API-KEY was used"
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
description: "Unprocessable Entity, likely a bad parameter"
schema:
$ref: "#/definitions/Error"
DocumentResponse:
description: Rendered documents response
schema:
$ref: "#/definitions/DocumentResponse"
paths:
/pdfs:
post:
description: Store new PDFs
operationId: postPdfs
parameters:
- $ref: "#/parameters/PDFRequest"
responses:
"200":
$ref: "#/responses/DocumentResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
summary: Create new PDFs
tags:
- StashPdf
definitions:
Document:
properties:
Filename:
type: string
ID:
type: string
SagaType:
type: string
ParentID:
type: string
Title:
type: string
URI:
type: string
type: object
DocumentResponse:
description: An array of rendered documents
properties:
Data:
items:
$ref: "#/definitions/Document"
type: array
Meta:
$ref: "#/definitions/ResponseMeta"
type: object
Error:
properties:
Code:
format: int64
type: number
Fields:
type: string
Message:
type: string
type: object
NewPDF:
properties:
Description:
description: Description
type: string
Filename:
description: Filename only
type: string
HTML:
description: The HTML data in text format
type: string
LastAccessedByID:
description: Last Accessed By
type: string
ObjectType:
description: This document's financial object origination
type: string
OwnerID:
description: User who created the PDF
type: string
ParentID:
description: ID of the record that owns this PDF
type: string
Ref:
description: External reference if any
type: string
Title:
description: Document descriptive title
type: string
type: object
PDFRequest:
properties:
Data:
items:
$ref: "#/definitions/NewPDF"
type: array
Meta:
$ref: "#/definitions/RequestMeta"
type: object
RequestMeta:
properties:
ExternalAccount:
description: Account Number of the Reseller or OEM
type: string
required:
- ExternalAccount
type: object
ResponseMeta:
properties:
Contact:
description: Microservice Contact Info
type: string
Copyright:
description: Copyright Info
type: string
License:
description: License Information and Restrictions
type: string
OperationID:
description: Operation ID
type: string
RequestIP:
description: Request IP Address
type: string
RequestType:
description: Request Type
type: string
RequestURL:
description: Request URL
type: string
ServerInfo:
description: Data Server Info
type: string
ServerResponseTime:
description: Data Server Response Time (ms)
type: string
ServerTimestamp:
description: Backend Server Timestamp
type: string
ExternalAccount:
description: Account Number used for recording transactions
type: string
type: object

585
swagger/external/workflow-work.yaml vendored Normal file
View File

@ -0,0 +1,585 @@
swagger: "2.0"
info:
version: 1.3.0
title: "workflow"
description: "Workflow Microservice"
termsOfService: "http://workdifferentwithai.com/terms/"
contact:
email: "noc@workdifferentwithai.com"
license:
name: "Proprietary - Copyright (c) 2023 by WorkDifferentWithAI.com"
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
schemes:
- "https"
basePath: "/vk/workflow/v1"
host: "workflow.work.tnxs.net:8080"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
emailMessageIdQuery:
description: Email Message ID
in: query
name: emailMessageId
type: string
OutgoingEmailMessageRequest:
description: An array of new Outgoing Email Message records
in: body
name: OutgoingEmailMessageRequest
required: true
schema:
$ref: "#/definitions/OutgoingEmailMessageRequest"
AppLogRequest:
description: An array of new AppLog records
in: body
name: AppLogRequest
required: true
schema:
$ref: "#/definitions/AppLogRequest"
responses:
AppLogResponse:
description: "Array of AppLogs"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/AppLogResponse"
EmailMessagesResponse:
description: "Array of Email Messages"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/EmailMessagesResponse"
AccessForbidden:
description: "Access forbidden, account lacks access"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
NotFound:
description: Resource was not found
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ServerError:
headers:
Access-Control-Allow-Origin:
type: string
description: Server Internal Error
schema:
$ref: "#/definitions/Error"
Unauthorized:
headers:
Access-Control-Allow-Origin:
type: string
description: "Access Unauthorized, invalid API-KEY was used"
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
headers:
Access-Control-Allow-Origin:
type: string
description: "Unprocessable Entity, likely a bad parameter"
schema:
$ref: "#/definitions/Error"
CORSResponse:
description: CORS OPTIONS response
headers:
Access-Control-Allow-Origin:
type: string
Access-Control-Allow-Headers:
type: string
Access-Control-Allow-Methods:
type: string
Access-Control-Expose-Headers:
type: string
Access-Control-Max-Age:
type: string
Access-Control-Allow-Credentials:
type: string
Cache-Control:
type: string
paths:
/applogs:
options:
operationId: appLogOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
post:
security:
- ApiKeyAuth: []
summary: Post app log messages
operationId: postAppLogs
description: Insert app log messages into workflow storage
parameters:
- $ref: "#/parameters/AppLogRequest"
responses:
"200":
$ref: "#/responses/AppLogResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
tags:
- AppLog
/emailmessages:
options:
operationId: emailMessageOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
get:
security:
- ApiKeyAuth: []
summary: "Get email messages from data store"
operationId: getEmailMessages
description: "Retrieves email messages from workflow storage"
parameters:
- $ref: "#/parameters/emailMessageIdQuery"
tags:
- "EmailMessage"
responses:
"200":
$ref: "#/responses/EmailMessagesResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
/outgoingemailmessages:
options:
operationId: outgoingEmailMessageOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
post:
security:
- ApiKeyAuth: []
summary: Add new email messages to the outgoing queue
operationId: postOutgoingEmailMessages
description: Insert new email messages into workflow storage
parameters:
- $ref: "#/parameters/OutgoingEmailMessageRequest"
responses:
"200":
$ref: "#/responses/EmailMessagesResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
tags:
- OutgoingEmailMessage
definitions:
AppLog:
description: Application Log for human consumption
properties:
AccountID:
type: string
CompanyID:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
ID:
type: string
Message:
type: string
ObjectID:
type: string
ObjectType:
type: string
Severity:
type: string
Source:
type: string
SourceTimestamp:
type: string
type: object
AppLogRequest:
description: An array Application Log objects
properties:
data:
items:
$ref: "#/definitions/AppLog"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
AppLogResponse:
description: An array Application Log objects
properties:
data:
items:
$ref: "#/definitions/AppLog"
type: array
meta:
$ref: "#/definitions/ResponseMeta"
type: object
Document:
description: Document
properties:
ArchivedByID:
type: string
ArchivedDate:
type: string
AuthorID:
type: string
Body:
format: byte
type: string
BodyLength:
format: int64
type: number
CommentCount:
format: int64
type: number
ConnectionID:
type: string
ContentAssetID:
type: string
ContentModificationDate:
type: string
ContentSize:
format: int64
type: number
ContentType:
type: string
ContentVersionDocumentID:
type: string
ContnetDocumentID:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
DDate:
type: string
Description:
type: string
DeveloperName:
type: string
Discount:
type: number
Document:
format: byte
type: string
DocumentID:
type: string
DocumentSequence:
format: int64
type: number
Field:
type: string
FileExtension:
type: string
FileType:
type: string
FolderID:
type: string
GrandTotal:
type: string
ID:
type: string
InsertedByID:
type: string
IsArchived:
type: boolean
IsBodySearchable:
type: boolean
IsCommentSub:
type: boolean
IsDocumentSub:
type: boolean
IsInternalUseOnly:
type: boolean
IsPublic:
type: boolean
IsRichText:
type: boolean
Keywords:
type: string
LastModifiedByID:
type: string
LastModifiedDate:
type: string
LastViewedDate:
type: string
LatstPublishedVersionID:
type: string
LikeCount:
format: int64
type: number
LinkURL:
type: string
LinkedEntityID:
type: string
Name:
type: string
NamespacePrefix:
type: string
NetworkScope:
type: string
OwnerID:
type: string
ParentID:
type: string
Publishstatus:
type: string
QuoteID:
type: string
RelatedRecordID:
type: string
ShareType:
type: string
SharingOption:
type: string
SharingPrivacy:
type: string
Title:
type: string
Type:
type: string
URL:
type: string
UserID:
type: string
Visibility:
type: string
type: object
EmailMessage:
properties:
ActivityID:
type: string
BCCAddress:
type: string
CCAddress:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
EmailMessageID:
type: string
FromAddress:
type: string
FromName:
type: string
HTML:
format: byte
type: string
HasAttachment:
type: boolean
Headers:
$ref: "#/definitions/Headers"
ID:
type: string
Incoming:
type: boolean
IsClientManaged:
type: boolean
IsExternallyManaged:
type: boolean
LastModifiedByID:
type: string
LastModifiedDate:
type: string
MessageDate:
type: string
MessageIdentifier:
type: string
ParentID:
type: string
RelatedToID:
type: string
RelationAddress:
type: string
RelationID:
type: string
RelationObjectType:
type: string
RelationType:
type: string
ReplyToEmailMessageID:
type: string
Status:
type: string
Subject:
type: string
Text:
format: byte
type: string
ThreadIdentifier:
type: string
ToAddress:
type: string
ValidatedFromAddress:
type: string
type: object
EmailMessageRequest:
description: An array Send Email Message objects
properties:
data:
items:
$ref: "#/definitions/EmailMessage"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
EmailMessagesResponse:
description: An array user objects
properties:
data:
items:
$ref: "#/definitions/EmailMessage"
type: array
meta:
$ref: "#/definitions/ResponseMeta"
type: object
Error:
properties:
Code:
format: int32
type: integer
Fields:
type: string
Message:
type: string
type: object
Headers:
type: object
properties:
Key:
type: string
Values:
items:
items:
type: string
type: array
type: array
OutgoingEmailMessage:
description: A new email message to be sent
properties:
BCCAddress:
type: string
CCAddress:
type: string
EmailMessageID:
type: string
EmailTemplateID:
type: string
ExternalID:
type: string
FromContactID:
type: string
FromName:
type: string
Headers:
$ref: "#/definitions/Headers"
HTML:
type: string
ID:
type: string
Subject:
type: string
Text:
type: string
ToAddress:
type: string
ToName:
type: string
ValidatedFromAddress:
type: string
WhoID:
type: string
type: object
OutgoingEmailMessageRequest:
description: An array New Email Message objects
properties:
data:
items:
$ref: "#/definitions/OutgoingEmailMessage"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
RequestMeta:
properties:
TaxnexusAccount:
description: Account Number of the Reseller or OEM
type: string
required:
- TaxnexusAccount
type: object
ResponseMeta:
properties:
Contact:
description: Microservice Contact Info
type: string
Copyright:
description: Copyright Info
type: string
License:
description: License Information and Restrictions
type: string
OperationID:
description: Operation ID
type: string
RequestIP:
description: Request IP Address
type: string
RequestType:
description: Request Type
type: string
RequestURL:
description: Request URL
type: string
ServerInfo:
description: Data Server Info
type: string
ServerResponseTime:
description: Data Server Response Time (ms)
type: string
ServerTimestamp:
description: Backend Server Timestamp
type: string
TaxnexusAccount:
description: Account Number used for recording transactions
type: string
type: object

585
swagger/workflow-work.yaml Normal file
View File

@ -0,0 +1,585 @@
swagger: "2.0"
info:
version: 1.3.0
title: "workflow"
description: "Workflow Microservice"
termsOfService: "http://workdifferentwithai.com/terms/"
contact:
email: "noc@workdifferentwithai.com"
license:
name: "Proprietary - Copyright (c) 2023 by WorkDifferentWithAI.com"
securityDefinitions:
ApiKeyAuth:
type: "apiKey"
in: "header"
name: "X-API-Key"
schemes:
- "http"
basePath: "/v1"
host: "workflow.work.tnxs.net:8080"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
emailMessageIdQuery:
description: Email Message ID
in: query
name: emailMessageId
type: string
OutgoingEmailMessageRequest:
description: An array of new Outgoing Email Message records
in: body
name: OutgoingEmailMessageRequest
required: true
schema:
$ref: "#/definitions/OutgoingEmailMessageRequest"
AppLogRequest:
description: An array of new AppLog records
in: body
name: AppLogRequest
required: true
schema:
$ref: "#/definitions/AppLogRequest"
responses:
AppLogResponse:
description: "Array of AppLogs"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/AppLogResponse"
EmailMessagesResponse:
description: "Array of Email Messages"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/EmailMessagesResponse"
AccessForbidden:
description: "Access forbidden, account lacks access"
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
NotFound:
description: Resource was not found
headers:
Access-Control-Allow-Origin:
type: string
schema:
$ref: "#/definitions/Error"
ServerError:
headers:
Access-Control-Allow-Origin:
type: string
description: Server Internal Error
schema:
$ref: "#/definitions/Error"
Unauthorized:
headers:
Access-Control-Allow-Origin:
type: string
description: "Access Unauthorized, invalid API-KEY was used"
schema:
$ref: "#/definitions/Error"
UnprocessableEntity:
headers:
Access-Control-Allow-Origin:
type: string
description: "Unprocessable Entity, likely a bad parameter"
schema:
$ref: "#/definitions/Error"
CORSResponse:
description: CORS OPTIONS response
headers:
Access-Control-Allow-Origin:
type: string
Access-Control-Allow-Headers:
type: string
Access-Control-Allow-Methods:
type: string
Access-Control-Expose-Headers:
type: string
Access-Control-Max-Age:
type: string
Access-Control-Allow-Credentials:
type: string
Cache-Control:
type: string
paths:
/applogs:
options:
operationId: appLogOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
post:
security:
- ApiKeyAuth: []
summary: Post app log messages
operationId: postAppLogs
description: Insert app log messages into workflow storage
parameters:
- $ref: "#/parameters/AppLogRequest"
responses:
"200":
$ref: "#/responses/AppLogResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
tags:
- AppLog
/emailmessages:
options:
operationId: emailMessageOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
get:
security:
- ApiKeyAuth: []
summary: "Get email messages from data store"
operationId: getEmailMessages
description: "Retrieves email messages from workflow storage"
parameters:
- $ref: "#/parameters/emailMessageIdQuery"
tags:
- "EmailMessage"
responses:
"200":
$ref: "#/responses/EmailMessagesResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
/outgoingemailmessages:
options:
operationId: outgoingEmailMessageOptions
description: CORS support
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
post:
security:
- ApiKeyAuth: []
summary: Add new email messages to the outgoing queue
operationId: postOutgoingEmailMessages
description: Insert new email messages into workflow storage
parameters:
- $ref: "#/parameters/OutgoingEmailMessageRequest"
responses:
"200":
$ref: "#/responses/EmailMessagesResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
tags:
- OutgoingEmailMessage
definitions:
AppLog:
description: Application Log for human consumption
properties:
AccountID:
type: string
CompanyID:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
ID:
type: string
Message:
type: string
ObjectID:
type: string
ObjectType:
type: string
Severity:
type: string
Source:
type: string
SourceTimestamp:
type: string
type: object
AppLogRequest:
description: An array Application Log objects
properties:
data:
items:
$ref: "#/definitions/AppLog"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
AppLogResponse:
description: An array Application Log objects
properties:
data:
items:
$ref: "#/definitions/AppLog"
type: array
meta:
$ref: "#/definitions/ResponseMeta"
type: object
Document:
description: Document
properties:
ArchivedByID:
type: string
ArchivedDate:
type: string
AuthorID:
type: string
Body:
format: byte
type: string
BodyLength:
format: int64
type: number
CommentCount:
format: int64
type: number
ConnectionID:
type: string
ContentAssetID:
type: string
ContentModificationDate:
type: string
ContentSize:
format: int64
type: number
ContentType:
type: string
ContentVersionDocumentID:
type: string
ContnetDocumentID:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
DDate:
type: string
Description:
type: string
DeveloperName:
type: string
Discount:
type: number
Document:
format: byte
type: string
DocumentID:
type: string
DocumentSequence:
format: int64
type: number
Field:
type: string
FileExtension:
type: string
FileType:
type: string
FolderID:
type: string
GrandTotal:
type: string
ID:
type: string
InsertedByID:
type: string
IsArchived:
type: boolean
IsBodySearchable:
type: boolean
IsCommentSub:
type: boolean
IsDocumentSub:
type: boolean
IsInternalUseOnly:
type: boolean
IsPublic:
type: boolean
IsRichText:
type: boolean
Keywords:
type: string
LastModifiedByID:
type: string
LastModifiedDate:
type: string
LastViewedDate:
type: string
LatstPublishedVersionID:
type: string
LikeCount:
format: int64
type: number
LinkURL:
type: string
LinkedEntityID:
type: string
Name:
type: string
NamespacePrefix:
type: string
NetworkScope:
type: string
OwnerID:
type: string
ParentID:
type: string
Publishstatus:
type: string
QuoteID:
type: string
RelatedRecordID:
type: string
ShareType:
type: string
SharingOption:
type: string
SharingPrivacy:
type: string
Title:
type: string
Type:
type: string
URL:
type: string
UserID:
type: string
Visibility:
type: string
type: object
EmailMessage:
properties:
ActivityID:
type: string
BCCAddress:
type: string
CCAddress:
type: string
CreatedByID:
type: string
CreatedDate:
type: string
EmailMessageID:
type: string
FromAddress:
type: string
FromName:
type: string
HTML:
format: byte
type: string
HasAttachment:
type: boolean
Headers:
$ref: "#/definitions/Headers"
ID:
type: string
Incoming:
type: boolean
IsClientManaged:
type: boolean
IsExternallyManaged:
type: boolean
LastModifiedByID:
type: string
LastModifiedDate:
type: string
MessageDate:
type: string
MessageIdentifier:
type: string
ParentID:
type: string
RelatedToID:
type: string
RelationAddress:
type: string
RelationID:
type: string
RelationObjectType:
type: string
RelationType:
type: string
ReplyToEmailMessageID:
type: string
Status:
type: string
Subject:
type: string
Text:
format: byte
type: string
ThreadIdentifier:
type: string
ToAddress:
type: string
ValidatedFromAddress:
type: string
type: object
EmailMessageRequest:
description: An array Send Email Message objects
properties:
data:
items:
$ref: "#/definitions/EmailMessage"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
EmailMessagesResponse:
description: An array user objects
properties:
data:
items:
$ref: "#/definitions/EmailMessage"
type: array
meta:
$ref: "#/definitions/ResponseMeta"
type: object
Error:
properties:
Code:
format: int32
type: integer
Fields:
type: string
Message:
type: string
type: object
Headers:
type: object
properties:
Key:
type: string
Values:
items:
items:
type: string
type: array
type: array
OutgoingEmailMessage:
description: A new email message to be sent
properties:
BCCAddress:
type: string
CCAddress:
type: string
EmailMessageID:
type: string
EmailTemplateID:
type: string
ExternalID:
type: string
FromContactID:
type: string
FromName:
type: string
Headers:
$ref: "#/definitions/Headers"
HTML:
type: string
ID:
type: string
Subject:
type: string
Text:
type: string
ToAddress:
type: string
ToName:
type: string
ValidatedFromAddress:
type: string
WhoID:
type: string
type: object
OutgoingEmailMessageRequest:
description: An array New Email Message objects
properties:
data:
items:
$ref: "#/definitions/OutgoingEmailMessage"
type: array
meta:
$ref: "#/definitions/RequestMeta"
type: object
RequestMeta:
properties:
TaxnexusAccount:
description: Account Number of the Reseller or OEM
type: string
required:
- TaxnexusAccount
type: object
ResponseMeta:
properties:
Contact:
description: Microservice Contact Info
type: string
Copyright:
description: Copyright Info
type: string
License:
description: License Information and Restrictions
type: string
OperationID:
description: Operation ID
type: string
RequestIP:
description: Request IP Address
type: string
RequestType:
description: Request Type
type: string
RequestURL:
description: Request URL
type: string
ServerInfo:
description: Data Server Info
type: string
ServerResponseTime:
description: Data Server Response Time (ms)
type: string
ServerTimestamp:
description: Backend Server Timestamp
type: string
TaxnexusAccount:
description: Account Number used for recording transactions
type: string
type: object