@microsoft/typespec-msgraph 0.0.1-Preview.6 → 0.0.1-Preview.7
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.d.ts +5 -5
- package/dist/src/components/annotations.d.ts.map +1 -1
- package/dist/src/components/annotations.js +17 -17
- package/dist/src/components/annotations.js.map +1 -1
- package/dist/src/components/count-restrictions-annotation.d.ts +1 -1
- package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/count-restrictions-annotation.js +2 -2
- package/dist/src/components/count-restrictions-annotation.js.map +1 -1
- package/dist/src/components/expand-restrictions-annotation.d.ts +1 -1
- package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/expand-restrictions-annotation.js +3 -3
- package/dist/src/components/expand-restrictions-annotation.js.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/components/schema-element.d.ts.map +1 -1
- package/dist/src/components/schema-element.js +5 -3
- package/dist/src/components/schema-element.js.map +1 -1
- package/dist/src/components/search-restrictions-annotation.d.ts +1 -1
- package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/search-restrictions-annotation.js +2 -2
- package/dist/src/components/search-restrictions-annotation.js.map +1 -1
- package/dist/src/components/skip-supported-annotation.d.ts +1 -1
- package/dist/src/components/skip-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/skip-supported-annotation.js +1 -1
- package/dist/src/components/skip-supported-annotation.js.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.d.ts +1 -1
- package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.js +3 -3
- package/dist/src/components/sort-restrictions-annotation.js.map +1 -1
- package/dist/src/components/top-supported-annotation.d.ts +1 -1
- package/dist/src/components/top-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/top-supported-annotation.js +2 -2
- package/dist/src/components/top-supported-annotation.js.map +1 -1
- package/dist/src/entities/annotations.d.ts +17 -17
- package/dist/src/entities/annotations.d.ts.map +1 -1
- package/dist/src/entities/annotations.js +46 -47
- package/dist/src/entities/annotations.js.map +1 -1
- package/dist/src/entities/entity-container.js +1 -1
- package/dist/src/entities/entity-container.js.map +1 -1
- package/dist/src/entities/namespace.d.ts +5 -3
- package/dist/src/entities/namespace.d.ts.map +1 -1
- package/dist/src/entities/namespace.js +10 -4
- package/dist/src/entities/namespace.js.map +1 -1
- package/dist/src/entities/revision-definition.d.ts +1 -1
- package/dist/src/entities/revision-definition.js +3 -3
- package/dist/src/lib.d.ts +4 -0
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +1 -0
- package/dist/src/lib.js.map +1 -1
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts +2 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts.map +1 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.js +28 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.js.map +1 -0
- package/dist/src/rules/count.js +2 -2
- package/dist/src/rules/count.js.map +1 -1
- package/dist/src/rules/disallowed-typespec-decorators.d.ts +2 -0
- package/dist/src/rules/disallowed-typespec-decorators.d.ts.map +1 -0
- package/dist/src/rules/disallowed-typespec-decorators.js +33 -0
- package/dist/src/rules/disallowed-typespec-decorators.js.map +1 -0
- package/dist/src/rules/extends-on-same-type.d.ts +2 -0
- package/dist/src/rules/extends-on-same-type.d.ts.map +1 -0
- package/dist/src/rules/extends-on-same-type.js +38 -0
- package/dist/src/rules/extends-on-same-type.js.map +1 -0
- package/dist/src/rules/index.d.ts +4 -3
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +4 -89
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/operation-inside-interface.d.ts +2 -0
- package/dist/src/rules/operation-inside-interface.d.ts.map +1 -0
- package/dist/src/rules/operation-inside-interface.js +25 -0
- package/dist/src/rules/operation-inside-interface.js.map +1 -0
- package/dist/src/rules/order-by.js +2 -2
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/search.js +2 -2
- package/dist/src/rules/search.js.map +1 -1
- package/dist/src/rules/skip.js +2 -2
- package/dist/src/rules/skip.js.map +1 -1
- package/dist/src/rules/top.js +2 -2
- package/dist/src/rules/top.js.map +1 -1
- package/dist/src/utils.d.ts +3 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +39 -21
- package/dist/src/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
4
|
-
elements: Map<string,
|
|
2
|
+
import { CollectionAnnotations, ResourceAnnotations } from "../entities/annotations.js";
|
|
3
|
+
export declare const CollectionAnnotationsList: FC<{
|
|
4
|
+
elements: Map<string, CollectionAnnotations>;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const
|
|
7
|
-
elements: Map<string,
|
|
6
|
+
export declare const ResourceAnnotationsList: FC<{
|
|
7
|
+
elements: Map<string, ResourceAnnotations>;
|
|
8
8
|
}>;
|
|
9
9
|
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/components/annotations.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/components/annotations.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AASxF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;CAAE,CAIrF,CAAA;AAEN,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC;IAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;CAAE,CAIjF,CAAA"}
|
|
@@ -9,37 +9,37 @@ import { TopSupportedAnnotation } from "./top-supported-annotation.js";
|
|
|
9
9
|
import { DescriptionAnnotation } from "./description-annotation.js";
|
|
10
10
|
import { UpdateRestrictionsAnnotation } from "./update-restrictions-annotation.js";
|
|
11
11
|
const AnnotationsElem = (props) => React.createElement("Annotations", props);
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
const
|
|
12
|
+
export const CollectionAnnotationsList = ({ elements }) => React.createElement(ItemList, { items: elements, render: (element) => React.createElement(CollectionAnnotationsElement, { element: element }) });
|
|
13
|
+
export const ResourceAnnotationsList = ({ elements }) => React.createElement(ItemList, { items: elements, render: (element) => React.createElement(ResourceAnnotationsElement, { element: element }) });
|
|
14
|
+
const CollectionAnnotationsElement = ({ element, }) => React.createElement(AnnotationsElem, { Target: element.Target },
|
|
15
15
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.ReadRestrictions" },
|
|
16
16
|
React.createElement(RecordElement, null,
|
|
17
17
|
React.createElement(PropertyValueElement, { Property: "Readable", Bool: element.HasGetOnCollection }),
|
|
18
18
|
React.createElement(PropertyValueElement, { Property: "ReadByKeyRestrictions" },
|
|
19
19
|
React.createElement(RecordElement, null,
|
|
20
|
-
React.createElement(PropertyValueElement, { Property: "Readable", Bool: element.
|
|
20
|
+
React.createElement(PropertyValueElement, { Property: "Readable", Bool: element.HasGetOnResource }))))),
|
|
21
21
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.InsertRestrictions" },
|
|
22
22
|
React.createElement(RecordElement, null,
|
|
23
23
|
React.createElement(PropertyValueElement, { Property: "Insertable", Bool: element.HasPostOnCollection }))),
|
|
24
|
-
React.createElement(UpdateRestrictionsAnnotation, { hasUpdateOperation: element.
|
|
24
|
+
React.createElement(UpdateRestrictionsAnnotation, { hasUpdateOperation: element.HasPatchOnResource }),
|
|
25
25
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.DeleteRestrictions" },
|
|
26
26
|
React.createElement(RecordElement, null,
|
|
27
|
-
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.
|
|
28
|
-
React.createElement(CountRestrictionsAnnotation, {
|
|
29
|
-
React.createElement(ExpandRestrictionsAnnotation, {
|
|
30
|
-
React.createElement(SearchRestrictionsAnnotation, {
|
|
31
|
-
React.createElement(SkipSupportedAnnotation, {
|
|
32
|
-
React.createElement(SortRestrictionsAnnotation, {
|
|
33
|
-
React.createElement(TopSupportedAnnotation, {
|
|
27
|
+
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.HasDeleteOnResource }))),
|
|
28
|
+
React.createElement(CountRestrictionsAnnotation, { hasCountOnCollection: element.HasCountOnCollection }),
|
|
29
|
+
React.createElement(ExpandRestrictionsAnnotation, { hasExpandOnCollectionOrResource: element.HasExpandOnCollectionOrResource, nonExpandableProperties: element.NonExpandableProperties }),
|
|
30
|
+
React.createElement(SearchRestrictionsAnnotation, { hasSearchOnCollection: element.HasSearchOnCollection }),
|
|
31
|
+
React.createElement(SkipSupportedAnnotation, { hasSkipOnCollection: element.HasSkipOnCollection }),
|
|
32
|
+
React.createElement(SortRestrictionsAnnotation, { hasSortOnCollection: element.HasSortOnCollection, nonSortableProperties: element.NonSortableProperties }),
|
|
33
|
+
React.createElement(TopSupportedAnnotation, { hasTopOnCollection: element.HasTopOnCollection }),
|
|
34
34
|
React.createElement(DescriptionAnnotation, { description: element.Description }));
|
|
35
|
-
const
|
|
35
|
+
const ResourceAnnotationsElement = ({ element, }) => React.createElement(AnnotationsElem, { Target: element.Target },
|
|
36
36
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.ReadRestrictions" },
|
|
37
37
|
React.createElement(RecordElement, null,
|
|
38
|
-
React.createElement(PropertyValueElement, { Property: "Readable", Bool: element.
|
|
39
|
-
React.createElement(UpdateRestrictionsAnnotation, { hasUpdateOperation: element.
|
|
38
|
+
React.createElement(PropertyValueElement, { Property: "Readable", Bool: element.HasGetOnResource }))),
|
|
39
|
+
React.createElement(UpdateRestrictionsAnnotation, { hasUpdateOperation: element.HasPatchOnResource }),
|
|
40
40
|
React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.DeleteRestrictions" },
|
|
41
41
|
React.createElement(RecordElement, null,
|
|
42
|
-
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.
|
|
43
|
-
React.createElement(ExpandRestrictionsAnnotation, {
|
|
42
|
+
React.createElement(PropertyValueElement, { Property: "Deletable", Bool: element.HasDeleteOnResource }))),
|
|
43
|
+
React.createElement(ExpandRestrictionsAnnotation, { hasExpandOnCollectionOrResource: element.HasExpandOnCollectionOrResource, nonExpandableProperties: element.NonExpandableProperties }),
|
|
44
44
|
React.createElement(DescriptionAnnotation, { description: element.Description }));
|
|
45
45
|
//# sourceMappingURL=annotations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../src/components/annotations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE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/count-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"count-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/count-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC;IAAE,oBAAoB,EAAE,OAAO,CAAA;CAAE,CAKxD,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement, PropertyValueElement, RecordElement } from "./common-elements.js";
|
|
3
|
-
export const CountRestrictionsAnnotation = ({
|
|
3
|
+
export const CountRestrictionsAnnotation = ({ hasCountOnCollection }) => React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.CountRestrictions" },
|
|
4
4
|
React.createElement(RecordElement, null,
|
|
5
|
-
React.createElement(PropertyValueElement, { Property: "Countable", Bool:
|
|
5
|
+
React.createElement(PropertyValueElement, { Property: "Countable", Bool: hasCountOnCollection })));
|
|
6
6
|
//# sourceMappingURL=count-restrictions-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/count-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,CAAC,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"count-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/count-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,CAAC,MAAM,2BAA2B,GAA0C,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC7G,oBAAC,iBAAiB,IAAC,IAAI,EAAC,6CAA6C;IACnE,oBAAC,aAAa;QACZ,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,WAAW,EAAC,IAAI,EAAE,oBAAoB,GAAI,CAC3D,CACE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
export declare const ExpandRestrictionsAnnotation: FC<{
|
|
3
|
-
|
|
3
|
+
hasExpandOnCollectionOrResource: boolean;
|
|
4
4
|
nonExpandableProperties: string[] | undefined;
|
|
5
5
|
}>;
|
|
6
6
|
//# sourceMappingURL=expand-restrictions-annotation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/expand-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"expand-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/expand-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAAC;IAAE,+BAA+B,EAAE,OAAO,CAAC;IAAC,uBAAuB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,CAOjH,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement, CollectionElement, NavigationPropertyPathElement, PropertyValueElement, RecordElement } from "./common-elements.js";
|
|
3
|
-
export const ExpandRestrictionsAnnotation = ({
|
|
3
|
+
export const ExpandRestrictionsAnnotation = ({ hasExpandOnCollectionOrResource, nonExpandableProperties }) => React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.ExpandRestrictions" },
|
|
4
4
|
React.createElement(RecordElement, null,
|
|
5
|
-
React.createElement(PropertyValueElement, { Property: "Expandable", Bool:
|
|
6
|
-
|
|
5
|
+
React.createElement(PropertyValueElement, { Property: "Expandable", Bool: hasExpandOnCollectionOrResource }),
|
|
6
|
+
hasExpandOnCollectionOrResource ? React.createElement(NonExpandableProperties, { nonExpandableProperties: nonExpandableProperties }) : React.createElement(React.Fragment, null)));
|
|
7
7
|
const NonExpandableProperties = ({ nonExpandableProperties }) => React.createElement(PropertyValueElement, { Property: "NonExpandableProperties" },
|
|
8
8
|
React.createElement(CollectionElement, null, nonExpandableProperties === null || nonExpandableProperties === void 0 ? void 0 : nonExpandableProperties.map((property) => (React.createElement(NavigationPropertyPathElement, { key: property },
|
|
9
9
|
React.createElement(React.Fragment, null, property))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/expand-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEhJ,MAAM,CAAC,MAAM,4BAA4B,GACrC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"expand-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/expand-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEhJ,MAAM,CAAC,MAAM,4BAA4B,GACrC,CAAC,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,EAAE,EAAE,CACjE,oBAAC,iBAAiB,IAAC,IAAI,EAAC,8CAA8C;IACpE,oBAAC,aAAa;QACZ,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,YAAY,EAAC,IAAI,EAAE,+BAA+B,GAAI;QACnF,+BAA+B,CAAC,CAAC,CAAC,oBAAC,uBAAuB,IAAC,uBAAuB,EAAE,uBAAuB,GAAG,CAAC,CAAC,CAAC,yCAAK,CAC1G,CACE,CAAA;AAExB,MAAM,uBAAuB,GAA0D,CAAC,EAAE,uBAAuB,EAAE,EAAE,EAAE,CACrH,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,yBAAyB;IACtD,oBAAC,iBAAiB,QACf,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC1C,oBAAC,6BAA6B,IAAC,GAAG,EAAE,QAAQ;QAC1C,0CAAG,QAAQ,CAAI,CACe,CACjC,CAAC,CACgB,CACC,CAAA"}
|
|
@@ -9,7 +9,7 @@ export const PropertyElement = ({ property }) => property.IsNavigation
|
|
|
9
9
|
? React.createElement(NavigationPropertyElement, { property: property })
|
|
10
10
|
: React.createElement(StructuralPropertyElement, { property: property });
|
|
11
11
|
const NavigationPropertyElement = ({ property }) => {
|
|
12
|
-
return (React.createElement(NavigationProperty, { Name: property.Name, Type: property.PropertyTypeName, ...(property.IsContained ? { ContainsTarget: "true" } : {}), ...property.AgsAttributes },
|
|
12
|
+
return (React.createElement(NavigationProperty, { Name: property.Name, Type: property.PropertyTypeName, ...(property.IsContained ? { ContainsTarget: "true" } : {}), ...(property.IsNullable ? {} : { Nullable: "false" }), ...property.AgsAttributes },
|
|
13
13
|
React.createElement(RevisionsAnnotation, { definition: property.RevisionDefinition }),
|
|
14
14
|
React.createElement(DescriptionAnnotation, { description: property.Description })));
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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AI;QAC1D,oBAAC,mBAAmB,IAAC,UAAU,EAAE,QAAQ,CAAC,kBAAkB,GAAI;QAChE,oBAAC,qBAAqB,IAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,GAAI,CACnD,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-element.d.ts","sourceRoot":"","sources":["../../../src/components/schema-element.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkB5D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,SAAS,EAAE,gBAAgB,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"schema-element.d.ts","sourceRoot":"","sources":["../../../src/components/schema-element.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkB5D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC;IAAE,SAAS,EAAE,gBAAgB,CAAA;CAAE,CAa7D,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { EnumTypeList } from "./enum-type-element.js";
|
|
|
5
5
|
import { OperationElement } from "./operation-element.js";
|
|
6
6
|
import { EntityTypeElement, ComplexTypeElement } from "./structured-type-element.js";
|
|
7
7
|
import { MsGraphModelKind } from "../entities/model.js";
|
|
8
|
-
import {
|
|
8
|
+
import { CollectionAnnotationsList, ResourceAnnotationsList } from "./annotations.js";
|
|
9
9
|
const Schema = (props) => React.createElement("Schema", {
|
|
10
10
|
...props,
|
|
11
11
|
xmlns: "http://docs.oasis-open.org/odata/ns/edm",
|
|
@@ -17,8 +17,10 @@ export const SchemaElement = ({ namespace }) => {
|
|
|
17
17
|
React.createElement(ModelList, { models: namespace.Models }),
|
|
18
18
|
React.createElement(OperationList, { operations: namespace.Operations }),
|
|
19
19
|
React.createElement(EntityContainerElement, { singletons: namespace.Singletons, entitySets: namespace.EntitySets, agsAttributes: namespace.AgsAttributes }),
|
|
20
|
-
React.createElement(
|
|
21
|
-
React.createElement(
|
|
20
|
+
React.createElement(ResourceAnnotationsList, { elements: namespace.SingletonAnnotations }),
|
|
21
|
+
React.createElement(CollectionAnnotationsList, { elements: namespace.EntitySetAnnotations }),
|
|
22
|
+
React.createElement(ResourceAnnotationsList, { elements: namespace.ResourceAnnotations }),
|
|
23
|
+
React.createElement(CollectionAnnotationsList, { elements: namespace.CollectionAnnotations })));
|
|
22
24
|
};
|
|
23
25
|
const ModelList = ({ models }) => {
|
|
24
26
|
return React.createElement(ItemList, { items: models, render: (model) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-element.js","sourceRoot":"","sources":["../../../src/components/schema-element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAgB,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"schema-element.js","sourceRoot":"","sources":["../../../src/components/schema-element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OA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AE,EAAE,EAAE;IAC1E,OAAO,oBAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAChD,QAAO,KAAK,CAAC,IAAI,EAAE;gBACjB,KAAK,gBAAgB,CAAC,MAAM,CAAC,CAAC;oBAC5B,OAAO,oBAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;iBAC3C;gBACD,KAAK,gBAAgB,CAAC,OAAO,CAAC,CAAC;oBAC7B,OAAO,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;iBAC5C;gBACD,OAAO,CAAC,CAAC;oBACP,OAAO,yCAAK,CAAA;iBACb;aACF;QACH,CAAC,GAAI,CAAC;AACR,CAAC,CAAC;AAEF,MAAM,aAAa,GAA2C,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAC/E,OAAO,oBAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,oBAAC,gBAAgB,IAAC,OAAO,EAAE,SAAS,GAAI,GAAI,CAAA;AACzG,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/search-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"search-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/search-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAAC;IAAE,qBAAqB,EAAE,OAAO,CAAA;CAAE,CAK1D,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement, PropertyValueElement, RecordElement } from "./common-elements.js";
|
|
3
|
-
export const SearchRestrictionsAnnotation = ({
|
|
3
|
+
export const SearchRestrictionsAnnotation = ({ hasSearchOnCollection }) => React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.SearchRestrictions" },
|
|
4
4
|
React.createElement(RecordElement, null,
|
|
5
|
-
React.createElement(PropertyValueElement, { Property: "Searchable", Bool:
|
|
5
|
+
React.createElement(PropertyValueElement, { Property: "Searchable", Bool: hasSearchOnCollection })));
|
|
6
6
|
//# sourceMappingURL=search-restrictions-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/search-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,CAAC,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"search-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/search-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F,MAAM,CAAC,MAAM,4BAA4B,GAA2C,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE,CAChH,oBAAC,iBAAiB,IAAC,IAAI,EAAC,8CAA8C;IACpE,oBAAC,aAAa;QACZ,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,YAAY,EAAC,IAAI,EAAE,qBAAqB,GAAI,CAC7D,CACE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-supported-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/skip-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"skip-supported-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/skip-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC;IAAE,mBAAmB,EAAE,OAAO,CAAA;CAAE,CACwB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement } from "./common-elements.js";
|
|
3
|
-
export const SkipSupportedAnnotation = ({
|
|
3
|
+
export const SkipSupportedAnnotation = ({ hasSkipOnCollection }) => React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.SkipSupported", Bool: hasSkipOnCollection });
|
|
4
4
|
//# sourceMappingURL=skip-supported-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-supported-annotation.js","sourceRoot":"","sources":["../../../src/components/skip-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"skip-supported-annotation.js","sourceRoot":"","sources":["../../../src/components/skip-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,uBAAuB,GAAyC,CAAC,EAAE,mBAAmB,EAAE,EAAE,EAAE,CACvG,oBAAC,iBAAiB,IAAC,IAAI,EAAC,yCAAyC,EAAC,IAAI,EAAE,mBAAmB,GAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/sort-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,0BAA0B,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"sort-restrictions-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/sort-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,0BAA0B,EAAE,EAAE,CAAC;IAAE,mBAAmB,EAAE,OAAO,CAAC;IAAC,qBAAqB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,CAOjG,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement, CollectionElement, PropertyPathElement, PropertyValueElement, RecordElement } from "./common-elements.js";
|
|
3
|
-
export const SortRestrictionsAnnotation = ({
|
|
3
|
+
export const SortRestrictionsAnnotation = ({ hasSortOnCollection, nonSortableProperties }) => React.createElement(AnnotationElement, { Term: "Org.OData.Capabilities.V1.SortRestrictions" },
|
|
4
4
|
React.createElement(RecordElement, null,
|
|
5
|
-
React.createElement(PropertyValueElement, { Property: "Sortable", Bool:
|
|
6
|
-
|
|
5
|
+
React.createElement(PropertyValueElement, { Property: "Sortable", Bool: hasSortOnCollection }),
|
|
6
|
+
hasSortOnCollection ? React.createElement(NonSortableProperties, { nonSortableProperties: nonSortableProperties }) : React.createElement(React.Fragment, null)));
|
|
7
7
|
const NonSortableProperties = ({ nonSortableProperties }) => React.createElement(PropertyValueElement, { Property: "NonSortableProperties" },
|
|
8
8
|
React.createElement(CollectionElement, null, nonSortableProperties === null || nonSortableProperties === void 0 ? void 0 : nonSortableProperties.map((property) => (React.createElement(PropertyPathElement, { key: property },
|
|
9
9
|
React.createElement(React.Fragment, null, property))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/sort-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEtI,MAAM,CAAC,MAAM,0BAA0B,GACnC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"sort-restrictions-annotation.js","sourceRoot":"","sources":["../../../src/components/sort-restrictions-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEtI,MAAM,CAAC,MAAM,0BAA0B,GACnC,CAAC,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,EAAE,EAAE,CACnD,oBAAC,iBAAiB,IAAC,IAAI,EAAC,4CAA4C;IAClE,oBAAC,aAAa;QACZ,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,UAAU,EAAC,IAAI,EAAE,mBAAmB,GAAI;QACrE,mBAAmB,CAAC,CAAC,CAAC,oBAAC,qBAAqB,IAAC,qBAAqB,EAAE,qBAAqB,GAAG,CAAC,CAAC,CAAC,yCAAK,CACxF,CACE,CAAA;AAExB,MAAM,qBAAqB,GAAwD,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE,CAC/G,oBAAC,oBAAoB,IAAC,QAAQ,EAAC,uBAAuB;IACpD,oBAAC,iBAAiB,QACf,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACxC,oBAAC,mBAAmB,IAAC,GAAG,EAAE,QAAQ;QAChC,0CAAG,QAAQ,CAAI,CACK,CACvB,CAAC,CACgB,CACC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-supported-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC;IAAE,
|
|
1
|
+
{"version":3,"file":"top-supported-annotation.d.ts","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC;IAAE,kBAAkB,EAAE,OAAO,CAAA;CAAE,CAEtE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AnnotationElement } from "./common-elements.js";
|
|
3
|
-
export const TopSupportedAnnotation = ({
|
|
4
|
-
return React.createElement(AnnotationElement, { Term: "Org.OData.Core.V1.TopSupported", Bool:
|
|
3
|
+
export const TopSupportedAnnotation = ({ hasTopOnCollection }) => {
|
|
4
|
+
return React.createElement(AnnotationElement, { Term: "Org.OData.Core.V1.TopSupported", Bool: hasTopOnCollection });
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=top-supported-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-supported-annotation.js","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"top-supported-annotation.js","sourceRoot":"","sources":["../../../src/components/top-supported-annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,GAAwC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE;IACpG,OAAO,oBAAC,iBAAiB,IAAC,IAAI,EAAC,gCAAgC,EAAC,IAAI,EAAE,kBAAkB,GAAI,CAAC;AAC/F,CAAC,CAAC"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { Program } from "@typespec/compiler";
|
|
2
2
|
import { MsGraphInterface } from "../utils.js";
|
|
3
|
-
export interface
|
|
3
|
+
export interface ResourceAnnotations {
|
|
4
4
|
Target: string | undefined;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
HasGetOnResource: boolean;
|
|
6
|
+
HasPatchOnResource: boolean;
|
|
7
|
+
HasDeleteOnResource: boolean;
|
|
8
|
+
HasExpandOnCollectionOrResource: boolean;
|
|
9
9
|
NonExpandableProperties: string[] | undefined;
|
|
10
10
|
Description: string | undefined;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface CollectionAnnotations {
|
|
13
13
|
Target: string | undefined;
|
|
14
14
|
HasGetOnCollection: boolean;
|
|
15
|
-
|
|
15
|
+
HasGetOnResource: boolean;
|
|
16
16
|
HasPostOnCollection: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
HasPatchOnResource: boolean;
|
|
18
|
+
HasDeleteOnResource: boolean;
|
|
19
|
+
HasCountOnCollection: boolean;
|
|
20
|
+
HasExpandOnCollectionOrResource: boolean;
|
|
21
21
|
NonExpandableProperties: string[] | undefined;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
HasSearchOnCollection: boolean;
|
|
23
|
+
HasSkipOnCollection: boolean;
|
|
24
|
+
HasSortOnCollection: boolean;
|
|
25
25
|
NonSortableProperties: string[] | undefined;
|
|
26
|
-
|
|
26
|
+
HasTopOnCollection: boolean;
|
|
27
27
|
Description: string | undefined;
|
|
28
28
|
}
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function
|
|
29
|
+
export declare function GetResourceAnnotations(program: Program, namespaceName: string, navigationSources: Map<string, MsGraphInterface>): Map<string, ResourceAnnotations>;
|
|
30
|
+
export declare function GetCollectionAnnotations(program: Program, namespaceName: string, sources: Map<string, MsGraphInterface>): Map<string, CollectionAnnotations>;
|
|
31
31
|
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,OAAO,EAAmC,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAoC,MAAM,aAAa,CAAC;AAIjF,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,OAAO,EAAmC,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAoC,MAAM,aAAa,CAAC;AAIjF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,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;CACjC;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,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,+BAA+B,EAAE,OAAO,CAAC;IACzC,uBAAuB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC9C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,qBAAqB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAQD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAQlK;AAmCD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAQ5J"}
|
|
@@ -2,76 +2,77 @@ import { getDoc, walkPropertiesInherited } from "@typespec/compiler";
|
|
|
2
2
|
import { getInterfaceNavigationSourceType } from "../utils.js";
|
|
3
3
|
import { getOperationVerb } from "@typespec/http";
|
|
4
4
|
import { getExpand, getOrderBy, isContains, isCount, isExpand, isOrderBy, isReferences, isSearch, isSkip, isTop } from "../index.js";
|
|
5
|
-
export function
|
|
5
|
+
export function GetResourceAnnotations(program, namespaceName, navigationSources) {
|
|
6
6
|
const annotations = new Map();
|
|
7
7
|
navigationSources.forEach((entity, routePath) => {
|
|
8
|
-
annotations.set(routePath,
|
|
8
|
+
annotations.set(routePath, getResourceAnnotations(program, namespaceName, routePath, entity));
|
|
9
9
|
});
|
|
10
10
|
return annotations;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
const type = getInterfaceNavigationSourceType(program,
|
|
12
|
+
function getResourceAnnotations(program, namespaceName, routePath, entity) {
|
|
13
|
+
const resource = entity.theInterface;
|
|
14
|
+
const type = getInterfaceNavigationSourceType(program, resource);
|
|
15
|
+
const minimumParameters = routePath.split('/').length - 1;
|
|
15
16
|
const operationMethods = [...entity.operations].map(operation => ({
|
|
16
17
|
operation,
|
|
17
18
|
verb: getOperationVerb(program, operation),
|
|
19
|
+
hasMinimumParameters: operation.parameters.properties.size === minimumParameters,
|
|
18
20
|
}));
|
|
19
|
-
const [
|
|
21
|
+
const [hasExpandOnCollectionOrResource, nonExpandableProperties] = getExpandProperties(program, type, operationMethods);
|
|
20
22
|
const annotations = {
|
|
21
23
|
Target: `${namespaceName}.container/${routePath}`,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
HasGetOnResource: operationMethods.some(({ verb }) => verb === "get"),
|
|
25
|
+
HasPatchOnResource: operationMethods.some(({ verb }) => verb === "patch"),
|
|
26
|
+
HasDeleteOnResource: operationMethods.some(({ verb }) => verb === "delete"),
|
|
27
|
+
HasExpandOnCollectionOrResource: hasExpandOnCollectionOrResource,
|
|
26
28
|
NonExpandableProperties: nonExpandableProperties,
|
|
27
|
-
Description: getDoc(program,
|
|
29
|
+
Description: getDoc(program, resource),
|
|
28
30
|
};
|
|
29
31
|
return annotations;
|
|
30
32
|
}
|
|
31
|
-
export function
|
|
33
|
+
export function GetCollectionAnnotations(program, namespaceName, sources) {
|
|
32
34
|
const annotations = new Map();
|
|
33
35
|
sources.forEach((entity, routePath) => {
|
|
34
|
-
annotations.set(routePath,
|
|
36
|
+
annotations.set(routePath, getCollectionAnnotations(program, namespaceName, routePath, entity));
|
|
35
37
|
});
|
|
36
38
|
return annotations;
|
|
37
39
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
const type = getInterfaceNavigationSourceType(program,
|
|
40
|
+
function getCollectionAnnotations(program, namespaceName, routePath, entity) {
|
|
41
|
+
const collection = entity.theInterface;
|
|
42
|
+
const type = getInterfaceNavigationSourceType(program, collection);
|
|
43
|
+
const minimumParameters = routePath.split('/').length - 1;
|
|
41
44
|
const operationMethods = entity.operations.map(operation => ({
|
|
42
45
|
operation,
|
|
43
46
|
verb: getOperationVerb(program, operation),
|
|
44
|
-
|
|
47
|
+
hasMinimumParameters: operation.parameters.properties.size === minimumParameters,
|
|
45
48
|
}));
|
|
46
|
-
const [
|
|
47
|
-
const [
|
|
49
|
+
const [hasExpandOnCollectionOrResource, nonExpandableProperties] = getExpandProperties(program, type, operationMethods);
|
|
50
|
+
const [hasSortOnCollection, nonSortableProperties] = getSortProperties(program, type, operationMethods);
|
|
48
51
|
const annotations = {
|
|
49
52
|
Target: `${namespaceName}.container/${routePath}`,
|
|
50
|
-
HasGetOnCollection: operationMethods.some(
|
|
51
|
-
|
|
52
|
-
HasPostOnCollection: operationMethods.some(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
HasGetOnCollection: operationMethods.some(m => m.hasMinimumParameters && m.verb === "get"),
|
|
54
|
+
HasGetOnResource: operationMethods.some(m => !m.hasMinimumParameters && m.verb === "get"),
|
|
55
|
+
HasPostOnCollection: operationMethods.some(m => m.verb === "post"),
|
|
56
|
+
HasPatchOnResource: operationMethods.some(m => !m.hasMinimumParameters && m.verb === "patch"),
|
|
57
|
+
HasDeleteOnResource: operationMethods.some(m => !m.hasMinimumParameters && m.verb === "delete"),
|
|
58
|
+
HasCountOnCollection: operationMethods.some(m => isCount(program, m.operation)),
|
|
59
|
+
HasSearchOnCollection: operationMethods.some(m => isSearch(program, m.operation)),
|
|
60
|
+
HasSkipOnCollection: operationMethods.some(m => isSkip(program, m.operation)),
|
|
61
|
+
HasExpandOnCollectionOrResource: hasExpandOnCollectionOrResource,
|
|
59
62
|
NonExpandableProperties: nonExpandableProperties,
|
|
60
|
-
|
|
63
|
+
HasSortOnCollection: hasSortOnCollection,
|
|
61
64
|
NonSortableProperties: nonSortableProperties,
|
|
62
|
-
|
|
63
|
-
Description: getDoc(program,
|
|
65
|
+
HasTopOnCollection: operationMethods.some(m => isTop(program, m.operation)),
|
|
66
|
+
Description: getDoc(program, collection),
|
|
64
67
|
};
|
|
65
68
|
return annotations;
|
|
66
69
|
}
|
|
67
|
-
function getExpandProperties(program, type,
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
isExpand(program, operation));
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
const [_, operation] = expandedOperation;
|
|
74
|
-
const expandableProperties = getExpand(program, operation);
|
|
70
|
+
function getExpandProperties(program, type, operationMethods) {
|
|
71
|
+
const expandOperationMethod = operationMethods.find(m => m.verb === "get" &&
|
|
72
|
+
m.hasMinimumParameters &&
|
|
73
|
+
isExpand(program, m.operation));
|
|
74
|
+
if (expandOperationMethod) {
|
|
75
|
+
const expandableProperties = getExpand(program, expandOperationMethod.operation);
|
|
75
76
|
const navigationProperties = [...walkPropertiesInherited(type)]
|
|
76
77
|
.filter((property) => isContains(program, property) || isReferences(program, property))
|
|
77
78
|
.map((property) => property.name);
|
|
@@ -80,14 +81,12 @@ function getExpandProperties(program, type, entity) {
|
|
|
80
81
|
}
|
|
81
82
|
return [false, undefined];
|
|
82
83
|
}
|
|
83
|
-
function getSortProperties(program, type,
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
isOrderBy(program, operation));
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
const [_, operation] = sortOperation;
|
|
90
|
-
const sortableProperties = getOrderBy(program, operation);
|
|
84
|
+
function getSortProperties(program, type, operationMethods) {
|
|
85
|
+
const sortOperationMethod = operationMethods.find(m => m.verb === "get" &&
|
|
86
|
+
m.hasMinimumParameters &&
|
|
87
|
+
isOrderBy(program, m.operation));
|
|
88
|
+
if (sortOperationMethod) {
|
|
89
|
+
const sortableProperties = getOrderBy(program, sortOperationMethod.operation);
|
|
91
90
|
const nonNavigationProperties = [...walkPropertiesInherited(type)]
|
|
92
91
|
.filter((property) => !isContains(program, property) && !isReferences(program, property))
|
|
93
92
|
.map((property) => property.name);
|