objects

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package objects provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package objects provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Package objects provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	Oauth2Scopes = "oauth2.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewCreateObjectRequest

func NewCreateObjectRequest(server string, objectType string, body CreateObjectJSONRequestBody) (*http.Request, error)

NewCreateObjectRequest calls the generic CreateObject builder with application/json body

func NewCreateObjectRequestWithBody

func NewCreateObjectRequestWithBody(server string, objectType string, contentType string, body io.Reader) (*http.Request, error)

NewCreateObjectRequestWithBody generates requests for CreateObject with any type of body

func NewDeleteObjectRequest

func NewDeleteObjectRequest(server string, objectType string, objectId string) (*http.Request, error)

NewDeleteObjectRequest generates requests for DeleteObject

func NewGetObjectByTypeAndIdRequest

func NewGetObjectByTypeAndIdRequest(server string, objectType string, objectId string, params *GetObjectByTypeAndIdParams) (*http.Request, error)

NewGetObjectByTypeAndIdRequest generates requests for GetObjectByTypeAndId

func NewGetObjectsRequest

func NewGetObjectsRequest(server string, objectType string, params *GetObjectsParams) (*http.Request, error)

NewGetObjectsRequest generates requests for GetObjects

func NewSearchObjectsRequest

func NewSearchObjectsRequest(server string, objectType string, body SearchObjectsJSONRequestBody) (*http.Request, error)

NewSearchObjectsRequest calls the generic SearchObjects builder with application/json body

func NewSearchObjectsRequestWithBody

func NewSearchObjectsRequestWithBody(server string, objectType string, contentType string, body io.Reader) (*http.Request, error)

NewSearchObjectsRequestWithBody generates requests for SearchObjects with any type of body

func NewUpdateObjectRequest

func NewUpdateObjectRequest(server string, objectType string, objectId string, params *UpdateObjectParams, body UpdateObjectJSONRequestBody) (*http.Request, error)

NewUpdateObjectRequest calls the generic UpdateObject builder with application/json body

func NewUpdateObjectRequestWithBody

func NewUpdateObjectRequestWithBody(server string, objectType string, objectId string, params *UpdateObjectParams, contentType string, body io.Reader) (*http.Request, error)

NewUpdateObjectRequestWithBody generates requests for UpdateObject with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type Archived

type Archived = bool

Archived defines model for Archived.

type AssociationResponse

type AssociationResponse struct {
	// Id The ID of the associated object.
	Id *string `json:"id,omitempty"`

	// Type The type of association.
	Type *string `json:"type,omitempty"`
}

AssociationResponse defines model for AssociationResponse.

type Associations

type Associations = []string

Associations defines model for Associations.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateObject

