package common
Common definitions for clients. Many of these common elements are OData related since OData is the microsoft target web api protocol.
- Alphabetic
- By Inheritance
- common
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
ClientMethods extends LazyLogger
Methods common to clients.
Methods common to clients. Many take alot of parameters in order to allow them to be used in multiple places.
-
trait
ClientOptions extends AnyRef
OData control parameters such as OData "prefer" headers.
- type EntityLogicalName = common.EntityLogicalName.Type
- trait EntityLogicalName$Types extends AnyRef
- type EntitySetName = common.EntitySetName.Type
- trait EntitySetName$Types extends AnyRef
-
case class
Expand(property: String, select: Seq[String] = Nil, filter: Option[String] = None, orderBy: Seq[String] = Nil, top: Option[Int] = None) extends QueryParts with Product with Serializable
Another crude spec for $expand.
- type Id = common.Id.Type
- trait Id$Types extends AnyRef
-
trait
Label extends Object
Typically a Label or Description.
Typically a Label or Description.
- Annotations
- @RawJSType() @native()
- See also
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/label?view=dynamics-ce-odata-9
-
trait
LocalizedLabel extends Object
- Annotations
- @RawJSType() @native()
- See also
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/localizedlabel?view=dynamics-ce-odata-9
-
case class
NavProperty(name: String, id: Option[String] = None, cast: Option[String] = None) extends Product with Serializable
To navigate to child lists.
To navigate to child lists. id accesses a specific child. Cast may be required e.g. with AttributeMetadata you need Microsoft.Dynamics.CRM.PicklistAttributeMetadata to return the proper set of attributes.
- case class OrderBy(name: String, dir: OrderByDir) extends Product with Serializable
- sealed trait OrderByDir extends AnyRef
- trait QueryParts extends AnyRef
-
case class
QuerySpec(select: Seq[String] = Nil, filter: Option[String] = None, orderBy: Seq[String] = Nil, includeCount: Boolean = false, expand: Seq[Expand] = Nil, top: Option[Int] = None, skip: Option[Int] = None, fetchXml: Option[String] = None, savedQuery: Option[String] = None, userQuery: Option[String] = None, cast: Option[String] = None, properties: Seq[NavProperty] = Nil) extends QueryParts with Product with Serializable
Very crude query spec.
Very crude query spec. This still requires knowledge of the REST URL format. Can expand multiple so Option[Expand] should be Seq[Expand]. QuerySpec contains everything you need for generating a URL except! the first navigation property. "cast" applies to that first navigation property when you render it.
- final class QuerySpecOps extends AnyVal
- trait QuerySpecSyntax extends AnyRef
Value Members
- val defaultMappers: Map[String, (String) ⇒ String]
- val defaultODataToOmit: Seq[String]
-
def
dropODataFields[O <: Object](obj: O, patterns: Seq[String] = defaultODataToOmit): O
Remove any attribute that has a
@
annotation in its name. -
def
remapODataFields[O <: Object](obj: O, mappers: Map[String, (String) ⇒ String] = defaultMappers): O
Remap some CRM and OData response artifacts if found.
Remap some CRM and OData response artifacts if found. Note that if O is a non-native JS trait, you may want to ensure that you "add" attributes to your trait that match the conventions specified so you can access the attributes directly later. Mapping function is (attribute name) => (mapped attribute name). key for mappers are the odata extensions. Object is mutated directly. Clone prior if you want. This is very expensive so its *not* done by default in many methods.
- object Asc extends OrderByDir with Product with Serializable
- object Desc extends OrderByDir with Product with Serializable
- object EntityLogicalName extends EntityLogicalName$Types
- object EntitySetName extends EntitySetName$Types
- object Expand extends Serializable
- object Id extends Id$Types
- object LocalizedHelpers
- object NavProperty extends Serializable
- object OrderBy extends Serializable
- object QueryParts
- object QuerySpec extends Serializable
- object headers