contacts

package
v0.0.19 Latest Latest
Warning

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

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

Documentation

Overview

Package contacts 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 contacts 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 contacts 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 NewBatchUpsertContactsRequest added in v0.0.13

func NewBatchUpsertContactsRequest(server string, body BatchUpsertContactsJSONRequestBody) (*http.Request, error)

NewBatchUpsertContactsRequest calls the generic BatchUpsertContacts builder with application/json body

func NewBatchUpsertContactsRequestWithBody added in v0.0.13

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

NewBatchUpsertContactsRequestWithBody generates requests for BatchUpsertContacts with any type of body

func NewCreateContactRequest

func NewCreateContactRequest(server string, body CreateContactJSONRequestBody) (*http.Request, error)

NewCreateContactRequest calls the generic CreateContact builder with application/json body

func NewCreateContactRequestWithBody

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

NewCreateContactRequestWithBody generates requests for CreateContact with any type of body

func NewDeleteContactByIdRequest

func NewDeleteContactByIdRequest(server string, contactId string) (*http.Request, error)

NewDeleteContactByIdRequest generates requests for DeleteContactById

func NewGdprDeleteContactRequest

func NewGdprDeleteContactRequest(server string, body GdprDeleteContactJSONRequestBody) (*http.Request, error)

NewGdprDeleteContactRequest calls the generic GdprDeleteContact builder with application/json body

func NewGdprDeleteContactRequestWithBody

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

NewGdprDeleteContactRequestWithBody generates requests for GdprDeleteContact with any type of body

func NewGetContactByIdRequest

func NewGetContactByIdRequest(server string, contactId int64, params *GetContactByIdParams) (*http.Request, error)

NewGetContactByIdRequest generates requests for GetContactById

func NewGetContactsRequest

func NewGetContactsRequest(server string, params *GetContactsParams) (*http.Request, error)

NewGetContactsRequest generates requests for GetContacts

func NewMergeContactsRequest

func NewMergeContactsRequest(server string, body MergeContactsJSONRequestBody) (*http.Request, error)

NewMergeContactsRequest calls the generic MergeContacts builder with application/json body

func NewMergeContactsRequestWithBody

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

NewMergeContactsRequestWithBody generates requests for MergeContacts with any type of body

func NewSearchContactsRequest added in v0.0.9

func NewSearchContactsRequest(server string, body SearchContactsJSONRequestBody) (*http.Request, error)

NewSearchContactsRequest calls the generic SearchContacts builder with application/json body

func NewSearchContactsRequestWithBody added in v0.0.9

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

NewSearchContactsRequestWithBody generates requests for SearchContacts with any type of body

func NewUpdateContactRequest

func NewUpdateContactRequest(server string, contactId string, body UpdateContactJSONRequestBody) (*http.Request, error)

NewUpdateContactRequest calls the generic UpdateContact builder with application/json body

func NewUpdateContactRequestWithBody

func NewUpdateContactRequestWithBody(server string, contactId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateContactRequestWithBody generates requests for UpdateContact 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 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 BatchError added in v0.0.13

type BatchError struct {
	// Error Error message
	Error *string `json:"error,omitempty"`

	// Id The ID of the failed record
	Id *string `json:"id,omitempty"`

	// Status Error status code
	Status *string `json:"status,omitempty"`
}

BatchError defines model for BatchError.

type BatchUpsertContactsJSONRequestBody added in v0.0.13

type BatchUpsertContactsJSONRequestBody = BatchUpsertInput

BatchUpsertContactsJSONRequestBody defines body for BatchUpsertContacts for application/json ContentType.

type BatchUpsertContactsResponse added in v0.0.13

type BatchUpsertContactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BatchUpsertResponse
	JSON207      *BatchUpsertResponse
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON409      *ErrorResponse
}

func ParseBatchUpsertContactsResponse added in v0.0.13

func ParseBatchUpsertContactsResponse(rsp *http.Response) (*BatchUpsertContactsResponse, error)

ParseBatchUpsertContactsResponse parses an HTTP response from a BatchUpsertContactsWithResponse call

func (BatchUpsertContactsResponse) Status added in v0.0.13

Status returns HTTPResponse.Status

