@omnia/fx-models 8.0.191-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.
Files changed (253) hide show
  1. package/ActionHandler.d.ts +5 -5
  2. package/ActionHandler.js +2 -2
  3. package/AiSettings.d.ts +2 -2
  4. package/AppTemplatePropertySetSetting.d.ts +2 -0
  5. package/AzureAd.d.ts +2 -2
  6. package/AzureAdAppPermissions.d.ts +3 -3
  7. package/AzurePermissionResource.d.ts +3 -2
  8. package/BusinessProfile.d.ts +5 -5
  9. package/BusinessProfileDallEPromptDefault.js +2 -2
  10. package/ChromeLayoutDefinition.js +2 -1
  11. package/ClientManifests.d.ts +8 -8
  12. package/Clipboard.d.ts +2 -2
  13. package/ComponentComposer.d.ts +3 -3
  14. package/Constants.d.ts +81 -82
  15. package/Constants.js +80 -80
  16. package/Contexts.d.ts +10 -11
  17. package/Enums.d.ts +28 -25
  18. package/Enums.js +26 -27
  19. package/Enums.tooling.d.ts +8 -0
  20. package/Enums.tooling.js +13 -0
  21. package/Extensions.d.ts +3 -3
  22. package/Feature.d.ts +8 -8
  23. package/FilePicker/FilePickerProviderContext.d.ts +3 -3
  24. package/FilePicker/FilePickerProviderVersionedLayoutContext.d.ts +3 -3
  25. package/FilePicker/FilePickerProviderVersionedLayoutContext.js +1 -1
  26. package/FilePicker/Providers/FilePickerProvider.d.ts +2 -2
  27. package/FileStorage.d.ts +3 -3
  28. package/IPropertiesApi.d.ts +5 -5
  29. package/Journey.d.ts +2 -2
  30. package/Layout.d.ts +13 -13
  31. package/LayoutDefinition.d.ts +7 -7
  32. package/LikeActionSettings.d.ts +3 -3
  33. package/LinkHandler/ILinkHandlerProvider.d.ts +2 -2
  34. package/LinkHandler/linktype/DefaultLinkType.d.ts +3 -3
  35. package/LinkHandler/linktype/DefaultLinkType.js +2 -1
  36. package/LinkHandler/linktype/DocumentLinkType.d.ts +3 -3
  37. package/LinkHandler/linktype/DocumentLinkType.js +2 -1
  38. package/LinkHandler/linktype/LinkType.d.ts +2 -2
  39. package/LoginLogItem.d.ts +2 -2
  40. package/ManifestIds.d.ts +524 -523
  41. package/ManifestIds.js +565 -562
  42. package/MediaScalingSettings.d.ts +3 -3
  43. package/Messaging.d.ts +6 -6
  44. package/NamedProperty.d.ts +4 -4
  45. package/PermissionInputSettings.d.ts +2 -2
  46. package/Post.d.ts +9 -9
  47. package/PromotedTagOptions.d.ts +2 -2
  48. package/PropertyArchive.d.ts +2 -2
  49. package/QueryablePropertyMessage.d.ts +2 -2
  50. package/RichTextEditorExtension.d.ts +3 -3
  51. package/RollupQuery.d.ts +4 -4
  52. package/Routing.d.ts +7 -7
  53. package/Secrets.d.ts +3 -3
  54. package/Security.d.ts +7 -7
  55. package/Store.d.ts +2 -2
  56. package/TargetingProperty.d.ts +11 -11
  57. package/ThemeDefinition.d.ts +7 -7
  58. package/ThemeDefinition.js +1 -1
  59. package/Token.d.ts +3 -3
  60. package/Translation.d.ts +5 -5
  61. package/UserdefinedLocalization.d.ts +2 -2
  62. package/VersionedData.d.ts +7 -7
  63. package/VersionedData.js +2 -2
  64. package/admin/AdminModels.d.ts +5 -5
  65. package/apps/App.d.ts +24 -24
  66. package/apps/AppInstanceRollup.d.ts +9 -9
  67. package/apps/AppNamingPolicy.d.ts +6 -6
  68. package/apps/AppProvisioning.d.ts +10 -10
  69. package/apps/AppProvisioning.js +8 -7
  70. package/auth/MagicLinkData.d.ts +3 -3
  71. package/auth/MagicLinkData.js +2 -2
  72. package/auth/OTPData.d.ts +3 -3
  73. package/auth/OTPData.js +2 -2
  74. package/auth/PasswordAuthData.d.ts +3 -3
  75. package/auth/PasswordAuthData.js +2 -2
  76. package/auth/PostProcessingAuthData.d.ts +3 -3
  77. package/auth/PostProcessingAuthData.js +2 -2
  78. package/auth/common/AuthenticationSettings.d.ts +2 -2
  79. package/auth/common/base.d.ts +3 -3
  80. package/authentication/Authentication.js +2 -1
  81. package/bulkimportusers/TemplateFileMetaData.d.ts +2 -2
  82. package/bulkimportusers/TemplateFileSettings.d.ts +3 -3
  83. package/businessprofilesettings/BusinessProfileAuthenticationSettings.d.ts +3 -3
  84. package/connected-tenants/ConnectedTenant.d.ts +2 -2
  85. package/editor-chrome/IActionButton.d.ts +2 -1
  86. package/editor-chrome/IEditorDisplayActionButton.d.ts +2 -1
  87. package/enterprise-glossary/EnterpriseGlossary.d.ts +3 -3
  88. package/enterprise-glossary/EnterpriseGlossary.js +1 -1
  89. package/enterprise-glossary/EnterpriseGlossaryInformationProvider.d.ts +2 -2
  90. package/enterprise-glossary/EnterpriseGlossaryInformationSourceSettings.d.ts +2 -2
  91. package/enterprise-glossary/EnterpriseGlossaryMapping.d.ts +3 -3
  92. package/enterprise-glossary/EnterpriseGlossaryProvider.d.ts +2 -2
  93. package/enterprise-properties/EnterpriseProperty.d.ts +7 -7
  94. package/enterprise-properties/EnterprisePropertyCategory.d.ts +2 -2
  95. package/enterprise-properties/EnterprisePropertyColumnMapping.d.ts +2 -2
  96. package/enterprise-properties/EnterprisePropertyItemSettings.d.ts +6 -6
  97. package/enterprise-properties/EnterprisePropertySet.d.ts +3 -3
  98. package/enterprise-properties/EnterprisePropertySettings.d.ts +2 -2
  99. package/enterprise-properties/EnterprisePropertyToPropertySettingsMapping.d.ts +3 -3
  100. package/filterengine/Shared.d.ts +33 -32
  101. package/filterengine/Shared.js +17 -17
  102. package/identities/ArchiveIdentityManagementQuery.d.ts +4 -4
  103. package/identities/BuiltInIdentityProvider.d.ts +5 -5
  104. package/identities/BuiltInIdentityProvider.js +3 -3
  105. package/identities/DynamicGroupIdentity.d.ts +3 -3
  106. package/identities/ExtensionIdentity.d.ts +2 -2
  107. package/identities/GroupIdentity.d.ts +5 -5
  108. package/identities/GroupManagementQuery.d.ts +4 -4
  109. package/identities/GroupType.d.ts +3 -3
  110. package/identities/Identity.d.ts +6 -6
  111. package/identities/Identity.js +6 -6
  112. package/identities/IdentityCreationRequest.d.ts +11 -11
  113. package/identities/IdentityPropertyConfiguration.d.ts +4 -4
  114. package/identities/IdentityPropertySyncBinding.d.ts +4 -4
  115. package/identities/IdentityProviderRunLog.d.ts +3 -3
  116. package/identities/IdentityProviderSettings.d.ts +2 -2
  117. package/identities/IdentityQuery.d.ts +6 -6
  118. package/identities/IdentitySyncProvider.d.ts +2 -2
  119. package/identities/InternalIdentity.js +1 -1
  120. package/identities/RoleIdentity.d.ts +2 -2
  121. package/identities/UserIdentity.d.ts +7 -7
  122. package/identities/UserIdentity.js +2 -3
  123. package/identities/UserIdentityQuery.d.ts +5 -5
  124. package/identities/UserManagementQuery.d.ts +5 -5
  125. package/identities/UserType.d.ts +5 -5
  126. package/identities/UserType.js +3 -3
  127. package/identities/UserTypeSettings.d.ts +2 -2
  128. package/identities/UserTypeSettings.js +8 -8
  129. package/internal-do-not-import-from-here/shared/broadcasting/InternalTopics.d.ts +4 -4
  130. package/internal-do-not-import-from-here/shared/factory/DefineFactory.d.ts +6 -6
  131. package/internal-do-not-import-from-here/shared/factory/ServiceContainer.d.ts +2 -2
  132. package/internal-do-not-import-from-here/shared/http/Http.d.ts +2 -2
  133. package/internal-do-not-import-from-here/shared/models/Guid.d.ts +55 -10
  134. package/internal-do-not-import-from-here/shared/models/Guid.js +40 -10
  135. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +1 -1
  136. package/internal-do-not-import-from-here/shared/models/Tenant.d.ts +2 -2
  137. package/internal-do-not-import-from-here/shared/models/Tokens.d.ts +4 -4
  138. package/internal-do-not-import-from-here/shared/models/Tooling.d.ts +13 -0
  139. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +2 -2
  140. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +2 -2
  141. package/internal-do-not-import-from-here/shared/models/Workers.d.ts +4 -4
  142. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +3 -3
  143. package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.d.ts +3 -3
  144. package/internal-do-not-import-from-here/shared/models/hub/targeting/ExternalIdentityProperty.js +1 -2
  145. package/internal-do-not-import-from-here/shared/models/hub/targeting/HubSource.d.ts +2 -1
  146. package/internal-do-not-import-from-here/shared/models/hub/targeting/HubSource.js +2 -1
  147. package/internal-do-not-import-from-here/shared/models/theming/Blueprints.d.ts +2 -2
  148. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +5 -5
  149. package/internal-do-not-import-from-here/shared/models/theming/Typography.d.ts +6 -6
  150. package/internal-do-not-import-from-here/shared/models/velcron/VelcronContentSection.d.ts +2 -2
  151. package/internal-do-not-import-from-here/shared/models/velcron/VelcronReference.d.ts +3 -3
  152. package/internal-do-not-import-from-here/shared/services/ActivityService.d.ts +1 -1
  153. package/internal-do-not-import-from-here/shared/utils/index.d.ts +1 -1
  154. package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +3 -3
  155. package/media-gallery/providers/MediaGalleryDialogProvider.d.ts +2 -2
  156. package/media-gallery/providers/MediaGalleryDisplayProvider.d.ts +2 -2
  157. package/media-gallery/providers/PhotoWall.d.ts +2 -2
  158. package/media-gallery/providers/SliderDialogProvider.d.ts +2 -2
  159. package/media-picker/MediaPickerIconsStorageProviderContext.d.ts +3 -3
  160. package/media-picker/MediaPickerIconsStorageProviderContext.js +1 -1
  161. package/media-picker/MediaPickerImageRatio.d.ts +10 -10
  162. package/media-picker/MediaPickerImageRatio.js +6 -6
  163. package/media-picker/MediaPickerImageScaling.d.ts +3 -3
  164. package/media-picker/MediaPickerMedia.d.ts +3 -3
  165. package/media-picker/MediaPickerProvider.d.ts +3 -3
  166. package/media-picker/MediaPickerProviderContext.d.ts +3 -3
  167. package/media-picker/SharePointVideoResult.d.ts +2 -2
  168. package/media-picker/interfaces/types.d.ts +4 -4
  169. package/mediaflow/Constants.d.ts +2 -1
  170. package/mediaflow/Constants.js +2 -1
  171. package/omniasearch/IndexSearchRequest.d.ts +3 -3
  172. package/omniasearch/IndexedDocument.d.ts +2 -2
  173. package/omniasearch/OmniaUserSource.d.ts +2 -2
  174. package/omniasearch/OmniaUserSource.js +2 -1
  175. package/omniasearch/PropertySource.d.ts +4 -4
  176. package/omniasearch/SearchIndex.d.ts +2 -2
  177. package/oxide/OxideTypeDefinitions.d.ts +4 -0
  178. package/oxide/OxideTypeDefinitions.js +4 -1
  179. package/package.json +1 -1
  180. package/properties/PropertyBinding.d.ts +3 -3
  181. package/properties/PropertyDefinition.d.ts +2 -2
  182. package/properties/PropertyTestCode.js +3 -3
  183. package/properties/PropertyValue.d.ts +2 -2
  184. package/properties/datasource/AppDataSourceProperty.d.ts +4 -5
  185. package/properties/datasource/DataSourceProperty.d.ts +3 -3
  186. package/properties/datasource/DataSourcePropertyDisplayInformation.d.ts +3 -3
  187. package/properties/datasource/UserDataSourceProperty.d.ts +3 -4
  188. package/properties/datasource/index.d.ts +0 -1
  189. package/properties/datasource/index.js +0 -1
  190. package/properties/definitions/BirthdayPropertyDefinition.d.ts +3 -3
  191. package/properties/definitions/BirthdayPropertyDefinition.js +2 -2
  192. package/properties/definitions/BooleanPropertyDefinition.d.ts +3 -3
  193. package/properties/definitions/BooleanPropertyDefinition.js +2 -2
  194. package/properties/definitions/BusinessProfilePropertyDefinition.d.ts +3 -3
  195. package/properties/definitions/BusinessProfilePropertyDefinition.js +2 -2
  196. package/properties/definitions/DatePropertyDefinition.d.ts +3 -3
  197. package/properties/definitions/DatePropertyDefinition.js +2 -2
  198. package/properties/definitions/DateTimePropertyDefinition.d.ts +3 -3
  199. package/properties/definitions/DateTimePropertyDefinition.js +2 -2
  200. package/properties/definitions/EmailPropertyDefinition.d.ts +3 -3
  201. package/properties/definitions/EmailPropertyDefinition.js +2 -2
  202. package/properties/definitions/HtmlPropertyDefinition.d.ts +3 -3
  203. package/properties/definitions/HtmlPropertyDefinition.js +2 -2
  204. package/properties/definitions/IdentityPropertyDefinition.d.ts +3 -3
  205. package/properties/definitions/IdentityPropertyDefinition.js +2 -2
  206. package/properties/definitions/ImagePropertyDefinition.d.ts +5 -5
  207. package/properties/definitions/ImagePropertyDefinition.js +1 -1
  208. package/properties/definitions/IntegerPropertyDefinition.d.ts +3 -3
  209. package/properties/definitions/IntegerPropertyDefinition.js +2 -2
  210. package/properties/definitions/LanguagePropertyDefinition.d.ts +3 -3
  211. package/properties/definitions/LanguagePropertyDefinition.js +2 -2
  212. package/properties/definitions/LinkPropertyDefinition.d.ts +3 -3
  213. package/properties/definitions/LinkPropertyDefinition.js +2 -2
  214. package/properties/definitions/MediaPropertyDefinition.d.ts +3 -3
  215. package/properties/definitions/MediaPropertyDefinition.js +2 -2
  216. package/properties/definitions/MultilineTextPropertyDefinition.d.ts +3 -3
  217. package/properties/definitions/MultilineTextPropertyDefinition.js +2 -2
  218. package/properties/definitions/MultilingualTextPropertyDefinition.d.ts +3 -3
  219. package/properties/definitions/MultilingualTextPropertyDefinition.js +2 -2
  220. package/properties/definitions/PhoneNumberPropertyDefinition.d.ts +3 -3
  221. package/properties/definitions/PhoneNumberPropertyDefinition.js +2 -2
  222. package/properties/definitions/TagsPropertyDefinition.d.ts +3 -3
  223. package/properties/definitions/TagsPropertyDefinition.js +2 -2
  224. package/properties/definitions/TermSetPropertyDefinition.d.ts +6 -6
  225. package/properties/definitions/TermSetPropertyDefinition.js +2 -2
  226. package/properties/definitions/TextPropertyDefinition.d.ts +3 -3
  227. package/properties/definitions/TextPropertyDefinition.js +2 -2
  228. package/properties/definitions/TimePropertyDefinition.d.ts +3 -3
  229. package/properties/definitions/TimePropertyDefinition.js +2 -2
  230. package/properties/definitions/UserTypePropertyDefinition.d.ts +3 -3
  231. package/properties/definitions/UserTypePropertyDefinition.js +2 -2
  232. package/properties/values/BusinessProfilePropertyValue.d.ts +3 -3
  233. package/properties/values/UserTypePropertyValue.d.ts +3 -3
  234. package/richtext-editor-extensions/HeadingExtension.d.ts +3 -3
  235. package/richtext-editor-extensions/TipTapEditor.d.ts +2 -2
  236. package/richtext-editor-extensions/ToolbarProperties.d.ts +2 -2
  237. package/statuscodelayout/SystemLayout.js +2 -1
  238. package/system-logs/TransactionLog.d.ts +5 -5
  239. package/user-profile/EditUserProfileHandlerRegistration.d.ts +2 -2
  240. package/ux/AdminApi.d.ts +3 -3
  241. package/ux/AppManagementApi.d.ts +12 -12
  242. package/ux/AppProvisioningValidatorApi.d.ts +2 -2
  243. package/ux/DynamicPlaceholderApi.d.ts +4 -4
  244. package/ux/EnterprisePropertyDataTypeProviderApi.d.ts +2 -2
  245. package/ux/EnterprisePropertyToPropertySettingMappingApi.d.ts +3 -3
  246. package/ux/FeatureManagementApi.d.ts +2 -2
  247. package/ux/InternalAdminApi.d.ts +3 -3
  248. package/ux/UserProfileHandlerApi.d.ts +2 -2
  249. package/velcron/VelcronDefinitionRegistration.d.ts +2 -2
  250. package/versionedlayout/VersionedLayout.d.ts +9 -9
  251. package/versionedlayout/VersionedLayout.js +4 -3
  252. package/properties/datasource/DataSourceId.d.ts +0 -2
  253. /package/{properties/datasource/DataSourceId.js → internal-do-not-import-from-here/shared/models/Tooling.js} +0 -0
