Hitesh Pattanayak 8989fcd7cd
handles hyperlink columns and fields (#4971)
Hyperlink column of a list item is not identifiable from GRAPH's
response.
Hence this is a workaround to handle such fields until a column
definition is introduced for `Hyperlink`.

#### Does this PR need a docs update or release note?
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature

#### Issue(s)
#4754 

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [x]  Unit test
- [x] 💚 E2E
2024-01-13 13:07:28 +05:30

97 lines
2.6 KiB
Go

package api
import (
"github.com/alcionai/corso/src/internal/common/keys"
)
// Well knwon Folder Names
// Mail Definitions: https://docs.microsoft.com/en-us/graph/api/resources/mailfolder?view=graph-rest-1.0
const (
DefaultCalendar = "Calendar"
DefaultContacts = "Contacts"
MailInbox = "Inbox"
MsgFolderRoot = "msgfolderroot"
// Kiota JSON invalid JSON error message.
invalidJSON = "invalid json type"
)
// ************** Lists starts *****************
const (
AttachmentsColumnName = "Attachments"
EditColumnName = "Edit"
ContentTypeColumnName = "ContentType"
CreatedColumnName = "Created"
ModifiedColumnName = "Modified"
AuthorLookupIDColumnName = "AuthorLookupId"
EditorLookupIDColumnName = "EditorLookupId"
AppAuthorLookupIDColumnName = "AppAuthorLookupId"
TitleColumnName = "Title"
ContentTypeColumnDisplayName = "Content Type"
AddressKey = "address"
CoordinatesKey = "coordinates"
DisplayNameKey = "displayName"
LocationURIKey = "locationUri"
UniqueIDKey = "uniqueId"
// entries that are nested within a second layer
CityKey = "city"
CountryKey = "countryOrRegion"
PostalCodeKey = "postalCode"
StateKey = "state"
StreetKey = "street"
LatitudeKey = "latitude"
LongitudeKey = "longitude"
CountryOrRegionFN = "CountryOrRegion"
StateFN = "State"
CityFN = "City"
PostalCodeFN = "PostalCode"
StreetFN = "Street"
GeoLocFN = "GeoLoc"
DispNameFN = "DispName"
HyperlinkDescriptionKey = "Description"
HyperlinkURLKey = "Url"
LinkTitleFieldNamePart = "LinkTitle"
ChildCountFieldNamePart = "ChildCount"
LookupIDFieldNamePart = "LookupId"
ReadOnlyOrHiddenFieldNamePrefix = "_"
DescoratorFieldNamePrefix = "@"
WebTemplateExtensionsListTemplate = "webTemplateExtensionsList"
// This issue https://github.com/alcionai/corso/issues/4932
// tracks to backup/restore supportability of `documentLibrary` templated lists
DocumentLibraryListTemplate = "documentLibrary"
SharingLinksListTemplate = "sharingLinks"
AccessRequestsListTemplate = "accessRequest"
)
var addressFieldNames = []string{
AddressKey,
CoordinatesKey,
DisplayNameKey,
LocationURIKey,
UniqueIDKey,
}
var legacyColumns = keys.Set{
AttachmentsColumnName: {},
EditColumnName: {},
ContentTypeColumnDisplayName: {},
}
var SkipListTemplates = keys.Set{
WebTemplateExtensionsListTemplate: {},
DocumentLibraryListTemplate: {},
SharingLinksListTemplate: {},
AccessRequestsListTemplate: {},
}
// ************** Lists ends *****************