func (BatchUpsertContactsResponse) StatusCode added in v0.0.13

func (r BatchUpsertContactsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type BatchUpsertInput added in v0.0.13

type BatchUpsertInput struct {
	Contacts []ContactUpsertData `json:"inputs"`
}

BatchUpsertInput defines model for BatchUpsertInput.

type BatchUpsertResponse added in v0.0.13

type BatchUpsertResponse struct {
	Errors  *[]BatchError      `json:"errors,omitempty"`
	Results *[]ContactResponse `json:"results,omitempty"`

	// Status Overall batch operation status
	Status *string `json:"status,omitempty"`
}

BatchUpsertResponse defines model for BatchUpsertResponse.

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) BatchUpsertContacts added in v0.0.13

func (c *Client) BatchUpsertContacts(ctx context.Context, body BatchUpsertContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BatchUpsertContactsWithBody added in v0.0.13

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

func (*Client) CreateContact

func (c *Client) CreateContact(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateContactWithBody

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

func (*Client) DeleteContactById

func (c *Client) DeleteContactById(ctx context.Context, contactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GdprDeleteContact

func (c *Client) GdprDeleteContact(ctx context.Context, body GdprDeleteContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GdprDeleteContactWithBody

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

func (*Client) GetContactById

func (c *Client) GetContactById(ctx context.Context, contactId int64, params *GetContactByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetContacts

func (c *Client) GetContacts(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MergeContacts

func (c *Client) MergeContacts(ctx context.Context, body MergeContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MergeContactsWithBody

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

func (*Client) SearchContacts added in v0.0.9

func (c *Client) SearchContacts(ctx context.Context, body SearchContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchContactsWithBody added in v0.0.9

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

func (*Client) UpdateContact

func (c *Client) UpdateContact(ctx context.Context, contactId string, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateContactWithBody

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

type ClientInterface

type ClientInterface interface {
	// GetContacts request
	GetContacts(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	CreateContact(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	BatchUpsertContacts(ctx context.Context, body BatchUpsertContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	GdprDeleteContact(ctx context.Context, body GdprDeleteContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	MergeContacts(ctx context.Context, body MergeContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SearchContacts(ctx context.Context, body SearchContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteContactById request
	DeleteContactById(ctx context.Context, contactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetContactById request
	GetContactById(ctx context.Context, contactId int64, params *GetContactByIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateContact(ctx context.Context, contactId string, body UpdateContactJSONRequestBody, 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) BatchUpsertContactsWithBodyWithResponse added in v0.0.13

func (c *ClientWithResponses) BatchUpsertContactsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BatchUpsertContactsResponse, error)

BatchUpsertContactsWithBodyWithResponse request with arbitrary body returning *BatchUpsertContactsResponse

func (*ClientWithResponses) BatchUpsertContactsWithResponse added in v0.0.13

func (c *ClientWithResponses) BatchUpsertContactsWithResponse(ctx context.Context, body BatchUpsertContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchUpsertContactsResponse, error)

func (*ClientWithResponses) CreateContactWithBodyWithResponse

func (c *ClientWithResponses) CreateContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)

CreateContactWithBodyWithResponse request with arbitrary body returning *CreateContactResponse

func (*ClientWithResponses) CreateContactWithResponse

func (c *ClientWithResponses) CreateContactWithResponse(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)

func (*ClientWithResponses) DeleteContactByIdWithResponse

func (c *ClientWithResponses) DeleteContactByIdWithResponse(ctx context.Context, contactId string, reqEditors ...RequestEditorFn) (*DeleteContactByIdResponse, error)

DeleteContactByIdWithResponse request returning *DeleteContactByIdResponse

func (*ClientWithResponses) GdprDeleteContactWithBodyWithResponse

func (c *ClientWithResponses) GdprDeleteContactWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GdprDeleteContactResponse, error)

GdprDeleteContactWithBodyWithResponse request with arbitrary body returning *GdprDeleteContactResponse

func (*ClientWithResponses) GdprDeleteContactWithResponse

func (c *ClientWithResponses) GdprDeleteContactWithResponse(ctx context.Context, body GdprDeleteContactJSONRequestBody, reqEditors ...RequestEditorFn) (*GdprDeleteContactResponse, error)

func (*ClientWithResponses) GetContactByIdWithResponse

func (c *ClientWithResponses) GetContactByIdWithResponse(ctx context.Context, contactId int64, params *GetContactByIdParams, reqEditors ...RequestEditorFn) (*GetContactByIdResponse, error)

GetContactByIdWithResponse request returning *GetContactByIdResponse

func (*ClientWithResponses) GetContactsWithResponse

func (c *ClientWithResponses) GetContactsWithResponse(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*GetContactsResponse, error)

GetContactsWithResponse request returning *GetContactsResponse

func (*ClientWithResponses) MergeContactsWithBodyWithResponse

func (c *ClientWithResponses) MergeContactsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MergeContactsResponse, error)

MergeContactsWithBodyWithResponse request with arbitrary body returning *MergeContactsResponse

func (*ClientWithResponses) MergeContactsWithResponse

func (c *ClientWithResponses) MergeContactsWithResponse(ctx context.Context, body MergeContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*MergeContactsResponse, error)

func (*ClientWithResponses) SearchContactsWithBodyWithResponse added in v0.0.9

func (c *ClientWithResponses) SearchContactsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchContactsResponse, error)

SearchContactsWithBodyWithResponse request with arbitrary body returning *SearchContactsResponse

func (*ClientWithResponses) SearchContactsWithResponse added in v0.0.9

func (c *ClientWithResponses) SearchContactsWithResponse(ctx context.Context, body SearchContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchContactsResponse, error)

func (*ClientWithResponses) UpdateContactWithBodyWithResponse

func (c *ClientWithResponses) UpdateContactWithBodyWithResponse(ctx context.Context, contactId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)

UpdateContactWithBodyWithResponse request with arbitrary body returning *UpdateContactResponse

func (*ClientWithResponses) UpdateContactWithResponse

func (c *ClientWithResponses) UpdateContactWithResponse(ctx context.Context, contactId string, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetContactsWithResponse request
	GetContactsWithResponse(ctx context.Context, params *GetContactsParams, reqEditors ...RequestEditorFn) (*GetContactsResponse, error)

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

	CreateContactWithResponse(ctx context.Context, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)

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

	BatchUpsertContactsWithResponse(ctx context.Context, body BatchUpsertContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchUpsertContactsResponse, error)

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

	GdprDeleteContactWithResponse(ctx context.Context, body GdprDeleteContactJSONRequestBody, reqEditors ...RequestEditorFn) (*GdprDeleteContactResponse, error)

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

	MergeContactsWithResponse(ctx context.Context, body MergeContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*MergeContactsResponse, error)

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

	SearchContactsWithResponse(ctx context.Context, body SearchContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchContactsResponse, error)

	// DeleteContactByIdWithResponse request
	DeleteContactByIdWithResponse(ctx context.Context, contactId string, reqEditors ...RequestEditorFn) (*DeleteContactByIdResponse, error)

	// GetContactByIdWithResponse request
	GetContactByIdWithResponse(ctx context.Context, contactId int64, params *GetContactByIdParams, reqEditors ...RequestEditorFn) (*GetContactByIdResponse, error)

	// UpdateContactWithBodyWithResponse request with any body
	UpdateContactWithBodyWithResponse(ctx context.Context, contactId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)

	UpdateContactWithResponse(ctx context.Context, contactId string, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)
}

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

type ContactResponse

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

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

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

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

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

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

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

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

ContactResponse defines model for ContactResponse.

type ContactUpsertData added in v0.0.13

type ContactUpsertData struct {
	ID                 string            `json:"id"`
	IDProperty         *string           `json:"idProperty,omitempty"`
	ObjectWriteTraceID *string           `json:"objectWriteTraceId,omitempty"`
	Properties         map[string]string `json:"properties"`
}

ContactUpsertData defines model for ContactUpsertData.

type ContactUpsertInput added in v0.0.13

type ContactUpsertInput = ContactUpsertData

ContactUpsertInput defines model for ContactUpsertInput.

type ContactsResponse

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

ContactsResponse defines model for ContactsResponse.

type CreateContactJSONBody

type CreateContactJSONBody struct {
	// Associations List of associations for the contact.
	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 *CreateContactJSONBodyAssociationsTypesAssociationCategory `json:"associationCategory,omitempty"`

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

	// ObjectWriteTraceId Trace ID for object write operations.
	ObjectWriteTraceId *string `json:"objectWriteTraceId,omitempty"`

	// Properties Key-value pairs of contact properties.
	Properties map[string]string `json:"properties"`
}

CreateContactJSONBody defines parameters for CreateContact.

type CreateContactJSONBodyAssociationsTypesAssociationCategory added in v0.0.9

type CreateContactJSONBodyAssociationsTypesAssociationCategory string

CreateContactJSONBodyAssociationsTypesAssociationCategory defines parameters for CreateContact.

Defines values for CreateContactJSONBodyAssociationsTypesAssociationCategory.

type CreateContactJSONRequestBody

type CreateContactJSONRequestBody CreateContactJSONBody

CreateContactJSONRequestBody defines body for CreateContact for application/json ContentType.

type CreateContactResponse

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

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

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

		// Id Unique ID of the created contact.
		Id string `json:"id,omitempty"`

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

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

		// UpdatedAt Timestamp when the contact was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
	JSON400 *ErrorResponse
}

func ParseCreateContactResponse

func ParseCreateContactResponse(rsp *http.Response) (*CreateContactResponse, error)

ParseCreateContactResponse parses an HTTP response from a CreateContactWithResponse call

func (CreateContactResponse) Status

func (r CreateContactResponse) Status() string

Status returns HTTPResponse.Status

func (CreateContactResponse) StatusCode

func (r CreateContactResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteContactByIdResponse

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

func ParseDeleteContactByIdResponse

func ParseDeleteContactByIdResponse(rsp *http.Response) (*DeleteContactByIdResponse, error)

ParseDeleteContactByIdResponse parses an HTTP response from a DeleteContactByIdWithResponse call

func (DeleteContactByIdResponse) Status

func (r DeleteContactByIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteContactByIdResponse) StatusCode

func (r DeleteContactByIdResponse) 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 Error added in v0.0.13

type Error struct {
	Category      *string            `json:"category,omitempty"`
	Context       *ErrorContext      `json:"context,omitempty"`
	CorrelationId *string            `json:"correlationId,omitempty"`
	Errors        *[]ErrorDetail     `json:"errors,omitempty"`
	Links         *map[string]string `json:"links,omitempty"`
	Message       *string            `json:"message,omitempty"`
	SubCategory   *string            `json:"subCategory,omitempty"`
}

Error defines model for Error.

type ErrorContext added in v0.0.13

type ErrorContext struct {
	InvalidPropertyName *[]string `json:"invalidPropertyName,omitempty"`
	MissingScopes       *[]string `json:"missingScopes,omitempty"`
}

ErrorContext defines model for ErrorContext.

type ErrorDetail added in v0.0.13

type ErrorDetail struct {
	Code        *string                 `json:"code,omitempty"`
	Context     *map[string]interface{} `json:"context,omitempty"`
	In          *string                 `json:"in,omitempty"`
	Message     *string                 `json:"message,omitempty"`
	SubCategory *string                 `json:"subCategory,omitempty"`
}

ErrorDetail defines model for ErrorDetail.

type ErrorResponse added in v0.0.13

type ErrorResponse = Error

ErrorResponse defines model for ErrorResponse.

type Filter added in v0.0.7

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 added in v0.0.9

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

FilterGroups defines model for FilterGroups.

type FilterOperator added in v0.0.7

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 GdprDeleteContactJSONBody

type GdprDeleteContactJSONBody struct {
	// IdProperty The property used to identify the contact (e.g., `email` or `phone`).
	IdProperty string `json:"idProperty,omitempty"`

	// ObjectId The unique identifier of the contact to delete.
	ObjectId string `json:"objectId,omitempty"`
}

GdprDeleteContactJSONBody defines parameters for GdprDeleteContact.

type GdprDeleteContactJSONRequestBody

type GdprDeleteContactJSONRequestBody GdprDeleteContactJSONBody

GdprDeleteContactJSONRequestBody defines body for GdprDeleteContact for application/json ContentType.

type GdprDeleteContactResponse

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

func ParseGdprDeleteContactResponse

func ParseGdprDeleteContactResponse(rsp *http.Response) (*GdprDeleteContactResponse, error)

ParseGdprDeleteContactResponse parses an HTTP response from a GdprDeleteContactWithResponse call

func (GdprDeleteContactResponse) Status

func (r GdprDeleteContactResponse) Status() string

Status returns HTTPResponse.Status

func (GdprDeleteContactResponse) StatusCode

func (r GdprDeleteContactResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetContactByIdParams

type GetContactByIdParams struct {
	// Properties Comma-separated list of properties to include in the response.
	// If a specified property is not present, it will be ignored.
	Properties *[]string `form:"properties,omitempty" json:"properties,omitempty"`

	// Associations Comma-separated list of object types to retrieve associated IDs for.
	// Nonexistent associations will be ignored.
	Associations *[]string `form:"associations,omitempty" json:"associations,omitempty"`

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

GetContactByIdParams defines parameters for GetContactById.

type GetContactByIdResponse

type GetContactByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ContactResponse
}

func ParseGetContactByIdResponse

func ParseGetContactByIdResponse(rsp *http.Response) (*GetContactByIdResponse, error)

ParseGetContactByIdResponse parses an HTTP response from a GetContactByIdWithResponse call

func (GetContactByIdResponse) Status

func (r GetContactByIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetContactByIdResponse) StatusCode

func (r GetContactByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetContactsParams

type GetContactsParams struct {
	// Limit Maximum number of results per page.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// After Cursor token for the next page of results.
	After *string `form:"after,omitempty" json:"after,omitempty"`

	// Properties Comma-separated list of properties to include in the response.
	// If a specified property is not present, it will be ignored.
	Properties *[]string `form:"properties,omitempty" json:"properties,omitempty"`

	// PropertiesWithHistory Comma-separated list of properties to include with their historical values.
	// Historical data reduces the maximum number of objects returned per request.
	PropertiesWithHistory *[]string `form:"propertiesWithHistory,omitempty" json:"propertiesWithHistory,omitempty"`

	// Associations Comma-separated list of object types to retrieve associated IDs for.
	// Nonexistent associations will be ignored.
	Associations *[]string `form:"associations,omitempty" json:"associations,omitempty"`

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

GetContactsParams defines parameters for GetContacts.

type GetContactsResponse

type GetContactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ContactsResponse
}

func ParseGetContactsResponse

func ParseGetContactsResponse(rsp *http.Response) (*GetContactsResponse, error)

ParseGetContactsResponse parses an HTTP response from a GetContactsWithResponse call

func (GetContactsResponse) Status

func (r GetContactsResponse) Status() string

Status returns HTTPResponse.Status

func (GetContactsResponse) StatusCode

func (r GetContactsResponse) 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 MergeContactsJSONBody

type MergeContactsJSONBody struct {
	// ObjectIdToMerge ID of the contact to merge into the primary contact.
	ObjectIdToMerge string `json:"objectIdToMerge"`

	// PrimaryObjectId ID of the primary contact that will remain after the merge.
	PrimaryObjectId string `json:"primaryObjectId"`
}

MergeContactsJSONBody defines parameters for MergeContacts.

type MergeContactsJSONRequestBody

type MergeContactsJSONRequestBody MergeContactsJSONBody

MergeContactsJSONRequestBody defines body for MergeContacts for application/json ContentType.

type MergeContactsResponse

type MergeContactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ContactResponse
}

func ParseMergeContactsResponse

func ParseMergeContactsResponse(rsp *http.Response) (*MergeContactsResponse, error)

ParseMergeContactsResponse parses an HTTP response from a MergeContactsWithResponse call

func (MergeContactsResponse) Status

func (r MergeContactsResponse) Status() string

Status returns HTTPResponse.Status

func (MergeContactsResponse) StatusCode

func (r MergeContactsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ObjectAssociationsResponse

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

ObjectAssociationsResponse defines model for ObjectAssociationsResponse.

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 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 SearchContactsJSONBody added in v0.0.9

type SearchContactsJSONBody 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"`
}

SearchContactsJSONBody defines parameters for SearchContacts.

type SearchContactsJSONRequestBody added in v0.0.9

type SearchContactsJSONRequestBody SearchContactsJSONBody

SearchContactsJSONRequestBody defines body for SearchContacts for application/json ContentType.

type SearchContactsResponse added in v0.0.9

type SearchContactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ContactsResponse
	JSON400      *ErrorResponse
}

func ParseSearchContactsResponse added in v0.0.9

func ParseSearchContactsResponse(rsp *http.Response) (*SearchContactsResponse, error)

ParseSearchContactsResponse parses an HTTP response from a SearchContactsWithResponse call

func (SearchContactsResponse) Status added in v0.0.9

func (r SearchContactsResponse) Status() string

Status returns HTTPResponse.Status

func (SearchContactsResponse) StatusCode added in v0.0.9

func (r SearchContactsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerInterface

type ServerInterface interface {
	// Retrieve a paginated list of contacts
	// (GET /crm/v3/objects/contacts)
	GetContacts(ctx echo.Context, params GetContactsParams) error
	// Create a new contact
	// (POST /crm/v3/objects/contacts)
	CreateContact(ctx echo.Context) error
	// Batch upsert contacts
	// (POST /crm/v3/objects/contacts/batch/upsert)
	BatchUpsertContacts(ctx echo.Context) error
	// GDPR Delete Contact
	// (POST /crm/v3/objects/contacts/gdpr-delete)
	GdprDeleteContact(ctx echo.Context) error
	// Merge two contacts
	// (POST /crm/v3/objects/contacts/merge)
	MergeContacts(ctx echo.Context) error
	// Search for contacts by email
	// (POST /crm/v3/objects/contacts/search)
	SearchContacts(ctx echo.Context) error
	// Delete a contact
	// (DELETE /crm/v3/objects/contacts/{contactId})
	DeleteContactById(ctx echo.Context, contactId string) error
	// Retrieve contact details by ID
	// (GET /crm/v3/objects/contacts/{contactId})
	GetContactById(ctx echo.Context, contactId int64, params GetContactByIdParams) error
	// Update a contact
	// (PATCH /crm/v3/objects/contacts/{contactId})
	UpdateContact(ctx echo.Context, contactId string) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) BatchUpsertContacts added in v0.0.13

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

BatchUpsertContacts converts echo context to params.

func (*ServerInterfaceWrapper) CreateContact

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

CreateContact converts echo context to params.

func (*ServerInterfaceWrapper) DeleteContactById

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

DeleteContactById converts echo context to params.

func (*ServerInterfaceWrapper) GdprDeleteContact

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

GdprDeleteContact converts echo context to params.

func (*ServerInterfaceWrapper) GetContactById

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

GetContactById converts echo context to params.

func (*ServerInterfaceWrapper) GetContacts

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

GetContacts converts echo context to params.

func (*ServerInterfaceWrapper) MergeContacts

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

MergeContacts converts echo context to params.

func (*ServerInterfaceWrapper) SearchContacts added in v0.0.9

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

SearchContacts converts echo context to params.

func (*ServerInterfaceWrapper) UpdateContact

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

UpdateContact converts echo context to params.

type UpdateContactJSONBody

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

UpdateContactJSONBody defines parameters for UpdateContact.

type UpdateContactJSONRequestBody

type UpdateContactJSONRequestBody UpdateContactJSONBody

UpdateContactJSONRequestBody defines body for UpdateContact for application/json ContentType.

type UpdateContactResponse

type UpdateContactResponse 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 contact was archived.
		ArchivedAt time.Time `json:"archivedAt,omitempty"`

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

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

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

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

		// UpdatedAt Timestamp when the contact was last updated.
		UpdatedAt time.Time `json:"updatedAt,omitempty"`
	}
	JSON400 *ErrorResponse
}

func ParseUpdateContactResponse

func ParseUpdateContactResponse(rsp *http.Response) (*UpdateContactResponse, error)

ParseUpdateContactResponse parses an HTTP response from a UpdateContactWithResponse call

func (UpdateContactResponse) Status

func (r UpdateContactResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateContactResponse) StatusCode

func (r UpdateContactResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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