@@ -1,11 +1,11 @@
1
- import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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: GuidValue;
6
- propertyBindingId: GuidValue;
5
+ id: guid;
6
+ propertyBindingId: guid;
7
7
  identityType: IdentityTypes;
8
- omniaServiceId: GuidValue;
8
+ omniaServiceId: guid;
9
9
  deletedAt?: Date;
10
10
  privacy?: IdentityPropertyPrivacy;
11
11
  }
@@ -1,12 +1,12 @@
1
- import { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
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: GuidValue;
5
+ propertyBindingId: guid;
6
6
  identityType: IdentityTypes;
7
- detailProviderId: GuidValue;
7
+ detailProviderId: guid;
8
8
  detailProviderProperty: IdentityProviderProperty;
9
9
  }
10
10
  export interface IdentityPropertySyncBinding extends IdentityPropertySyncBindingBase {
11
- propertyDefinitionId: GuidValue;
11
+ propertyDefinitionId: guid;
12
12
  }
@@ -1,9 +1,9 @@
1
- import { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
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: GuidValue;
6
- providerId: GuidValue;
5
+ id: guid;
6
+ providerId: guid;
7
7
  currentState: IdentityProviderState;
8
8
  status: IdentityProviderRunStatus;
9
9
  started?: Date;
@@ -1,4 +1,4 @@
1
- import { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
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: GuidValue;
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 { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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?: GuidValue[];
12
- providerIds?: GuidValue[];
13
- excludeTypeIds?: GuidValue[];
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?: GuidValue;
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?: GuidValue[], providerIds?: GuidValue[], excludeTypeIds?: GuidValue[], emailEnabled?: BoolFilter, permissionEnabled?: BoolFilter, scope?: string, tenantIdentityOnly?: boolean, businessProfileId?: GuidValue, scopeType?: ScopeTypes);
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 { GuidValue } from "@omnia/fx/internal-do-not-import-from-here/shared";
1
+ import { guid } from "@omnia/fx/internal-do-not-import-from-here/shared";
2
2
  export interface IdentitySyncProvider {
3
- readonly id: GuidValue;
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: GuidValue) {
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 { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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: GuidValue;
9
+ providerId: guid;
10
10
  propertyValues: PropertyValueBinding<any>[];
11
11
  displayName: PropertyValueBinding<TextPropertyDefinition>;
12
12
  image: PropertyValueBinding<ImagePropertyDefinition>;
@@ -1,4 +1,4 @@
1
- import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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: GuidValue;
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: GuidValue;
18
- providerId: GuidValue;
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: GuidValue;
68
- providerId: GuidValue;
69
- userTypeId: GuidValue;
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 = new models_1.Guid(this.resolvedUser.providerIdentity);
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 == Enums_1.SecurityIdentities.AnonymousIdentity;
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 { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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?: GuidValue[];
12
- providerIds?: GuidValue[];
13
- excludeTypeIds?: GuidValue[];
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?: GuidValue[], providerIds?: GuidValue[], excludeTypeIds?: GuidValue[], emailEnabled?: BoolFilter, permissionEnabled?: BoolFilter, scope?: string, tenantIdentityOnly?: boolean, scopeType?: ScopeTypes);
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 { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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?: GuidValue;
6
- providerId?: GuidValue;
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?: GuidValue;
17
- constructor(searchText?: string, userTypeId?: GuidValue, providerId?: GuidValue, pageNumber?: number, pageSize?: number, sortColumn?: UserSortColumn, sortDesc?: boolean, scope?: string[], disabled?: BoolFilter, timeValid?: BoolFilter, language?: LanguageTags, scopeType?: ScopeTypes, businessProfileId?: GuidValue);
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
  }
@@ -1,10 +1,10 @@
1
- import { GuidValue, Guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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: GuidValue;
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(): Guid;
21
+ static get Default(): guid;
22
22
  }
23
23
  export declare class UserTypeLayoutDefinition extends VersionedLayoutDefinition {
24
24
  constructor();
25
- userTypeId: GuidValue;
25
+ userTypeId: guid;
26
26
  }
27
27
  export declare class UserTypePrivateLayoutDefinition extends VersionedLayoutDefinition {
28
28
  constructor();
29
- userTypeId: GuidValue;
29
+ userTypeId: guid;
30
30
  }
@@ -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 new models_1.Guid("930fd165-96a9-4503-8d14-f7369694c75f"); }
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 { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
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<GuidValue>;
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, new models_1.Guid("44d8238b-97d5-468b-9a4f-4d23d95aa3b9")),
9
- username: new properties_1.PropertyBinding(properties_1.TextPropertyDefinition, new models_1.Guid("3f89e33a-143d-4b6f-ba58-b05ad6479dce")),
10
- image: new properties_1.PropertyBinding(properties_1.ImagePropertyDefinition, new models_1.Guid("964db53a-309e-4ace-b269-4637a1dd57ef")),
11
- email: new properties_1.PropertyBinding(properties_1.EmailPropertyDefinition, new models_1.Guid("143d9a73-ba3d-43ff-9f6b-9808f6ca3d2b")),
12
- preferredLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition, new models_1.Guid("aea79130-57c9-4a8a-baa4-f2b2865a4fd7")),
13
- uiLanguage: new properties_1.PropertyBinding(properties_1.LanguagePropertyDefinition, new models_1.Guid("5ba31954-1b4d-4578-a3cd-e62ebddc2a03")),
14
- userType: new properties_1.PropertyBinding(properties_1.UserTypePropertyDefinition, new models_1.Guid("53546e52-3016-4233-bdf0-6ba2a29606c9")),
15
- owner: new properties_1.PropertyBinding(properties_1.BusinessProfilePropertyDefinition, new models_1.Guid("6de8a80c-5880-45f4-b8e8-faf06da97ea1")),
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, GuidValue } from "../models";
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: GuidValue;
11
+ threadId: guid;
12
12
  }>;
