From 9a96094d639b67abf33fbb82a7599c22dcc39524 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Fri, 7 Apr 2023 00:34:49 +0000 Subject: [PATCH] fix missing slugs --- Makefile | 2 +- .../accounts/get_accounts_parameters.go | 68 ++++----- .../contacts/get_contacts_parameters.go | 68 ++++----- .../plex_client/companies/companies_client.go | 2 +- .../companies/get_companies_parameters.go | 141 ------------------ api/plex/plex_models/company.go | 6 + api/sfgate/sfgate_models/contact.go | 3 + swagger/crm-vernonkeenan.yaml | 10 +- swagger/external/crm-vernonkeenan.yaml | 10 +- swagger/external/plex-vernonkeenan.yaml | 22 ++- swagger/external/sf-gate-vernonkeenan.yaml | 3 + swagger/plex-vernonkeenan.yaml | 22 ++- swagger/sf-gate-vernonkeenan.yaml | 3 + 13 files changed, 119 insertions(+), 241 deletions(-) diff --git a/Makefile b/Makefile index ea9bd1a..e736101 100644 --- a/Makefile +++ b/Makefile @@ -175,4 +175,4 @@ swagger: # # copy external swagger files # - scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxnexus/www/assets/swagger/ + scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxassets/www/swagger/external diff --git a/api/crm/crm_client/accounts/get_accounts_parameters.go b/api/crm/crm_client/accounts/get_accounts_parameters.go index 99664db..61368c3 100644 --- a/api/crm/crm_client/accounts/get_accounts_parameters.go +++ b/api/crm/crm_client/accounts/get_accounts_parameters.go @@ -78,12 +78,6 @@ type GetAccountsParams struct { */ Active *bool - /* Email. - - Email address used for identity lookup - */ - Email *string - /* Limit. How many objects to return at one time @@ -106,6 +100,12 @@ type GetAccountsParams struct { */ Offset *int64 + /* Slug. + + The Slug of this Object + */ + Slug *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -181,17 +181,6 @@ func (o *GetAccountsParams) SetActive(active *bool) { o.Active = active } -// WithEmail adds the email to the get accounts params -func (o *GetAccountsParams) WithEmail(email *string) *GetAccountsParams { - o.SetEmail(email) - return o -} - -// SetEmail adds the email to the get accounts params -func (o *GetAccountsParams) SetEmail(email *string) { - o.Email = email -} - // WithLimit adds the limit to the get accounts params func (o *GetAccountsParams) WithLimit(limit *int64) *GetAccountsParams { o.SetLimit(limit) @@ -225,6 +214,17 @@ func (o *GetAccountsParams) SetOffset(offset *int64) { o.Offset = offset } +// WithSlug adds the slug to the get accounts params +func (o *GetAccountsParams) WithSlug(slug *string) *GetAccountsParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the get accounts params +func (o *GetAccountsParams) SetSlug(slug *string) { + o.Slug = slug +} + // WriteToRequest writes these params to a swagger request func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -267,23 +267,6 @@ func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } } - if o.Email != nil { - - // query param email - var qrEmail string - - if o.Email != nil { - qrEmail = *o.Email - } - qEmail := qrEmail - if qEmail != "" { - - if err := r.SetQueryParam("email", qEmail); err != nil { - return err - } - } - } - if o.Limit != nil { // query param limit @@ -335,6 +318,23 @@ func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } } + 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...) } diff --git a/api/crm/crm_client/contacts/get_contacts_parameters.go b/api/crm/crm_client/contacts/get_contacts_parameters.go index 9268797..b22ac0b 100644 --- a/api/crm/crm_client/contacts/get_contacts_parameters.go +++ b/api/crm/crm_client/contacts/get_contacts_parameters.go @@ -92,12 +92,6 @@ type GetContactsParams struct { */ Limit *int64 - /* Name. - - The Name of this Object - */ - Name *string - /* Offset. How many objects to skip? @@ -106,6 +100,12 @@ type GetContactsParams struct { */ Offset *int64 + /* Slug. + + The Slug of this Object + */ + Slug *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -203,17 +203,6 @@ func (o *GetContactsParams) SetLimit(limit *int64) { o.Limit = limit } -// WithName adds the name to the get contacts params -func (o *GetContactsParams) WithName(name *string) *GetContactsParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get contacts params -func (o *GetContactsParams) SetName(name *string) { - o.Name = name -} - // WithOffset adds the offset to the get contacts params func (o *GetContactsParams) WithOffset(offset *int64) *GetContactsParams { o.SetOffset(offset) @@ -225,6 +214,17 @@ func (o *GetContactsParams) SetOffset(offset *int64) { o.Offset = offset } +// WithSlug adds the slug to the get contacts params +func (o *GetContactsParams) WithSlug(slug *string) *GetContactsParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the get contacts params +func (o *GetContactsParams) SetSlug(slug *string) { + o.Slug = slug +} + // WriteToRequest writes these params to a swagger request func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -301,23 +301,6 @@ func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } } - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - if o.Offset != nil { // query param offset @@ -335,6 +318,23 @@ func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } } + 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...) } diff --git a/api/plex/plex_client/companies/companies_client.go b/api/plex/plex_client/companies/companies_client.go index ea18ef7..fa93d2c 100644 --- a/api/plex/plex_client/companies/companies_client.go +++ b/api/plex/plex_client/companies/companies_client.go @@ -42,7 +42,7 @@ type ClientService interface { /* GetCompanies gets a list of companies -Return a list of all available Companies +Return all or a single company fully hydrated object */ func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error) { // TODO: Validate the params before sending diff --git a/api/plex/plex_client/companies/get_companies_parameters.go b/api/plex/plex_client/companies/get_companies_parameters.go index 852fdfd..a0510f2 100644 --- a/api/plex/plex_client/companies/get_companies_parameters.go +++ b/api/plex/plex_client/companies/get_companies_parameters.go @@ -18,7 +18,6 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" ) // NewGetCompaniesParams creates a new GetCompaniesParams object, @@ -66,40 +65,12 @@ GetCompaniesParams contains all the parameters to send to the API endpoint */ type GetCompaniesParams struct { - /* Active. - - Only retrieve active records? - */ - Active *bool - /* CompanyID. Record Id of an Company */ CompanyID *string - /* Limit. - - How many objects to return at one time - - Format: int64 - */ - Limit *int64 - - /* Name. - - The Name of this Object - */ - Name *string - - /* Offset. - - How many objects to skip? - - Format: int64 - */ - Offset *int64 - timeout time.Duration Context context.Context HTTPClient *http.Client @@ -153,17 +124,6 @@ func (o *GetCompaniesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithActive adds the active to the get companies params -func (o *GetCompaniesParams) WithActive(active *bool) *GetCompaniesParams { - o.SetActive(active) - return o -} - -// SetActive adds the active to the get companies params -func (o *GetCompaniesParams) SetActive(active *bool) { - o.Active = active -} - // WithCompanyID adds the companyID to the get companies params func (o *GetCompaniesParams) WithCompanyID(companyID *string) *GetCompaniesParams { o.SetCompanyID(companyID) @@ -175,39 +135,6 @@ func (o *GetCompaniesParams) SetCompanyID(companyID *string) { o.CompanyID = companyID } -// WithLimit adds the limit to the get companies params -func (o *GetCompaniesParams) WithLimit(limit *int64) *GetCompaniesParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get companies params -func (o *GetCompaniesParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithName adds the name to the get companies params -func (o *GetCompaniesParams) WithName(name *string) *GetCompaniesParams { - o.SetName(name) - return o -} - -// SetName adds the name to the get companies params -func (o *GetCompaniesParams) SetName(name *string) { - o.Name = name -} - -// WithOffset adds the offset to the get companies params -func (o *GetCompaniesParams) WithOffset(offset *int64) *GetCompaniesParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the get companies params -func (o *GetCompaniesParams) SetOffset(offset *int64) { - o.Offset = offset -} - // WriteToRequest writes these params to a swagger request func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -216,23 +143,6 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } var res []error - if o.Active != nil { - - // query param active - var qrActive bool - - if o.Active != nil { - qrActive = *o.Active - } - qActive := swag.FormatBool(qrActive) - if qActive != "" { - - if err := r.SetQueryParam("active", qActive); err != nil { - return err - } - } - } - if o.CompanyID != nil { // query param companyId @@ -250,57 +160,6 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Name != nil { - - // query param name - var qrName string - - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/plex/plex_models/company.go b/api/plex/plex_models/company.go index ded2c80..9c2e652 100644 --- a/api/plex/plex_models/company.go +++ b/api/plex/plex_models/company.go @@ -23,6 +23,9 @@ import ( // swagger:model Company type Company struct { + // Account Id + AccountID string `json:"AccountID,omitempty"` + // Company Number AccountNumber string `json:"AccountNumber,omitempty"` @@ -47,6 +50,9 @@ type Company struct { // Company Products CompanyProducts []*CompanyProduct `json:"CompanyProducts"` + // Company Crunchbase URL + CrunchbaseURL string `json:"CrunchbaseURL,omitempty"` + // Description of the Company Description string `json:"Description,omitempty"` diff --git a/api/sfgate/sfgate_models/contact.go b/api/sfgate/sfgate_models/contact.go index ff2a7ec..2c77bdd 100644 --- a/api/sfgate/sfgate_models/contact.go +++ b/api/sfgate/sfgate_models/contact.go @@ -109,6 +109,9 @@ type Contact struct { // Full Name Name string `json:"Name,omitempty"` + // Number of Investments + NumberInvestments float64 `json:"NumberInvestments,omitempty"` + // other address OtherAddress *Address `json:"OtherAddress,omitempty"` diff --git a/swagger/crm-vernonkeenan.yaml b/swagger/crm-vernonkeenan.yaml index 387bfdf..1b286b2 100644 --- a/swagger/crm-vernonkeenan.yaml +++ b/swagger/crm-vernonkeenan.yaml @@ -125,6 +125,12 @@ parameters: name: offset required: false type: integer + slugQuery: + description: The Slug of this Object + in: query + name: slug + required: false + type: string typeQuery: description: The Type of this Object in: query @@ -267,7 +273,7 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/activeQuery" - $ref: "#/parameters/accountIdQuery" - - $ref: "#/parameters/emailQuery" + - $ref: "#/parameters/slugQuery" responses: "200": $ref: "#/responses/AccountResponse" @@ -556,8 +562,8 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/contactIdQuery" - $ref: "#/parameters/activeQuery" + - $ref: "#/parameters/slugQuery" - $ref: "#/parameters/emailQuery" - - $ref: "#/parameters/nameQuery" responses: "200": $ref: "#/responses/ContactResponse" diff --git a/swagger/external/crm-vernonkeenan.yaml b/swagger/external/crm-vernonkeenan.yaml index 692b695..526d1d2 100644 --- a/swagger/external/crm-vernonkeenan.yaml +++ b/swagger/external/crm-vernonkeenan.yaml @@ -125,6 +125,12 @@ parameters: name: offset required: false type: integer + slugQuery: + description: The Slug of this Object + in: query + name: slug + required: false + type: string typeQuery: description: The Type of this Object in: query @@ -267,7 +273,7 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/activeQuery" - $ref: "#/parameters/accountIdQuery" - - $ref: "#/parameters/emailQuery" + - $ref: "#/parameters/slugQuery" responses: "200": $ref: "#/responses/AccountResponse" @@ -556,8 +562,8 @@ paths: - $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/contactIdQuery" - $ref: "#/parameters/activeQuery" + - $ref: "#/parameters/slugQuery" - $ref: "#/parameters/emailQuery" - - $ref: "#/parameters/nameQuery" responses: "200": $ref: "#/responses/ContactResponse" diff --git a/swagger/external/plex-vernonkeenan.yaml b/swagger/external/plex-vernonkeenan.yaml index 8f2e5f8..2601df9 100644 --- a/swagger/external/plex-vernonkeenan.yaml +++ b/swagger/external/plex-vernonkeenan.yaml @@ -41,12 +41,6 @@ parameters: name: limit required: false type: integer - nameQuery: - description: The Name of this Object - in: query - name: name - required: false - type: string offsetQuery: description: How many objects to skip? format: int64 @@ -104,14 +98,10 @@ responses: paths: /companies: get: - description: Return a list of all available Companies + description: Return all or a single company fully hydrated object operationId: getCompanies parameters: - $ref: "#/parameters/CompanyIdQuery" - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/nameQuery" - - $ref: "#/parameters/activeQuery" - - $ref: "#/parameters/offsetQuery" responses: "200": $ref: "#/responses/CompanyResponse" @@ -160,6 +150,9 @@ definitions: ID: description: Company Id type: string + AccountID: + description: Account Id + type: string AccountNumber: description: Company Number type: string @@ -172,8 +165,6 @@ definitions: description: Annual Revenue Estimate format: double type: number - ListingAddress: - $ref: "#/definitions/Address" CloudRevenueTotal: type: number CloudType: @@ -182,6 +173,9 @@ definitions: CloudYear: description: The year company started cloud revenue type: string + CrunchbaseURL: + description: Company Crunchbase URL + type: string Description: description: Description of the Company type: string @@ -219,6 +213,8 @@ definitions: LinkedIn: description: Company LinkedIn URL type: string + ListingAddress: + $ref: "#/definitions/Address" Location: description: Headquarters Location Description type: string diff --git a/swagger/external/sf-gate-vernonkeenan.yaml b/swagger/external/sf-gate-vernonkeenan.yaml index 4404594..997272a 100644 --- a/swagger/external/sf-gate-vernonkeenan.yaml +++ b/swagger/external/sf-gate-vernonkeenan.yaml @@ -2007,6 +2007,9 @@ definitions: Name: description: Full Name type: string + NumberInvestments: + description: Number of Investments + type: number OtherAddress: $ref: "#/definitions/Address" OtherPhone: diff --git a/swagger/plex-vernonkeenan.yaml b/swagger/plex-vernonkeenan.yaml index 9d2d2de..bd035e7 100644 --- a/swagger/plex-vernonkeenan.yaml +++ b/swagger/plex-vernonkeenan.yaml @@ -41,12 +41,6 @@ parameters: name: limit required: false type: integer - nameQuery: - description: The Name of this Object - in: query - name: name - required: false - type: string offsetQuery: description: How many objects to skip? format: int64 @@ -104,14 +98,10 @@ responses: paths: /companies: get: - description: Return a list of all available Companies + description: Return all or a single company fully hydrated object operationId: getCompanies parameters: - $ref: "#/parameters/CompanyIdQuery" - - $ref: "#/parameters/limitQuery" - - $ref: "#/parameters/nameQuery" - - $ref: "#/parameters/activeQuery" - - $ref: "#/parameters/offsetQuery" responses: "200": $ref: "#/responses/CompanyResponse" @@ -160,6 +150,9 @@ definitions: ID: description: Company Id type: string + AccountID: + description: Account Id + type: string AccountNumber: description: Company Number type: string @@ -172,8 +165,6 @@ definitions: description: Annual Revenue Estimate format: double type: number - ListingAddress: - $ref: "#/definitions/Address" CloudRevenueTotal: type: number CloudType: @@ -182,6 +173,9 @@ definitions: CloudYear: description: The year company started cloud revenue type: string + CrunchbaseURL: + description: Company Crunchbase URL + type: string Description: description: Description of the Company type: string @@ -219,6 +213,8 @@ definitions: LinkedIn: description: Company LinkedIn URL type: string + ListingAddress: + $ref: "#/definitions/Address" Location: description: Headquarters Location Description type: string diff --git a/swagger/sf-gate-vernonkeenan.yaml b/swagger/sf-gate-vernonkeenan.yaml index e7ac3cd..741cdd4 100644 --- a/swagger/sf-gate-vernonkeenan.yaml +++ b/swagger/sf-gate-vernonkeenan.yaml @@ -2007,6 +2007,9 @@ definitions: Name: description: Full Name type: string + NumberInvestments: + description: Number of Investments + type: number OtherAddress: $ref: "#/definitions/Address" OtherPhone: