parent
174d57205c
commit
64ad9b374f
20
Makefile
20
Makefile
|
@ -12,6 +12,8 @@ swagger:
|
|||
cp ../research/swagger/research-work.yaml ./swagger/external
|
||||
cp ../sf-gate/swagger/sf-gate-work.yaml ./swagger
|
||||
cp ../sf-gate/swagger/sf-gate-work.yaml ./swagger/external
|
||||
cp ../plex/swagger/plex-work.yaml ./swagger
|
||||
cp ../plex/swagger/plex-work.yaml ./swagger/external
|
||||
#
|
||||
rm -rf api
|
||||
#
|
||||
|
@ -110,6 +112,24 @@ swagger:
|
|||
sed -i 's|sf-gate.members.work.com.com:8080|gw.tnxs.net|g' ./swagger/external/sf-gate-work.yaml
|
||||
sed -i 's|"/v1"|"/work/sf-gate/v1"|g' ./swagger/external/sf-gate-work.yaml
|
||||
#
|
||||
# generate plex client
|
||||
#
|
||||
mkdir api/plex
|
||||
swagger generate client \
|
||||
--log-output=./swagger/logs/generate-plex-client.log \
|
||||
--name=plex \
|
||||
--spec=./swagger/plex-work.yaml \
|
||||
--target=./api/plex \
|
||||
--client-package=plex-client \
|
||||
--model-package=plex-models \
|
||||
--principal=app.User
|
||||
#
|
||||
# update external plex client
|
||||
#
|
||||
sed -i 's|"http"|"https"|g' ./swagger/external/plex-work.yaml
|
||||
sed -i 's|plex.work.com:8080|gw.tnxs.net|g' ./swagger/external/plex-work.yaml
|
||||
sed -i 's|"/v1"|"/work/plex/v1"|g' ./swagger/external/plex-work.yaml
|
||||
#
|
||||
# copy external swagger files
|
||||
#
|
||||
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxassets/www/swagger/external
|
||||
|
|
|
@ -143,6 +143,9 @@ type User struct {
|
|||
// Out of office message
|
||||
OutOfOfficeMessage string `json:"OutOfOfficeMessage,omitempty"`
|
||||
|
||||
// Password
|
||||
Password string `json:"Password,omitempty"`
|
||||
|
||||
// Phone
|
||||
Phone string `json:"Phone,omitempty"`
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ import (
|
|||
"code.tnxs.net/work/lib/api/members/members_client/tracks"
|
||||
"code.tnxs.net/work/lib/api/members/members_client/transactions"
|
||||
"code.tnxs.net/work/lib/api/members/members_client/users"
|
||||
"code.tnxs.net/work/lib/api/members/members_client/webhooks"
|
||||
)
|
||||
|
||||
// Default members HTTP client.
|
||||
|
@ -111,7 +110,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members {
|
|||
cli.Tracks = tracks.New(transport, formats)
|
||||
cli.Transactions = transactions.New(transport, formats)
|
||||
cli.Users = users.New(transport, formats)
|
||||
cli.Webhooks = webhooks.New(transport, formats)
|
||||
return cli
|
||||
}
|
||||
|
||||
|
@ -208,8 +206,6 @@ type Members struct {
|
|||
|
||||
Users users.ClientService
|
||||
|
||||
Webhooks webhooks.ClientService
|
||||
|
||||
Transport runtime.ClientTransport
|
||||
}
|
||||
|
||||
|
@ -242,5 +238,4 @@ func (c *Members) SetTransport(transport runtime.ClientTransport) {
|
|||
c.Tracks.SetTransport(transport)
|
||||
c.Transactions.SetTransport(transport)
|
||||
c.Users.SetTransport(transport)
|
||||
c.Webhooks.SetTransport(transport)
|
||||
}
|
||||
|
|
|
@ -1,157 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2023 by Vernon Keenan
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
|
||||
// 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/work/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// NewPostWebhooksClerkParams creates a new PostWebhooksClerkParams 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 NewPostWebhooksClerkParams() *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithTimeout creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostWebhooksClerkParamsWithTimeout(timeout time.Duration) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithContext creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostWebhooksClerkParamsWithContext(ctx context.Context) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithHTTPClient creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostWebhooksClerkParamsWithHTTPClient(client *http.Client) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post webhooks clerk operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostWebhooksClerkParams struct {
|
||||
|
||||
/* WebhookclerkRequest.
|
||||
|
||||
An array of new WebhookClerk records
|
||||
*/
|
||||
WebhookclerkRequest *members_models.WebhookClerkRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post webhooks clerk params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostWebhooksClerkParams) WithDefaults() *PostWebhooksClerkParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post webhooks clerk params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostWebhooksClerkParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithTimeout(timeout time.Duration) *PostWebhooksClerkParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithContext(ctx context.Context) *PostWebhooksClerkParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithHTTPClient(client *http.Client) *PostWebhooksClerkParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithWebhookclerkRequest adds the webhookclerkRequest to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithWebhookclerkRequest(webhookclerkRequest *members_models.WebhookClerkRequest) *PostWebhooksClerkParams {
|
||||
o.SetWebhookclerkRequest(webhookclerkRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetWebhookclerkRequest adds the webhookclerkRequest to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetWebhookclerkRequest(webhookclerkRequest *members_models.WebhookClerkRequest) {
|
||||
o.WebhookclerkRequest = webhookclerkRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostWebhooksClerkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.WebhookclerkRequest != nil {
|
||||
if err := r.SetBodyParam(o.WebhookclerkRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,486 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2023 by Vernon Keenan
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
|
||||
// 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/work/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// PostWebhooksClerkReader is a Reader for the PostWebhooksClerk structure.
|
||||
type PostWebhooksClerkReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostWebhooksClerkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 201:
|
||||
result := NewPostWebhooksClerkCreated()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostWebhooksClerkUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostWebhooksClerkForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostWebhooksClerkNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostWebhooksClerkUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostWebhooksClerkInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkCreated creates a PostWebhooksClerkCreated with default headers values
|
||||
func NewPostWebhooksClerkCreated() *PostWebhooksClerkCreated {
|
||||
return &PostWebhooksClerkCreated{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkCreated describes a response with status code 201, with default header values.
|
||||
|
||||
WebhookClerk Response Object
|
||||
*/
|
||||
type PostWebhooksClerkCreated struct {
|
||||
Payload *members_models.WebhookClerkResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk created response has a 2xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk created response has a 3xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk created response has a 4xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk created response has a 5xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk created response a status code equal to that given
|
||||
func (o *PostWebhooksClerkCreated) IsCode(code int) bool {
|
||||
return code == 201
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk created response
|
||||
func (o *PostWebhooksClerkCreated) Code() int {
|
||||
return 201
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkCreated %+v", 201, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkCreated %+v", 201, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) GetPayload() *members_models.WebhookClerkResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.WebhookClerkResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkUnauthorized creates a PostWebhooksClerkUnauthorized with default headers values
|
||||
func NewPostWebhooksClerkUnauthorized() *PostWebhooksClerkUnauthorized {
|
||||
return &PostWebhooksClerkUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostWebhooksClerkUnauthorized struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk unauthorized response has a 2xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk unauthorized response has a 3xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk unauthorized response has a 4xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk unauthorized response has a 5xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk unauthorized response a status code equal to that given
|
||||
func (o *PostWebhooksClerkUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk unauthorized response
|
||||
func (o *PostWebhooksClerkUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkForbidden creates a PostWebhooksClerkForbidden with default headers values
|
||||
func NewPostWebhooksClerkForbidden() *PostWebhooksClerkForbidden {
|
||||
return &PostWebhooksClerkForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostWebhooksClerkForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk forbidden response has a 2xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk forbidden response has a 3xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk forbidden response has a 4xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk forbidden response has a 5xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk forbidden response a status code equal to that given
|
||||
func (o *PostWebhooksClerkForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk forbidden response
|
||||
func (o *PostWebhooksClerkForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) 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(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkNotFound creates a PostWebhooksClerkNotFound with default headers values
|
||||
func NewPostWebhooksClerkNotFound() *PostWebhooksClerkNotFound {
|
||||
return &PostWebhooksClerkNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostWebhooksClerkNotFound struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk not found response has a 2xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk not found response has a 3xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk not found response has a 4xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk not found response has a 5xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk not found response a status code equal to that given
|
||||
func (o *PostWebhooksClerkNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk not found response
|
||||
func (o *PostWebhooksClerkNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkUnprocessableEntity creates a PostWebhooksClerkUnprocessableEntity with default headers values
|
||||
func NewPostWebhooksClerkUnprocessableEntity() *PostWebhooksClerkUnprocessableEntity {
|
||||
return &PostWebhooksClerkUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostWebhooksClerkUnprocessableEntity struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk unprocessable entity response has a 2xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk unprocessable entity response has a 3xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk unprocessable entity response has a 4xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk unprocessable entity response has a 5xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk unprocessable entity response a status code equal to that given
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk unprocessable entity response
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkInternalServerError creates a PostWebhooksClerkInternalServerError with default headers values
|
||||
func NewPostWebhooksClerkInternalServerError() *PostWebhooksClerkInternalServerError {
|
||||
return &PostWebhooksClerkInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostWebhooksClerkInternalServerError struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk internal server error response has a 2xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk internal server error response has a 3xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk internal server error response has a 4xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk internal server error response has a 5xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk internal server error response a status code equal to that given
|
||||
func (o *PostWebhooksClerkInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk internal server error response
|
||||
func (o *PostWebhooksClerkInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -149,6 +149,9 @@ type User struct {
|
|||
// Out of office message
|
||||
OutOfOfficeMessage *string `json:"OutOfOfficeMessage,omitempty"`
|
||||
|
||||
// Password (encrypted)
|
||||
Password *string `json:"Password,omitempty"`
|
||||
|
||||
// Phone
|
||||
Phone *string `json:"Phone,omitempty"`
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2023 by Vernon Keenan
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
package companies
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
@ -16,13 +12,13 @@ import (
|
|||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new webhooks API client.
|
||||
// New creates a new companies API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for webhooks API
|
||||
Client for companies API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
|
@ -34,30 +30,31 @@ type ClientOption func(*runtime.ClientOperation)
|
|||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
PostWebhooksClerk(params *PostWebhooksClerkParams, opts ...ClientOption) (*PostWebhooksClerkCreated, error)
|
||||
GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerk clerks webhook
|
||||
GetCompanies gets a list of companies
|
||||
|
||||
Clerk webhook
|
||||
Return all or a single company fully hydrated object
|
||||
*/
|
||||
func (a *Client) PostWebhooksClerk(params *PostWebhooksClerkParams, opts ...ClientOption) (*PostWebhooksClerkCreated, error) {
|
||||
func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostWebhooksClerkParams()
|
||||
params = NewGetCompaniesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postWebhooksClerk",
|
||||
Method: "POST",
|
||||
PathPattern: "/webhooks/clerk",
|
||||
ID: "getCompanies",
|
||||
Method: "GET",
|
||||
PathPattern: "/companies",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostWebhooksClerkReader{formats: a.formats},
|
||||
Reader: &GetCompaniesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
|
@ -69,13 +66,13 @@ func (a *Client) PostWebhooksClerk(params *PostWebhooksClerkParams, opts ...Clie
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostWebhooksClerkCreated)
|
||||
success, ok := result.(*GetCompaniesOK)
|
||||
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 postWebhooksClerk: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
msg := fmt.Sprintf("unexpected success response for getCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package companies
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// NewGetCompaniesParams creates a new GetCompaniesParams 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 NewGetCompaniesParams() *GetCompaniesParams {
|
||||
return &GetCompaniesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompaniesParamsWithTimeout creates a new GetCompaniesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetCompaniesParamsWithTimeout(timeout time.Duration) *GetCompaniesParams {
|
||||
return &GetCompaniesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompaniesParamsWithContext creates a new GetCompaniesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetCompaniesParamsWithContext(ctx context.Context) *GetCompaniesParams {
|
||||
return &GetCompaniesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompaniesParamsWithHTTPClient creates a new GetCompaniesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetCompaniesParamsWithHTTPClient(client *http.Client) *GetCompaniesParams {
|
||||
return &GetCompaniesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get companies operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetCompaniesParams struct {
|
||||
|
||||
/* CompanyID.
|
||||
|
||||
Record Id of an Company
|
||||
*/
|
||||
CompanyID *string
|
||||
|
||||
/* Slug.
|
||||
|
||||
The slug of the item to retrieve
|
||||
*/
|
||||
Slug *string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get companies params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompaniesParams) WithDefaults() *GetCompaniesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get companies params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompaniesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get companies params
|
||||
func (o *GetCompaniesParams) WithTimeout(timeout time.Duration) *GetCompaniesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get companies params
|
||||
func (o *GetCompaniesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get companies params
|
||||
func (o *GetCompaniesParams) WithContext(ctx context.Context) *GetCompaniesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get companies params
|
||||
func (o *GetCompaniesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get companies params
|
||||
func (o *GetCompaniesParams) WithHTTPClient(client *http.Client) *GetCompaniesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get companies params
|
||||
func (o *GetCompaniesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithCompanyID adds the companyID to the get companies params
|
||||
func (o *GetCompaniesParams) WithCompanyID(companyID *string) *GetCompaniesParams {
|
||||
o.SetCompanyID(companyID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetCompanyID adds the companyId to the get companies params
|
||||
func (o *GetCompaniesParams) SetCompanyID(companyID *string) {
|
||||
o.CompanyID = companyID
|
||||
}
|
||||
|
||||
// WithSlug adds the slug to the get companies params
|
||||
func (o *GetCompaniesParams) WithSlug(slug *string) *GetCompaniesParams {
|
||||
o.SetSlug(slug)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetSlug adds the slug to the get companies params
|
||||
func (o *GetCompaniesParams) SetSlug(slug *string) {
|
||||
o.Slug = slug
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.CompanyID != nil {
|
||||
|
||||
// query param companyId
|
||||
var qrCompanyID string
|
||||
|
||||
if o.CompanyID != nil {
|
||||
qrCompanyID = *o.CompanyID
|
||||
}
|
||||
qCompanyID := qrCompanyID
|
||||
if qCompanyID != "" {
|
||||
|
||||
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Slug != nil {
|
||||
|
||||
// query param slug
|
||||
var qrSlug string
|
||||
|
||||
if o.Slug != nil {
|
||||
qrSlug = *o.Slug
|
||||
}
|
||||
qSlug := qrSlug
|
||||
if qSlug != "" {
|
||||
|
||||
if err := r.SetQueryParam("slug", qSlug); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,491 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package companies
|
||||
|
||||
// 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/work/lib/api/plex/plex_models"
|
||||
)
|
||||
|
||||
// GetCompaniesReader is a Reader for the GetCompanies structure.
|
||||
type GetCompaniesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetCompaniesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetCompaniesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetCompaniesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetCompaniesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetCompaniesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetCompaniesInternalServerError()
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompaniesOK creates a GetCompaniesOK with default headers values
|
||||
func NewGetCompaniesOK() *GetCompaniesOK {
|
||||
return &GetCompaniesOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesOK describes a response with status code 200, with default header values.
|
||||
|
||||
The SalesforceDevops.net Company Object
|
||||
*/
|
||||
type GetCompaniesOK struct {
|
||||
Payload *plex_models.CompanyResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies o k response has a 2xx status code
|
||||
func (o *GetCompaniesOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies o k response has a 3xx status code
|
||||
func (o *GetCompaniesOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies o k response has a 4xx status code
|
||||
func (o *GetCompaniesOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies o k response has a 5xx status code
|
||||
func (o *GetCompaniesOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies o k response a status code equal to that given
|
||||
func (o *GetCompaniesOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies o k response
|
||||
func (o *GetCompaniesOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *GetCompaniesOK) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesOK) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesOK) GetPayload() *plex_models.CompanyResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(plex_models.CompanyResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompaniesUnauthorized creates a GetCompaniesUnauthorized with default headers values
|
||||
func NewGetCompaniesUnauthorized() *GetCompaniesUnauthorized {
|
||||
return &GetCompaniesUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetCompaniesUnauthorized struct {
|
||||
Payload *plex_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies unauthorized response has a 2xx status code
|
||||
func (o *GetCompaniesUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies unauthorized response has a 3xx status code
|
||||
func (o *GetCompaniesUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies unauthorized response has a 4xx status code
|
||||
func (o *GetCompaniesUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies unauthorized response has a 5xx status code
|
||||
func (o *GetCompaniesUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies unauthorized response a status code equal to that given
|
||||
func (o *GetCompaniesUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies unauthorized response
|
||||
func (o *GetCompaniesUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnauthorized) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnauthorized) GetPayload() *plex_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(plex_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompaniesForbidden creates a GetCompaniesForbidden with default headers values
|
||||
func NewGetCompaniesForbidden() *GetCompaniesForbidden {
|
||||
return &GetCompaniesForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, Company lacks access
|
||||
*/
|
||||
type GetCompaniesForbidden struct {
|
||||
Payload *plex_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies forbidden response has a 2xx status code
|
||||
func (o *GetCompaniesForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies forbidden response has a 3xx status code
|
||||
func (o *GetCompaniesForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies forbidden response has a 4xx status code
|
||||
func (o *GetCompaniesForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies forbidden response has a 5xx status code
|
||||
func (o *GetCompaniesForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies forbidden response a status code equal to that given
|
||||
func (o *GetCompaniesForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies forbidden response
|
||||
func (o *GetCompaniesForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *GetCompaniesForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesForbidden) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesForbidden) GetPayload() *plex_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(plex_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompaniesNotFound creates a GetCompaniesNotFound with default headers values
|
||||
func NewGetCompaniesNotFound() *GetCompaniesNotFound {
|
||||
return &GetCompaniesNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetCompaniesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *plex_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies not found response has a 2xx status code
|
||||
func (o *GetCompaniesNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies not found response has a 3xx status code
|
||||
func (o *GetCompaniesNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies not found response has a 4xx status code
|
||||
func (o *GetCompaniesNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies not found response has a 5xx status code
|
||||
func (o *GetCompaniesNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies not found response a status code equal to that given
|
||||
func (o *GetCompaniesNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies not found response
|
||||
func (o *GetCompaniesNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *GetCompaniesNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesNotFound) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesNotFound) GetPayload() *plex_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesNotFound) 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(plex_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompaniesUnprocessableEntity creates a GetCompaniesUnprocessableEntity with default headers values
|
||||
func NewGetCompaniesUnprocessableEntity() *GetCompaniesUnprocessableEntity {
|
||||
return &GetCompaniesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetCompaniesUnprocessableEntity struct {
|
||||
Payload *plex_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies unprocessable entity response has a 2xx status code
|
||||
func (o *GetCompaniesUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies unprocessable entity response has a 3xx status code
|
||||
func (o *GetCompaniesUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies unprocessable entity response has a 4xx status code
|
||||
func (o *GetCompaniesUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies unprocessable entity response has a 5xx status code
|
||||
func (o *GetCompaniesUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies unprocessable entity response a status code equal to that given
|
||||
func (o *GetCompaniesUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies unprocessable entity response
|
||||
func (o *GetCompaniesUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnprocessableEntity) GetPayload() *plex_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(plex_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompaniesInternalServerError creates a GetCompaniesInternalServerError with default headers values
|
||||
func NewGetCompaniesInternalServerError() *GetCompaniesInternalServerError {
|
||||
return &GetCompaniesInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompaniesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetCompaniesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *plex_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get companies internal server error response has a 2xx status code
|
||||
func (o *GetCompaniesInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get companies internal server error response has a 3xx status code
|
||||
func (o *GetCompaniesInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get companies internal server error response has a 4xx status code
|
||||
func (o *GetCompaniesInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get companies internal server error response has a 5xx status code
|
||||
func (o *GetCompaniesInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this get companies internal server error response a status code equal to that given
|
||||
func (o *GetCompaniesInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the get companies internal server error response
|
||||
func (o *GetCompaniesInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *GetCompaniesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesInternalServerError) String() string {
|
||||
return fmt.Sprintf("[GET /companies][%d] getCompaniesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompaniesInternalServerError) GetPayload() *plex_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompaniesInternalServerError) 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(plex_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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/work/lib/api/plex/plex_client/companies"
|
||||
)
|
||||
|
||||
// Default plex HTTP client.
|
||||
var Default = NewHTTPClient(nil)
|
||||
|
||||
const (
|
||||
// DefaultHost is the default Host
|
||||
// found in Meta (info) section of spec file
|
||||
DefaultHost string = "plex.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 plex HTTP client.
|
||||
func NewHTTPClient(formats strfmt.Registry) *Plex {
|
||||
return NewHTTPClientWithConfig(formats, nil)
|
||||
}
|
||||
|
||||
// NewHTTPClientWithConfig creates a new plex HTTP client,
|
||||
// using a customizable transport config.
|
||||
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Plex {
|
||||
// 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 plex client
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Plex {
|
||||
// ensure nullable parameters have default
|
||||
if formats == nil {
|
||||
formats = strfmt.Default
|
||||
}
|
||||
|
||||
cli := new(Plex)
|
||||
cli.Transport = transport
|
||||
cli.Companies = companies.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
|
||||
}
|
||||
|
||||
// Plex is a client for plex
|
||||
type Plex struct {
|
||||
Companies companies.ClientService
|
||||
|
||||
Transport runtime.ClientTransport
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client and all its subresources
|
||||
func (c *Plex) SetTransport(transport runtime.ClientTransport) {
|
||||
c.Transport = transport
|
||||
c.Companies.SetTransport(transport)
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// Address address
|
||||
//
|
||||
// swagger:model Address
|
||||
type Address struct {
|
||||
|
||||
// City
|
||||
City *string `json:"City,omitempty"`
|
||||
|
||||
// Country full name
|
||||
Country *string `json:"Country,omitempty"`
|
||||
|
||||
// Country Code
|
||||
CountryCode *string `json:"CountryCode,omitempty"`
|
||||
|
||||
// Postal Code
|
||||
PostalCode *string `json:"PostalCode,omitempty"`
|
||||
|
||||
// State full name
|
||||
State *string `json:"State,omitempty"`
|
||||
|
||||
// State Code
|
||||
StateCode *string `json:"StateCode,omitempty"`
|
||||
|
||||
// Street number and name
|
||||
Street *string `json:"Street,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this address
|
||||
func (m *Address) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this address based on context it is used
|
||||
func (m *Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Address) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Address) UnmarshalBinary(b []byte) error {
|
||||
var res Address
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,399 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// Company company
|
||||
//
|
||||
// swagger:model Company
|
||||
type Company struct {
|
||||
|
||||
// Account Id
|
||||
AccountID *string `json:"AccountID,omitempty"`
|
||||
|
||||
// Company Number
|
||||
AccountNumber *string `json:"AccountNumber,omitempty"`
|
||||
|
||||
// The marketing origin of this Company
|
||||
AccountSource *string `json:"AccountSource,omitempty"`
|
||||
|
||||
// active
|
||||
Active *bool `json:"Active,omitempty"`
|
||||
|
||||
// Annual Revenue Estimate
|
||||
AnnualRevenue *float64 `json:"AnnualRevenue,omitempty"`
|
||||
|
||||
// cloud revenue total
|
||||
CloudRevenueTotal *float64 `json:"CloudRevenueTotal,omitempty"`
|
||||
|
||||
// The type of cloud company
|
||||
CloudType *string `json:"CloudType,omitempty"`
|
||||
|
||||
// The year company started cloud revenue
|
||||
CloudYear *string `json:"CloudYear,omitempty"`
|
||||
|
||||
// Company Products
|
||||
CompanyProducts []*CompanyProduct `json:"CompanyProducts"`
|
||||
|
||||
// Company Crunchbase URL
|
||||
CrunchbaseURL *string `json:"CrunchbaseURL,omitempty"`
|
||||
|
||||
// Description of the Company
|
||||
Description *string `json:"Description,omitempty"`
|
||||
|
||||
// Earnings Call Date
|
||||
EarningsCall *string `json:"EarningsCall,omitempty"`
|
||||
|
||||
// Main Company Email
|
||||
Email *string `json:"Email,omitempty"`
|
||||
|
||||
// The amount of equity EquityFunding
|
||||
EquityFunding *float64 `json:"EquityFunding,omitempty"`
|
||||
|
||||
// Company Facebook URL
|
||||
Facebook *string `json:"Facebook,omitempty"`
|
||||
|
||||
// Fax number
|
||||
Fax *string `json:"Fax,omitempty"`
|
||||
|
||||
// Financial Statements
|
||||
FinancialStatements []*FinancialStatement `json:"FinancialStatements"`
|
||||
|
||||
// Date company founded
|
||||
FoundedDate *string `json:"FoundedDate,omitempty"`
|
||||
|
||||
// Company Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// IPO Date
|
||||
IPODate *string `json:"IPODate,omitempty"`
|
||||
|
||||
// image alt text
|
||||
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||
|
||||
// image URL
|
||||
ImageURL *string `json:"ImageURL,omitempty"`
|
||||
|
||||
// Industries
|
||||
Industries *string `json:"Industries,omitempty"`
|
||||
|
||||
// Industry
|
||||
Industry *string `json:"Industry,omitempty"`
|
||||
|
||||
// Similar Companies
|
||||
IndustryCompanies []*IndustryCompany `json:"IndustryCompanies"`
|
||||
|
||||
// Company LinkedIn URL
|
||||
LinkedIn *string `json:"LinkedIn,omitempty"`
|
||||
|
||||
// listing address
|
||||
ListingAddress *Address `json:"ListingAddress,omitempty"`
|
||||
|
||||
// Headquarters Location Description
|
||||
Location *string `json:"Location,omitempty"`
|
||||
|
||||
// Company Logo URL
|
||||
Logo *string `json:"Logo,omitempty"`
|
||||
|
||||
// Market Capitalization
|
||||
MarketCapitalization *float64 `json:"MarketCapitalization,omitempty"`
|
||||
|
||||
// Company Name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
|
||||
// Number of Investments
|
||||
NumberInvestments *float64 `json:"NumberInvestments,omitempty"`
|
||||
|
||||
// Employee Count Estimate
|
||||
NumberOfEmployees *int64 `json:"NumberOfEmployees,omitempty"`
|
||||
|
||||
// Ownership
|
||||
Ownership *string `json:"Ownership,omitempty"`
|
||||
|
||||
// Parent Company
|
||||
ParentID *string `json:"ParentID,omitempty"`
|
||||
|
||||
// Phone
|
||||
Phone *string `json:"Phone,omitempty"`
|
||||
|
||||
// Publish this record?
|
||||
Publish *bool `json:"Publish,omitempty"`
|
||||
|
||||
// A Salesforce-First company?
|
||||
SalesforceFirst *bool `json:"SalesforceFirst,omitempty"`
|
||||
|
||||
// Slug
|
||||
Slug *string `json:"Slug,omitempty"`
|
||||
|
||||
// Company tagline
|
||||
TagLine *string `json:"TagLine,omitempty"`
|
||||
|
||||
// Ticker Symbol
|
||||
TickerSymbol *string `json:"TickerSymbol,omitempty"`
|
||||
|
||||
// Twitter URL
|
||||
Twitter *string `json:"Twitter,omitempty"`
|
||||
|
||||
// Type
|
||||
Type *string `json:"Type,omitempty"`
|
||||
|
||||
// Website
|
||||
Website *string `json:"Website,omitempty"`
|
||||
|
||||
// Year Started
|
||||
YearStarted *string `json:"YearStarted,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company
|
||||
func (m *Company) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateCompanyProducts(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateFinancialStatements(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateIndustryCompanies(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateListingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) validateCompanyProducts(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.CompanyProducts) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.CompanyProducts); i++ {
|
||||
if swag.IsZero(m.CompanyProducts[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.CompanyProducts[i] != nil {
|
||||
if err := m.CompanyProducts[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) validateFinancialStatements(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.FinancialStatements) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.FinancialStatements); i++ {
|
||||
if swag.IsZero(m.FinancialStatements[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.FinancialStatements[i] != nil {
|
||||
if err := m.FinancialStatements[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("FinancialStatements" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("FinancialStatements" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) validateIndustryCompanies(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.IndustryCompanies) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.IndustryCompanies); i++ {
|
||||
if swag.IsZero(m.IndustryCompanies[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.IndustryCompanies[i] != nil {
|
||||
if err := m.IndustryCompanies[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("IndustryCompanies" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("IndustryCompanies" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) validateListingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.ListingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.ListingAddress != nil {
|
||||
if err := m.ListingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("ListingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("ListingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company based on the context it is used
|
||||
func (m *Company) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateCompanyProducts(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateFinancialStatements(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateIndustryCompanies(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateListingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) contextValidateCompanyProducts(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.CompanyProducts); i++ {
|
||||
|
||||
if m.CompanyProducts[i] != nil {
|
||||
if err := m.CompanyProducts[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) contextValidateFinancialStatements(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.FinancialStatements); i++ {
|
||||
|
||||
if m.FinancialStatements[i] != nil {
|
||||
if err := m.FinancialStatements[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("FinancialStatements" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("FinancialStatements" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) contextValidateIndustryCompanies(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.IndustryCompanies); i++ {
|
||||
|
||||
if m.IndustryCompanies[i] != nil {
|
||||
if err := m.IndustryCompanies[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("IndustryCompanies" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("IndustryCompanies" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Company) contextValidateListingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.ListingAddress != nil {
|
||||
if err := m.ListingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("ListingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("ListingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Company) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Company) UnmarshalBinary(b []byte) error {
|
||||
var res Company
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// CompanyProduct A software product or service vended by a Company
|
||||
//
|
||||
// swagger:model CompanyProduct
|
||||
type CompanyProduct struct {
|
||||
|
||||
// ID of the Company that owns this Product
|
||||
AccountID *string `json:"AccountID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Description of product
|
||||
Description *string `json:"Description,omitempty"`
|
||||
|
||||
// Full Description of product
|
||||
FullDescription *string `json:"FullDescription,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Image Alt Text
|
||||
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||
|
||||
// Image URL
|
||||
ImageURL *string `json:"ImageURL,omitempty"`
|
||||
|
||||
// Industries
|
||||
Industries []*Industry `json:"Industries"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Logo
|
||||
Logo *string `json:"Logo,omitempty"`
|
||||
|
||||
// Product Name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
|
||||
// Product Video ID
|
||||
ProductVideoID *string `json:"ProductVideoID,omitempty"`
|
||||
|
||||
// Published
|
||||
Published *bool `json:"Published,omitempty"`
|
||||
|
||||
// Salesforce Specific
|
||||
SalesforceSpecific *bool `json:"SalesforceSpecific,omitempty"`
|
||||
|
||||
// Slug
|
||||
Slug *string `json:"Slug,omitempty"`
|
||||
|
||||
// TagLine
|
||||
TagLine *string `json:"TagLine,omitempty"`
|
||||
|
||||
// Website
|
||||
URL *string `json:"URL,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company product
|
||||
func (m *CompanyProduct) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateIndustries(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProduct) validateIndustries(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Industries) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Industries); i++ {
|
||||
if swag.IsZero(m.Industries[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Industries[i] != nil {
|
||||
if err := m.Industries[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company product based on the context it is used
|
||||
func (m *CompanyProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateIndustries(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProduct) contextValidateIndustries(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Industries); i++ {
|
||||
|
||||
if m.Industries[i] != nil {
|
||||
if err := m.Industries[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProduct) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProduct) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProduct
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// CompanyRequest An array of Company objects with Contacts
|
||||
//
|
||||
// swagger:model CompanyRequest
|
||||
type CompanyRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Company `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this company request
|
||||
func (m *CompanyRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyRequest) 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
|
||||
}
|
||||
|
||||
// ContextValidate validate this company request based on the context it is used
|
||||
func (m *CompanyRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyRequest) 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
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyRequest) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// CompanyResponse An array of Company objects with Contacts
|
||||
//
|
||||
// swagger:model CompanyResponse
|
||||
type CompanyResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Company `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company response
|
||||
func (m *CompanyResponse) 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 *CompanyResponse) 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 *CompanyResponse) 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 company response based on the context it is used
|
||||
func (m *CompanyResponse) 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 *CompanyResponse) 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 *CompanyResponse) 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 *CompanyResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyResponse) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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 int64 `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
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// FinancialStatement A financial statement for a company
|
||||
//
|
||||
// swagger:model FinancialStatement
|
||||
type FinancialStatement struct {
|
||||
|
||||
// EDGAR Access Number
|
||||
AccessNumber string `json:"AccessNumber,omitempty"`
|
||||
|
||||
// Account ID
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// Cloud Revenue
|
||||
CloudRevenue float64 `json:"CloudRevenue,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// EDGAR URL
|
||||
EdgarURL string `json:"EdgarURL,omitempty"`
|
||||
|
||||
// Filing Type
|
||||
FilingType string `json:"FilingType,omitempty"`
|
||||
|
||||
// Gross Profit
|
||||
GrossProfit float64 `json:"GrossProfit,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Net Income
|
||||
NetIncome float64 `json:"NetIncome,omitempty"`
|
||||
|
||||
// Period End Date
|
||||
PeriodEndDate string `json:"PeriodEndDate,omitempty"`
|
||||
|
||||
// Total Revenue
|
||||
TotalRevenue float64 `json:"TotalRevenue,omitempty"`
|
||||
|
||||
// Year
|
||||
Year string `json:"Year,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this financial statement
|
||||
func (m *FinancialStatement) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this financial statement based on context it is used
|
||||
func (m *FinancialStatement) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *FinancialStatement) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *FinancialStatement) UnmarshalBinary(b []byte) error {
|
||||
var res FinancialStatement
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// Industry An industry that is being researched
|
||||
//
|
||||
// swagger:model Industry
|
||||
type Industry struct {
|
||||
|
||||
// The AccountIDs of the Companies in this Industry
|
||||
Companies []string `json:"Companies"`
|
||||
|
||||
// The list of Products in this industry
|
||||
CompanyProducts []*CompanyProduct `json:"CompanyProducts"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Industry Description
|
||||
Description *string `json:"Description,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Image Alt Text
|
||||
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||
|
||||
// Image URL
|
||||
ImageURL *string `json:"ImageURL,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The hierarchical level of this Industry
|
||||
Level *string `json:"Level,omitempty"`
|
||||
|
||||
// Logo
|
||||
Logo *string `json:"Logo,omitempty"`
|
||||
|
||||
// Industry Name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
|
||||
// The ID of the Parent Industry
|
||||
ParentIndustryID *string `json:"ParentIndustryID,omitempty"`
|
||||
|
||||
// The full path of this industry, including Parent
|
||||
Path *string `json:"Path,omitempty"`
|
||||
|
||||
// The CMS Slug for this Industry
|
||||
Slug *string `json:"Slug,omitempty"`
|
||||
|
||||
// TagLine
|
||||
TagLine *string `json:"TagLine,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry
|
||||
func (m *Industry) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateCompanyProducts(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Industry) validateCompanyProducts(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.CompanyProducts) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.CompanyProducts); i++ {
|
||||
if swag.IsZero(m.CompanyProducts[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.CompanyProducts[i] != nil {
|
||||
if err := m.CompanyProducts[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry based on the context it is used
|
||||
func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateCompanyProducts(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Industry) contextValidateCompanyProducts(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.CompanyProducts); i++ {
|
||||
|
||||
if m.CompanyProducts[i] != nil {
|
||||
if err := m.CompanyProducts[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("CompanyProducts" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Industry) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Industry) UnmarshalBinary(b []byte) error {
|
||||
var res Industry
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// IndustryCompany Junction object between Industry and Company
|
||||
//
|
||||
// swagger:model IndustryCompany
|
||||
type IndustryCompany struct {
|
||||
|
||||
// company ID
|
||||
CompanyID string `json:"CompanyID,omitempty"`
|
||||
|
||||
// company name
|
||||
CompanyName string `json:"CompanyName,omitempty"`
|
||||
|
||||
// company slug
|
||||
CompanySlug string `json:"CompanySlug,omitempty"`
|
||||
|
||||
// company website
|
||||
CompanyWebsite string `json:"CompanyWebsite,omitempty"`
|
||||
|
||||
// Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// industry ID
|
||||
IndustryID string `json:"IndustryID,omitempty"`
|
||||
|
||||
// industry name
|
||||
IndustryName string `json:"IndustryName,omitempty"`
|
||||
|
||||
// industry slug
|
||||
IndustrySlug string `json:"IndustrySlug,omitempty"`
|
||||
|
||||
// industry tag line
|
||||
IndustryTagLine string `json:"IndustryTagLine,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// path
|
||||
Path string `json:"Path,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry company
|
||||
func (m *IndustryCompany) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this industry company based on context it is used
|
||||
func (m *IndustryCompany) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryCompany) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryCompany) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryCompany
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// InvalidError invalid error
|
||||
//
|
||||
// swagger:model InvalidError
|
||||
type InvalidError struct {
|
||||
Error
|
||||
|
||||
// details
|
||||
Details []string `json:"details"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON unmarshals this object from a JSON structure
|
||||
func (m *InvalidError) UnmarshalJSON(raw []byte) error {
|
||||
// AO0
|
||||
var aO0 Error
|
||||
if err := swag.ReadJSON(raw, &aO0); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Error = aO0
|
||||
|
||||
// AO1
|
||||
var dataAO1 struct {
|
||||
Details []string `json:"details"`
|
||||
}
|
||||
if err := swag.ReadJSON(raw, &dataAO1); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
m.Details = dataAO1.Details
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON marshals this object to a JSON structure
|
||||
func (m InvalidError) MarshalJSON() ([]byte, error) {
|
||||
_parts := make([][]byte, 0, 2)
|
||||
|
||||
aO0, err := swag.WriteJSON(m.Error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_parts = append(_parts, aO0)
|
||||
var dataAO1 struct {
|
||||
Details []string `json:"details"`
|
||||
}
|
||||
|
||||
dataAO1.Details = m.Details
|
||||
|
||||
jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1)
|
||||
if errAO1 != nil {
|
||||
return nil, errAO1
|
||||
}
|
||||
_parts = append(_parts, jsonDataAO1)
|
||||
return swag.ConcatJSON(_parts...), nil
|
||||
}
|
||||
|
||||
// Validate validates this invalid error
|
||||
func (m *InvalidError) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
// validation for a type composition with Error
|
||||
if err := m.Error.Validate(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this invalid error based on the context it is used
|
||||
func (m *InvalidError) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
// validation for a type composition with Error
|
||||
if err := m.Error.ContextValidate(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *InvalidError) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *InvalidError) UnmarshalBinary(b []byte) error {
|
||||
var res InvalidError
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// Pagination pagination
|
||||
//
|
||||
// swagger:model pagination
|
||||
type Pagination struct {
|
||||
|
||||
// limit
|
||||
Limit int64 `json:"limit,omitempty"`
|
||||
|
||||
// pagesize
|
||||
Pagesize int64 `json:"pagesize,omitempty"`
|
||||
|
||||
// poffset
|
||||
Poffset int64 `json:"poffset,omitempty"`
|
||||
|
||||
// setsize
|
||||
Setsize int64 `json:"setsize,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this pagination
|
||||
func (m *Pagination) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this pagination based on context it is used
|
||||
func (m *Pagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Pagination) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Pagination) UnmarshalBinary(b []byte) error {
|
||||
var res Pagination
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package plex_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"
|
||||
)
|
||||
|
||||
// ResponseMeta response meta
|
||||
//
|
||||
// swagger:model responseMeta
|
||||
type ResponseMeta struct {
|
||||
|
||||
// Microservice Contact Info
|
||||
Contact string `json:"Contact,omitempty"`
|
||||
|
||||
// Copyright Info
|
||||
Copyright string `json:"Copyright,omitempty"`
|
||||
|
||||
// Account Number used for recording transactions
|
||||
ExternalAccount string `json:"ExternalAccount,omitempty"`
|
||||
|
||||
// License Information and Restrictions
|
||||
License string `json:"License,omitempty"`
|
||||
|
||||
// Operation ID
|
||||
OperationID string `json:"OperationID,omitempty"`
|
||||
|
||||
// pagination
|
||||
Pagination *Pagination `json:"Pagination,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"`
|
||||
}
|
||||
|
||||
// Validate validates this response meta
|
||||
func (m *ResponseMeta) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validatePagination(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Pagination) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Pagination != nil {
|
||||
if err := m.Pagination.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Pagination")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Pagination")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this response meta based on the context it is used
|
||||
func (m *ResponseMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidatePagination(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ResponseMeta) contextValidatePagination(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Pagination != nil {
|
||||
if err := m.Pagination.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Pagination")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Pagination")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
|
@ -33,7 +33,7 @@ var Default = NewHTTPClient(nil)
|
|||
const (
|
||||
// DefaultHost is the default Host
|
||||
// found in Meta (info) section of spec file
|
||||
DefaultHost string = "research.work.noc.tnxs.net:8080"
|
||||
DefaultHost string = "research.work.tnxs.net:8080"
|
||||
// DefaultBasePath is the default BasePath
|
||||
// found in Meta (info) section of spec file
|
||||
DefaultBasePath string = "/v1"
|
||||
|
|
|
@ -74,6 +74,7 @@ func MarshalAuthUserToSwagger(obj *auth_models.User) *User {
|
|||
MobilePhone: obj.MobilePhone,
|
||||
Name: obj.Name,
|
||||
OutOfOfficeMessage: obj.OutOfOfficeMessage,
|
||||
Password: obj.Password,
|
||||
Phone: obj.Phone,
|
||||
PortalRole: obj.PortalRole,
|
||||
ProfileID: obj.ProfileID,
|
||||
|
|
|
@ -53,6 +53,7 @@ type User struct {
|
|||
MobilePhone string
|
||||
Name string
|
||||
OutOfOfficeMessage string
|
||||
Password string
|
||||
Phone string
|
||||
PortalRole string
|
||||
ProfileID string
|
||||
|
|
|
@ -266,6 +266,9 @@ definitions:
|
|||
OutOfOfficeMessage:
|
||||
description: Out of office message
|
||||
type: string
|
||||
Password:
|
||||
description: Password
|
||||
type: string
|
||||
Phone:
|
||||
description: Phone
|
||||
type: string
|
||||
|
|
|
@ -162,6 +162,10 @@ User:
|
|||
description: Out of office message
|
||||
type: string
|
||||
x-nullable: true
|
||||
Password:
|
||||
description: Password (encrypted)
|
||||
type: string
|
||||
x-nullable: true
|
||||
Phone:
|
||||
description: Phone
|
||||
type: string
|
||||
|
|
|
@ -266,6 +266,9 @@ definitions:
|
|||
OutOfOfficeMessage:
|
||||
description: Out of office message
|
||||
type: string
|
||||
Password:
|
||||
description: Password
|
||||
type: string
|
||||
Phone:
|
||||
description: Phone
|
||||
type: string
|
||||
|
|
|
@ -3154,28 +3154,6 @@ paths:
|
|||
summary: Async onboard new users
|
||||
tags:
|
||||
- Users
|
||||
/webhooks/clerk:
|
||||
post:
|
||||
description: Clerk webhook
|
||||
operationId: postWebhooksClerk
|
||||
parameters:
|
||||
- $ref: "#/parameters/WebhookClerkRequest"
|
||||
responses:
|
||||
"201":
|
||||
$ref: "#/responses/WebhookClerkResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
summary: Clerk webhook
|
||||
tags:
|
||||
- Webhooks
|
||||
/users:
|
||||
get:
|
||||
description: Return a list of User records from the datastore
|
||||
|
|
|
@ -0,0 +1,596 @@
|
|||
swagger: "2.0"
|
||||
info:
|
||||
version: 0.3.4
|
||||
title: "plex"
|
||||
description: "Cross-Schema Retrieval Microservice"
|
||||
termsOfService: "https://workdifferentwithai.com/terms/"
|
||||
contact:
|
||||
email: "info@workdifferentwithai.com"
|
||||
license:
|
||||
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
|
||||
securityDefinitions:
|
||||
ApiKeyAuth:
|
||||
type: "apiKey"
|
||||
in: "header"
|
||||
name: "X-API-Key"
|
||||
schemes:
|
||||
- "https"
|
||||
basePath: "/work/plex/v1"
|
||||
host: "plex.work.tnxs.net:8080"
|
||||
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
|
|
@ -16,7 +16,7 @@ securityDefinitions:
|
|||
schemes:
|
||||
- "https"
|
||||
basePath: "/vk/research/v1"
|
||||
host: "research.work.noc.tnxs.net:8080"
|
||||
host: "research.work.tnxs.net:8080"
|
||||
consumes:
|
||||
- "application/json"
|
||||
produces:
|
||||
|
|
|
@ -3154,28 +3154,6 @@ paths:
|
|||
summary: Async onboard new users
|
||||
tags:
|
||||
- Users
|
||||
/webhooks/clerk:
|
||||
post:
|
||||
description: Clerk webhook
|
||||
operationId: postWebhooksClerk
|
||||
parameters:
|
||||
- $ref: "#/parameters/WebhookClerkRequest"
|
||||
responses:
|
||||
"201":
|
||||
$ref: "#/responses/WebhookClerkResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
summary: Clerk webhook
|
||||
tags:
|
||||
- Webhooks
|
||||
/users:
|
||||
get:
|
||||
description: Return a list of User records from the datastore
|
||||
|
|
|
@ -0,0 +1,596 @@
|
|||
swagger: "2.0"
|
||||
info:
|
||||
version: 0.3.4
|
||||
title: "plex"
|
||||
description: "Cross-Schema Retrieval Microservice"
|
||||
termsOfService: "https://workdifferentwithai.com/terms/"
|
||||
contact:
|
||||
email: "info@workdifferentwithai.com"
|
||||
license:
|
||||
name: "Proprietary - Copyright (c) 2018-2023 by Vernon Keenan"
|
||||
securityDefinitions:
|
||||
ApiKeyAuth:
|
||||
type: "apiKey"
|
||||
in: "header"
|
||||
name: "X-API-Key"
|
||||
schemes:
|
||||
- "http"
|
||||
basePath: "/v1"
|
||||
host: "plex.work.tnxs.net:8080"
|
||||
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
|
|
@ -16,7 +16,7 @@ securityDefinitions:
|
|||
schemes:
|
||||
- "http"
|
||||
basePath: "/v1"
|
||||
host: "research.work.noc.tnxs.net:8080"
|
||||
host: "research.work.tnxs.net:8080"
|
||||
consumes:
|
||||
- "application/json"
|
||||
produces:
|
||||
|
|
Loading…
Reference in New Issue