13
13
  activityHubUrlUpdated: BroadcastTopic<{
14
- threadId: GuidValue;
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: GuidValue;
21
+ workerThreadId: guid;
22
22
  }>;
23
23
  };
@@ -1,12 +1,12 @@
1
- import { GuidValue, InstanceLifetimes } from "@omnia/fx-models";
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?: GuidValue): () => InferReturnSetup;
8
- export declare function defineFactory<InferReturnSetup, T1>(setup: (ctx: SetupFactoryContext, param1: T1) => InferReturnSetup, lifetime: InstanceLifetimes, typeIdentifier?: GuidValue): (param1: T1) => InferReturnSetup;
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?: GuidValue): (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?: GuidValue): (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?: GuidValue): (param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => InferReturnSetup;
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 { GuidValue } from "../models";
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: GuidValue);
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, Guid } from "../models";
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: Guid, executeOnWorker?: boolean): Http;
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
- export interface GuidValue extends Partial<IEquals<{
5
- GUID(value: GuidValue): boolean;
6
- }>> {
7
- toString: () => string;
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. The new GUID is generated according to the version 4 UUID standard,
20
- * which uses random numbers. The format of a version 4 UUID is 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx',
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?: string): guid;
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. The new GUID is generated according to the version 4 UUID standard,
15
- * which uses random numbers. The format of a version 4 UUID is 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx',
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
- exports.guid = guid;
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 = new Guid("00000000-0000-0000-0000-000000000000"); }
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;
@@ -30,5 +30,5 @@ export interface OmniaAnalytics {
30
30
  enabled: boolean;
31
31
  }
32
32
  export interface OmniaServiceToDnsMapping {
33
- [serviceId: string]: string;
33
+ [serviceId: guid]: string;
34
34
  }
@@ -1,4 +1,4 @@
1
- import { GuidValue } from "./Guid";
1
+ import { guid } from "./Guid";
2
2
  export interface TenantIdentifier {
3
- id: GuidValue;
3
+ id: guid;
4
4
  }
@@ -1,15 +1,15 @@
1
- import { GuidValue } from "./Guid";
1
+ import { guid } from "./Guid";
2
2
  export interface OmniaToken {
3
3
  tokenKey: string;
4
- tokenRef: GuidValue;
4
+ tokenRef: guid;
5
5
  loginName: string;
6
6
  expires: number;
7
7
  forDevIntent: boolean;
8
8
  }
9
9
  export interface OmniaTokenRef {
10
- tenantId: GuidValue;
10
+ tenantId: guid;
11
11
  identityId: string;
12
12
  hubIdentityId?: number;
13
- tokenRef: GuidValue;
13
+ tokenRef: guid;
14
14
  localDev: boolean;
15
15
  }