@livetiles/reach-plugin-types 0.4.0-preview.675 → 0.4.0-preview.676

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.d.ts +862 -856
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2020,15 +2020,6 @@ declare module "libs/reach/util/common/src/user/useCurrentUserApi" {
2020
2020
  deleteCurrentUserAvatar: () => Promise<unknown>;
2021
2021
  };
2022
2022
  }
2023
- declare module "libs/reach/util/common/src/content/ItemResourceType" {
2024
- export enum ItemResourceTypes {
2025
- News = "news",
2026
- Pages = "pages",
2027
- Posts = "posts",
2028
- Events = "events",
2029
- Comments = "comments"
2030
- }
2031
- }
2032
2023
  declare module "libs/reach/util/common/src/content/Attachment" {
2033
2024
  export enum AttachmentType {
2034
2025
  Image = 0,
@@ -2061,6 +2052,19 @@ declare module "libs/reach/util/common/src/content/Attachment" {
2061
2052
  url: string;
2062
2053
  }
2063
2054
  }
2055
+ declare module "libs/reach/util/common/src/content/GraphQLAttachmentType" {
2056
+ export enum GraphQLAttachmentType {
2057
+ Image = "IMAGE",
2058
+ File = "FILE",
2059
+ YouTubeVideo = "YOU_TUBE_VIDEO",
2060
+ VimeoVideo = "VIMEO_VIDEO",
2061
+ News = "NEWS",
2062
+ Event = "EVENT",
2063
+ Page = "PAGE",
2064
+ Post = "POST",
2065
+ Giphy = "GIPHY"
2066
+ }
2067
+ }
2064
2068
  declare module "libs/reach/util/common/src/content/ItemWithAttachments" {
2065
2069
  import { Attachment } from "libs/reach/util/common/src/content/Attachment";
2066
2070
  export interface ItemWithAttachments {
@@ -2098,192 +2102,255 @@ declare module "libs/reach/util/common/src/content/Comment" {
2098
2102
  Posts = 2
2099
2103
  }
2100
2104
  }
2101
- declare module "libs/reach/util/common/src/user/useManageCurrentUserApi" {
2102
- import { CurrentUser, GroupNotificationSettings, NotificationTypeSettings, UserContact } from "libs/reach/util/common/src/user/User";
2103
- import { ItemResourceTypes } from "libs/reach/util/common/src/content/ItemResourceType";
2104
- import { ConversationScope } from "libs/reach/util/common/src/content/Comment";
2105
- import { UserChannelSubscription } from "libs/reach/util/common/src/user/UserChannelSubscription";
2106
- export function useManageCurrentUserApi(): {
2107
- updateNotificationTypeSettings: (settings: NotificationTypeSettings) => Promise<unknown>;
2108
- getFollowCommentsStatus: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => Promise<boolean>;
2109
- toggleFollowComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope, enabled: boolean) => Promise<unknown>;
2110
- followPublicPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2111
- followEditorPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2112
- followAllPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2113
- followPublishableItemComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => void;
2114
- resolveSegment: (type: ItemResourceTypes, scope: ConversationScope) => string;
2115
- getFollowCommentSegment: (type: ItemResourceTypes) => "page" | "news" | "event";
2116
- toggleBookmark: (newsId: string, currentUser: CurrentUser) => Promise<boolean>;
2117
- getUserProperties: () => Promise<{
2118
- [key: string]: string;
2119
- }>;
2120
- setUserChannels: (channels: ReadonlyArray<UserChannelSubscription>) => Promise<any>;
2121
- addContact: (contact: UserContact) => Promise<UserContact[]>;
2122
- deleteContact: (contact: UserContact) => Promise<UserContact[]>;
2123
- getContactAccounts: () => Promise<UserContact[]>;
2124
- setLanguage: (uiLanguageCode: string) => Promise<any>;
2125
- setContentLanguage: (contentLanguageCode: string) => Promise<void>;
2126
- setLocale: (localeCode: string) => Promise<void>;
2127
- getGroupNotificationSettings: (groupId: string) => Promise<GroupNotificationSettings>;
2128
- updateGroupNotificationSettings: (groupId: string, groupNotificationSettings: GroupNotificationSettings) => Promise<unknown>;
2129
- clearMyUnreadItems: (itemType: ItemResourceTypes) => Promise<void>;
2130
- acceptTermsAndConditions: (approvedHash: string) => Promise<unknown>;
2131
- };
2105
+ declare module "libs/reach/util/common/src/content/ItemResourceType" {
2106
+ export enum ItemResourceTypes {
2107
+ News = "news",
2108
+ Pages = "pages",
2109
+ Posts = "posts",
2110
+ Events = "events",
2111
+ Comments = "comments"
2112
+ }
2132
2113
  }
2133
- declare module "libs/reach/util/common/src/user/useUserAdminApi" {
2134
- import { HashUser, SubscriptionJoinResult, UpdatableUserProperties, UserActivationResult, UserInvitationResult, UserSummary } from "libs/reach/util/common/src/user/User";
2135
- import { Observable } from 'rxjs';
2114
+ declare module "libs/reach/util/common/src/content/EventItem" {
2136
2115
  import { Account } from "libs/reach/util/common/src/user/Account";
2137
- import { SortDirection } from "libs/reach/util/common/src/SortDirection";
2138
- import { PaginatedList } from "libs/reach/util/common/src/PaginatedList";
2139
- export interface SortDefinition {
2140
- sortColumn: string;
2141
- sortDirection: SortDirection;
2116
+ import { PollResult } from "libs/reach/util/common/src/content/BaseItem";
2117
+ import { SchedulableItem } from "libs/reach/util/common/src/content/NewsItem";
2118
+ export enum EventResponse {
2119
+ NotSet = 0,
2120
+ Registered = 1,
2121
+ Declined = 2
2142
2122
  }
2143
- export interface UserFilterDefinition extends SortDefinition {
2144
- searchText: string;
2145
- includePendingInvitationUsers?: boolean;
2146
- includePendingRegistrationUsers?: boolean;
2147
- excludeRegularUsers?: boolean;
2123
+ export interface EventItem extends SchedulableItem {
2124
+ startDate?: string;
2125
+ endDate?: string;
2126
+ timeZone?: string;
2127
+ contacts?: Account[];
2128
+ registrationSettings?: EventRegistrationSettings;
2129
+ userResponse?: EventResponse;
2130
+ cancelInformation?: EventCancelInformation;
2131
+ locations?: EventLocation[];
2132
+ hasNewComments?: boolean;
2133
+ isLiked?: boolean;
2134
+ recurrenceSettings?: EventRecurrenceSettings;
2135
+ recurrenceSeriesId?: string;
2136
+ isSeriesMaster?: string;
2137
+ isVirtual?: boolean;
2148
2138
  }
2149
- export interface UserAdminApi {
2150
- getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2151
- getUserByHash: (hash: string) => Promise<HashUser>;
2152
- getUsersCsv: () => Promise<any>;
2153
- sendActivationEmail: () => Promise<unknown>;
2154
- activateUser: (hash: string) => Promise<UserActivationResult>;
2155
- deleteUser: (userId: string) => Observable<unknown>;
2156
- completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2157
- inviteUser: (email: string) => Promise<UserInvitationResult>;
2158
- inviteUsers: (users: Account[]) => Promise<string[]>;
2139
+ export interface EventRegistrationSettings {
2140
+ enabled?: boolean;
2141
+ showParticipantsToEverybody?: boolean;
2142
+ deadline?: string;
2143
+ seriesMode?: SeriesRegistrationMode;
2144
+ }
2145
+ export enum SeriesRegistrationMode {
2146
+ None = 0,
2147
+ FullSeries = 1,
2148
+ PerInstance = 2
2149
+ }
2150
+ export interface EventCancelInformation {
2151
+ isCancelled?: boolean;
2152
+ modifiedOn?: string;
2153
+ modifiedBy?: Account;
2154
+ reasons?: EventCancelReasons;
2155
+ }
2156
+ export interface EventCancelReasons {
2157
+ [language: string]: string;
2158
+ }
2159
+ export interface EventLocation {
2160
+ locationId: string;
2161
+ name: string;
2162
+ locationOnMap?: string;
2163
+ url?: string;
2164
+ maxNumberOfSeats?: number;
2165
+ readOnly?: boolean;
2166
+ }
2167
+ export interface EventRegistrationResult extends PollResult {
2168
+ locationAnswers: LocationResult[];
2169
+ }
2170
+ export interface LocationResult {
2171
+ locationId: string;
2172
+ count: number;
2173
+ }
2174
+ export interface EventParticipant {
2175
+ displayName: string;
2176
+ upn: string;
2177
+ locationId: string;
2178
+ }
2179
+ export interface EventRecurrenceSettings {
2180
+ frequency: RecurrenceFrequency;
2181
+ interval: number;
2182
+ weekDays: WeekDay;
2183
+ monthlyOccurrence: MonthlyOccurrence;
2184
+ yearlyOccurrence: MonthNumber;
2185
+ dayOfMonth: number;
2186
+ endDate?: string;
2187
+ }
2188
+ export enum RecurrenceFrequency {
2189
+ NotSet = 0,
2190
+ Daily = 1,
2191
+ Weekly = 2,
2192
+ Monthly = 3,
2193
+ Yearly = 4
2194
+ }
2195
+ export enum WeekDay {
2196
+ None = 0,
2197
+ Monday = 1,
2198
+ Tuesday = 2,
2199
+ Wednesday = 4,
2200
+ Thursday = 8,
2201
+ Friday = 16,
2202
+ Saturday = 32,
2203
+ Sunday = 64
2204
+ }
2205
+ export enum MonthlyOccurrence {
2206
+ Unknown = 0,
2207
+ First = 1,
2208
+ Second = 2,
2209
+ Third = 3,
2210
+ Fourth = 4,
2211
+ Last = 5
2212
+ }
2213
+ export enum MonthNumber {
2214
+ None = 0,
2215
+ January = 1,
2216
+ February = 2,
2217
+ March = 3,
2218
+ April = 4,
2219
+ May = 5,
2220
+ June = 6,
2221
+ July = 7,
2222
+ August = 8,
2223
+ September = 9,
2224
+ October = 10,
2225
+ November = 11,
2226
+ December = 12
2227
+ }
2228
+ export interface EventRecurrenceInfo {
2229
+ id: string;
2230
+ startDate: string;
2231
+ endDate?: string;
2159
2232
  }
2160
- export function useUserAdminApi(): {
2161
- getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2162
- completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2163
- inviteUser: (email: string) => Promise<UserInvitationResult>;
2164
- getUserByHash: (hash: string) => Promise<HashUser>;
2165
- sendActivationEmail: () => Promise<unknown>;
2166
- activateUser: (hash: string) => Promise<UserActivationResult>;
2167
- deleteUser: (userId: string) => Observable<unknown>;
2168
- inviteUsers: (users: Account[]) => Promise<string[]>;
2169
- getUsersCsv: () => Promise<any>;
2170
- updateUserProfilePropertiesByUPN: (upn: string, newProperties: UpdatableUserProperties) => Promise<unknown>;
2171
- updateUserAvatarByUPN: (upn: string, subscriptionId: string, file?: File) => Promise<unknown>;
2172
- deleteUserAvatarByUPN: (upn: string) => Promise<unknown>;
2173
- };
2174
2233
  }
2175
- declare module "libs/reach/util/common/src/user/useCurrentUserCache" {
2176
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
2177
- import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
2178
- export function useCurrentUserCache(): {
2179
- clear: () => Promise<void>;
2180
- setEssentials: (user: CurrentUser) => Promise<CurrentUser>;
2181
- setUser: (user: CurrentUser) => Promise<CurrentUser>;
2182
- get: () => Promise<{
2183
- subscription: {
2184
- logoInfo: {
2185
- smallUrl: any;
2186
- largeUrl: string;
2187
- isLegacyLogo: boolean;
2188
- };
2189
- languages: import("@livetiles/reach/util/common").LanguageBase[];
2190
- featureMask: string;
2191
- company: string;
2192
- directories: import("libs/reach/util/common/src/user/Subscription").DirectoryConfiguration[];
2193
- webPluginDefinitions: import("libs/reach/util/common/src/user/Subscription").WebPluginDefinition[];
2194
- userPropertyDefinitions: import("libs/reach/util/common/src/user/Subscription").UserPropertyDefinition[];
2195
- customDomain?: string;
2196
- allowSelfRegistration?: boolean;
2197
- brandFolderConfig?: import("libs/reach/util/common/src/user/Subscription").BrandFolderConfig;
2198
- id: string;
2199
- subscriptionName: string;
2200
- subscriptionHandle?: string;
2201
- contact: import("@livetiles/reach/util/common").Account;
2202
- theme: import("libs/reach/util/common/src/user/Subscription").Theme;
2203
- defaultLanguage: string;
2204
- faviconUrl?: string;
2205
- navigation: import("libs/reach/util/common/src/user/Subscription").NavigationNode[];
2206
- regionSettings?: import("libs/reach/util/common/src/user/Subscription").RegionSettings;
2207
- signInSettings?: import("libs/reach/util/common/src/user/Subscription").SignInSettings;
2208
- useInAppBrowser?: boolean;
2209
- hasUnreadItems: boolean;
2210
- pageTrackingInfo: import("libs/reach/util/common/src/user/Subscription").PageTrackingInfo;
2211
- termsAndConditionsHash?: string;
2212
- };
2213
- isEmailVerificationPending?: boolean;
2214
- isSubscriptionOwner: boolean;
2215
- givenName: string;
2216
- surname: string;
2217
- preferredUiLanguage: string;
2218
- preferredContentLanguage?: string;
2219
- preferredLocale?: string;
2220
- bookmarks: string[];
2221
- groups: import("libs/reach/util/common/src/user/User").UserGroup[];
2222
- availableSubscriptions: SubscriptionSummary[];
2223
- channels: import("@livetiles/reach/util/common").UserChannelSubscription[];
2224
- userHash: string;
2225
- unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2226
- unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2227
- unreadPosts: {
2228
- groupId: string;
2229
- itemId: string;
2230
- }[];
2231
- unreadFeedItemsCount?: number;
2232
- mostRecentPostGroups: string[];
2233
- notificationTypeSettings: import("libs/reach/util/common/src/user/User").NotificationTypeSettings;
2234
- hasPendingRegistration?: boolean;
2235
- minRoles: import("libs/reach/util/common/src/user/User").UserMinRoles;
2236
- hasDirectory: boolean;
2237
- contacts: import("libs/reach/util/common/src/user/User").UserContact[];
2238
- termsAndConditionsApprovedHash: string;
2239
- isPublicUser?: boolean;
2240
- hasUnreadChats?: boolean;
2241
- id?: string;
2242
- type?: import("@livetiles/reach/util/common").AccountType;
2243
- tenantId?: string;
2244
- displayName?: string;
2245
- userPrincipalName?: string;
2246
- mail?: string;
2247
- tokenUniqueId?: string;
2248
- authenticationType?: import("@livetiles/shared/util/authentication").AuthenticationType;
2249
- created?: string;
2250
- }>;
2251
- };
2252
- export function getUserDetailFields(user: Partial<CurrentUser>): {
2253
- availableSubscriptions: SubscriptionSummary[];
2254
- bookmarks: string[];
2255
- unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2256
- unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2257
- unreadPosts: {
2258
- groupId: string;
2259
- itemId: string;
2234
+ declare module "libs/reach/util/common/src/content/PageItem" {
2235
+ import { DocumentFileInfo, PublishableItem, TitleContent } from "libs/reach/util/common/src/content/PublishableItem";
2236
+ import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
2237
+ import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
2238
+ export interface PageItem extends PublishableItem {
2239
+ feedbackSettings?: FeedbackSettings;
2240
+ parentId?: string;
2241
+ pathIds?: string[];
2242
+ position?: number;
2243
+ navigationContext?: PageNavigationContext;
2244
+ hasHiddenAncestor?: boolean;
2245
+ isUnlinked?: boolean;
2246
+ pageType?: PageType;
2247
+ firstChildId?: string;
2248
+ }
2249
+ export interface ContentsSummary {
2250
+ [lang: string]: TitleContent & {
2251
+ fileInfo?: DocumentFileInfo;
2252
+ };
2253
+ }
2254
+ export interface PageNavigationNode {
2255
+ id: string;
2256
+ contents?: ContentsSummary;
2257
+ parent?: PageNavigationNode;
2258
+ firstChildId?: string;
2259
+ children?: PageNavigationNode[];
2260
+ position?: number;
2261
+ status?: WorkflowStatus;
2262
+ hasPublishedVersion?: boolean;
2263
+ groupIds?: string[];
2264
+ hasHiddenAncestor?: boolean;
2265
+ isUnlinked?: boolean;
2266
+ hasAnyPageChild?: boolean;
2267
+ pageType?: PageType;
2268
+ useExternalContent?: boolean;
2269
+ isSearchMatch?: boolean;
2270
+ topLevelFolderName?: string;
2271
+ uploadToken?: string;
2272
+ }
2273
+ export interface PageNavigationContext {
2274
+ parent?: PageNavigationNode;
2275
+ siblings?: PageNavigationNode[];
2276
+ children?: PageNavigationNode[];
2277
+ }
2278
+ export enum PageType {
2279
+ Page = 0,
2280
+ Document = 1
2281
+ }
2282
+ export interface FolderDefinition {
2283
+ files: {
2284
+ path: string;
2285
+ fileId: string;
2260
2286
  }[];
2261
- hasUnreadChats: boolean;
2262
- unreadFeedItemsCount: number;
2263
- mostRecentPostGroups: string[];
2264
- };
2287
+ startPosition: number;
2288
+ parentPageId: string;
2289
+ groupIds: string[];
2290
+ isUnlinked: boolean;
2291
+ }
2292
+ export interface DocumentStructure {
2293
+ topLevelElements: Array<{
2294
+ pageId: string;
2295
+ title: string;
2296
+ firstChildId?: string;
2297
+ }>;
2298
+ files: {
2299
+ [filePath: string]: string;
2300
+ };
2301
+ }
2265
2302
  }
2266
- declare module "libs/reach/util/common/src/user/CurrentUserDetailContextProvider" {
2267
- import { FC } from 'react';
2268
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
2269
- export function useRefreshUserDetails(): () => Promise<CurrentUser>;
2270
- export const CurrentUserDetailContextProvider: FC;
2303
+ declare module "libs/reach/util/common/src/content/ResponseItem" {
2304
+ import { Account } from "libs/reach/util/common/src/user/Account";
2305
+ export interface ResponseItem {
2306
+ id?: string;
2307
+ title?: string;
2308
+ errorMessage?: string;
2309
+ statusCode?: number;
2310
+ account?: Account;
2311
+ }
2271
2312
  }
2272
- declare module "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder" {
2273
- export function useSubscriptionHandlePathBuilder(): {
2274
- buildPath: (initialPath?: string) => string;
2275
- subscriptionHandle: string;
2313
+ declare module "libs/reach/util/common/src/content/useFileApi" {
2314
+ import { ItemResourceTypes } from "libs/reach/util/common/src/content/ItemResourceType";
2315
+ export interface UploadStateDescription {
2316
+ id?: string;
2317
+ state?: UploadState;
2318
+ error?: any | FileTooBigError;
2319
+ }
2320
+ export enum UploadState {
2321
+ unknown = 0,
2322
+ pending = 1,
2323
+ complete = 2,
2324
+ error = 3
2325
+ }
2326
+ export class FileTooBigError extends Error {
2327
+ actualSizeInMb: number;
2328
+ maxSizeInMb: number;
2329
+ constructor(actualSizeInMb: number, maxSizeInMb: number);
2330
+ }
2331
+ export function getFileFormData(file: File): FormData;
2332
+ export interface FileInfo {
2333
+ identifier: string;
2334
+ fileName: string;
2335
+ title?: string;
2336
+ pageId?: string;
2337
+ extension?: string;
2338
+ }
2339
+ export function useFileApi(): {
2340
+ getFileUrlWithToken: (fileDownloadToken: string, itemId: string, subscriptionId: string, fileId: string, originalFileName: string, resourceType: ItemResourceTypes) => string;
2341
+ uploadFile: (itemId: string, subscriptionId: string, resourceType: ItemResourceTypes, file: File, id: string) => Promise<FileInfo>;
2276
2342
  };
2277
2343
  }
2278
- declare module "libs/reach/util/common/src/user/useSubscriptionWebAppUrl" {
2279
- export function useSubscriptionWebAppUrl(): string;
2280
- export function useSubscriptionWebAppUrls(): string[];
2281
- }
2282
- declare module "libs/reach/util/common/src/user/useChannelsApi" {
2283
- import { Channel } from "libs/reach/util/common/src/user/Channel";
2284
- export function useChannelsApi(): {
2285
- getChannels: () => Promise<Channel[]>;
2286
- getChannelsByItemId: (id: string, route?: string) => Promise<Channel[]>;
2344
+ declare module "libs/reach/util/common/src/keywords/useKeywordsApi" {
2345
+ import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2346
+ export type KeywordsByGroupId = {
2347
+ [key: string]: Keyword[];
2348
+ };
2349
+ export function useKeywordsApi(): {
2350
+ getAllKeywords: (force?: boolean) => Promise<Keyword[]>;
2351
+ getAllKeywordsByGroupIds: () => Promise<KeywordsByGroupId>;
2352
+ getSelectedGroups: () => Promise<KeywordGroup[]>;
2353
+ getKeywordGroupsByItemId: (id: string, route?: string) => Promise<KeywordGroup[]>;
2287
2354
  };
2288
2355
  }
2289
2356
  declare module "libs/reach/util/common/src/user/content-languages-util" {
@@ -2303,721 +2370,656 @@ declare module "libs/reach/util/common/src/user/LanguageUtils" {
2303
2370
  code: string;
2304
2371
  }[];
2305
2372
  }
2306
- declare module "libs/reach/util/common/src/user/index" {
2307
- export * from "libs/reach/util/common/src/user/features/FeatureSet";
2308
- export * from "libs/reach/util/common/src/user/features/WithFeatures";
2309
- export * from "libs/reach/util/common/src/user/Account";
2310
- export * from "libs/reach/util/common/src/user/Audience";
2311
- export * from "libs/reach/util/common/src/user/BasicUserInformation";
2312
- export * from "libs/reach/util/common/src/user/Channel";
2313
- export * from "libs/reach/util/common/src/user/Member";
2314
- export * from "libs/reach/util/common/src/user/Organization";
2315
- export * from "libs/reach/util/common/src/user/Subscription";
2316
- export * from "libs/reach/util/common/src/user/User";
2317
- export * from "libs/reach/util/common/src/user/Group";
2318
- export * from "libs/reach/util/common/src/user/UserChannelSubscription";
2319
- export * from "libs/reach/util/common/src/user/UserInfo";
2320
- export * from "libs/reach/util/common/src/user/UserUtils";
2321
- export * from "libs/reach/util/common/src/user/useAccountApi";
2322
- export * from "libs/reach/util/common/src/user/useCurrentUser";
2323
- export * from "libs/reach/util/common/src/user/useCurrentUserApi";
2324
- export * from "libs/reach/util/common/src/user/useManageCurrentUserApi";
2325
- export * from "libs/reach/util/common/src/user/useUserAdminApi";
2326
- export * from "libs/reach/util/common/src/user/CurrentUserDetailContextProvider";
2327
- export * from "libs/reach/util/common/src/user/useCurrentUserCache";
2328
- export * from "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder";
2329
- export * from "libs/reach/util/common/src/user/CurrentUserContext";
2330
- export * from "libs/reach/util/common/src/user/useSubscriptionWebAppUrl";
2331
- export * from "libs/reach/util/common/src/user/useChannelsApi";
2332
- export * from "libs/reach/util/common/src/user/LanguageUtils";
2333
- export * from "libs/reach/util/common/src/user/content-languages-util";
2334
- }
2335
- declare module "libs/reach/util/common/src/plugins/usePluginDeviceStore" {
2336
- import { Storage } from "libs/reach/util/context/src/index";
2337
- export function usePluginDeviceStore(): PluginStorage;
2338
- export function getStorageWrapper(pluginId: string, storage: Storage): PluginStorage;
2339
- export interface PluginStorage {
2340
- getAllKeys(): Promise<string[]>;
2341
- getString(key: string): Promise<string>;
2342
- setString(key: string, value: string): Promise<void>;
2343
- remove(key: string): Promise<void>;
2344
- clearAll(): Promise<void>;
2345
- }
2373
+ declare module "libs/reach/util/common/src/content/content-keyword-utils" {
2374
+ import { KeywordsByGroupId } from "libs/reach/util/common/src/keywords/useKeywordsApi";
2375
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
2376
+ import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2377
+ export function getFlatKeywordList(keywords: KeywordsByGroupId): Keyword[];
2378
+ export function ensureMandatoryKeywords(mandatoryKeywords: Keyword[], allKeywords: Keyword[]): Keyword[];
2379
+ export function getGroupedKeywords(keywords: Keyword[]): {
2380
+ [key: string]: Keyword[];
2381
+ };
2382
+ export function getKeywordDisplayValue(keywordGroups: KeywordGroup[] | null, user: CurrentUser, groupId?: string, keywordName?: string, groupName?: string, language?: string): string;
2383
+ export function getKeywordTitle(user: CurrentUser, translations: {
2384
+ [key: string]: string;
2385
+ }, name: string, language?: string): string;
2386
+ export function getPreSelectedKeywords(keywords: Keyword[], mandatoryKeywords: Keyword[]): Keyword[];
2387
+ export function checkIfHasSameKeywords(keywordsArray1: Keyword[], keywordsArray2: Keyword[]): boolean;
2346
2388
  }
2347
- declare module "libs/reach/util/common/src/plugins/PluginContext" {
2348
- import { PluginSettings } from "libs/reach/util/common/src/user/Subscription";
2349
- import { PluginStorage } from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
2350
- export interface PluginStore {
2351
- get<T>(key: string): Promise<T>;
2352
- set<T>(key: string, value: T): Promise<unknown>;
2353
- delete(key: string): Promise<unknown>;
2389
+ declare module "libs/reach/util/common/src/content/useClearUnreadItems" {
2390
+ import { ItemResourceTypes } from "libs/reach/util/common/src/index";
2391
+ export interface onMarkAsReadHandlers {
2392
+ onStarted?: () => unknown;
2393
+ onFinished?: () => unknown;
2354
2394
  }
2355
- export const PluginContext: import("react").Context<{
2356
- settings: PluginSettings;
2357
- storage: PluginStorage;
2358
- userStore: PluginStore;
2359
- subscriptionStore: PluginStore;
2360
- }>;
2361
- export function usePluginSettings<T>(): T;
2362
- export function useReachApiEndPoints(): {
2363
- apiEndpoint: string;
2364
- };
2395
+ export function useClearUnreadItems(itemType: ItemResourceTypes, handlers?: onMarkAsReadHandlers, unreadCount?: number): () => Promise<void>;
2365
2396
  }
2366
- declare module "libs/reach/util/common/src/plugins/SystemJSHelper" {
2367
- import 'systemjs';
2368
- export function registerPackages(key: string, ...definitions: {
2369
- name: string;
2370
- packageDefinition: unknown;
2371
- }[]): void;
2372
- export function loadRemoteComponent(url: string, componentName: string): Promise<any>;
2397
+ declare module "libs/reach/util/common/src/content/useClearUnreadOnlyFilter" {
2398
+ export function useClearUnreadOnlyFilter(): {
2399
+ clearUnreadOnlyFilter: () => void;
2400
+ };
2373
2401
  }
2374
- declare module "libs/reach/util/common/src/plugins/usePluginApi" {
2375
- import { WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
2376
- export function usePluginApi(): {
2377
- getPluginFileUrl: (pluginId: string, bundleUrl?: string, bundleModificationDate?: string) => string;
2378
- saveDefinition: (plugin: WebPluginDefinition) => Promise<unknown>;
2379
- saveFile: (pluginId: string, file: File) => Promise<Response>;
2380
- generateApiKey: (pluginId: string, displayName: string, expiryDate?: string) => Promise<any>;
2381
- linkPlugin: (pluginId: string, settings: Record<string, string>) => Promise<any>;
2382
- unlinkPlugin: (pluginId: string) => Promise<any>;
2402
+ declare module "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler" {
2403
+ export function useUnreadItemsTogglerHandler(): {
2404
+ toggleUnreadItems: () => void;
2383
2405
  };
2384
2406
  }
2385
- declare module "libs/reach/util/common/src/content/GraphQLAttachmentType" {
2386
- export enum GraphQLAttachmentType {
2387
- Image = "IMAGE",
2388
- File = "FILE",
2389
- YouTubeVideo = "YOU_TUBE_VIDEO",
2390
- VimeoVideo = "VIMEO_VIDEO",
2391
- News = "NEWS",
2392
- Event = "EVENT",
2393
- Page = "PAGE",
2394
- Post = "POST",
2395
- Giphy = "GIPHY"
2396
- }
2407
+ declare module "libs/reach/util/common/src/content/index" {
2408
+ export * from "libs/reach/util/common/src/content/Attachment";
2409
+ export * from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2410
+ export * from "libs/reach/util/common/src/content/Comment";
2411
+ export * from "libs/reach/util/common/src/content/ItemResourceType";
2412
+ export * from "libs/reach/util/common/src/content/ItemWithAttachments";
2413
+ export * from "libs/reach/util/common/src/content/Language";
2414
+ export * from "libs/reach/util/common/src/content/PublishableItem";
2415
+ export * from "libs/reach/util/common/src/content/NewsItem";
2416
+ export * from "libs/reach/util/common/src/content/EventItem";
2417
+ export * from "libs/reach/util/common/src/content/PageItem";
2418
+ export * from "libs/reach/util/common/src/content/NewsMetadata";
2419
+ export * from "libs/reach/util/common/src/content/KnownNewsState";
2420
+ export * from "libs/reach/util/common/src/content/FeedbackSettings";
2421
+ export * from "libs/reach/util/common/src/content/WorkflowStatus";
2422
+ export * from "libs/reach/util/common/src/content/ResponseItem";
2423
+ export * from "libs/reach/util/common/src/content/BaseItem";
2424
+ export * from "libs/reach/util/common/src/content/VideoSource";
2425
+ export * from "libs/reach/util/common/src/content/KeywordGroup";
2426
+ export * from "libs/reach/util/common/src/content/ItemStatistics";
2427
+ export * from "libs/reach/util/common/src/content/useFileApi";
2428
+ export * from "libs/reach/util/common/src/content/content-keyword-utils";
2429
+ export * from "libs/reach/util/common/src/content/useClearUnreadItems";
2430
+ export * from "libs/reach/util/common/src/content/useClearUnreadOnlyFilter";
2431
+ export * from "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler";
2397
2432
  }
2398
- declare module "libs/reach/util/common/src/Models" {
2399
- import { BaseAttachment } from "libs/reach/util/common/src/content/Attachment";
2400
- import { GraphQLAttachmentType } from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2433
+ declare module "libs/reach/util/common/src/AccessDeniedIntercept" {
2434
+ export function accessDeniedIntercept(error: any): Promise<boolean>;
2435
+ }
2436
+ declare module "libs/reach/util/common/src/user/useManageCurrentUserApi" {
2437
+ import { CurrentUser, GroupNotificationSettings, NotificationTypeSettings, UserContact } from "libs/reach/util/common/src/user/User";
2438
+ import { ConversationScope, ItemResourceTypes } from "libs/reach/util/common/src/content/index";
2439
+ import { UserChannelSubscription } from "libs/reach/util/common/src/user/UserChannelSubscription";
2440
+ export function useManageCurrentUserApi(): {
2441
+ updateNotificationTypeSettings: (settings: NotificationTypeSettings) => Promise<unknown>;
2442
+ getFollowCommentsStatus: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => Promise<boolean>;
2443
+ toggleFollowComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope, enabled: boolean) => Promise<unknown>;
2444
+ followPublicPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2445
+ followEditorPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2446
+ followAllPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2447
+ followPublishableItemComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => void;
2448
+ resolveSegment: (type: ItemResourceTypes, scope: ConversationScope) => string;
2449
+ getFollowCommentSegment: (type: ItemResourceTypes) => "page" | "news" | "event";
2450
+ toggleBookmark: (newsId: string, currentUser: CurrentUser) => Promise<boolean>;
2451
+ getUserProperties: () => Promise<{
2452
+ [key: string]: string;
2453
+ }>;
2454
+ setUserChannels: (channels: ReadonlyArray<UserChannelSubscription>) => Promise<any>;
2455
+ addContact: (contact: UserContact) => Promise<UserContact[]>;
2456
+ deleteContact: (contact: UserContact) => Promise<UserContact[]>;
2457
+ getContactAccounts: () => Promise<UserContact[]>;
2458
+ setLanguage: (uiLanguageCode: string) => Promise<any>;
2459
+ setContentLanguage: (contentLanguageCode: string) => Promise<void>;
2460
+ setLocale: (localeCode: string) => Promise<void>;
2461
+ getGroupNotificationSettings: (groupId: string) => Promise<GroupNotificationSettings>;
2462
+ updateGroupNotificationSettings: (groupId: string, groupNotificationSettings: GroupNotificationSettings) => Promise<unknown>;
2463
+ clearMyUnreadItems: (itemType: ItemResourceTypes) => Promise<void>;
2464
+ acceptTermsAndConditions: (approvedHash: string) => Promise<unknown>;
2465
+ };
2466
+ }
2467
+ declare module "libs/reach/util/common/src/user/useUserAdminApi" {
2468
+ import { HashUser, SubscriptionJoinResult, UpdatableUserProperties, UserActivationResult, UserInvitationResult, UserSummary } from "libs/reach/util/common/src/user/User";
2469
+ import { Observable } from 'rxjs';
2401
2470
  import { Account } from "libs/reach/util/common/src/user/Account";
2402
- export interface ColorStyleDefinition {
2403
- backgroundColor: string;
2404
- color: string;
2405
- }
2406
- export interface PageNavigationNodeProps {
2407
- title?: string;
2408
- iconName?: string;
2409
- to?: string;
2410
- onClick?: () => void;
2411
- isActive?: boolean;
2412
- exact?: boolean;
2413
- cannotBeActive?: boolean;
2414
- submenuContents?: JSX.Element;
2415
- submenuStyleDefinition?: ColorStyleDefinition;
2416
- badgeInfo?: number | boolean;
2417
- domIdentifier?: string;
2418
- secondaryIconName?: string;
2419
- secondaryIconTooltipResourceKey?: string;
2420
- onSecondaryIconClick?: () => void;
2421
- iconColor?: string;
2422
- className?: string;
2423
- }
2424
- export interface Chat {
2425
- id: string;
2426
- members: (Account & ChatMember)[];
2427
- memberIds: string[];
2428
- groupName?: string;
2429
- lastMessageInfo?: {
2430
- received: string;
2431
- senderId: string;
2432
- content?: string;
2433
- attachments: ChatAttachment[];
2434
- deleteDate?: string;
2435
- deleteState?: DeleteState;
2436
- messageType?: ChatMessageType;
2437
- messageValues?: {
2438
- groupName?: string;
2439
- userId?: string;
2440
- };
2441
- };
2442
- messages: ChatMessage[];
2443
- hasNewMessages: boolean;
2444
- fileAccessToken: string;
2445
- }
2446
- export enum DeleteState {
2447
- NotDeleted = "NOT_DELETED",
2448
- RecycleBin = "RECYCLE_BIN",
2449
- Deleted = "DELETED"
2450
- }
2451
- export enum ChatMessageType {
2452
- Default = "DEFAULT",
2453
- GroupNameChange = "GROUP_NAME_CHANGE",
2454
- UserLeftGroup = "USER_LEFT_GROUP"
2455
- }
2456
- export enum MemberStatus {
2457
- Normal = "NORMAL",
2458
- LeftGroupChat = "LEFT_GROUP_CHAT",
2459
- LeftOneToOneChat = "LEFT_ONE_TO_ONE_CHAT"
2460
- }
2461
- export interface ChatMember {
2462
- id?: string;
2463
- status?: MemberStatus;
2464
- joinDate?: string;
2465
- leftDate?: string;
2466
- }
2467
- export interface ChatMessage {
2468
- itemId: string;
2469
- content: string;
2470
- senderId?: string;
2471
- chatId?: string;
2472
- received?: string;
2473
- attachments?: ChatAttachment[];
2474
- attachmentContainerId?: string;
2475
- fileAccessToken?: string;
2476
- deleteDate?: string;
2477
- deleteState?: DeleteState;
2478
- modifiedDate?: string;
2479
- chat?: Chat;
2480
- messageType?: ChatMessageType;
2481
- messageValues?: {
2482
- groupName?: string;
2483
- };
2484
- }
2485
- export interface ChatIsTypingInfo {
2486
- sender: Account;
2487
- chatId: string;
2488
- sentOn: string;
2489
- }
2490
- export interface ChatView {
2491
- chatId: string;
2492
- timestamp: Date;
2493
- isActive: boolean;
2494
- }
2495
- export interface ChatAttachment extends BaseAttachment {
2496
- type: GraphQLAttachmentType;
2471
+ import { SortDirection } from "libs/reach/util/common/src/SortDirection";
2472
+ import { PaginatedList } from "libs/reach/util/common/src/PaginatedList";
2473
+ export interface SortDefinition {
2474
+ sortColumn: string;
2475
+ sortDirection: SortDirection;
2497
2476
  }
2498
- }
2499
- declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
2500
- import { PluginExtension, WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
2501
- import { PageNavigationNodeProps } from "libs/reach/util/common/src/Models";
2502
- export enum ExtensionArea {
2503
- global = "Global",
2504
- page = "Page",
2505
- eventEditorFeedbackSection = "EventEditorFeedbackSection",
2506
- eventDetailViewSection = "EventDetailViewSection"
2477
+ export interface UserFilterDefinition extends SortDefinition {
2478
+ searchText: string;
2479
+ includePendingInvitationUsers?: boolean;
2480
+ includePendingRegistrationUsers?: boolean;
2481
+ excludeRegularUsers?: boolean;
2507
2482
  }
2508
- export interface PluginNavigationNodeProps {
2509
- navigationNodeProps?: PageNavigationNodeProps;
2483
+ export interface UserAdminApi {
2484
+ getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2485
+ getUserByHash: (hash: string) => Promise<HashUser>;
2486
+ getUsersCsv: () => Promise<any>;
2487
+ sendActivationEmail: () => Promise<unknown>;
2488
+ activateUser: (hash: string) => Promise<UserActivationResult>;
2489
+ deleteUser: (userId: string) => Observable<unknown>;
2490
+ completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2491
+ inviteUser: (email: string) => Promise<UserInvitationResult>;
2492
+ inviteUsers: (users: Account[]) => Promise<string[]>;
2510
2493
  }
2511
- export type PluginProps = Omit<WebPluginDefinition, 'extensions'> & PluginExtension;
2512
- type DevPlugin = {
2513
- pluginId: string;
2514
- port: number;
2515
- isPublish?: boolean;
2516
- linkPlugin?: boolean;
2494
+ export function useUserAdminApi(): {
2495
+ getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2496
+ completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2497
+ inviteUser: (email: string) => Promise<UserInvitationResult>;
2498
+ getUserByHash: (hash: string) => Promise<HashUser>;
2499
+ sendActivationEmail: () => Promise<unknown>;
2500
+ activateUser: (hash: string) => Promise<UserActivationResult>;
2501
+ deleteUser: (userId: string) => Observable<unknown>;
2502
+ inviteUsers: (users: Account[]) => Promise<string[]>;
2503
+ getUsersCsv: () => Promise<any>;
2504
+ updateUserProfilePropertiesByUPN: (upn: string, newProperties: UpdatableUserProperties) => Promise<unknown>;
2505
+ updateUserAvatarByUPN: (upn: string, subscriptionId: string, file?: File) => Promise<unknown>;
2506
+ deleteUserAvatarByUPN: (upn: string) => Promise<unknown>;
2517
2507
  };
2518
- export function usePlugins(): WebPluginDefinition[];
2519
- export function usePluginExtensions(area?: ExtensionArea): PluginProps[];
2520
- export function removeInjectedRemotePlugin(pluginId: string): void;
2521
- export function useInjectedRemotePlugins(): DevPlugin[];
2522
- export function useRemotePlugins(): WebPluginDefinition[];
2523
- }
2524
- declare module "libs/reach/util/common/src/plugins/utils" {
2525
- export function silenceNotFound(reason: any): any;
2526
2508
  }
2527
- declare module "libs/reach/util/common/src/plugins/usePluginUserStore" {
2528
- import { DependencyList } from 'react';
2529
- import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2530
- import { Api } from 'restful.js';
2531
- export function usePluginUserStore(): PluginStore;
2532
- export function usePluginUserStoreValue<T>(key: string, deps?: DependencyList): {
2533
- data: any;
2534
- set: (newValue: T) => Promise<unknown>;
2535
- isLoading: boolean;
2536
- error: any;
2537
- refresh: () => void;
2538
- remove: () => Promise<unknown>;
2509
+ declare module "libs/reach/util/common/src/user/useCurrentUserCache" {
2510
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
2511
+ import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
2512
+ export function useCurrentUserCache(): {
2513
+ clear: () => Promise<void>;
2514
+ setEssentials: (user: CurrentUser) => Promise<CurrentUser>;
2515
+ setUser: (user: CurrentUser) => Promise<CurrentUser>;
2516
+ get: () => Promise<{
2517
+ subscription: {
2518
+ logoInfo: {
2519
+ smallUrl: any;
2520
+ largeUrl: string;
2521
+ isLegacyLogo: boolean;
2522
+ };
2523
+ languages: import("@livetiles/reach/util/common").LanguageBase[];
2524
+ featureMask: string;
2525
+ company: string;
2526
+ directories: import("libs/reach/util/common/src/user/Subscription").DirectoryConfiguration[];
2527
+ webPluginDefinitions: import("libs/reach/util/common/src/user/Subscription").WebPluginDefinition[];
2528
+ userPropertyDefinitions: import("libs/reach/util/common/src/user/Subscription").UserPropertyDefinition[];
2529
+ customDomain?: string;
2530
+ allowSelfRegistration?: boolean;
2531
+ brandFolderConfig?: import("libs/reach/util/common/src/user/Subscription").BrandFolderConfig;
2532
+ id: string;
2533
+ subscriptionName: string;
2534
+ subscriptionHandle?: string;
2535
+ contact: import("@livetiles/reach/util/common").Account;
2536
+ theme: import("libs/reach/util/common/src/user/Subscription").Theme;
2537
+ defaultLanguage: string;
2538
+ faviconUrl?: string;
2539
+ navigation: import("libs/reach/util/common/src/user/Subscription").NavigationNode[];
2540
+ regionSettings?: import("libs/reach/util/common/src/user/Subscription").RegionSettings;
2541
+ signInSettings?: import("libs/reach/util/common/src/user/Subscription").SignInSettings;
2542
+ useInAppBrowser?: boolean;
2543
+ hasUnreadItems: boolean;
2544
+ pageTrackingInfo: import("libs/reach/util/common/src/user/Subscription").PageTrackingInfo;
2545
+ termsAndConditionsHash?: string;
2546
+ };
2547
+ isEmailVerificationPending?: boolean;
2548
+ isSubscriptionOwner: boolean;
2549
+ givenName: string;
2550
+ surname: string;
2551
+ preferredUiLanguage: string;
2552
+ preferredContentLanguage?: string;
2553
+ preferredLocale?: string;
2554
+ bookmarks: string[];
2555
+ groups: import("libs/reach/util/common/src/user/User").UserGroup[];
2556
+ availableSubscriptions: SubscriptionSummary[];
2557
+ channels: import("@livetiles/reach/util/common").UserChannelSubscription[];
2558
+ userHash: string;
2559
+ unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2560
+ unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2561
+ unreadPosts: {
2562
+ groupId: string;
2563
+ itemId: string;
2564
+ }[];
2565
+ unreadFeedItemsCount?: number;
2566
+ mostRecentPostGroups: string[];
2567
+ notificationTypeSettings: import("libs/reach/util/common/src/user/User").NotificationTypeSettings;
2568
+ hasPendingRegistration?: boolean;
2569
+ minRoles: import("libs/reach/util/common/src/user/User").UserMinRoles;
2570
+ hasDirectory: boolean;
2571
+ contacts: import("libs/reach/util/common/src/user/User").UserContact[];
2572
+ termsAndConditionsApprovedHash: string;
2573
+ isPublicUser?: boolean;
2574
+ hasUnreadChats?: boolean;
2575
+ id?: string;
2576
+ type?: import("@livetiles/reach/util/common").AccountType;
2577
+ tenantId?: string;
2578
+ displayName?: string;
2579
+ userPrincipalName?: string;
2580
+ mail?: string;
2581
+ tokenUniqueId?: string;
2582
+ authenticationType?: import("@livetiles/shared/util/authentication").AuthenticationType;
2583
+ created?: string;
2584
+ }>;
2539
2585
  };
2540
- export function getPluginUserStoreWrapper(pluginId: string, api: Api): PluginStore;
2541
- }
2542
- declare module "libs/reach/util/common/src/plugins/usePluginSubscriptionStore" {
2543
- import { DependencyList } from 'react';
2544
- import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2545
- import { Api } from 'restful.js';
2546
- export function usePluginSubscriptionStore(): PluginStore;
2547
- export function usePluginSubscriptionStoreValue<T>(key: string, deps?: DependencyList): {
2548
- data: any;
2549
- set: (newValue: T) => Promise<unknown>;
2550
- isLoading: boolean;
2551
- error: any;
2552
- refresh: () => void;
2553
- remove: () => Promise<unknown>;
2586
+ export function getUserDetailFields(user: Partial<CurrentUser>): {
2587
+ availableSubscriptions: SubscriptionSummary[];
2588
+ bookmarks: string[];
2589
+ unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2590
+ unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
2591
+ unreadPosts: {
2592
+ groupId: string;
2593
+ itemId: string;
2594
+ }[];
2595
+ hasUnreadChats: boolean;
2596
+ unreadFeedItemsCount: number;
2597
+ mostRecentPostGroups: string[];
2554
2598
  };
2555
- export function getPluginSubscriptionStoreWrapper(pluginId: string, api: Api): PluginStore;
2556
2599
  }
2557
- declare module "libs/reach/util/common/src/plugins/PluginWrapper" {
2558
- import { FC } from 'react';
2559
- import { PluginProps } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2560
- export const PluginWrapper: FC<PluginProps & any>;
2561
- }
2562
- declare module "libs/reach/util/common/src/plugins/Plugins" {
2600
+ declare module "libs/reach/util/common/src/user/CurrentUserDetailContextProvider" {
2563
2601
  import { FC } from 'react';
2564
- import { ExtensionArea } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2565
- export const Plugins: FC<{
2566
- area: ExtensionArea;
2567
- } & any>;
2602
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
2603
+ export function useRefreshUserDetails(): () => Promise<CurrentUser>;
2604
+ export const CurrentUserDetailContextProvider: FC;
2568
2605
  }
2569
- declare module "libs/reach/util/common/src/plugins/index" {
2570
- export * from "libs/reach/util/common/src/plugins/PluginContext";
2571
- export * from "libs/reach/util/common/src/plugins/PluginWrapper";
2572
- export * from "libs/reach/util/common/src/plugins/Plugins";
2573
- export * from "libs/reach/util/common/src/plugins/SystemJSHelper";
2574
- export * from "libs/reach/util/common/src/plugins/usePluginApi";
2575
- export * from "libs/reach/util/common/src/plugins/usePluginExtensions";
2576
- export * from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
2577
- export * from "libs/reach/util/common/src/plugins/usePluginSubscriptionStore";
2578
- export * from "libs/reach/util/common/src/plugins/usePluginUserStore";
2606
+ declare module "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder" {
2607
+ export function useSubscriptionHandlePathBuilder(): {
2608
+ buildPath: (initialPath?: string) => string;
2609
+ subscriptionHandle: string;
2610
+ };
2579
2611
  }
2580
- declare module "libs/reach/util/common/src/theme/ColorGenerator" {
2581
- export class Color {
2582
- private r;
2583
- private g;
2584
- private b;
2585
- constructor(color: string);
2586
- lighten(percentage: number): Color;
2587
- toHex(): string;
2588
- setRgb: (color: string) => void;
2589
- setRgbFromHex: (color: string) => void;
2590
- setRgbFromRgba: (color: string) => void;
2591
- trim: (value: string) => string;
2592
- }
2612
+ declare module "libs/reach/util/common/src/user/useSubscriptionWebAppUrl" {
2613
+ export function useSubscriptionWebAppUrl(): string;
2614
+ export function useSubscriptionWebAppUrls(): string[];
2593
2615
  }
2594
- declare module "libs/reach/util/common/src/theme/ThemeService" {
2595
- import { IPartialTheme } from 'office-ui-fabric-react';
2596
- import { Theme } from "libs/reach/util/common/src/user/Subscription";
2597
- import * as wcag from 'wcag-contrast';
2598
- export const defaultThemeColors: Theme;
2599
- export const defaultPageBackgroundColor: string;
2600
- export const defaultLightColor = "#ffffff";
2601
- export const defaultDarkColor = "#333333";
2602
- /**
2603
- * Fetch the default themes
2604
- */
2605
- export function getDefaultThemes(): Theme[];
2606
- /**
2607
- * Apply a theme
2608
- * Note: this method is not responsible for persisting the selected theme.
2609
- * Use SubscriptionService.updateTheme() to persist a custom theme against the User's Subscription
2610
- */
2611
- export function applyTheme(theme: Theme, disableUiFabricThemeOverwrite: boolean): {
2612
- palette: {
2613
- themeDarker: string;
2614
- themeDark: string;
2615
- themeDarkAlt: string;
2616
- themePrimary: string;
2617
- themeSecondary: string;
2618
- themeTertiary: string;
2619
- themeLight: string;
2620
- themeLighter: string;
2621
- themeLighterAlt: string;
2622
- neutralDark: string;
2623
- neutralPrimary: string;
2624
- neutralPrimaryAlt: string;
2625
- neutralSecondary: string;
2626
- neutralSecondaryAlt: string;
2627
- neutralTertiary: string;
2628
- neutralTertiaryAlt: string;
2629
- neutralQuaternary: string;
2630
- neutralQuaternaryAlt: string;
2631
- neutralLight: string;
2632
- neutralLighter: string;
2633
- neutralLighterAlt: string;
2634
- accent: string;
2635
- textColorOnWhiteBackground: string;
2636
- black: string;
2637
- blackTranslucent40: string;
2638
- blue: string;
2639
- blueDark: string;
2640
- blueLight: string;
2641
- blueMid: string;
2642
- error: string;
2643
- green: string;
2644
- greenDark: string;
2645
- greenLight: string;
2646
- info: string;
2647
- magenta: string;
2648
- magentaDark: string;
2649
- magentaLight: string;
2650
- orange: string;
2651
- orangeLight: string;
2652
- orangeLighter: string;
2653
- purple: string;
2654
- purpleDark: string;
2655
- purpleLight: string;
2656
- red: string;
2657
- redDark: string;
2658
- severeWarning: string;
2659
- success: string;
2660
- teal: string;
2661
- tealDark: string;
2662
- tealLight: string;
2663
- white: string;
2664
- whiteTranslucent40: string;
2665
- yellow: string;
2666
- yellowLight: string;
2667
- };
2668
- semanticColors: {
2669
- infoText: string;
2670
- successText: string;
2671
- alertBackground: string;
2672
- severeWarningBackground: string;
2673
- successBackground: string;
2674
- warningBackground: string;
2675
- errorBackground: string;
2676
- infoBackground: string;
2677
- };
2678
- textColors: {
2679
- onPrimary: string;
2680
- onSecondary: string;
2681
- };
2682
- };
2683
- export type IReachTheme = IPartialTheme & {
2684
- textColors?: Partial<ITextColors>;
2685
- };
2686
- interface ITextColors {
2687
- onPrimary?: string;
2688
- onSecondary?: string;
2689
- onAccent?: string;
2690
- default?: string;
2691
- }
2692
- export function getDarkAltColor(color: string): string;
2693
- export function getTextColor(bgColor: string): "#333333" | "#ffffff";
2694
- export function shouldUseDarkForegroundColor(bgColor: string): boolean;
2695
- export function getContrastInfo(backgroundColor: string, foregroundColor: string): {
2696
- contrast: string;
2697
- score: wcag.Score;
2698
- isGood: boolean;
2616
+ declare module "libs/reach/util/common/src/user/useChannelsApi" {
2617
+ import { Channel } from "libs/reach/util/common/src/user/Channel";
2618
+ export function useChannelsApi(): {
2619
+ getChannels: () => Promise<Channel[]>;
2620
+ getChannelsByItemId: (id: string, route?: string) => Promise<Channel[]>;
2699
2621
  };
2700
2622
  }
2701
- declare module "libs/reach/util/common/src/theme/ThemeContext" {
2702
- import { FC, ReactNode } from 'react';
2703
- import { Theme } from "libs/reach/util/common/src/user/Subscription";
2704
- import { IReachTheme } from "libs/reach/util/common/src/theme/ThemeService";
2705
- export const ThemeContext: import("react").Context<{
2706
- setTheme: (theme: Theme) => unknown;
2707
- theme: IReachTheme;
2708
- }>;
2709
- export const ThemeContextProvider: FC<{
2710
- disableUiFabricThemeOverwrite?: boolean;
2711
- children: ReactNode;
2712
- }>;
2713
- export function useTheme(): IReachTheme;
2714
- }
2715
- declare module "libs/reach/util/common/src/theme/index" {
2716
- export * from "libs/reach/util/common/src/theme/ThemeContext";
2717
- export * from "libs/reach/util/common/src/theme/ThemeService";
2718
- export * from "libs/reach/util/common/src/theme/ColorGenerator";
2623
+ declare module "libs/reach/util/common/src/user/index" {
2624
+ export * from "libs/reach/util/common/src/user/features/FeatureSet";
2625
+ export * from "libs/reach/util/common/src/user/features/WithFeatures";
2626
+ export * from "libs/reach/util/common/src/user/Account";
2627
+ export * from "libs/reach/util/common/src/user/Audience";
2628
+ export * from "libs/reach/util/common/src/user/BasicUserInformation";
2629
+ export * from "libs/reach/util/common/src/user/Channel";
2630
+ export * from "libs/reach/util/common/src/user/Member";
2631
+ export * from "libs/reach/util/common/src/user/Organization";
2632
+ export * from "libs/reach/util/common/src/user/Subscription";
2633
+ export * from "libs/reach/util/common/src/user/User";
2634
+ export * from "libs/reach/util/common/src/user/Group";
2635
+ export * from "libs/reach/util/common/src/user/UserChannelSubscription";
2636
+ export * from "libs/reach/util/common/src/user/UserInfo";
2637
+ export * from "libs/reach/util/common/src/user/UserUtils";
2638
+ export * from "libs/reach/util/common/src/user/useAccountApi";
2639
+ export * from "libs/reach/util/common/src/user/useCurrentUser";
2640
+ export * from "libs/reach/util/common/src/user/useCurrentUserApi";
2641
+ export * from "libs/reach/util/common/src/user/useManageCurrentUserApi";
2642
+ export * from "libs/reach/util/common/src/user/useUserAdminApi";
2643
+ export * from "libs/reach/util/common/src/user/CurrentUserDetailContextProvider";
2644
+ export * from "libs/reach/util/common/src/user/useCurrentUserCache";
2645
+ export * from "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder";
2646
+ export * from "libs/reach/util/common/src/user/CurrentUserContext";
2647
+ export * from "libs/reach/util/common/src/user/useSubscriptionWebAppUrl";
2648
+ export * from "libs/reach/util/common/src/user/useChannelsApi";
2649
+ export * from "libs/reach/util/common/src/user/LanguageUtils";
2650
+ export * from "libs/reach/util/common/src/user/content-languages-util";
2719
2651
  }
2720
- declare module "libs/reach/util/common/src/content/EventItem" {
2721
- import { Account } from "libs/reach/util/common/src/user/Account";
2722
- import { PollResult } from "libs/reach/util/common/src/content/BaseItem";
2723
- import { SchedulableItem } from "libs/reach/util/common/src/content/NewsItem";
2724
- export enum EventResponse {
2725
- NotSet = 0,
2726
- Registered = 1,
2727
- Declined = 2
2728
- }
2729
- export interface EventItem extends SchedulableItem {
2730
- startDate?: string;
2731
- endDate?: string;
2732
- timeZone?: string;
2733
- contacts?: Account[];
2734
- registrationSettings?: EventRegistrationSettings;
2735
- userResponse?: EventResponse;
2736
- cancelInformation?: EventCancelInformation;
2737
- locations?: EventLocation[];
2738
- hasNewComments?: boolean;
2739
- isLiked?: boolean;
2740
- recurrenceSettings?: EventRecurrenceSettings;
2741
- recurrenceSeriesId?: string;
2742
- isSeriesMaster?: string;
2743
- isVirtual?: boolean;
2744
- }
2745
- export interface EventRegistrationSettings {
2746
- enabled?: boolean;
2747
- showParticipantsToEverybody?: boolean;
2748
- deadline?: string;
2749
- seriesMode?: SeriesRegistrationMode;
2750
- }
2751
- export enum SeriesRegistrationMode {
2752
- None = 0,
2753
- FullSeries = 1,
2754
- PerInstance = 2
2755
- }
2756
- export interface EventCancelInformation {
2757
- isCancelled?: boolean;
2758
- modifiedOn?: string;
2759
- modifiedBy?: Account;
2760
- reasons?: EventCancelReasons;
2761
- }
2762
- export interface EventCancelReasons {
2763
- [language: string]: string;
2764
- }
2765
- export interface EventLocation {
2766
- locationId: string;
2767
- name: string;
2768
- locationOnMap?: string;
2769
- url?: string;
2770
- maxNumberOfSeats?: number;
2771
- readOnly?: boolean;
2772
- }
2773
- export interface EventRegistrationResult extends PollResult {
2774
- locationAnswers: LocationResult[];
2775
- }
2776
- export interface LocationResult {
2777
- locationId: string;
2778
- count: number;
2779
- }
2780
- export interface EventParticipant {
2781
- displayName: string;
2782
- upn: string;
2783
- locationId: string;
2784
- }
2785
- export interface EventRecurrenceSettings {
2786
- frequency: RecurrenceFrequency;
2787
- interval: number;
2788
- weekDays: WeekDay;
2789
- monthlyOccurrence: MonthlyOccurrence;
2790
- yearlyOccurrence: MonthNumber;
2791
- dayOfMonth: number;
2792
- endDate?: string;
2793
- }
2794
- export enum RecurrenceFrequency {
2795
- NotSet = 0,
2796
- Daily = 1,
2797
- Weekly = 2,
2798
- Monthly = 3,
2799
- Yearly = 4
2800
- }
2801
- export enum WeekDay {
2802
- None = 0,
2803
- Monday = 1,
2804
- Tuesday = 2,
2805
- Wednesday = 4,
2806
- Thursday = 8,
2807
- Friday = 16,
2808
- Saturday = 32,
2809
- Sunday = 64
2810
- }
2811
- export enum MonthlyOccurrence {
2812
- Unknown = 0,
2813
- First = 1,
2814
- Second = 2,
2815
- Third = 3,
2816
- Fourth = 4,
2817
- Last = 5
2818
- }
2819
- export enum MonthNumber {
2820
- None = 0,
2821
- January = 1,
2822
- February = 2,
2823
- March = 3,
2824
- April = 4,
2825
- May = 5,
2826
- June = 6,
2827
- July = 7,
2828
- August = 8,
2829
- September = 9,
2830
- October = 10,
2831
- November = 11,
2832
- December = 12
2652
+ declare module "libs/reach/util/common/src/plugins/usePluginDeviceStore" {
2653
+ import { Storage } from "libs/reach/util/context/src/index";
2654
+ export function usePluginDeviceStore(): PluginStorage;
2655
+ export function getStorageWrapper(pluginId: string, storage: Storage): PluginStorage;
2656
+ export interface PluginStorage {
2657
+ getAllKeys(): Promise<string[]>;
2658
+ getString(key: string): Promise<string>;
2659
+ setString(key: string, value: string): Promise<void>;
2660
+ remove(key: string): Promise<void>;
2661
+ clearAll(): Promise<void>;
2833
2662
  }
2834
- export interface EventRecurrenceInfo {
2835
- id: string;
2836
- startDate: string;
2837
- endDate?: string;
2663
+ }
2664
+ declare module "libs/reach/util/common/src/plugins/PluginContext" {
2665
+ import { PluginSettings } from "libs/reach/util/common/src/user/Subscription";
2666
+ import { PluginStorage } from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
2667
+ export interface PluginStore {
2668
+ get<T>(key: string): Promise<T>;
2669
+ set<T>(key: string, value: T): Promise<unknown>;
2670
+ delete(key: string): Promise<unknown>;
2838
2671
  }
2672
+ export const PluginContext: import("react").Context<{
2673
+ settings: PluginSettings;
2674
+ storage: PluginStorage;
2675
+ userStore: PluginStore;
2676
+ subscriptionStore: PluginStore;
2677
+ }>;
2678
+ export function usePluginSettings<T>(): T;
2679
+ export function useReachApiEndPoints(): {
2680
+ apiEndpoint: string;
2681
+ };
2839
2682
  }
2840
- declare module "libs/reach/util/common/src/content/PageItem" {
2841
- import { DocumentFileInfo, PublishableItem, TitleContent } from "libs/reach/util/common/src/content/PublishableItem";
2842
- import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
2843
- import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
2844
- export interface PageItem extends PublishableItem {
2845
- feedbackSettings?: FeedbackSettings;
2846
- parentId?: string;
2847
- pathIds?: string[];
2848
- position?: number;
2849
- navigationContext?: PageNavigationContext;
2850
- hasHiddenAncestor?: boolean;
2851
- isUnlinked?: boolean;
2852
- pageType?: PageType;
2853
- firstChildId?: string;
2683
+ declare module "libs/reach/util/common/src/plugins/SystemJSHelper" {
2684
+ import 'systemjs';
2685
+ export function registerPackages(key: string, ...definitions: {
2686
+ name: string;
2687
+ packageDefinition: unknown;
2688
+ }[]): void;
2689
+ export function loadRemoteComponent(url: string, componentName: string): Promise<any>;
2690
+ }
2691
+ declare module "libs/reach/util/common/src/plugins/usePluginApi" {
2692
+ import { WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
2693
+ export function usePluginApi(): {
2694
+ getPluginFileUrl: (pluginId: string, bundleUrl?: string, bundleModificationDate?: string) => string;
2695
+ saveDefinition: (plugin: WebPluginDefinition) => Promise<unknown>;
2696
+ saveFile: (pluginId: string, file: File) => Promise<Response>;
2697
+ generateApiKey: (pluginId: string, displayName: string, expiryDate?: string) => Promise<any>;
2698
+ linkPlugin: (pluginId: string, settings: Record<string, string>) => Promise<any>;
2699
+ unlinkPlugin: (pluginId: string) => Promise<any>;
2700
+ };
2701
+ }
2702
+ declare module "libs/reach/util/common/src/Models" {
2703
+ import { BaseAttachment } from "libs/reach/util/common/src/content/Attachment";
2704
+ import { GraphQLAttachmentType } from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2705
+ import { Account } from "libs/reach/util/common/src/user/Account";
2706
+ export interface ColorStyleDefinition {
2707
+ backgroundColor: string;
2708
+ color: string;
2854
2709
  }
2855
- export interface ContentsSummary {
2856
- [lang: string]: TitleContent & {
2857
- fileInfo?: DocumentFileInfo;
2858
- };
2710
+ export interface PageNavigationNodeProps {
2711
+ title?: string;
2712
+ iconName?: string;
2713
+ to?: string;
2714
+ onClick?: () => void;
2715
+ isActive?: boolean;
2716
+ exact?: boolean;
2717
+ cannotBeActive?: boolean;
2718
+ submenuContents?: JSX.Element;
2719
+ submenuStyleDefinition?: ColorStyleDefinition;
2720
+ badgeInfo?: number | boolean;
2721
+ domIdentifier?: string;
2722
+ secondaryIconName?: string;
2723
+ secondaryIconTooltipResourceKey?: string;
2724
+ onSecondaryIconClick?: () => void;
2725
+ iconColor?: string;
2726
+ className?: string;
2859
2727
  }
2860
- export interface PageNavigationNode {
2728
+ export interface Chat {
2861
2729
  id: string;
2862
- contents?: ContentsSummary;
2863
- parent?: PageNavigationNode;
2864
- firstChildId?: string;
2865
- children?: PageNavigationNode[];
2866
- position?: number;
2867
- status?: WorkflowStatus;
2868
- hasPublishedVersion?: boolean;
2869
- groupIds?: string[];
2870
- hasHiddenAncestor?: boolean;
2871
- isUnlinked?: boolean;
2872
- hasAnyPageChild?: boolean;
2873
- pageType?: PageType;
2874
- useExternalContent?: boolean;
2875
- isSearchMatch?: boolean;
2876
- topLevelFolderName?: string;
2877
- uploadToken?: string;
2730
+ members: (Account & ChatMember)[];
2731
+ memberIds: string[];
2732
+ groupName?: string;
2733
+ lastMessageInfo?: {
2734
+ received: string;
2735
+ senderId: string;
2736
+ content?: string;
2737
+ attachments: ChatAttachment[];
2738
+ deleteDate?: string;
2739
+ deleteState?: DeleteState;
2740
+ messageType?: ChatMessageType;
2741
+ messageValues?: {
2742
+ groupName?: string;
2743
+ userId?: string;
2744
+ };
2745
+ };
2746
+ messages: ChatMessage[];
2747
+ hasNewMessages: boolean;
2748
+ fileAccessToken: string;
2878
2749
  }
2879
- export interface PageNavigationContext {
2880
- parent?: PageNavigationNode;
2881
- siblings?: PageNavigationNode[];
2882
- children?: PageNavigationNode[];
2750
+ export enum DeleteState {
2751
+ NotDeleted = "NOT_DELETED",
2752
+ RecycleBin = "RECYCLE_BIN",
2753
+ Deleted = "DELETED"
2883
2754
  }
2884
- export enum PageType {
2885
- Page = 0,
2886
- Document = 1
2755
+ export enum ChatMessageType {
2756
+ Default = "DEFAULT",
2757
+ GroupNameChange = "GROUP_NAME_CHANGE",
2758
+ UserLeftGroup = "USER_LEFT_GROUP"
2887
2759
  }
2888
- export interface FolderDefinition {
2889
- files: {
2890
- path: string;
2891
- fileId: string;
2892
- }[];
2893
- startPosition: number;
2894
- parentPageId: string;
2895
- groupIds: string[];
2896
- isUnlinked: boolean;
2760
+ export enum MemberStatus {
2761
+ Normal = "NORMAL",
2762
+ LeftGroupChat = "LEFT_GROUP_CHAT",
2763
+ LeftOneToOneChat = "LEFT_ONE_TO_ONE_CHAT"
2897
2764
  }
2898
- export interface DocumentStructure {
2899
- topLevelElements: Array<{
2900
- pageId: string;
2901
- title: string;
2902
- firstChildId?: string;
2903
- }>;
2904
- files: {
2905
- [filePath: string]: string;
2765
+ export interface ChatMember {
2766
+ id?: string;
2767
+ status?: MemberStatus;
2768
+ joinDate?: string;
2769
+ leftDate?: string;
2770
+ }
2771
+ export interface ChatMessage {
2772
+ itemId: string;
2773
+ content: string;
2774
+ senderId?: string;
2775
+ chatId?: string;
2776
+ received?: string;
2777
+ attachments?: ChatAttachment[];
2778
+ attachmentContainerId?: string;
2779
+ fileAccessToken?: string;
2780
+ deleteDate?: string;
2781
+ deleteState?: DeleteState;
2782
+ modifiedDate?: string;
2783
+ chat?: Chat;
2784
+ messageType?: ChatMessageType;
2785
+ messageValues?: {
2786
+ groupName?: string;
2906
2787
  };
2907
2788
  }
2908
- }
2909
- declare module "libs/reach/util/common/src/content/ResponseItem" {
2910
- import { Account } from "libs/reach/util/common/src/user/Account";
2911
- export interface ResponseItem {
2912
- id?: string;
2913
- title?: string;
2914
- errorMessage?: string;
2915
- statusCode?: number;
2916
- account?: Account;
2789
+ export interface ChatIsTypingInfo {
2790
+ sender: Account;
2791
+ chatId: string;
2792
+ sentOn: string;
2917
2793
  }
2918
- }
2919
- declare module "libs/reach/util/common/src/content/useFileApi" {
2920
- import { ItemResourceTypes } from "libs/reach/util/common/src/content/ItemResourceType";
2921
- export interface UploadStateDescription {
2922
- id?: string;
2923
- state?: UploadState;
2924
- error?: any | FileTooBigError;
2794
+ export interface ChatView {
2795
+ chatId: string;
2796
+ timestamp: Date;
2797
+ isActive: boolean;
2925
2798
  }
2926
- export enum UploadState {
2927
- unknown = 0,
2928
- pending = 1,
2929
- complete = 2,
2930
- error = 3
2799
+ export interface ChatAttachment extends BaseAttachment {
2800
+ type: GraphQLAttachmentType;
2931
2801
  }
2932
- export class FileTooBigError extends Error {
2933
- actualSizeInMb: number;
2934
- maxSizeInMb: number;
2935
- constructor(actualSizeInMb: number, maxSizeInMb: number);
2802
+ }
2803
+ declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
2804
+ import { PluginExtension, WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
2805
+ import { PageNavigationNodeProps } from "libs/reach/util/common/src/Models";
2806
+ export enum ExtensionArea {
2807
+ global = "Global",
2808
+ page = "Page",
2809
+ eventEditorFeedbackSection = "EventEditorFeedbackSection",
2810
+ eventDetailViewSection = "EventDetailViewSection"
2936
2811
  }
2937
- export function getFileFormData(file: File): FormData;
2938
- export interface FileInfo {
2939
- identifier: string;
2940
- fileName: string;
2941
- title?: string;
2942
- pageId?: string;
2943
- extension?: string;
2812
+ export interface PluginNavigationNodeProps {
2813
+ navigationNodeProps?: PageNavigationNodeProps;
2944
2814
  }
2945
- export function useFileApi(): {
2946
- getFileUrlWithToken: (fileDownloadToken: string, itemId: string, subscriptionId: string, fileId: string, originalFileName: string, resourceType: ItemResourceTypes) => string;
2947
- uploadFile: (itemId: string, subscriptionId: string, resourceType: ItemResourceTypes, file: File, id: string) => Promise<FileInfo>;
2815
+ export type PluginProps = Omit<WebPluginDefinition, 'extensions'> & PluginExtension;
2816
+ type DevPlugin = {
2817
+ pluginId: string;
2818
+ port: number;
2819
+ isPublish?: boolean;
2820
+ linkPlugin?: boolean;
2821
+ };
2822
+ export function usePlugins(): WebPluginDefinition[];
2823
+ export function usePluginExtensions(area?: ExtensionArea): PluginProps[];
2824
+ export function removeInjectedRemotePlugin(pluginId: string): void;
2825
+ export function useInjectedRemotePlugins(): DevPlugin[];
2826
+ export function useRemotePlugins(): WebPluginDefinition[];
2827
+ }
2828
+ declare module "libs/reach/util/common/src/plugins/utils" {
2829
+ export function silenceNotFound(reason: any): any;
2830
+ }
2831
+ declare module "libs/reach/util/common/src/plugins/usePluginUserStore" {
2832
+ import { DependencyList } from 'react';
2833
+ import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2834
+ import { Api } from 'restful.js';
2835
+ export function usePluginUserStore(): PluginStore;
2836
+ export function usePluginUserStoreValue<T>(key: string, deps?: DependencyList): {
2837
+ data: any;
2838
+ set: (newValue: T) => Promise<unknown>;
2839
+ isLoading: boolean;
2840
+ error: any;
2841
+ refresh: () => void;
2842
+ remove: () => Promise<unknown>;
2948
2843
  };
2844
+ export function getPluginUserStoreWrapper(pluginId: string, api: Api): PluginStore;
2949
2845
  }
2950
- declare module "libs/reach/util/common/src/keywords/useKeywordsApi" {
2951
- import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2952
- export type KeywordsByGroupId = {
2953
- [key: string]: Keyword[];
2954
- };
2955
- export function useKeywordsApi(): {
2956
- getAllKeywords: (force?: boolean) => Promise<Keyword[]>;
2957
- getAllKeywordsByGroupIds: () => Promise<KeywordsByGroupId>;
2958
- getSelectedGroups: () => Promise<KeywordGroup[]>;
2959
- getKeywordGroupsByItemId: (id: string, route?: string) => Promise<KeywordGroup[]>;
2846
+ declare module "libs/reach/util/common/src/plugins/usePluginSubscriptionStore" {
2847
+ import { DependencyList } from 'react';
2848
+ import { PluginStore } from "libs/reach/util/common/src/plugins/PluginContext";
2849
+ import { Api } from 'restful.js';
2850
+ export function usePluginSubscriptionStore(): PluginStore;
2851
+ export function usePluginSubscriptionStoreValue<T>(key: string, deps?: DependencyList): {
2852
+ data: any;
2853
+ set: (newValue: T) => Promise<unknown>;
2854
+ isLoading: boolean;
2855
+ error: any;
2856
+ refresh: () => void;
2857
+ remove: () => Promise<unknown>;
2960
2858
  };
2859
+ export function getPluginSubscriptionStoreWrapper(pluginId: string, api: Api): PluginStore;
2961
2860
  }
2962
- declare module "libs/reach/util/common/src/content/content-keyword-utils" {
2963
- import { KeywordsByGroupId } from "libs/reach/util/common/src/keywords/useKeywordsApi";
2964
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
2965
- import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2966
- export function getFlatKeywordList(keywords: KeywordsByGroupId): Keyword[];
2967
- export function ensureMandatoryKeywords(mandatoryKeywords: Keyword[], allKeywords: Keyword[]): Keyword[];
2968
- export function getGroupedKeywords(keywords: Keyword[]): {
2969
- [key: string]: Keyword[];
2970
- };
2971
- export function getKeywordDisplayValue(keywordGroups: KeywordGroup[] | null, user: CurrentUser, groupId?: string, keywordName?: string, groupName?: string, language?: string): string;
2972
- export function getKeywordTitle(user: CurrentUser, translations: {
2973
- [key: string]: string;
2974
- }, name: string, language?: string): string;
2975
- export function getPreSelectedKeywords(keywords: Keyword[], mandatoryKeywords: Keyword[]): Keyword[];
2976
- export function checkIfHasSameKeywords(keywordsArray1: Keyword[], keywordsArray2: Keyword[]): boolean;
2861
+ declare module "libs/reach/util/common/src/plugins/PluginWrapper" {
2862
+ import { FC } from 'react';
2863
+ import { PluginProps } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2864
+ export const PluginWrapper: FC<PluginProps & any>;
2977
2865
  }
2978
- declare module "libs/reach/util/common/src/content/useClearUnreadItems" {
2979
- import { ItemResourceTypes } from "libs/reach/util/common/src/index";
2980
- export interface onMarkAsReadHandlers {
2981
- onStarted?: () => unknown;
2982
- onFinished?: () => unknown;
2866
+ declare module "libs/reach/util/common/src/plugins/Plugins" {
2867
+ import { FC } from 'react';
2868
+ import { ExtensionArea } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2869
+ export const Plugins: FC<{
2870
+ area: ExtensionArea;
2871
+ } & any>;
2872
+ }
2873
+ declare module "libs/reach/util/common/src/plugins/index" {
2874
+ export * from "libs/reach/util/common/src/plugins/PluginContext";
2875
+ export * from "libs/reach/util/common/src/plugins/PluginWrapper";
2876
+ export * from "libs/reach/util/common/src/plugins/Plugins";
2877
+ export * from "libs/reach/util/common/src/plugins/SystemJSHelper";
2878
+ export * from "libs/reach/util/common/src/plugins/usePluginApi";
2879
+ export * from "libs/reach/util/common/src/plugins/usePluginExtensions";
2880
+ export * from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
2881
+ export * from "libs/reach/util/common/src/plugins/usePluginSubscriptionStore";
2882
+ export * from "libs/reach/util/common/src/plugins/usePluginUserStore";
2883
+ }
2884
+ declare module "libs/reach/util/common/src/theme/ColorGenerator" {
2885
+ export class Color {
2886
+ private r;
2887
+ private g;
2888
+ private b;
2889
+ constructor(color: string);
2890
+ lighten(percentage: number): Color;
2891
+ toHex(): string;
2892
+ setRgb: (color: string) => void;
2893
+ setRgbFromHex: (color: string) => void;
2894
+ setRgbFromRgba: (color: string) => void;
2895
+ trim: (value: string) => string;
2983
2896
  }
2984
- export function useClearUnreadItems(itemType: ItemResourceTypes, handlers?: onMarkAsReadHandlers, unreadCount?: number): () => Promise<void>;
2985
2897
  }
2986
- declare module "libs/reach/util/common/src/content/useClearUnreadOnlyFilter" {
2987
- export function useClearUnreadOnlyFilter(): {
2988
- clearUnreadOnlyFilter: () => void;
2898
+ declare module "libs/reach/util/common/src/theme/ThemeService" {
2899
+ import { IPartialTheme } from 'office-ui-fabric-react';
2900
+ import { Theme } from "libs/reach/util/common/src/user/Subscription";
2901
+ import * as wcag from 'wcag-contrast';
2902
+ export const defaultThemeColors: Theme;
2903
+ export const defaultPageBackgroundColor: string;
2904
+ export const defaultLightColor = "#ffffff";
2905
+ export const defaultDarkColor = "#333333";
2906
+ /**
2907
+ * Fetch the default themes
2908
+ */
2909
+ export function getDefaultThemes(): Theme[];
2910
+ /**
2911
+ * Apply a theme
2912
+ * Note: this method is not responsible for persisting the selected theme.
2913
+ * Use SubscriptionService.updateTheme() to persist a custom theme against the User's Subscription
2914
+ */
2915
+ export function applyTheme(theme: Theme, disableUiFabricThemeOverwrite: boolean): {
2916
+ palette: {
2917
+ themeDarker: string;
2918
+ themeDark: string;
2919
+ themeDarkAlt: string;
2920
+ themePrimary: string;
2921
+ themeSecondary: string;
2922
+ themeTertiary: string;
2923
+ themeLight: string;
2924
+ themeLighter: string;
2925
+ themeLighterAlt: string;
2926
+ neutralDark: string;
2927
+ neutralPrimary: string;
2928
+ neutralPrimaryAlt: string;
2929
+ neutralSecondary: string;
2930
+ neutralSecondaryAlt: string;
2931
+ neutralTertiary: string;
2932
+ neutralTertiaryAlt: string;
2933
+ neutralQuaternary: string;
2934
+ neutralQuaternaryAlt: string;
2935
+ neutralLight: string;
2936
+ neutralLighter: string;
2937
+ neutralLighterAlt: string;
2938
+ accent: string;
2939
+ textColorOnWhiteBackground: string;
2940
+ black: string;
2941
+ blackTranslucent40: string;
2942
+ blue: string;
2943
+ blueDark: string;
2944
+ blueLight: string;
2945
+ blueMid: string;
2946
+ error: string;
2947
+ green: string;
2948
+ greenDark: string;
2949
+ greenLight: string;
2950
+ info: string;
2951
+ magenta: string;
2952
+ magentaDark: string;
2953
+ magentaLight: string;
2954
+ orange: string;
2955
+ orangeLight: string;
2956
+ orangeLighter: string;
2957
+ purple: string;
2958
+ purpleDark: string;
2959
+ purpleLight: string;
2960
+ red: string;
2961
+ redDark: string;
2962
+ severeWarning: string;
2963
+ success: string;
2964
+ teal: string;
2965
+ tealDark: string;
2966
+ tealLight: string;
2967
+ white: string;
2968
+ whiteTranslucent40: string;
2969
+ yellow: string;
2970
+ yellowLight: string;
2971
+ };
2972
+ semanticColors: {
2973
+ infoText: string;
2974
+ successText: string;
2975
+ alertBackground: string;
2976
+ severeWarningBackground: string;
2977
+ successBackground: string;
2978
+ warningBackground: string;
2979
+ errorBackground: string;
2980
+ infoBackground: string;
2981
+ };
2982
+ textColors: {
2983
+ onPrimary: string;
2984
+ onSecondary: string;
2985
+ };
2989
2986
  };
2990
- }
2991
- declare module "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler" {
2992
- export function useUnreadItemsTogglerHandler(): {
2993
- toggleUnreadItems: () => void;
2987
+ export type IReachTheme = IPartialTheme & {
2988
+ textColors?: Partial<ITextColors>;
2989
+ };
2990
+ interface ITextColors {
2991
+ onPrimary?: string;
2992
+ onSecondary?: string;
2993
+ onAccent?: string;
2994
+ default?: string;
2995
+ }
2996
+ export function getDarkAltColor(color: string): string;
2997
+ export function getTextColor(bgColor: string): "#333333" | "#ffffff";
2998
+ export function shouldUseDarkForegroundColor(bgColor: string): boolean;
2999
+ export function getContrastInfo(backgroundColor: string, foregroundColor: string): {
3000
+ contrast: string;
3001
+ score: wcag.Score;
3002
+ isGood: boolean;
2994
3003
  };
2995
3004
  }
2996
- declare module "libs/reach/util/common/src/content/index" {
2997
- export * from "libs/reach/util/common/src/content/Attachment";
2998
- export * from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2999
- export * from "libs/reach/util/common/src/content/Comment";
3000
- export * from "libs/reach/util/common/src/content/ItemResourceType";
3001
- export * from "libs/reach/util/common/src/content/ItemWithAttachments";
3002
- export * from "libs/reach/util/common/src/content/Language";
3003
- export * from "libs/reach/util/common/src/content/PublishableItem";
3004
- export * from "libs/reach/util/common/src/content/NewsItem";
3005
- export * from "libs/reach/util/common/src/content/EventItem";
3006
- export * from "libs/reach/util/common/src/content/PageItem";
3007
- export * from "libs/reach/util/common/src/content/NewsMetadata";
3008
- export * from "libs/reach/util/common/src/content/KnownNewsState";
3009
- export * from "libs/reach/util/common/src/content/FeedbackSettings";
3010
- export * from "libs/reach/util/common/src/content/WorkflowStatus";
3011
- export * from "libs/reach/util/common/src/content/ResponseItem";
3012
- export * from "libs/reach/util/common/src/content/BaseItem";
3013
- export * from "libs/reach/util/common/src/content/VideoSource";
3014
- export * from "libs/reach/util/common/src/content/KeywordGroup";
3015
- export * from "libs/reach/util/common/src/content/ItemStatistics";
3016
- export * from "libs/reach/util/common/src/content/useFileApi";
3017
- export * from "libs/reach/util/common/src/content/content-keyword-utils";
3018
- export * from "libs/reach/util/common/src/content/useClearUnreadItems";
3019
- export * from "libs/reach/util/common/src/content/useClearUnreadOnlyFilter";
3020
- export * from "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler";
3005
+ declare module "libs/reach/util/common/src/theme/ThemeContext" {
3006
+ import { FC, ReactNode } from 'react';
3007
+ import { Theme } from "libs/reach/util/common/src/user/Subscription";
3008
+ import { IReachTheme } from "libs/reach/util/common/src/theme/ThemeService";
3009
+ export const ThemeContext: import("react").Context<{
3010
+ setTheme: (theme: Theme) => unknown;
3011
+ theme: IReachTheme;
3012
+ }>;
3013
+ export const ThemeContextProvider: FC<{
3014
+ disableUiFabricThemeOverwrite?: boolean;
3015
+ children: ReactNode;
3016
+ }>;
3017
+ export function useTheme(): IReachTheme;
3018
+ }
3019
+ declare module "libs/reach/util/common/src/theme/index" {
3020
+ export * from "libs/reach/util/common/src/theme/ThemeContext";
3021
+ export * from "libs/reach/util/common/src/theme/ThemeService";
3022
+ export * from "libs/reach/util/common/src/theme/ColorGenerator";
3021
3023
  }
3022
3024
  declare module "libs/reach/util/common/src/Variables" {
3023
3025
  export const maxContentWidth = 985;
@@ -3218,6 +3220,14 @@ declare module "libs/reach/util/common/src/keyword-utils" {
3218
3220
  declare module "libs/reach/util/common/src/useBaseRoute" {
3219
3221
  export function useBaseRoute(): string;
3220
3222
  }
3223
+ declare module "libs/reach/util/common/src/ForbiddenErrorTriggerAction" {
3224
+ import { AppTriggerAction } from "libs/reach/util/common/src/index";
3225
+ export class ForbiddenErrorTriggerAction implements AppTriggerAction {
3226
+ static type: string;
3227
+ type: string;
3228
+ static create(): ForbiddenErrorTriggerAction;
3229
+ }
3230
+ }
3221
3231
  declare module "libs/reach/util/common/src/index" {
3222
3232
  export { initializeIcons } from 'office-ui-fabric-react';
3223
3233
  export * from "libs/reach/util/common/src/FocusStyles";
@@ -3244,6 +3254,8 @@ declare module "libs/reach/util/common/src/index" {
3244
3254
  export * from "libs/reach/util/common/src/PagingService";
3245
3255
  export * from "libs/reach/util/common/src/keyword-utils";
3246
3256
  export * from "libs/reach/util/common/src/useBaseRoute";
3257
+ export * from "libs/reach/util/common/src/ForbiddenErrorTriggerAction";
3258
+ export * from "libs/reach/util/common/src/AccessDeniedIntercept";
3247
3259
  }
3248
3260
  declare module "libs/reach/ui/common/src/Link" {
3249
3261
  import { Link as RouterLink } from 'react-router-dom';
@@ -6504,8 +6516,7 @@ declare module "libs/reach/feature/content/src/forms/NeutralCheckbox" {
6504
6516
  export const NeutralCheckBox: import("styled-components").StyledComponent<import("react").FunctionComponent<import("office-ui-fabric-react").ICheckboxProps>, import("styled-components").DefaultTheme, {}, never>;
6505
6517
  }
6506
6518
  declare module "libs/reach/feature/content/src/common/AppTriggerActions" {
6507
- import { EventResponse } from "libs/reach/util/common/src/index";
6508
- import { AppTriggerAction } from "libs/reach/util/common/src/index";
6519
+ import { AppTriggerAction, EventResponse, ForbiddenErrorTriggerAction } from "libs/reach/util/common/src/index";
6509
6520
  export class EventResponseTriggerAction implements AppTriggerAction {
6510
6521
  static type: string;
6511
6522
  type: string;
@@ -6541,11 +6552,6 @@ declare module "libs/reach/feature/content/src/common/AppTriggerActions" {
6541
6552
  itemIds: string[];
6542
6553
  static create(itemIds: string[]): DeletedItemsTriggerAction;
6543
6554
  }
6544
- export class ForbiddenErrorTriggerAction implements AppTriggerAction {
6545
- static type: string;
6546
- type: string;
6547
- static create(): ForbiddenErrorTriggerAction;
6548
- }
6549
6555
  export class PromptPublicUserLoginAction implements AppTriggerAction {
6550
6556
  type: string;
6551
6557
  static create(): ForbiddenErrorTriggerAction;