Documentation
¶
Overview ¶
Package kintone provides a client for the kintone REST API.
Index ¶
- func IsErrorCode(err error, code string) bool
- func Quote(s string) string
- type APILink
- type APISchema
- type APIs
- type Accessibility
- type ActionMapping
- type AddAppRequest
- type AddSpaceFromTemplateRequest
- type AdminNotes
- type AggregationType
- type Alignment
- type AllRecordsByIDRequest
- type AllRecordsError
- type App
- type AppAction
- type AppActions
- type AppDeployStatus
- type AppDeployment
- type AppIcon
- type AppIconType
- type AppPermissions
- type AppPlugin
- type AppPluginConfig
- type AppPlugins
- type AppRevision
- type AppRight
- type AppSpace
- type AppStatistics
- type AppStatus
- type AssigneesUpdate
- type BulkError
- type BulkRequest
- func (b *BulkRequest) AddRecord(app int64, record Record) *BulkResult[RecordRevision]
- func (b *BulkRequest) AddRecords(app int64, records []Record) *BulkResult[[]RecordRevision]
- func (b *BulkRequest) DeleteRecords(app int64, ids, revisions []int64) *BulkResult[struct{}]
- func (b *BulkRequest) Send(ctx context.Context) error
- func (b *BulkRequest) UpdateAssignees(app int64, update AssigneesUpdate) *BulkResult[int64]
- func (b *BulkRequest) UpdateRecord(app int64, update RecordUpdate) *BulkResult[int64]
- func (b *BulkRequest) UpdateRecords(app int64, updates []RecordUpdate) *BulkResult[[]UpdatedRecord]
- func (b *BulkRequest) UpdateStatus(app int64, update StatusUpdate) *BulkResult[int64]
- func (b *BulkRequest) UpdateStatuses(app int64, updates []StatusUpdate) *BulkResult[[]RecordRevision]
- func (b *BulkRequest) UpsertRecords(app int64, updates []RecordUpdate) *BulkResult[[]UpdatedRecord]
- type BulkResult
- type CalcFormat
- type Categories
- type Category
- type ChartMode
- type ChartType
- type Client
- func (c *Client) AddAllRecords(ctx context.Context, app int64, records []Record) ([]RecordRevision, error)
- func (c *Client) AddApp(ctx context.Context, req AddAppRequest) (AppRevision, error)
- func (c *Client) AddAppPlugins(ctx context.Context, app int64, ids []string, revision int64) (int64, error)
- func (c *Client) AddComment(ctx context.Context, app, record int64, text string, mentions ...Mention) (int64, error)
- func (c *Client) AddFormFields(ctx context.Context, app int64, properties map[string]FieldProperty, ...) (int64, error)
- func (c *Client) AddGuests(ctx context.Context, guests []Guest) error
- func (c *Client) AddRecord(ctx context.Context, app int64, record Record) (RecordRevision, error)
- func (c *Client) AddRecords(ctx context.Context, app int64, records []Record) ([]RecordRevision, error)
- func (c *Client) AddSpace(ctx context.Context, name string) (int64, error)
- func (c *Client) AddSpaceFromTemplate(ctx context.Context, req AddSpaceFromTemplateRequest) (int64, error)
- func (c *Client) AddThread(ctx context.Context, space int64, name string) (int64, error)
- func (c *Client) AddThreadComment(ctx context.Context, space, thread int64, comment ThreadComment) (int64, error)
- func (c *Client) AllApps(ctx context.Context, req GetAppsRequest) iter.Seq2[App, error]
- func (c *Client) AllComments(ctx context.Context, req GetCommentsRequest) iter.Seq2[Comment, error]
- func (c *Client) AllRecords(ctx context.Context, req CreateCursorRequest) iter.Seq2[Record, error]
- func (c *Client) AllRecordsByID(ctx context.Context, req AllRecordsByIDRequest) iter.Seq2[Record, error]
- func (c *Client) CreateCursor(ctx context.Context, req CreateCursorRequest) (*Cursor, error)
- func (c *Client) DeleteAllRecords(ctx context.Context, app int64, ids, revisions []int64) error
- func (c *Client) DeleteComment(ctx context.Context, app, record, comment int64) error
- func (c *Client) DeleteCursor(ctx context.Context, id string) error
- func (c *Client) DeleteFormFields(ctx context.Context, app int64, fields []string, revision int64) (int64, error)
- func (c *Client) DeleteGuests(ctx context.Context, codes []string) error
- func (c *Client) DeleteRecords(ctx context.Context, app int64, ids, revisions []int64) error
- func (c *Client) DeleteSpace(ctx context.Context, id int64) error
- func (c *Client) DeployApps(ctx context.Context, apps []AppDeployment) error
- func (c *Client) DownloadFile(ctx context.Context, fileKey string) (io.ReadCloser, string, error)
- func (c *Client) EvaluateRecordPermissions(ctx context.Context, app int64, ids []int64) ([]RecordAccess, error)
- func (c *Client) GetAPISchema(ctx context.Context, id string) (*APISchema, error)
- func (c *Client) GetAPIs(ctx context.Context) (*APIs, error)
- func (c *Client) GetAdminNotes(ctx context.Context, req GetAppSettingsRequest) (*AdminNotes, error)
- func (c *Client) GetApp(ctx context.Context, id int64) (*App, error)
- func (c *Client) GetAppActions(ctx context.Context, req GetAppSettingsRequest) (*AppActions, error)
- func (c *Client) GetAppPermissions(ctx context.Context, req GetAppSettingsRequest) (*AppPermissions, error)
- func (c *Client) GetAppPluginConfig(ctx context.Context, req GetAppPluginConfigRequest) (*AppPluginConfig, error)
- func (c *Client) GetAppPlugins(ctx context.Context, req GetAppSettingsRequest) (*AppPlugins, error)
- func (c *Client) GetApps(ctx context.Context, req GetAppsRequest) ([]App, error)
- func (c *Client) GetAppsStatistics(ctx context.Context, req GetAppsStatisticsRequest) ([]AppStatistics, error)
- func (c *Client) GetCategories(ctx context.Context, req GetAppSettingsRequest) (*Categories, error)
- func (c *Client) GetComments(ctx context.Context, req GetCommentsRequest) (*GetCommentsResponse, error)
- func (c *Client) GetCustomization(ctx context.Context, req GetAppSettingsRequest) (*Customization, error)
- func (c *Client) GetDeployStatus(ctx context.Context, apps []int64) ([]AppDeployStatus, error)
- func (c *Client) GetFieldPermissions(ctx context.Context, req GetAppSettingsRequest) (*FieldPermissions, error)
- func (c *Client) GetFormFields(ctx context.Context, req GetAppSettingsRequest) (*FormFields, error)
- func (c *Client) GetFormLayout(ctx context.Context, req GetAppSettingsRequest) (*FormLayout, error)
- func (c *Client) GetGeneralNotifications(ctx context.Context, req GetAppSettingsRequest) (*GeneralNotifications, error)
- func (c *Client) GetGeneralSettings(ctx context.Context, req GetAppSettingsRequest) (*GeneralSettings, error)
- func (c *Client) GetPerRecordNotifications(ctx context.Context, req GetAppSettingsRequest) (*PerRecordNotifications, error)
- func (c *Client) GetPluginApps(ctx context.Context, req GetPluginAppsRequest) ([]PluginApp, error)
- func (c *Client) GetPlugins(ctx context.Context, req GetPluginsRequest) ([]Plugin, error)
- func (c *Client) GetProcessManagement(ctx context.Context, req GetAppSettingsRequest) (*ProcessManagement, error)
- func (c *Client) GetRecord(ctx context.Context, app, id int64) (Record, error)
- func (c *Client) GetRecordPermissions(ctx context.Context, req GetAppSettingsRequest) (*RecordPermissions, error)
- func (c *Client) GetRecords(ctx context.Context, req GetRecordsRequest) (*GetRecordsResponse, error)
- func (c *Client) GetRecordsByCursor(ctx context.Context, id string) (records []Record, next bool, err error)
- func (c *Client) GetReminderNotifications(ctx context.Context, req GetAppSettingsRequest) (*ReminderNotifications, error)
- func (c *Client) GetReports(ctx context.Context, req GetAppSettingsRequest) (*Reports, error)
- func (c *Client) GetRequiredPlugins(ctx context.Context, req GetRequiredPluginsRequest) ([]Plugin, error)
- func (c *Client) GetSpace(ctx context.Context, id int64) (*Space, error)
- func (c *Client) GetSpaceMembers(ctx context.Context, id int64) ([]SpaceMember, error)
- func (c *Client) GetSpacesStatistics(ctx context.Context, req GetSpacesStatisticsRequest) ([]SpaceStatistics, error)
- func (c *Client) GetViews(ctx context.Context, req GetAppSettingsRequest) (*Views, error)
- func (c *Client) InstallPlugin(ctx context.Context, fileKey string) (PluginVersion, error)
- func (c *Client) MoveApp(ctx context.Context, app, space int64) error
- func (c *Client) NewBulkRequest() *BulkRequest
- func (c *Client) RevertApps(ctx context.Context, apps []AppDeployment) error
- func (c *Client) UninstallPlugin(ctx context.Context, id string) error
- func (c *Client) UpdateAdminNotes(ctx context.Context, app int64, notes AdminNotes, revision int64) (int64, error)
- func (c *Client) UpdateAllRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
- func (c *Client) UpdateAppActions(ctx context.Context, app int64, actions map[string]AppAction, revision int64) (*UpdatedAppActions, error)
- func (c *Client) UpdateAppPermissions(ctx context.Context, app int64, rights []AppRight, revision int64) (int64, error)
- func (c *Client) UpdateAppPluginConfig(ctx context.Context, app int64, id string, config map[string]string) (int64, error)
- func (c *Client) UpdateAssignees(ctx context.Context, app int64, update AssigneesUpdate) (int64, error)
- func (c *Client) UpdateCategories(ctx context.Context, app int64, settings Categories, revision int64) (int64, error)
- func (c *Client) UpdateCustomization(ctx context.Context, app int64, customization Customization, revision int64) (int64, error)
- func (c *Client) UpdateFieldPermissions(ctx context.Context, app int64, rights []FieldRight, revision int64) (int64, error)
- func (c *Client) UpdateFormFields(ctx context.Context, app int64, properties map[string]FieldProperty, ...) (int64, error)
- func (c *Client) UpdateFormLayout(ctx context.Context, app int64, layout []LayoutRow, revision int64) (int64, error)
- func (c *Client) UpdateGeneralNotifications(ctx context.Context, app int64, settings GeneralNotifications, revision int64) (int64, error)
- func (c *Client) UpdateGeneralSettings(ctx context.Context, app int64, settings GeneralSettings, revision int64) (int64, error)
- func (c *Client) UpdateGuestMembers(ctx context.Context, id int64, codes []string) error
- func (c *Client) UpdatePerRecordNotifications(ctx context.Context, app int64, notifications []PerRecordNotification, ...) (int64, error)
- func (c *Client) UpdatePlugin(ctx context.Context, id, fileKey string) (PluginVersion, error)
- func (c *Client) UpdateProcessManagement(ctx context.Context, app int64, settings ProcessManagement, revision int64) (int64, error)
- func (c *Client) UpdateRecord(ctx context.Context, app int64, update RecordUpdate) (int64, error)
- func (c *Client) UpdateRecordPermissions(ctx context.Context, app int64, rights []RecordRight, revision int64) (int64, error)
- func (c *Client) UpdateRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
- func (c *Client) UpdateReminderNotifications(ctx context.Context, app int64, settings ReminderNotifications, revision int64) (int64, error)
- func (c *Client) UpdateReports(ctx context.Context, app int64, reports map[string]Report, revision int64) (*UpdatedReports, error)
- func (c *Client) UpdateSpace(ctx context.Context, req UpdateSpaceRequest) error
- func (c *Client) UpdateSpaceBody(ctx context.Context, id int64, body string) error
- func (c *Client) UpdateSpaceMembers(ctx context.Context, id int64, members []SpaceMember) error
- func (c *Client) UpdateStatus(ctx context.Context, app int64, update StatusUpdate) (int64, error)
- func (c *Client) UpdateStatuses(ctx context.Context, app int64, updates []StatusUpdate) ([]RecordRevision, error)
- func (c *Client) UpdateThread(ctx context.Context, req UpdateThreadRequest) error
- func (c *Client) UpdateViews(ctx context.Context, app int64, views map[string]View, revision int64) (*UpdatedViews, error)
- func (c *Client) UploadFile(ctx context.Context, name string, r io.Reader) (string, error)
- func (c *Client) UpsertAllRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
- func (c *Client) UpsertRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
- func (c *Client) WaitForDeploy(ctx context.Context, apps []int64) error
- type Comment
- type CoverType
- type CreateAppPermission
- type CreateCursorRequest
- type Cursor
- type Customization
- type CustomizationFile
- type CustomizationFileType
- type CustomizationFiles
- type CustomizationScope
- type DayOfWeek
- type DeployStatus
- type Entity
- type EntityType
- type Error
- type ErrorDetail
- type ExecutableUser
- type Field
- type FieldAccessRights
- type FieldEntity
- type FieldMapping
- type FieldOption
- type FieldPermissions
- type FieldProperty
- type FieldRight
- type FieldRightEntity
- type FieldSize
- type FieldType
- type FileInfo
- type FormFields
- type FormLayout
- type GeneralNotification
- type GeneralNotifications
- type GeneralSettings
- type GetAppPluginConfigRequest
- type GetAppSettingsRequest
- type GetAppsRequest
- type GetAppsStatisticsRequest
- type GetCommentsRequest
- type GetCommentsResponse
- type GetPluginAppsRequest
- type GetPluginsRequest
- type GetRecordsRequest
- type GetRecordsResponse
- type GetRequiredPluginsRequest
- type GetSpacesStatisticsRequest
- type Guest
- type LayoutField
- type LayoutRow
- type LayoutType
- type LinkProtocol
- type Locale
- type Lookup
- type MappingSourceType
- type Mention
- type NumberPrecision
- type Operation
- type Option
- func WithAPIToken(tokens ...string) Option
- func WithAcceptLanguage(language string) Option
- func WithBasicAuth(username, password string) Option
- func WithGuestSpace(id int64) Option
- func WithHTTPClient(httpClient *http.Client) Option
- func WithOAuthToken(token string) Option
- func WithPassword(username, password string) Option
- func WithUserAgent(userAgent string) Option
- type PerRecordNotification
- type PerRecordNotifications
- type PeriodicReport
- type Plugin
- type PluginApp
- type PluginVersion
- type ProcessAction
- type ProcessActionType
- type ProcessAssignee
- type ProcessAssigneeType
- type ProcessManagement
- type ProcessState
- type QuarterPattern
- type Record
- type RecordAccess
- type RecordAccessRights
- type RecordPermissions
- type RecordRevision
- type RecordRight
- type RecordRightEntity
- type RecordUpdate
- type ReferenceTable
- type ReferenceTableCondition
- type RelatedApp
- type ReminderNotification
- type ReminderNotifications
- type ReminderTiming
- type Report
- type ReportAggregation
- type ReportGroup
- type ReportPeriod
- type ReportSort
- type ReportSortBy
- type Reports
- type RoundingMode
- type SortOrder
- type Space
- type SpaceMember
- type SpacePermissions
- type SpaceStatistics
- type StatusUpdate
- type SubtableRow
- type TargetEntity
- type Theme
- type ThreadComment
- type ThreadCommentFile
- type TimeUnit
- type TitleField
- type TitleSelectionMode
- type UnitPosition
- type UpdateKey
- type UpdateSpaceRequest
- type UpdateThreadRequest
- type UpdatedAppAction
- type UpdatedAppActions
- type UpdatedRecord
- type UpdatedReport
- type UpdatedReports
- type UpdatedView
- type UpdatedViews
- type View
- type ViewBuiltinType
- type ViewDevice
- type ViewType
- type Views
- type WarningError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorCode ¶
IsErrorCode reports whether err is an *Error with the code.
Types ¶
type APILink ¶
type APILink struct {
Link string `json:"link"`
}
APILink is the link to get the schema of an API.
type APISchema ¶
type APISchema struct {
ID string `json:"id"`
BaseURL string `json:"baseUrl"`
Path string `json:"path"`
HTTPMethod string `json:"httpMethod"`
Request jsontext.Value `json:"request"`
Response jsontext.Value `json:"response"`
Schemas map[string]jsontext.Value `json:"schemas"`
}
APISchema is the schema of an API. Request, Response and Schemas are JSON Schemas.
type Accessibility ¶
type Accessibility string
Accessibility is the access to a field.
const ( AccessibilityRead Accessibility = "READ" AccessibilityWrite Accessibility = "WRITE" AccessibilityNone Accessibility = "NONE" )
Accessibilities.
type ActionMapping ¶
type ActionMapping struct {
SrcType MappingSourceType `json:"srcType"`
SrcField string `json:"srcField,omitzero"`
DestField string `json:"destField"`
}
ActionMapping is a mapping from the source to the field of the destination app. SrcField is set if SrcType is FIELD.
type AddAppRequest ¶
type AddAppRequest struct {
Name string `json:"name"`
Space int64 `json:"space,omitzero"`
Thread int64 `json:"thread,omitzero"`
}
AddAppRequest is the request of Client.AddApp.
type AddSpaceFromTemplateRequest ¶
type AddSpaceFromTemplateRequest struct {
ID int64
Name string
Members []SpaceMember
IsPrivate bool
IsGuest bool
FixedMember bool
}
AddSpaceFromTemplateRequest is the request of Client.AddSpaceFromTemplate. ID is the ID of the space template.
type AdminNotes ¶
type AdminNotes struct {
Content string `json:"content"`
IncludeInTemplateAndDuplicates *bool `json:"includeInTemplateAndDuplicates,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
AdminNotes is the notes for the app administrators.
type AggregationType ¶
type AggregationType string
AggregationType is the type of an aggregation.
const ( AggregationTypeCount AggregationType = "COUNT" AggregationTypeSum AggregationType = "SUM" AggregationTypeAverage AggregationType = "AVERAGE" AggregationTypeMax AggregationType = "MAX" AggregationTypeMin AggregationType = "MIN" )
Aggregation types.
type Alignment ¶
type Alignment string
Alignment is the alignment of the options of radio button and check box fields.
type AllRecordsByIDRequest ¶
AllRecordsByIDRequest is the request of Client.AllRecordsByID. Condition is the query condition, without order by, limit and offset. Use Quote to quote string values in Condition.
type AllRecordsError ¶
AllRecordsError is an error of the methods to process all records, such as Client.AddAllRecords. Processed is the number of the records processed before the error, and Err is the error of the bulk request.
func (*AllRecordsError) Error ¶
func (e *AllRecordsError) Error() string
func (*AllRecordsError) Unwrap ¶
func (e *AllRecordsError) Unwrap() error
Unwrap returns the error of the bulk request.
type App ¶
type App struct {
AppID int64 `json:"appId,string"`
Code string `json:"code"`
Name string `json:"name"`
Description string `json:"description"`
SpaceID int64 `json:"spaceId,string"`
ThreadID int64 `json:"threadId,string"`
CreatedAt time.Time `json:"createdAt"`
Creator Entity `json:"creator"`
ModifiedAt time.Time `json:"modifiedAt"`
Modifier Entity `json:"modifier"`
}
App is the information of an app. SpaceID and ThreadID are zero if the app does not belong to a space.
type AppAction ¶
type AppAction struct {
ID int64 `json:"id,string,omitzero"`
Name string `json:"name,omitzero"`
Index int `json:"index,string"`
DestApp *RelatedApp `json:"destApp,omitzero"`
Mappings []ActionMapping `json:"mappings,omitzero"`
Entities []FieldEntity `json:"entities,omitzero"`
FilterCond *string `json:"filterCond,omitzero"`
}
AppAction is the setting of an action of an app, which copies a record to DestApp.
type AppActions ¶
type AppActions struct {
Actions map[string]AppAction `json:"actions"`
Revision int64 `json:"revision,string"`
}
AppActions is the actions of an app, keyed by the action name.
type AppDeployStatus ¶
type AppDeployStatus struct {
App int64 `json:"app,string"`
Status DeployStatus `json:"status"`
}
AppDeployStatus is the deploy status of an app.
type AppDeployment ¶
AppDeployment is an app to deploy or revert. The revision is not checked if Revision is zero.
type AppIcon ¶
type AppIcon struct {
Type AppIconType `json:"type"`
Key string `json:"key,omitzero"`
File *FileInfo `json:"file,omitzero"`
}
AppIcon is the icon of an app. Key is set for preset icons, and File is set for uploaded images.
type AppIconType ¶
type AppIconType string
AppIconType is the type of an app icon.
const ( AppIconTypePreset AppIconType = "PRESET" AppIconTypeFile AppIconType = "FILE" )
App icon types.
type AppPermissions ¶
type AppPermissions struct {
Rights []AppRight `json:"rights"`
Revision int64 `json:"revision,string,omitzero"`
}
AppPermissions is the app permissions of an app, in order of priority.
type AppPlugin ¶
type AppPlugin struct {
ID string `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
}
AppPlugin is a plugin added to an app.
type AppPluginConfig ¶
type AppPluginConfig struct {
Config map[string]string `json:"config"`
Revision int64 `json:"revision,string"`
}
AppPluginConfig is the config of a plugin added to an app.
type AppPlugins ¶
type AppPlugins struct {
Plugins []AppPlugin `json:"plugins"`
Revision int64 `json:"revision,string"`
}
AppPlugins is the plugins added to an app.
type AppRevision ¶
AppRevision is the ID and the revision of an app.
type AppRight ¶
type AppRight struct {
Entity FieldEntity `json:"entity"`
IncludeSubs bool `json:"includeSubs,omitzero"`
AppEditable bool `json:"appEditable,omitzero"`
RecordViewable bool `json:"recordViewable,omitzero"`
RecordAddable bool `json:"recordAddable,omitzero"`
RecordEditable bool `json:"recordEditable,omitzero"`
RecordDeletable bool `json:"recordDeletable,omitzero"`
RecordImportable bool `json:"recordImportable,omitzero"`
RecordExportable bool `json:"recordExportable,omitzero"`
}
AppRight is an app permission of an entity.
type AppStatistics ¶
type AppStatistics struct {
ID int64 `json:"id,string"`
Name string `json:"name"`
Space *AppSpace `json:"space"`
AppGroup string `json:"appGroup"`
Status AppStatus `json:"status"`
RecordUpdatedAt time.Time `json:"recordUpdatedAt"`
RecordCount int64 `json:"recordCount,string"`
FieldCount int64 `json:"fieldCount,string"`
DailyRequestCount int64 `json:"dailyRequestCount,string"`
APITokenCount int64 `json:"apiTokenCount,string"`
WebhookCount int64 `json:"webhookCount,string"`
StorageUsage int64 `json:"storageUsage,string"`
Customized bool `json:"customized"`
Creator Entity `json:"creator"`
CreatedAt time.Time `json:"createdAt"`
Modifier Entity `json:"modifier"`
ModifiedAt time.Time `json:"modifiedAt"`
}
AppStatistics is the usage of an app. Space is nil if the app does not belong to a space.
type AppStatus ¶
type AppStatus string
AppStatus is the status of an app in the statistics. NOT_ACTIVATED means that the app has never been deployed, and CHANGED means that the app has settings not deployed yet.
type AssigneesUpdate ¶
type AssigneesUpdate struct {
ID int64 `json:"id"`
Assignees []string `json:"assignees"`
Revision int64 `json:"revision,omitzero"`
}
AssigneesUpdate is an update of the assignees of a record. Assignees are the login names of the users. The revision is not checked if Revision is zero.
type BulkError ¶
BulkError is an error of a bulk request. Index is the index of the request that failed, and Err is its error.
type BulkRequest ¶
type BulkRequest struct {
// contains filtered or unexported fields
}
BulkRequest is a bulk request, which sends the requests at once. Use the methods to add requests, and BulkRequest.Send to send them. The results of the requests are available after sending the bulk request.
func (*BulkRequest) AddRecord ¶
func (b *BulkRequest) AddRecord(app int64, record Record) *BulkResult[RecordRevision]
AddRecord adds a request to add a record. See Client.AddRecord.
func (*BulkRequest) AddRecords ¶
func (b *BulkRequest) AddRecords(app int64, records []Record) *BulkResult[[]RecordRevision]
AddRecords adds a request to add records. See Client.AddRecords.
func (*BulkRequest) DeleteRecords ¶
func (b *BulkRequest) DeleteRecords(app int64, ids, revisions []int64) *BulkResult[struct{}]
DeleteRecords adds a request to delete records. See Client.DeleteRecords.
func (*BulkRequest) Send ¶
func (b *BulkRequest) Send(ctx context.Context) error
Send sends the bulk request. If a request in the bulk request fails, it returns a *BulkError with the index of the request. Other errors are returned as is.
func (*BulkRequest) UpdateAssignees ¶
func (b *BulkRequest) UpdateAssignees(app int64, update AssigneesUpdate) *BulkResult[int64]
UpdateAssignees adds a request to update the assignees of a record. See Client.UpdateAssignees.
func (*BulkRequest) UpdateRecord ¶
func (b *BulkRequest) UpdateRecord(app int64, update RecordUpdate) *BulkResult[int64]
UpdateRecord adds a request to update a record. See Client.UpdateRecord.
func (*BulkRequest) UpdateRecords ¶
func (b *BulkRequest) UpdateRecords(app int64, updates []RecordUpdate) *BulkResult[[]UpdatedRecord]
UpdateRecords adds a request to update records. See Client.UpdateRecords.
func (*BulkRequest) UpdateStatus ¶
func (b *BulkRequest) UpdateStatus(app int64, update StatusUpdate) *BulkResult[int64]
UpdateStatus adds a request to update the status of a record. See Client.UpdateStatus.
func (*BulkRequest) UpdateStatuses ¶
func (b *BulkRequest) UpdateStatuses(app int64, updates []StatusUpdate) *BulkResult[[]RecordRevision]
UpdateStatuses adds a request to update the statuses of records. See Client.UpdateStatuses.
func (*BulkRequest) UpsertRecords ¶
func (b *BulkRequest) UpsertRecords(app int64, updates []RecordUpdate) *BulkResult[[]UpdatedRecord]
UpsertRecords adds a request to upsert records. See Client.UpsertRecords.
type BulkResult ¶
type BulkResult[T any] struct { // contains filtered or unexported fields }
BulkResult is the result of a request in a bulk request.
func (*BulkResult[T]) Value ¶
func (r *BulkResult[T]) Value() T
Value returns the result of the request. It returns the zero value before the bulk request is sent successfully.
type CalcFormat ¶
type CalcFormat string
CalcFormat is the display format of a calculated field.
const ( CalcFormatNumber CalcFormat = "NUMBER" CalcFormatNumberDigit CalcFormat = "NUMBER_DIGIT" CalcFormatDateTime CalcFormat = "DATETIME" CalcFormatDate CalcFormat = "DATE" CalcFormatTime CalcFormat = "TIME" CalcFormatHourMinute CalcFormat = "HOUR_MINUTE" CalcFormatDayHourMinute CalcFormat = "DAY_HOUR_MINUTE" )
Calculation formats.
type Categories ¶
type Categories struct {
Enabled *bool `json:"enabled,omitzero"`
Categories map[string]Category `json:"categories,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
Categories is the category settings of an app, keyed by the category name.
type Category ¶
type Category struct {
Name string `json:"name"`
Index int `json:"index,string"`
Children map[string]Category `json:"children"`
}
Category is a category with the child categories keyed by the name.
type ChartType ¶
type ChartType string
ChartType is the type of a graph.
const ( ChartTypeBar ChartType = "BAR" ChartTypeColumn ChartType = "COLUMN" ChartTypePie ChartType = "PIE" ChartTypeLine ChartType = "LINE" ChartTypePivotTable ChartType = "PIVOT_TABLE" ChartTypeTable ChartType = "TABLE" ChartTypeArea ChartType = "AREA" ChartTypeSpline ChartType = "SPLINE" ChartTypeSplineArea ChartType = "SPLINE_AREA" )
Chart types.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a kintone REST API client.
func (*Client) AddAllRecords ¶
func (c *Client) AddAllRecords(ctx context.Context, app int64, records []Record) ([]RecordRevision, error)
AddAllRecords adds records by splitting them into bulk requests. If a bulk request fails, it returns the records added by the earlier bulk requests and an *AllRecordsError.
func (*Client) AddApp ¶
func (c *Client) AddApp(ctx context.Context, req AddAppRequest) (AppRevision, error)
AddApp adds an app to the preview environment.
func (*Client) AddAppPlugins ¶
func (c *Client) AddAppPlugins(ctx context.Context, app int64, ids []string, revision int64) (int64, error)
AddAppPlugins adds plugins to an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) AddComment ¶
func (c *Client) AddComment(ctx context.Context, app, record int64, text string, mentions ...Mention) (int64, error)
AddComment adds a comment on a record and returns the comment ID.
func (*Client) AddFormFields ¶
func (c *Client) AddFormFields(ctx context.Context, app int64, properties map[string]FieldProperty, revision int64) (int64, error)
AddFormFields adds fields to an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) AddRecords ¶
func (c *Client) AddRecords(ctx context.Context, app int64, records []Record) ([]RecordRevision, error)
AddRecords adds records.
func (*Client) AddSpace ¶
AddSpace adds a public single thread space and returns the space ID. This uses an API in the API lab of kintone. The guest space of the client is not used.
func (*Client) AddSpaceFromTemplate ¶
func (c *Client) AddSpaceFromTemplate(ctx context.Context, req AddSpaceFromTemplateRequest) (int64, error)
AddSpaceFromTemplate adds a space from a space template and returns the space ID. The guest space of the client is not used.
func (*Client) AddThreadComment ¶
func (c *Client) AddThreadComment(ctx context.Context, space, thread int64, comment ThreadComment) (int64, error)
AddThreadComment adds a comment on a thread and returns the comment ID.
func (*Client) AllApps ¶
AllApps iterates over the apps, using Client.GetApps. Offset of the request is the number of apps to skip, and Limit is the number of apps to get in each request.
func (*Client) AllComments ¶
AllComments iterates over the comments on a record in the order of the request, using Client.GetComments. Offset of the request is the number of comments to skip, and Limit is the number of comments to get in each request.
func (*Client) AllRecords ¶
AllRecords iterates over the records using a cursor. If Size of the request is zero, 500 is used. The cursor is deleted when the iteration stops before getting all the records. If the cursor has a warning, a *WarningError is yielded after all the records.
for record, err := range client.AllRecords(ctx, kintone.CreateCursorRequest{App: app}) {
if err != nil {
return err
}
fmt.Println(record["$id"].Value)
}
func (*Client) AllRecordsByID ¶
func (c *Client) AllRecordsByID(ctx context.Context, req AllRecordsByIDRequest) iter.Seq2[Record, error]
AllRecordsByID iterates over the records in ascending order of the record ID, using Client.GetRecords with the condition on the record ID instead of a cursor. If Fields of the request does not contain $id, it is added. If any of the responses has a warning, a *WarningError is yielded after all the records.
func (*Client) CreateCursor ¶
CreateCursor creates a cursor.
func (*Client) DeleteAllRecords ¶
DeleteAllRecords deletes records by splitting them into bulk requests. The revisions are not checked if revisions is nil. If a bulk request fails, it returns an *AllRecordsError.
func (*Client) DeleteComment ¶
DeleteComment deletes a comment on a record.
func (*Client) DeleteCursor ¶
DeleteCursor deletes the cursor.
func (*Client) DeleteFormFields ¶
func (c *Client) DeleteFormFields(ctx context.Context, app int64, fields []string, revision int64) (int64, error)
DeleteFormFields deletes fields of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) DeleteGuests ¶
DeleteGuests deletes the guest users of the email addresses. The guest space of the client is not used.
func (*Client) DeleteRecords ¶
DeleteRecords deletes records. The revisions are not checked if revisions is nil.
func (*Client) DeleteSpace ¶
DeleteSpace deletes a space.
func (*Client) DeployApps ¶
func (c *Client) DeployApps(ctx context.Context, apps []AppDeployment) error
DeployApps deploys the settings of the apps in the preview environment to the production environment. Use Client.GetDeployStatus to check whether the deployment is finished.
func (*Client) DownloadFile ¶
DownloadFile downloads the file of the file key and returns the content and the content type. The caller must close the content.
func (*Client) EvaluateRecordPermissions ¶
func (c *Client) EvaluateRecordPermissions(ctx context.Context, app int64, ids []int64) ([]RecordAccess, error)
EvaluateRecordPermissions gets the permissions of the user on the records.
func (*Client) GetAPISchema ¶
GetAPISchema gets the schema of the API of the ID, for example "records/get". The guest space of the client is not used.
func (*Client) GetAPIs ¶
GetAPIs gets the list of the kintone REST APIs. The guest space of the client is not used.
func (*Client) GetAdminNotes ¶
func (c *Client) GetAdminNotes(ctx context.Context, req GetAppSettingsRequest) (*AdminNotes, error)
GetAdminNotes gets the notes for the administrators of an app. Lang of the request is not used.
func (*Client) GetAppActions ¶
func (c *Client) GetAppActions(ctx context.Context, req GetAppSettingsRequest) (*AppActions, error)
GetAppActions gets the actions of an app.
func (*Client) GetAppPermissions ¶
func (c *Client) GetAppPermissions(ctx context.Context, req GetAppSettingsRequest) (*AppPermissions, error)
GetAppPermissions gets the app permissions of an app. Lang of the request is not used.
func (*Client) GetAppPluginConfig ¶
func (c *Client) GetAppPluginConfig(ctx context.Context, req GetAppPluginConfigRequest) (*AppPluginConfig, error)
GetAppPluginConfig gets the config of a plugin added to an app. This uses an API in the API lab of kintone.
func (*Client) GetAppPlugins ¶
func (c *Client) GetAppPlugins(ctx context.Context, req GetAppSettingsRequest) (*AppPlugins, error)
GetAppPlugins gets the plugins added to an app.
func (*Client) GetAppsStatistics ¶
func (c *Client) GetAppsStatistics(ctx context.Context, req GetAppsStatisticsRequest) ([]AppStatistics, error)
GetAppsStatistics gets the usage of apps. The guest space of the client is not used.
func (*Client) GetCategories ¶
func (c *Client) GetCategories(ctx context.Context, req GetAppSettingsRequest) (*Categories, error)
GetCategories gets the category settings of an app. This uses an API in the API lab of kintone.
func (*Client) GetComments ¶
func (c *Client) GetComments(ctx context.Context, req GetCommentsRequest) (*GetCommentsResponse, error)
GetComments gets comments on a record.
func (*Client) GetCustomization ¶
func (c *Client) GetCustomization(ctx context.Context, req GetAppSettingsRequest) (*Customization, error)
GetCustomization gets the JavaScript and CSS customization of an app. Lang of the request is not used.
func (*Client) GetDeployStatus ¶
GetDeployStatus gets the deploy statuses of the apps.
func (*Client) GetFieldPermissions ¶
func (c *Client) GetFieldPermissions(ctx context.Context, req GetAppSettingsRequest) (*FieldPermissions, error)
GetFieldPermissions gets the field permissions of an app. Lang of the request is not used.
func (*Client) GetFormFields ¶
func (c *Client) GetFormFields(ctx context.Context, req GetAppSettingsRequest) (*FormFields, error)
GetFormFields gets the fields of an app, keyed by the field code.
func (*Client) GetFormLayout ¶
func (c *Client) GetFormLayout(ctx context.Context, req GetAppSettingsRequest) (*FormLayout, error)
GetFormLayout gets the layout of the form of an app. Lang of the request is not used.
func (*Client) GetGeneralNotifications ¶
func (c *Client) GetGeneralNotifications(ctx context.Context, req GetAppSettingsRequest) (*GeneralNotifications, error)
GetGeneralNotifications gets the general notification settings of an app. Lang of the request is not used.
func (*Client) GetGeneralSettings ¶
func (c *Client) GetGeneralSettings(ctx context.Context, req GetAppSettingsRequest) (*GeneralSettings, error)
GetGeneralSettings gets the general settings of an app.
func (*Client) GetPerRecordNotifications ¶
func (c *Client) GetPerRecordNotifications(ctx context.Context, req GetAppSettingsRequest) (*PerRecordNotifications, error)
GetPerRecordNotifications gets the per record notification settings of an app.
func (*Client) GetPluginApps ¶
GetPluginApps gets the apps which the plugin is added to. The guest space of the client is not used.
func (*Client) GetPlugins ¶
GetPlugins gets the installed plugins. The guest space of the client is not used.
func (*Client) GetProcessManagement ¶
func (c *Client) GetProcessManagement(ctx context.Context, req GetAppSettingsRequest) (*ProcessManagement, error)
GetProcessManagement gets the process management settings of an app.
func (*Client) GetRecordPermissions ¶
func (c *Client) GetRecordPermissions(ctx context.Context, req GetAppSettingsRequest) (*RecordPermissions, error)
GetRecordPermissions gets the record permissions of an app.
func (*Client) GetRecords ¶
func (c *Client) GetRecords(ctx context.Context, req GetRecordsRequest) (*GetRecordsResponse, error)
GetRecords gets records matching the query.
func (*Client) GetRecordsByCursor ¶
func (c *Client) GetRecordsByCursor(ctx context.Context, id string) (records []Record, next bool, err error)
GetRecordsByCursor gets the next records of the cursor. next reports whether there are more records to get.
func (*Client) GetReminderNotifications ¶
func (c *Client) GetReminderNotifications(ctx context.Context, req GetAppSettingsRequest) (*ReminderNotifications, error)
GetReminderNotifications gets the reminder notification settings of an app.
func (*Client) GetReports ¶
GetReports gets the graphs of an app.
func (*Client) GetRequiredPlugins ¶
func (c *Client) GetRequiredPlugins(ctx context.Context, req GetRequiredPluginsRequest) ([]Plugin, error)
GetRequiredPlugins gets the plugins that are required to be installed. The guest space of the client is not used.
func (*Client) GetSpaceMembers ¶
GetSpaceMembers gets the members of a space.
func (*Client) GetSpacesStatistics ¶
func (c *Client) GetSpacesStatistics(ctx context.Context, req GetSpacesStatisticsRequest) ([]SpaceStatistics, error)
GetSpacesStatistics gets the usage of spaces. The guest space of the client is not used.
func (*Client) InstallPlugin ¶
InstallPlugin installs the plugin of the file key, which is obtained by Client.UploadFile. The guest space of the client is not used.
func (*Client) MoveApp ¶
MoveApp moves an app to the space. If space is zero, the app is moved out of the space. The guest space of the client is not used.
func (*Client) NewBulkRequest ¶
func (c *Client) NewBulkRequest() *BulkRequest
NewBulkRequest creates a bulk request.
func (*Client) RevertApps ¶
func (c *Client) RevertApps(ctx context.Context, apps []AppDeployment) error
RevertApps discards the settings of the apps in the preview environment.
func (*Client) UninstallPlugin ¶
UninstallPlugin uninstalls the plugin. The guest space of the client is not used.
func (*Client) UpdateAdminNotes ¶
func (c *Client) UpdateAdminNotes(ctx context.Context, app int64, notes AdminNotes, revision int64) (int64, error)
UpdateAdminNotes updates the notes for the administrators of an app in the preview environment and returns the new revision. Content is always sent, and Revision of the notes is not used. The revision is not checked if revision is zero.
func (*Client) UpdateAllRecords ¶
func (c *Client) UpdateAllRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
UpdateAllRecords updates records by splitting them into bulk requests. If a bulk request fails, it returns the records updated by the earlier bulk requests and an *AllRecordsError.
func (*Client) UpdateAppActions ¶
func (c *Client) UpdateAppActions(ctx context.Context, app int64, actions map[string]AppAction, revision int64) (*UpdatedAppActions, error)
UpdateAppActions updates the actions of an app in the preview environment. The keys of actions are the action names before the update. The revision is not checked if revision is zero.
func (*Client) UpdateAppPermissions ¶
func (c *Client) UpdateAppPermissions(ctx context.Context, app int64, rights []AppRight, revision int64) (int64, error)
UpdateAppPermissions updates the app permissions of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) UpdateAppPluginConfig ¶
func (c *Client) UpdateAppPluginConfig(ctx context.Context, app int64, id string, config map[string]string) (int64, error)
UpdateAppPluginConfig updates the config of a plugin added to an app in the preview environment and returns the new revision. This uses an API in the API lab of kintone.
func (*Client) UpdateAssignees ¶
func (c *Client) UpdateAssignees(ctx context.Context, app int64, update AssigneesUpdate) (int64, error)
UpdateAssignees updates the assignees of a record and returns the new revision.
func (*Client) UpdateCategories ¶
func (c *Client) UpdateCategories(ctx context.Context, app int64, settings Categories, revision int64) (int64, error)
UpdateCategories updates the category settings of an app in the preview environment and returns the new revision. The keys of the categories are the category names before the update. Revision of the settings is not used. The revision is not checked if revision is zero. This uses an API in the API lab of kintone.
func (*Client) UpdateCustomization ¶
func (c *Client) UpdateCustomization(ctx context.Context, app int64, customization Customization, revision int64) (int64, error)
UpdateCustomization updates the JavaScript and CSS customization of an app in the preview environment and returns the new revision. Revision of the customization is not used. The revision is not checked if revision is zero.
func (*Client) UpdateFieldPermissions ¶
func (c *Client) UpdateFieldPermissions(ctx context.Context, app int64, rights []FieldRight, revision int64) (int64, error)
UpdateFieldPermissions updates the field permissions of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) UpdateFormFields ¶
func (c *Client) UpdateFormFields(ctx context.Context, app int64, properties map[string]FieldProperty, revision int64) (int64, error)
UpdateFormFields updates fields of an app in the preview environment and returns the new revision. The keys of properties are the field codes before the update. The revision is not checked if revision is zero.
func (*Client) UpdateFormLayout ¶
func (c *Client) UpdateFormLayout(ctx context.Context, app int64, layout []LayoutRow, revision int64) (int64, error)
UpdateFormLayout updates the layout of the form of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) UpdateGeneralNotifications ¶
func (c *Client) UpdateGeneralNotifications(ctx context.Context, app int64, settings GeneralNotifications, revision int64) (int64, error)
UpdateGeneralNotifications updates the general notification settings of an app in the preview environment and returns the new revision. Revision of the settings is not used. The revision is not checked if revision is zero.
func (*Client) UpdateGeneralSettings ¶
func (c *Client) UpdateGeneralSettings(ctx context.Context, app int64, settings GeneralSettings, revision int64) (int64, error)
UpdateGeneralSettings updates the general settings of an app in the preview environment and returns the new revision. Revision of the settings is not used. The revision is not checked if revision is zero.
func (*Client) UpdateGuestMembers ¶
UpdateGuestMembers updates the guest members of the guest space with the email addresses of the guest users. The guest space of the client is not used, and id is used instead.
func (*Client) UpdatePerRecordNotifications ¶
func (c *Client) UpdatePerRecordNotifications(ctx context.Context, app int64, notifications []PerRecordNotification, revision int64) (int64, error)
UpdatePerRecordNotifications updates the per record notification settings of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) UpdatePlugin ¶
UpdatePlugin updates the plugin with the file key, which is obtained by Client.UploadFile. The guest space of the client is not used.
func (*Client) UpdateProcessManagement ¶
func (c *Client) UpdateProcessManagement(ctx context.Context, app int64, settings ProcessManagement, revision int64) (int64, error)
UpdateProcessManagement updates the process management settings of an app in the preview environment and returns the new revision. Revision of the settings is not used. The revision is not checked if revision is zero.
func (*Client) UpdateRecord ¶
UpdateRecord updates a record and returns the new revision.
func (*Client) UpdateRecordPermissions ¶
func (c *Client) UpdateRecordPermissions(ctx context.Context, app int64, rights []RecordRight, revision int64) (int64, error)
UpdateRecordPermissions updates the record permissions of an app in the preview environment and returns the new revision. The revision is not checked if revision is zero.
func (*Client) UpdateRecords ¶
func (c *Client) UpdateRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
UpdateRecords updates records.
func (*Client) UpdateReminderNotifications ¶
func (c *Client) UpdateReminderNotifications(ctx context.Context, app int64, settings ReminderNotifications, revision int64) (int64, error)
UpdateReminderNotifications updates the reminder notification settings of an app in the preview environment and returns the new revision. Revision of the settings is not used. The revision is not checked if revision is zero.
func (*Client) UpdateReports ¶
func (c *Client) UpdateReports(ctx context.Context, app int64, reports map[string]Report, revision int64) (*UpdatedReports, error)
UpdateReports updates the graphs of an app in the preview environment. The keys of reports are the graph names before the update. The revision is not checked if revision is zero.
func (*Client) UpdateSpace ¶
func (c *Client) UpdateSpace(ctx context.Context, req UpdateSpaceRequest) error
UpdateSpace updates the settings of a space.
func (*Client) UpdateSpaceBody ¶
UpdateSpaceBody updates the body of a space in HTML.
func (*Client) UpdateSpaceMembers ¶
UpdateSpaceMembers updates the members of a space. The members with IsImplicit are sent as explicit members.
func (*Client) UpdateStatus ¶
UpdateStatus updates the status of a record and returns the new revision.
func (*Client) UpdateStatuses ¶
func (c *Client) UpdateStatuses(ctx context.Context, app int64, updates []StatusUpdate) ([]RecordRevision, error)
UpdateStatuses updates the statuses of records.
func (*Client) UpdateThread ¶
func (c *Client) UpdateThread(ctx context.Context, req UpdateThreadRequest) error
UpdateThread updates the name or the body of a thread.
func (*Client) UpdateViews ¶
func (c *Client) UpdateViews(ctx context.Context, app int64, views map[string]View, revision int64) (*UpdatedViews, error)
UpdateViews updates the views of an app in the preview environment. The keys of views are the view names before the update. The revision is not checked if revision is zero.
func (*Client) UploadFile ¶
UploadFile uploads a file and returns the file key. The content type of the file is detected from the extension of the name.
func (*Client) UpsertAllRecords ¶
func (c *Client) UpsertAllRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
UpsertAllRecords upserts records by splitting them into bulk requests. If a bulk request fails, it returns the records upserted by the earlier bulk requests and an *AllRecordsError.
func (*Client) UpsertRecords ¶
func (c *Client) UpsertRecords(ctx context.Context, app int64, updates []RecordUpdate) ([]UpdatedRecord, error)
UpsertRecords updates records, or adds them if they do not exist. To upsert a single record, call it with one update.
func (*Client) WaitForDeploy ¶
WaitForDeploy waits until the deployments of the apps finish, by polling Client.GetDeployStatus. It returns an error if any of the deployments fails or is canceled.
type Comment ¶
type Comment struct {
ID int64 `json:"id,string"`
Text string `json:"text"`
CreatedAt time.Time `json:"createdAt"`
Creator Entity `json:"creator"`
Mentions []Mention `json:"mentions"`
}
Comment is a comment on a record.
type CreateAppPermission ¶
type CreateAppPermission string
CreateAppPermission is who can create apps in a space.
const ( CreateAppPermissionEveryone CreateAppPermission = "EVERYONE" CreateAppPermissionAdmin CreateAppPermission = "ADMIN" )
Create app permissions.
type CreateCursorRequest ¶
type CreateCursorRequest struct {
App int64 `json:"app"`
Fields []string `json:"fields,omitzero"`
Query string `json:"query,omitzero"`
Size int64 `json:"size,omitzero"`
}
CreateCursorRequest is the request of Client.CreateCursor. Use Quote to quote string values in Query.
type Cursor ¶
type Cursor struct {
ID string `json:"id"`
TotalCount int64 `json:"totalCount,string"`
Warning string `json:"-"`
}
Cursor is a cursor to get records. Warning is the value of the X-Cybozu-Warning response header.
type Customization ¶
type Customization struct {
Scope CustomizationScope `json:"scope,omitzero"`
Desktop *CustomizationFiles `json:"desktop,omitzero"`
Mobile *CustomizationFiles `json:"mobile,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
Customization is the JavaScript and CSS customization of an app.
type CustomizationFile ¶
type CustomizationFile struct {
Type CustomizationFileType `json:"type"`
URL string `json:"url,omitzero"`
File *FileInfo `json:"file,omitzero"`
}
CustomizationFile is a file of the customization. URL is set for files specified by URL, and File is set for uploaded files.
type CustomizationFileType ¶
type CustomizationFileType string
CustomizationFileType is the type of a customization file.
const ( CustomizationFileTypeURL CustomizationFileType = "URL" CustomizationFileTypeFile CustomizationFileType = "FILE" )
Customization file types.
type CustomizationFiles ¶
type CustomizationFiles struct {
JS []CustomizationFile `json:"js,omitzero"`
CSS []CustomizationFile `json:"css,omitzero"`
}
CustomizationFiles is the JavaScript and CSS files of the customization.
type CustomizationScope ¶
type CustomizationScope string
CustomizationScope is the users the customization applies to.
const ( CustomizationScopeAll CustomizationScope = "ALL" CustomizationScopeAdmin CustomizationScope = "ADMIN" CustomizationScopeNone CustomizationScope = "NONE" )
Customization scopes.
type DayOfWeek ¶
type DayOfWeek string
DayOfWeek is a day of the week.
const ( DayOfWeekSunday DayOfWeek = "SUNDAY" DayOfWeekMonday DayOfWeek = "MONDAY" DayOfWeekTuesday DayOfWeek = "TUESDAY" DayOfWeekWednesday DayOfWeek = "WEDNESDAY" DayOfWeekThursday DayOfWeek = "THURSDAY" DayOfWeekFriday DayOfWeek = "FRIDAY" DayOfWeekSaturday DayOfWeek = "SATURDAY" )
Days of the week.
type DeployStatus ¶
type DeployStatus string
DeployStatus is the status of a deployment.
const ( DeployStatusProcessing DeployStatus = "PROCESSING" DeployStatusSuccess DeployStatus = "SUCCESS" DeployStatusFail DeployStatus = "FAIL" DeployStatusCancel DeployStatus = "CANCEL" )
Deploy statuses.
type EntityType ¶
type EntityType string
EntityType is the type of an entity.
const ( EntityTypeUser EntityType = "USER" EntityTypeGroup EntityType = "GROUP" EntityTypeOrganization EntityType = "ORGANIZATION" EntityTypeFieldEntity EntityType = "FIELD_ENTITY" EntityTypeCreator EntityType = "CREATOR" EntityTypeCustomField EntityType = "CUSTOM_FIELD" EntityTypeFunction EntityType = "FUNCTION" )
Entity types.
type Error ¶
type Error struct {
StatusCode int `json:"-"`
Header http.Header `json:"-"`
Code string `json:"code"`
ID string `json:"id"`
Message string `json:"message"`
Errors map[string]ErrorDetail `json:"errors,omitzero"`
}
Error is an error response from kintone. Header is the response header.
type ErrorDetail ¶
type ErrorDetail struct {
Messages []string `json:"messages"`
}
ErrorDetail is the error detail of a specific field or parameter.
type ExecutableUser ¶
type ExecutableUser struct {
Entities []TargetEntity `json:"entities"`
}
ExecutableUser is the users who can execute an action.
type Field ¶
Field is a field value of a record.
When decoded from a response, Value has the Go type corresponding to Type:
- string for text, number, calculated, date and time, radio button, drop-down, link, record number, status, $id and $revision fields
- []string for check box, multi-choice and category fields
- Entity for created by and updated by fields
- []Entity for user, department, group selection and assignee fields
- []FileInfo for attachment fields
- []SubtableRow for table fields
When writing records, Type can be omitted. For example,
kintone.Record{
"title": {Value: "Hello"},
"users": {Value: []kintone.Entity{{Code: "alice"}}},
"files": {Value: []kintone.FileInfo{{FileKey: fileKey}}},
}
func (*Field) UnmarshalJSON ¶
UnmarshalJSON decodes the field value into the Go type of the field type.
type FieldAccessRights ¶
FieldAccessRights is the access rights on a field.
type FieldEntity ¶
type FieldEntity struct {
Code string `json:"code,omitzero"`
Type EntityType `json:"type"`
}
FieldEntity is an entity specified by the type and the code, such as a user, department or group of the options of a user selection field.
type FieldMapping ¶
FieldMapping is a mapping of a field copied by a lookup field.
type FieldOption ¶
FieldOption is an option of a check box, radio button, multi-choice or drop-down field.
type FieldPermissions ¶
type FieldPermissions struct {
Rights []FieldRight `json:"rights"`
Revision int64 `json:"revision,string,omitzero"`
}
FieldPermissions is the field permissions of an app.
type FieldProperty ¶
type FieldProperty struct {
Type FieldType `json:"type"`
Code string `json:"code,omitzero"`
Label string `json:"label,omitzero"`
NoLabel *bool `json:"noLabel,omitzero"`
Required *bool `json:"required,omitzero"`
Unique *bool `json:"unique,omitzero"`
MaxValue *string `json:"maxValue,omitzero"`
MinValue *string `json:"minValue,omitzero"`
MaxLength *string `json:"maxLength,omitzero"`
MinLength *string `json:"minLength,omitzero"`
DefaultValue any `json:"defaultValue,omitzero"`
DefaultNowValue *bool `json:"defaultNowValue,omitzero"`
Options map[string]FieldOption `json:"options,omitzero"`
Align Alignment `json:"align,omitzero"`
Expression *string `json:"expression,omitzero"`
HideExpression *bool `json:"hideExpression,omitzero"`
Digit *bool `json:"digit,omitzero"`
ThumbnailSize string `json:"thumbnailSize,omitzero"`
Protocol LinkProtocol `json:"protocol,omitzero"`
Format CalcFormat `json:"format,omitzero"`
DisplayScale *string `json:"displayScale,omitzero"`
Unit *string `json:"unit,omitzero"`
UnitPosition UnitPosition `json:"unitPosition,omitzero"`
Entities []FieldEntity `json:"entities,omitzero"`
ReferenceTable *ReferenceTable `json:"referenceTable,omitzero"`
Lookup *Lookup `json:"lookup,omitzero"`
OpenGroup *bool `json:"openGroup,omitzero"`
Fields map[string]FieldProperty `json:"fields,omitzero"`
Enabled *bool `json:"enabled,omitzero"`
}
FieldProperty is the setting of a field in the form.
func (*FieldProperty) UnmarshalJSON ¶
func (p *FieldProperty) UnmarshalJSON(b []byte) error
UnmarshalJSON decodes the field property, accepting an empty string for the entities.
type FieldRight ¶
type FieldRight struct {
Code string `json:"code"`
Entities []FieldRightEntity `json:"entities"`
}
FieldRight is the permissions of the field of Code, in order of priority.
type FieldRightEntity ¶
type FieldRightEntity struct {
Accessibility Accessibility `json:"accessibility"`
Entity FieldEntity `json:"entity"`
IncludeSubs bool `json:"includeSubs,omitzero"`
}
FieldRightEntity is a field permission of an entity.
type FieldSize ¶
type FieldSize struct {
Width string `json:"width,omitzero"`
Height string `json:"height,omitzero"`
InnerHeight string `json:"innerHeight,omitzero"`
}
FieldSize is the size of a field in pixels. Height includes the field name, and InnerHeight does not.
type FieldType ¶
type FieldType string
FieldType is the type of a field.
const ( FieldTypeRecordNumber FieldType = "RECORD_NUMBER" FieldTypeID FieldType = "__ID__" FieldTypeRevision FieldType = "__REVISION__" FieldTypeCreator FieldType = "CREATOR" FieldTypeCreatedTime FieldType = "CREATED_TIME" FieldTypeModifier FieldType = "MODIFIER" FieldTypeUpdatedTime FieldType = "UPDATED_TIME" FieldTypeSingleLineText FieldType = "SINGLE_LINE_TEXT" FieldTypeMultiLineText FieldType = "MULTI_LINE_TEXT" FieldTypeRichText FieldType = "RICH_TEXT" FieldTypeNumber FieldType = "NUMBER" FieldTypeCalc FieldType = "CALC" FieldTypeCheckBox FieldType = "CHECK_BOX" FieldTypeRadioButton FieldType = "RADIO_BUTTON" FieldTypeMultiSelect FieldType = "MULTI_SELECT" FieldTypeDropDown FieldType = "DROP_DOWN" FieldTypeUserSelect FieldType = "USER_SELECT" FieldTypeOrganizationSelect FieldType = "ORGANIZATION_SELECT" FieldTypeGroupSelect FieldType = "GROUP_SELECT" FieldTypeDate FieldType = "DATE" FieldTypeTime FieldType = "TIME" FieldTypeDateTime FieldType = "DATETIME" FieldTypeLink FieldType = "LINK" FieldTypeFile FieldType = "FILE" FieldTypeSubtable FieldType = "SUBTABLE" FieldTypeCategory FieldType = "CATEGORY" FieldTypeStatus FieldType = "STATUS" FieldTypeStatusAssignee FieldType = "STATUS_ASSIGNEE" FieldTypeReferenceTable FieldType = "REFERENCE_TABLE" FieldTypeGroup FieldType = "GROUP" FieldTypeLabel FieldType = "LABEL" FieldTypeSpacer FieldType = "SPACER" FieldTypeHR FieldType = "HR" )
Field types.
type FileInfo ¶
type FileInfo struct {
ContentType string `json:"contentType,omitzero"`
FileKey string `json:"fileKey"`
Name string `json:"name,omitzero"`
Size int64 `json:"size,omitzero,string"`
}
FileInfo is a file of an attachment field. Only FileKey is required when writing records.
type FormFields ¶
type FormFields struct {
Properties map[string]FieldProperty `json:"properties"`
Revision int64 `json:"revision,string"`
}
FormFields is the fields of an app.
type FormLayout ¶
type FormLayout struct {
Layout []LayoutRow `json:"layout"`
Revision int64 `json:"revision,string"`
}
FormLayout is the layout of the form of an app.
type GeneralNotification ¶
type GeneralNotification struct {
Entity FieldEntity `json:"entity"`
IncludeSubs bool `json:"includeSubs,omitzero"`
RecordAdded bool `json:"recordAdded,omitzero"`
RecordEdited bool `json:"recordEdited,omitzero"`
CommentAdded bool `json:"commentAdded,omitzero"`
StatusChanged bool `json:"statusChanged,omitzero"`
FileImported bool `json:"fileImported,omitzero"`
}
GeneralNotification is a general notification setting.
type GeneralNotifications ¶
type GeneralNotifications struct {
Notifications []GeneralNotification `json:"notifications,omitzero"`
NotifyToCommenter *bool `json:"notifyToCommenter,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
GeneralNotifications is the general notification settings of an app.
type GeneralSettings ¶
type GeneralSettings struct {
Name string `json:"name,omitzero"`
Description *string `json:"description,omitzero"`
Icon *AppIcon `json:"icon,omitzero"`
Theme Theme `json:"theme,omitzero"`
TitleField *TitleField `json:"titleField,omitzero"`
EnableThumbnails *bool `json:"enableThumbnails,omitzero"`
EnableBulkDeletion *bool `json:"enableBulkDeletion,omitzero"`
EnableComments *bool `json:"enableComments,omitzero"`
EnableDuplicateRecord *bool `json:"enableDuplicateRecord,omitzero"`
EnableInlineRecordEditing *bool `json:"enableInlineRecordEditing,omitzero"`
NumberPrecision *NumberPrecision `json:"numberPrecision,omitzero"`
FirstMonthOfFiscalYear string `json:"firstMonthOfFiscalYear,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
GeneralSettings is the general settings of an app.
type GetAppPluginConfigRequest ¶
type GetAppPluginConfigRequest struct {
App int64 `json:"app"`
ID string `json:"id"`
Preview bool `json:"-"`
}
GetAppPluginConfigRequest is the request of Client.GetAppPluginConfig. ID is the plugin ID. If Preview is true, the config in the preview environment is returned.
type GetAppSettingsRequest ¶
type GetAppSettingsRequest struct {
App int64 `json:"app"`
Lang string `json:"lang,omitzero"`
Preview bool `json:"-"`
}
GetAppSettingsRequest is the request to get settings of an app. If Preview is true, the settings in the preview environment are returned.
type GetAppsRequest ¶
type GetAppsRequest struct {
IDs []int64 `json:"ids,omitzero"`
Codes []string `json:"codes,omitzero"`
Name string `json:"name,omitzero"`
SpaceIDs []int64 `json:"spaceIds,omitzero"`
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetAppsRequest is the request of Client.GetApps.
type GetAppsStatisticsRequest ¶
type GetAppsStatisticsRequest struct {
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetAppsStatisticsRequest is the request of Client.GetAppsStatistics.
type GetCommentsRequest ¶
type GetCommentsRequest struct {
App int64 `json:"app"`
Record int64 `json:"record"`
Order string `json:"order,omitzero"`
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetCommentsRequest is the request of Client.GetComments. Order is "asc" or "desc".
type GetCommentsResponse ¶
type GetCommentsResponse struct {
Comments []Comment `json:"comments"`
Older bool `json:"older"`
Newer bool `json:"newer"`
}
GetCommentsResponse is the response of Client.GetComments. Older and Newer report whether there are older or newer comments.
type GetPluginAppsRequest ¶
type GetPluginAppsRequest struct {
ID string `json:"id"`
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetPluginAppsRequest is the request of Client.GetPluginApps. ID is the plugin ID.
type GetPluginsRequest ¶
type GetPluginsRequest struct {
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
IDs []string `json:"ids,omitzero"`
}
GetPluginsRequest is the request of Client.GetPlugins.
type GetRecordsRequest ¶
type GetRecordsRequest struct {
App int64 `json:"app"`
Fields []string `json:"fields,omitzero"`
Query string `json:"query,omitzero"`
TotalCount bool `json:"totalCount,omitzero"`
}
GetRecordsRequest is the request of Client.GetRecords. Use Quote to quote string values in Query.
type GetRecordsResponse ¶
type GetRecordsResponse struct {
Records []Record `json:"records"`
TotalCount int64 `json:"totalCount,string"`
Warning string `json:"-"`
}
GetRecordsResponse is the response of Client.GetRecords. TotalCount is set only when TotalCount of the request is true. Warning is the value of the X-Cybozu-Warning response header.
type GetRequiredPluginsRequest ¶
type GetRequiredPluginsRequest struct {
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetRequiredPluginsRequest is the request of Client.GetRequiredPlugins.
type GetSpacesStatisticsRequest ¶
type GetSpacesStatisticsRequest struct {
Offset int64 `json:"offset,omitzero"`
Limit int64 `json:"limit,omitzero"`
}
GetSpacesStatisticsRequest is the request of Client.GetSpacesStatistics.
type Guest ¶
type Guest struct {
Code string `json:"code"`
Password string `json:"password"`
Timezone string `json:"timezone"`
Locale Locale `json:"locale,omitzero"`
Image string `json:"image,omitzero"`
Name string `json:"name"`
SurNameReading string `json:"surNameReading,omitzero"`
GivenNameReading string `json:"givenNameReading,omitzero"`
Company string `json:"company,omitzero"`
Division string `json:"division,omitzero"`
Phone string `json:"phone,omitzero"`
Callto string `json:"callto,omitzero"`
}
Guest is a guest user to add. Code is the email address of the guest user, and Image is the file key of the image.
type LayoutField ¶
type LayoutField struct {
Type FieldType `json:"type"`
Code string `json:"code,omitzero"`
Label string `json:"label,omitzero"`
ElementID string `json:"elementId,omitzero"`
Size *FieldSize `json:"size,omitzero"`
}
LayoutField is a field in a layout row. Label is the text of a label field, and ElementID is the element ID of a label, spacer or border field.
type LayoutRow ¶
type LayoutRow struct {
Type LayoutType `json:"type"`
Code string `json:"code,omitzero"`
Fields []LayoutField `json:"fields,omitzero"`
Layout []LayoutRow `json:"layout,omitzero"`
}
LayoutRow is a row of the form layout. Code is the field code of the table or the group, and Layout is the rows in the group.
type LayoutType ¶
type LayoutType string
LayoutType is the type of a layout row.
const ( LayoutTypeRow LayoutType = "ROW" LayoutTypeSubtable LayoutType = "SUBTABLE" LayoutTypeGroup LayoutType = "GROUP" )
Layout types.
type LinkProtocol ¶
type LinkProtocol string
LinkProtocol is the type of the values of a link field.
const ( LinkProtocolWeb LinkProtocol = "WEB" LinkProtocolCall LinkProtocol = "CALL" LinkProtocolMail LinkProtocol = "MAIL" )
Link protocols.
type Lookup ¶
type Lookup struct {
RelatedApp RelatedApp `json:"relatedApp,omitzero"`
RelatedKeyField string `json:"relatedKeyField,omitzero"`
FieldMappings []FieldMapping `json:"fieldMappings,omitzero"`
LookupPickerFields []string `json:"lookupPickerFields,omitzero"`
FilterCond *string `json:"filterCond,omitzero"`
Sort *string `json:"sort,omitzero"`
}
Lookup is the setting of a lookup field.
func (*Lookup) UnmarshalJSON ¶
UnmarshalJSON decodes the lookup setting, accepting an empty string for the field mappings and the lookup picker fields.
type MappingSourceType ¶
type MappingSourceType string
MappingSourceType is the source of a mapping of an app action.
const ( MappingSourceTypeField MappingSourceType = "FIELD" MappingSourceTypeRecordURL MappingSourceType = "RECORD_URL" )
Mapping source types.
type Mention ¶
type Mention struct {
Code string `json:"code"`
Type EntityType `json:"type"`
}
Mention is a mention in a comment.
type NumberPrecision ¶
type NumberPrecision struct {
Digits string `json:"digits,omitzero"`
DecimalPlaces string `json:"decimalPlaces,omitzero"`
RoundingMode RoundingMode `json:"roundingMode,omitzero"`
}
NumberPrecision is the precision of number and calculated fields.
type Operation ¶
type Operation string
Operation is the operation done on a record by Client.UpsertRecords.
type Option ¶
type Option func(*Client)
Option configures a Client.
func WithAPIToken ¶
WithAPIToken authenticates with API tokens. Multiple tokens can be specified to access multiple apps (for example on lookup fields).
func WithAcceptLanguage ¶
WithAcceptLanguage sets the Accept-Language header, which selects the language of the error messages with API tokens, and of the data when the language setting of the user follows the browser.
func WithBasicAuth ¶
WithBasicAuth sets the credential of the Basic authentication, which is required when the domain enables it.
func WithGuestSpace ¶
WithGuestSpace makes the client access apps in the guest space.
func WithHTTPClient ¶
WithHTTPClient sets the HTTP client used for requests. The client does not follow redirects, so that the credentials are not sent to other hosts. If httpClient is nil, http.DefaultClient is used.
func WithOAuthToken ¶
WithOAuthToken authenticates with the OAuth access token.
func WithPassword ¶
WithPassword authenticates with the login name and password.
func WithUserAgent ¶
WithUserAgent sets the User-Agent header.
type PerRecordNotification ¶
type PerRecordNotification struct {
FilterCond string `json:"filterCond,omitzero"`
Title string `json:"title,omitzero"`
Targets []TargetEntity `json:"targets"`
}
PerRecordNotification is a per record notification setting.
type PerRecordNotifications ¶
type PerRecordNotifications struct {
Notifications []PerRecordNotification `json:"notifications"`
Revision int64 `json:"revision,string,omitzero"`
}
PerRecordNotifications is the per record notification settings of an app.
type PeriodicReport ¶
type PeriodicReport struct {
Active *bool `json:"active,omitzero"`
Period ReportPeriod `json:"period,omitzero"`
}
PeriodicReport is the setting of the periodic report of a graph.
type Plugin ¶
type Plugin struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IsMarketPlugin bool `json:"isMarketPlugin"`
Version string `json:"version"`
}
Plugin is a plugin installed in kintone. Description and Version are empty for the plugins returned by Client.GetRequiredPlugins.
type PluginVersion ¶
PluginVersion is the ID and the version of a plugin.
type ProcessAction ¶
type ProcessAction struct {
Name string `json:"name"`
From string `json:"from"`
To string `json:"to"`
FilterCond string `json:"filterCond,omitzero"`
Type ProcessActionType `json:"type,omitzero"`
ExecutableUser *ExecutableUser `json:"executableUser,omitzero"`
}
ProcessAction is an action of the process management. ExecutableUser is the users who can execute the action of type SECONDARY.
type ProcessActionType ¶
type ProcessActionType string
ProcessActionType is the type of a process action.
const ( ProcessActionTypePrimary ProcessActionType = "PRIMARY" ProcessActionTypeSecondary ProcessActionType = "SECONDARY" )
Process action types.
type ProcessAssignee ¶
type ProcessAssignee struct {
Type ProcessAssigneeType `json:"type"`
Entities []TargetEntity `json:"entities"`
}
ProcessAssignee is the assignees of a status.
type ProcessAssigneeType ¶
type ProcessAssigneeType string
ProcessAssigneeType is how the assignees of a status work on it.
const ( ProcessAssigneeTypeOne ProcessAssigneeType = "ONE" ProcessAssigneeTypeAll ProcessAssigneeType = "ALL" ProcessAssigneeTypeAny ProcessAssigneeType = "ANY" )
Process assignee types.
type ProcessManagement ¶
type ProcessManagement struct {
Enable *bool `json:"enable,omitzero"`
States map[string]ProcessState `json:"states,omitzero"`
Actions []ProcessAction `json:"actions,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
ProcessManagement is the process management settings of an app. States and Actions are nil if the process management has never been set.
type ProcessState ¶
type ProcessState struct {
Name string `json:"name,omitzero"`
Index int `json:"index,string"`
Assignee *ProcessAssignee `json:"assignee,omitzero"`
}
ProcessState is a status of the process management.
type QuarterPattern ¶
type QuarterPattern string
QuarterPattern is the months of a quarterly periodic report.
const ( QuarterPatternJanAprJulOct QuarterPattern = "JAN_APR_JUL_OCT" QuarterPatternFebMayAugNov QuarterPattern = "FEB_MAY_AUG_NOV" QuarterPatternMarJunSepDec QuarterPattern = "MAR_JUN_SEP_DEC" )
Quarter patterns.
type RecordAccess ¶
type RecordAccess struct {
ID int64 `json:"id,string"`
Record RecordAccessRights `json:"record"`
Fields map[string]FieldAccessRights `json:"fields"`
}
RecordAccess is the access rights of the user on a record and its fields.
type RecordAccessRights ¶
type RecordAccessRights struct {
Viewable bool `json:"viewable"`
Editable bool `json:"editable"`
Deletable bool `json:"deletable"`
}
RecordAccessRights is the access rights on a record.
type RecordPermissions ¶
type RecordPermissions struct {
Rights []RecordRight `json:"rights"`
Revision int64 `json:"revision,string,omitzero"`
}
RecordPermissions is the record permissions of an app, in order of priority.
type RecordRevision ¶
RecordRevision is the ID and the revision of a record.
type RecordRight ¶
type RecordRight struct {
FilterCond string `json:"filterCond,omitzero"`
Entities []RecordRightEntity `json:"entities"`
}
RecordRight is a record permission of the records matching FilterCond.
type RecordRightEntity ¶
type RecordRightEntity struct {
Entity FieldEntity `json:"entity"`
Viewable bool `json:"viewable,omitzero"`
Editable bool `json:"editable,omitzero"`
Deletable bool `json:"deletable,omitzero"`
IncludeSubs bool `json:"includeSubs,omitzero"`
}
RecordRightEntity is a record permission of an entity.
type RecordUpdate ¶
type RecordUpdate struct {
ID int64 `json:"id,omitzero"`
UpdateKey *UpdateKey `json:"updateKey,omitzero"`
Record Record `json:"record,omitzero"`
Revision int64 `json:"revision,omitzero"`
}
RecordUpdate is an update of a record, specified by either ID or UpdateKey. The revision is not checked if Revision is zero.
type ReferenceTable ¶
type ReferenceTable struct {
RelatedApp RelatedApp `json:"relatedApp,omitzero"`
Condition ReferenceTableCondition `json:"condition,omitzero"`
FilterCond *string `json:"filterCond,omitzero"`
DisplayFields []string `json:"displayFields,omitzero"`
Sort *string `json:"sort,omitzero"`
Size string `json:"size,omitzero"`
}
ReferenceTable is the setting of a related records field. When RelatedApp is set in an update, the server resets the omitted settings.
type ReferenceTableCondition ¶
type ReferenceTableCondition struct {
Field string `json:"field"`
RelatedField string `json:"relatedField"`
}
ReferenceTableCondition is the condition of the records to show in a related records field.
type RelatedApp ¶
type RelatedApp struct {
App int64 `json:"app,string,omitzero"`
Code string `json:"code,omitzero"`
}
RelatedApp is an app referenced by a related records or lookup field, specified by either App or Code.
type ReminderNotification ¶
type ReminderNotification struct {
Timing ReminderTiming `json:"timing"`
FilterCond string `json:"filterCond,omitzero"`
Title string `json:"title,omitzero"`
Targets []TargetEntity `json:"targets"`
}
ReminderNotification is a reminder notification setting.
type ReminderNotifications ¶
type ReminderNotifications struct {
Notifications []ReminderNotification `json:"notifications,omitzero"`
Timezone string `json:"timezone,omitzero"`
Revision int64 `json:"revision,string,omitzero"`
}
ReminderNotifications is the reminder notification settings of an app.
type ReminderTiming ¶
type ReminderTiming struct {
Code string `json:"code"`
DaysLater int `json:"daysLater,string"`
HoursLater *int `json:"hoursLater,string,omitzero"`
Time string `json:"time,omitzero"`
}
ReminderTiming is the timing of a reminder notification, relative to the field of Code. Either HoursLater or Time is set.
type Report ¶
type Report struct {
ID int64 `json:"id,string,omitzero"`
Name string `json:"name,omitzero"`
ChartType ChartType `json:"chartType"`
ChartMode ChartMode `json:"chartMode,omitzero"`
Index int `json:"index,string"`
Groups []ReportGroup `json:"groups,omitzero"`
Aggregations []ReportAggregation `json:"aggregations,omitzero"`
FilterCond *string `json:"filterCond,omitzero"`
Sorts []ReportSort `json:"sorts,omitzero"`
PeriodicReport *PeriodicReport `json:"periodicReport,omitzero"`
}
Report is the setting of a graph of an app.
type ReportAggregation ¶
type ReportAggregation struct {
Type AggregationType `json:"type"`
Code string `json:"code,omitzero"`
}
ReportAggregation is an aggregation of a graph. Code is empty for COUNT.
type ReportGroup ¶
ReportGroup is a group of a graph. Per is the time unit of a date or time field.
type ReportPeriod ¶
type ReportPeriod struct {
Every TimeUnit `json:"every"`
Month string `json:"month,omitzero"`
Time string `json:"time,omitzero"`
Pattern QuarterPattern `json:"pattern,omitzero"`
DayOfMonth string `json:"dayOfMonth,omitzero"`
DayOfWeek DayOfWeek `json:"dayOfWeek,omitzero"`
Minute string `json:"minute,omitzero"`
}
ReportPeriod is the period of a periodic report.
type ReportSort ¶
type ReportSort struct {
By ReportSortBy `json:"by"`
Order SortOrder `json:"order"`
}
ReportSort is a sort of a graph.
type ReportSortBy ¶
type ReportSortBy string
ReportSortBy is the target of a sort of a graph.
const ( ReportSortByTotal ReportSortBy = "TOTAL" ReportSortByGroup1 ReportSortBy = "GROUP1" ReportSortByGroup2 ReportSortBy = "GROUP2" ReportSortByGroup3 ReportSortBy = "GROUP3" )
Report sort targets.
type Reports ¶
type Reports struct {
Reports map[string]Report `json:"reports"`
Revision int64 `json:"revision,string"`
}
Reports is the graphs of an app, keyed by the graph name.
type RoundingMode ¶
type RoundingMode string
RoundingMode is the rounding mode of numbers.
const ( RoundingModeHalfEven RoundingMode = "HALF_EVEN" RoundingModeUp RoundingMode = "UP" RoundingModeDown RoundingMode = "DOWN" )
Rounding modes.
type Space ¶
type Space struct {
ID int64 `json:"id,string"`
Name string `json:"name"`
DefaultThread int64 `json:"defaultThread,string"`
IsPrivate bool `json:"isPrivate"`
Creator Entity `json:"creator"`
Modifier Entity `json:"modifier"`
MemberCount int64 `json:"memberCount,string"`
CoverType CoverType `json:"coverType"`
CoverKey string `json:"coverKey"`
CoverURL string `json:"coverUrl"`
Body string `json:"body"`
UseMultiThread bool `json:"useMultiThread"`
IsGuest bool `json:"isGuest"`
AttachedApps []App `json:"attachedApps"`
FixedMember bool `json:"fixedMember"`
ShowAnnouncement *bool `json:"showAnnouncement"`
ShowThreadList *bool `json:"showThreadList"`
ShowAppList *bool `json:"showAppList"`
ShowMemberList *bool `json:"showMemberList"`
ShowRelatedLinkList *bool `json:"showRelatedLinkList"`
Permissions SpacePermissions `json:"permissions"`
}
Space is the information of a space. The portal settings ShowAnnouncement, ShowThreadList, ShowAppList, ShowMemberList and ShowRelatedLinkList are nil for single thread spaces and guest spaces.
type SpaceMember ¶
type SpaceMember struct {
Entity FieldEntity `json:"entity"`
IsAdmin bool `json:"isAdmin,omitzero"`
IsImplicit bool `json:"isImplicit,omitzero"`
IncludeSubs bool `json:"includeSubs,omitzero"`
}
SpaceMember is a member of a space. IsImplicit is true for the users who belong to the space through a group or a department, and is not sent.
type SpacePermissions ¶
type SpacePermissions struct {
CreateApp CreateAppPermission `json:"createApp"`
}
SpacePermissions is the permissions of a space.
type SpaceStatistics ¶
type SpaceStatistics struct {
ID int64 `json:"id,string"`
Name string `json:"name"`
AdministratorCount int64 `json:"administratorCount,string"`
MemberCount int64 `json:"memberCount,string"`
IsPrivate bool `json:"isPrivate"`
IsGuest bool `json:"isGuest"`
Creator Entity `json:"creator"`
CreatedAt time.Time `json:"createdAt"`
Modifier Entity `json:"modifier"`
ModifiedAt time.Time `json:"modifiedAt"`
}
SpaceStatistics is the usage of a space.
func (*SpaceStatistics) UnmarshalJSON ¶
func (s *SpaceStatistics) UnmarshalJSON(b []byte) error
UnmarshalJSON decodes the space statistics, accepting both numbers and strings for the ID and the counts.
type StatusUpdate ¶
type StatusUpdate struct {
ID int64 `json:"id"`
Action string `json:"action"`
Assignee string `json:"assignee,omitzero"`
Revision int64 `json:"revision,omitzero"`
}
StatusUpdate is an update of the status of a record by an action. Assignee is the login name of the user. The revision is not checked if Revision is zero.
type SubtableRow ¶
SubtableRow is a row of a table field.
type TargetEntity ¶
type TargetEntity struct {
Entity FieldEntity `json:"entity"`
IncludeSubs bool `json:"includeSubs,omitzero"`
}
TargetEntity is an entity with whether to include the sub organizations, used for the assignees, the executable users and the notification targets.
type Theme ¶
type Theme string
Theme is the color theme of an app. The themes CLIPBOARD, BINDER, PENCIL and CLIPS are deprecated.
type ThreadComment ¶
type ThreadComment struct {
Text string `json:"text,omitzero"`
Mentions []Mention `json:"mentions,omitzero"`
Files []ThreadCommentFile `json:"files,omitzero"`
}
ThreadComment is a comment on a thread.
type ThreadCommentFile ¶
ThreadCommentFile is a file attached to a thread comment. Width is the width of the image in pixels.
type TimeUnit ¶
type TimeUnit string
TimeUnit is a unit of time, used for the groups and the periodic reports of graphs.
type TitleField ¶
type TitleField struct {
SelectionMode TitleSelectionMode `json:"selectionMode"`
Code string `json:"code,omitzero"`
}
TitleField is the field used as the title of records.
type TitleSelectionMode ¶
type TitleSelectionMode string
TitleSelectionMode is how the title field is selected.
const ( TitleSelectionModeAuto TitleSelectionMode = "AUTO" TitleSelectionModeManual TitleSelectionMode = "MANUAL" )
Title selection modes.
type UnitPosition ¶
type UnitPosition string
UnitPosition is the position of the unit of number and calculated fields.
const ( UnitPositionBefore UnitPosition = "BEFORE" UnitPositionAfter UnitPosition = "AFTER" )
Unit positions.
type UpdateSpaceRequest ¶
type UpdateSpaceRequest struct {
ID int64 `json:"id"`
Name string `json:"name,omitzero"`
IsPrivate *bool `json:"isPrivate,omitzero"`
FixedMember *bool `json:"fixedMember,omitzero"`
UseMultiThread *bool `json:"useMultiThread,omitzero"`
ShowAnnouncement *bool `json:"showAnnouncement,omitzero"`
ShowThreadList *bool `json:"showThreadList,omitzero"`
ShowAppList *bool `json:"showAppList,omitzero"`
ShowMemberList *bool `json:"showMemberList,omitzero"`
ShowRelatedLinkList *bool `json:"showRelatedLinkList,omitzero"`
Permissions *SpacePermissions `json:"permissions,omitzero"`
}
UpdateSpaceRequest is the request of Client.UpdateSpace.
type UpdateThreadRequest ¶
type UpdateThreadRequest struct {
ID int64 `json:"id"`
Name string `json:"name,omitzero"`
Body *string `json:"body,omitzero"`
}
UpdateThreadRequest is the request of Client.UpdateThread.
type UpdatedAppAction ¶
type UpdatedAppAction struct {
ID int64 `json:"id,string"`
}
UpdatedAppAction is an action updated by Client.UpdateAppActions.
type UpdatedAppActions ¶
type UpdatedAppActions struct {
Actions map[string]UpdatedAppAction `json:"actions"`
Revision int64 `json:"revision,string"`
}
UpdatedAppActions is the response of Client.UpdateAppActions, which has the action IDs keyed by the action name.
type UpdatedRecord ¶
type UpdatedRecord struct {
ID int64 `json:"id,string"`
Revision int64 `json:"revision,string"`
Operation Operation `json:"operation"`
}
UpdatedRecord is a record updated by Client.UpdateRecords or Client.UpsertRecords.
type UpdatedReport ¶
type UpdatedReport struct {
ID int64 `json:"id,string"`
}
UpdatedReport is a graph updated by Client.UpdateReports.
type UpdatedReports ¶
type UpdatedReports struct {
Reports map[string]UpdatedReport `json:"reports"`
Revision int64 `json:"revision,string"`
}
UpdatedReports is the response of Client.UpdateReports, which has the graph IDs keyed by the graph name.
type UpdatedView ¶
type UpdatedView struct {
ID int64 `json:"id,string"`
}
UpdatedView is a view updated by Client.UpdateViews.
type UpdatedViews ¶
type UpdatedViews struct {
Views map[string]UpdatedView `json:"views"`
Revision int64 `json:"revision,string"`
}
UpdatedViews is the response of Client.UpdateViews, which has the view IDs keyed by the view name.
type View ¶
type View struct {
ID int64 `json:"id,string,omitzero"`
Name string `json:"name,omitzero"`
Type ViewType `json:"type"`
BuiltinType ViewBuiltinType `json:"builtinType,omitzero"`
Index int `json:"index,string"`
Fields []string `json:"fields,omitzero"`
Date string `json:"date,omitzero"`
Title string `json:"title,omitzero"`
HTML string `json:"html,omitzero"`
Pager *bool `json:"pager,omitzero"`
Device ViewDevice `json:"device,omitzero"`
FilterCond *string `json:"filterCond,omitzero"`
Sort *string `json:"sort,omitzero"`
}
View is the setting of a view of an app.
Fields is used by list views, Date and Title by calendar views, and HTML, Pager and Device by custom views.
type ViewBuiltinType ¶
type ViewBuiltinType string
ViewBuiltinType is the type of a view created by kintone.
const (
ViewBuiltinTypeAssignee ViewBuiltinType = "ASSIGNEE"
)
View builtin types.
type ViewDevice ¶
type ViewDevice string
ViewDevice is the devices to show a custom view on.
const ( ViewDeviceDesktop ViewDevice = "DESKTOP" ViewDeviceAny ViewDevice = "ANY" )
View devices.
type WarningError ¶
type WarningError struct {
Message string
}
WarningError is a warning in the X-Cybozu-Warning response header.
func (*WarningError) Error ¶
func (e *WarningError) Error() string