func (c *Client) CreateObject(ctx context.Context, objectType string, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateObjectWithBody

func (c *Client) CreateObjectWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteObject

func (c *Client) DeleteObject(ctx context.Context, objectType string, objectId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetObjectByTypeAndId

func (c *Client) GetObjectByTypeAndId(ctx context.Context, objectType string, objectId string, params *GetObjectByTypeAndIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetObjects

func (c *Client) GetObjects(ctx context.Context, objectType string, params *GetObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchObjects

func (c *Client) SearchObjects(ctx context.Context, objectType string, body SearchObjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchObjectsWithBody

func (c *Client) SearchObjectsWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateObject

func (c *Client) UpdateObject(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateObjectWithBody

func (c *Client) UpdateObjectWithBody(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetObjects request
	GetObjects(ctx context.Context, objectType string, params *GetObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateObjectWithBody request with any body
	CreateObjectWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateObject(ctx context.Context, objectType string, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SearchObjectsWithBody request with any body
	SearchObjectsWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SearchObjects(ctx context.Context, objectType string, body SearchObjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteObject request
	DeleteObject(ctx context.Context, objectType string, objectId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetObjectByTypeAndId request
	GetObjectByTypeAndId(ctx context.Context, objectType string, objectId string, params *GetObjectByTypeAndIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateObjectWithBody request with any body
	UpdateObjectWithBody(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateObject(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateObjectWithBodyWithResponse

func (c *ClientWithResponses) CreateObjectWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)

CreateObjectWithBodyWithResponse request with arbitrary body returning *CreateObjectResponse

func (*ClientWithResponses) CreateObjectWithResponse

func (c *ClientWithResponses) CreateObjectWithResponse(ctx context.Context, objectType string, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)

func (*ClientWithResponses) DeleteObjectWithResponse

func (c *ClientWithResponses) DeleteObjectWithResponse(ctx context.Context, objectType string, objectId string, reqEditors ...RequestEditorFn) (*DeleteObjectResponse, error)

DeleteObjectWithResponse request returning *DeleteObjectResponse

func (*ClientWithResponses) GetObjectByTypeAndIdWithResponse

func (c *ClientWithResponses) GetObjectByTypeAndIdWithResponse(ctx context.Context, objectType string, objectId string, params *GetObjectByTypeAndIdParams, reqEditors ...RequestEditorFn) (*GetObjectByTypeAndIdResponse, error)

GetObjectByTypeAndIdWithResponse request returning *GetObjectByTypeAndIdResponse

func (*ClientWithResponses) GetObjectsWithResponse

func (c *ClientWithResponses) GetObjectsWithResponse(ctx context.Context, objectType string, params *GetObjectsParams, reqEditors ...RequestEditorFn) (*GetObjectsResponse, error)

GetObjectsWithResponse request returning *GetObjectsResponse

func (*ClientWithResponses) SearchObjectsWithBodyWithResponse

func (c *ClientWithResponses) SearchObjectsWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchObjectsResponse, error)

SearchObjectsWithBodyWithResponse request with arbitrary body returning *SearchObjectsResponse

func (*ClientWithResponses) SearchObjectsWithResponse

func (c *ClientWithResponses) SearchObjectsWithResponse(ctx context.Context, objectType string, body SearchObjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchObjectsResponse, error)

func (*ClientWithResponses) UpdateObjectWithBodyWithResponse

func (c *ClientWithResponses) UpdateObjectWithBodyWithResponse(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)

UpdateObjectWithBodyWithResponse request with arbitrary body returning *UpdateObjectResponse

func (*ClientWithResponses) UpdateObjectWithResponse

func (c *ClientWithResponses) UpdateObjectWithResponse(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetObjectsWithResponse request
	GetObjectsWithResponse(ctx context.Context, objectType string, params *GetObjectsParams, reqEditors ...RequestEditorFn) (*GetObjectsResponse, error)

	// CreateObjectWithBodyWithResponse request with any body
	CreateObjectWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)

	CreateObjectWithResponse(ctx context.Context, objectType string, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)

	// SearchObjectsWithBodyWithResponse request with any body
	SearchObjectsWithBodyWithResponse(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchObjectsResponse, error)

	SearchObjectsWithResponse(ctx context.Context, objectType string, body SearchObjectsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchObjectsResponse, error)

	// DeleteObjectWithResponse request
	DeleteObjectWithResponse(ctx context.Context, objectType string, objectId string, reqEditors ...RequestEditorFn) (*DeleteObjectResponse, error)

	// GetObjectByTypeAndIdWithResponse request
	GetObjectByTypeAndIdWithResponse(ctx context.Context, objectType string, objectId string, params *GetObjectByTypeAndIdParams, reqEditors ...RequestEditorFn) (*GetObjectByTypeAndIdResponse, error)

	// UpdateObjectWithBodyWithResponse request with any body
	UpdateObjectWithBodyWithResponse(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)

	UpdateObjectWithResponse(ctx context.Context, objectType string, objectId string, params *UpdateObjectParams, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateObjectJSONBody

type CreateObjectJSONBody struct {
	// Associations List of associations for the lead.
	Associations *[]struct {
		// To Target object details for the association.
		To *struct {
			// Id Target object ID.
			Id *string `json:"id,omitempty"`
		} `json:"to,omitempty"`
		Types *[]struct {
			// AssociationCategory Category of the association.
			AssociationCategory *CreateObjectJSONBodyAssociationsTypesAssociationCategory `json:"associationCategory,omitempty"`

			// AssociationTypeId ID of the association type.
			AssociationTypeId *int32 `json:"associationTypeId,omitempty"`
		} `json:"types,omitempty"`
	} `json:"associations,omitempty"`

	// Properties Key-value pairs of lead properties.
	Properties *map[string]string `json:"properties,omitempty"`
}

CreateObjectJSONBody defines parameters for CreateObject.

type CreateObjectJSONBodyAssociationsTypesAssociationCategory

type CreateObjectJSONBodyAssociationsTypesAssociationCategory string

CreateObjectJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateObject.

Defines values for CreateObjectJSONBodyAssociationsTypesAssociationCategory.

type CreateObjectJSONRequestBody

type CreateObjectJSONRequestBody CreateObjectJSONBody

CreateObjectJSONRequestBody defines body for CreateObject for application/json ContentType.

type CreateObjectResponse

type CreateObjectResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *ObjectResponse
}

func ParseCreateObjectResponse

func ParseCreateObjectResponse(rsp *http.Response) (*CreateObjectResponse, error)

ParseCreateObjectResponse parses an HTTP response from a CreateObjectWithResponse call

func (CreateObjectResponse) Status

func (r CreateObjectResponse) Status() string

Status returns HTTPResponse.Status

func (CreateObjectResponse) StatusCode

func (r CreateObjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteObjectResponse

type DeleteObjectResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteObjectResponse

func ParseDeleteObjectResponse(rsp *http.Response) (*DeleteObjectResponse, error)

ParseDeleteObjectResponse parses an HTTP response from a DeleteObjectWithResponse call

func (DeleteObjectResponse) Status

func (r DeleteObjectResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteObjectResponse) StatusCode

func (r DeleteObjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Filter

type Filter struct {
	// HighValue A high-value filter criterion.
	HighValue string `json:"highValue,omitempty"`

	// Operator defines model for Filter.Operator
	Operator FilterOperator `json:"operator,omitempty"`

	// PropertyName The property name to filter by.
	PropertyName string `json:"propertyName,omitempty"`

	// Value A single value to match for the property.
	Value string `json:"value,omitempty"`

	// Values List of values to match for the property.
	Values []string `json:"values,omitempty"`
}

Filter defines model for Filter.

type FilterGroups

type FilterGroups struct {
	Filters []Filter `json:"filters,omitempty"`
}

FilterGroups defines model for FilterGroups.

type FilterOperator

type FilterOperator string

FilterOperator defines model for Filter.Operator

const (
	CONTAINSTOKEN    FilterOperator = "CONTAINS_TOKEN"
	EQ               FilterOperator = "EQ"
	GT               FilterOperator = "GT"
	GTE              FilterOperator = "GTE"
	HASPROPERTY      FilterOperator = "HAS_PROPERTY"
	LT               FilterOperator = "LT"
	LTE              FilterOperator = "LTE"
	NEQ              FilterOperator = "NEQ"
	NOTCONTAINSTOKEN FilterOperator = "NOT_CONTAINS_TOKEN"
	NOTHASPROPERTY   FilterOperator = "NOT_HAS_PROPERTY"
)

Defines values for FilterOperator.

type GetObjectByTypeAndIdParams

type GetObjectByTypeAndIdParams struct {
	// PropertiesWithHistory Properties to fetch with history.
	PropertiesWithHistory *[]string `form:"propertiesWithHistory,omitempty" json:"propertiesWithHistory,omitempty"`

	// Associations Associations to include in the response.
	Associations *[]string `form:"associations,omitempty" json:"associations,omitempty"`

	// Archived Whether to include archived objects.
	Archived *bool `form:"archived,omitempty" json:"archived,omitempty"`

	// IdProperty The property to use for ID lookups.
	IdProperty *string `form:"idProperty,omitempty" json:"idProperty,omitempty"`
}

GetObjectByTypeAndIdParams defines parameters for GetObjectByTypeAndId.

type GetObjectByTypeAndIdResponse

type GetObjectByTypeAndIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ObjectResponse
}

func ParseGetObjectByTypeAndIdResponse

func ParseGetObjectByTypeAndIdResponse(rsp *http.Response) (*GetObjectByTypeAndIdResponse, error)

ParseGetObjectByTypeAndIdResponse parses an HTTP response from a GetObjectByTypeAndIdWithResponse call

func (GetObjectByTypeAndIdResponse) Status

Status returns HTTPResponse.Status

func (GetObjectByTypeAndIdResponse) StatusCode

func (r GetObjectByTypeAndIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetObjectsParams

type GetObjectsParams struct {
	// Limit Number of objects to retrieve.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Archived Include archived objects.
	Archived *bool `form:"archived,omitempty" json:"archived,omitempty"`
}

GetObjectsParams defines parameters for GetObjects.

type GetObjectsResponse

type GetObjectsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]interface{}
}

func ParseGetObjectsResponse

func ParseGetObjectsResponse(rsp *http.Response) (*GetObjectsResponse, error)

ParseGetObjectsResponse parses an HTTP response from a GetObjectsWithResponse call

func (GetObjectsResponse) Status

func (r GetObjectsResponse) Status() string

Status returns HTTPResponse.Status

func (GetObjectsResponse) StatusCode

func (r GetObjectsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ObjectAssociationsResponse

type ObjectAssociationsResponse struct {
	Paging  *Paging                `json:"paging,omitempty"`
	Results *[]AssociationResponse `json:"results,omitempty"`
}

ObjectAssociationsResponse defines model for ObjectAssociationsResponse.

type ObjectResponse

type ObjectResponse struct {
	// Archived Indicates if the object is archived.
	Archived bool `json:"archived,omitempty"`

	// ArchivedAt When the object was archived.
	ArchivedAt time.Time `json:"archivedAt,omitempty"`

	// Associations A map of associated objects.
	Associations map[string]ObjectAssociationsResponse `json:"associations,omitempty"`

	// CreatedAt When the object was created.
	CreatedAt time.Time `json:"createdAt,omitempty"`

	// Id Unique identifier for the object.
	Id string `json:"id,omitempty"`

	// Properties A key-value map of the object's properties.
	Properties map[string]string `json:"properties,omitempty"`

	// PropertiesWithHistory A map of the object's properties including historical values.
	PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`

	// UpdatedAt When the object was last updated.
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

ObjectResponse defines model for ObjectResponse.

type ObjectsResponse

type ObjectsResponse struct {
	Paging  *Paging          `json:"paging,omitempty"`
	Results []ObjectResponse `json:"results,omitempty"`
}

ObjectsResponse defines model for ObjectsResponse.

type Paging

type Paging struct {
	Next PagingNext `json:"next,omitempty"`
}

Paging defines model for Paging.

type PagingNext

type PagingNext struct {
	// After The cursor token for the next page of results.
	After string `json:"after,omitempty"`

	// Link The link for the next page of results.
	Link string `json:"link,omitempty"`
}

PagingNext defines model for PagingNext.

type Properties

type Properties = []string

Properties defines model for Properties.

type PropertiesWithHistory

type PropertiesWithHistory = []string

PropertiesWithHistory defines model for PropertiesWithHistory.

type PropertyHistory

type PropertyHistory struct {
	// SourceId The source ID of the historical property value.
	SourceId string `json:"sourceId,omitempty"`

	// SourceLabel The source label for the historical property.
	SourceLabel string `json:"sourceLabel,omitempty"`

	// SourceType The source type of the historical property value.
	SourceType string `json:"sourceType,omitempty"`

	// Timestamp When the property value was set.
	Timestamp time.Time `json:"timestamp,omitempty"`

	// UpdatedByUserId The user ID who updated the property.
	UpdatedByUserId int `json:"updatedByUserId,omitempty"`

	// Value The historical value of the property.
	Value string `json:"value,omitempty"`
}

PropertyHistory defines model for PropertyHistory.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchObjectsJSONBody

type SearchObjectsJSONBody struct {
	After        *string        `json:"after,omitempty"`
	FilterGroups []FilterGroups `json:"filterGroups,omitempty"`
	Limit        *int           `json:"limit,omitempty"`
	Properties   *[]string      `json:"properties,omitempty"`
	Query        *string        `json:"query,omitempty"`
	Sorts        *[]string      `json:"sorts,omitempty"`
}

SearchObjectsJSONBody defines parameters for SearchObjects.

type SearchObjectsJSONRequestBody

type SearchObjectsJSONRequestBody SearchObjectsJSONBody

SearchObjectsJSONRequestBody defines body for SearchObjects for application/json ContentType.

type SearchObjectsResponse

type SearchObjectsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ObjectsResponse
}

func ParseSearchObjectsResponse

func ParseSearchObjectsResponse(rsp *http.Response) (*SearchObjectsResponse, error)

ParseSearchObjectsResponse parses an HTTP response from a SearchObjectsWithResponse call

func (SearchObjectsResponse) Status

func (r SearchObjectsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchObjectsResponse) StatusCode

func (r SearchObjectsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Get CRM Objects
	// (GET /crm/v3/objects/{objectType})
	GetObjects(ctx echo.Context, objectType string, params GetObjectsParams) error
	// Create an object in HubSpot CRM
	// (POST /crm/v3/objects/{objectType})
	CreateObject(ctx echo.Context, objectType string) error
	// Search HubSpot CRM objects
	// (POST /crm/v3/objects/{objectType}/search)
	SearchObjects(ctx echo.Context, objectType string) error
	// Delete an object by objectType and objectId
	// (DELETE /crm/v3/objects/{objectType}/{objectId})
	DeleteObject(ctx echo.Context, objectType string, objectId string) error
	// Retrieve object details with associations and properties
	// (GET /crm/v3/objects/{objectType}/{objectId})
	GetObjectByTypeAndId(ctx echo.Context, objectType string, objectId string, params GetObjectByTypeAndIdParams) error
	// Update a CRM object
	// (PATCH /crm/v3/objects/{objectType}/{objectId})
	UpdateObject(ctx echo.Context, objectType string, objectId string, params UpdateObjectParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateObject

func (w *ServerInterfaceWrapper) CreateObject(ctx echo.Context) error

CreateObject converts echo context to params.

func (*ServerInterfaceWrapper) DeleteObject

func (w *ServerInterfaceWrapper) DeleteObject(ctx echo.Context) error

DeleteObject converts echo context to params.

func (*ServerInterfaceWrapper) GetObjectByTypeAndId

func (w *ServerInterfaceWrapper) GetObjectByTypeAndId(ctx echo.Context) error

GetObjectByTypeAndId converts echo context to params.

func (*ServerInterfaceWrapper) GetObjects

func (w *ServerInterfaceWrapper) GetObjects(ctx echo.Context) error

GetObjects converts echo context to params.

func (*ServerInterfaceWrapper) SearchObjects

func (w *ServerInterfaceWrapper) SearchObjects(ctx echo.Context) error

SearchObjects converts echo context to params.

func (*ServerInterfaceWrapper) UpdateObject

func (w *ServerInterfaceWrapper) UpdateObject(ctx echo.Context) error

UpdateObject converts echo context to params.

type UpdateObjectJSONBody

type UpdateObjectJSONBody struct {
	// ObjectWriteTraceId Unique trace ID for the operation.
	ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"`

	// Properties Key-value pairs representing the deal properties to update.
	Properties map[string]string `json:"properties"`
}

UpdateObjectJSONBody defines parameters for UpdateObject.

type UpdateObjectJSONRequestBody

type UpdateObjectJSONRequestBody UpdateObjectJSONBody

UpdateObjectJSONRequestBody defines body for UpdateObject for application/json ContentType.

type UpdateObjectParams

type UpdateObjectParams struct {
	// IdProperty The property to identify the object (e.g., "email").
	IdProperty *string `form:"idProperty,omitempty" json:"idProperty,omitempty"`
}

UpdateObjectParams defines parameters for UpdateObject.

type UpdateObjectResponse

type UpdateObjectResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Archived Whether the customer is archived or not.
		Archived bool `json:"archived,omitempty"`

		// ArchivedAt Timestamp when the object was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

		// CreatedAt Timestamp when the object was created.
		CreatedAt time.Time `json:"createdAt,omitempty"`

		// Id Unique ID of the updated object.
		Id string `json:"id,omitempty"`

		// Properties Properties of the updated object.
		Properties map[string]interface{} `json:"properties,omitempty"`

		// PropertiesWithHistory A map of the object's properties including historical values.
		PropertiesWithHistory map[string][]PropertyHistory `json:"propertiesWithHistory,omitempty"`

		// UpdatedAt Timestamp when the object was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
}

func ParseUpdateObjectResponse

func ParseUpdateObjectResponse(rsp *http.Response) (*UpdateObjectResponse, error)

ParseUpdateObjectResponse parses an HTTP response from a UpdateObjectWithResponse call

func (UpdateObjectResponse) Status

func (r UpdateObjectResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateObjectResponse) StatusCode

func (r UpdateObjectResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL