@microsoft/typespec-msgraph 0.0.1-Preview.21 → 0.0.1-Preview.22
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/dist/src/components/annotations.js +2 -2
- package/dist/src/components/enum-type-element.js +1 -1
- package/dist/src/components/enum-type-element.js.map +1 -1
- package/dist/src/components/property-element.d.ts.map +1 -1
- package/dist/src/components/property-element.js +1 -1
- package/dist/src/components/property-element.js.map +1 -1
- package/dist/src/decorators/ags-attribute.d.ts.map +1 -1
- package/dist/src/decorators/ags-attribute.js +2 -4
- package/dist/src/decorators/ags-attribute.js.map +1 -1
- package/dist/src/decorators/function.js +1 -1
- package/dist/src/decorators/function.js.map +1 -1
- package/dist/src/decorators/graphFlags.d.ts +11 -0
- package/dist/src/decorators/graphFlags.d.ts.map +1 -0
- package/dist/src/decorators/{flags.js → graphFlags.js} +5 -5
- package/dist/src/decorators/graphFlags.js.map +1 -0
- package/dist/src/decorators/index.d.ts +2 -1
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +2 -1
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/passthrough-address-url-msa.d.ts +2 -1
- package/dist/src/decorators/passthrough-address-url-msa.d.ts.map +1 -1
- package/dist/src/decorators/passthrough-address-url-msa.js +2 -1
- package/dist/src/decorators/passthrough-address-url-msa.js.map +1 -1
- package/dist/src/decorators/passthrough-address-url.d.ts +2 -1
- package/dist/src/decorators/passthrough-address-url.d.ts.map +1 -1
- package/dist/src/decorators/passthrough-address-url.js +2 -1
- package/dist/src/decorators/passthrough-address-url.js.map +1 -1
- package/dist/src/decorators/prefixed-graph-routes.d.ts +10 -0
- package/dist/src/decorators/prefixed-graph-routes.d.ts.map +1 -0
- package/dist/src/decorators/prefixed-graph-routes.js +27 -0
- package/dist/src/decorators/prefixed-graph-routes.js.map +1 -0
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +9 -6
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/entities/address-url.js +2 -2
- package/dist/src/entities/address-url.js.map +1 -1
- package/dist/src/entities/annotations.d.ts +2 -2
- package/dist/src/entities/annotations.d.ts.map +1 -1
- package/dist/src/entities/annotations.js +10 -10
- package/dist/src/entities/annotations.js.map +1 -1
- package/dist/src/entities/enum.d.ts +1 -1
- package/dist/src/entities/enum.d.ts.map +1 -1
- package/dist/src/entities/enum.js +5 -3
- package/dist/src/entities/enum.js.map +1 -1
- package/dist/src/entities/model.d.ts +19 -12
- package/dist/src/entities/model.d.ts.map +1 -1
- package/dist/src/entities/model.js +65 -6
- package/dist/src/entities/model.js.map +1 -1
- package/dist/src/entities/ms-graph-route.js +6 -6
- package/dist/src/entities/ms-graph-route.js.map +1 -1
- package/dist/src/entities/namespace.d.ts +1 -0
- package/dist/src/entities/namespace.d.ts.map +1 -1
- package/dist/src/entities/namespace.js +31 -5
- package/dist/src/entities/namespace.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +7 -0
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +7 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +7 -2
- package/dist/src/linter.js.map +1 -1
- package/dist/src/rules/address-url.d.ts +1 -0
- package/dist/src/rules/address-url.d.ts.map +1 -1
- package/dist/src/rules/address-url.js +85 -3
- package/dist/src/rules/address-url.js.map +1 -1
- package/dist/src/rules/documentation.d.ts +4 -0
- package/dist/src/rules/documentation.d.ts.map +1 -0
- package/dist/src/rules/documentation.js +88 -0
- package/dist/src/rules/documentation.js.map +1 -0
- package/dist/src/rules/entity.d.ts +3 -0
- package/dist/src/rules/entity.d.ts.map +1 -1
- package/dist/src/rules/entity.js +32 -5
- package/dist/src/rules/entity.js.map +1 -1
- package/dist/src/rules/enum.d.ts +2 -0
- package/dist/src/rules/enum.d.ts.map +1 -1
- package/dist/src/rules/enum.js +27 -1
- package/dist/src/rules/enum.js.map +1 -1
- package/dist/src/rules/expand.js +3 -3
- package/dist/src/rules/expand.js.map +1 -1
- package/dist/src/rules/index.d.ts +1 -0
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +1 -0
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/model.d.ts +5 -0
- package/dist/src/rules/model.d.ts.map +1 -1
- package/dist/src/rules/model.js +73 -3
- package/dist/src/rules/model.js.map +1 -1
- package/dist/src/rules/operation-inside-interface.d.ts.map +1 -1
- package/dist/src/rules/operation-inside-interface.js +3 -3
- package/dist/src/rules/operation-inside-interface.js.map +1 -1
- package/dist/src/rules/order-by.js +3 -3
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/ownerless.d.ts.map +1 -1
- package/dist/src/rules/ownerless.js +3 -6
- package/dist/src/rules/ownerless.js.map +1 -1
- package/dist/src/rules/required-for-create.d.ts.map +1 -1
- package/dist/src/rules/required-for-create.js +4 -5
- package/dist/src/rules/required-for-create.js.map +1 -1
- package/dist/src/utils.d.ts +2 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +66 -128
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +3 -0
- package/dist/src/validate.js.map +1 -1
- package/lib/decorators.tsp +23 -11
- package/package.json +4 -4
- package/dist/src/decorators/flags.d.ts +0 -11
- package/dist/src/decorators/flags.d.ts.map +0 -1
- package/dist/src/decorators/flags.js.map +0 -1
|
@@ -51,7 +51,7 @@ const CollectionAnnotationsElement = ({ element, }) => React.createElement(Annot
|
|
|
51
51
|
React.createElement(RecordElement, null,
|
|
52
52
|
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.HasDeleteOnResource }))),
|
|
53
53
|
React.createElement(CountRestrictionsAnnotation, { hasCountOnCollection: element.HasCountOnCollection }),
|
|
54
|
-
element.
|
|
54
|
+
element.HasNavigationProperties ?
|
|
55
55
|
React.createElement(ExpandRestrictionsAnnotation, { hasExpandOnCollectionOrResource: element.HasExpandOnCollectionOrResource, nonExpandableProperties: element.NonExpandableProperties })
|
|
56
56
|
: null,
|
|
57
57
|
React.createElement(SearchRestrictionsAnnotation, { hasSearchOnCollection: element.HasSearchOnCollection }),
|
|
@@ -76,7 +76,7 @@ const ResourceAnnotationsElement = ({ element, }) => React.createElement(Annotat
|
|
|
76
76
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.DeleteRestrictions" },
|
|
77
77
|
React.createElement(RecordElement, null,
|
|
78
78
|
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.HasDeleteOnResource }))),
|
|
79
|
-
element.
|
|
79
|
+
element.HasNavigationProperties ?
|
|
80
80
|
React.createElement(ExpandRestrictionsAnnotation, { hasExpandOnCollectionOrResource: element.HasExpandOnCollectionOrResource, nonExpandableProperties: element.NonExpandableProperties }) :
|
|
81
81
|
null,
|
|
82
82
|
React.createElement(SelectSupportedAnnotation, { isSelectSupported: element.IsSelectable }),
|
|
@@ -6,7 +6,7 @@ const Member = (props) => React.createElement("Member", props);
|
|
|
6
6
|
const EnumType = (props) => React.createElement("EnumType", props);
|
|
7
7
|
export const EnumTypeList = ({ elements }) => (React.createElement(ItemList, { items: elements, render: (element) => React.createElement(EnumTypeElement, { element: element }) }));
|
|
8
8
|
const EnumTypeElement = ({ element }) => {
|
|
9
|
-
return (React.createElement(EnumType, { Name: element.Name, ...(element.
|
|
9
|
+
return (React.createElement(EnumType, { Name: element.Name, ...(element.IsGraphFlags ? { IsFlags: "true" } : {}), ...element.AgsAttributes },
|
|
10
10
|
React.createElement(EnumMemberList, { elements: element.Elements }),
|
|
11
11
|
React.createElement(RevisionsAnnotation, { definition: element.RevisionDefinition }),
|
|
12
12
|
React.createElement(DescriptionAnnotation, { description: element.Description })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-type-element.js","sourceRoot":"","sources":["../../../src/components/enum-type-element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAOpE,MAAM,MAAM,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAMhF,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAElF,MAAM,CAAC,MAAM,YAAY,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC7E,oBAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO,GAAI,GAAI,CAC1F,CAAC;AAEF,MAAM,eAAe,GAAiC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACpE,OAAO,CACL,oBAAC,QAAQ,IACP,IAAI,EAAE,OAAO,CAAC,IAAI,KACd,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"enum-type-element.js","sourceRoot":"","sources":["../../../src/components/enum-type-element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAOpE,MAAM,MAAM,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,KAAK,CAAC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,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,KAAM,OAAO,CAAC,aAAa;QACzE,oBAAC,mBAAmB,IAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,GAAI;QAC/D,oBAAC,qBAAqB,IAAC,WAAW,EAAE,OAAO,CAAC,WAAW,GAAI,CACpD,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-element.d.ts","sourceRoot":"","sources":["../../../src/components/property-element.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"property-element.d.ts","sourceRoot":"","sources":["../../../src/components/property-element.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,oBAAoB,EAAwD,MAAM,sBAAsB,CAAC;AAqBlH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,oBAAoB,CAAA;CAAE,CAGZ,CAAA"}
|
|
@@ -23,7 +23,7 @@ const StructuralPropertyElement = ({ property }) => {
|
|
|
23
23
|
React.createElement(PermissionsAnnotation, { permission: property.Permission }),
|
|
24
24
|
React.createElement(RevisionsAnnotation, { definition: property.RevisionDefinition }),
|
|
25
25
|
React.createElement(DescriptionAnnotation, { description: property.Description }),
|
|
26
|
-
React.createElement(ImmutableAnnotation, { isImmutable: property.
|
|
26
|
+
React.createElement(ImmutableAnnotation, { isImmutable: property.IsImmutable }),
|
|
27
27
|
React.createElement(IsUrlAnnotation, { isUrl: property.IsUrl })));
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=property-element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-element.js","sourceRoot":"","sources":["../../../src/components/property-element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,C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K,GAAI,CACjC,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ags-attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EAEL,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ags-attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EAEL,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMtE;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,EACrF,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,QAMd;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GACpF,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAErB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQ7F;AAsBD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,GAAG,UAAU,EACnF,IAAI,CAAC,EAAE,gBAAgB,GACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmCxB;AA6DD,wBAAgB,6CAA6C,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAmBhL"}
|
|
@@ -4,12 +4,10 @@ import { getIsOwnerAttribute, hasIsOwner } from "./is-owner.js";
|
|
|
4
4
|
import { isPrivileged } from "./privileged.js";
|
|
5
5
|
import { getWorkloadNameMsa } from "./workload-name-msa.js";
|
|
6
6
|
import { getWorkloadName } from "./workload-name.js";
|
|
7
|
-
import { isContains } from "./contains.js";
|
|
8
|
-
import { isReferences } from "./references.js";
|
|
9
7
|
import { isExperimental, isOwnerless, isPartial } from "../index.js";
|
|
10
8
|
import { MsGraphModelKind } from "../entities/model.js";
|
|
11
9
|
import { isPrivatePreview } from "./private-preview.js";
|
|
12
|
-
import { getInterfaceNavigationSourceType } from "../utils.js";
|
|
10
|
+
import { getInterfaceNavigationSourceType, isNavigationProperty } from "../utils.js";
|
|
13
11
|
const agsAttributeKey = Symbol("agsAttribute");
|
|
14
12
|
/**
|
|
15
13
|
* `@agsAttribute` - Allows all AGS CSDL extensions that are not yet modelled explicitly in TypeSpec to be maintained
|
|
@@ -88,7 +86,7 @@ function enrichAttributesWithIsOwner(program, type, attrs, kind) {
|
|
|
88
86
|
}
|
|
89
87
|
if (type.kind === 'Model' || type.kind === 'ModelProperty') {
|
|
90
88
|
const locationContext = getLocationContext(program, type);
|
|
91
|
-
if (type.kind === 'ModelProperty' && !(
|
|
89
|
+
if (type.kind === 'ModelProperty' && !isNavigationProperty(program, type)) {
|
|
92
90
|
return attrs;
|
|
93
91
|
}
|
|
94
92
|
const isOwnerAttribute = getIsOwnerAttribute(program, type);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ags-attribute.js","sourceRoot":"","sources":["../../../src/decorators/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ags-attribute.js","sourceRoot":"","sources":["../../../src/decorators/ags-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAgB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErF,MAAM,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE/C;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AAU,CAAC,IAAI,KAAK,CAAC,EAAC,CAAC;QAAC,OAAO,MAAM,CAAC;IAAC,CAAC;IAE3C,UAAU,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,GAAG,EAAE,EAAE;QACvC,IAAG,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,EAAC,CAAC;YACrC,MAAM,WAAW,GAAG,gCAAgC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAC5E,IAAG,WAAW,EAAE,CAAC;gBACf,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBAC3C,IAAG,KAAK,EAAC,CAAC;oBACR,MAAM,eAAe,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,CAAC;oBAC7C,eAAe,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC;oBACzC,eAAe,CAAC,0BAA0B,CAAC,GAAG,MAAM,CAAC;oBACrD,KAAK,CAAC,aAAa,GAAG,eAAe,CAAC;gBACxC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -7,7 +7,7 @@ const functionKey = Symbol("function");
|
|
|
7
7
|
* [See documentation](https://eng.ms/cid/8de40593-4e2f-4f27-b24b-9f1895402243/fid/142d47c792ef952dabc55d64691b3a0bef7a19e9dd3b6a835188efb6f76aa904)
|
|
8
8
|
*/
|
|
9
9
|
export function $function(context, target, name, isComposable = false) {
|
|
10
|
-
if (typeof name === "object" && name.name === "null") {
|
|
10
|
+
if (typeof name === "object" && (name === null || name === void 0 ? void 0 : name.name) === "null") {
|
|
11
11
|
name = "";
|
|
12
12
|
}
|
|
13
13
|
context.program.stateMap(functionKey).set(target, { name: name || target.name, isComposable });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/decorators/function.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAOvC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,OAAyB,EACzB,MAAiB,EACjB,IAAa,EACb,eAAwB,KAAK;IAE7B,IAAG,OAAO,IAAI,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/decorators/function.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAOvC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,OAAyB,EACzB,MAAiB,EACjB,IAAa,EACb,eAAwB,KAAK;IAE7B,IAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAiC,aAAjC,IAAI,uBAAJ,IAAI,CAA+B,IAAI,MAAK,MAAM,EAAC,CAAC;QAClF,IAAI,GAAG,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,MAAiB;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB,EAAE,MAAiB;IAC7D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DecoratorContext, Enum, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@graphFlags` - mark an enum as a flag.
|
|
4
|
+
*
|
|
5
|
+
* `@graphFlags` can only be applied to enums.
|
|
6
|
+
*
|
|
7
|
+
* [See documentation](https://eng.ms/cid/8de40593-4e2f-4f27-b24b-9f1895402243/fid/6cd40d47c24c868aacf8a4d2521e4e17109ea59def75224be431f695c867bf91)
|
|
8
|
+
*/
|
|
9
|
+
export declare function $graphFlags(context: DecoratorContext, target: Enum): void;
|
|
10
|
+
export declare function isGraphFlags(program: Program, target: Enum): boolean;
|
|
11
|
+
//# sourceMappingURL=graphFlags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphFlags.d.ts","sourceRoot":"","sources":["../../../src/decorators/graphFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIrE;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,QAElE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,WAE1D"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const flagsKey = Symbol("flags");
|
|
2
2
|
/**
|
|
3
|
-
* `@
|
|
3
|
+
* `@graphFlags` - mark an enum as a flag.
|
|
4
4
|
*
|
|
5
|
-
* `@
|
|
5
|
+
* `@graphFlags` can only be applied to enums.
|
|
6
6
|
*
|
|
7
7
|
* [See documentation](https://eng.ms/cid/8de40593-4e2f-4f27-b24b-9f1895402243/fid/6cd40d47c24c868aacf8a4d2521e4e17109ea59def75224be431f695c867bf91)
|
|
8
8
|
*/
|
|
9
|
-
export function $
|
|
9
|
+
export function $graphFlags(context, target) {
|
|
10
10
|
context.program.stateSet(flagsKey).add(target);
|
|
11
11
|
}
|
|
12
|
-
export function
|
|
12
|
+
export function isGraphFlags(program, target) {
|
|
13
13
|
return program.stateSet(flagsKey).has(target);
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=graphFlags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphFlags.js","sourceRoot":"","sources":["../../../src/decorators/graphFlags.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,OAAyB,EAAE,MAAY;IACjE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,MAAY;IACzD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -17,7 +17,7 @@ export * from "./entity.js";
|
|
|
17
17
|
export * from "./expand.js";
|
|
18
18
|
export * from "./experimental.js";
|
|
19
19
|
export * from "./filter.js";
|
|
20
|
-
export * from "./
|
|
20
|
+
export * from "./graphFlags.js";
|
|
21
21
|
export * from "./function.js";
|
|
22
22
|
export * from "./global-operation.js";
|
|
23
23
|
export * from "./graph-deprecated.js";
|
|
@@ -34,6 +34,7 @@ export * from "./paged-collection.js";
|
|
|
34
34
|
export * from "./partial.js";
|
|
35
35
|
export * from "./passthrough-address-url.js";
|
|
36
36
|
export * from "./passthrough-address-url-msa.js";
|
|
37
|
+
export * from "./prefixed-graph-routes.js";
|
|
37
38
|
export * from "./private-preview-definition.js";
|
|
38
39
|
export * from "./private-preview.js";
|
|
39
40
|
export * from "./privileged.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,c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C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
|
|
@@ -17,7 +17,7 @@ export * from "./entity.js";
|
|
|
17
17
|
export * from "./expand.js";
|
|
18
18
|
export * from "./experimental.js";
|
|
19
19
|
export * from "./filter.js";
|
|
20
|
-
export * from "./
|
|
20
|
+
export * from "./graphFlags.js";
|
|
21
21
|
export * from "./function.js";
|
|
22
22
|
export * from "./global-operation.js";
|
|
23
23
|
export * from "./graph-deprecated.js";
|
|
@@ -34,6 +34,7 @@ export * from "./paged-collection.js";
|
|
|
34
34
|
export * from "./partial.js";
|
|
35
35
|
export * from "./passthrough-address-url.js";
|
|
36
36
|
export * from "./passthrough-address-url-msa.js";
|
|
37
|
+
export * from "./prefixed-graph-routes.js";
|
|
37
38
|
export * from "./private-preview-definition.js";
|
|
38
39
|
export * from "./private-preview.js";
|
|
39
40
|
export * from "./privileged.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DecoratorContext, Program, Interface, Operation } from "@typespec/compiler";
|
|
2
|
+
import { AddressUrlParameter } from "../index.js";
|
|
2
3
|
/**
|
|
3
4
|
* `@passthroughAddressUrlMsa` - Specifies the URL to which the operation request is forwarded when the request
|
|
4
5
|
* is authenticated with a Microsoft account and the request is eligible for response passthrough.
|
|
@@ -9,5 +10,5 @@ import { DecoratorContext, Program, Interface, Operation } from "@typespec/compi
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function $passthroughAddressUrlMsa(context: DecoratorContext, target: Interface | Operation, url: string): void;
|
|
11
12
|
export declare function hasPassthroughAddressUrlMsa(program: Program, target: Interface | Operation): boolean;
|
|
12
|
-
export declare function getPassthroughAddressUrlMsa(program: Program, target: Interface | Operation):
|
|
13
|
+
export declare function getPassthroughAddressUrlMsa(program: Program, target: Interface | Operation): AddressUrlParameter | undefined;
|
|
13
14
|
//# sourceMappingURL=passthrough-address-url-msa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passthrough-address-url-msa.d.ts","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url-msa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"passthrough-address-url-msa.d.ts","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url-msa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,GAAG,EAAE,MAAM,QAIZ;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAC5B,OAAO,CAET;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAC5B,mBAAmB,GAAG,SAAS,CAEjC"}
|
|
@@ -8,7 +8,8 @@ const passthroughAddressUrlMsaKey = Symbol("passthroughAddressUrlMsaKey");
|
|
|
8
8
|
* [See documentation](https://eng.ms/cid/8de40593-4e2f-4f27-b24b-9f1895402243/fid/c96ef60bee89c9b72634b03b75142e80338e29aa6561d8d68fb673742f7e339a)
|
|
9
9
|
*/
|
|
10
10
|
export function $passthroughAddressUrlMsa(context, target, url) {
|
|
11
|
-
|
|
11
|
+
// Adding omitRootNavigationSegment and appendSegmentNameToAddress to the state map so that returned value is consistent with other addressUrl decorators
|
|
12
|
+
context.program.stateMap(passthroughAddressUrlMsaKey).set(target, { url, omitRootNavigationSegment: false, appendSegmentNameToAddress: false });
|
|
12
13
|
}
|
|
13
14
|
export function hasPassthroughAddressUrlMsa(program, target) {
|
|
14
15
|
return program.stateMap(passthroughAddressUrlMsaKey).has(target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passthrough-address-url-msa.js","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url-msa.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"passthrough-address-url-msa.js","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url-msa.ts"],"names":[],"mappings":"AAGA,MAAM,2BAA2B,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAyB,EACzB,MAA6B,EAC7B,GAAW;IAEX,yJAAyJ;IACzJ,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;AAClJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAAgB,EAChB,MAA6B;IAE7B,OAAO,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAAgB,EAChB,MAA6B;IAE7B,OAAO,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DecoratorContext, Program, Interface, Operation } from "@typespec/compiler";
|
|
2
|
+
import { AddressUrlParameter } from "./address-url.js";
|
|
2
3
|
/**
|
|
3
4
|
* `@passthroughAddressUrl` - Specifies the URL to which the operation request is forwarded when the request
|
|
4
5
|
* is authenticated with an AAD account and the request is eligible for response passthrough.
|
|
@@ -9,5 +10,5 @@ import { DecoratorContext, Program, Interface, Operation } from "@typespec/compi
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function $passthroughAddressUrl(context: DecoratorContext, target: Interface | Operation, url: string): void;
|
|
11
12
|
export declare function hasPassthroughAddressUrl(program: Program, target: Interface | Operation): boolean;
|
|
12
|
-
export declare function getPassthroughAddressUrl(program: Program, target: Interface | Operation):
|
|
13
|
+
export declare function getPassthroughAddressUrl(program: Program, target: Interface | Operation): AddressUrlParameter | undefined;
|
|
13
14
|
//# sourceMappingURL=passthrough-address-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passthrough-address-url.d.ts","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"passthrough-address-url.d.ts","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,GAAG,EAAE,MAAM,QAIZ;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAEjG;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAC5B,mBAAmB,GAAG,SAAS,CAEjC"}
|
|
@@ -8,7 +8,8 @@ const passthroughAddressUrlKey = Symbol("passthroughAddressUrlKey");
|
|
|
8
8
|
* [See documentation](https://eng.ms/cid/8de40593-4e2f-4f27-b24b-9f1895402243/fid/5026dfeee13c9c0f44b4c6299193a89fbb272778aa408e4cd02be293d872b74d)
|
|
9
9
|
*/
|
|
10
10
|
export function $passthroughAddressUrl(context, target, url) {
|
|
11
|
-
|
|
11
|
+
// Adding omitRootNavigationSegment and appendSegmentNameToAddress to the state map so that returned value is consistent with other addressUrl decorators
|
|
12
|
+
context.program.stateMap(passthroughAddressUrlKey).set(target, { url, omitRootNavigationSegment: false, appendSegmentNameToAddress: false });
|
|
12
13
|
}
|
|
13
14
|
export function hasPassthroughAddressUrl(program, target) {
|
|
14
15
|
return program.stateMap(passthroughAddressUrlKey).has(target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passthrough-address-url.js","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"passthrough-address-url.js","sourceRoot":"","sources":["../../../src/decorators/passthrough-address-url.ts"],"names":[],"mappings":"AAGA,MAAM,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAyB,EACzB,MAA6B,EAC7B,GAAW;IAEX,yJAAyJ;IACzJ,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,yBAAyB,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/I,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAgB,EAAE,MAA6B;IACtF,OAAO,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAgB,EAChB,MAA6B;IAE7B,OAAO,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DecoratorContext, Interface } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@prefixedGraphRoutes` - Allow us to define an interface or operation with multiple HTTP routes based on catenating a set of prefixes to a path.
|
|
4
|
+
* `@prefixedGraphRoutes` - Applies to interfaces.
|
|
5
|
+
*
|
|
6
|
+
* [See documentation](TBD)
|
|
7
|
+
*/
|
|
8
|
+
export declare function $prefixedGraphRoutes(context: DecoratorContext, target: Interface, prefixes: any, // non-rest string arrays don't marshall as string arrays.
|
|
9
|
+
path?: string): void;
|
|
10
|
+
//# sourceMappingURL=prefixed-graph-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefixed-graph-routes.d.ts","sourceRoot":"","sources":["../../../src/decorators/prefixed-graph-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EAEV,MAAM,oBAAoB,CAAC;AAG5B;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,GAAG,EAAG,0DAA0D;AAC1E,IAAI,CAAC,EAAE,MAAM,QAmBd"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { $graphRoute } from "./index.js";
|
|
2
|
+
/**
|
|
3
|
+
* `@prefixedGraphRoutes` - Allow us to define an interface or operation with multiple HTTP routes based on catenating a set of prefixes to a path.
|
|
4
|
+
* `@prefixedGraphRoutes` - Applies to interfaces.
|
|
5
|
+
*
|
|
6
|
+
* [See documentation](TBD)
|
|
7
|
+
*/
|
|
8
|
+
export function $prefixedGraphRoutes(context, target, prefixes, // non-rest string arrays don't marshall as string arrays.
|
|
9
|
+
path) {
|
|
10
|
+
// Inject one @graphRoute per prefix/path combination.
|
|
11
|
+
for (const prefix of prefixes.values) {
|
|
12
|
+
let prefixValue = prefix.value;
|
|
13
|
+
if (prefixValue.endsWith("/")) {
|
|
14
|
+
prefixValue = prefixValue.slice(0, -1);
|
|
15
|
+
}
|
|
16
|
+
if (path) {
|
|
17
|
+
if (path.startsWith("/")) {
|
|
18
|
+
path = path.slice(1);
|
|
19
|
+
}
|
|
20
|
+
$graphRoute(context, target, `${prefixValue}/${path}`);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
$graphRoute(context, target, prefixValue);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=prefixed-graph-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefixed-graph-routes.js","sourceRoot":"","sources":["../../../src/decorators/prefixed-graph-routes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAO,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAyB,EACzB,MAAiB,EACjB,QAAa,EAAG,0DAA0D;AAC1E,IAAa;IAEb,sDAAsD;IACtD,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrC,IAAI,WAAW,GAAU,MAAM,CAAC,KAAK,CAAC;QACtC,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;YACD,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,IAAI,IAAI,EAAE,CAAC,CAAA;QACxD,CAAC;aACI,CAAC;YACJ,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2E,MAAM,oBAAoB,CAAC;AAG1H,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2E,MAAM,oBAAoB,CAAC;AAG1H,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,iBAkCxE"}
|
package/dist/src/emitter.js
CHANGED
|
@@ -5,17 +5,20 @@ export const defaultCsdlFileName = "workload.csdl";
|
|
|
5
5
|
export async function $onEmit(context) {
|
|
6
6
|
const program = context.program;
|
|
7
7
|
const namespaces = GetMsGraphNamespaces(program);
|
|
8
|
-
const
|
|
8
|
+
const localFile = Array.from(program.sourceFiles.keys())
|
|
9
|
+
.find((sourceFile) => sourceFile.startsWith(program.projectRoot));
|
|
10
|
+
const typespecFilename = localFile === null || localFile === void 0 ? void 0 : localFile.replace(/^.*[\\/]/, '');
|
|
11
|
+
const xmlComment = typespecFilename
|
|
12
|
+
? `<!-- This file is auto-generated from the TypeSpec source '${typespecFilename}'. DO NOT MODIFY -->`
|
|
13
|
+
: `<!-- Automatically generated file. DO NOT MODIFY`;
|
|
14
|
+
const csdl = `${xmlComment}\n${renderCsdl(namespaces)}`;
|
|
9
15
|
if (program.compilerOptions.noEmit === true)
|
|
10
16
|
return;
|
|
11
17
|
await program.host.mkdirp(program.compilerOptions.outputDir);
|
|
12
18
|
let csdlFileName = context.options.filename;
|
|
13
19
|
if (csdlFileName === undefined) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const firstFile = localFiles[0];
|
|
17
|
-
const firstFileName = firstFile.replace(/^.*[\\/]/, '');
|
|
18
|
-
const firstFileStem = removeExtension(firstFileName);
|
|
20
|
+
if (typespecFilename) {
|
|
21
|
+
const firstFileStem = removeExtension(typespecFilename);
|
|
19
22
|
csdlFileName = `${firstFileStem}.csdl`;
|
|
20
23
|
}
|
|
21
24
|
else {
|
package/dist/src/emitter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAA8D,MAAM,oBAAoB,CAAC;AAC1H,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAA2C;IACvE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;IAEhD,MAAM,
|
|
1
|
+
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../src/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,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ACzC,CAAC;aAED,CAAC;YACC,qBAAqB;YACrB,YAAY,GAAG,mBAAmB,CAAC;QACrC,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,eAAe,CAAC,SAAU,EAAE,YAAY,CAAC,CAAC;IAE/E,MAAM,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,eAAe,CAAC,QAAe;IACtC,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;QACtB,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,QAAQ,CAAC,CAAC,qBAAqB;AACxC,CAAC"}
|
|
@@ -17,14 +17,14 @@ export function getMsGraphAddressUrlMsa(program, target) {
|
|
|
17
17
|
export function getMsGraphPassthroughAddressUrl(program, target) {
|
|
18
18
|
if (hasPassthroughAddressUrl(program, target)) {
|
|
19
19
|
const passthroughAddressUrl = getPassthroughAddressUrl(program, target);
|
|
20
|
-
return populateMsGraphPassthroughAddressUrl("ags:PassthroughAddressUrl", passthroughAddressUrl);
|
|
20
|
+
return populateMsGraphPassthroughAddressUrl("ags:PassthroughAddressUrl", passthroughAddressUrl.url);
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
24
|
export function getMsGraphPassthroughAddressUrlMsa(program, target) {
|
|
25
25
|
if (hasPassthroughAddressUrlMsa(program, target)) {
|
|
26
26
|
const passthroughAddressUrlMsa = getPassthroughAddressUrlMsa(program, target);
|
|
27
|
-
return populateMsGraphPassthroughAddressUrl("ags:PassthroughAddressUrlMSA", passthroughAddressUrlMsa);
|
|
27
|
+
return populateMsGraphPassthroughAddressUrl("ags:PassthroughAddressUrlMSA", passthroughAddressUrlMsa.url);
|
|
28
28
|
}
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-url.js","sourceRoot":"","sources":["../../../src/entities/address-url.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,8CAA8C,CAAC;AAKtD,MAAM,UAAU,oBAAoB,CAClC,OAAgB,EAChB,MAAiB;IAEjB,IAAI,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACnC,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACnD,OAAO,yBAAyB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,OAAgB,EAChB,MAAiB;IAEjB,IAAI,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACzD,OAAO,yBAAyB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,OAAgB,EAChB,MAAiB;IAEjB,IAAI,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACzE,OAAO,oCAAoC,CAAC,2BAA2B,EAAE,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"address-url.js","sourceRoot":"","sources":["../../../src/entities/address-url.ts"],"names":[],"mapp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AO,EAAE,MAAM,CAAE,CAAC;QAC/E,OAAO,oCAAoC,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,GAAG,CAAC,CAAC;IAC5G,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,yBAAyB,CAChC,iBAEuB,EACvB,UAA+B;IAE/B,MAAM,iBAAiB,GAAsB,EAAE,CAAC;IAChD,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC;IACtD,IAAI,UAAU,CAAC,yBAAyB,EAAE,CAAC;QACzC,iBAAiB,CAAC,qCAAqC,CAAC,GAAG,IAAI,CAAC;IAClE,CAAC;IACD,IAAI,UAAU,CAAC,0BAA0B,EAAE,CAAC;QAC1C,iBAAiB,CAAC,gCAAgC,CAAC,GAAG,IAAI,CAAC;IAC7D,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAAS,oCAAoC,CAC3C,4BAA0F,EAC1F,qBAA6B;IAE7B,MAAM,4BAA4B,GAAiC,EAAE,CAAC;IACtE,4BAA4B,CAAC,4BAA4B,CAAC,GAAG,qBAAqB,CAAC;IACnF,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
|
|
@@ -10,7 +10,7 @@ export interface ResourceAnnotations {
|
|
|
10
10
|
HasExpandOnCollectionOrResource: boolean;
|
|
11
11
|
NonExpandableProperties: string[] | undefined;
|
|
12
12
|
Description: string | undefined;
|
|
13
|
-
|
|
13
|
+
HasNavigationProperties: boolean;
|
|
14
14
|
ExplicitBindingOperationNames: string[];
|
|
15
15
|
IsSelectable: boolean;
|
|
16
16
|
}
|
|
@@ -34,7 +34,7 @@ export interface CollectionAnnotations {
|
|
|
34
34
|
NonSortableProperties: string[] | undefined;
|
|
35
35
|
HasTopOnCollection: boolean;
|
|
36
36
|
Description: string | undefined;
|
|
37
|
-
|
|
37
|
+
HasNavigationProperties: boolean;
|
|
38
38
|
ExplicitBindingOperationNames: string[];
|
|
39
39
|
IsSelectable: boolean;
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAmC,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAmC,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAmK,MAAM,aAAa,CAAC;AAEhN,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,+BAA+B,EAAE,OAAO,CAAC;IACzC,uBAAuB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC9C,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,uBAAuB,EAAE,OAAO,CAAC;IACjC,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,kBAAkB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAA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getInterfaceNavigationSourceType, getModelStructuralPropertyNames, isInterfaceBindingTypeOwned, isRouteIndexOfACollection } from "../utils.js";
|
|
3
|
-
import { getAction, getExpand, getFilter, getFunction, getOrderBy, isAction,
|
|
2
|
+
import { getInterfaceNavigationSourceType, getModelStructuralPropertyNames, isInterfaceBindingTypeOwned, isRouteIndexOfACollection, isNavigationProperty } from "../utils.js";
|
|
3
|
+
import { getAction, getExpand, getFilter, getFunction, getOrderBy, isAction, isCount, isExpand, isFilter, isFunction, isOrderBy, isRequiredForCreate, isSearch, isSelect, isSkip, isTop } from "../index.js";
|
|
4
4
|
export function GetResourceAnnotations(program, namespaceName, navigationSources) {
|
|
5
5
|
const annotations = new Map();
|
|
6
6
|
navigationSources.forEach((entity, routePath) => {
|
|
@@ -18,7 +18,7 @@ export function GetResourceAnnotations(program, namespaceName, navigationSources
|
|
|
18
18
|
function getResourceAnnotations(program, namespaceName, routePath, entity) {
|
|
19
19
|
const resource = entity.theInterface;
|
|
20
20
|
const type = getInterfaceNavigationSourceType(program, resource);
|
|
21
|
-
const
|
|
21
|
+
const hasNavigationProperties = [...walkPropertiesInherited(type)].some((property) => isNavigationProperty(program, property));
|
|
22
22
|
const [hasExpandOnCollectionOrResource, nonExpandableProperties] = getExpandProperties(program, type, entity.operations);
|
|
23
23
|
const explicitBindingOperationNames = getExplicitBindingOperationNames(program, entity);
|
|
24
24
|
const isSelectable = entity.operations.some(o => isSelect(program, o.theOperation));
|
|
@@ -31,7 +31,7 @@ function getResourceAnnotations(program, namespaceName, routePath, entity) {
|
|
|
31
31
|
HasExpandOnCollectionOrResource: hasExpandOnCollectionOrResource,
|
|
32
32
|
NonExpandableProperties: nonExpandableProperties,
|
|
33
33
|
Description: getDoc(program, resource),
|
|
34
|
-
|
|
34
|
+
HasNavigationProperties: hasNavigationProperties,
|
|
35
35
|
ExplicitBindingOperationNames: explicitBindingOperationNames,
|
|
36
36
|
IsSelectable: isSelectable,
|
|
37
37
|
};
|
|
@@ -67,7 +67,7 @@ export function GetCollectionAnnotations(program, namespaceName, sources) {
|
|
|
67
67
|
function getCollectionAnnotations(program, namespaceName, routePath, entity) {
|
|
68
68
|
const collection = entity.theInterface;
|
|
69
69
|
const type = getInterfaceNavigationSourceType(program, collection);
|
|
70
|
-
const
|
|
70
|
+
const hasNavigationProperties = [...walkPropertiesInherited(type)].some((property) => isNavigationProperty(program, property));
|
|
71
71
|
const [hasFilterOperation, nonFilterableProperties] = getFilterProperties(program, type, entity.operations);
|
|
72
72
|
const [hasExpandOnCollectionOrResource, nonExpandableProperties] = getExpandProperties(program, type, entity.operations);
|
|
73
73
|
const [hasSortOnCollection, nonSortableProperties] = getSortProperties(program, type, entity.operations);
|
|
@@ -95,7 +95,7 @@ function getCollectionAnnotations(program, namespaceName, routePath, entity) {
|
|
|
95
95
|
NonSortableProperties: nonSortableProperties,
|
|
96
96
|
HasTopOnCollection: entity.operations.some(o => isTop(program, o.theOperation)),
|
|
97
97
|
Description: getDoc(program, collection),
|
|
98
|
-
|
|
98
|
+
HasNavigationProperties: hasNavigationProperties,
|
|
99
99
|
ExplicitBindingOperationNames: explicitBindingOperationNames,
|
|
100
100
|
IsSelectable: isSelectable,
|
|
101
101
|
};
|
|
@@ -106,7 +106,7 @@ function getExpandProperties(program, type, operations) {
|
|
|
106
106
|
if (expandOperation) {
|
|
107
107
|
const expandableProperties = getExpand(program, expandOperation.theOperation);
|
|
108
108
|
const navigationProperties = [...walkPropertiesInherited(type)]
|
|
109
|
-
.filter((property) =>
|
|
109
|
+
.filter((property) => isNavigationProperty(program, property))
|
|
110
110
|
.map((property) => property.name);
|
|
111
111
|
const nonExpandableProperties = navigationProperties.filter((property) => { var _a; return (_a = !(expandableProperties === null || expandableProperties === void 0 ? void 0 : expandableProperties.includes(property))) !== null && _a !== void 0 ? _a : false; });
|
|
112
112
|
return [true, nonExpandableProperties];
|
|
@@ -131,7 +131,7 @@ function getSortProperties(program, type, operations) {
|
|
|
131
131
|
if (sortOperationMethod) {
|
|
132
132
|
const sortableProperties = getOrderBy(program, sortOperationMethod.theOperation);
|
|
133
133
|
const nonNavigationProperties = [...walkPropertiesInherited(type)]
|
|
134
|
-
.filter((property) => !
|
|
134
|
+
.filter((property) => !isNavigationProperty(program, property))
|
|
135
135
|
.map((property) => property.name);
|
|
136
136
|
const nonSortableProperties = nonNavigationProperties.filter((property) => !sortableProperties.includes(property));
|
|
137
137
|
return [true, nonSortableProperties];
|
|
@@ -151,10 +151,10 @@ export function GetAllowedValuesAnnotations(program, namespaceName, models) {
|
|
|
151
151
|
if ((properties === null || properties === void 0 ? void 0 : properties.length) > 0) {
|
|
152
152
|
properties.forEach(property => {
|
|
153
153
|
var _a, _b;
|
|
154
|
-
if (((_b = (_a = property === null || property === void 0 ? void 0 : property.
|
|
154
|
+
if (((_b = (_a = property === null || property === void 0 ? void 0 : property.AllowedValues) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
155
155
|
annotations.set(`${namespaceName}/${value.Name}/${property.Name}`, {
|
|
156
156
|
Target: `${namespaceName}/${value.Name}/${property.Name}`,
|
|
157
|
-
allowedValues: property.
|
|
157
|
+
allowedValues: property.AllowedValues,
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
});
|