@omnia/fx-models 8.0.192-dev → 8.0.193-dev
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.
- package/ActionHandler.d.ts +5 -5
- package/ActionHandler.js +2 -2
- package/AiSettings.d.ts +2 -2
- package/AzureAd.d.ts +2 -2
- package/AzureAdAppPermissions.d.ts +3 -3
- package/AzurePermissionResource.d.ts +3 -2
- package/BusinessProfile.d.ts +5 -5
- package/BusinessProfileDallEPromptDefault.js +2 -2
- package/ChromeLayoutDefinition.js +2 -1
- package/ClientManifests.d.ts +8 -8
- package/Clipboard.d.ts +2 -2
- package/ComponentComposer.d.ts +3 -3
- package/Constants.d.ts +81 -82
- package/Constants.js +80 -80
- package/Contexts.d.ts +10 -11
- package/Enums.d.ts +28 -25
- package/Enums.js +26 -27
- package/Enums.tooling.d.ts +8 -0
- package/Enums.tooling.js +13 -0
- package/Extensions.d.ts +3 -3
- package/Feature.d.ts +8 -8
- package/FilePicker/FilePickerProviderContext.d.ts +3 -3
- package/FilePicker/FilePickerProviderVersionedLayoutContext.d.ts +3 -3
- package/FilePicker/FilePickerProviderVersionedLayoutContext.js +1 -1
- package/FilePicker/Providers/FilePickerProvider.d.ts +2 -2
- package/FileStorage.d.ts +3 -3
- package/IPropertiesApi.d.ts +5 -5
- package/Journey.d.ts +2 -2
- package/Layout.d.ts +13 -13
- package/LayoutDefinition.d.ts +7 -7
- package/LikeActionSettings.d.ts +3 -3
- package/LinkHandler/ILinkHandlerProvider.d.ts +2 -2
- package/LinkHandler/linktype/DefaultLinkType.d.ts +3 -3
- package/LinkHandler/linktype/DefaultLinkType.js +2 -1
- package/LinkHandler/linktype/DocumentLinkType.d.ts +3 -3
- package/LinkHandler/linktype/DocumentLinkType.js +2 -1
- package/LinkHandler/linktype/LinkType.d.ts +2 -2
- package/LoginLogItem.d.ts +2 -2
- package/ManifestIds.d.ts +524 -524
- package/ManifestIds.js +565 -565
- package/MediaScalingSettings.d.ts +3 -3
- package/Messaging.d.ts +6 -6
- package/NamedProperty.d.ts +4 -4
- package/PermissionInputSettings.d.ts +2 -2
- package/Post.d.ts +9 -9
- package/PromotedTagOptions.d.ts +2 -2
- package/PropertyArchive.d.ts +2 -2
- package/QueryablePropertyMessage.d.ts +2 -2
- package/RichTextEditorExtension.d.ts +3 -3
- package/RollupQuery.d.ts +4 -4
- package/Routing.d.ts +7 -7
- package/Secrets.d.ts +3 -3
- package/Security.d.ts +7 -7
- package/Store.d.ts +2 -2
- package/TargetingProperty.d.ts +11 -11
- package/ThemeDefinition.d.ts +7 -7
- package/ThemeDefinition.js +1 -1
- package/Token.d.ts +3 -3
- package/Translation.d.ts +5 -5
- package/UserdefinedLocalization.d.ts +2 -2
- package/VersionedData.d.ts +7 -7
- package/VersionedData.js +2 -2
- package/admin/AdminModels.d.ts +5 -5
- package/apps/App.d.ts +24 -24
- package/apps/AppInstanceRollup.d.ts +9 -9
- package/apps/AppNamingPolicy.d.ts +6 -6
- package/apps/AppProvisioning.d.ts +10 -10
- package/apps/AppProvisioning.js +8 -7
- package/auth/MagicLinkData.d.ts +3 -3
- package/auth/MagicLinkData.js +2 -2
- package/auth/OTPData.d.ts +3 -3
- package/auth/OTPData.js +2 -2
- package/auth/PasswordAuthData.d.ts +3 -3
- package/auth/PasswordAuthData.js +2 -2
- package/auth/PostProcessingAuthData.d.ts +3 -3
- package/auth/PostProcessingAuthData.js +2 -2
- package/auth/common/AuthenticationSettings.d.ts +2 -2
- package/auth/common/base.d.ts +3 -3
- package/authentication/Authentication.js +2 -1
- package/bulkimportusers/TemplateFileMetaData.d.ts +2 -2
- package/bulkimportusers/TemplateFileSettings.d.ts +3 -3
- package/businessprofilesettings/BusinessProfileAuthenticationSettings.d.ts +3 -3
- package/connected-tenants/ConnectedTenant.d.ts +2 -2
- package/editor-chrome/IActionButton.d.ts +2 -1
- package/editor-chrome/IEditorDisplayActionButton.d.ts +2 -1
- package/enterprise-glossary/EnterpriseGlossary.d.ts +3 -3
- package/enterprise-glossary/EnterpriseGlossary.js +1 -1
- package/enterprise-glossary/EnterpriseGlossaryInformationProvider.d.ts +2 -2
- package/enterprise-glossary/EnterpriseGlossaryInformationSourceSettings.d.ts +2 -2
- package/enterprise-glossary/EnterpriseGlossaryMapping.d.ts +3 -3
- package/enterprise-glossary/EnterpriseGlossaryProvider.d.ts +2 -2
- package/enterprise-properties/EnterpriseProperty.d.ts +7 -7
- package/enterprise-properties/EnterprisePropertyCategory.d.ts +2 -2
- package/enterprise-properties/EnterprisePropertyColumnMapping.d.ts +2 -2
- package/enterprise-properties/EnterprisePropertyItemSettings.d.ts +6 -6
- package/enterprise-properties/EnterprisePropertySet.d.ts +3 -3
- package/enterprise-properties/EnterprisePropertySettings.d.ts +2 -2
- package/enterprise-properties/EnterprisePropertyToPropertySettingsMapping.d.ts +3 -3
- package/filterengine/Shared.d.ts +33 -32
- package/filterengine/Shared.js +17 -17
- package/identities/ArchiveIdentityManagementQuery.d.ts +4 -4
- package/identities/BuiltInIdentityProvider.d.ts +5 -5
- package/identities/BuiltInIdentityProvider.js +3 -3
- package/identities/DynamicGroupIdentity.d.ts +3 -3
- package/identities/ExtensionIdentity.d.ts +2 -2
- package/identities/GroupIdentity.d.ts +5 -5
- package/identities/GroupManagementQuery.d.ts +4 -4
- package/identities/GroupType.d.ts +3 -3
- package/identities/Identity.d.ts +6 -6
- package/identities/Identity.js +6 -6
- package/identities/IdentityCreationRequest.d.ts +11 -11
- package/identities/IdentityPropertyConfiguration.d.ts +4 -4
- package/identities/IdentityPropertySyncBinding.d.ts +4 -4
- package/identities/IdentityProviderRunLog.d.ts +3 -3
- package/identities/IdentityProviderSettings.d.ts +2 -2
- package/identities/IdentityQuery.d.ts +6 -6
- package/identities/IdentitySyncProvider.d.ts +2 -2
- package/identities/InternalIdentity.js +1 -1
- package/identities/RoleIdentity.d.ts +2 -2
- package/identities/UserIdentity.d.ts +7 -7
- package/identities/UserIdentity.js +2 -3
- package/identities/UserIdentityQuery.d.ts +5 -5
- package/identities/UserManagementQuery.d.ts +5 -5
- package/identities/UserType.d.ts +5 -5
- package/identities/UserType.js +3 -3
- package/identities/UserTypeSettings.d.ts +2 -2
- package/identities/UserTypeSettings.js +8 -8
- package/internal-do-not-import-from-here/shared/broadcasting/InternalTopics.d.ts +4 -4
- package/internal-do-not-import-from-here/shared/factory/DefineFactory.d.ts +6 -6
- package/internal-do-not-import-from-here/shared/factory/ServiceContainer.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/http/Http.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/Guid.d.ts +55 -10
- package/internal-do-not-import-from-here/shared/models/Guid.js +40 -10
- package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +1 -1
- package/internal-do-not-import-from-here/shared/models/Tenant.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/Tokens.d.ts +4 -4
- package/internal-do-not-import-from-here/shared/models/Tooling.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +2 -2
- package/internal-do-not-import-from-here/shared/models/Workers.d.ts +4 -4
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +3 -3
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.d.ts +3 -3
- package/internal-do-not-import-from-here/shared/models/hub/targeting/ExternalIdentityProperty.js +1 -2
- package/internal-do-not-import-from-here/shared/models/hub/targeting/HubSource.d.ts +2 -1
- package/internal-do-not-import-from-here/shared/models/hub/targeting/HubSource.js +2 -1
- package/internal-do-not-import-from-here/shared/models/theming/Blueprints.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +5 -5
- package/internal-do-not-import-from-here/shared/models/theming/Typography.d.ts +6 -6
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronContentSection.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronReference.d.ts +3 -3
- package/internal-do-not-import-from-here/shared/services/ActivityService.d.ts +1 -1
- package/internal-do-not-import-from-here/shared/utils/index.d.ts +1 -1
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +3 -3
- package/media-gallery/providers/MediaGalleryDialogProvider.d.ts +2 -2
- package/media-gallery/providers/MediaGalleryDisplayProvider.d.ts +2 -2
- package/media-gallery/providers/PhotoWall.d.ts +2 -2
- package/media-gallery/providers/SliderDialogProvider.d.ts +2 -2
- package/media-picker/MediaPickerIconsStorageProviderContext.d.ts +3 -3
- package/media-picker/MediaPickerIconsStorageProviderContext.js +1 -1
- package/media-picker/MediaPickerImageRatio.d.ts +10 -10
- package/media-picker/MediaPickerImageRatio.js +6 -6
- package/media-picker/MediaPickerImageScaling.d.ts +3 -3
- package/media-picker/MediaPickerMedia.d.ts +3 -3
- package/media-picker/MediaPickerProvider.d.ts +3 -3
- package/media-picker/MediaPickerProviderContext.d.ts +3 -3
- package/media-picker/SharePointVideoResult.d.ts +2 -2
- package/media-picker/interfaces/types.d.ts +4 -4
- package/mediaflow/Constants.d.ts +2 -1
- package/mediaflow/Constants.js +2 -1
- package/omniasearch/IndexSearchRequest.d.ts +3 -3
- package/omniasearch/IndexedDocument.d.ts +2 -2
- package/omniasearch/OmniaUserSource.d.ts +2 -2
- package/omniasearch/OmniaUserSource.js +2 -1
- package/omniasearch/PropertySource.d.ts +4 -4
- package/omniasearch/SearchIndex.d.ts +2 -2
- package/oxide/OxideTypeDefinitions.d.ts +3 -3
- package/oxide/OxideTypeDefinitions.js +3 -3
- package/package.json +1 -1
- package/properties/PropertyBinding.d.ts +3 -3
- package/properties/PropertyDefinition.d.ts +2 -2
- package/properties/PropertyTestCode.js +3 -3
- package/properties/PropertyValue.d.ts +2 -2
- package/properties/datasource/AppDataSourceProperty.d.ts +4 -5
- package/properties/datasource/DataSourceProperty.d.ts +3 -3
- package/properties/datasource/DataSourcePropertyDisplayInformation.d.ts +3 -3
- package/properties/datasource/UserDataSourceProperty.d.ts +3 -4
- package/properties/datasource/index.d.ts +0 -1
- package/properties/datasource/index.js +0 -1
- package/properties/definitions/BirthdayPropertyDefinition.d.ts +3 -3
- package/properties/definitions/BirthdayPropertyDefinition.js +2 -2
- package/properties/definitions/BooleanPropertyDefinition.d.ts +3 -3
- package/properties/definitions/BooleanPropertyDefinition.js +2 -2
- package/properties/definitions/BusinessProfilePropertyDefinition.d.ts +3 -3
- package/properties/definitions/BusinessProfilePropertyDefinition.js +2 -2
- package/properties/definitions/DatePropertyDefinition.d.ts +3 -3
- package/properties/definitions/DatePropertyDefinition.js +2 -2
- package/properties/definitions/DateTimePropertyDefinition.d.ts +3 -3
- package/properties/definitions/DateTimePropertyDefinition.js +2 -2
- package/properties/definitions/EmailPropertyDefinition.d.ts +3 -3
- package/properties/definitions/EmailPropertyDefinition.js +2 -2
- package/properties/definitions/HtmlPropertyDefinition.d.ts +3 -3
- package/properties/definitions/HtmlPropertyDefinition.js +2 -2
- package/properties/definitions/IdentityPropertyDefinition.d.ts +3 -3
- package/properties/definitions/IdentityPropertyDefinition.js +2 -2
- package/properties/definitions/ImagePropertyDefinition.d.ts +5 -5
- package/properties/definitions/ImagePropertyDefinition.js +1 -1
- package/properties/definitions/IntegerPropertyDefinition.d.ts +3 -3
- package/properties/definitions/IntegerPropertyDefinition.js +2 -2
- package/properties/definitions/LanguagePropertyDefinition.d.ts +3 -3
- package/properties/definitions/LanguagePropertyDefinition.js +2 -2
- package/properties/definitions/LinkPropertyDefinition.d.ts +3 -3
- package/properties/definitions/LinkPropertyDefinition.js +2 -2
- package/properties/definitions/MediaPropertyDefinition.d.ts +3 -3
- package/properties/definitions/MediaPropertyDefinition.js +2 -2
- package/properties/definitions/MultilineTextPropertyDefinition.d.ts +3 -3
- package/properties/definitions/MultilineTextPropertyDefinition.js +2 -2
- package/properties/definitions/MultilingualTextPropertyDefinition.d.ts +3 -3
- package/properties/definitions/MultilingualTextPropertyDefinition.js +2 -2
- package/properties/definitions/PhoneNumberPropertyDefinition.d.ts +3 -3
- package/properties/definitions/PhoneNumberPropertyDefinition.js +2 -2
- package/properties/definitions/TagsPropertyDefinition.d.ts +3 -3
- package/properties/definitions/TagsPropertyDefinition.js +2 -2
- package/properties/definitions/TermSetPropertyDefinition.d.ts +6 -6
- package/properties/definitions/TermSetPropertyDefinition.js +2 -2
- package/properties/definitions/TextPropertyDefinition.d.ts +3 -3
- package/properties/definitions/TextPropertyDefinition.js +2 -2
- package/properties/definitions/TimePropertyDefinition.d.ts +3 -3
- package/properties/definitions/TimePropertyDefinition.js +2 -2
- package/properties/definitions/UserTypePropertyDefinition.d.ts +3 -3
- package/properties/definitions/UserTypePropertyDefinition.js +2 -2
- package/properties/values/BusinessProfilePropertyValue.d.ts +3 -3
- package/properties/values/UserTypePropertyValue.d.ts +3 -3
- package/richtext-editor-extensions/HeadingExtension.d.ts +3 -3
- package/richtext-editor-extensions/TipTapEditor.d.ts +2 -2
- package/richtext-editor-extensions/ToolbarProperties.d.ts +2 -2
- package/statuscodelayout/SystemLayout.js +2 -1
- package/system-logs/TransactionLog.d.ts +5 -5
- package/user-profile/EditUserProfileHandlerRegistration.d.ts +2 -2
- package/ux/AdminApi.d.ts +3 -3
- package/ux/AppManagementApi.d.ts +12 -12
- package/ux/AppProvisioningValidatorApi.d.ts +2 -2
- package/ux/DynamicPlaceholderApi.d.ts +4 -4
- package/ux/EnterprisePropertyDataTypeProviderApi.d.ts +2 -2
- package/ux/EnterprisePropertyToPropertySettingMappingApi.d.ts +3 -3
- package/ux/FeatureManagementApi.d.ts +2 -2
- package/ux/InternalAdminApi.d.ts +3 -3
- package/ux/UserProfileHandlerApi.d.ts +2 -2
- package/velcron/VelcronDefinitionRegistration.d.ts +2 -2
- package/versionedlayout/VersionedLayout.d.ts +9 -9
- package/versionedlayout/VersionedLayout.js +4 -3
- package/properties/datasource/DataSourceId.d.ts +0 -2
- /package/{properties/datasource/DataSourceId.js → internal-do-not-import-from-here/shared/models/Tooling.js} +0 -0
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { IdentityTypes } from "./IdentityTypes";
|
3
3
|
import { ExtendedPropertyEnterprisePropertyDefinition } from "@omnia/fx-models";
|
4
4
|
export interface IdentityProperty {
|
5
|
-
id:
|
6
|
-
propertyBindingId:
|
5
|
+
id: guid;
|
6
|
+
propertyBindingId: guid;
|
7
7
|
identityType: IdentityTypes;
|
8
|
-
omniaServiceId:
|
8
|
+
omniaServiceId: guid;
|
9
9
|
deletedAt?: Date;
|
10
10
|
privacy?: IdentityPropertyPrivacy;
|
11
11
|
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
2
2
|
import { IdentityProviderProperty } from "./IdentityProviderProperty";
|
3
3
|
import { IdentityTypes } from "./IdentityTypes";
|
4
4
|
export interface IdentityPropertySyncBindingBase {
|
5
|
-
propertyBindingId:
|
5
|
+
propertyBindingId: guid;
|
6
6
|
identityType: IdentityTypes;
|
7
|
-
detailProviderId:
|
7
|
+
detailProviderId: guid;
|
8
8
|
detailProviderProperty: IdentityProviderProperty;
|
9
9
|
}
|
10
10
|
export interface IdentityPropertySyncBinding extends IdentityPropertySyncBindingBase {
|
11
|
-
propertyDefinitionId:
|
11
|
+
propertyDefinitionId: guid;
|
12
12
|
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
2
2
|
import { IdentityProviderRunStatus } from "./IdentityProviderRunStatus";
|
3
3
|
import { IdentityProviderState } from "./IdentityProviderState";
|
4
4
|
export interface IdentityProviderRunLog {
|
5
|
-
id:
|
6
|
-
providerId:
|
5
|
+
id: guid;
|
6
|
+
providerId: guid;
|
7
7
|
currentState: IdentityProviderState;
|
8
8
|
status: IdentityProviderRunStatus;
|
9
9
|
started?: Date;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
2
2
|
import { MultilingualString } from "../MultilingualString";
|
3
3
|
import { IdentityProviderProperty } from "./IdentityProviderProperty";
|
4
4
|
import { IdentityProviderRunStatus } from "./IdentityProviderRunStatus";
|
@@ -24,7 +24,7 @@ export interface IdentityProviderSettingsBuiltInValue {
|
|
24
24
|
}
|
25
25
|
export interface UserTypeEvaluation {
|
26
26
|
displayName: MultilingualString;
|
27
|
-
userTypeId:
|
27
|
+
userTypeId: guid;
|
28
28
|
evaluationSets: EvaluationSet[];
|
29
29
|
}
|
30
30
|
export interface EvaluationSet {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BoolFilter, ScopeTypes } from "@omnia/fx-models";
|
2
|
-
import {
|
2
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
3
3
|
import { ItemQuery } from "../ItemQuery";
|
4
4
|
import { IdentityTypes } from "./IdentityTypes";
|
5
5
|
export declare class IdentityQuery extends ItemQuery {
|
@@ -8,18 +8,18 @@ export declare class IdentityQuery extends ItemQuery {
|
|
8
8
|
/**
|
9
9
|
* This is user type id or group type id value.
|
10
10
|
*/
|
11
|
-
typeIds?:
|
12
|
-
providerIds?:
|
13
|
-
excludeTypeIds?:
|
11
|
+
typeIds?: guid[];
|
12
|
+
providerIds?: guid[];
|
13
|
+
excludeTypeIds?: guid[];
|
14
14
|
emailEnabled?: BoolFilter;
|
15
15
|
permissionEnabled?: BoolFilter;
|
16
16
|
scope?: string;
|
17
17
|
tenantIdentityOnly?: boolean;
|
18
|
-
businessProfileId?:
|
18
|
+
businessProfileId?: guid;
|
19
19
|
scopeType?: ScopeTypes;
|
20
20
|
constructor(types: IdentityTypes[], searchText?: string,
|
21
21
|
/**
|
22
22
|
* This is user type id or group type id value.
|
23
23
|
*/
|
24
|
-
typeIds?:
|
24
|
+
typeIds?: guid[], providerIds?: guid[], excludeTypeIds?: guid[], emailEnabled?: BoolFilter, permissionEnabled?: BoolFilter, scope?: string, tenantIdentityOnly?: boolean, businessProfileId?: guid, scopeType?: ScopeTypes);
|
25
25
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx/internal-do-not-import-from-here/shared";
|
2
2
|
export interface IdentitySyncProvider {
|
3
|
-
readonly id:
|
3
|
+
readonly id: guid;
|
4
4
|
readonly renderSettingsComponent: <T extends any>(callback?: () => T) => JSX.Element;
|
5
5
|
readonly displayName?: string;
|
6
6
|
readonly description?: string;
|
@@ -24,7 +24,7 @@ Identity_1.Identity["createIdentity"] = function (type, id) {
|
|
24
24
|
throw new Error(`Can't create identity for unhandled type. -> ${type}`);
|
25
25
|
}
|
26
26
|
};
|
27
|
-
// export function createIdentity(type: IdentityTypes, id:
|
27
|
+
// export function createIdentity(type: IdentityTypes, id: guid) {
|
28
28
|
// switch (type) {
|
29
29
|
// case IdentityTypes.User:
|
30
30
|
// return new UserIdentity(id);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { ImagePropertyDefinition, PropertyValueBinding, TextPropertyDefinition } from "../properties";
|
3
3
|
import { Identity, IResolvedIdentity } from "./Identity";
|
4
4
|
import { IdentityTypes } from "./IdentityTypes";
|
@@ -6,7 +6,7 @@ export declare class RoleIdentity extends Identity {
|
|
6
6
|
type: IdentityTypes;
|
7
7
|
}
|
8
8
|
export declare class ResolvedRoleIdentity extends RoleIdentity implements IResolvedIdentity {
|
9
|
-
providerId:
|
9
|
+
providerId: guid;
|
10
10
|
propertyValues: PropertyValueBinding<any>[];
|
11
11
|
displayName: PropertyValueBinding<TextPropertyDefinition>;
|
12
12
|
image: PropertyValueBinding<ImagePropertyDefinition>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { IOmniaPropertyBag, OmniaNamedModel } from "../NamedProperty";
|
3
3
|
import { EmailPropertyDefinition, EmailPropertyValue, ImagePropertyDefinition, LanguagePropertyDefinition, PhoneNumberPropertyValue, PropertyValueBinding, TextPropertyDefinition } from "../properties";
|
4
4
|
import { IResolvedIdentity, Identity } from "./Identity";
|
@@ -6,7 +6,7 @@ import { IdentityTypes } from "./IdentityTypes";
|
|
6
6
|
import { ScopeTypes } from "./ScopeTypes";
|
7
7
|
declare class AzureAdUserPropertyValues {
|
8
8
|
private resolvedUser;
|
9
|
-
objectId:
|
9
|
+
objectId: guid;
|
10
10
|
profileUrl: string;
|
11
11
|
constructor(resolvedUser: ResolvedUserIdentity);
|
12
12
|
}
|
@@ -14,8 +14,8 @@ export declare class UserIdentity extends Identity {
|
|
14
14
|
type: IdentityTypes;
|
15
15
|
}
|
16
16
|
export declare class ResolvedUserIdentity extends UserIdentity implements IResolvedIdentity {
|
17
|
-
userTypeId:
|
18
|
-
providerId:
|
17
|
+
userTypeId: guid;
|
18
|
+
providerId: guid;
|
19
19
|
propertyValues: Array<PropertyValueBinding<any>>;
|
20
20
|
displayName: PropertyValueBinding<TextPropertyDefinition>;
|
21
21
|
username: PropertyValueBinding<TextPropertyDefinition>;
|
@@ -64,9 +64,9 @@ export declare enum UserSortColumn {
|
|
64
64
|
UserTypeId = 5
|
65
65
|
}
|
66
66
|
export interface UserIdentityAddRequest {
|
67
|
-
id:
|
68
|
-
providerId:
|
69
|
-
userTypeId:
|
67
|
+
id: guid;
|
68
|
+
providerId: guid;
|
69
|
+
userTypeId: guid;
|
70
70
|
displayName: PropertyValueBinding<TextPropertyDefinition>;
|
71
71
|
username: PropertyValueBinding<TextPropertyDefinition>;
|
72
72
|
image: PropertyValueBinding<ImagePropertyDefinition>;
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.UserSortColumn = exports.DocumentDirectionSettings = exports.UserAccessibilitySettings = exports.UserPropertyBagModel = exports.ResolvedUserIdentity = exports.UserIdentity = void 0;
|
4
4
|
const models_1 = require("@omnia/fx-models/internal-do-not-import-from-here/shared/models");
|
5
|
-
const Enums_1 = require("../Enums");
|
6
5
|
const ManifestIds_1 = require("../ManifestIds");
|
7
6
|
const NamedProperty_1 = require("../NamedProperty");
|
8
7
|
const BuiltInIdentityProvider_1 = require("./BuiltInIdentityProvider");
|
@@ -12,7 +11,7 @@ const ScopeTypes_1 = require("./ScopeTypes");
|
|
12
11
|
class AzureAdUserPropertyValues {
|
13
12
|
constructor(resolvedUser) {
|
14
13
|
this.resolvedUser = resolvedUser;
|
15
|
-
this.objectId =
|
14
|
+
this.objectId = (0, models_1.maybeGuid)(this.resolvedUser.providerIdentity);
|
16
15
|
this.profileUrl = `https://delve.office.com/?u=${this.objectId}`;
|
17
16
|
}
|
18
17
|
}
|
@@ -63,7 +62,7 @@ class ResolvedUserIdentity extends UserIdentity {
|
|
63
62
|
return resolvedUser.uiLanguage ?? resolvedUser.preferredLanguage;
|
64
63
|
}
|
65
64
|
static isAnonymousUser(resolvedUser) {
|
66
|
-
return resolvedUser.id ==
|
65
|
+
return resolvedUser.id == o$.enums.securityIdentities.AnonymousIdentity;
|
67
66
|
}
|
68
67
|
}
|
69
68
|
exports.ResolvedUserIdentity = ResolvedUserIdentity;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BoolFilter, Identity, ScopeTypes } from "@omnia/fx-models";
|
2
|
-
import {
|
2
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
3
3
|
import { ItemQuery } from "../ItemQuery";
|
4
4
|
export declare class UserIdentityQuery extends ItemQuery {
|
5
5
|
limitedToIdentities: Identity[];
|
@@ -8,9 +8,9 @@ export declare class UserIdentityQuery extends ItemQuery {
|
|
8
8
|
/**
|
9
9
|
* This is user type id or group type id value.
|
10
10
|
*/
|
11
|
-
typeIds?:
|
12
|
-
providerIds?:
|
13
|
-
excludeTypeIds?:
|
11
|
+
typeIds?: guid[];
|
12
|
+
providerIds?: guid[];
|
13
|
+
excludeTypeIds?: guid[];
|
14
14
|
emailEnabled?: BoolFilter;
|
15
15
|
permissionEnabled?: BoolFilter;
|
16
16
|
scope?: string;
|
@@ -20,5 +20,5 @@ export declare class UserIdentityQuery extends ItemQuery {
|
|
20
20
|
/**
|
21
21
|
* This is user type id or group type id value.
|
22
22
|
*/
|
23
|
-
typeIds?:
|
23
|
+
typeIds?: guid[], providerIds?: guid[], excludeTypeIds?: guid[], emailEnabled?: BoolFilter, permissionEnabled?: BoolFilter, scope?: string, tenantIdentityOnly?: boolean, scopeType?: ScopeTypes);
|
24
24
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { BoolFilter, LanguageTags, ScopeTypes, UserSortColumn } from "@omnia/fx-models";
|
2
|
-
import {
|
2
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
3
3
|
export declare class UserManagementQuery {
|
4
4
|
searchText?: string;
|
5
|
-
userTypeId?:
|
6
|
-
providerId?:
|
5
|
+
userTypeId?: guid;
|
6
|
+
providerId?: guid;
|
7
7
|
pageNumber?: number;
|
8
8
|
pageSize?: number;
|
9
9
|
sortColumn?: UserSortColumn;
|
@@ -13,6 +13,6 @@ export declare class UserManagementQuery {
|
|
13
13
|
timeValid?: BoolFilter;
|
14
14
|
language?: LanguageTags;
|
15
15
|
scopeType?: ScopeTypes;
|
16
|
-
businessProfileId?:
|
17
|
-
constructor(searchText?: string, userTypeId?:
|
16
|
+
businessProfileId?: guid;
|
17
|
+
constructor(searchText?: string, userTypeId?: guid, providerId?: guid, pageNumber?: number, pageSize?: number, sortColumn?: UserSortColumn, sortDesc?: boolean, scope?: string[], disabled?: BoolFilter, timeValid?: BoolFilter, language?: LanguageTags, scopeType?: ScopeTypes, businessProfileId?: guid);
|
18
18
|
}
|
package/identities/UserType.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { VersionedLayoutDefinition } from "../versionedlayout";
|
3
3
|
import { MultilingualString } from "../MultilingualString";
|
4
4
|
import { UserTypeDisplaySettings } from "./UserTypeDisplaySettings";
|
5
5
|
import { UserTypeSettings } from "./UserTypeSettings";
|
6
6
|
export interface UserType {
|
7
|
-
id:
|
7
|
+
id: guid;
|
8
8
|
displayName: MultilingualString;
|
9
9
|
priorityOrder: number;
|
10
10
|
}
|
@@ -18,13 +18,13 @@ export declare enum UserTypeLayoutMode {
|
|
18
18
|
Private = 2
|
19
19
|
}
|
20
20
|
export declare class BuiltInUserTypeIds {
|
21
|
-
static get Default():
|
21
|
+
static get Default(): guid;
|
22
22
|
}
|
23
23
|
export declare class UserTypeLayoutDefinition extends VersionedLayoutDefinition {
|
24
24
|
constructor();
|
25
|
-
userTypeId:
|
25
|
+
userTypeId: guid;
|
26
26
|
}
|
27
27
|
export declare class UserTypePrivateLayoutDefinition extends VersionedLayoutDefinition {
|
28
28
|
constructor();
|
29
|
-
userTypeId:
|
29
|
+
userTypeId: guid;
|
30
30
|
}
|
package/identities/UserType.js
CHANGED
@@ -9,18 +9,18 @@ var UserTypeLayoutMode;
|
|
9
9
|
UserTypeLayoutMode[UserTypeLayoutMode["Private"] = 2] = "Private";
|
10
10
|
})(UserTypeLayoutMode || (exports.UserTypeLayoutMode = UserTypeLayoutMode = {}));
|
11
11
|
class BuiltInUserTypeIds {
|
12
|
-
static get Default() { return
|
12
|
+
static get Default() { return (0, models_1.guid)("930fd165-96a9-4503-8d14-f7369694c75f"); }
|
13
13
|
}
|
14
14
|
exports.BuiltInUserTypeIds = BuiltInUserTypeIds;
|
15
15
|
class UserTypeLayoutDefinition extends versionedlayout_1.VersionedLayoutDefinition {
|
16
16
|
constructor() {
|
17
|
-
super("a6d64433-ec96-4006-9ea7-ba68222d1095");
|
17
|
+
super((0, models_1.guid)("a6d64433-ec96-4006-9ea7-ba68222d1095"));
|
18
18
|
}
|
19
19
|
}
|
20
20
|
exports.UserTypeLayoutDefinition = UserTypeLayoutDefinition;
|
21
21
|
class UserTypePrivateLayoutDefinition extends versionedlayout_1.VersionedLayoutDefinition {
|
22
22
|
constructor() {
|
23
|
-
super("8491ce70-2349-4a35-adb9-72ea520e6716");
|
23
|
+
super((0, models_1.guid)("8491ce70-2349-4a35-adb9-72ea520e6716"));
|
24
24
|
}
|
25
25
|
}
|
26
26
|
exports.UserTypePrivateLayoutDefinition = UserTypePrivateLayoutDefinition;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { BusinessProfilePropertyDefinition, EmailPropertyDefinition, ImagePropertyDefinition, LanguagePropertyDefinition, PropertyBinding, TextPropertyDefinition, UserTypePropertyDefinition } from "../properties";
|
3
3
|
export interface UserTypeFormProperties {
|
4
4
|
new: FormProperties;
|
@@ -7,7 +7,7 @@ export interface UserTypeFormProperties {
|
|
7
7
|
[key: string]: FormProperties;
|
8
8
|
}
|
9
9
|
export interface FormProperties {
|
10
|
-
propertyBindingIds: Array<
|
10
|
+
propertyBindingIds: Array<guid>;
|
11
11
|
}
|
12
12
|
export interface UserTypeSettings {
|
13
13
|
formProperties: UserTypeFormProperties;
|
@@ -5,14 +5,14 @@ const models_1 = require("@omnia/fx-models/internal-do-not-import-from-here/shar
|
|
5
5
|
const properties_1 = require("../properties");
|
6
6
|
exports.builtInPropertyBindings = {
|
7
7
|
user: {
|
8
|
-
displayName: new properties_1.PropertyBinding(properties_1.TextPropertyDefinition,
|
9
|
-
username: new properties_1.PropertyBinding(properties_1.TextPropertyDefinition,
|
10
|
-
image: new properties_1.PropertyBinding(properties_1.ImagePropertyDefinition,
|
11
|
-
email: new properties_1.PropertyBinding(properties_1.EmailPropertyDefinition,
|
12
|
-
preferredLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition,
|
13
|
-
uiLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition,
|
14
|
-
userType: new properties_1.PropertyBinding(properties_1.UserTypePropertyDefinition,
|
15
|
-
owner: new properties_1.PropertyBinding(properties_1.BusinessProfilePropertyDefinition,
|
8
|
+
displayName: new properties_1.PropertyBinding(properties_1.TextPropertyDefinition, (0, models_1.guid)("44d8238b-97d5-468b-9a4f-4d23d95aa3b9")),
|
9
|
+
username: new properties_1.PropertyBinding(properties_1.TextPropertyDefinition, (0, models_1.guid)("3f89e33a-143d-4b6f-ba58-b05ad6479dce")),
|
10
|
+
image: new properties_1.PropertyBinding(properties_1.ImagePropertyDefinition, (0, models_1.guid)("964db53a-309e-4ace-b269-4637a1dd57ef")),
|
11
|
+
email: new properties_1.PropertyBinding(properties_1.EmailPropertyDefinition, (0, models_1.guid)("143d9a73-ba3d-43ff-9f6b-9808f6ca3d2b")),
|
12
|
+
preferredLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition, (0, models_1.guid)("aea79130-57c9-4a8a-baa4-f2b2865a4fd7")),
|
13
|
+
uiLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition, (0, models_1.guid)("5ba31954-1b4d-4578-a3cd-e62ebddc2a03")),
|
14
|
+
userType: new properties_1.PropertyBinding(properties_1.UserTypePropertyDefinition, (0, models_1.guid)("53546e52-3016-4233-bdf0-6ba2a29606c9")),
|
15
|
+
owner: new properties_1.PropertyBinding(properties_1.BusinessProfilePropertyDefinition, (0, models_1.guid)("6de8a80c-5880-45f4-b8e8-faf06da97ea1")),
|
16
16
|
},
|
17
17
|
};
|
18
18
|
const buitinUserPropertiesBindingIdList = Object.values(exports.builtInPropertyBindings.user).map(item => item.bindingId);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BroadcastTopic, RealtimeChannelUpdateMessage, RealtimeSendMessage, RealtimChannelMessage, BroadcastInvokeTopic,
|
1
|
+
import { BroadcastTopic, RealtimeChannelUpdateMessage, RealtimeSendMessage, RealtimChannelMessage, BroadcastInvokeTopic, guid } from "../models";
|
2
2
|
export declare const realtimeTopics: {
|
3
3
|
getActiveChannels: BroadcastTopic<void>;
|
4
4
|
updateChannels: BroadcastTopic<RealtimeChannelUpdateMessage[]>;
|
@@ -8,16 +8,16 @@ export declare const realtimeTopics: {
|
|
8
8
|
};
|
9
9
|
export declare const endpointTopics: {
|
10
10
|
getActivityHubUrl: BroadcastTopic<{
|
11
|
-
threadId:
|
11
|
+
threadId: guid;
|
12
12
|
}>;
|
13
13
|
activityHubUrlUpdated: BroadcastTopic<{
|
14
|
-
threadId:
|
14
|
+
threadId: guid;
|
15
15
|
activityHubUrl: string;
|
16
16
|
tokenRefBase64: string;
|
17
17
|
}>;
|
18
18
|
};
|
19
19
|
export declare const workerTopics: {
|
20
20
|
leaderElected: BroadcastTopic<{
|
21
|
-
workerThreadId:
|
21
|
+
workerThreadId: guid;
|
22
22
|
}>;
|
23
23
|
};
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import {
|
1
|
+
import { guid, InstanceLifetimes } from "@omnia/fx-models";
|
2
2
|
import { SubscriptionHandler } from "../messaging";
|
3
3
|
export interface SetupFactoryContext {
|
4
4
|
onDeactivated(fn: () => void): any;
|
5
5
|
subscriptions: SubscriptionHandler;
|
6
6
|
}
|
7
|
-
export declare function defineFactory<InferReturnSetup>(setup: (ctx: SetupFactoryContext, ...args: any) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?:
|
8
|
-
export declare function defineFactory<InferReturnSetup, T1>(setup: (ctx: SetupFactoryContext, param1: T1) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?:
|
7
|
+
export declare function defineFactory<InferReturnSetup>(setup: (ctx: SetupFactoryContext, ...args: any) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): () => InferReturnSetup;
|
8
|
+
export declare function defineFactory<InferReturnSetup, T1>(setup: (ctx: SetupFactoryContext, param1: T1) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1) => InferReturnSetup;
|
9
9
|
export declare function defineFactory<InferReturnSetup, T1, T2>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: string): (param1: T1, param2: T2) => InferReturnSetup;
|
10
|
-
export declare function defineFactory<InferReturnSetup, T1, T2, T3>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?:
|
11
|
-
export declare function defineFactory<InferReturnSetup, T1, T2, T3, T4>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3, param4: T4) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?:
|
12
|
-
export declare function defineFactory<InferReturnSetup, T1, T2, T3, T4, T5>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?:
|
10
|
+
export declare function defineFactory<InferReturnSetup, T1, T2, T3>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1, param2: T2, param3: T3) => InferReturnSetup;
|
11
|
+
export declare function defineFactory<InferReturnSetup, T1, T2, T3, T4>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3, param4: T4) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1, param2: T2, param3: T3, param4: T4) => InferReturnSetup;
|
12
|
+
export declare function defineFactory<InferReturnSetup, T1, T2, T3, T4, T5>(setup: (ctx: SetupFactoryContext, param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: guid): (param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => InferReturnSetup;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "../models";
|
2
2
|
type Class<T> = {
|
3
3
|
new (...args: any[]): T;
|
4
4
|
};
|
@@ -14,7 +14,7 @@ export declare class InternalServiceContainer {
|
|
14
14
|
private transientInstances;
|
15
15
|
private destroyedContainer;
|
16
16
|
private scopedInstances;
|
17
|
-
constructor(id:
|
17
|
+
constructor(id: guid);
|
18
18
|
createInstance<TConstructor, TClass>(type: Class<TClass> | (() => TClass), constructorArgs?: TConstructor, forceNewInstanceLifetimeScope?: boolean): TClass;
|
19
19
|
static isCreatingInstanceFromType(type: any): boolean;
|
20
20
|
private getActiveInstance;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { HttpConfig, HttpCredentials, HttpResponse, Future,
|
1
|
+
import { HttpConfig, HttpCredentials, HttpResponse, Future, guid } from "../models";
|
2
2
|
export declare class HttpBuilder {
|
3
3
|
_config?: HttpConfig;
|
4
4
|
constructor(_config?: HttpConfig);
|
@@ -137,5 +137,5 @@ export declare class Http {
|
|
137
137
|
private buildRequestInit;
|
138
138
|
private appendQueryParamsToUrl;
|
139
139
|
}
|
140
|
-
export declare function http(omniaServiceId:
|
140
|
+
export declare function http(omniaServiceId: guid, executeOnWorker?: boolean): Http;
|
141
141
|
export declare function http(options: HttpConfig): Http;
|
@@ -1,11 +1,32 @@
|
|
1
1
|
import "./Equals";
|
2
2
|
import { IEquals } from "./Equals";
|
3
3
|
import { Id } from "./Id";
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
type VersionChar = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f";
|
5
|
+
type Char = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f";
|
6
|
+
type Prev<X extends number> = [
|
7
|
+
never,
|
8
|
+
0,
|
9
|
+
1,
|
10
|
+
2,
|
11
|
+
3,
|
12
|
+
4,
|
13
|
+
5,
|
14
|
+
6,
|
15
|
+
7,
|
16
|
+
8,
|
17
|
+
9,
|
18
|
+
10,
|
19
|
+
11,
|
20
|
+
...never[]
|
21
|
+
][X];
|
22
|
+
type HasLength<S extends string, Len extends number> = [Len] extends [0] ? (S extends "" ? true : never) : (S extends `${infer C}${infer Rest}` ? (Lowercase<C> extends Char ? HasLength<Rest, Prev<Len>> : never) : never);
|
23
|
+
type Char4<S extends string> = true extends HasLength<S, 4> ? S : never;
|
24
|
+
type Char8<S extends string> = true extends HasLength<S, 8> ? S : never;
|
25
|
+
type Char12<S extends string> = true extends HasLength<S, 12> ? S : never;
|
26
|
+
type VersionGroup<S extends string> = S extends `${infer Version}${infer Rest}` ? (Version extends VersionChar ? (true extends HasLength<Rest, 3> ? S : never) : never) : never;
|
27
|
+
type NilUUID = "00000000-0000-0000-0000-000000000000";
|
28
|
+
type GuidValidator<S extends string> = S extends NilUUID ? S : (S extends `${infer S8}-${infer S4_1}-${infer S4_2}-${infer S4_3}-${infer S12}` ? (S8 extends Lowercase<Char8<S8>> ? (S4_1 extends Lowercase<Char4<S4_1>> ? (S4_2 extends Lowercase<VersionGroup<S4_2>> ? (S4_3 extends Lowercase<Char4<S4_3>> ? (S12 extends Lowercase<Char12<S12>> ? S : never) : never) : never) : never) : never) : never);
|
29
|
+
export declare const emptyGuid: guid;
|
9
30
|
declare const guidSymbol: unique symbol;
|
10
31
|
/**
|
11
32
|
* Type alias for GUIDs, represented as a string but with nominal typing
|
@@ -16,9 +37,10 @@ export type guid = Id<string, [typeof guidSymbol]>;
|
|
16
37
|
* Generates a globally unique identifier (GUID) or converts a provided string into a GUID.
|
17
38
|
*
|
18
39
|
* This function creates a new GUID if no argument is provided. If a string id is provided,
|
19
|
-
* it is cast to a GUID
|
20
|
-
* which uses random numbers. The format of a version 4 UUID
|
21
|
-
* where 'x' is any hexadecimal digit and 'y' is one of 8, 9, A, or B.
|
40
|
+
* it is cast to a GUID, assuming the string is a valid, lowercase GUID. The new GUID is generated
|
41
|
+
* according to the version 4 UUID standard, which uses random numbers. The format of a version 4 UUID
|
42
|
+
* is 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', where 'x' is any hexadecimal digit and 'y' is one of 8, 9, A, or B.
|
43
|
+
* Note: This function enforces that all hexadecimal characters in the GUID are lowercase at build time.
|
22
44
|
*
|
23
45
|
* @param {string} [id] - Optional. A predefined string to be cast as a guid.
|
24
46
|
* @returns {guid} A new GUID if no id is provided, or the provided id cast as a guid.
|
@@ -28,10 +50,33 @@ export type guid = Id<string, [typeof guidSymbol]>;
|
|
28
50
|
* const newGuid = guid();
|
29
51
|
*
|
30
52
|
* @example
|
31
|
-
* // Casts a given string to a GUID
|
53
|
+
* // Casts a given string to a GUID, the string must be lowercase
|
32
54
|
* const specificGuid = guid("123e4567-e89b-12d3-a456-426614174000");
|
33
55
|
*/
|
34
|
-
export declare function guid(id?:
|
56
|
+
export declare function guid<S extends string>(id?: GuidValidator<S>): guid;
|
57
|
+
/**
|
58
|
+
* Casts a provided string to a GUID without enforcing format validation.
|
59
|
+
*
|
60
|
+
* This function casts any given string to a GUID type without validating
|
61
|
+
* its format at build time. It is particularly useful in scenarios where
|
62
|
+
* the GUID format is non-standard or where format validation is not necessary.
|
63
|
+
* Note that this function does not generate a new GUID; it only casts the provided string.
|
64
|
+
* Note: Even without format validation, the string should be in lowercase to comply with GUID standards.
|
65
|
+
*
|
66
|
+
* @param {string} id - A string to be cast as a guid.
|
67
|
+
* @returns {guid} The provided id cast as a guid.
|
68
|
+
*
|
69
|
+
* @example
|
70
|
+
* // Casts a given string to a GUID without validating its format
|
71
|
+
* const specificGuid = maybeGuid("123e4567-e89b-12d3-a456-426614174000");
|
72
|
+
*/
|
73
|
+
export declare function maybeGuid(id: string): guid;
|
74
|
+
export declare function isValidGuid(guid: guid): boolean;
|
75
|
+
export interface GuidValue extends Partial<IEquals<{
|
76
|
+
GUID(value: GuidValue): boolean;
|
77
|
+
}>> {
|
78
|
+
toString: () => string;
|
79
|
+
}
|
35
80
|
/**
|
36
81
|
* Class to create a guid
|
37
82
|
*/
|
@@ -1,19 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GUID = exports.Guid = exports.guid = void 0;
|
4
|
-
//export interface GuidValue {
|
5
|
-
// :string;
|
6
|
-
//}
|
3
|
+
exports.GUID = exports.Guid = exports.isValidGuid = exports.maybeGuid = exports.guid = exports.emptyGuid = void 0;
|
7
4
|
require("./Equals"); // ensure execute code in equals first
|
5
|
+
exports.emptyGuid = guid("00000000-0000-0000-0000-000000000000");
|
8
6
|
//This is the new modern implementation of guid not requiring a class
|
9
7
|
const guidSymbol = Symbol("guid");
|
10
8
|
/**
|
11
9
|
* Generates a globally unique identifier (GUID) or converts a provided string into a GUID.
|
12
10
|
*
|
13
11
|
* This function creates a new GUID if no argument is provided. If a string id is provided,
|
14
|
-
* it is cast to a GUID
|
15
|
-
* which uses random numbers. The format of a version 4 UUID
|
16
|
-
* where 'x' is any hexadecimal digit and 'y' is one of 8, 9, A, or B.
|
12
|
+
* it is cast to a GUID, assuming the string is a valid, lowercase GUID. The new GUID is generated
|
13
|
+
* according to the version 4 UUID standard, which uses random numbers. The format of a version 4 UUID
|
14
|
+
* is 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', where 'x' is any hexadecimal digit and 'y' is one of 8, 9, A, or B.
|
15
|
+
* Note: This function enforces that all hexadecimal characters in the GUID are lowercase at build time.
|
17
16
|
*
|
18
17
|
* @param {string} [id] - Optional. A predefined string to be cast as a guid.
|
19
18
|
* @returns {guid} A new GUID if no id is provided, or the provided id cast as a guid.
|
@@ -23,10 +22,34 @@ const guidSymbol = Symbol("guid");
|
|
23
22
|
* const newGuid = guid();
|
24
23
|
*
|
25
24
|
* @example
|
26
|
-
* // Casts a given string to a GUID
|
25
|
+
* // Casts a given string to a GUID, the string must be lowercase
|
27
26
|
* const specificGuid = guid("123e4567-e89b-12d3-a456-426614174000");
|
28
27
|
*/
|
29
28
|
function guid(id) {
|
29
|
+
return defineGuid(id);
|
30
|
+
}
|
31
|
+
exports.guid = guid;
|
32
|
+
/**
|
33
|
+
* Casts a provided string to a GUID without enforcing format validation.
|
34
|
+
*
|
35
|
+
* This function casts any given string to a GUID type without validating
|
36
|
+
* its format at build time. It is particularly useful in scenarios where
|
37
|
+
* the GUID format is non-standard or where format validation is not necessary.
|
38
|
+
* Note that this function does not generate a new GUID; it only casts the provided string.
|
39
|
+
* Note: Even without format validation, the string should be in lowercase to comply with GUID standards.
|
40
|
+
*
|
41
|
+
* @param {string} id - A string to be cast as a guid.
|
42
|
+
* @returns {guid} The provided id cast as a guid.
|
43
|
+
*
|
44
|
+
* @example
|
45
|
+
* // Casts a given string to a GUID without validating its format
|
46
|
+
* const specificGuid = maybeGuid("123e4567-e89b-12d3-a456-426614174000");
|
47
|
+
*/
|
48
|
+
function maybeGuid(id) {
|
49
|
+
return defineGuid(id);
|
50
|
+
}
|
51
|
+
exports.maybeGuid = maybeGuid;
|
52
|
+
function defineGuid(id) {
|
30
53
|
if (!id) {
|
31
54
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
32
55
|
const r = Math.random() * 16 | 0;
|
@@ -36,12 +59,19 @@ function guid(id) {
|
|
36
59
|
}
|
37
60
|
return id;
|
38
61
|
}
|
39
|
-
|
62
|
+
function isValidGuid(guid) {
|
63
|
+
if (guid === undefined || guid === null) {
|
64
|
+
return false;
|
65
|
+
}
|
66
|
+
const validRegex = /^[{]?[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}[}]?$/;
|
67
|
+
return validRegex.test(guid.toString());
|
68
|
+
}
|
69
|
+
exports.isValidGuid = isValidGuid;
|
40
70
|
/**
|
41
71
|
* Class to create a guid
|
42
72
|
*/
|
43
73
|
class Guid {
|
44
|
-
static { this._empty =
|
74
|
+
static { this._empty = guid("00000000-0000-0000-0000-000000000000"); }
|
45
75
|
static newGuid() {
|
46
76
|
return new Guid("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
|
47
77
|
const r = Math.random() * 16 | 0;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { guid } from "./Guid";
|
2
2
|
export interface OmniaToken {
|
3
3
|
tokenKey: string;
|
4
|
-
tokenRef:
|
4
|
+
tokenRef: guid;
|
5
5
|
loginName: string;
|
6
6
|
expires: number;
|
7
7
|
forDevIntent: boolean;
|
8
8
|
}
|
9
9
|
export interface OmniaTokenRef {
|
10
|
-
tenantId:
|
10
|
+
tenantId: guid;
|
11
11
|
identityId: string;
|
12
12
|
hubIdentityId?: number;
|
13
|
-
tokenRef:
|
13
|
+
tokenRef: guid;
|
14
14
|
localDev: boolean;
|
15
15
|
}
|