Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AccountCreateResponse
- type AccountCreateResponseField
- type AccountCreateResponseFieldValueAddress
- type AccountCreateResponseFieldValueFullName
- type AccountCreateResponseFieldValueUnion
- func (u AccountCreateResponseFieldValueUnion) AsAddress() (v AccountCreateResponseFieldValueAddress)
- func (u AccountCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u AccountCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u AccountCreateResponseFieldValueUnion) AsFullName() (v AccountCreateResponseFieldValueFullName)
- func (u AccountCreateResponseFieldValueUnion) AsString() (v string)
- func (u AccountCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u AccountCreateResponseFieldValueUnion) RawJSON() string
- func (r *AccountCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type AccountCreateResponseRelationship
- type AccountDefinitionsResponse
- type AccountDefinitionsResponseFieldDefinition
- type AccountDefinitionsResponseFieldDefinitionTypeConfiguration
- type AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption
- type AccountDefinitionsResponseRelationshipDefinition
- type AccountListParams
- type AccountListResponse
- type AccountListResponseData
- type AccountListResponseDataField
- type AccountListResponseDataFieldValueAddress
- type AccountListResponseDataFieldValueFullName
- type AccountListResponseDataFieldValueUnion
- func (u AccountListResponseDataFieldValueUnion) AsAddress() (v AccountListResponseDataFieldValueAddress)
- func (u AccountListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u AccountListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u AccountListResponseDataFieldValueUnion) AsFullName() (v AccountListResponseDataFieldValueFullName)
- func (u AccountListResponseDataFieldValueUnion) AsString() (v string)
- func (u AccountListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u AccountListResponseDataFieldValueUnion) RawJSON() string
- func (r *AccountListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type AccountListResponseDataRelationship
- type AccountNewParams
- type AccountNewParamsFieldAddress
- type AccountNewParamsFieldFullName
- type AccountNewParamsFieldUnion
- type AccountNewParamsRelationshipUnion
- type AccountRetrieveResponse
- type AccountRetrieveResponseField
- type AccountRetrieveResponseFieldValueAddress
- type AccountRetrieveResponseFieldValueFullName
- type AccountRetrieveResponseFieldValueUnion
- func (u AccountRetrieveResponseFieldValueUnion) AsAddress() (v AccountRetrieveResponseFieldValueAddress)
- func (u AccountRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u AccountRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u AccountRetrieveResponseFieldValueUnion) AsFullName() (v AccountRetrieveResponseFieldValueFullName)
- func (u AccountRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u AccountRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u AccountRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *AccountRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type AccountRetrieveResponseRelationship
- type AccountService
- func (r *AccountService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *AccountDefinitionsResponse, err error)
- func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountRetrieveResponse, err error)
- func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *AccountListResponse, err error)
- func (r *AccountService) New(ctx context.Context, body AccountNewParams, opts ...option.RequestOption) (res *AccountCreateResponse, err error)
- func (r *AccountService) Update(ctx context.Context, id string, body AccountUpdateParams, ...) (res *AccountUpdateResponse, err error)
- type AccountUpdateParams
- type AccountUpdateParamsFieldAddress
- type AccountUpdateParamsFieldFullName
- type AccountUpdateParamsFieldUnion
- type AccountUpdateParamsRelationship
- type AccountUpdateParamsRelationshipAddUnion
- type AccountUpdateParamsRelationshipRemoveUnion
- type AccountUpdateParamsRelationshipReplaceUnion
- type AccountUpdateResponse
- type AccountUpdateResponseField
- type AccountUpdateResponseFieldValueAddress
- type AccountUpdateResponseFieldValueFullName
- type AccountUpdateResponseFieldValueUnion
- func (u AccountUpdateResponseFieldValueUnion) AsAddress() (v AccountUpdateResponseFieldValueAddress)
- func (u AccountUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u AccountUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u AccountUpdateResponseFieldValueUnion) AsFullName() (v AccountUpdateResponseFieldValueFullName)
- func (u AccountUpdateResponseFieldValueUnion) AsString() (v string)
- func (u AccountUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u AccountUpdateResponseFieldValueUnion) RawJSON() string
- func (r *AccountUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type AccountUpdateResponseRelationship
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type ContactCreateResponse
- type ContactCreateResponseField
- type ContactCreateResponseFieldValueAddress
- type ContactCreateResponseFieldValueFullName
- type ContactCreateResponseFieldValueUnion
- func (u ContactCreateResponseFieldValueUnion) AsAddress() (v ContactCreateResponseFieldValueAddress)
- func (u ContactCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u ContactCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u ContactCreateResponseFieldValueUnion) AsFullName() (v ContactCreateResponseFieldValueFullName)
- func (u ContactCreateResponseFieldValueUnion) AsString() (v string)
- func (u ContactCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ContactCreateResponseFieldValueUnion) RawJSON() string
- func (r *ContactCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type ContactCreateResponseRelationship
- type ContactDefinitionsResponse
- type ContactDefinitionsResponseFieldDefinition
- type ContactDefinitionsResponseFieldDefinitionTypeConfiguration
- type ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption
- type ContactDefinitionsResponseRelationshipDefinition
- type ContactListParams
- type ContactListResponse
- type ContactListResponseData
- type ContactListResponseDataField
- type ContactListResponseDataFieldValueAddress
- type ContactListResponseDataFieldValueFullName
- type ContactListResponseDataFieldValueUnion
- func (u ContactListResponseDataFieldValueUnion) AsAddress() (v ContactListResponseDataFieldValueAddress)
- func (u ContactListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u ContactListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u ContactListResponseDataFieldValueUnion) AsFullName() (v ContactListResponseDataFieldValueFullName)
- func (u ContactListResponseDataFieldValueUnion) AsString() (v string)
- func (u ContactListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u ContactListResponseDataFieldValueUnion) RawJSON() string
- func (r *ContactListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type ContactListResponseDataRelationship
- type ContactNewParams
- type ContactNewParamsFieldAddress
- type ContactNewParamsFieldFullName
- type ContactNewParamsFieldUnion
- type ContactNewParamsRelationshipUnion
- type ContactRetrieveResponse
- type ContactRetrieveResponseField
- type ContactRetrieveResponseFieldValueAddress
- type ContactRetrieveResponseFieldValueFullName
- type ContactRetrieveResponseFieldValueUnion
- func (u ContactRetrieveResponseFieldValueUnion) AsAddress() (v ContactRetrieveResponseFieldValueAddress)
- func (u ContactRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u ContactRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u ContactRetrieveResponseFieldValueUnion) AsFullName() (v ContactRetrieveResponseFieldValueFullName)
- func (u ContactRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u ContactRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ContactRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *ContactRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type ContactRetrieveResponseRelationship
- type ContactService
- func (r *ContactService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *ContactDefinitionsResponse, err error)
- func (r *ContactService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ContactRetrieveResponse, err error)
- func (r *ContactService) List(ctx context.Context, query ContactListParams, opts ...option.RequestOption) (res *ContactListResponse, err error)
- func (r *ContactService) New(ctx context.Context, body ContactNewParams, opts ...option.RequestOption) (res *ContactCreateResponse, err error)
- func (r *ContactService) Update(ctx context.Context, id string, body ContactUpdateParams, ...) (res *ContactUpdateResponse, err error)
- type ContactUpdateParams
- type ContactUpdateParamsFieldAddress
- type ContactUpdateParamsFieldFullName
- type ContactUpdateParamsFieldUnion
- type ContactUpdateParamsRelationship
- type ContactUpdateParamsRelationshipAddUnion
- type ContactUpdateParamsRelationshipRemoveUnion
- type ContactUpdateParamsRelationshipReplaceUnion
- type ContactUpdateResponse
- type ContactUpdateResponseField
- type ContactUpdateResponseFieldValueAddress
- type ContactUpdateResponseFieldValueFullName
- type ContactUpdateResponseFieldValueUnion
- func (u ContactUpdateResponseFieldValueUnion) AsAddress() (v ContactUpdateResponseFieldValueAddress)
- func (u ContactUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u ContactUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u ContactUpdateResponseFieldValueUnion) AsFullName() (v ContactUpdateResponseFieldValueFullName)
- func (u ContactUpdateResponseFieldValueUnion) AsString() (v string)
- func (u ContactUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ContactUpdateResponseFieldValueUnion) RawJSON() string
- func (r *ContactUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type ContactUpdateResponseRelationship
- type Error
- type FileCancelParams
- type FileCancelParamsBody
- type FileCancelResponse
- type FileCancelResponseStatus
- type FileCompleteParams
- type FileCompleteResponse
- type FileCompleteResponseStatus
- type FileCreateResponse
- type FileCreateResponseStatus
- type FileListParams
- type FileListResponse
- type FileListResponseData
- type FileNewParams
- type FileNewParamsPurpose
- type FileRetrieveResponse
- type FileRetrieveResponseStatus
- type FileService
- func (r *FileService) Cancel(ctx context.Context, id string, body FileCancelParams, ...) (res *FileCancelResponse, err error)
- func (r *FileService) Complete(ctx context.Context, id string, body FileCompleteParams, ...) (res *FileCompleteResponse, err error)
- func (r *FileService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *FileRetrieveResponse, err error)
- func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *FileListResponse, err error)
- func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *FileCreateResponse, err error)
- func (r *FileService) URL(ctx context.Context, id string, opts ...option.RequestOption) (res *FileURLResponse, err error)
- type FileURLResponse
- type ListCreateResponse
- type ListCreateResponseField
- type ListCreateResponseFieldValueAddress
- type ListCreateResponseFieldValueFullName
- type ListCreateResponseFieldValueUnion
- func (u ListCreateResponseFieldValueUnion) AsAddress() (v ListCreateResponseFieldValueAddress)
- func (u ListCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u ListCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u ListCreateResponseFieldValueUnion) AsFullName() (v ListCreateResponseFieldValueFullName)
- func (u ListCreateResponseFieldValueUnion) AsString() (v string)
- func (u ListCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ListCreateResponseFieldValueUnion) RawJSON() string
- func (r *ListCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListListAccountsParams
- type ListListAccountsResponse
- type ListListAccountsResponseData
- type ListListAccountsResponseDataField
- type ListListAccountsResponseDataFieldValueAddress
- type ListListAccountsResponseDataFieldValueFullName
- type ListListAccountsResponseDataFieldValueUnion
- func (u ListListAccountsResponseDataFieldValueUnion) AsAddress() (v ListListAccountsResponseDataFieldValueAddress)
- func (u ListListAccountsResponseDataFieldValueUnion) AsBool() (v bool)
- func (u ListListAccountsResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u ListListAccountsResponseDataFieldValueUnion) AsFullName() (v ListListAccountsResponseDataFieldValueFullName)
- func (u ListListAccountsResponseDataFieldValueUnion) AsString() (v string)
- func (u ListListAccountsResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u ListListAccountsResponseDataFieldValueUnion) RawJSON() string
- func (r *ListListAccountsResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListListAccountsResponseDataRelationship
- type ListListContactsParams
- type ListListContactsResponse
- type ListListContactsResponseData
- type ListListContactsResponseDataField
- type ListListContactsResponseDataFieldValueAddress
- type ListListContactsResponseDataFieldValueFullName
- type ListListContactsResponseDataFieldValueUnion
- func (u ListListContactsResponseDataFieldValueUnion) AsAddress() (v ListListContactsResponseDataFieldValueAddress)
- func (u ListListContactsResponseDataFieldValueUnion) AsBool() (v bool)
- func (u ListListContactsResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u ListListContactsResponseDataFieldValueUnion) AsFullName() (v ListListContactsResponseDataFieldValueFullName)
- func (u ListListContactsResponseDataFieldValueUnion) AsString() (v string)
- func (u ListListContactsResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u ListListContactsResponseDataFieldValueUnion) RawJSON() string
- func (r *ListListContactsResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListListContactsResponseDataRelationship
- type ListListOpportunitiesParams
- type ListListOpportunitiesResponse
- type ListListOpportunitiesResponseData
- type ListListOpportunitiesResponseDataField
- type ListListOpportunitiesResponseDataFieldValueAddress
- type ListListOpportunitiesResponseDataFieldValueFullName
- type ListListOpportunitiesResponseDataFieldValueUnion
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsAddress() (v ListListOpportunitiesResponseDataFieldValueAddress)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsBool() (v bool)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsFullName() (v ListListOpportunitiesResponseDataFieldValueFullName)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsString() (v string)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u ListListOpportunitiesResponseDataFieldValueUnion) RawJSON() string
- func (r *ListListOpportunitiesResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListListOpportunitiesResponseDataRelationship
- type ListListParams
- type ListListResponse
- type ListListResponseData
- type ListListResponseDataField
- type ListListResponseDataFieldValueAddress
- type ListListResponseDataFieldValueFullName
- type ListListResponseDataFieldValueUnion
- func (u ListListResponseDataFieldValueUnion) AsAddress() (v ListListResponseDataFieldValueAddress)
- func (u ListListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u ListListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u ListListResponseDataFieldValueUnion) AsFullName() (v ListListResponseDataFieldValueFullName)
- func (u ListListResponseDataFieldValueUnion) AsString() (v string)
- func (u ListListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u ListListResponseDataFieldValueUnion) RawJSON() string
- func (r *ListListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListNewParams
- type ListNewParamsFields
- type ListNewParamsRelationshipsAccounts
- type ListNewParamsRelationshipsAccountsAccountsUnion
- type ListNewParamsRelationshipsContacts
- type ListNewParamsRelationshipsContactsContactsUnion
- type ListNewParamsRelationshipsOpportunities
- type ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion
- type ListNewParamsRelationshipsUnion
- type ListRetrieveResponse
- type ListRetrieveResponseField
- type ListRetrieveResponseFieldValueAddress
- type ListRetrieveResponseFieldValueFullName
- type ListRetrieveResponseFieldValueUnion
- func (u ListRetrieveResponseFieldValueUnion) AsAddress() (v ListRetrieveResponseFieldValueAddress)
- func (u ListRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u ListRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u ListRetrieveResponseFieldValueUnion) AsFullName() (v ListRetrieveResponseFieldValueFullName)
- func (u ListRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u ListRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ListRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *ListRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type ListService
- func (r *ListService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ListRetrieveResponse, err error)
- func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *ListListResponse, err error)
- func (r *ListService) ListAccounts(ctx context.Context, listID string, query ListListAccountsParams, ...) (res *ListListAccountsResponse, err error)
- func (r *ListService) ListContacts(ctx context.Context, listID string, query ListListContactsParams, ...) (res *ListListContactsResponse, err error)
- func (r *ListService) ListOpportunities(ctx context.Context, listID string, query ListListOpportunitiesParams, ...) (res *ListListOpportunitiesResponse, err error)
- func (r *ListService) New(ctx context.Context, body ListNewParams, opts ...option.RequestOption) (res *ListCreateResponse, err error)
- func (r *ListService) Update(ctx context.Context, id string, body ListUpdateParams, ...) (res *ListUpdateResponse, err error)
- type ListUpdateParams
- type ListUpdateParamsFields
- type ListUpdateParamsRelationshipsAccounts
- type ListUpdateParamsRelationshipsAccountsAccounts
- type ListUpdateParamsRelationshipsAccountsAccountsAddUnion
- type ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion
- type ListUpdateParamsRelationshipsContacts
- type ListUpdateParamsRelationshipsContactsContacts
- type ListUpdateParamsRelationshipsContactsContactsAddUnion
- type ListUpdateParamsRelationshipsContactsContactsRemoveUnion
- type ListUpdateParamsRelationshipsOpportunities
- type ListUpdateParamsRelationshipsOpportunitiesOpportunities
- type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion
- type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion
- type ListUpdateParamsRelationshipsUnion
- type ListUpdateResponse
- type ListUpdateResponseField
- type ListUpdateResponseFieldValueAddress
- type ListUpdateResponseFieldValueFullName
- type ListUpdateResponseFieldValueUnion
- func (u ListUpdateResponseFieldValueUnion) AsAddress() (v ListUpdateResponseFieldValueAddress)
- func (u ListUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u ListUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u ListUpdateResponseFieldValueUnion) AsFullName() (v ListUpdateResponseFieldValueFullName)
- func (u ListUpdateResponseFieldValueUnion) AsString() (v string)
- func (u ListUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u ListUpdateResponseFieldValueUnion) RawJSON() string
- func (r *ListUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type MeetingCreateResponse
- type MeetingCreateResponseAccessLevel
- type MeetingCreateResponseField
- type MeetingCreateResponseFieldValueAddress
- type MeetingCreateResponseFieldValueFullName
- type MeetingCreateResponseFieldValueUnion
- func (u MeetingCreateResponseFieldValueUnion) AsAddress() (v MeetingCreateResponseFieldValueAddress)
- func (u MeetingCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u MeetingCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u MeetingCreateResponseFieldValueUnion) AsFullName() (v MeetingCreateResponseFieldValueFullName)
- func (u MeetingCreateResponseFieldValueUnion) AsString() (v string)
- func (u MeetingCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u MeetingCreateResponseFieldValueUnion) RawJSON() string
- func (r *MeetingCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type MeetingCreateResponseObjectType
- type MeetingCreateResponseRelationship
- type MeetingListParams
- type MeetingListResponse
- type MeetingListResponseData
- type MeetingListResponseDataField
- type MeetingListResponseDataFieldValueAddress
- type MeetingListResponseDataFieldValueFullName
- type MeetingListResponseDataFieldValueUnion
- func (u MeetingListResponseDataFieldValueUnion) AsAddress() (v MeetingListResponseDataFieldValueAddress)
- func (u MeetingListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u MeetingListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u MeetingListResponseDataFieldValueUnion) AsFullName() (v MeetingListResponseDataFieldValueFullName)
- func (u MeetingListResponseDataFieldValueUnion) AsString() (v string)
- func (u MeetingListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u MeetingListResponseDataFieldValueUnion) RawJSON() string
- func (r *MeetingListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type MeetingListResponseDataRelationship
- type MeetingNewParams
- type MeetingNewParamsFields
- type MeetingNewParamsRelationships
- type MeetingNewParamsRelationshipsTranscriptUnion
- type MeetingRetrieveResponse
- type MeetingRetrieveResponseAccessLevel
- type MeetingRetrieveResponseField
- type MeetingRetrieveResponseFieldValueAddress
- type MeetingRetrieveResponseFieldValueFullName
- type MeetingRetrieveResponseFieldValueUnion
- func (u MeetingRetrieveResponseFieldValueUnion) AsAddress() (v MeetingRetrieveResponseFieldValueAddress)
- func (u MeetingRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u MeetingRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u MeetingRetrieveResponseFieldValueUnion) AsFullName() (v MeetingRetrieveResponseFieldValueFullName)
- func (u MeetingRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u MeetingRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u MeetingRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *MeetingRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type MeetingRetrieveResponseObjectType
- type MeetingRetrieveResponseRelationship
- type MeetingService
- func (r *MeetingService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MeetingRetrieveResponse, err error)
- func (r *MeetingService) List(ctx context.Context, query MeetingListParams, opts ...option.RequestOption) (res *MeetingListResponse, err error)
- func (r *MeetingService) New(ctx context.Context, body MeetingNewParams, opts ...option.RequestOption) (res *MeetingCreateResponse, err error)
- func (r *MeetingService) Update(ctx context.Context, id string, body MeetingUpdateParams, ...) (res *MeetingUpdateResponse, err error)
- type MeetingUpdateParams
- type MeetingUpdateParamsFields
- type MeetingUpdateParamsRelationships
- type MeetingUpdateParamsRelationshipsTranscript
- type MeetingUpdateResponse
- type MeetingUpdateResponseAccessLevel
- type MeetingUpdateResponseField
- type MeetingUpdateResponseFieldValueAddress
- type MeetingUpdateResponseFieldValueFullName
- type MeetingUpdateResponseFieldValueUnion
- func (u MeetingUpdateResponseFieldValueUnion) AsAddress() (v MeetingUpdateResponseFieldValueAddress)
- func (u MeetingUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u MeetingUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u MeetingUpdateResponseFieldValueUnion) AsFullName() (v MeetingUpdateResponseFieldValueFullName)
- func (u MeetingUpdateResponseFieldValueUnion) AsString() (v string)
- func (u MeetingUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u MeetingUpdateResponseFieldValueUnion) RawJSON() string
- func (r *MeetingUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type MeetingUpdateResponseObjectType
- type MeetingUpdateResponseRelationship
- type MemberListParams
- type MemberListResponse
- type MemberListResponseData
- type MemberListResponseDataFields
- type MemberListResponseDataFieldsEmail
- type MemberListResponseDataFieldsName
- type MemberListResponseDataFieldsNameValue
- type MemberListResponseDataFieldsProfileImage
- type MemberListResponseDataFieldsRole
- type MemberRetrieveResponse
- type MemberRetrieveResponseFields
- type MemberRetrieveResponseFieldsEmail
- type MemberRetrieveResponseFieldsName
- type MemberRetrieveResponseFieldsNameValue
- type MemberRetrieveResponseFieldsProfileImage
- type MemberRetrieveResponseFieldsRole
- type MemberService
- type NoteCreateResponse
- type NoteCreateResponseField
- type NoteCreateResponseFieldValueAddress
- type NoteCreateResponseFieldValueFullName
- type NoteCreateResponseFieldValueUnion
- func (u NoteCreateResponseFieldValueUnion) AsAddress() (v NoteCreateResponseFieldValueAddress)
- func (u NoteCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u NoteCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u NoteCreateResponseFieldValueUnion) AsFullName() (v NoteCreateResponseFieldValueFullName)
- func (u NoteCreateResponseFieldValueUnion) AsString() (v string)
- func (u NoteCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u NoteCreateResponseFieldValueUnion) RawJSON() string
- func (r *NoteCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type NoteCreateResponseRelationship
- type NoteListParams
- type NoteListResponse
- type NoteListResponseData
- type NoteListResponseDataField
- type NoteListResponseDataFieldValueAddress
- type NoteListResponseDataFieldValueFullName
- type NoteListResponseDataFieldValueUnion
- func (u NoteListResponseDataFieldValueUnion) AsAddress() (v NoteListResponseDataFieldValueAddress)
- func (u NoteListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u NoteListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u NoteListResponseDataFieldValueUnion) AsFullName() (v NoteListResponseDataFieldValueFullName)
- func (u NoteListResponseDataFieldValueUnion) AsString() (v string)
- func (u NoteListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u NoteListResponseDataFieldValueUnion) RawJSON() string
- func (r *NoteListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type NoteListResponseDataRelationship
- type NoteNewParams
- type NoteNewParamsFields
- type NoteNewParamsRelationships
- type NoteNewParamsRelationshipsAccountUnion
- type NoteNewParamsRelationshipsOpportunityUnion
- type NoteRetrieveResponse
- type NoteRetrieveResponseField
- type NoteRetrieveResponseFieldValueAddress
- type NoteRetrieveResponseFieldValueFullName
- type NoteRetrieveResponseFieldValueUnion
- func (u NoteRetrieveResponseFieldValueUnion) AsAddress() (v NoteRetrieveResponseFieldValueAddress)
- func (u NoteRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u NoteRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u NoteRetrieveResponseFieldValueUnion) AsFullName() (v NoteRetrieveResponseFieldValueFullName)
- func (u NoteRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u NoteRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u NoteRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *NoteRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type NoteRetrieveResponseRelationship
- type NoteService
- func (r *NoteService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *NoteRetrieveResponse, err error)
- func (r *NoteService) List(ctx context.Context, query NoteListParams, opts ...option.RequestOption) (res *NoteListResponse, err error)
- func (r *NoteService) New(ctx context.Context, body NoteNewParams, opts ...option.RequestOption) (res *NoteCreateResponse, err error)
- func (r *NoteService) Update(ctx context.Context, id string, body NoteUpdateParams, ...) (res *NoteUpdateResponse, err error)
- type NoteUpdateParams
- type NoteUpdateParamsFields
- type NoteUpdateParamsRelationships
- type NoteUpdateParamsRelationshipsAccountAdd
- type NoteUpdateParamsRelationshipsAccountAddAddUnion
- type NoteUpdateParamsRelationshipsAccountRemove
- type NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion
- type NoteUpdateParamsRelationshipsAccountUnion
- type NoteUpdateParamsRelationshipsOpportunityAdd
- type NoteUpdateParamsRelationshipsOpportunityAddAddUnion
- type NoteUpdateParamsRelationshipsOpportunityRemove
- type NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion
- type NoteUpdateParamsRelationshipsOpportunityUnion
- type NoteUpdateResponse
- type NoteUpdateResponseField
- type NoteUpdateResponseFieldValueAddress
- type NoteUpdateResponseFieldValueFullName
- type NoteUpdateResponseFieldValueUnion
- func (u NoteUpdateResponseFieldValueUnion) AsAddress() (v NoteUpdateResponseFieldValueAddress)
- func (u NoteUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u NoteUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u NoteUpdateResponseFieldValueUnion) AsFullName() (v NoteUpdateResponseFieldValueFullName)
- func (u NoteUpdateResponseFieldValueUnion) AsString() (v string)
- func (u NoteUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u NoteUpdateResponseFieldValueUnion) RawJSON() string
- func (r *NoteUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type NoteUpdateResponseRelationship
- type OpportunityCreateResponse
- type OpportunityCreateResponseField
- type OpportunityCreateResponseFieldValueAddress
- type OpportunityCreateResponseFieldValueFullName
- type OpportunityCreateResponseFieldValueUnion
- func (u OpportunityCreateResponseFieldValueUnion) AsAddress() (v OpportunityCreateResponseFieldValueAddress)
- func (u OpportunityCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u OpportunityCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u OpportunityCreateResponseFieldValueUnion) AsFullName() (v OpportunityCreateResponseFieldValueFullName)
- func (u OpportunityCreateResponseFieldValueUnion) AsString() (v string)
- func (u OpportunityCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u OpportunityCreateResponseFieldValueUnion) RawJSON() string
- func (r *OpportunityCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type OpportunityCreateResponseRelationship
- type OpportunityDefinitionsResponse
- type OpportunityDefinitionsResponseFieldDefinition
- type OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration
- type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption
- type OpportunityDefinitionsResponseRelationshipDefinition
- type OpportunityListParams
- type OpportunityListResponse
- type OpportunityListResponseData
- type OpportunityListResponseDataField
- type OpportunityListResponseDataFieldValueAddress
- type OpportunityListResponseDataFieldValueFullName
- type OpportunityListResponseDataFieldValueUnion
- func (u OpportunityListResponseDataFieldValueUnion) AsAddress() (v OpportunityListResponseDataFieldValueAddress)
- func (u OpportunityListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u OpportunityListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u OpportunityListResponseDataFieldValueUnion) AsFullName() (v OpportunityListResponseDataFieldValueFullName)
- func (u OpportunityListResponseDataFieldValueUnion) AsString() (v string)
- func (u OpportunityListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u OpportunityListResponseDataFieldValueUnion) RawJSON() string
- func (r *OpportunityListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type OpportunityListResponseDataRelationship
- type OpportunityNewParams
- type OpportunityNewParamsFieldAddress
- type OpportunityNewParamsFieldFullName
- type OpportunityNewParamsFieldUnion
- type OpportunityNewParamsRelationshipUnion
- type OpportunityRetrieveResponse
- type OpportunityRetrieveResponseField
- type OpportunityRetrieveResponseFieldValueAddress
- type OpportunityRetrieveResponseFieldValueFullName
- type OpportunityRetrieveResponseFieldValueUnion
- func (u OpportunityRetrieveResponseFieldValueUnion) AsAddress() (v OpportunityRetrieveResponseFieldValueAddress)
- func (u OpportunityRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u OpportunityRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u OpportunityRetrieveResponseFieldValueUnion) AsFullName() (v OpportunityRetrieveResponseFieldValueFullName)
- func (u OpportunityRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u OpportunityRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u OpportunityRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *OpportunityRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type OpportunityRetrieveResponseRelationship
- type OpportunityService
- func (r *OpportunityService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *OpportunityDefinitionsResponse, err error)
- func (r *OpportunityService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OpportunityRetrieveResponse, err error)
- func (r *OpportunityService) List(ctx context.Context, query OpportunityListParams, opts ...option.RequestOption) (res *OpportunityListResponse, err error)
- func (r *OpportunityService) New(ctx context.Context, body OpportunityNewParams, opts ...option.RequestOption) (res *OpportunityCreateResponse, err error)
- func (r *OpportunityService) Update(ctx context.Context, id string, body OpportunityUpdateParams, ...) (res *OpportunityUpdateResponse, err error)
- type OpportunityUpdateParams
- type OpportunityUpdateParamsFieldAddress
- type OpportunityUpdateParamsFieldFullName
- type OpportunityUpdateParamsFieldUnion
- type OpportunityUpdateParamsRelationship
- type OpportunityUpdateParamsRelationshipAddUnion
- type OpportunityUpdateParamsRelationshipRemoveUnion
- type OpportunityUpdateParamsRelationshipReplaceUnion
- type OpportunityUpdateResponse
- type OpportunityUpdateResponseField
- type OpportunityUpdateResponseFieldValueAddress
- type OpportunityUpdateResponseFieldValueFullName
- type OpportunityUpdateResponseFieldValueUnion
- func (u OpportunityUpdateResponseFieldValueUnion) AsAddress() (v OpportunityUpdateResponseFieldValueAddress)
- func (u OpportunityUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u OpportunityUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u OpportunityUpdateResponseFieldValueUnion) AsFullName() (v OpportunityUpdateResponseFieldValueFullName)
- func (u OpportunityUpdateResponseFieldValueUnion) AsString() (v string)
- func (u OpportunityUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u OpportunityUpdateResponseFieldValueUnion) RawJSON() string
- func (r *OpportunityUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type OpportunityUpdateResponseRelationship
- type TaskCreateResponse
- type TaskCreateResponseField
- type TaskCreateResponseFieldValueAddress
- type TaskCreateResponseFieldValueFullName
- type TaskCreateResponseFieldValueUnion
- func (u TaskCreateResponseFieldValueUnion) AsAddress() (v TaskCreateResponseFieldValueAddress)
- func (u TaskCreateResponseFieldValueUnion) AsBool() (v bool)
- func (u TaskCreateResponseFieldValueUnion) AsFloat() (v float64)
- func (u TaskCreateResponseFieldValueUnion) AsFullName() (v TaskCreateResponseFieldValueFullName)
- func (u TaskCreateResponseFieldValueUnion) AsString() (v string)
- func (u TaskCreateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u TaskCreateResponseFieldValueUnion) RawJSON() string
- func (r *TaskCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type TaskCreateResponseRelationship
- type TaskDefinitionsResponse
- type TaskDefinitionsResponseFieldDefinition
- type TaskDefinitionsResponseFieldDefinitionTypeConfiguration
- type TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption
- type TaskDefinitionsResponseRelationshipDefinition
- type TaskListParams
- type TaskListResponse
- type TaskListResponseData
- type TaskListResponseDataField
- type TaskListResponseDataFieldValueAddress
- type TaskListResponseDataFieldValueFullName
- type TaskListResponseDataFieldValueUnion
- func (u TaskListResponseDataFieldValueUnion) AsAddress() (v TaskListResponseDataFieldValueAddress)
- func (u TaskListResponseDataFieldValueUnion) AsBool() (v bool)
- func (u TaskListResponseDataFieldValueUnion) AsFloat() (v float64)
- func (u TaskListResponseDataFieldValueUnion) AsFullName() (v TaskListResponseDataFieldValueFullName)
- func (u TaskListResponseDataFieldValueUnion) AsString() (v string)
- func (u TaskListResponseDataFieldValueUnion) AsStringArray() (v []string)
- func (u TaskListResponseDataFieldValueUnion) RawJSON() string
- func (r *TaskListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
- type TaskListResponseDataRelationship
- type TaskNewParams
- type TaskNewParamsFields
- type TaskNewParamsRelationshipUnion
- type TaskRetrieveResponse
- type TaskRetrieveResponseField
- type TaskRetrieveResponseFieldValueAddress
- type TaskRetrieveResponseFieldValueFullName
- type TaskRetrieveResponseFieldValueUnion
- func (u TaskRetrieveResponseFieldValueUnion) AsAddress() (v TaskRetrieveResponseFieldValueAddress)
- func (u TaskRetrieveResponseFieldValueUnion) AsBool() (v bool)
- func (u TaskRetrieveResponseFieldValueUnion) AsFloat() (v float64)
- func (u TaskRetrieveResponseFieldValueUnion) AsFullName() (v TaskRetrieveResponseFieldValueFullName)
- func (u TaskRetrieveResponseFieldValueUnion) AsString() (v string)
- func (u TaskRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
- func (u TaskRetrieveResponseFieldValueUnion) RawJSON() string
- func (r *TaskRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type TaskRetrieveResponseRelationship
- type TaskService
- func (r *TaskService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *TaskDefinitionsResponse, err error)
- func (r *TaskService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *TaskRetrieveResponse, err error)
- func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *TaskListResponse, err error)
- func (r *TaskService) New(ctx context.Context, body TaskNewParams, opts ...option.RequestOption) (res *TaskCreateResponse, err error)
- func (r *TaskService) Update(ctx context.Context, id string, body TaskUpdateParams, ...) (res *TaskUpdateResponse, err error)
- type TaskUpdateParams
- type TaskUpdateParamsFields
- type TaskUpdateParamsRelationship
- type TaskUpdateParamsRelationshipAddUnion
- type TaskUpdateParamsRelationshipRemoveUnion
- type TaskUpdateParamsRelationshipReplaceUnion
- type TaskUpdateResponse
- type TaskUpdateResponseField
- type TaskUpdateResponseFieldValueAddress
- type TaskUpdateResponseFieldValueFullName
- type TaskUpdateResponseFieldValueUnion
- func (u TaskUpdateResponseFieldValueUnion) AsAddress() (v TaskUpdateResponseFieldValueAddress)
- func (u TaskUpdateResponseFieldValueUnion) AsBool() (v bool)
- func (u TaskUpdateResponseFieldValueUnion) AsFloat() (v float64)
- func (u TaskUpdateResponseFieldValueUnion) AsFullName() (v TaskUpdateResponseFieldValueFullName)
- func (u TaskUpdateResponseFieldValueUnion) AsString() (v string)
- func (u TaskUpdateResponseFieldValueUnion) AsStringArray() (v []string)
- func (u TaskUpdateResponseFieldValueUnion) RawJSON() string
- func (r *TaskUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
- type TaskUpdateResponseRelationship
- type WorkflowRunService
- type WorkflowRunStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (LIGHTFIELD_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AccountCreateResponse ¶ added in v0.4.1
type AccountCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]AccountCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]AccountCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountCreateResponse) RawJSON ¶ added in v0.4.1
func (r AccountCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponse) UnmarshalJSON(data []byte) error
type AccountCreateResponseField ¶ added in v0.4.1
type AccountCreateResponseField struct {
// The field value, or null if unset.
Value AccountCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountCreateResponseField) RawJSON ¶ added in v0.4.1
func (r AccountCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponseField) UnmarshalJSON(data []byte) error
type AccountCreateResponseFieldValueAddress ¶ added in v0.4.1
type AccountCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r AccountCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type AccountCreateResponseFieldValueFullName ¶ added in v0.4.1
type AccountCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r AccountCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type AccountCreateResponseFieldValueUnion ¶ added in v0.4.1
type AccountCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [AccountCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [AccountCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [AccountCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AccountCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountCreateResponseFieldValueAddress, AccountCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (AccountCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsAddress() (v AccountCreateResponseFieldValueAddress)
func (AccountCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsBool() (v bool)
func (AccountCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsFloat() (v float64)
func (AccountCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsFullName() (v AccountCreateResponseFieldValueFullName)
func (AccountCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsString() (v string)
func (AccountCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (AccountCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u AccountCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type AccountCreateResponseRelationship ¶ added in v0.4.1
type AccountCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r AccountCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountCreateResponseRelationship) UnmarshalJSON(data []byte) error
type AccountDefinitionsResponse ¶ added in v0.2.0
type AccountDefinitionsResponse struct {
// Map of field keys to their definitions, including both system and custom fields.
FieldDefinitions map[string]AccountDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
// The object type these definitions belong to (e.g. `account`).
ObjectType string `json:"objectType" api:"required"`
// Map of relationship keys to their definitions.
RelationshipDefinitions map[string]AccountDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FieldDefinitions respjson.Field
ObjectType respjson.Field
RelationshipDefinitions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountDefinitionsResponse) RawJSON ¶ added in v0.2.0
func (r AccountDefinitionsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountDefinitionsResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AccountDefinitionsResponse) UnmarshalJSON(data []byte) error
type AccountDefinitionsResponseFieldDefinition ¶ added in v0.2.0
type AccountDefinitionsResponseFieldDefinition struct {
// Description of the field, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the field.
Label string `json:"label" api:"required"`
// Type-specific configuration (e.g. select options, currency code).
TypeConfiguration AccountDefinitionsResponseFieldDefinitionTypeConfiguration `json:"typeConfiguration" api:"required"`
// Data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// Unique identifier of the field definition.
ID string `json:"id"`
// `true` for fields that are not writable via the API (e.g. AI-generated
// summaries). `false` or absent for writable fields.
ReadOnly bool `json:"readOnly"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Label respjson.Field
TypeConfiguration respjson.Field
ValueType respjson.Field
ID respjson.Field
ReadOnly respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountDefinitionsResponseFieldDefinition) RawJSON ¶ added in v0.2.0
func (r AccountDefinitionsResponseFieldDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountDefinitionsResponseFieldDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *AccountDefinitionsResponseFieldDefinition) UnmarshalJSON(data []byte) error
type AccountDefinitionsResponseFieldDefinitionTypeConfiguration ¶ added in v0.4.1
type AccountDefinitionsResponseFieldDefinitionTypeConfiguration struct {
// ISO 4217 3-letter currency code.
Currency string `json:"currency"`
// Social platform associated with this handle field.
//
// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
HandleService string `json:"handleService"`
// Whether this field accepts multiple values.
MultipleValues bool `json:"multipleValues"`
// Available options for select fields.
Options []AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
// Whether values for this field must be unique.
Unique bool `json:"unique"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
HandleService respjson.Field
MultipleValues respjson.Field
Options respjson.Field
Unique respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Type-specific configuration (e.g. select options, currency code).
func (AccountDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON ¶ added in v0.4.1
func (r AccountDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON(data []byte) error
type AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption ¶ added in v0.4.1
type AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
// Unique identifier of the select option.
ID string `json:"id" api:"required"`
// Human-readable display name of the option.
Label string `json:"label" api:"required"`
// Description of the option, or null.
Description string `json:"description" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Label respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON ¶ added in v0.4.1
func (r AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON(data []byte) error
type AccountDefinitionsResponseRelationshipDefinition ¶ added in v0.2.0
type AccountDefinitionsResponseRelationshipDefinition struct {
// Whether this is a `has_one` or `has_many` relationship.
//
// Any of "HAS_ONE", "HAS_MANY".
Cardinality string `json:"cardinality" api:"required"`
// Description of the relationship, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the relationship.
Label string `json:"label" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// Unique identifier of the relationship definition.
ID string `json:"id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
Description respjson.Field
Label respjson.Field
ObjectType respjson.Field
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountDefinitionsResponseRelationshipDefinition) RawJSON ¶ added in v0.2.0
func (r AccountDefinitionsResponseRelationshipDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountDefinitionsResponseRelationshipDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *AccountDefinitionsResponseRelationshipDefinition) UnmarshalJSON(data []byte) error
type AccountListParams ¶
type AccountListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AccountListParams) URLQuery ¶
func (r AccountListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AccountListParams's query parameters as `url.Values`.
type AccountListResponse ¶
type AccountListResponse struct {
// Array of entity objects for the current page.
Data []AccountListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponse) RawJSON ¶
func (r AccountListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponse) UnmarshalJSON ¶
func (r *AccountListResponse) UnmarshalJSON(data []byte) error
type AccountListResponseData ¶
type AccountListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]AccountListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]AccountListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponseData) RawJSON ¶
func (r AccountListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseData) UnmarshalJSON ¶
func (r *AccountListResponseData) UnmarshalJSON(data []byte) error
type AccountListResponseDataField ¶
type AccountListResponseDataField struct {
// The field value, or null if unset.
Value AccountListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponseDataField) RawJSON ¶
func (r AccountListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseDataField) UnmarshalJSON ¶
func (r *AccountListResponseDataField) UnmarshalJSON(data []byte) error
type AccountListResponseDataFieldValueAddress ¶ added in v0.4.1
type AccountListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r AccountListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type AccountListResponseDataFieldValueFullName ¶ added in v0.4.1
type AccountListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r AccountListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type AccountListResponseDataFieldValueUnion ¶
type AccountListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [AccountListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [AccountListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [AccountListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AccountListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountListResponseDataFieldValueAddress, AccountListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (AccountListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u AccountListResponseDataFieldValueUnion) AsAddress() (v AccountListResponseDataFieldValueAddress)
func (AccountListResponseDataFieldValueUnion) AsBool ¶
func (u AccountListResponseDataFieldValueUnion) AsBool() (v bool)
func (AccountListResponseDataFieldValueUnion) AsFloat ¶
func (u AccountListResponseDataFieldValueUnion) AsFloat() (v float64)
func (AccountListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u AccountListResponseDataFieldValueUnion) AsFullName() (v AccountListResponseDataFieldValueFullName)
func (AccountListResponseDataFieldValueUnion) AsString ¶
func (u AccountListResponseDataFieldValueUnion) AsString() (v string)
func (AccountListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u AccountListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (AccountListResponseDataFieldValueUnion) RawJSON ¶
func (u AccountListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseDataFieldValueUnion) UnmarshalJSON ¶
func (r *AccountListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type AccountListResponseDataRelationship ¶
type AccountListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountListResponseDataRelationship) RawJSON ¶
func (r AccountListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountListResponseDataRelationship) UnmarshalJSON ¶
func (r *AccountListResponseDataRelationship) UnmarshalJSON(data []byte) error
type AccountNewParams ¶
type AccountNewParams struct {
// Field values for the new account. System fields use a `$` prefix (e.g. `$name`,
// `$website`); custom attributes use their bare slug (e.g. `tier`, `renewalDate`).
// Required: `$name` (string). Fields of type `SINGLE_SELECT` or `MULTI_SELECT`
// accept either an option ID or label from the field's `typeConfiguration.options`
// — call the
// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to
// discover available fields and options. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]AccountNewParamsFieldUnion `json:"fields,omitzero" api:"required"`
// Relationships to set on the new account. System relationships use a `$` prefix
// (e.g. `$owner`, `$contact`); custom relationships use their bare slug. Each
// value is a single entity ID or an array of IDs. Call the
// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> to
// list available relationship keys.
Relationships map[string]AccountNewParamsRelationshipUnion `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (AccountNewParams) MarshalJSON ¶
func (r AccountNewParams) MarshalJSON() (data []byte, err error)
func (*AccountNewParams) UnmarshalJSON ¶
func (r *AccountNewParams) UnmarshalJSON(data []byte) error
type AccountNewParamsFieldAddress ¶ added in v0.4.1
type AccountNewParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (AccountNewParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r AccountNewParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*AccountNewParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountNewParamsFieldAddress) UnmarshalJSON(data []byte) error
type AccountNewParamsFieldFullName ¶ added in v0.4.1
type AccountNewParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (AccountNewParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r AccountNewParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*AccountNewParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountNewParamsFieldFullName) UnmarshalJSON(data []byte) error
type AccountNewParamsFieldUnion ¶
type AccountNewParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *AccountNewParamsFieldAddress `json:",omitzero,inline"`
OfFullName *AccountNewParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountNewParamsFieldUnion) MarshalJSON ¶
func (u AccountNewParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*AccountNewParamsFieldUnion) UnmarshalJSON ¶
func (u *AccountNewParamsFieldUnion) UnmarshalJSON(data []byte) error
type AccountNewParamsRelationshipUnion ¶
type AccountNewParamsRelationshipUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountNewParamsRelationshipUnion) MarshalJSON ¶
func (u AccountNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)
func (*AccountNewParamsRelationshipUnion) UnmarshalJSON ¶
func (u *AccountNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error
type AccountRetrieveResponse ¶ added in v0.4.1
type AccountRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]AccountRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]AccountRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r AccountRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponse) UnmarshalJSON(data []byte) error
type AccountRetrieveResponseField ¶ added in v0.4.1
type AccountRetrieveResponseField struct {
// The field value, or null if unset.
Value AccountRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r AccountRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponseField) UnmarshalJSON(data []byte) error
type AccountRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type AccountRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r AccountRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type AccountRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type AccountRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r AccountRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type AccountRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type AccountRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [AccountRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [AccountRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [AccountRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AccountRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountRetrieveResponseFieldValueAddress, AccountRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (AccountRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsAddress() (v AccountRetrieveResponseFieldValueAddress)
func (AccountRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (AccountRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (AccountRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsFullName() (v AccountRetrieveResponseFieldValueFullName)
func (AccountRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsString() (v string)
func (AccountRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (AccountRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u AccountRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type AccountRetrieveResponseRelationship ¶ added in v0.4.1
type AccountRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r AccountRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
}
Accounts represent companies or organizations in Lightfield. Each account can have contacts, opportunities, tasks, and notes associated with it.
AccountService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Definitions ¶ added in v0.2.0
func (r *AccountService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *AccountDefinitionsResponse, err error)
Returns the schema for all field and relationship definitions available on accounts, including both system-defined and custom fields. Useful for understanding the shape of account data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.
**[Required scope](/using-the-api/scopes/):** `accounts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountRetrieveResponse, err error)
Retrieves a single account by its ID.
**[Required scope](/using-the-api/scopes/):** `accounts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*AccountService) List ¶
func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *AccountListResponse, err error)
Returns a paginated list of accounts. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.
**[Required scope](/using-the-api/scopes/):** `accounts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*AccountService) New ¶
func (r *AccountService) New(ctx context.Context, body AccountNewParams, opts ...option.RequestOption) (res *AccountCreateResponse, err error)
Creates a new account record. The `$name` field is required.
If a `$website` is provided, Lightfield automatically enriches the account in the background. The `$howTheyMakeMoney` and `$accountStatus` fields are read-only and cannot be set via the API. The `$opportunity`, `$task`, and `$note` relationships are also read-only — manage them via the `$account` relationship on the opportunity or task, or the `$account`/`$opportunity` note relationships instead.
Supports idempotency via the `Idempotency-Key` header.
To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.
**[Required scope](/using-the-api/scopes/):** `accounts:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*AccountService) Update ¶
func (r *AccountService) Update(ctx context.Context, id string, body AccountUpdateParams, opts ...option.RequestOption) (res *AccountUpdateResponse, err error)
Updates an existing account by ID. Only included fields and relationships are modified.
The `$howTheyMakeMoney` and `$accountStatus` fields are read-only and cannot be updated. The `$opportunity`, `$task`, and `$note` relationships are also read-only — manage them via the `$account` relationship on the opportunity or task, or the `$account`/`$opportunity` note relationships instead.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `accounts:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type AccountUpdateParams ¶
type AccountUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged. System fields use a `$` prefix (e.g. `$name`); custom attributes
// use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept an option
// ID or label — call the
// <u>[definitions endpoint](/api/resources/account/methods/definitions)</u> for
// available options. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]AccountUpdateParamsFieldUnion `json:"fields,omitzero"`
// Relationship operations to apply. System relationships use a `$` prefix (e.g.
// `$owner`, `$contact`). Each value is an operation object with `add`, `remove`,
// or `replace`.
Relationships map[string]AccountUpdateParamsRelationship `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (AccountUpdateParams) MarshalJSON ¶
func (r AccountUpdateParams) MarshalJSON() (data []byte, err error)
func (*AccountUpdateParams) UnmarshalJSON ¶
func (r *AccountUpdateParams) UnmarshalJSON(data []byte) error
type AccountUpdateParamsFieldAddress ¶ added in v0.4.1
type AccountUpdateParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (AccountUpdateParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r AccountUpdateParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*AccountUpdateParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountUpdateParamsFieldAddress) UnmarshalJSON(data []byte) error
type AccountUpdateParamsFieldFullName ¶ added in v0.4.1
type AccountUpdateParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (AccountUpdateParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r AccountUpdateParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*AccountUpdateParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountUpdateParamsFieldFullName) UnmarshalJSON(data []byte) error
type AccountUpdateParamsFieldUnion ¶
type AccountUpdateParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *AccountUpdateParamsFieldAddress `json:",omitzero,inline"`
OfFullName *AccountUpdateParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountUpdateParamsFieldUnion) MarshalJSON ¶
func (u AccountUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*AccountUpdateParamsFieldUnion) UnmarshalJSON ¶
func (u *AccountUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error
type AccountUpdateParamsRelationship ¶
type AccountUpdateParamsRelationship struct {
// Entity ID(s) to add to the relationship.
Add AccountUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the relationship.
Remove AccountUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
// Entity ID(s) to set as the entire relationship, replacing all existing
// associations.
Replace AccountUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
// contains filtered or unexported fields
}
An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
func (AccountUpdateParamsRelationship) MarshalJSON ¶
func (r AccountUpdateParamsRelationship) MarshalJSON() (data []byte, err error)
func (*AccountUpdateParamsRelationship) UnmarshalJSON ¶
func (r *AccountUpdateParamsRelationship) UnmarshalJSON(data []byte) error
type AccountUpdateParamsRelationshipAddUnion ¶
type AccountUpdateParamsRelationshipAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountUpdateParamsRelationshipAddUnion) MarshalJSON ¶
func (u AccountUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)
func (*AccountUpdateParamsRelationshipAddUnion) UnmarshalJSON ¶
func (u *AccountUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error
type AccountUpdateParamsRelationshipRemoveUnion ¶
type AccountUpdateParamsRelationshipRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountUpdateParamsRelationshipRemoveUnion) MarshalJSON ¶
func (u AccountUpdateParamsRelationshipRemoveUnion) MarshalJSON() ([]byte, error)
func (*AccountUpdateParamsRelationshipRemoveUnion) UnmarshalJSON ¶
func (u *AccountUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error
type AccountUpdateParamsRelationshipReplaceUnion ¶
type AccountUpdateParamsRelationshipReplaceUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AccountUpdateParamsRelationshipReplaceUnion) MarshalJSON ¶
func (u AccountUpdateParamsRelationshipReplaceUnion) MarshalJSON() ([]byte, error)
func (*AccountUpdateParamsRelationshipReplaceUnion) UnmarshalJSON ¶
func (u *AccountUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error
type AccountUpdateResponse ¶
type AccountUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]AccountUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]AccountUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountUpdateResponse) RawJSON ¶
func (r AccountUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponse) UnmarshalJSON ¶
func (r *AccountUpdateResponse) UnmarshalJSON(data []byte) error
type AccountUpdateResponseField ¶
type AccountUpdateResponseField struct {
// The field value, or null if unset.
Value AccountUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountUpdateResponseField) RawJSON ¶
func (r AccountUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponseField) UnmarshalJSON ¶
func (r *AccountUpdateResponseField) UnmarshalJSON(data []byte) error
type AccountUpdateResponseFieldValueAddress ¶ added in v0.4.1
type AccountUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r AccountUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type AccountUpdateResponseFieldValueFullName ¶ added in v0.4.1
type AccountUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r AccountUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *AccountUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type AccountUpdateResponseFieldValueUnion ¶
type AccountUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [AccountUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [AccountUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [AccountUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AccountUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], AccountUpdateResponseFieldValueAddress, AccountUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (AccountUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u AccountUpdateResponseFieldValueUnion) AsAddress() (v AccountUpdateResponseFieldValueAddress)
func (AccountUpdateResponseFieldValueUnion) AsBool ¶
func (u AccountUpdateResponseFieldValueUnion) AsBool() (v bool)
func (AccountUpdateResponseFieldValueUnion) AsFloat ¶
func (u AccountUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (AccountUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u AccountUpdateResponseFieldValueUnion) AsFullName() (v AccountUpdateResponseFieldValueFullName)
func (AccountUpdateResponseFieldValueUnion) AsString ¶
func (u AccountUpdateResponseFieldValueUnion) AsString() (v string)
func (AccountUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u AccountUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (AccountUpdateResponseFieldValueUnion) RawJSON ¶
func (u AccountUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponseFieldValueUnion) UnmarshalJSON ¶
func (r *AccountUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type AccountUpdateResponseRelationship ¶
type AccountUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccountUpdateResponseRelationship) RawJSON ¶
func (r AccountUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUpdateResponseRelationship) UnmarshalJSON ¶
func (r *AccountUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
Options []option.RequestOption
// Accounts represent companies or organizations in Lightfield. Each account can
// have contacts, opportunities, tasks, and notes associated with it.
Account AccountService
// Contacts represent individual people in Lightfield. Contacts can be associated
// with one or more accounts.
Contact ContactService
// Lists are curated collections of accounts, contacts, or opportunities in
// Lightfield. Each list contains entities of a single type.
List ListService
// Meetings represent synced or manually created interactions in Lightfield. Read
// responses are privacy-aware and may be redacted based on the caller. For
// transcript uploads and attachment flows, see
// <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
Meeting MeetingService
// Notes represent free-form text records in Lightfield. Each note can be
// associated with zero or more accounts and opportunities.
Note NoteService
// Opportunities represent potential deals or sales in Lightfield. Each opportunity
// belongs to an account and can have tasks and notes associated with it.
Opportunity OpportunityService
// Tasks represent action items in Lightfield. Each task belongs to an account, is
// assigned to a member, and can optionally be associated with an opportunity.
Task TaskService
// Members represent users in your Lightfield workspace. Members can own accounts
// and opportunities, and are referenced in relationships like `$owner` and
// `$createdBy`.
Member MemberService
// Workflow runs represent executions of automated workflows.
WorkflowRun WorkflowRunService
// Files are used to upload documents via presigned URLs. After uploading and
// completing a file, link it to resources through their own APIs (e.g. attach a
// transcript to a meeting). See
// <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow and
// supported purposes. For meeting transcript attachments, see
// <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
File FileService
}
Client creates a struct with services and top level methods that help with interacting with the Lightfield API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (LIGHTFIELD_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ContactCreateResponse ¶ added in v0.4.1
type ContactCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ContactCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ContactCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactCreateResponse) RawJSON ¶ added in v0.4.1
func (r ContactCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponse) UnmarshalJSON(data []byte) error
type ContactCreateResponseField ¶ added in v0.4.1
type ContactCreateResponseField struct {
// The field value, or null if unset.
Value ContactCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactCreateResponseField) RawJSON ¶ added in v0.4.1
func (r ContactCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponseField) UnmarshalJSON(data []byte) error
type ContactCreateResponseFieldValueAddress ¶ added in v0.4.1
type ContactCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ContactCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ContactCreateResponseFieldValueFullName ¶ added in v0.4.1
type ContactCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ContactCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ContactCreateResponseFieldValueUnion ¶ added in v0.4.1
type ContactCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ContactCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ContactCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ContactCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ContactCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactCreateResponseFieldValueAddress, ContactCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ContactCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsAddress() (v ContactCreateResponseFieldValueAddress)
func (ContactCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsBool() (v bool)
func (ContactCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsFloat() (v float64)
func (ContactCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsFullName() (v ContactCreateResponseFieldValueFullName)
func (ContactCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsString() (v string)
func (ContactCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (ContactCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ContactCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type ContactCreateResponseRelationship ¶ added in v0.4.1
type ContactCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r ContactCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactCreateResponseRelationship) UnmarshalJSON(data []byte) error
type ContactDefinitionsResponse ¶ added in v0.2.0
type ContactDefinitionsResponse struct {
// Map of field keys to their definitions, including both system and custom fields.
FieldDefinitions map[string]ContactDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
// The object type these definitions belong to (e.g. `account`).
ObjectType string `json:"objectType" api:"required"`
// Map of relationship keys to their definitions.
RelationshipDefinitions map[string]ContactDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FieldDefinitions respjson.Field
ObjectType respjson.Field
RelationshipDefinitions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactDefinitionsResponse) RawJSON ¶ added in v0.2.0
func (r ContactDefinitionsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactDefinitionsResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *ContactDefinitionsResponse) UnmarshalJSON(data []byte) error
type ContactDefinitionsResponseFieldDefinition ¶ added in v0.2.0
type ContactDefinitionsResponseFieldDefinition struct {
// Description of the field, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the field.
Label string `json:"label" api:"required"`
// Type-specific configuration (e.g. select options, currency code).
TypeConfiguration ContactDefinitionsResponseFieldDefinitionTypeConfiguration `json:"typeConfiguration" api:"required"`
// Data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// Unique identifier of the field definition.
ID string `json:"id"`
// `true` for fields that are not writable via the API (e.g. AI-generated
// summaries). `false` or absent for writable fields.
ReadOnly bool `json:"readOnly"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Label respjson.Field
TypeConfiguration respjson.Field
ValueType respjson.Field
ID respjson.Field
ReadOnly respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactDefinitionsResponseFieldDefinition) RawJSON ¶ added in v0.2.0
func (r ContactDefinitionsResponseFieldDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactDefinitionsResponseFieldDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *ContactDefinitionsResponseFieldDefinition) UnmarshalJSON(data []byte) error
type ContactDefinitionsResponseFieldDefinitionTypeConfiguration ¶ added in v0.4.1
type ContactDefinitionsResponseFieldDefinitionTypeConfiguration struct {
// ISO 4217 3-letter currency code.
Currency string `json:"currency"`
// Social platform associated with this handle field.
//
// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
HandleService string `json:"handleService"`
// Whether this field accepts multiple values.
MultipleValues bool `json:"multipleValues"`
// Available options for select fields.
Options []ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
// Whether values for this field must be unique.
Unique bool `json:"unique"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
HandleService respjson.Field
MultipleValues respjson.Field
Options respjson.Field
Unique respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Type-specific configuration (e.g. select options, currency code).
func (ContactDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON ¶ added in v0.4.1
func (r ContactDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON(data []byte) error
type ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption ¶ added in v0.4.1
type ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
// Unique identifier of the select option.
ID string `json:"id" api:"required"`
// Human-readable display name of the option.
Label string `json:"label" api:"required"`
// Description of the option, or null.
Description string `json:"description" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Label respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON ¶ added in v0.4.1
func (r ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON(data []byte) error
type ContactDefinitionsResponseRelationshipDefinition ¶ added in v0.2.0
type ContactDefinitionsResponseRelationshipDefinition struct {
// Whether this is a `has_one` or `has_many` relationship.
//
// Any of "HAS_ONE", "HAS_MANY".
Cardinality string `json:"cardinality" api:"required"`
// Description of the relationship, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the relationship.
Label string `json:"label" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// Unique identifier of the relationship definition.
ID string `json:"id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
Description respjson.Field
Label respjson.Field
ObjectType respjson.Field
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactDefinitionsResponseRelationshipDefinition) RawJSON ¶ added in v0.2.0
func (r ContactDefinitionsResponseRelationshipDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactDefinitionsResponseRelationshipDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *ContactDefinitionsResponseRelationshipDefinition) UnmarshalJSON(data []byte) error
type ContactListParams ¶
type ContactListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ContactListParams) URLQuery ¶
func (r ContactListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ContactListParams's query parameters as `url.Values`.
type ContactListResponse ¶
type ContactListResponse struct {
// Array of entity objects for the current page.
Data []ContactListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponse) RawJSON ¶
func (r ContactListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponse) UnmarshalJSON ¶
func (r *ContactListResponse) UnmarshalJSON(data []byte) error
type ContactListResponseData ¶
type ContactListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ContactListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ContactListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponseData) RawJSON ¶
func (r ContactListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseData) UnmarshalJSON ¶
func (r *ContactListResponseData) UnmarshalJSON(data []byte) error
type ContactListResponseDataField ¶
type ContactListResponseDataField struct {
// The field value, or null if unset.
Value ContactListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponseDataField) RawJSON ¶
func (r ContactListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseDataField) UnmarshalJSON ¶
func (r *ContactListResponseDataField) UnmarshalJSON(data []byte) error
type ContactListResponseDataFieldValueAddress ¶ added in v0.4.1
type ContactListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ContactListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type ContactListResponseDataFieldValueFullName ¶ added in v0.4.1
type ContactListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ContactListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type ContactListResponseDataFieldValueUnion ¶
type ContactListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ContactListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ContactListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ContactListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ContactListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactListResponseDataFieldValueAddress, ContactListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ContactListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ContactListResponseDataFieldValueUnion) AsAddress() (v ContactListResponseDataFieldValueAddress)
func (ContactListResponseDataFieldValueUnion) AsBool ¶
func (u ContactListResponseDataFieldValueUnion) AsBool() (v bool)
func (ContactListResponseDataFieldValueUnion) AsFloat ¶
func (u ContactListResponseDataFieldValueUnion) AsFloat() (v float64)
func (ContactListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ContactListResponseDataFieldValueUnion) AsFullName() (v ContactListResponseDataFieldValueFullName)
func (ContactListResponseDataFieldValueUnion) AsString ¶
func (u ContactListResponseDataFieldValueUnion) AsString() (v string)
func (ContactListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ContactListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (ContactListResponseDataFieldValueUnion) RawJSON ¶
func (u ContactListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseDataFieldValueUnion) UnmarshalJSON ¶
func (r *ContactListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type ContactListResponseDataRelationship ¶
type ContactListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactListResponseDataRelationship) RawJSON ¶
func (r ContactListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactListResponseDataRelationship) UnmarshalJSON ¶
func (r *ContactListResponseDataRelationship) UnmarshalJSON(data []byte) error
type ContactNewParams ¶
type ContactNewParams struct {
// Field values for the new contact. System fields use a `$` prefix (e.g. `$email`,
// `$name`); custom attributes use their bare slug. Note: `$name` is an object
// `{ firstName, lastName }`, not a plain string. Call the
// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to
// discover available fields and their types. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]ContactNewParamsFieldUnion `json:"fields,omitzero" api:"required"`
// Relationships to set on the new contact. System relationships use a `$` prefix
// (e.g. `$account`); custom relationships use their bare slug. Each value is a
// single entity ID or an array of IDs. Call the
// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> to
// list available relationship keys.
Relationships map[string]ContactNewParamsRelationshipUnion `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (ContactNewParams) MarshalJSON ¶
func (r ContactNewParams) MarshalJSON() (data []byte, err error)
func (*ContactNewParams) UnmarshalJSON ¶
func (r *ContactNewParams) UnmarshalJSON(data []byte) error
type ContactNewParamsFieldAddress ¶ added in v0.4.1
type ContactNewParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (ContactNewParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r ContactNewParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*ContactNewParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactNewParamsFieldAddress) UnmarshalJSON(data []byte) error
type ContactNewParamsFieldFullName ¶ added in v0.4.1
type ContactNewParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (ContactNewParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r ContactNewParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*ContactNewParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactNewParamsFieldFullName) UnmarshalJSON(data []byte) error
type ContactNewParamsFieldUnion ¶
type ContactNewParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *ContactNewParamsFieldAddress `json:",omitzero,inline"`
OfFullName *ContactNewParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactNewParamsFieldUnion) MarshalJSON ¶
func (u ContactNewParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*ContactNewParamsFieldUnion) UnmarshalJSON ¶
func (u *ContactNewParamsFieldUnion) UnmarshalJSON(data []byte) error
type ContactNewParamsRelationshipUnion ¶
type ContactNewParamsRelationshipUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactNewParamsRelationshipUnion) MarshalJSON ¶
func (u ContactNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)
func (*ContactNewParamsRelationshipUnion) UnmarshalJSON ¶
func (u *ContactNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error
type ContactRetrieveResponse ¶ added in v0.4.1
type ContactRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ContactRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ContactRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r ContactRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponse) UnmarshalJSON(data []byte) error
type ContactRetrieveResponseField ¶ added in v0.4.1
type ContactRetrieveResponseField struct {
// The field value, or null if unset.
Value ContactRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r ContactRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponseField) UnmarshalJSON(data []byte) error
type ContactRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type ContactRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ContactRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ContactRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type ContactRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ContactRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ContactRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type ContactRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ContactRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ContactRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ContactRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ContactRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactRetrieveResponseFieldValueAddress, ContactRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ContactRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsAddress() (v ContactRetrieveResponseFieldValueAddress)
func (ContactRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (ContactRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (ContactRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsFullName() (v ContactRetrieveResponseFieldValueFullName)
func (ContactRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsString() (v string)
func (ContactRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (ContactRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ContactRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type ContactRetrieveResponseRelationship ¶ added in v0.4.1
type ContactRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r ContactRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type ContactService ¶
type ContactService struct {
Options []option.RequestOption
}
Contacts represent individual people in Lightfield. Contacts can be associated with one or more accounts.
ContactService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewContactService method instead.
func NewContactService ¶
func NewContactService(opts ...option.RequestOption) (r ContactService)
NewContactService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ContactService) Definitions ¶ added in v0.2.0
func (r *ContactService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *ContactDefinitionsResponse, err error)
Returns the schema for all field and relationship definitions available on contacts, including both system-defined and custom fields. Useful for understanding the shape of contact data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.
**[Required scope](/using-the-api/scopes/):** `contacts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*ContactService) Get ¶
func (r *ContactService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ContactRetrieveResponse, err error)
Retrieves a single contact by its ID.
**[Required scope](/using-the-api/scopes/):** `contacts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*ContactService) List ¶
func (r *ContactService) List(ctx context.Context, query ContactListParams, opts ...option.RequestOption) (res *ContactListResponse, err error)
Returns a paginated list of contacts. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.
**[Required scope](/using-the-api/scopes/):** `contacts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*ContactService) New ¶
func (r *ContactService) New(ctx context.Context, body ContactNewParams, opts ...option.RequestOption) (res *ContactCreateResponse, err error)
Creates a new contact record.
After creation, Lightfield automatically enriches the contact in the background.
Supports idempotency via the `Idempotency-Key` header.
To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.
**[Required scope](/using-the-api/scopes/):** `contacts:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*ContactService) Update ¶
func (r *ContactService) Update(ctx context.Context, id string, body ContactUpdateParams, opts ...option.RequestOption) (res *ContactUpdateResponse, err error)
Updates an existing contact by ID. Only included fields and relationships are modified.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `contacts:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type ContactUpdateParams ¶
type ContactUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged. System fields use a `$` prefix (e.g. `$email`); custom
// attributes use their bare slug. Note: `$name` is an object
// `{ firstName, lastName }`, not a plain string. Call the
// <u>[definitions endpoint](/api/resources/contact/methods/definitions)</u> for
// available fields and types. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]ContactUpdateParamsFieldUnion `json:"fields,omitzero"`
// Relationship operations to apply. System relationships use a `$` prefix (e.g.
// `$account`). Each value is an operation object with `add`, `remove`, or
// `replace`.
Relationships map[string]ContactUpdateParamsRelationship `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (ContactUpdateParams) MarshalJSON ¶
func (r ContactUpdateParams) MarshalJSON() (data []byte, err error)
func (*ContactUpdateParams) UnmarshalJSON ¶
func (r *ContactUpdateParams) UnmarshalJSON(data []byte) error
type ContactUpdateParamsFieldAddress ¶ added in v0.4.1
type ContactUpdateParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (ContactUpdateParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r ContactUpdateParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*ContactUpdateParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactUpdateParamsFieldAddress) UnmarshalJSON(data []byte) error
type ContactUpdateParamsFieldFullName ¶ added in v0.4.1
type ContactUpdateParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (ContactUpdateParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r ContactUpdateParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*ContactUpdateParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactUpdateParamsFieldFullName) UnmarshalJSON(data []byte) error
type ContactUpdateParamsFieldUnion ¶
type ContactUpdateParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *ContactUpdateParamsFieldAddress `json:",omitzero,inline"`
OfFullName *ContactUpdateParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactUpdateParamsFieldUnion) MarshalJSON ¶
func (u ContactUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*ContactUpdateParamsFieldUnion) UnmarshalJSON ¶
func (u *ContactUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error
type ContactUpdateParamsRelationship ¶
type ContactUpdateParamsRelationship struct {
// Entity ID(s) to add to the relationship.
Add ContactUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the relationship.
Remove ContactUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
// Entity ID(s) to set as the entire relationship, replacing all existing
// associations.
Replace ContactUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
// contains filtered or unexported fields
}
An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
func (ContactUpdateParamsRelationship) MarshalJSON ¶
func (r ContactUpdateParamsRelationship) MarshalJSON() (data []byte, err error)
func (*ContactUpdateParamsRelationship) UnmarshalJSON ¶
func (r *ContactUpdateParamsRelationship) UnmarshalJSON(data []byte) error
type ContactUpdateParamsRelationshipAddUnion ¶
type ContactUpdateParamsRelationshipAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactUpdateParamsRelationshipAddUnion) MarshalJSON ¶
func (u ContactUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)
func (*ContactUpdateParamsRelationshipAddUnion) UnmarshalJSON ¶
func (u *ContactUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error
type ContactUpdateParamsRelationshipRemoveUnion ¶
type ContactUpdateParamsRelationshipRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactUpdateParamsRelationshipRemoveUnion) MarshalJSON ¶
func (u ContactUpdateParamsRelationshipRemoveUnion) MarshalJSON() ([]byte, error)
func (*ContactUpdateParamsRelationshipRemoveUnion) UnmarshalJSON ¶
func (u *ContactUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error
type ContactUpdateParamsRelationshipReplaceUnion ¶
type ContactUpdateParamsRelationshipReplaceUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ContactUpdateParamsRelationshipReplaceUnion) MarshalJSON ¶
func (u ContactUpdateParamsRelationshipReplaceUnion) MarshalJSON() ([]byte, error)
func (*ContactUpdateParamsRelationshipReplaceUnion) UnmarshalJSON ¶
func (u *ContactUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error
type ContactUpdateResponse ¶
type ContactUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ContactUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ContactUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactUpdateResponse) RawJSON ¶
func (r ContactUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponse) UnmarshalJSON ¶
func (r *ContactUpdateResponse) UnmarshalJSON(data []byte) error
type ContactUpdateResponseField ¶
type ContactUpdateResponseField struct {
// The field value, or null if unset.
Value ContactUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactUpdateResponseField) RawJSON ¶
func (r ContactUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponseField) UnmarshalJSON ¶
func (r *ContactUpdateResponseField) UnmarshalJSON(data []byte) error
type ContactUpdateResponseFieldValueAddress ¶ added in v0.4.1
type ContactUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ContactUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ContactUpdateResponseFieldValueFullName ¶ added in v0.4.1
type ContactUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ContactUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ContactUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ContactUpdateResponseFieldValueUnion ¶
type ContactUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ContactUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ContactUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ContactUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ContactUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ContactUpdateResponseFieldValueAddress, ContactUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ContactUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ContactUpdateResponseFieldValueUnion) AsAddress() (v ContactUpdateResponseFieldValueAddress)
func (ContactUpdateResponseFieldValueUnion) AsBool ¶
func (u ContactUpdateResponseFieldValueUnion) AsBool() (v bool)
func (ContactUpdateResponseFieldValueUnion) AsFloat ¶
func (u ContactUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (ContactUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ContactUpdateResponseFieldValueUnion) AsFullName() (v ContactUpdateResponseFieldValueFullName)
func (ContactUpdateResponseFieldValueUnion) AsString ¶
func (u ContactUpdateResponseFieldValueUnion) AsString() (v string)
func (ContactUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ContactUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (ContactUpdateResponseFieldValueUnion) RawJSON ¶
func (u ContactUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponseFieldValueUnion) UnmarshalJSON ¶
func (r *ContactUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type ContactUpdateResponseRelationship ¶
type ContactUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContactUpdateResponseRelationship) RawJSON ¶
func (r ContactUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactUpdateResponseRelationship) UnmarshalJSON ¶
func (r *ContactUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type FileCancelParams ¶ added in v0.4.1
type FileCancelParams struct {
Body FileCancelParamsBody
// contains filtered or unexported fields
}
func (FileCancelParams) MarshalJSON ¶ added in v0.4.1
func (r FileCancelParams) MarshalJSON() (data []byte, err error)
func (*FileCancelParams) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCancelParams) UnmarshalJSON(data []byte) error
type FileCancelParamsBody ¶ added in v0.4.1
type FileCancelParamsBody struct {
// contains filtered or unexported fields
}
func (FileCancelParamsBody) MarshalJSON ¶ added in v0.4.1
func (r FileCancelParamsBody) MarshalJSON() (data []byte, err error)
func (*FileCancelParamsBody) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCancelParamsBody) UnmarshalJSON(data []byte) error
type FileCancelResponse ¶ added in v0.4.1
type FileCancelResponse struct {
// Unique identifier for the file.
ID string `json:"id" api:"required"`
// When the file upload was completed.
CompletedAt string `json:"completedAt" api:"required"`
// When the file upload session was created.
CreatedAt string `json:"createdAt" api:"required"`
// When the upload session expires. Null once completed, cancelled, or expired.
ExpiresAt string `json:"expiresAt" api:"required"`
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file.
MimeType string `json:"mimeType" api:"required"`
// File size in bytes.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Current upload status of the file.
//
// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
Status FileCancelResponseStatus `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Filename respjson.Field
MimeType respjson.Field
SizeBytes respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileCancelResponse) RawJSON ¶ added in v0.4.1
func (r FileCancelResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileCancelResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCancelResponse) UnmarshalJSON(data []byte) error
type FileCancelResponseStatus ¶ added in v0.4.1
type FileCancelResponseStatus string
Current upload status of the file.
const ( FileCancelResponseStatusPending FileCancelResponseStatus = "PENDING" FileCancelResponseStatusCompleted FileCancelResponseStatus = "COMPLETED" FileCancelResponseStatusCancelled FileCancelResponseStatus = "CANCELLED" FileCancelResponseStatusExpired FileCancelResponseStatus = "EXPIRED" )
type FileCompleteParams ¶ added in v0.4.1
type FileCompleteParams struct {
// Optional MD5 hex digest of the uploaded file for checksum verification.
Md5 param.Opt[string] `json:"md5,omitzero"`
// contains filtered or unexported fields
}
func (FileCompleteParams) MarshalJSON ¶ added in v0.4.1
func (r FileCompleteParams) MarshalJSON() (data []byte, err error)
func (*FileCompleteParams) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCompleteParams) UnmarshalJSON(data []byte) error
type FileCompleteResponse ¶ added in v0.4.1
type FileCompleteResponse struct {
// Unique identifier for the file.
ID string `json:"id" api:"required"`
// When the file upload was completed.
CompletedAt string `json:"completedAt" api:"required"`
// When the file upload session was created.
CreatedAt string `json:"createdAt" api:"required"`
// When the upload session expires. Null once completed, cancelled, or expired.
ExpiresAt string `json:"expiresAt" api:"required"`
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file.
MimeType string `json:"mimeType" api:"required"`
// File size in bytes.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Current upload status of the file.
//
// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
Status FileCompleteResponseStatus `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Filename respjson.Field
MimeType respjson.Field
SizeBytes respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileCompleteResponse) RawJSON ¶ added in v0.4.1
func (r FileCompleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileCompleteResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCompleteResponse) UnmarshalJSON(data []byte) error
type FileCompleteResponseStatus ¶ added in v0.4.1
type FileCompleteResponseStatus string
Current upload status of the file.
const ( FileCompleteResponseStatusPending FileCompleteResponseStatus = "PENDING" FileCompleteResponseStatusCompleted FileCompleteResponseStatus = "COMPLETED" FileCompleteResponseStatusCancelled FileCompleteResponseStatus = "CANCELLED" FileCompleteResponseStatusExpired FileCompleteResponseStatus = "EXPIRED" )
type FileCreateResponse ¶ added in v0.4.1
type FileCreateResponse struct {
// Unique identifier for the file.
ID string `json:"id" api:"required"`
// When the file upload was completed.
CompletedAt string `json:"completedAt" api:"required"`
// When the file upload session was created.
CreatedAt string `json:"createdAt" api:"required"`
// When the upload session expires. Null once completed, cancelled, or expired.
ExpiresAt string `json:"expiresAt" api:"required"`
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file.
MimeType string `json:"mimeType" api:"required"`
// File size in bytes.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Current upload status of the file.
//
// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
Status FileCreateResponseStatus `json:"status" api:"required"`
// Headers to include in the upload request.
UploadHeaders map[string]string `json:"uploadHeaders" api:"required"`
// Upload URL. Upload the file bytes directly to this URL.
UploadURL string `json:"uploadUrl" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Filename respjson.Field
MimeType respjson.Field
SizeBytes respjson.Field
Status respjson.Field
UploadHeaders respjson.Field
UploadURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileCreateResponse) RawJSON ¶ added in v0.4.1
func (r FileCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileCreateResponse) UnmarshalJSON(data []byte) error
type FileCreateResponseStatus ¶ added in v0.4.1
type FileCreateResponseStatus string
Current upload status of the file.
const ( FileCreateResponseStatusPending FileCreateResponseStatus = "PENDING" FileCreateResponseStatusCompleted FileCreateResponseStatus = "COMPLETED" FileCreateResponseStatusCancelled FileCreateResponseStatus = "CANCELLED" FileCreateResponseStatusExpired FileCreateResponseStatus = "EXPIRED" )
type FileListParams ¶ added in v0.4.1
type FileListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FileListParams) URLQuery ¶ added in v0.4.1
func (r FileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileListResponse ¶ added in v0.4.1
type FileListResponse struct {
// Array of file objects for the current page.
Data []FileListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of matching files.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileListResponse) RawJSON ¶ added in v0.4.1
func (r FileListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileListResponse) UnmarshalJSON(data []byte) error
type FileListResponseData ¶ added in v0.4.1
type FileListResponseData struct {
// Unique identifier for the file.
ID string `json:"id" api:"required"`
// When the file upload was completed.
CompletedAt string `json:"completedAt" api:"required"`
// When the file upload session was created.
CreatedAt string `json:"createdAt" api:"required"`
// When the upload session expires. Null once completed, cancelled, or expired.
ExpiresAt string `json:"expiresAt" api:"required"`
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file.
MimeType string `json:"mimeType" api:"required"`
// File size in bytes.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Current upload status of the file.
//
// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
Status string `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Filename respjson.Field
MimeType respjson.Field
SizeBytes respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileListResponseData) RawJSON ¶ added in v0.4.1
func (r FileListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *FileListResponseData) UnmarshalJSON(data []byte) error
type FileNewParams ¶ added in v0.4.1
type FileNewParams struct {
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file. Must be allowed for the given purpose (if specified).
MimeType string `json:"mimeType" api:"required"`
// Expected file size in bytes. Maximum 512 MB.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Optional validation hint. When provided, the server enforces purpose-specific
// MIME type and file size constraints. Use `meeting_transcript` for files that
// will be attached to a meeting as its transcript. Use `knowledge_user` or
// `knowledge_workspace` to add the file to the authenticated user's or workspace's
// Knowledge, making it available to the AI assistant. Not persisted or returned in
// responses.
//
// Any of "meeting_transcript", "knowledge_user", "knowledge_workspace".
Purpose FileNewParamsPurpose `json:"purpose,omitzero"`
// contains filtered or unexported fields
}
func (FileNewParams) MarshalJSON ¶ added in v0.4.1
func (r FileNewParams) MarshalJSON() (data []byte, err error)
func (*FileNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *FileNewParams) UnmarshalJSON(data []byte) error
type FileNewParamsPurpose ¶ added in v0.4.1
type FileNewParamsPurpose string
Optional validation hint. When provided, the server enforces purpose-specific MIME type and file size constraints. Use `meeting_transcript` for files that will be attached to a meeting as its transcript. Use `knowledge_user` or `knowledge_workspace` to add the file to the authenticated user's or workspace's Knowledge, making it available to the AI assistant. Not persisted or returned in responses.
const ( FileNewParamsPurposeMeetingTranscript FileNewParamsPurpose = "meeting_transcript" FileNewParamsPurposeKnowledgeUser FileNewParamsPurpose = "knowledge_user" FileNewParamsPurposeKnowledgeWorkspace FileNewParamsPurpose = "knowledge_workspace" )
type FileRetrieveResponse ¶ added in v0.4.1
type FileRetrieveResponse struct {
// Unique identifier for the file.
ID string `json:"id" api:"required"`
// When the file upload was completed.
CompletedAt string `json:"completedAt" api:"required"`
// When the file upload session was created.
CreatedAt string `json:"createdAt" api:"required"`
// When the upload session expires. Null once completed, cancelled, or expired.
ExpiresAt string `json:"expiresAt" api:"required"`
// Original filename.
Filename string `json:"filename" api:"required"`
// MIME type of the file.
MimeType string `json:"mimeType" api:"required"`
// File size in bytes.
SizeBytes int64 `json:"sizeBytes" api:"required"`
// Current upload status of the file.
//
// Any of "PENDING", "COMPLETED", "CANCELLED", "EXPIRED".
Status FileRetrieveResponseStatus `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Filename respjson.Field
MimeType respjson.Field
SizeBytes respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r FileRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileRetrieveResponse) UnmarshalJSON(data []byte) error
type FileRetrieveResponseStatus ¶ added in v0.4.1
type FileRetrieveResponseStatus string
Current upload status of the file.
const ( FileRetrieveResponseStatusPending FileRetrieveResponseStatus = "PENDING" FileRetrieveResponseStatusCompleted FileRetrieveResponseStatus = "COMPLETED" FileRetrieveResponseStatusCancelled FileRetrieveResponseStatus = "CANCELLED" FileRetrieveResponseStatusExpired FileRetrieveResponseStatus = "EXPIRED" )
type FileService ¶ added in v0.4.1
type FileService struct {
Options []option.RequestOption
}
Files are used to upload documents via presigned URLs. After uploading and completing a file, link it to resources through their own APIs (e.g. attach a transcript to a meeting). See <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow and supported purposes. For meeting transcript attachments, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
FileService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.
func NewFileService ¶ added in v0.4.1
func NewFileService(opts ...option.RequestOption) (r FileService)
NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileService) Cancel ¶ added in v0.4.1
func (r *FileService) Cancel(ctx context.Context, id string, body FileCancelParams, opts ...option.RequestOption) (res *FileCancelResponse, err error)
Cancels a pending upload by transitioning the file to `CANCELLED`. Only files in `PENDING` status can be cancelled. **[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*FileService) Complete ¶ added in v0.4.1
func (r *FileService) Complete(ctx context.Context, id string, body FileCompleteParams, opts ...option.RequestOption) (res *FileCompleteResponse, err error)
Finalizes an upload after the file bytes have been uploaded.
If an optional `md5` hex digest is provided, the server validates the checksum before marking the file as completed.
**[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*FileService) Get ¶ added in v0.4.1
func (r *FileService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *FileRetrieveResponse, err error)
Retrieves a single file by its ID.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*FileService) List ¶ added in v0.4.1
func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *FileListResponse, err error)
Returns a paginated list of files in your workspace. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*FileService) New ¶ added in v0.4.1
func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *FileCreateResponse, err error)
Creates a new file upload session and returns an upload URL.
After uploading the file bytes to `uploadUrl`, call `POST /v1/files/{id}/complete` to finalize the upload. Optionally pass `purpose` to validate MIME type and size constraints at creation time. See <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow, supported purposes, and size limits. If you are uploading a meeting transcript, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the follow-up meeting attachment flow.
**[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*FileService) URL ¶ added in v0.4.1
func (r *FileService) URL(ctx context.Context, id string, opts ...option.RequestOption) (res *FileURLResponse, err error)
Returns a temporary download URL for the file. Only available for files in `COMPLETED` status.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
type FileURLResponse ¶ added in v0.4.1
type FileURLResponse struct {
// When the download URL expires.
ExpiresAt string `json:"expiresAt" api:"required"`
// Temporary download URL for the file.
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExpiresAt respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FileURLResponse) RawJSON ¶ added in v0.4.1
func (r FileURLResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileURLResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *FileURLResponse) UnmarshalJSON(data []byte) error
type ListCreateResponse ¶ added in v0.4.1
type ListCreateResponse struct {
// Unique identifier for the list.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the list was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$objectType`).
Fields map[string]ListCreateResponseField `json:"fields" api:"required"`
// URL to view the list in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListCreateResponse) RawJSON ¶ added in v0.4.1
func (r ListCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListCreateResponse) UnmarshalJSON(data []byte) error
type ListCreateResponseField ¶ added in v0.4.1
type ListCreateResponseField struct {
// The field value, or null if unset.
Value ListCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListCreateResponseField) RawJSON ¶ added in v0.4.1
func (r ListCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListCreateResponseField) UnmarshalJSON(data []byte) error
type ListCreateResponseFieldValueAddress ¶ added in v0.4.1
type ListCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ListCreateResponseFieldValueFullName ¶ added in v0.4.1
type ListCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ListCreateResponseFieldValueUnion ¶ added in v0.4.1
type ListCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListCreateResponseFieldValueAddress, ListCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsAddress() (v ListCreateResponseFieldValueAddress)
func (ListCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsBool() (v bool)
func (ListCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsFloat() (v float64)
func (ListCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsFullName() (v ListCreateResponseFieldValueFullName)
func (ListCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsString() (v string)
func (ListCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (ListCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type ListListAccountsParams ¶ added in v0.4.1
type ListListAccountsParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ListListAccountsParams) URLQuery ¶ added in v0.4.1
func (r ListListAccountsParams) URLQuery() (v url.Values, err error)
URLQuery serializes ListListAccountsParams's query parameters as `url.Values`.
type ListListAccountsResponse ¶ added in v0.4.1
type ListListAccountsResponse struct {
// Array of entity objects for the current page.
Data []ListListAccountsResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponse) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponse) UnmarshalJSON(data []byte) error
type ListListAccountsResponseData ¶ added in v0.4.1
type ListListAccountsResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ListListAccountsResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ListListAccountsResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponseData) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseData) UnmarshalJSON(data []byte) error
type ListListAccountsResponseDataField ¶ added in v0.4.1
type ListListAccountsResponseDataField struct {
// The field value, or null if unset.
Value ListListAccountsResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponseDataField) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseDataField) UnmarshalJSON(data []byte) error
type ListListAccountsResponseDataFieldValueAddress ¶ added in v0.4.1
type ListListAccountsResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type ListListAccountsResponseDataFieldValueFullName ¶ added in v0.4.1
type ListListAccountsResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type ListListAccountsResponseDataFieldValueUnion ¶ added in v0.4.1
type ListListAccountsResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListListAccountsResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListListAccountsResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListListAccountsResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListListAccountsResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListAccountsResponseDataFieldValueAddress, ListListAccountsResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListListAccountsResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsAddress() (v ListListAccountsResponseDataFieldValueAddress)
func (ListListAccountsResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsBool() (v bool)
func (ListListAccountsResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsFloat() (v float64)
func (ListListAccountsResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsFullName() (v ListListAccountsResponseDataFieldValueFullName)
func (ListListAccountsResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsString() (v string)
func (ListListAccountsResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) AsStringArray() (v []string)
func (ListListAccountsResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListListAccountsResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type ListListAccountsResponseDataRelationship ¶ added in v0.4.1
type ListListAccountsResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListAccountsResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r ListListAccountsResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListAccountsResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListAccountsResponseDataRelationship) UnmarshalJSON(data []byte) error
type ListListContactsParams ¶ added in v0.4.1
type ListListContactsParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ListListContactsParams) URLQuery ¶ added in v0.4.1
func (r ListListContactsParams) URLQuery() (v url.Values, err error)
URLQuery serializes ListListContactsParams's query parameters as `url.Values`.
type ListListContactsResponse ¶ added in v0.4.1
type ListListContactsResponse struct {
// Array of entity objects for the current page.
Data []ListListContactsResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponse) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponse) UnmarshalJSON(data []byte) error
type ListListContactsResponseData ¶ added in v0.4.1
type ListListContactsResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ListListContactsResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ListListContactsResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponseData) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseData) UnmarshalJSON(data []byte) error
type ListListContactsResponseDataField ¶ added in v0.4.1
type ListListContactsResponseDataField struct {
// The field value, or null if unset.
Value ListListContactsResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponseDataField) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseDataField) UnmarshalJSON(data []byte) error
type ListListContactsResponseDataFieldValueAddress ¶ added in v0.4.1
type ListListContactsResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type ListListContactsResponseDataFieldValueFullName ¶ added in v0.4.1
type ListListContactsResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type ListListContactsResponseDataFieldValueUnion ¶ added in v0.4.1
type ListListContactsResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListListContactsResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListListContactsResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListListContactsResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListListContactsResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListContactsResponseDataFieldValueAddress, ListListContactsResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListListContactsResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsAddress() (v ListListContactsResponseDataFieldValueAddress)
func (ListListContactsResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsBool() (v bool)
func (ListListContactsResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsFloat() (v float64)
func (ListListContactsResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsFullName() (v ListListContactsResponseDataFieldValueFullName)
func (ListListContactsResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsString() (v string)
func (ListListContactsResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) AsStringArray() (v []string)
func (ListListContactsResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListListContactsResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type ListListContactsResponseDataRelationship ¶ added in v0.4.1
type ListListContactsResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListContactsResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r ListListContactsResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListContactsResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListContactsResponseDataRelationship) UnmarshalJSON(data []byte) error
type ListListOpportunitiesParams ¶ added in v0.4.1
type ListListOpportunitiesParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ListListOpportunitiesParams) URLQuery ¶ added in v0.4.1
func (r ListListOpportunitiesParams) URLQuery() (v url.Values, err error)
URLQuery serializes ListListOpportunitiesParams's query parameters as `url.Values`.
type ListListOpportunitiesResponse ¶ added in v0.4.1
type ListListOpportunitiesResponse struct {
// Array of entity objects for the current page.
Data []ListListOpportunitiesResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponse) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponse) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseData ¶ added in v0.4.1
type ListListOpportunitiesResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]ListListOpportunitiesResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]ListListOpportunitiesResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponseData) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseData) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseDataField ¶ added in v0.4.1
type ListListOpportunitiesResponseDataField struct {
// The field value, or null if unset.
Value ListListOpportunitiesResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponseDataField) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseDataField) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseDataFieldValueAddress ¶ added in v0.4.1
type ListListOpportunitiesResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseDataFieldValueFullName ¶ added in v0.4.1
type ListListOpportunitiesResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseDataFieldValueUnion ¶ added in v0.4.1
type ListListOpportunitiesResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListListOpportunitiesResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant
// [ListListOpportunitiesResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant
// [ListListOpportunitiesResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListListOpportunitiesResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListOpportunitiesResponseDataFieldValueAddress, ListListOpportunitiesResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListListOpportunitiesResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsAddress() (v ListListOpportunitiesResponseDataFieldValueAddress)
func (ListListOpportunitiesResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsBool() (v bool)
func (ListListOpportunitiesResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsFloat() (v float64)
func (ListListOpportunitiesResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsFullName() (v ListListOpportunitiesResponseDataFieldValueFullName)
func (ListListOpportunitiesResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsString() (v string)
func (ListListOpportunitiesResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) AsStringArray() (v []string)
func (ListListOpportunitiesResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListListOpportunitiesResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type ListListOpportunitiesResponseDataRelationship ¶ added in v0.4.1
type ListListOpportunitiesResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListOpportunitiesResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r ListListOpportunitiesResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListOpportunitiesResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListOpportunitiesResponseDataRelationship) UnmarshalJSON(data []byte) error
type ListListParams ¶ added in v0.4.1
type ListListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ListListParams) URLQuery ¶ added in v0.4.1
func (r ListListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ListListParams's query parameters as `url.Values`.
type ListListResponse ¶ added in v0.4.1
type ListListResponse struct {
// Array of list objects for the current page.
Data []ListListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of lists matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponse) RawJSON ¶ added in v0.4.1
func (r ListListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponse) UnmarshalJSON(data []byte) error
type ListListResponseData ¶ added in v0.4.1
type ListListResponseData struct {
// Unique identifier for the list.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the list was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$objectType`).
Fields map[string]ListListResponseDataField `json:"fields" api:"required"`
// URL to view the list in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponseData) RawJSON ¶ added in v0.4.1
func (r ListListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponseData) UnmarshalJSON(data []byte) error
type ListListResponseDataField ¶ added in v0.4.1
type ListListResponseDataField struct {
// The field value, or null if unset.
Value ListListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponseDataField) RawJSON ¶ added in v0.4.1
func (r ListListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponseDataField) UnmarshalJSON(data []byte) error
type ListListResponseDataFieldValueAddress ¶ added in v0.4.1
type ListListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type ListListResponseDataFieldValueFullName ¶ added in v0.4.1
type ListListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type ListListResponseDataFieldValueUnion ¶ added in v0.4.1
type ListListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListListResponseDataFieldValueAddress, ListListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsAddress() (v ListListResponseDataFieldValueAddress)
func (ListListResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsBool() (v bool)
func (ListListResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsFloat() (v float64)
func (ListListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsFullName() (v ListListResponseDataFieldValueFullName)
func (ListListResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsString() (v string)
func (ListListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (ListListResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type ListNewParams ¶ added in v0.4.1
type ListNewParams struct {
// Field values for the new list. Required: `$name` (string) and `$objectType`.
Fields ListNewParamsFields `json:"fields,omitzero" api:"required"`
// Relationships to set on the new list.
Relationships ListNewParamsRelationshipsUnion `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (ListNewParams) MarshalJSON ¶ added in v0.4.1
func (r ListNewParams) MarshalJSON() (data []byte, err error)
func (*ListNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *ListNewParams) UnmarshalJSON(data []byte) error
type ListNewParamsFields ¶ added in v0.4.1
type ListNewParamsFields struct {
// Display name of the list.
Name string `json:"$name" api:"required"`
// The type of entities this list contains. One of `account`, `contact`, or
// `opportunity`.
//
// Any of "account", "contact", "opportunity".
ObjectType string `json:"$objectType,omitzero" api:"required"`
// contains filtered or unexported fields
}
Field values for the new list. Required: `$name` (string) and `$objectType`.
The properties Name, ObjectType are required.
func (ListNewParamsFields) MarshalJSON ¶ added in v0.4.1
func (r ListNewParamsFields) MarshalJSON() (data []byte, err error)
func (*ListNewParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *ListNewParamsFields) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsAccounts ¶ added in v0.4.1
type ListNewParamsRelationshipsAccounts struct {
// Account ID(s) to add as initial members. List `$objectType` must be `account`.
Accounts ListNewParamsRelationshipsAccountsAccountsUnion `json:"$accounts,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Accounts is required.
func (ListNewParamsRelationshipsAccounts) MarshalJSON ¶ added in v0.4.1
func (r ListNewParamsRelationshipsAccounts) MarshalJSON() (data []byte, err error)
func (*ListNewParamsRelationshipsAccounts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListNewParamsRelationshipsAccounts) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsAccountsAccountsUnion ¶ added in v0.4.1
type ListNewParamsRelationshipsAccountsAccountsUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListNewParamsRelationshipsAccountsAccountsUnion) MarshalJSON ¶ added in v0.4.1
func (u ListNewParamsRelationshipsAccountsAccountsUnion) MarshalJSON() ([]byte, error)
func (*ListNewParamsRelationshipsAccountsAccountsUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListNewParamsRelationshipsAccountsAccountsUnion) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsContacts ¶ added in v0.4.1
type ListNewParamsRelationshipsContacts struct {
// Contact ID(s) to add as initial members. List `$objectType` must be `contact`.
Contacts ListNewParamsRelationshipsContactsContactsUnion `json:"$contacts,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Contacts is required.
func (ListNewParamsRelationshipsContacts) MarshalJSON ¶ added in v0.4.1
func (r ListNewParamsRelationshipsContacts) MarshalJSON() (data []byte, err error)
func (*ListNewParamsRelationshipsContacts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListNewParamsRelationshipsContacts) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsContactsContactsUnion ¶ added in v0.4.1
type ListNewParamsRelationshipsContactsContactsUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListNewParamsRelationshipsContactsContactsUnion) MarshalJSON ¶ added in v0.4.1
func (u ListNewParamsRelationshipsContactsContactsUnion) MarshalJSON() ([]byte, error)
func (*ListNewParamsRelationshipsContactsContactsUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListNewParamsRelationshipsContactsContactsUnion) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsOpportunities ¶ added in v0.4.1
type ListNewParamsRelationshipsOpportunities struct {
// Opportunity ID(s) to add as initial members. List `$objectType` must be
// `opportunity`.
Opportunities ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion `json:"$opportunities,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Opportunities is required.
func (ListNewParamsRelationshipsOpportunities) MarshalJSON ¶ added in v0.4.1
func (r ListNewParamsRelationshipsOpportunities) MarshalJSON() (data []byte, err error)
func (*ListNewParamsRelationshipsOpportunities) UnmarshalJSON ¶ added in v0.4.1
func (r *ListNewParamsRelationshipsOpportunities) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion ¶ added in v0.4.1
type ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) MarshalJSON ¶ added in v0.4.1
func (u ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) MarshalJSON() ([]byte, error)
func (*ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListNewParamsRelationshipsOpportunitiesOpportunitiesUnion) UnmarshalJSON(data []byte) error
type ListNewParamsRelationshipsUnion ¶ added in v0.4.1
type ListNewParamsRelationshipsUnion struct {
OfListNewsRelationshipsAccounts *ListNewParamsRelationshipsAccounts `json:",omitzero,inline"`
OfListNewsRelationshipsContacts *ListNewParamsRelationshipsContacts `json:",omitzero,inline"`
OfListNewsRelationshipsOpportunities *ListNewParamsRelationshipsOpportunities `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListNewParamsRelationshipsUnion) MarshalJSON ¶ added in v0.4.1
func (u ListNewParamsRelationshipsUnion) MarshalJSON() ([]byte, error)
func (*ListNewParamsRelationshipsUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListNewParamsRelationshipsUnion) UnmarshalJSON(data []byte) error
type ListRetrieveResponse ¶ added in v0.4.1
type ListRetrieveResponse struct {
// Unique identifier for the list.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the list was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$objectType`).
Fields map[string]ListRetrieveResponseField `json:"fields" api:"required"`
// URL to view the list in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r ListRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListRetrieveResponse) UnmarshalJSON(data []byte) error
type ListRetrieveResponseField ¶ added in v0.4.1
type ListRetrieveResponseField struct {
// The field value, or null if unset.
Value ListRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r ListRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListRetrieveResponseField) UnmarshalJSON(data []byte) error
type ListRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type ListRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ListRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type ListRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ListRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type ListRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListRetrieveResponseFieldValueAddress, ListRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsAddress() (v ListRetrieveResponseFieldValueAddress)
func (ListRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (ListRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (ListRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsFullName() (v ListRetrieveResponseFieldValueFullName)
func (ListRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsString() (v string)
func (ListRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (ListRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type ListService ¶ added in v0.4.1
type ListService struct {
Options []option.RequestOption
}
Lists are curated collections of accounts, contacts, or opportunities in Lightfield. Each list contains entities of a single type.
ListService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewListService method instead.
func NewListService ¶ added in v0.4.1
func NewListService(opts ...option.RequestOption) (r ListService)
NewListService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ListService) Get ¶ added in v0.4.1
func (r *ListService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ListRetrieveResponse, err error)
Retrieves a single list by its ID.
**[Required scope](/using-the-api/scopes/):** `lists:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*ListService) List ¶ added in v0.4.1
func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *ListListResponse, err error)
Returns a paginated list of lists. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `lists:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*ListService) ListAccounts ¶ added in v0.4.1
func (r *ListService) ListAccounts(ctx context.Context, listID string, query ListListAccountsParams, opts ...option.RequestOption) (res *ListListAccountsResponse, err error)
Returns a paginated list of accounts that belong to the specified list.
**[Required scopes](/using-the-api/scopes/):** `lists:read` and `accounts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*ListService) ListContacts ¶ added in v0.4.1
func (r *ListService) ListContacts(ctx context.Context, listID string, query ListListContactsParams, opts ...option.RequestOption) (res *ListListContactsResponse, err error)
Returns a paginated list of contacts that belong to the specified list.
**[Required scopes](/using-the-api/scopes/):** `lists:read` and `contacts:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*ListService) ListOpportunities ¶ added in v0.4.1
func (r *ListService) ListOpportunities(ctx context.Context, listID string, query ListListOpportunitiesParams, opts ...option.RequestOption) (res *ListListOpportunitiesResponse, err error)
Returns a paginated list of opportunities that belong to the specified list.
**[Required scopes](/using-the-api/scopes/):** `lists:read` and `opportunities:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*ListService) New ¶ added in v0.4.1
func (r *ListService) New(ctx context.Context, body ListNewParams, opts ...option.RequestOption) (res *ListCreateResponse, err error)
Creates a new list. The `$name` and `$objectType` fields are required.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `lists:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*ListService) Update ¶ added in v0.4.1
func (r *ListService) Update(ctx context.Context, id string, body ListUpdateParams, opts ...option.RequestOption) (res *ListUpdateResponse, err error)
Updates an existing list by ID. Only included fields are modified.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `lists:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type ListUpdateParams ¶ added in v0.4.1
type ListUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged.
Fields ListUpdateParamsFields `json:"fields,omitzero"`
// Relationship operations. Use the key matching the list's `$objectType` (e.g.
// `$accounts` for an account list).
Relationships ListUpdateParamsRelationshipsUnion `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (ListUpdateParams) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParams) MarshalJSON() (data []byte, err error)
func (*ListUpdateParams) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParams) UnmarshalJSON(data []byte) error
type ListUpdateParamsFields ¶ added in v0.4.1
type ListUpdateParamsFields struct {
// Display name of the list.
Name param.Opt[string] `json:"$name,omitzero"`
// contains filtered or unexported fields
}
Field values to update — only provided fields are modified; omitted fields are left unchanged.
func (ListUpdateParamsFields) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsFields) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsFields) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsAccounts ¶ added in v0.4.1
type ListUpdateParamsRelationshipsAccounts struct {
// Add/remove accounts. List `$objectType` must be `account`.
Accounts ListUpdateParamsRelationshipsAccountsAccounts `json:"$accounts,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Accounts is required.
func (ListUpdateParamsRelationshipsAccounts) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsAccounts) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsAccounts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsAccounts) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsAccountsAccounts ¶ added in v0.4.1
type ListUpdateParamsRelationshipsAccountsAccounts struct {
// Entity ID(s) to add to the list.
Add ListUpdateParamsRelationshipsAccountsAccountsAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the list.
Remove ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion `json:"remove,omitzero"`
// contains filtered or unexported fields
}
Add/remove accounts. List `$objectType` must be `account`.
func (ListUpdateParamsRelationshipsAccountsAccounts) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsAccountsAccounts) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsAccountsAccounts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsAccountsAccounts) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsAccountsAccountsAddUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsAccountsAccountsAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsAccountsAccountsAddUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsAccountsAccountsAddUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsAccountsAccountsAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsAccountsAccountsAddUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsAccountsAccountsRemoveUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsContacts ¶ added in v0.4.1
type ListUpdateParamsRelationshipsContacts struct {
// Add/remove contacts. List `$objectType` must be `contact`.
Contacts ListUpdateParamsRelationshipsContactsContacts `json:"$contacts,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Contacts is required.
func (ListUpdateParamsRelationshipsContacts) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsContacts) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsContacts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsContacts) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsContactsContacts ¶ added in v0.4.1
type ListUpdateParamsRelationshipsContactsContacts struct {
// Entity ID(s) to add to the list.
Add ListUpdateParamsRelationshipsContactsContactsAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the list.
Remove ListUpdateParamsRelationshipsContactsContactsRemoveUnion `json:"remove,omitzero"`
// contains filtered or unexported fields
}
Add/remove contacts. List `$objectType` must be `contact`.
func (ListUpdateParamsRelationshipsContactsContacts) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsContactsContacts) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsContactsContacts) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsContactsContacts) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsContactsContactsAddUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsContactsContactsAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsContactsContactsAddUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsContactsContactsAddUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsContactsContactsAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsContactsContactsAddUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsContactsContactsRemoveUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsContactsContactsRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsContactsContactsRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsContactsContactsRemoveUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsContactsContactsRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsContactsContactsRemoveUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsOpportunities ¶ added in v0.4.1
type ListUpdateParamsRelationshipsOpportunities struct {
// Add/remove opportunities. List `$objectType` must be `opportunity`.
Opportunities ListUpdateParamsRelationshipsOpportunitiesOpportunities `json:"$opportunities,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Opportunities is required.
func (ListUpdateParamsRelationshipsOpportunities) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsOpportunities) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsOpportunities) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsOpportunities) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsOpportunitiesOpportunities ¶ added in v0.4.1
type ListUpdateParamsRelationshipsOpportunitiesOpportunities struct {
// Entity ID(s) to add to the list.
Add ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the list.
Remove ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion `json:"remove,omitzero"`
// contains filtered or unexported fields
}
Add/remove opportunities. List `$objectType` must be `opportunity`.
func (ListUpdateParamsRelationshipsOpportunitiesOpportunities) MarshalJSON ¶ added in v0.4.1
func (r ListUpdateParamsRelationshipsOpportunitiesOpportunities) MarshalJSON() (data []byte, err error)
func (*ListUpdateParamsRelationshipsOpportunitiesOpportunities) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateParamsRelationshipsOpportunitiesOpportunities) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsOpportunitiesOpportunitiesAddUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsOpportunitiesOpportunitiesRemoveUnion) UnmarshalJSON(data []byte) error
type ListUpdateParamsRelationshipsUnion ¶ added in v0.4.1
type ListUpdateParamsRelationshipsUnion struct {
OfListUpdatesRelationshipsAccounts *ListUpdateParamsRelationshipsAccounts `json:",omitzero,inline"`
OfListUpdatesRelationshipsContacts *ListUpdateParamsRelationshipsContacts `json:",omitzero,inline"`
OfListUpdatesRelationshipsOpportunities *ListUpdateParamsRelationshipsOpportunities `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ListUpdateParamsRelationshipsUnion) MarshalJSON ¶ added in v0.4.1
func (u ListUpdateParamsRelationshipsUnion) MarshalJSON() ([]byte, error)
func (*ListUpdateParamsRelationshipsUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *ListUpdateParamsRelationshipsUnion) UnmarshalJSON(data []byte) error
type ListUpdateResponse ¶ added in v0.4.1
type ListUpdateResponse struct {
// Unique identifier for the list.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the list was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$objectType`).
Fields map[string]ListUpdateResponseField `json:"fields" api:"required"`
// URL to view the list in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListUpdateResponse) RawJSON ¶ added in v0.4.1
func (r ListUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUpdateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateResponse) UnmarshalJSON(data []byte) error
type ListUpdateResponseField ¶ added in v0.4.1
type ListUpdateResponseField struct {
// The field value, or null if unset.
Value ListUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListUpdateResponseField) RawJSON ¶ added in v0.4.1
func (r ListUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUpdateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateResponseField) UnmarshalJSON(data []byte) error
type ListUpdateResponseFieldValueAddress ¶ added in v0.4.1
type ListUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r ListUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type ListUpdateResponseFieldValueFullName ¶ added in v0.4.1
type ListUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r ListUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type ListUpdateResponseFieldValueUnion ¶ added in v0.4.1
type ListUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [ListUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [ListUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [ListUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ListUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], ListUpdateResponseFieldValueAddress, ListUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (ListUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsAddress() (v ListUpdateResponseFieldValueAddress)
func (ListUpdateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsBool() (v bool)
func (ListUpdateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (ListUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsFullName() (v ListUpdateResponseFieldValueFullName)
func (ListUpdateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsString() (v string)
func (ListUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (ListUpdateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u ListUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUpdateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *ListUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type MeetingCreateResponse ¶ added in v0.4.1
type MeetingCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// The caller's resolved access level for this meeting.
//
// Any of "FULL", "METADATA".
AccessLevel MeetingCreateResponseAccessLevel `json:"accessLevel" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]MeetingCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Always `meeting`.
//
// Any of "meeting".
ObjectType MeetingCreateResponseObjectType `json:"objectType" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]MeetingCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ObjectType respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingCreateResponse) RawJSON ¶ added in v0.4.1
func (r MeetingCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponse) UnmarshalJSON(data []byte) error
type MeetingCreateResponseAccessLevel ¶ added in v0.4.1
type MeetingCreateResponseAccessLevel string
The caller's resolved access level for this meeting.
const ( MeetingCreateResponseAccessLevelFull MeetingCreateResponseAccessLevel = "FULL" MeetingCreateResponseAccessLevelMetadata MeetingCreateResponseAccessLevel = "METADATA" )
type MeetingCreateResponseField ¶ added in v0.4.1
type MeetingCreateResponseField struct {
// The field value, or null if unset.
Value MeetingCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingCreateResponseField) RawJSON ¶ added in v0.4.1
func (r MeetingCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponseField) UnmarshalJSON(data []byte) error
type MeetingCreateResponseFieldValueAddress ¶ added in v0.4.1
type MeetingCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r MeetingCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type MeetingCreateResponseFieldValueFullName ¶ added in v0.4.1
type MeetingCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r MeetingCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type MeetingCreateResponseFieldValueUnion ¶ added in v0.4.1
type MeetingCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [MeetingCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [MeetingCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [MeetingCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MeetingCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingCreateResponseFieldValueAddress, MeetingCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (MeetingCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsAddress() (v MeetingCreateResponseFieldValueAddress)
func (MeetingCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsBool() (v bool)
func (MeetingCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsFloat() (v float64)
func (MeetingCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsFullName() (v MeetingCreateResponseFieldValueFullName)
func (MeetingCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsString() (v string)
func (MeetingCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (MeetingCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u MeetingCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type MeetingCreateResponseObjectType ¶ added in v0.4.1
type MeetingCreateResponseObjectType string
Always `meeting`.
const (
MeetingCreateResponseObjectTypeMeeting MeetingCreateResponseObjectType = "meeting"
)
type MeetingCreateResponseRelationship ¶ added in v0.4.1
type MeetingCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r MeetingCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingCreateResponseRelationship) UnmarshalJSON(data []byte) error
type MeetingListParams ¶ added in v0.4.1
type MeetingListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MeetingListParams) URLQuery ¶ added in v0.4.1
func (r MeetingListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MeetingListParams's query parameters as `url.Values`.
type MeetingListResponse ¶ added in v0.4.1
type MeetingListResponse struct {
// Array of meeting objects for the current page.
Data []MeetingListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponse) RawJSON ¶ added in v0.4.1
func (r MeetingListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponse) UnmarshalJSON(data []byte) error
type MeetingListResponseData ¶ added in v0.4.1
type MeetingListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// The caller's resolved access level for this meeting.
//
// Any of "FULL", "METADATA".
AccessLevel string `json:"accessLevel" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]MeetingListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Always `meeting`.
//
// Any of "meeting".
ObjectType string `json:"objectType" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]MeetingListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ObjectType respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponseData) RawJSON ¶ added in v0.4.1
func (r MeetingListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseData) UnmarshalJSON(data []byte) error
type MeetingListResponseDataField ¶ added in v0.4.1
type MeetingListResponseDataField struct {
// The field value, or null if unset.
Value MeetingListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponseDataField) RawJSON ¶ added in v0.4.1
func (r MeetingListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseDataField) UnmarshalJSON(data []byte) error
type MeetingListResponseDataFieldValueAddress ¶ added in v0.4.1
type MeetingListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r MeetingListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type MeetingListResponseDataFieldValueFullName ¶ added in v0.4.1
type MeetingListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r MeetingListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type MeetingListResponseDataFieldValueUnion ¶ added in v0.4.1
type MeetingListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [MeetingListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [MeetingListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [MeetingListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MeetingListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingListResponseDataFieldValueAddress, MeetingListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (MeetingListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsAddress() (v MeetingListResponseDataFieldValueAddress)
func (MeetingListResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsBool() (v bool)
func (MeetingListResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsFloat() (v float64)
func (MeetingListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsFullName() (v MeetingListResponseDataFieldValueFullName)
func (MeetingListResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsString() (v string)
func (MeetingListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (MeetingListResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u MeetingListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type MeetingListResponseDataRelationship ¶ added in v0.4.1
type MeetingListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingListResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r MeetingListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingListResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingListResponseDataRelationship) UnmarshalJSON(data []byte) error
type MeetingNewParams ¶ added in v0.4.1
type MeetingNewParams struct {
// Field values for the new MANUAL meeting. System fields use a `$` prefix (for
// example `$title`, `$startDate`, `$endDate`). Required: `$title`, `$startDate`,
// and `$endDate`. `$organizerEmail` accepts a single email address when provided;
// `$attendeeEmails` accepts an array of email addresses. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields MeetingNewParamsFields `json:"fields,omitzero" api:"required"`
// When true, the initial post-create meeting sync may auto-create account and
// contact records for external attendees.
AutoCreateRecords param.Opt[bool] `json:"autoCreateRecords,omitzero"`
// Relationships to set on the new meeting. Only `$transcript` is writable on
// create; all other meeting relationships are system-managed.
Relationships MeetingNewParamsRelationships `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (MeetingNewParams) MarshalJSON ¶ added in v0.4.1
func (r MeetingNewParams) MarshalJSON() (data []byte, err error)
func (*MeetingNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingNewParams) UnmarshalJSON(data []byte) error
type MeetingNewParamsFields ¶ added in v0.4.1
type MeetingNewParamsFields struct {
// The end time of the meeting in ISO 8601 format. Must be in the past.
EndDate string `json:"$endDate" api:"required"`
// The start time of the meeting in ISO 8601 format. Must be in the past.
StartDate string `json:"$startDate" api:"required"`
// The title of the meeting.
Title string `json:"$title" api:"required"`
// A description of the meeting.
Description param.Opt[string] `json:"$description,omitzero"`
// The URL for the meeting.
MeetingURL param.Opt[string] `json:"$meetingUrl,omitzero"`
// The email address of the meeting organizer. This field accepts a single email
// address.
OrganizerEmail param.Opt[string] `json:"$organizerEmail,omitzero"`
// The privacy setting for the meeting (`FULL` or `METADATA`).
//
// Any of "FULL", "METADATA".
PrivacySetting string `json:"$privacySetting,omitzero"`
// A list of attendee email addresses.
AttendeeEmails []string `json:"$attendeeEmails,omitzero"`
// contains filtered or unexported fields
}
Field values for the new MANUAL meeting. System fields use a `$` prefix (for example `$title`, `$startDate`, `$endDate`). Required: `$title`, `$startDate`, and `$endDate`. `$organizerEmail` accepts a single email address when provided; `$attendeeEmails` accepts an array of email addresses. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.
The properties EndDate, StartDate, Title are required.
func (MeetingNewParamsFields) MarshalJSON ¶ added in v0.4.1
func (r MeetingNewParamsFields) MarshalJSON() (data []byte, err error)
func (*MeetingNewParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingNewParamsFields) UnmarshalJSON(data []byte) error
type MeetingNewParamsRelationships ¶ added in v0.4.1
type MeetingNewParamsRelationships struct {
// The ID of the file to attach as the meeting transcript when creating the
// meeting. Only one transcript can be attached to a meeting.
Transcript MeetingNewParamsRelationshipsTranscriptUnion `json:"$transcript,omitzero" api:"required"`
// contains filtered or unexported fields
}
Relationships to set on the new meeting. Only `$transcript` is writable on create; all other meeting relationships are system-managed.
The property Transcript is required.
func (MeetingNewParamsRelationships) MarshalJSON ¶ added in v0.4.1
func (r MeetingNewParamsRelationships) MarshalJSON() (data []byte, err error)
func (*MeetingNewParamsRelationships) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingNewParamsRelationships) UnmarshalJSON(data []byte) error
type MeetingNewParamsRelationshipsTranscriptUnion ¶ added in v0.4.1
type MeetingNewParamsRelationshipsTranscriptUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (MeetingNewParamsRelationshipsTranscriptUnion) MarshalJSON ¶ added in v0.4.1
func (u MeetingNewParamsRelationshipsTranscriptUnion) MarshalJSON() ([]byte, error)
func (*MeetingNewParamsRelationshipsTranscriptUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *MeetingNewParamsRelationshipsTranscriptUnion) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponse ¶ added in v0.4.1
type MeetingRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// The caller's resolved access level for this meeting.
//
// Any of "FULL", "METADATA".
AccessLevel MeetingRetrieveResponseAccessLevel `json:"accessLevel" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]MeetingRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Always `meeting`.
//
// Any of "meeting".
ObjectType MeetingRetrieveResponseObjectType `json:"objectType" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]MeetingRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ObjectType respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r MeetingRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponse) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponseAccessLevel ¶ added in v0.4.1
type MeetingRetrieveResponseAccessLevel string
The caller's resolved access level for this meeting.
const ( MeetingRetrieveResponseAccessLevelFull MeetingRetrieveResponseAccessLevel = "FULL" MeetingRetrieveResponseAccessLevelMetadata MeetingRetrieveResponseAccessLevel = "METADATA" )
type MeetingRetrieveResponseField ¶ added in v0.4.1
type MeetingRetrieveResponseField struct {
// The field value, or null if unset.
Value MeetingRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r MeetingRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponseField) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type MeetingRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r MeetingRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type MeetingRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r MeetingRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type MeetingRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [MeetingRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [MeetingRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [MeetingRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MeetingRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingRetrieveResponseFieldValueAddress, MeetingRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (MeetingRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsAddress() (v MeetingRetrieveResponseFieldValueAddress)
func (MeetingRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (MeetingRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (MeetingRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsFullName() (v MeetingRetrieveResponseFieldValueFullName)
func (MeetingRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsString() (v string)
func (MeetingRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (MeetingRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u MeetingRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type MeetingRetrieveResponseObjectType ¶ added in v0.4.1
type MeetingRetrieveResponseObjectType string
Always `meeting`.
const (
MeetingRetrieveResponseObjectTypeMeeting MeetingRetrieveResponseObjectType = "meeting"
)
type MeetingRetrieveResponseRelationship ¶ added in v0.4.1
type MeetingRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r MeetingRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type MeetingService ¶ added in v0.4.1
type MeetingService struct {
Options []option.RequestOption
}
Meetings represent synced or manually created interactions in Lightfield. Read responses are privacy-aware and may be redacted based on the caller. For transcript uploads and attachment flows, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u>.
MeetingService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeetingService method instead.
func NewMeetingService ¶ added in v0.4.1
func NewMeetingService(opts ...option.RequestOption) (r MeetingService)
NewMeetingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MeetingService) Get ¶ added in v0.4.1
func (r *MeetingService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MeetingRetrieveResponse, err error)
Retrieves a single meeting by its ID. Meeting fields and transcript visibility are redacted based on the caller-specific privacy resolution, and the response includes a read-only `accessLevel`.
**[Required scope](/using-the-api/scopes/):** `meetings:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*MeetingService) List ¶ added in v0.4.1
func (r *MeetingService) List(ctx context.Context, query MeetingListParams, opts ...option.RequestOption) (res *MeetingListResponse, err error)
Returns a paginated list of meetings. Use `offset` and `limit` to paginate through results. Each meeting is privacy-filtered per caller, includes a read-only `accessLevel`, and may redact transcript or content fields based on the caller-specific privacy resolution. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `meetings:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*MeetingService) New ¶ added in v0.4.1
func (r *MeetingService) New(ctx context.Context, body MeetingNewParams, opts ...option.RequestOption) (res *MeetingCreateResponse, err error)
Creates a new meeting record. This endpoint only supports creation of meetings in the past. The `$title`, `$startDate`, and `$endDate` fields are required. Only the `$transcript` relationship is writable on create; all other meeting relationships are system-managed. The response is privacy-aware and includes a read-only `accessLevel`. See <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the full file upload and transcript attachment flow.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `meetings:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*MeetingService) Update ¶ added in v0.4.1
func (r *MeetingService) Update(ctx context.Context, id string, body MeetingUpdateParams, opts ...option.RequestOption) (res *MeetingUpdateResponse, err error)
Updates an existing meeting by ID. Only included fields and relationships are modified.
Only `fields.$privacySetting` and `relationships.$transcript.replace` are writable. Use `$transcript.replace` to set the meeting transcript. Clearing or removing `$transcript` is not supported. The response is privacy-aware and includes a read-only `accessLevel`. See <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the full file upload and transcript attachment flow.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `meetings:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type MeetingUpdateParams ¶ added in v0.4.1
type MeetingUpdateParams struct {
// Field values to update. Only `$privacySetting` is writable, and omitted fields
// are left unchanged.
Fields MeetingUpdateParamsFields `json:"fields,omitzero"`
// Relationship operations to apply. Only `$transcript.replace` is supported;
// removing or clearing `$transcript` is not supported.
Relationships MeetingUpdateParamsRelationships `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (MeetingUpdateParams) MarshalJSON ¶ added in v0.4.1
func (r MeetingUpdateParams) MarshalJSON() (data []byte, err error)
func (*MeetingUpdateParams) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateParams) UnmarshalJSON(data []byte) error
type MeetingUpdateParamsFields ¶ added in v0.4.1
type MeetingUpdateParamsFields struct {
// The privacy setting for the meeting.
//
// Any of "FULL", "METADATA".
PrivacySetting string `json:"$privacySetting,omitzero" api:"required"`
// contains filtered or unexported fields
}
Field values to update. Only `$privacySetting` is writable, and omitted fields are left unchanged.
The property PrivacySetting is required.
func (MeetingUpdateParamsFields) MarshalJSON ¶ added in v0.4.1
func (r MeetingUpdateParamsFields) MarshalJSON() (data []byte, err error)
func (*MeetingUpdateParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateParamsFields) UnmarshalJSON(data []byte) error
type MeetingUpdateParamsRelationships ¶ added in v0.4.1
type MeetingUpdateParamsRelationships struct {
Transcript MeetingUpdateParamsRelationshipsTranscript `json:"$transcript,omitzero" api:"required"`
// contains filtered or unexported fields
}
Relationship operations to apply. Only `$transcript.replace` is supported; removing or clearing `$transcript` is not supported.
The property Transcript is required.
func (MeetingUpdateParamsRelationships) MarshalJSON ¶ added in v0.4.1
func (r MeetingUpdateParamsRelationships) MarshalJSON() (data []byte, err error)
func (*MeetingUpdateParamsRelationships) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateParamsRelationships) UnmarshalJSON(data []byte) error
type MeetingUpdateParamsRelationshipsTranscript ¶ added in v0.4.1
type MeetingUpdateParamsRelationshipsTranscript struct {
// The file ID to set as the meeting transcript.
Replace string `json:"replace" api:"required"`
// contains filtered or unexported fields
}
The property Replace is required.
func (MeetingUpdateParamsRelationshipsTranscript) MarshalJSON ¶ added in v0.4.1
func (r MeetingUpdateParamsRelationshipsTranscript) MarshalJSON() (data []byte, err error)
func (*MeetingUpdateParamsRelationshipsTranscript) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateParamsRelationshipsTranscript) UnmarshalJSON(data []byte) error
type MeetingUpdateResponse ¶ added in v0.4.1
type MeetingUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// The caller's resolved access level for this meeting.
//
// Any of "FULL", "METADATA".
AccessLevel MeetingUpdateResponseAccessLevel `json:"accessLevel" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]MeetingUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Always `meeting`.
//
// Any of "meeting".
ObjectType MeetingUpdateResponseObjectType `json:"objectType" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]MeetingUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccessLevel respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
ObjectType respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingUpdateResponse) RawJSON ¶ added in v0.4.1
func (r MeetingUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponse) UnmarshalJSON(data []byte) error
type MeetingUpdateResponseAccessLevel ¶ added in v0.4.1
type MeetingUpdateResponseAccessLevel string
The caller's resolved access level for this meeting.
const ( MeetingUpdateResponseAccessLevelFull MeetingUpdateResponseAccessLevel = "FULL" MeetingUpdateResponseAccessLevelMetadata MeetingUpdateResponseAccessLevel = "METADATA" )
type MeetingUpdateResponseField ¶ added in v0.4.1
type MeetingUpdateResponseField struct {
// The field value, or null if unset.
Value MeetingUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingUpdateResponseField) RawJSON ¶ added in v0.4.1
func (r MeetingUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponseField) UnmarshalJSON(data []byte) error
type MeetingUpdateResponseFieldValueAddress ¶ added in v0.4.1
type MeetingUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r MeetingUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type MeetingUpdateResponseFieldValueFullName ¶ added in v0.4.1
type MeetingUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r MeetingUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type MeetingUpdateResponseFieldValueUnion ¶ added in v0.4.1
type MeetingUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [MeetingUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [MeetingUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [MeetingUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
MeetingUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], MeetingUpdateResponseFieldValueAddress, MeetingUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (MeetingUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsAddress() (v MeetingUpdateResponseFieldValueAddress)
func (MeetingUpdateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsBool() (v bool)
func (MeetingUpdateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (MeetingUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsFullName() (v MeetingUpdateResponseFieldValueFullName)
func (MeetingUpdateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsString() (v string)
func (MeetingUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (MeetingUpdateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u MeetingUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type MeetingUpdateResponseObjectType ¶ added in v0.4.1
type MeetingUpdateResponseObjectType string
Always `meeting`.
const (
MeetingUpdateResponseObjectTypeMeeting MeetingUpdateResponseObjectType = "meeting"
)
type MeetingUpdateResponseRelationship ¶ added in v0.4.1
type MeetingUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MeetingUpdateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r MeetingUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*MeetingUpdateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *MeetingUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type MemberListParams ¶ added in v0.4.1
type MemberListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MemberListParams) URLQuery ¶ added in v0.4.1
func (r MemberListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MemberListParams's query parameters as `url.Values`.
type MemberListResponse ¶ added in v0.4.1
type MemberListResponse struct {
// Array of member objects for the current page.
Data []MemberListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of members in the workspace.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberListResponse) RawJSON ¶ added in v0.4.1
func (r MemberListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponse) UnmarshalJSON(data []byte) error
type MemberListResponseData ¶ added in v0.4.1
type MemberListResponseData struct {
// Unique identifier for the member.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the member was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values.
Fields MemberListResponseDataFields `json:"fields" api:"required"`
// URL to view the member in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Members do not expose writable or readable relationships in this API.
Relationships any `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the member was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberListResponseData) RawJSON ¶ added in v0.4.1
func (r MemberListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseData) UnmarshalJSON(data []byte) error
type MemberListResponseDataFields ¶ added in v0.4.1
type MemberListResponseDataFields struct {
// The member's email address.
Email MemberListResponseDataFieldsEmail `json:"$email" api:"required"`
// The member's full name.
Name MemberListResponseDataFieldsName `json:"$name" api:"required"`
// URL of the member's profile image, or null if unset.
ProfileImage MemberListResponseDataFieldsProfileImage `json:"$profileImage" api:"required"`
// The member's workspace role.
Role MemberListResponseDataFieldsRole `json:"$role" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
Name respjson.Field
ProfileImage respjson.Field
Role respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Map of field names to their typed values.
func (MemberListResponseDataFields) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFields) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFields) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFields) UnmarshalJSON(data []byte) error
type MemberListResponseDataFieldsEmail ¶ added in v0.4.1
type MemberListResponseDataFieldsEmail struct {
// The field value.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "EMAIL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's email address.
func (MemberListResponseDataFieldsEmail) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFieldsEmail) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFieldsEmail) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFieldsEmail) UnmarshalJSON(data []byte) error
type MemberListResponseDataFieldsName ¶ added in v0.4.1
type MemberListResponseDataFieldsName struct {
Value MemberListResponseDataFieldsNameValue `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "FULL_NAME".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's full name.
func (MemberListResponseDataFieldsName) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFieldsName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFieldsName) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFieldsName) UnmarshalJSON(data []byte) error
type MemberListResponseDataFieldsNameValue ¶ added in v0.4.1
type MemberListResponseDataFieldsNameValue struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberListResponseDataFieldsNameValue) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFieldsNameValue) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFieldsNameValue) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFieldsNameValue) UnmarshalJSON(data []byte) error
type MemberListResponseDataFieldsProfileImage ¶ added in v0.4.1
type MemberListResponseDataFieldsProfileImage struct {
// The field value, or null if unset.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
URL of the member's profile image, or null if unset.
func (MemberListResponseDataFieldsProfileImage) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFieldsProfileImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFieldsProfileImage) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFieldsProfileImage) UnmarshalJSON(data []byte) error
type MemberListResponseDataFieldsRole ¶ added in v0.4.1
type MemberListResponseDataFieldsRole struct {
// The field value.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "TEXT".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's workspace role.
func (MemberListResponseDataFieldsRole) RawJSON ¶ added in v0.4.1
func (r MemberListResponseDataFieldsRole) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberListResponseDataFieldsRole) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberListResponseDataFieldsRole) UnmarshalJSON(data []byte) error
type MemberRetrieveResponse ¶ added in v0.4.1
type MemberRetrieveResponse struct {
// Unique identifier for the member.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the member was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values.
Fields MemberRetrieveResponseFields `json:"fields" api:"required"`
// URL to view the member in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Members do not expose writable or readable relationships in this API.
Relationships any `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the member was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponse) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFields ¶ added in v0.4.1
type MemberRetrieveResponseFields struct {
// The member's email address.
Email MemberRetrieveResponseFieldsEmail `json:"$email" api:"required"`
// The member's full name.
Name MemberRetrieveResponseFieldsName `json:"$name" api:"required"`
// URL of the member's profile image, or null if unset.
ProfileImage MemberRetrieveResponseFieldsProfileImage `json:"$profileImage" api:"required"`
// The member's workspace role.
Role MemberRetrieveResponseFieldsRole `json:"$role" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
Name respjson.Field
ProfileImage respjson.Field
Role respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Map of field names to their typed values.
func (MemberRetrieveResponseFields) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFields) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFields) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFields) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFieldsEmail ¶ added in v0.4.1
type MemberRetrieveResponseFieldsEmail struct {
// The field value.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "EMAIL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's email address.
func (MemberRetrieveResponseFieldsEmail) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFieldsEmail) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFieldsEmail) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFieldsEmail) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFieldsName ¶ added in v0.4.1
type MemberRetrieveResponseFieldsName struct {
Value MemberRetrieveResponseFieldsNameValue `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "FULL_NAME".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's full name.
func (MemberRetrieveResponseFieldsName) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFieldsName) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFieldsName) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFieldsName) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFieldsNameValue ¶ added in v0.4.1
type MemberRetrieveResponseFieldsNameValue struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MemberRetrieveResponseFieldsNameValue) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFieldsNameValue) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFieldsNameValue) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFieldsNameValue) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFieldsProfileImage ¶ added in v0.4.1
type MemberRetrieveResponseFieldsProfileImage struct {
// The field value, or null if unset.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
URL of the member's profile image, or null if unset.
func (MemberRetrieveResponseFieldsProfileImage) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFieldsProfileImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFieldsProfileImage) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFieldsProfileImage) UnmarshalJSON(data []byte) error
type MemberRetrieveResponseFieldsRole ¶ added in v0.4.1
type MemberRetrieveResponseFieldsRole struct {
// The field value.
Value string `json:"value" api:"required"`
// The data type of the field value.
//
// Any of "TEXT".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The member's workspace role.
func (MemberRetrieveResponseFieldsRole) RawJSON ¶ added in v0.4.1
func (r MemberRetrieveResponseFieldsRole) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemberRetrieveResponseFieldsRole) UnmarshalJSON ¶ added in v0.4.1
func (r *MemberRetrieveResponseFieldsRole) UnmarshalJSON(data []byte) error
type MemberService ¶ added in v0.4.1
type MemberService struct {
Options []option.RequestOption
}
Members represent users in your Lightfield workspace. Members can own accounts and opportunities, and are referenced in relationships like `$owner` and `$createdBy`.
MemberService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemberService method instead.
func NewMemberService ¶ added in v0.4.1
func NewMemberService(opts ...option.RequestOption) (r MemberService)
NewMemberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MemberService) Get ¶ added in v0.4.1
func (r *MemberService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MemberRetrieveResponse, err error)
Retrieves a single member by their ID.
**[Required scope](/using-the-api/scopes/):** `members:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*MemberService) List ¶ added in v0.4.1
func (r *MemberService) List(ctx context.Context, query MemberListParams, opts ...option.RequestOption) (res *MemberListResponse, err error)
Returns a paginated list of members in your workspace. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `members:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
type NoteCreateResponse ¶ added in v0.4.1
type NoteCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]NoteCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]NoteCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteCreateResponse) RawJSON ¶ added in v0.4.1
func (r NoteCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponse) UnmarshalJSON(data []byte) error
type NoteCreateResponseField ¶ added in v0.4.1
type NoteCreateResponseField struct {
// The field value, or null if unset.
Value NoteCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteCreateResponseField) RawJSON ¶ added in v0.4.1
func (r NoteCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponseField) UnmarshalJSON(data []byte) error
type NoteCreateResponseFieldValueAddress ¶ added in v0.4.1
type NoteCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r NoteCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type NoteCreateResponseFieldValueFullName ¶ added in v0.4.1
type NoteCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r NoteCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type NoteCreateResponseFieldValueUnion ¶ added in v0.4.1
type NoteCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [NoteCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [NoteCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [NoteCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NoteCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteCreateResponseFieldValueAddress, NoteCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (NoteCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsAddress() (v NoteCreateResponseFieldValueAddress)
func (NoteCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsBool() (v bool)
func (NoteCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsFloat() (v float64)
func (NoteCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsFullName() (v NoteCreateResponseFieldValueFullName)
func (NoteCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsString() (v string)
func (NoteCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (NoteCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u NoteCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type NoteCreateResponseRelationship ¶ added in v0.4.1
type NoteCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r NoteCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteCreateResponseRelationship) UnmarshalJSON(data []byte) error
type NoteListParams ¶ added in v0.4.1
type NoteListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (NoteListParams) URLQuery ¶ added in v0.4.1
func (r NoteListParams) URLQuery() (v url.Values, err error)
URLQuery serializes NoteListParams's query parameters as `url.Values`.
type NoteListResponse ¶ added in v0.4.1
type NoteListResponse struct {
// Array of entity objects for the current page.
Data []NoteListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponse) RawJSON ¶ added in v0.4.1
func (r NoteListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponse) UnmarshalJSON(data []byte) error
type NoteListResponseData ¶ added in v0.4.1
type NoteListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]NoteListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]NoteListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponseData) RawJSON ¶ added in v0.4.1
func (r NoteListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseData) UnmarshalJSON(data []byte) error
type NoteListResponseDataField ¶ added in v0.4.1
type NoteListResponseDataField struct {
// The field value, or null if unset.
Value NoteListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponseDataField) RawJSON ¶ added in v0.4.1
func (r NoteListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseDataField) UnmarshalJSON(data []byte) error
type NoteListResponseDataFieldValueAddress ¶ added in v0.4.1
type NoteListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r NoteListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type NoteListResponseDataFieldValueFullName ¶ added in v0.4.1
type NoteListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r NoteListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type NoteListResponseDataFieldValueUnion ¶ added in v0.4.1
type NoteListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [NoteListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [NoteListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [NoteListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NoteListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteListResponseDataFieldValueAddress, NoteListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (NoteListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsAddress() (v NoteListResponseDataFieldValueAddress)
func (NoteListResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsBool() (v bool)
func (NoteListResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsFloat() (v float64)
func (NoteListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsFullName() (v NoteListResponseDataFieldValueFullName)
func (NoteListResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsString() (v string)
func (NoteListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (NoteListResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u NoteListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type NoteListResponseDataRelationship ¶ added in v0.4.1
type NoteListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteListResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r NoteListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteListResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteListResponseDataRelationship) UnmarshalJSON(data []byte) error
type NoteNewParams ¶ added in v0.4.1
type NoteNewParams struct {
// Field values for the new note. `$title` is required; `$content` is optional. See
// **[Fields and relationships](/using-the-api/fields-and-relationships/)** for
// value type details.
Fields NoteNewParamsFields `json:"fields,omitzero" api:"required"`
// Relationships to set on the new note. System relationships use a `$` prefix
// (e.g. `$account`, `$opportunity`). Each value is a single entity ID or an array
// of IDs. The note author is automatically set to the API key owner.
Relationships NoteNewParamsRelationships `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (NoteNewParams) MarshalJSON ¶ added in v0.4.1
func (r NoteNewParams) MarshalJSON() (data []byte, err error)
func (*NoteNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteNewParams) UnmarshalJSON(data []byte) error
type NoteNewParamsFields ¶ added in v0.4.1
type NoteNewParamsFields struct {
// Title of the note.
Title string `json:"$title" api:"required"`
// Content of the note as markdown formatted text.
Content param.Opt[string] `json:"$content,omitzero"`
// contains filtered or unexported fields
}
Field values for the new note. `$title` is required; `$content` is optional. See **[Fields and relationships](/using-the-api/fields-and-relationships/)** for value type details.
The property Title is required.
func (NoteNewParamsFields) MarshalJSON ¶ added in v0.4.1
func (r NoteNewParamsFields) MarshalJSON() (data []byte, err error)
func (*NoteNewParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteNewParamsFields) UnmarshalJSON(data []byte) error
type NoteNewParamsRelationships ¶ added in v0.4.1
type NoteNewParamsRelationships struct {
// ID(s) of accounts to associate with this note.
Account NoteNewParamsRelationshipsAccountUnion `json:"$account,omitzero"`
// ID(s) of opportunities to associate with this note.
Opportunity NoteNewParamsRelationshipsOpportunityUnion `json:"$opportunity,omitzero"`
// contains filtered or unexported fields
}
Relationships to set on the new note. System relationships use a `$` prefix (e.g. `$account`, `$opportunity`). Each value is a single entity ID or an array of IDs. The note author is automatically set to the API key owner.
func (NoteNewParamsRelationships) MarshalJSON ¶ added in v0.4.1
func (r NoteNewParamsRelationships) MarshalJSON() (data []byte, err error)
func (*NoteNewParamsRelationships) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteNewParamsRelationships) UnmarshalJSON(data []byte) error
type NoteNewParamsRelationshipsAccountUnion ¶ added in v0.4.1
type NoteNewParamsRelationshipsAccountUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteNewParamsRelationshipsAccountUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteNewParamsRelationshipsAccountUnion) MarshalJSON() ([]byte, error)
func (*NoteNewParamsRelationshipsAccountUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteNewParamsRelationshipsAccountUnion) UnmarshalJSON(data []byte) error
type NoteNewParamsRelationshipsOpportunityUnion ¶ added in v0.4.1
type NoteNewParamsRelationshipsOpportunityUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteNewParamsRelationshipsOpportunityUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteNewParamsRelationshipsOpportunityUnion) MarshalJSON() ([]byte, error)
func (*NoteNewParamsRelationshipsOpportunityUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteNewParamsRelationshipsOpportunityUnion) UnmarshalJSON(data []byte) error
type NoteRetrieveResponse ¶ added in v0.4.1
type NoteRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]NoteRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]NoteRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r NoteRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponse) UnmarshalJSON(data []byte) error
type NoteRetrieveResponseField ¶ added in v0.4.1
type NoteRetrieveResponseField struct {
// The field value, or null if unset.
Value NoteRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r NoteRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponseField) UnmarshalJSON(data []byte) error
type NoteRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type NoteRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r NoteRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type NoteRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type NoteRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r NoteRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type NoteRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type NoteRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [NoteRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [NoteRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [NoteRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NoteRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteRetrieveResponseFieldValueAddress, NoteRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (NoteRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsAddress() (v NoteRetrieveResponseFieldValueAddress)
func (NoteRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (NoteRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (NoteRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsFullName() (v NoteRetrieveResponseFieldValueFullName)
func (NoteRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsString() (v string)
func (NoteRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (NoteRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u NoteRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type NoteRetrieveResponseRelationship ¶ added in v0.4.1
type NoteRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r NoteRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type NoteService ¶ added in v0.4.1
type NoteService struct {
Options []option.RequestOption
}
Notes represent free-form text records in Lightfield. Each note can be associated with zero or more accounts and opportunities.
NoteService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNoteService method instead.
func NewNoteService ¶ added in v0.4.1
func NewNoteService(opts ...option.RequestOption) (r NoteService)
NewNoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*NoteService) Get ¶ added in v0.4.1
func (r *NoteService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *NoteRetrieveResponse, err error)
Retrieves a single note by its ID.
**[Required scope](/using-the-api/scopes/):** `notes:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*NoteService) List ¶ added in v0.4.1
func (r *NoteService) List(ctx context.Context, query NoteListParams, opts ...option.RequestOption) (res *NoteListResponse, err error)
Returns a paginated list of notes. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `notes:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*NoteService) New ¶ added in v0.4.1
func (r *NoteService) New(ctx context.Context, body NoteNewParams, opts ...option.RequestOption) (res *NoteCreateResponse, err error)
Creates a new note record.
The note author is automatically set to the API key owner.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `notes:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*NoteService) Update ¶ added in v0.4.1
func (r *NoteService) Update(ctx context.Context, id string, body NoteUpdateParams, opts ...option.RequestOption) (res *NoteUpdateResponse, err error)
Updates an existing note by ID. Only included fields and relationships are modified.
Both `$account` and `$opportunity` relationships can be modified via `add` or `remove` operations.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `notes:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type NoteUpdateParams ¶ added in v0.4.1
type NoteUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged. See
// **[Fields and relationships](/using-the-api/fields-and-relationships/)** for
// value type details.
Fields NoteUpdateParamsFields `json:"fields,omitzero"`
// Relationship operations to apply. System relationships use a `$` prefix (e.g.
// `$account`, `$opportunity`). Each value is an operation object with `add` or
// `remove`.
Relationships NoteUpdateParamsRelationships `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (NoteUpdateParams) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParams) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParams) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParams) UnmarshalJSON(data []byte) error
type NoteUpdateParamsFields ¶ added in v0.4.1
type NoteUpdateParamsFields struct {
// Content of the note as markdown formatted text.
Content param.Opt[string] `json:"$content,omitzero"`
// Title of the note.
Title param.Opt[string] `json:"$title,omitzero"`
// contains filtered or unexported fields
}
Field values to update — only provided fields are modified; omitted fields are left unchanged. See **[Fields and relationships](/using-the-api/fields-and-relationships/)** for value type details.
func (NoteUpdateParamsFields) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsFields) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsFields) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationships ¶ added in v0.4.1
type NoteUpdateParamsRelationships struct {
// Operation to modify associated accounts.
Account NoteUpdateParamsRelationshipsAccountUnion `json:"$account,omitzero"`
// Operation to modify associated opportunities.
Opportunity NoteUpdateParamsRelationshipsOpportunityUnion `json:"$opportunity,omitzero"`
// contains filtered or unexported fields
}
Relationship operations to apply. System relationships use a `$` prefix (e.g. `$account`, `$opportunity`). Each value is an operation object with `add` or `remove`.
func (NoteUpdateParamsRelationships) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsRelationships) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsRelationships) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsRelationships) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsAccountAdd ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsAccountAdd struct {
// Entity ID(s) to add to the relationship.
Add NoteUpdateParamsRelationshipsAccountAddAddUnion `json:"add,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Add is required.
func (NoteUpdateParamsRelationshipsAccountAdd) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsRelationshipsAccountAdd) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsRelationshipsAccountAdd) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsRelationshipsAccountAdd) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsAccountAddAddUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsAccountAddAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsAccountAddAddUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsAccountAddAddUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsAccountAddAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsAccountAddAddUnion) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsAccountRemove ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsAccountRemove struct {
// Entity ID(s) to remove from the relationship.
Remove NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion `json:"remove,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Remove is required.
func (NoteUpdateParamsRelationshipsAccountRemove) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsRelationshipsAccountRemove) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsRelationshipsAccountRemove) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsRelationshipsAccountRemove) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsAccountRemoveRemoveUnion) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsAccountUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsAccountUnion struct {
OfNoteUpdatesRelationshipsAccountAdd *NoteUpdateParamsRelationshipsAccountAdd `json:",omitzero,inline"`
OfNoteUpdatesRelationshipsAccountRemove *NoteUpdateParamsRelationshipsAccountRemove `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsAccountUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsAccountUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsAccountUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsAccountUnion) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsOpportunityAdd ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsOpportunityAdd struct {
// Entity ID(s) to add to the relationship.
Add NoteUpdateParamsRelationshipsOpportunityAddAddUnion `json:"add,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Add is required.
func (NoteUpdateParamsRelationshipsOpportunityAdd) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsRelationshipsOpportunityAdd) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsRelationshipsOpportunityAdd) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsRelationshipsOpportunityAdd) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsOpportunityAddAddUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsOpportunityAddAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsOpportunityAddAddUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsOpportunityAddAddUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsOpportunityAddAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsOpportunityAddAddUnion) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsOpportunityRemove ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsOpportunityRemove struct {
// Entity ID(s) to remove from the relationship.
Remove NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion `json:"remove,omitzero" api:"required"`
// contains filtered or unexported fields
}
The property Remove is required.
func (NoteUpdateParamsRelationshipsOpportunityRemove) MarshalJSON ¶ added in v0.4.1
func (r NoteUpdateParamsRelationshipsOpportunityRemove) MarshalJSON() (data []byte, err error)
func (*NoteUpdateParamsRelationshipsOpportunityRemove) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateParamsRelationshipsOpportunityRemove) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsOpportunityRemoveRemoveUnion) UnmarshalJSON(data []byte) error
type NoteUpdateParamsRelationshipsOpportunityUnion ¶ added in v0.4.1
type NoteUpdateParamsRelationshipsOpportunityUnion struct {
OfNoteUpdatesRelationshipsOpportunityAdd *NoteUpdateParamsRelationshipsOpportunityAdd `json:",omitzero,inline"`
OfNoteUpdatesRelationshipsOpportunityRemove *NoteUpdateParamsRelationshipsOpportunityRemove `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (NoteUpdateParamsRelationshipsOpportunityUnion) MarshalJSON ¶ added in v0.4.1
func (u NoteUpdateParamsRelationshipsOpportunityUnion) MarshalJSON() ([]byte, error)
func (*NoteUpdateParamsRelationshipsOpportunityUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *NoteUpdateParamsRelationshipsOpportunityUnion) UnmarshalJSON(data []byte) error
type NoteUpdateResponse ¶ added in v0.4.1
type NoteUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]NoteUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]NoteUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteUpdateResponse) RawJSON ¶ added in v0.4.1
func (r NoteUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponse) UnmarshalJSON(data []byte) error
type NoteUpdateResponseField ¶ added in v0.4.1
type NoteUpdateResponseField struct {
// The field value, or null if unset.
Value NoteUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteUpdateResponseField) RawJSON ¶ added in v0.4.1
func (r NoteUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponseField) UnmarshalJSON(data []byte) error
type NoteUpdateResponseFieldValueAddress ¶ added in v0.4.1
type NoteUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r NoteUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type NoteUpdateResponseFieldValueFullName ¶ added in v0.4.1
type NoteUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r NoteUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type NoteUpdateResponseFieldValueUnion ¶ added in v0.4.1
type NoteUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [NoteUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [NoteUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [NoteUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
NoteUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], NoteUpdateResponseFieldValueAddress, NoteUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (NoteUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsAddress() (v NoteUpdateResponseFieldValueAddress)
func (NoteUpdateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsBool() (v bool)
func (NoteUpdateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (NoteUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsFullName() (v NoteUpdateResponseFieldValueFullName)
func (NoteUpdateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsString() (v string)
func (NoteUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (NoteUpdateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u NoteUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type NoteUpdateResponseRelationship ¶ added in v0.4.1
type NoteUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (NoteUpdateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r NoteUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*NoteUpdateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *NoteUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type OpportunityCreateResponse ¶ added in v0.4.1
type OpportunityCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]OpportunityCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]OpportunityCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityCreateResponse) RawJSON ¶ added in v0.4.1
func (r OpportunityCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponse) UnmarshalJSON(data []byte) error
type OpportunityCreateResponseField ¶ added in v0.4.1
type OpportunityCreateResponseField struct {
// The field value, or null if unset.
Value OpportunityCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityCreateResponseField) RawJSON ¶ added in v0.4.1
func (r OpportunityCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponseField) UnmarshalJSON(data []byte) error
type OpportunityCreateResponseFieldValueAddress ¶ added in v0.4.1
type OpportunityCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r OpportunityCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type OpportunityCreateResponseFieldValueFullName ¶ added in v0.4.1
type OpportunityCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r OpportunityCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type OpportunityCreateResponseFieldValueUnion ¶ added in v0.4.1
type OpportunityCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [OpportunityCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [OpportunityCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [OpportunityCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OpportunityCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityCreateResponseFieldValueAddress, OpportunityCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (OpportunityCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsAddress() (v OpportunityCreateResponseFieldValueAddress)
func (OpportunityCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsBool() (v bool)
func (OpportunityCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsFloat() (v float64)
func (OpportunityCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsFullName() (v OpportunityCreateResponseFieldValueFullName)
func (OpportunityCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsString() (v string)
func (OpportunityCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (OpportunityCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u OpportunityCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type OpportunityCreateResponseRelationship ¶ added in v0.4.1
type OpportunityCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r OpportunityCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityCreateResponseRelationship) UnmarshalJSON(data []byte) error
type OpportunityDefinitionsResponse ¶ added in v0.2.0
type OpportunityDefinitionsResponse struct {
// Map of field keys to their definitions, including both system and custom fields.
FieldDefinitions map[string]OpportunityDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
// The object type these definitions belong to (e.g. `account`).
ObjectType string `json:"objectType" api:"required"`
// Map of relationship keys to their definitions.
RelationshipDefinitions map[string]OpportunityDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FieldDefinitions respjson.Field
ObjectType respjson.Field
RelationshipDefinitions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityDefinitionsResponse) RawJSON ¶ added in v0.2.0
func (r OpportunityDefinitionsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityDefinitionsResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *OpportunityDefinitionsResponse) UnmarshalJSON(data []byte) error
type OpportunityDefinitionsResponseFieldDefinition ¶ added in v0.2.0
type OpportunityDefinitionsResponseFieldDefinition struct {
// Description of the field, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the field.
Label string `json:"label" api:"required"`
// Type-specific configuration (e.g. select options, currency code).
TypeConfiguration OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration `json:"typeConfiguration" api:"required"`
// Data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// Unique identifier of the field definition.
ID string `json:"id"`
// `true` for fields that are not writable via the API (e.g. AI-generated
// summaries). `false` or absent for writable fields.
ReadOnly bool `json:"readOnly"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Label respjson.Field
TypeConfiguration respjson.Field
ValueType respjson.Field
ID respjson.Field
ReadOnly respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityDefinitionsResponseFieldDefinition) RawJSON ¶ added in v0.2.0
func (r OpportunityDefinitionsResponseFieldDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityDefinitionsResponseFieldDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *OpportunityDefinitionsResponseFieldDefinition) UnmarshalJSON(data []byte) error
type OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration ¶ added in v0.4.1
type OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration struct {
// ISO 4217 3-letter currency code.
Currency string `json:"currency"`
// Social platform associated with this handle field.
//
// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
HandleService string `json:"handleService"`
// Whether this field accepts multiple values.
MultipleValues bool `json:"multipleValues"`
// Available options for select fields.
Options []OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
// Whether values for this field must be unique.
Unique bool `json:"unique"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
HandleService respjson.Field
MultipleValues respjson.Field
Options respjson.Field
Unique respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Type-specific configuration (e.g. select options, currency code).
func (OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON ¶ added in v0.4.1
func (r OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON(data []byte) error
type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption ¶ added in v0.4.1
type OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
// Unique identifier of the select option.
ID string `json:"id" api:"required"`
// Human-readable display name of the option.
Label string `json:"label" api:"required"`
// Description of the option, or null.
Description string `json:"description" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Label respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON ¶ added in v0.4.1
func (r OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON(data []byte) error
type OpportunityDefinitionsResponseRelationshipDefinition ¶ added in v0.2.0
type OpportunityDefinitionsResponseRelationshipDefinition struct {
// Whether this is a `has_one` or `has_many` relationship.
//
// Any of "HAS_ONE", "HAS_MANY".
Cardinality string `json:"cardinality" api:"required"`
// Description of the relationship, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the relationship.
Label string `json:"label" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// Unique identifier of the relationship definition.
ID string `json:"id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
Description respjson.Field
Label respjson.Field
ObjectType respjson.Field
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityDefinitionsResponseRelationshipDefinition) RawJSON ¶ added in v0.2.0
func (r OpportunityDefinitionsResponseRelationshipDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityDefinitionsResponseRelationshipDefinition) UnmarshalJSON ¶ added in v0.2.0
func (r *OpportunityDefinitionsResponseRelationshipDefinition) UnmarshalJSON(data []byte) error
type OpportunityListParams ¶
type OpportunityListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OpportunityListParams) URLQuery ¶
func (r OpportunityListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OpportunityListParams's query parameters as `url.Values`.
type OpportunityListResponse ¶
type OpportunityListResponse struct {
// Array of entity objects for the current page.
Data []OpportunityListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponse) RawJSON ¶
func (r OpportunityListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponse) UnmarshalJSON ¶
func (r *OpportunityListResponse) UnmarshalJSON(data []byte) error
type OpportunityListResponseData ¶
type OpportunityListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]OpportunityListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]OpportunityListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponseData) RawJSON ¶
func (r OpportunityListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseData) UnmarshalJSON ¶
func (r *OpportunityListResponseData) UnmarshalJSON(data []byte) error
type OpportunityListResponseDataField ¶
type OpportunityListResponseDataField struct {
// The field value, or null if unset.
Value OpportunityListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponseDataField) RawJSON ¶
func (r OpportunityListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseDataField) UnmarshalJSON ¶
func (r *OpportunityListResponseDataField) UnmarshalJSON(data []byte) error
type OpportunityListResponseDataFieldValueAddress ¶ added in v0.4.1
type OpportunityListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r OpportunityListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type OpportunityListResponseDataFieldValueFullName ¶ added in v0.4.1
type OpportunityListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r OpportunityListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type OpportunityListResponseDataFieldValueUnion ¶
type OpportunityListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [OpportunityListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [OpportunityListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [OpportunityListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OpportunityListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityListResponseDataFieldValueAddress, OpportunityListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (OpportunityListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u OpportunityListResponseDataFieldValueUnion) AsAddress() (v OpportunityListResponseDataFieldValueAddress)
func (OpportunityListResponseDataFieldValueUnion) AsBool ¶
func (u OpportunityListResponseDataFieldValueUnion) AsBool() (v bool)
func (OpportunityListResponseDataFieldValueUnion) AsFloat ¶
func (u OpportunityListResponseDataFieldValueUnion) AsFloat() (v float64)
func (OpportunityListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u OpportunityListResponseDataFieldValueUnion) AsFullName() (v OpportunityListResponseDataFieldValueFullName)
func (OpportunityListResponseDataFieldValueUnion) AsString ¶
func (u OpportunityListResponseDataFieldValueUnion) AsString() (v string)
func (OpportunityListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u OpportunityListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (OpportunityListResponseDataFieldValueUnion) RawJSON ¶
func (u OpportunityListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseDataFieldValueUnion) UnmarshalJSON ¶
func (r *OpportunityListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type OpportunityListResponseDataRelationship ¶
type OpportunityListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityListResponseDataRelationship) RawJSON ¶
func (r OpportunityListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityListResponseDataRelationship) UnmarshalJSON ¶
func (r *OpportunityListResponseDataRelationship) UnmarshalJSON(data []byte) error
type OpportunityNewParams ¶
type OpportunityNewParams struct {
// Field values for the new opportunity. System fields use a `$` prefix (e.g.
// `$name`, `$stage`); custom attributes use their bare slug. Required: `$name`
// (string) and `$stage` (option ID or label). Fields of type `SINGLE_SELECT` or
// `MULTI_SELECT` accept either an option ID or label from the field's
// `typeConfiguration.options` — call the
// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to
// discover available fields and options. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]OpportunityNewParamsFieldUnion `json:"fields,omitzero" api:"required"`
// Relationships to set on the new opportunity. System relationships use a `$`
// prefix (e.g. `$account`, `$owner`); custom relationships use their bare slug.
// `$account` is required. Each value is a single entity ID or an array of IDs.
// Call the
// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u> to
// list available relationship keys.
Relationships map[string]OpportunityNewParamsRelationshipUnion `json:"relationships,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (OpportunityNewParams) MarshalJSON ¶
func (r OpportunityNewParams) MarshalJSON() (data []byte, err error)
func (*OpportunityNewParams) UnmarshalJSON ¶
func (r *OpportunityNewParams) UnmarshalJSON(data []byte) error
type OpportunityNewParamsFieldAddress ¶ added in v0.4.1
type OpportunityNewParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (OpportunityNewParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r OpportunityNewParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*OpportunityNewParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityNewParamsFieldAddress) UnmarshalJSON(data []byte) error
type OpportunityNewParamsFieldFullName ¶ added in v0.4.1
type OpportunityNewParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (OpportunityNewParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r OpportunityNewParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*OpportunityNewParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityNewParamsFieldFullName) UnmarshalJSON(data []byte) error
type OpportunityNewParamsFieldUnion ¶
type OpportunityNewParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *OpportunityNewParamsFieldAddress `json:",omitzero,inline"`
OfFullName *OpportunityNewParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityNewParamsFieldUnion) MarshalJSON ¶
func (u OpportunityNewParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*OpportunityNewParamsFieldUnion) UnmarshalJSON ¶
func (u *OpportunityNewParamsFieldUnion) UnmarshalJSON(data []byte) error
type OpportunityNewParamsRelationshipUnion ¶
type OpportunityNewParamsRelationshipUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityNewParamsRelationshipUnion) MarshalJSON ¶
func (u OpportunityNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)
func (*OpportunityNewParamsRelationshipUnion) UnmarshalJSON ¶
func (u *OpportunityNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponse ¶ added in v0.4.1
type OpportunityRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]OpportunityRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]OpportunityRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r OpportunityRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponse) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponseField ¶ added in v0.4.1
type OpportunityRetrieveResponseField struct {
// The field value, or null if unset.
Value OpportunityRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r OpportunityRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponseField) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type OpportunityRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r OpportunityRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type OpportunityRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r OpportunityRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type OpportunityRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [OpportunityRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [OpportunityRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [OpportunityRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OpportunityRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityRetrieveResponseFieldValueAddress, OpportunityRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (OpportunityRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsAddress() (v OpportunityRetrieveResponseFieldValueAddress)
func (OpportunityRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (OpportunityRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (OpportunityRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsFullName() (v OpportunityRetrieveResponseFieldValueFullName)
func (OpportunityRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsString() (v string)
func (OpportunityRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (OpportunityRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u OpportunityRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type OpportunityRetrieveResponseRelationship ¶ added in v0.4.1
type OpportunityRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r OpportunityRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type OpportunityService ¶
type OpportunityService struct {
Options []option.RequestOption
}
Opportunities represent potential deals or sales in Lightfield. Each opportunity belongs to an account and can have tasks and notes associated with it.
OpportunityService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOpportunityService method instead.
func NewOpportunityService ¶
func NewOpportunityService(opts ...option.RequestOption) (r OpportunityService)
NewOpportunityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OpportunityService) Definitions ¶ added in v0.2.0
func (r *OpportunityService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *OpportunityDefinitionsResponse, err error)
Returns the schema for all field and relationship definitions available on opportunities, including both system-defined and custom fields. Useful for understanding the shape of opportunity data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.
**[Required scope](/using-the-api/scopes/):** `opportunities:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*OpportunityService) Get ¶
func (r *OpportunityService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OpportunityRetrieveResponse, err error)
Retrieves a single opportunity by its ID.
**[Required scope](/using-the-api/scopes/):** `opportunities:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*OpportunityService) List ¶
func (r *OpportunityService) List(ctx context.Context, query OpportunityListParams, opts ...option.RequestOption) (res *OpportunityListResponse, err error)
Returns a paginated list of opportunities. Use `offset` and `limit` to paginate through results, and `$field` query parameters to filter. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about <u>[pagination](/using-the-api/list-endpoints/#pagination)</u> and <u>[filtering](/using-the-api/list-endpoints/#filtering)</u>.
**[Required scope](/using-the-api/scopes/):** `opportunities:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*OpportunityService) New ¶
func (r *OpportunityService) New(ctx context.Context, body OpportunityNewParams, opts ...option.RequestOption) (res *OpportunityCreateResponse, err error)
Creates a new opportunity record. The `$name` and `$stage` fields and the `$account` relationship are required.
After creation, Lightfield automatically generates an opportunity summary in the background. The `$opportunityStatus` field is read-only and cannot be set via the API. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead.
Supports idempotency via the `Idempotency-Key` header.
To avoid duplicates, we recommend a find-or-create pattern — use <u>[list filtering](/using-the-api/list-endpoints/#filtering)</u> to check if a record exists before creating.
**[Required scope](/using-the-api/scopes/):** `opportunities:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*OpportunityService) Update ¶
func (r *OpportunityService) Update(ctx context.Context, id string, body OpportunityUpdateParams, opts ...option.RequestOption) (res *OpportunityUpdateResponse, err error)
Updates an existing opportunity by ID. Only included fields and relationships are modified.
The `$opportunityStatus` field is read-only and cannot be updated. The `$task` and `$note` relationships are also read-only — manage them via the `$opportunity` relationship on the task, or the `$account`/`$opportunity` note relationships instead.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `opportunities:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type OpportunityUpdateParams ¶
type OpportunityUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged. System fields use a `$` prefix (e.g. `$name`, `$stage`); custom
// attributes use their bare slug. `SINGLE_SELECT` and `MULTI_SELECT` fields accept
// an option ID or label — call the
// <u>[definitions endpoint](/api/resources/opportunity/methods/definitions)</u>
// for available options. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields map[string]OpportunityUpdateParamsFieldUnion `json:"fields,omitzero"`
// Relationship operations to apply. System relationships use a `$` prefix (e.g.
// `$owner`, `$champion`). Each value is an operation object with `add`, `remove`,
// or `replace`.
Relationships map[string]OpportunityUpdateParamsRelationship `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (OpportunityUpdateParams) MarshalJSON ¶
func (r OpportunityUpdateParams) MarshalJSON() (data []byte, err error)
func (*OpportunityUpdateParams) UnmarshalJSON ¶
func (r *OpportunityUpdateParams) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsFieldAddress ¶ added in v0.4.1
type OpportunityUpdateParamsFieldAddress struct {
// City name.
City param.Opt[string] `json:"city,omitzero"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country param.Opt[string] `json:"country,omitzero"`
// Latitude coordinate.
Latitude param.Opt[float64] `json:"latitude,omitzero"`
// Longitude coordinate.
Longitude param.Opt[float64] `json:"longitude,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
// State or province.
State param.Opt[string] `json:"state,omitzero"`
// Street address line 1.
Street param.Opt[string] `json:"street,omitzero"`
// Street address line 2.
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
func (OpportunityUpdateParamsFieldAddress) MarshalJSON ¶ added in v0.4.1
func (r OpportunityUpdateParamsFieldAddress) MarshalJSON() (data []byte, err error)
func (*OpportunityUpdateParamsFieldAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityUpdateParamsFieldAddress) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsFieldFullName ¶ added in v0.4.1
type OpportunityUpdateParamsFieldFullName struct {
// The contact's first name.
FirstName param.Opt[string] `json:"firstName,omitzero"`
// The contact's last name.
LastName param.Opt[string] `json:"lastName,omitzero"`
// contains filtered or unexported fields
}
func (OpportunityUpdateParamsFieldFullName) MarshalJSON ¶ added in v0.4.1
func (r OpportunityUpdateParamsFieldFullName) MarshalJSON() (data []byte, err error)
func (*OpportunityUpdateParamsFieldFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityUpdateParamsFieldFullName) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsFieldUnion ¶
type OpportunityUpdateParamsFieldUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
OfAddress *OpportunityUpdateParamsFieldAddress `json:",omitzero,inline"`
OfFullName *OpportunityUpdateParamsFieldFullName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityUpdateParamsFieldUnion) MarshalJSON ¶
func (u OpportunityUpdateParamsFieldUnion) MarshalJSON() ([]byte, error)
func (*OpportunityUpdateParamsFieldUnion) UnmarshalJSON ¶
func (u *OpportunityUpdateParamsFieldUnion) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsRelationship ¶
type OpportunityUpdateParamsRelationship struct {
// Entity ID(s) to add to the relationship.
Add OpportunityUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the relationship.
Remove OpportunityUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
// Entity ID(s) to set as the entire relationship, replacing all existing
// associations.
Replace OpportunityUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
// contains filtered or unexported fields
}
An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
func (OpportunityUpdateParamsRelationship) MarshalJSON ¶
func (r OpportunityUpdateParamsRelationship) MarshalJSON() (data []byte, err error)
func (*OpportunityUpdateParamsRelationship) UnmarshalJSON ¶
func (r *OpportunityUpdateParamsRelationship) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsRelationshipAddUnion ¶
type OpportunityUpdateParamsRelationshipAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityUpdateParamsRelationshipAddUnion) MarshalJSON ¶
func (u OpportunityUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)
func (*OpportunityUpdateParamsRelationshipAddUnion) UnmarshalJSON ¶
func (u *OpportunityUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsRelationshipRemoveUnion ¶
type OpportunityUpdateParamsRelationshipRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityUpdateParamsRelationshipRemoveUnion) MarshalJSON ¶
func (u OpportunityUpdateParamsRelationshipRemoveUnion) MarshalJSON() ([]byte, error)
func (*OpportunityUpdateParamsRelationshipRemoveUnion) UnmarshalJSON ¶
func (u *OpportunityUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error
type OpportunityUpdateParamsRelationshipReplaceUnion ¶
type OpportunityUpdateParamsRelationshipReplaceUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OpportunityUpdateParamsRelationshipReplaceUnion) MarshalJSON ¶
func (u OpportunityUpdateParamsRelationshipReplaceUnion) MarshalJSON() ([]byte, error)
func (*OpportunityUpdateParamsRelationshipReplaceUnion) UnmarshalJSON ¶
func (u *OpportunityUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponse ¶
type OpportunityUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]OpportunityUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]OpportunityUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityUpdateResponse) RawJSON ¶
func (r OpportunityUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponse) UnmarshalJSON ¶
func (r *OpportunityUpdateResponse) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponseField ¶
type OpportunityUpdateResponseField struct {
// The field value, or null if unset.
Value OpportunityUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityUpdateResponseField) RawJSON ¶
func (r OpportunityUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponseField) UnmarshalJSON ¶
func (r *OpportunityUpdateResponseField) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponseFieldValueAddress ¶ added in v0.4.1
type OpportunityUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r OpportunityUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponseFieldValueFullName ¶ added in v0.4.1
type OpportunityUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r OpportunityUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *OpportunityUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponseFieldValueUnion ¶
type OpportunityUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [OpportunityUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [OpportunityUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [OpportunityUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OpportunityUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], OpportunityUpdateResponseFieldValueAddress, OpportunityUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (OpportunityUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u OpportunityUpdateResponseFieldValueUnion) AsAddress() (v OpportunityUpdateResponseFieldValueAddress)
func (OpportunityUpdateResponseFieldValueUnion) AsBool ¶
func (u OpportunityUpdateResponseFieldValueUnion) AsBool() (v bool)
func (OpportunityUpdateResponseFieldValueUnion) AsFloat ¶
func (u OpportunityUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (OpportunityUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u OpportunityUpdateResponseFieldValueUnion) AsFullName() (v OpportunityUpdateResponseFieldValueFullName)
func (OpportunityUpdateResponseFieldValueUnion) AsString ¶
func (u OpportunityUpdateResponseFieldValueUnion) AsString() (v string)
func (OpportunityUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u OpportunityUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (OpportunityUpdateResponseFieldValueUnion) RawJSON ¶
func (u OpportunityUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponseFieldValueUnion) UnmarshalJSON ¶
func (r *OpportunityUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type OpportunityUpdateResponseRelationship ¶
type OpportunityUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OpportunityUpdateResponseRelationship) RawJSON ¶
func (r OpportunityUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*OpportunityUpdateResponseRelationship) UnmarshalJSON ¶
func (r *OpportunityUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type TaskCreateResponse ¶ added in v0.4.1
type TaskCreateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]TaskCreateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]TaskCreateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskCreateResponse) RawJSON ¶ added in v0.4.1
func (r TaskCreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponse) UnmarshalJSON(data []byte) error
type TaskCreateResponseField ¶ added in v0.4.1
type TaskCreateResponseField struct {
// The field value, or null if unset.
Value TaskCreateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskCreateResponseField) RawJSON ¶ added in v0.4.1
func (r TaskCreateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponseField) UnmarshalJSON(data []byte) error
type TaskCreateResponseFieldValueAddress ¶ added in v0.4.1
type TaskCreateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskCreateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r TaskCreateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type TaskCreateResponseFieldValueFullName ¶ added in v0.4.1
type TaskCreateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskCreateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r TaskCreateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type TaskCreateResponseFieldValueUnion ¶ added in v0.4.1
type TaskCreateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [TaskCreateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [TaskCreateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [TaskCreateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TaskCreateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskCreateResponseFieldValueAddress, TaskCreateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (TaskCreateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsAddress() (v TaskCreateResponseFieldValueAddress)
func (TaskCreateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsBool() (v bool)
func (TaskCreateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsFloat() (v float64)
func (TaskCreateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsFullName() (v TaskCreateResponseFieldValueFullName)
func (TaskCreateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsString() (v string)
func (TaskCreateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) AsStringArray() (v []string)
func (TaskCreateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u TaskCreateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type TaskCreateResponseRelationship ¶ added in v0.4.1
type TaskCreateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskCreateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r TaskCreateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskCreateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskCreateResponseRelationship) UnmarshalJSON(data []byte) error
type TaskDefinitionsResponse ¶ added in v0.4.1
type TaskDefinitionsResponse struct {
// Map of field keys to their definitions, including both system and custom fields.
FieldDefinitions map[string]TaskDefinitionsResponseFieldDefinition `json:"fieldDefinitions" api:"required"`
// The object type these definitions belong to (e.g. `account`).
ObjectType string `json:"objectType" api:"required"`
// Map of relationship keys to their definitions.
RelationshipDefinitions map[string]TaskDefinitionsResponseRelationshipDefinition `json:"relationshipDefinitions" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FieldDefinitions respjson.Field
ObjectType respjson.Field
RelationshipDefinitions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskDefinitionsResponse) RawJSON ¶ added in v0.4.1
func (r TaskDefinitionsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskDefinitionsResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskDefinitionsResponse) UnmarshalJSON(data []byte) error
type TaskDefinitionsResponseFieldDefinition ¶ added in v0.4.1
type TaskDefinitionsResponseFieldDefinition struct {
// Description of the field, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the field.
Label string `json:"label" api:"required"`
// Type-specific configuration (e.g. select options, currency code).
TypeConfiguration TaskDefinitionsResponseFieldDefinitionTypeConfiguration `json:"typeConfiguration" api:"required"`
// Data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// Unique identifier of the field definition.
ID string `json:"id"`
// `true` for fields that are not writable via the API (e.g. AI-generated
// summaries). `false` or absent for writable fields.
ReadOnly bool `json:"readOnly"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Label respjson.Field
TypeConfiguration respjson.Field
ValueType respjson.Field
ID respjson.Field
ReadOnly respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskDefinitionsResponseFieldDefinition) RawJSON ¶ added in v0.4.1
func (r TaskDefinitionsResponseFieldDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskDefinitionsResponseFieldDefinition) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskDefinitionsResponseFieldDefinition) UnmarshalJSON(data []byte) error
type TaskDefinitionsResponseFieldDefinitionTypeConfiguration ¶ added in v0.4.1
type TaskDefinitionsResponseFieldDefinitionTypeConfiguration struct {
// ISO 4217 3-letter currency code.
Currency string `json:"currency"`
// Social platform associated with this handle field.
//
// Any of "TWITTER", "LINKEDIN", "FACEBOOK", "INSTAGRAM".
HandleService string `json:"handleService"`
// Whether this field accepts multiple values.
MultipleValues bool `json:"multipleValues"`
// Available options for select fields.
Options []TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption `json:"options"`
// Whether values for this field must be unique.
Unique bool `json:"unique"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
HandleService respjson.Field
MultipleValues respjson.Field
Options respjson.Field
Unique respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Type-specific configuration (e.g. select options, currency code).
func (TaskDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON ¶ added in v0.4.1
func (r TaskDefinitionsResponseFieldDefinitionTypeConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskDefinitionsResponseFieldDefinitionTypeConfiguration) UnmarshalJSON(data []byte) error
type TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption ¶ added in v0.4.1
type TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption struct {
// Unique identifier of the select option.
ID string `json:"id" api:"required"`
// Human-readable display name of the option.
Label string `json:"label" api:"required"`
// Description of the option, or null.
Description string `json:"description" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Label respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON ¶ added in v0.4.1
func (r TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskDefinitionsResponseFieldDefinitionTypeConfigurationOption) UnmarshalJSON(data []byte) error
type TaskDefinitionsResponseRelationshipDefinition ¶ added in v0.4.1
type TaskDefinitionsResponseRelationshipDefinition struct {
// Whether this is a `has_one` or `has_many` relationship.
//
// Any of "HAS_ONE", "HAS_MANY".
Cardinality string `json:"cardinality" api:"required"`
// Description of the relationship, or null.
Description string `json:"description" api:"required"`
// Human-readable display name of the relationship.
Label string `json:"label" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// Unique identifier of the relationship definition.
ID string `json:"id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
Description respjson.Field
Label respjson.Field
ObjectType respjson.Field
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskDefinitionsResponseRelationshipDefinition) RawJSON ¶ added in v0.4.1
func (r TaskDefinitionsResponseRelationshipDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskDefinitionsResponseRelationshipDefinition) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskDefinitionsResponseRelationshipDefinition) UnmarshalJSON(data []byte) error
type TaskListParams ¶ added in v0.4.1
type TaskListParams struct {
// Maximum number of records to return. Defaults to 25, maximum 25.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of records to skip for pagination. Defaults to 0.
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TaskListParams) URLQuery ¶ added in v0.4.1
func (r TaskListParams) URLQuery() (v url.Values, err error)
URLQuery serializes TaskListParams's query parameters as `url.Values`.
type TaskListResponse ¶ added in v0.4.1
type TaskListResponse struct {
// Array of entity objects for the current page.
Data []TaskListResponseData `json:"data" api:"required"`
// The object type, always `"list"`.
Object string `json:"object" api:"required"`
// Total number of entities matching the query.
TotalCount int64 `json:"totalCount" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
TotalCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponse) RawJSON ¶ added in v0.4.1
func (r TaskListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponse) UnmarshalJSON(data []byte) error
type TaskListResponseData ¶ added in v0.4.1
type TaskListResponseData struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]TaskListResponseDataField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]TaskListResponseDataRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponseData) RawJSON ¶ added in v0.4.1
func (r TaskListResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseData) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseData) UnmarshalJSON(data []byte) error
type TaskListResponseDataField ¶ added in v0.4.1
type TaskListResponseDataField struct {
// The field value, or null if unset.
Value TaskListResponseDataFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponseDataField) RawJSON ¶ added in v0.4.1
func (r TaskListResponseDataField) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseDataField) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseDataField) UnmarshalJSON(data []byte) error
type TaskListResponseDataFieldValueAddress ¶ added in v0.4.1
type TaskListResponseDataFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponseDataFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r TaskListResponseDataFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseDataFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseDataFieldValueAddress) UnmarshalJSON(data []byte) error
type TaskListResponseDataFieldValueFullName ¶ added in v0.4.1
type TaskListResponseDataFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponseDataFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r TaskListResponseDataFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseDataFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseDataFieldValueFullName) UnmarshalJSON(data []byte) error
type TaskListResponseDataFieldValueUnion ¶ added in v0.4.1
type TaskListResponseDataFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
City string `json:"city"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
Country string `json:"country"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
State string `json:"state"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
Street string `json:"street"`
// This field is from variant [TaskListResponseDataFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [TaskListResponseDataFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [TaskListResponseDataFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TaskListResponseDataFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskListResponseDataFieldValueAddress, TaskListResponseDataFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (TaskListResponseDataFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsAddress() (v TaskListResponseDataFieldValueAddress)
func (TaskListResponseDataFieldValueUnion) AsBool ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsBool() (v bool)
func (TaskListResponseDataFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsFloat() (v float64)
func (TaskListResponseDataFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsFullName() (v TaskListResponseDataFieldValueFullName)
func (TaskListResponseDataFieldValueUnion) AsString ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsString() (v string)
func (TaskListResponseDataFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) AsStringArray() (v []string)
func (TaskListResponseDataFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u TaskListResponseDataFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseDataFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseDataFieldValueUnion) UnmarshalJSON(data []byte) error
type TaskListResponseDataRelationship ¶ added in v0.4.1
type TaskListResponseDataRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskListResponseDataRelationship) RawJSON ¶ added in v0.4.1
func (r TaskListResponseDataRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskListResponseDataRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskListResponseDataRelationship) UnmarshalJSON(data []byte) error
type TaskNewParams ¶ added in v0.4.1
type TaskNewParams struct {
// Field values for the new task. Tasks only support the documented system fields,
// all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string)
// and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the
// <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to
// discover the available fields. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields TaskNewParamsFields `json:"fields,omitzero" api:"required"`
// Relationships to set on the new task. System relationships use a `$` prefix
// (e.g. `$account`, `$assignedTo`); custom relationships use their bare slug.
// `$assignedTo` is required. Each value is a single entity ID or an array of IDs.
// Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u>
// to list available relationship keys.
Relationships map[string]TaskNewParamsRelationshipUnion `json:"relationships,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (TaskNewParams) MarshalJSON ¶ added in v0.4.1
func (r TaskNewParams) MarshalJSON() (data []byte, err error)
func (*TaskNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskNewParams) UnmarshalJSON(data []byte) error
type TaskNewParamsFields ¶ added in v0.4.1
type TaskNewParamsFields struct {
// Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.
Status string `json:"$status" api:"required"`
// Title of the task.
Title string `json:"$title" api:"required"`
// Description of the task in markdown format.
Description param.Opt[string] `json:"$description,omitzero"`
// Due date as an ISO 8601 datetime string.
DueAt param.Opt[string] `json:"$dueAt,omitzero"`
// contains filtered or unexported fields
}
Field values for the new task. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Required: `$title` (string) and `$status` (one of `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> to discover the available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.
The properties Status, Title are required.
func (TaskNewParamsFields) MarshalJSON ¶ added in v0.4.1
func (r TaskNewParamsFields) MarshalJSON() (data []byte, err error)
func (*TaskNewParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskNewParamsFields) UnmarshalJSON(data []byte) error
type TaskNewParamsRelationshipUnion ¶ added in v0.4.1
type TaskNewParamsRelationshipUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TaskNewParamsRelationshipUnion) MarshalJSON ¶ added in v0.4.1
func (u TaskNewParamsRelationshipUnion) MarshalJSON() ([]byte, error)
func (*TaskNewParamsRelationshipUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *TaskNewParamsRelationshipUnion) UnmarshalJSON(data []byte) error
type TaskRetrieveResponse ¶ added in v0.4.1
type TaskRetrieveResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]TaskRetrieveResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]TaskRetrieveResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskRetrieveResponse) RawJSON ¶ added in v0.4.1
func (r TaskRetrieveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponse) UnmarshalJSON(data []byte) error
type TaskRetrieveResponseField ¶ added in v0.4.1
type TaskRetrieveResponseField struct {
// The field value, or null if unset.
Value TaskRetrieveResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskRetrieveResponseField) RawJSON ¶ added in v0.4.1
func (r TaskRetrieveResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponseField) UnmarshalJSON(data []byte) error
type TaskRetrieveResponseFieldValueAddress ¶ added in v0.4.1
type TaskRetrieveResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskRetrieveResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r TaskRetrieveResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type TaskRetrieveResponseFieldValueFullName ¶ added in v0.4.1
type TaskRetrieveResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskRetrieveResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r TaskRetrieveResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type TaskRetrieveResponseFieldValueUnion ¶ added in v0.4.1
type TaskRetrieveResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [TaskRetrieveResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [TaskRetrieveResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [TaskRetrieveResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TaskRetrieveResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskRetrieveResponseFieldValueAddress, TaskRetrieveResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (TaskRetrieveResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsAddress() (v TaskRetrieveResponseFieldValueAddress)
func (TaskRetrieveResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsBool() (v bool)
func (TaskRetrieveResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsFloat() (v float64)
func (TaskRetrieveResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsFullName() (v TaskRetrieveResponseFieldValueFullName)
func (TaskRetrieveResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsString() (v string)
func (TaskRetrieveResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) AsStringArray() (v []string)
func (TaskRetrieveResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u TaskRetrieveResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type TaskRetrieveResponseRelationship ¶ added in v0.4.1
type TaskRetrieveResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskRetrieveResponseRelationship) RawJSON ¶ added in v0.4.1
func (r TaskRetrieveResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskRetrieveResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskRetrieveResponseRelationship) UnmarshalJSON(data []byte) error
type TaskService ¶ added in v0.4.1
type TaskService struct {
Options []option.RequestOption
}
Tasks represent action items in Lightfield. Each task belongs to an account, is assigned to a member, and can optionally be associated with an opportunity.
TaskService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTaskService method instead.
func NewTaskService ¶ added in v0.4.1
func NewTaskService(opts ...option.RequestOption) (r TaskService)
NewTaskService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TaskService) Definitions ¶ added in v0.4.1
func (r *TaskService) Definitions(ctx context.Context, opts ...option.RequestOption) (res *TaskDefinitionsResponse, err error)
Returns the schema for the field and relationship definitions available on tasks. Useful for understanding the shape of task data before creating or updating records. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for more details.
**[Required scope](/using-the-api/scopes/):** `tasks:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*TaskService) Get ¶ added in v0.4.1
func (r *TaskService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *TaskRetrieveResponse, err error)
Retrieves a single task by its ID.
**[Required scope](/using-the-api/scopes/):** `tasks:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
func (*TaskService) List ¶ added in v0.4.1
func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *TaskListResponse, err error)
Returns a paginated list of tasks. Use `offset` and `limit` to paginate through results. See <u>[List endpoints](/using-the-api/list-endpoints/)</u> for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `tasks:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
func (*TaskService) New ¶ added in v0.4.1
func (r *TaskService) New(ctx context.Context, body TaskNewParams, opts ...option.RequestOption) (res *TaskCreateResponse, err error)
Creates a new task record. The `$title` and `$status` fields and the `$assignedTo` relationship are required.
If `$createdBy` is omitted it defaults to the authenticated user. The `$note` relationship is read-only — manage notes via their own relationships.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `tasks:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
func (*TaskService) Update ¶ added in v0.4.1
func (r *TaskService) Update(ctx context.Context, id string, body TaskUpdateParams, opts ...option.RequestOption) (res *TaskUpdateResponse, err error)
Updates an existing task by ID. Only included fields and relationships are modified.
The `$note` relationship is read-only — manage notes via their own relationships.
Supports idempotency via the `Idempotency-Key` header.
**[Required scope](/using-the-api/scopes/):** `tasks:update`
**[Rate limit category](/using-the-api/rate-limits/):** Write
type TaskUpdateParams ¶ added in v0.4.1
type TaskUpdateParams struct {
// Field values to update — only provided fields are modified; omitted fields are
// left unchanged. Tasks only support the documented system fields, all prefixed
// with `$` (e.g. `$title`, `$status`). Call the
// <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> for
// available fields. See
// <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for
// value type details.
Fields TaskUpdateParamsFields `json:"fields,omitzero"`
// Relationship operations to apply. System relationships use a `$` prefix (e.g.
// `$account`, `$assignedTo`). Each value is an operation object with `add`,
// `remove`, or `replace`.
Relationships map[string]TaskUpdateParamsRelationship `json:"relationships,omitzero"`
// contains filtered or unexported fields
}
func (TaskUpdateParams) MarshalJSON ¶ added in v0.4.1
func (r TaskUpdateParams) MarshalJSON() (data []byte, err error)
func (*TaskUpdateParams) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateParams) UnmarshalJSON(data []byte) error
type TaskUpdateParamsFields ¶ added in v0.4.1
type TaskUpdateParamsFields struct {
// Description of the task in markdown format.
Description param.Opt[string] `json:"$description,omitzero"`
// Due date as an ISO 8601 datetime string.
DueAt param.Opt[string] `json:"$dueAt,omitzero"`
// Task status. One of: `TODO`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`.
Status param.Opt[string] `json:"$status,omitzero"`
// Title of the task.
Title param.Opt[string] `json:"$title,omitzero"`
// contains filtered or unexported fields
}
Field values to update — only provided fields are modified; omitted fields are left unchanged. Tasks only support the documented system fields, all prefixed with `$` (e.g. `$title`, `$status`). Call the <u>[definitions endpoint](/api/resources/task/methods/definitions)</u> for available fields. See <u>[Fields and relationships](/using-the-api/fields-and-relationships/)</u> for value type details.
func (TaskUpdateParamsFields) MarshalJSON ¶ added in v0.4.1
func (r TaskUpdateParamsFields) MarshalJSON() (data []byte, err error)
func (*TaskUpdateParamsFields) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateParamsFields) UnmarshalJSON(data []byte) error
type TaskUpdateParamsRelationship ¶ added in v0.4.1
type TaskUpdateParamsRelationship struct {
// Entity ID(s) to add to the relationship.
Add TaskUpdateParamsRelationshipAddUnion `json:"add,omitzero"`
// Entity ID(s) to remove from the relationship.
Remove TaskUpdateParamsRelationshipRemoveUnion `json:"remove,omitzero"`
// Entity ID(s) to set as the entire relationship, replacing all existing
// associations.
Replace TaskUpdateParamsRelationshipReplaceUnion `json:"replace,omitzero"`
// contains filtered or unexported fields
}
An operation to modify a relationship. Provide one of `add`, `remove`, or `replace`.
func (TaskUpdateParamsRelationship) MarshalJSON ¶ added in v0.4.1
func (r TaskUpdateParamsRelationship) MarshalJSON() (data []byte, err error)
func (*TaskUpdateParamsRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateParamsRelationship) UnmarshalJSON(data []byte) error
type TaskUpdateParamsRelationshipAddUnion ¶ added in v0.4.1
type TaskUpdateParamsRelationshipAddUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TaskUpdateParamsRelationshipAddUnion) MarshalJSON ¶ added in v0.4.1
func (u TaskUpdateParamsRelationshipAddUnion) MarshalJSON() ([]byte, error)
func (*TaskUpdateParamsRelationshipAddUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *TaskUpdateParamsRelationshipAddUnion) UnmarshalJSON(data []byte) error
type TaskUpdateParamsRelationshipRemoveUnion ¶ added in v0.4.1
type TaskUpdateParamsRelationshipRemoveUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TaskUpdateParamsRelationshipRemoveUnion) MarshalJSON ¶ added in v0.4.1
func (u TaskUpdateParamsRelationshipRemoveUnion) MarshalJSON() ([]byte, error)
func (*TaskUpdateParamsRelationshipRemoveUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *TaskUpdateParamsRelationshipRemoveUnion) UnmarshalJSON(data []byte) error
type TaskUpdateParamsRelationshipReplaceUnion ¶ added in v0.4.1
type TaskUpdateParamsRelationshipReplaceUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TaskUpdateParamsRelationshipReplaceUnion) MarshalJSON ¶ added in v0.4.1
func (u TaskUpdateParamsRelationshipReplaceUnion) MarshalJSON() ([]byte, error)
func (*TaskUpdateParamsRelationshipReplaceUnion) UnmarshalJSON ¶ added in v0.4.1
func (u *TaskUpdateParamsRelationshipReplaceUnion) UnmarshalJSON(data []byte) error
type TaskUpdateResponse ¶ added in v0.4.1
type TaskUpdateResponse struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the entity was created.
CreatedAt string `json:"createdAt" api:"required"`
// Map of field names to their typed values. System fields are prefixed with `$`
// (e.g. `$name`, `$email`); custom attributes use their bare slug.
Fields map[string]TaskUpdateResponseField `json:"fields" api:"required"`
// URL to view the entity in the Lightfield web app, or null.
HTTPLink string `json:"httpLink" api:"required"`
// Map of relationship names to their associated entities. System relationships are
// prefixed with `$` (e.g. `$owner`, `$contact`).
Relationships map[string]TaskUpdateResponseRelationship `json:"relationships" api:"required"`
// ISO 8601 timestamp of when the entity was last updated, or null.
UpdatedAt string `json:"updatedAt" api:"required"`
// External identifier for the entity, or null if unset.
ExternalID string `json:"externalId" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Fields respjson.Field
HTTPLink respjson.Field
Relationships respjson.Field
UpdatedAt respjson.Field
ExternalID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskUpdateResponse) RawJSON ¶ added in v0.4.1
func (r TaskUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponse) UnmarshalJSON(data []byte) error
type TaskUpdateResponseField ¶ added in v0.4.1
type TaskUpdateResponseField struct {
// The field value, or null if unset.
Value TaskUpdateResponseFieldValueUnion `json:"value" api:"required"`
// The data type of the field.
//
// Any of "ADDRESS", "CHECKBOX", "CURRENCY", "DATETIME", "EMAIL", "FULL_NAME",
// "MARKDOWN", "MULTI_SELECT", "NUMBER", "SINGLE_SELECT", "SOCIAL_HANDLE",
// "TELEPHONE", "TEXT", "URL".
ValueType string `json:"valueType" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Value respjson.Field
ValueType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskUpdateResponseField) RawJSON ¶ added in v0.4.1
func (r TaskUpdateResponseField) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponseField) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponseField) UnmarshalJSON(data []byte) error
type TaskUpdateResponseFieldValueAddress ¶ added in v0.4.1
type TaskUpdateResponseFieldValueAddress struct {
// City name.
City string `json:"city" api:"nullable"`
// 2-letter ISO 3166-1 alpha-2 country code.
Country string `json:"country" api:"nullable"`
// Latitude coordinate.
Latitude float64 `json:"latitude" api:"nullable"`
// Longitude coordinate.
Longitude float64 `json:"longitude" api:"nullable"`
// Postal or ZIP code.
PostalCode string `json:"postalCode" api:"nullable"`
// State or province.
State string `json:"state" api:"nullable"`
// Street address line 1.
Street string `json:"street" api:"nullable"`
// Street address line 2.
Street2 string `json:"street2" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskUpdateResponseFieldValueAddress) RawJSON ¶ added in v0.4.1
func (r TaskUpdateResponseFieldValueAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponseFieldValueAddress) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponseFieldValueAddress) UnmarshalJSON(data []byte) error
type TaskUpdateResponseFieldValueFullName ¶ added in v0.4.1
type TaskUpdateResponseFieldValueFullName struct {
// The contact's first name.
FirstName string `json:"firstName" api:"nullable"`
// The contact's last name.
LastName string `json:"lastName" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskUpdateResponseFieldValueFullName) RawJSON ¶ added in v0.4.1
func (r TaskUpdateResponseFieldValueFullName) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponseFieldValueFullName) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponseFieldValueFullName) UnmarshalJSON(data []byte) error
type TaskUpdateResponseFieldValueUnion ¶ added in v0.4.1
type TaskUpdateResponseFieldValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
City string `json:"city"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
Country string `json:"country"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
Latitude float64 `json:"latitude"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
Longitude float64 `json:"longitude"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
PostalCode string `json:"postalCode"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
State string `json:"state"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
Street string `json:"street"`
// This field is from variant [TaskUpdateResponseFieldValueAddress].
Street2 string `json:"street2"`
// This field is from variant [TaskUpdateResponseFieldValueFullName].
FirstName string `json:"firstName"`
// This field is from variant [TaskUpdateResponseFieldValueFullName].
LastName string `json:"lastName"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfStringArray respjson.Field
City respjson.Field
Country respjson.Field
Latitude respjson.Field
Longitude respjson.Field
PostalCode respjson.Field
State respjson.Field
Street respjson.Field
Street2 respjson.Field
FirstName respjson.Field
LastName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TaskUpdateResponseFieldValueUnion contains all possible properties and values from [string], [float64], [bool], [[]string], TaskUpdateResponseFieldValueAddress, TaskUpdateResponseFieldValueFullName.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfStringArray]
func (TaskUpdateResponseFieldValueUnion) AsAddress ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsAddress() (v TaskUpdateResponseFieldValueAddress)
func (TaskUpdateResponseFieldValueUnion) AsBool ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsBool() (v bool)
func (TaskUpdateResponseFieldValueUnion) AsFloat ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsFloat() (v float64)
func (TaskUpdateResponseFieldValueUnion) AsFullName ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsFullName() (v TaskUpdateResponseFieldValueFullName)
func (TaskUpdateResponseFieldValueUnion) AsString ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsString() (v string)
func (TaskUpdateResponseFieldValueUnion) AsStringArray ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) AsStringArray() (v []string)
func (TaskUpdateResponseFieldValueUnion) RawJSON ¶ added in v0.4.1
func (u TaskUpdateResponseFieldValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponseFieldValueUnion) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponseFieldValueUnion) UnmarshalJSON(data []byte) error
type TaskUpdateResponseRelationship ¶ added in v0.4.1
type TaskUpdateResponseRelationship struct {
// Whether the relationship is `has_one` or `has_many`.
Cardinality string `json:"cardinality" api:"required"`
// The type of the related object (e.g. `account`, `contact`).
ObjectType string `json:"objectType" api:"required"`
// IDs of the related entities.
Values []string `json:"values" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cardinality respjson.Field
ObjectType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (TaskUpdateResponseRelationship) RawJSON ¶ added in v0.4.1
func (r TaskUpdateResponseRelationship) RawJSON() string
Returns the unmodified JSON received from the API
func (*TaskUpdateResponseRelationship) UnmarshalJSON ¶ added in v0.4.1
func (r *TaskUpdateResponseRelationship) UnmarshalJSON(data []byte) error
type WorkflowRunService ¶ added in v0.4.1
type WorkflowRunService struct {
Options []option.RequestOption
}
Workflow runs represent executions of automated workflows.
WorkflowRunService contains methods and other services that help with interacting with the Lightfield API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWorkflowRunService method instead.
func NewWorkflowRunService ¶ added in v0.4.1
func NewWorkflowRunService(opts ...option.RequestOption) (r WorkflowRunService)
NewWorkflowRunService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WorkflowRunService) Status ¶ added in v0.4.1
func (r *WorkflowRunService) Status(ctx context.Context, runID string, opts ...option.RequestOption) (res *WorkflowRunStatusResponse, err error)
Returns the current status of a workflow run.
type WorkflowRunStatusResponse ¶ added in v0.4.1
type WorkflowRunStatusResponse struct {
// Current status of the workflow run (e.g. `running`, `completed`, `failed`).
Status string `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WorkflowRunStatusResponse) RawJSON ¶ added in v0.4.1
func (r WorkflowRunStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*WorkflowRunStatusResponse) UnmarshalJSON ¶ added in v0.4.1
func (r *WorkflowRunStatusResponse) UnmarshalJSON(data []byte) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|