Documentation
¶
Index ¶
- Constants
- Variables
- func GetRetryAfter(err error) time.Duration
- type APIVersion
- type Action
- type ActionGetOptions
- type ActionListOptions
- type ActionRequest
- type ActivityStatus
- type Address
- type ArchiveRequest
- type Asset
- type AssetAssignment
- type AssetColumn
- type AssetIcon
- type AssetLinkRequest
- type AssetListOptions
- type AssetListResponse
- type AssetMetadata
- type AssetStatus
- type AssetStatusResults
- type AssetTemplate
- type AssetTemplateListResponse
- type AssetToLink
- type AssignedPermission
- type Attachment
- type AttachmentListOptions
- type Avatar
- type BarcodeContent
- type BarcodeMetadata
- type BooleanDateTime
- type BooleanDateTimeUpdate
- type BooleanReason
- type BooleanReasonUpdate
- type Branch
- type BranchCreateRequest
- type BranchIterator
- type BranchOptionalFields
- type BudgetHolder
- type BulkAssignmentRequest
- type Caller
- type CallerCreate
- type CallerLookup
- type CancellationReason
- type CancellationReasonList
- type CancellationReasonRequest
- type Category
- type CategoryItem
- type CategoryListOptions
- type CategoryModules
- type CategoryResponse
- type CategoryTranslation
- type Change
- type ChangeActivity
- type ChangeActivityAttachment
- type ChangeActivityCreateRequest
- type ChangeActivityListOptions
- type ChangeActivityProgressEntry
- type ChangeActivityProgressEntryRequest
- type ChangeActivityRequest
- type ChangeActivityUpdateRequest
- type ChangeArchiveRequest
- type ChangeAttachment
- type ChangeBenefit
- type ChangeCalendarItem
- type ChangeCalendarListOptions
- type ChangeCancelRequest
- type ChangeCreateRequest
- type ChangeImpact
- type ChangeListOptions
- type ChangeProgressEntry
- type ChangeProgressEntryRequest
- type ChangeProgressTrailListOptions
- type ChangeRequest
- type ChangeSettings
- type ChangeStatus
- type ChangeTemplate
- type ChangeUpdateRequest
- type CircuitBreaker
- type Client
- func (c *Client) AddChangeActivityProgressEntry(ctx context.Context, activityID string, ...) (*ChangeActivityProgressEntry, error)
- func (c *Client) AddChangeProgressEntry(ctx context.Context, changeID string, req *ChangeProgressEntryRequest) (*ChangeProgressEntry, error)
- func (c *Client) AddRequesterChangeProgressEntry(ctx context.Context, changeID string, req *ChangeProgressEntryRequest) (*ChangeProgressEntry, error)
- func (c *Client) ArchiveAsset(ctx context.Context, id string, reasonID string) error
- func (c *Client) ArchiveBadge(ctx context.Context, identifier string) error
- func (c *Client) ArchiveBranch(ctx context.Context, id string, archivingReason *IdNameRef) (*ExtendedBranch, error)
- func (c *Client) ArchiveCancellationReason(ctx context.Context, identifier string) (*CancellationReason, error)
- func (c *Client) ArchiveCarPark(ctx context.Context, identifier string) error
- func (c *Client) ArchiveChange(ctx context.Context, id string, req *ChangeArchiveRequest) (*Change, error)
- func (c *Client) ArchiveIdentificationType(ctx context.Context, identifier string) error
- func (c *Client) ArchiveIncident(ctx context.Context, id string, req *ArchiveRequest) (*Incident, error)
- func (c *Client) ArchiveIncidentByNumber(ctx context.Context, number string, req *ArchiveRequest) (*Incident, error)
- func (c *Client) ArchiveKnowledgeItem(ctx context.Context, identifier string) error
- func (c *Client) ArchiveKnowledgeItemStatus(ctx context.Context, identifier string) (*KnowledgeItemStatus, error)
- func (c *Client) ArchiveReservation(ctx context.Context, id string) error
- func (c *Client) ArchiveVisitor(ctx context.Context, identifier string) error
- func (c *Client) ArchiveVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string) error
- func (c *Client) AssignAssets(ctx context.Context, req *BulkAssignmentRequest) error
- func (c *Client) CancelChange(ctx context.Context, id string, req *ChangeCancelRequest) (*Change, error)
- func (c *Client) CancelReservation(ctx context.Context, id string, reasonID string) error
- func (c *Client) CircuitBreakerState() string
- func (c *Client) ConvertHTMLToPDF(ctx context.Context, req *ConvertHTMLToPDFRequest) (io.ReadCloser, error)
- func (c *Client) CountPersons(ctx context.Context, query string) (int, error)
- func (c *Client) CreateAsset(ctx context.Context, data map[string]interface{}) (*Asset, error)
- func (c *Client) CreateBadge(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
- func (c *Client) CreateBarcode(ctx context.Context, req *CreateBarcodeRequest) (io.ReadCloser, error)
- func (c *Client) CreateBranch(ctx context.Context, req *BranchCreateRequest) (*ExtendedBranch, error)
- func (c *Client) CreateCancellationReason(ctx context.Context, req *CancellationReasonRequest) (*CancellationReason, error)
- func (c *Client) CreateCarPark(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
- func (c *Client) CreateChange(ctx context.Context, req *ChangeCreateRequest) (*Change, error)
- func (c *Client) CreateChangeActivity(ctx context.Context, req *ChangeActivityCreateRequest) (*ChangeActivity, error)
- func (c *Client) CreateIdentificationType(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
- func (c *Client) CreateIncident(ctx context.Context, req *IncidentCreateRequest) (*Incident, error)
- func (c *Client) CreateKnowledgeItem(ctx context.Context, req *KnowledgeItemCreateRequest) (*KnowledgeItemReference, error)
- func (c *Client) CreateKnowledgeItemStatus(ctx context.Context, req *KnowledgeItemStatusCreateRequest) (*KnowledgeItemStatus, error)
- func (c *Client) CreateKnowledgeItemTranslation(ctx context.Context, identifier string, translation *KnowledgeItemTranslation) error
- func (c *Client) CreateOperationalActivity(ctx context.Context, req *CreateOperationalActivityRequest) (*OperationalActivity, error)
- func (c *Client) CreateOperationalActivityAction(ctx context.Context, identifier string, req *CreateMemoHistoryRequest) (*CreateMemoHistoryResponse, error)
- func (c *Client) CreateOperationalActivityTimeRegistration(ctx context.Context, identifier string, req *CreateTimeRegistrationRequest) error
- func (c *Client) CreateReservation(ctx context.Context, req *ReservationCreateRequest) (*Reservation, error)
- func (c *Client) CreateService(ctx context.Context, req *ServiceCreateRequest) (*Service, error)
- func (c *Client) CreateVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, ...) (*VisitorSearchlistItemWithExtLink, error)
- func (c *Client) CreateVisitors(ctx context.Context, req *CreateVisitorsRequest) (*VisitorListResponse, error)
- func (c *Client) DeescalateIncident(ctx context.Context, id string, req *DeescalateRequest) (*Incident, error)
- func (c *Client) DeescalateIncidentByNumber(ctx context.Context, number string, req *DeescalateRequest) (*Incident, error)
- func (c *Client) DeleteAction(ctx context.Context, incidentID, actionID string) error
- func (c *Client) DeleteActionByNumber(ctx context.Context, incidentNumber, actionID string) error
- func (c *Client) DeleteAssets(ctx context.Context, ids []string) error
- func (c *Client) DeleteAttachment(ctx context.Context, incidentID, attachmentID string) error
- func (c *Client) DeleteAttachmentByNumber(ctx context.Context, incidentNumber, attachmentID string) error
- func (c *Client) DeleteChangeAction(ctx context.Context, changeID, actionID string) error
- func (c *Client) DeleteChangeActivityAction(ctx context.Context, activityID, actionID string) error
- func (c *Client) DeleteChangeActivityAttachment(ctx context.Context, activityID, attachmentID string) error
- func (c *Client) DeleteChangeActivityRequest(ctx context.Context, activityID, requestID string) error
- func (c *Client) DeleteChangeAttachment(ctx context.Context, changeID, attachmentID string) error
- func (c *Client) DeleteChangeRequest(ctx context.Context, changeID, requestID string) error
- func (c *Client) DeleteEmail(ctx context.Context, id string) error
- func (c *Client) DeleteKnowledgeItemAttachment(ctx context.Context, identifier, attachmentID string) error
- func (c *Client) DeleteKnowledgeItemImage(ctx context.Context, identifier, imageName string) error
- func (c *Client) DeleteKnowledgeItemTranslation(ctx context.Context, identifier, language string) error
- func (c *Client) DeleteRequest(ctx context.Context, incidentID, requestID string) error
- func (c *Client) DeleteRequestByNumber(ctx context.Context, incidentNumber, requestID string) error
- func (c *Client) DeleteRequesterVisitorAttachment(ctx context.Context, identifier, attachmentID string) error
- func (c *Client) DeleteStockQuantity(ctx context.Context, stockID, bulkItemID string) error
- func (c *Client) DeleteVisitorAttachment(ctx context.Context, identifier, attachmentID string) error
- func (c *Client) DownloadAssetFile(ctx context.Context, assetID, fieldID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadAttachment(ctx context.Context, incidentID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadAttachmentByNumber(ctx context.Context, incidentNumber, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadAuthorizableActivityAttachment(ctx context.Context, activityID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadAuthorizableChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadChangeActivityAttachment(ctx context.Context, activityID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadChangeCalendarItemAttachment(ctx context.Context, itemID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadKnowledgeItemAttachment(ctx context.Context, identifier, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadKnowledgeItemImage(ctx context.Context, identifier, imageName string) (io.ReadCloser, string, error)
- func (c *Client) DownloadOperationalActivityAttachment(ctx context.Context, identifier, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) DownloadRequesterChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
- func (c *Client) EscalateIncident(ctx context.Context, id string, req *EscalateRequest) (*Incident, error)
- func (c *Client) EscalateIncidentByNumber(ctx context.Context, number string, req *EscalateRequest) (*Incident, error)
- func (c *Client) FilterAssets(ctx context.Context, filter map[string]interface{}) (*AssetListResponse, error)
- func (c *Client) GetAPIVersion(ctx context.Context) (string, error)
- func (c *Client) GetAction(ctx context.Context, incidentID, actionID string, opts *ActionGetOptions) (*Action, error)
- func (c *Client) GetActionByNumber(ctx context.Context, incidentNumber, actionID string, opts *ActionGetOptions) (*Action, error)
- func (c *Client) GetAsset(ctx context.Context, id string) (*Asset, error)
- func (c *Client) GetAssetAssignments(ctx context.Context, assetID string) ([]AssetAssignment, error)
- func (c *Client) GetAssetTemplate(ctx context.Context, id string) (*AssetTemplate, error)
- func (c *Client) GetAuthorizableActivity(ctx context.Context, id string) (*ChangeActivity, error)
- func (c *Client) GetAuthorizableActivityAttachments(ctx context.Context, activityID string) ([]ChangeActivityAttachment, error)
- func (c *Client) GetAuthorizableActivityProgressTrail(ctx context.Context, activityID string, opts *ChangeProgressTrailListOptions) ([]ChangeActivityProgressEntry, error)
- func (c *Client) GetAuthorizableActivityRequests(ctx context.Context, activityID string) ([]ChangeActivityRequest, error)
- func (c *Client) GetAuthorizableChange(ctx context.Context, id string) (*Change, error)
- func (c *Client) GetAuthorizableChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
- func (c *Client) GetAuthorizableChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
- func (c *Client) GetAuthorizableChangeRequests(ctx context.Context, changeID string) ([]ChangeRequest, error)
- func (c *Client) GetBlankAsset(ctx context.Context, templateID, templateName string) (*Asset, error)
- func (c *Client) GetBranch(ctx context.Context, id string) (*ExtendedBranch, error)
- func (c *Client) GetBudgetHolder(ctx context.Context, id string) (*BudgetHolder, error)
- func (c *Client) GetChange(ctx context.Context, id string) (*Change, error)
- func (c *Client) GetChangeActivity(ctx context.Context, id string) (*ChangeActivity, error)
- func (c *Client) GetChangeActivityProgressTrail(ctx context.Context, activityID string, opts *ChangeProgressTrailListOptions) ([]ChangeActivityProgressEntry, error)
- func (c *Client) GetChangeByNumber(ctx context.Context, number string) (*Change, error)
- func (c *Client) GetChangeCalendarItem(ctx context.Context, id string) (*ChangeCalendarItem, error)
- func (c *Client) GetChangeCalendarItemProgressTrail(ctx context.Context, itemID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
- func (c *Client) GetChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
- func (c *Client) GetChangeSettings(ctx context.Context) (*ChangeSettings, error)
- func (c *Client) GetCountry(ctx context.Context, id string) (*Country, error)
- func (c *Client) GetCurrency(ctx context.Context) (*CurrencySettings, error)
- func (c *Client) GetCurrentOperator(ctx context.Context) (*ExtendedOperator, error)
- func (c *Client) GetCurrentOperatorID(ctx context.Context) (string, error)
- func (c *Client) GetCurrentOperatorSettings(ctx context.Context) (*OperatorSettings, error)
- func (c *Client) GetCurrentPerson(ctx context.Context) (*Person, error)
- func (c *Client) GetDepartment(ctx context.Context, id string) (*Department, error)
- func (c *Client) GetEmail(ctx context.Context, id string) (*Email, error)
- func (c *Client) GetEnabledOptionalFields(ctx context.Context, table string, fieldType OptionalFieldType) (map[string]string, error)deprecated
- func (c *Client) GetFacilityOccupancies(ctx context.Context, opts *FacilityOccupancyOptions) ([]FacilityOccupancy, error)
- func (c *Client) GetIncidentByID(ctx context.Context, id string) (*Incident, error)
- func (c *Client) GetIncidentByNumber(ctx context.Context, number string) (*Incident, error)
- func (c *Client) GetKnowledgeItem(ctx context.Context, identifier string, opts *KnowledgeItemListOptions) (*KnowledgeItem, error)
- func (c *Client) GetLinkType(ctx context.Context, id string) (*LinkType, error)
- func (c *Client) GetLocation(ctx context.Context, id string) (*ExtendedLocation, error)
- func (c *Client) GetOperationalActivity(ctx context.Context, identifier string) (*OperationalActivity, error)
- func (c *Client) GetOperationalActivityActions(ctx context.Context, identifier string) ([]OperationalMemoHistory, error)
- func (c *Client) GetOperationalActivityAttachments(ctx context.Context, identifier string) ([]OperationalAttachment, error)
- func (c *Client) GetOperationalActivityEmail(ctx context.Context, identifier, emailID string) (*OperationalEmail, error)
- func (c *Client) GetOperationalActivityEmails(ctx context.Context, identifier string) ([]OperationalEmail, error)
- func (c *Client) GetOperationalActivityLinkedObjects(ctx context.Context, identifier string) ([]OperationalLinkedObject, error)
- func (c *Client) GetOperationalActivityRequests(ctx context.Context, identifier string) ([]OperationalMemoHistory, error)
- func (c *Client) GetOperationalActivitySettings(ctx context.Context) (*OperationalActivitySettings, error)
- func (c *Client) GetOperationalActivityTimeRegistrations(ctx context.Context, identifier string) ([]OperationalTimeRegistration, error)
- func (c *Client) GetOperationalSeries(ctx context.Context, id string) (*OperationalSeries, error)
- func (c *Client) GetOperator(ctx context.Context, id string) (*ExtendedOperator, error)
- func (c *Client) GetOperatorAvatar(ctx context.Context, id string) (*Avatar, error)
- func (c *Client) GetOperatorGroup(ctx context.Context, id string) (*OperatorGroup, error)
- func (c *Client) GetPermissionGroup(ctx context.Context, id string) (*PermissionGroup, error)
- func (c *Client) GetPerson(ctx context.Context, id string) (*Person, error)
- func (c *Client) GetPersonAvatar(ctx context.Context, id string) (*Avatar, error)
- func (c *Client) GetPersonGroup(ctx context.Context, id string) (*PersonGroup, error)
- func (c *Client) GetPossibleAssetRelations(ctx context.Context, sourceID, targetID string) ([]string, error)
- func (c *Client) GetProductVersion(ctx context.Context) (*ProductVersion, error)
- func (c *Client) GetProgressTrail(ctx context.Context, incidentID string, opts *ProgressTrailListOptions) ([]ProgressEntry, error)
- func (c *Client) GetProgressTrailByNumber(ctx context.Context, incidentNumber string, opts *ProgressTrailListOptions) ([]ProgressEntry, error)
- func (c *Client) GetProgressTrailCount(ctx context.Context, incidentID string) (int, error)
- func (c *Client) GetProgressTrailCountByNumber(ctx context.Context, incidentNumber string) (int, error)
- func (c *Client) GetRequest(ctx context.Context, incidentID, requestID string, opts *RequestGetOptions) (*Request, error)
- func (c *Client) GetRequestByNumber(ctx context.Context, incidentNumber, requestID string, opts *RequestGetOptions) (*Request, error)
- func (c *Client) GetRequesterChange(ctx context.Context, id string) (*RequesterChange, error)
- func (c *Client) GetRequesterChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
- func (c *Client) GetRequesterVisitor(ctx context.Context, identifier string) (*Visitor, error)
- func (c *Client) GetRequesterVisitorAttachments(ctx context.Context, identifier string) ([]VisitorAttachment, error)
- func (c *Client) GetReservableAssetInterval(ctx context.Context, identifier string, from *Time) (*ReservableInterval, error)
- func (c *Client) GetReservableLocation(ctx context.Context, id string) (*ReservableLocation, error)
- func (c *Client) GetReservableLocationInterval(ctx context.Context, id string, from *Time) (*ReservableInterval, error)
- func (c *Client) GetReservableService(ctx context.Context, id string) (*ReservableService, error)
- func (c *Client) GetReservation(ctx context.Context, id string) (*Reservation, error)
- func (c *Client) GetReservationByNumber(ctx context.Context, number string) (*Reservation, error)
- func (c *Client) GetRole(ctx context.Context, id string) (*Role, error)
- func (c *Client) GetRoleConfiguration(ctx context.Context, id string) (*RoleConfiguration, error)
- func (c *Client) GetService(ctx context.Context, id string) (*Service, error)
- func (c *Client) GetServiceLinkedAssets(ctx context.Context, serviceID string) ([]ServiceLinkedAsset, error)
- func (c *Client) GetServiceWindow(ctx context.Context, id string) (*IdName, error)
- func (c *Client) GetSupplier(ctx context.Context, id string) (*ExtendedSupplier, error)
- func (c *Client) GetSupplierContact(ctx context.Context, id string) (*SupplierContact, error)
- func (c *Client) GetTimeRegistration(ctx context.Context, id string) (*TimeRegistration, error)
- func (c *Client) GetVisitor(ctx context.Context, identifier string) (*Visitor, error)
- func (c *Client) GetVisitorAttachments(ctx context.Context, identifier string) ([]VisitorAttachment, error)
- func (c *Client) GiveKnowledgeItemFeedback(ctx context.Context, identifier string, feedback *KnowledgeFeedback) error
- func (c *Client) ImportAssets(ctx context.Context, templateID string, assets []map[string]interface{}) error
- func (c *Client) LinkAssets(ctx context.Context, req *AssetLinkRequest) (*LinkedAsset, error)
- func (c *Client) LinkAssetsToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
- func (c *Client) LinkAssetsToService(ctx context.Context, serviceID string, assets []AssetToLink) ([]ServiceLinkedAsset, error)
- func (c *Client) LinkBranchesToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
- func (c *Client) LinkKnowledgeItemBranch(ctx context.Context, identifier, branchID string) error
- func (c *Client) LinkLocationsToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
- func (c *Client) ListActions(ctx context.Context, incidentID string, opts *ActionListOptions) ([]Action, error)
- func (c *Client) ListActionsByNumber(ctx context.Context, incidentNumber string, opts *ActionListOptions) ([]Action, error)
- func (c *Client) ListActivityRejectionReasons(ctx context.Context) ([]RejectionReason, error)
- func (c *Client) ListActivityStatuses(ctx context.Context) ([]ActivityStatus, error)
- func (c *Client) ListApplicableChangeTemplates(ctx context.Context, query string) ([]ChangeTemplate, error)
- func (c *Client) ListArchivingReasons(ctx context.Context) ([]IdName, error)
- func (c *Client) ListAssetStatuses(ctx context.Context) ([]AssetStatus, error)
- func (c *Client) ListAssetTemplates(ctx context.Context) ([]AssetTemplate, error)
- func (c *Client) ListAssets(ctx context.Context, opts *AssetListOptions) (*AssetListResponse, error)
- func (c *Client) ListAttachments(ctx context.Context, incidentID string, opts *AttachmentListOptions) ([]Attachment, error)
- func (c *Client) ListAttachmentsByNumber(ctx context.Context, incidentNumber string, opts *AttachmentListOptions) ([]Attachment, error)
- func (c *Client) ListBadges(ctx context.Context, archived *bool) ([]VisitorSearchlistItem, error)
- func (c *Client) ListBranchBuildingLevels(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListBranchDesignations(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListBranchEnergyPerformances(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListBranchEnvironmentalImpacts(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListBranchFilters(ctx context.Context) ([]OperatorFilter, error)
- func (c *Client) ListBranchListedBuildings(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListBranches(ctx context.Context, opts *SupportingFilesListOptions) *BranchIterator
- func (c *Client) ListBudgetHolders(ctx context.Context, opts *SupportingFilesListOptions) ([]BudgetHolder, error)
- func (c *Client) ListCallTypes(ctx context.Context) ([]IdName, error)
- func (c *Client) ListCancellationReasons(ctx context.Context, archived *bool) ([]CancellationReason, error)
- func (c *Client) ListCarParks(ctx context.Context, archived *bool) ([]VisitorSearchlistItem, error)
- func (c *Client) ListCategories(ctx context.Context, opts *CategoryListOptions) (*CategoryResponse, error)
- func (c *Client) ListCategoryFilters(ctx context.Context) ([]OperatorFilter, error)
- func (c *Client) ListChangeActivities(ctx context.Context, opts *ChangeActivityListOptions) ([]ChangeActivity, error)
- func (c *Client) ListChangeActivityAttachments(ctx context.Context, activityID string) ([]ChangeActivityAttachment, error)
- func (c *Client) ListChangeActivityRequests(ctx context.Context, activityID string) ([]ChangeActivityRequest, error)
- func (c *Client) ListChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
- func (c *Client) ListChangeBenefits(ctx context.Context) ([]ChangeBenefit, error)
- func (c *Client) ListChangeCalendar(ctx context.Context, opts *ChangeCalendarListOptions) ([]ChangeCalendarItem, error)
- func (c *Client) ListChangeCalendarItemAttachments(ctx context.Context, itemID string) ([]ChangeAttachment, error)
- func (c *Client) ListChangeCalendarItemRequests(ctx context.Context, itemID string) ([]ChangeRequest, error)
- func (c *Client) ListChangeCategories(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChangeClosureCodes(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChangeImpacts(ctx context.Context) ([]ChangeImpact, error)
- func (c *Client) ListChangePhases(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChangePriorities(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChangeRejectionReasons(ctx context.Context) ([]RejectionReason, error)
- func (c *Client) ListChangeRequests(ctx context.Context, changeID string) ([]ChangeRequest, error)
- func (c *Client) ListChangeStatuses(ctx context.Context) ([]ChangeStatus, error)
- func (c *Client) ListChangeSubcategories(ctx context.Context, categoryID string) ([]IdName, error)
- func (c *Client) ListChangeTypes(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChangeUrgencies(ctx context.Context) ([]IdName, error)
- func (c *Client) ListChanges(ctx context.Context, opts *ChangeListOptions) ([]Change, error)
- func (c *Client) ListClosureCodes(ctx context.Context) ([]IdName, error)
- func (c *Client) ListCountries(ctx context.Context) ([]Country, error)
- func (c *Client) ListDeescalationReasons(ctx context.Context) ([]IdName, error)
- func (c *Client) ListDepartments(ctx context.Context, opts *SupportingFilesListOptions) ([]Department, error)
- func (c *Client) ListDurations(ctx context.Context) ([]Duration, error)
- func (c *Client) ListEntryTypes(ctx context.Context) ([]IdName, error)
- func (c *Client) ListEscalationReasons(ctx context.Context) ([]IdName, error)
- func (c *Client) ListIdentificationTypes(ctx context.Context, archived *bool) ([]VisitorSearchlistItem, error)
- func (c *Client) ListImpacts(ctx context.Context) ([]IdName, error)
- func (c *Client) ListIncidentCategories(ctx context.Context) ([]Category, error)
- func (c *Client) ListIncidentSubcategories(ctx context.Context) ([]Subcategory, error)
- func (c *Client) ListIncidents(ctx context.Context, opts *ListOptions) *IncidentIterator
- func (c *Client) ListKnowledgeItemAttachments(ctx context.Context, identifier string) ([]KnowledgeAttachment, error)
- func (c *Client) ListKnowledgeItemBranches(ctx context.Context, identifier string) ([]IdName, error)
- func (c *Client) ListKnowledgeItemImages(ctx context.Context, identifier string) ([]string, error)
- func (c *Client) ListKnowledgeItemStatuses(ctx context.Context, archived *bool) ([]KnowledgeItemStatus, error)
- func (c *Client) ListKnowledgeItems(ctx context.Context, opts *KnowledgeItemListOptions) (*KnowledgeItemList, error)
- func (c *Client) ListLanguages(ctx context.Context) ([]Language, error)
- func (c *Client) ListLinkTypes(ctx context.Context) ([]LinkType, error)
- func (c *Client) ListLinkedAssets(ctx context.Context, sourceID, targetID, capabilityID string) ([]LinkedAsset, error)
- func (c *Client) ListLocationBuildingZones(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationCeilingCoverings(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationFloorCoverings(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationFunctionalUses(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationGlassMaterials(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationStatuses(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationTypes(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocationWallCoverings(ctx context.Context) ([]Searchlist, error)
- func (c *Client) ListLocations(ctx context.Context, opts *SupportingFilesListOptions) *LocationIterator
- func (c *Client) ListManagerAuthorizables(ctx context.Context, opts *ManagerAuthorizableListOptions) ([]ManagerAuthorizable, error)
- func (c *Client) ListOperationalActivities(ctx context.Context, opts *OperationalActivityListOptions) (*OperationalActivityListResponse, error)
- func (c *Client) ListOperationalActivityGroupings(ctx context.Context, query, fields, sort string) ([]OperationalActivityGrouping, error)
- func (c *Client) ListOperationalActivityReasonsForAnomaly(ctx context.Context) ([]IdName, error)
- func (c *Client) ListOperationalActivityReasonsForSkipping(ctx context.Context) ([]IdName, error)
- func (c *Client) ListOperationalActivitySchemas(ctx context.Context, query, fields, sort string) ([]OperationalActivitySchema, error)
- func (c *Client) ListOperationalActivityStatuses(ctx context.Context) ([]IdName, error)
- func (c *Client) ListOperationalActivityTypes(ctx context.Context, query string) ([]OperationalActivityType, error)
- func (c *Client) ListOperatorFilters(ctx context.Context) ([]OperatorFilter, error)
- func (c *Client) ListOperatorGroups(ctx context.Context, opts *SupportingFilesListOptions) *OperatorGroupIterator
- func (c *Client) ListOperators(ctx context.Context, opts *SupportingFilesListOptions) *OperatorIterator
- func (c *Client) ListOptionalFieldValues(ctx context.Context, tab, searchlist int) ([]IdName, error)
- func (c *Client) ListPermissionGroups(ctx context.Context) ([]PermissionGroup, error)
- func (c *Client) ListPersonExtraFieldAEntries(ctx context.Context, opts *SupportingFilesListOptions) ([]PersonExtraFieldEntry, error)
- func (c *Client) ListPersonExtraFieldBEntries(ctx context.Context, opts *SupportingFilesListOptions) ([]PersonExtraFieldEntry, error)
- func (c *Client) ListPersonGroups(ctx context.Context, opts *SupportingFilesListOptions) *PersonGroupIterator
- func (c *Client) ListPersons(ctx context.Context, opts *SupportingFilesListOptions) *PersonIterator
- func (c *Client) ListPriorities(ctx context.Context) ([]Priority, error)
- func (c *Client) ListProcessingStatuses(ctx context.Context) ([]ProcessingStatus, error)
- func (c *Client) ListRequesterBranches(ctx context.Context, opts *SupportingFilesListOptions) *BranchIterator
- func (c *Client) ListRequesterChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
- func (c *Client) ListRequesterChangeRequests(ctx context.Context, changeID string) ([]ChangeRequest, error)
- func (c *Client) ListRequesterChanges(ctx context.Context, opts *RequesterChangeListOptions) ([]RequesterChange, error)
- func (c *Client) ListRequesterLocations(ctx context.Context, opts *SupportingFilesListOptions) *LocationIterator
- func (c *Client) ListRequesterPersons(ctx context.Context, opts *SupportingFilesListOptions) *PersonIterator
- func (c *Client) ListRequesterVisitors(ctx context.Context, opts *VisitorListOptions) (*VisitorListResponse, error)
- func (c *Client) ListRequests(ctx context.Context, incidentID string, opts *RequestListOptions) ([]Request, error)
- func (c *Client) ListRequestsByNumber(ctx context.Context, incidentNumber string, opts *RequestListOptions) ([]Request, error)
- func (c *Client) ListReservableAssets(ctx context.Context, opts *ReservableAssetListOptions) ([]ReservableAsset, error)
- func (c *Client) ListReservableLocations(ctx context.Context, opts *ReservableLocationListOptions) ([]ReservableLocation, error)
- func (c *Client) ListReservableServices(ctx context.Context, opts *ReservableServiceListOptions) ([]ReservableService, error)
- func (c *Client) ListReservations(ctx context.Context, opts *ReservationListOptions) (*ReservationListResponse, error)
- func (c *Client) ListRoleConfigurations(ctx context.Context, opts *RoleConfigurationListOptions) ([]RoleConfiguration, error)
- func (c *Client) ListRoles(ctx context.Context, opts *RoleListOptions) ([]Role, error)
- func (c *Client) ListSLAServices(ctx context.Context) ([]IdName, error)
- func (c *Client) ListSLAs(ctx context.Context, opts *SLAListOptions) ([]SLAService, error)
- func (c *Client) ListServiceWindows(ctx context.Context, opts *ServiceWindowOptions) ([]IdName, error)
- func (c *Client) ListServices(ctx context.Context, opts *ServiceListOptions) ([]ServiceListEntry, error)
- func (c *Client) ListStockQuantities(ctx context.Context, stockID, bulkItemID string) ([]StockQuantity, error)
- func (c *Client) ListSupplierContacts(ctx context.Context, opts *SupportingFilesListOptions) *SupplierContactIterator
- func (c *Client) ListSuppliers(ctx context.Context, opts *SupportingFilesListOptions) *SupplierIterator
- func (c *Client) ListTimeRegistrations(ctx context.Context, opts *ListOptions) *TimeRegistrationIterator
- func (c *Client) ListTimeSpent(ctx context.Context, incidentID string) ([]TimeSpent, error)
- func (c *Client) ListTimeSpentByNumber(ctx context.Context, incidentNumber string) ([]TimeSpent, error)
- func (c *Client) ListTimeSpentReasons(ctx context.Context) ([]IdName, error)
- func (c *Client) ListUrgencies(ctx context.Context) ([]IdName, error)
- func (c *Client) ListVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, archived *bool) ([]VisitorSearchlistItemWithExtLink, error)
- func (c *Client) ListVisitors(ctx context.Context, opts *VisitorListOptions) (*VisitorListResponse, error)
- func (c *Client) RateLimitInfo() (limit, remaining int, reset time.Time)
- func (c *Client) RegisterTimeSpent(ctx context.Context, incidentID string, req *TimeSpentRequest) (*TimeSpent, error)
- func (c *Client) RegisterTimeSpentByNumber(ctx context.Context, incidentNumber string, req *TimeSpentRequest) (*TimeSpent, error)
- func (c *Client) ResetCircuitBreaker()
- func (c *Client) Search(ctx context.Context, query string, index SearchIndex, start int) (*SearchResult, error)
- func (c *Client) SendEmail(ctx context.Context, req *SendEmailRequest) error
- func (c *Client) SendTaskNotification(ctx context.Context, notification *CustomNotification) error
- func (c *Client) SubmitActivityManagerAction(ctx context.Context, activityID string, req *ManagerActionRequest) (*ChangeActivity, error)
- func (c *Client) SubmitChangeManagerAction(ctx context.Context, changeID string, req *ManagerActionRequest) (*Change, error)
- func (c *Client) TriggerWebhook(ctx context.Context, urlPathSegment string, body interface{}) error
- func (c *Client) UnarchiveAsset(ctx context.Context, id string) error
- func (c *Client) UnarchiveBadge(ctx context.Context, identifier string) error
- func (c *Client) UnarchiveBranch(ctx context.Context, id string) (*ExtendedBranch, error)
- func (c *Client) UnarchiveCancellationReason(ctx context.Context, identifier string) (*CancellationReason, error)
- func (c *Client) UnarchiveCarPark(ctx context.Context, identifier string) error
- func (c *Client) UnarchiveChange(ctx context.Context, id string) (*Change, error)
- func (c *Client) UnarchiveIdentificationType(ctx context.Context, identifier string) error
- func (c *Client) UnarchiveIncident(ctx context.Context, id string, unarchivePartials bool) (*Incident, error)
- func (c *Client) UnarchiveIncidentByNumber(ctx context.Context, number string, unarchivePartials bool) (*Incident, error)
- func (c *Client) UnarchiveKnowledgeItem(ctx context.Context, identifier string) error
- func (c *Client) UnarchiveKnowledgeItemStatus(ctx context.Context, identifier string) (*KnowledgeItemStatus, error)
- func (c *Client) UnarchiveReservation(ctx context.Context, id string) error
- func (c *Client) UnarchiveVisitor(ctx context.Context, identifier string) error
- func (c *Client) UnarchiveVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string) error
- func (c *Client) UnassignAssets(ctx context.Context, assetIDs []string, linkType, linkToID string) error
- func (c *Client) UnlinkAssetFromService(ctx context.Context, serviceID, objectID string) error
- func (c *Client) UnlinkAssets(ctx context.Context, relationID string) error
- func (c *Client) UnlinkKnowledgeItemBranch(ctx context.Context, identifier, branchID string) error
- func (c *Client) UpdateAsset(ctx context.Context, id string, data map[string]interface{}) (*Asset, error)
- func (c *Client) UpdateBadge(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
- func (c *Client) UpdateBranch(ctx context.Context, id string, req *BranchCreateRequest) (*ExtendedBranch, error)
- func (c *Client) UpdateCancellationReason(ctx context.Context, identifier string, req *CancellationReasonRequest) (*CancellationReason, error)
- func (c *Client) UpdateCarPark(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
- func (c *Client) UpdateChange(ctx context.Context, id string, req *ChangeUpdateRequest) (*Change, error)
- func (c *Client) UpdateChangeActivity(ctx context.Context, id string, req *ChangeActivityUpdateRequest) (*ChangeActivity, error)
- func (c *Client) UpdateIdentificationType(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
- func (c *Client) UpdateIncident(ctx context.Context, id string, req *IncidentUpdateRequest) (*Incident, error)
- func (c *Client) UpdateIncidentByNumber(ctx context.Context, number string, req *IncidentUpdateRequest) (*Incident, error)
- func (c *Client) UpdateKnowledgeItem(ctx context.Context, identifier string, req *KnowledgeItemUpdateRequest) error
- func (c *Client) UpdateKnowledgeItemStatus(ctx context.Context, identifier string, req *KnowledgeItemStatusCreateRequest) (*KnowledgeItemStatus, error)
- func (c *Client) UpdateKnowledgeItemTranslation(ctx context.Context, identifier, language string, ...) error
- func (c *Client) UpdateOperationalActivity(ctx context.Context, identifier string, req *UpdateOperationalActivityRequest) error
- func (c *Client) UpdateOperationalActivityRequest(ctx context.Context, identifier, requestID string, ...) error
- func (c *Client) UpdateRequesterVisitor(ctx context.Context, identifier string, req *UpdateVisitorRequest) error
- func (c *Client) UpdateReservation(ctx context.Context, id string, req *ReservationCreateRequest) (*Reservation, error)
- func (c *Client) UpdateServiceAssetLink(ctx context.Context, serviceID, objectID string, req *ServiceAssetLinkUpdate) error
- func (c *Client) UpdateStockQuantity(ctx context.Context, req *StockQuantityUpdateRequest) (*StockQuantity, error)
- func (c *Client) UpdateVisitor(ctx context.Context, identifier string, req *UpdateVisitorRequest) error
- func (c *Client) UpdateVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string, ...) error
- func (c *Client) UploadAssetFile(ctx context.Context, assetID, fieldID, filename string, r io.Reader) error
- func (c *Client) UploadAttachment(ctx context.Context, incidentID, filename string, r io.Reader, ...) (*Attachment, error)
- func (c *Client) UploadAttachmentByNumber(ctx context.Context, incidentNumber, filename string, r io.Reader, ...) (*Attachment, error)
- func (c *Client) UploadChangeActivityAttachment(ctx context.Context, activityID, filename string, r io.Reader, ...) (*ChangeActivityAttachment, error)
- func (c *Client) UploadChangeAttachment(ctx context.Context, changeID, filename string, r io.Reader, ...) (*ChangeAttachment, error)
- func (c *Client) UploadKnowledgeItemAttachment(ctx context.Context, identifier, filename, description string, r io.Reader) error
- func (c *Client) UploadKnowledgeItemImage(ctx context.Context, identifier, filename string, r io.Reader) error
- func (c *Client) UploadOperationalActivityAttachment(ctx context.Context, identifier, filename string, r io.Reader, ...) (*OperationalAttachment, error)
- func (c *Client) UploadPicture(ctx context.Context, filename string, r io.Reader) error
- func (c *Client) UploadRequesterChangeAttachment(ctx context.Context, changeID, filename string, r io.Reader, ...) (*ChangeAttachment, error)
- func (c *Client) UploadRequesterVisitorAttachment(ctx context.Context, identifier, filename string, r io.Reader) error
- func (c *Client) UploadVisitorAttachment(ctx context.Context, identifier, filename string, r io.Reader) error
- func (c *Client) WithResilience(config *ResilienceConfig) *Client
- type ConvertHTMLToPDFRequest
- type Country
- type CreateBarcodeRequest
- type CreateMemoHistoryRequest
- type CreateMemoHistoryResponse
- type CreateOperationalActivityRequest
- type CreateSearchlistRequest
- type CreateSearchlistWithExtLinkRequest
- type CreateTimeRegistrationRequest
- type CreateVisitorsRequest
- type CurrencySettings
- type CustomNotification
- type DeescalateRequest
- type Department
- type Duration
- type Email
- type Error
- type EscalateRequest
- type EscalationStatus
- type ExtendedBranch
- type ExtendedLocation
- type ExtendedOperator
- type ExtendedSupplier
- type ExternalLink
- type ExternalLinkCreate
- type FacilityOccupancy
- type FacilityOccupancyOptions
- type IdName
- type IdNameRef
- type IdRef
- type Incident
- type IncidentCreateRequest
- type IncidentIterator
- type IncidentStatus
- type IncidentUpdateRequest
- type KnowledgeAttachment
- type KnowledgeExternalLink
- type KnowledgeFeedback
- type KnowledgeItem
- type KnowledgeItemContent
- type KnowledgeItemCreateRequest
- type KnowledgeItemList
- type KnowledgeItemListOptions
- type KnowledgeItemReference
- type KnowledgeItemStatus
- type KnowledgeItemStatusCreateRequest
- type KnowledgeItemStatusList
- type KnowledgeItemTranslation
- type KnowledgeItemURLs
- type KnowledgeItemUpdateRequest
- type KnowledgeItemVisibility
- type Language
- type LinkItem
- type LinkType
- type LinkedAsset
- type ListOptions
- type Localization
- type Location
- type LocationIterator
- type MainIncident
- type MainIncidentRef
- type MajorCallObject
- type ManagerActionRequest
- type ManagerAuthorizable
- type ManagerAuthorizableListOptions
- type MockRequest
- type MockServer
- func (m *MockServer) AddAsset(asset *Asset)
- func (m *MockServer) AddBranch(branch *ExtendedBranch)
- func (m *MockServer) AddChange(change *Change)
- func (m *MockServer) AddIncident(incident *Incident)
- func (m *MockServer) AddKnowledgeItem(item *KnowledgeItem)
- func (m *MockServer) AddOperator(operator *ExtendedOperator)
- func (m *MockServer) AddPerson(person *Person)
- func (m *MockServer) AddReservation(reservation *Reservation)
- func (m *MockServer) AddService(service *Service)
- func (m *MockServer) AddVisitor(visitor *Visitor)
- func (m *MockServer) Client() *Client
- func (m *MockServer) GetRequests() []MockRequest
- func (m *MockServer) Reset()
- func (m *MockServer) SetCustomHandler(method, path string, handler http.HandlerFunc)
- type Object
- type OccupancyInterval
- type OperationalActivity
- type OperationalActivityGrouping
- type OperationalActivityListOptions
- type OperationalActivityListResponse
- type OperationalActivitySchema
- type OperationalActivitySettings
- type OperationalActivityType
- type OperationalAttachment
- type OperationalEmail
- type OperationalLinkedLoc
- type OperationalLinkedObject
- type OperationalMemoHistory
- type OperationalNextInSeries
- type OperationalOperator
- type OperationalSeries
- type OperationalTimeRegistration
- type Operator
- type OperatorFilter
- type OperatorGroup
- type OperatorGroupIterator
- type OperatorIDResponse
- type OperatorIterator
- type OperatorSettings
- type OptionalFieldType
- type OptionalFields
- type PDFMargin
- type PartialIncident
- type PermissionGroup
- type Person
- type PersonCount
- type PersonExtraFieldEntry
- type PersonGroup
- type PersonGroupIterator
- type PersonIterator
- type Priority
- type ProcessingStatus
- type ProductVersion
- type ProgressEntry
- type ProgressTrailCount
- type ProgressTrailListOptions
- type RejectionReason
- type Request
- type RequestEntry
- type RequestGetOptions
- type RequestListOptions
- type RequesterChange
- type RequesterChangeListOptions
- type ReservableAsset
- type ReservableAssetListOptions
- type ReservableInterval
- type ReservableLocation
- type ReservableLocationList
- type ReservableLocationListOptions
- type ReservableService
- type ReservableServiceList
- type ReservableServiceListOptions
- type Reservation
- type ReservationCreateRequest
- type ReservationListOptions
- type ReservationListResponse
- type ReservationService
- type ReservationServiceRequest
- type ResilienceConfig
- type RetryExecutor
- type Role
- type RoleConfiguration
- type RoleConfigurationListEmbedded
- type RoleConfigurationListOptions
- type RoleConfigurationListResponse
- type RoleListEmbedded
- type RoleListOptions
- type RoleListResponse
- type SLA
- type SLAListOptions
- type SLAService
- type SearchIndex
- type SearchResult
- type SearchResultItem
- type Searchlist
- type SendEmailRequest
- type Service
- type ServiceAssetLinkUpdate
- type ServiceCreateRequest
- type ServiceLinkedAsset
- type ServiceListEntry
- type ServiceListOptions
- type ServiceWindowOptions
- type StockQuantity
- type StockQuantityUpdateRequest
- type Subcategory
- type Supplier
- type SupplierContact
- type SupplierContactIterator
- type SupplierIterator
- type SupportingFilesListOptions
- type TemplateIcon
- type Time
- type TimeRegParent
- type TimeRegistration
- type TimeRegistrationIterator
- type TimeRegistrationResponse
- type TimeSpent
- type TimeSpentRequest
- type UpdateMemoHistoryRequest
- type UpdateOperationalActivityRequest
- type UpdateSearchlistRequest
- type UpdateSearchlistWithExtLinkRequest
- type UpdateVisitorRequest
- type VisitInfo
- type Visitor
- type VisitorAttachment
- type VisitorExtLink
- type VisitorHost
- type VisitorHostWrite
- type VisitorInfo
- type VisitorListOptions
- type VisitorListResponse
- type VisitorOptFields
- type VisitorOptFieldsWrite
- type VisitorSearchlistItem
- type VisitorSearchlistItemWithExtLink
- type VisitorWriteInfo
Constants ¶
const ( DefaultMaxRetries = 3 DefaultInitialBackoff = 100 * time.Millisecond DefaultMaxBackoff = 10 * time.Second DefaultBackoffMultiplier = 2.0 DefaultFailureThreshold = 5 DefaultResetTimeout = 30 * time.Second DefaultHalfOpenMaxAllowed = 1 )
Default resilience settings
const DefaultMaxUploadSize = 50 * 1024 * 1024
DefaultMaxUploadSize is the default maximum file size for uploads (50MB).
const DefaultPageSize = 100
DefaultPageSize is the default number of items returned per page when PageSize is not specified in ListOptions.
Variables ¶
var ( ErrForbidden = errors.New("forbidden: insufficient permissions") ErrNotFound = errors.New("not found: the requested resource does not exist") ErrBadRequest = errors.New("bad request: invalid request parameters") )
Common errors returned by the client.
var ErrCircuitOpen = errors.New("circuit breaker is open")
ErrCircuitOpen is returned when the circuit breaker is open.
var MaxUploadSize int64 = DefaultMaxUploadSize
MaxUploadSize is the maximum file size allowed for uploads. Set to 0 to disable the limit. Deprecated: Use Client.MaxUploadSize instead for per-client configuration.
Functions ¶
func GetRetryAfter ¶ added in v0.1.16
GetRetryAfter extracts the Retry-After duration from an error, if present.
Types ¶
type APIVersion ¶
type APIVersion struct {
Version string `json:"version"`
}
APIVersion represents the API version response.
type Action ¶
type Action struct {
ID string `json:"id,omitempty"`
MemoText string `json:"memoText,omitempty"`
PlainText string `json:"plainText,omitempty"`
InvisibleForCaller bool `json:"invisibleForCaller,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
}
Action represents an operator action recorded on an incident. Actions form part of the incident's progress trail and can be hidden from callers.
type ActionGetOptions ¶
ActionGetOptions specifies options for getting a single action.
type ActionListOptions ¶
type ActionListOptions struct {
Start int
PageSize int
InlineImages bool
ForceImagesAsData bool
NonAPIAttachmentURLs bool
}
ActionListOptions specifies options for listing actions.
type ActionRequest ¶
type ActionRequest struct {
MemoText string `json:"memoText,omitempty"`
InvisibleForCaller *bool `json:"invisibleForCaller,omitempty"`
}
ActionRequest is the payload for creating or updating an action on an incident.
type ActivityStatus ¶ added in v0.1.13
type ActivityStatus struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
StatusClass string `json:"statusClass,omitempty"`
}
ActivityStatus represents an activity status.
type Address ¶
type Address struct {
Country *IdName `json:"country,omitempty"`
Street string `json:"street,omitempty"`
Number string `json:"number,omitempty"`
County string `json:"county,omitempty"`
City string `json:"city,omitempty"`
Postcode string `json:"postcode,omitempty"`
AddressLine1 string `json:"addressLine1,omitempty"`
AddressLine2 string `json:"addressLine2,omitempty"`
AddressLine3 string `json:"addressLine3,omitempty"`
AddressLine4 string `json:"addressLine4,omitempty"`
AddressLine5 string `json:"addressLine5,omitempty"`
}
Address represents a physical address.
type ArchiveRequest ¶
ArchiveRequest is used for archiving an incident.
type Asset ¶
type Asset struct {
Settings map[string]interface{} `json:"settings,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
Fields map[string]interface{} `json:"fields,omitempty"`
Metadata *AssetMetadata `json:"metadata,omitempty"`
FunctionalState []string `json:"functional-state,omitempty"`
}
Asset represents a business resource/asset.
type AssetAssignment ¶
type AssetAssignment struct {
ID string `json:"id,omitempty"`
LinkType string `json:"linkType,omitempty"`
Target *IdName `json:"target,omitempty"`
}
AssetAssignment represents an assignment of an asset.
type AssetColumn ¶
type AssetColumn struct {
ID string `json:"id,omitempty"`
FunctionName string `json:"functionName,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Type string `json:"type,omitempty"`
}
AssetColumn represents a column in asset list responses.
type AssetLinkRequest ¶
type AssetLinkRequest struct {
SourceID string `json:"sourceId"`
TargetID string `json:"targetId"`
CapabilityID string `json:"capabilityId,omitempty"`
Type string `json:"type,omitempty"`
}
AssetLinkRequest represents a request to link assets.
type AssetListOptions ¶
type AssetListOptions struct {
NameFragment string
SearchTerm string
TemplateID []string
TemplateName []string
Archived *bool
Fields string
Filter string
OrderBy string
ResourceCategory string
PageStart int
PageSize int
FetchCount bool
LinkedToAsset string
LinkedWithDirection string
LinkedWithCapability string
}
AssetListOptions specifies options for listing assets.
type AssetListResponse ¶
type AssetListResponse struct {
DataSet []map[string]interface{} `json:"dataSet,omitempty"`
Columns []AssetColumn `json:"columns,omitempty"`
Templates []AssetTemplate `json:"templates,omitempty"`
Count int `json:"count,omitempty"`
}
AssetListResponse represents the response from listing assets.
type AssetMetadata ¶
type AssetMetadata struct {
ID string `json:"id,omitempty"`
FormName string `json:"formName,omitempty"`
ETag string `json:"etag,omitempty"`
Archived bool `json:"archived,omitempty"`
Icon *TemplateIcon `json:"icon,omitempty"`
TemplateName string `json:"templateName,omitempty"`
TemplateID string `json:"templateId,omitempty"`
ResourceCategory string `json:"resourceCategory,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
}
AssetMetadata contains metadata about an asset.
type AssetStatus ¶
AssetStatus represents an asset status.
type AssetStatusResults ¶
type AssetStatusResults struct {
Results []AssetStatus `json:"results,omitempty"`
}
AssetStatusResults represents the response from listing asset statuses.
type AssetTemplate ¶
type AssetTemplate struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Icon string `json:"icon,omitempty"`
ResourceCategory string `json:"resourceCategory,omitempty"`
Archived bool `json:"archived,omitempty"`
Color string `json:"color,omitempty"`
}
AssetTemplate represents an asset template.
type AssetTemplateListResponse ¶ added in v0.1.10
type AssetTemplateListResponse struct {
Templates []AssetTemplate `json:"templates,omitempty"`
}
AssetTemplateListResponse represents the response from listing asset templates.
type AssetToLink ¶ added in v0.1.4
type AssetToLink struct {
ID string `json:"id,omitempty"`
AssetID string `json:"assetId,omitempty"`
}
AssetToLink represents an asset to be linked to a service.
type AssignedPermission ¶
type AssignedPermission struct {
PermissionID string `json:"permissionId,omitempty"`
}
AssignedPermission represents a permission assigned to a role.
type Attachment ¶
type Attachment struct {
ID string `json:"id,omitempty"`
FileName string `json:"fileName,omitempty"`
DownloadURL string `json:"downloadUrl,omitempty"`
Size int64 `json:"size,omitempty"`
Description string `json:"description,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
Person *IdName `json:"person,omitempty"`
InvisibleForCaller bool `json:"invisibleForCaller,omitempty"`
}
Attachment represents a file attached to an incident. Use DownloadURL to retrieve the file content.
type AttachmentListOptions ¶
AttachmentListOptions specifies options for listing attachments.
type Avatar ¶
type Avatar struct {
Image string `json:"image,omitempty"`
}
Avatar represents an avatar image.
type BarcodeContent ¶ added in v0.1.4
BarcodeContent represents the content to encode in a barcode.
type BarcodeMetadata ¶ added in v0.1.4
type BarcodeMetadata struct {
Format string `json:"format,omitempty"` // AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, PDF_417, QR_CODE, UPC_A, UPC_E
Width int `json:"width,omitempty"` // Width in pixels
Height int `json:"height,omitempty"` // Height in pixels
ImageType string `json:"imageType,omitempty"` // JPG, GIF, PNG
}
BarcodeMetadata represents barcode generation metadata.
type BooleanDateTime ¶ added in v0.1.4
type BooleanDateTime struct {
Value bool `json:"value,omitempty"`
DateTime *Time `json:"dateTime,omitempty"`
}
BooleanDateTime represents a boolean with an associated datetime.
type BooleanDateTimeUpdate ¶ added in v0.1.4
type BooleanDateTimeUpdate struct {
Value bool `json:"value"`
DateTime *Time `json:"dateTime,omitempty"`
}
BooleanDateTimeUpdate represents a boolean/datetime update for operational activities.
type BooleanReason ¶ added in v0.1.4
type BooleanReason struct {
Value bool `json:"value,omitempty"`
Reason *IdName `json:"reason,omitempty"`
}
BooleanReason represents a boolean with an associated reason.
type BooleanReasonUpdate ¶ added in v0.1.4
type BooleanReasonUpdate struct {
Value bool `json:"value"`
Reason *IdNameRef `json:"reason,omitempty"`
}
BooleanReasonUpdate represents a boolean/reason update for operational activities.
type Branch ¶
type Branch struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ClientReferenceNumber string `json:"clientReferenceNumber,omitempty"`
TimeZone string `json:"timeZone,omitempty"`
ExtraA *IdName `json:"extraA,omitempty"`
ExtraB *IdName `json:"extraB,omitempty"`
}
Branch represents a TOPdesk branch.
type BranchCreateRequest ¶
type BranchCreateRequest struct {
Name string `json:"name"`
Specification string `json:"specification,omitempty"`
ClientReferenceNumber string `json:"clientReferenceNumber,omitempty"`
Phone string `json:"phone,omitempty"`
Fax string `json:"fax,omitempty"`
Email string `json:"email,omitempty"`
Website string `json:"website,omitempty"`
BranchType string `json:"branchType,omitempty"`
HeadBranch *IdNameRef `json:"headBranch,omitempty"`
Address *Address `json:"address,omitempty"`
PostalAddress *Address `json:"postalAddress,omitempty"`
OptionalFields1 *BranchOptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *BranchOptionalFields `json:"optionalFields2,omitempty"`
}
BranchCreateRequest represents a request to create a branch.
type BranchIterator ¶ added in v0.1.6
type BranchIterator struct {
// contains filtered or unexported fields
}
BranchIterator provides iterator-style pagination for branches.
func (*BranchIterator) All ¶ added in v0.1.6
func (it *BranchIterator) All() ([]ExtendedBranch, error)
All returns all remaining branches as a slice.
func (*BranchIterator) Branch ¶ added in v0.1.6
func (it *BranchIterator) Branch() *ExtendedBranch
Branch returns the current branch.
func (*BranchIterator) Err ¶ added in v0.1.6
func (it *BranchIterator) Err() error
Err returns any error that occurred during iteration.
func (*BranchIterator) Next ¶ added in v0.1.6
func (it *BranchIterator) Next() bool
Next advances the iterator to the next branch.
type BranchOptionalFields ¶
type BranchOptionalFields struct {
Boolean1 *bool `json:"boolean1,omitempty"`
Boolean2 *bool `json:"boolean2,omitempty"`
Boolean3 *bool `json:"boolean3,omitempty"`
Boolean4 *bool `json:"boolean4,omitempty"`
Boolean5 *bool `json:"boolean5,omitempty"`
Number1 *float64 `json:"number1,omitempty"`
Number2 *float64 `json:"number2,omitempty"`
Number3 *float64 `json:"number3,omitempty"`
Number4 *float64 `json:"number4,omitempty"`
Number5 *float64 `json:"number5,omitempty"`
Text1 string `json:"text1,omitempty"`
Text2 string `json:"text2,omitempty"`
Text3 string `json:"text3,omitempty"`
Text4 string `json:"text4,omitempty"`
Text5 string `json:"text5,omitempty"`
Searchlist1 *IdName `json:"searchlist1,omitempty"`
Searchlist2 *IdName `json:"searchlist2,omitempty"`
Searchlist3 *IdName `json:"searchlist3,omitempty"`
Searchlist4 *IdName `json:"searchlist4,omitempty"`
Searchlist5 *IdName `json:"searchlist5,omitempty"`
}
BranchOptionalFields represents optional fields for branches.
type BudgetHolder ¶
type BudgetHolder struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ExternalID string `json:"externalId,omitempty"`
}
BudgetHolder represents a budget holder.
type BulkAssignmentRequest ¶
type BulkAssignmentRequest struct {
AssetIDs []string `json:"assetIds"`
LinkType string `json:"linkType"`
LinkToID string `json:"linkToId"`
BranchID string `json:"branchId,omitempty"`
}
BulkAssignmentRequest represents a request to assign assets in bulk.
type Caller ¶
type Caller struct {
ID string `json:"id,omitempty"`
DynamicName string `json:"dynamicName,omitempty"`
Email string `json:"email,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
Branch *Branch `json:"branch,omitempty"`
Department *IdName `json:"department,omitempty"`
BudgetHolder *IdName `json:"budgetHolder,omitempty"`
}
Caller represents the person who reported an incident or submitted a request. In responses, contains contact details and organizational information.
type CallerCreate ¶
type CallerCreate struct {
DynamicName string `json:"dynamicName,omitempty"`
Email string `json:"email,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
Department *IdRef `json:"department,omitempty"`
BudgetHolder *IdRef `json:"budgetHolder,omitempty"`
Location *IdRef `json:"location,omitempty"`
}
CallerCreate specifies caller information when creating or updating an incident. Use this to set dynamic (anonymous) caller details or override existing caller fields.
type CallerLookup ¶
CallerLookup references an existing person as the caller. Provide either ID or Email; if both are set, ID takes precedence.
type CancellationReason ¶
type CancellationReason struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
}
CancellationReason represents a reservation cancellation reason.
type CancellationReasonList ¶
type CancellationReasonList struct {
Results []CancellationReason `json:"results,omitempty"`
}
CancellationReasonList represents a list of cancellation reasons.
type CancellationReasonRequest ¶
type CancellationReasonRequest struct {
Name string `json:"name"`
}
CancellationReasonRequest represents a request to create/update a cancellation reason.
type CategoryItem ¶
type CategoryItem struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
Parent *IdName `json:"parent,omitempty"`
Modules *CategoryModules `json:"modules,omitempty"`
Translations []CategoryTranslation `json:"translations,omitempty"`
}
CategoryItem represents an item in the categories response.
type CategoryListOptions ¶
type CategoryListOptions struct {
// Fields is a comma-separated list of fields to return.
// Use "translations" or "all" to include translations.
Fields string
// Query is a FIQL query string for filtering.
Query string
// Sort specifies the sort order.
// Example: "parent.name:asc,name:desc"
Sort string
// Pretty formats the response for readability.
Pretty bool
}
CategoryListOptions specifies options for listing categories.
type CategoryModules ¶
type CategoryModules struct {
Incidents bool `json:"incidents,omitempty"`
Changes bool `json:"changes,omitempty"`
Operations bool `json:"operations,omitempty"`
Services bool `json:"services,omitempty"`
Problems bool `json:"problems,omitempty"`
Projects bool `json:"projects,omitempty"`
}
CategoryModules represents the modules a category applies to.
type CategoryResponse ¶
type CategoryResponse struct {
Item []CategoryItem `json:"item"`
Next string `json:"next,omitempty"`
Size int `json:"size,omitempty"`
}
CategoryResponse represents the response from the categories endpoint.
type CategoryTranslation ¶
type CategoryTranslation struct {
Locale string `json:"locale,omitempty"`
Name string `json:"name,omitempty"`
}
CategoryTranslation represents a translation of a category name.
type Change ¶ added in v0.1.3
type Change struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Status string `json:"status,omitempty"` // simple, extensive
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
Category *IdName `json:"category,omitempty"`
Subcategory *IdName `json:"subcategory,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Impact *IdName `json:"impact,omitempty"`
Benefit *IdName `json:"benefit,omitempty"`
Priority *IdName `json:"priority,omitempty"`
Urgency *IdName `json:"urgency,omitempty"`
Requester *Caller `json:"requester,omitempty"`
Operator *Operator `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Manager *IdName `json:"manager,omitempty"`
Branch *Branch `json:"branch,omitempty"`
Location *Location `json:"location,omitempty"`
Object *Object `json:"object,omitempty"`
ChangeType *IdName `json:"changeType,omitempty"`
Phase *IdName `json:"phase,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualEndDate *Time `json:"actualEndDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Creator *IdName `json:"creator,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
Closed bool `json:"closed,omitempty"`
ClosedDate *Time `json:"closedDate,omitempty"`
ClosureCode *IdName `json:"closureCode,omitempty"`
Costs float64 `json:"costs,omitempty"`
ExpectedCosts float64 `json:"expectedCosts,omitempty"`
TimeSpent float64 `json:"timeSpent,omitempty"`
ExpectedTimeSpent float64 `json:"expectedTimeSpent,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
Change represents a TOPdesk change request for tracking planned modifications to IT infrastructure or services. Changes can be "simple" or "extensive" based on their complexity and approval requirements.
type ChangeActivity ¶ added in v0.1.13
type ChangeActivity struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Category string `json:"category,omitempty"`
Status string `json:"status,omitempty"`
Operator *Operator `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedFinalDate *Time `json:"plannedFinalDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualFinalDate *Time `json:"actualFinalDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Creator *IdName `json:"creator,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
Assignee *IdName `json:"assignee,omitempty"`
AssigneeGroup *IdName `json:"assigneeGroup,omitempty"`
TimeSpent float64 `json:"timeSpent,omitempty"`
ExpectedTimeSpent float64 `json:"expectedTimeSpent,omitempty"`
Costs float64 `json:"costs,omitempty"`
ExpectedCosts float64 `json:"expectedCosts,omitempty"`
Change *IdName `json:"change,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
ChangeActivity represents a task or work item within a change. Activities break down a change into manageable units that can be assigned to different operators or groups.
type ChangeActivityAttachment ¶ added in v0.1.13
type ChangeActivityAttachment = ChangeAttachment
ChangeActivityAttachment is an alias for ChangeAttachment for activities.
type ChangeActivityCreateRequest ¶ added in v0.1.13
type ChangeActivityCreateRequest struct {
BriefDescription string `json:"briefDescription,omitempty"`
Category string `json:"category,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedFinalDate *Time `json:"plannedFinalDate,omitempty"`
ExpectedTimeSpent *float64 `json:"expectedTimeSpent,omitempty"`
ExpectedCosts *float64 `json:"expectedCosts,omitempty"`
Assignee *IdRef `json:"assignee,omitempty"`
AssigneeGroup *IdRef `json:"assigneeGroup,omitempty"`
Change *IdRef `json:"change,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
ChangeActivityCreateRequest represents the payload for creating an activity within a change. Link to a change via the Change field.
type ChangeActivityListOptions ¶ added in v0.1.13
type ChangeActivityListOptions struct {
Start int
PageSize int
Query string
Sort string
Fields string
ChangeID string
ChangeNumber string
OrderByColumn string
Asc bool
}
ChangeActivityListOptions specifies filtering and pagination options for listing activities. Use ChangeID or ChangeNumber to filter activities for a specific change.
type ChangeActivityProgressEntry ¶ added in v0.1.13
type ChangeActivityProgressEntry = ChangeProgressEntry
ChangeActivityProgressEntry is an alias for ChangeProgressEntry for activities.
type ChangeActivityProgressEntryRequest ¶ added in v0.1.13
type ChangeActivityProgressEntryRequest = ChangeProgressEntryRequest
ChangeActivityProgressEntryRequest is an alias for ChangeProgressEntryRequest.
type ChangeActivityRequest ¶ added in v0.1.13
type ChangeActivityRequest = ChangeRequest
ChangeActivityRequest represents a request linked to a change activity.
type ChangeActivityUpdateRequest ¶ added in v0.1.13
type ChangeActivityUpdateRequest struct {
BriefDescription string `json:"briefDescription,omitempty"`
Category string `json:"category,omitempty"`
Status string `json:"status,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedFinalDate *Time `json:"plannedFinalDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualFinalDate *Time `json:"actualFinalDate,omitempty"`
TimeSpent *float64 `json:"timeSpent,omitempty"`
ExpectedTimeSpent *float64 `json:"expectedTimeSpent,omitempty"`
Costs *float64 `json:"costs,omitempty"`
ExpectedCosts *float64 `json:"expectedCosts,omitempty"`
Assignee *IdRef `json:"assignee,omitempty"`
AssigneeGroup *IdRef `json:"assigneeGroup,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
ChangeActivityUpdateRequest represents the payload for updating an existing activity. Only include fields that should be changed; omitted fields remain unchanged.
type ChangeArchiveRequest ¶ added in v0.1.13
type ChangeArchiveRequest struct {
ArchivingReason *IdNameRef `json:"archivingReason,omitempty"`
}
ChangeArchiveRequest represents the payload for archiving a change.
type ChangeAttachment ¶ added in v0.1.13
type ChangeAttachment struct {
ID string `json:"id,omitempty"`
Filename string `json:"fileName,omitempty"`
Size int64 `json:"size,omitempty"`
DownloadURL string `json:"downloadUrl,omitempty"`
InvisibleForCaller bool `json:"invisibleForCaller,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Description string `json:"description,omitempty"`
Operator *IdName `json:"operator,omitempty"`
}
ChangeAttachment represents an attachment on a change.
type ChangeBenefit ¶ added in v0.1.13
ChangeBenefit represents a change benefit lookup value.
type ChangeCalendarItem ¶ added in v0.1.13
type ChangeCalendarItem struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Type string `json:"type,omitempty"` // change, activity
BriefDescription string `json:"briefDescription,omitempty"`
Category *IdName `json:"category,omitempty"`
Status string `json:"status,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualEndDate *Time `json:"actualEndDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Change *IdName `json:"change,omitempty"` // For activities
}
ChangeCalendarItem represents a change or activity displayed in the change calendar. Used for visualizing scheduled changes and their timing.
type ChangeCalendarListOptions ¶ added in v0.1.13
type ChangeCalendarListOptions struct {
Start int
PageSize int
Query string
Sort string
Fields string
FromDate *Time
UntilDate *Time
TypeParam string // "change", "activity", or empty for both
Status string
Category string
OperatorID string
OperatorGroup string
ShowUnassigned bool
}
ChangeCalendarListOptions specifies filtering options for the change calendar. Use FromDate and UntilDate to specify the calendar date range.
type ChangeCancelRequest ¶ added in v0.1.13
type ChangeCancelRequest struct {
RejectionReason *IdNameRef `json:"rejectionReason,omitempty"`
MemoText string `json:"memoText,omitempty"`
}
ChangeCancelRequest represents the payload for cancelling (rejecting) a change. Optionally provide a rejection reason and explanatory memo text.
type ChangeCreateRequest ¶ added in v0.1.3
type ChangeCreateRequest struct {
Status string `json:"status,omitempty"` // simple, extensive
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Impact *IdNameRef `json:"impact,omitempty"`
Benefit *IdNameRef `json:"benefit,omitempty"`
Priority *IdNameRef `json:"priority,omitempty"`
Urgency *IdNameRef `json:"urgency,omitempty"`
Requester *CallerLookup `json:"requester,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
Manager *IdRef `json:"manager,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
Location *IdRef `json:"location,omitempty"`
ChangeType *IdNameRef `json:"changeType,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
ExpectedCosts *float64 `json:"expectedCosts,omitempty"`
ExpectedTimeSpent *float64 `json:"expectedTimeSpent,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
ChangeCreateRequest represents the payload for creating a new change. Status should be "simple" or "extensive" to indicate the change complexity.
type ChangeImpact ¶ added in v0.1.13
ChangeImpact represents a change impact lookup value.
type ChangeListOptions ¶ added in v0.1.3
ChangeListOptions specifies options for listing changes.
type ChangeProgressEntry ¶ added in v0.1.13
type ChangeProgressEntry struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"` // memo, action
MemoText string `json:"memoText,omitempty"`
PlainText string `json:"plainText,omitempty"`
InvisibleForAll bool `json:"invisibleForAll,omitempty"`
Operator *IdName `json:"operator,omitempty"`
Person *IdName `json:"person,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
}
ChangeProgressEntry represents a progress trail entry on a change.
type ChangeProgressEntryRequest ¶ added in v0.1.13
type ChangeProgressEntryRequest struct {
MemoText string `json:"memoText,omitempty"`
InvisibleForAll *bool `json:"invisibleForAll,omitempty"`
}
ChangeProgressEntryRequest represents a request to add a progress trail entry.
type ChangeProgressTrailListOptions ¶ added in v0.1.13
type ChangeProgressTrailListOptions struct {
Start int
PageSize int
InlineImages bool
NonAPIAttachmentURLs bool
}
ChangeProgressTrailListOptions specifies options for listing change progress trail entries.
type ChangeRequest ¶ added in v0.1.13
type ChangeRequest struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Request string `json:"request,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Caller *Caller `json:"caller,omitempty"`
}
ChangeRequest represents a request linked to a change.
type ChangeSettings ¶ added in v0.1.13
type ChangeSettings struct {
ApprovalWorkflowEnabled bool `json:"approvalWorkflowEnabled,omitempty"`
ActivityApprovalEnabled bool `json:"activityApprovalEnabled,omitempty"`
ShowRequestsOnSSP bool `json:"showRequestsOnSSP,omitempty"`
ShowAttachmentsOnSSP bool `json:"showAttachmentsOnSsp,omitempty"`
AllowCallerToAddAttachments bool `json:"allowCallerToAddAttachments,omitempty"`
AllowRequestersToRegisterOnSSP bool `json:"allowRequestersToRegisterOnSsp,omitempty"`
}
ChangeSettings represents the configuration options for the change management module. These settings control approval workflows and Self-Service Portal visibility.
type ChangeStatus ¶ added in v0.1.13
type ChangeStatus struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
StatusClass string `json:"statusClass,omitempty"` // open, waiting, closed
}
ChangeStatus represents a status value for changes. StatusClass indicates whether the status represents open, waiting, or closed state.
type ChangeTemplate ¶ added in v0.1.13
type ChangeTemplate struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
}
ChangeTemplate represents an applicable change template.
type ChangeUpdateRequest ¶ added in v0.1.3
type ChangeUpdateRequest struct {
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Impact *IdNameRef `json:"impact,omitempty"`
Benefit *IdNameRef `json:"benefit,omitempty"`
Priority *IdNameRef `json:"priority,omitempty"`
Urgency *IdNameRef `json:"urgency,omitempty"`
Requester *CallerLookup `json:"requester,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
Manager *IdRef `json:"manager,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
Location *IdRef `json:"location,omitempty"`
ChangeType *IdNameRef `json:"changeType,omitempty"`
Phase *IdNameRef `json:"phase,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualEndDate *Time `json:"actualEndDate,omitempty"`
Closed *bool `json:"closed,omitempty"`
ClosureCode *IdNameRef `json:"closureCode,omitempty"`
Costs *float64 `json:"costs,omitempty"`
ExpectedCosts *float64 `json:"expectedCosts,omitempty"`
ExpectedTimeSpent *float64 `json:"expectedTimeSpent,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
ChangeUpdateRequest represents the payload for updating an existing change. Only include fields that should be changed; omitted fields remain unchanged.
type CircuitBreaker ¶ added in v0.1.9
type CircuitBreaker struct {
// contains filtered or unexported fields
}
CircuitBreaker implements the circuit breaker pattern.
func NewCircuitBreaker ¶ added in v0.1.9
func NewCircuitBreaker(config *ResilienceConfig) *CircuitBreaker
NewCircuitBreaker creates a new circuit breaker with the given configuration.
func (*CircuitBreaker) Allow ¶ added in v0.1.9
func (cb *CircuitBreaker) Allow() error
Allow checks if a request should be allowed through.
func (*CircuitBreaker) RecordFailure ¶ added in v0.1.9
func (cb *CircuitBreaker) RecordFailure()
RecordFailure records a failed request.
func (*CircuitBreaker) RecordSuccess ¶ added in v0.1.9
func (cb *CircuitBreaker) RecordSuccess()
RecordSuccess records a successful request.
func (*CircuitBreaker) Reset ¶ added in v0.1.9
func (cb *CircuitBreaker) Reset()
Reset resets the circuit breaker to closed state.
func (*CircuitBreaker) State ¶ added in v0.1.9
func (cb *CircuitBreaker) State() string
State returns the current state of the circuit breaker.
type Client ¶
type Client struct {
// BaseURL is the base URL for the TOPdesk API.
// Format: https://{company}.topdesk.net/tas/api
BaseURL string
// HTTPClient is the HTTP client used for requests.
HTTPClient *http.Client
// Resilience provides retry and circuit breaker configuration.
// Set this to enable automatic retries with exponential backoff
// and/or circuit breaker protection.
Resilience *ResilienceConfig
// MaxUploadSize is the maximum file size allowed for uploads.
// Set to 0 to disable the limit. Defaults to DefaultMaxUploadSize (50MB).
MaxUploadSize int64
// contains filtered or unexported fields
}
Client is the TOPdesk API client.
func NewClient ¶
NewClient creates a new TOPdesk API client. baseURL should be in the format: https://{company}.topdesk.net/tas/api username is the operator login name password is the application password (not the regular login password)
func (*Client) AddChangeActivityProgressEntry ¶ added in v0.1.13
func (c *Client) AddChangeActivityProgressEntry(ctx context.Context, activityID string, req *ChangeActivityProgressEntryRequest) (*ChangeActivityProgressEntry, error)
AddChangeActivityProgressEntry adds a progress trail entry to a change activity.
func (*Client) AddChangeProgressEntry ¶ added in v0.1.13
func (c *Client) AddChangeProgressEntry(ctx context.Context, changeID string, req *ChangeProgressEntryRequest) (*ChangeProgressEntry, error)
AddChangeProgressEntry adds a progress trail entry to a change.
func (*Client) AddRequesterChangeProgressEntry ¶ added in v0.1.13
func (c *Client) AddRequesterChangeProgressEntry(ctx context.Context, changeID string, req *ChangeProgressEntryRequest) (*ChangeProgressEntry, error)
AddRequesterChangeProgressEntry adds a progress trail entry to a requester change.
func (*Client) ArchiveAsset ¶
ArchiveAsset archives an asset.
func (*Client) ArchiveBadge ¶ added in v0.1.4
ArchiveBadge archives a badge.
func (*Client) ArchiveBranch ¶
func (c *Client) ArchiveBranch(ctx context.Context, id string, archivingReason *IdNameRef) (*ExtendedBranch, error)
ArchiveBranch archives a branch.
func (*Client) ArchiveCancellationReason ¶
func (c *Client) ArchiveCancellationReason(ctx context.Context, identifier string) (*CancellationReason, error)
ArchiveCancellationReason archives a cancellation reason.
func (*Client) ArchiveCarPark ¶ added in v0.1.4
ArchiveCarPark archives a car park.
func (*Client) ArchiveChange ¶ added in v0.1.13
func (c *Client) ArchiveChange(ctx context.Context, id string, req *ChangeArchiveRequest) (*Change, error)
ArchiveChange archives a change.
func (*Client) ArchiveIdentificationType ¶ added in v0.1.4
ArchiveIdentificationType archives an identification type.
func (*Client) ArchiveIncident ¶
func (c *Client) ArchiveIncident(ctx context.Context, id string, req *ArchiveRequest) (*Incident, error)
ArchiveIncident archives an incident by ID. req can be nil if no archiving reason is required, or provide a reason by id or name.
func (*Client) ArchiveIncidentByNumber ¶
func (c *Client) ArchiveIncidentByNumber(ctx context.Context, number string, req *ArchiveRequest) (*Incident, error)
ArchiveIncidentByNumber archives an incident by number.
func (*Client) ArchiveKnowledgeItem ¶
ArchiveKnowledgeItem archives a knowledge item.
func (*Client) ArchiveKnowledgeItemStatus ¶
func (c *Client) ArchiveKnowledgeItemStatus(ctx context.Context, identifier string) (*KnowledgeItemStatus, error)
ArchiveKnowledgeItemStatus archives a knowledge item status.
func (*Client) ArchiveReservation ¶
ArchiveReservation archives a reservation.
func (*Client) ArchiveVisitor ¶ added in v0.1.4
ArchiveVisitor archives a visitor.
func (*Client) ArchiveVisitorOptionalSearchlist ¶ added in v0.1.4
func (c *Client) ArchiveVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string) error
ArchiveVisitorOptionalSearchlist archives an optional searchlist item.
func (*Client) AssignAssets ¶
func (c *Client) AssignAssets(ctx context.Context, req *BulkAssignmentRequest) error
AssignAssets assigns assets to a target.
func (*Client) CancelChange ¶ added in v0.1.13
func (c *Client) CancelChange(ctx context.Context, id string, req *ChangeCancelRequest) (*Change, error)
CancelChange cancels a change.
func (*Client) CancelReservation ¶
CancelReservation cancels a reservation.
func (*Client) CircuitBreakerState ¶ added in v0.1.9
CircuitBreakerState returns the current state of the circuit breaker. Returns "disabled" if circuit breaker is not enabled, otherwise returns "closed", "open", or "half-open".
func (*Client) ConvertHTMLToPDF ¶ added in v0.1.4
func (c *Client) ConvertHTMLToPDF(ctx context.Context, req *ConvertHTMLToPDFRequest) (io.ReadCloser, error)
ConvertHTMLToPDF converts HTML content to a PDF document. Returns the PDF as an io.ReadCloser that must be closed by the caller.
func (*Client) CountPersons ¶ added in v0.1.13
CountPersons returns the count of persons matching the optional query.
func (*Client) CreateAsset ¶
CreateAsset creates a new asset.
func (*Client) CreateBadge ¶ added in v0.1.4
func (c *Client) CreateBadge(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
CreateBadge creates a new badge.
func (*Client) CreateBarcode ¶ added in v0.1.4
func (c *Client) CreateBarcode(ctx context.Context, req *CreateBarcodeRequest) (io.ReadCloser, error)
CreateBarcode generates a barcode image from the given content. Returns the barcode image as an io.ReadCloser that must be closed by the caller.
func (*Client) CreateBranch ¶
func (c *Client) CreateBranch(ctx context.Context, req *BranchCreateRequest) (*ExtendedBranch, error)
CreateBranch creates a new branch.
func (*Client) CreateCancellationReason ¶
func (c *Client) CreateCancellationReason(ctx context.Context, req *CancellationReasonRequest) (*CancellationReason, error)
CreateCancellationReason creates a new cancellation reason.
func (*Client) CreateCarPark ¶ added in v0.1.4
func (c *Client) CreateCarPark(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
CreateCarPark creates a new car park.
func (*Client) CreateChange ¶ added in v0.1.3
CreateChange creates a new change.
func (*Client) CreateChangeActivity ¶ added in v0.1.13
func (c *Client) CreateChangeActivity(ctx context.Context, req *ChangeActivityCreateRequest) (*ChangeActivity, error)
CreateChangeActivity creates a new change activity.
func (*Client) CreateIdentificationType ¶ added in v0.1.4
func (c *Client) CreateIdentificationType(ctx context.Context, req *CreateSearchlistRequest) (*VisitorSearchlistItem, error)
CreateIdentificationType creates a new identification type.
func (*Client) CreateIncident ¶
CreateIncident creates a new incident.
func (*Client) CreateKnowledgeItem ¶
func (c *Client) CreateKnowledgeItem(ctx context.Context, req *KnowledgeItemCreateRequest) (*KnowledgeItemReference, error)
CreateKnowledgeItem creates a new knowledge item.
func (*Client) CreateKnowledgeItemStatus ¶
func (c *Client) CreateKnowledgeItemStatus(ctx context.Context, req *KnowledgeItemStatusCreateRequest) (*KnowledgeItemStatus, error)
CreateKnowledgeItemStatus creates a new knowledge item status.
func (*Client) CreateKnowledgeItemTranslation ¶
func (c *Client) CreateKnowledgeItemTranslation(ctx context.Context, identifier string, translation *KnowledgeItemTranslation) error
CreateKnowledgeItemTranslation creates a new translation for a knowledge item.
func (*Client) CreateOperationalActivity ¶ added in v0.1.4
func (c *Client) CreateOperationalActivity(ctx context.Context, req *CreateOperationalActivityRequest) (*OperationalActivity, error)
CreateOperationalActivity creates a new operational activity.
func (*Client) CreateOperationalActivityAction ¶ added in v0.1.4
func (c *Client) CreateOperationalActivityAction(ctx context.Context, identifier string, req *CreateMemoHistoryRequest) (*CreateMemoHistoryResponse, error)
CreateOperationalActivityAction creates an action on an operational activity.
func (*Client) CreateOperationalActivityTimeRegistration ¶ added in v0.1.4
func (c *Client) CreateOperationalActivityTimeRegistration(ctx context.Context, identifier string, req *CreateTimeRegistrationRequest) error
CreateOperationalActivityTimeRegistration creates a time registration for an operational activity.
func (*Client) CreateReservation ¶
func (c *Client) CreateReservation(ctx context.Context, req *ReservationCreateRequest) (*Reservation, error)
CreateReservation creates a new reservation.
func (*Client) CreateService ¶ added in v0.1.4
CreateService creates a new service.
func (*Client) CreateVisitorOptionalSearchlist ¶ added in v0.1.4
func (c *Client) CreateVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, req *CreateSearchlistWithExtLinkRequest) (*VisitorSearchlistItemWithExtLink, error)
CreateVisitorOptionalSearchlist creates a new optional searchlist item.
func (*Client) CreateVisitors ¶ added in v0.1.4
func (c *Client) CreateVisitors(ctx context.Context, req *CreateVisitorsRequest) (*VisitorListResponse, error)
CreateVisitors creates one or more visitors.
func (*Client) DeescalateIncident ¶
func (c *Client) DeescalateIncident(ctx context.Context, id string, req *DeescalateRequest) (*Incident, error)
DeescalateIncident de-escalates an incident by ID. req can be nil if no de-escalation reason is required, or provide a reason by id or name.
func (*Client) DeescalateIncidentByNumber ¶
func (c *Client) DeescalateIncidentByNumber(ctx context.Context, number string, req *DeescalateRequest) (*Incident, error)
DeescalateIncidentByNumber de-escalates an incident by number.
func (*Client) DeleteAction ¶
DeleteAction deletes an action by incident ID and action ID.
func (*Client) DeleteActionByNumber ¶
DeleteActionByNumber deletes an action by incident number and action ID.
func (*Client) DeleteAssets ¶
DeleteAssets deletes multiple assets.
func (*Client) DeleteAttachment ¶
DeleteAttachment deletes an attachment by incident ID and attachment ID.
func (*Client) DeleteAttachmentByNumber ¶
func (c *Client) DeleteAttachmentByNumber(ctx context.Context, incidentNumber, attachmentID string) error
DeleteAttachmentByNumber deletes an attachment by incident number and attachment ID.
func (*Client) DeleteChangeAction ¶ added in v0.1.13
DeleteChangeAction deletes an action from a change's progress trail.
func (*Client) DeleteChangeActivityAction ¶ added in v0.1.13
DeleteChangeActivityAction deletes an action from a change activity's progress trail.
func (*Client) DeleteChangeActivityAttachment ¶ added in v0.1.13
func (c *Client) DeleteChangeActivityAttachment(ctx context.Context, activityID, attachmentID string) error
DeleteChangeActivityAttachment deletes an attachment from a change activity.
func (*Client) DeleteChangeActivityRequest ¶ added in v0.1.13
func (c *Client) DeleteChangeActivityRequest(ctx context.Context, activityID, requestID string) error
DeleteChangeActivityRequest removes a request from a change activity.
func (*Client) DeleteChangeAttachment ¶ added in v0.1.13
DeleteChangeAttachment deletes an attachment from a change.
func (*Client) DeleteChangeRequest ¶ added in v0.1.13
DeleteChangeRequest removes a request from a change.
func (*Client) DeleteEmail ¶
DeleteEmail deletes an email by ID.
func (*Client) DeleteKnowledgeItemAttachment ¶
func (c *Client) DeleteKnowledgeItemAttachment(ctx context.Context, identifier, attachmentID string) error
DeleteKnowledgeItemAttachment deletes an attachment from a knowledge item.
func (*Client) DeleteKnowledgeItemImage ¶
DeleteKnowledgeItemImage deletes an image from a knowledge item.
func (*Client) DeleteKnowledgeItemTranslation ¶
func (c *Client) DeleteKnowledgeItemTranslation(ctx context.Context, identifier, language string) error
DeleteKnowledgeItemTranslation deletes a translation from a knowledge item.
func (*Client) DeleteRequest ¶
DeleteRequest deletes a request by incident ID and request ID.
func (*Client) DeleteRequestByNumber ¶
DeleteRequestByNumber deletes a request by incident number and request ID.
func (*Client) DeleteRequesterVisitorAttachment ¶ added in v0.1.4
func (c *Client) DeleteRequesterVisitorAttachment(ctx context.Context, identifier, attachmentID string) error
DeleteRequesterVisitorAttachment deletes an attachment from a visitor (SSP users).
func (*Client) DeleteStockQuantity ¶
DeleteStockQuantity removes a bulk item from stock.
func (*Client) DeleteVisitorAttachment ¶ added in v0.1.4
func (c *Client) DeleteVisitorAttachment(ctx context.Context, identifier, attachmentID string) error
DeleteVisitorAttachment deletes an attachment from a visitor.
func (*Client) DownloadAssetFile ¶
func (c *Client) DownloadAssetFile(ctx context.Context, assetID, fieldID string) (io.ReadCloser, string, error)
DownloadAssetFile downloads a file from an asset.
func (*Client) DownloadAttachment ¶
func (c *Client) DownloadAttachment(ctx context.Context, incidentID, attachmentID string) (io.ReadCloser, string, error)
DownloadAttachment downloads an attachment by incident ID and attachment ID. Returns the file content as a ReadCloser, the content type, and any error. The caller is responsible for closing the ReadCloser.
func (*Client) DownloadAttachmentByNumber ¶
func (c *Client) DownloadAttachmentByNumber(ctx context.Context, incidentNumber, attachmentID string) (io.ReadCloser, string, error)
DownloadAttachmentByNumber downloads an attachment by incident number and attachment ID.
func (*Client) DownloadAuthorizableActivityAttachment ¶ added in v0.1.13
func (c *Client) DownloadAuthorizableActivityAttachment(ctx context.Context, activityID, attachmentID string) (io.ReadCloser, string, error)
DownloadAuthorizableActivityAttachment downloads an attachment from an authorizable activity.
func (*Client) DownloadAuthorizableChangeAttachment ¶ added in v0.1.13
func (c *Client) DownloadAuthorizableChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
DownloadAuthorizableChangeAttachment downloads an attachment from an authorizable change.
func (*Client) DownloadChangeActivityAttachment ¶ added in v0.1.13
func (c *Client) DownloadChangeActivityAttachment(ctx context.Context, activityID, attachmentID string) (io.ReadCloser, string, error)
DownloadChangeActivityAttachment downloads an attachment from a change activity.
func (*Client) DownloadChangeAttachment ¶ added in v0.1.13
func (c *Client) DownloadChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
DownloadChangeAttachment downloads an attachment from a change.
func (*Client) DownloadChangeCalendarItemAttachment ¶ added in v0.1.13
func (c *Client) DownloadChangeCalendarItemAttachment(ctx context.Context, itemID, attachmentID string) (io.ReadCloser, string, error)
DownloadChangeCalendarItemAttachment downloads an attachment from a change calendar item.
func (*Client) DownloadKnowledgeItemAttachment ¶
func (c *Client) DownloadKnowledgeItemAttachment(ctx context.Context, identifier, attachmentID string) (io.ReadCloser, string, error)
DownloadKnowledgeItemAttachment downloads an attachment from a knowledge item.
func (*Client) DownloadKnowledgeItemImage ¶
func (c *Client) DownloadKnowledgeItemImage(ctx context.Context, identifier, imageName string) (io.ReadCloser, string, error)
DownloadKnowledgeItemImage downloads an image from a knowledge item.
func (*Client) DownloadOperationalActivityAttachment ¶ added in v0.1.4
func (c *Client) DownloadOperationalActivityAttachment(ctx context.Context, identifier, attachmentID string) (io.ReadCloser, string, error)
DownloadOperationalActivityAttachment downloads an attachment from an operational activity.
func (*Client) DownloadRequesterChangeAttachment ¶ added in v0.1.13
func (c *Client) DownloadRequesterChangeAttachment(ctx context.Context, changeID, attachmentID string) (io.ReadCloser, string, error)
DownloadRequesterChangeAttachment downloads an attachment from a requester change.
func (*Client) EscalateIncident ¶
func (c *Client) EscalateIncident(ctx context.Context, id string, req *EscalateRequest) (*Incident, error)
EscalateIncident escalates an incident by ID. req can be nil if no escalation reason is required, or provide a reason by id or name.
func (*Client) EscalateIncidentByNumber ¶
func (c *Client) EscalateIncidentByNumber(ctx context.Context, number string, req *EscalateRequest) (*Incident, error)
EscalateIncidentByNumber escalates an incident by number.
func (*Client) FilterAssets ¶
func (c *Client) FilterAssets(ctx context.Context, filter map[string]interface{}) (*AssetListResponse, error)
FilterAssets performs an advanced filter query on assets. This allows for longer parameter lists than the URL-based ListAssets.
func (*Client) GetAPIVersion ¶
GetAPIVersion returns the API version.
func (*Client) GetAction ¶
func (c *Client) GetAction(ctx context.Context, incidentID, actionID string, opts *ActionGetOptions) (*Action, error)
GetAction returns a specific action by incident ID and action ID.
func (*Client) GetActionByNumber ¶
func (c *Client) GetActionByNumber(ctx context.Context, incidentNumber, actionID string, opts *ActionGetOptions) (*Action, error)
GetActionByNumber returns a specific action by incident number and action ID.
func (*Client) GetAssetAssignments ¶
func (c *Client) GetAssetAssignments(ctx context.Context, assetID string) ([]AssetAssignment, error)
GetAssetAssignments retrieves assignments for an asset.
func (*Client) GetAssetTemplate ¶
GetAssetTemplate retrieves an asset template by ID.
func (*Client) GetAuthorizableActivity ¶ added in v0.1.13
GetAuthorizableActivity retrieves an authorizable activity by ID.
func (*Client) GetAuthorizableActivityAttachments ¶ added in v0.1.13
func (c *Client) GetAuthorizableActivityAttachments(ctx context.Context, activityID string) ([]ChangeActivityAttachment, error)
GetAuthorizableActivityAttachments returns attachments for an authorizable activity.
func (*Client) GetAuthorizableActivityProgressTrail ¶ added in v0.1.13
func (c *Client) GetAuthorizableActivityProgressTrail(ctx context.Context, activityID string, opts *ChangeProgressTrailListOptions) ([]ChangeActivityProgressEntry, error)
GetAuthorizableActivityProgressTrail returns the progress trail for an authorizable activity.
func (*Client) GetAuthorizableActivityRequests ¶ added in v0.1.13
func (c *Client) GetAuthorizableActivityRequests(ctx context.Context, activityID string) ([]ChangeActivityRequest, error)
GetAuthorizableActivityRequests returns requests for an authorizable activity.
func (*Client) GetAuthorizableChange ¶ added in v0.1.13
GetAuthorizableChange retrieves an authorizable change by ID.
func (*Client) GetAuthorizableChangeAttachments ¶ added in v0.1.13
func (c *Client) GetAuthorizableChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
GetAuthorizableChangeAttachments returns attachments for an authorizable change.
func (*Client) GetAuthorizableChangeProgressTrail ¶ added in v0.1.13
func (c *Client) GetAuthorizableChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
GetAuthorizableChangeProgressTrail returns the progress trail for an authorizable change.
func (*Client) GetAuthorizableChangeRequests ¶ added in v0.1.13
func (c *Client) GetAuthorizableChangeRequests(ctx context.Context, changeID string) ([]ChangeRequest, error)
GetAuthorizableChangeRequests returns requests for an authorizable change.
func (*Client) GetBlankAsset ¶
func (c *Client) GetBlankAsset(ctx context.Context, templateID, templateName string) (*Asset, error)
GetBlankAsset returns a blank asset for a template.
func (*Client) GetBudgetHolder ¶
GetBudgetHolder retrieves a budget holder by ID.
func (*Client) GetChangeActivity ¶ added in v0.1.13
GetChangeActivity retrieves a change activity by ID.
func (*Client) GetChangeActivityProgressTrail ¶ added in v0.1.13
func (c *Client) GetChangeActivityProgressTrail(ctx context.Context, activityID string, opts *ChangeProgressTrailListOptions) ([]ChangeActivityProgressEntry, error)
GetChangeActivityProgressTrail returns the progress trail for a change activity.
func (*Client) GetChangeByNumber ¶ added in v0.1.3
GetChangeByNumber retrieves a change by its number.
func (*Client) GetChangeCalendarItem ¶ added in v0.1.13
GetChangeCalendarItem retrieves a change calendar item by ID.
func (*Client) GetChangeCalendarItemProgressTrail ¶ added in v0.1.13
func (c *Client) GetChangeCalendarItemProgressTrail(ctx context.Context, itemID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
GetChangeCalendarItemProgressTrail returns the progress trail for a change calendar item.
func (*Client) GetChangeProgressTrail ¶ added in v0.1.13
func (c *Client) GetChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
GetChangeProgressTrail returns the progress trail for a change by ID.
func (*Client) GetChangeSettings ¶ added in v0.1.13
func (c *Client) GetChangeSettings(ctx context.Context) (*ChangeSettings, error)
GetChangeSettings returns the change module settings.
func (*Client) GetCountry ¶
GetCountry retrieves a country by ID.
func (*Client) GetCurrency ¶ added in v0.1.13
func (c *Client) GetCurrency(ctx context.Context) (*CurrencySettings, error)
GetCurrency returns the TOPdesk currency settings.
func (*Client) GetCurrentOperator ¶ added in v0.1.13
func (c *Client) GetCurrentOperator(ctx context.Context) (*ExtendedOperator, error)
GetCurrentOperator retrieves the current logged-in operator.
func (*Client) GetCurrentOperatorID ¶ added in v0.1.13
GetCurrentOperatorID retrieves the current operator's ID.
func (*Client) GetCurrentOperatorSettings ¶ added in v0.1.13
func (c *Client) GetCurrentOperatorSettings(ctx context.Context) (*OperatorSettings, error)
GetCurrentOperatorSettings retrieves the current operator's settings.
func (*Client) GetCurrentPerson ¶ added in v0.1.13
GetCurrentPerson retrieves the current logged-in person.
func (*Client) GetDepartment ¶
GetDepartment retrieves a department by ID.
func (*Client) GetEnabledOptionalFields
deprecated
added in
v0.1.13
func (c *Client) GetEnabledOptionalFields(ctx context.Context, table string, fieldType OptionalFieldType) (map[string]string, error)
GetEnabledOptionalFields returns the names of enabled optional fields for the specified database table and field type.
Deprecated: This endpoint does not meet TOPdesk's internal standards and might be removed or change drastically.
func (*Client) GetFacilityOccupancies ¶
func (c *Client) GetFacilityOccupancies(ctx context.Context, opts *FacilityOccupancyOptions) ([]FacilityOccupancy, error)
GetFacilityOccupancies returns occupancy rates for facilities.
func (*Client) GetIncidentByID ¶
GetIncidentByID retrieves an incident by its UUID.
func (*Client) GetIncidentByNumber ¶
GetIncidentByNumber retrieves an incident by its number (e.g., "I 2024 123").
func (*Client) GetKnowledgeItem ¶
func (c *Client) GetKnowledgeItem(ctx context.Context, identifier string, opts *KnowledgeItemListOptions) (*KnowledgeItem, error)
GetKnowledgeItem retrieves a knowledge item by its ID or number. Pass opts to request a specific language translation.
func (*Client) GetLinkType ¶
GetLinkType retrieves a link type by ID.
func (*Client) GetLocation ¶
GetLocation retrieves a location by ID.
func (*Client) GetOperationalActivity ¶ added in v0.1.4
func (c *Client) GetOperationalActivity(ctx context.Context, identifier string) (*OperationalActivity, error)
GetOperationalActivity retrieves an operational activity by ID or number.
func (*Client) GetOperationalActivityActions ¶ added in v0.1.4
func (c *Client) GetOperationalActivityActions(ctx context.Context, identifier string) ([]OperationalMemoHistory, error)
GetOperationalActivityActions retrieves actions for an operational activity.
func (*Client) GetOperationalActivityAttachments ¶ added in v0.1.4
func (c *Client) GetOperationalActivityAttachments(ctx context.Context, identifier string) ([]OperationalAttachment, error)
GetOperationalActivityAttachments retrieves attachments for an operational activity.
func (*Client) GetOperationalActivityEmail ¶ added in v0.1.4
func (c *Client) GetOperationalActivityEmail(ctx context.Context, identifier, emailID string) (*OperationalEmail, error)
GetOperationalActivityEmail retrieves a specific email for an operational activity.
func (*Client) GetOperationalActivityEmails ¶ added in v0.1.4
func (c *Client) GetOperationalActivityEmails(ctx context.Context, identifier string) ([]OperationalEmail, error)
GetOperationalActivityEmails retrieves emails for an operational activity.
func (*Client) GetOperationalActivityLinkedObjects ¶ added in v0.1.4
func (c *Client) GetOperationalActivityLinkedObjects(ctx context.Context, identifier string) ([]OperationalLinkedObject, error)
GetOperationalActivityLinkedObjects retrieves linked objects for an operational activity.
func (*Client) GetOperationalActivityRequests ¶ added in v0.1.4
func (c *Client) GetOperationalActivityRequests(ctx context.Context, identifier string) ([]OperationalMemoHistory, error)
GetOperationalActivityRequests retrieves requests for an operational activity.
func (*Client) GetOperationalActivitySettings ¶ added in v0.1.4
func (c *Client) GetOperationalActivitySettings(ctx context.Context) (*OperationalActivitySettings, error)
GetOperationalActivitySettings retrieves settings for operational activities.
func (*Client) GetOperationalActivityTimeRegistrations ¶ added in v0.1.4
func (c *Client) GetOperationalActivityTimeRegistrations(ctx context.Context, identifier string) ([]OperationalTimeRegistration, error)
GetOperationalActivityTimeRegistrations retrieves time registrations for an operational activity.
func (*Client) GetOperationalSeries ¶ added in v0.1.4
GetOperationalSeries retrieves an operational series by ID.
func (*Client) GetOperator ¶
GetOperator retrieves an operator by ID.
func (*Client) GetOperatorAvatar ¶
GetOperatorAvatar returns the avatar for an operator.
func (*Client) GetOperatorGroup ¶
GetOperatorGroup retrieves an operator group by ID.
func (*Client) GetPermissionGroup ¶
GetPermissionGroup retrieves a permission group by ID.
func (*Client) GetPersonAvatar ¶
GetPersonAvatar returns the avatar for a person.
func (*Client) GetPersonGroup ¶
GetPersonGroup retrieves a person group by ID.
func (*Client) GetPossibleAssetRelations ¶
func (c *Client) GetPossibleAssetRelations(ctx context.Context, sourceID, targetID string) ([]string, error)
GetPossibleAssetRelations returns possible relations between two assets.
func (*Client) GetProductVersion ¶
func (c *Client) GetProductVersion(ctx context.Context) (*ProductVersion, error)
GetProductVersion returns the TOPdesk product version.
func (*Client) GetProgressTrail ¶
func (c *Client) GetProgressTrail(ctx context.Context, incidentID string, opts *ProgressTrailListOptions) ([]ProgressEntry, error)
GetProgressTrail returns the progress trail for an incident by ID.
func (*Client) GetProgressTrailByNumber ¶
func (c *Client) GetProgressTrailByNumber(ctx context.Context, incidentNumber string, opts *ProgressTrailListOptions) ([]ProgressEntry, error)
GetProgressTrailByNumber returns the progress trail for an incident by number.
func (*Client) GetProgressTrailCount ¶
GetProgressTrailCount returns the count of progress trail entries for an incident by ID.
func (*Client) GetProgressTrailCountByNumber ¶
func (c *Client) GetProgressTrailCountByNumber(ctx context.Context, incidentNumber string) (int, error)
GetProgressTrailCountByNumber returns the count of progress trail entries for an incident by number.
func (*Client) GetRequest ¶
func (c *Client) GetRequest(ctx context.Context, incidentID, requestID string, opts *RequestGetOptions) (*Request, error)
GetRequest returns a specific request by incident ID and request ID.
func (*Client) GetRequestByNumber ¶
func (c *Client) GetRequestByNumber(ctx context.Context, incidentNumber, requestID string, opts *RequestGetOptions) (*Request, error)
GetRequestByNumber returns a specific request by incident number and request ID.
func (*Client) GetRequesterChange ¶ added in v0.1.13
GetRequesterChange retrieves a change visible to the requester by ID.
func (*Client) GetRequesterChangeProgressTrail ¶ added in v0.1.13
func (c *Client) GetRequesterChangeProgressTrail(ctx context.Context, changeID string, opts *ChangeProgressTrailListOptions) ([]ChangeProgressEntry, error)
GetRequesterChangeProgressTrail returns the progress trail for a requester change.
func (*Client) GetRequesterVisitor ¶ added in v0.1.4
GetRequesterVisitor retrieves a visitor for SSP users by ID or number.
func (*Client) GetRequesterVisitorAttachments ¶ added in v0.1.4
func (c *Client) GetRequesterVisitorAttachments(ctx context.Context, identifier string) ([]VisitorAttachment, error)
GetRequesterVisitorAttachments retrieves attachments for a visitor (SSP users).
func (*Client) GetReservableAssetInterval ¶
func (c *Client) GetReservableAssetInterval(ctx context.Context, identifier string, from *Time) (*ReservableInterval, error)
GetReservableAssetInterval returns the reservable interval for an asset.
func (*Client) GetReservableLocation ¶
GetReservableLocation retrieves a reservable location by ID.
func (*Client) GetReservableLocationInterval ¶
func (c *Client) GetReservableLocationInterval(ctx context.Context, id string, from *Time) (*ReservableInterval, error)
GetReservableLocationInterval returns the reservable interval for a location.
func (*Client) GetReservableService ¶
GetReservableService retrieves a reservable service by ID.
func (*Client) GetReservation ¶
GetReservation retrieves a reservation by ID.
func (*Client) GetReservationByNumber ¶
GetReservationByNumber retrieves a reservation by number.
func (*Client) GetRoleConfiguration ¶
GetRoleConfiguration retrieves a role configuration by its ID.
func (*Client) GetService ¶ added in v0.1.4
GetService retrieves a service by its ID.
func (*Client) GetServiceLinkedAssets ¶ added in v0.1.4
func (c *Client) GetServiceLinkedAssets(ctx context.Context, serviceID string) ([]ServiceLinkedAsset, error)
GetServiceLinkedAssets retrieves the assets linked to a service.
func (*Client) GetServiceWindow ¶
GetServiceWindow returns a service window by ID.
func (*Client) GetSupplier ¶
GetSupplier retrieves a supplier by ID.
func (*Client) GetSupplierContact ¶
GetSupplierContact retrieves a supplier contact by ID.
func (*Client) GetTimeRegistration ¶
GetTimeRegistration returns a time registration by ID.
func (*Client) GetVisitor ¶ added in v0.1.4
GetVisitor retrieves a visitor by ID or number.
func (*Client) GetVisitorAttachments ¶ added in v0.1.4
func (c *Client) GetVisitorAttachments(ctx context.Context, identifier string) ([]VisitorAttachment, error)
GetVisitorAttachments retrieves attachments for a visitor.
func (*Client) GiveKnowledgeItemFeedback ¶
func (c *Client) GiveKnowledgeItemFeedback(ctx context.Context, identifier string, feedback *KnowledgeFeedback) error
GiveKnowledgeItemFeedback adds feedback to a knowledge item.
func (*Client) ImportAssets ¶
func (c *Client) ImportAssets(ctx context.Context, templateID string, assets []map[string]interface{}) error
doAssetImport performs an asset import operation.
func (*Client) LinkAssets ¶
func (c *Client) LinkAssets(ctx context.Context, req *AssetLinkRequest) (*LinkedAsset, error)
LinkAssets creates a link between two assets.
func (*Client) LinkAssetsToOperationalActivity ¶ added in v0.1.4
func (c *Client) LinkAssetsToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
LinkAssetsToOperationalActivity links assets to an operational activity.
func (*Client) LinkAssetsToService ¶ added in v0.1.4
func (c *Client) LinkAssetsToService(ctx context.Context, serviceID string, assets []AssetToLink) ([]ServiceLinkedAsset, error)
LinkAssetsToService links assets to a service.
func (*Client) LinkBranchesToOperationalActivity ¶ added in v0.1.4
func (c *Client) LinkBranchesToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
LinkBranchesToOperationalActivity links branches to an operational activity.
func (*Client) LinkKnowledgeItemBranch ¶
LinkKnowledgeItemBranch links a branch to a knowledge item.
func (*Client) LinkLocationsToOperationalActivity ¶ added in v0.1.4
func (c *Client) LinkLocationsToOperationalActivity(ctx context.Context, identifier string, items []LinkItem) error
LinkLocationsToOperationalActivity links locations to an operational activity.
func (*Client) ListActions ¶
func (c *Client) ListActions(ctx context.Context, incidentID string, opts *ActionListOptions) ([]Action, error)
ListActions returns actions for an incident by ID.
func (*Client) ListActionsByNumber ¶
func (c *Client) ListActionsByNumber(ctx context.Context, incidentNumber string, opts *ActionListOptions) ([]Action, error)
ListActionsByNumber returns actions for an incident by number.
func (*Client) ListActivityRejectionReasons ¶ added in v0.1.13
func (c *Client) ListActivityRejectionReasons(ctx context.Context) ([]RejectionReason, error)
ListActivityRejectionReasons returns the list of activity rejection reasons.
func (*Client) ListActivityStatuses ¶ added in v0.1.13
func (c *Client) ListActivityStatuses(ctx context.Context) ([]ActivityStatus, error)
ListActivityStatuses returns the list of activity statuses.
func (*Client) ListApplicableChangeTemplates ¶ added in v0.1.13
func (c *Client) ListApplicableChangeTemplates(ctx context.Context, query string) ([]ChangeTemplate, error)
ListApplicableChangeTemplates returns change templates applicable to the current operator.
func (*Client) ListArchivingReasons ¶
ListArchivingReasons returns all archiving reasons.
func (*Client) ListAssetStatuses ¶
func (c *Client) ListAssetStatuses(ctx context.Context) ([]AssetStatus, error)
ListAssetStatuses returns a list of asset statuses.
func (*Client) ListAssetTemplates ¶
func (c *Client) ListAssetTemplates(ctx context.Context) ([]AssetTemplate, error)
ListAssetTemplates returns a list of asset templates.
func (*Client) ListAssets ¶
func (c *Client) ListAssets(ctx context.Context, opts *AssetListOptions) (*AssetListResponse, error)
ListAssets returns a list of assets.
func (*Client) ListAttachments ¶
func (c *Client) ListAttachments(ctx context.Context, incidentID string, opts *AttachmentListOptions) ([]Attachment, error)
ListAttachments returns attachments for an incident by ID.
func (*Client) ListAttachmentsByNumber ¶
func (c *Client) ListAttachmentsByNumber(ctx context.Context, incidentNumber string, opts *AttachmentListOptions) ([]Attachment, error)
ListAttachmentsByNumber returns attachments for an incident by number.
func (*Client) ListBadges ¶ added in v0.1.4
ListBadges retrieves all badges.
func (*Client) ListBranchBuildingLevels ¶
func (c *Client) ListBranchBuildingLevels(ctx context.Context) ([]Searchlist, error)
ListBranchBuildingLevels returns building level values.
func (*Client) ListBranchDesignations ¶
func (c *Client) ListBranchDesignations(ctx context.Context) ([]Searchlist, error)
ListBranchDesignations returns branch designation values.
func (*Client) ListBranchEnergyPerformances ¶
func (c *Client) ListBranchEnergyPerformances(ctx context.Context) ([]Searchlist, error)
ListBranchEnergyPerformances returns energy performance values.
func (*Client) ListBranchEnvironmentalImpacts ¶
func (c *Client) ListBranchEnvironmentalImpacts(ctx context.Context) ([]Searchlist, error)
ListBranchEnvironmentalImpacts returns environmental impact values.
func (*Client) ListBranchFilters ¶ added in v0.1.13
func (c *Client) ListBranchFilters(ctx context.Context) ([]OperatorFilter, error)
ListBranchFilters returns branch filters for the current operator.
func (*Client) ListBranchListedBuildings ¶ added in v0.1.13
func (c *Client) ListBranchListedBuildings(ctx context.Context) ([]Searchlist, error)
ListBranchListedBuildings returns listed building values.
func (*Client) ListBranches ¶
func (c *Client) ListBranches(ctx context.Context, opts *SupportingFilesListOptions) *BranchIterator
ListBranches returns an iterator for listing branches with pagination.
func (*Client) ListBudgetHolders ¶
func (c *Client) ListBudgetHolders(ctx context.Context, opts *SupportingFilesListOptions) ([]BudgetHolder, error)
ListBudgetHolders returns a list of budget holders.
func (*Client) ListCallTypes ¶
ListCallTypes returns all call types.
func (*Client) ListCancellationReasons ¶
func (c *Client) ListCancellationReasons(ctx context.Context, archived *bool) ([]CancellationReason, error)
ListCancellationReasons returns a list of reservation cancellation reasons.
func (*Client) ListCarParks ¶ added in v0.1.4
ListCarParks retrieves all car parks.
func (*Client) ListCategories ¶
func (c *Client) ListCategories(ctx context.Context, opts *CategoryListOptions) (*CategoryResponse, error)
ListCategories returns categories and subcategories.
func (*Client) ListCategoryFilters ¶ added in v0.1.13
func (c *Client) ListCategoryFilters(ctx context.Context) ([]OperatorFilter, error)
ListCategoryFilters returns category filters for the current operator.
func (*Client) ListChangeActivities ¶ added in v0.1.13
func (c *Client) ListChangeActivities(ctx context.Context, opts *ChangeActivityListOptions) ([]ChangeActivity, error)
ListChangeActivities returns a list of change activities.
func (*Client) ListChangeActivityAttachments ¶ added in v0.1.13
func (c *Client) ListChangeActivityAttachments(ctx context.Context, activityID string) ([]ChangeActivityAttachment, error)
ListChangeActivityAttachments returns attachments for a change activity.
func (*Client) ListChangeActivityRequests ¶ added in v0.1.13
func (c *Client) ListChangeActivityRequests(ctx context.Context, activityID string) ([]ChangeActivityRequest, error)
ListChangeActivityRequests returns requests linked to a change activity.
func (*Client) ListChangeAttachments ¶ added in v0.1.13
func (c *Client) ListChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
ListChangeAttachments returns attachments for a change by ID.
func (*Client) ListChangeBenefits ¶ added in v0.1.13
func (c *Client) ListChangeBenefits(ctx context.Context) ([]ChangeBenefit, error)
ListChangeBenefits returns the list of change benefits.
func (*Client) ListChangeCalendar ¶ added in v0.1.13
func (c *Client) ListChangeCalendar(ctx context.Context, opts *ChangeCalendarListOptions) ([]ChangeCalendarItem, error)
ListChangeCalendar returns items from the change calendar.
func (*Client) ListChangeCalendarItemAttachments ¶ added in v0.1.13
func (c *Client) ListChangeCalendarItemAttachments(ctx context.Context, itemID string) ([]ChangeAttachment, error)
ListChangeCalendarItemAttachments returns attachments for a change calendar item.
func (*Client) ListChangeCalendarItemRequests ¶ added in v0.1.13
func (c *Client) ListChangeCalendarItemRequests(ctx context.Context, itemID string) ([]ChangeRequest, error)
ListChangeCalendarItemRequests returns requests for a change calendar item.
func (*Client) ListChangeCategories ¶ added in v0.1.13
ListChangeCategories returns the list of change categories.
func (*Client) ListChangeClosureCodes ¶ added in v0.1.13
ListChangeClosureCodes returns the list of change closure codes.
func (*Client) ListChangeImpacts ¶ added in v0.1.13
func (c *Client) ListChangeImpacts(ctx context.Context) ([]ChangeImpact, error)
ListChangeImpacts returns the list of change impacts.
func (*Client) ListChangePhases ¶ added in v0.1.13
ListChangePhases returns the list of change phases.
func (*Client) ListChangePriorities ¶ added in v0.1.13
ListChangePriorities returns the list of change priorities.
func (*Client) ListChangeRejectionReasons ¶ added in v0.1.13
func (c *Client) ListChangeRejectionReasons(ctx context.Context) ([]RejectionReason, error)
ListChangeRejectionReasons returns the list of change rejection reasons.
func (*Client) ListChangeRequests ¶ added in v0.1.13
ListChangeRequests returns requests linked to a change.
func (*Client) ListChangeStatuses ¶ added in v0.1.13
func (c *Client) ListChangeStatuses(ctx context.Context) ([]ChangeStatus, error)
ListChangeStatuses returns the list of change statuses.
func (*Client) ListChangeSubcategories ¶ added in v0.1.13
ListChangeSubcategories returns subcategories for a given category.
func (*Client) ListChangeTypes ¶ added in v0.1.13
ListChangeTypes returns the list of change types.
func (*Client) ListChangeUrgencies ¶ added in v0.1.13
ListChangeUrgencies returns the list of change urgencies.
func (*Client) ListChanges ¶ added in v0.1.3
ListChanges returns a list of changes.
func (*Client) ListClosureCodes ¶
ListClosureCodes returns all closure codes.
func (*Client) ListCountries ¶
ListCountries returns a list of countries.
func (*Client) ListDeescalationReasons ¶
ListDeescalationReasons returns all de-escalation reasons.
func (*Client) ListDepartments ¶
func (c *Client) ListDepartments(ctx context.Context, opts *SupportingFilesListOptions) ([]Department, error)
ListDepartments returns a list of departments.
func (*Client) ListDurations ¶
ListDurations returns all durations.
func (*Client) ListEntryTypes ¶
ListEntryTypes returns all entry types.
func (*Client) ListEscalationReasons ¶
ListEscalationReasons returns all escalation reasons.
func (*Client) ListIdentificationTypes ¶ added in v0.1.4
func (c *Client) ListIdentificationTypes(ctx context.Context, archived *bool) ([]VisitorSearchlistItem, error)
ListIdentificationTypes retrieves all identification types.
func (*Client) ListImpacts ¶
ListImpacts returns all impacts.
func (*Client) ListIncidentCategories ¶
ListIncidentCategories returns all incident categories.
func (*Client) ListIncidentSubcategories ¶
func (c *Client) ListIncidentSubcategories(ctx context.Context) ([]Subcategory, error)
ListIncidentSubcategories returns all incident subcategories. If categoryID is provided, returns only subcategories for that category.
func (*Client) ListIncidents ¶
func (c *Client) ListIncidents(ctx context.Context, opts *ListOptions) *IncidentIterator
ListIncidents returns an iterator for listing incidents. The iterator fetches incidents in pages and provides them one at a time.
Example:
iter := client.ListIncidents(ctx, &topdesk.ListOptions{
PageSize: 50,
Sort: "creationDate:desc",
})
for iter.Next() {
incident := iter.Incident()
fmt.Println(incident.Number, incident.BriefDescription)
}
if err := iter.Err(); err != nil {
log.Fatal(err)
}
func (*Client) ListKnowledgeItemAttachments ¶
func (c *Client) ListKnowledgeItemAttachments(ctx context.Context, identifier string) ([]KnowledgeAttachment, error)
ListKnowledgeItemAttachments lists attachments on a knowledge item.
func (*Client) ListKnowledgeItemBranches ¶
func (c *Client) ListKnowledgeItemBranches(ctx context.Context, identifier string) ([]IdName, error)
ListKnowledgeItemBranches returns the linked branches of a knowledge item.
func (*Client) ListKnowledgeItemImages ¶
ListKnowledgeItemImages lists images uploaded to a knowledge item.
func (*Client) ListKnowledgeItemStatuses ¶
func (c *Client) ListKnowledgeItemStatuses(ctx context.Context, archived *bool) ([]KnowledgeItemStatus, error)
ListKnowledgeItemStatuses retrieves available status values for knowledge items. Set archived to filter for archived or active statuses; nil returns all.
func (*Client) ListKnowledgeItems ¶
func (c *Client) ListKnowledgeItems(ctx context.Context, opts *KnowledgeItemListOptions) (*KnowledgeItemList, error)
ListKnowledgeItems retrieves knowledge base items with optional filtering and pagination. Use opts to filter by language or paginate through large result sets.
func (*Client) ListLanguages ¶ added in v0.1.13
ListLanguages returns a list of languages.
func (*Client) ListLinkTypes ¶
ListLinkTypes returns a list of link types (capabilities).
func (*Client) ListLinkedAssets ¶
func (c *Client) ListLinkedAssets(ctx context.Context, sourceID, targetID, capabilityID string) ([]LinkedAsset, error)
ListLinkedAssets returns assets linked to the specified asset.
func (*Client) ListLocationBuildingZones ¶ added in v0.1.13
func (c *Client) ListLocationBuildingZones(ctx context.Context) ([]Searchlist, error)
ListLocationBuildingZones returns location building zone values.
func (*Client) ListLocationCeilingCoverings ¶ added in v0.1.13
func (c *Client) ListLocationCeilingCoverings(ctx context.Context) ([]Searchlist, error)
ListLocationCeilingCoverings returns location ceiling covering values.
func (*Client) ListLocationFloorCoverings ¶ added in v0.1.13
func (c *Client) ListLocationFloorCoverings(ctx context.Context) ([]Searchlist, error)
ListLocationFloorCoverings returns location floor covering values.
func (*Client) ListLocationFunctionalUses ¶ added in v0.1.13
func (c *Client) ListLocationFunctionalUses(ctx context.Context) ([]Searchlist, error)
ListLocationFunctionalUses returns location functional use values.
func (*Client) ListLocationGlassMaterials ¶ added in v0.1.13
func (c *Client) ListLocationGlassMaterials(ctx context.Context) ([]Searchlist, error)
ListLocationGlassMaterials returns location glass material values.
func (*Client) ListLocationStatuses ¶ added in v0.1.13
func (c *Client) ListLocationStatuses(ctx context.Context) ([]Searchlist, error)
ListLocationStatuses returns location status values.
func (*Client) ListLocationTypes ¶ added in v0.1.13
func (c *Client) ListLocationTypes(ctx context.Context) ([]Searchlist, error)
ListLocationTypes returns location type values.
func (*Client) ListLocationWallCoverings ¶ added in v0.1.13
func (c *Client) ListLocationWallCoverings(ctx context.Context) ([]Searchlist, error)
ListLocationWallCoverings returns location wall covering values.
func (*Client) ListLocations ¶
func (c *Client) ListLocations(ctx context.Context, opts *SupportingFilesListOptions) *LocationIterator
ListLocations returns an iterator for listing locations with pagination.
func (*Client) ListManagerAuthorizables ¶ added in v0.1.13
func (c *Client) ListManagerAuthorizables(ctx context.Context, opts *ManagerAuthorizableListOptions) ([]ManagerAuthorizable, error)
ListManagerAuthorizables returns items that require manager authorization.
func (*Client) ListOperationalActivities ¶ added in v0.1.4
func (c *Client) ListOperationalActivities(ctx context.Context, opts *OperationalActivityListOptions) (*OperationalActivityListResponse, error)
ListOperationalActivities returns a list of operational activities.
func (*Client) ListOperationalActivityGroupings ¶ added in v0.1.4
func (c *Client) ListOperationalActivityGroupings(ctx context.Context, query, fields, sort string) ([]OperationalActivityGrouping, error)
ListOperationalActivityGroupings retrieves groupings for operational activities.
func (*Client) ListOperationalActivityReasonsForAnomaly ¶ added in v0.1.4
ListOperationalActivityReasonsForAnomaly retrieves reasons for anomaly.
func (*Client) ListOperationalActivityReasonsForSkipping ¶ added in v0.1.4
ListOperationalActivityReasonsForSkipping retrieves reasons for skipping.
func (*Client) ListOperationalActivitySchemas ¶ added in v0.1.4
func (c *Client) ListOperationalActivitySchemas(ctx context.Context, query, fields, sort string) ([]OperationalActivitySchema, error)
ListOperationalActivitySchemas retrieves schemas for operational activities.
func (*Client) ListOperationalActivityStatuses ¶ added in v0.1.4
ListOperationalActivityStatuses retrieves statuses for operational activities.
func (*Client) ListOperationalActivityTypes ¶ added in v0.1.4
func (c *Client) ListOperationalActivityTypes(ctx context.Context, query string) ([]OperationalActivityType, error)
ListOperationalActivityTypes retrieves types for operational activities.
func (*Client) ListOperatorFilters ¶ added in v0.1.13
func (c *Client) ListOperatorFilters(ctx context.Context) ([]OperatorFilter, error)
ListOperatorFilters returns operator filters for the current operator.
func (*Client) ListOperatorGroups ¶
func (c *Client) ListOperatorGroups(ctx context.Context, opts *SupportingFilesListOptions) *OperatorGroupIterator
ListOperatorGroups returns an iterator for listing operator groups with pagination.
func (*Client) ListOperators ¶
func (c *Client) ListOperators(ctx context.Context, opts *SupportingFilesListOptions) *OperatorIterator
ListOperators returns an iterator for listing operators with pagination.
func (*Client) ListOptionalFieldValues ¶
func (c *Client) ListOptionalFieldValues(ctx context.Context, tab, searchlist int) ([]IdName, error)
ListOptionalFieldValues returns values for an optional dropdown field. tab must be 1 or 2, searchlist must be 1-5.
func (*Client) ListPermissionGroups ¶
func (c *Client) ListPermissionGroups(ctx context.Context) ([]PermissionGroup, error)
ListPermissionGroups returns a list of permission groups.
func (*Client) ListPersonExtraFieldAEntries ¶ added in v0.1.13
func (c *Client) ListPersonExtraFieldAEntries(ctx context.Context, opts *SupportingFilesListOptions) ([]PersonExtraFieldEntry, error)
ListPersonExtraFieldAEntries returns entries for person extra field A.
func (*Client) ListPersonExtraFieldBEntries ¶ added in v0.1.13
func (c *Client) ListPersonExtraFieldBEntries(ctx context.Context, opts *SupportingFilesListOptions) ([]PersonExtraFieldEntry, error)
ListPersonExtraFieldBEntries returns entries for person extra field B.
func (*Client) ListPersonGroups ¶
func (c *Client) ListPersonGroups(ctx context.Context, opts *SupportingFilesListOptions) *PersonGroupIterator
ListPersonGroups returns an iterator for listing person groups with pagination.
func (*Client) ListPersons ¶
func (c *Client) ListPersons(ctx context.Context, opts *SupportingFilesListOptions) *PersonIterator
ListPersons returns an iterator for listing persons with pagination.
func (*Client) ListPriorities ¶
ListPriorities returns all priorities.
func (*Client) ListProcessingStatuses ¶
func (c *Client) ListProcessingStatuses(ctx context.Context) ([]ProcessingStatus, error)
ListProcessingStatuses returns all processing statuses.
func (*Client) ListRequesterBranches ¶ added in v0.1.13
func (c *Client) ListRequesterBranches(ctx context.Context, opts *SupportingFilesListOptions) *BranchIterator
ListRequesterBranches returns an iterator for branches available to the requester.
func (*Client) ListRequesterChangeAttachments ¶ added in v0.1.13
func (c *Client) ListRequesterChangeAttachments(ctx context.Context, changeID string) ([]ChangeAttachment, error)
ListRequesterChangeAttachments returns attachments for a requester change.
func (*Client) ListRequesterChangeRequests ¶ added in v0.1.13
func (c *Client) ListRequesterChangeRequests(ctx context.Context, changeID string) ([]ChangeRequest, error)
ListRequesterChangeRequests returns requests linked to a requester change.
func (*Client) ListRequesterChanges ¶ added in v0.1.13
func (c *Client) ListRequesterChanges(ctx context.Context, opts *RequesterChangeListOptions) ([]RequesterChange, error)
ListRequesterChanges returns changes visible to the requester.
func (*Client) ListRequesterLocations ¶ added in v0.1.13
func (c *Client) ListRequesterLocations(ctx context.Context, opts *SupportingFilesListOptions) *LocationIterator
ListRequesterLocations returns an iterator for locations available to the requester.
func (*Client) ListRequesterPersons ¶ added in v0.1.13
func (c *Client) ListRequesterPersons(ctx context.Context, opts *SupportingFilesListOptions) *PersonIterator
ListRequesterPersons returns an iterator for persons available to the requester.
func (*Client) ListRequesterVisitors ¶ added in v0.1.4
func (c *Client) ListRequesterVisitors(ctx context.Context, opts *VisitorListOptions) (*VisitorListResponse, error)
ListRequesterVisitors returns a list of visitors for SSP users.
func (*Client) ListRequests ¶
func (c *Client) ListRequests(ctx context.Context, incidentID string, opts *RequestListOptions) ([]Request, error)
ListRequests returns requests for an incident by ID.
func (*Client) ListRequestsByNumber ¶
func (c *Client) ListRequestsByNumber(ctx context.Context, incidentNumber string, opts *RequestListOptions) ([]Request, error)
ListRequestsByNumber returns requests for an incident by number.
func (*Client) ListReservableAssets ¶
func (c *Client) ListReservableAssets(ctx context.Context, opts *ReservableAssetListOptions) ([]ReservableAsset, error)
ListReservableAssets returns a list of reservable assets.
func (*Client) ListReservableLocations ¶
func (c *Client) ListReservableLocations(ctx context.Context, opts *ReservableLocationListOptions) ([]ReservableLocation, error)
ListReservableLocations returns a list of reservable locations.
func (*Client) ListReservableServices ¶
func (c *Client) ListReservableServices(ctx context.Context, opts *ReservableServiceListOptions) ([]ReservableService, error)
ListReservableServices returns a list of reservable services.
func (*Client) ListReservations ¶
func (c *Client) ListReservations(ctx context.Context, opts *ReservationListOptions) (*ReservationListResponse, error)
ListReservations returns a list of reservations.
func (*Client) ListRoleConfigurations ¶
func (c *Client) ListRoleConfigurations(ctx context.Context, opts *RoleConfigurationListOptions) ([]RoleConfiguration, error)
ListRoleConfigurations returns a list of role configurations.
func (*Client) ListSLAServices ¶
ListSLAServices returns all SLA services.
func (*Client) ListSLAs ¶
func (c *Client) ListSLAs(ctx context.Context, opts *SLAListOptions) ([]SLAService, error)
ListSLAs returns SLA services matching the given options.
func (*Client) ListServiceWindows ¶
func (c *Client) ListServiceWindows(ctx context.Context, opts *ServiceWindowOptions) ([]IdName, error)
ListServiceWindows returns service windows matching the given options.
func (*Client) ListServices ¶ added in v0.1.4
func (c *Client) ListServices(ctx context.Context, opts *ServiceListOptions) ([]ServiceListEntry, error)
ListServices returns a list of services.
func (*Client) ListStockQuantities ¶
func (c *Client) ListStockQuantities(ctx context.Context, stockID, bulkItemID string) ([]StockQuantity, error)
ListStockQuantities returns stock quantities for a stock or bulk item.
func (*Client) ListSupplierContacts ¶
func (c *Client) ListSupplierContacts(ctx context.Context, opts *SupportingFilesListOptions) *SupplierContactIterator
ListSupplierContacts returns an iterator for listing supplier contacts with pagination.
func (*Client) ListSuppliers ¶
func (c *Client) ListSuppliers(ctx context.Context, opts *SupportingFilesListOptions) *SupplierIterator
ListSuppliers returns an iterator for listing suppliers with pagination.
func (*Client) ListTimeRegistrations ¶
func (c *Client) ListTimeRegistrations(ctx context.Context, opts *ListOptions) *TimeRegistrationIterator
ListTimeRegistrations returns an iterator for listing time registrations. The iterator fetches registrations in pages and provides them one at a time.
func (*Client) ListTimeSpent ¶
ListTimeSpent returns time spent entries for an incident by ID.
func (*Client) ListTimeSpentByNumber ¶
func (c *Client) ListTimeSpentByNumber(ctx context.Context, incidentNumber string) ([]TimeSpent, error)
ListTimeSpentByNumber returns time spent entries for an incident by number.
func (*Client) ListTimeSpentReasons ¶
ListTimeSpentReasons returns all time spent reasons.
func (*Client) ListUrgencies ¶
ListUrgencies returns all urgencies.
func (*Client) ListVisitorOptionalSearchlist ¶ added in v0.1.4
func (c *Client) ListVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, archived *bool) ([]VisitorSearchlistItemWithExtLink, error)
ListVisitorOptionalSearchlist retrieves optional searchlist items. tab should be 1 or 2, searchlist should be 1-5.
func (*Client) ListVisitors ¶ added in v0.1.4
func (c *Client) ListVisitors(ctx context.Context, opts *VisitorListOptions) (*VisitorListResponse, error)
ListVisitors returns a list of visitors.
func (*Client) RateLimitInfo ¶ added in v0.1.17
RateLimitInfo returns the rate limit information from the last request. Returns limit (max requests), remaining (requests left), and reset time. Values are zero if no rate limit headers were received.
func (*Client) RegisterTimeSpent ¶
func (c *Client) RegisterTimeSpent(ctx context.Context, incidentID string, req *TimeSpentRequest) (*TimeSpent, error)
RegisterTimeSpent registers time spent on an incident by ID.
func (*Client) RegisterTimeSpentByNumber ¶
func (c *Client) RegisterTimeSpentByNumber(ctx context.Context, incidentNumber string, req *TimeSpentRequest) (*TimeSpent, error)
RegisterTimeSpentByNumber registers time spent on an incident by number.
func (*Client) ResetCircuitBreaker ¶ added in v0.1.9
func (c *Client) ResetCircuitBreaker()
ResetCircuitBreaker resets the circuit breaker to closed state. This is useful for testing or manual recovery.
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, query string, index SearchIndex, start int) (*SearchResult, error)
Search performs a search using the specified query and index.
func (*Client) SendEmail ¶ added in v0.1.4
func (c *Client) SendEmail(ctx context.Context, req *SendEmailRequest) error
SendEmail sends an email using TOPdesk's email service. Requires the permission "Send emails with REST API".
func (*Client) SendTaskNotification ¶
func (c *Client) SendTaskNotification(ctx context.Context, notification *CustomNotification) error
SendTaskNotification sends a custom task notification to operators and/or operator groups. Note: This feature requires it to be enabled in Labs. Either operatorIds or operatorGroupIds must be provided.
func (*Client) SubmitActivityManagerAction ¶ added in v0.1.13
func (c *Client) SubmitActivityManagerAction(ctx context.Context, activityID string, req *ManagerActionRequest) (*ChangeActivity, error)
SubmitActivityManagerAction submits a manager authorization action on an activity.
func (*Client) SubmitChangeManagerAction ¶ added in v0.1.13
func (c *Client) SubmitChangeManagerAction(ctx context.Context, changeID string, req *ManagerActionRequest) (*Change, error)
SubmitChangeManagerAction submits a manager authorization action on a change.
func (*Client) TriggerWebhook ¶ added in v0.1.4
TriggerWebhook triggers a webhook action via a customizable URL. The urlPathSegment is the custom URL segment defined when creating the webhook action. The body can be any JSON-serializable data or nil. Requires the permission "Webhooks and Scheduled Actions: Trigger".
func (*Client) UnarchiveAsset ¶
UnarchiveAsset unarchives an asset.
func (*Client) UnarchiveBadge ¶ added in v0.1.4
UnarchiveBadge unarchives a badge.
func (*Client) UnarchiveBranch ¶
UnarchiveBranch unarchives a branch.
func (*Client) UnarchiveCancellationReason ¶
func (c *Client) UnarchiveCancellationReason(ctx context.Context, identifier string) (*CancellationReason, error)
UnarchiveCancellationReason unarchives a cancellation reason.
func (*Client) UnarchiveCarPark ¶ added in v0.1.4
UnarchiveCarPark unarchives a car park.
func (*Client) UnarchiveChange ¶ added in v0.1.13
UnarchiveChange unarchives a change.
func (*Client) UnarchiveIdentificationType ¶ added in v0.1.4
UnarchiveIdentificationType unarchives an identification type.
func (*Client) UnarchiveIncident ¶
func (c *Client) UnarchiveIncident(ctx context.Context, id string, unarchivePartials bool) (*Incident, error)
UnarchiveIncident unarchives an incident by ID. unarchivePartials specifies whether to also unarchive partial incidents.
func (*Client) UnarchiveIncidentByNumber ¶
func (c *Client) UnarchiveIncidentByNumber(ctx context.Context, number string, unarchivePartials bool) (*Incident, error)
UnarchiveIncidentByNumber unarchives an incident by number.
func (*Client) UnarchiveKnowledgeItem ¶
UnarchiveKnowledgeItem unarchives a knowledge item.
func (*Client) UnarchiveKnowledgeItemStatus ¶
func (c *Client) UnarchiveKnowledgeItemStatus(ctx context.Context, identifier string) (*KnowledgeItemStatus, error)
UnarchiveKnowledgeItemStatus unarchives a knowledge item status.
func (*Client) UnarchiveReservation ¶
UnarchiveReservation unarchives a reservation.
func (*Client) UnarchiveVisitor ¶ added in v0.1.4
UnarchiveVisitor unarchives a visitor.
func (*Client) UnarchiveVisitorOptionalSearchlist ¶ added in v0.1.4
func (c *Client) UnarchiveVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string) error
UnarchiveVisitorOptionalSearchlist unarchives an optional searchlist item.
func (*Client) UnassignAssets ¶
func (c *Client) UnassignAssets(ctx context.Context, assetIDs []string, linkType, linkToID string) error
UnassignAssets removes an assignment from assets.
func (*Client) UnlinkAssetFromService ¶ added in v0.1.4
UnlinkAssetFromService removes the link between an asset and a service.
func (*Client) UnlinkAssets ¶
UnlinkAssets removes a link between two assets.
func (*Client) UnlinkKnowledgeItemBranch ¶
UnlinkKnowledgeItemBranch unlinks a branch from a knowledge item.
func (*Client) UpdateAsset ¶
func (c *Client) UpdateAsset(ctx context.Context, id string, data map[string]interface{}) (*Asset, error)
UpdateAsset updates an asset.
func (*Client) UpdateBadge ¶ added in v0.1.4
func (c *Client) UpdateBadge(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
UpdateBadge updates a badge.
func (*Client) UpdateBranch ¶
func (c *Client) UpdateBranch(ctx context.Context, id string, req *BranchCreateRequest) (*ExtendedBranch, error)
UpdateBranch updates a branch.
func (*Client) UpdateCancellationReason ¶
func (c *Client) UpdateCancellationReason(ctx context.Context, identifier string, req *CancellationReasonRequest) (*CancellationReason, error)
UpdateCancellationReason updates a cancellation reason.
func (*Client) UpdateCarPark ¶ added in v0.1.4
func (c *Client) UpdateCarPark(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
UpdateCarPark updates a car park.
func (*Client) UpdateChange ¶ added in v0.1.3
func (c *Client) UpdateChange(ctx context.Context, id string, req *ChangeUpdateRequest) (*Change, error)
UpdateChange updates an existing change.
func (*Client) UpdateChangeActivity ¶ added in v0.1.13
func (c *Client) UpdateChangeActivity(ctx context.Context, id string, req *ChangeActivityUpdateRequest) (*ChangeActivity, error)
UpdateChangeActivity updates an existing change activity.
func (*Client) UpdateIdentificationType ¶ added in v0.1.4
func (c *Client) UpdateIdentificationType(ctx context.Context, identifier string, req *UpdateSearchlistRequest) error
UpdateIdentificationType updates an identification type.
func (*Client) UpdateIncident ¶
func (c *Client) UpdateIncident(ctx context.Context, id string, req *IncidentUpdateRequest) (*Incident, error)
UpdateIncident updates an incident by its UUID. Only the fields set in the request will be updated.
func (*Client) UpdateIncidentByNumber ¶
func (c *Client) UpdateIncidentByNumber(ctx context.Context, number string, req *IncidentUpdateRequest) (*Incident, error)
UpdateIncidentByNumber updates an incident by its number. Only the fields set in the request will be updated.
func (*Client) UpdateKnowledgeItem ¶
func (c *Client) UpdateKnowledgeItem(ctx context.Context, identifier string, req *KnowledgeItemUpdateRequest) error
UpdateKnowledgeItem updates a knowledge item.
func (*Client) UpdateKnowledgeItemStatus ¶
func (c *Client) UpdateKnowledgeItemStatus(ctx context.Context, identifier string, req *KnowledgeItemStatusCreateRequest) (*KnowledgeItemStatus, error)
UpdateKnowledgeItemStatus updates a knowledge item status.
func (*Client) UpdateKnowledgeItemTranslation ¶
func (c *Client) UpdateKnowledgeItemTranslation(ctx context.Context, identifier, language string, content *KnowledgeItemContent) error
UpdateKnowledgeItemTranslation updates a translation for a knowledge item.
func (*Client) UpdateOperationalActivity ¶ added in v0.1.4
func (c *Client) UpdateOperationalActivity(ctx context.Context, identifier string, req *UpdateOperationalActivityRequest) error
UpdateOperationalActivity updates an existing operational activity using PATCH.
func (*Client) UpdateOperationalActivityRequest ¶ added in v0.1.4
func (c *Client) UpdateOperationalActivityRequest(ctx context.Context, identifier, requestID string, req *UpdateMemoHistoryRequest) error
UpdateOperationalActivityRequest updates a request on an operational activity.
func (*Client) UpdateRequesterVisitor ¶ added in v0.1.4
func (c *Client) UpdateRequesterVisitor(ctx context.Context, identifier string, req *UpdateVisitorRequest) error
UpdateRequesterVisitor updates a visitor for SSP users.
func (*Client) UpdateReservation ¶
func (c *Client) UpdateReservation(ctx context.Context, id string, req *ReservationCreateRequest) (*Reservation, error)
UpdateReservation updates a reservation.
func (*Client) UpdateServiceAssetLink ¶ added in v0.1.4
func (c *Client) UpdateServiceAssetLink(ctx context.Context, serviceID, objectID string, req *ServiceAssetLinkUpdate) error
UpdateServiceAssetLink updates properties of a link between an asset and a service.
func (*Client) UpdateStockQuantity ¶
func (c *Client) UpdateStockQuantity(ctx context.Context, req *StockQuantityUpdateRequest) (*StockQuantity, error)
UpdateStockQuantity updates the quantity of a bulk item in stock.
func (*Client) UpdateVisitor ¶ added in v0.1.4
func (c *Client) UpdateVisitor(ctx context.Context, identifier string, req *UpdateVisitorRequest) error
UpdateVisitor updates an existing visitor.
func (*Client) UpdateVisitorOptionalSearchlist ¶ added in v0.1.4
func (c *Client) UpdateVisitorOptionalSearchlist(ctx context.Context, tab, searchlist int, identifier string, req *UpdateSearchlistWithExtLinkRequest) error
UpdateVisitorOptionalSearchlist updates an optional searchlist item.
func (*Client) UploadAssetFile ¶
func (c *Client) UploadAssetFile(ctx context.Context, assetID, fieldID, filename string, r io.Reader) error
UploadAssetFile uploads a file to an asset.
func (*Client) UploadAttachment ¶
func (c *Client) UploadAttachment(ctx context.Context, incidentID, filename string, r io.Reader, invisibleForCaller bool, description string) (*Attachment, error)
UploadAttachment uploads a file to an incident by ID. filename is the name of the file. r is the file content to upload. invisibleForCaller specifies whether the attachment should be hidden from the caller. description is an optional description for the attachment.
func (*Client) UploadAttachmentByNumber ¶
func (c *Client) UploadAttachmentByNumber(ctx context.Context, incidentNumber, filename string, r io.Reader, invisibleForCaller bool, description string) (*Attachment, error)
UploadAttachmentByNumber uploads a file to an incident by number.
func (*Client) UploadChangeActivityAttachment ¶ added in v0.1.13
func (c *Client) UploadChangeActivityAttachment(ctx context.Context, activityID, filename string, r io.Reader, invisibleForCaller bool, description string) (*ChangeActivityAttachment, error)
UploadChangeActivityAttachment uploads a file to a change activity.
func (*Client) UploadChangeAttachment ¶ added in v0.1.13
func (c *Client) UploadChangeAttachment(ctx context.Context, changeID, filename string, r io.Reader, invisibleForCaller bool, description string) (*ChangeAttachment, error)
UploadChangeAttachment uploads a file to a change.
func (*Client) UploadKnowledgeItemAttachment ¶
func (c *Client) UploadKnowledgeItemAttachment(ctx context.Context, identifier, filename, description string, r io.Reader) error
UploadKnowledgeItemAttachment uploads an attachment to a knowledge item.
func (*Client) UploadKnowledgeItemImage ¶
func (c *Client) UploadKnowledgeItemImage(ctx context.Context, identifier, filename string, r io.Reader) error
UploadKnowledgeItemImage uploads an image to a knowledge item.
func (*Client) UploadOperationalActivityAttachment ¶ added in v0.1.4
func (c *Client) UploadOperationalActivityAttachment(ctx context.Context, identifier, filename string, r io.Reader, description string) (*OperationalAttachment, error)
UploadOperationalActivityAttachment uploads an attachment to an operational activity.
func (*Client) UploadPicture ¶ added in v0.1.13
UploadPicture uploads a picture for the current person.
func (*Client) UploadRequesterChangeAttachment ¶ added in v0.1.13
func (c *Client) UploadRequesterChangeAttachment(ctx context.Context, changeID, filename string, r io.Reader, description string) (*ChangeAttachment, error)
UploadRequesterChangeAttachment uploads a file to a requester change.
func (*Client) UploadRequesterVisitorAttachment ¶ added in v0.1.4
func (c *Client) UploadRequesterVisitorAttachment(ctx context.Context, identifier, filename string, r io.Reader) error
UploadRequesterVisitorAttachment uploads an attachment to a visitor (SSP users).
func (*Client) UploadVisitorAttachment ¶ added in v0.1.4
func (c *Client) UploadVisitorAttachment(ctx context.Context, identifier, filename string, r io.Reader) error
UploadVisitorAttachment uploads an attachment to a visitor.
func (*Client) WithResilience ¶ added in v0.1.9
func (c *Client) WithResilience(config *ResilienceConfig) *Client
WithResilience configures retry and circuit breaker behavior for the client. Pass nil to use default settings, or customize the ResilienceConfig.
Example with defaults:
client.WithResilience(nil) // Uses DefaultResilienceConfig()
Example with custom settings:
client.WithResilience(&topdesk.ResilienceConfig{
MaxRetries: 5,
InitialBackoff: 200 * time.Millisecond,
MaxBackoff: 30 * time.Second,
BackoffMultiplier: 2.0,
EnableCircuitBreaker: true,
FailureThreshold: 10,
ResetTimeout: 60 * time.Second,
})
type ConvertHTMLToPDFRequest ¶ added in v0.1.4
type ConvertHTMLToPDFRequest struct {
HTML string `json:"html"`
Format string `json:"format,omitempty"` // A0, A1, A2, A3, A4, A5, A6, Ledger, Legal, Letter, Tabloid
Width string `json:"width,omitempty"`
Height string `json:"height,omitempty"`
Margin *PDFMargin `json:"margin,omitempty"`
}
ConvertHTMLToPDFRequest represents the request payload for HTML to PDF conversion.
type CreateBarcodeRequest ¶ added in v0.1.4
type CreateBarcodeRequest struct {
Metadata *BarcodeMetadata `json:"metadata,omitempty"`
Content *BarcodeContent `json:"content,omitempty"`
}
CreateBarcodeRequest represents the request payload for barcode generation.
type CreateMemoHistoryRequest ¶ added in v0.1.4
type CreateMemoHistoryRequest struct {
MemoText string `json:"memoText"`
Flag int `json:"flag,omitempty"` // 0 or 1
}
CreateMemoHistoryRequest represents the request for creating a memo.
type CreateMemoHistoryResponse ¶ added in v0.1.4
type CreateMemoHistoryResponse struct {
ID string `json:"id,omitempty"`
}
CreateMemoHistoryResponse represents the response from creating a memo.
type CreateOperationalActivityRequest ¶ added in v0.1.4
type CreateOperationalActivityRequest struct {
BriefDescription string `json:"briefDescription"`
PlannedStartDate *Time `json:"plannedStartDate"`
PlannedEndDate *Time `json:"plannedEndDate"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
Type *IdNameRef `json:"type,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
Operator *IdNameRef `json:"operator,omitempty"`
OperatorGroup *IdNameRef `json:"operatorGroup,omitempty"`
Status *IdNameRef `json:"status,omitempty"`
Supplier *IdNameRef `json:"supplier,omitempty"`
EstimatedCosts *float64 `json:"estimatedCosts,omitempty"`
Costs *float64 `json:"costs,omitempty"`
EstimatedTime *int `json:"estimatedTime,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
CreateOperationalActivityRequest represents the request for creating an operational activity.
type CreateSearchlistRequest ¶ added in v0.1.4
type CreateSearchlistRequest struct {
Name string `json:"name"`
Archived bool `json:"archived,omitempty"`
}
CreateSearchlistRequest represents the request for creating a searchlist item.
type CreateSearchlistWithExtLinkRequest ¶ added in v0.1.4
type CreateSearchlistWithExtLinkRequest struct {
Name string `json:"name"`
Archived bool `json:"archived,omitempty"`
ExternalLink *VisitorExtLink `json:"externalLink,omitempty"`
}
CreateSearchlistWithExtLinkRequest represents the request for creating a searchlist item with external link.
type CreateTimeRegistrationRequest ¶ added in v0.1.4
type CreateTimeRegistrationRequest struct {
TimeSpent int64 `json:"timeSpent"` // in minutes
Note string `json:"note,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Reason *IdRef `json:"reason,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
}
CreateTimeRegistrationRequest represents the request for creating a time registration.
type CreateVisitorsRequest ¶ added in v0.1.4
type CreateVisitorsRequest struct {
Visitors []VisitorWriteInfo `json:"visitors"`
Visits []VisitInfo `json:"visits"`
Host *VisitorHostWrite `json:"host"`
OptionalFieldsTab1 *VisitorOptFieldsWrite `json:"optionalFieldsTab1,omitempty"`
OptionalFieldsTab2 *VisitorOptFieldsWrite `json:"optionalFieldsTab2,omitempty"`
ExternalLink *VisitorExtLink `json:"externalLink,omitempty"`
}
CreateVisitorsRequest represents the request payload for creating visitors.
type CurrencySettings ¶ added in v0.1.13
type CurrencySettings struct {
CurrencyPrefix string `json:"currencyPrefix,omitempty"`
CurrencyPostfix string `json:"currencyPostfix,omitempty"`
}
CurrencySettings represents TOPdesk currency configuration.
type CustomNotification ¶
type CustomNotification struct {
// Title is the title of the notification (displayed as first line).
Title string `json:"title"`
// Body is the body text (displayed as second line).
Body string `json:"body,omitempty"`
// URL is a link that opens when the notification is clicked.
// Must start with '/tas/secure/'.
URL string `json:"url,omitempty"`
// OperatorIDs is a list of operator UUIDs to send the notification to.
OperatorIds []string `json:"operatorIds,omitempty"`
// OperatorGroupIDs is a list of operator group UUIDs to send the notification to.
OperatorGroupIds []string `json:"operatorGroupIds,omitempty"`
}
CustomNotification represents a custom task notification request.
type DeescalateRequest ¶
type DeescalateRequest struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
DeescalateRequest is used for de-escalating an incident.
type Department ¶
type Department struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ExternalID string `json:"externalId,omitempty"`
BudgetHolder *IdName `json:"budgetHolder,omitempty"`
}
Department represents a department.
type Duration ¶
type Duration struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
BasicPeriods int `json:"basicPeriods,omitempty"`
TimeSpanType string `json:"timeSpanType,omitempty"`
InFirstLine bool `json:"inFirstLine,omitempty"`
InSecondLine bool `json:"inSecondLine,omitempty"`
}
Duration represents a duration lookup item.
type Email ¶
type Email struct {
ID string `json:"id,omitempty"`
SendDate *Time `json:"sendDate,omitempty"`
Sender string `json:"sender,omitempty"`
Subject string `json:"subject,omitempty"`
Recipient string `json:"recipient,omitempty"`
ReplyTo string `json:"replyTo,omitempty"`
Content string `json:"content,omitempty"`
Attachments string `json:"attachments,omitempty"`
CopyToSender bool `json:"copyToSender,omitempty"`
DeliveryReceipt bool `json:"deliveryReceipt,omitempty"`
ReadReceipt bool `json:"readReceipt,omitempty"`
SuppressAutoReply bool `json:"suppressAutoReply,omitempty"`
Priority string `json:"priority,omitempty"`
HTMLFormat bool `json:"htmlFormat,omitempty"`
User *IdName `json:"user,omitempty"`
CC string `json:"cc,omitempty"`
BCC string `json:"bcc,omitempty"`
IsRemoved bool `json:"isRemoved,omitempty"`
}
Email represents an email message.
type Error ¶
type Error struct {
StatusCode int
Message string
Details string
RetryAfter time.Duration // Retry-After duration from the server, if provided
}
Error represents an API error response.
type EscalateRequest ¶
EscalateRequest is used for escalating an incident.
type EscalationStatus ¶
type EscalationStatus string
EscalationStatus indicates whether an incident has been escalated to management or de-escalated back to normal handling.
const ( // EscalationStatusEscalated indicates the incident has been escalated. EscalationStatusEscalated EscalationStatus = "Escalated" // EscalationStatusDeescalated indicates the incident has been de-escalated. EscalationStatusDeescalated EscalationStatus = "Deescalated" )
type ExtendedBranch ¶
type ExtendedBranch struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Specification string `json:"specification,omitempty"`
ClientReferenceNumber string `json:"clientReferenceNumber,omitempty"`
Phone string `json:"phone,omitempty"`
Fax string `json:"fax,omitempty"`
Email string `json:"email,omitempty"`
Website string `json:"website,omitempty"`
BranchType string `json:"branchType,omitempty"`
HeadBranch *IdName `json:"headBranch,omitempty"`
Address *Address `json:"address,omitempty"`
PostalAddress *Address `json:"postalAddress,omitempty"`
OptionalFields1 *BranchOptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *BranchOptionalFields `json:"optionalFields2,omitempty"`
Archived bool `json:"archived,omitempty"`
Creator *IdName `json:"creator,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
}
ExtendedBranch represents a branch with extended details.
type ExtendedLocation ¶
type ExtendedLocation struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Room string `json:"room,omitempty"`
FunctionalName string `json:"functionalName,omitempty"`
Capacity int `json:"capacity,omitempty"`
ReservableInSSP bool `json:"reservableInSsp,omitempty"`
OptionalFields1 *BranchOptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *BranchOptionalFields `json:"optionalFields2,omitempty"`
Archived bool `json:"archived,omitempty"`
}
ExtendedLocation represents a location with extended details.
type ExtendedOperator ¶
type ExtendedOperator struct {
ID string `json:"id,omitempty"`
PrincipalID string `json:"principalId,omitempty"`
Status string `json:"status,omitempty"`
AccountType string `json:"accountType,omitempty"`
Gender string `json:"gender,omitempty"`
FirstName string `json:"firstName,omitempty"`
SurName string `json:"surName,omitempty"`
DynamicName string `json:"dynamicName,omitempty"`
Initials string `json:"initials,omitempty"`
Prefixes string `json:"prefixes,omitempty"`
Title string `json:"title,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
BirthName string `json:"birthName,omitempty"`
FirstNameCustomer string `json:"firstNameCustomer,omitempty"`
LoginName string `json:"loginName,omitempty"`
Email string `json:"email,omitempty"`
Telephone string `json:"telephone,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
NetworkLoginName string `json:"networkLoginName,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Location *IdName `json:"location,omitempty"`
Department *IdName `json:"department,omitempty"`
BudgetHolder *IdName `json:"budgetHolder,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
}
ExtendedOperator represents an operator with extended details.
type ExtendedSupplier ¶
type ExtendedSupplier struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Address *Address `json:"address,omitempty"`
Phone string `json:"phone,omitempty"`
Fax string `json:"fax,omitempty"`
Email string `json:"email,omitempty"`
Website string `json:"website,omitempty"`
Archived bool `json:"archived,omitempty"`
}
ExtendedSupplier represents a supplier with full details.
type ExternalLink ¶
type ExternalLink struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Date *Time `json:"date,omitempty"`
}
ExternalLink represents an external link attached to an incident.
type ExternalLinkCreate ¶
type ExternalLinkCreate struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Date *Time `json:"date,omitempty"`
}
ExternalLinkCreate is used for creating external links.
type FacilityOccupancy ¶
type FacilityOccupancy struct {
FacilityID string `json:"facilityId,omitempty"`
FacilityType string `json:"facilityType,omitempty"`
Intervals []OccupancyInterval `json:"intervals,omitempty"`
}
FacilityOccupancy represents occupancy rates for a facility.
type FacilityOccupancyOptions ¶
type FacilityOccupancyOptions struct {
LocationID []string
ObjectID []string
PeriodStartDate string
PeriodEndDate string
TimeStart string
TimeEnd string
TimeZone string
WeekDay string
}
FacilityOccupancyOptions specifies options for getting facility occupancy.
type IdName ¶
IdName represents a reference with both ID and Name fields, commonly used in API responses to identify related entities like categories, operators, or branches.
type IdNameRef ¶
IdNameRef is used in create/update requests to reference entities flexibly. You can provide either ID, Name, or both; TOPdesk resolves the reference accordingly.
type IdRef ¶
type IdRef struct {
ID string `json:"id,omitempty"`
}
IdRef is used in create/update requests when only an ID reference is accepted.
type Incident ¶
type Incident struct {
ID string `json:"id,omitempty"`
Status IncidentStatus `json:"status,omitempty"`
Number string `json:"number,omitempty"`
Request string `json:"request,omitempty"`
Requests string `json:"requests,omitempty"` // URL to requests endpoint
Action string `json:"action,omitempty"` // URL to actions endpoint
Attachments string `json:"attachments,omitempty"` // URL to attachments endpoint
Caller *Caller `json:"caller,omitempty"`
CallerBranch *Branch `json:"callerBranch,omitempty"`
CallerLocation *IdName `json:"callerLocation,omitempty"`
BranchExtraFieldA *IdName `json:"branchExtraFieldA,omitempty"`
BranchExtraFieldB *IdName `json:"branchExtraFieldB,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Category *IdName `json:"category,omitempty"`
Subcategory *IdName `json:"subcategory,omitempty"`
CallType *IdName `json:"callType,omitempty"`
EntryType *IdName `json:"entryType,omitempty"`
Object *Object `json:"object,omitempty"`
Asset *IdRef `json:"asset,omitempty"`
Branch *Branch `json:"branch,omitempty"`
Location *Location `json:"location,omitempty"`
Impact *IdName `json:"impact,omitempty"`
Urgency *IdName `json:"urgency,omitempty"`
Priority *IdName `json:"priority,omitempty"`
Duration *IdName `json:"duration,omitempty"`
ActualDuration float64 `json:"actualDuration,omitempty"`
TargetDate *Time `json:"targetDate,omitempty"`
SLA *SLA `json:"sla,omitempty"`
ResponseDate *Time `json:"responseDate,omitempty"`
OnHold bool `json:"onHold,omitempty"`
OnHoldDate *Time `json:"onHoldDate,omitempty"`
OnHoldDuration float64 `json:"onHoldDuration,omitempty"`
FeedbackMessage string `json:"feedbackMessage,omitempty"`
FeedbackRating int `json:"feedbackRating,omitempty"`
Operator *Operator `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Supplier *Supplier `json:"supplier,omitempty"`
ProcessingStatus *IdName `json:"processingStatus,omitempty"`
Completed bool `json:"completed,omitempty"`
CompletedDate *Time `json:"completedDate,omitempty"`
Closed bool `json:"closed,omitempty"`
ClosedDate *Time `json:"closedDate,omitempty"`
ClosureCode *IdName `json:"closureCode,omitempty"`
TimeSpent float64 `json:"timeSpent,omitempty"`
TimeSpentFirstLine float64 `json:"timeSpentFirstLine,omitempty"`
TimeSpentSecondLine float64 `json:"timeSpentSecondLine,omitempty"`
TimeSpentPartial float64 `json:"timeSpentPartial,omitempty"`
TimeSpentLinkedPartials float64 `json:"timeSpentLinkedPartials,omitempty"`
TimeSpentSecondLineAndPartials float64 `json:"timeSpentSecondLineAndPartials,omitempty"` // Deprecated
ItemCosts float64 `json:"itemCosts,omitempty"`
ObjectCosts float64 `json:"objectCosts,omitempty"`
Costs float64 `json:"costs,omitempty"`
EscalationStatus EscalationStatus `json:"escalationStatus,omitempty"`
EscalationReason *IdName `json:"escalationReason,omitempty"`
EscalationOperator *IdName `json:"escalationOperator,omitempty"`
CallDate *Time `json:"callDate,omitempty"`
Creator *IdName `json:"creator,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
ArchivingReason *IdName `json:"archivingReason,omitempty"`
MajorCall bool `json:"majorCall,omitempty"`
MajorCallObject *MajorCallObject `json:"majorCallObject,omitempty"`
PublishToSsd bool `json:"publishToSsd,omitempty"`
Monitored bool `json:"monitored,omitempty"`
Responded bool `json:"responded,omitempty"`
ExpectedTimeSpent float64 `json:"expectedTimeSpent,omitempty"`
MainIncident *MainIncident `json:"mainIncident,omitempty"`
PartialIncidents []PartialIncident `json:"partialIncidents,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
ExternalLinks []ExternalLink `json:"externalLinks,omitempty"`
}
Incident represents a TOPdesk incident with all its associated metadata. This is the primary entity for tracking support requests and issues.
type IncidentCreateRequest ¶
type IncidentCreateRequest struct {
Caller *CallerCreate `json:"caller,omitempty"`
CallerLookup *CallerLookup `json:"callerLookup,omitempty"`
Status IncidentStatus `json:"status,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
ActionInvisibleForCaller bool `json:"actionInvisibleForCaller,omitempty"`
EntryType *IdNameRef `json:"entryType,omitempty"`
CallType *IdNameRef `json:"callType,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Object *IdNameRef `json:"object,omitempty"`
Location *IdRef `json:"location,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
MainIncident *MainIncidentRef `json:"mainIncident,omitempty"`
Impact *IdNameRef `json:"impact,omitempty"`
Urgency *IdNameRef `json:"urgency,omitempty"`
Priority *IdNameRef `json:"priority,omitempty"`
Duration *IdNameRef `json:"duration,omitempty"`
TargetDate *Time `json:"targetDate,omitempty"`
SLA *IdRef `json:"sla,omitempty"`
OnHold *bool `json:"onHold,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
Supplier *IdRef `json:"supplier,omitempty"`
ProcessingStatus *IdNameRef `json:"processingStatus,omitempty"`
Responded *bool `json:"responded,omitempty"`
ResponseDate *Time `json:"responseDate,omitempty"`
Completed *bool `json:"completed,omitempty"`
CompletedDate *Time `json:"completedDate,omitempty"`
Closed *bool `json:"closed,omitempty"`
ClosedDate *Time `json:"closedDate,omitempty"`
ClosureCode *IdNameRef `json:"closureCode,omitempty"`
Costs *float64 `json:"costs,omitempty"`
FeedbackRating *int `json:"feedbackRating,omitempty"`
FeedbackMessage string `json:"feedbackMessage,omitempty"`
MajorCall *bool `json:"majorCall,omitempty"`
MajorCallObject *IdNameRef `json:"majorCallObject,omitempty"`
PublishToSsd *bool `json:"publishToSsd,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
ExternalLink *ExternalLinkCreate `json:"externalLink,omitempty"`
}
IncidentCreateRequest represents the payload for creating a new incident. At minimum, provide a caller (via Caller or CallerLookup) and a brief description. Use IdNameRef for lookup fields to reference by either ID or name.
type IncidentIterator ¶
type IncidentIterator struct {
// contains filtered or unexported fields
}
IncidentIterator provides iterator-style pagination for incidents. Usage:
iter := client.ListIncidents(ctx, nil)
for iter.Next() {
incident := iter.Incident()
// process incident
}
if err := iter.Err(); err != nil {
// handle error
}
func (*IncidentIterator) All ¶
func (it *IncidentIterator) All() ([]Incident, error)
All returns all remaining incidents as a slice. This consumes the iterator.
func (*IncidentIterator) Err ¶
func (it *IncidentIterator) Err() error
Err returns any error that occurred during iteration.
func (*IncidentIterator) Incident ¶
func (it *IncidentIterator) Incident() *Incident
Incident returns the current incident. Should only be called after Next returns true.
func (*IncidentIterator) Next ¶
func (it *IncidentIterator) Next() bool
Next advances the iterator to the next incident. Returns true if there is a next incident, false otherwise.
type IncidentStatus ¶
type IncidentStatus string
IncidentStatus represents the processing status of an incident within TOPdesk's ticket lifecycle. Incidents progress through first-line, second-line, and partial states, each with archived variants for completed tickets.
const ( // IncidentStatusFirstLine indicates the incident is being handled by first-line support. IncidentStatusFirstLine IncidentStatus = "firstLine" // IncidentStatusSecondLine indicates the incident has been escalated to second-line support. IncidentStatusSecondLine IncidentStatus = "secondLine" // IncidentStatusPartial indicates a partial incident linked to a main incident. IncidentStatusPartial IncidentStatus = "partial" // IncidentStatusFirstLineArchived indicates an archived first-line incident. IncidentStatusFirstLineArchived IncidentStatus = "firstLineArchived" // IncidentStatusSecondLineArchived indicates an archived second-line incident. IncidentStatusSecondLineArchived IncidentStatus = "secondLineArchived" // IncidentStatusPartialArchived indicates an archived partial incident. IncidentStatusPartialArchived IncidentStatus = "partialArchived" )
type IncidentUpdateRequest ¶
type IncidentUpdateRequest struct {
Caller *CallerCreate `json:"caller,omitempty"`
CallerLookup *CallerLookup `json:"callerLookup,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Action string `json:"action,omitempty"`
ActionInvisibleForCaller *bool `json:"actionInvisibleForCaller,omitempty"`
EntryType *IdNameRef `json:"entryType,omitempty"`
CallType *IdNameRef `json:"callType,omitempty"`
CallDate *Time `json:"callDate,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
ExternalNumber string `json:"externalNumber,omitempty"`
Object *IdNameRef `json:"object,omitempty"`
Location *IdRef `json:"location,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
Impact *IdNameRef `json:"impact,omitempty"`
Urgency *IdNameRef `json:"urgency,omitempty"`
Priority *IdNameRef `json:"priority,omitempty"`
Duration *IdNameRef `json:"duration,omitempty"`
TargetDate *Time `json:"targetDate,omitempty"`
SLA *IdRef `json:"sla,omitempty"`
OnHold *bool `json:"onHold,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
Supplier *IdRef `json:"supplier,omitempty"`
ProcessingStatus *IdNameRef `json:"processingStatus,omitempty"`
Responded *bool `json:"responded,omitempty"`
ResponseDate *Time `json:"responseDate,omitempty"`
Completed *bool `json:"completed,omitempty"`
CompletedDate *Time `json:"completedDate,omitempty"`
Closed *bool `json:"closed,omitempty"`
ClosedDate *Time `json:"closedDate,omitempty"`
ClosureCode *IdNameRef `json:"closureCode,omitempty"`
Costs *float64 `json:"costs,omitempty"`
FeedbackRating *int `json:"feedbackRating,omitempty"`
FeedbackMessage string `json:"feedbackMessage,omitempty"`
MajorCall *bool `json:"majorCall,omitempty"`
MajorCallObject *IdNameRef `json:"majorCallObject,omitempty"`
PublishToSsd *bool `json:"publishToSsd,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
ExternalLink *ExternalLinkCreate `json:"externalLink,omitempty"`
}
IncidentUpdateRequest represents the payload for updating an existing incident. Only include fields that should be changed; omitted fields remain unchanged.
type KnowledgeAttachment ¶
type KnowledgeAttachment struct {
ID string `json:"id,omitempty"`
Filename string `json:"filename,omitempty"`
Description string `json:"description,omitempty"`
Size int64 `json:"size,omitempty"`
UploadDate *Time `json:"uploadDate,omitempty"`
UploadedBy string `json:"uploadedBy,omitempty"`
}
KnowledgeAttachment represents an attachment on a knowledge item.
type KnowledgeExternalLink ¶
type KnowledgeExternalLink struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Date *Time `json:"date,omitempty"`
}
KnowledgeExternalLink represents an external link on a knowledge item.
type KnowledgeFeedback ¶
type KnowledgeFeedback struct {
QuestionAnswered bool `json:"questionAnswered"`
FeedbackText string `json:"feedbackText,omitempty"`
}
KnowledgeFeedback represents user feedback on whether a knowledge item answered their question.
type KnowledgeItem ¶
type KnowledgeItem struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Parent *IdName `json:"parent,omitempty"`
Translation *KnowledgeItemTranslation `json:"translation,omitempty"`
Visibility *KnowledgeItemVisibility `json:"visibility,omitempty"`
URLs *KnowledgeItemURLs `json:"urls,omitempty"`
Manager *IdName `json:"manager,omitempty"`
Status *IdName `json:"status,omitempty"`
StandardSolution *IdName `json:"standardSolution,omitempty"`
ExternalLink *KnowledgeExternalLink `json:"externalLink,omitempty"`
News bool `json:"news,omitempty"`
Creator *IdName `json:"creator,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
AvailableTranslations []string `json:"availableTranslations,omitempty"`
}
KnowledgeItem represents an article in the TOPdesk knowledge base. Knowledge items can have multiple translations, attachments, and images.
type KnowledgeItemContent ¶
type KnowledgeItemContent struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Content string `json:"content,omitempty"`
CommentsForOperators string `json:"commentsForOperators,omitempty"`
Keywords string `json:"keywords,omitempty"`
}
KnowledgeItemContent represents the content of a knowledge item.
type KnowledgeItemCreateRequest ¶
type KnowledgeItemCreateRequest struct {
Parent *IdNameRef `json:"parent,omitempty"`
Translation *KnowledgeItemTranslation `json:"translation"`
Visibility *KnowledgeItemVisibility `json:"visibility,omitempty"`
Status *IdRef `json:"status,omitempty"`
Manager *IdRef `json:"manager,omitempty"`
ExternalLink *KnowledgeExternalLink `json:"externalLink,omitempty"`
}
KnowledgeItemCreateRequest represents the payload for creating a knowledge item. Translation is required and should contain the initial content in a specific language.
type KnowledgeItemList ¶
type KnowledgeItemList struct {
Item []KnowledgeItem `json:"item,omitempty"`
Prev string `json:"prev,omitempty"`
Next string `json:"next,omitempty"`
}
KnowledgeItemList represents a list of knowledge items.
type KnowledgeItemListOptions ¶
type KnowledgeItemListOptions struct {
Start int
PageSize int
Fields string
Query string
Language string
}
KnowledgeItemListOptions specifies filtering and pagination options for listing knowledge items. Use Language to retrieve items in a specific language.
type KnowledgeItemReference ¶
type KnowledgeItemReference struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
KnowledgeItemReference represents a reference to a created knowledge item.
type KnowledgeItemStatus ¶
type KnowledgeItemStatus struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
KnowledgeItemStatus represents a knowledge item status.
type KnowledgeItemStatusCreateRequest ¶
type KnowledgeItemStatusCreateRequest struct {
Name string `json:"name"`
}
KnowledgeItemStatusCreateRequest represents a request to create a status.
type KnowledgeItemStatusList ¶
type KnowledgeItemStatusList struct {
Results []KnowledgeItemStatus `json:"results,omitempty"`
}
KnowledgeItemStatusList represents a list of knowledge item statuses.
type KnowledgeItemTranslation ¶
type KnowledgeItemTranslation struct {
Language string `json:"language,omitempty"`
Content *KnowledgeItemContent `json:"content,omitempty"`
Creator *IdName `json:"creator,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
}
KnowledgeItemTranslation represents a translation of a knowledge item.
type KnowledgeItemURLs ¶
type KnowledgeItemURLs struct {
Operator string `json:"operator,omitempty"`
SSP string `json:"ssp,omitempty"`
Public string `json:"public,omitempty"`
}
KnowledgeItemURLs represents the URLs for a knowledge item.
type KnowledgeItemUpdateRequest ¶
type KnowledgeItemUpdateRequest struct {
Parent *IdNameRef `json:"parent,omitempty"`
Visibility *KnowledgeItemVisibility `json:"visibility,omitempty"`
Status *IdRef `json:"status,omitempty"`
Manager *IdRef `json:"manager,omitempty"`
ExternalLink *KnowledgeExternalLink `json:"externalLink,omitempty"`
}
KnowledgeItemUpdateRequest represents a request to update a knowledge item.
type KnowledgeItemVisibility ¶
type KnowledgeItemVisibility struct {
SSPVisibility string `json:"sspVisibility,omitempty"`
SSPVisibleFrom *Time `json:"sspVisibleFrom,omitempty"`
SSPVisibleUntil *Time `json:"sspVisibleUntil,omitempty"`
SSPVisibilityFilteredOnBranches bool `json:"sspVisibilityFilteredOnBranches,omitempty"`
OperatorVisibilityFilteredOnBranches bool `json:"operatorVisibilityFilteredOnBranches,omitempty"`
PublicKnowledgeItem bool `json:"publicKnowledgeItem,omitempty"`
}
KnowledgeItemVisibility controls where and when a knowledge item is visible. Items can be restricted to specific branches or made public.
type Language ¶ added in v0.1.13
type Language struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
LanguageCode string `json:"languageCode,omitempty"`
}
Language represents a language.
type LinkType ¶
type LinkType struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
SourceTypes []string `json:"sourceTypes,omitempty"`
TargetTypes []string `json:"targetTypes,omitempty"`
AllowRecursive bool `json:"allowRecursive,omitempty"`
}
LinkType represents an asset link type (capability).
type LinkedAsset ¶
type LinkedAsset struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Icon *AssetIcon `json:"icon,omitempty"`
Capability *IdName `json:"capability,omitempty"`
RelationID string `json:"relationId,omitempty"`
RelationType string `json:"relationType,omitempty"`
}
LinkedAsset represents a linked asset.
type ListOptions ¶
type ListOptions struct {
// PageStart is the offset to start at (0-based).
PageStart int
// PageSize is the maximum number of items to return per page.
PageSize int
// Sort specifies the sort order. Format: field:asc or field:desc.
// Multiple fields can be comma-separated.
Sort string
// Query is a FIQL query string for filtering.
Query string
// Fields specifies which fields to include in the response.
Fields []string
// All includes archived and partial incidents when true.
All bool
}
ListOptions specifies options for listing resources.
type Localization ¶ added in v0.1.13
type Localization struct {
Language string `json:"language,omitempty"`
UseBrowserLocalization bool `json:"useBrowserLocalization,omitempty"`
}
Localization represents localization settings.
type Location ¶
type Location struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Room string `json:"room,omitempty"`
Branch *Branch `json:"branch,omitempty"`
}
Location represents a physical location.
type LocationIterator ¶ added in v0.1.6
type LocationIterator struct {
// contains filtered or unexported fields
}
LocationIterator provides iterator-style pagination for locations.
func (*LocationIterator) All ¶ added in v0.1.6
func (it *LocationIterator) All() ([]ExtendedLocation, error)
All returns all remaining locations as a slice.
func (*LocationIterator) Err ¶ added in v0.1.6
func (it *LocationIterator) Err() error
Err returns any error that occurred during iteration.
func (*LocationIterator) Location ¶ added in v0.1.6
func (it *LocationIterator) Location() *ExtendedLocation
Location returns the current location.
func (*LocationIterator) Next ¶ added in v0.1.6
func (it *LocationIterator) Next() bool
Next advances the iterator to the next location.
type MainIncident ¶
type MainIncident struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
}
MainIncident represents a reference to a main incident (for partials).
type MainIncidentRef ¶
type MainIncidentRef struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
}
MainIncidentRef is used to reference a main incident when creating partials.
type MajorCallObject ¶
type MajorCallObject struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Status int `json:"status,omitempty"`
MajorIncident bool `json:"majorIncident,omitempty"`
}
MajorCallObject represents a major call reference.
type ManagerActionRequest ¶ added in v0.1.13
type ManagerActionRequest struct {
Action string `json:"action"` // approve, reject
MemoText string `json:"memoText,omitempty"`
}
ManagerActionRequest represents a manager's approval or rejection decision. Action must be "approve" or "reject".
type ManagerAuthorizable ¶ added in v0.1.13
type ManagerAuthorizable struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Type string `json:"type,omitempty"` // change, activity
BriefDescription string `json:"briefDescription,omitempty"`
Status string `json:"status,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
Requester *IdName `json:"requester,omitempty"`
Change *IdName `json:"change,omitempty"` // For activities
}
ManagerAuthorizable represents a change or activity awaiting manager authorization. Managers can approve or reject these items using the manager action endpoints.
type ManagerAuthorizableListOptions ¶ added in v0.1.13
type ManagerAuthorizableListOptions struct {
Start int
PageSize int
Query string
Sort string
Fields string
TypeParam string // "change" or "activity"
}
ManagerAuthorizableListOptions specifies options for listing manager authorizables.
type MockRequest ¶ added in v0.1.1
MockRequest records a request made to the mock server.
type MockServer ¶ added in v0.1.1
type MockServer struct {
*httptest.Server
// Data stores
Incidents map[string]*Incident
Persons map[string]*Person
Branches map[string]*ExtendedBranch
Operators map[string]*ExtendedOperator
KnowledgeItems map[string]*KnowledgeItem
Assets map[string]*Asset
Reservations map[string]*Reservation
Changes map[string]*Change
Visitors map[string]*Visitor
OperationalActivities map[string]*OperationalActivity
Services map[string]*Service
Locations map[string]*ExtendedLocation
Departments map[string]*Department
OperatorGroups map[string]*OperatorGroup
Suppliers map[string]*ExtendedSupplier
Roles map[string]*Role
RoleConfigurations map[string]*RoleConfiguration
PersonGroups map[string]*PersonGroup
SupplierContacts map[string]*SupplierContact
BudgetHolders []BudgetHolder
// Lookup data
Categories []Category
Subcategories map[string][]Subcategory
CallTypes []IdName
EntryTypes []IdName
Impacts []IdName
Urgencies []IdName
Priorities []Priority
ProcessingStatuses []ProcessingStatus
ClosureCodes []IdName
Durations []Duration
ArchivingReasons []IdName
TimeSpentReasons []IdName
OperationalStatuses []IdName
CancellationReasons []CancellationReason
Badges []VisitorSearchlistItem
CarParks []VisitorSearchlistItem
IdentificationTypes []VisitorSearchlistItem
AssetTemplates []AssetTemplate
KnowledgeItemStatuses []KnowledgeItemStatus
EscalationReasons []IdName
DeescalationReasons []IdName
OperationalActivityTypes []OperationalActivityType
KnowledgeAttachments map[string][]KnowledgeAttachment
// Change lookups
ChangeStatuses []ChangeStatus
ActivityStatuses []ActivityStatus
ChangeBenefits []ChangeBenefit
ChangeImpacts []ChangeImpact
RejectionReasons []RejectionReason
ChangeTemplates []ChangeTemplate
ChangeSettings *ChangeSettings
ChangeActivities map[string]*ChangeActivity
// Supporting files lookups
Languages []Language
LocationBuildingZones []Searchlist
LocationCeilingCoverings []Searchlist
LocationFloorCoverings []Searchlist
LocationFunctionalUses []Searchlist
LocationGlassMaterials []Searchlist
LocationStatuses []Searchlist
LocationTypes []Searchlist
LocationWallCoverings []Searchlist
BranchListedBuildings []Searchlist
OperatorFiltersBranch []OperatorFilter
OperatorFiltersCategory []OperatorFilter
OperatorFiltersOperator []OperatorFilter
// Settings data
CurrencySettings *CurrencySettings
OptionalFields map[string]map[string]map[string]string // table -> type -> field name -> display name
// Custom handlers for specific endpoints
CustomHandlers map[string]http.HandlerFunc
// Request log for assertions
Requests []MockRequest
// contains filtered or unexported fields
}
MockServer provides a mock TOPdesk API server for testing.
func NewMockServer ¶ added in v0.1.1
func NewMockServer() *MockServer
NewMockServer creates a new mock TOPdesk API server.
func (*MockServer) AddAsset ¶ added in v0.1.8
func (m *MockServer) AddAsset(asset *Asset)
AddAsset adds an asset to the mock server.
func (*MockServer) AddBranch ¶ added in v0.1.1
func (m *MockServer) AddBranch(branch *ExtendedBranch)
AddBranch adds a branch to the mock server.
func (*MockServer) AddChange ¶ added in v0.1.8
func (m *MockServer) AddChange(change *Change)
AddChange adds a change to the mock server.
func (*MockServer) AddIncident ¶ added in v0.1.1
func (m *MockServer) AddIncident(incident *Incident)
AddIncident adds an incident to the mock server.
func (*MockServer) AddKnowledgeItem ¶ added in v0.1.8
func (m *MockServer) AddKnowledgeItem(item *KnowledgeItem)
AddKnowledgeItem adds a knowledge item to the mock server.
func (*MockServer) AddOperator ¶ added in v0.1.1
func (m *MockServer) AddOperator(operator *ExtendedOperator)
AddOperator adds an operator to the mock server.
func (*MockServer) AddPerson ¶ added in v0.1.1
func (m *MockServer) AddPerson(person *Person)
AddPerson adds a person to the mock server.
func (*MockServer) AddReservation ¶ added in v0.1.8
func (m *MockServer) AddReservation(reservation *Reservation)
AddReservation adds a reservation to the mock server.
func (*MockServer) AddService ¶ added in v0.1.8
func (m *MockServer) AddService(service *Service)
AddService adds a service to the mock server.
func (*MockServer) AddVisitor ¶ added in v0.1.8
func (m *MockServer) AddVisitor(visitor *Visitor)
AddVisitor adds a visitor to the mock server.
func (*MockServer) Client ¶ added in v0.1.1
func (m *MockServer) Client() *Client
Client returns a TOPdesk client configured to use this mock server.
func (*MockServer) GetRequests ¶ added in v0.1.1
func (m *MockServer) GetRequests() []MockRequest
GetRequests returns all recorded requests.
func (*MockServer) Reset ¶ added in v0.1.1
func (m *MockServer) Reset()
Reset clears all data and reseeds with defaults.
func (*MockServer) SetCustomHandler ¶ added in v0.1.1
func (m *MockServer) SetCustomHandler(method, path string, handler http.HandlerFunc)
SetCustomHandler sets a custom handler for a specific method and path.
type Object ¶
type Object struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type *IdName `json:"type,omitempty"`
Make *IdName `json:"make,omitempty"`
Model *IdName `json:"model,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Location *IdName `json:"location,omitempty"`
Specification string `json:"specification,omitempty"`
SerialNumber string `json:"serialNumber,omitempty"`
}
Object represents a configuration item (CI) or asset tracked in TOPdesk. Objects can be linked to incidents to indicate which item is affected.
type OccupancyInterval ¶
type OccupancyInterval struct {
Hour int `json:"hour,omitempty"`
OccupancyRate float64 `json:"occupancyRate,omitempty"`
}
OccupancyInterval represents an occupancy rate for a time interval.
type OperationalActivity ¶ added in v0.1.4
type OperationalActivity struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Category *IdName `json:"category,omitempty"`
Subcategory *IdName `json:"subcategory,omitempty"`
Type *IdName `json:"type,omitempty"`
Operator *OperationalOperator `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Status *IdName `json:"status,omitempty"`
Resolved *BooleanDateTime `json:"resolved,omitempty"`
Skipped *BooleanReason `json:"skipped,omitempty"`
Anomaly *BooleanReason `json:"anomaly,omitempty"`
Archived *BooleanReason `json:"archived,omitempty"`
Supplier *IdName `json:"supplier,omitempty"`
Series *OperationalSeries `json:"series,omitempty"`
Grouping *IdName `json:"grouping,omitempty"`
Schema *IdName `json:"schema,omitempty"`
EstimatedCosts float64 `json:"estimatedCosts,omitempty"`
Costs float64 `json:"costs,omitempty"`
EstimatedTime int `json:"estimatedTime,omitempty"`
Requests string `json:"requests,omitempty"`
Actions string `json:"actions,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
LinkedBranches []IdName `json:"linkedBranches,omitempty"`
LinkedLocations []OperationalLinkedLoc `json:"linkedLocations,omitempty"`
LinkedAssets []IdRef `json:"linkedAssets,omitempty"`
NextInSeries *OperationalNextInSeries `json:"nextInSeries,omitempty"`
}
OperationalActivity represents a TOPdesk operational activity.
type OperationalActivityGrouping ¶ added in v0.1.4
type OperationalActivityGrouping struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
Schema *IdName `json:"schema,omitempty"`
}
OperationalActivityGrouping represents a grouping for operational activities.
type OperationalActivityListOptions ¶ added in v0.1.4
type OperationalActivityListOptions struct {
Query string
Fields string
Sort string
PageSize int
PageStart int
}
OperationalActivityListOptions specifies options for listing operational activities.
type OperationalActivityListResponse ¶ added in v0.1.4
type OperationalActivityListResponse struct {
Item []OperationalActivity `json:"item,omitempty"`
Next string `json:"next,omitempty"`
}
OperationalActivityListResponse represents the response from listing operational activities.
type OperationalActivitySchema ¶ added in v0.1.4
type OperationalActivitySchema struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
}
OperationalActivitySchema represents a schema for operational activities.
type OperationalActivitySettings ¶ added in v0.1.4
type OperationalActivitySettings struct {
IsOperatorRequired bool `json:"isOperatorRequired,omitempty"`
IsStatusRequired bool `json:"isStatusRequired,omitempty"`
IsReasonForSkippingRequired bool `json:"isReasonForSkippingRequired,omitempty"`
IsReasonForAnomalyRequired bool `json:"isReasonForAnomalyRequired,omitempty"`
IsTimeRegistrationEnabled bool `json:"isTimeRegistrationEnabled,omitempty"`
IsReasonForTimeRegistrationRequired bool `json:"isReasonForTimeRegistrationRequired,omitempty"`
IsNoteForTimeRegistrationRequired bool `json:"isNoteForTimeRegistrationRequired,omitempty"`
IsTimeRegistrationRequiredWhenResolving bool `json:"isTimeRegistrationRequiredWhenResolving,omitempty"`
}
OperationalActivitySettings represents settings for operational activities.
type OperationalActivityType ¶ added in v0.1.4
type OperationalActivityType struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
}
OperationalActivityType represents a type for operational activities.
type OperationalAttachment ¶ added in v0.1.4
type OperationalAttachment struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"` // file, link
Name string `json:"name,omitempty"`
Size int64 `json:"size,omitempty"`
DownloadURL string `json:"downloadUrl,omitempty"`
Description string `json:"description,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
}
OperationalAttachment represents an attachment on an operational activity.
type OperationalEmail ¶ added in v0.1.4
type OperationalEmail struct {
ID string `json:"id,omitempty"`
Sender string `json:"sender,omitempty"`
Subject string `json:"subject,omitempty"`
To []string `json:"to,omitempty"`
CC []string `json:"cc,omitempty"`
BCC []string `json:"bcc,omitempty"`
ReplyTo []string `json:"replyTo,omitempty"`
SendDate *Time `json:"sendDate,omitempty"`
ActionName string `json:"actionName,omitempty"`
IsRemoved bool `json:"isRemoved,omitempty"`
Content string `json:"content,omitempty"`
HTML bool `json:"html,omitempty"`
CopyToSender bool `json:"copyToSender,omitempty"`
DeliveryReceipt bool `json:"deliveryReceipt,omitempty"`
ReadReceipt bool `json:"readReceipt,omitempty"`
SuppressAutoReply bool `json:"suppressAutoReply,omitempty"`
Priority string `json:"priority,omitempty"` // highest, high, normal, low, lowest
IsArchived bool `json:"isArchived,omitempty"`
Operator *IdName `json:"operator,omitempty"`
}
OperationalEmail represents an email on an operational activity.
type OperationalLinkedLoc ¶ added in v0.1.4
type OperationalLinkedLoc struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
}
OperationalLinkedLoc represents a linked location for operational activities.
type OperationalLinkedObject ¶ added in v0.1.4
type OperationalLinkedObject struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Location *IdName `json:"location,omitempty"`
Type *IdName `json:"type,omitempty"`
}
OperationalLinkedObject represents a linked object for operational activities.
type OperationalMemoHistory ¶ added in v0.1.4
type OperationalMemoHistory struct {
ID string `json:"id,omitempty"`
MemoText string `json:"memoText,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Flag int `json:"flag,omitempty"` // 0 or 1
Operator *IdName `json:"operator,omitempty"`
}
OperationalMemoHistory represents a request or action memo.
type OperationalNextInSeries ¶ added in v0.1.4
type OperationalNextInSeries struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
Resolved *BooleanDateTime `json:"resolved,omitempty"`
Skipped *BooleanReason `json:"skipped,omitempty"`
}
OperationalNextInSeries represents the next activity in a series.
type OperationalOperator ¶ added in v0.1.4
type OperationalOperator struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"` // operator, operatorGroup
}
OperationalOperator represents an operator for operational activities.
type OperationalSeries ¶ added in v0.1.4
type OperationalSeries struct {
ID string `json:"id,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Number string `json:"number,omitempty"`
}
OperationalSeries represents a series for operational activities.
type OperationalTimeRegistration ¶ added in v0.1.4
type OperationalTimeRegistration struct {
ID string `json:"id,omitempty"`
TimeSpent int64 `json:"timeSpent,omitempty"` // in seconds when reading, minutes when creating
Note string `json:"note,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Reason *IdRef `json:"reason,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
}
OperationalTimeRegistration represents a time registration for an operational activity.
type Operator ¶
type Operator struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"` // operator, operatorGroup, operatorArchived, operatorGroupArchived
}
Operator represents a TOPdesk operator (support agent) who handles tickets. Status indicates whether this is an individual operator or an operator group.
type OperatorFilter ¶ added in v0.1.13
type OperatorFilter struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Applicable string `json:"applicable,omitempty"`
}
OperatorFilter represents an operator filter.
type OperatorGroup ¶
type OperatorGroup struct {
ID string `json:"id,omitempty"`
GroupName string `json:"groupName,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Contact *IdName `json:"contact,omitempty"`
Archived bool `json:"archived,omitempty"`
}
OperatorGroup represents an operator group.
type OperatorGroupIterator ¶ added in v0.1.6
type OperatorGroupIterator struct {
// contains filtered or unexported fields
}
OperatorGroupIterator provides iterator-style pagination for operator groups.
func (*OperatorGroupIterator) All ¶ added in v0.1.6
func (it *OperatorGroupIterator) All() ([]OperatorGroup, error)
All returns all remaining operator groups as a slice.
func (*OperatorGroupIterator) Err ¶ added in v0.1.6
func (it *OperatorGroupIterator) Err() error
Err returns any error that occurred during iteration.
func (*OperatorGroupIterator) Next ¶ added in v0.1.6
func (it *OperatorGroupIterator) Next() bool
Next advances the iterator to the next operator group.
func (*OperatorGroupIterator) OperatorGroup ¶ added in v0.1.6
func (it *OperatorGroupIterator) OperatorGroup() *OperatorGroup
OperatorGroup returns the current operator group.
type OperatorIDResponse ¶ added in v0.1.13
type OperatorIDResponse struct {
ID string `json:"id"`
}
OperatorIDResponse represents the response for getting current operator ID.
type OperatorIterator ¶ added in v0.1.6
type OperatorIterator struct {
// contains filtered or unexported fields
}
OperatorIterator provides iterator-style pagination for operators.
func (*OperatorIterator) All ¶ added in v0.1.6
func (it *OperatorIterator) All() ([]ExtendedOperator, error)
All returns all remaining operators as a slice.
func (*OperatorIterator) Err ¶ added in v0.1.6
func (it *OperatorIterator) Err() error
Err returns any error that occurred during iteration.
func (*OperatorIterator) Next ¶ added in v0.1.6
func (it *OperatorIterator) Next() bool
Next advances the iterator to the next operator.
func (*OperatorIterator) Operator ¶ added in v0.1.6
func (it *OperatorIterator) Operator() *ExtendedOperator
Operator returns the current operator.
type OperatorSettings ¶ added in v0.1.13
type OperatorSettings struct {
Localization *Localization `json:"localization,omitempty"`
}
OperatorSettings represents operator settings.
type OptionalFieldType ¶ added in v0.1.13
type OptionalFieldType string
OptionalFieldType represents the type of optional field.
const ( OptionalFieldTypeBoolean OptionalFieldType = "boolean" OptionalFieldTypeText OptionalFieldType = "text" OptionalFieldTypeDatetime OptionalFieldType = "datetime" OptionalFieldTypeSearchField OptionalFieldType = "search_field" OptionalFieldTypeNumber OptionalFieldType = "number" OptionalFieldTypeMemo OptionalFieldType = "memo" )
type OptionalFields ¶
type OptionalFields struct {
Boolean1 *bool `json:"boolean1,omitempty"`
Boolean2 *bool `json:"boolean2,omitempty"`
Boolean3 *bool `json:"boolean3,omitempty"`
Boolean4 *bool `json:"boolean4,omitempty"`
Boolean5 *bool `json:"boolean5,omitempty"`
Number1 *float64 `json:"number1,omitempty"`
Number2 *float64 `json:"number2,omitempty"`
Number3 *float64 `json:"number3,omitempty"`
Number4 *float64 `json:"number4,omitempty"`
Number5 *float64 `json:"number5,omitempty"`
Text1 string `json:"text1,omitempty"`
Text2 string `json:"text2,omitempty"`
Text3 string `json:"text3,omitempty"`
Text4 string `json:"text4,omitempty"`
Text5 string `json:"text5,omitempty"`
Memo1 string `json:"memo1,omitempty"`
Memo2 string `json:"memo2,omitempty"`
Memo3 string `json:"memo3,omitempty"`
Memo4 string `json:"memo4,omitempty"`
Memo5 string `json:"memo5,omitempty"`
Date1 *Time `json:"date1,omitempty"`
Date2 *Time `json:"date2,omitempty"`
Date3 *Time `json:"date3,omitempty"`
Date4 *Time `json:"date4,omitempty"`
Date5 *Time `json:"date5,omitempty"`
Searchlist1 *IdName `json:"searchlist1,omitempty"`
Searchlist2 *IdName `json:"searchlist2,omitempty"`
Searchlist3 *IdName `json:"searchlist3,omitempty"`
Searchlist4 *IdName `json:"searchlist4,omitempty"`
Searchlist5 *IdName `json:"searchlist5,omitempty"`
}
OptionalFields contains configurable custom fields in TOPdesk. There are two sets (OptionalFields1 and OptionalFields2) each with boolean, number, text, memo, date, and searchlist fields numbered 1-5. Field labels are configured in TOPdesk's optional fields settings.
type PDFMargin ¶ added in v0.1.4
type PDFMargin struct {
Top string `json:"top,omitempty"`
Bottom string `json:"bottom,omitempty"`
Left string `json:"left,omitempty"`
Right string `json:"right,omitempty"`
}
PDFMargin represents margin settings for PDF generation.
type PartialIncident ¶
type PartialIncident struct {
Link string `json:"link,omitempty"`
}
PartialIncident represents a reference to a partial incident.
type PermissionGroup ¶
type PermissionGroup struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
PermissionGroup represents a permission group.
type Person ¶
type Person struct {
ID string `json:"id,omitempty"`
Status string `json:"status,omitempty"`
Gender string `json:"gender,omitempty"`
FirstName string `json:"firstName,omitempty"`
SurName string `json:"surName,omitempty"`
DynamicName string `json:"dynamicName,omitempty"`
Initials string `json:"initials,omitempty"`
Prefixes string `json:"prefixes,omitempty"`
Title string `json:"title,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
BirthName string `json:"birthName,omitempty"`
FirstNameCustomer string `json:"firstNameCustomer,omitempty"`
LoginName string `json:"loginName,omitempty"`
Email string `json:"email,omitempty"`
Telephone string `json:"telephone,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
FaxNumber string `json:"faxNumber,omitempty"`
EmployeeNumber string `json:"employeeNumber,omitempty"`
NetworkLoginName string `json:"networkLoginName,omitempty"`
TasLoginName string `json:"tasLoginName,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Location *IdName `json:"location,omitempty"`
Department *IdName `json:"department,omitempty"`
BudgetHolder *IdName `json:"budgetHolder,omitempty"`
PersonExtraFieldA *IdName `json:"personExtraFieldA,omitempty"`
PersonExtraFieldB *IdName `json:"personExtraFieldB,omitempty"`
OptionalFields1 *BranchOptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *BranchOptionalFields `json:"optionalFields2,omitempty"`
IsManager bool `json:"isManager,omitempty"`
Manager *IdName `json:"manager,omitempty"`
AuthorisedGroups []IdName `json:"authorisedGroups,omitempty"`
Archived bool `json:"archived,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
}
Person represents a person in TOPdesk.
type PersonCount ¶ added in v0.1.13
type PersonCount struct {
Count int `json:"count"`
}
PersonCount represents the count response.
type PersonExtraFieldEntry ¶ added in v0.1.13
type PersonExtraFieldEntry struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
PersonExtraFieldEntry represents an extra field entry for persons.
type PersonGroup ¶
type PersonGroup struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Contact *IdName `json:"contact,omitempty"`
Archived bool `json:"archived,omitempty"`
}
PersonGroup represents a person group.
type PersonGroupIterator ¶ added in v0.1.6
type PersonGroupIterator struct {
// contains filtered or unexported fields
}
PersonGroupIterator provides iterator-style pagination for person groups.
func (*PersonGroupIterator) All ¶ added in v0.1.6
func (it *PersonGroupIterator) All() ([]PersonGroup, error)
All returns all remaining person groups as a slice.
func (*PersonGroupIterator) Err ¶ added in v0.1.6
func (it *PersonGroupIterator) Err() error
Err returns any error that occurred during iteration.
func (*PersonGroupIterator) Next ¶ added in v0.1.6
func (it *PersonGroupIterator) Next() bool
Next advances the iterator to the next person group.
func (*PersonGroupIterator) PersonGroup ¶ added in v0.1.6
func (it *PersonGroupIterator) PersonGroup() *PersonGroup
PersonGroup returns the current person group.
type PersonIterator ¶ added in v0.1.6
type PersonIterator struct {
// contains filtered or unexported fields
}
PersonIterator provides iterator-style pagination for persons.
func (*PersonIterator) All ¶ added in v0.1.6
func (it *PersonIterator) All() ([]Person, error)
All returns all remaining persons as a slice.
func (*PersonIterator) Err ¶ added in v0.1.6
func (it *PersonIterator) Err() error
Err returns any error that occurred during iteration.
func (*PersonIterator) Next ¶ added in v0.1.6
func (it *PersonIterator) Next() bool
Next advances the iterator to the next person.
func (*PersonIterator) Person ¶ added in v0.1.6
func (it *PersonIterator) Person() *Person
Person returns the current person.
type Priority ¶
type Priority struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
FirstLineDuration *IdName `json:"firstLineDuration,omitempty"`
SecondLineDuration *IdName `json:"secondLineDuration,omitempty"`
}
Priority represents a priority lookup item.
type ProcessingStatus ¶
type ProcessingStatus struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
OnHold string `json:"onHold,omitempty"`
ProcessingState string `json:"processingState,omitempty"`
Response string `json:"response,omitempty"`
Default bool `json:"default,omitempty"`
}
ProcessingStatus represents a workflow status for incidents. Controls whether incidents are on hold, responded to, or in specific processing states.
type ProductVersion ¶
type ProductVersion struct {
Major int `json:"major"`
Minor int `json:"minor"`
Patch int `json:"patch"`
}
ProductVersion represents the TOPdesk product version.
type ProgressEntry ¶
type ProgressEntry struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"` // action, request, email, etc.
MemoText string `json:"memoText,omitempty"`
PlainText string `json:"plainText,omitempty"`
InvisibleForCaller bool `json:"invisibleForCaller,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
Person *IdName `json:"person,omitempty"`
}
ProgressEntry represents an entry in the progress trail.
type ProgressTrailCount ¶
type ProgressTrailCount struct {
Count int `json:"count"`
}
ProgressTrailCount represents the count response.
type ProgressTrailListOptions ¶
type ProgressTrailListOptions struct {
Start int
PageSize int
InlineImages bool
ForceImagesAsData bool
NonAPIAttachmentURLs bool
}
ProgressTrailListOptions specifies options for listing progress trail entries.
type RejectionReason ¶ added in v0.1.13
RejectionReason represents a rejection reason for changes or activities.
type Request ¶
type Request struct {
ID string `json:"id,omitempty"`
MemoText string `json:"memoText,omitempty"`
PlainText string `json:"plainText,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
Person *IdName `json:"person,omitempty"`
}
Request represents a request entry on an incident, typically submitted by the caller. Requests form part of the incident's progress trail.
type RequestEntry ¶
type RequestEntry struct {
MemoText string `json:"memoText,omitempty"`
}
RequestEntry is used for creating/updating requests.
type RequestGetOptions ¶
type RequestGetOptions struct {
InlineImages bool
ForceImagesAsData bool
NonAPIAttachmentURLs bool
}
RequestGetOptions specifies options for getting a single request.
type RequestListOptions ¶
type RequestListOptions struct {
Start int
PageSize int
InlineImages bool
ForceImagesAsData bool
NonAPIAttachmentURLs bool
}
RequestListOptions specifies options for listing requests.
type RequesterChange ¶ added in v0.1.13
type RequesterChange struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Status string `json:"status,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Request string `json:"request,omitempty"`
Category *IdName `json:"category,omitempty"`
Subcategory *IdName `json:"subcategory,omitempty"`
Impact *IdName `json:"impact,omitempty"`
Benefit *IdName `json:"benefit,omitempty"`
Priority *IdName `json:"priority,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Closed bool `json:"closed,omitempty"`
ClosedDate *Time `json:"closedDate,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
RequesterChange represents a change as viewed through the Self-Service Portal. Contains a subset of fields visible to requesters (non-operators).
type RequesterChangeListOptions ¶ added in v0.1.13
type RequesterChangeListOptions struct {
Start int
PageSize int
Query string
Sort string
Fields string
}
RequesterChangeListOptions specifies options for listing requester changes.
type ReservableAsset ¶
type ReservableAsset struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ObjectID string `json:"objectId,omitempty"`
TemplateName string `json:"templateName,omitempty"`
Available bool `json:"available,omitempty"`
}
ReservableAsset represents an asset that can be reserved.
type ReservableAssetListOptions ¶
type ReservableAssetListOptions struct {
TemplateID string
TemplateName string
From *Time
To *Time
}
ReservableAssetListOptions specifies options for listing reservable assets.
type ReservableInterval ¶
type ReservableInterval struct {
From *Time `json:"from,omitempty"`
To *Time `json:"to,omitempty"`
}
ReservableInterval represents a reservable time interval.
type ReservableLocation ¶
type ReservableLocation struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
Room string `json:"room,omitempty"`
FunctionalName string `json:"functionalName,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Description string `json:"description,omitempty"`
Capacity int `json:"capacity,omitempty"`
ReservedFacilities []IdName `json:"reservedFacilities,omitempty"`
}
ReservableLocation represents a location that can be reserved.
type ReservableLocationList ¶
type ReservableLocationList struct {
Item []ReservableLocation `json:"item,omitempty"`
}
ReservableLocationList represents a list of reservable locations.
type ReservableLocationListOptions ¶
ReservableLocationListOptions specifies options for listing reservable locations.
type ReservableService ¶
type ReservableService struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ServiceType *IdName `json:"serviceType,omitempty"`
BriefDescription string `json:"briefDescription,omitempty"`
Description string `json:"description,omitempty"`
Price float64 `json:"price,omitempty"`
Location *IdName `json:"location,omitempty"`
Object *IdName `json:"object,omitempty"`
Asset *IdName `json:"asset,omitempty"`
SeparatelyReservable bool `json:"separatelyReservable,omitempty"`
ReservableInSSP bool `json:"reservableInSsp,omitempty"`
Archived bool `json:"archived,omitempty"`
}
ReservableService represents a service that can be reserved.
type ReservableServiceList ¶
type ReservableServiceList struct {
Item []ReservableService `json:"item,omitempty"`
}
ReservableServiceList represents a list of reservable services.
type ReservableServiceListOptions ¶
type ReservableServiceListOptions struct {
Fields string
Top int
LocationID []string
ObjectID []string
AssetID []string
ServiceTypeID []string
SeparatelyReservable *bool
ReservableInSSP *bool
Archived *bool
InlineImages bool
}
ReservableServiceListOptions specifies options for listing reservable services.
type Reservation ¶
type Reservation struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
ActualStartDate *Time `json:"actualStartDate,omitempty"`
ActualEndDate *Time `json:"actualEndDate,omitempty"`
ReservationOwner *IdName `json:"reservationOwner,omitempty"`
Location *IdName `json:"location,omitempty"`
Object *IdName `json:"object,omitempty"`
Asset *IdName `json:"asset,omitempty"`
Services []ReservationService `json:"services,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
Archived bool `json:"archived,omitempty"`
}
Reservation represents a reservation.
type ReservationCreateRequest ¶
type ReservationCreateRequest struct {
Description string `json:"description,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate"`
PlannedEndDate *Time `json:"plannedEndDate"`
Location *IdRef `json:"location,omitempty"`
Object *IdRef `json:"object,omitempty"`
Asset *IdRef `json:"asset,omitempty"`
ReservationOwner *IdRef `json:"reservationOwner,omitempty"`
Services []ReservationServiceRequest `json:"services,omitempty"`
}
ReservationCreateRequest represents a request to create a reservation.
type ReservationListOptions ¶
type ReservationListOptions struct {
Fields string
Top int
PlannedFrom string
PlannedTo string
LocationID []string
ObjectID []string
AssetID []string
Archived *bool
}
ReservationListOptions specifies options for listing reservations.
type ReservationListResponse ¶
type ReservationListResponse struct {
Item []Reservation `json:"item,omitempty"`
Prev string `json:"prev,omitempty"`
Next string `json:"next,omitempty"`
}
ReservationListResponse represents a list of reservations.
type ReservationService ¶
type ReservationService struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Quantity int `json:"quantity,omitempty"`
Price float64 `json:"price,omitempty"`
ServiceType *IdName `json:"serviceType,omitempty"`
}
ReservationService represents a service in a reservation.
type ReservationServiceRequest ¶
type ReservationServiceRequest struct {
ID string `json:"id"`
Quantity int `json:"quantity,omitempty"`
}
ReservationServiceRequest represents a service in a reservation request.
type ResilienceConfig ¶ added in v0.1.9
type ResilienceConfig struct {
// Retry settings
MaxRetries int // Maximum number of retry attempts (0 = no retries)
InitialBackoff time.Duration // Initial backoff duration
MaxBackoff time.Duration // Maximum backoff duration
BackoffMultiplier float64 // Multiplier for exponential backoff
RetryableErrors []int // HTTP status codes that trigger retries (default: 429, 502, 503, 504)
// Circuit breaker settings
EnableCircuitBreaker bool // Enable circuit breaker (default: false)
FailureThreshold int // Number of failures before opening circuit
ResetTimeout time.Duration // Time to wait before half-open state
HalfOpenMaxAllowed int // Max requests allowed in half-open state
}
ResilienceConfig configures retry and circuit breaker behavior.
func DefaultResilienceConfig ¶ added in v0.1.9
func DefaultResilienceConfig() *ResilienceConfig
DefaultResilienceConfig returns the default resilience configuration.
type RetryExecutor ¶ added in v0.1.9
type RetryExecutor struct {
// contains filtered or unexported fields
}
RetryExecutor handles retry logic with exponential backoff.
func NewRetryExecutor ¶ added in v0.1.9
func NewRetryExecutor(config *ResilienceConfig) *RetryExecutor
NewRetryExecutor creates a new retry executor with the given configuration.
func (*RetryExecutor) CalculateBackoff ¶ added in v0.1.9
func (r *RetryExecutor) CalculateBackoff(attempt int) time.Duration
CalculateBackoff calculates the backoff duration for a given attempt.
func (*RetryExecutor) Execute ¶ added in v0.1.9
func (r *RetryExecutor) Execute(ctx context.Context, fn func() error) error
Execute runs the given function with retries.
func (*RetryExecutor) IsRetryable ¶ added in v0.1.9
func (r *RetryExecutor) IsRetryable(err error) bool
IsRetryable checks if an error should trigger a retry.
type Role ¶
type Role struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Licensed bool `json:"licensed,omitempty"`
Target string `json:"target,omitempty"`
ModifierID string `json:"modifierId,omitempty"`
CreatorID string `json:"creatorId,omitempty"`
ModificationDate *Time `json:"modificationDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
}
Role represents an access role in TOPdesk.
type RoleConfiguration ¶
type RoleConfiguration struct {
ID string `json:"id,omitempty"`
Ready bool `json:"ready,omitempty"`
Licensed bool `json:"licensed,omitempty"`
CreatedAt *Time `json:"createdAt,omitempty"`
AssignedPermissions []AssignedPermission `json:"assignedPermissions,omitempty"`
}
RoleConfiguration represents a role configuration.
type RoleConfigurationListEmbedded ¶
type RoleConfigurationListEmbedded struct {
Item []RoleConfiguration `json:"item,omitempty"`
}
RoleConfigurationListEmbedded contains the embedded role configuration items.
type RoleConfigurationListOptions ¶
type RoleConfigurationListOptions struct {
// RoleIDs restricts results to these role IDs.
RoleIDs []string
}
RoleConfigurationListOptions specifies options for listing role configurations.
type RoleConfigurationListResponse ¶
type RoleConfigurationListResponse struct {
Embedded *RoleConfigurationListEmbedded `json:"_embedded,omitempty"`
}
RoleConfigurationListResponse represents the response from listing role configurations.
type RoleListEmbedded ¶
type RoleListEmbedded struct {
Item []Role `json:"item,omitempty"`
}
RoleListEmbedded contains the embedded role items.
type RoleListOptions ¶
type RoleListOptions struct {
// Archived filters by archived status.
Archived *bool
// Licensed filters by licensed status.
Licensed *bool
// Fields specifies which fields to include.
Fields string
}
RoleListOptions specifies options for listing roles.
type RoleListResponse ¶
type RoleListResponse struct {
Embedded *RoleListEmbedded `json:"_embedded,omitempty"`
}
RoleListResponse represents the response from listing roles.
type SLA ¶
type SLA struct {
ID string `json:"id,omitempty"`
ResponseTargetDate *Time `json:"responseTargetDate,omitempty"`
TargetDate *Time `json:"targetDate,omitempty"`
}
SLA represents SLA information.
type SLAListOptions ¶
type SLAListOptions struct {
PageSize int
Incident string // incident number or id
Contract string // contract id
Person string // person id
Service string // service name or id
Branch string // branch id
BudgetHolder string // budget holder name or id
Department string // department name or id
BranchExtraA string // branchExtraA name or id
BranchExtraB string // branchExtraB name or id
ContractDate string // ISO 8601 date
CallType string // call type name or id
Category string // category name or id
Subcategory string // subcategory name or id
Asset string // asset name, object id, or asset id
}
SLAListOptions specifies options for listing SLA services.
type SLAService ¶
type SLAService struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Contract *IdName `json:"contract,omitempty"`
Service *IdName `json:"service,omitempty"`
}
SLAService represents an SLA service.
type SearchIndex ¶
type SearchIndex string
SearchIndex represents the search index to use.
const (
SearchIndexIncidents SearchIndex = "incidents"
)
type SearchResult ¶
type SearchResult struct {
Results []SearchResultItem `json:"results,omitempty"`
}
SearchResult represents a search result.
type SearchResultItem ¶
type SearchResultItem struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
}
SearchResultItem represents an item in search results.
type Searchlist ¶
Searchlist represents a searchlist item.
type SendEmailRequest ¶ added in v0.1.4
type SendEmailRequest struct {
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CC string `json:"cc,omitempty"`
BCC string `json:"bcc,omitempty"`
ReplyTo string `json:"replyTo,omitempty"`
Subject string `json:"subject,omitempty"`
Body string `json:"body,omitempty"`
IsHTMLBody bool `json:"isHtmlBody,omitempty"`
Priority int `json:"priority,omitempty"`
RequestDeliveryReceipt bool `json:"requestDeliveryReceipt,omitempty"`
RequestReadReceipt bool `json:"requestReadReceipt,omitempty"`
SuppressAutomaticReply bool `json:"suppressAutomaticReplies,omitempty"`
}
SendEmailRequest represents the request payload for sending an email.
type Service ¶ added in v0.1.4
type Service struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
Type string `json:"type,omitempty"` // service, supplierService
DefaultFirstLineOperator string `json:"defaultFirstLineOperator,omitempty"`
DefaultSecondLineOperator string `json:"defaultSecondLineOperator,omitempty"`
DefaultReservationsOperator string `json:"defaultReservationsOperator,omitempty"`
Manager string `json:"manager,omitempty"`
ServiceType *IdName `json:"serviceType,omitempty"`
AvailableForIncidents bool `json:"availableForIncidents,omitempty"`
AvailableForReservations bool `json:"availableForReservations,omitempty"`
}
Service represents a TOPdesk service.
type ServiceAssetLinkUpdate ¶ added in v0.1.4
type ServiceAssetLinkUpdate struct {
Standard bool `json:"standard,omitempty"`
}
ServiceAssetLinkUpdate represents an update to a service-asset link.
type ServiceCreateRequest ¶ added in v0.1.4
type ServiceCreateRequest struct {
Name string `json:"name"`
DefaultFirstLineOperator string `json:"defaultFirstLineOperator,omitempty"`
DefaultSecondLineOperator string `json:"defaultSecondLineOperator,omitempty"`
DefaultReservationsOperator string `json:"defaultReservationsOperator,omitempty"`
Manager string `json:"manager,omitempty"`
}
ServiceCreateRequest represents the request payload for creating a service.
type ServiceLinkedAsset ¶ added in v0.1.4
type ServiceLinkedAsset struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
AssetID string `json:"assetId,omitempty"`
LinkID string `json:"linkId,omitempty"`
}
ServiceLinkedAsset represents an asset linked to a service.
type ServiceListEntry ¶ added in v0.1.4
type ServiceListEntry struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
AvailableForIncidents bool `json:"availableForIncidents,omitempty"`
AvailableForReservations bool `json:"availableForReservations,omitempty"`
}
ServiceListEntry represents a service in a list response.
type ServiceListOptions ¶ added in v0.1.4
type ServiceListOptions struct {
ObjectID string // Filter by linked object ID
AssetID string // Filter by linked asset ID
Top int // Maximum number of results (1-10000)
}
ServiceListOptions specifies options for listing services.
type ServiceWindowOptions ¶
type ServiceWindowOptions struct {
// Top is the maximum number of service windows to return (max 10000).
Top int
// Name is the prefix of the service window name to filter by.
Name string
// Archived filters by archived state.
Archived *bool
}
ServiceWindowOptions specifies options for listing service windows.
type StockQuantity ¶
type StockQuantity struct {
StockID string `json:"stockId,omitempty"`
BulkItemID string `json:"bulkItemId,omitempty"`
Quantity *float64 `json:"quantity,omitempty"`
LinkID string `json:"linkId,omitempty"`
}
StockQuantity represents the quantity of a bulk item in stock.
type StockQuantityUpdateRequest ¶
type StockQuantityUpdateRequest struct {
StockID string `json:"stockId"`
BulkItemID string `json:"bulkItemId"`
Quantity float64 `json:"quantity"`
}
StockQuantityUpdateRequest represents a request to update stock quantities.
type Subcategory ¶
type Subcategory struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Category *Category `json:"category,omitempty"`
}
Subcategory represents an incident subcategory.
type Supplier ¶
type Supplier struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ForFirstLine bool `json:"forFirstLine,omitempty"`
ForSecondLine bool `json:"forSecondLine,omitempty"`
}
Supplier represents a supplier.
type SupplierContact ¶
type SupplierContact struct {
ID string `json:"id,omitempty"`
Supplier *IdName `json:"supplier,omitempty"`
FirstName string `json:"firstName,omitempty"`
SurName string `json:"surName,omitempty"`
DynamicName string `json:"dynamicName,omitempty"`
Phone string `json:"phone,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
Email string `json:"email,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
Archived bool `json:"archived,omitempty"`
}
SupplierContact represents a contact at a supplier.
type SupplierContactIterator ¶ added in v0.1.6
type SupplierContactIterator struct {
// contains filtered or unexported fields
}
SupplierContactIterator provides iterator-style pagination for supplier contacts.
func (*SupplierContactIterator) All ¶ added in v0.1.6
func (it *SupplierContactIterator) All() ([]SupplierContact, error)
All returns all remaining supplier contacts as a slice.
func (*SupplierContactIterator) Err ¶ added in v0.1.6
func (it *SupplierContactIterator) Err() error
Err returns any error that occurred during iteration.
func (*SupplierContactIterator) Next ¶ added in v0.1.6
func (it *SupplierContactIterator) Next() bool
Next advances the iterator to the next supplier contact.
func (*SupplierContactIterator) SupplierContact ¶ added in v0.1.6
func (it *SupplierContactIterator) SupplierContact() *SupplierContact
SupplierContact returns the current supplier contact.
type SupplierIterator ¶ added in v0.1.5
type SupplierIterator struct {
// contains filtered or unexported fields
}
SupplierIterator provides iterator-style pagination for suppliers.
func (*SupplierIterator) All ¶ added in v0.1.5
func (it *SupplierIterator) All() ([]ExtendedSupplier, error)
All returns all remaining suppliers as a slice.
func (*SupplierIterator) Err ¶ added in v0.1.5
func (it *SupplierIterator) Err() error
Err returns any error that occurred during iteration.
func (*SupplierIterator) Next ¶ added in v0.1.5
func (it *SupplierIterator) Next() bool
Next advances the iterator to the next supplier.
func (*SupplierIterator) Supplier ¶ added in v0.1.5
func (it *SupplierIterator) Supplier() *ExtendedSupplier
Supplier returns the current supplier.
type SupportingFilesListOptions ¶
type SupportingFilesListOptions struct {
// PageStart is the offset to start at (0-based).
PageStart int
// PageSize is the maximum number of items to return per page.
PageSize int
Fields string
Query string
Archived *bool
}
SupportingFilesListOptions specifies options for listing supporting files.
type TemplateIcon ¶ added in v0.1.7
type TemplateIcon struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
URL16 string `json:"url16,omitempty"`
URL32 string `json:"url32,omitempty"`
}
TemplateIcon represents an asset template icon.
type Time ¶ added in v0.1.2
Time is a custom time type that handles TOPdesk's timestamp formats. TOPdesk returns timestamps like "2026-01-24T02:28:00.000+0000" which don't match Go's RFC3339 format (expects +00:00 with colon).
func (Time) MarshalJSON ¶ added in v0.1.2
MarshalJSON implements json.Marshaler for Time
func (*Time) UnmarshalJSON ¶ added in v0.1.2
UnmarshalJSON implements json.Unmarshaler for Time
type TimeRegParent ¶
type TimeRegParent struct {
ID string `json:"id,omitempty"`
Status IncidentStatus `json:"status,omitempty"`
}
TimeRegParent represents the parent incident of a time registration.
type TimeRegistration ¶
type TimeRegistration struct {
ID string `json:"id,omitempty"`
TimeSpent int64 `json:"timeSpent,omitempty"` // in seconds
Notes string `json:"notes,omitempty"`
Status IncidentStatus `json:"status,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
CreationDate *Time `json:"creationDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Reason *IdName `json:"reason,omitempty"`
Parent *TimeRegParent `json:"parent,omitempty"`
Creator *IdName `json:"creator,omitempty"`
Modifier *IdName `json:"modifier,omitempty"`
}
TimeRegistration represents a time registration entry.
type TimeRegistrationIterator ¶
type TimeRegistrationIterator struct {
// contains filtered or unexported fields
}
TimeRegistrationIterator provides iterator-style pagination for time registrations.
func (*TimeRegistrationIterator) All ¶
func (it *TimeRegistrationIterator) All() ([]TimeRegistration, error)
All returns all remaining time registrations as a slice.
func (*TimeRegistrationIterator) Err ¶
func (it *TimeRegistrationIterator) Err() error
Err returns any error that occurred during iteration.
func (*TimeRegistrationIterator) Next ¶
func (it *TimeRegistrationIterator) Next() bool
Next advances the iterator to the next time registration.
func (*TimeRegistrationIterator) TimeRegistration ¶
func (it *TimeRegistrationIterator) TimeRegistration() *TimeRegistration
TimeRegistration returns the current time registration.
type TimeRegistrationResponse ¶
type TimeRegistrationResponse struct {
Results []TimeRegistration `json:"results,omitempty"`
}
TimeRegistrationResponse wraps the time registrations list response.
type TimeSpent ¶
type TimeSpent struct {
ID string `json:"id,omitempty"`
TimeSpent int64 `json:"timeSpent,omitempty"` // in seconds
Notes string `json:"notes,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdName `json:"operator,omitempty"`
OperatorGroup *IdName `json:"operatorGroup,omitempty"`
Reason *IdName `json:"reason,omitempty"`
}
TimeSpent represents a time registration entry recorded against an incident. TimeSpent is in seconds.
type TimeSpentRequest ¶
type TimeSpentRequest struct {
TimeSpent int64 `json:"timeSpent"` // in seconds
Notes string `json:"notes,omitempty"`
EntryDate *Time `json:"entryDate,omitempty"`
Operator *IdRef `json:"operator,omitempty"`
OperatorGroup *IdRef `json:"operatorGroup,omitempty"`
Reason *IdRef `json:"reason,omitempty"`
}
TimeSpentRequest is the payload for registering time spent on an incident. TimeSpent is required and specified in seconds.
type UpdateMemoHistoryRequest ¶ added in v0.1.4
type UpdateMemoHistoryRequest struct {
MemoText string `json:"memoText,omitempty"`
}
UpdateMemoHistoryRequest represents the request for updating a memo.
type UpdateOperationalActivityRequest ¶ added in v0.1.4
type UpdateOperationalActivityRequest struct {
BriefDescription string `json:"briefDescription,omitempty"`
PlannedStartDate *Time `json:"plannedStartDate,omitempty"`
PlannedEndDate *Time `json:"plannedEndDate,omitempty"`
Category *IdNameRef `json:"category,omitempty"`
Subcategory *IdNameRef `json:"subcategory,omitempty"`
Type *IdNameRef `json:"type,omitempty"`
Status *IdNameRef `json:"status,omitempty"`
Anomaly *BooleanReasonUpdate `json:"anomaly,omitempty"`
Skipped *BooleanReasonUpdate `json:"skipped,omitempty"`
Resolved *BooleanDateTimeUpdate `json:"resolved,omitempty"`
Operator *IdNameRef `json:"operator,omitempty"`
OperatorGroup *IdNameRef `json:"operatorGroup,omitempty"`
Supplier *IdNameRef `json:"supplier,omitempty"`
Schema *IdNameRef `json:"schema,omitempty"`
Grouping *IdNameRef `json:"grouping,omitempty"`
EstimatedCosts *float64 `json:"estimatedCosts,omitempty"`
Costs *float64 `json:"costs,omitempty"`
EstimatedTime *int `json:"estimatedTime,omitempty"`
BudgetHolder *IdNameRef `json:"budgetHolder,omitempty"`
OptionalFields1 *OptionalFields `json:"optionalFields1,omitempty"`
OptionalFields2 *OptionalFields `json:"optionalFields2,omitempty"`
}
UpdateOperationalActivityRequest represents the request for updating an operational activity.
type UpdateSearchlistRequest ¶ added in v0.1.4
type UpdateSearchlistRequest struct {
Name string `json:"name,omitempty"`
}
UpdateSearchlistRequest represents the request for updating a searchlist item.
type UpdateSearchlistWithExtLinkRequest ¶ added in v0.1.4
type UpdateSearchlistWithExtLinkRequest struct {
Name string `json:"name,omitempty"`
ExternalLink *VisitorExtLink `json:"externalLink,omitempty"`
}
UpdateSearchlistWithExtLinkRequest represents the request for updating a searchlist item with external link.
type UpdateVisitorRequest ¶ added in v0.1.4
type UpdateVisitorRequest struct {
Visitor *VisitorWriteInfo `json:"visitor,omitempty"`
Visit *VisitInfo `json:"visit,omitempty"`
Host *VisitorHostWrite `json:"host,omitempty"`
OptionalFieldsTab1 *VisitorOptFieldsWrite `json:"optionalFieldsTab1,omitempty"`
OptionalFieldsTab2 *VisitorOptFieldsWrite `json:"optionalFieldsTab2,omitempty"`
ExternalLink *VisitorExtLink `json:"externalLink,omitempty"`
}
UpdateVisitorRequest represents the request payload for updating a visitor.
type VisitInfo ¶ added in v0.1.4
type VisitInfo struct {
ArrivalStatus string `json:"arrivalStatus,omitempty"` // arrived, expected, departed, cancelled
ExpectedArrival *Time `json:"expectedArrival,omitempty"`
ExpectedDeparture *Time `json:"expectedDeparture,omitempty"`
ActualArrival *Time `json:"actualArrival,omitempty"`
ActualDeparture *Time `json:"actualDeparture,omitempty"`
CancellationDate *Time `json:"cancellationDate,omitempty"`
Reason string `json:"reason,omitempty"`
}
VisitInfo contains visit information.
type Visitor ¶ added in v0.1.4
type Visitor struct {
ID string `json:"id,omitempty"`
Number string `json:"number,omitempty"`
Visitor *VisitorInfo `json:"visitor,omitempty"`
Visit *VisitInfo `json:"visit,omitempty"`
Host *VisitorHost `json:"host,omitempty"`
Comments string `json:"comments,omitempty"`
Notes string `json:"notes,omitempty"`
OptionalFieldsTab1 *VisitorOptFields `json:"optionalFieldsTab1,omitempty"`
OptionalFieldsTab2 *VisitorOptFields `json:"optionalFieldsTab2,omitempty"`
ExternalLinks []VisitorExtLink `json:"externalLinks,omitempty"`
Archived bool `json:"archived,omitempty"`
Creator string `json:"creator,omitempty"`
Created *Time `json:"created,omitempty"`
Modifier string `json:"modifier,omitempty"`
Modified *Time `json:"modified,omitempty"`
}
Visitor represents a TOPdesk visitor.
type VisitorAttachment ¶ added in v0.1.4
type VisitorAttachment struct {
ID string `json:"id,omitempty"`
FileName string `json:"fileName,omitempty"`
Size int64 `json:"size,omitempty"`
ContentType string `json:"contentType,omitempty"`
}
VisitorAttachment represents an attachment on a visitor.
type VisitorExtLink ¶ added in v0.1.4
type VisitorExtLink struct {
ID string `json:"id"`
Type string `json:"type"`
Date *Time `json:"date,omitempty"`
}
VisitorExtLink represents an external link for a visitor.
type VisitorHost ¶ added in v0.1.4
type VisitorHost struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Branch *IdName `json:"branch,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
Email string `json:"email,omitempty"`
Location *IdName `json:"location,omitempty"`
Department *IdName `json:"department,omitempty"`
BudgetHolder *IdName `json:"budgetHolder,omitempty"`
BranchExtraA *IdName `json:"branchExtraA,omitempty"`
BranchExtraB *IdName `json:"branchExtraB,omitempty"`
PersonExtraA *IdName `json:"personExtraA,omitempty"`
PersonExtraB *IdName `json:"personExtraB,omitempty"`
}
VisitorHost contains host/caller information for a visitor.
type VisitorHostWrite ¶ added in v0.1.4
type VisitorHostWrite struct {
Person *IdRef `json:"person,omitempty"`
UnregisteredCallerName string `json:"unregisteredCallerName,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
MobileNumber string `json:"mobileNumber,omitempty"`
Email string `json:"email,omitempty"`
Branch *IdRef `json:"branch,omitempty"`
Location *IdRef `json:"location,omitempty"`
Department *IdNameRef `json:"department,omitempty"`
BudgetHolder *IdNameRef `json:"budgetHolder,omitempty"`
PersonExtraA *IdNameRef `json:"personExtraA,omitempty"`
PersonExtraB *IdNameRef `json:"personExtraB,omitempty"`
BranchExtraA *IdNameRef `json:"branchExtraA,omitempty"`
BranchExtraB *IdNameRef `json:"branchExtraB,omitempty"`
}
VisitorHostWrite contains host information for create/update.
type VisitorInfo ¶ added in v0.1.4
type VisitorInfo struct {
Name string `json:"name,omitempty"`
Organization string `json:"organization,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
Email string `json:"email,omitempty"`
CarPark *IdName `json:"carPark,omitempty"`
NumberPlate string `json:"numberPlate,omitempty"`
IdentificationType *IdName `json:"identificationType,omitempty"`
IdentificationNumber string `json:"identificationNumber,omitempty"`
Badge *IdName `json:"badge,omitempty"`
}
VisitorInfo contains visitor personal information.
type VisitorListOptions ¶ added in v0.1.4
VisitorListOptions specifies options for listing visitors.
type VisitorListResponse ¶ added in v0.1.4
type VisitorListResponse struct {
Total int `json:"total,omitempty"`
Results []Visitor `json:"results,omitempty"`
}
VisitorListResponse represents the response from listing visitors.
type VisitorOptFields ¶ added in v0.1.4
type VisitorOptFields struct {
Boolean1 *bool `json:"boolean1,omitempty"`
Boolean2 *bool `json:"boolean2,omitempty"`
Boolean3 *bool `json:"boolean3,omitempty"`
Boolean4 *bool `json:"boolean4,omitempty"`
Boolean5 *bool `json:"boolean5,omitempty"`
Number1 *float64 `json:"number1,omitempty"`
Number2 *float64 `json:"number2,omitempty"`
Number3 *float64 `json:"number3,omitempty"`
Number4 *float64 `json:"number4,omitempty"`
Number5 *float64 `json:"number5,omitempty"`
Date1 *Time `json:"date1,omitempty"`
Date2 *Time `json:"date2,omitempty"`
Date3 *Time `json:"date3,omitempty"`
Date4 *Time `json:"date4,omitempty"`
Date5 *Time `json:"date5,omitempty"`
Text1 string `json:"text1,omitempty"`
Text2 string `json:"text2,omitempty"`
Text3 string `json:"text3,omitempty"`
Text4 string `json:"text4,omitempty"`
Text5 string `json:"text5,omitempty"`
Memo1 string `json:"memo1,omitempty"`
Memo2 string `json:"memo2,omitempty"`
Memo3 string `json:"memo3,omitempty"`
Memo4 string `json:"memo4,omitempty"`
Memo5 string `json:"memo5,omitempty"`
Searchlist1 *IdName `json:"searchlist1,omitempty"`
Searchlist2 *IdName `json:"searchlist2,omitempty"`
Searchlist3 *IdName `json:"searchlist3,omitempty"`
Searchlist4 *IdName `json:"searchlist4,omitempty"`
Searchlist5 *IdName `json:"searchlist5,omitempty"`
}
VisitorOptFields contains optional fields for a visitor.
type VisitorOptFieldsWrite ¶ added in v0.1.4
type VisitorOptFieldsWrite struct {
Boolean1 *bool `json:"boolean1,omitempty"`
Boolean2 *bool `json:"boolean2,omitempty"`
Boolean3 *bool `json:"boolean3,omitempty"`
Boolean4 *bool `json:"boolean4,omitempty"`
Boolean5 *bool `json:"boolean5,omitempty"`
Number1 *float64 `json:"number1,omitempty"`
Number2 *float64 `json:"number2,omitempty"`
Number3 *float64 `json:"number3,omitempty"`
Number4 *float64 `json:"number4,omitempty"`
Number5 *float64 `json:"number5,omitempty"`
Date1 *Time `json:"date1,omitempty"`
Date2 *Time `json:"date2,omitempty"`
Date3 *Time `json:"date3,omitempty"`
Date4 *Time `json:"date4,omitempty"`
Date5 *Time `json:"date5,omitempty"`
Text1 string `json:"text1,omitempty"`
Text2 string `json:"text2,omitempty"`
Text3 string `json:"text3,omitempty"`
Text4 string `json:"text4,omitempty"`
Text5 string `json:"text5,omitempty"`
Searchlist1 *IdNameRef `json:"searchlist1,omitempty"`
Searchlist2 *IdNameRef `json:"searchlist2,omitempty"`
Searchlist3 *IdNameRef `json:"searchlist3,omitempty"`
Searchlist4 *IdNameRef `json:"searchlist4,omitempty"`
Searchlist5 *IdNameRef `json:"searchlist5,omitempty"`
}
VisitorOptFieldsWrite contains optional fields for create/update.
type VisitorSearchlistItem ¶ added in v0.1.4
type VisitorSearchlistItem struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
}
VisitorSearchlistItem represents an item in a visitor searchlist.
type VisitorSearchlistItemWithExtLink ¶ added in v0.1.4
type VisitorSearchlistItemWithExtLink struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Archived bool `json:"archived,omitempty"`
ExternalLink *VisitorExtLink `json:"externalLink,omitempty"`
}
VisitorSearchlistItemWithExtLink represents a searchlist item with external link.
type VisitorWriteInfo ¶ added in v0.1.4
type VisitorWriteInfo struct {
Name string `json:"name,omitempty"`
Organization string `json:"organization,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
Email string `json:"email,omitempty"`
CarPark *IdNameRef `json:"carPark,omitempty"`
NumberPlate string `json:"numberPlate,omitempty"`
IdentificationType *IdNameRef `json:"identificationType,omitempty"`
IdentificationNumber string `json:"identificationNumber,omitempty"`
Badge *IdNameRef `json:"badge,omitempty"`
}
VisitorWriteInfo contains visitor information for create/update.
Source Files
¶
- accessroles.go
- assets.go
- changes.go
- changes_activities.go
- changes_attachments.go
- changes_calendar.go
- changes_lookups.go
- changes_manager.go
- changes_progresstrail.go
- changes_requester.go
- changes_requests.go
- client.go
- custom_actions.go
- errors.go
- general.go
- incidents.go
- incidents_actions.go
- incidents_archive.go
- incidents_attachments.go
- incidents_escalation.go
- incidents_lookups.go
- incidents_progresstrail.go
- incidents_requests.go
- incidents_timespent.go
- knowledgebase.go
- mock_server.go
- models.go
- models_change.go
- models_incident.go
- operations.go
- pagination.go
- reservations.go
- resilience.go
- services.go
- settings.go
- supportingfiles.go
- tasknotifications.go
- time.go
- visitors.go