/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ export interface DataverseEntityDefinition { MetadataId?: string; LogicalName: string; DisplayCollectionName?: { UserLocalizedLabel?: { Label: string; }; }; DisplayName?: { UserLocalizedLabel?: { Label: string; }; }; Description?: { UserLocalizedLabel?: { Label: string; }; }; Attributes?: DataverseAttributeDefinition[]; PrimaryIdAttribute?: string; PrimaryNameAttribute?: string; EntitySetName?: string; ObjectTypeCode?: number; HasNotes?: boolean; IsActivity?: boolean; IsIntersect?: boolean; IsManaged?: boolean; TableType?: string; IsPrivate?: boolean; IsLogicalEntity?: boolean; OwnershipType?: string; Privileges?: unknown[]; IsAvailableOffline?: boolean; IsOfflineInMobileClient?: boolean; ManyToOneRelationships?: DataverseManyToOneRelationshipDefinition[]; OneToManyRelationships?: unknown[]; ManyToManyRelationships?: unknown[]; } export interface DataverseManyToOneRelationshipDefinition { ReferencingAttribute?: string; ReferencingEntityNavigationPropertyName?: string; } export interface DataverseAttributeDefinition { LogicalName: string; AttributeOf?: string; DisplayName?: { UserLocalizedLabel?: { Label: string; }; }; AttributeType?: string; AttributeTypeName?: { Value: string; }; IsPrimaryId?: boolean; IsPrimaryName?: boolean; IsValidODataAttribute?: boolean; RequiredLevel?: { Value: string; }; MaxLength?: number; OptionSet?: { MetadataId?: string; Name?: string; DisplayName?: { UserLocalizedLabel?: { Label: string; }; }; Description?: { UserLocalizedLabel?: { Label: string; }; }; IsGlobal?: boolean; OptionSetType?: string; Options?: DataverseOptionMetadata[]; }; GlobalOptionSet?: { MetadataId?: string; Name?: string; DisplayName?: { UserLocalizedLabel?: { Label: string; }; }; Description?: { UserLocalizedLabel?: { Label: string; }; }; IsGlobal?: boolean; OptionSetType?: string; Options?: DataverseOptionMetadata[]; }; SchemaName?: string; IsValidForUpdate?: boolean; IsValidForCreate?: boolean; } export interface DataverseOptionMetadata { Value?: number; Label?: { UserLocalizedLabel?: { Label: string; }; }; Description?: { UserLocalizedLabel?: { Label: string; }; }; Color?: string; } export interface DataverseEntitySchema { name: string; title: string; type: string; 'x-ms-dataverse-entity': boolean; 'x-ms-dataverse-entityset'?: string; 'x-ms-dataverse-primary-id'?: string; 'x-ms-dataverse-primary-name'?: string; properties: Record; } export interface DataversePropertySchema { type: string; title: string; description?: string; format?: string; 'x-ms-dataverse-attribute': string; 'x-ms-dataverse-type'?: string; 'x-ms-dataverse-primary-id'?: boolean; 'x-ms-dataverse-primary-name'?: boolean; 'x-ms-keyType'?: string; required?: boolean; maxLength?: number; 'x-ms-optionsetmetadataid'?: string; 'x-ms-optionsetdisplayname'?: string; 'x-ms-isGlobal'?: boolean; 'x-ms-optionSetType'?: string; default?: string | number; enum?: Array; 'x-ms-enum-values'?: Array; properties?: { Id: { type: string; }; Value: { type: string; }; Color: { type: string; }; }; Color?: Array; 'x-ms-schema-name'?: string; 'x-ms-dataverse-attribute-of'?: string; 'x-ms-dataverse-navigation-properties'?: string[]; 'x-ms-read-only'?: boolean; } export interface DataverseSchemaWrapper { name: string; title: string; schema: { type: string; items: { type: string; 'x-ms-dataverse-entity': boolean; 'x-ms-dataverse-entityset'?: string; 'x-ms-dataverse-primary-id'?: string; 'x-ms-dataverse-primary-name'?: string; properties: Record; required?: string[]; }; }; } export interface EnvironmentVariableValue { value: string; } export interface EnvironmentVariableDefinition { type: number; schemaname: string; displayname: string; environmentvariabledefinition_environmentvariablevalue: EnvironmentVariableValue[]; } export interface ConnectionReferenceSolutionComponent { msdyn_description: string; msdyn_displayname: string; msdyn_name: string; } export interface DataverseSolution { solutionid: string; friendlyname: string; uniquename: string; } export interface DataversePreferredSolutionResponse { solutionid?: string; } /** * Body shape for the Dataverse `AddSolutionComponent` action used to link an * already-solution-aware app (or other component) into an additional solution. * Component types follow the Dataverse `solutioncomponent.componenttype` enum; * canvas apps and code apps share component type 300. */ export interface AddSolutionComponentRequest { ComponentId: string; ComponentType: number; AddRequiredComponents: boolean; DoNotIncludeSubcomponents: boolean; SolutionUniqueName: string; } export interface DataverseWorkflow { '@odata.etag'?: string; workflowid: string; workflowidunique: string; solutionid: string; name: string; modifiedon: string; statecode: number; clientdata: string; resourceid: string | undefined; } /** * A single parameter from a CSDL or element. */ export interface CsdlParameter { name: string; /** Raw CSDL type string, e.g. "Edm.String", "Edm.Guid", "mscrm.account", "Collection(mscrm.crmbaseentity)" */ type: string; /** false means the parameter is required (Nullable="false" in CSDL) */ nullable: boolean; } /** * The return type from a CSDL element. */ export interface CsdlReturnType { /** Raw CSDL type string */ type: string; nullable: boolean; } /** * A Dataverse Action or Function parsed from the OData $metadata CSDL document. * Covers both first-party and custom operations. */ export interface CsdlOperation { name: string; kind: 'Function' | 'Action'; /** True when the first parameter is the entity binding (IsBound="true" in CSDL) */ isBound: boolean; /** All parameters including the binding parameter at index 0 when isBound is true */ parameters: CsdlParameter[]; /** Undefined for actions/functions with no element */ returnType: CsdlReturnType | undefined; } /** * The result of parsing a Dataverse OData $metadata CSDL document: the operations plus a registry * of which `mscrm.*` types are concrete, queryable entity tables. * * A type referenced by an operation parameter (e.g. `mscrm.account`) only has an `EntityDefinitions` * metadata entry when it is declared as a non-abstract `` in the CSDL. Abstract base * types (``, e.g. `crmbaseentity`) and non-entity types * (`` / ``, e.g. `EndpointAccessType`) are NOT queryable and must be skipped * before attempting a metadata fetch — otherwise the fetch returns HTTP 404. */ export interface CsdlMetadata { /** All and operations, optionally filtered by name. */ operations: CsdlOperation[]; /** * Logical names of all concrete (non-abstract) `` elements declared in the document, * e.g. `"account"`, `"opportunity"`. Excludes abstract base types and non-entity types. */ concreteEntityTypes: Set; } //# sourceMappingURL=DataverseTypes.d.ts.map