@livetiles/reach-plugin-types 0.5.0-preview.1193 → 0.5.0-preview.1196

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 +1452 -1414
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1209,492 +1209,514 @@ declare module "libs/reach/util/common/src/content/KeywordGroup" {
1209
1209
  };
1210
1210
  }
1211
1211
  }
1212
- declare module "libs/reach/util/common/src/channels/Channel" {
1213
- export interface Channel {
1214
- id: string;
1215
- name: string;
1216
- translations?: {
1217
- [key: string]: string;
1218
- };
1212
+ declare module "libs/reach/util/common/src/user/features/FeatureSet" {
1213
+ export const orderedFeatureSet: string[];
1214
+ export class FeatureSet {
1215
+ [featureName: string]: boolean;
1219
1216
  }
1217
+ export const workInProgressFeatures: Partial<FeatureSet>;
1220
1218
  }
1221
- declare module "libs/reach/util/common/src/content/ItemResourceType" {
1222
- export enum ItemResourceTypes {
1223
- News = "news",
1224
- Pages = "pages",
1225
- Posts = "posts",
1226
- Events = "events",
1227
- Comments = "comments"
1228
- }
1229
- export enum ItemType {
1230
- News = 0,
1231
- Post = 1,
1232
- Page = 2,
1233
- Event = 3
1219
+ declare module "libs/reach/util/common/src/user/CurrentUserContext" {
1220
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
1221
+ export const CurrentUserContext: import("react").Context<{
1222
+ isLibUser?: boolean;
1223
+ refreshUser: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>;
1224
+ user: CurrentUser;
1225
+ }>;
1226
+ export function useCurrentUserContext(): {
1227
+ isLibUser?: boolean;
1228
+ refreshUser: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>;
1229
+ user: CurrentUser;
1230
+ };
1231
+ }
1232
+ declare module "libs/reach/util/common/src/user/useCurrentUser" {
1233
+ export function useCurrentUser(): import("@livetiles/reach/util/common").CurrentUser;
1234
+ }
1235
+ declare module "libs/reach/util/common/src/user/features/WithFeatures" {
1236
+ import { FeatureSet } from "libs/reach/util/common/src/user/features/FeatureSet";
1237
+ import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
1238
+ export interface InjectedFeaturesProps {
1239
+ features?: FeatureSet;
1234
1240
  }
1235
- export type ItemTypeKeyType = keyof typeof ItemType;
1241
+ export function useFeatures(): FeatureSet;
1242
+ export function getEnabledFeatures(summary: SubscriptionSummary): FeatureSet;
1236
1243
  }
1237
- declare module "libs/reach/util/common/src/user/Subscription" {
1238
- import { Resources } from "libs/reach/util/context/src/index";
1244
+ declare module "libs/reach/util/common/src/user/useCurrentUserCache" {
1245
+ import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
1246
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
1247
+ export function useCurrentUserCache(): {
1248
+ clear: () => Promise<void>;
1249
+ setEssentials: (user: CurrentUser) => Promise<CurrentUser>;
1250
+ setUser: (user: CurrentUser) => Promise<CurrentUser>;
1251
+ get: () => Promise<{
1252
+ subscription: {
1253
+ logoInfo: {
1254
+ smallUrl: any;
1255
+ largeUrl: string;
1256
+ isLegacyLogo: boolean;
1257
+ };
1258
+ languages: import("@livetiles/reach/util/common").LanguageBase[];
1259
+ featureMask: string;
1260
+ company: string;
1261
+ directories: import("libs/reach/util/common/src/user/Subscription").DirectoryConfiguration[];
1262
+ webPluginDefinitions: import("libs/reach/util/common/src/user/Subscription").WebPluginDefinition[];
1263
+ userPropertyDefinitions: import("libs/reach/util/common/src/user/Subscription").UserPropertyDefinition[];
1264
+ customDomain?: string;
1265
+ allowSelfRegistration?: boolean;
1266
+ brandFolderConfig?: import("libs/reach/util/common/src/user/Subscription").BrandFolderConfig;
1267
+ hideSubscriptionName?: boolean;
1268
+ id: string;
1269
+ subscriptionName: string;
1270
+ subscriptionHandle?: string;
1271
+ contact: import("@livetiles/reach/util/common").Account;
1272
+ theme: import("libs/reach/util/common/src/user/Subscription").Theme;
1273
+ defaultLanguage: string;
1274
+ faviconUrl?: string;
1275
+ navigation: import("libs/reach/util/common/src/user/Subscription").NavigationNode[];
1276
+ regionSettings?: import("libs/reach/util/common/src/user/Subscription").RegionSettings;
1277
+ signInSettings?: import("libs/reach/util/common/src/user/Subscription").SignInSettings;
1278
+ useInAppBrowser?: boolean;
1279
+ hasUnreadItems: boolean;
1280
+ pageTrackingInfo: import("libs/reach/util/common/src/user/Subscription").PageTrackingInfo;
1281
+ termsAndConditionsHash?: string;
1282
+ };
1283
+ isEmailVerificationPending?: boolean;
1284
+ isSubscriptionOwner: boolean;
1285
+ givenName: string;
1286
+ surname: string;
1287
+ preferredUiLanguage: string;
1288
+ preferredContentLanguage?: string;
1289
+ preferredLocale?: string;
1290
+ bookmarks: string[];
1291
+ groups: import("libs/reach/util/common/src/user/User").UserGroup[];
1292
+ availableSubscriptions: SubscriptionSummary[];
1293
+ channels: import("@livetiles/reach/util/common").UserChannelSubscription[];
1294
+ userHash: string;
1295
+ unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
1296
+ unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
1297
+ unreadPosts: {
1298
+ groupId: string;
1299
+ itemId: string;
1300
+ }[];
1301
+ unreadFeedItemsCount?: number;
1302
+ mostRecentPostGroups: string[];
1303
+ notificationTypeSettings: import("libs/reach/util/common/src/user/User").NotificationTypeSettings;
1304
+ hasPendingRegistration?: boolean;
1305
+ minRoles: import("libs/reach/util/common/src/user/User").UserMinRoles;
1306
+ hasDirectory: boolean;
1307
+ contacts: import("libs/reach/util/common/src/user/User").UserContact[];
1308
+ termsAndConditionsApprovedHash: string;
1309
+ isPublicUser?: boolean;
1310
+ hasUnreadChats?: boolean;
1311
+ publicSubscriptionIds?: string[];
1312
+ id?: string;
1313
+ type?: import("@livetiles/reach/util/common").AccountType;
1314
+ tenantId?: string;
1315
+ displayName?: string;
1316
+ userPrincipalName?: string;
1317
+ mail?: string;
1318
+ tokenUniqueId?: string;
1319
+ authenticationType?: import("@livetiles/shared/util/authentication").AuthenticationType;
1320
+ created?: string;
1321
+ }>;
1322
+ };
1323
+ export function getUserDetailFields(user: Partial<CurrentUser>): {
1324
+ availableSubscriptions: SubscriptionSummary[];
1325
+ bookmarks: string[];
1326
+ unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
1327
+ unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
1328
+ unreadPosts: {
1329
+ groupId: string;
1330
+ itemId: string;
1331
+ }[];
1332
+ hasUnreadChats: boolean;
1333
+ unreadFeedItemsCount: number;
1334
+ mostRecentPostGroups: string[];
1335
+ };
1336
+ }
1337
+ declare module "libs/reach/util/common/src/user/CurrentUserDetailContextProvider" {
1338
+ import { FC } from 'react';
1339
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
1340
+ export function useRefreshUserDetails(): () => Promise<CurrentUser>;
1341
+ export const CurrentUserDetailContextProvider: FC;
1342
+ }
1343
+ declare module "libs/reach/util/common/src/user/CurrentUserDetailLibContextProvider" {
1344
+ import { FC } from 'react';
1345
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
1346
+ export function useRefreshLibUserDetails(): () => Promise<CurrentUser>;
1347
+ export const CurrentUserDetailLibContextProvider: FC;
1348
+ }
1349
+ declare module "libs/reach/util/common/src/user/Group" {
1239
1350
  import { Account } from "libs/reach/util/common/src/user/Account";
1240
- import { Audience } from "libs/reach/util/common/src/user/Audience";
1241
- import { CurrentUser, NotificationType } from "libs/reach/util/common/src/user/User";
1242
- import { IdentityProviderNames, IdentityProviderSettings, SubscriptionInfo as BaseSubscriptionInfo } from "libs/shared/util/authentication/src/index";
1243
- import { Language, LanguageBase } from "libs/reach/util/common/src/content/Language";
1244
- import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
1245
- import { Channel } from "libs/reach/util/common/src/channels/Channel";
1246
- import { ItemType } from "libs/reach/util/common/src/content/ItemResourceType";
1247
- export interface DirectoryConfiguration extends DirectoryConfigurationPatch {
1248
- domains?: string[];
1249
- tenantId: string;
1250
- organization?: string;
1251
- hasAdminConsent: boolean;
1252
- hasTeamsAdminConsent: boolean;
1253
- allowAccessToExternalUsers: boolean;
1254
- }
1255
- export interface DirectoryConfigurationPatch {
1256
- hasAdminConsent?: boolean;
1257
- hasTeamsAdminConsent?: boolean;
1258
- allowAccessToExternalUsers?: boolean;
1259
- }
1260
- export interface SubscriptionCreationInfo {
1261
- mail?: string;
1262
- subscriptionName?: string;
1263
- region?: string;
1264
- skipDemoContent?: boolean;
1265
- specificDemoSubscriptionId?: string;
1266
- password?: string;
1267
- firstName?: string;
1268
- lastName?: string;
1269
- additionalInformation?: {
1270
- [key: string]: string | string[];
1271
- };
1351
+ import { GroupBase, GroupRoleNames, GroupRoles } from "libs/reach/util/common/src/user/User";
1352
+ export interface UserRoleAssignment {
1353
+ role: GroupRoles;
1354
+ userId: string;
1272
1355
  }
1273
- export interface SubscriptionInfo extends BaseSubscriptionInfo {
1274
- allowSelfRegistration?: boolean;
1275
- useInAppBrowser?: boolean;
1276
- tenantId?: string;
1277
- signInSettings?: SignInSettings;
1278
- faviconUrl?: string;
1279
- theme?: Theme;
1356
+ export interface GroupSummary extends GroupBase {
1357
+ allowPosts?: boolean;
1280
1358
  allowPublicAccess?: boolean;
1281
- redirectToContent?: boolean;
1282
- allowZendesk?: boolean;
1283
- logoInfo: LogoInfo;
1359
+ availableChannelIds?: string[];
1360
+ availableKeywordIds?: string[];
1361
+ defaultChannelIds?: string[];
1362
+ defaultKeywordIds?: string[];
1363
+ description: string;
1364
+ mandatoryChannelIds?: string[];
1365
+ mandatoryKeywordIds?: string[];
1284
1366
  }
1285
- export interface SignInSettings {
1286
- customIdentityProviders: IdentityProviderSettings[];
1287
- identityProviders: IdentityProviderNames[];
1288
- customResources: Resources;
1367
+ export interface GroupStatistics {
1368
+ adminCount: number;
1369
+ authorCount: number;
1370
+ editorCount: number;
1371
+ eventsCount: number;
1372
+ newsCount: number;
1373
+ pagesCount: number;
1374
+ readerCount: number;
1289
1375
  }
1290
- export interface BaseSubscription {
1291
- id: string;
1292
- subscriptionName: string;
1293
- subscriptionHandle?: string;
1294
- contact: Account;
1295
- theme: Theme;
1296
- defaultLanguage: string;
1297
- faviconUrl?: string;
1298
- navigation: NavigationNode[];
1299
- regionSettings?: RegionSettings;
1300
- signInSettings?: SignInSettings;
1301
- useInAppBrowser?: boolean;
1302
- hasUnreadItems: boolean;
1303
- pageTrackingInfo: PageTrackingInfo;
1304
- termsAndConditionsHash?: string;
1305
- logoInfo: LogoInfo;
1376
+ export interface Group extends GroupSummary {
1377
+ rules: GroupRules;
1378
+ statistics: GroupStatistics;
1379
+ users: UserRoleAssignment[];
1306
1380
  }
1307
- export interface EssentialSubscriptionData {
1308
- channels: Channel[];
1309
- keywords: Keyword[];
1310
- keywordGroups: KeywordGroup[];
1381
+ export type GroupRules = {
1382
+ [K in GroupRoleNames]?: GroupRule;
1383
+ };
1384
+ export interface GroupRule {
1385
+ adGroups?: Account[];
1386
+ includeDirectoryUsers?: boolean;
1387
+ includeNonDirectoryUsers?: boolean;
1311
1388
  }
1312
- export enum LogoSize {
1313
- large = "large",
1314
- small = "small"
1389
+ }
1390
+ declare module "libs/reach/util/common/src/user/content-languages-util" {
1391
+ export const defaultFallbackContentLanguage = "en";
1392
+ export const contentLanguagesWithoutAutomaticTranslation: string[];
1393
+ export const allAvailableContentLanguages: string[];
1394
+ export const rtlLanguages: string[];
1395
+ }
1396
+ declare module "libs/reach/util/common/src/user/LanguageUtils" {
1397
+ import { CurrentUser } from "libs/reach/util/common/src/index";
1398
+ import { IntlShape } from 'react-intl';
1399
+ import { LanguageSummary } from "libs/reach/util/common/src/index";
1400
+ export function getPreferredContentLanguage(user: CurrentUser): string;
1401
+ export function getLocalizedLanguages(intl: IntlShape, ...languages: LanguageSummary[]): {
1402
+ localizedName: string;
1403
+ name: string;
1404
+ englishName: string;
1405
+ code: string;
1406
+ }[];
1407
+ export function isRtlLanguage(lang: string): boolean;
1408
+ export type LanguageDirection = 'auto' | 'rtl' | 'ltr';
1409
+ }
1410
+ declare module "libs/reach/util/common/src/user/Member" {
1411
+ import { Account } from "libs/reach/util/common/src/user/Account";
1412
+ import { GroupRoleNames } from "libs/reach/util/common/src/user/User";
1413
+ export default interface Member extends Account {
1414
+ roles: GroupRoleNames[];
1315
1415
  }
1316
- export interface LogoInfo {
1317
- smallUrl: string;
1318
- largeUrl: string;
1319
- isLegacyLogo: boolean;
1416
+ }
1417
+ declare module "libs/reach/util/common/src/user/Organization" {
1418
+ export interface Organization {
1419
+ country: string;
1420
+ countryCode: string;
1421
+ displayName: string;
1422
+ id?: string;
1320
1423
  }
1321
- export interface TermsAndConditions {
1322
- value?: string;
1323
- hash?: string;
1324
- modifiedBy?: CurrentUser;
1325
- modified?: string;
1424
+ }
1425
+ declare module "libs/reach/util/common/src/user/UserInfo" {
1426
+ export interface UserInfo {
1427
+ userId?: string;
1428
+ displayName?: string;
1429
+ userPrincipalName?: string;
1430
+ mail?: string;
1431
+ givenName?: string;
1432
+ surname?: string;
1433
+ properties?: {
1434
+ [key: string]: any;
1435
+ };
1436
+ isDirectoryUser?: boolean;
1326
1437
  }
1327
- export interface PageTrackingInfo {
1328
- type: string;
1329
- key: string;
1438
+ }
1439
+ declare module "libs/reach/util/common/src/user/RequestUserInformation" {
1440
+ import { Organization } from "libs/reach/util/common/src/user/Organization";
1441
+ import { RequestUser } from "libs/reach/util/common/src/user/User";
1442
+ export interface RequestUserInformation {
1443
+ user: RequestUser;
1444
+ organization: Organization;
1330
1445
  }
1331
- export interface RegionSettings {
1332
- name: string;
1333
- contentRegion: string;
1446
+ }
1447
+ declare module "libs/reach/util/common/src/content/ItemStatistics" {
1448
+ export interface ItemStatistics {
1449
+ commentCount?: number;
1450
+ likeCount?: number;
1451
+ readCount?: number;
1452
+ confirmationCount?: number;
1453
+ bookmarkCount?: number;
1454
+ participantsCount?: number;
1455
+ replyCount?: number;
1334
1456
  }
1335
- export interface SubscriptionSummary extends BaseSubscription {
1336
- languages: LanguageBase[];
1337
- featureMask: string;
1338
- company: string;
1339
- directories: DirectoryConfiguration[];
1340
- webPluginDefinitions: WebPluginDefinition[];
1341
- userPropertyDefinitions: UserPropertyDefinition[];
1342
- customDomain?: string;
1343
- allowSelfRegistration?: boolean;
1344
- brandFolderConfig?: BrandFolderConfig;
1345
- hideSubscriptionName?: boolean;
1457
+ }
1458
+ declare module "libs/reach/util/common/src/content/NotificationSettings" {
1459
+ export interface NotificationSettings {
1460
+ isEnabled: boolean;
1346
1461
  }
1347
- export interface BrandFolderConfig {
1348
- sections?: string[];
1462
+ }
1463
+ declare module "libs/reach/util/common/src/content/FeedbackSettings" {
1464
+ export interface FeedbackSettings {
1465
+ feedbackOptions: ReadonlyArray<Feedback>;
1349
1466
  }
1350
- export interface AdminSubscription extends BaseSubscription {
1351
- roleMapping: any;
1352
- createdBy: string;
1353
- languages: Language[];
1354
- webHooks: WebHook[];
1355
- audience: Audience[];
1356
- directories: DirectoryConfiguration[];
1357
- selfRegistration: SelfRegistrationOptions;
1358
- customBrandingIdentifier?: string;
1359
- customNotificationSettings?: {
1360
- [key in ItemType]: string | null;
1361
- };
1467
+ export type Feedback = 'comment' | 'like' | 'confirm' | null;
1468
+ }
1469
+ declare module "libs/reach/util/common/src/content/NewsMetadata" {
1470
+ import { NotificationSettings } from "libs/reach/util/common/src/content/NotificationSettings";
1471
+ import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
1472
+ export interface NewsMetadata {
1473
+ mailNotificationSettings?: NotificationSettings;
1474
+ pushNotificationSettings?: NotificationSettings;
1475
+ feedbackSettings?: FeedbackSettings;
1362
1476
  }
1363
- export interface SelfRegistrationOptions {
1364
- enabled?: boolean;
1477
+ }
1478
+ declare module "libs/reach/util/common/src/content/KnownNewsState" {
1479
+ export enum KnownNewsState {
1480
+ None = 0,
1481
+ Unconfirmed = 1,
1482
+ Alert = 2
1365
1483
  }
1366
- export interface CreateSubscriptionResult {
1367
- subscription: AdminSubscription;
1368
- temporaryUserApiToken: string;
1484
+ }
1485
+ declare module "libs/reach/util/common/src/content/NewsItem" {
1486
+ import { NewsMetadata } from "libs/reach/util/common/src/content/NewsMetadata";
1487
+ import { KnownNewsState } from "libs/reach/util/common/src/content/KnownNewsState";
1488
+ import { PublishableItem } from "libs/reach/util/common/src/content/PublishableItem";
1489
+ import { Channel } from "libs/reach/util/common/src/channels/Channel";
1490
+ export type Source = 'Condense' | 'External' | null;
1491
+ export type VersionId = string;
1492
+ export interface SchedulableItem extends PublishableItem {
1493
+ metadata?: NewsMetadata;
1494
+ channels?: Channel[];
1369
1495
  }
1370
- export enum LinkDirectoryResultType {
1371
- Success = 1,
1372
- InvalidHash = 2,
1373
- OneDirectoryLimit = 3,
1374
- CurrentTenantAlreadyLinked = 4
1496
+ export interface NewsItem extends SchedulableItem {
1497
+ source?: string;
1498
+ alertOptions?: NewsItemAlertOptions;
1499
+ expiryDate?: string;
1500
+ knownState: KnownNewsState;
1501
+ hasNewComments?: boolean;
1375
1502
  }
1376
- export interface LinkDirectoryResult {
1377
- type: LinkDirectoryResultType;
1378
- message?: string;
1379
- verificationHash?: string;
1380
- subscriptionId?: string;
1503
+ export interface NewsItemAlertOptions {
1504
+ duration?: string;
1505
+ endDate?: Date;
1506
+ expireAfter?: boolean;
1381
1507
  }
1382
- export interface Theme {
1383
- name: string;
1384
- primaryColor: string;
1385
- secondaryColor: string;
1386
- useHighlightColorOnWhiteBackground?: boolean;
1508
+ export interface NewsItemVersion extends NewsItem {
1509
+ newsId: string;
1510
+ versionModificationDate: string;
1387
1511
  }
1388
- export interface WebHook {
1389
- id: string;
1390
- url: string;
1391
- description: string;
1392
- eventTypes: string[];
1512
+ }
1513
+ declare module "libs/reach/util/common/src/content/VideoSource" {
1514
+ export enum VideoSource {
1515
+ YouTube = 0,
1516
+ Vimeo = 1,
1517
+ MicrosoftStream = 2,
1518
+ GenericUrl = 3,
1519
+ Kaltura = 4
1393
1520
  }
1394
- export interface NavigationNode {
1395
- key: string;
1396
- label: string;
1397
- translations?: {
1398
- [key: string]: string;
1399
- };
1521
+ export function convertStringToVideoSource(videoSource: string): VideoSource;
1522
+ }
1523
+ declare module "libs/reach/util/common/src/content/BaseItem" {
1524
+ import { ItemStatistics } from "libs/reach/util/common/src/content/ItemStatistics";
1525
+ export interface BaseItem {
1526
+ id?: string;
1527
+ statistics?: ItemStatistics;
1528
+ poll?: Poll;
1529
+ searchHighlights?: SearchHighlightSummary;
1400
1530
  }
1401
- export type PluginSettings = {
1402
- [key: string]: string;
1403
- };
1404
- export interface WebPluginDefinition {
1405
- pluginId: string;
1406
- extensions: PluginExtension[];
1407
- notifications?: PluginNotificationDefinitions[];
1408
- settings: {
1409
- [key: string]: string;
1410
- };
1411
- isGlobal?: boolean;
1412
- bundleUrl?: string;
1413
- bundleModificationDate?: string;
1414
- subscriptionId?: string;
1415
- environment?: string;
1531
+ export interface SearchHighlightSummary {
1532
+ title: SearchHighlight[];
1533
+ content: SearchHighlight[];
1416
1534
  }
1417
- export interface PluginInfo extends WebPluginDefinition {
1418
- pluginSubscriptions: PluginSubscription[];
1419
- id: string;
1535
+ export interface SearchHighlight {
1536
+ language: string;
1537
+ texts: {
1538
+ value: string;
1539
+ type: 'text' | 'hit';
1540
+ }[];
1541
+ score: number;
1420
1542
  }
1421
- export interface PluginSubscription {
1422
- subscriptionId: string;
1423
- subscriptionName: string;
1543
+ export interface Poll {
1544
+ questions: PollQuestion[];
1424
1545
  }
1425
- export enum ExtensionArea {
1426
- global = "Global",
1427
- page = "Page",
1428
- eventEditorFeedbackSection = "EventEditorFeedbackSection",
1429
- eventDetailViewSection = "EventDetailViewSection",
1430
- itemEditor = "ItemEditor",
1431
- newsEditorFeedbackSection = "NewsEditorFeedbackSection",
1432
- newsOverviewCardSection = "NewsOverviewCardSection"
1546
+ export interface PollQuestion extends PollQuestionSettings {
1547
+ questionId: string;
1548
+ choices: PollQuestionChoice[];
1433
1549
  }
1434
- export type InlinePlugin = {
1435
- area: ExtensionArea.itemEditor;
1436
- objectButton: PluginObjectButton;
1437
- };
1438
- export type PagePlugin = {
1439
- area: ExtensionArea.page;
1440
- route: string;
1441
- navigationNode?: {
1442
- componentName?: string;
1443
- iconName?: string;
1444
- label?: string;
1445
- translations?: {
1446
- [key: string]: string;
1447
- };
1448
- };
1449
- };
1450
- export type PluginExtension = {
1451
- area: ExtensionArea;
1452
- componentName: string;
1453
- } & (InlinePlugin | PagePlugin);
1454
- export type PluginObjectButton = {
1455
- buttonLabel: {
1456
- defaultLabel: string;
1457
- translations?: {
1458
- [key: string]: string;
1459
- };
1460
- };
1461
- iconName: string;
1462
- };
1463
- export interface PluginNotificationDefinitions {
1464
- key: string;
1465
- title: string;
1466
- titleTranslations?: {
1467
- [key: string]: string;
1468
- };
1550
+ export interface PollQuestionSettings {
1551
+ allowOtherAnswer?: boolean;
1552
+ isMultiChoice?: boolean;
1553
+ }
1554
+ export interface PollQuestionChoice {
1555
+ choiceId: string;
1469
1556
  description?: string;
1470
- descriptionTranslations?: {
1471
- [key: string]: string;
1472
- };
1473
- possibleNotificationTypes: NotificationType;
1557
+ disabled?: boolean;
1558
+ isOther?: boolean;
1474
1559
  }
1475
- export interface UserPropertyDefinition {
1476
- name: string;
1477
- label?: string;
1478
- translations?: {
1479
- [key: string]: string;
1560
+ export interface PollQuestionAnswer {
1561
+ choiceIds: string[];
1562
+ freeTextAnswer?: string;
1563
+ questionId: string;
1564
+ }
1565
+ export interface QuestionResult {
1566
+ choiceResults: {
1567
+ [choiceId: string]: number;
1480
1568
  };
1481
- type?: FieldType;
1482
- mode?: FieldMode;
1569
+ freeTextAnswer?: string;
1570
+ showResults: boolean;
1571
+ totalFeedbackCount: number;
1572
+ userSelectedChoices: string[];
1483
1573
  }
1484
- export enum FieldType {
1485
- Unknown = 0,
1486
- Text = 1,
1487
- MultilineText = 2
1574
+ export interface PollResult {
1575
+ totalFeedbackCount?: number;
1576
+ answers: PollQuestionResult[];
1488
1577
  }
1489
- export enum FieldMode {
1490
- Unknown = 0,
1491
- AdminOnly = 1,
1492
- UserEditable = 2,
1493
- Hidden = 3
1578
+ export interface PollChoiceResult {
1579
+ choiceId: string;
1580
+ count: number;
1581
+ }
1582
+ export interface PollQuestionResult {
1583
+ questionId: string;
1584
+ choices: PollChoiceResult[];
1494
1585
  }
1495
1586
  }
1496
- declare module "libs/reach/util/common/src/common-utils" {
1497
- import { BaseSubscription, LogoInfo, SubscriptionInfo, SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
1498
- import { IntlShape } from 'react-intl';
1499
- export function getMainScrollableContainer(): HTMLElement;
1500
- export enum LinkType {
1501
- Internal = "internal",
1502
- External = "external",
1503
- Download = "download"
1587
+ declare module "libs/reach/util/common/src/content/WorkflowStatus" {
1588
+ export enum WorkflowStatus {
1589
+ draft = "draft",
1590
+ ready = "ready",
1591
+ rejected = "rejected",
1592
+ approved = "approved",
1593
+ deleted = "deleted"
1504
1594
  }
1505
- export const uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}";
1506
- export const DefaultSubscriptionName = "LiveTiles Reach";
1507
- export function getSubscriptionNameForList(subscription: SubscriptionSummary, intl: IntlShape): string;
1508
- export function getSubscriptionName(subscription: SubscriptionSummary): string;
1509
- export function getSubscriptionLogoInfoAndName(subscription: SubscriptionInfo | BaseSubscription): {
1510
- logoInfo: LogoInfo;
1511
- subscriptionName: string;
1512
- };
1513
1595
  }
1514
- declare module "libs/reach/util/common/src/analytics/analyticsUtils" {
1515
- export enum AnalyticsInteractionEvents {
1516
- embeddedVideo = "embedded-video",
1517
- embeddedAudio = "embedded-audio",
1518
- languageChange = "language-change",
1519
- eventRegistration = "event-registration",
1520
- eventWaitingList = "event-waiting-list",
1521
- eventSeriesRegistration = "event-series-registration",
1522
- eventSeriesWaitingList = "event-series-waiting-list",
1523
- translateContent = "translate-content",
1524
- downloadFile = "download-file",
1525
- embeddedIframe = "embedded-iframe",
1526
- externalLink = "external-link",
1527
- follow = "follow",
1528
- bookmark = "bookmark"
1596
+ declare module "libs/reach/util/common/src/content/PublishableItem" {
1597
+ import { Account } from "libs/reach/util/common/src/user/Account";
1598
+ import { Keyword } from "libs/reach/util/common/src/content/KeywordGroup";
1599
+ import { ItemStatistics } from "libs/reach/util/common/src/content/ItemStatistics";
1600
+ import { VersionId } from "libs/reach/util/common/src/content/NewsItem";
1601
+ import { VideoSource } from "libs/reach/util/common/src/content/VideoSource";
1602
+ import { BaseItem } from "libs/reach/util/common/src/content/BaseItem";
1603
+ import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
1604
+ export interface ContentDefinition {
1605
+ active: boolean;
1606
+ language: string;
1529
1607
  }
1530
- export enum AnalyticsActions {
1531
- click = "click",
1532
- navigate = "navigate",
1533
- view = "view",
1534
- search = "search"
1608
+ export interface PublishableItemContent extends ContentDefinition {
1609
+ title?: string;
1610
+ headline?: string;
1611
+ intro?: string;
1612
+ body?: string;
1613
+ customProperties?: {
1614
+ [key: string]: any;
1615
+ };
1616
+ poll?: PollTranslation;
1617
+ externalUrl?: string;
1618
+ fileInfo?: DocumentFileInfo;
1535
1619
  }
1536
- export enum AnalyticsModuleType {
1537
- Admin = "admin",
1538
- Chat = "chat",
1539
- Comments = "comments",
1540
- Events = "events",
1541
- Search = "search",
1542
- News = "news",
1543
- Pages = "pages",
1544
- People = "people",
1545
- Posts = "posts",
1546
- Stream = "stream",
1547
- User = "user"
1620
+ export interface DocumentFileInfo {
1621
+ fileId: string;
1622
+ mimeType: string;
1623
+ fileName: string;
1624
+ extension: string;
1625
+ shouldOpenInBrowser?: boolean;
1548
1626
  }
1549
- export enum AnalyticsModuleSubtype {
1550
- AllChats = "allChats",
1551
- AllNews = "allNews",
1552
- AllPosts = "allPosts",
1553
- Bookmarks = "bookmarks",
1554
- Channel = "channel",
1555
- Channels = "channels",
1556
- ChatConversation = "conversation",
1557
- Customization = "customization",
1558
- DetailView = "detailView",
1559
- DirectoryConfig = "directoryConfiguration",
1560
- Group = "group",
1561
- Groups = "groups",
1562
- Keywords = "keywords",
1563
- Languages = "languages",
1564
- MyNews = "myNews",
1565
- Owners = "owners",
1566
- Preview = "preview",
1567
- RootPages = "rootPages",
1568
- Search = "search",
1569
- SelfRegistration = "selfRegistration",
1570
- TargetAudience = "targetAudience",
1571
- UpcomingEvents = "upcoming",
1572
- BookedEvents = "booked",
1573
- PastEvents = "past",
1574
- Users = "users",
1575
- WebHooks = "webHooks",
1576
- Editor = "editor"
1627
+ export interface PageDocumentInfo extends DocumentFileInfo {
1628
+ pageId: string;
1629
+ title: string;
1577
1630
  }
1578
- export function sanitizeQueryParamsForDownloadLinks(url: string): string;
1579
- }
1580
- declare module "libs/reach/util/common/src/analytics/useLinkInteraction" {
1581
- export function useLinkInteraction(element: HTMLElement): void;
1582
- }
1583
- declare module "libs/reach/util/common/src/analytics/useIframeInteraction" {
1584
- export function useIframeInteraction(element: HTMLElement): void;
1585
- }
1586
- declare module "libs/reach/util/common/src/user/CurrentUserContext" {
1587
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
1588
- export const CurrentUserContext: import("react").Context<{
1589
- isLibUser?: boolean;
1590
- refreshUser: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>;
1591
- user: CurrentUser;
1592
- }>;
1593
- export function useCurrentUserContext(): {
1594
- isLibUser?: boolean;
1595
- refreshUser: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>;
1596
- user: CurrentUser;
1597
- };
1598
- }
1599
- declare module "libs/reach/util/common/src/user/useCurrentUser" {
1600
- export function useCurrentUser(): import("@livetiles/reach/util/common").CurrentUser;
1601
- }
1602
- declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider" {
1603
- import { FC } from 'react';
1604
- import { EventModule } from '@livetiles/analytics';
1605
- export const AnalyticsModuleContext: import("react").Context<EventModule>;
1606
- export const AnalyticsModuleContextProvider: FC<{
1607
- module: EventModule;
1608
- }>;
1609
- }
1610
- declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
1611
- import { Dispatch, FC, SetStateAction } from 'react';
1612
- import { Analytics, EventModule, InteractionProperties, EventSearch, EventItem } from '@livetiles/analytics';
1613
- export interface SearchAnalytics {
1614
- data: EventSearch[];
1615
- onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
1616
- onItemRead: (itemId: string) => void;
1631
+ export interface TitleContent extends ContentDefinition {
1632
+ title?: string;
1633
+ headline?: string;
1617
1634
  }
1618
- export interface ContextualProperties {
1619
- item?: EventItem | null;
1620
- module: EventModule | null;
1635
+ export interface BannerInfo {
1636
+ type: 'image' | 'video' | null;
1637
+ videoSource?: VideoSource;
1638
+ videoId?: string;
1639
+ videoUrl?: string;
1640
+ isDirectVideoUrl?: boolean;
1641
+ imageId?: string;
1642
+ altText?: string;
1621
1643
  }
1622
- export interface ContextualPropertiesAnalytics {
1623
- contextualProperties: ContextualProperties;
1624
- setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
1644
+ export interface LeaseInfo {
1645
+ leaseId: string | null;
1646
+ user: Account;
1625
1647
  }
1626
- export type ReachAnalytics = Analytics & ContextualPropertiesAnalytics & SearchAnalytics;
1627
- export const AnalyticsContext: import("react").Context<ReachAnalytics>;
1628
- export function useAnalyticsContext(): {
1629
- interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
1630
- load: (context: import("@livetiles/analytics").AnalyticsContext, baseUrl: string) => void;
1631
- getUser: () => import("@segment/analytics-next").User;
1632
- identify: (userId: string, traits?: Record<string, unknown>) => void;
1633
- activity: (payload: import("@livetiles/analytics").ActivityProperties) => import("@livetiles/analytics").Activity;
1634
- contextualProperties: ContextualProperties;
1635
- setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
1636
- data: EventSearch[];
1637
- onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
1638
- onItemRead: (itemId: string) => void;
1639
- };
1640
- export const AnalyticsLibraryContextProvider: FC<{
1641
- appName?: string;
1642
- }>;
1643
- export const AnalyticsContextProvider: FC;
1644
- export const AdditionalAnalyticsTracking: FC;
1645
- export const AnalyticsDummyContextProvider: FC;
1646
- }
1647
- declare module "libs/reach/util/common/src/useModalRouting" {
1648
- export interface ModalRouting {
1649
- isActive: boolean;
1648
+ export interface ItemVersionSummary {
1649
+ versionId: string;
1650
1650
  itemId: string;
1651
- backgroundLocation: any;
1651
+ modifiedBy: Account;
1652
+ versionModificationDate: string;
1653
+ status?: WorkflowStatus;
1654
+ isCurrentPublishedVersion: boolean;
1652
1655
  }
1653
- export function useModalRouting(): {
1654
- isModalRoutingActive: boolean;
1655
- modalItemId: string;
1656
- backgroundLocation: any;
1657
- };
1658
- export function useModalRoutingSettings(): (itemId: string) => {
1659
- modalRouting: {
1660
- isActive: boolean;
1661
- itemId: string;
1662
- backgroundLocation: {
1663
- state: {
1664
- modalRouting: {
1665
- isActive: boolean;
1666
- };
1667
- };
1668
- pathname: string;
1669
- search: string;
1670
- hash: string;
1671
- key?: string;
1672
- };
1656
+ export interface PublishableItemContents {
1657
+ [key: string]: PublishableItemContent;
1658
+ }
1659
+ export interface PublishableItem extends BaseItem {
1660
+ lease: LeaseInfo;
1661
+ id?: string;
1662
+ versionId?: VersionId;
1663
+ publishingDate?: string;
1664
+ deleted?: string;
1665
+ author?: Account;
1666
+ owner?: Account;
1667
+ onBehalfOf?: Account;
1668
+ contents?: PublishableItemContents;
1669
+ status?: WorkflowStatus;
1670
+ keywords?: {
1671
+ [key: string]: Keyword[];
1673
1672
  };
1674
- };
1675
- }
1676
- declare module "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack" {
1677
- export function useAnalyticsActivityTrack(shouldGetMainScrollableContainer?: boolean): void;
1678
- }
1679
- declare module "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack" {
1680
- export function useAnalyticsNavigateTrack(): void;
1681
- }
1682
- declare module "libs/reach/util/common/src/analytics/index" {
1683
- export * from "libs/reach/util/common/src/analytics/AnalyticsContextProvider";
1684
- export * from "libs/reach/util/common/src/analytics/analyticsUtils";
1685
- export * from "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack";
1686
- export * from "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack";
1687
- export * from "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider";
1688
- }
1689
- declare module "libs/reach/util/common/src/authorization/Authorization" {
1690
- import { CurrentUser, FeatureSet, SubscriptionSummary } from "libs/reach/util/common/src/index";
1691
- export interface UnauthorizedAccessToSubscriptionException {
1692
- validSubscriptions: SubscriptionSummary[];
1673
+ fileAccessToken?: string;
1674
+ bannerInfo?: BannerInfo;
1675
+ customProperties?: {
1676
+ [key: string]: any;
1677
+ };
1678
+ modifiedBy: Account;
1679
+ modified: string;
1680
+ created: string;
1681
+ publishedVersionId?: string;
1682
+ isCurrentPublishedVersion?: boolean;
1683
+ isLatestVersion?: boolean;
1684
+ permalink?: string;
1685
+ groupIds: string[];
1686
+ statistics?: ItemStatistics;
1687
+ useExternalContent?: boolean;
1688
+ isDemoContent?: boolean;
1689
+ isLiked?: boolean;
1690
+ }
1691
+ export interface ShareablePublishableItem extends PublishableItem {
1692
+ shareToken: ShareToken;
1693
+ }
1694
+ export interface ShareToken {
1695
+ published?: string;
1696
+ preview?: string;
1697
+ }
1698
+ export interface PublishableItemVersion extends PublishableItem {
1699
+ itemId: string;
1700
+ versionModificationDate: string;
1701
+ }
1702
+ export interface PollTranslation {
1703
+ questions: QuestionTranslations[];
1704
+ }
1705
+ export interface QuestionTranslations {
1706
+ questionId: string;
1707
+ text: string;
1708
+ choices: ChoiceTranslations[];
1709
+ }
1710
+ export interface ChoiceTranslations {
1711
+ choiceId: string;
1712
+ isOther: boolean;
1713
+ text: string;
1714
+ }
1715
+ export interface TaskSummary {
1716
+ readyCount: number;
1717
+ rejectedCount: number;
1718
+ draftCount: number;
1693
1719
  }
1694
- export function useAuthorizationValidator(func: (user: CurrentUser, features: FeatureSet) => boolean, isCheckingFeature?: boolean): void;
1695
- }
1696
- declare module "libs/reach/util/common/src/authorization/index" {
1697
- export * from "libs/reach/util/common/src/authorization/Authorization";
1698
1720
  }
1699
1721
  declare module "libs/reach/util/api-factory/src/apiUtils" {
1700
1722
  import { EnvironmentConfig } from "libs/shared/util/environment/src/index";
@@ -1753,16 +1775,66 @@ declare module "libs/reach/util/api-factory/src/index" {
1753
1775
  export * from "libs/reach/util/api-factory/src/gql/GraphQlClientProvider";
1754
1776
  export * from "libs/reach/util/api-factory/src/apiUtils";
1755
1777
  }
1756
- declare module "libs/reach/util/common/src/channels/useChannelsApi" {
1757
- import { Channel } from "libs/reach/util/common/src/channels/Channel";
1758
- export function useChannelsApi(): {
1759
- getChannels: () => Promise<Channel[]>;
1760
- getChannelsByItemId: (id: string, route?: string) => Promise<Channel[]>;
1778
+ declare module "libs/reach/util/common/src/user/UserUtils" {
1779
+ import { CurrentUser, GroupRoles, UserGroup, UserSummary } from "libs/reach/util/common/src/user/User";
1780
+ import { RequestUserInformation } from "libs/reach/util/common/src/user/RequestUserInformation";
1781
+ import { PublishableItem } from "libs/reach/util/common/src/content/PublishableItem";
1782
+ import { ClientFactoryInstance } from "libs/reach/util/api-factory/src/index";
1783
+ import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
1784
+ export function isSubscriptionDirectoryUser(user: UserSummary, subscription: SubscriptionSummary): boolean;
1785
+ export function hasMinRoleInSomeGroups(role: GroupRoles, user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): boolean;
1786
+ export function hasMinRoleInAllGroups(role: GroupRoles, user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): boolean;
1787
+ export function hasExplicitMinRoleInAllGroups(role: GroupRoles, user: CurrentUser, groupIds?: string[]): boolean;
1788
+ export function hasExplicitMinRoleInSomeGroups(role: GroupRoles, user: CurrentUser, groupIds?: string[]): boolean;
1789
+ export function getGroupsWithExplicitMinRole(role: GroupRoles, user: CurrentUser, isValid?: (group: UserGroup) => boolean): UserGroup[];
1790
+ export function getCommonMaxRole(user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): GroupRoles;
1791
+ export function getRequestUserInformation(factory: ClientFactoryInstance): Promise<RequestUserInformation>;
1792
+ export function hasPseudoEmail(userPrincipalName: string): boolean;
1793
+ export function isHiddenMail(mail: string): boolean;
1794
+ }
1795
+ declare module "libs/reach/util/common/src/user/useAccountApi" {
1796
+ import { Account, AccountType } from "libs/reach/util/common/src/user/Account";
1797
+ import { Observable } from 'rxjs';
1798
+ import { UserInfo } from "libs/reach/util/common/src/user/UserInfo";
1799
+ import { GroupRoles } from "libs/reach/util/common/src/user/User";
1800
+ export function useAccountApi(): {
1801
+ searchAccounts: (filter: {
1802
+ search: string;
1803
+ type: AccountType;
1804
+ includePendingInvitationUsers?: boolean;
1805
+ includePendingRegistrationUsers?: boolean;
1806
+ localOnly?: boolean;
1807
+ excludeApiUsers?: boolean;
1808
+ itemId?: string;
1809
+ minRole?: GroupRoles;
1810
+ searchInAllProperties?: boolean;
1811
+ groupId?: string[];
1812
+ }) => Promise<Account[]>;
1813
+ searchAccountsByItemId: (minRole: GroupRoles, itemId: string, searchText: string) => Promise<Account[]>;
1814
+ getUserInfo: (upn: string) => Promise<UserInfo>;
1815
+ getUserInfoById: (userId: string) => Promise<UserInfo>;
1816
+ getUserAvatarUrl: (upn: string, tenantId?: string) => Observable<string>;
1817
+ getUserAvatarUrlPromise: (upn: string, tenantId?: string) => Promise<string>;
1818
+ clearUserInfoCache: (upn: string) => void;
1819
+ clearUserAvatarCache: (upn: string) => void;
1761
1820
  };
1762
1821
  }
1763
- declare module "libs/reach/util/common/src/channels/index" {
1764
- export * from "libs/reach/util/common/src/channels/useChannelsApi";
1765
- export * from "libs/reach/util/common/src/channels/Channel";
1822
+ declare module "libs/reach/util/common/src/user/useCachedCurrentUserApi" {
1823
+ import { CurrentUser } from "libs/reach/util/common/src/user/index";
1824
+ export function useCachedCurrentUserApi(refresh: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>): {
1825
+ getCurrentUser: (subscriptionId: string) => Promise<any>;
1826
+ };
1827
+ }
1828
+ declare module "libs/reach/util/common/src/user/useCurrentUserApi" {
1829
+ import { CurrentUser, UpdatableUserProperties } from "libs/reach/util/common/src/user/User";
1830
+ import { Organization } from "libs/reach/util/common/src/user/Organization";
1831
+ export function useCurrentUserApi(): {
1832
+ getCurrentUser: (token?: string, essentialOnly?: boolean) => Promise<CurrentUser>;
1833
+ getCurrentOrganization: () => Promise<Organization>;
1834
+ updateCurrentUserProfileProperties: (newProperties: UpdatableUserProperties) => Promise<unknown>;
1835
+ updateCurrentUserAvatar: (subscriptionId: string, file: File) => Promise<unknown>;
1836
+ deleteCurrentUserAvatar: () => Promise<unknown>;
1837
+ };
1766
1838
  }
1767
1839
  declare module "libs/reach/util/common/src/content/ItemWithAttachments" {
1768
1840
  import { Attachment } from "libs/reach/util/common/src/content/Attachment";
@@ -1802,616 +1874,927 @@ declare module "libs/reach/util/common/src/content/Comment" {
1802
1874
  Posts = 2
1803
1875
  }
1804
1876
  }
1805
- declare module "libs/reach/util/common/src/content/ItemStatistics" {
1806
- export interface ItemStatistics {
1807
- commentCount?: number;
1808
- likeCount?: number;
1809
- readCount?: number;
1810
- confirmationCount?: number;
1811
- bookmarkCount?: number;
1812
- participantsCount?: number;
1813
- replyCount?: number;
1877
+ declare module "libs/reach/util/common/src/content/ItemResourceType" {
1878
+ export enum ItemResourceTypes {
1879
+ News = "news",
1880
+ Pages = "pages",
1881
+ Posts = "posts",
1882
+ Events = "events",
1883
+ Comments = "comments"
1814
1884
  }
1815
- }
1816
- declare module "libs/reach/util/common/src/content/NotificationSettings" {
1817
- export interface NotificationSettings {
1818
- isEnabled: boolean;
1885
+ export enum ItemType {
1886
+ News = 0,
1887
+ Post = 1,
1888
+ Page = 2,
1889
+ Event = 3
1819
1890
  }
1891
+ export type ItemTypeKeyType = keyof typeof ItemType;
1820
1892
  }
1821
- declare module "libs/reach/util/common/src/content/FeedbackSettings" {
1822
- export interface FeedbackSettings {
1823
- feedbackOptions: ReadonlyArray<Feedback>;
1893
+ declare module "libs/reach/util/common/src/content/EventItem" {
1894
+ import { Account } from "libs/reach/util/common/src/user/Account";
1895
+ import { PollResult } from "libs/reach/util/common/src/content/BaseItem";
1896
+ import { SchedulableItem } from "libs/reach/util/common/src/content/NewsItem";
1897
+ export enum EventResponse {
1898
+ NotSet = 0,
1899
+ Registered = 1,
1900
+ Declined = 2,
1901
+ WaitingList = 3
1824
1902
  }
1825
- export type Feedback = 'comment' | 'like' | 'confirm' | null;
1826
- }
1827
- declare module "libs/reach/util/common/src/content/NewsMetadata" {
1828
- import { NotificationSettings } from "libs/reach/util/common/src/content/NotificationSettings";
1829
- import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
1830
- export interface NewsMetadata {
1831
- mailNotificationSettings?: NotificationSettings;
1832
- pushNotificationSettings?: NotificationSettings;
1833
- feedbackSettings?: FeedbackSettings;
1903
+ export interface EventItem extends SchedulableItem {
1904
+ startDate?: string;
1905
+ endDate?: string;
1906
+ timeZone?: string;
1907
+ contacts?: Account[];
1908
+ registrationSettings?: EventRegistrationSettings;
1909
+ userResponse?: EventResponse;
1910
+ cancelInformation?: EventCancelInformation;
1911
+ locations?: EventLocation[];
1912
+ hasNewComments?: boolean;
1913
+ isLiked?: boolean;
1914
+ recurrenceSettings?: EventRecurrenceSettings;
1915
+ recurrenceSeriesId?: string;
1916
+ isSeriesMaster?: string;
1917
+ isVirtual?: boolean;
1918
+ isAllDayEvent?: boolean;
1834
1919
  }
1835
- }
1836
- declare module "libs/reach/util/common/src/content/KnownNewsState" {
1837
- export enum KnownNewsState {
1920
+ export interface EventRegistrationSettings {
1921
+ enableWaitingList?: boolean;
1922
+ enabled?: boolean;
1923
+ showParticipantsToEverybody?: boolean;
1924
+ deadline?: string;
1925
+ seriesMode?: SeriesRegistrationMode;
1926
+ }
1927
+ export enum SeriesRegistrationMode {
1838
1928
  None = 0,
1839
- Unconfirmed = 1,
1840
- Alert = 2
1929
+ FullSeries = 1,
1930
+ PerInstance = 2
1841
1931
  }
1842
- }
1843
- declare module "libs/reach/util/common/src/content/NewsItem" {
1844
- import { NewsMetadata } from "libs/reach/util/common/src/content/NewsMetadata";
1845
- import { KnownNewsState } from "libs/reach/util/common/src/content/KnownNewsState";
1846
- import { PublishableItem } from "libs/reach/util/common/src/content/PublishableItem";
1847
- import { Channel } from "libs/reach/util/common/src/channels/Channel";
1848
- export type Source = 'Condense' | 'External' | null;
1849
- export type VersionId = string;
1850
- export interface SchedulableItem extends PublishableItem {
1851
- metadata?: NewsMetadata;
1852
- channels?: Channel[];
1932
+ export interface EventCancelInformation {
1933
+ isCancelled?: boolean;
1934
+ modifiedOn?: string;
1935
+ modifiedBy?: Account;
1936
+ reasons?: EventCancelReasons;
1853
1937
  }
1854
- export interface NewsItem extends SchedulableItem {
1855
- source?: string;
1856
- alertOptions?: NewsItemAlertOptions;
1857
- expiryDate?: string;
1858
- knownState: KnownNewsState;
1859
- hasNewComments?: boolean;
1938
+ export interface EventCancelReasons {
1939
+ [language: string]: string;
1860
1940
  }
1861
- export interface NewsItemAlertOptions {
1862
- duration?: string;
1863
- endDate?: Date;
1864
- expireAfter?: boolean;
1941
+ export interface EventLocation {
1942
+ locationId: string;
1943
+ name: string;
1944
+ locationOnMap?: string;
1945
+ url?: string;
1946
+ maxNumberOfSeats?: number;
1947
+ readOnly?: boolean;
1865
1948
  }
1866
- export interface NewsItemVersion extends NewsItem {
1867
- newsId: string;
1868
- versionModificationDate: string;
1949
+ export interface EventRegistrationResult extends PollResult {
1950
+ locationAnswers: LocationResult[];
1869
1951
  }
1870
- }
1871
- declare module "libs/reach/util/common/src/content/VideoSource" {
1872
- export enum VideoSource {
1873
- YouTube = 0,
1874
- Vimeo = 1,
1875
- MicrosoftStream = 2,
1876
- GenericUrl = 3,
1877
- Kaltura = 4
1952
+ export interface LocationResult {
1953
+ locationId: string;
1954
+ count: number;
1878
1955
  }
1879
- export function convertStringToVideoSource(videoSource: string): VideoSource;
1880
- }
1881
- declare module "libs/reach/util/common/src/content/BaseItem" {
1882
- import { ItemStatistics } from "libs/reach/util/common/src/content/ItemStatistics";
1883
- export interface BaseItem {
1884
- id?: string;
1885
- statistics?: ItemStatistics;
1886
- poll?: Poll;
1887
- searchHighlights?: SearchHighlightSummary;
1956
+ export interface EventParticipant {
1957
+ displayName: string;
1958
+ upn: string;
1959
+ locationId: string;
1888
1960
  }
1889
- export interface SearchHighlightSummary {
1890
- title: SearchHighlight[];
1891
- content: SearchHighlight[];
1961
+ export interface EventRecurrenceSettings {
1962
+ frequency: RecurrenceFrequency;
1963
+ interval: number;
1964
+ weekDays: WeekDay;
1965
+ monthlyOccurrence: MonthlyOccurrence;
1966
+ yearlyOccurrence: MonthNumber;
1967
+ dayOfMonth: number;
1968
+ endDate?: string;
1892
1969
  }
1893
- export interface SearchHighlight {
1894
- language: string;
1895
- texts: {
1896
- value: string;
1897
- type: 'text' | 'hit';
1898
- }[];
1899
- score: number;
1970
+ export enum RecurrenceFrequency {
1971
+ NotSet = 0,
1972
+ Daily = 1,
1973
+ Weekly = 2,
1974
+ Monthly = 3,
1975
+ Yearly = 4
1900
1976
  }
1901
- export interface Poll {
1902
- questions: PollQuestion[];
1977
+ export enum WeekDay {
1978
+ None = 0,
1979
+ Monday = 1,
1980
+ Tuesday = 2,
1981
+ Wednesday = 4,
1982
+ Thursday = 8,
1983
+ Friday = 16,
1984
+ Saturday = 32,
1985
+ Sunday = 64
1903
1986
  }
1904
- export interface PollQuestion extends PollQuestionSettings {
1905
- questionId: string;
1906
- choices: PollQuestionChoice[];
1987
+ export enum MonthlyOccurrence {
1988
+ Unknown = 0,
1989
+ First = 1,
1990
+ Second = 2,
1991
+ Third = 3,
1992
+ Fourth = 4,
1993
+ Last = 5
1907
1994
  }
1908
- export interface PollQuestionSettings {
1909
- allowOtherAnswer?: boolean;
1910
- isMultiChoice?: boolean;
1995
+ export enum MonthNumber {
1996
+ None = 0,
1997
+ January = 1,
1998
+ February = 2,
1999
+ March = 3,
2000
+ April = 4,
2001
+ May = 5,
2002
+ June = 6,
2003
+ July = 7,
2004
+ August = 8,
2005
+ September = 9,
2006
+ October = 10,
2007
+ November = 11,
2008
+ December = 12
1911
2009
  }
1912
- export interface PollQuestionChoice {
1913
- choiceId: string;
1914
- description?: string;
1915
- disabled?: boolean;
1916
- isOther?: boolean;
2010
+ export interface EventRecurrenceInfo {
2011
+ id: string;
2012
+ startDate: string;
2013
+ endDate?: string;
1917
2014
  }
1918
- export interface PollQuestionAnswer {
1919
- choiceIds: string[];
1920
- freeTextAnswer?: string;
1921
- questionId: string;
2015
+ }
2016
+ declare module "libs/reach/util/common/src/content/PageItem" {
2017
+ import { DocumentFileInfo, PublishableItem, TitleContent } from "libs/reach/util/common/src/content/PublishableItem";
2018
+ import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
2019
+ import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
2020
+ export interface PageItem extends PublishableItem {
2021
+ feedbackSettings?: FeedbackSettings;
2022
+ parentId?: string;
2023
+ pathIds?: string[];
2024
+ position?: number;
2025
+ navigationContext?: PageNavigationContext;
2026
+ hasHiddenAncestor?: boolean;
2027
+ isUnlinked?: boolean;
2028
+ pageType?: PageType;
2029
+ firstChildId?: string;
2030
+ isGroupInheritanceBroken?: boolean;
1922
2031
  }
1923
- export interface QuestionResult {
1924
- choiceResults: {
1925
- [choiceId: string]: number;
2032
+ export interface ContentsSummary {
2033
+ [lang: string]: TitleContent & {
2034
+ fileInfo?: DocumentFileInfo;
1926
2035
  };
1927
- freeTextAnswer?: string;
1928
- showResults: boolean;
1929
- totalFeedbackCount: number;
1930
- userSelectedChoices: string[];
1931
2036
  }
1932
- export interface PollResult {
1933
- totalFeedbackCount?: number;
1934
- answers: PollQuestionResult[];
2037
+ export interface GroupInheritanceUpdateRequest {
2038
+ breakGroupInheritance: boolean;
1935
2039
  }
1936
- export interface PollChoiceResult {
1937
- choiceId: string;
1938
- count: number;
2040
+ export interface PageNavigationNode {
2041
+ id: string;
2042
+ contents?: ContentsSummary;
2043
+ parent?: PageNavigationNode;
2044
+ firstChildId?: string;
2045
+ children?: PageNavigationNode[];
2046
+ position?: number;
2047
+ status?: WorkflowStatus;
2048
+ hasPublishedVersion?: boolean;
2049
+ groupIds?: string[];
2050
+ hasHiddenAncestor?: boolean;
2051
+ isUnlinked?: boolean;
2052
+ hasAnyPageChild?: boolean;
2053
+ pageType?: PageType;
2054
+ useExternalContent?: boolean;
2055
+ isGroupInheritanceBroken?: boolean;
2056
+ isSearchMatch?: boolean;
2057
+ topLevelFolderName?: string;
2058
+ uploadToken?: string;
1939
2059
  }
1940
- export interface PollQuestionResult {
1941
- questionId: string;
1942
- choices: PollChoiceResult[];
2060
+ export interface PageNavigationContext {
2061
+ parent?: PageNavigationNode;
2062
+ siblings?: PageNavigationNode[];
2063
+ children?: PageNavigationNode[];
1943
2064
  }
1944
- }
1945
- declare module "libs/reach/util/common/src/content/WorkflowStatus" {
1946
- export enum WorkflowStatus {
1947
- draft = "draft",
1948
- ready = "ready",
1949
- rejected = "rejected",
1950
- approved = "approved",
1951
- deleted = "deleted"
2065
+ export enum PageType {
2066
+ Page = 0,
2067
+ Document = 1
2068
+ }
2069
+ export interface FolderDefinition {
2070
+ files: {
2071
+ path: string;
2072
+ fileId: string;
2073
+ }[];
2074
+ startPosition: number;
2075
+ parentPageId: string;
2076
+ groupIds: string[];
2077
+ isUnlinked: boolean;
2078
+ }
2079
+ export interface DocumentStructure {
2080
+ topLevelElements: Array<{
2081
+ pageId: string;
2082
+ title: string;
2083
+ firstChildId?: string;
2084
+ }>;
2085
+ files: {
2086
+ [filePath: string]: string;
2087
+ };
1952
2088
  }
1953
2089
  }
1954
- declare module "libs/reach/util/common/src/content/PublishableItem" {
2090
+ declare module "libs/reach/util/common/src/content/ResponseItem" {
1955
2091
  import { Account } from "libs/reach/util/common/src/user/Account";
1956
- import { Keyword } from "libs/reach/util/common/src/content/KeywordGroup";
1957
- import { ItemStatistics } from "libs/reach/util/common/src/content/ItemStatistics";
1958
- import { VersionId } from "libs/reach/util/common/src/content/NewsItem";
1959
- import { VideoSource } from "libs/reach/util/common/src/content/VideoSource";
1960
- import { BaseItem } from "libs/reach/util/common/src/content/BaseItem";
1961
- import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
1962
- export interface ContentDefinition {
1963
- active: boolean;
1964
- language: string;
1965
- }
1966
- export interface PublishableItemContent extends ContentDefinition {
2092
+ export interface ResponseItem {
2093
+ id?: string;
1967
2094
  title?: string;
1968
- headline?: string;
1969
- intro?: string;
1970
- body?: string;
1971
- customProperties?: {
1972
- [key: string]: any;
1973
- };
1974
- poll?: PollTranslation;
1975
- externalUrl?: string;
1976
- fileInfo?: DocumentFileInfo;
2095
+ errorMessage?: string;
2096
+ statusCode?: number;
2097
+ account?: Account;
1977
2098
  }
1978
- export interface DocumentFileInfo {
1979
- fileId: string;
1980
- mimeType: string;
1981
- fileName: string;
1982
- extension: string;
1983
- shouldOpenInBrowser?: boolean;
2099
+ }
2100
+ declare module "libs/reach/util/common/src/content/useFileApi" {
2101
+ import { ItemResourceTypes } from "libs/reach/util/common/src/content/ItemResourceType";
2102
+ export interface UploadStateDescription {
2103
+ id?: string;
2104
+ state?: UploadState;
2105
+ error?: any | FileTooBigError;
1984
2106
  }
1985
- export interface PageDocumentInfo extends DocumentFileInfo {
1986
- pageId: string;
1987
- title: string;
2107
+ export enum UploadState {
2108
+ unknown = 0,
2109
+ pending = 1,
2110
+ complete = 2,
2111
+ error = 3
1988
2112
  }
1989
- export interface TitleContent extends ContentDefinition {
2113
+ export class FileTooBigError extends Error {
2114
+ actualSizeInMb: number;
2115
+ maxSizeInMb: number;
2116
+ constructor(actualSizeInMb: number, maxSizeInMb: number);
2117
+ }
2118
+ export function getFileFormData(file: File, maxFileSizeInMb: number): FormData;
2119
+ export interface FileInfo {
2120
+ identifier: string;
2121
+ fileName: string;
1990
2122
  title?: string;
1991
- headline?: string;
2123
+ pageId?: string;
2124
+ extension?: string;
1992
2125
  }
1993
- export interface BannerInfo {
1994
- type: 'image' | 'video' | null;
1995
- videoSource?: VideoSource;
1996
- videoId?: string;
1997
- videoUrl?: string;
1998
- isDirectVideoUrl?: boolean;
1999
- imageId?: string;
2000
- altText?: string;
2126
+ export function useFileApi(): {
2127
+ getFileUrlWithToken: (fileDownloadToken: string, itemId: string, subscriptionId: string, fileId: string, originalFileName: string, resourceType: ItemResourceTypes) => string;
2128
+ uploadFile: (itemId: string, subscriptionId: string, resourceType: ItemResourceTypes, file: File, id: string) => Promise<FileInfo>;
2129
+ };
2130
+ }
2131
+ declare module "libs/reach/util/common/src/keywords/useKeywordsApi" {
2132
+ import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2133
+ export type KeywordsByGroupId = {
2134
+ [key: string]: Keyword[];
2135
+ };
2136
+ export function useKeywordsApi(): {
2137
+ getAllKeywords: (force?: boolean) => Promise<Keyword[]>;
2138
+ getAllKeywordsByGroupIds: () => Promise<KeywordsByGroupId>;
2139
+ getSelectedGroups: () => Promise<KeywordGroup[]>;
2140
+ getKeywordGroupsByItemId: (id: string, route?: string) => Promise<KeywordGroup[]>;
2141
+ };
2142
+ }
2143
+ declare module "libs/reach/util/common/src/content/content-keyword-utils" {
2144
+ import { KeywordsByGroupId } from "libs/reach/util/common/src/keywords/useKeywordsApi";
2145
+ import { CurrentUser } from "libs/reach/util/common/src/user/User";
2146
+ import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2147
+ export function getFlatKeywordList(keywords: KeywordsByGroupId): Keyword[];
2148
+ export function ensureMandatoryKeywords(mandatoryKeywords: Keyword[], allKeywords: Keyword[]): Keyword[];
2149
+ export function getGroupedKeywords(keywords: Keyword[]): {
2150
+ [key: string]: Keyword[];
2151
+ };
2152
+ export function getKeywordDisplayValue(keywordGroups: KeywordGroup[] | null, user: CurrentUser, groupId?: string, keywordName?: string, groupName?: string, language?: string): string;
2153
+ export function getKeywordTitle(user: CurrentUser, translations: {
2154
+ [key: string]: string;
2155
+ }, name: string, language?: string): string;
2156
+ export function getPreSelectedKeywords(keywords: Keyword[], mandatoryKeywords: Keyword[]): Keyword[];
2157
+ export function checkIfHasSameKeywords(keywordsArray1: Keyword[], keywordsArray2: Keyword[]): boolean;
2158
+ }
2159
+ declare module "libs/reach/util/common/src/content/useClearUnreadItems" {
2160
+ import { ItemResourceTypes } from "libs/reach/util/common/src/index";
2161
+ export interface onMarkAsReadHandlers {
2162
+ onStarted?: () => unknown;
2163
+ onFinished?: () => unknown;
2164
+ }
2165
+ export function useClearUnreadItems(itemType: ItemResourceTypes, handlers?: onMarkAsReadHandlers, unreadCount?: number): () => Promise<void>;
2166
+ }
2167
+ declare module "libs/reach/util/common/src/content/useClearUnreadOnlyFilter" {
2168
+ export function useClearUnreadOnlyFilter(): {
2169
+ clearUnreadOnlyFilter: () => void;
2170
+ };
2171
+ }
2172
+ declare module "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler" {
2173
+ export function useUnreadItemsTogglerHandler(): {
2174
+ toggleUnreadItems: () => void;
2175
+ };
2176
+ }
2177
+ declare module "libs/reach/util/common/src/content/index" {
2178
+ export * from "libs/reach/util/common/src/content/Attachment";
2179
+ export * from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2180
+ export * from "libs/reach/util/common/src/content/Comment";
2181
+ export * from "libs/reach/util/common/src/content/ItemResourceType";
2182
+ export * from "libs/reach/util/common/src/content/ItemWithAttachments";
2183
+ export * from "libs/reach/util/common/src/content/Language";
2184
+ export * from "libs/reach/util/common/src/content/PublishableItem";
2185
+ export * from "libs/reach/util/common/src/content/NewsItem";
2186
+ export * from "libs/reach/util/common/src/content/EventItem";
2187
+ export * from "libs/reach/util/common/src/content/PageItem";
2188
+ export * from "libs/reach/util/common/src/content/NewsMetadata";
2189
+ export * from "libs/reach/util/common/src/content/KnownNewsState";
2190
+ export * from "libs/reach/util/common/src/content/FeedbackSettings";
2191
+ export * from "libs/reach/util/common/src/content/WorkflowStatus";
2192
+ export * from "libs/reach/util/common/src/content/ResponseItem";
2193
+ export * from "libs/reach/util/common/src/content/BaseItem";
2194
+ export * from "libs/reach/util/common/src/content/VideoSource";
2195
+ export * from "libs/reach/util/common/src/content/KeywordGroup";
2196
+ export * from "libs/reach/util/common/src/content/ItemStatistics";
2197
+ export * from "libs/reach/util/common/src/content/useFileApi";
2198
+ export * from "libs/reach/util/common/src/content/content-keyword-utils";
2199
+ export * from "libs/reach/util/common/src/content/useClearUnreadItems";
2200
+ export * from "libs/reach/util/common/src/content/useClearUnreadOnlyFilter";
2201
+ export * from "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler";
2202
+ }
2203
+ declare module "libs/reach/util/common/src/useCacheLanguageApi" {
2204
+ export function useCacheLanguageApi(): {
2205
+ getLocalLanguage: () => Promise<string>;
2206
+ saveLanguageToLocalStorage: (language: string) => Promise<void>;
2207
+ saveLocaleToLocalStorage: (locale: string) => Promise<void>;
2208
+ getLocaleFromLocalStorage: () => Promise<string>;
2209
+ };
2210
+ }
2211
+ declare module "libs/reach/util/common/src/user/useManageCurrentUserApi" {
2212
+ import { CurrentUser, GroupNotificationSettings, NotificationTypeSettings, UserContact } from "libs/reach/util/common/src/user/User";
2213
+ import { ConversationScope, ItemResourceTypes } from "libs/reach/util/common/src/content/index";
2214
+ import { UserChannelSubscription } from "libs/reach/util/common/src/user/UserChannelSubscription";
2215
+ export function useManageCurrentUserApi(): {
2216
+ updateNotificationTypeSettings: (settings: NotificationTypeSettings) => Promise<unknown>;
2217
+ getFollowCommentsStatus: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => Promise<boolean>;
2218
+ toggleFollowComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope, enabled: boolean) => Promise<unknown>;
2219
+ followPublicPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2220
+ followEditorPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2221
+ followAllPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
2222
+ followPublishableItemComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => void;
2223
+ resolveSegment: (type: ItemResourceTypes, scope: ConversationScope) => string;
2224
+ getFollowCommentSegment: (type: ItemResourceTypes) => "news" | "page" | "event";
2225
+ toggleBookmark: (newsId: string, currentUser: CurrentUser) => Promise<boolean>;
2226
+ getUserProperties: () => Promise<{
2227
+ [key: string]: string;
2228
+ }>;
2229
+ setUserChannels: (channels: ReadonlyArray<UserChannelSubscription>) => Promise<any>;
2230
+ addContact: (contact: UserContact) => Promise<UserContact[]>;
2231
+ deleteContact: (contact: UserContact) => Promise<UserContact[]>;
2232
+ getContactAccounts: () => Promise<UserContact[]>;
2233
+ setLanguage: (uiLanguageCode: string) => Promise<any>;
2234
+ setContentLanguage: (contentLanguageCode: string) => Promise<void>;
2235
+ setLocale: (localeCode: string) => Promise<void>;
2236
+ getGroupNotificationSettings: (groupId: string) => Promise<GroupNotificationSettings>;
2237
+ updateGroupNotificationSettings: (groupId: string, groupNotificationSettings: GroupNotificationSettings) => Promise<unknown>;
2238
+ clearMyUnreadItems: (itemType: ItemResourceTypes) => Promise<void>;
2239
+ acceptTermsAndConditions: (approvedHash: string) => Promise<unknown>;
2240
+ deleteAccount: () => Promise<unknown>;
2241
+ };
2242
+ }
2243
+ declare module "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder" {
2244
+ export function useSubscriptionHandlePathBuilder(): {
2245
+ buildPath: (initialPath?: string) => string;
2246
+ subscriptionHandle: string;
2247
+ };
2248
+ }
2249
+ declare module "libs/reach/util/common/src/user/useSubscriptionWebAppUrl" {
2250
+ export function useSubscriptionWebAppUrl(): string;
2251
+ export function useSubscriptionWebAppUrls(): string[];
2252
+ }
2253
+ declare module "libs/reach/util/common/src/user/useUserAdminApi" {
2254
+ import { HashUser, SubscriptionJoinResult, UpdatableUserProperties, UserActivationResult, UserInvitationResult, UserSummary } from "libs/reach/util/common/src/user/User";
2255
+ import { Observable } from 'rxjs';
2256
+ import { Account } from "libs/reach/util/common/src/user/Account";
2257
+ import { SortDirection } from "libs/reach/util/common/src/SortDirection";
2258
+ import { PaginatedList } from "libs/reach/util/common/src/PaginatedList";
2259
+ export interface SortDefinition {
2260
+ sortColumn: string;
2261
+ sortDirection: SortDirection;
2262
+ }
2263
+ export interface UserFilterDefinition extends SortDefinition {
2264
+ searchText: string;
2265
+ includePendingInvitationUsers?: boolean;
2266
+ includePendingRegistrationUsers?: boolean;
2267
+ excludeRegularUsers?: boolean;
2268
+ }
2269
+ export interface UserAdminApi {
2270
+ getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2271
+ getUserByHash: (hash: string) => Promise<HashUser>;
2272
+ getUsersCsv: () => Promise<any>;
2273
+ sendActivationEmail: () => Promise<unknown>;
2274
+ activateUser: (hash: string) => Promise<UserActivationResult>;
2275
+ deleteUser: (userId: string) => Observable<unknown>;
2276
+ completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2277
+ inviteUser: (email: string) => Promise<UserInvitationResult>;
2278
+ inviteUsers: (users: Account[]) => Promise<string[]>;
2279
+ }
2280
+ export function useUserAdminApi(): {
2281
+ getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
2282
+ completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
2283
+ inviteUser: (email: string) => Promise<UserInvitationResult>;
2284
+ getUserByHash: (hash: string) => Promise<HashUser>;
2285
+ sendActivationEmail: () => Promise<unknown>;
2286
+ activateUser: (hash: string) => Promise<UserActivationResult>;
2287
+ deleteUser: (userId: string) => Observable<unknown>;
2288
+ inviteUsers: (users: Account[]) => Promise<string[]>;
2289
+ getUsersCsv: () => Promise<any>;
2290
+ updateUserProfilePropertiesByUPN: (upn: string, newProperties: UpdatableUserProperties) => Promise<unknown>;
2291
+ updateUserAvatarByUPN: (upn: string, subscriptionId: string, file?: File) => Promise<unknown>;
2292
+ deleteUserAvatarByUPN: (upn: string) => Promise<unknown>;
2293
+ importUsers: (file: File) => Promise<SubscriptionJoinResult[]>;
2294
+ refreshApiKey: (apiKeyId: string, expiryDate: string) => Promise<Response>;
2295
+ requestApiKey: (email: string, displayName: string, expiryDate: string) => Promise<Response>;
2296
+ };
2297
+ }
2298
+ declare module "libs/reach/util/common/src/user/index" {
2299
+ export * from "libs/reach/util/common/src/user/features/FeatureSet";
2300
+ export * from "libs/reach/util/common/src/user/features/WithFeatures";
2301
+ export * from "libs/reach/util/common/src/user/Account";
2302
+ export * from "libs/reach/util/common/src/user/Audience";
2303
+ export * from "libs/reach/util/common/src/user/BasicUserInformation";
2304
+ export * from "libs/reach/util/common/src/user/CurrentUserContext";
2305
+ export * from "libs/reach/util/common/src/user/CurrentUserDetailContextProvider";
2306
+ export * from "libs/reach/util/common/src/user/CurrentUserDetailLibContextProvider";
2307
+ export * from "libs/reach/util/common/src/user/Group";
2308
+ export * from "libs/reach/util/common/src/user/LanguageUtils";
2309
+ export * from "libs/reach/util/common/src/user/Member";
2310
+ export * from "libs/reach/util/common/src/user/Organization";
2311
+ export * from "libs/reach/util/common/src/user/Subscription";
2312
+ export * from "libs/reach/util/common/src/user/User";
2313
+ export * from "libs/reach/util/common/src/user/UserChannelSubscription";
2314
+ export * from "libs/reach/util/common/src/user/UserInfo";
2315
+ export * from "libs/reach/util/common/src/user/UserUtils";
2316
+ export * from "libs/reach/util/common/src/user/content-languages-util";
2317
+ export * from "libs/reach/util/common/src/user/useAccountApi";
2318
+ export * from "libs/reach/util/common/src/user/useCachedCurrentUserApi";
2319
+ export * from "libs/reach/util/common/src/user/useCurrentUser";
2320
+ export * from "libs/reach/util/common/src/user/useCurrentUserApi";
2321
+ export * from "libs/reach/util/common/src/user/useCurrentUserCache";
2322
+ export * from "libs/reach/util/common/src/user/useManageCurrentUserApi";
2323
+ export * from "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder";
2324
+ export * from "libs/reach/util/common/src/user/useSubscriptionWebAppUrl";
2325
+ export * from "libs/reach/util/common/src/user/useUserAdminApi";
2326
+ }
2327
+ declare module "libs/reach/util/common/src/channels/Channel" {
2328
+ import { GroupRoles } from "libs/reach/util/common/src/user/index";
2329
+ export interface Channel {
2330
+ groups?: ChannelGroups[];
2331
+ id: string;
2332
+ name: string;
2333
+ translations?: {
2334
+ [key: string]: string;
2335
+ };
2001
2336
  }
2002
- export interface LeaseInfo {
2003
- leaseId: string | null;
2004
- user: Account;
2337
+ export interface ChannelGroups {
2338
+ groupId: string;
2339
+ permission: GroupRoles;
2005
2340
  }
2006
- export interface ItemVersionSummary {
2007
- versionId: string;
2008
- itemId: string;
2009
- modifiedBy: Account;
2010
- versionModificationDate: string;
2011
- status?: WorkflowStatus;
2012
- isCurrentPublishedVersion: boolean;
2341
+ }
2342
+ declare module "libs/reach/util/common/src/user/Subscription" {
2343
+ import { Resources } from "libs/reach/util/context/src/index";
2344
+ import { Account } from "libs/reach/util/common/src/user/Account";
2345
+ import { Audience } from "libs/reach/util/common/src/user/Audience";
2346
+ import { CurrentUser, NotificationType } from "libs/reach/util/common/src/user/User";
2347
+ import { IdentityProviderNames, IdentityProviderSettings, SubscriptionInfo as BaseSubscriptionInfo } from "libs/shared/util/authentication/src/index";
2348
+ import { Language, LanguageBase } from "libs/reach/util/common/src/content/Language";
2349
+ import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2350
+ import { Channel } from "libs/reach/util/common/src/channels/Channel";
2351
+ import { ItemType } from "libs/reach/util/common/src/content/ItemResourceType";
2352
+ export interface DirectoryConfiguration extends DirectoryConfigurationPatch {
2353
+ domains?: string[];
2354
+ tenantId: string;
2355
+ organization?: string;
2356
+ hasAdminConsent: boolean;
2357
+ hasTeamsAdminConsent: boolean;
2358
+ allowAccessToExternalUsers: boolean;
2013
2359
  }
2014
- export interface PublishableItemContents {
2015
- [key: string]: PublishableItemContent;
2360
+ export interface DirectoryConfigurationPatch {
2361
+ hasAdminConsent?: boolean;
2362
+ hasTeamsAdminConsent?: boolean;
2363
+ allowAccessToExternalUsers?: boolean;
2016
2364
  }
2017
- export interface PublishableItem extends BaseItem {
2018
- lease: LeaseInfo;
2019
- id?: string;
2020
- versionId?: VersionId;
2021
- publishingDate?: string;
2022
- deleted?: string;
2023
- author?: Account;
2024
- owner?: Account;
2025
- onBehalfOf?: Account;
2026
- contents?: PublishableItemContents;
2027
- status?: WorkflowStatus;
2028
- keywords?: {
2029
- [key: string]: Keyword[];
2030
- };
2031
- fileAccessToken?: string;
2032
- bannerInfo?: BannerInfo;
2033
- customProperties?: {
2034
- [key: string]: any;
2365
+ export interface SubscriptionCreationInfo {
2366
+ mail?: string;
2367
+ subscriptionName?: string;
2368
+ region?: string;
2369
+ skipDemoContent?: boolean;
2370
+ specificDemoSubscriptionId?: string;
2371
+ password?: string;
2372
+ firstName?: string;
2373
+ lastName?: string;
2374
+ additionalInformation?: {
2375
+ [key: string]: string | string[];
2035
2376
  };
2036
- modifiedBy: Account;
2037
- modified: string;
2038
- created: string;
2039
- publishedVersionId?: string;
2040
- isCurrentPublishedVersion?: boolean;
2041
- isLatestVersion?: boolean;
2042
- permalink?: string;
2043
- groupIds: string[];
2044
- statistics?: ItemStatistics;
2045
- useExternalContent?: boolean;
2046
- isDemoContent?: boolean;
2047
- isLiked?: boolean;
2048
2377
  }
2049
- export interface ShareablePublishableItem extends PublishableItem {
2050
- shareToken: ShareToken;
2051
- }
2052
- export interface ShareToken {
2053
- published?: string;
2054
- preview?: string;
2055
- }
2056
- export interface PublishableItemVersion extends PublishableItem {
2057
- itemId: string;
2058
- versionModificationDate: string;
2059
- }
2060
- export interface PollTranslation {
2061
- questions: QuestionTranslations[];
2378
+ export interface SubscriptionInfo extends BaseSubscriptionInfo {
2379
+ allowSelfRegistration?: boolean;
2380
+ useInAppBrowser?: boolean;
2381
+ tenantId?: string;
2382
+ signInSettings?: SignInSettings;
2383
+ faviconUrl?: string;
2384
+ theme?: Theme;
2385
+ allowPublicAccess?: boolean;
2386
+ redirectToContent?: boolean;
2387
+ allowZendesk?: boolean;
2388
+ logoInfo: LogoInfo;
2062
2389
  }
2063
- export interface QuestionTranslations {
2064
- questionId: string;
2065
- text: string;
2066
- choices: ChoiceTranslations[];
2390
+ export interface SignInSettings {
2391
+ customIdentityProviders: IdentityProviderSettings[];
2392
+ identityProviders: IdentityProviderNames[];
2393
+ customResources: Resources;
2067
2394
  }
2068
- export interface ChoiceTranslations {
2069
- choiceId: string;
2070
- isOther: boolean;
2071
- text: string;
2395
+ export interface BaseSubscription {
2396
+ id: string;
2397
+ subscriptionName: string;
2398
+ subscriptionHandle?: string;
2399
+ contact: Account;
2400
+ theme: Theme;
2401
+ defaultLanguage: string;
2402
+ faviconUrl?: string;
2403
+ navigation: NavigationNode[];
2404
+ regionSettings?: RegionSettings;
2405
+ signInSettings?: SignInSettings;
2406
+ useInAppBrowser?: boolean;
2407
+ hasUnreadItems: boolean;
2408
+ pageTrackingInfo: PageTrackingInfo;
2409
+ termsAndConditionsHash?: string;
2410
+ logoInfo: LogoInfo;
2072
2411
  }
2073
- export interface TaskSummary {
2074
- readyCount: number;
2075
- rejectedCount: number;
2076
- draftCount: number;
2412
+ export interface EssentialSubscriptionData {
2413
+ channels: Channel[];
2414
+ keywords: Keyword[];
2415
+ keywordGroups: KeywordGroup[];
2077
2416
  }
2078
- }
2079
- declare module "libs/reach/util/common/src/content/EventItem" {
2080
- import { Account } from "libs/reach/util/common/src/user/Account";
2081
- import { PollResult } from "libs/reach/util/common/src/content/BaseItem";
2082
- import { SchedulableItem } from "libs/reach/util/common/src/content/NewsItem";
2083
- export enum EventResponse {
2084
- NotSet = 0,
2085
- Registered = 1,
2086
- Declined = 2,
2087
- WaitingList = 3
2417
+ export enum LogoSize {
2418
+ large = "large",
2419
+ small = "small"
2088
2420
  }
2089
- export interface EventItem extends SchedulableItem {
2090
- startDate?: string;
2091
- endDate?: string;
2092
- timeZone?: string;
2093
- contacts?: Account[];
2094
- registrationSettings?: EventRegistrationSettings;
2095
- userResponse?: EventResponse;
2096
- cancelInformation?: EventCancelInformation;
2097
- locations?: EventLocation[];
2098
- hasNewComments?: boolean;
2099
- isLiked?: boolean;
2100
- recurrenceSettings?: EventRecurrenceSettings;
2101
- recurrenceSeriesId?: string;
2102
- isSeriesMaster?: string;
2103
- isVirtual?: boolean;
2104
- isAllDayEvent?: boolean;
2421
+ export interface LogoInfo {
2422
+ smallUrl: string;
2423
+ largeUrl: string;
2424
+ isLegacyLogo: boolean;
2105
2425
  }
2106
- export interface EventRegistrationSettings {
2107
- enableWaitingList?: boolean;
2108
- enabled?: boolean;
2109
- showParticipantsToEverybody?: boolean;
2110
- deadline?: string;
2111
- seriesMode?: SeriesRegistrationMode;
2426
+ export interface TermsAndConditions {
2427
+ value?: string;
2428
+ hash?: string;
2429
+ modifiedBy?: CurrentUser;
2430
+ modified?: string;
2112
2431
  }
2113
- export enum SeriesRegistrationMode {
2114
- None = 0,
2115
- FullSeries = 1,
2116
- PerInstance = 2
2432
+ export interface PageTrackingInfo {
2433
+ type: string;
2434
+ key: string;
2117
2435
  }
2118
- export interface EventCancelInformation {
2119
- isCancelled?: boolean;
2120
- modifiedOn?: string;
2121
- modifiedBy?: Account;
2122
- reasons?: EventCancelReasons;
2436
+ export interface RegionSettings {
2437
+ name: string;
2438
+ contentRegion: string;
2123
2439
  }
2124
- export interface EventCancelReasons {
2125
- [language: string]: string;
2440
+ export interface SubscriptionSummary extends BaseSubscription {
2441
+ languages: LanguageBase[];
2442
+ featureMask: string;
2443
+ company: string;
2444
+ directories: DirectoryConfiguration[];
2445
+ webPluginDefinitions: WebPluginDefinition[];
2446
+ userPropertyDefinitions: UserPropertyDefinition[];
2447
+ customDomain?: string;
2448
+ allowSelfRegistration?: boolean;
2449
+ brandFolderConfig?: BrandFolderConfig;
2450
+ hideSubscriptionName?: boolean;
2126
2451
  }
2127
- export interface EventLocation {
2128
- locationId: string;
2129
- name: string;
2130
- locationOnMap?: string;
2131
- url?: string;
2132
- maxNumberOfSeats?: number;
2133
- readOnly?: boolean;
2452
+ export interface BrandFolderConfig {
2453
+ sections?: string[];
2134
2454
  }
2135
- export interface EventRegistrationResult extends PollResult {
2136
- locationAnswers: LocationResult[];
2455
+ export interface AdminSubscription extends BaseSubscription {
2456
+ roleMapping: any;
2457
+ createdBy: string;
2458
+ languages: Language[];
2459
+ webHooks: WebHook[];
2460
+ audience: Audience[];
2461
+ directories: DirectoryConfiguration[];
2462
+ selfRegistration: SelfRegistrationOptions;
2463
+ customBrandingIdentifier?: string;
2464
+ customNotificationSettings?: {
2465
+ [key in ItemType]: string | null;
2466
+ };
2137
2467
  }
2138
- export interface LocationResult {
2139
- locationId: string;
2140
- count: number;
2468
+ export interface SelfRegistrationOptions {
2469
+ enabled?: boolean;
2141
2470
  }
2142
- export interface EventParticipant {
2143
- displayName: string;
2144
- upn: string;
2145
- locationId: string;
2471
+ export interface CreateSubscriptionResult {
2472
+ subscription: AdminSubscription;
2473
+ temporaryUserApiToken: string;
2146
2474
  }
2147
- export interface EventRecurrenceSettings {
2148
- frequency: RecurrenceFrequency;
2149
- interval: number;
2150
- weekDays: WeekDay;
2151
- monthlyOccurrence: MonthlyOccurrence;
2152
- yearlyOccurrence: MonthNumber;
2153
- dayOfMonth: number;
2154
- endDate?: string;
2475
+ export enum LinkDirectoryResultType {
2476
+ Success = 1,
2477
+ InvalidHash = 2,
2478
+ OneDirectoryLimit = 3,
2479
+ CurrentTenantAlreadyLinked = 4
2155
2480
  }
2156
- export enum RecurrenceFrequency {
2157
- NotSet = 0,
2158
- Daily = 1,
2159
- Weekly = 2,
2160
- Monthly = 3,
2161
- Yearly = 4
2481
+ export interface LinkDirectoryResult {
2482
+ type: LinkDirectoryResultType;
2483
+ message?: string;
2484
+ verificationHash?: string;
2485
+ subscriptionId?: string;
2162
2486
  }
2163
- export enum WeekDay {
2164
- None = 0,
2165
- Monday = 1,
2166
- Tuesday = 2,
2167
- Wednesday = 4,
2168
- Thursday = 8,
2169
- Friday = 16,
2170
- Saturday = 32,
2171
- Sunday = 64
2487
+ export interface Theme {
2488
+ name: string;
2489
+ primaryColor: string;
2490
+ secondaryColor: string;
2491
+ useHighlightColorOnWhiteBackground?: boolean;
2172
2492
  }
2173
- export enum MonthlyOccurrence {
2174
- Unknown = 0,
2175
- First = 1,
2176
- Second = 2,
2177
- Third = 3,
2178
- Fourth = 4,
2179
- Last = 5
2493
+ export interface WebHook {
2494
+ id: string;
2495
+ url: string;
2496
+ description: string;
2497
+ eventTypes: string[];
2180
2498
  }
2181
- export enum MonthNumber {
2182
- None = 0,
2183
- January = 1,
2184
- February = 2,
2185
- March = 3,
2186
- April = 4,
2187
- May = 5,
2188
- June = 6,
2189
- July = 7,
2190
- August = 8,
2191
- September = 9,
2192
- October = 10,
2193
- November = 11,
2194
- December = 12
2499
+ export interface NavigationNode {
2500
+ key: string;
2501
+ label: string;
2502
+ translations?: {
2503
+ [key: string]: string;
2504
+ };
2195
2505
  }
2196
- export interface EventRecurrenceInfo {
2506
+ export type PluginSettings = {
2507
+ [key: string]: string;
2508
+ };
2509
+ export interface WebPluginDefinition {
2510
+ pluginId: string;
2511
+ extensions: PluginExtension[];
2512
+ notifications?: PluginNotificationDefinitions[];
2513
+ settings: {
2514
+ [key: string]: string;
2515
+ };
2516
+ isGlobal?: boolean;
2517
+ bundleUrl?: string;
2518
+ bundleModificationDate?: string;
2519
+ subscriptionId?: string;
2520
+ environment?: string;
2521
+ }
2522
+ export interface PluginInfo extends WebPluginDefinition {
2523
+ pluginSubscriptions: PluginSubscription[];
2197
2524
  id: string;
2198
- startDate: string;
2199
- endDate?: string;
2200
2525
  }
2201
- }
2202
- declare module "libs/reach/util/common/src/content/PageItem" {
2203
- import { DocumentFileInfo, PublishableItem, TitleContent } from "libs/reach/util/common/src/content/PublishableItem";
2204
- import { FeedbackSettings } from "libs/reach/util/common/src/content/FeedbackSettings";
2205
- import { WorkflowStatus } from "libs/reach/util/common/src/content/WorkflowStatus";
2206
- export interface PageItem extends PublishableItem {
2207
- feedbackSettings?: FeedbackSettings;
2208
- parentId?: string;
2209
- pathIds?: string[];
2210
- position?: number;
2211
- navigationContext?: PageNavigationContext;
2212
- hasHiddenAncestor?: boolean;
2213
- isUnlinked?: boolean;
2214
- pageType?: PageType;
2215
- firstChildId?: string;
2216
- isGroupInheritanceBroken?: boolean;
2526
+ export interface PluginSubscription {
2527
+ subscriptionId: string;
2528
+ subscriptionName: string;
2217
2529
  }
2218
- export interface ContentsSummary {
2219
- [lang: string]: TitleContent & {
2220
- fileInfo?: DocumentFileInfo;
2530
+ export enum ExtensionArea {
2531
+ global = "Global",
2532
+ page = "Page",
2533
+ eventEditorFeedbackSection = "EventEditorFeedbackSection",
2534
+ eventDetailViewSection = "EventDetailViewSection",
2535
+ itemEditor = "ItemEditor",
2536
+ newsEditorFeedbackSection = "NewsEditorFeedbackSection",
2537
+ newsOverviewCardSection = "NewsOverviewCardSection"
2538
+ }
2539
+ export type InlinePlugin = {
2540
+ area: ExtensionArea.itemEditor;
2541
+ objectButton: PluginObjectButton;
2542
+ };
2543
+ export type PagePlugin = {
2544
+ area: ExtensionArea.page;
2545
+ route: string;
2546
+ navigationNode?: {
2547
+ componentName?: string;
2548
+ iconName?: string;
2549
+ label?: string;
2550
+ translations?: {
2551
+ [key: string]: string;
2552
+ };
2553
+ };
2554
+ };
2555
+ export type PluginExtension = {
2556
+ area: ExtensionArea;
2557
+ componentName: string;
2558
+ } & (InlinePlugin | PagePlugin);
2559
+ export type PluginObjectButton = {
2560
+ buttonLabel: {
2561
+ defaultLabel: string;
2562
+ translations?: {
2563
+ [key: string]: string;
2564
+ };
2565
+ };
2566
+ iconName: string;
2567
+ };
2568
+ export interface PluginNotificationDefinitions {
2569
+ key: string;
2570
+ title: string;
2571
+ titleTranslations?: {
2572
+ [key: string]: string;
2573
+ };
2574
+ description?: string;
2575
+ descriptionTranslations?: {
2576
+ [key: string]: string;
2221
2577
  };
2578
+ possibleNotificationTypes: NotificationType;
2222
2579
  }
2223
- export interface GroupInheritanceUpdateRequest {
2224
- breakGroupInheritance: boolean;
2580
+ export interface UserPropertyDefinition {
2581
+ name: string;
2582
+ label?: string;
2583
+ translations?: {
2584
+ [key: string]: string;
2585
+ };
2586
+ type?: FieldType;
2587
+ mode?: FieldMode;
2225
2588
  }
2226
- export interface PageNavigationNode {
2227
- id: string;
2228
- contents?: ContentsSummary;
2229
- parent?: PageNavigationNode;
2230
- firstChildId?: string;
2231
- children?: PageNavigationNode[];
2232
- position?: number;
2233
- status?: WorkflowStatus;
2234
- hasPublishedVersion?: boolean;
2235
- groupIds?: string[];
2236
- hasHiddenAncestor?: boolean;
2237
- isUnlinked?: boolean;
2238
- hasAnyPageChild?: boolean;
2239
- pageType?: PageType;
2240
- useExternalContent?: boolean;
2241
- isGroupInheritanceBroken?: boolean;
2242
- isSearchMatch?: boolean;
2243
- topLevelFolderName?: string;
2244
- uploadToken?: string;
2589
+ export enum FieldType {
2590
+ Unknown = 0,
2591
+ Text = 1,
2592
+ MultilineText = 2
2245
2593
  }
2246
- export interface PageNavigationContext {
2247
- parent?: PageNavigationNode;
2248
- siblings?: PageNavigationNode[];
2249
- children?: PageNavigationNode[];
2594
+ export enum FieldMode {
2595
+ Unknown = 0,
2596
+ AdminOnly = 1,
2597
+ UserEditable = 2,
2598
+ Hidden = 3
2250
2599
  }
2251
- export enum PageType {
2252
- Page = 0,
2253
- Document = 1
2600
+ }
2601
+ declare module "libs/reach/util/common/src/common-utils" {
2602
+ import { BaseSubscription, LogoInfo, SubscriptionInfo, SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
2603
+ import { IntlShape } from 'react-intl';
2604
+ export function getMainScrollableContainer(): HTMLElement;
2605
+ export enum LinkType {
2606
+ Internal = "internal",
2607
+ External = "external",
2608
+ Download = "download"
2254
2609
  }
2255
- export interface FolderDefinition {
2256
- files: {
2257
- path: string;
2258
- fileId: string;
2259
- }[];
2260
- startPosition: number;
2261
- parentPageId: string;
2262
- groupIds: string[];
2263
- isUnlinked: boolean;
2610
+ export const uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}";
2611
+ export const DefaultSubscriptionName = "LiveTiles Reach";
2612
+ export function getSubscriptionNameForList(subscription: SubscriptionSummary, intl: IntlShape): string;
2613
+ export function getSubscriptionName(subscription: SubscriptionSummary): string;
2614
+ export function getSubscriptionLogoInfoAndName(subscription: SubscriptionInfo | BaseSubscription): {
2615
+ logoInfo: LogoInfo;
2616
+ subscriptionName: string;
2617
+ };
2618
+ }
2619
+ declare module "libs/reach/util/common/src/analytics/analyticsUtils" {
2620
+ export enum AnalyticsInteractionEvents {
2621
+ embeddedVideo = "embedded-video",
2622
+ embeddedAudio = "embedded-audio",
2623
+ languageChange = "language-change",
2624
+ eventRegistration = "event-registration",
2625
+ eventWaitingList = "event-waiting-list",
2626
+ eventSeriesRegistration = "event-series-registration",
2627
+ eventSeriesWaitingList = "event-series-waiting-list",
2628
+ translateContent = "translate-content",
2629
+ downloadFile = "download-file",
2630
+ embeddedIframe = "embedded-iframe",
2631
+ externalLink = "external-link",
2632
+ follow = "follow",
2633
+ bookmark = "bookmark"
2634
+ }
2635
+ export enum AnalyticsActions {
2636
+ click = "click",
2637
+ navigate = "navigate",
2638
+ view = "view",
2639
+ search = "search"
2640
+ }
2641
+ export enum AnalyticsModuleType {
2642
+ Admin = "admin",
2643
+ Chat = "chat",
2644
+ Comments = "comments",
2645
+ Events = "events",
2646
+ Search = "search",
2647
+ News = "news",
2648
+ Pages = "pages",
2649
+ People = "people",
2650
+ Posts = "posts",
2651
+ Stream = "stream",
2652
+ User = "user"
2264
2653
  }
2265
- export interface DocumentStructure {
2266
- topLevelElements: Array<{
2267
- pageId: string;
2268
- title: string;
2269
- firstChildId?: string;
2270
- }>;
2271
- files: {
2272
- [filePath: string]: string;
2273
- };
2654
+ export enum AnalyticsModuleSubtype {
2655
+ AllChats = "allChats",
2656
+ AllNews = "allNews",
2657
+ AllPosts = "allPosts",
2658
+ Bookmarks = "bookmarks",
2659
+ Channel = "channel",
2660
+ Channels = "channels",
2661
+ ChatConversation = "conversation",
2662
+ Customization = "customization",
2663
+ DetailView = "detailView",
2664
+ DirectoryConfig = "directoryConfiguration",
2665
+ Group = "group",
2666
+ Groups = "groups",
2667
+ Keywords = "keywords",
2668
+ Languages = "languages",
2669
+ MyNews = "myNews",
2670
+ Owners = "owners",
2671
+ Preview = "preview",
2672
+ RootPages = "rootPages",
2673
+ Search = "search",
2674
+ SelfRegistration = "selfRegistration",
2675
+ TargetAudience = "targetAudience",
2676
+ UpcomingEvents = "upcoming",
2677
+ BookedEvents = "booked",
2678
+ PastEvents = "past",
2679
+ Users = "users",
2680
+ WebHooks = "webHooks",
2681
+ Editor = "editor"
2274
2682
  }
2683
+ export function sanitizeQueryParamsForDownloadLinks(url: string): string;
2275
2684
  }
2276
- declare module "libs/reach/util/common/src/content/ResponseItem" {
2277
- import { Account } from "libs/reach/util/common/src/user/Account";
2278
- export interface ResponseItem {
2279
- id?: string;
2280
- title?: string;
2281
- errorMessage?: string;
2282
- statusCode?: number;
2283
- account?: Account;
2284
- }
2685
+ declare module "libs/reach/util/common/src/analytics/useLinkInteraction" {
2686
+ export function useLinkInteraction(element: HTMLElement): void;
2285
2687
  }
2286
- declare module "libs/reach/util/common/src/content/useFileApi" {
2287
- import { ItemResourceTypes } from "libs/reach/util/common/src/content/ItemResourceType";
2288
- export interface UploadStateDescription {
2289
- id?: string;
2290
- state?: UploadState;
2291
- error?: any | FileTooBigError;
2292
- }
2293
- export enum UploadState {
2294
- unknown = 0,
2295
- pending = 1,
2296
- complete = 2,
2297
- error = 3
2688
+ declare module "libs/reach/util/common/src/analytics/useIframeInteraction" {
2689
+ export function useIframeInteraction(element: HTMLElement): void;
2690
+ }
2691
+ declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider" {
2692
+ import { FC } from 'react';
2693
+ import { EventModule } from '@livetiles/analytics';
2694
+ export const AnalyticsModuleContext: import("react").Context<EventModule>;
2695
+ export const AnalyticsModuleContextProvider: FC<{
2696
+ module: EventModule;
2697
+ }>;
2698
+ }
2699
+ declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2700
+ import { Dispatch, FC, SetStateAction } from 'react';
2701
+ import { Analytics, EventModule, InteractionProperties, EventSearch, EventItem } from '@livetiles/analytics';
2702
+ export interface SearchAnalytics {
2703
+ data: EventSearch[];
2704
+ onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
2705
+ onItemRead: (itemId: string) => void;
2298
2706
  }
2299
- export class FileTooBigError extends Error {
2300
- actualSizeInMb: number;
2301
- maxSizeInMb: number;
2302
- constructor(actualSizeInMb: number, maxSizeInMb: number);
2707
+ export interface ContextualProperties {
2708
+ item?: EventItem | null;
2709
+ module: EventModule | null;
2303
2710
  }
2304
- export function getFileFormData(file: File, maxFileSizeInMb: number): FormData;
2305
- export interface FileInfo {
2306
- identifier: string;
2307
- fileName: string;
2308
- title?: string;
2309
- pageId?: string;
2310
- extension?: string;
2711
+ export interface ContextualPropertiesAnalytics {
2712
+ contextualProperties: ContextualProperties;
2713
+ setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
2311
2714
  }
2312
- export function useFileApi(): {
2313
- getFileUrlWithToken: (fileDownloadToken: string, itemId: string, subscriptionId: string, fileId: string, originalFileName: string, resourceType: ItemResourceTypes) => string;
2314
- uploadFile: (itemId: string, subscriptionId: string, resourceType: ItemResourceTypes, file: File, id: string) => Promise<FileInfo>;
2715
+ export type ReachAnalytics = Analytics & ContextualPropertiesAnalytics & SearchAnalytics;
2716
+ export const AnalyticsContext: import("react").Context<ReachAnalytics>;
2717
+ export function useAnalyticsContext(): {
2718
+ interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
2719
+ load: (context: import("@livetiles/analytics").AnalyticsContext, baseUrl: string) => void;
2720
+ getUser: () => import("@segment/analytics-next").User;
2721
+ identify: (userId: string, traits?: Record<string, unknown>) => void;
2722
+ activity: (payload: import("@livetiles/analytics").ActivityProperties) => import("@livetiles/analytics").Activity;
2723
+ contextualProperties: ContextualProperties;
2724
+ setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
2725
+ data: EventSearch[];
2726
+ onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
2727
+ onItemRead: (itemId: string) => void;
2315
2728
  };
2729
+ export const AnalyticsLibraryContextProvider: FC<{
2730
+ appName?: string;
2731
+ }>;
2732
+ export const AnalyticsContextProvider: FC;
2733
+ export const AdditionalAnalyticsTracking: FC;
2734
+ export const AnalyticsDummyContextProvider: FC;
2316
2735
  }
2317
- declare module "libs/reach/util/common/src/keywords/useKeywordsApi" {
2318
- import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2319
- export type KeywordsByGroupId = {
2320
- [key: string]: Keyword[];
2736
+ declare module "libs/reach/util/common/src/useModalRouting" {
2737
+ export interface ModalRouting {
2738
+ isActive: boolean;
2739
+ itemId: string;
2740
+ backgroundLocation: any;
2741
+ }
2742
+ export function useModalRouting(): {
2743
+ isModalRoutingActive: boolean;
2744
+ modalItemId: string;
2745
+ backgroundLocation: any;
2321
2746
  };
2322
- export function useKeywordsApi(): {
2323
- getAllKeywords: (force?: boolean) => Promise<Keyword[]>;
2324
- getAllKeywordsByGroupIds: () => Promise<KeywordsByGroupId>;
2325
- getSelectedGroups: () => Promise<KeywordGroup[]>;
2326
- getKeywordGroupsByItemId: (id: string, route?: string) => Promise<KeywordGroup[]>;
2747
+ export function useModalRoutingSettings(): (itemId: string) => {
2748
+ modalRouting: {
2749
+ isActive: boolean;
2750
+ itemId: string;
2751
+ backgroundLocation: {
2752
+ state: {
2753
+ modalRouting: {
2754
+ isActive: boolean;
2755
+ };
2756
+ };
2757
+ pathname: string;
2758
+ search: string;
2759
+ hash: string;
2760
+ key?: string;
2761
+ };
2762
+ };
2327
2763
  };
2328
2764
  }
2329
- declare module "libs/reach/util/common/src/user/content-languages-util" {
2330
- export const defaultFallbackContentLanguage = "en";
2331
- export const contentLanguagesWithoutAutomaticTranslation: string[];
2332
- export const allAvailableContentLanguages: string[];
2333
- export const rtlLanguages: string[];
2765
+ declare module "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack" {
2766
+ export function useAnalyticsActivityTrack(shouldGetMainScrollableContainer?: boolean): void;
2334
2767
  }
2335
- declare module "libs/reach/util/common/src/user/LanguageUtils" {
2336
- import { CurrentUser } from "libs/reach/util/common/src/index";
2337
- import { IntlShape } from 'react-intl';
2338
- import { LanguageSummary } from "libs/reach/util/common/src/index";
2339
- export function getPreferredContentLanguage(user: CurrentUser): string;
2340
- export function getLocalizedLanguages(intl: IntlShape, ...languages: LanguageSummary[]): {
2341
- localizedName: string;
2342
- name: string;
2343
- englishName: string;
2344
- code: string;
2345
- }[];
2346
- export function isRtlLanguage(lang: string): boolean;
2347
- export type LanguageDirection = 'auto' | 'rtl' | 'ltr';
2768
+ declare module "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack" {
2769
+ export function useAnalyticsNavigateTrack(): void;
2348
2770
  }
2349
- declare module "libs/reach/util/common/src/content/content-keyword-utils" {
2350
- import { KeywordsByGroupId } from "libs/reach/util/common/src/keywords/useKeywordsApi";
2351
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
2352
- import { Keyword, KeywordGroup } from "libs/reach/util/common/src/content/KeywordGroup";
2353
- export function getFlatKeywordList(keywords: KeywordsByGroupId): Keyword[];
2354
- export function ensureMandatoryKeywords(mandatoryKeywords: Keyword[], allKeywords: Keyword[]): Keyword[];
2355
- export function getGroupedKeywords(keywords: Keyword[]): {
2356
- [key: string]: Keyword[];
2357
- };
2358
- export function getKeywordDisplayValue(keywordGroups: KeywordGroup[] | null, user: CurrentUser, groupId?: string, keywordName?: string, groupName?: string, language?: string): string;
2359
- export function getKeywordTitle(user: CurrentUser, translations: {
2360
- [key: string]: string;
2361
- }, name: string, language?: string): string;
2362
- export function getPreSelectedKeywords(keywords: Keyword[], mandatoryKeywords: Keyword[]): Keyword[];
2363
- export function checkIfHasSameKeywords(keywordsArray1: Keyword[], keywordsArray2: Keyword[]): boolean;
2771
+ declare module "libs/reach/util/common/src/analytics/index" {
2772
+ export * from "libs/reach/util/common/src/analytics/AnalyticsContextProvider";
2773
+ export * from "libs/reach/util/common/src/analytics/analyticsUtils";
2774
+ export * from "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack";
2775
+ export * from "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack";
2776
+ export * from "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider";
2364
2777
  }
2365
- declare module "libs/reach/util/common/src/content/useClearUnreadItems" {
2366
- import { ItemResourceTypes } from "libs/reach/util/common/src/index";
2367
- export interface onMarkAsReadHandlers {
2368
- onStarted?: () => unknown;
2369
- onFinished?: () => unknown;
2778
+ declare module "libs/reach/util/common/src/authorization/Authorization" {
2779
+ import { CurrentUser, FeatureSet, SubscriptionSummary } from "libs/reach/util/common/src/index";
2780
+ export interface UnauthorizedAccessToSubscriptionException {
2781
+ validSubscriptions: SubscriptionSummary[];
2370
2782
  }
2371
- export function useClearUnreadItems(itemType: ItemResourceTypes, handlers?: onMarkAsReadHandlers, unreadCount?: number): () => Promise<void>;
2783
+ export function useAuthorizationValidator(func: (user: CurrentUser, features: FeatureSet) => boolean, isCheckingFeature?: boolean): void;
2372
2784
  }
2373
- declare module "libs/reach/util/common/src/content/useClearUnreadOnlyFilter" {
2374
- export function useClearUnreadOnlyFilter(): {
2375
- clearUnreadOnlyFilter: () => void;
2376
- };
2785
+ declare module "libs/reach/util/common/src/authorization/index" {
2786
+ export * from "libs/reach/util/common/src/authorization/Authorization";
2377
2787
  }
2378
- declare module "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler" {
2379
- export function useUnreadItemsTogglerHandler(): {
2380
- toggleUnreadItems: () => void;
2788
+ declare module "libs/reach/util/common/src/channels/useChannelsApi" {
2789
+ import { Channel } from "libs/reach/util/common/src/channels/Channel";
2790
+ export function useChannelsApi(): {
2791
+ getChannels: () => Promise<Channel[]>;
2792
+ getChannelsByItemId: (id: string, route?: string) => Promise<Channel[]>;
2381
2793
  };
2382
2794
  }
2383
- declare module "libs/reach/util/common/src/content/index" {
2384
- export * from "libs/reach/util/common/src/content/Attachment";
2385
- export * from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2386
- export * from "libs/reach/util/common/src/content/Comment";
2387
- export * from "libs/reach/util/common/src/content/ItemResourceType";
2388
- export * from "libs/reach/util/common/src/content/ItemWithAttachments";
2389
- export * from "libs/reach/util/common/src/content/Language";
2390
- export * from "libs/reach/util/common/src/content/PublishableItem";
2391
- export * from "libs/reach/util/common/src/content/NewsItem";
2392
- export * from "libs/reach/util/common/src/content/EventItem";
2393
- export * from "libs/reach/util/common/src/content/PageItem";
2394
- export * from "libs/reach/util/common/src/content/NewsMetadata";
2395
- export * from "libs/reach/util/common/src/content/KnownNewsState";
2396
- export * from "libs/reach/util/common/src/content/FeedbackSettings";
2397
- export * from "libs/reach/util/common/src/content/WorkflowStatus";
2398
- export * from "libs/reach/util/common/src/content/ResponseItem";
2399
- export * from "libs/reach/util/common/src/content/BaseItem";
2400
- export * from "libs/reach/util/common/src/content/VideoSource";
2401
- export * from "libs/reach/util/common/src/content/KeywordGroup";
2402
- export * from "libs/reach/util/common/src/content/ItemStatistics";
2403
- export * from "libs/reach/util/common/src/content/useFileApi";
2404
- export * from "libs/reach/util/common/src/content/content-keyword-utils";
2405
- export * from "libs/reach/util/common/src/content/useClearUnreadItems";
2406
- export * from "libs/reach/util/common/src/content/useClearUnreadOnlyFilter";
2407
- export * from "libs/reach/util/common/src/content/useUnreadItemsTogglerHandler";
2408
- }
2409
- declare module "libs/reach/util/common/src/user/features/FeatureSet" {
2410
- export const orderedFeatureSet: string[];
2411
- export class FeatureSet {
2412
- [featureName: string]: boolean;
2413
- }
2414
- export const workInProgressFeatures: Partial<FeatureSet>;
2795
+ declare module "libs/reach/util/common/src/channels/index" {
2796
+ export * from "libs/reach/util/common/src/channels/useChannelsApi";
2797
+ export * from "libs/reach/util/common/src/channels/Channel";
2415
2798
  }
2416
2799
  declare module "libs/reach/util/common/src/keyword-utils" {
2417
2800
  import { Keyword } from "libs/reach/util/common/src/content/KeywordGroup";
@@ -3396,6 +3779,7 @@ declare module "libs/reach/util/common/src/plugins/index" {
3396
3779
  export * from "libs/reach/util/common/src/plugins/usePluginUserStore";
3397
3780
  }
3398
3781
  declare module "libs/reach/util/common/src/reach-2/channels/types" {
3782
+ import { Channel } from "libs/reach/util/common/src/channels/index";
3399
3783
  export interface ICreateChannelParams {
3400
3784
  groupIds: string[];
3401
3785
  name: string;
@@ -3421,460 +3805,114 @@ declare module "libs/reach/util/common/src/reach-2/channels/types" {
3421
3805
  export interface IRenameChannelResponse {
3422
3806
  name: string;
3423
3807
  }
3424
- }
3425
- declare module "libs/reach/util/common/src/reach-2/hooks/useErrorHandler" {
3426
- import { GraphQLError } from 'graphql';
3427
- const useErrorHandler: () => {
3428
- handleErrors: (errors: ReadonlyArray<GraphQLError>) => void;
3429
- };
3430
- export default useErrorHandler;
3431
- }
3432
- declare module "libs/reach/util/common/src/reach-2/hooks/usePageScrollDirectionForTogglingControls" {
3433
- export function usePageScrollDirectionForTogglingControls(disableOnLargeScreen?: boolean, maximumAllowedScreenWidth?: number, upThreshold?: number, downThreshold?: number): boolean;
3434
- export function useDirectionAwarePageScrollListener(onScrollDown: () => void, onScrollUp: () => void, shouldDisable?: (containerWidth: number) => boolean, upThreshold?: number, downThreshold?: number): void;
3435
- }
3436
- declare module "libs/reach/util/common/src/reach-2/hooks/index" {
3437
- export { default as useErrorHandler } from "libs/reach/util/common/src/reach-2/hooks/useErrorHandler";
3438
- export * from "libs/reach/util/common/src/reach-2/hooks/usePageScrollDirectionForTogglingControls";
3439
- }
3440
- declare module "libs/reach/util/common/src/reach-2/channels/useChannelsQuery" {
3441
- import { ICreateChannelParams, ICreateChannelResponse, IDeleteChannelParams, IDeleteChannelResponse, IRenameChannelParams, IRenameChannelResponse } from "libs/reach/util/common/src/reach-2/channels/types";
3442
- export const useChannelsQuery: () => {
3443
- createChannel: (channel: ICreateChannelParams) => Promise<ICreateChannelResponse>;
3444
- deleteChannel: (deleteChannelInput: IDeleteChannelParams) => Promise<IDeleteChannelResponse>;
3445
- renameChannel: (channel: IRenameChannelParams) => Promise<IRenameChannelResponse>;
3446
- };
3447
- }
3448
- declare module "libs/reach/util/common/src/reach-2/FocusStyles" {
3449
- export const FocusStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
3450
- }
3451
- declare module "libs/reach/util/common/src/reach-2/GlobalStyles" {
3452
- import { FC } from 'react';
3453
- export const GlobalApp2Styles: FC;
3454
- export const BorderStyles: import("styled-components").FlattenSimpleInterpolation;
3455
- export const EditorScrollbarStyles: (hideWhenNotHovered?: boolean, showBackground?: boolean) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
3456
- }
3457
- declare module "libs/reach/util/common/src/reach-2/members/IMember" {
3458
- export enum Role {
3459
- Member = "MEMBER",
3460
- Owner = "OWNER"
3461
- }
3462
- export enum SortOrder {
3463
- ASC = "ASC",
3464
- DESC = "DESC"
3465
- }
3466
- export interface IMember {
3467
- displayName: string;
3468
- hasPendingInvitation: boolean;
3469
- id: string;
3470
- lastLoginTime: string;
3471
- mail: string;
3472
- role: Role;
3473
- userPrincipalName: string;
3474
- }
3475
- export interface IMembersQueryParams {
3476
- order?: [{
3477
- [key: string]: SortOrder;
3478
- }] | null;
3479
- searchText?: string | null;
3480
- skip?: number | null;
3481
- take?: number | null;
3482
- }
3483
- export interface IMembersQueryResponse {
3484
- items: IMember[];
3485
- pageInfo: {
3486
- hasNextPage: boolean;
3487
- hasPreviousPage: boolean;
3488
- };
3489
- totalCount: number;
3490
- }
3491
- }
3492
- declare module "libs/reach/util/common/src/reach-2/members/useMembersQuery" {
3493
- import { IMembersQueryParams, IMembersQueryResponse } from "libs/reach/util/common/src/reach-2/members/IMember";
3494
- export const useMembersQuery: () => {
3495
- getMembers: (params: IMembersQueryParams) => Promise<IMembersQueryResponse>;
3496
- };
3497
- }
3498
- declare module "libs/reach/util/common/src/user/features/WithFeatures" {
3499
- import { FeatureSet } from "libs/reach/util/common/src/user/features/FeatureSet";
3500
- import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
3501
- export interface InjectedFeaturesProps {
3502
- features?: FeatureSet;
3503
- }
3504
- export function useFeatures(): FeatureSet;
3505
- export function getEnabledFeatures(summary: SubscriptionSummary): FeatureSet;
3506
- }
3507
- declare module "libs/reach/util/common/src/user/useCurrentUserCache" {
3508
- import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
3509
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
3510
- export function useCurrentUserCache(): {
3511
- clear: () => Promise<void>;
3512
- setEssentials: (user: CurrentUser) => Promise<CurrentUser>;
3513
- setUser: (user: CurrentUser) => Promise<CurrentUser>;
3514
- get: () => Promise<{
3515
- subscription: {
3516
- logoInfo: {
3517
- smallUrl: any;
3518
- largeUrl: string;
3519
- isLegacyLogo: boolean;
3520
- };
3521
- languages: import("@livetiles/reach/util/common").LanguageBase[];
3522
- featureMask: string;
3523
- company: string;
3524
- directories: import("libs/reach/util/common/src/user/Subscription").DirectoryConfiguration[];
3525
- webPluginDefinitions: import("libs/reach/util/common/src/user/Subscription").WebPluginDefinition[];
3526
- userPropertyDefinitions: import("libs/reach/util/common/src/user/Subscription").UserPropertyDefinition[];
3527
- customDomain?: string;
3528
- allowSelfRegistration?: boolean;
3529
- brandFolderConfig?: import("libs/reach/util/common/src/user/Subscription").BrandFolderConfig;
3530
- hideSubscriptionName?: boolean;
3531
- id: string;
3532
- subscriptionName: string;
3533
- subscriptionHandle?: string;
3534
- contact: import("@livetiles/reach/util/common").Account;
3535
- theme: import("libs/reach/util/common/src/user/Subscription").Theme;
3536
- defaultLanguage: string;
3537
- faviconUrl?: string;
3538
- navigation: import("libs/reach/util/common/src/user/Subscription").NavigationNode[];
3539
- regionSettings?: import("libs/reach/util/common/src/user/Subscription").RegionSettings;
3540
- signInSettings?: import("libs/reach/util/common/src/user/Subscription").SignInSettings;
3541
- useInAppBrowser?: boolean;
3542
- hasUnreadItems: boolean;
3543
- pageTrackingInfo: import("libs/reach/util/common/src/user/Subscription").PageTrackingInfo;
3544
- termsAndConditionsHash?: string;
3545
- };
3546
- isEmailVerificationPending?: boolean;
3547
- isSubscriptionOwner: boolean;
3548
- givenName: string;
3549
- surname: string;
3550
- preferredUiLanguage: string;
3551
- preferredContentLanguage?: string;
3552
- preferredLocale?: string;
3553
- bookmarks: string[];
3554
- groups: import("libs/reach/util/common/src/user/User").UserGroup[];
3555
- availableSubscriptions: SubscriptionSummary[];
3556
- channels: import("@livetiles/reach/util/common").UserChannelSubscription[];
3557
- userHash: string;
3558
- unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
3559
- unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
3560
- unreadPosts: {
3561
- groupId: string;
3562
- itemId: string;
3563
- }[];
3564
- unreadFeedItemsCount?: number;
3565
- mostRecentPostGroups: string[];
3566
- notificationTypeSettings: import("libs/reach/util/common/src/user/User").NotificationTypeSettings;
3567
- hasPendingRegistration?: boolean;
3568
- minRoles: import("libs/reach/util/common/src/user/User").UserMinRoles;
3569
- hasDirectory: boolean;
3570
- contacts: import("libs/reach/util/common/src/user/User").UserContact[];
3571
- termsAndConditionsApprovedHash: string;
3572
- isPublicUser?: boolean;
3573
- hasUnreadChats?: boolean;
3574
- publicSubscriptionIds?: string[];
3575
- id?: string;
3576
- type?: import("@livetiles/reach/util/common").AccountType;
3577
- tenantId?: string;
3578
- displayName?: string;
3579
- userPrincipalName?: string;
3580
- mail?: string;
3581
- tokenUniqueId?: string;
3582
- authenticationType?: import("@livetiles/shared/util/authentication").AuthenticationType;
3583
- created?: string;
3584
- }>;
3585
- };
3586
- export function getUserDetailFields(user: Partial<CurrentUser>): {
3587
- availableSubscriptions: SubscriptionSummary[];
3588
- bookmarks: string[];
3589
- unreadNews: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
3590
- unreadEvents: import("libs/reach/util/common/src/user/User").PublishableItemNotificationSummary[];
3591
- unreadPosts: {
3592
- groupId: string;
3593
- itemId: string;
3594
- }[];
3595
- hasUnreadChats: boolean;
3596
- unreadFeedItemsCount: number;
3597
- mostRecentPostGroups: string[];
3598
- };
3599
- }
3600
- declare module "libs/reach/util/common/src/user/CurrentUserDetailContextProvider" {
3601
- import { FC } from 'react';
3602
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
3603
- export function useRefreshUserDetails(): () => Promise<CurrentUser>;
3604
- export const CurrentUserDetailContextProvider: FC;
3605
- }
3606
- declare module "libs/reach/util/common/src/user/CurrentUserDetailLibContextProvider" {
3607
- import { FC } from 'react';
3608
- import { CurrentUser } from "libs/reach/util/common/src/user/User";
3609
- export function useRefreshLibUserDetails(): () => Promise<CurrentUser>;
3610
- export const CurrentUserDetailLibContextProvider: FC;
3611
- }
3612
- declare module "libs/reach/util/common/src/user/Group" {
3613
- import { Account } from "libs/reach/util/common/src/user/Account";
3614
- import { GroupBase, GroupRoleNames, GroupRoles } from "libs/reach/util/common/src/user/User";
3615
- export interface UserRoleAssignment {
3616
- role: GroupRoles;
3617
- userId: string;
3618
- }
3619
- export interface GroupSummary extends GroupBase {
3620
- allowPosts?: boolean;
3621
- allowPublicAccess?: boolean;
3622
- availableChannelIds?: string[];
3623
- availableKeywordIds?: string[];
3624
- defaultChannelIds?: string[];
3625
- defaultKeywordIds?: string[];
3626
- description: string;
3627
- mandatoryChannelIds?: string[];
3628
- mandatoryKeywordIds?: string[];
3629
- }
3630
- export interface GroupStatistics {
3631
- adminCount: number;
3632
- authorCount: number;
3633
- editorCount: number;
3634
- eventsCount: number;
3635
- newsCount: number;
3636
- pagesCount: number;
3637
- readerCount: number;
3638
- }
3639
- export interface Group extends GroupSummary {
3640
- rules: GroupRules;
3641
- statistics: GroupStatistics;
3642
- users: UserRoleAssignment[];
3643
- }
3644
- export type GroupRules = {
3645
- [K in GroupRoleNames]?: GroupRule;
3646
- };
3647
- export interface GroupRule {
3648
- adGroups?: Account[];
3649
- includeDirectoryUsers?: boolean;
3650
- includeNonDirectoryUsers?: boolean;
3651
- }
3652
- }
3653
- declare module "libs/reach/util/common/src/user/Member" {
3654
- import { Account } from "libs/reach/util/common/src/user/Account";
3655
- import { GroupRoleNames } from "libs/reach/util/common/src/user/User";
3656
- export default interface Member extends Account {
3657
- roles: GroupRoleNames[];
3658
- }
3659
- }
3660
- declare module "libs/reach/util/common/src/user/Organization" {
3661
- export interface Organization {
3662
- country: string;
3663
- countryCode: string;
3664
- displayName: string;
3665
- id?: string;
3666
- }
3667
- }
3668
- declare module "libs/reach/util/common/src/user/UserInfo" {
3669
- export interface UserInfo {
3670
- userId?: string;
3671
- displayName?: string;
3672
- userPrincipalName?: string;
3673
- mail?: string;
3674
- givenName?: string;
3675
- surname?: string;
3676
- properties?: {
3677
- [key: string]: any;
3678
- };
3679
- isDirectoryUser?: boolean;
3680
- }
3681
- }
3682
- declare module "libs/reach/util/common/src/user/RequestUserInformation" {
3683
- import { Organization } from "libs/reach/util/common/src/user/Organization";
3684
- import { RequestUser } from "libs/reach/util/common/src/user/User";
3685
- export interface RequestUserInformation {
3686
- user: RequestUser;
3687
- organization: Organization;
3808
+ export interface IChannelQueryResponse {
3809
+ items: Channel[];
3810
+ totalCount: number;
3688
3811
  }
3689
3812
  }
3690
- declare module "libs/reach/util/common/src/user/UserUtils" {
3691
- import { CurrentUser, GroupRoles, UserGroup, UserSummary } from "libs/reach/util/common/src/user/User";
3692
- import { RequestUserInformation } from "libs/reach/util/common/src/user/RequestUserInformation";
3693
- import { PublishableItem } from "libs/reach/util/common/src/content/PublishableItem";
3694
- import { ClientFactoryInstance } from "libs/reach/util/api-factory/src/index";
3695
- import { SubscriptionSummary } from "libs/reach/util/common/src/user/Subscription";
3696
- export function isSubscriptionDirectoryUser(user: UserSummary, subscription: SubscriptionSummary): boolean;
3697
- export function hasMinRoleInSomeGroups(role: GroupRoles, user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): boolean;
3698
- export function hasMinRoleInAllGroups(role: GroupRoles, user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): boolean;
3699
- export function hasExplicitMinRoleInAllGroups(role: GroupRoles, user: CurrentUser, groupIds?: string[]): boolean;
3700
- export function hasExplicitMinRoleInSomeGroups(role: GroupRoles, user: CurrentUser, groupIds?: string[]): boolean;
3701
- export function getGroupsWithExplicitMinRole(role: GroupRoles, user: CurrentUser, isValid?: (group: UserGroup) => boolean): UserGroup[];
3702
- export function getCommonMaxRole(user: CurrentUser, groupIdsOrItem: string[] | PublishableItem): GroupRoles;
3703
- export function getRequestUserInformation(factory: ClientFactoryInstance): Promise<RequestUserInformation>;
3704
- export function hasPseudoEmail(userPrincipalName: string): boolean;
3705
- export function isHiddenMail(mail: string): boolean;
3706
- }
3707
- declare module "libs/reach/util/common/src/user/useAccountApi" {
3708
- import { Account, AccountType } from "libs/reach/util/common/src/user/Account";
3709
- import { Observable } from 'rxjs';
3710
- import { UserInfo } from "libs/reach/util/common/src/user/UserInfo";
3711
- import { GroupRoles } from "libs/reach/util/common/src/user/User";
3712
- export function useAccountApi(): {
3713
- searchAccounts: (filter: {
3714
- search: string;
3715
- type: AccountType;
3716
- includePendingInvitationUsers?: boolean;
3717
- includePendingRegistrationUsers?: boolean;
3718
- localOnly?: boolean;
3719
- excludeApiUsers?: boolean;
3720
- itemId?: string;
3721
- minRole?: GroupRoles;
3722
- searchInAllProperties?: boolean;
3723
- groupId?: string[];
3724
- }) => Promise<Account[]>;
3725
- searchAccountsByItemId: (minRole: GroupRoles, itemId: string, searchText: string) => Promise<Account[]>;
3726
- getUserInfo: (upn: string) => Promise<UserInfo>;
3727
- getUserInfoById: (userId: string) => Promise<UserInfo>;
3728
- getUserAvatarUrl: (upn: string, tenantId?: string) => Observable<string>;
3729
- getUserAvatarUrlPromise: (upn: string, tenantId?: string) => Promise<string>;
3730
- clearUserInfoCache: (upn: string) => void;
3731
- clearUserAvatarCache: (upn: string) => void;
3813
+ declare module "libs/reach/util/common/src/reach-2/hooks/useErrorHandler" {
3814
+ import { GraphQLError } from 'graphql';
3815
+ const useErrorHandler: () => {
3816
+ handleErrors: (errors: ReadonlyArray<GraphQLError>) => void;
3732
3817
  };
3818
+ export default useErrorHandler;
3733
3819
  }
3734
- declare module "libs/reach/util/common/src/user/useCachedCurrentUserApi" {
3735
- import { CurrentUser } from "libs/reach/util/common/src/user/index";
3736
- export function useCachedCurrentUserApi(refresh: (updateFunc?: (u?: CurrentUser) => CurrentUser) => Promise<void>): {
3737
- getCurrentUser: (subscriptionId: string) => Promise<any>;
3738
- };
3820
+ declare module "libs/reach/util/common/src/reach-2/hooks/usePageScrollDirectionForTogglingControls" {
3821
+ export function usePageScrollDirectionForTogglingControls(disableOnLargeScreen?: boolean, maximumAllowedScreenWidth?: number, upThreshold?: number, downThreshold?: number): boolean;
3822
+ export function useDirectionAwarePageScrollListener(onScrollDown: () => void, onScrollUp: () => void, shouldDisable?: (containerWidth: number) => boolean, upThreshold?: number, downThreshold?: number): void;
3739
3823
  }
3740
- declare module "libs/reach/util/common/src/user/useCurrentUserApi" {
3741
- import { CurrentUser, UpdatableUserProperties } from "libs/reach/util/common/src/user/User";
3742
- import { Organization } from "libs/reach/util/common/src/user/Organization";
3743
- export function useCurrentUserApi(): {
3744
- getCurrentUser: (token?: string, essentialOnly?: boolean) => Promise<CurrentUser>;
3745
- getCurrentOrganization: () => Promise<Organization>;
3746
- updateCurrentUserProfileProperties: (newProperties: UpdatableUserProperties) => Promise<unknown>;
3747
- updateCurrentUserAvatar: (subscriptionId: string, file: File) => Promise<unknown>;
3748
- deleteCurrentUserAvatar: () => Promise<unknown>;
3749
- };
3824
+ declare module "libs/reach/util/common/src/reach-2/hooks/index" {
3825
+ export { default as useErrorHandler } from "libs/reach/util/common/src/reach-2/hooks/useErrorHandler";
3826
+ export * from "libs/reach/util/common/src/reach-2/hooks/usePageScrollDirectionForTogglingControls";
3750
3827
  }
3751
- declare module "libs/reach/util/common/src/useCacheLanguageApi" {
3752
- export function useCacheLanguageApi(): {
3753
- getLocalLanguage: () => Promise<string>;
3754
- saveLanguageToLocalStorage: (language: string) => Promise<void>;
3755
- saveLocaleToLocalStorage: (locale: string) => Promise<void>;
3756
- getLocaleFromLocalStorage: () => Promise<string>;
3757
- };
3828
+ declare module "libs/reach/util/common/src/reach-2/types" {
3829
+ export enum SortOrder {
3830
+ ASC = "ASC",
3831
+ DESC = "DESC"
3832
+ }
3833
+ export interface ISortInfo {
3834
+ sortField?: string;
3835
+ sortOrder?: SortOrder;
3836
+ }
3837
+ export interface IFilterOptions {
3838
+ currentPage?: number;
3839
+ search?: string;
3840
+ sortInfo?: ISortInfo;
3841
+ }
3842
+ export interface IPagedQueryParams {
3843
+ order?: [{
3844
+ [key: string]: SortOrder;
3845
+ }];
3846
+ searchText?: string;
3847
+ skip?: number;
3848
+ take?: number;
3849
+ }
3758
3850
  }
3759
- declare module "libs/reach/util/common/src/user/useManageCurrentUserApi" {
3760
- import { CurrentUser, GroupNotificationSettings, NotificationTypeSettings, UserContact } from "libs/reach/util/common/src/user/User";
3761
- import { ConversationScope, ItemResourceTypes } from "libs/reach/util/common/src/content/index";
3762
- import { UserChannelSubscription } from "libs/reach/util/common/src/user/UserChannelSubscription";
3763
- export function useManageCurrentUserApi(): {
3764
- updateNotificationTypeSettings: (settings: NotificationTypeSettings) => Promise<unknown>;
3765
- getFollowCommentsStatus: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => Promise<boolean>;
3766
- toggleFollowComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope, enabled: boolean) => Promise<unknown>;
3767
- followPublicPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
3768
- followEditorPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
3769
- followAllPublishableItemComments: (itemId: string, type: ItemResourceTypes) => void;
3770
- followPublishableItemComments: (itemId: string, type: ItemResourceTypes, scope: ConversationScope) => void;
3771
- resolveSegment: (type: ItemResourceTypes, scope: ConversationScope) => string;
3772
- getFollowCommentSegment: (type: ItemResourceTypes) => "news" | "page" | "event";
3773
- toggleBookmark: (newsId: string, currentUser: CurrentUser) => Promise<boolean>;
3774
- getUserProperties: () => Promise<{
3775
- [key: string]: string;
3776
- }>;
3777
- setUserChannels: (channels: ReadonlyArray<UserChannelSubscription>) => Promise<any>;
3778
- addContact: (contact: UserContact) => Promise<UserContact[]>;
3779
- deleteContact: (contact: UserContact) => Promise<UserContact[]>;
3780
- getContactAccounts: () => Promise<UserContact[]>;
3781
- setLanguage: (uiLanguageCode: string) => Promise<any>;
3782
- setContentLanguage: (contentLanguageCode: string) => Promise<void>;
3783
- setLocale: (localeCode: string) => Promise<void>;
3784
- getGroupNotificationSettings: (groupId: string) => Promise<GroupNotificationSettings>;
3785
- updateGroupNotificationSettings: (groupId: string, groupNotificationSettings: GroupNotificationSettings) => Promise<unknown>;
3786
- clearMyUnreadItems: (itemType: ItemResourceTypes) => Promise<void>;
3787
- acceptTermsAndConditions: (approvedHash: string) => Promise<unknown>;
3788
- deleteAccount: () => Promise<unknown>;
3851
+ declare module "libs/reach/util/common/src/reach-2/channels/useChannelsQuery" {
3852
+ import { IPagedQueryParams } from "libs/reach/util/common/src/reach-2/types";
3853
+ import { IChannelQueryResponse, ICreateChannelParams, ICreateChannelResponse, IDeleteChannelParams, IDeleteChannelResponse, IRenameChannelParams, IRenameChannelResponse } from "libs/reach/util/common/src/reach-2/channels/types";
3854
+ export const useChannelsQuery: () => {
3855
+ createChannel: (channel: ICreateChannelParams) => Promise<ICreateChannelResponse>;
3856
+ deleteChannel: (deleteChannelInput: IDeleteChannelParams) => Promise<IDeleteChannelResponse>;
3857
+ getChannels: (params: IPagedQueryParams) => Promise<IChannelQueryResponse>;
3858
+ renameChannel: (channel: IRenameChannelParams) => Promise<IRenameChannelResponse>;
3789
3859
  };
3790
3860
  }
3791
- declare module "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder" {
3792
- export function useSubscriptionHandlePathBuilder(): {
3793
- buildPath: (initialPath?: string) => string;
3794
- subscriptionHandle: string;
3795
- };
3861
+ declare module "libs/reach/util/common/src/reach-2/channels/index" {
3862
+ export * from "libs/reach/util/common/src/reach-2/channels/types";
3863
+ export * from "libs/reach/util/common/src/reach-2/channels/useChannelsQuery";
3796
3864
  }
3797
- declare module "libs/reach/util/common/src/user/useSubscriptionWebAppUrl" {
3798
- export function useSubscriptionWebAppUrl(): string;
3799
- export function useSubscriptionWebAppUrls(): string[];
3865
+ declare module "libs/reach/util/common/src/reach-2/FocusStyles" {
3866
+ export const FocusStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
3800
3867
  }
3801
- declare module "libs/reach/util/common/src/user/useUserAdminApi" {
3802
- import { HashUser, SubscriptionJoinResult, UpdatableUserProperties, UserActivationResult, UserInvitationResult, UserSummary } from "libs/reach/util/common/src/user/User";
3803
- import { Observable } from 'rxjs';
3804
- import { Account } from "libs/reach/util/common/src/user/Account";
3805
- import { SortDirection } from "libs/reach/util/common/src/SortDirection";
3806
- import { PaginatedList } from "libs/reach/util/common/src/PaginatedList";
3807
- export interface SortDefinition {
3808
- sortColumn: string;
3809
- sortDirection: SortDirection;
3868
+ declare module "libs/reach/util/common/src/reach-2/GlobalStyles" {
3869
+ import { FC } from 'react';
3870
+ export const GlobalApp2Styles: FC;
3871
+ export const BorderStyles: import("styled-components").FlattenSimpleInterpolation;
3872
+ export const EditorScrollbarStyles: (hideWhenNotHovered?: boolean, showBackground?: boolean) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
3873
+ }
3874
+ declare module "libs/reach/util/common/src/reach-2/members/IMember" {
3875
+ import { SortOrder } from "libs/reach/util/common/src/reach-2/types";
3876
+ export enum Role {
3877
+ Member = "MEMBER",
3878
+ Owner = "OWNER"
3810
3879
  }
3811
- export interface UserFilterDefinition extends SortDefinition {
3812
- searchText: string;
3813
- includePendingInvitationUsers?: boolean;
3814
- includePendingRegistrationUsers?: boolean;
3815
- excludeRegularUsers?: boolean;
3880
+ export interface IMember {
3881
+ displayName: string;
3882
+ hasPendingInvitation: boolean;
3883
+ id: string;
3884
+ lastLoginTime: string;
3885
+ mail: string;
3886
+ role: Role;
3887
+ userPrincipalName: string;
3816
3888
  }
3817
- export interface UserAdminApi {
3818
- getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
3819
- getUserByHash: (hash: string) => Promise<HashUser>;
3820
- getUsersCsv: () => Promise<any>;
3821
- sendActivationEmail: () => Promise<unknown>;
3822
- activateUser: (hash: string) => Promise<UserActivationResult>;
3823
- deleteUser: (userId: string) => Observable<unknown>;
3824
- completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
3825
- inviteUser: (email: string) => Promise<UserInvitationResult>;
3826
- inviteUsers: (users: Account[]) => Promise<string[]>;
3889
+ export interface IMembersQueryParams {
3890
+ order?: [{
3891
+ [key: string]: SortOrder;
3892
+ }] | null;
3893
+ searchText?: string | null;
3894
+ skip?: number | null;
3895
+ take?: number | null;
3896
+ }
3897
+ export interface IMembersQueryResponse {
3898
+ items: IMember[];
3899
+ pageInfo: {
3900
+ hasNextPage: boolean;
3901
+ hasPreviousPage: boolean;
3902
+ };
3903
+ totalCount: number;
3827
3904
  }
3828
- export function useUserAdminApi(): {
3829
- getAllUsers: (filter?: Partial<UserFilterDefinition>) => Promise<PaginatedList<UserSummary>>;
3830
- completeRegistration: (token: string) => Promise<SubscriptionJoinResult>;
3831
- inviteUser: (email: string) => Promise<UserInvitationResult>;
3832
- getUserByHash: (hash: string) => Promise<HashUser>;
3833
- sendActivationEmail: () => Promise<unknown>;
3834
- activateUser: (hash: string) => Promise<UserActivationResult>;
3835
- deleteUser: (userId: string) => Observable<unknown>;
3836
- inviteUsers: (users: Account[]) => Promise<string[]>;
3837
- getUsersCsv: () => Promise<any>;
3838
- updateUserProfilePropertiesByUPN: (upn: string, newProperties: UpdatableUserProperties) => Promise<unknown>;
3839
- updateUserAvatarByUPN: (upn: string, subscriptionId: string, file?: File) => Promise<unknown>;
3840
- deleteUserAvatarByUPN: (upn: string) => Promise<unknown>;
3841
- importUsers: (file: File) => Promise<SubscriptionJoinResult[]>;
3842
- refreshApiKey: (apiKeyId: string, expiryDate: string) => Promise<Response>;
3843
- requestApiKey: (email: string, displayName: string, expiryDate: string) => Promise<Response>;
3844
- };
3845
3905
  }
3846
- declare module "libs/reach/util/common/src/user/index" {
3847
- export * from "libs/reach/util/common/src/user/features/FeatureSet";
3848
- export * from "libs/reach/util/common/src/user/features/WithFeatures";
3849
- export * from "libs/reach/util/common/src/user/Account";
3850
- export * from "libs/reach/util/common/src/user/Audience";
3851
- export * from "libs/reach/util/common/src/user/BasicUserInformation";
3852
- export * from "libs/reach/util/common/src/user/CurrentUserContext";
3853
- export * from "libs/reach/util/common/src/user/CurrentUserDetailContextProvider";
3854
- export * from "libs/reach/util/common/src/user/CurrentUserDetailLibContextProvider";
3855
- export * from "libs/reach/util/common/src/user/Group";
3856
- export * from "libs/reach/util/common/src/user/LanguageUtils";
3857
- export * from "libs/reach/util/common/src/user/Member";
3858
- export * from "libs/reach/util/common/src/user/Organization";
3859
- export * from "libs/reach/util/common/src/user/Subscription";
3860
- export * from "libs/reach/util/common/src/user/User";
3861
- export * from "libs/reach/util/common/src/user/UserChannelSubscription";
3862
- export * from "libs/reach/util/common/src/user/UserInfo";
3863
- export * from "libs/reach/util/common/src/user/UserUtils";
3864
- export * from "libs/reach/util/common/src/user/content-languages-util";
3865
- export * from "libs/reach/util/common/src/user/useAccountApi";
3866
- export * from "libs/reach/util/common/src/user/useCachedCurrentUserApi";
3867
- export * from "libs/reach/util/common/src/user/useCurrentUser";
3868
- export * from "libs/reach/util/common/src/user/useCurrentUserApi";
3869
- export * from "libs/reach/util/common/src/user/useCurrentUserCache";
3870
- export * from "libs/reach/util/common/src/user/useManageCurrentUserApi";
3871
- export * from "libs/reach/util/common/src/user/useSubscriptionHandlePathBuilder";
3872
- export * from "libs/reach/util/common/src/user/useSubscriptionWebAppUrl";
3873
- export * from "libs/reach/util/common/src/user/useUserAdminApi";
3906
+ declare module "libs/reach/util/common/src/reach-2/members/useMembersQuery" {
3907
+ import { IPagedQueryParams } from "libs/reach/util/common/src/reach-2/types";
3908
+ import { IMembersQueryResponse } from "libs/reach/util/common/src/reach-2/members/IMember";
3909
+ export const useMembersQuery: () => {
3910
+ getMembers: (params: IPagedQueryParams) => Promise<IMembersQueryResponse>;
3911
+ };
3874
3912
  }
3875
3913
  declare module "libs/reach/util/common/src/reach-2/nested-groups/types" {
3876
3914
  import { GroupRoles } from "libs/reach/util/common/src/user/index";
3877
- import { SortOrder } from "libs/reach/util/common/src/reach-2/members/IMember";
3915
+ import { IPagedQueryParams } from "libs/reach/util/common/src/reach-2/types";
3878
3916
  interface IFlatGroupsItem {
3879
3917
  name: string;
3880
3918
  }
@@ -3917,14 +3955,8 @@ declare module "libs/reach/util/common/src/reach-2/nested-groups/types" {
3917
3955
  userId: string;
3918
3956
  }[];
3919
3957
  }
3920
- export interface INestedGroupsQueryParams {
3921
- order?: [{
3922
- [key: string]: SortOrder;
3923
- }] | null;
3924
- parentId?: string | null;
3925
- search?: string | null;
3926
- skip?: number | null;
3927
- take?: number | null;
3958
+ export interface INestedGroupsQueryParams extends IPagedQueryParams {
3959
+ parentId?: string;
3928
3960
  }
3929
3961
  export interface INestedGroupsQueryResponse {
3930
3962
  items: INestedGroup[];
@@ -4038,16 +4070,17 @@ declare module "libs/reach/util/common/src/reach-2/ThemeContext" {
4038
4070
  export function useReach2Theme(): any;
4039
4071
  }
4040
4072
  declare module "libs/reach/util/common/src/reach-2/index" {
4041
- export * from "libs/reach/util/common/src/reach-2/channels/types";
4042
- export * from "libs/reach/util/common/src/reach-2/channels/useChannelsQuery";
4073
+ export * from "libs/reach/util/common/src/reach-2/channels/index";
4043
4074
  export * from "libs/reach/util/common/src/reach-2/FocusStyles";
4044
4075
  export * from "libs/reach/util/common/src/reach-2/GlobalStyles";
4045
4076
  export * from "libs/reach/util/common/src/reach-2/hooks/index";
4077
+ export * from "libs/reach/util/common/src/reach-2/hooks/usePageScrollDirectionForTogglingControls";
4046
4078
  export * from "libs/reach/util/common/src/reach-2/members/IMember";
4047
4079
  export * from "libs/reach/util/common/src/reach-2/members/useMembersQuery";
4048
4080
  export * from "libs/reach/util/common/src/reach-2/nested-groups/index";
4049
4081
  export * from "libs/reach/util/common/src/reach-2/resources/index";
4050
4082
  export * from "libs/reach/util/common/src/reach-2/ThemeContext";
4083
+ export * from "libs/reach/util/common/src/reach-2/types";
4051
4084
  }
4052
4085
  declare module "libs/reach/util/common/src/reachClassNames" {
4053
4086
  export const reachClassNames: string;
@@ -5255,7 +5288,9 @@ declare module "libs/reach/ui/common/src/common/containers/ListItemsContainer" {
5255
5288
  declare module "libs/reach/ui/common/src/common/Utils" {
5256
5289
  import { CurrentUser, PublishableItem } from "libs/reach/util/common/src/index";
5257
5290
  import { SubscriptionIdentifier } from "libs/reach/util/context/src/index";
5258
- export function isValidUrl(url: string): boolean;
5291
+ export function isValidUrl(url: string, options?: {
5292
+ forceProtocol?: boolean;
5293
+ }): boolean;
5259
5294
  export function getGoogleMapsSearchLink(name: string): string;
5260
5295
  export function tryGetInternalLink(url: string, appUrls: string[]): string;
5261
5296
  export function getExternalContentUrl(item: PublishableItem, language: string): string;
@@ -12209,7 +12244,9 @@ declare module "libs/reach/feature/content/src/reach-2/common/editor/hooks/useEd
12209
12244
  createList: (type: 'bulletList' | 'orderedList', placeholder: string, isNodeChange: boolean) => void;
12210
12245
  getActiveNodeType: () => string;
12211
12246
  getSelectionAttrs: (nodeType?: string) => Record<string, any>;
12212
- getSelectionText: () => string;
12247
+ getSelectionText: ({ trimEmpty }?: {
12248
+ trimEmpty?: boolean;
12249
+ }) => string;
12213
12250
  selectActiveNodeText: (markType: MarkType) => void;
12214
12251
  };
12215
12252
  export default useEditorActions;
@@ -12249,6 +12286,7 @@ declare module "libs/reach/feature/content/src/reach-2/common/editor/editors/Lin
12249
12286
  interface ILinkEditorProps {
12250
12287
  className?: string;
12251
12288
  editor: Editor;
12289
+ isShown?: boolean;
12252
12290
  onDismiss(): void;
12253
12291
  }
12254
12292
  const LinkEditor: FC<ILinkEditorProps>;